]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPlatformPkg/MemoryInitPeiLib: reserve rather than remove FV memory
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 28 Feb 2018 15:31:34 +0000 (15:31 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 28 Feb 2018 16:10:58 +0000 (16:10 +0000)
commit44d2e8d7cab3ee1be0cf02f604d833e6b75b04b2
tree9409b293703fc18d282360cca4bc34f2635c9d4b
parente7f0a829c97b7133e245f5e4d1fec5c7e28784e1
ArmPlatformPkg/MemoryInitPeiLib: reserve rather than remove FV memory

Instead of completely removing the memory occupied by the primary PrePi
FV from the memory map, thereby making it inaccessible to the OS, mark
it as boot services data. This will ensure that the memory is left
untouched by the firmware, but will release it to the OS when it calls
ExitBootServices().

Note that for reasons that are not entirely clear, this only works as
desired if the memory allocation HOB and the resource descriptor HOB
that describe the region are identical in offset and size, and so we
still need to iterate over the descriptors and split them up.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c