summaryrefslogtreecommitdiffstats
path: root/EdkCompatibilityPkg
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-30 08:59:21 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-30 08:59:21 +0000
commitb0fa4dd645ab98999b254a8695754bbfc6a1acb8 (patch)
tree400fccf10e1b4ae9eedec24fb40ad65516ee3b57 /EdkCompatibilityPkg
parentc8b54a571db60142814a3caa2f889d6ba569922f (diff)
downloadedk2-b0fa4dd645ab98999b254a8695754bbfc6a1acb8.tar.gz
edk2-b0fa4dd645ab98999b254a8695754bbfc6a1acb8.tar.bz2
edk2-b0fa4dd645ab98999b254a8695754bbfc6a1acb8.zip
Sync patch r10246 from main trunk.
r10246 - Add GlueLib SmmRuntimeDxeReportStatusCodeLib into EdkCompatibilityPkg, which provides the security status code library for EDK runtime and smm driver. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2008@10747 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueDxeDriverEntryPoint.c18
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueSmmDriverEntryPoint.c37
2 files changed, 38 insertions, 17 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueDxeDriverEntryPoint.c b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueDxeDriverEntryPoint.c
index 28b8b6e29d..9c2140e8ec 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueDxeDriverEntryPoint.c
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueDxeDriverEntryPoint.c
@@ -239,7 +239,8 @@ ProcessLibraryConstructorList (
|| defined(__EDKII_GLUE_DXE_SMBUS_LIB__) \
|| defined(__EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__) \
|| defined(__EDKII_GLUE_EDK_DXE_SAL_LIB__) \
- || defined(__EDKII_GLUE_DXE_IO_LIB_CPU_IO__)
+ || defined(__EDKII_GLUE_DXE_IO_LIB_CPU_IO__) \
+ || defined(__EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__)
EFI_STATUS Status;
#endif
@@ -256,6 +257,7 @@ ProcessLibraryConstructorList (
// DxeSmbusLib SmbusLibConstructor()
// DxeServicesTableLib DxeServicesTableLibConstructor()
// UefiRuntimeServicesTableLib UefiRuntimeServicesTableLibConstructor()
+// SmmRuntimeDxeReportStatusCodeLib ReportStatusCodeLibConstruct()
//
#ifdef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
@@ -293,6 +295,11 @@ ProcessLibraryConstructorList (
ASSERT_EFI_ERROR (Status);
#endif
+#ifdef __EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__
+ Status = ReportStatusCodeLibConstruct (ImageHandle, SystemTable);
+ ASSERT_EFI_ERROR (Status);
+#endif
+
#ifdef __EDKII_GLUE_DXE_HOB_LIB__
Status = HobLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);
@@ -315,7 +322,9 @@ ProcessLibraryDestructorList (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
-#if defined (__EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__) || defined (__EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__)
+#if defined (__EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__) \
+ || defined (__EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__) \
+ || defined (__EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__)
EFI_STATUS Status;
#endif
@@ -327,6 +336,11 @@ ProcessLibraryDestructorList (
ASSERT_EFI_ERROR (Status);
#endif
+#ifdef __EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__
+ Status = ReportStatusCodeLibDestruct (ImageHandle, SystemTable);
+ ASSERT_EFI_ERROR (Status);
+#endif
+
#ifdef __EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__
Status = RuntimeDriverLibDeconstruct (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueSmmDriverEntryPoint.c b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueSmmDriverEntryPoint.c
index 9d5f467cfd..3c3f3eb7c2 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueSmmDriverEntryPoint.c
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/EntryPoints/EdkIIGlueSmmDriverEntryPoint.c
@@ -67,27 +67,28 @@ ProcessLibraryConstructorList (
//
#if defined(__EDKII_GLUE_DXE_HOB_LIB__) \
|| defined(__EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__) \
- || defined(__EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__) \
- || defined(__EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__) \
|| defined(__EDKII_GLUE_DXE_SERVICES_TABLE_LIB__) \
|| defined(__EDKII_GLUE_DXE_SMBUS_LIB__) \
|| defined(__EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__) \
- || defined(__EDKII_GLUE_DXE_IO_LIB_CPU_IO__)
+ || defined(__EDKII_GLUE_DXE_IO_LIB_CPU_IO__) \
+ || defined(__EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__)
EFI_STATUS Status;
#endif
//
// EdkII Glue Library Constructors:
// NOTE: the constructors must be called according to dependency order
+// NOTE: compared with EdkIIGlueDxeDriverEntryPoint.c, the EdkDxeRuntimeDriverLib
+// and the UefiDriverModelLib are not applicable for SMM Drivers so not listed
+// here
//
// UefiBootServicesTableLib UefiBootServicesTableLibConstructor()
// DxeIoLibCpuIo IoLibConstructor
-// EdkDxeRuntimeDriverLib RuntimeDriverLibConstruct()
// DxeHobLib HobLibConstructor()
-// UefiDriverModelLib UefiDriverModelLibConstructor()
// DxeSmbusLib SmbusLibConstructor()
// DxeServicesTableLib DxeServicesTableLibConstructor()
// UefiRuntimeServicesTableLib UefiRuntimeServicesTableLibConstructor()
+// SmmRuntimeDxeReportStatusCodeLib ReportStatusCodeLibConstruct()
// check here: check lib usage
#ifdef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__
Status = UefiBootServicesTableLibConstructor (ImageHandle, SystemTable);
@@ -99,26 +100,21 @@ ProcessLibraryConstructorList (
ASSERT_EFI_ERROR (Status);
#endif
-#ifdef __EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__
- Status = RuntimeDriverLibConstruct (ImageHandle, SystemTable);
- ASSERT_EFI_ERROR (Status);
-#endif
-
#ifdef __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__
Status = UefiRuntimeServicesTableLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);
#endif
-#ifdef __EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__
- Status = UefiDriverModelLibConstructor (ImageHandle, SystemTable);
- ASSERT_EFI_ERROR (Status);
-#endif
-
#ifdef __EDKII_GLUE_DXE_SERVICES_TABLE_LIB__
Status = DxeServicesTableLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);
#endif
+#ifdef __EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__
+ Status = ReportStatusCodeLibConstruct (ImageHandle, SystemTable);
+ ASSERT_EFI_ERROR (Status);
+#endif
+
#ifdef __EDKII_GLUE_DXE_HOB_LIB__
Status = HobLibConstructor (ImageHandle, SystemTable);
ASSERT_EFI_ERROR (Status);
@@ -140,6 +136,17 @@ ProcessLibraryDestructorList (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
+#if defined (__EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__)
+ EFI_STATUS Status;
+#endif
+
+//
+// NOTE: the destructors must be called according to dependency order
+//
+#ifdef __EDKII_GLUE_SMM_RUNTIME_DXE_REPORT_STATUS_CODE_LIB__
+ Status = ReportStatusCodeLibDestruct (ImageHandle, SystemTable);
+ ASSERT_EFI_ERROR (Status);
+#endif
}
EFI_BOOT_SERVICES *mBS;