From 9a43bc39a9b038523a9c5678f05cc31c62640bf0 Mon Sep 17 00:00:00 2001 From: pgao2 Date: Thu, 26 Aug 2010 08:26:14 +0000 Subject: 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 --- MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'MdeModulePkg') 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. -- cgit v1.2.3