]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Sec/X64/SecEntry.S
Add initial version of Open Virtual Machine Firmware (OVMF) platform.
[mirror_edk2.git] / OvmfPkg / Sec / X64 / SecEntry.S
CommitLineData
49ba9447 1# TITLE SecEntry.asm
2
3#------------------------------------------------------------------------------
4#*
5#* Copyright 2006 - 2009, Intel Corporation
6#* All rights reserved. This program and the accompanying materials
7#* are licensed and made available under the terms and conditions of the BSD License
8#* which accompanies this distribution. The full text of the license may be found at
9#* http://opensource.org/licenses/bsd-license.php
10#*
11#* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12#* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13#*
14#* CpuAsm.asm
15#*
16#* Abstract:
17#*
18#------------------------------------------------------------------------------
19
20
21#include "SecMain.h"
22
23#EXTERN ASM_PFX(SecCoreStartupWithStack)
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.intel_syntax
38ASM_GLOBAL ASM_PFX(_ModuleEntryPoint)
39ASM_PFX(_ModuleEntryPoint):
40
41 #
42 # Load temporary stack top at very low memory. The C code
43 # can reload to a better address.
44 #
45 mov %rsp, INITIAL_TOP_OF_STACK
46 nop
47
48 #
49 # Setup parameters and call SecCoreStartupWithStack
50 # rcx: BootFirmwareVolumePtr
51 # rdx: SecCoreEntryPoint
52 # r8: PeiCoreEntryPoint
53 # r9: TopOfCurrentStack
54 #
55 mov %rcx, %rbp
56 mov %rdx, %rsi
57 mov %r8, %rdi
58 mov %r9, %rsp
59 call ASM_PFX(SecCoreStartupWithStack)
60