diff options
author | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-08-24 23:53:23 +0000 |
---|---|---|
committer | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-08-24 23:53:23 +0000 |
commit | 7f22d35110e43be45a0e16a2e944feebbf51e4ed (patch) | |
tree | fbeb831e55cde5a2467787c76fc986a0adca3163 /MdePkg/Library/BaseLib/SwitchStack.c | |
parent | 2bd1edf456899246c707587f17da285100f34b7b (diff) | |
download | edk2-7f22d35110e43be45a0e16a2e944feebbf51e4ed.tar.gz edk2-7f22d35110e43be45a0e16a2e944feebbf51e4ed.tar.bz2 edk2-7f22d35110e43be45a0e16a2e944feebbf51e4ed.zip |
Fix file headers
Move stack alignment check from CPU specific files into common SwitchStack() function and add VA_END() to SwitchStack().
Fix incorrect syntax for ASM_FUNCTION_REMOVE_IF_UNREFERENCED
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9193 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseLib/SwitchStack.c')
-rw-r--r-- | MdePkg/Library/BaseLib/SwitchStack.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseLib/SwitchStack.c b/MdePkg/Library/BaseLib/SwitchStack.c index 32c64ca8d6..0c3e29d94a 100644 --- a/MdePkg/Library/BaseLib/SwitchStack.c +++ b/MdePkg/Library/BaseLib/SwitchStack.c @@ -58,10 +58,17 @@ SwitchStack ( ASSERT (EntryPoint != NULL);
ASSERT (NewStack != NULL);
+ //
+ // New stack must be aligned with CPU_STACK_ALIGNMENT
+ //
+ ASSERT (((UINTN)NewStack & (CPU_STACK_ALIGNMENT - 1)) == 0);
+
VA_START (Marker, NewStack);
InternalSwitchStack (EntryPoint, Context1, Context2, NewStack, Marker);
+ VA_END (Marker);
+
//
// InternalSwitchStack () will never return
//
|