SwitchStack.S 875 B

1234567891011121314151617181920212223242526272829303132
  1. #------------------------------------------------------------------------------
  2. #
  3. # Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
  4. # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
  5. # Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
  6. #
  7. # SPDX-License-Identifier: BSD-2-Clause-Patent
  8. #
  9. #------------------------------------------------------------------------------
  10. #include <AsmMacroIoLibV8.h>
  11. #/**
  12. # This allows the caller to switch the stack and return
  13. #
  14. # @param StackDelta Signed amount by which to modify the stack pointer
  15. #
  16. # @return Nothing. Goes to the Entry Point passing in the new parameters
  17. #
  18. #**/
  19. #VOID
  20. #EFIAPI
  21. #SecSwitchStack (
  22. # VOID *StackDelta
  23. # )#
  24. #
  25. ASM_FUNC(SecSwitchStack)
  26. mov x1, sp
  27. add x1, x0, x1
  28. mov sp, x1
  29. ret