]> git.proxmox.com Git - mirror_edk2.git/blob - CorebootModulePkg/SecCore/Ia32/SecEntry.asm
CorebootModulePkg: Reformat asm constant to avoid gcc assembler fail
[mirror_edk2.git] / CorebootModulePkg / SecCore / Ia32 / SecEntry.asm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
4 ; This program and the accompanying materials
5 ; are licensed and made available under the terms and conditions of the BSD License
6 ; which accompanies this distribution. The full text of the license may be found at
7 ; http://opensource.org/licenses/bsd-license.php.
8 ;
9 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 ;
12 ; Module Name:
13 ;
14 ; SecEntry.asm
15 ;
16 ; Abstract:
17 ;
18 ; This is the code that begins in protected mode.
19 ; It will transfer the control to pei core.
20 ;
21 ;------------------------------------------------------------------------------
22 #include <Base.h>
23
24 .686p
25 .xmm
26 .model small, c
27
28 EXTRN SecStartup:NEAR
29
30 ; Pcds
31 EXTRN PcdGet32 (PcdPayloadFdMemBase):DWORD
32
33 .code
34
35 ;
36 ; SecCore Entry Point
37 ;
38 ; Processor is in flat protected mode
39 ;
40 ; @param[in] EAX Initial value of the EAX register (BIST: Built-in Self Test)
41 ; @param[in] DI 'BP': boot-strap processor, or 'AP': application processor
42 ; @param[in] EBP Pointer to the start of the Boot Firmware Volume
43 ;
44 ; @return None This routine does not return
45 ;
46
47 _ModuleEntryPoint PROC PUBLIC
48 ;
49 ; Disable all the interrupts
50 ;
51 cli
52 ;
53 ; Construct the temporary memory at 0x80000, length 0x10000
54 ;
55 mov esp, (BASE_512KB + SIZE_64KB)
56
57 ;
58 ; Pass BFV into the PEI Core
59 ;
60 push PcdGet32 (PcdPayloadFdMemBase)
61
62 ;
63 ; Pass stack base into the PEI Core
64 ;
65 push BASE_512KB
66
67 ;
68 ; Pass stack size into the PEI Core
69 ;
70 push SIZE_64KB
71
72 ;
73 ; Pass Control into the PEI Core
74 ;
75 call SecStartup
76 _ModuleEntryPoint ENDP
77
78 END