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