]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFspWrapperPkg/FspInitPei/SecMain.h
1fe3d8b66b478fb386043f55644338155825e552
[mirror_edk2.git] / IntelFspWrapperPkg / FspInitPei / SecMain.h
1 /** @file
2 Master header file for SecCore.
3
4 Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef _SEC_CORE_H_
10 #define _SEC_CORE_H_
11
12
13 #include <PiPei.h>
14
15 #include <Ppi/TopOfTemporaryRam.h>
16 #include <Ppi/FspInitDone.h>
17
18 #include <Library/BaseLib.h>
19 #include <Library/DebugLib.h>
20 #include <Library/PcdLib.h>
21 #include <Library/BaseMemoryLib.h>
22 #include <Library/FspPlatformSecLib.h>
23 #include <Library/FspPlatformInfoLib.h>
24 #include <Library/UefiCpuLib.h>
25 #include <Library/PeCoffGetEntryPointLib.h>
26 #include <Library/PeCoffExtraActionLib.h>
27 #include <Library/DebugAgentLib.h>
28
29 #include <FspApi.h>
30 #include <FspInfoHeader.h>
31
32 #define SEC_IDT_ENTRY_COUNT 34
33
34 typedef struct _SEC_IDT_TABLE {
35 //
36 // Reserved 8 bytes preceding IDT to store EFI_PEI_SERVICES**, since IDT base
37 // address should be 8-byte alignment.
38 // Note: For IA32, only the 4 bytes immediately preceding IDT is used to store
39 // EFI_PEI_SERVICES**
40 //
41 UINT64 PeiService;
42 UINT64 IdtTable[SEC_IDT_ENTRY_COUNT];
43 } SEC_IDT_TABLE;
44
45 /**
46 Entry point to the C language phase of SEC. After the SEC assembly
47 code has initialized some temporary memory and set up the stack,
48 the control is transferred to this function.
49
50 @param[in] SizeOfRam Size of the temporary memory available for use.
51 @param[in] TempRamBase Base address of temporary ram
52 @param[in] BootFirmwareVolume Base address of the Boot Firmware Volume.
53 **/
54 VOID
55 EFIAPI
56 SecStartup (
57 IN UINT32 SizeOfRam,
58 IN UINT32 TempRamBase,
59 IN VOID *BootFirmwareVolume
60 );
61
62 /**
63 Find and return Pei Core entry point.
64
65 It also find SEC and PEI Core file debug information. It will report them if
66 remote debug is enabled.
67
68 @param[in] BootFirmwareVolumePtr Point to the boot firmware volume.
69 @param[out] PeiCoreEntryPoint Point to the PEI core entry point.
70
71 **/
72 VOID
73 EFIAPI
74 FindAndReportEntryPoints (
75 IN EFI_FIRMWARE_VOLUME_HEADER *BootFirmwareVolumePtr,
76 OUT EFI_PEI_CORE_ENTRY_POINT *PeiCoreEntryPoint
77 );
78
79 /**
80 Autogenerated function that calls the library constructors for all of the module's
81 dependent libraries. This function must be called by the SEC Core once a stack has
82 been established.
83
84 **/
85 VOID
86 EFIAPI
87 ProcessLibraryConstructorList (
88 VOID
89 );
90
91 /**
92 Return Hob list produced by FSP.
93
94 @param[in] PeiServices The pointer to the PEI Services Table.
95 @param[in] This The pointer to this instance of this PPI.
96 @param[out] FspHobList The pointer to Hob list produced by FSP.
97
98 @return EFI_SUCCESS FReturn Hob list produced by FSP successfully.
99 **/
100 EFI_STATUS
101 EFIAPI
102 FspInitDoneGetFspHobList (
103 IN CONST EFI_PEI_SERVICES **PeiServices,
104 IN FSP_INIT_DONE_PPI *This,
105 OUT VOID **FspHobList
106 );
107
108 extern FSP_INIT_DONE_PPI gFspInitDonePpi;
109
110 #endif