1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
8 ; Entry point for the coreboot UEFI payload.
10 ;------------------------------------------------------------------------------
15 extern ASM_PFX(SecStartup)
18 extern ASM_PFX(PcdGet32 (PcdPayloadFdMemBase))
19 extern ASM_PFX(PcdGet32 (PcdPayloadStackTop))
24 ; Processor is in flat protected mode
26 ; @param[in] EAX Initial value of the EAX register (BIST: Built-in Self Test)
27 ; @param[in] DI 'BP': boot-strap processor, or 'AP': application processor
28 ; @param[in] EBP Pointer to the start of the Boot Firmware Volume
30 ; @return None This routine does not return
32 global ASM_PFX(_ModuleEntryPoint)
33 ASM_PFX(_ModuleEntryPoint):
35 ; Disable all the interrupts
40 ; Save the Payload HOB base address before switching the stack
45 ; Construct the temporary memory at 0x80000, length 0x10000
47 mov esp, DWORD [ASM_PFX(PcdGet32 (PcdPayloadStackTop))]
50 ; Push the Payload HOB base address onto new stack
55 ; Pass BFV into the PEI Core
57 push DWORD [ASM_PFX(PcdGet32 (PcdPayloadFdMemBase))]
60 ; Pass stack base into the PEI Core
65 ; Pass stack size into the PEI Core
70 ; Pass Control into the PEI Core
72 call ASM_PFX(SecStartup)