]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Pi/PiDxeCis.h
Updated headers to follow coding standard
[mirror_edk2.git] / MdePkg / Include / Pi / PiDxeCis.h
CommitLineData
959ccb23 1/** @file\r
2 Include file matches things in PI.\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
959ccb23 13 @par Revision Reference:\r
14 Version 1.0.\r
15\r
16**/\r
17\r
18#ifndef __PI_DXECIS_H__\r
19#define __PI_DXECIS_H__\r
20\r
21#include <Pi/PiMultiPhase.h>\r
22\r
23//\r
24// Global Coherencey Domain types\r
25//\r
26typedef enum {\r
27 EfiGcdMemoryTypeNonExistent,\r
28 EfiGcdMemoryTypeReserved,\r
29 EfiGcdMemoryTypeSystemMemory,\r
30 EfiGcdMemoryTypeMemoryMappedIo,\r
31 EfiGcdMemoryTypeMaximum\r
32} EFI_GCD_MEMORY_TYPE;\r
33\r
34\r
35typedef enum {\r
36 EfiGcdIoTypeNonExistent,\r
37 EfiGcdIoTypeReserved,\r
38 EfiGcdIoTypeIo,\r
39 EfiGcdIoTypeMaximum\r
40} EFI_GCD_IO_TYPE;\r
41\r
42\r
43typedef enum {\r
44 EfiGcdAllocateAnySearchBottomUp,\r
45 EfiGcdAllocateMaxAddressSearchBottomUp,\r
46 EfiGcdAllocateAddress,\r
47 EfiGcdAllocateAnySearchTopDown,\r
48 EfiGcdAllocateMaxAddressSearchTopDown,\r
49 EfiGcdMaxAllocateType\r
50} EFI_GCD_ALLOCATE_TYPE;\r
51\r
52\r
53typedef struct {\r
54 EFI_PHYSICAL_ADDRESS BaseAddress;\r
55 UINT64 Length;\r
56 UINT64 Capabilities;\r
57 UINT64 Attributes;\r
58 EFI_GCD_MEMORY_TYPE GcdMemoryType;\r
59 EFI_HANDLE ImageHandle;\r
60 EFI_HANDLE DeviceHandle;\r
61} EFI_GCD_MEMORY_SPACE_DESCRIPTOR;\r
62\r
63\r
64typedef struct {\r
65 EFI_PHYSICAL_ADDRESS BaseAddress;\r
66 UINT64 Length;\r
67 EFI_GCD_IO_TYPE GcdIoType;\r
68 EFI_HANDLE ImageHandle;\r
69 EFI_HANDLE DeviceHandle;\r
70} EFI_GCD_IO_SPACE_DESCRIPTOR;\r
71\r
72\r
73/**\r
74 Adds reserved memory, system memory, or memory-mapped I/O resources to the\r
75 global coherency domain of the processor.\r
76\r
77 @param GcdMemoryType Memory type of the memory space.\r
78 @param BaseAddress Base address of the memory space.\r
79 @param Length Length of the memory space.\r
80 @param Capabilities alterable attributes of the memory space.\r
81\r
82 @retval EFI_SUCCESS Merged this memory space into GCD map.\r
83\r
84**/\r
85typedef\r
86EFI_STATUS\r
87(EFIAPI *EFI_ADD_MEMORY_SPACE) (\r
88 IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r
89 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
90 IN UINT64 Length,\r
91 IN UINT64 Capabilities\r
92 )\r
93;\r
94\r
95/**\r
96 Allocates nonexistent memory, reserved memory, system memory, or memorymapped\r
97 I/O resources from the global coherency domain of the processor.\r
98\r
99 @param GcdAllocateType The type of allocate operation\r
100 @param GcdMemoryType The desired memory type\r
101 @param Alignment Align with 2^Alignment\r
102 @param Length Length to allocate\r
103 @param BaseAddress Base address to allocate\r
104 @param Imagehandle The image handle consume the allocated space.\r
105 @param DeviceHandle The device handle consume the allocated space.\r
106\r
107 @retval EFI_INVALID_PARAMETER Invalid parameter.\r
108 @retval EFI_NOT_FOUND No descriptor contains the desired space.\r
109 @retval EFI_SUCCESS Memory space successfully allocated.\r
110\r
111**/\r
112typedef\r
113EFI_STATUS\r
114(EFIAPI *EFI_ALLOCATE_MEMORY_SPACE) (\r
115 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r
116 IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r
117 IN UINTN Alignment,\r
118 IN UINT64 Length,\r
119 IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r
120 IN EFI_HANDLE ImageHandle,\r
121 IN EFI_HANDLE DeviceHandle OPTIONAL\r
122 )\r
123;\r
124\r
125/**\r
126 Frees nonexistent memory, reserved memory, system memory, or memory-mapped\r
127 I/O resources from the global coherency domain of the processor.\r
128\r
129 @param BaseAddress Base address of the segment.\r
130 @param Length Length of the segment.\r
131\r
132 @retval EFI_SUCCESS Space successfully freed.\r
133\r
134**/\r
135typedef\r
136EFI_STATUS\r
137(EFIAPI *EFI_FREE_MEMORY_SPACE) (\r
138 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
139 IN UINT64 Length\r
140 )\r
141;\r
142\r
143/**\r
144 Removes reserved memory, system memory, or memory-mapped I/O resources from\r
145 the global coherency domain of the processor.\r
146\r
147 @param BaseAddress Base address of the memory space.\r
148 @param Length Length of the memory space.\r
149\r
150 @retval EFI_SUCCESS Successfully remove a segment of memory space.\r
151\r
152**/\r
153typedef\r
154EFI_STATUS\r
155(EFIAPI *EFI_REMOVE_MEMORY_SPACE) (\r
156 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
157 IN UINT64 Length\r
158 )\r
159;\r
160\r
161/**\r
162 Retrieves the descriptor for a memory region containing a specified address.\r
163\r
164 @param BaseAddress Specified start address\r
165 @param Descriptor Specified length\r
166\r
167 @retval EFI_INVALID_PARAMETER Invalid parameter\r
168 @retval EFI_SUCCESS Successfully get memory space descriptor.\r
169\r
170**/\r
171typedef\r
172EFI_STATUS\r
173(EFIAPI *EFI_GET_MEMORY_SPACE_DESCRIPTOR) (\r
174 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
175 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor\r
176 )\r
177;\r
178\r
179/**\r
180 Modifies the attributes for a memory region in the global coherency domain of the\r
181 processor.\r
182\r
183 @param BaseAddress Specified start address\r
184 @param Length Specified length\r
185 @param Attributes Specified attributes\r
186\r
187 @retval EFI_SUCCESS Successfully set attribute of a segment of memory space.\r
188\r
189**/\r
190typedef\r
959ccb23 191EFI_STATUS\r
192(EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES) (\r
193 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
194 IN UINT64 Length,\r
195 IN UINT64 Attributes\r
196 )\r
197;\r
198\r
199/**\r
200 Returns a map of the memory resources in the global coherency domain of the\r
201 processor.\r
202\r
203 @param NumberOfDescriptors Number of descriptors.\r
204 @param MemorySpaceMap Descriptor array\r
205\r
206 @retval EFI_INVALID_PARAMETER Invalid parameter\r
207 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r
208 @retval EFI_SUCCESS Successfully get memory space map.\r
209\r
210**/\r
211typedef\r
212EFI_STATUS\r
213(EFIAPI *EFI_GET_MEMORY_SPACE_MAP) (\r
214 OUT UINTN *NumberOfDescriptors,\r
215 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap\r
216 )\r
217;\r
218\r
219/**\r
220 Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r
221\r
222 @param GcdIoType IO type of the segment.\r
223 @param BaseAddress Base address of the segment.\r
224 @param Length Length of the segment.\r
225\r
226 @retval EFI_SUCCESS Merged this segment into GCD map.\r
227\r
228**/\r
229typedef\r
230EFI_STATUS\r
231(EFIAPI *EFI_ADD_IO_SPACE) (\r
232 IN EFI_GCD_IO_TYPE GcdIoType,\r
233 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
234 IN UINT64 Length\r
235 )\r
236;\r
237\r
238/**\r
239 Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
240 domain of the processor.\r
241\r
242 @param GcdAllocateType The type of allocate operation\r
243 @param GcdIoType The desired IO type\r
244 @param Alignment Align with 2^Alignment\r
245 @param Length Length to allocate\r
246 @param BaseAddress Base address to allocate\r
247 @param Imagehandle The image handle consume the allocated space.\r
248 @param DeviceHandle The device handle consume the allocated space.\r
249\r
250 @retval EFI_INVALID_PARAMETER Invalid parameter.\r
251 @retval EFI_NOT_FOUND No descriptor contains the desired space.\r
252 @retval EFI_SUCCESS IO space successfully allocated.\r
253\r
254**/\r
255typedef\r
256EFI_STATUS\r
257(EFIAPI *EFI_ALLOCATE_IO_SPACE) (\r
258 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r
259 IN EFI_GCD_IO_TYPE GcdIoType,\r
260 IN UINTN Alignment,\r
261 IN UINT64 Length,\r
262 IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r
263 IN EFI_HANDLE ImageHandle,\r
264 IN EFI_HANDLE DeviceHandle OPTIONAL\r
265 )\r
266;\r
267\r
268/**\r
269 Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
270 domain of the processor.\r
271\r
272 @param BaseAddress Base address of the segment.\r
273 @param Length Length of the segment.\r
274\r
275 @retval EFI_SUCCESS Space successfully freed.\r
276\r
277**/\r
278typedef\r
279EFI_STATUS\r
280(EFIAPI *EFI_FREE_IO_SPACE) (\r
281 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
282 IN UINT64 Length\r
283 )\r
284;\r
285\r
286/**\r
287 Removes reserved I/O or I/O resources from the global coherency domain of the\r
288 processor.\r
289\r
290 @param BaseAddress Base address of the segment.\r
291 @param Length Length of the segment.\r
292\r
293 @retval EFI_SUCCESS Successfully removed a segment of IO space.\r
294\r
295**/\r
296typedef\r
297EFI_STATUS\r
298(EFIAPI *EFI_REMOVE_IO_SPACE) (\r
299 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
300 IN UINT64 Length\r
301 )\r
302;\r
303\r
304/**\r
305 Retrieves the descriptor for an I/O region containing a specified address.\r
306\r
307 @param BaseAddress Specified start address\r
308 @param Descriptor Specified length\r
309\r
310 @retval EFI_INVALID_PARAMETER Descriptor is NULL.\r
311 @retval EFI_SUCCESS Successfully get the IO space descriptor.\r
312\r
313**/\r
314typedef\r
315EFI_STATUS\r
316(EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR) (\r
317 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
318 OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor\r
319 )\r
320;\r
321\r
322/**\r
323 Returns a map of the I/O resources in the global coherency domain of the processor.\r
324\r
325 @param NumberOfDescriptors Number of descriptors.\r
326 @param MemorySpaceMap Descriptor array\r
327\r
328 @retval EFI_INVALID_PARAMETER Invalid parameter\r
329 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r
330 @retval EFI_SUCCESS Successfully get IO space map.\r
331\r
332**/\r
333typedef\r
334EFI_STATUS\r
335(EFIAPI *EFI_GET_IO_SPACE_MAP) (\r
336 OUT UINTN *NumberOfDescriptors,\r
337 OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap\r
338 )\r
339;\r
340\r
341\r
342\r
343/**\r
344 Loads and executed DXE drivers from firmware volumes.\r
345\r
346 @return Status code\r
347\r
348**/\r
349typedef\r
350EFI_STATUS\r
00edb218
A
351(EFIAPI *EFI_DISPATCH) (\r
352 VOID\r
353 )\r
959ccb23 354;\r
355\r
356/**\r
357 Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.\r
358\r
359 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r
360 @param DriverName A pointer to the name of the file in a firmware volume.\r
361\r
362 @return Status code\r
363\r
364**/\r
365typedef\r
366EFI_STATUS\r
367(EFIAPI *EFI_SCHEDULE) (\r
368 IN EFI_HANDLE FirmwareVolumeHandle,\r
369 IN EFI_GUID *DriverName\r
370 )\r
371;\r
372\r
373/**\r
374 Promotes a file stored in a firmware volume from the untrusted to the trusted state.\r
375\r
376 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r
377 @param DriverName A pointer to the name of the file in a firmware volume.\r
378\r
379 @return Status code\r
380\r
381**/\r
382typedef\r
383EFI_STATUS\r
384(EFIAPI *EFI_TRUST) (\r
385 IN EFI_HANDLE FirmwareVolumeHandle,\r
386 IN EFI_GUID *DriverName\r
387 )\r
388;\r
389\r
390/**\r
391 Creates a firmware volume handle for a firmware volume that is present in system memory.\r
392\r
393 @param FirmwareVolumeHeader A pointer to the header of the firmware volume.\r
394 @param Size The size, in bytes, of the firmware volume.\r
395 @param FirmwareVolumeHandle On output, a pointer to the created handle.\r
396\r
397 @return Status code\r
398\r
399**/\r
400typedef\r
401EFI_STATUS\r
402(EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME) (\r
403 IN VOID *FvHeader,\r
404 IN UINTN Size,\r
405 OUT EFI_HANDLE *FirmwareVolumeHandle\r
406 )\r
407;\r
408\r
409//\r
410// DXE Services Table\r
411//\r
00edb218
A
412#define DXE_SERVICES_SIGNATURE 0x565245535f455844\r
413#define DXE_SERVICES_REVISION ((1<<16) | (00)\r
959ccb23 414\r
415typedef struct {\r
416 EFI_TABLE_HEADER Hdr;\r
417\r
418 //\r
419 // Global Coherency Domain Services\r
420 //\r
421 EFI_ADD_MEMORY_SPACE AddMemorySpace;\r
422 EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace;\r
423 EFI_FREE_MEMORY_SPACE FreeMemorySpace;\r
424 EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace;\r
425 EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor;\r
426 EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes;\r
427 EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap;\r
428 EFI_ADD_IO_SPACE AddIoSpace;\r
429 EFI_ALLOCATE_IO_SPACE AllocateIoSpace;\r
430 EFI_FREE_IO_SPACE FreeIoSpace;\r
431 EFI_REMOVE_IO_SPACE RemoveIoSpace;\r
432 EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor;\r
433 EFI_GET_IO_SPACE_MAP GetIoSpaceMap;\r
434\r
435 //\r
436 // Dispatcher Services\r
437 //\r
438 EFI_DISPATCH Dispatch;\r
439 EFI_SCHEDULE Schedule;\r
440 EFI_TRUST Trust;\r
441 //\r
442 // Service to process a single firmware volume found in a capsule\r
443 //\r
444 EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;\r
445} DXE_SERVICES;\r
446\r
447typedef DXE_SERVICES EFI_DXE_SERVICES;\r
448\r
449#endif\r