]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Framework/PeiCis.h
Use PixelFormat PixelBitMask in CirrusLogic5430Dxe driver.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Framework / PeiCis.h
CommitLineData
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
27///\r
28/// Inconsistent with specification here: \r
29/// In Framework Spec, PeiCis0.91, FRAMEWORK_PEI_SERVICES_SIGNATURE is defined as 0x5652455320494550. But \r
30/// to pass multiple tool chain, it is append a ULL.\r
31///\r
32//\r
33// PEI services signature and Revision defined in Framework PEI spec\r
34//\r
35#define FRAMEWORK_PEI_SERVICES_SIGNATURE 0x5652455320494550ULL\r
36#define FRAMEWORK_PEI_SERVICES_REVISION ((FRAMEWORK_PEI_SPECIFICATION_MAJOR_REVISION<<16) | (FRAMEWORK_PEI_SPECIFICATION_MINOR_REVISION))\r
37\r
38\r
4cd79ac6 39\r
40typedef struct _FRAMEWORK_EFI_PEI_SERVICES FRAMEWORK_EFI_PEI_SERVICES;\r
1c9d209f 41\r
42/**\r
43 The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI \r
44 Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header. \r
45\r
46 @param FfsHeader Pointer to the FFS file header.\r
47 @param PeiServices Describes the list of possible PEI Services.\r
48\r
49 @return Status code\r
50\r
51**/\r
52typedef\r
53EFI_STATUS\r
54(EFIAPI *EFI_PEIM_ENTRY_POINT)(\r
9205b2d7 55 IN EFI_FFS_FILE_HEADER *FfsHeader,\r
56 IN EFI_PEI_SERVICES **PeiServices\r
1c9d209f 57 );\r
58 \r
4cd79ac6 59/**\r
60 The purpose of the service is to abstract the capability of the PEI \r
61 Foundation to discover instances of firmware volumes in the system. \r
62 Given the input file pointer, this service searches for the next \r
63 matching file in the Firmware File System (FFS) volume.\r
64\r
65 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
66 @param Instance This instance of the firmware volume to find. The value 0 is the Boot Firmware Volume (BFV).\r
67 @param FwVolHeader Pointer to the firmware volume header of the volume to return.\r
68\r
69 @retval EFI_SUCCESS The volume was found.\r
70 @retval EFI_NOT_FOUND The volume was not found.\r
71 @retval EFI_INVALID_PARAMETER FwVolHeader is NULL\r
72\r
73**/\r
74typedef\r
75EFI_STATUS\r
69686d56 76(EFIAPI *EFI_PEI_FFS_FIND_NEXT_VOLUME)(\r
9205b2d7 77 IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,\r
78 IN UINTN Instance,\r
79 IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader\r
4cd79ac6 80 );\r
81 \r
82/**\r
83 The purpose of the service is to abstract the capability of the PEI \r
84 Foundation to discover instances of firmware files in the system. \r
85 Given the input file pointer, this service searches for the next matching \r
86 file in the Firmware File System (FFS) volume.\r
87\r
88 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
89 @param SearchType A filter to find files only of this type.\r
90 @param FwVolHeader Pointer to the firmware volume header of the volume to search.This parameter \r
91 must point to a valid FFS volume.\r
92 @param FileHeader Pointer to the current file from which to begin searching.This pointer will be \r
93 updated upon return to reflect the file found.\r
94\r
9205b2d7 95 @retval EFI_SUCCESS The file was found.\r
96 @retval EFI_NOT_FOUND The file was not found.\r
97 @retval EFI_NOT_FOUND The header checksum was not zero.\r
4cd79ac6 98\r
99**/\r
100typedef\r
101EFI_STATUS\r
69686d56 102(EFIAPI *EFI_PEI_FFS_FIND_NEXT_FILE)(\r
9205b2d7 103 IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,\r
104 IN EFI_FV_FILETYPE SearchType,\r
105 IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,\r
106 IN OUT EFI_FFS_FILE_HEADER **FileHeader\r
4cd79ac6 107 );\r
108\r
109/**\r
110 Given the input file pointer, this service searches for the next \r
111 matching file in the Firmware File System (FFS) volume. \r
112\r
113 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
114 @param SectionType The value of the section type to find.\r
115 @param FfsFileHeader A pointer to the file header that contains the set of sections to be searched.\r
116 @param SectionData A pointer to the discovered section, if successful.\r
117\r
9205b2d7 118 @retval EFI_SUCCESS The section was found.\r
119 @retval EFI_NOT_FOUND The section was not found.\r
4cd79ac6 120\r
121**/\r
122typedef\r
123EFI_STATUS\r
69686d56 124(EFIAPI *EFI_PEI_FFS_FIND_SECTION_DATA)(\r
9205b2d7 125 IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,\r
126 IN EFI_SECTION_TYPE SectionType,\r
127 IN EFI_FFS_FILE_HEADER *FfsFileHeader,\r
128 IN OUT VOID **SectionData\r
4cd79ac6 129 );\r
2baf6c68 130\r
131///\r
132/// FRAMEWORK_EFI_PEI_SERVICES is a collection of functions whose implementation is provided by the PEI\r
133/// Foundation. The table is located in the temporary or permanent memory, depending upon the capabilities \r
134/// and phase of execution of PEI.\r
135/// \r
136/// These services fall into various classes, including the following:\r
137/// - Managing the boot mode\r
138/// - Allocating both early and permanent memory\r
139/// - Supporting the Firmware File System (FFS)\r
140/// - Abstracting the PPI database abstraction\r
141/// - Creating Hand-Off Blocks (HOBs)\r
142/// \r
4cd79ac6 143struct _FRAMEWORK_EFI_PEI_SERVICES {\r
9205b2d7 144 EFI_TABLE_HEADER Hdr;\r
4cd79ac6 145 //\r
146 // PPI Functions\r
147 //\r
9205b2d7 148 EFI_PEI_INSTALL_PPI InstallPpi;\r
149 EFI_PEI_REINSTALL_PPI ReInstallPpi;\r
150 EFI_PEI_LOCATE_PPI LocatePpi;\r
151 EFI_PEI_NOTIFY_PPI NotifyPpi;\r
4cd79ac6 152 //\r
153 // Boot Mode Functions\r
154 //\r
9205b2d7 155 EFI_PEI_GET_BOOT_MODE GetBootMode;\r
156 EFI_PEI_SET_BOOT_MODE SetBootMode;\r
4cd79ac6 157 //\r
158 // HOB Functions\r
159 //\r
9205b2d7 160 EFI_PEI_GET_HOB_LIST GetHobList;\r
161 EFI_PEI_CREATE_HOB CreateHob;\r
4cd79ac6 162 //\r
163 // Firmware Volume Functions\r
164 //\r
9205b2d7 165 EFI_PEI_FFS_FIND_NEXT_VOLUME FfsFindNextVolume;\r
166 EFI_PEI_FFS_FIND_NEXT_FILE FfsFindNextFile;\r
167 EFI_PEI_FFS_FIND_SECTION_DATA FfsFindSectionData;\r
4cd79ac6 168 //\r
169 // PEI Memory Functions\r
170 //\r
9205b2d7 171 EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;\r
172 EFI_PEI_ALLOCATE_PAGES AllocatePages;\r
173 EFI_PEI_ALLOCATE_POOL AllocatePool;\r
174 EFI_PEI_COPY_MEM CopyMem;\r
175 EFI_PEI_SET_MEM SetMem;\r
4cd79ac6 176 //\r
40038403 177 // (the following interfaces are installed by publishing PEIM)\r
4cd79ac6 178 // Status Code\r
9205b2d7 179 //\r
180 EFI_PEI_REPORT_STATUS_CODE ReportStatusCode;\r
4cd79ac6 181 //\r
182 // Reset\r
183 //\r
9205b2d7 184 EFI_PEI_RESET_SYSTEM ResetSystem;\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
192/// Enumeration of reset types defined in Framework Spec PeiCis\r
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