diff options
-rw-r--r-- | EdkModulePkg/Library/EdkDxeSalLib/EdkDxeSalLib.msa | 3 | ||||
-rw-r--r-- | EdkModulePkg/Library/EdkDxeSalLib/Ipf/EsalServiceLib.c | 14 | ||||
-rw-r--r-- | EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeLib.c | 2 |
3 files changed, 12 insertions, 7 deletions
diff --git a/EdkModulePkg/Library/EdkDxeSalLib/EdkDxeSalLib.msa b/EdkModulePkg/Library/EdkDxeSalLib/EdkDxeSalLib.msa index 42a846d7c2..a7a6214a30 100644 --- a/EdkModulePkg/Library/EdkDxeSalLib/EdkDxeSalLib.msa +++ b/EdkModulePkg/Library/EdkDxeSalLib/EdkDxeSalLib.msa @@ -55,9 +55,6 @@ <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
<Extern>
- <Constructor>DxeSalLibConstruct</Constructor>
- </Extern>
- <Extern>
<SetVirtualAddressMapCallBack>DxeSalVirtualNotifyEvent</SetVirtualAddressMapCallBack>
</Extern>
</Externs>
diff --git a/EdkModulePkg/Library/EdkDxeSalLib/Ipf/EsalServiceLib.c b/EdkModulePkg/Library/EdkDxeSalLib/Ipf/EsalServiceLib.c index 2e0daeb89e..706dda2873 100644 --- a/EdkModulePkg/Library/EdkDxeSalLib/Ipf/EsalServiceLib.c +++ b/EdkModulePkg/Library/EdkDxeSalLib/Ipf/EsalServiceLib.c @@ -19,20 +19,26 @@ Abstract: #include <Ipf/IpfDefines.h>
-
+BOOLEAN mLibraryInitialized = FALSE;
STATIC EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *mEsalBootService;
STATIC EFI_PLABEL mPlabel;
EFI_STATUS
EFIAPI
DxeSalLibConstruct (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+// IN EFI_HANDLE ImageHandle,
+// IN EFI_SYSTEM_TABLE *SystemTable
+ VOID
)
{
EFI_PLABEL *Plabel;
EFI_STATUS Status;
+ if (mLibraryInitialized == TRUE) {
+ return EFI_SUCCESS;
+ }
+ mLibraryInitialized = TRUE;
+
//
// The protocol contains a function pointer, which is an indirect procedure call.
// An indirect procedure call goes through a plabel, and pointer to a function is
@@ -109,6 +115,7 @@ Returns: --*/
{
+ DxeSalLibConstruct ();
return mEsalBootService->AddExtendedSalProc (
mEsalBootService,
ClassGuid,
@@ -217,6 +224,7 @@ Returns: SAL_RETURN_REGS ReturnReg;
SAL_EXTENDED_SAL_PROC EsalProc;
+ DxeSalLibConstruct ();
ReturnReg = GetEsalEntryPoint ();
if (ReturnReg.Status != EFI_SAL_SUCCESS) {
return ReturnReg;
diff --git a/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeLib.c b/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeLib.c index 3e9554721a..00f557aa41 100644 --- a/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeLib.c +++ b/EdkModulePkg/Library/EdkUefiRuntimeLib/Ipf/RuntimeLib.c @@ -159,7 +159,7 @@ Returns: EFI_TPL_NOTIFY,
RuntimeLibVirtualNotifyEvent,
NULL,
- mEfiVirtualNotifyEvent
+ &mEfiVirtualNotifyEvent
);
ASSERT_EFI_ERROR (Status);
|