X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=MdePkg%2FLibrary%2FBaseLib%2FSwitchStack.c;h=36811175af74f0b5213c402dc94597d6081d9017;hb=775180651d4bd91cc021a0a4d6c229848dde0599;hp=445485660719a3ddb3c0c168bae90d8a321a4fca;hpb=47fc17d8a96970bc36dd7b9d4567c2c2ac102c78;p=mirror_edk2.git diff --git a/MdePkg/Library/BaseLib/SwitchStack.c b/MdePkg/Library/BaseLib/SwitchStack.c index 4454856607..36811175af 100644 --- a/MdePkg/Library/BaseLib/SwitchStack.c +++ b/MdePkg/Library/BaseLib/SwitchStack.c @@ -1,11 +1,11 @@ /** @file Switch Stack functions. - Copyright (c) 2006 - 2008, Intel Corporation
- All rights reserved. This program and the accompanying materials + Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + http://opensource.org/licenses/bsd-license.php. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -36,6 +36,11 @@ function. @param NewStack A pointer to the new stack to use for the EntryPoint function. + @param ... This variable argument list is ignored for IA32, x64, and EBC. + For IPF, this variable argument list is expected to contain + a single parameter of type VOID * that specifies the new backing + store pointer. + **/ VOID @@ -53,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 //