]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Avoid DxeCore to reclaim PEI stack as IDT may be on it (like 32-bit OVMF).
authorpgao2 <pgao2@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 26 Aug 2010 08:26:14 +0000 (08:26 +0000)
committerpgao2 <pgao2@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 26 Aug 2010 08:26:14 +0000 (08:26 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10825 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/DxeIplPeim/DxeLoad.c

index 87fc18cfaed339f6610841abeb8a38fdb27a9de3..1fabb53839880a53dc97362339beab7a7cd10a7a 100644 (file)
@@ -647,13 +647,14 @@ UpdateStackHob (
   while ((Hob.Raw = GetNextHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, Hob.Raw)) != NULL) {\r
     if (CompareGuid (&gEfiHobMemoryAllocStackGuid, &(Hob.MemoryAllocationStack->AllocDescriptor.Name))) {\r
       //\r
-      // Build a new memory allocation HOB with old stack info with EfiConventionalMemory type\r
-      // to be reclaimed by DXE core.\r
+      // Build a new memory allocation HOB with old stack info with EfiBootServicesData type. Need to \r
+      // avoid this region be reclaimed by DXE core as the IDT built in SEC might be on stack, and some \r
+      // PEIMs may also keep key information on stack\r
       //\r
       BuildMemoryAllocationHob (\r
         Hob.MemoryAllocationStack->AllocDescriptor.MemoryBaseAddress,\r
         Hob.MemoryAllocationStack->AllocDescriptor.MemoryLength,\r
-        EfiConventionalMemory\r
+        EfiBootServicesData\r
         );\r
       //\r
       // Update the BSP Stack Hob to reflect the new stack info.\r