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