SecEntry.nasm 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ; @file
  2. ; Copyright (c) 2006 - 2019 Intel Corporation. All rights reserved. <BR>
  3. ;
  4. ; SPDX-License-Identifier: BSD-2-Clause-Patent
  5. ;
  6. #include <Base.h>
  7. SECTION .text
  8. extern ASM_PFX(SecCoreStartupWithStack)
  9. ;
  10. ; SecCore Entry Point
  11. ;
  12. ; Processor is in flat protected mode
  13. ;
  14. ; @param[in] EAX Initial value of the EAX register (BIST: Built-in Self Test)
  15. ; @param[in] DI 'BP': boot-strap processor, or 'AP': application processor
  16. ; @param[in] EBP Pointer to the start of the Boot Firmware Volume
  17. ;
  18. ; @return None This routine does not return
  19. ;
  20. global ASM_PFX(_ModuleEntryPoint)
  21. ASM_PFX(_ModuleEntryPoint):
  22. ;
  23. ; Load temporary RAM stack based on PCDs
  24. ;
  25. %define SEC_TOP_OF_STACK (FixedPcdGet32 (PcdSimicsSecPeiTempRamBase) + \
  26. FixedPcdGet32 (PcdSimicsSecPeiTempRamSize))
  27. mov eax, SEC_TOP_OF_STACK
  28. mov esp, eax
  29. nop
  30. ;
  31. ; Setup parameters and call SecCoreStartupWithStack
  32. ; [esp] return address for call
  33. ; [esp+4] BootFirmwareVolumePtr
  34. ; [esp+8] TopOfCurrentStack
  35. ;
  36. push eax
  37. push ebp
  38. call ASM_PFX(SecCoreStartupWithStack)