]> git.proxmox.com Git - mirror_edk2.git/commitdiff
import Debug Agent Library and null instance in MdeModulePkg.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 26 Feb 2010 05:38:04 +0000 (05:38 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 26 Feb 2010 05:38:04 +0000 (05:38 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10099 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Include/Library/DebugAgentLib.h [new file with mode: 0644]
MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c [new file with mode: 0644]
MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf [new file with mode: 0644]
MdeModulePkg/MdeModulePkg.dec
MdeModulePkg/MdeModulePkg.dsc

diff --git a/MdeModulePkg/Include/Library/DebugAgentLib.h b/MdeModulePkg/Include/Library/DebugAgentLib.h
new file mode 100644 (file)
index 0000000..9a5c57e
--- /dev/null
@@ -0,0 +1,55 @@
+/** @file\r
+  Debug Agent Library provide source-level debug capability.\r
+\r
+  Copyright (c) 2010, Intel Corporation\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __DEBUG_AGENT_LIB_H__\r
+#define __DEBUG_AGENT_LIB_H__\r
+\r
+#define DEBUG_AGENT_INIT_PREMEM_SEC      1\r
+#define DEBUG_AGENT_INIT_POSTMEM_SEC     2\r
+#define DEBUG_AGENT_INIT_DXE             3\r
+#define DEBUG_AGENT_INIT_SMM             4\r
+#define DEBUG_AGENT_INIT_SMI             5\r
+\r
+/**\r
+  Initialize debug agent.\r
+\r
+  This function is used to set up debug enviroment.\r
+\r
+  @param[in] InitFlag   Init flag is used to decide initialize process.\r
+  @param[in] Context    Context needed according to InitFlag, it was optional.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+InitializeDebugAgent (\r
+  IN UINT32                InitFlag,\r
+  IN VOID                  *Context  OPTIONAL\r
+  );\r
+\r
+/**\r
+  Enable/Disable the interrupt of debug timer.\r
+\r
+  If EnableStatus is TRUE, enable the interrupt of debug timer.\r
+  If EnableStatus is FALSE, disable the interrupt of debug timer.\r
+\r
+  @param[in] EnableStatus    Enable/Disable.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+SetDebugTimerInterrupt (\r
+  IN BOOLEAN                EnableStatus\r
+  );\r
+\r
+#endif\r
diff --git a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.c
new file mode 100644 (file)
index 0000000..cf945d0
--- /dev/null
@@ -0,0 +1,51 @@
+/** @file\r
+  Debug Agent library implementition with empty functions.\r
+\r
+  Copyright (c) 2010, Intel Corporation\r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+/**\r
+  Initialize debug agent.\r
+\r
+  This function is used to set up debug enviroment. It may enable interrupts.\r
+\r
+  @param[in] InitFlag   Init flag is used to decide initialize process.\r
+  @param[in] Context    Context needed according to InitFlag, it was optional.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+InitializeDebugAgent (\r
+  IN UINT32                InitFlag,\r
+  IN VOID                  *Context  OPTIONAL\r
+  )\r
+{\r
+\r
+}\r
+\r
+/**\r
+  Enable/Disable the interrupt of debug timer.\r
+\r
+  If EnableStatus is TRUE, enable the interrupt of debug timer.\r
+  If EnableStatus is FALSE, disable the interrupt of debug timer.\r
+\r
+  @param[in] EnableStatus    Enable/Disable.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+SetDebugTimerInterrupt (\r
+  IN BOOLEAN                EnableStatus\r
+  )\r
+{\r
+\r
+}\r
+\r
diff --git a/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf b/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
new file mode 100644 (file)
index 0000000..f45deca
--- /dev/null
@@ -0,0 +1,36 @@
+#/** @file\r
+# Null instance of Debug Agent Library with empty functions.\r
+#\r
+#  Copyright (c) 2010, Intel Corporation.\r
+#\r
+#  All rights reserved. This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution. The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#\r
+#**/\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = DebugAgentLibNull\r
+  FILE_GUID                      = 4904B42F-9FC0-4c2e-BB3F-A2AB35123530\r
+  MODULE_TYPE                    = BASE\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = DebugAgentLib\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
+#\r
+\r
+[Sources.common]\r
+  DebugAgentLibNull.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+\r
index 50e6509697320094258b1d38277ec78c9ed868fb..d38ace4c0b16392e907a41b621f7db4772d0a8c6 100644 (file)
@@ -76,6 +76,9 @@
   #\r
   OemHookStatusCodeLib|Include/Library/OemHookStatusCodeLib.h\r
 \r
+  ##  @libraryclass  Debug Agent is used to provide soft debug capability.\r
+  #\r
+  DebugAgentLib|Include/Library/DebugAgentLib.h\r
 [Guids]\r
   ## MdeModule package token space guid\r
   # Include/Guid/MdeModulePkgTokenSpace.h\r
index 92267bcbbcdcb86774e1531aeaabcb9f2eb6ac00..d8e856927b2610969db941b4348277762e6bd49b 100644 (file)
@@ -73,6 +73,7 @@
   SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf\r
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf\r
   OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf\r
+  DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf\r
 \r
 [LibraryClasses.IA32]\r
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r