mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-20 12:14:27 +02:00
Add exit boot service event registry.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2801 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
89f1008730
commit
21998b6778
@ -19,6 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
///
|
///
|
||||||
|
|
||||||
STATIC EFI_EVENT mEfiVirtualNotifyEvent;
|
STATIC EFI_EVENT mEfiVirtualNotifyEvent;
|
||||||
|
STATIC EFI_EVENT mEfiExitBootServicesEvent;
|
||||||
STATIC BOOLEAN mEfiGoneVirtual = FALSE;
|
STATIC BOOLEAN mEfiGoneVirtual = FALSE;
|
||||||
STATIC BOOLEAN mEfiAtRuntime = FALSE;
|
STATIC BOOLEAN mEfiAtRuntime = FALSE;
|
||||||
EFI_RUNTIME_SERVICES *mRT;
|
EFI_RUNTIME_SERVICES *mRT;
|
||||||
@ -29,9 +30,10 @@ EFI_RUNTIME_SERVICES *mRT;
|
|||||||
@param[in] Event The Event that is being processed
|
@param[in] Event The Event that is being processed
|
||||||
@param[in] Context Event Context
|
@param[in] Context Event Context
|
||||||
**/
|
**/
|
||||||
|
STATIC
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
RuntimeDriverExitBootServices (
|
RuntimeLibExitBootServicesEvent (
|
||||||
IN EFI_EVENT Event,
|
IN EFI_EVENT Event,
|
||||||
IN VOID *Context
|
IN VOID *Context
|
||||||
)
|
)
|
||||||
@ -60,16 +62,6 @@ RuntimeLibVirtualNotifyEvent (
|
|||||||
IN VOID *Context
|
IN VOID *Context
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN Index;
|
|
||||||
EFI_EVENT_NOTIFY ChildNotifyEventHandler;
|
|
||||||
|
|
||||||
for (Index = 0;
|
|
||||||
_gDriverSetVirtualAddressMapEvent[Index] != NULL;
|
|
||||||
Index++) {
|
|
||||||
ChildNotifyEventHandler = _gDriverSetVirtualAddressMapEvent[Index];
|
|
||||||
ChildNotifyEventHandler (Event, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update global for Runtime Services Table and IO
|
// Update global for Runtime Services Table and IO
|
||||||
//
|
//
|
||||||
@ -113,6 +105,16 @@ RuntimeDriverLibConstruct (
|
|||||||
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
Status = gBS->CreateEvent (
|
||||||
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
|
TPL_NOTIFY,
|
||||||
|
RuntimeLibExitBootServicesEvent,
|
||||||
|
NULL,
|
||||||
|
&mEfiExitBootServicesEvent
|
||||||
|
);
|
||||||
|
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,6 +142,9 @@ RuntimeDriverLibDeconstruct (
|
|||||||
Status = gBS->CloseEvent (mEfiVirtualNotifyEvent);
|
Status = gBS->CloseEvent (mEfiVirtualNotifyEvent);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
Status = gBS->CloseEvent (mEfiExitBootServicesEvent);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user