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