There is a bug in original EdkModulePkg\Library\EdkUefiRuntimeLib\Common\RuntimeLib.c. Originally, if a driver did not produce a <SetVirtualAddressMapCallBack>'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 <SetVirtualAddressMapCallBack>'s function.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2343 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2007-02-01 03:05:49 +00:00
parent fd0f684ffa
commit 9cb053eff7
1 changed files with 9 additions and 11 deletions

View File

@ -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;
}