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