SecEntry.nasm 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. ;------------------------------------------------------------------------------
  2. ;
  3. ; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
  4. ; SPDX-License-Identifier: BSD-2-Clause-Patent
  5. ;
  6. ; Abstract:
  7. ;
  8. ; Entry point for the coreboot UEFI payload.
  9. ;
  10. ;------------------------------------------------------------------------------
  11. SECTION .text
  12. ; C Functions
  13. extern ASM_PFX(SecStartup)
  14. ; Pcds
  15. extern ASM_PFX(PcdGet32 (PcdPayloadFdMemBase))
  16. ;
  17. ; SecCore Entry Point
  18. ;
  19. ; Processor is in flat protected mode
  20. ;
  21. ; @param[in] EAX Initial value of the EAX register (BIST: Built-in Self Test)
  22. ; @param[in] DI 'BP': boot-strap processor, or 'AP': application processor
  23. ; @param[in] EBP Pointer to the start of the Boot Firmware Volume
  24. ;
  25. ; @return None This routine does not return
  26. ;
  27. global ASM_PFX(_ModuleEntryPoint)
  28. ASM_PFX(_ModuleEntryPoint):
  29. ;
  30. ; Disable all the interrupts
  31. ;
  32. cli
  33. ;
  34. ; Construct the temporary memory at 0x80000, length 0x10000
  35. ;
  36. mov esp, (BASE_512KB + SIZE_64KB)
  37. ;
  38. ; Pass BFV into the PEI Core
  39. ;
  40. push DWORD [ASM_PFX(PcdGet32 (PcdPayloadFdMemBase))]
  41. ;
  42. ; Pass stack base into the PEI Core
  43. ;
  44. push BASE_512KB
  45. ;
  46. ; Pass stack size into the PEI Core
  47. ;
  48. push SIZE_64KB
  49. ;
  50. ; Pass Control into the PEI Core
  51. ;
  52. call ASM_PFX(SecStartup)
  53. ;
  54. ; Should never return
  55. ;
  56. jmp $