]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Dxe/DxeCis.h
automagically convert ELF to PE/COFF (i386 only)
[mirror_edk2.git] / MdePkg / Include / Dxe / DxeCis.h
... / ...
CommitLineData
1/** @file\r
2 Include file matches things in the DXE CIS.\r
3\r
4 Copyright (c) 2006, 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 Module Name: DxeCis.h\r
14\r
15 @par Revision Reference:\r
16 Version 0.91B.\r
17\r
18**/\r
19\r
20#ifndef __DXE_CIS__\r
21#define __DXE_CIS__\r
22\r
23#include <Uefi/UefiSpec.h>\r
24\r
25\r
26#define TIANO_ERROR(a) (MAX_2_BITS | (a))\r
27\r
28#if (EFI_SPECIFICATION_VERSION < 0x00020000)\r
29//\r
30// Tiano added a couple of return types. These are owned by UEFI specification\r
31// and Tiano can not use them. Thus for UEFI 2.0/R9 support we moved the values\r
32// to a UEFI OEM extension range to conform to UEFI specification.\r
33//\r
34#define EFI_NOT_AVAILABLE_YET EFIERR (28)\r
35#define EFI_UNLOAD_IMAGE EFIERR (29)\r
36#else\r
37#define EFI_NOT_AVAILABLE_YET TIANO_ERROR (0)\r
38#define EFI_UNLOAD_IMAGE TIANO_ERROR (1)\r
39#endif\r
40\r
41//\r
42// Implementation contamination of UEFI 2.0\r
43// Pointer to internal runtime pointer\r
44//\r
45#define EFI_IPF_GP_POINTER 0x00000008\r
46\r
47\r
48//\r
49//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
50//\r
51\r
52//\r
53// attributes for reserved memory before it is promoted to system memory\r
54//\r
55#define EFI_MEMORY_PRESENT 0x0100000000000000ULL\r
56#define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL\r
57#define EFI_MEMORY_TESTED 0x0400000000000000ULL\r
58\r
59//\r
60// range for memory mapped port I/O on IPF\r
61//\r
62#define EFI_MEMORY_PORT_IO 0x4000000000000000ULL\r
63\r
64//\r
65// Modifier for EFI DXE Services\r
66//\r
67#define EFI_DXESERVICE\r
68\r
69\r
70//\r
71// Global Coherencey Domain types\r
72//\r
73typedef enum {\r
74 EfiGcdMemoryTypeNonExistent,\r
75 EfiGcdMemoryTypeReserved,\r
76 EfiGcdMemoryTypeSystemMemory,\r
77 EfiGcdMemoryTypeMemoryMappedIo,\r
78 EfiGcdMemoryTypeMaximum\r
79} EFI_GCD_MEMORY_TYPE;\r
80\r
81typedef enum {\r
82 EfiGcdIoTypeNonExistent,\r
83 EfiGcdIoTypeReserved,\r
84 EfiGcdIoTypeIo,\r
85 EfiGcdIoTypeMaximum\r
86} EFI_GCD_IO_TYPE;\r
87\r
88typedef enum {\r
89 EfiGcdAllocateAnySearchBottomUp,\r
90 EfiGcdAllocateMaxAddressSearchBottomUp,\r
91 EfiGcdAllocateAddress,\r
92 EfiGcdAllocateAnySearchTopDown,\r
93 EfiGcdAllocateMaxAddressSearchTopDown,\r
94 EfiGcdMaxAllocateType\r
95} EFI_GCD_ALLOCATE_TYPE;\r
96\r
97typedef struct {\r
98 EFI_PHYSICAL_ADDRESS BaseAddress;\r
99 UINT64 Length;\r
100 UINT64 Capabilities;\r
101 UINT64 Attributes;\r
102 EFI_GCD_MEMORY_TYPE GcdMemoryType;\r
103 EFI_HANDLE ImageHandle;\r
104 EFI_HANDLE DeviceHandle;\r
105} EFI_GCD_MEMORY_SPACE_DESCRIPTOR;\r
106\r
107typedef struct {\r
108 EFI_PHYSICAL_ADDRESS BaseAddress;\r
109 UINT64 Length;\r
110 EFI_GCD_IO_TYPE GcdIoType;\r
111 EFI_HANDLE ImageHandle;\r
112 EFI_HANDLE DeviceHandle;\r
113} EFI_GCD_IO_SPACE_DESCRIPTOR;\r
114\r
115/**\r
116 Adds reserved memory, system memory, or memory-mapped I/O resources to the\r
117 global coherency domain of the processor.\r
118\r
119 @param GcdMemoryType Memory type of the memory space.\r
120 @param BaseAddress Base address of the memory space.\r
121 @param Length Length of the memory space.\r
122 @param Capabilities alterable attributes of the memory space.\r
123\r
124 @retval EFI_SUCCESS Merged this memory space into GCD map.\r
125\r
126**/\r
127typedef\r
128EFI_STATUS\r
129(EFIAPI *EFI_ADD_MEMORY_SPACE) (\r
130 IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r
131 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
132 IN UINT64 Length,\r
133 IN UINT64 Capabilities\r
134 )\r
135;\r
136\r
137/**\r
138 Allocates nonexistent memory, reserved memory, system memory, or memorymapped\r
139 I/O resources from the global coherency domain of the processor.\r
140\r
141 @param GcdAllocateType The type of allocate operation\r
142 @param GcdMemoryType The desired memory type\r
143 @param Alignment Align with 2^Alignment\r
144 @param Length Length to allocate\r
145 @param BaseAddress Base address to allocate\r
146 @param Imagehandle The image handle consume the allocated space.\r
147 @param DeviceHandle The device handle consume the allocated space.\r
148\r
149 @retval EFI_INVALID_PARAMETER Invalid parameter.\r
150 @retval EFI_NOT_FOUND No descriptor contains the desired space.\r
151 @retval EFI_SUCCESS Memory space successfully allocated.\r
152\r
153**/\r
154typedef\r
155EFI_STATUS\r
156(EFIAPI *EFI_ALLOCATE_MEMORY_SPACE) (\r
157 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r
158 IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r
159 IN UINTN Alignment,\r
160 IN UINT64 Length,\r
161 IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r
162 IN EFI_HANDLE ImageHandle,\r
163 IN EFI_HANDLE DeviceHandle OPTIONAL\r
164 )\r
165;\r
166\r
167/**\r
168 Frees nonexistent memory, reserved memory, system memory, or memory-mapped\r
169 I/O resources from the global coherency domain of the processor.\r
170\r
171 @param BaseAddress Base address of the segment.\r
172 @param Length Length of the segment.\r
173\r
174 @retval EFI_SUCCESS Space successfully freed.\r
175\r
176**/\r
177typedef\r
178EFI_STATUS\r
179(EFIAPI *EFI_FREE_MEMORY_SPACE) (\r
180 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
181 IN UINT64 Length\r
182 )\r
183;\r
184\r
185/**\r
186 Removes reserved memory, system memory, or memory-mapped I/O resources from\r
187 the global coherency domain of the processor.\r
188\r
189 @param BaseAddress Base address of the memory space.\r
190 @param Length Length of the memory space.\r
191\r
192 @retval EFI_SUCCESS Successfully remove a segment of memory space.\r
193\r
194**/\r
195typedef\r
196EFI_STATUS\r
197(EFIAPI *EFI_REMOVE_MEMORY_SPACE) (\r
198 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
199 IN UINT64 Length\r
200 )\r
201;\r
202\r
203/**\r
204 Retrieves the descriptor for a memory region containing a specified address.\r
205\r
206 @param BaseAddress Specified start address\r
207 @param Descriptor Specified length\r
208\r
209 @retval EFI_INVALID_PARAMETER Invalid parameter\r
210 @retval EFI_SUCCESS Successfully get memory space descriptor.\r
211\r
212**/\r
213typedef\r
214EFI_STATUS\r
215(EFIAPI *EFI_GET_MEMORY_SPACE_DESCRIPTOR) (\r
216 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
217 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor\r
218 )\r
219;\r
220\r
221/**\r
222 Modifies the attributes for a memory region in the global coherency domain of the\r
223 processor.\r
224\r
225 @param BaseAddress Specified start address\r
226 @param Length Specified length\r
227 @param Attributes Specified attributes\r
228\r
229 @retval EFI_SUCCESS Successfully set attribute of a segment of memory space.\r
230\r
231**/\r
232typedef\r
233\r
234EFI_STATUS\r
235(EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES) (\r
236 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
237 IN UINT64 Length,\r
238 IN UINT64 Attributes\r
239 )\r
240;\r
241\r
242/**\r
243 Returns a map of the memory resources in the global coherency domain of the\r
244 processor.\r
245\r
246 @param NumberOfDescriptors Number of descriptors.\r
247 @param MemorySpaceMap Descriptor array\r
248\r
249 @retval EFI_INVALID_PARAMETER Invalid parameter\r
250 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r
251 @retval EFI_SUCCESS Successfully get memory space map.\r
252\r
253**/\r
254typedef\r
255EFI_STATUS\r
256(EFIAPI *EFI_GET_MEMORY_SPACE_MAP) (\r
257 OUT UINTN *NumberOfDescriptors,\r
258 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap\r
259 )\r
260;\r
261\r
262/**\r
263 Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r
264\r
265 @param GcdIoType IO type of the segment.\r
266 @param BaseAddress Base address of the segment.\r
267 @param Length Length of the segment.\r
268\r
269 @retval EFI_SUCCESS Merged this segment into GCD map.\r
270\r
271**/\r
272typedef\r
273EFI_STATUS\r
274(EFIAPI *EFI_ADD_IO_SPACE) (\r
275 IN EFI_GCD_IO_TYPE GcdIoType,\r
276 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
277 IN UINT64 Length\r
278 )\r
279;\r
280\r
281/**\r
282 Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
283 domain of the processor.\r
284\r
285 @param GcdAllocateType The type of allocate operation\r
286 @param GcdIoType The desired IO type\r
287 @param Alignment Align with 2^Alignment\r
288 @param Length Length to allocate\r
289 @param BaseAddress Base address to allocate\r
290 @param Imagehandle The image handle consume the allocated space.\r
291 @param DeviceHandle The device handle consume the allocated space.\r
292\r
293 @retval EFI_INVALID_PARAMETER Invalid parameter.\r
294 @retval EFI_NOT_FOUND No descriptor contains the desired space.\r
295 @retval EFI_SUCCESS IO space successfully allocated.\r
296\r
297**/\r
298typedef\r
299EFI_STATUS\r
300(EFIAPI *EFI_ALLOCATE_IO_SPACE) (\r
301 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r
302 IN EFI_GCD_IO_TYPE GcdIoType,\r
303 IN UINTN Alignment,\r
304 IN UINT64 Length,\r
305 IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r
306 IN EFI_HANDLE ImageHandle,\r
307 IN EFI_HANDLE DeviceHandle OPTIONAL\r
308 )\r
309;\r
310\r
311/**\r
312 Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
313 domain of the processor.\r
314\r
315 @param BaseAddress Base address of the segment.\r
316 @param Length Length of the segment.\r
317\r
318 @retval EFI_SUCCESS Space successfully freed.\r
319\r
320**/\r
321typedef\r
322EFI_STATUS\r
323(EFIAPI *EFI_FREE_IO_SPACE) (\r
324 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
325 IN UINT64 Length\r
326 )\r
327;\r
328\r
329/**\r
330 Removes reserved I/O or I/O resources from the global coherency domain of the\r
331 processor.\r
332\r
333 @param BaseAddress Base address of the segment.\r
334 @param Length Length of the segment.\r
335\r
336 @retval EFI_SUCCESS Successfully removed a segment of IO space.\r
337\r
338**/\r
339typedef\r
340EFI_STATUS\r
341(EFIAPI *EFI_REMOVE_IO_SPACE) (\r
342 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
343 IN UINT64 Length\r
344 )\r
345;\r
346\r
347/**\r
348 Retrieves the descriptor for an I/O region containing a specified address.\r
349\r
350 @param BaseAddress Specified start address\r
351 @param Descriptor Specified length\r
352\r
353 @retval EFI_INVALID_PARAMETER Descriptor is NULL.\r
354 @retval EFI_SUCCESS Successfully get the IO space descriptor.\r
355\r
356**/\r
357typedef\r
358EFI_STATUS\r
359(EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR) (\r
360 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
361 OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor\r
362 )\r
363;\r
364\r
365/**\r
366 Returns a map of the I/O resources in the global coherency domain of the processor.\r
367\r
368 @param NumberOfDescriptors Number of descriptors.\r
369 @param MemorySpaceMap Descriptor array\r
370\r
371 @retval EFI_INVALID_PARAMETER Invalid parameter\r
372 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r
373 @retval EFI_SUCCESS Successfully get IO space map.\r
374\r
375**/\r
376typedef\r
377EFI_STATUS\r
378(EFIAPI *EFI_GET_IO_SPACE_MAP) (\r
379 OUT UINTN *NumberOfDescriptors,\r
380 OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap\r
381 )\r
382;\r
383\r
384/**\r
385 Loads and executed DXE drivers from firmware volumes.\r
386\r
387 @return Status code\r
388\r
389**/\r
390typedef\r
391EFI_STATUS\r
392(EFIAPI *EFI_DISPATCH) (VOID)\r
393;\r
394\r
395/**\r
396 Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.\r
397\r
398 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r
399 @param DriverName A pointer to the name of the file in a firmware volume.\r
400\r
401 @return Status code\r
402\r
403**/\r
404typedef\r
405EFI_STATUS\r
406(EFIAPI *EFI_SCHEDULE) (\r
407 IN EFI_HANDLE FirmwareVolumeHandle,\r
408 IN EFI_GUID *DriverName\r
409 )\r
410;\r
411\r
412/**\r
413 Promotes a file stored in a firmware volume from the untrusted to the trusted state.\r
414\r
415 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r
416 @param DriverName A pointer to the name of the file in a firmware volume.\r
417\r
418 @return Status code\r
419\r
420**/\r
421typedef\r
422EFI_STATUS\r
423(EFIAPI *EFI_TRUST) (\r
424 IN EFI_HANDLE FirmwareVolumeHandle,\r
425 IN EFI_GUID *DriverName\r
426 )\r
427;\r
428\r
429/**\r
430 Creates a firmware volume handle for a firmware volume that is present in system memory.\r
431\r
432 @param FirmwareVolumeHeader A pointer to the header of the firmware volume.\r
433 @param Size The size, in bytes, of the firmware volume.\r
434 @param FirmwareVolumeHandle On output, a pointer to the created handle.\r
435\r
436 @return Status code\r
437\r
438**/\r
439typedef\r
440EFI_STATUS\r
441(EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME) (\r
442 IN VOID *FvHeader,\r
443 IN UINTN Size,\r
444 OUT EFI_HANDLE *FirmwareVolumeHandle\r
445 )\r
446;\r
447\r
448//\r
449// DXE Services Table\r
450//\r
451#define EFI_DXE_SERVICES_SIGNATURE 0x565245535f455844ULL\r
452#define EFI_DXE_SERVICES_REVISION ((0 << 16) | (90))\r
453\r
454typedef struct {\r
455 EFI_TABLE_HEADER Hdr;\r
456\r
457 //\r
458 // Global Coherency Domain Services\r
459 //\r
460 EFI_ADD_MEMORY_SPACE AddMemorySpace;\r
461 EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace;\r
462 EFI_FREE_MEMORY_SPACE FreeMemorySpace;\r
463 EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace;\r
464 EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor;\r
465 EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes;\r
466 EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap;\r
467 EFI_ADD_IO_SPACE AddIoSpace;\r
468 EFI_ALLOCATE_IO_SPACE AllocateIoSpace;\r
469 EFI_FREE_IO_SPACE FreeIoSpace;\r
470 EFI_REMOVE_IO_SPACE RemoveIoSpace;\r
471 EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor;\r
472 EFI_GET_IO_SPACE_MAP GetIoSpaceMap;\r
473\r
474 //\r
475 // Dispatcher Services\r
476 //\r
477 EFI_DISPATCH Dispatch;\r
478 EFI_SCHEDULE Schedule;\r
479 EFI_TRUST Trust;\r
480 //\r
481 // Service to process a single firmware volume found in a capsule\r
482 //\r
483 EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;\r
484} EFI_DXE_SERVICES;\r
485\r
486\r
487//\r
488// Function prototype for invoking a function on an Application Processor\r
489// Used by both the SMM infrastructure and the MP Services Protocol\r
490//\r
491typedef\r
492VOID\r
493(EFIAPI *EFI_AP_PROCEDURE) (\r
494 IN VOID *Buffer\r
495 );\r
496\r
497#include <Common/BootMode.h>\r
498#include <Common/BootScript.h>\r
499#include <Common/Capsule.h>\r
500#include <Common/Dependency.h>\r
501#include <Common/FirmwareVolumeImageFormat.h>\r
502#include <Common/FirmwareVolumeHeader.h>\r
503#include <Common/FirmwareFileSystem.h>\r
504#include <Common/Hob.h>\r
505#include <Common/InternalFormRepresentation.h>\r
506#include <Common/StatusCode.h>\r
507#include <Common/StatusCodeDataTypeId.h>\r
508\r
509#include <Guid/AcpiTableStorage.h>\r
510#include <Guid/Apriori.h>\r
511#include <Guid/Capsule.h>\r
512#include <Guid/DxeServices.h>\r
513#include <Guid/EventLegacyBios.h>\r
514#include <Guid/FirmwareFileSystem.h>\r
515#include <Guid/FrameworkDevicePath.h>\r
516#include <Guid/HobList.h>\r
517#include <Guid/MemoryAllocationHob.h>\r
518#include <Guid/SmramMemoryReserve.h>\r
519#include <Guid/StatusCodeDataTypeId.h>\r
520\r
521#include <Dxe/ArchProtocol/Bds.h>\r
522#include <Dxe/ArchProtocol/Cpu.h>\r
523#include <Dxe/ArchProtocol/Metronome.h>\r
524#include <Dxe/ArchProtocol/MonotonicCounter.h>\r
525#include <Dxe/ArchProtocol/RealTimeClock.h>\r
526#include <Dxe/ArchProtocol/Reset.h>\r
527#include <Dxe/ArchProtocol/Runtime.h>\r
528#include <Dxe/ArchProtocol/Security.h>\r
529#include <Dxe/ArchProtocol/SecurityPolicy.h>\r
530#include <Dxe/ArchProtocol/StatusCode.h>\r
531#include <Dxe/ArchProtocol/Timer.h>\r
532#include <Dxe/ArchProtocol/Variable.h>\r
533#include <Dxe/ArchProtocol/VariableWrite.h>\r
534#include <Dxe/ArchProtocol/WatchdogTimer.h>\r
535\r
536#include <Protocol/AcpiSupport.h>\r
537#include <Protocol/BootScriptSave.h>\r
538#include <Protocol/CpuIo.h>\r
539#include <Protocol/DataHub.h>\r
540#include <Protocol/FirmwareVolume.h>\r
541#include <Protocol/FirmwareVolumeBlock.h>\r
542#include <Protocol/FirmwareVolumeDispatch.h>\r
543#include <Protocol/Hii.h>\r
544#include <Protocol/FormBrowser.h>\r
545#include <Protocol/FormCallback.h>\r
546#include <Protocol/GuidedSectionExtraction.h>\r
547#include <Protocol/IdeControllerInit.h>\r
548#include <Protocol/IncompatiblePciDeviceSupport.h>\r
549#include <Protocol/PciHostBridgeResourceAllocation.h>\r
550#include <Protocol/PciHotPlugInit.h>\r
551#include <Protocol/PciPlatform.h>\r
552#include <Protocol/SectionExtraction.h>\r
553#include <Protocol/Smbus.h>\r
554#include <Protocol/LegacyBios.h>\r
555#include <Protocol/Legacy8259.h>\r
556#include <Protocol/LegacyRegion.h>\r
557#include <Protocol/LegacyBiosPlatform.h>\r
558#include <Protocol/LegacyInterrupt.h>\r
559\r
560#endif\r