]>
Commit | Line | Data |
---|---|---|
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 | # | |
49ba9447 | 37 | ASM_GLOBAL ASM_PFX(_ModuleEntryPoint) |
38 | ASM_PFX(_ModuleEntryPoint): | |
39 | ||
40 | # | |
41 | # Load temporary stack top at very low memory. The C code | |
42 | # can reload to a better address. | |
43 | # | |
16e864a2 | 44 | movq $INITIAL_TOP_OF_STACK, %rsp |
49ba9447 | 45 | nop |
46 | ||
47 | # | |
48 | # Setup parameters and call SecCoreStartupWithStack | |
49 | # rcx: BootFirmwareVolumePtr | |
50 | # rdx: SecCoreEntryPoint | |
51 | # r8: PeiCoreEntryPoint | |
52 | # r9: TopOfCurrentStack | |
53 | # | |
16e864a2 | 54 | movq %rbp, %rcx |
55 | movq %rsi, %rdx | |
56 | movq %rdi, %r8 | |
57 | movq %rsp, %r9 | |
82dae5ef | 58 | subq $0x20, %rsp |
49ba9447 | 59 | call ASM_PFX(SecCoreStartupWithStack) |
60 |