]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Sec/Ia32/SecEntry.S
OvmfPkg QemuFwCfgLib: Convert X64/IoLibExAsm.asm to NASM
[mirror_edk2.git] / OvmfPkg / Sec / Ia32 / SecEntry.S
CommitLineData
7cb6b0e0
JJ
1# TITLE SecEntry.asm\r
2#------------------------------------------------------------------------------\r
3#*\r
4#* Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
5#* This program and the accompanying materials\r
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
19\r
20#include <Base.h>\r
21\r
22#EXTERN ASM_PFX(SecCoreStartupWithStack)\r
23\r
24#\r
25# SecCore Entry Point\r
26#\r
27# Processor is in flat protected mode\r
28#\r
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
32#\r
33# @return None This routine does not return\r
34#\r
35ASM_GLOBAL ASM_PFX(_ModuleEntryPoint)\r
36ASM_PFX(_ModuleEntryPoint):\r
37\r
38 #\r
39 # Load temporary RAM stack based on PCDs\r
40 #\r
41 .set SEC_TOP_OF_STACK, FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) + \\r
42 FixedPcdGet32 (PcdOvmfSecPeiTempRamSize)\r
43 movl $SEC_TOP_OF_STACK, %eax\r
44 movl %eax, %esp\r
45 nop\r
46\r
47 #\r
48 # Setup parameters and call SecCoreStartupWithStack\r
49 # [esp] return address for call\r
50 # [esp+4] BootFirmwareVolumePtr\r
51 # [esp+8] TopOfCurrentStack\r
52 #\r
53 pushl %eax\r
54 pushl %ebp\r
55 call ASM_PFX(SecCoreStartupWithStack)\r
56\r
57\r
58#END\r
59\r