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
This commit is contained in:
pgao2 2010-08-26 08:26:14 +00:00
parent ae40aef1fb
commit 9a43bc39a9
1 changed files with 4 additions and 3 deletions

View File

@ -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.