summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorpgao2 <pgao2@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-26 08:26:14 +0000
committerpgao2 <pgao2@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-26 08:26:14 +0000
commit9a43bc39a9b038523a9c5678f05cc31c62640bf0 (patch)
tree0a5ba2e5d53549c4601a94b1c7e07248754911c3 /MdeModulePkg
parentae40aef1fb4f5f34e5273b6fd5d4103bf6c7dd2d (diff)
downloadedk2-platforms-9a43bc39a9b038523a9c5678f05cc31c62640bf0.tar.xz
Avoid DxeCore to reclaim PEI stack as IDT may be on it (like 32-bit OVMF).
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10825 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeLoad.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
index 87fc18cfae..1fabb53839 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
@@ -647,13 +647,14 @@ UpdateStackHob (
while ((Hob.Raw = GetNextHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, Hob.Raw)) != NULL) {
if (CompareGuid (&gEfiHobMemoryAllocStackGuid, &(Hob.MemoryAllocationStack->AllocDescriptor.Name))) {
//
- // Build a new memory allocation HOB with old stack info with EfiConventionalMemory type
- // to be reclaimed by DXE core.
+ // Build a new memory allocation HOB with old stack info with EfiBootServicesData type. Need to
+ // avoid this region be reclaimed by DXE core as the IDT built in SEC might be on stack, and some
+ // PEIMs may also keep key information on stack
//
BuildMemoryAllocationHob (
Hob.MemoryAllocationStack->AllocDescriptor.MemoryBaseAddress,
Hob.MemoryAllocationStack->AllocDescriptor.MemoryLength,
- EfiConventionalMemory
+ EfiBootServicesData
);
//
// Update the BSP Stack Hob to reflect the new stack info.