]> git.proxmox.com Git - mirror_edk2.git/blob - CorebootModulePkg/SecCore/Ia32/SecEntry.asm
CorebootModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / CorebootModulePkg / SecCore / Ia32 / SecEntry.asm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
5 ;
6 ; Module Name:
7 ;
8 ; SecEntry.asm
9 ;
10 ; Abstract:
11 ;
12 ; This is the code that begins in protected mode.
13 ; It will transfer the control to pei core.
14 ;
15 ;------------------------------------------------------------------------------
16 #include <Base.h>
17
18 .686p
19 .xmm
20 .model small, c
21
22 EXTRN SecStartup:NEAR
23
24 ; Pcds
25 EXTRN PcdGet32 (PcdPayloadFdMemBase):DWORD
26
27 .code
28
29 ;
30 ; SecCore Entry Point
31 ;
32 ; Processor is in flat protected mode
33 ;
34 ; @param[in] EAX Initial value of the EAX register (BIST: Built-in Self Test)
35 ; @param[in] DI 'BP': boot-strap processor, or 'AP': application processor
36 ; @param[in] EBP Pointer to the start of the Boot Firmware Volume
37 ;
38 ; @return None This routine does not return
39 ;
40
41 _ModuleEntryPoint PROC PUBLIC
42 ;
43 ; Disable all the interrupts
44 ;
45 cli
46 ;
47 ; Construct the temporary memory at 0x80000, length 0x10000
48 ;
49 mov esp, (BASE_512KB + SIZE_64KB)
50
51 ;
52 ; Pass BFV into the PEI Core
53 ;
54 push PcdGet32 (PcdPayloadFdMemBase)
55
56 ;
57 ; Pass stack base into the PEI Core
58 ;
59 push BASE_512KB
60
61 ;
62 ; Pass stack size into the PEI Core
63 ;
64 push SIZE_64KB
65
66 ;
67 ; Pass Control into the PEI Core
68 ;
69 call SecStartup
70 _ModuleEntryPoint ENDP
71
72 END