summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b32a39b)
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
<Externs>\r
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>\r
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>\r
<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
<Extern>\r
<SetVirtualAddressMapCallBack>DxeSalVirtualNotifyEvent</SetVirtualAddressMapCallBack>\r
</Extern>\r
\r
#include <Ipf/IpfDefines.h>\r
\r
\r
#include <Ipf/IpfDefines.h>\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
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
)\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
//\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
+ DxeSalLibConstruct ();\r
return mEsalBootService->AddExtendedSalProc (\r
mEsalBootService,\r
ClassGuid,\r
return mEsalBootService->AddExtendedSalProc (\r
mEsalBootService,\r
ClassGuid,\r
SAL_RETURN_REGS ReturnReg;\r
SAL_EXTENDED_SAL_PROC EsalProc;\r
\r
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
ReturnReg = GetEsalEntryPoint ();\r
if (ReturnReg.Status != EFI_SAL_SUCCESS) {\r
return ReturnReg;\r
EFI_TPL_NOTIFY,\r
RuntimeLibVirtualNotifyEvent,\r
NULL,\r
EFI_TPL_NOTIFY,\r
RuntimeLibVirtualNotifyEvent,\r
NULL,\r
- mEfiVirtualNotifyEvent\r
+ &mEfiVirtualNotifyEvent\r
);\r
ASSERT_EFI_ERROR (Status);\r
\r
);\r
ASSERT_EFI_ERROR (Status);\r
\r