mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
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
This commit is contained in:
parent
b32a39b328
commit
8572fea91c
@ -54,9 +54,6 @@
|
|||||||
<Externs>
|
<Externs>
|
||||||
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
<Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
|
||||||
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
<Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
|
||||||
<Extern>
|
|
||||||
<Constructor>DxeSalLibConstruct</Constructor>
|
|
||||||
</Extern>
|
|
||||||
<Extern>
|
<Extern>
|
||||||
<SetVirtualAddressMapCallBack>DxeSalVirtualNotifyEvent</SetVirtualAddressMapCallBack>
|
<SetVirtualAddressMapCallBack>DxeSalVirtualNotifyEvent</SetVirtualAddressMapCallBack>
|
||||||
</Extern>
|
</Extern>
|
||||||
|
@ -19,20 +19,26 @@ Abstract:
|
|||||||
|
|
||||||
#include <Ipf/IpfDefines.h>
|
#include <Ipf/IpfDefines.h>
|
||||||
|
|
||||||
|
BOOLEAN mLibraryInitialized = FALSE;
|
||||||
STATIC EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *mEsalBootService;
|
STATIC EXTENDED_SAL_BOOT_SERVICE_PROTOCOL *mEsalBootService;
|
||||||
STATIC EFI_PLABEL mPlabel;
|
STATIC EFI_PLABEL mPlabel;
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
DxeSalLibConstruct (
|
DxeSalLibConstruct (
|
||||||
IN EFI_HANDLE ImageHandle,
|
// IN EFI_HANDLE ImageHandle,
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
// IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_PLABEL *Plabel;
|
EFI_PLABEL *Plabel;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
if (mLibraryInitialized == TRUE) {
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
mLibraryInitialized = TRUE;
|
||||||
|
|
||||||
//
|
//
|
||||||
// The protocol contains a function pointer, which is an indirect procedure call.
|
// 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
|
// An indirect procedure call goes through a plabel, and pointer to a function is
|
||||||
@ -109,6 +115,7 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
|
DxeSalLibConstruct ();
|
||||||
return mEsalBootService->AddExtendedSalProc (
|
return mEsalBootService->AddExtendedSalProc (
|
||||||
mEsalBootService,
|
mEsalBootService,
|
||||||
ClassGuid,
|
ClassGuid,
|
||||||
@ -217,6 +224,7 @@ Returns:
|
|||||||
SAL_RETURN_REGS ReturnReg;
|
SAL_RETURN_REGS ReturnReg;
|
||||||
SAL_EXTENDED_SAL_PROC EsalProc;
|
SAL_EXTENDED_SAL_PROC EsalProc;
|
||||||
|
|
||||||
|
DxeSalLibConstruct ();
|
||||||
ReturnReg = GetEsalEntryPoint ();
|
ReturnReg = GetEsalEntryPoint ();
|
||||||
if (ReturnReg.Status != EFI_SAL_SUCCESS) {
|
if (ReturnReg.Status != EFI_SAL_SUCCESS) {
|
||||||
return ReturnReg;
|
return ReturnReg;
|
||||||
|
@ -159,7 +159,7 @@ Returns:
|
|||||||
EFI_TPL_NOTIFY,
|
EFI_TPL_NOTIFY,
|
||||||
RuntimeLibVirtualNotifyEvent,
|
RuntimeLibVirtualNotifyEvent,
|
||||||
NULL,
|
NULL,
|
||||||
mEfiVirtualNotifyEvent
|
&mEfiVirtualNotifyEvent
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user