]> git.proxmox.com Git - mirror_edk2.git/blob - OldMdePkg/Include/Uefi/UefiSpec.h
Add some definitions for efi event in Uefi/UefiSpec.h to follow spec.
[mirror_edk2.git] / OldMdePkg / Include / Uefi / UefiSpec.h
1 /** @file
2 Include file that supportes UEFI.
3
4 This include file must only contain things defined in the UEFI 2.0 specification.
5 If a code construct is defined in the UEFI 2.0 specification it must be included
6 by this include file.
7
8 Copyright (c) 2006 - 2007, Intel Corporation
9 All rights reserved. This program and the accompanying materials
10 are licensed and made available under the terms and conditions of the BSD License
11 which accompanies this distribution. The full text of the license may be found at
12 http://opensource.org/licenses/bsd-license.php
13
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16
17 Module Name: UefiSpec.h
18
19 **/
20
21 #ifndef __UEFI_SPEC_H__
22 #define __UEFI_SPEC_H__
23
24 #include <Common/MultiPhase.h>
25
26 //
27 // EFI Data Types derived from other EFI data types.
28 //
29 #define NULL_HANDLE ((VOID *) 0)
30
31 typedef VOID *EFI_EVENT;
32 typedef UINTN EFI_TPL;
33
34 //
35 // Networking
36 //
37 typedef struct {
38 UINT8 Addr[4];
39 } EFI_IPv4_ADDRESS;
40
41 typedef struct {
42 UINT8 Addr[16];
43 } EFI_IPv6_ADDRESS;
44
45 typedef struct {
46 UINT8 Addr[32];
47 } EFI_MAC_ADDRESS;
48
49 typedef union {
50 UINT32 Addr[4];
51 EFI_IPv4_ADDRESS v4;
52 EFI_IPv6_ADDRESS v6;
53 } EFI_IP_ADDRESS;
54
55
56 typedef enum {
57 AllocateAnyPages,
58 AllocateMaxAddress,
59 AllocateAddress,
60 MaxAllocateType
61 } EFI_ALLOCATE_TYPE;
62
63
64 //
65 // possible caching types for the memory range
66 //
67 #define EFI_MEMORY_UC 0x0000000000000001ULL
68 #define EFI_MEMORY_WC 0x0000000000000002ULL
69 #define EFI_MEMORY_WT 0x0000000000000004ULL
70 #define EFI_MEMORY_WB 0x0000000000000008ULL
71 #define EFI_MEMORY_UCE 0x0000000000000010ULL
72
73 //
74 // physical memory protection on range
75 //
76 #define EFI_MEMORY_WP 0x0000000000001000ULL
77 #define EFI_MEMORY_RP 0x0000000000002000ULL
78 #define EFI_MEMORY_XP 0x0000000000004000ULL
79
80 //
81 // range requires a runtime mapping
82 //
83 #define EFI_MEMORY_RUNTIME 0x8000000000000000ULL
84
85 typedef UINT64 EFI_VIRTUAL_ADDRESS;
86
87 #define EFI_MEMORY_DESCRIPTOR_VERSION 1
88 typedef struct {
89 UINT32 Type;
90 UINT32 Pad;
91 EFI_PHYSICAL_ADDRESS PhysicalStart;
92 EFI_VIRTUAL_ADDRESS VirtualStart;
93 UINT64 NumberOfPages;
94 UINT64 Attribute;
95 } EFI_MEMORY_DESCRIPTOR;
96
97 //
98 // EFI_FIELD_OFFSET - returns the byte offset to a field within a structure
99 //
100 #define EFI_FIELD_OFFSET(TYPE,Field) ((UINTN)(&(((TYPE *) 0)->Field)))
101
102 #include <Protocol/DevicePath.h>
103 #include <Protocol/SimpleTextIn.h>
104 #include <Protocol/SimpleTextOut.h>
105
106 //
107 // Declare forward referenced data structures
108 //
109 typedef struct _EFI_SYSTEM_TABLE EFI_SYSTEM_TABLE;
110
111 /**
112 Allocates memory pages from the system.
113
114 @param Type The type of allocation to perform.
115 @param MemoryType The type of memory to allocate.
116 @param Pages The number of contiguous 4 KB pages to allocate.
117 @param Memory Pointer to a physical address. On input, the way in which the address is
118 used depends on the value of Type.
119
120 @retval EFI_SUCCESS The requested pages were allocated.
121 @retval EFI_INVALID_PARAMETER 1) Type is not AllocateAnyPages or
122 AllocateMaxAddress or AllocateAddress.
123 2) MemoryType is in the range
124 EfiMaxMemoryType..0x7FFFFFFF.
125 @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.
126 @retval EFI_NOT_FOUND The requested pages could not be found.
127
128 **/
129 typedef
130 EFI_STATUS
131 (EFIAPI *EFI_ALLOCATE_PAGES) (
132 IN EFI_ALLOCATE_TYPE Type,
133 IN EFI_MEMORY_TYPE MemoryType,
134 IN UINTN Pages,
135 IN OUT EFI_PHYSICAL_ADDRESS *Memory
136 );
137
138 /**
139 Frees memory pages.
140
141 @param Memory The base physical address of the pages to be freed.
142 @param Pages The number of contiguous 4 KB pages to free.
143
144 @retval EFI_SUCCESS The requested pages were freed.
145 @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid.
146 @retval EFI_NOT_FOUND The requested memory pages were not allocated with
147 AllocatePages().
148
149 **/
150 typedef
151 EFI_STATUS
152 (EFIAPI *EFI_FREE_PAGES) (
153 IN EFI_PHYSICAL_ADDRESS Memory,
154 IN UINTN Pages
155 );
156
157 /**
158 Returns the current memory map.
159
160 @param MemoryMapSize A pointer to the size, in bytes, of the MemoryMap buffer.
161 @param MemoryMap A pointer to the buffer in which firmware places the current memory
162 map.
163 @param MapKey A pointer to the location in which firmware returns the key for the
164 current memory map.
165 @param DescriptorSize A pointer to the location in which firmware returns the size, in bytes, of
166 an individual EFI_MEMORY_DESCRIPTOR.
167 @param DescriptorVersion A pointer to the location in which firmware returns the version number
168 associated with the EFI_MEMORY_DESCRIPTOR.
169
170 @retval EFI_SUCCESS The memory map was returned in the MemoryMap buffer.
171 @retval EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small. The current buffer size
172 needed to hold the memory map is returned in MemoryMapSize.
173 @retval EFI_INVALID_PARAMETER 1) MemoryMapSize is NULL.
174 2) The MemoryMap buffer is not too small and MemoryMap is
175 NULL.
176
177 **/
178 typedef
179 EFI_STATUS
180 (EFIAPI *EFI_GET_MEMORY_MAP) (
181 IN OUT UINTN *MemoryMapSize,
182 IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,
183 OUT UINTN *MapKey,
184 OUT UINTN *DescriptorSize,
185 OUT UINT32 *DescriptorVersion
186 );
187
188 #define NextMemoryDescriptor(_Ptr, _Size) ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) (_Ptr)) + (_Size)))
189 #define NEXT_MEMORY_DESCRIPTOR(_Ptr, _Size) NextMemoryDescriptor (_Ptr, _Size)
190
191 /**
192 Allocates pool memory.
193
194 @param PoolType The type of pool to allocate.
195 @param Size The number of bytes to allocate from the pool.
196 @param Buffer A pointer to a pointer to the allocated buffer if the call succeeds;
197 undefined otherwise.
198
199 @retval EFI_SUCCESS The requested number of bytes was allocated.
200 @retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated.
201 @retval EFI_INVALID_PARAMETER PoolType was invalid.
202
203 **/
204 typedef
205 EFI_STATUS
206 (EFIAPI *EFI_ALLOCATE_POOL) (
207 IN EFI_MEMORY_TYPE PoolType,
208 IN UINTN Size,
209 OUT VOID **Buffer
210 );
211
212 /**
213 Returns pool memory to the system.
214
215 @param Buffer Pointer to the buffer to free.
216
217 @retval EFI_SUCCESS The memory was returned to the system.
218 @retval EFI_INVALID_PARAMETER Buffer was invalid.
219
220 **/
221 typedef
222 EFI_STATUS
223 (EFIAPI *EFI_FREE_POOL) (
224 IN VOID *Buffer
225 );
226
227 /**
228 Changes the runtime addressing mode of EFI firmware from physical to virtual.
229
230 @param MemoryMapSize The size in bytes of VirtualMap.
231 @param DescriptorSize The size in bytes of an entry in the VirtualMap.
232 @param DescriptorVersion The version of the structure entries in VirtualMap.
233 @param VirtualMap An array of memory descriptors which contain new virtual
234 address mapping information for all runtime ranges.
235
236 @retval EFI_SUCCESS The virtual address map has been applied.
237 @retval EFI_UNSUPPORTED EFI firmware is not at runtime, or the EFI firmware is already in
238 virtual address mapped mode.
239 @retval EFI_INVALID_PARAMETER DescriptorSize or DescriptorVersion is invalid.
240 @retval EFI_NO_MAPPING A virtual address was not supplied for a range in the memory
241 map that requires a mapping.
242 @retval EFI_NOT_FOUND A virtual address was supplied for an address that is not found
243 in the memory map.
244
245 **/
246 typedef
247 EFI_STATUS
248 (EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) (
249 IN UINTN MemoryMapSize,
250 IN UINTN DescriptorSize,
251 IN UINT32 DescriptorVersion,
252 IN EFI_MEMORY_DESCRIPTOR *VirtualMap
253 );
254
255 /**
256 Connects one or more drivers to a controller.
257
258 @param ControllerHandle The handle of the controller to which driver(s) are to be connected.
259 @param DriverImageHandle A pointer to an ordered list handles that support the
260 EFI_DRIVER_BINDING_PROTOCOL.
261 @param RemainingDevicePath A pointer to the device path that specifies a child of the
262 controller specified by ControllerHandle.
263 @param Recursive If TRUE, then ConnectController() is called recursively
264 until the entire tree of controllers below the controller specified
265 by ControllerHandle have been created. If FALSE, then
266 the tree of controllers is only expanded one level.
267
268 @retval EFI_SUCCESS 1) One or more drivers were connected to ControllerHandle.
269 2) No drivers were connected to ControllerHandle, but
270 RemainingDevicePath is not NULL, and it is an End Device
271 Path Node.
272 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
273 @retval EFI_NOT_FOUND 1) There are no EFI_DRIVER_BINDING_PROTOCOL instances
274 present in the system.
275 2) No drivers were connected to ControllerHandle.
276
277 **/
278 typedef
279 EFI_STATUS
280 (EFIAPI *EFI_CONNECT_CONTROLLER) (
281 IN EFI_HANDLE ControllerHandle,
282 IN EFI_HANDLE *DriverImageHandle, OPTIONAL
283 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath, OPTIONAL
284 IN BOOLEAN Recursive
285 );
286
287 /**
288 Disconnects one or more drivers from a controller.
289
290 @param ControllerHandle The handle of the controller from which driver(s) are to be disconnected.
291 @param DriverImageHandle The driver to disconnect from ControllerHandle.
292 @param ChildHandle The handle of the child to destroy.
293
294 @retval EFI_SUCCESS 1) One or more drivers were disconnected from the controller.
295 2) On entry, no drivers are managing ControllerHandle.
296 3) DriverImageHandle is not NULL, and on entry
297 DriverImageHandle is not managing ControllerHandle.
298
299 @retval EFI_INVALID_PARAMETER One ore more parameters are invalid.
300 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to disconnect any drivers from
301 ControllerHandle.
302 @retval EFI_DEVICE_ERROR The controller could not be disconnected because of a device error.
303
304 **/
305 typedef
306 EFI_STATUS
307 (EFIAPI *EFI_DISCONNECT_CONTROLLER) (
308 IN EFI_HANDLE ControllerHandle,
309 IN EFI_HANDLE DriverImageHandle, OPTIONAL
310 IN EFI_HANDLE ChildHandle OPTIONAL
311 );
312
313 //
314 // ConvertPointer DebugDisposition type.
315 //
316 #define EFI_OPTIONAL_PTR 0x00000001
317 #define EFI_OPTIONAL_POINTER EFI_OPTIONAL_PTR
318
319 /**
320 Determines the new virtual address that is to be used on subsequent memory accesses.
321
322 @param DebugDisposition Supplies type information for the pointer being converted.
323 @param Address A pointer to a pointer that is to be fixed to be the value needed
324 for the new virtual address mappings being applied.
325
326 @retval EFI_SUCCESS The pointer pointed to by Address was modified.
327 @retval EFI_INVALID_PARAMETER 1) Address is NULL.
328 2) *Address is NULL and DebugDisposition does
329 not have the EFI_OPTIONAL_PTR bit set.
330 @retval EFI_NOT_FOUND The pointer pointed to by Address was not found to be part
331 of the current memory map. This is normally fatal.
332
333 **/
334 typedef
335 EFI_STATUS
336 (EFIAPI *EFI_CONVERT_POINTER) (
337 IN UINTN DebugDisposition,
338 IN OUT VOID **Address
339 );
340
341 //
342 // EFI Event Types (name defined in spec)
343 //
344 #define EVT_TIMER 0x80000000
345 #define EVT_RUNTIME 0x40000000
346
347 #define EVT_NOTIFY_WAIT 0x00000100
348 #define EVT_NOTIFY_SIGNAL 0x00000200
349 #define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
350 #define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
351
352 #define EVENT_TIMER EVT_TIMER
353 #define EVENT_RUNTIME EVT_RUNTIME
354 #define EVENT_RUNTIME_CONTEXT 0x20000000
355
356 #define EVENT_NOTIFY_WAIT EVT_NOTIFY_WAIT
357 #define EVENT_NOTIFY_SIGNAL EVT_NOTIFY_SIGNAL
358 #define EVENT_SIGNAL_EXIT_BOOT_SERVICES EVT_SIGNAL_EXIT_BOOT_SERVICES
359 #define EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
360
361 //
362 // Prior to UEFI 2.0 Tiano extended these enums. This was replaced by
363 // CreateEventEx() Event Groups in UEFI 2.0
364 //
365 #define EFI_EVENT_NOTIFY_SIGNAL_ALL 0x00000400
366
367 #define EFI_EVENT_SIGNAL_READY_TO_BOOT 0x00000203
368 #define EFI_EVENT_SIGNAL_LEGACY_BOOT 0x00000204
369
370
371 //
372 // EFI Event Types (name following coding style)
373 //
374 #define EFI_EVENT_TIMER EVENT_TIMER
375 #define EFI_EVENT_RUNTIME EVENT_RUNTIME
376 #define EFI_EVENT_RUNTIME_CONTEXT EVENT_RUNTIME_CONTEXT
377
378 #define EFI_EVENT_NOTIFY_WAIT EVENT_NOTIFY_WAIT
379 #define EFI_EVENT_NOTIFY_SIGNAL EVENT_NOTIFY_SIGNAL
380
381 #define EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES EVENT_SIGNAL_EXIT_BOOT_SERVICES
382 #define EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
383
384
385 /**
386 Invoke a notification event
387
388 @param Event Event whose notification function is being invoked.
389 @param Context Pointer to the notification function's context,
390 which is implementation-dependent.
391
392 **/
393 typedef
394 VOID
395 (EFIAPI *EFI_EVENT_NOTIFY) (
396 IN EFI_EVENT Event,
397 IN VOID *Context
398 );
399
400 /**
401 Creates an event.
402
403 @param Type The type of event to create and its mode and attributes.
404 @param NotifyTpl Pointer to the notification function's context.
405 @param NotifyFunction Pointer to the event's notification function, if any.
406 @param NotifyContext Pointer to the notification function's context; corresponds to parameter
407 Context in the notification function.
408 @param Event Pointer to the newly created event if the call succeeds; undefined
409 otherwise.
410
411 @retval EFI_SUCCESS The event structure was created.
412 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
413 @retval EFI_OUT_OF_RESOURCES The event could not be allocated.
414
415 **/
416 typedef
417 EFI_STATUS
418 (EFIAPI *EFI_CREATE_EVENT) (
419 IN UINT32 Type,
420 IN EFI_TPL NotifyTpl,
421 IN EFI_EVENT_NOTIFY NotifyFunction,
422 IN VOID *NotifyContext,
423 OUT EFI_EVENT *Event
424 );
425
426 /**
427 Creates an event in a group.
428
429 @param Type The type of event to create and its mode and attributes.
430 @param NotifyTpl Pointer to the notification function's context.
431 @param NotifyFunction Pointer to the event's notification function, if any.
432 @param NotifyContext Pointer to the notification function's context; corresponds to parameter
433 Context in the notification function.
434 @param EventGroup Pointer to the unique identifier of the group to which this event belongs.
435 @param Event Pointer to the newly created event if the call succeeds; undefined
436 otherwise.
437
438 @retval EFI_SUCCESS The event structure was created.
439 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
440 @retval EFI_OUT_OF_RESOURCES The event could not be allocated.
441
442 **/
443 typedef
444 EFI_STATUS
445 (EFIAPI *EFI_CREATE_EVENT_EX) (
446 IN UINT32 Type,
447 IN EFI_TPL NotifyTpl OPTIONAL,
448 IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,
449 IN CONST VOID *NotifyContext OPTIONAL,
450 IN CONST EFI_GUID *EventGroup OPTIONAL,
451 OUT EFI_EVENT *Event
452 );
453
454 typedef enum {
455 TimerCancel,
456 TimerPeriodic,
457 TimerRelative
458 } EFI_TIMER_DELAY;
459
460 /**
461 Sets the type of timer and the trigger time for a timer event.
462
463 @param Event The timer event that is to be signaled at the specified time.
464 @param Type The type of time that is specified in TriggerTime.
465 @param TriggerTime The number of 100ns units until the timer expires.
466
467 @retval EFI_SUCCESS The event has been set to be signaled at the requested time.
468 @retval EFI_INVALID_PARAMETER Event or Type is not valid.
469
470 **/
471 typedef
472 EFI_STATUS
473 (EFIAPI *EFI_SET_TIMER) (
474 IN EFI_EVENT Event,
475 IN EFI_TIMER_DELAY Type,
476 IN UINT64 TriggerTime
477 );
478
479 /**
480 Signals an event.
481
482 @param Event The event to signal.
483
484 @retval EFI_SUCCESS The event has been signaled.
485
486 **/
487 typedef
488 EFI_STATUS
489 (EFIAPI *EFI_SIGNAL_EVENT) (
490 IN EFI_EVENT Event
491 );
492
493 /**
494 Stops execution until an event is signaled.
495
496 @param NumberOfEvents The number of events in the Event array.
497 @param Event An array of EFI_EVENT.
498 @param Index Pointer to the index of the event which satisfied the wait condition.
499
500 @retval EFI_SUCCESS The event indicated by Index was signaled.
501 @retval EFI_INVALID_PARAMETER 1) NumberOfEvents is 0.
502 2) The event indicated by Index is of type
503 EVT_NOTIFY_SIGNAL.
504 @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION.
505
506 **/
507 typedef
508 EFI_STATUS
509 (EFIAPI *EFI_WAIT_FOR_EVENT) (
510 IN UINTN NumberOfEvents,
511 IN EFI_EVENT *Event,
512 OUT UINTN *Index
513 );
514
515 /**
516 Closes an event.
517
518 @param Event The event to close.
519
520 @retval EFI_SUCCESS The event has been closed.
521
522 **/
523 typedef
524 EFI_STATUS
525 (EFIAPI *EFI_CLOSE_EVENT) (
526 IN EFI_EVENT Event
527 );
528
529 /**
530 Checks whether an event is in the signaled state.
531
532 @param Event The event to check.
533
534 @retval EFI_SUCCESS The event is in the signaled state.
535 @retval EFI_NOT_READY The event is not in the signaled state.
536 @retval EFI_INVALID_PARAMETER Event is of type EVT_NOTIFY_SIGNAL.
537
538 **/
539 typedef
540 EFI_STATUS
541 (EFIAPI *EFI_CHECK_EVENT) (
542 IN EFI_EVENT Event
543 );
544
545 //
546 // Task priority level (name defined in spec).
547 //
548 #define TPL_APPLICATION 4
549 #define TPL_CALLBACK 8
550 #define TPL_NOTIFY 16
551 #define TPL_HIGH_LEVEL 31
552
553 //
554 // Task priority level (name following coding style).
555 //
556 #define EFI_TPL_APPLICATION TPL_APPLICATION
557 #define EFI_TPL_CALLBACK TPL_CALLBACK
558 #define EFI_TPL_NOTIFY TPL_NOTIFY
559 #define EFI_TPL_HIGH_LEVEL TPL_HIGH_LEVEL
560
561 /**
562 Raises a task's priority level and returns its previous level.
563
564 @param NewTpl The new task priority level.
565
566 @retval Previous task priority level
567
568 **/
569 typedef
570 EFI_TPL
571 (EFIAPI *EFI_RAISE_TPL) (
572 IN EFI_TPL NewTpl
573 );
574
575 /**
576 Restores a task's priority level to its previous value.
577
578 @param OldTpl The previous task priority level to restore
579
580 **/
581 typedef
582 VOID
583 (EFIAPI *EFI_RESTORE_TPL) (
584 IN EFI_TPL OldTpl
585 );
586
587 //
588 // Variable attributes
589 //
590 #define EFI_VARIABLE_NON_VOLATILE 0x00000001
591 #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
592 #define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
593 #define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008
594
595 /**
596 Returns the value of a variable.
597
598 @param VariableName A Null-terminated Unicode string that is the name of the
599 vendor's variable.
600 @param VendorGuid A unique identifier for the vendor.
601 @param Attributes If not NULL, a pointer to the memory location to return the
602 attributes bitmask for the variable.
603 @param DataSize On input, the size in bytes of the return Data buffer.
604 On output the size of data returned in Data.
605 @param Data The buffer to return the contents of the variable.
606
607 @retval EFI_SUCCESS The function completed successfully.
608 @retval EFI_NOT_FOUND The variable was not found.
609 @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.
610 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
611 @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
612
613 **/
614 typedef
615 EFI_STATUS
616 (EFIAPI *EFI_GET_VARIABLE) (
617 IN CHAR16 *VariableName,
618 IN EFI_GUID *VendorGuid,
619 OUT UINT32 *Attributes, OPTIONAL
620 IN OUT UINTN *DataSize,
621 OUT VOID *Data
622 );
623
624 /**
625 Enumerates the current variable names.
626
627 @param VariableNameSize The size of the VariableName buffer.
628 @param VariableName On input, supplies the last VariableName that was returned
629 by GetNextVariableName(). On output, returns the Nullterminated
630 Unicode string of the current variable.
631 @param VendorGuid On input, supplies the last VendorGuid that was returned by
632 GetNextVariableName(). On output, returns the
633 VendorGuid of the current variable.
634
635 @retval EFI_SUCCESS The function completed successfully.
636 @retval EFI_NOT_FOUND The next variable was not found.
637 @retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the result.
638 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
639 @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
640
641 **/
642 typedef
643 EFI_STATUS
644 (EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) (
645 IN OUT UINTN *VariableNameSize,
646 IN OUT CHAR16 *VariableName,
647 IN OUT EFI_GUID *VendorGuid
648 );
649
650 /**
651 Sets the value of a variable.
652
653 @param VariableName A Null-terminated Unicode string that is the name of the
654 vendor's variable.
655 @param VendorGuid A unique identifier for the vendor.
656 @param Attributes Attributes bitmask to set for the variable.
657 @param DataSize The size in bytes of the Data buffer.
658 @param Data The contents for the variable.
659
660 @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
661 defined by the Attributes.
662 @retval EFI_WRITE_PROTECTED The variable in question is read-only.
663 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
664 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
665 @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
666
667 **/
668 typedef
669 EFI_STATUS
670 (EFIAPI *EFI_SET_VARIABLE) (
671 IN CHAR16 *VariableName,
672 IN EFI_GUID *VendorGuid,
673 IN UINT32 Attributes,
674 IN UINTN DataSize,
675 IN VOID *Data
676 );
677
678 //
679 // EFI Time
680 //
681 typedef struct {
682 UINT32 Resolution;
683 UINT32 Accuracy;
684 BOOLEAN SetsToZero;
685 } EFI_TIME_CAPABILITIES;
686
687 /**
688 Returns the current time and date information, and the time-keeping capabilities
689 of the hardware platform.
690
691 @param Time A pointer to storage to receive a snapshot of the current time.
692 @param Capabilities An optional pointer to a buffer to receive the real time clock
693 device's capabilities.
694
695 @retval EFI_SUCCESS The operation completed successfully.
696 @retval EFI_INVALID_PARAMETER Time is NULL.
697 @retval EFI_DEVICE_ERROR The time could not be retrieved due to hardware error.
698
699 **/
700 typedef
701 EFI_STATUS
702 (EFIAPI *EFI_GET_TIME) (
703 OUT EFI_TIME *Time,
704 OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL
705 );
706
707 /**
708 Sets the current local time and date information.
709
710 @param Time A pointer to the current time.
711
712 @retval EFI_SUCCESS The operation completed successfully.
713 @retval EFI_INVALID_PARAMETER A time field is out of range.
714 @retval EFI_DEVICE_ERROR The time could not be set due due to hardware error.
715
716 **/
717 typedef
718 EFI_STATUS
719 (EFIAPI *EFI_SET_TIME) (
720 IN EFI_TIME *Time
721 );
722
723 /**
724 Returns the current wakeup alarm clock setting.
725
726 @param Enabled Indicates if the alarm is currently enabled or disabled.
727 @param Pending Indicates if the alarm signal is pending and requires acknowledgement.
728 @param Time The current alarm setting.
729
730 @retval EFI_SUCCESS The alarm settings were returned.
731 @retval EFI_INVALID_PARAMETER Any parameter is NULL.
732 @retval EFI_DEVICE_ERROR The wakeup time could not be retrieved due to a hardware error.
733
734 **/
735 typedef
736 EFI_STATUS
737 (EFIAPI *EFI_GET_WAKEUP_TIME) (
738 OUT BOOLEAN *Enabled,
739 OUT BOOLEAN *Pending,
740 OUT EFI_TIME *Time
741 );
742
743 /**
744 Sets the system wakeup alarm clock time.
745
746 @param Enabled Enable or disable the wakeup alarm.
747 @param Time If Enable is TRUE, the time to set the wakeup alarm for.
748
749 @retval EFI_SUCCESS If Enable is TRUE, then the wakeup alarm was enabled. If
750 Enable is FALSE, then the wakeup alarm was disabled.
751 @retval EFI_INVALID_PARAMETER A time field is out of range.
752 @retval EFI_DEVICE_ERROR The wakeup time could not be set due to a hardware error.
753 @retval EFI_UNSUPPORTED A wakeup timer is not supported on this platform.
754
755 **/
756 typedef
757 EFI_STATUS
758 (EFIAPI *EFI_SET_WAKEUP_TIME) (
759 IN BOOLEAN Enable,
760 IN EFI_TIME *Time OPTIONAL
761 );
762
763 /**
764 This is the declaration of an EFI image entry point. This can be the entry point to an application
765 written to this specification, an EFI boot service driver, or an EFI runtime driver.
766
767 @param ImageHandle Handle that identifies the loaded image.
768 @param SystemTable System Table for this image.
769
770 @retval EFI_SUCCESS The operation completed successfully.
771
772 **/
773 typedef
774 EFI_STATUS
775 (EFIAPI *EFI_IMAGE_ENTRY_POINT) (
776 IN EFI_HANDLE ImageHandle,
777 IN EFI_SYSTEM_TABLE *SystemTable
778 );
779
780 /**
781 Loads an EFI image into memory.
782
783 @param BootPolicy If TRUE, indicates that the request originates from the boot
784 manager, and that the boot manager is attempting to load
785 FilePath as a boot selection. Ignored if SourceBuffer is
786 not NULL.
787 @param ParentImageHandle The caller's image handle.
788 @param FilePath The DeviceHandle specific file path from which the image is
789 loaded.
790 @param SourceBuffer If not NULL, a pointer to the memory location containing a copy
791 of the image to be loaded.
792 @param SourceSize The size in bytes of SourceBuffer.
793 @param ImageHandle Pointer to the returned image handle that is created when the
794 image is successfully loaded.
795
796 @retval EFI_SUCCESS Image was loaded into memory correctly.
797 @retval EFI_NOT_FOUND Both SourceBuffer and FilePath are NULL.
798 @retval EFI_INVALID_PARAMETER One or more parametes are invalid.
799 @retval EFI_UNSUPPORTED The image type is not supported.
800 @retval EFI_OUT_OF_RESOURCES Image was not loaded due to insufficient resources.
801 @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not
802 understood.
803 @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error.
804
805 **/
806 typedef
807 EFI_STATUS
808 (EFIAPI *EFI_IMAGE_LOAD) (
809 IN BOOLEAN BootPolicy,
810 IN EFI_HANDLE ParentImageHandle,
811 IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
812 IN VOID *SourceBuffer OPTIONAL,
813 IN UINTN SourceSize,
814 OUT EFI_HANDLE *ImageHandle
815 );
816
817 /**
818 Transfers control to a loaded image's entry point.
819
820 @param ImageHandle Handle of image to be started.
821 @param ExitDataSize Pointer to the size, in bytes, of ExitData.
822 @param ExitData Pointer to a pointer to a data buffer that includes a Null-terminated
823 Unicode string, optionally followed by additional binary data.
824
825 @retval EFI_INVALID_PARAMETER ImageHandle is either an invalid image handle or the image
826 has already been initialized with StartImage
827 @retval Exit code from image Exit code from image
828
829 **/
830 typedef
831 EFI_STATUS
832 (EFIAPI *EFI_IMAGE_START) (
833 IN EFI_HANDLE ImageHandle,
834 OUT UINTN *ExitDataSize,
835 OUT CHAR16 **ExitData OPTIONAL
836 );
837
838 /**
839 Terminates a loaded EFI image and returns control to boot services.
840
841 @param ImageHandle Handle that identifies the image.
842 @param ExitStatus The image's exit code.
843 @param ExitDataSize The size, in bytes, of ExitData.
844 @param ExitData Pointer to a data buffer that includes a Null-terminated Unicode string,
845 optionally followed by additional binary data.
846
847 @retval EFI_SUCCESS The image specified by ImageHandle was unloaded.
848 @retval EFI_INVALID_PARAMETER The image specified by ImageHandle has been loaded and
849 started with LoadImage() and StartImage(), but the
850 image is not the currently executing image.
851
852 **/
853 typedef
854 EFI_STATUS
855 (EFIAPI *EFI_EXIT) (
856 IN EFI_HANDLE ImageHandle,
857 IN EFI_STATUS ExitStatus,
858 IN UINTN ExitDataSize,
859 IN CHAR16 *ExitData OPTIONAL
860 );
861
862 /**
863 Unloads an image.
864
865 @param ImageHandle Handle that identifies the image to be unloaded.
866
867 @retval EFI_SUCCESS The image has been unloaded.
868 @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
869 @retval EFI_UNSUPPORTED The image has been started, and does not support unload.
870 @retval Exit code from the image's unload handler
871
872 **/
873 typedef
874 EFI_STATUS
875 (EFIAPI *EFI_IMAGE_UNLOAD) (
876 IN EFI_HANDLE ImageHandle
877 );
878
879 /**
880 Terminates all boot services.
881
882 @param ImageHandle Handle that identifies the exiting image.
883 @param MapKey Key to the latest memory map.
884
885 @retval EFI_SUCCESS Boot services have been terminated.
886 @retval EFI_INVALID_PARAMETER MapKey is incorrect.
887
888 **/
889 typedef
890 EFI_STATUS
891 (EFIAPI *EFI_EXIT_BOOT_SERVICES) (
892 IN EFI_HANDLE ImageHandle,
893 IN UINTN MapKey
894 );
895
896 /**
897 Induces a fine-grained stall.
898
899 @param Microseconds The number of microseconds to stall execution.
900
901 @retval EFI_SUCCESS Execution was stalled at least the requested number of
902 Microseconds.
903
904 **/
905 typedef
906 EFI_STATUS
907 (EFIAPI *EFI_STALL) (
908 IN UINTN Microseconds
909 );
910
911 /**
912 Sets the system's watchdog timer.
913
914 @param Timeout The number of seconds to set the watchdog timer to.
915 @param WatchdogCode The numeric code to log on a watchdog timer timeout event.
916 @param DataSize The size, in bytes, of WatchdogData.
917 @param WatchdogData A data buffer that includes a Null-terminated Unicode string, optionally
918 followed by additional binary data.
919
920 @retval EFI_SUCCESS The timeout has been set.
921 @retval EFI_INVALID_PARAMETER The supplied WatchdogCode is invalid.
922 @retval EFI_UNSUPPORTED The system does not have a watchdog timer.
923 @retval EFI_DEVICE_ERROR The watch dog timer could not be programmed due to a hardware
924 error.
925
926 **/
927 typedef
928 EFI_STATUS
929 (EFIAPI *EFI_SET_WATCHDOG_TIMER) (
930 IN UINTN Timeout,
931 IN UINT64 WatchdogCode,
932 IN UINTN DataSize,
933 IN CHAR16 *WatchdogData OPTIONAL
934 );
935
936 typedef enum {
937 EfiResetCold,
938 EfiResetWarm,
939 EfiResetShutdown,
940 #if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
941 //
942 // Tiano extension for capsules that was removed after UEFI 2.0 came out
943 //
944 EfiResetUpdate
945 #endif
946 } EFI_RESET_TYPE;
947
948 /**
949 Resets the entire platform.
950
951 @param ResetType The type of reset to perform.
952 @param ResetStatus The status code for the reset.
953 @param DataSize The size, in bytes, of WatchdogData.
954 @param ResetData For a ResetType of EfiResetCold, EfiResetWarm, or
955 EfiResetShutdown the data buffer starts with a Null-terminated
956 Unicode string, optionally followed by additional binary data.
957
958 **/
959 typedef
960 VOID
961 (EFIAPI *EFI_RESET_SYSTEM) (
962 IN EFI_RESET_TYPE ResetType,
963 IN EFI_STATUS ResetStatus,
964 IN UINTN DataSize,
965 IN CHAR16 *ResetData OPTIONAL
966 );
967
968 /**
969 Returns a monotonically increasing count for the platform.
970
971 @param Count Pointer to returned value.
972
973 @retval EFI_SUCCESS The next monotonic count was returned.
974 @retval EFI_INVALID_PARAMETER Count is NULL.
975 @retval EFI_DEVICE_ERROR The device is not functioning properly.
976
977 **/
978 typedef
979 EFI_STATUS
980 (EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT) (
981 OUT UINT64 *Count
982 );
983
984 /**
985 Returns the next high 32 bits of the platform's monotonic counter.
986
987 @param HighCount Pointer to returned value.
988
989 @retval EFI_SUCCESS The next high monotonic count was returned.
990 @retval EFI_INVALID_PARAMETER HighCount is NULL.
991 @retval EFI_DEVICE_ERROR The device is not functioning properly.
992
993 **/
994 typedef
995 EFI_STATUS
996 (EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) (
997 OUT UINT32 *HighCount
998 );
999
1000 /**
1001 Computes and returns a 32-bit CRC for a data buffer.
1002
1003 @param Data A pointer to the buffer on which the 32-bit CRC is to be computed.
1004 @param DataSize The number of bytes in the buffer Data.
1005 @param Crc32 The 32-bit CRC that was computed for the data buffer specified by Data
1006 and DataSize.
1007
1008 @retval EFI_SUCCESS The 32-bit CRC was computed for the data buffer and returned in
1009 Crc32.
1010 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1011
1012 **/
1013 typedef
1014 EFI_STATUS
1015 (EFIAPI *EFI_CALCULATE_CRC32) (
1016 IN VOID *Data,
1017 IN UINTN DataSize,
1018 OUT UINT32 *Crc32
1019 );
1020
1021 /**
1022 Copies the contents of one buffer to another buffer.
1023
1024 @param Destination Pointer to the destination buffer of the memory copy.
1025 @param Source Pointer to the source buffer of the memory copy.
1026 @param Length Number of bytes to copy from Source to Destination.
1027
1028 **/
1029 typedef
1030 VOID
1031 (EFIAPI *EFI_COPY_MEM) (
1032 IN VOID *Destination,
1033 IN VOID *Source,
1034 IN UINTN Length
1035 );
1036
1037 /**
1038 The SetMem() function fills a buffer with a specified value.
1039
1040 @param Buffer Pointer to the buffer to fill.
1041 @param Size Number of bytes in Buffer to fill.
1042 @param Value Value to fill Buffer with.
1043
1044 **/
1045 typedef
1046 VOID
1047 (EFIAPI *EFI_SET_MEM) (
1048 IN VOID *Buffer,
1049 IN UINTN Size,
1050 IN UINT8 Value
1051 );
1052
1053 //
1054 // Protocol handler functions
1055 //
1056 typedef enum {
1057 EFI_NATIVE_INTERFACE
1058 } EFI_INTERFACE_TYPE;
1059
1060 /**
1061 Installs a protocol interface on a device handle. If the handle does not exist, it is created and added
1062 to the list of handles in the system. InstallMultipleProtocolInterfaces() performs
1063 more error checking than InstallProtocolInterface(), so it is recommended that
1064 InstallMultipleProtocolInterfaces() be used in place of
1065 InstallProtocolInterface()
1066
1067 @param Handle A pointer to the EFI_HANDLE on which the interface is to be installed.
1068 @param Protocol The numeric ID of the protocol interface.
1069 @param InterfaceType Indicates whether Interface is supplied in native form.
1070 @param Interface A pointer to the protocol interface.
1071
1072 @retval EFI_SUCCESS The protocol interface was installed.
1073 @retval EFI_OUT_OF_RESOURCES Space for a new handle could not be allocated.
1074 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1075
1076 **/
1077 typedef
1078 EFI_STATUS
1079 (EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE) (
1080 IN OUT EFI_HANDLE *Handle,
1081 IN EFI_GUID *Protocol,
1082 IN EFI_INTERFACE_TYPE InterfaceType,
1083 IN VOID *Interface
1084 );
1085
1086 /**
1087 Installs one or more protocol interfaces into the boot services environment.
1088
1089 @param Handle The handle to install the new protocol interfaces on, or NULL if a new
1090 handle is to be allocated.
1091 @param ... A variable argument list containing pairs of protocol GUIDs and protocol
1092 interfaces.
1093
1094 @retval EFI_SUCCESS All the protocol interface was installed.
1095 @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols.
1096 @retval EFI_ALREADY_STARTED A Device Path Protocol instance was passed in that is already present in
1097 the handle database.
1098
1099 **/
1100 typedef
1101 EFI_STATUS
1102 (EFIAPI *EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES) (
1103 IN OUT EFI_HANDLE *Handle,
1104 ...
1105 );
1106
1107 /**
1108 Reinstalls a protocol interface on a device handle.
1109
1110 @param Handle Handle on which the interface is to be reinstalled.
1111 @param Protocol The numeric ID of the interface.
1112 @param OldInterface A pointer to the old interface. NULL can be used if a structure is not
1113 associated with Protocol.
1114 @param NewInterface A pointer to the new interface.
1115
1116 @retval EFI_SUCCESS The protocol interface was reinstalled.
1117 @retval EFI_NOT_FOUND The OldInterface on the handle was not found.
1118 @retval EFI_ACCESS_DENIED The protocol interface could not be reinstalled,
1119 because OldInterface is still being used by a
1120 driver that will not release it.
1121 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1122
1123 **/
1124 typedef
1125 EFI_STATUS
1126 (EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE) (
1127 IN EFI_HANDLE Handle,
1128 IN EFI_GUID *Protocol,
1129 IN VOID *OldInterface,
1130 IN VOID *NewInterface
1131 );
1132
1133 /**
1134 Removes a protocol interface from a device handle. It is recommended that
1135 UninstallMultipleProtocolInterfaces() be used in place of
1136 UninstallProtocolInterface().
1137
1138 @param Handle The handle on which the interface was installed.
1139 @param Protocol The numeric ID of the interface.
1140 @param Interface A pointer to the interface.
1141
1142 @retval EFI_SUCCESS The interface was removed.
1143 @retval EFI_NOT_FOUND The interface was not found.
1144 @retval EFI_ACCESS_DENIED The interface was not removed because the interface
1145 is still being used by a driver.
1146 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1147
1148 **/
1149 typedef
1150 EFI_STATUS
1151 (EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE) (
1152 IN EFI_HANDLE Handle,
1153 IN EFI_GUID *Protocol,
1154 IN VOID *Interface
1155 );
1156
1157 /**
1158 Removes one or more protocol interfaces into the boot services environment.
1159
1160 @param Handle The handle to remove the protocol interfaces from.
1161 @param ... A variable argument list containing pairs of protocol GUIDs and
1162 protocol interfaces.
1163
1164 @retval EFI_SUCCESS All the protocol interfaces were removed.
1165 @retval EFI_INVALID_PARAMETER One of the protocol interfaces was not previously installed on Handle.
1166
1167 **/
1168 typedef
1169 EFI_STATUS
1170 (EFIAPI *EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) (
1171 IN EFI_HANDLE Handle,
1172 ...
1173 );
1174
1175 /**
1176 Queries a handle to determine if it supports a specified protocol.
1177
1178 @param Handle The handle being queried.
1179 @param Protocol The published unique identifier of the protocol.
1180 @param Interface Supplies the address where a pointer to the corresponding Protocol
1181 Interface is returned.
1182 @retval EFI_SUCCESS The interface information for the specified protocol was returned.
1183 @retval EFI_UNSUPPORTED The device does not support the specified protocol.
1184 @retval EFI_INVALID_PARAMETER One of the protocol interfaces was not previously installed on Handle.
1185
1186 **/
1187 typedef
1188 EFI_STATUS
1189 (EFIAPI *EFI_HANDLE_PROTOCOL) (
1190 IN EFI_HANDLE Handle,
1191 IN EFI_GUID *Protocol,
1192 OUT VOID **Interface
1193 );
1194
1195 #define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001
1196 #define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002
1197 #define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004
1198 #define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008
1199 #define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010
1200 #define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020
1201
1202 /**
1203 Queries a handle to determine if it supports a specified protocol. If the protocol is supported by the
1204 handle, it opens the protocol on behalf of the calling agent.
1205
1206 @param Handle The handle for the protocol interface that is being opened.
1207 @param Protocol The published unique identifier of the protocol.
1208 @param Interface Supplies the address where a pointer to the corresponding Protocol
1209 Interface is returned.
1210 @param AgentHandle The handle of the agent that is opening the protocol interface
1211 specified by Protocol and Interface.
1212 @param ControllerHandle If the agent that is opening a protocol is a driver that follows the
1213 UEFI Driver Model, then this parameter is the controller handle
1214 that requires the protocol interface. If the agent does not follow
1215 the UEFI Driver Model, then this parameter is optional and may
1216 be NULL.
1217 @param Attributes The open mode of the protocol interface specified by Handle
1218 and Protocol.
1219
1220 @retval EFI_SUCCESS An item was added to the open list for the protocol interface, and the
1221 protocol interface was returned in Interface.
1222 @retval EFI_UNSUPPORTED Handle does not support Protocol.
1223 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1224 @retval EFI_ACCESS_DENIED Required attributes can't be supported in current environment.
1225 @retval EFI_ALREADY_STARTED Item on the open list already has requierd attributes whose agent
1226 handle is the same as AgentHandle.
1227
1228 **/
1229 typedef
1230 EFI_STATUS
1231 (EFIAPI *EFI_OPEN_PROTOCOL) (
1232 IN EFI_HANDLE Handle,
1233 IN EFI_GUID *Protocol,
1234 OUT VOID **Interface,
1235 IN EFI_HANDLE AgentHandle,
1236 IN EFI_HANDLE ControllerHandle, OPTIONAL
1237 IN UINT32 Attributes
1238 );
1239
1240
1241 /**
1242 Closes a protocol on a handle that was opened using OpenProtocol().
1243
1244 @param Handle The handle for the protocol interface that was previously opened
1245 with OpenProtocol(), and is now being closed.
1246 @param Protocol The published unique identifier of the protocol.
1247 @param Interface Supplies the address where a pointer to the corresponding Protocol
1248 Interface is returned.
1249 @param AgentHandle The handle of the agent that is closing the protocol interface.
1250 @param ControllerHandle If the agent that opened a protocol is a driver that follows the
1251 UEFI Driver Model, then this parameter is the controller handle
1252 that required the protocol interface.
1253
1254 @retval EFI_SUCCESS The protocol instance was closed.
1255 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1256 @retval EFI_NOT_FOUND 1) Handle does not support the protocol specified by Protocol.
1257 2) The protocol interface specified by Handle and Protocol is not
1258 currently open by AgentHandle and ControllerHandle.
1259
1260 **/
1261 typedef
1262 EFI_STATUS
1263 (EFIAPI *EFI_CLOSE_PROTOCOL) (
1264 IN EFI_HANDLE Handle,
1265 IN EFI_GUID *Protocol,
1266 IN EFI_HANDLE AgentHandle,
1267 IN EFI_HANDLE ControllerHandle
1268 );
1269
1270 typedef struct {
1271 EFI_HANDLE AgentHandle;
1272 EFI_HANDLE ControllerHandle;
1273 UINT32 Attributes;
1274 UINT32 OpenCount;
1275 } EFI_OPEN_PROTOCOL_INFORMATION_ENTRY;
1276
1277 /**
1278 Retrieves the list of agents that currently have a protocol interface opened.
1279
1280 @param Handle The handle for the protocol interface that is being queried.
1281 @param Protocol The published unique identifier of the protocol.
1282 @param EntryBuffer A pointer to a buffer of open protocol information in the form of
1283 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.
1284 @param EntryCount A pointer to the number of entries in EntryBuffer.
1285
1286 @retval EFI_SUCCESS The open protocol information was returned in EntryBuffer, and the
1287 number of entries was returned EntryCount.
1288 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to allocate EntryBuffer.
1289 @retval EFI_NOT_FOUND Handle does not support the protocol specified by Protocol.
1290
1291 **/
1292 typedef
1293 EFI_STATUS
1294 (EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION) (
1295 IN EFI_HANDLE Handle,
1296 IN EFI_GUID *Protocol,
1297 IN EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
1298 OUT UINTN *EntryCount
1299 );
1300
1301 /**
1302 Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated
1303 from pool.
1304
1305 @param Handle The handle from which to retrieve the list of protocol interface
1306 GUIDs.
1307 @param ProtocolBuffer A pointer to the list of protocol interface GUID pointers that are
1308 installed on Handle.
1309 @param ProtocolBufferCount A pointer to the number of GUID pointers present in
1310 ProtocolBuffer.
1311
1312 @retval EFI_SUCCESS The list of protocol interface GUIDs installed on Handle was returned in
1313 ProtocolBuffer. The number of protocol interface GUIDs was
1314 returned in ProtocolBufferCount.
1315 @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results.
1316 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1317
1318 **/
1319 typedef
1320 EFI_STATUS
1321 (EFIAPI *EFI_PROTOCOLS_PER_HANDLE) (
1322 IN EFI_HANDLE Handle,
1323 OUT EFI_GUID ***ProtocolBuffer,
1324 OUT UINTN *ProtocolBufferCount
1325 );
1326
1327 /**
1328 Creates an event that is to be signaled whenever an interface is installed for a specified protocol.
1329
1330 @param Protocol The numeric ID of the protocol for which the event is to be registered.
1331 @param Event Event that is to be signaled whenever a protocol interface is registered
1332 for Protocol.
1333 @param Registration A pointer to a memory location to receive the registration value.
1334
1335 @retval EFI_SUCCESS The notification event has been registered.
1336 @retval EFI_OUT_OF_RESOURCES Space for the notification event could not be allocated.
1337 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1338
1339 **/
1340 typedef
1341 EFI_STATUS
1342 (EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY) (
1343 IN EFI_GUID *Protocol,
1344 IN EFI_EVENT Event,
1345 OUT VOID **Registration
1346 );
1347
1348 typedef enum {
1349 AllHandles,
1350 ByRegisterNotify,
1351 ByProtocol
1352 } EFI_LOCATE_SEARCH_TYPE;
1353
1354 /**
1355 Returns an array of handles that support a specified protocol.
1356
1357 @param SearchType Specifies which handle(s) are to be returned.
1358 @param Protocol Specifies the protocol to search by.
1359 @param SearchKey Specifies the search key.
1360 @param BufferSize On input, the size in bytes of Buffer. On output, the size in bytes of
1361 the array returned in Buffer (if the buffer was large enough) or the
1362 size, in bytes, of the buffer needed to obtain the array (if the buffer was
1363 not large enough).
1364 @param Buffer The buffer in which the array is returned.
1365
1366 @retval EFI_SUCCESS The array of handles was returned.
1367 @retval EFI_NOT_FOUND No handles match the search.
1368 @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result.
1369 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1370
1371 **/
1372 typedef
1373 EFI_STATUS
1374 (EFIAPI *EFI_LOCATE_HANDLE) (
1375 IN EFI_LOCATE_SEARCH_TYPE SearchType,
1376 IN EFI_GUID *Protocol, OPTIONAL
1377 IN VOID *SearchKey, OPTIONAL
1378 IN OUT UINTN *BufferSize,
1379 OUT EFI_HANDLE *Buffer
1380 );
1381
1382 /**
1383 Locates the handle to a device on the device path that supports the specified protocol.
1384
1385 @param Protocol Specifies the protocol to search for.
1386 @param DevicePath On input, a pointer to a pointer to the device path. On output, the device
1387 path pointer is modified to point to the remaining part of the device
1388 path.
1389 @param Device A pointer to the returned device handle.
1390
1391 @retval EFI_SUCCESS The resulting handle was returned.
1392 @retval EFI_NOT_FOUND No handles match the search.
1393 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1394
1395 **/
1396 typedef
1397 EFI_STATUS
1398 (EFIAPI *EFI_LOCATE_DEVICE_PATH) (
1399 IN EFI_GUID *Protocol,
1400 IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
1401 OUT EFI_HANDLE *Device
1402 );
1403
1404 /**
1405 Adds, updates, or removes a configuration table entry from the EFI System Table.
1406
1407 @param Guid A pointer to the GUID for the entry to add, update, or remove.
1408 @param Table A pointer to the configuration table for the entry to add, update, or
1409 remove. May be NULL.
1410
1411 @retval EFI_SUCCESS The (Guid, Table) pair was added, updated, or removed.
1412 @retval EFI_NOT_FOUND An attempt was made to delete a nonexistent entry.
1413 @retval EFI_INVALID_PARAMETER Guid is not valid.
1414 @retval EFI_OUT_OF_RESOURCES There is not enough memory available to complete the operation.
1415
1416 **/
1417 typedef
1418 EFI_STATUS
1419 (EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE) (
1420 IN EFI_GUID *Guid,
1421 IN VOID *Table
1422 );
1423
1424 /**
1425 Reserved service.
1426
1427 @retval EFI_SUCCESS The operation has been completed successfully.
1428
1429 **/
1430 typedef
1431 EFI_STATUS
1432 (EFIAPI *EFI_RESERVED_SERVICE) (
1433 VOID
1434 );
1435
1436 /**
1437 Returns an array of handles that support the requested protocol in a buffer allocated from pool.
1438
1439 @param SearchType Specifies which handle(s) are to be returned.
1440 @param Protocol Specifies the protocol to search by.
1441 @param SearchKey Supplies the search key depending on the SearchType.
1442 @param NoHandles The number of handles returned in Buffer.
1443 @param Buffer A pointer to the buffer to return the requested array of handles that
1444 support Protocol.
1445
1446 @retval EFI_SUCCESS The array of handles was returned in Buffer, and the number of
1447 handles in Buffer was returned in NoHandles.
1448 @retval EFI_NOT_FOUND No handles match the search.
1449 @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the matching results.
1450 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
1451
1452 **/
1453 typedef
1454 EFI_STATUS
1455 (EFIAPI *EFI_LOCATE_HANDLE_BUFFER) (
1456 IN EFI_LOCATE_SEARCH_TYPE SearchType,
1457 IN EFI_GUID *Protocol, OPTIONAL
1458 IN VOID *SearchKey, OPTIONAL
1459 IN OUT UINTN *NoHandles,
1460 OUT EFI_HANDLE **Buffer
1461 );
1462
1463 /**
1464 Returns the first protocol instance that matches the given protocol.
1465
1466 @param Protocol Provides the protocol to search for.
1467 @param Registration Optional registration key returned from
1468 RegisterProtocolNotify().
1469 @param Interface On return, a pointer to the first interface that matches Protocol and
1470 Registration.
1471
1472 @retval EFI_SUCCESS A protocol instance matching Protocol was found and returned in
1473 Interface.
1474 @retval EFI_NOT_FOUND No protocol instances were found that match Protocol and
1475 Registration.
1476 @retval EFI_INVALID_PARAMETER Interface is NULL.
1477
1478 **/
1479 typedef
1480 EFI_STATUS
1481 (EFIAPI *EFI_LOCATE_PROTOCOL) (
1482 IN EFI_GUID *Protocol,
1483 IN VOID *Registration, OPTIONAL
1484 OUT VOID **Interface
1485 );
1486
1487 typedef struct {
1488 UINT64 Length;
1489 union {
1490 EFI_PHYSICAL_ADDRESS DataBlock;
1491 EFI_PHYSICAL_ADDRESS ContinuationPointer;
1492 } Union;
1493 } UEFI_CAPSULE_BLOCK_DESCRIPTOR;
1494
1495 typedef struct {
1496 EFI_GUID CapsuleGuid;
1497 UINT32 HeaderSize;
1498 UINT32 Flags;
1499 UINT32 CapsuleImageSize;
1500 } UEFI_CAPSULE_HEADER;
1501
1502 #define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000
1503 #define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000
1504
1505 /**
1506 Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended
1507 consumption, the firmware may process the capsule immediately. If the payload should persist
1508 across a system reset, the reset value returned from EFI_QueryCapsuleCapabilities must
1509 be passed into ResetSystem() and will cause the capsule to be processed by the firmware as
1510 part of the reset process.
1511
1512 @param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules
1513 being passed into update capsule.
1514 @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in
1515 CaspuleHeaderArray.
1516 @param ScatterGatherList Physical pointer to a set of
1517 EFI_CAPSULE_BLOCK_DESCRIPTOR that describes the
1518 location in physical memory of a set of capsules.
1519
1520 @retval EFI_SUCCESS Valid capsule was passed. If
1521 CAPSULE_FLAGS_PERSIT_ACROSS_RESET is not set, the
1522 capsule has been successfully processed by the firmware.
1523 @retval EFI_DEVICE_ERROR The capsule update was started, but failed due to a device error.
1524 @retval EFI_INVALID_PARAMETER CapsuleSize is NULL.
1525
1526 **/
1527 typedef
1528 EFI_STATUS
1529 (EFIAPI *EFI_UPDATE_CAPSULE) (
1530 IN UEFI_CAPSULE_HEADER **CapsuleHeaderArray,
1531 IN UINTN CapsuleCount,
1532 IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL
1533 );
1534
1535 /**
1536 Returns if the capsule can be supported via UpdateCapsule().
1537
1538 @param CapsuleHeaderArray Virtual pointer to an array of virtual pointers to the capsules
1539 being passed into update capsule.
1540 @param CapsuleCount Number of pointers to EFI_CAPSULE_HEADER in
1541 CaspuleHeaderArray.
1542 @param MaxiumCapsuleSize On output the maximum size that UpdateCapsule() can
1543 support as an argument to UpdateCapsule() via
1544 CapsuleHeaderArray and ScatterGatherList.
1545 @param ResetType Returns the type of reset required for the capsule update.
1546
1547 @retval EFI_SUCCESS Valid answer returned.
1548 @retval EFI_UNSUPPORTED The capsule type is not supported on this platform, and
1549 MaximumCapsuleSize and ResetType are undefined.
1550 @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL.
1551
1552 **/
1553 typedef
1554 EFI_STATUS
1555 (EFIAPI *EFI_QUERY_CAPSULE_CAPABILITIES) (
1556 IN UEFI_CAPSULE_HEADER **CapsuleHeaderArray,
1557 IN UINTN CapsuleCount,
1558 OUT UINT64 *MaximumCapsuleSize,
1559 OUT EFI_RESET_TYPE *ResetType
1560 );
1561
1562 /**
1563 Returns information about the EFI variables.
1564
1565 @param Attributes Attributes bitmask to specify the type of variables on
1566 which to return information.
1567 @param MaximumVariableStorageSize On output the maximum size of the storage space
1568 available for the EFI variables associated with the
1569 attributes specified.
1570 @param RemainingVariableStorageSize Returns the remaining size of the storage space
1571 available for the EFI variables associated with the
1572 attributes specified.
1573 @param MaximumVariableSize Returns the maximum size of the individual EFI
1574 variables associated with the attributes specified.
1575
1576 @retval EFI_SUCCESS Valid answer returned.
1577 @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied
1578 @retval EFI_UNSUPPORTED The attribute is not supported on this platform, and the
1579 MaximumVariableStorageSize,
1580 RemainingVariableStorageSize, MaximumVariableSize
1581 are undefined.
1582
1583 **/
1584 typedef
1585 EFI_STATUS
1586 (EFIAPI *EFI_QUERY_VARIABLE_INFO) (
1587 IN UINT32 Attributes,
1588 OUT UINT64 *MaximumVariableStorageSize,
1589 OUT UINT64 *RemainingVariableStorageSize,
1590 OUT UINT64 *MaximumVariableSize
1591 );
1592
1593
1594 //
1595 // EFI Runtime Services Table
1596 //
1597 #define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | 02)
1598 #define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | 10)
1599 #define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | 0)
1600
1601 #define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552ULL
1602 #define EFI_RUNTIME_SERVICES_REVISION (EFI_2_00_SYSTEM_TABLE_REVISION)
1603
1604 #if (EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000)
1605 //
1606 // Include the definition for TIANO_REPORT_STATUS_CODE if this is the version
1607 // of Tiano that extended the EFI specification. If Tiano mode is diabled
1608 // don't include it.
1609 //
1610 #include <Dxe/ArchProtocol/StatusCode.h>
1611 #endif
1612
1613
1614 typedef struct {
1615 EFI_TABLE_HEADER Hdr;
1616
1617 //
1618 // Time services
1619 //
1620 EFI_GET_TIME GetTime;
1621 EFI_SET_TIME SetTime;
1622 EFI_GET_WAKEUP_TIME GetWakeupTime;
1623 EFI_SET_WAKEUP_TIME SetWakeupTime;
1624
1625 //
1626 // Virtual memory services
1627 //
1628 EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
1629 EFI_CONVERT_POINTER ConvertPointer;
1630
1631 //
1632 // Variable services
1633 //
1634 EFI_GET_VARIABLE GetVariable;
1635 EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
1636 EFI_SET_VARIABLE SetVariable;
1637
1638 //
1639 // Misc
1640 //
1641 EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
1642 EFI_RESET_SYSTEM ResetSystem;
1643
1644 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
1645 //
1646 // New Boot Services added by UEFI 2.0
1647 //
1648 EFI_UPDATE_CAPSULE UpdateCapsule;
1649 EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities;
1650 EFI_QUERY_VARIABLE_INFO QueryVariableInfo;
1651 #elif (EDK_RELEASE_VERSION != 0)
1652 //
1653 // Tiano extension to EFI 1.10 runtime table
1654 // It was moved to a protocol to not conflict with UEFI 2.0
1655 // If Tiano is disabled this item is not enabled for EFI 1.10
1656 //
1657 EFI_REPORT_STATUS_CODE ReportStatusCode;
1658 #endif
1659 } EFI_RUNTIME_SERVICES;
1660
1661 //
1662 // EFI Boot Services Table
1663 //
1664 #define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42ULL
1665 #define EFI_BOOT_SERVICES_REVISION (EFI_2_00_SYSTEM_TABLE_REVISION)
1666
1667 typedef struct {
1668 EFI_TABLE_HEADER Hdr;
1669
1670 //
1671 // Task priority functions
1672 //
1673 EFI_RAISE_TPL RaiseTPL;
1674 EFI_RESTORE_TPL RestoreTPL;
1675
1676 //
1677 // Memory functions
1678 //
1679 EFI_ALLOCATE_PAGES AllocatePages;
1680 EFI_FREE_PAGES FreePages;
1681 EFI_GET_MEMORY_MAP GetMemoryMap;
1682 EFI_ALLOCATE_POOL AllocatePool;
1683 EFI_FREE_POOL FreePool;
1684
1685 //
1686 // Event & timer functions
1687 //
1688 EFI_CREATE_EVENT CreateEvent;
1689 EFI_SET_TIMER SetTimer;
1690 EFI_WAIT_FOR_EVENT WaitForEvent;
1691 EFI_SIGNAL_EVENT SignalEvent;
1692 EFI_CLOSE_EVENT CloseEvent;
1693 EFI_CHECK_EVENT CheckEvent;
1694
1695 //
1696 // Protocol handler functions
1697 //
1698 EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface;
1699 EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
1700 EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface;
1701 EFI_HANDLE_PROTOCOL HandleProtocol;
1702 VOID *Reserved;
1703 EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify;
1704 EFI_LOCATE_HANDLE LocateHandle;
1705 EFI_LOCATE_DEVICE_PATH LocateDevicePath;
1706 EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable;
1707
1708 //
1709 // Image functions
1710 //
1711 EFI_IMAGE_LOAD LoadImage;
1712 EFI_IMAGE_START StartImage;
1713 EFI_EXIT Exit;
1714 EFI_IMAGE_UNLOAD UnloadImage;
1715 EFI_EXIT_BOOT_SERVICES ExitBootServices;
1716
1717 //
1718 // Misc functions
1719 //
1720 EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
1721 EFI_STALL Stall;
1722 EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;
1723
1724 //
1725 // ////////////////////////////////////////////////////
1726 // EFI 1.1 Services
1727 //////////////////////////////////////////////////////
1728 //
1729 // DriverSupport Services
1730 //
1731 EFI_CONNECT_CONTROLLER ConnectController;
1732 EFI_DISCONNECT_CONTROLLER DisconnectController;
1733
1734 //
1735 // Added Open and Close protocol for the new driver model
1736 //
1737 EFI_OPEN_PROTOCOL OpenProtocol;
1738 EFI_CLOSE_PROTOCOL CloseProtocol;
1739 EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation;
1740
1741 //
1742 // Added new services to EFI 1.1 as Lib to reduce code size.
1743 //
1744 EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle;
1745 EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer;
1746 EFI_LOCATE_PROTOCOL LocateProtocol;
1747
1748 EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces;
1749 EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces;
1750
1751 //
1752 // CRC32 services
1753 //
1754 EFI_CALCULATE_CRC32 CalculateCrc32;
1755
1756 //
1757 // Memory Utility Services
1758 //
1759 EFI_COPY_MEM CopyMem;
1760 EFI_SET_MEM SetMem;
1761
1762 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
1763 //
1764 // UEFI 2.0 Extension to the table
1765 //
1766 EFI_CREATE_EVENT_EX CreateEventEx;
1767 #endif
1768 } EFI_BOOT_SERVICES;
1769
1770 //
1771 // EFI Configuration Table
1772 //
1773 typedef struct {
1774 EFI_GUID VendorGuid;
1775 VOID *VendorTable;
1776 } EFI_CONFIGURATION_TABLE;
1777
1778 //
1779 // EFI System Table
1780 //
1781 #define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249ULL
1782 #define EFI_SYSTEM_TABLE_REVISION (EFI_2_00_SYSTEM_TABLE_REVISION)
1783
1784 struct _EFI_SYSTEM_TABLE {
1785 EFI_TABLE_HEADER Hdr;
1786
1787 CHAR16 *FirmwareVendor;
1788 UINT32 FirmwareRevision;
1789
1790 EFI_HANDLE ConsoleInHandle;
1791 EFI_SIMPLE_TEXT_IN_PROTOCOL *ConIn;
1792
1793 EFI_HANDLE ConsoleOutHandle;
1794 EFI_SIMPLE_TEXT_OUT_PROTOCOL *ConOut;
1795
1796 EFI_HANDLE StandardErrorHandle;
1797 EFI_SIMPLE_TEXT_OUT_PROTOCOL *StdErr;
1798
1799 EFI_RUNTIME_SERVICES *RuntimeServices;
1800 EFI_BOOT_SERVICES *BootServices;
1801
1802 UINTN NumberOfTableEntries;
1803 EFI_CONFIGURATION_TABLE *ConfigurationTable;
1804
1805 };
1806
1807 //
1808 // Device Path information
1809 //
1810
1811 #pragma pack(1)
1812
1813 //
1814 // Hardware Device Paths
1815 //
1816 #define HARDWARE_DEVICE_PATH 0x01
1817
1818 #define HW_PCI_DP 0x01
1819 typedef struct {
1820 EFI_DEVICE_PATH_PROTOCOL Header;
1821 UINT8 Function;
1822 UINT8 Device;
1823 } PCI_DEVICE_PATH;
1824
1825 #define HW_PCCARD_DP 0x02
1826 typedef struct {
1827 EFI_DEVICE_PATH_PROTOCOL Header;
1828 UINT8 FunctionNumber;
1829 } PCCARD_DEVICE_PATH;
1830
1831 #define HW_MEMMAP_DP 0x03
1832 typedef struct {
1833 EFI_DEVICE_PATH_PROTOCOL Header;
1834 UINT32 MemoryType;
1835 EFI_PHYSICAL_ADDRESS StartingAddress;
1836 EFI_PHYSICAL_ADDRESS EndingAddress;
1837 } MEMMAP_DEVICE_PATH;
1838
1839 #define HW_VENDOR_DP 0x04
1840 typedef struct {
1841 EFI_DEVICE_PATH_PROTOCOL Header;
1842 EFI_GUID Guid;
1843 } VENDOR_DEVICE_PATH;
1844
1845 #define HW_CONTROLLER_DP 0x05
1846 typedef struct {
1847 EFI_DEVICE_PATH_PROTOCOL Header;
1848 UINT32 ControllerNumber;
1849 } CONTROLLER_DEVICE_PATH;
1850
1851 //
1852 // ACPI Device Paths
1853 //
1854 #define ACPI_DEVICE_PATH 0x02
1855
1856 #define ACPI_DP 0x01
1857 typedef struct {
1858 EFI_DEVICE_PATH_PROTOCOL Header;
1859 UINT32 HID;
1860 UINT32 UID;
1861 } ACPI_HID_DEVICE_PATH;
1862
1863 #define ACPI_EXTENDED_DP 0x02
1864 typedef struct {
1865 EFI_DEVICE_PATH_PROTOCOL Header;
1866 UINT32 HID;
1867 UINT32 UID;
1868 UINT32 CID;
1869 //
1870 // Optional variable length _HIDSTR
1871 // Optional variable length _UIDSTR
1872 //
1873 } ACPI_EXTENDED_HID_DEVICE_PATH;
1874
1875 //
1876 // EISA ID Macro
1877 // EISA ID Definition 32-bits
1878 // bits[15:0] - three character compressed ASCII EISA ID.
1879 // bits[31:16] - binary number
1880 // Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
1881 //
1882 #define PNP_EISA_ID_CONST 0x41d0
1883 #define EISA_ID(_Name, _Num) ((UINT32) ((_Name) | (_Num) << 16))
1884 #define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
1885 #define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
1886
1887 #define PNP_EISA_ID_MASK 0xffff
1888 #define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
1889
1890
1891 #define ACPI_ADR_DP 0x03
1892 typedef struct {
1893 EFI_DEVICE_PATH_PROTOCOL Header;
1894 UINT32 ADR;
1895 } ACPI_ADR_DEVICE_PATH;
1896
1897
1898 //
1899 // Messaging Device Paths
1900 //
1901 #define MESSAGING_DEVICE_PATH 0x03
1902
1903 #define MSG_ATAPI_DP 0x01
1904 typedef struct {
1905 EFI_DEVICE_PATH_PROTOCOL Header;
1906 UINT8 PrimarySecondary;
1907 UINT8 SlaveMaster;
1908 UINT16 Lun;
1909 } ATAPI_DEVICE_PATH;
1910
1911 #define MSG_SCSI_DP 0x02
1912 typedef struct {
1913 EFI_DEVICE_PATH_PROTOCOL Header;
1914 UINT16 Pun;
1915 UINT16 Lun;
1916 } SCSI_DEVICE_PATH;
1917
1918 #define MSG_FIBRECHANNEL_DP 0x03
1919 typedef struct {
1920 EFI_DEVICE_PATH_PROTOCOL Header;
1921 UINT32 Reserved;
1922 UINT64 WWN;
1923 UINT64 Lun;
1924 } FIBRECHANNEL_DEVICE_PATH;
1925
1926 #define MSG_1394_DP 0x04
1927 typedef struct {
1928 EFI_DEVICE_PATH_PROTOCOL Header;
1929 UINT32 Reserved;
1930 UINT64 Guid;
1931 } F1394_DEVICE_PATH;
1932
1933 #define MSG_USB_DP 0x05
1934 typedef struct {
1935 EFI_DEVICE_PATH_PROTOCOL Header;
1936 UINT8 ParentPortNumber;
1937 UINT8 InterfaceNumber;
1938 } USB_DEVICE_PATH;
1939
1940 #define MSG_USB_CLASS_DP 0x0f
1941 typedef struct {
1942 EFI_DEVICE_PATH_PROTOCOL Header;
1943 UINT16 VendorId;
1944 UINT16 ProductId;
1945 UINT8 DeviceClass;
1946 UINT8 DeviceSubClass;
1947 UINT8 DeviceProtocol;
1948 } USB_CLASS_DEVICE_PATH;
1949
1950 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
1951 #define MSG_USB_WWID_DP 0x10
1952 typedef struct {
1953 EFI_DEVICE_PATH_PROTOCOL Header;
1954 UINT16 InterfaceNumber;
1955 UINT16 VendorId;
1956 UINT16 ProductId;
1957 // CHAR16 SerialNumber[];
1958 } USB_WWID_DEVICE_PATH;
1959
1960 #define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
1961 typedef struct {
1962 EFI_DEVICE_PATH_PROTOCOL Header;
1963 UINT8 Lun;
1964 } DEVICE_LOGICAL_UNIT_DEVICE_PATH;
1965 #endif
1966
1967 #define MSG_I2O_DP 0x06
1968 typedef struct {
1969 EFI_DEVICE_PATH_PROTOCOL Header;
1970 UINT32 Tid;
1971 } I2O_DEVICE_PATH;
1972
1973 #define MSG_MAC_ADDR_DP 0x0b
1974 typedef struct {
1975 EFI_DEVICE_PATH_PROTOCOL Header;
1976 EFI_MAC_ADDRESS MacAddress;
1977 UINT8 IfType;
1978 } MAC_ADDR_DEVICE_PATH;
1979
1980 #define MSG_IPv4_DP 0x0c
1981 typedef struct {
1982 EFI_DEVICE_PATH_PROTOCOL Header;
1983 EFI_IPv4_ADDRESS LocalIpAddress;
1984 EFI_IPv4_ADDRESS RemoteIpAddress;
1985 UINT16 LocalPort;
1986 UINT16 RemotePort;
1987 UINT16 Protocol;
1988 BOOLEAN StaticIpAddress;
1989 } IPv4_DEVICE_PATH;
1990
1991 #define MSG_IPv6_DP 0x0d
1992 typedef struct {
1993 EFI_DEVICE_PATH_PROTOCOL Header;
1994 EFI_IPv6_ADDRESS LocalIpAddress;
1995 EFI_IPv6_ADDRESS RemoteIpAddress;
1996 UINT16 LocalPort;
1997 UINT16 RemotePort;
1998 UINT16 Protocol;
1999 BOOLEAN StaticIpAddress;
2000 } IPv6_DEVICE_PATH;
2001
2002 #define MSG_INFINIBAND_DP 0x09
2003 typedef struct {
2004 EFI_DEVICE_PATH_PROTOCOL Header;
2005 UINT32 ResourceFlags;
2006 UINT8 PortGid[16];
2007 UINT64 ServiceId;
2008 UINT64 TargetPortId;
2009 UINT64 DeviceId;
2010 } INFINIBAND_DEVICE_PATH;
2011
2012 #define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01
2013 #define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT 0x02
2014 #define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL 0x04
2015 #define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08
2016 #define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10
2017
2018 #define MSG_UART_DP 0x0e
2019 typedef struct {
2020 EFI_DEVICE_PATH_PROTOCOL Header;
2021 UINT32 Reserved;
2022 UINT64 BaudRate;
2023 UINT8 DataBits;
2024 UINT8 Parity;
2025 UINT8 StopBits;
2026 } UART_DEVICE_PATH;
2027
2028 //
2029 // Use VENDOR_DEVICE_PATH struct
2030 //
2031 #define MSG_VENDOR_DP 0x0a
2032
2033 #define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID
2034 #define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID
2035 #define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID
2036 #define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID
2037
2038 #define DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL EFI_UART_DEVICE_PATH_GUID
2039
2040 typedef struct {
2041 EFI_DEVICE_PATH_PROTOCOL Header;
2042 EFI_GUID Guid;
2043 UINT32 FlowControlMap;
2044 } UART_FLOW_CONTROL_DEVICE_PATH;
2045
2046 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
2047
2048 #define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID
2049
2050 typedef struct {
2051 EFI_DEVICE_PATH_PROTOCOL Header;
2052 EFI_GUID Guid;
2053 UINT32 Reserved;
2054 UINT64 SasAddress;
2055 UINT64 Lun;
2056 UINT16 DeviceTopology;
2057 UINT16 RelativeTargetPort;
2058 } SAS_DEVICE_PATH;
2059
2060 #define MSG_ISCSI_DP 0x13
2061 typedef struct {
2062 EFI_DEVICE_PATH_PROTOCOL Header;
2063 UINT16 NetworkProtocol;
2064 UINT16 LoginOption;
2065 UINT16 Reserved;
2066 UINT16 TargetPortalGroupTag;
2067 UINT64 LUN;
2068 // CHAR8 iSCSI Target Name
2069 } ISCSI_DEVICE_PATH;
2070
2071 #define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000
2072 #define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002
2073 #define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000
2074 #define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008
2075 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000
2076 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000
2077 #define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
2078 #define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
2079
2080 #endif
2081
2082 //
2083 // Media Device Path
2084 //
2085 #define MEDIA_DEVICE_PATH 0x04
2086
2087 #define MEDIA_HARDDRIVE_DP 0x01
2088 typedef struct {
2089 EFI_DEVICE_PATH_PROTOCOL Header;
2090 UINT32 PartitionNumber;
2091 UINT64 PartitionStart;
2092 UINT64 PartitionSize;
2093 UINT8 Signature[16];
2094 UINT8 MBRType;
2095 UINT8 SignatureType;
2096 } HARDDRIVE_DEVICE_PATH;
2097
2098 #define MBR_TYPE_PCAT 0x01
2099 #define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
2100
2101 #define SIGNATURE_TYPE_MBR 0x01
2102 #define SIGNATURE_TYPE_GUID 0x02
2103
2104 #define MEDIA_CDROM_DP 0x02
2105 typedef struct {
2106 EFI_DEVICE_PATH_PROTOCOL Header;
2107 UINT32 BootEntry;
2108 UINT64 PartitionStart;
2109 UINT64 PartitionSize;
2110 } CDROM_DEVICE_PATH;
2111
2112 //
2113 // Use VENDOR_DEVICE_PATH struct
2114 //
2115 #define MEDIA_VENDOR_DP 0x03
2116
2117 #define MEDIA_FILEPATH_DP 0x04
2118 typedef struct {
2119 EFI_DEVICE_PATH_PROTOCOL Header;
2120 CHAR16 PathName[1];
2121 } FILEPATH_DEVICE_PATH;
2122
2123 #define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
2124
2125 #define MEDIA_PROTOCOL_DP 0x05
2126 typedef struct {
2127 EFI_DEVICE_PATH_PROTOCOL Header;
2128 EFI_GUID Protocol;
2129 } MEDIA_PROTOCOL_DEVICE_PATH;
2130
2131
2132 typedef struct {
2133 EFI_DEVICE_PATH_PROTOCOL Header;
2134 EFI_GUID TianoSpecificDevicePath;
2135 UINT32 Type;
2136 } TIANO_DEVICE_PATH;
2137
2138 #define TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE 0x01
2139 typedef struct {
2140 TIANO_DEVICE_PATH Tiano;
2141 EFI_GUID NameGuid;
2142 } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
2143
2144 //
2145 // Place holder for a future extension
2146 //
2147 #define TIANO_MEDIAFW_VOL_DEVICE_PATH_TYPE 0x02
2148 typedef struct {
2149 TIANO_DEVICE_PATH Tiano;
2150 EFI_GUID VolumeGuid;
2151 } MEDIA_FW_VOL_DEVICE_PATH;
2152
2153
2154 //
2155 // BBS Device Path
2156 //
2157 #define BBS_DEVICE_PATH 0x05
2158 #define BBS_BBS_DP 0x01
2159 typedef struct {
2160 EFI_DEVICE_PATH_PROTOCOL Header;
2161 UINT16 DeviceType;
2162 UINT16 StatusFlag;
2163 CHAR8 String[1];
2164 } BBS_BBS_DEVICE_PATH;
2165
2166 //
2167 // DeviceType definitions - from BBS specification
2168 //
2169 #define BBS_TYPE_FLOPPY 0x01
2170 #define BBS_TYPE_HARDDRIVE 0x02
2171 #define BBS_TYPE_CDROM 0x03
2172 #define BBS_TYPE_PCMCIA 0x04
2173 #define BBS_TYPE_USB 0x05
2174 #define BBS_TYPE_EMBEDDED_NETWORK 0x06
2175 #define BBS_TYPE_BEV 0x80
2176 #define BBS_TYPE_UNKNOWN 0xFF
2177
2178
2179 //
2180 // Union of all possible Device Paths and pointers to Device Paths
2181 //
2182
2183 typedef union {
2184 EFI_DEVICE_PATH_PROTOCOL DevPath;
2185 PCI_DEVICE_PATH Pci;
2186 PCCARD_DEVICE_PATH PcCard;
2187 MEMMAP_DEVICE_PATH MemMap;
2188 VENDOR_DEVICE_PATH Vendor;
2189
2190 CONTROLLER_DEVICE_PATH Controller;
2191 ACPI_HID_DEVICE_PATH Acpi;
2192
2193 ATAPI_DEVICE_PATH Atapi;
2194 SCSI_DEVICE_PATH Scsi;
2195 FIBRECHANNEL_DEVICE_PATH FibreChannel;
2196
2197 F1394_DEVICE_PATH F1394;
2198 USB_DEVICE_PATH Usb;
2199 USB_CLASS_DEVICE_PATH UsbClass;
2200 I2O_DEVICE_PATH I2O;
2201 MAC_ADDR_DEVICE_PATH MacAddr;
2202 IPv4_DEVICE_PATH Ipv4;
2203 IPv6_DEVICE_PATH Ipv6;
2204 INFINIBAND_DEVICE_PATH InfiniBand;
2205 UART_DEVICE_PATH Uart;
2206
2207 HARDDRIVE_DEVICE_PATH HardDrive;
2208 CDROM_DEVICE_PATH CD;
2209
2210 FILEPATH_DEVICE_PATH FilePath;
2211 MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol;
2212
2213 BBS_BBS_DEVICE_PATH Bbs;
2214 } EFI_DEV_PATH;
2215
2216
2217
2218 typedef union {
2219 EFI_DEVICE_PATH_PROTOCOL *DevPath;
2220 PCI_DEVICE_PATH *Pci;
2221 PCCARD_DEVICE_PATH *PcCard;
2222 MEMMAP_DEVICE_PATH *MemMap;
2223 VENDOR_DEVICE_PATH *Vendor;
2224
2225 CONTROLLER_DEVICE_PATH *Controller;
2226 ACPI_HID_DEVICE_PATH *Acpi;
2227 ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi;
2228
2229 ATAPI_DEVICE_PATH *Atapi;
2230 SCSI_DEVICE_PATH *Scsi;
2231 FIBRECHANNEL_DEVICE_PATH *FibreChannel;
2232
2233 F1394_DEVICE_PATH *F1394;
2234 USB_DEVICE_PATH *Usb;
2235 USB_CLASS_DEVICE_PATH *UsbClass;
2236 I2O_DEVICE_PATH *I2O;
2237 MAC_ADDR_DEVICE_PATH *MacAddr;
2238 IPv4_DEVICE_PATH *Ipv4;
2239 IPv6_DEVICE_PATH *Ipv6;
2240 INFINIBAND_DEVICE_PATH *InfiniBand;
2241 UART_DEVICE_PATH *Uart;
2242
2243 HARDDRIVE_DEVICE_PATH *HardDrive;
2244 CDROM_DEVICE_PATH *CD;
2245
2246 FILEPATH_DEVICE_PATH *FilePath;
2247 MEDIA_PROTOCOL_DEVICE_PATH *MediaProtocol;
2248
2249 BBS_BBS_DEVICE_PATH *Bbs;
2250 UINT8 *Raw;
2251 } EFI_DEV_PATH_PTR;
2252
2253 #pragma pack()
2254
2255
2256 //
2257 // PXE Informations
2258 //
2259
2260 //
2261 // Packet definitions
2262 //
2263 typedef struct {
2264 UINT8 BootpOpcode;
2265 UINT8 BootpHwType;
2266 UINT8 BootpHwAddrLen;
2267 UINT8 BootpGateHops;
2268 UINT32 BootpIdent;
2269 UINT16 BootpSeconds;
2270 UINT16 BootpFlags;
2271 UINT8 BootpCiAddr[4];
2272 UINT8 BootpYiAddr[4];
2273 UINT8 BootpSiAddr[4];
2274 UINT8 BootpGiAddr[4];
2275 UINT8 BootpHwAddr[16];
2276 UINT8 BootpSrvName[64];
2277 UINT8 BootpBootFile[128];
2278 UINT32 DhcpMagik;
2279 UINT8 DhcpOptions[56];
2280 } EFI_PXE_BASE_CODE_DHCPV4_PACKET;
2281
2282 typedef union {
2283 UINT8 Raw[1472];
2284 EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4;
2285
2286 //
2287 // EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6;
2288 //
2289 } EFI_PXE_BASE_CODE_PACKET;
2290
2291 #include <Uefi/EfiPxe.h>
2292
2293 //
2294 // EFI Revision information
2295 //
2296 #define EFI_FIRMWARE_REVISION (EFI_2_00_SYSTEM_TABLE_REVISION)
2297
2298 #include <Common/EfiImage.h>
2299 #include <IndustryStandard/Usb.h>
2300
2301
2302 #define EFI_USB_HC_RESET_GLOBAL 0x0001
2303 #define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002
2304 #define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004
2305 #define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008
2306
2307 //
2308 // USB Host Controller state
2309 //
2310 typedef enum {
2311 EfiUsbHcStateHalt,
2312 EfiUsbHcStateOperational,
2313 EfiUsbHcStateSuspend,
2314 EfiUsbHcStateMaximum
2315 } EFI_USB_HC_STATE;
2316
2317
2318 //
2319 // EFI File location to boot from on removable media devices
2320 //
2321 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 L"\\EFI\\BOOT\\BOOTIA32.EFI"
2322 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 L"\\EFI\\BOOT\\BOOTIA64.EFI"
2323 #define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 L"\\EFI\\BOOT\\BOOTX64.EFI"
2324 #define EFI_REMOVABLE_MEDIA_FILE_NAME_EBC L"\\EFI\\BOOT\\BOOTEBC.EFI"
2325
2326 #if defined (MDE_CPU_IA32)
2327 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA32
2328 #elif defined (MDE_CPU_IPF)
2329 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA64
2330 #elif defined (MDE_CPU_X64)
2331 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_X64
2332 #elif defined (MDE_CPU_EBC)
2333 #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_EBC
2334 #else
2335 #error Unknown Processor Type
2336 #endif
2337
2338
2339 //
2340 // Protocols from EFI 1.10 that got their names fixed in UEFI 2.0
2341 //
2342 #include <Protocol/LoadedImage.h>
2343 #include <Protocol/SimpleTextIn.h>
2344 #include <Protocol/SimpleTextOut.h>
2345 #include <Protocol/SerialIo.h>
2346 #include <Protocol/LoadFile.h>
2347 #include <Protocol/SimpleFileSystem.h>
2348 #include <Protocol/DiskIo.h>
2349 #include <Protocol/BlockIo.h>
2350 #include <Protocol/UnicodeCollation.h>
2351 #include <Protocol/SimpleNetwork.h>
2352 #include <Protocol/EfiNetworkInterfaceIdentifier.h>
2353 #include <Protocol/PxeBaseCode.h>
2354 #include <Protocol/PxeBaseCodeCallBack.h>
2355
2356 //
2357 // EFI 1.10 Protocols
2358 //
2359 #include <Protocol/Bis.h>
2360 #include <Protocol/BusSpecificDriverOverride.h>
2361 #include <Protocol/ComponentName.h>
2362 #include <Protocol/DebugPort.h>
2363 #include <Protocol/DebugSupport.h>
2364 #include <Protocol/Decompress.h>
2365 #include <Protocol/DriverBinding.h>
2366 #include <Protocol/DriverConfiguration.h>
2367 #include <Protocol/DriverDiagnostics.h>
2368 #include <Protocol/Ebc.h>
2369 #include <Protocol/EfiNetworkInterfaceIdentifier.h>
2370 #include <Protocol/PciIo.h>
2371 #include <Protocol/PciRootBridgeIo.h>
2372 #include <Protocol/PlatformDriverOverride.h>
2373 #include <Protocol/SimplePointer.h>
2374 #include <Protocol/ScsiPassThru.h>
2375 #include <Protocol/UsbIo.h>
2376 #include <Protocol/UsbHostController.h>
2377 #include <Protocol/UgaDraw.h>
2378
2379 //
2380 // EFI 1.10 GUIDs
2381 //
2382 #include <Guid/Acpi.h>
2383 #include <Guid/DebugImageInfoTable.h>
2384 #include <Guid/GlobalVariable.h>
2385 #include <Guid/Gpt.h>
2386 #include <Guid/PcAnsi.h>
2387 #include <Guid/SmBios.h>
2388 #include <Guid/SalSystemTable.h>
2389 #include <Guid/FileInfo.h>
2390 #include <Guid/FileSystemInfo.h>
2391 #include <Guid/FileSystemVolumeLabelInfo.h>
2392
2393 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
2394 //
2395 // Turn on UEFI 2.0 Protocols and GUIDs
2396 //
2397 #include <Protocol/AuthenticationInfo.h>
2398 #include <Protocol/DevicePathUtilities.h>
2399 #include <Protocol/DevicePathToText.h>
2400 #include <Protocol/DevicePathFromText.h>
2401 #include <Protocol/GraphicsOutput.h>
2402 #include <Protocol/EdidDiscovered.h>
2403 #include <Protocol/EdidActive.h>
2404 #include <Protocol/EdidOverride.h>
2405 #include <Protocol/ScsiIoExt.h>
2406 #include <Protocol/ScsiPassThruExt.h>
2407 #include <Protocol/IScsiInitatorName.h>
2408 #include <Protocol/Usb2HostController.h>
2409 #include <Protocol/TapeIo.h>
2410 #include <Protocol/ManagedNetwork.h>
2411 #include <Protocol/Arp.h>
2412 #include <Protocol/Dhcp4.h>
2413 #include <Protocol/IP4.h>
2414 #include <Protocol/IP4Config.h>
2415 #include <Protocol/Tcp4.h>
2416 #include <Protocol/Udp4.h>
2417 #include <Protocol/Mtftp4.h>
2418 #include <Protocol/ServiceBinding.h>
2419 #include <Protocol/Hash.h>
2420 #include <Protocol/AcpiTable.h>
2421 #include <Protocol/ComponentName2.h>
2422
2423 #include <Guid/EventGroup.h>
2424 #include <Guid/HardwareErrorVariable.h>
2425 #endif
2426
2427
2428 #endif