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