From: Terry L. <tla...@ch...> - 2011-10-20 23:44:51
|
Not sure if this is the place to report it, but I see no "report an issue" link, and this seems to be the right people... We've worked around this in Linux using local patches; however, it would be nice if the EFI reference implementation could be fixed as a strategy for getting the fix out to everyone who has used it for their own implementations, which is practically everyone. -- This appears to be an issue in the reference implementation which has been copied by most EFI implementations... One or more EFI_MEMORY_DESCRIPTOR entries improperly fail to set the EFI_MEMORY_RUNTIME attribute, but are referenced in the runtime services call SetVirtualAddressMap(). When an program calls ExitBootServices() and immediately does a recovery of the pages referenced by descriptors lacking the EFI_MEMORY_RUNTIME attribute, a subsequent call to SetVirtualAddressMap() can fail as a result of the recovered pages either not being mapped or having their contents modified through reuse. Steps to Reproduce: For EFI vendors, an easy debug strategy for this would be to: [case #1: data reference] pattern-wipe all the pages marked as only being used by boot services in the ExitBootServices() implementation itself, and detect the pattern in the failure case. [case #2: instruction reference] would be to wipe the pages with NOPs and put a code trampoline at the end of the page to indicate which page block was being jumped into by the offending call - jump anywhere in the page and you NOP until the trampoline and jump to the debug frame with page block specific register indicators. A small test implementation in an area known to not be used by EFI that then calls ExitBootServices() and SetVirtualAddressMap() would be sufficient to trigger the problem for both these test cases. -- Terry |