From: klu2 Date: Thu, 1 Feb 2007 03:05:49 +0000 (+0000) Subject: There is a bug in original EdkModulePkg\Library\EdkUefiRuntimeLib\Common\RuntimeLib... X-Git-Tag: edk2-stable201903~23534 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=9cb053eff79841585976f41f602233d37e233f37 There is a bug in original EdkModulePkg\Library\EdkUefiRuntimeLib\Common\RuntimeLib.c. Originally, if a driver did not produce a 's function, EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE notify event will not be created in RuntimeDriverLibConstruct(), This is a bug, because at least, mRT pointer need to be converted for runtime service. This bug will lead runtime interface GetMonoCount() failure because EdkModulePkg\Universal\MonotonicCounter\RuntimeDxe driver does not produce any 's function. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2343 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c b/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c index 335a9b9bc7..32eaed74a2 100644 --- a/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c +++ b/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c @@ -102,18 +102,16 @@ RuntimeDriverLibConstruct ( // // Register SetVirtualAddressMap () notify function // - if (_gDriverSetVirtualAddressMapEvent[0] != NULL) { - ASSERT (gBS != NULL); - Status = gBS->CreateEvent ( - EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, - EFI_TPL_NOTIFY, - RuntimeLibVirtualNotifyEvent, - NULL, - &mEfiVirtualNotifyEvent - ); - - ASSERT_EFI_ERROR (Status); - } + ASSERT (gBS != NULL); + Status = gBS->CreateEvent ( + EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, + EFI_TPL_NOTIFY, + RuntimeLibVirtualNotifyEvent, + NULL, + &mEfiVirtualNotifyEvent + ); + + ASSERT_EFI_ERROR (Status); return EFI_SUCCESS; }