]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1) Make a slightly better work around for the EdkDxeSalLib by removing constructor...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 29 Nov 2006 03:03:20 +0000 (03:03 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 29 Nov 2006 03:03:20 +0000 (03:03 +0000)
2) Fix pointer bug in the EdkUefiRuntimeLibrary in the event creation

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

EdkModulePkg/Library/EdkDxeSalLib/EdkDxeSalLib.msa
EdkModulePkg/Library/EdkDxeSalLib/Ipf/EsalServiceLib.c
EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeLib.c

index 42a846d7c203f0c1ac05d3f62a2ebc113a93907e..a7a6214a30e592735816295303a557c47b0670b5 100644 (file)
@@ -54,9 +54,6 @@
   <Externs>\r
     <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>\r
     <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>\r
-    <Extern>\r
-      <Constructor>DxeSalLibConstruct</Constructor>\r
-    </Extern>\r
     <Extern>\r
       <SetVirtualAddressMapCallBack>DxeSalVirtualNotifyEvent</SetVirtualAddressMapCallBack>\r
     </Extern>\r
index 2e0daeb89e1260c711bca6515f9f6e0bdebb60d5..706dda2873e92a278ce3f5bb668f927e7068c7f9 100644 (file)
@@ -19,20 +19,26 @@ Abstract:
 \r
 #include <Ipf/IpfDefines.h>\r
 \r
-\r
+BOOLEAN mLibraryInitialized = FALSE;\r
 STATIC EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *mEsalBootService;\r
 STATIC EFI_PLABEL                         mPlabel;\r
 \r
 EFI_STATUS\r
 EFIAPI\r
 DxeSalLibConstruct (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
+//  IN EFI_HANDLE        ImageHandle,\r
+//  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  VOID\r
   )\r
 {\r
   EFI_PLABEL  *Plabel;\r
   EFI_STATUS  Status;\r
 \r
+  if (mLibraryInitialized == TRUE) {\r
+    return EFI_SUCCESS;\r
+  }\r
+  mLibraryInitialized = TRUE;\r
+\r
   //\r
   // The protocol contains a function pointer, which is an indirect procedure call.\r
   // An indirect procedure call goes through a plabel, and pointer to a function is\r
@@ -109,6 +115,7 @@ Returns:
 \r
 --*/\r
 {\r
+  DxeSalLibConstruct ();\r
   return mEsalBootService->AddExtendedSalProc (\r
                             mEsalBootService,\r
                             ClassGuid,\r
@@ -217,6 +224,7 @@ Returns:
   SAL_RETURN_REGS       ReturnReg;\r
   SAL_EXTENDED_SAL_PROC EsalProc;\r
 \r
+  DxeSalLibConstruct ();\r
   ReturnReg = GetEsalEntryPoint ();\r
   if (ReturnReg.Status != EFI_SAL_SUCCESS) {\r
     return ReturnReg;\r
index 3e9554721a84026943f09f2c33085f8ca2b8a412..00f557aa413870bdaa6aec6326c0efc3de6554d0 100644 (file)
@@ -159,7 +159,7 @@ Returns:
                   EFI_TPL_NOTIFY,\r
                   RuntimeLibVirtualNotifyEvent,\r
                   NULL,\r
-                  mEfiVirtualNotifyEvent\r
+                  &mEfiVirtualNotifyEvent\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r