On 6/19/16 9:21 PM, Zeng, Star wrote:

1. The memory allocate and free in PiSmmCore are SMRAM that is not related to 
UEFI memory map.
2. According to UEFI 2.6 spec page 222 below, the UEFI OS loader should have 
got the memory map before ExitBootServices.
That means the memory free should not impact the memory map *got by UEFI OS 
loader*, it will only impact the memory map if the UEFI OS loader will call 
GetMemoryMap() again.


I just found the following post about Linux and how it calls ExitBootServices, which may be relevant:

http://linux-kernel.2935.n7.nabble.com/PATCH-x86-efi-retry-ExitBootServices-on-failure-td664938.html

"ExitBootServices is absolutely supposed to return a failure if any
ExitBootServices event handler changes the memory map.  Basically the
get_map loop should run again if ExitBootServices returns an error the
first time. I would say it would be fair that if ExitBootServices gives an error the second time then Linux would be fine in returning control back to BIOS."

--
Bruce
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to