]> git.proxmox.com Git - mirror_edk2.git/blob - CorebootModulePkg/SecCore/Ia32/SecEntry.nasm
0a55a65e961131daa070641e4dbb95d354adce36
[mirror_edk2.git] / CorebootModulePkg / SecCore / Ia32 / SecEntry.nasm
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
12 SECTION .text
13
14 ; C Functions
15 extern ASM_PFX(SecStartup)
16
17 ; Pcds
18 extern ASM_PFX(PcdGet32 (PcdPayloadFdMemBase))
19
20 ;
21 ; SecCore Entry Point
22 ;
23 ; Processor is in flat protected mode
24 ;
25 ; @param[in] EAX Initial value of the EAX register (BIST: Built-in Self Test)
26 ; @param[in] DI 'BP': boot-strap processor, or 'AP': application processor
27 ; @param[in] EBP Pointer to the start of the Boot Firmware Volume
28 ;
29 ; @return None This routine does not return
30 ;
31 global ASM_PFX(_ModuleEntryPoint)
32 ASM_PFX(_ModuleEntryPoint):
33 ;
34 ; Disable all the interrupts
35 ;
36 cli
37 ;
38 ; Construct the temporary memory at 0x80000, length 0x10000
39 ;
40 mov esp, (BASE_512KB + SIZE_64KB)
41
42 ;
43 ; Pass BFV into the PEI Core
44 ;
45 push DWORD [ASM_PFX(PcdGet32 (PcdPayloadFdMemBase))]
46
47 ;
48 ; Pass stack base into the PEI Core
49 ;
50 push BASE_512KB
51
52 ;
53 ; Pass stack size into the PEI Core
54 ;
55 push SIZE_64KB
56
57 ;
58 ; Pass Control into the PEI Core
59 ;
60 call ASM_PFX(SecStartup)
61
62 ;
63 ; Should never return
64 ;
65 jmp $
66