summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Core
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-09 22:04:33 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-09 22:04:33 +0000
commit395859376eb5342ea1fd06f0c8d8682be8921d6f (patch)
treeb6beff484caaefcb439181d8bd37d0944bf64507 /EdkModulePkg/Core
parente0866135e85783759da68bd759c9e7d6b96b23d6 (diff)
downloadedk2-platforms-395859376eb5342ea1fd06f0c8d8682be8921d6f.tar.xz
Use CPU_STACK_ALIGNMENT to align stack allocated for used in the DXE Phase.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1924 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Core')
-rw-r--r--EdkModulePkg/Core/DxeIplPeim/DxeLoad.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/EdkModulePkg/Core/DxeIplPeim/DxeLoad.c b/EdkModulePkg/Core/DxeIplPeim/DxeLoad.c
index 8e1aeedac2..fdd6c24b2e 100644
--- a/EdkModulePkg/Core/DxeIplPeim/DxeLoad.c
+++ b/EdkModulePkg/Core/DxeIplPeim/DxeLoad.c
@@ -259,7 +259,8 @@ Returns:
// Compute the top of the stack we were allocated. Pre-allocate a UINTN
// for safety.
//
- TopOfStack = (VOID *)((UINTN)BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - sizeof (UINTN));
+ TopOfStack = (VOID *)((UINTN)BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT);
+ TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
//
// Add architecture-specifc HOBs (including the BspStore HOB)