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