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