]>
Commit | Line | Data |
---|---|---|
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 | ||
20 | #include "SecMain.h" | |
21 | ||
22 | #EXTERN ASM_PFX(SecCoreStartupWithStack) | |
23 | ||
24 | # | |
25 | # SecCore Entry Point | |
26 | # | |
27 | # Processor is in flat protected mode | |
28 | # | |
29 | # @param[in] RAX Initial value of the EAX register (BIST: Built-in Self Test) | |
30 | # @param[in] DI 'BP': boot-strap processor, or 'AP': application processor | |
31 | # @param[in] RBP Pointer to the start of the Boot Firmware Volume | |
32 | # | |
33 | # @return None This routine does not return | |
34 | # | |
35 | ASM_GLOBAL ASM_PFX(_ModuleEntryPoint) | |
36 | ASM_PFX(_ModuleEntryPoint): | |
37 | ||
38 | # | |
39 | # Load temporary stack top at very low memory. The C code | |
40 | # can reload to a better address. | |
41 | # | |
42 | movq $INITIAL_TOP_OF_STACK, %rsp | |
43 | nop | |
44 | ||
45 | # | |
46 | # Setup parameters and call SecCoreStartupWithStack | |
47 | # rcx: BootFirmwareVolumePtr | |
48 | # rdx: TopOfCurrentStack | |
49 | # | |
50 | movq %rbp, %rcx | |
51 | movq %rsp, %rdx | |
52 | subq $0x20, %rsp | |
53 | call ASM_PFX(SecCoreStartupWithStack) | |
54 |