summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Library/EdkDxeSalLib/Ipf/EsalServiceLib.c
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-29 03:03:20 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-29 03:03:20 +0000
commit8572fea91ce555d84e845c63c923e468ce12a1a4 (patch)
treeb52217d77c9e7f1411b746b58af82684c8700032 /EdkModulePkg/Library/EdkDxeSalLib/Ipf/EsalServiceLib.c
parentb32a39b3287e8f03b7701619e140f814a0a61a48 (diff)
downloadedk2-platforms-8572fea91ce555d84e845c63c923e468ce12a1a4.tar.xz
1) Make a slightly better work around for the EdkDxeSalLib by removing constructor from MSA and calling constructor from library functions.
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
Diffstat (limited to 'EdkModulePkg/Library/EdkDxeSalLib/Ipf/EsalServiceLib.c')
-rw-r--r--EdkModulePkg/Library/EdkDxeSalLib/Ipf/EsalServiceLib.c14
1 files changed, 11 insertions, 3 deletions
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;