]>
Commit | Line | Data |
---|---|---|
1c9d209f | 1 | /** @file\r |
f22f941e | 2 | The Include file for definitions in the Intel Platform Innovation Framework for EFI\r |
2baf6c68 | 3 | Pre-EFI Initialization Core Interface Specification (PEI CIS) Version 0.91.\r |
1c9d209f | 4 | \r |
1c2f052d | 5 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
22a69a5e | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
1c9d209f | 7 | \r |
1c9d209f | 8 | **/\r |
9 | \r | |
10 | #ifndef __PEICIS_H__\r | |
11 | #define __PEICIS_H__\r | |
12 | \r | |
4cd79ac6 | 13 | #include <Ppi/PciCfg.h>\r |
40038403 | 14 | //\r |
15 | // Framework PEI Specification Revision information\r | |
16 | //\r | |
17 | #define FRAMEWORK_PEI_SPECIFICATION_MAJOR_REVISION 0\r | |
18 | #define FRAMEWORK_PEI_SPECIFICATION_MINOR_REVISION 91\r | |
19 | \r | |
a69dbb0e | 20 | \r |
40038403 | 21 | //\r |
22 | // PEI services signature and Revision defined in Framework PEI spec\r | |
23 | //\r | |
24 | #define FRAMEWORK_PEI_SERVICES_SIGNATURE 0x5652455320494550ULL\r | |
25 | #define FRAMEWORK_PEI_SERVICES_REVISION ((FRAMEWORK_PEI_SPECIFICATION_MAJOR_REVISION<<16) | (FRAMEWORK_PEI_SPECIFICATION_MINOR_REVISION))\r | |
26 | \r | |
27 | \r | |
4cd79ac6 | 28 | \r |
29 | typedef struct _FRAMEWORK_EFI_PEI_SERVICES FRAMEWORK_EFI_PEI_SERVICES;\r | |
1c9d209f | 30 | \r |
31 | /**\r | |
1c2f052d LG |
32 | The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI\r |
33 | Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header.\r | |
1c9d209f | 34 | \r |
f22f941e | 35 | @param FfsHeader The pointer to the FFS file header.\r |
1c9d209f | 36 | @param PeiServices Describes the list of possible PEI Services.\r |
37 | \r | |
38 | @return Status code\r | |
39 | \r | |
40 | **/\r | |
41 | typedef\r | |
42 | EFI_STATUS\r | |
43 | (EFIAPI *EFI_PEIM_ENTRY_POINT)(\r | |
9205b2d7 | 44 | IN EFI_FFS_FILE_HEADER *FfsHeader,\r |
45 | IN EFI_PEI_SERVICES **PeiServices\r | |
1c9d209f | 46 | );\r |
1c2f052d | 47 | \r |
4cd79ac6 | 48 | /**\r |
1c2f052d LG |
49 | This service abstracts the capability of the PEI\r |
50 | Foundation to discover instances of firmware volumes in the system.\r | |
51 | Given the input file pointer, this service searches for the next\r | |
4cd79ac6 | 52 | matching file in the Firmware File System (FFS) volume.\r |
53 | \r | |
54 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
55 | @param Instance This instance of the firmware volume to find. The value 0 is the Boot Firmware Volume (BFV).\r | |
f22f941e | 56 | @param FwVolHeader The pointer to the firmware volume header of the volume to return.\r |
4cd79ac6 | 57 | \r |
58 | @retval EFI_SUCCESS The volume was found.\r | |
59 | @retval EFI_NOT_FOUND The volume was not found.\r | |
60 | @retval EFI_INVALID_PARAMETER FwVolHeader is NULL\r | |
61 | \r | |
62 | **/\r | |
63 | typedef\r | |
64 | EFI_STATUS\r | |
69686d56 | 65 | (EFIAPI *EFI_PEI_FFS_FIND_NEXT_VOLUME)(\r |
9205b2d7 | 66 | IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,\r |
67 | IN UINTN Instance,\r | |
68 | IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader\r | |
4cd79ac6 | 69 | );\r |
1c2f052d | 70 | \r |
4cd79ac6 | 71 | /**\r |
1c2f052d LG |
72 | This service abstracts the capability of the PEI\r |
73 | Foundation to discover instances of firmware files in the system.\r | |
74 | Given the input file pointer, this service searches for the next matching\r | |
4cd79ac6 | 75 | file in the Firmware File System (FFS) volume.\r |
76 | \r | |
77 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
78 | @param SearchType A filter to find files only of this type.\r | |
1c2f052d | 79 | @param FwVolHeader The pointer to the firmware volume header of the volume to search. This parameter\r |
4cd79ac6 | 80 | must point to a valid FFS volume.\r |
1c2f052d | 81 | @param FileHeader The pointer to the current file from which to begin searching. Upon return this pointer will be\r |
f22f941e | 82 | updated to reflect the file found.\r |
4cd79ac6 | 83 | \r |
9205b2d7 | 84 | @retval EFI_SUCCESS The file was found.\r |
85 | @retval EFI_NOT_FOUND The file was not found.\r | |
86 | @retval EFI_NOT_FOUND The header checksum was not zero.\r | |
4cd79ac6 | 87 | \r |
88 | **/\r | |
89 | typedef\r | |
90 | EFI_STATUS\r | |
69686d56 | 91 | (EFIAPI *EFI_PEI_FFS_FIND_NEXT_FILE)(\r |
9205b2d7 | 92 | IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,\r |
93 | IN EFI_FV_FILETYPE SearchType,\r | |
94 | IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,\r | |
95 | IN OUT EFI_FFS_FILE_HEADER **FileHeader\r | |
4cd79ac6 | 96 | );\r |
97 | \r | |
98 | /**\r | |
1c2f052d LG |
99 | Given the input file pointer, this service searches for the next\r |
100 | matching file in the Firmware File System (FFS) volume.\r | |
4cd79ac6 | 101 | \r |
102 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
103 | @param SectionType The value of the section type to find.\r | |
104 | @param FfsFileHeader A pointer to the file header that contains the set of sections to be searched.\r | |
105 | @param SectionData A pointer to the discovered section, if successful.\r | |
106 | \r | |
9205b2d7 | 107 | @retval EFI_SUCCESS The section was found.\r |
108 | @retval EFI_NOT_FOUND The section was not found.\r | |
4cd79ac6 | 109 | \r |
110 | **/\r | |
111 | typedef\r | |
112 | EFI_STATUS\r | |
69686d56 | 113 | (EFIAPI *EFI_PEI_FFS_FIND_SECTION_DATA)(\r |
9205b2d7 | 114 | IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,\r |
115 | IN EFI_SECTION_TYPE SectionType,\r | |
116 | IN EFI_FFS_FILE_HEADER *FfsFileHeader,\r | |
117 | IN OUT VOID **SectionData\r | |
4cd79ac6 | 118 | );\r |
2baf6c68 | 119 | \r |
120 | ///\r | |
121 | /// FRAMEWORK_EFI_PEI_SERVICES is a collection of functions whose implementation is provided by the PEI\r | |
1c2f052d | 122 | /// Foundation. The table may be located in the temporary or permanent memory, depending upon the capabilities\r |
2baf6c68 | 123 | /// and phase of execution of PEI.\r |
1c2f052d | 124 | ///\r |
2baf6c68 | 125 | /// These services fall into various classes, including the following:\r |
f22f941e | 126 | /// - Managing the boot mode.\r |
127 | /// - Allocating both early and permanent memory.\r | |
128 | /// - Supporting the Firmware File System (FFS).\r | |
129 | /// - Abstracting the PPI database abstraction.\r | |
130 | /// - Creating Hand-Off Blocks (HOBs).\r | |
1c2f052d | 131 | ///\r |
4cd79ac6 | 132 | struct _FRAMEWORK_EFI_PEI_SERVICES {\r |
9205b2d7 | 133 | EFI_TABLE_HEADER Hdr;\r |
4cd79ac6 | 134 | //\r |
135 | // PPI Functions\r | |
136 | //\r | |
9205b2d7 | 137 | EFI_PEI_INSTALL_PPI InstallPpi;\r |
138 | EFI_PEI_REINSTALL_PPI ReInstallPpi;\r | |
139 | EFI_PEI_LOCATE_PPI LocatePpi;\r | |
140 | EFI_PEI_NOTIFY_PPI NotifyPpi;\r | |
4cd79ac6 | 141 | //\r |
142 | // Boot Mode Functions\r | |
143 | //\r | |
9205b2d7 | 144 | EFI_PEI_GET_BOOT_MODE GetBootMode;\r |
145 | EFI_PEI_SET_BOOT_MODE SetBootMode;\r | |
4cd79ac6 | 146 | //\r |
147 | // HOB Functions\r | |
148 | //\r | |
9205b2d7 | 149 | EFI_PEI_GET_HOB_LIST GetHobList;\r |
150 | EFI_PEI_CREATE_HOB CreateHob;\r | |
4cd79ac6 | 151 | //\r |
152 | // Firmware Volume Functions\r | |
153 | //\r | |
9205b2d7 | 154 | EFI_PEI_FFS_FIND_NEXT_VOLUME FfsFindNextVolume;\r |
155 | EFI_PEI_FFS_FIND_NEXT_FILE FfsFindNextFile;\r | |
156 | EFI_PEI_FFS_FIND_SECTION_DATA FfsFindSectionData;\r | |
4cd79ac6 | 157 | //\r |
158 | // PEI Memory Functions\r | |
159 | //\r | |
9205b2d7 | 160 | EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;\r |
161 | EFI_PEI_ALLOCATE_PAGES AllocatePages;\r | |
162 | EFI_PEI_ALLOCATE_POOL AllocatePool;\r | |
163 | EFI_PEI_COPY_MEM CopyMem;\r | |
164 | EFI_PEI_SET_MEM SetMem;\r | |
4cd79ac6 | 165 | //\r |
40038403 | 166 | // (the following interfaces are installed by publishing PEIM)\r |
4cd79ac6 | 167 | // Status Code\r |
9205b2d7 | 168 | //\r |
169 | EFI_PEI_REPORT_STATUS_CODE ReportStatusCode;\r | |
4cd79ac6 | 170 | //\r |
171 | // Reset\r | |
172 | //\r | |
9205b2d7 | 173 | EFI_PEI_RESET_SYSTEM ResetSystem;\r |
a69dbb0e | 174 | ///\r |
1c2f052d LG |
175 | /// Inconsistent with specification here:\r |
176 | /// In Framework Spec, PeiCis0.91, CpuIo and PciCfg are NOT pointers.\r | |
a69dbb0e | 177 | ///\r |
1c2f052d | 178 | \r |
4cd79ac6 | 179 | //\r |
4cd79ac6 | 180 | // I/O Abstractions\r |
181 | //\r | |
9205b2d7 | 182 | EFI_PEI_CPU_IO_PPI *CpuIo;\r |
183 | EFI_PEI_PCI_CFG_PPI *PciCfg;\r | |
4cd79ac6 | 184 | };\r |
40038403 | 185 | ///\r |
f22f941e | 186 | /// Enumeration of reset types defined in the Framework Specification PeiCis.\r |
40038403 | 187 | ///\r |
188 | typedef enum {\r | |
189 | ///\r | |
1c2f052d | 190 | /// Used to induce a system-wide reset. This sets all circuitry within the\r |
40038403 | 191 | /// system to its initial state. This type of reset is asynchronous to system\r |
1c2f052d | 192 | /// operation and operates withgout regard to cycle boundaries. EfiColdReset\r |
40038403 | 193 | /// is tantamount to a system power cycle.\r |
194 | ///\r | |
195 | EfiPeiResetCold,\r | |
196 | ///\r | |
197 | /// Used to induce a system-wide initialization. The processors are set to their\r | |
1c2f052d | 198 | /// initial state, and pending cycles are not corrupted. If the system does\r |
40038403 | 199 | /// not support this reset type, then an EfiResetCold must be performed.\r |
200 | ///\r | |
201 | EfiPeiResetWarm,\r | |
202 | } EFI_PEI_RESET_TYPE;\r | |
f1f289a3 | 203 | \r |
1c2f052d | 204 | #endif\r |
f1f289a3 | 205 | \r |