]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update EntryPoint library header
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Dec 2008 08:51:16 +0000 (08:51 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Dec 2008 08:51:16 +0000 (08:51 +0000)
Remove UefiTcgPlatform.h from Uefi Directory to IndustryStandard
Change EFI_OPTIONAL_POINTER to EFI_OPTIONAL_PTR aligned to UEFI spec.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7014 6f19259b-4bc3-4df7-8a09-765794883524

13 files changed:
MdePkg/Include/IndustryStandard/UefiTcgPlatform.h [new file with mode: 0644]
MdePkg/Include/Library/PeiCoreEntryPoint.h
MdePkg/Include/Library/PeimEntryPoint.h
MdePkg/Include/Library/UefiApplicationEntryPoint.h
MdePkg/Include/Library/UefiDriverEntryPoint.h
MdePkg/Include/Protocol/TcgService.h
MdePkg/Include/Uefi/UefiGpt.h
MdePkg/Include/Uefi/UefiSpec.h
MdePkg/Include/Uefi/UefiTcgPlatform.h [deleted file]
MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c
MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c
MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c

diff --git a/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h b/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h
new file mode 100644 (file)
index 0000000..d3e3402
--- /dev/null
@@ -0,0 +1,149 @@
+/** @file\r
+  TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final\r
+\r
+  Copyright (c) 2006 - 2008, 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 __UEFI_TCG_PLATFORM_H__\r
+#define __UEFI_TCG_PLATFOMR_H__\r
+\r
+#include <IndustryStandard/Tpm12.h>\r
+#include <Uefi.h>\r
+\r
+//\r
+// Standard event types\r
+//\r
+#define EV_POST_CODE                ((TCG_EVENTTYPE) 0x00000001)\r
+#define EV_SEPARATOR                ((TCG_EVENTTYPE) 0x00000004)\r
+#define EV_S_CRTM_CONTENTS          ((TCG_EVENTTYPE) 0x00000007)\r
+#define EV_S_CRTM_VERSION           ((TCG_EVENTTYPE) 0x00000008)\r
+\r
+//\r
+// EFI specific event types\r
+//\r
+#define EV_EFI_EVENT_BASE                   ((TCG_EVENTTYPE) 0x80000000)\r
+#define EV_EFI_VARIABLE_DRIVER_CONFIG       (EV_EFI_EVENT_BASE + 1)\r
+#define EV_EFI_VARIABLE_BOOT                (EV_EFI_EVENT_BASE + 2)\r
+#define EV_EFI_BOOT_SERVICES_APPLICATION    (EV_EFI_EVENT_BASE + 3)\r
+#define EV_EFI_BOOT_SERVICES_DRIVER         (EV_EFI_EVENT_BASE + 4)\r
+#define EV_EFI_RUNTIME_SERVICES_DRIVER      (EV_EFI_EVENT_BASE + 5)\r
+#define EV_EFI_GPT_EVENT                    (EV_EFI_EVENT_BASE + 6)\r
+#define EV_EFI_ACTION                       (EV_EFI_EVENT_BASE + 7)\r
+#define EV_EFI_PLATFORM_FIRMWARE_BLOB       (EV_EFI_EVENT_BASE + 8)\r
+#define EV_EFI_HANDOFF_TABLES               (EV_EFI_EVENT_BASE + 9)\r
+\r
+#define EFI_CALLING_EFI_APPLICATION         \\r
+  "Calling EFI Application from Boot Option"\r
+#define EFI_RETURNING_FROM_EFI_APPLICATOIN  \\r
+  "Returning from EFI Application from Boot Option"\r
+#define EFI_EXIT_BOOT_SERVICES_INVOCATION   \\r
+  "Exit Boot Services Invocation"\r
+#define EFI_EXIT_BOOT_SERVICES_FAILED       \\r
+  "Exit Boot Services Returned with Failure"\r
+#define EFI_EXIT_BOOT_SERVICES_SUCCEEDED    \\r
+  "Exit Boot Services Returned with Success"\r
+\r
+//\r
+// Set structure alignment to 1-byte\r
+//\r
+#pragma pack (1)\r
+\r
+typedef UINT32                     TCG_EVENTTYPE;\r
+typedef TPM_PCRINDEX               TCG_PCRINDEX;\r
+typedef TPM_DIGEST                 TCG_DIGEST;\r
+///\r
+/// Event Log Entry Structure Definition\r
+///\r
+typedef struct tdTCG_PCR_EVENT {\r
+  TCG_PCRINDEX                      PCRIndex;  ///< PCRIndex event extended to\r
+  TCG_EVENTTYPE                     EventType; ///< TCG EFI event type\r
+  TCG_DIGEST                        Digest;    ///< Value extended into PCRIndex\r
+  UINT32                            EventSize; ///< Size of the event data\r
+  UINT8                             Event[1];  ///< The event data\r
+} TCG_PCR_EVENT;\r
+\r
+#define TSS_EVENT_DATA_MAX_SIZE   256\r
+\r
+///\r
+/// TCG_PCR_EVENT_HDR\r
+///\r
+typedef struct tdTCG_PCR_EVENT_HDR {\r
+  TCG_PCRINDEX                      PCRIndex;\r
+  TCG_EVENTTYPE                     EventType;\r
+  TCG_DIGEST                        Digest;\r
+  UINT32                            EventSize;\r
+} TCG_PCR_EVENT_HDR;\r
+\r
+///\r
+/// EFI_PLATFORM_FIRMWARE_BLOB\r
+///\r
+/// BlobLength should be of type UINTN but we use UINT64 here\r
+/// because PEI is 32-bit while DXE is 64-bit on x64 platforms\r
+///\r
+typedef struct tdEFI_PLATFORM_FIRMWARE_BLOB {\r
+  EFI_PHYSICAL_ADDRESS              BlobBase;\r
+  UINT64                            BlobLength;\r
+} EFI_PLATFORM_FIRMWARE_BLOB;\r
+\r
+///\r
+/// EFI_IMAGE_LOAD_EVENT\r
+///\r
+/// This structure is used in EV_EFI_BOOT_SERVICES_APPLICATION,\r
+/// EV_EFI_BOOT_SERVICES_DRIVER and EV_EFI_RUNTIME_SERVICES_DRIVER\r
+///\r
+typedef struct tdEFI_IMAGE_LOAD_EVENT {\r
+  EFI_PHYSICAL_ADDRESS              ImageLocationInMemory;\r
+  UINTN                             ImageLengthInMemory;\r
+  UINTN                             ImageLinkTimeAddress;\r
+  UINTN                             LengthOfDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL          DevicePath[1];\r
+} EFI_IMAGE_LOAD_EVENT;\r
+\r
+///\r
+/// EFI_HANDOFF_TABLE_POINTERS\r
+///\r
+/// This structure is used in EV_EFI_HANDOFF_TABLES event to facilitate\r
+/// the measurement of given configuration tables.\r
+///\r
+typedef struct tdEFI_HANDOFF_TABLE_POINTERS {\r
+  UINTN                             NumberOfTables;\r
+  EFI_CONFIGURATION_TABLE           TableEntry[1];\r
+} EFI_HANDOFF_TABLE_POINTERS;\r
+\r
+///\r
+/// EFI_VARIABLE_DATA\r
+///\r
+/// This structure serves as the header for measuring variables. The name of the\r
+/// variable (in Unicode format) should immediately follow, then the variable\r
+/// data.\r
+///\r
+typedef struct tdEFI_VARIABLE_DATA {\r
+  EFI_GUID                          VariableName;\r
+  UINTN                             UnicodeNameLength;\r
+  UINTN                             VariableDataLength;\r
+  CHAR16                            UnicodeName[1];\r
+  INT8                              VariableData[1];  ///< Driver or platform-specific data\r
+} EFI_VARIABLE_DATA;\r
+\r
+typedef struct tdEFI_GPT_DATA {\r
+  EFI_PARTITION_TABLE_HEADER  EfiPartitionHeader;\r
+  UINTN                       NumberOfPartitions; \r
+  EFI_PARTITION_ENTRY         Partitions[1];\r
+} EFI_GPT_DATA;\r
+\r
+//\r
+// Restore original structure alignment\r
+//\r
+#pragma pack ()\r
+\r
+#endif\r
+\r
+\r
index 42ba464fbec2cd058a709114b1847637a456ceaa..29c1d9c2e61e17e3ec3db548d754f36c98df0a1a 100644 (file)
@@ -91,7 +91,7 @@ EfiMain (
   The PEI Core must call this function with a NULL FileHandle value as soon as the initial PEI\r
   Services Table has been established.\r
 \r
-  @param  FileHandle   Handle of the file being invoked.Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().\r
+  @param  FileHandle   Handle of the file being invoked.\r
   @param  PeiServices  Describes the list of possible PEI Services.\r
 \r
 **/\r
index ae53b2f94d2f18d03d16f29fde1b400955e03533..16ad7cce0a473fb4446e1b706c51a169804c9b56 100644 (file)
@@ -22,10 +22,13 @@ extern CONST UINT32       _gPeimRevision;
 \r
 \r
 /**\r
-  Image entry point of Peim.\r
+  The entry point of PE/COFF Image for a PEIM.\r
+\r
+  This function is the entry point for a PEIM.  This function must call ProcessLibraryConstructorList() \r
+  and ProcessModuleEntryPointList().  The return value from ProcessModuleEntryPointList() is returned.\r
+  If _gPeimRevision is not zero and PeiServices->Hdr.Revision is less than _gPeimRevison, then ASSERT().\r
 \r
   @param  FileHandle  Handle of the file being invoked. \r
-                      Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().\r
   @param  PeiServices Describes the list of possible PEI Services.\r
 \r
   @retval  EFI_SUCCESS   The PEIM executed normally.\r
@@ -41,9 +44,10 @@ _ModuleEntryPoint (
 \r
 /**\r
   Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().\r
+  \r
+  This function is required to call _ModuleEntryPoint() passing in FileHandle and PeiServices.\r
 \r
   @param  FileHandle  Handle of the file being invoked. \r
-                      Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().\r
   @param  PeiServices Describes the list of possible PEI Services.\r
 \r
   @retval EFI_SUCCESS  The PEIM executed normally.\r
@@ -57,13 +61,20 @@ EfiMain (
   IN CONST EFI_PEI_SERVICES    **PeiServices\r
   );\r
 \r
-\r
 /**\r
-  Call constructs for all libraries. Automatics Generated by tool.\r
+  Autogenerated function that calls the library constructors for all of the module's\r
+  dependent libraries.\r
 \r
-  @param  FileHandle  Handle of the file being invoked. \r
-                      Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().\r
-  @param  PeiServices Describes the list of possible PEI Services.\r
+  This function must be called by the PEI Core once an initial PEI Services Table has been established.\r
+  This function calls the set of library constructors for the set of library instances that a\r
+  module depends on.  This include library instances that a module depends on directly and library\r
+  instances that a module depends on indirectly through other libraries.  \r
+  This function is autogenerated by build tools and those build tools are responsible for collecting\r
+  the set of library instances, determine which ones have constructors, and calling the library\r
+  constructors in the proper order based upon each of the library instances own dependencies.\r
+\r
+  @param  FileHandle   Handle of the file being invoked.\r
+  @param  PeiServices  Describes the list of possible PEI Services.\r
 \r
 **/\r
 VOID\r
@@ -73,28 +84,15 @@ ProcessLibraryConstructorList (
   IN CONST EFI_PEI_SERVICES    **PeiServices\r
   );\r
 \r
-\r
 /**\r
-  Call destructors for all libraries. Automatics Generated by tool.\r
-\r
-  @param  FileHandle  Handle of the file being invoked. \r
-                      Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().\r
-  @param  PeiServices Describes the list of possible PEI Services.\r
+  Autogenerated function that calls a set of module entry points.\r
 \r
-**/\r
-VOID\r
-EFIAPI\r
-ProcessLibraryDestructorList (\r
-  IN EFI_PEI_FILE_HANDLE       FileHandle,\r
-  IN CONST EFI_PEI_SERVICES    **PeiServices\r
-  );\r
-\r
-\r
-/**\r
-  Call the list of driver entry points. Automatics Generated by tool.\r
+  This function must be called by _ModuleEntryPoint().\r
+  This function calls the set of module entry points.  \r
+  This function is autogenerated by build tools and those build tools are responsible\r
+  for collecting the module entry points and calling them in a specified order.\r
 \r
   @param  FileHandle  Handle of the file being invoked. \r
-                      Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().\r
   @param  PeiServices Describes the list of possible PEI Services.\r
 \r
   @retval EFI_SUCCESS  The PEIM executed normally.\r
index 9497f9a1621f0d5abeec2814e6e0a37ee5b49bf1..94aa0c539da214e21f4b9f52e3c401152438a0c3 100644 (file)
@@ -66,7 +66,7 @@ EfiMain (
 \r
 \r
 /**\r
-  Invokes the library destructors fror all dependent libraries and terminates\r
+  Invokes the library destructors for all dependent libraries and terminates\r
   the UEFI Application. \r
 \r
   This function calls ProcessLibraryDestructorList() and the EFI Boot Service Exit()\r
@@ -132,12 +132,13 @@ ProcessLibraryDestructorList (
   );\r
 \r
 /**\r
-  Call driver entry point. For UEFI application, user\r
-  can only specify one entry point. Tool will automatically insert\r
-  this to Autogen.c.\r
+  This function calls the set of module entry points. It must be called by _ModuleEntryPoint().\r
 \r
-  @param  ImageHandle ImageHandle of the loaded driver.\r
-  @param  SystemTable Pointer to the EFI System Table.\r
+  This function is autogenerated by build tools and those build tools are \r
+  responsible for collecting the module entry points and calling them in a specified order.\r
+\r
+  @param  ImageHandle    The image handle of the UEFI Application.\r
+  @param  SystemTable    A pointer to the EFI System Table.\r
 \r
   @retval  EFI_SUCCESS   The UEFI Application executed normally.\r
   @retval  !EFI_SUCCESS  The UEFI Application failed to execute normally.\r
index 2e520582ecb84e372e2559ad878ec9c8816f343d..7946cb13f85f9fb5b473440eeec26c93f081dd76 100644 (file)
@@ -46,8 +46,8 @@ extern CONST UINT8                    _gDriverUnloadImageCount;
   then return EFI_INCOMPATIBLE_VERSION.\r
 \r
 \r
-  @param  ImageHandle  ImageHandle of the loaded driver.\r
-  @param  SystemTable  Pointer to the EFI System Table.\r
+  @param  ImageHandle  The image handle of the DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver.\r
+  @param  SystemTable  A pointer to the EFI System Table.\r
 \r
   @retval  EFI_SUCCESS               The DXE Driver, DXE Runtime Driver, DXE SMM Driver,\r
                                      or UEFI Driver exited normally.\r
@@ -68,8 +68,8 @@ _ModuleEntryPoint (
 \r
   This function is required to call _ModuleEntryPoint() passing in ImageHandle, and SystemTable.\r
 \r
-  @param  ImageHandle ImageHandle of the loaded driver.\r
-  @param  SystemTable Pointer to the EFI System Table.\r
+  @param  ImageHandle  The image handle of the DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver.\r
+  @param  SystemTable  A pointer to the EFI System Table.\r
 \r
   @retval  EFI_SUCCESS               The DXE Driver, DXE Runtime Driver, DXE SMM Driver,\r
                                      or UEFI Driver exited normally.\r
@@ -85,7 +85,7 @@ EfiMain (
 \r
 \r
 /**\r
-  Invokes the library destructors fror all dependent libraries and terminates the\r
+  Invokes the library destructors for all dependent libraries and terminates the\r
   DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver. \r
 \r
   This function calls ProcessLibraryDestructorList() and the EFI Boot Service Exit()\r
@@ -114,8 +114,8 @@ ExitDriver (
   and calling the library constructors in the proper order based upon each of the library\r
   instances own dependencies.\r
 \r
-  @param  ImageHandle ImageHandle of the loaded driver.\r
-  @param  SystemTable Pointer to the EFI System Table.\r
+  @param  ImageHandle  The image handle of the DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver.\r
+  @param  SystemTable  A pointer to the EFI System Table.\r
 \r
 **/\r
 VOID\r
@@ -138,8 +138,8 @@ ProcessLibraryConstructorList (
   collecting the set of library instances, determine which ones have destructors, and calling\r
   the library destructors in the proper order based upon each of the library instances own dependencies.\r
 \r
-  @param  ImageHandle ImageHandle of the loaded driver.\r
-  @param  SystemTable Pointer to the EFI System Table.\r
+  @param  ImageHandle  The image handle of the DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver.\r
+  @param  SystemTable  A pointer to the EFI System Table.\r
 \r
 **/\r
 VOID\r
@@ -158,11 +158,11 @@ ProcessLibraryDestructorList (
   This function is autogenerated by build tools and those build tools are responsible\r
   for collecting the module entry points and calling them in a specified order.\r
 \r
-  @param  ImageHandle ImageHandle of the loaded driver.\r
-  @param  SystemTable Pointer to the EFI System Table.\r
+  @param  ImageHandle  The image handle of the DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver.\r
+  @param  SystemTable  A pointer to the EFI System Table.\r
 \r
-  @retval  EFI_SUCCESS   The UEFI Application executed normally.\r
-  @retval  !EFI_SUCCESS  The UEFI Application failed to execute normally.\r
+  @retval  EFI_SUCCESS   The DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver executed normally.\r
+  @retval  !EFI_SUCCESS  The DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver failed to execute normally.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -180,7 +180,7 @@ ProcessModuleEntryPointList (
   This function is autogenerated by build tools and those build tools are responsible\r
   for collecting the module unload handlers and calling them in a specified order.\r
 \r
-  @param  ImageHandle ImageHandle of the loaded driver.\r
+  @param  ImageHandle  The image handle of the DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver.\r
 \r
   @retval  EFI_SUCCESS  The unoad handlers executed normally.\r
   @retval  !EFI_SUCCESS The unload handlers failed to execute normally.\r
index 1f378535cf056f95ed517641fb97e21fd18236e4..5502121480dad071a7839d08ede9d27dbeeb5981 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef _TCG_SERVICE_PROTOCOL_H_\r
 #define _TCG_SERVICE_PROTOCOL_H_\r
 \r
-#include <Uefi/UefiTcgPlatform.h>\r
+#include <IndustryStandard/UefiTcgPlatform.h>\r
 \r
 #define EFI_TCG_PROTOCOL_GUID  \\r
   {0xf541796d, 0xa62e, 0x4954, { 0xa7, 0x75, 0x95, 0x84, 0xf6, 0x1b, 0x9c, 0xdd } } \r
index da5f187c522b76806af02721733498904501a5f3..59704e3362500ec31493d2c3d517226869a9f45e 100644 (file)
 /// located in LBA 1 (i.e., the second logical block).\r
 ///\r
 #define PRIMARY_PART_HEADER_LBA 1\r
-\r
 ///\r
 /// EFI Partition Table Signature: "EFI PART"\r
 /// \r
-#define EFI_PTAB_HEADER_ID      0x5452415020494645ULL\r
+#define EFI_PTAB_HEADER_ID      SIGNATURE_64 ('E','F','I',' ','P','A','R','T')\r
 \r
 #pragma pack(1)\r
 \r
index 906bf68899db79c1cc3feb626824b64f84a8af19..12611c7c1c03c962bc6d0971609e5e9736452bd6 100644 (file)
@@ -328,7 +328,6 @@ EFI_STATUS
 // ConvertPointer DebugDisposition type.\r
 //\r
 #define EFI_OPTIONAL_PTR     0x00000001\r
-#define EFI_OPTIONAL_POINTER EFI_OPTIONAL_PTR\r
 \r
 /**\r
   Determines the new virtual address that is to be used on subsequent memory accesses.\r
@@ -1582,8 +1581,8 @@ typedef struct {
   UINT32            HeaderSize;\r
   ///\r
   /// Bit-mapped list describing the capsule attributes. The Flag values\r
-  /// of 0x0000 ¨C 0xFFFF are defined by CapsuleGuid. Flag values\r
-  /// of 0x10000 ¨C 0xFFFF0000 are defined by this specification\r
+  /// of 0x0000 - 0xFFFF are defined by CapsuleGuid. Flag values\r
+  /// of 0x10000 - 0xFFFF0000 are defined by this specification\r
   ///\r
   UINT32            Flags;\r
   ///\r
diff --git a/MdePkg/Include/Uefi/UefiTcgPlatform.h b/MdePkg/Include/Uefi/UefiTcgPlatform.h
deleted file mode 100644 (file)
index c99a905..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/** @file\r
-  TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final\r
-\r
-  Copyright (c) 2006 - 2008, 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 __UEFI_TCG_PLATFORM_H__\r
-#define __UEFI_TCG_PLATFOMR_H__\r
-\r
-#include <IndustryStandard/Tpm12.h>\r
-\r
-#include <Uefi.h>\r
-\r
-//\r
-// Standard event types\r
-//\r
-#define EV_POST_CODE                ((TCG_EVENTTYPE) 0x00000001)\r
-#define EV_SEPARATOR                ((TCG_EVENTTYPE) 0x00000004)\r
-#define EV_S_CRTM_CONTENTS          ((TCG_EVENTTYPE) 0x00000007)\r
-#define EV_S_CRTM_VERSION           ((TCG_EVENTTYPE) 0x00000008)\r
-\r
-//\r
-// EFI specific event types\r
-//\r
-#define EV_EFI_EVENT_BASE                   ((TCG_EVENTTYPE) 0x80000000)\r
-#define EV_EFI_VARIABLE_DRIVER_CONFIG       (EV_EFI_EVENT_BASE + 1)\r
-#define EV_EFI_VARIABLE_BOOT                (EV_EFI_EVENT_BASE + 2)\r
-#define EV_EFI_BOOT_SERVICES_APPLICATION    (EV_EFI_EVENT_BASE + 3)\r
-#define EV_EFI_BOOT_SERVICES_DRIVER         (EV_EFI_EVENT_BASE + 4)\r
-#define EV_EFI_RUNTIME_SERVICES_DRIVER      (EV_EFI_EVENT_BASE + 5)\r
-#define EV_EFI_GPT_EVENT                    (EV_EFI_EVENT_BASE + 6)\r
-#define EV_EFI_ACTION                       (EV_EFI_EVENT_BASE + 7)\r
-#define EV_EFI_PLATFORM_FIRMWARE_BLOB       (EV_EFI_EVENT_BASE + 8)\r
-#define EV_EFI_HANDOFF_TABLES               (EV_EFI_EVENT_BASE + 9)\r
-\r
-#define EFI_CALLING_EFI_APPLICATION         \\r
-  "Calling EFI Application from Boot Option"\r
-#define EFI_RETURNING_FROM_EFI_APPLICATOIN  \\r
-  "Returning from EFI Application from Boot Option"\r
-#define EFI_EXIT_BOOT_SERVICES_INVOCATION   \\r
-  "Exit Boot Services Invocation"\r
-#define EFI_EXIT_BOOT_SERVICES_FAILED       \\r
-  "Exit Boot Services Returned with Failure"\r
-#define EFI_EXIT_BOOT_SERVICES_SUCCEEDED    \\r
-  "Exit Boot Services Returned with Success"\r
-\r
-//\r
-// Set structure alignment to 1-byte\r
-//\r
-#pragma pack (1)\r
-\r
-typedef UINT32                     TCG_EVENTTYPE;\r
-typedef TPM_PCRINDEX               TCG_PCRINDEX;\r
-typedef TPM_DIGEST                 TCG_DIGEST;\r
-///\r
-/// Event Log Entry Structure Definition\r
-///\r
-typedef struct tdTCG_PCR_EVENT {\r
-  TCG_PCRINDEX                      PCRIndex;  ///< PCRIndex event extended to\r
-  TCG_EVENTTYPE                     EventType; ///< TCG EFI event type\r
-  TCG_DIGEST                        Digest;    ///< Value extended into PCRIndex\r
-  UINT32                            EventSize; ///< Size of the event data\r
-  UINT8                             Event[1];  ///< The event data\r
-} TCG_PCR_EVENT;\r
-\r
-#define TSS_EVENT_DATA_MAX_SIZE   256\r
-\r
-///\r
-/// TCG_PCR_EVENT_HDR\r
-///\r
-typedef struct tdTCG_PCR_EVENT_HDR {\r
-  TCG_PCRINDEX                      PCRIndex;\r
-  TCG_EVENTTYPE                     EventType;\r
-  TCG_DIGEST                        Digest;\r
-  UINT32                            EventSize;\r
-} TCG_PCR_EVENT_HDR;\r
-\r
-///\r
-/// EFI_PLATFORM_FIRMWARE_BLOB\r
-///\r
-/// BlobLength should be of type UINTN but we use UINT64 here\r
-/// because PEI is 32-bit while DXE is 64-bit on x64 platforms\r
-///\r
-typedef struct tdEFI_PLATFORM_FIRMWARE_BLOB {\r
-  EFI_PHYSICAL_ADDRESS              BlobBase;\r
-  UINT64                            BlobLength;\r
-} EFI_PLATFORM_FIRMWARE_BLOB;\r
-\r
-///\r
-/// EFI_IMAGE_LOAD_EVENT\r
-///\r
-/// This structure is used in EV_EFI_BOOT_SERVICES_APPLICATION,\r
-/// EV_EFI_BOOT_SERVICES_DRIVER and EV_EFI_RUNTIME_SERVICES_DRIVER\r
-///\r
-typedef struct tdEFI_IMAGE_LOAD_EVENT {\r
-  EFI_PHYSICAL_ADDRESS              ImageLocationInMemory;\r
-  UINTN                             ImageLengthInMemory;\r
-  UINTN                             ImageLinkTimeAddress;\r
-  UINTN                             LengthOfDevicePath;\r
-  EFI_DEVICE_PATH_PROTOCOL          DevicePath[1];\r
-} EFI_IMAGE_LOAD_EVENT;\r
-\r
-///\r
-/// EFI_HANDOFF_TABLE_POINTERS\r
-///\r
-/// This structure is used in EV_EFI_HANDOFF_TABLES event to facilitate\r
-/// the measurement of given configuration tables.\r
-///\r
-typedef struct tdEFI_HANDOFF_TABLE_POINTERS {\r
-  UINTN                             NumberOfTables;\r
-  EFI_CONFIGURATION_TABLE           TableEntry[1];\r
-} EFI_HANDOFF_TABLE_POINTERS;\r
-\r
-///\r
-/// EFI_VARIABLE_DATA\r
-///\r
-/// This structure serves as the header for measuring variables. The name of the\r
-/// variable (in Unicode format) should immediately follow, then the variable\r
-/// data.\r
-///\r
-typedef struct tdEFI_VARIABLE_DATA {\r
-  EFI_GUID                          VariableName;\r
-  UINTN                             UnicodeNameLength;\r
-  UINTN                             VariableDataLength;\r
-  CHAR16                            UnicodeName[1];\r
-  INT8                              VariableData[1];  ///< Driver or platform-specific data\r
-} EFI_VARIABLE_DATA;\r
-\r
-typedef struct tdEFI_GPT_DATA {\r
-  EFI_PARTITION_TABLE_HEADER  EfiPartitionHeader;\r
-  UINTN                       NumberOfPartitions; \r
-  EFI_PARTITION_ENTRY         Partitions[1];\r
-} EFI_GPT_DATA;\r
-\r
-//\r
-// Restore original structure alignment\r
-//\r
-#pragma pack ()\r
-\r
-#endif\r
-\r
-\r
index b80f420d7074ed867b64c8a3b1efd9ca692fee61..3fb668b453bddff53f0c97683edbd6d2392fa447 100644 (file)
@@ -1,7 +1,5 @@
 #/** @file\r
 #  Instance of Debug Library based on Serial Port Library.\r
-#\r
-#  Instance of Debug Library based on Serial Port Library.\r
 #  It uses Print Library to produce formatted output strings.\r
 #\r
 #  Copyright (c) 2006 - 2008, Intel Corporation.\r
index 68e4f6acec40355a6aa3bcc5843d03d6066dc51c..bb038b71d66b4159a0f627835e32ff224d9bfde7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Resource Publication Library that uses PEI Core Services to publish system memory.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\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
index a03c37705920c604c1dff373881fcddb4936ed54..59503e4b77449c41431a3ad26a8fad6d548df2bf 100644 (file)
@@ -20,10 +20,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/DebugLib.h>\r
 \r
 /**\r
-  Image entry point of Peim.\r
+  The entry point of PE/COFF Image for a PEIM.\r
+\r
+  This function is the entry point for a PEIM.  This function must call ProcessLibraryConstructorList() \r
+  and ProcessModuleEntryPointList().  The return value from ProcessModuleEntryPointList() is returned.\r
+  If _gPeimRevision is not zero and PeiServices->Hdr.Revision is less than _gPeimRevison, then ASSERT().\r
 \r
   @param  FileHandle  Handle of the file being invoked. \r
-                      Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().\r
   @param  PeiServices Describes the list of possible PEI Services.\r
 \r
   @retval  EFI_SUCCESS   The PEIM executed normally.\r
@@ -57,9 +60,10 @@ _ModuleEntryPoint (
 \r
 /**\r
   Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().\r
+  \r
+  This function is required to call _ModuleEntryPoint() passing in FileHandle and PeiServices.\r
 \r
   @param  FileHandle  Handle of the file being invoked. \r
-                      Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().\r
   @param  PeiServices Describes the list of possible PEI Services.\r
 \r
   @retval EFI_SUCCESS  The PEIM executed normally.\r
index 68d6a4bb94a348df51b261e61d0342387bb1ac90..9d925ef70b85627093d843251b8db58b20ece879 100644 (file)
@@ -76,8 +76,8 @@ _DriverUnloadHandler (
   then return EFI_INCOMPATIBLE_VERSION.\r
 \r
 \r
-  @param  ImageHandle  ImageHandle of the loaded driver.\r
-  @param  SystemTable  Pointer to the EFI System Table.\r
+  @param  ImageHandle  The image handle of the DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver.\r
+  @param  SystemTable  A pointer to the EFI System Table.\r
 \r
   @retval  EFI_SUCCESS               The DXE Driver, DXE Runtime Driver, DXE SMM Driver,\r
                                      or UEFI Driver exited normally.\r
@@ -146,8 +146,8 @@ _ModuleEntryPoint (
 \r
   This function is required to call _ModuleEntryPoint() passing in ImageHandle, and SystemTable.\r
 \r
-  @param  ImageHandle ImageHandle of the loaded driver.\r
-  @param  SystemTable Pointer to the EFI System Table.\r
+  @param  ImageHandle  The image handle of the DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver.\r
+  @param  SystemTable  A pointer to the EFI System Table.\r
 \r
   @retval  EFI_SUCCESS               The DXE Driver, DXE Runtime Driver, DXE SMM Driver,\r
                                      or UEFI Driver exited normally.\r