]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Sec/X64/SecEntry.asm
Add initial version of Open Virtual Machine Firmware (OVMF) platform.
[mirror_edk2.git] / OvmfPkg / Sec / X64 / SecEntry.asm
1 TITLE SecEntry.asm
2 ;------------------------------------------------------------------------------
3 ;*
4 ;* Copyright 2006 - 2009, Intel Corporation
5 ;* All rights reserved. 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 "SecMain.h"
20
21 .code
22
23 EXTERN SecCoreStartupWithStack:PROC
24
25 ;
26 ; SecCore Entry Point
27 ;
28 ; Processor is in flat protected mode
29 ;
30 ; @param ESI Pointer to SEC Core Entry Point (this function)
31 ; @param EDI Pointer to PEI Core Entry Point
32 ; @param EBP Pointer to the start of the Boot Firmware Volume
33 ;
34 ; @return None
35 ;
36 ;
37 _ModuleEntryPoint PROC PUBLIC
38
39 ;
40 ; Load temporary stack top at very low memory. The C code
41 ; can reload to a better address.
42 ;
43 mov rsp, INITIAL_TOP_OF_STACK
44 nop
45
46 ;
47 ; Setup parameters and call SecCoreStartupWithStack
48 ; rcx: BootFirmwareVolumePtr
49 ; rdx: SecCoreEntryPoint
50 ; r8: PeiCoreEntryPoint
51 ; r9: TopOfCurrentStack
52 ;
53 mov rcx, rbp
54 mov rdx, rsi
55 mov r8, rdi
56 mov r9, rsp
57 call SecCoreStartupWithStack
58
59 _ModuleEntryPoint ENDP
60
61 END