From 9cb053eff79841585976f41f602233d37e233f37 Mon Sep 17 00:00:00 2001 From: klu2 Date: Thu, 1 Feb 2007 03:05:49 +0000 Subject: [PATCH] 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 --- .../EdkUefiRuntimeLib/Common/RuntimeLib.c | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) 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 (gBS != NULL); + Status = gBS->CreateEvent ( + EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, + EFI_TPL_NOTIFY, + RuntimeLibVirtualNotifyEvent, + NULL, + &mEfiVirtualNotifyEvent + ); - ASSERT_EFI_ERROR (Status); - } + ASSERT_EFI_ERROR (Status); return EFI_SUCCESS; }