This area is also overwritten by SEC when it decompresses the main
firmware -- tell the OS to stay away.
+------+ 8M (PcdOvmfMemFvBase)
^ | |
final decompr. | +------+ 9M (OutputBuffer)
target, | ^ | |
reserved by | | | |
prev. patch | temporary | | |
v decompression | | |
output | +------+ 16M (PcdOvmfMemFvBase +
^ | | | PcdOvmfMemFvSize)
| v | |
| +------+ 17M+80 (OutputBuffer +
reserved | ^ | | OutputBufferSize)
now | unused | | |
| v | |
| +------+ 18M (ScratchBuffer)
| ^ | |
| decompr. scratch | | |
v v | |
+------+ 18M+64K (ScratchBuffer +
ScratchBufferSize)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
---
OvmfPkg/PlatformPei/Fv.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/OvmfPkg/PlatformPei/Fv.c b/OvmfPkg/PlatformPei/Fv.c
index ba44014..a119172 100644
--- a/OvmfPkg/PlatformPei/Fv.c
+++ b/OvmfPkg/PlatformPei/Fv.c
@@ -56,6 +56,18 @@ PeiFvInitialization (
);
//
+ // Firmware decompression in DecompressGuidedFv() [OvmfPkg/Sec/SecMain.c]
+ // uses additional temporary memory.
+ //
+ BuildMemoryAllocationHob (
+ PcdGet32 (PcdOvmfMemFvBase) + PcdGet32 (PcdOvmfMemFvSize),
+ (SIZE_2MB + // cover the end of OutputBuffer, rounded up to 1MB
+ SIZE_64KB // cover the end of ScratchBuffer
+ ),
+ EfiACPIMemoryNVS
+ );
+
+ //
// Reserve the emulated NVRAM by covering it with a memory allocation HOB.
// During S3 Resume we don't need to reserve this range, we'll run the PEI
// core in a part of it.
--
1.8.3.1
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel