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