for (Link = mRuntime.EventHead.ForwardLink; Link != &mRuntime.EventHead; Link = Link->ForwardLink) {\r
RuntimeEvent = BASE_CR (Link, EFI_RUNTIME_EVENT_ENTRY, Link);\r
if ((RuntimeEvent->Type & EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) == EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {\r
+ //\r
+ // Work around the bug in the Platform Init specification (v1.7),\r
+ // reported as Mantis#2017: "EFI_RUNTIME_EVENT_ENTRY.Event" should have\r
+ // type EFI_EVENT, not (EFI_EVENT*). The PI spec documents the field\r
+ // correctly as "The EFI_EVENT returned by CreateEvent()", but the type\r
+ // of the field doesn't match the natural language description. Therefore\r
+ // we need an explicit cast here.\r
+ //\r
RuntimeEvent->NotifyFunction (\r
- RuntimeEvent->Event,\r
+ (EFI_EVENT) RuntimeEvent->Event,\r
RuntimeEvent->NotifyContext\r
);\r
}\r