]> git.proxmox.com Git - mirror_edk2.git/blob - CorebootModulePkg/SecCore/Ia32/SecEntry.S
Pkg-Module: CorebootModulePkg
[mirror_edk2.git] / CorebootModulePkg / SecCore / Ia32 / SecEntry.S
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.S
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
23 ASM_GLOBAL ASM_PFX(SecStartup)
24
25 # Pcds
26 ASM_GLOBAL ASM_PFX(PcdGet32 (PcdPayloadFdMemBase))
27
28 #
29 # SecCore Entry Point
30 #
31 # Processor is in flat protected mode
32 #
33 # @param[in] EAX Initial value of the EAX register (BIST: Built-in Self Test)
34 # @param[in] DI 'BP': boot-strap processor, or 'AP': application processor
35 # @param[in] EBP Pointer to the start of the Boot Firmware Volume
36 #
37 # @return None This routine does not return
38 #
39 ASM_GLOBAL ASM_PFX(_ModuleEntryPoint)
40 ASM_PFX(_ModuleEntryPoint):
41 #
42 # Disable all the interrupts
43 #
44 cli
45
46 #
47 # Construct the temporary memory at 0x80000, length 0x10000
48 #
49 movl ($BASE_512KB + $SIZE_64KB), %esp
50
51 #
52 # Pass BFV into the PEI Core
53 #
54 pushl ASM_PFX(PcdGet32 (PcdPayloadFdMemBase))
55
56 #
57 # Pass stack base into the PEI Core
58 #
59 pushl $BASE_512KB
60
61 #
62 # Pass stack size into the PEI Core
63 #
64 pushl $SIZE_64KB
65
66 #
67 # Pass Control into the PEI Core
68 #
69 call SecStartup
70
71 #
72 # Never return to here
73 #
74 jmp .