]>
Commit | Line | Data |
---|---|---|
49ba9447 | 1 | TITLE SecEntry.asm\r |
2 | ;------------------------------------------------------------------------------\r | |
3 | ;*\r | |
4 | ;* Copyright 2006 - 2009, Intel Corporation\r | |
5 | ;* All rights reserved. This program and the accompanying materials\r | |
6 | ;* are licensed and made available under the terms and conditions of the BSD License\r | |
7 | ;* which accompanies this distribution. The full text of the license may be found at\r | |
8 | ;* http://opensource.org/licenses/bsd-license.php\r | |
9 | ;*\r | |
10 | ;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | ;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | ;*\r | |
13 | ;* CpuAsm.asm\r | |
14 | ;*\r | |
15 | ;* Abstract:\r | |
16 | ;*\r | |
17 | ;------------------------------------------------------------------------------\r | |
18 | \r | |
19 | #include "SecMain.h"\r | |
20 | \r | |
21 | .code\r | |
22 | \r | |
23 | EXTERN SecCoreStartupWithStack:PROC\r | |
24 | \r | |
25 | ;\r | |
26 | ; SecCore Entry Point\r | |
27 | ;\r | |
28 | ; Processor is in flat protected mode\r | |
29 | ;\r | |
30 | ; @param ESI Pointer to SEC Core Entry Point (this function)\r | |
31 | ; @param EDI Pointer to PEI Core Entry Point\r | |
32 | ; @param EBP Pointer to the start of the Boot Firmware Volume\r | |
33 | ;\r | |
34 | ; @return None\r | |
35 | ;\r | |
36 | ;\r | |
37 | _ModuleEntryPoint PROC PUBLIC\r | |
38 | \r | |
39 | ;\r | |
40 | ; Load temporary stack top at very low memory. The C code\r | |
41 | ; can reload to a better address.\r | |
42 | ;\r | |
43 | mov rsp, INITIAL_TOP_OF_STACK\r | |
44 | nop\r | |
45 | \r | |
46 | ;\r | |
47 | ; Setup parameters and call SecCoreStartupWithStack\r | |
48 | ; rcx: BootFirmwareVolumePtr\r | |
49 | ; rdx: SecCoreEntryPoint\r | |
50 | ; r8: PeiCoreEntryPoint\r | |
51 | ; r9: TopOfCurrentStack\r | |
52 | ;\r | |
53 | mov rcx, rbp\r | |
54 | mov rdx, rsi\r | |
55 | mov r8, rdi\r | |
56 | mov r9, rsp\r | |
82dae5ef | 57 | sub rsp, 20h\r |
49ba9447 | 58 | call SecCoreStartupWithStack\r |
59 | \r | |
60 | _ModuleEntryPoint ENDP\r | |
61 | \r | |
62 | END\r |