X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FCore%2FRuntimeDxe%2FRuntime.c;fp=MdeModulePkg%2FCore%2FRuntimeDxe%2FRuntime.c;h=f7220a205d1e48b77ebcc6f88d54ead9c53bf5b8;hb=d342d318e9da83031841b602012699039c2e99bb;hp=c52b2b7ecf68e0840dde8ebd981afd4ef1378d25;hpb=0bee7dbd2b02aaa53352c544c7c53d20ea9160a9;p=mirror_edk2.git diff --git a/MdeModulePkg/Core/RuntimeDxe/Runtime.c b/MdeModulePkg/Core/RuntimeDxe/Runtime.c index c52b2b7ecf..f7220a205d 100644 --- a/MdeModulePkg/Core/RuntimeDxe/Runtime.c +++ b/MdeModulePkg/Core/RuntimeDxe/Runtime.c @@ -285,8 +285,16 @@ RuntimeDriverSetVirtualAddressMap ( for (Link = mRuntime.EventHead.ForwardLink; Link != &mRuntime.EventHead; Link = Link->ForwardLink) { RuntimeEvent = BASE_CR (Link, EFI_RUNTIME_EVENT_ENTRY, Link); if ((RuntimeEvent->Type & EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) == EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) { + // + // Work around the bug in the Platform Init specification (v1.7), + // reported as Mantis#2017: "EFI_RUNTIME_EVENT_ENTRY.Event" should have + // type EFI_EVENT, not (EFI_EVENT*). The PI spec documents the field + // correctly as "The EFI_EVENT returned by CreateEvent()", but the type + // of the field doesn't match the natural language description. Therefore + // we need an explicit cast here. + // RuntimeEvent->NotifyFunction ( - RuntimeEvent->Event, + (EFI_EVENT) RuntimeEvent->Event, RuntimeEvent->NotifyContext ); }