mirror of https://github.com/acidanthera/audk.git
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:
parent
ae40aef1fb
commit
9a43bc39a9
|
@ -647,13 +647,14 @@ UpdateStackHob (
|
||||||
while ((Hob.Raw = GetNextHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, Hob.Raw)) != NULL) {
|
while ((Hob.Raw = GetNextHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, Hob.Raw)) != NULL) {
|
||||||
if (CompareGuid (&gEfiHobMemoryAllocStackGuid, &(Hob.MemoryAllocationStack->AllocDescriptor.Name))) {
|
if (CompareGuid (&gEfiHobMemoryAllocStackGuid, &(Hob.MemoryAllocationStack->AllocDescriptor.Name))) {
|
||||||
//
|
//
|
||||||
// Build a new memory allocation HOB with old stack info with EfiConventionalMemory type
|
// Build a new memory allocation HOB with old stack info with EfiBootServicesData type. Need to
|
||||||
// to be reclaimed by DXE core.
|
// 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 (
|
BuildMemoryAllocationHob (
|
||||||
Hob.MemoryAllocationStack->AllocDescriptor.MemoryBaseAddress,
|
Hob.MemoryAllocationStack->AllocDescriptor.MemoryBaseAddress,
|
||||||
Hob.MemoryAllocationStack->AllocDescriptor.MemoryLength,
|
Hob.MemoryAllocationStack->AllocDescriptor.MemoryLength,
|
||||||
EfiConventionalMemory
|
EfiBootServicesData
|
||||||
);
|
);
|
||||||
//
|
//
|
||||||
// Update the BSP Stack Hob to reflect the new stack info.
|
// Update the BSP Stack Hob to reflect the new stack info.
|
||||||
|
|
Loading…
Reference in New Issue