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