mirror of https://github.com/acidanthera/audk.git
Remove hard coded constant of 15, and use CPU_STACK_ALIGNMENT instead
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1921 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
caae4de6b6
commit
e7e9595aaf
|
@ -601,12 +601,13 @@ Returns:
|
||||||
//
|
//
|
||||||
// Compute Top Of Memory for Stack and PEI Core Allocations
|
// Compute Top Of Memory for Stack and PEI Core Allocations
|
||||||
//
|
//
|
||||||
TopOfMemory = LargestRegion + ((LargestRegionSize) & (~15));
|
TopOfMemory = LargestRegion + LargestRegionSize;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate 128KB for the Stack
|
// Allocate 128KB for the Stack
|
||||||
//
|
//
|
||||||
TopOfStack = (VOID *) (UINTN) (TopOfMemory - sizeof (EFI_PEI_STARTUP_DESCRIPTOR));
|
TopOfStack = (VOID *)((UINTN)TopOfMemory - sizeof (EFI_PEI_STARTUP_DESCRIPTOR) - CPU_STACK_ALIGNMENT);
|
||||||
|
TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
|
||||||
TopOfMemory = TopOfMemory - STACK_SIZE;
|
TopOfMemory = TopOfMemory - STACK_SIZE;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue