diff --git a/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf b/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf index 6e3a7a91f9..23981af38f 100644 --- a/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf +++ b/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf @@ -52,3 +52,5 @@ [Pcd.common] gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## CONSUMES +[Guids] + gEfiEventVirtualAddressChangeGuid ## PRODUCES ## Event diff --git a/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c b/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c index e6a3faa813..e56675b873 100644 --- a/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c +++ b/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c @@ -19,6 +19,8 @@ #include +#include + #include #include #include @@ -128,11 +130,12 @@ DxeRuntimePciExpressLibConstructor ( // // Register SetVirtualAddressMap () notify function // - Status = gBS->CreateEvent ( - EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, + Status = gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, TPL_NOTIFY, DxeRuntimePciExpressLibVirtualNotify, NULL, + &gEfiEventVirtualAddressChangeGuid, &mDxeRuntimePciExpressLibVirtualNotifyEvent ); ASSERT_EFI_ERROR (Status);