diff options
author | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-27 09:00:15 +0000 |
---|---|---|
committer | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-27 09:00:15 +0000 |
commit | 21998b6778c9b77085330c4711f4cc55aa7c1e41 (patch) | |
tree | 379481fa467e109de40bd7c4190245ffebf3fcf3 | |
parent | 89f1008730510c2501124e7d769659c79bab5ede (diff) | |
download | edk2-platforms-21998b6778c9b77085330c4711f4cc55aa7c1e41.tar.xz |
Add exit boot service event registry.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2801 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdePkg/Library/UefiRuntimeLib/RuntimeLib.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c index 3cb11d8924..2b0155e691 100644 --- a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c +++ b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c @@ -19,6 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ///
STATIC EFI_EVENT mEfiVirtualNotifyEvent;
+STATIC EFI_EVENT mEfiExitBootServicesEvent;
STATIC BOOLEAN mEfiGoneVirtual = FALSE;
STATIC BOOLEAN mEfiAtRuntime = FALSE;
EFI_RUNTIME_SERVICES *mRT;
@@ -29,9 +30,10 @@ EFI_RUNTIME_SERVICES *mRT; @param[in] Event The Event that is being processed
@param[in] Context Event Context
**/
+STATIC
VOID
EFIAPI
-RuntimeDriverExitBootServices (
+RuntimeLibExitBootServicesEvent (
IN EFI_EVENT Event,
IN VOID *Context
)
@@ -60,16 +62,6 @@ RuntimeLibVirtualNotifyEvent ( 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
//
@@ -113,6 +105,16 @@ RuntimeDriverLibConstruct ( ASSERT_EFI_ERROR (Status);
+ Status = gBS->CreateEvent (
+ EVT_SIGNAL_EXIT_BOOT_SERVICES,
+ TPL_NOTIFY,
+ RuntimeLibExitBootServicesEvent,
+ NULL,
+ &mEfiExitBootServicesEvent
+ );
+
+ ASSERT_EFI_ERROR (Status);
+
return Status;
}
@@ -140,6 +142,9 @@ RuntimeDriverLibDeconstruct ( Status = gBS->CloseEvent (mEfiVirtualNotifyEvent);
ASSERT_EFI_ERROR (Status);
+ Status = gBS->CloseEvent (mEfiExitBootServicesEvent);
+ ASSERT_EFI_ERROR (Status);
+
return Status;
}
|