FspSwitchStackLib.h 951 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /** @file
  2. Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. **/
  5. #ifndef _FSP_SWITCH_STACK_LIB_H_
  6. #define _FSP_SWITCH_STACK_LIB_H_
  7. /**
  8. This function will switch the current stack to the previous saved stack.
  9. Before calling the previous stack has to be set in FSP_GLOBAL_DATA.CoreStack.
  10. EIP
  11. FLAGS 16 bit FLAGS 16 bit
  12. EDI
  13. ESI
  14. EBP
  15. ESP
  16. EBX
  17. EDX
  18. ECX
  19. EAX
  20. DWORD IDT base1
  21. StackPointer: DWORD IDT base2
  22. @return ReturnKey After switching to the saved stack,
  23. this value will be saved in eax before returning.
  24. **/
  25. UINT32
  26. EFIAPI
  27. Pei2LoaderSwitchStack (
  28. VOID
  29. );
  30. #endif