]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Framework/PeiCis.h
PeiCis.h clean up.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Framework / PeiCis.h
1 /** @file
2 Include file for definitions in the Intel Platform Innovation Framework for EFI
3 Pre-EFI Initialization Core Interface Specification (PEI CIS) Version 0.91.
4
5 Copyright (c) 2006 - 2009, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef __PEICIS_H__
17 #define __PEICIS_H__
18
19 #include <PiPei.h>
20 #include <Ppi/PciCfg.h>
21
22 typedef struct _FRAMEWORK_EFI_PEI_SERVICES FRAMEWORK_EFI_PEI_SERVICES;
23
24 /**
25 The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI
26 Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header.
27
28 @param FfsHeader Pointer to the FFS file header.
29 @param PeiServices Describes the list of possible PEI Services.
30
31 @return Status code
32
33 **/
34 typedef
35 EFI_STATUS
36 (EFIAPI *EFI_PEIM_ENTRY_POINT)(
37 IN EFI_FFS_FILE_HEADER *FfsHeader,
38 IN EFI_PEI_SERVICES **PeiServices
39 );
40
41 /**
42 The purpose of the service is to abstract the capability of the PEI
43 Foundation to discover instances of firmware volumes in the system.
44 Given the input file pointer, this service searches for the next
45 matching file in the Firmware File System (FFS) volume.
46
47 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
48 @param Instance This instance of the firmware volume to find. The value 0 is the Boot Firmware Volume (BFV).
49 @param FwVolHeader Pointer to the firmware volume header of the volume to return.
50
51 @retval EFI_SUCCESS The volume was found.
52 @retval EFI_NOT_FOUND The volume was not found.
53 @retval EFI_INVALID_PARAMETER FwVolHeader is NULL
54
55 **/
56 typedef
57 EFI_STATUS
58 (EFIAPI *EFI_PEI_FFS_FIND_NEXT_VOLUME)(
59 IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,
60 IN UINTN Instance,
61 IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader
62 );
63
64 /**
65 The purpose of the service is to abstract the capability of the PEI
66 Foundation to discover instances of firmware files in the system.
67 Given the input file pointer, this service searches for the next matching
68 file in the Firmware File System (FFS) volume.
69
70 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
71 @param SearchType A filter to find files only of this type.
72 @param FwVolHeader Pointer to the firmware volume header of the volume to search.This parameter
73 must point to a valid FFS volume.
74 @param FileHeader Pointer to the current file from which to begin searching.This pointer will be
75 updated upon return to reflect the file found.
76
77 @retval EFI_SUCCESS The file was found.
78 @retval EFI_NOT_FOUND The file was not found.
79 @retval EFI_NOT_FOUND The header checksum was not zero.
80
81 **/
82 typedef
83 EFI_STATUS
84 (EFIAPI *EFI_PEI_FFS_FIND_NEXT_FILE)(
85 IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,
86 IN EFI_FV_FILETYPE SearchType,
87 IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,
88 IN OUT EFI_FFS_FILE_HEADER **FileHeader
89 );
90
91 /**
92 Given the input file pointer, this service searches for the next
93 matching file in the Firmware File System (FFS) volume.
94
95 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
96 @param SectionType The value of the section type to find.
97 @param FfsFileHeader A pointer to the file header that contains the set of sections to be searched.
98 @param SectionData A pointer to the discovered section, if successful.
99
100 @retval EFI_SUCCESS The section was found.
101 @retval EFI_NOT_FOUND The section was not found.
102
103 **/
104 typedef
105 EFI_STATUS
106 (EFIAPI *EFI_PEI_FFS_FIND_SECTION_DATA)(
107 IN FRAMEWORK_EFI_PEI_SERVICES **PeiServices,
108 IN EFI_SECTION_TYPE SectionType,
109 IN EFI_FFS_FILE_HEADER *FfsFileHeader,
110 IN OUT VOID **SectionData
111 );
112
113 ///
114 /// FRAMEWORK_EFI_PEI_SERVICES is a collection of functions whose implementation is provided by the PEI
115 /// Foundation. The table is located in the temporary or permanent memory, depending upon the capabilities
116 /// and phase of execution of PEI.
117 ///
118 /// These services fall into various classes, including the following:
119 /// - Managing the boot mode
120 /// - Allocating both early and permanent memory
121 /// - Supporting the Firmware File System (FFS)
122 /// - Abstracting the PPI database abstraction
123 /// - Creating Hand-Off Blocks (HOBs)
124 ///
125 struct _FRAMEWORK_EFI_PEI_SERVICES {
126 EFI_TABLE_HEADER Hdr;
127 //
128 // PPI Functions
129 //
130 EFI_PEI_INSTALL_PPI InstallPpi;
131 EFI_PEI_REINSTALL_PPI ReInstallPpi;
132 EFI_PEI_LOCATE_PPI LocatePpi;
133 EFI_PEI_NOTIFY_PPI NotifyPpi;
134 //
135 // Boot Mode Functions
136 //
137 EFI_PEI_GET_BOOT_MODE GetBootMode;
138 EFI_PEI_SET_BOOT_MODE SetBootMode;
139 //
140 // HOB Functions
141 //
142 EFI_PEI_GET_HOB_LIST GetHobList;
143 EFI_PEI_CREATE_HOB CreateHob;
144 //
145 // Firmware Volume Functions
146 //
147 EFI_PEI_FFS_FIND_NEXT_VOLUME FfsFindNextVolume;
148 EFI_PEI_FFS_FIND_NEXT_FILE FfsFindNextFile;
149 EFI_PEI_FFS_FIND_SECTION_DATA FfsFindSectionData;
150 //
151 // PEI Memory Functions
152 //
153 EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;
154 EFI_PEI_ALLOCATE_PAGES AllocatePages;
155 EFI_PEI_ALLOCATE_POOL AllocatePool;
156 EFI_PEI_COPY_MEM CopyMem;
157 EFI_PEI_SET_MEM SetMem;
158 //
159 // Status Code
160 //
161 EFI_PEI_REPORT_STATUS_CODE ReportStatusCode;
162 //
163 // Reset
164 //
165 EFI_PEI_RESET_SYSTEM ResetSystem;
166 //
167 // (the following interfaces are installed by publishing PEIM)
168 //
169 // I/O Abstractions
170 //
171 EFI_PEI_CPU_IO_PPI *CpuIo;
172 EFI_PEI_PCI_CFG_PPI *PciCfg;
173 };
174
175 #endif
176