X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkModulePkg%2FLibrary%2FEdkDxeSalLib%2FIpf%2FEsalServiceLib.c;fp=EdkModulePkg%2FLibrary%2FEdkDxeSalLib%2FIpf%2FEsalServiceLib.c;h=706dda2873e92a278ce3f5bb668f927e7068c7f9;hp=2e0daeb89e1260c711bca6515f9f6e0bdebb60d5;hb=8572fea91ce555d84e845c63c923e468ce12a1a4;hpb=b32a39b3287e8f03b7701619e140f814a0a61a48 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 - +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;