]>
Commit | Line | Data |
---|---|---|
49ba9447 | 1 | TITLE SecEntry.asm\r |
2 | ;------------------------------------------------------------------------------\r | |
3 | ;*\r | |
7cb6b0e0 | 4 | ;* Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r |
56d7640a | 5 | ;* This program and the accompanying materials\r |
49ba9447 | 6 | ;* are licensed and made available under the terms and conditions of the BSD License\r |
7 | ;* which accompanies this distribution. The full text of the license may be found at\r | |
8 | ;* http://opensource.org/licenses/bsd-license.php\r | |
9 | ;*\r | |
10 | ;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | ;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | ;*\r | |
13 | ;* CpuAsm.asm\r | |
14 | ;*\r | |
15 | ;* Abstract:\r | |
16 | ;*\r | |
17 | ;------------------------------------------------------------------------------\r | |
18 | \r | |
42a83e80 | 19 | #include <Base.h>\r |
49ba9447 | 20 | \r |
21 | .code\r | |
22 | \r | |
23 | EXTERN SecCoreStartupWithStack:PROC\r | |
24 | \r | |
25 | ;\r | |
0913fadc | 26 | ; SecCore Entry Point\r |
49ba9447 | 27 | ;\r |
0913fadc | 28 | ; Processor is in flat protected mode\r |
49ba9447 | 29 | ;\r |
0913fadc | 30 | ; @param[in] RAX Initial value of the EAX register (BIST: Built-in Self Test)\r |
31 | ; @param[in] DI 'BP': boot-strap processor, or 'AP': application processor\r | |
32 | ; @param[in] RBP Pointer to the start of the Boot Firmware Volume\r | |
49ba9447 | 33 | ;\r |
0913fadc | 34 | ; @return None This routine does not return\r |
49ba9447 | 35 | ;\r |
36 | _ModuleEntryPoint PROC PUBLIC\r | |
37 | \r | |
38 | ;\r | |
7cb6b0e0 | 39 | ; Load temporary RAM stack based on PCDs\r |
49ba9447 | 40 | ;\r |
7cb6b0e0 JJ |
41 | SEC_TOP_OF_STACK EQU (FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) + \\r |
42 | FixedPcdGet32 (PcdOvmfSecPeiTempRamSize))\r | |
43 | mov rsp, SEC_TOP_OF_STACK\r | |
49ba9447 | 44 | nop\r |
45 | \r | |
46 | ;\r | |
47 | ; Setup parameters and call SecCoreStartupWithStack\r | |
48 | ; rcx: BootFirmwareVolumePtr\r | |
0913fadc | 49 | ; rdx: TopOfCurrentStack\r |
49ba9447 | 50 | ;\r |
51 | mov rcx, rbp\r | |
0913fadc | 52 | mov rdx, rsp\r |
82dae5ef | 53 | sub rsp, 20h\r |
49ba9447 | 54 | call SecCoreStartupWithStack\r |
55 | \r | |
56 | _ModuleEntryPoint ENDP\r | |
57 | \r | |
58 | END\r |