xref: /DragonStub/inc/efiprot.h (revision cae022d6e4b66daa9a7037bdab953b202f7b13bc)
1 #ifndef _EFI_PROT_H
2 #define _EFI_PROT_H
3 
4 /*++
5 
6 Copyright (c) 1998  Intel Corporation
7 
8 Module Name:
9 
10     efiprot.h
11 
12 Abstract:
13 
14     EFI Protocols
15 
16 
17 
18 Revision History
19 
20 --*/
21 
22 //
23 //  FPSWA library protocol
24 //
25 #define FPSWA_PROTOCOL          \
26     { 0xc41b6531, 0x97b9, 0x11d3, {0x9a, 0x29, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
27 
28 //
29 // Device Path protocol
30 //
31 
32 #define DEVICE_PATH_PROTOCOL    \
33     { 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
34 
35 
36 //
37 // Block IO protocol
38 //
39 
40 #define BLOCK_IO_PROTOCOL \
41     { 0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
42 #define EFI_BLOCK_IO_INTERFACE_REVISION   0x00010000
43 #define EFI_BLOCK_IO_INTERFACE_REVISION2  0x00020001
44 #define EFI_BLOCK_IO_INTERFACE_REVISION3  ((2<<16) | 31)
45 
46 INTERFACE_DECL(_EFI_BLOCK_IO);
47 
48 typedef
49 EFI_STATUS
50 (EFIAPI *EFI_BLOCK_RESET) (
51     IN struct _EFI_BLOCK_IO     *This,
52     IN BOOLEAN                  ExtendedVerification
53     );
54 
55 typedef
56 EFI_STATUS
57 (EFIAPI *EFI_BLOCK_READ) (
58     IN struct _EFI_BLOCK_IO     *This,
59     IN UINT32                   MediaId,
60     IN EFI_LBA                  LBA,
61     IN UINTN                    BufferSize,
62     OUT VOID                    *Buffer
63     );
64 
65 
66 typedef
67 EFI_STATUS
68 (EFIAPI *EFI_BLOCK_WRITE) (
69     IN struct _EFI_BLOCK_IO     *This,
70     IN UINT32                   MediaId,
71     IN EFI_LBA                  LBA,
72     IN UINTN                    BufferSize,
73     IN VOID                     *Buffer
74     );
75 
76 
77 typedef
78 EFI_STATUS
79 (EFIAPI *EFI_BLOCK_FLUSH) (
80     IN struct _EFI_BLOCK_IO     *This
81     );
82 
83 
84 
85 typedef struct {
86     UINT32              MediaId;
87     BOOLEAN             RemovableMedia;
88     BOOLEAN             MediaPresent;
89 
90     BOOLEAN             LogicalPartition;
91     BOOLEAN             ReadOnly;
92     BOOLEAN             WriteCaching;
93 
94     UINT32              BlockSize;
95     UINT32              IoAlign;
96 
97     EFI_LBA             LastBlock;
98 
99     /* revision 2 */
100     EFI_LBA             LowestAlignedLba;
101     UINT32              LogicalBlocksPerPhysicalBlock;
102     /* revision 3 */
103     UINT32              OptimalTransferLengthGranularity;
104 } EFI_BLOCK_IO_MEDIA;
105 
106 typedef struct _EFI_BLOCK_IO {
107     UINT64                  Revision;
108 
109     EFI_BLOCK_IO_MEDIA      *Media;
110 
111     EFI_BLOCK_RESET         Reset;
112     EFI_BLOCK_READ          ReadBlocks;
113     EFI_BLOCK_WRITE         WriteBlocks;
114     EFI_BLOCK_FLUSH         FlushBlocks;
115 
116 } EFI_BLOCK_IO;
117 
118 
119 
120 //
121 // Disk Block IO protocol
122 //
123 
124 #define DISK_IO_PROTOCOL \
125     { 0xce345171, 0xba0b, 0x11d2,  {0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
126 #define EFI_DISK_IO_INTERFACE_REVISION   0x00010000
127 
128 INTERFACE_DECL(_EFI_DISK_IO);
129 
130 typedef
131 EFI_STATUS
132 (EFIAPI *EFI_DISK_READ) (
133     IN struct _EFI_DISK_IO      *This,
134     IN UINT32                   MediaId,
135     IN UINT64                   Offset,
136     IN UINTN                    BufferSize,
137     OUT VOID                    *Buffer
138     );
139 
140 
141 typedef
142 EFI_STATUS
143 (EFIAPI *EFI_DISK_WRITE) (
144     IN struct _EFI_DISK_IO      *This,
145     IN UINT32                   MediaId,
146     IN UINT64                   Offset,
147     IN UINTN                    BufferSize,
148     IN VOID                     *Buffer
149     );
150 
151 
152 typedef struct _EFI_DISK_IO {
153     UINT64              Revision;
154     EFI_DISK_READ       ReadDisk;
155     EFI_DISK_WRITE      WriteDisk;
156 } EFI_DISK_IO;
157 
158 
159 //
160 // Simple file system protocol
161 //
162 
163 #define SIMPLE_FILE_SYSTEM_PROTOCOL \
164     { 0x964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
165 
166 INTERFACE_DECL(_EFI_FILE_IO_INTERFACE);
167 INTERFACE_DECL(_EFI_FILE_HANDLE);
168 
169 typedef
170 EFI_STATUS
171 (EFIAPI *EFI_VOLUME_OPEN) (
172     IN struct _EFI_FILE_IO_INTERFACE    *This,
173     OUT struct _EFI_FILE_HANDLE         **Root
174     );
175 
176 #define EFI_FILE_IO_INTERFACE_REVISION   0x00010000
177 
178 typedef struct _EFI_FILE_IO_INTERFACE {
179     UINT64                  Revision;
180     EFI_VOLUME_OPEN         OpenVolume;
181 } EFI_FILE_IO_INTERFACE;
182 
183 //
184 //
185 //
186 
187 typedef
188 EFI_STATUS
189 (EFIAPI *EFI_FILE_OPEN) (
190     IN struct _EFI_FILE_HANDLE  *File,
191     OUT struct _EFI_FILE_HANDLE **NewHandle,
192     IN CHAR16                   *FileName,
193     IN UINT64                   OpenMode,
194     IN UINT64                   Attributes
195     );
196 
197 // Open modes
198 #define EFI_FILE_MODE_READ      0x0000000000000001
199 #define EFI_FILE_MODE_WRITE     0x0000000000000002
200 #define EFI_FILE_MODE_CREATE    0x8000000000000000
201 
202 // File attributes
203 #define EFI_FILE_READ_ONLY      0x0000000000000001
204 #define EFI_FILE_HIDDEN         0x0000000000000002
205 #define EFI_FILE_SYSTEM         0x0000000000000004
206 #define EFI_FILE_RESERVIED      0x0000000000000008
207 #define EFI_FILE_DIRECTORY      0x0000000000000010
208 #define EFI_FILE_ARCHIVE        0x0000000000000020
209 #define EFI_FILE_VALID_ATTR     0x0000000000000037
210 
211 typedef
212 EFI_STATUS
213 (EFIAPI *EFI_FILE_CLOSE) (
214     IN struct _EFI_FILE_HANDLE  *File
215     );
216 
217 typedef
218 EFI_STATUS
219 (EFIAPI *EFI_FILE_DELETE) (
220     IN struct _EFI_FILE_HANDLE  *File
221     );
222 
223 typedef
224 EFI_STATUS
225 (EFIAPI *EFI_FILE_READ) (
226     IN struct _EFI_FILE_HANDLE  *File,
227     IN OUT UINTN                *BufferSize,
228     OUT VOID                    *Buffer
229     );
230 
231 typedef
232 EFI_STATUS
233 (EFIAPI *EFI_FILE_WRITE) (
234     IN struct _EFI_FILE_HANDLE  *File,
235     IN OUT UINTN                *BufferSize,
236     IN VOID                     *Buffer
237     );
238 
239 typedef
240 EFI_STATUS
241 (EFIAPI *EFI_FILE_SET_POSITION) (
242     IN struct _EFI_FILE_HANDLE  *File,
243     IN UINT64                   Position
244     );
245 
246 typedef
247 EFI_STATUS
248 (EFIAPI *EFI_FILE_GET_POSITION) (
249     IN struct _EFI_FILE_HANDLE  *File,
250     OUT UINT64                  *Position
251     );
252 
253 typedef
254 EFI_STATUS
255 (EFIAPI *EFI_FILE_GET_INFO) (
256     IN struct _EFI_FILE_HANDLE  *File,
257     IN EFI_GUID                 *InformationType,
258     IN OUT UINTN                *BufferSize,
259     OUT VOID                    *Buffer
260     );
261 
262 typedef
263 EFI_STATUS
264 (EFIAPI *EFI_FILE_SET_INFO) (
265     IN struct _EFI_FILE_HANDLE  *File,
266     IN EFI_GUID                 *InformationType,
267     IN UINTN                    BufferSize,
268     IN VOID                     *Buffer
269     );
270 
271 typedef
272 EFI_STATUS
273 (EFIAPI *EFI_FILE_FLUSH) (
274     IN struct _EFI_FILE_HANDLE  *File
275     );
276 
277 
278 
279 #define EFI_FILE_HANDLE_REVISION         0x00010000
280 typedef struct _EFI_FILE_HANDLE {
281     UINT64                  Revision;
282     EFI_FILE_OPEN           Open;
283     EFI_FILE_CLOSE          Close;
284     EFI_FILE_DELETE         Delete;
285     EFI_FILE_READ           Read;
286     EFI_FILE_WRITE          Write;
287     EFI_FILE_GET_POSITION   GetPosition;
288     EFI_FILE_SET_POSITION   SetPosition;
289     EFI_FILE_GET_INFO       GetInfo;
290     EFI_FILE_SET_INFO       SetInfo;
291     EFI_FILE_FLUSH          Flush;
292 } EFI_FILE, *EFI_FILE_HANDLE;
293 
294 
295 //
296 // File information types
297 //
298 
299 #define EFI_FILE_INFO_ID   \
300     { 0x9576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
301 
302 typedef struct {
303     UINT64                  Size;
304     UINT64                  FileSize;
305     UINT64                  PhysicalSize;
306     EFI_TIME                CreateTime;
307     EFI_TIME                LastAccessTime;
308     EFI_TIME                ModificationTime;
309     UINT64                  Attribute;
310     CHAR16                  FileName[1];
311 } EFI_FILE_INFO;
312 
313 //
314 // The FileName field of the EFI_FILE_INFO data structure is variable length.
315 // Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
316 // be the size of the data structure without the FileName field.  The following macro
317 // computes this size correctly no matter how big the FileName array is declared.
318 // This is required to make the EFI_FILE_INFO data structure ANSI compilant.
319 //
320 
321 #define SIZE_OF_EFI_FILE_INFO EFI_FIELD_OFFSET(EFI_FILE_INFO,FileName)
322 
323 #define EFI_FILE_SYSTEM_INFO_ID    \
324     { 0x9576e93, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
325 
326 typedef struct {
327     UINT64                  Size;
328     BOOLEAN                 ReadOnly;
329     UINT64                  VolumeSize;
330     UINT64                  FreeSpace;
331     UINT32                  BlockSize;
332     CHAR16                  VolumeLabel[1];
333 } EFI_FILE_SYSTEM_INFO;
334 
335 //
336 // The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length.
337 // Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs
338 // to be the size of the data structure without the VolumeLable field.  The following macro
339 // computes this size correctly no matter how big the VolumeLable array is declared.
340 // This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant.
341 //
342 
343 #define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_INFO,VolumeLabel)
344 
345 #define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID    \
346     { 0xDB47D7D3,0xFE81, 0x11d3, {0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
347 
348 typedef struct {
349     CHAR16                  VolumeLabel[1];
350 } EFI_FILE_SYSTEM_VOLUME_LABEL_INFO;
351 
352 #define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_VOLUME_LABEL_INFO,VolumeLabel)
353 
354 //
355 // Load file protocol
356 //
357 
358 
359 #define LOAD_FILE_PROTOCOL \
360     { 0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
361 
362 INTERFACE_DECL(_EFI_LOAD_FILE_INTERFACE);
363 
364 typedef
365 EFI_STATUS
366 (EFIAPI *EFI_LOAD_FILE) (
367     IN struct _EFI_LOAD_FILE_INTERFACE  *This,
368     IN EFI_DEVICE_PATH                  *FilePath,
369     IN BOOLEAN                          BootPolicy,
370     IN OUT UINTN                        *BufferSize,
371     IN VOID                             *Buffer OPTIONAL
372     );
373 
374 typedef struct _EFI_LOAD_FILE_INTERFACE {
375     EFI_LOAD_FILE                       LoadFile;
376 } EFI_LOAD_FILE_INTERFACE;
377 
378 
379 //
380 // Device IO protocol
381 //
382 
383 #define DEVICE_IO_PROTOCOL \
384     { 0xaf6ac311, 0x84c3, 0x11d2, {0x8e, 0x3c, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
385 
386 INTERFACE_DECL(_EFI_DEVICE_IO_INTERFACE);
387 
388 typedef enum {
389     IO_UINT8,
390     IO_UINT16,
391     IO_UINT32,
392     IO_UINT64,
393 //
394 // Specification Change: Copy from MMIO to MMIO vs. MMIO to buffer, buffer to MMIO
395 //
396     MMIO_COPY_UINT8,
397     MMIO_COPY_UINT16,
398     MMIO_COPY_UINT32,
399     MMIO_COPY_UINT64
400 } EFI_IO_WIDTH;
401 
402 #define EFI_PCI_ADDRESS(_bus,_dev,_func) \
403     ( (UINT64) ( (((UINTN)_bus) << 24) + (((UINTN)_dev) << 16) + (((UINTN)_func) << 8) ) )
404 
405 
406 typedef
407 EFI_STATUS
408 (EFIAPI *EFI_DEVICE_IO) (
409     IN struct _EFI_DEVICE_IO_INTERFACE *This,
410     IN EFI_IO_WIDTH                 Width,
411     IN UINT64                       Address,
412     IN UINTN                        Count,
413     IN OUT VOID                     *Buffer
414     );
415 
416 typedef struct {
417     EFI_DEVICE_IO                   Read;
418     EFI_DEVICE_IO                   Write;
419 } EFI_IO_ACCESS;
420 
421 typedef
422 EFI_STATUS
423 (EFIAPI *EFI_PCI_DEVICE_PATH) (
424     IN struct _EFI_DEVICE_IO_INTERFACE  *This,
425     IN UINT64                           Address,
426     IN OUT EFI_DEVICE_PATH              **PciDevicePath
427     );
428 
429 typedef enum {
430     EfiBusMasterRead,
431     EfiBusMasterWrite,
432     EfiBusMasterCommonBuffer
433 } EFI_IO_OPERATION_TYPE;
434 
435 typedef
436 EFI_STATUS
437 (EFIAPI *EFI_IO_MAP) (
438     IN struct _EFI_DEVICE_IO_INTERFACE  *This,
439     IN EFI_IO_OPERATION_TYPE            Operation,
440     IN EFI_PHYSICAL_ADDRESS             *HostAddress,
441     IN OUT UINTN                        *NumberOfBytes,
442     OUT EFI_PHYSICAL_ADDRESS            *DeviceAddress,
443     OUT VOID                            **Mapping
444     );
445 
446 typedef
447 EFI_STATUS
448 (EFIAPI *EFI_IO_UNMAP) (
449     IN struct _EFI_DEVICE_IO_INTERFACE  *This,
450     IN VOID                             *Mapping
451     );
452 
453 typedef
454 EFI_STATUS
455 (EFIAPI *EFI_IO_ALLOCATE_BUFFER) (
456     IN struct _EFI_DEVICE_IO_INTERFACE  *This,
457     IN EFI_ALLOCATE_TYPE                Type,
458     IN EFI_MEMORY_TYPE                  MemoryType,
459     IN UINTN                            Pages,
460     IN OUT EFI_PHYSICAL_ADDRESS         *HostAddress
461     );
462 
463 typedef
464 EFI_STATUS
465 (EFIAPI *EFI_IO_FLUSH) (
466     IN struct _EFI_DEVICE_IO_INTERFACE  *This
467     );
468 
469 typedef
470 EFI_STATUS
471 (EFIAPI *EFI_IO_FREE_BUFFER) (
472     IN struct _EFI_DEVICE_IO_INTERFACE  *This,
473     IN UINTN                            Pages,
474     IN EFI_PHYSICAL_ADDRESS             HostAddress
475     );
476 
477 typedef struct _EFI_DEVICE_IO_INTERFACE {
478     EFI_IO_ACCESS                       Mem;
479     EFI_IO_ACCESS                       Io;
480     EFI_IO_ACCESS                       Pci;
481     EFI_IO_MAP                          Map;
482     EFI_PCI_DEVICE_PATH                 PciDevicePath;
483     EFI_IO_UNMAP                        Unmap;
484     EFI_IO_ALLOCATE_BUFFER              AllocateBuffer;
485     EFI_IO_FLUSH                        Flush;
486     EFI_IO_FREE_BUFFER                  FreeBuffer;
487 } EFI_DEVICE_IO_INTERFACE;
488 
489 
490 //
491 // Unicode Collation protocol
492 //
493 
494 #define UNICODE_COLLATION_PROTOCOL \
495     { 0x1d85cd7f, 0xf43d, 0x11d2, {0x9a, 0xc,  0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
496 
497 #define UNICODE_BYTE_ORDER_MARK       (CHAR16)(0xfeff)
498 
499 INTERFACE_DECL(_EFI_UNICODE_COLLATION_INTERFACE);
500 
501 typedef
502 INTN
503 (EFIAPI *EFI_UNICODE_STRICOLL) (
504     IN struct _EFI_UNICODE_COLLATION_INTERFACE  *This,
505     IN CHAR16                         *s1,
506     IN CHAR16                         *s2
507     );
508 
509 typedef
510 BOOLEAN
511 (EFIAPI *EFI_UNICODE_METAIMATCH) (
512     IN struct _EFI_UNICODE_COLLATION_INTERFACE  *This,
513     IN CHAR16                         *String,
514     IN CHAR16                         *Pattern
515     );
516 
517 typedef
518 VOID
519 (EFIAPI *EFI_UNICODE_STRLWR) (
520     IN struct _EFI_UNICODE_COLLATION_INTERFACE  *This,
521     IN OUT CHAR16                       *Str
522     );
523 
524 typedef
525 VOID
526 (EFIAPI *EFI_UNICODE_STRUPR) (
527     IN struct _EFI_UNICODE_COLLATION_INTERFACE  *This,
528     IN OUT CHAR16                       *Str
529     );
530 
531 typedef
532 VOID
533 (EFIAPI *EFI_UNICODE_FATTOSTR) (
534     IN struct _EFI_UNICODE_COLLATION_INTERFACE  *This,
535     IN UINTN                            FatSize,
536     IN CHAR8                            *Fat,
537     OUT CHAR16                          *String
538     );
539 
540 typedef
541 BOOLEAN
542 (EFIAPI *EFI_UNICODE_STRTOFAT) (
543     IN struct _EFI_UNICODE_COLLATION_INTERFACE  *This,
544     IN CHAR16                           *String,
545     IN UINTN                            FatSize,
546     OUT CHAR8                           *Fat
547     );
548 
549 //
550 // Hash Protocol
551 //
552 #define HASH_PROTOCOL \
553   { 0xC5184932, 0xDBA5, 0x46DB, { 0xA5, 0xBA, 0xCC, 0x0B, 0xDA, 0x9C, 0x14, 0x35 } }
554 
555 #define EFI_HASH_ALGORITHM_SHA1 \
556   { 0x2AE9D80F, 0x3FB2, 0x4095, { 0xB7, 0xB1, 0xE9, 0x31, 0x57, 0xB9, 0x46, 0xB6 } } // Deprecated
557 
558 #define EFI_HASH_ALGORITHM_SHA224 \
559   { 0x8DF01A06, 0x9BD5, 0x4BF7, { 0xB0, 0x21, 0xDB, 0x4F, 0xD9, 0xCC, 0xF4, 0x5B } } // Deprecated
560 
561 #define EFI_HASH_ALGORITHM_SHA256 \
562   { 0x51AA59DE, 0xFDF2, 0x4EA3, { 0xBC, 0x63, 0x87, 0x5F, 0xB7, 0x84, 0x2E, 0xE9 } } // Deprecated
563 
564 #define EFI_HASH_ALGORITHM_SHA384 \
565   { 0xEFA96432, 0xDE33, 0x4DD2, { 0xAE, 0xE6, 0x32, 0x8C, 0x33, 0xDF, 0x77, 0x7A } } // Deprecated
566 
567 #define EFI_HASH_ALGORITHM_SHA512 \
568   { 0xCAA4381E, 0x750C, 0x4770, { 0xB8, 0x70, 0x7A, 0x23, 0xB4, 0xE4, 0x21, 0x30 } } // Deprecated
569 
570 #define EFI_HASH_ALGORITHM_MD5 \
571   { 0x0AF7C79C, 0x65B5, 0x4319, { 0xB0, 0xAE, 0x44, 0xEC, 0x48, 0x4E, 0x4A, 0xD7 } } // Deprecated
572 
573 #define EFI_HASH_ALGORITHM_SHA1_NOPAD \
574   { 0x24C5DC2F, 0x53E2, 0x40CA, { 0x9E, 0xD6, 0xA5, 0xD9, 0xA4, 0x9F, 0x46, 0x3B } }
575 
576 #define EFI_HASH_ALGORITHM_SHA256_NOPAD \
577   { 0x8628752A, 0x6CB7, 0x4814, { 0x96, 0xFC, 0x24, 0xA8, 0x15, 0xAC, 0x22, 0x26 } }
578 
579 
580 INTERFACE_DECL(_EFI_HASH);
581 
582 typedef UINT8 EFI_MD5_HASH[16];
583 typedef UINT8 EFI_SHA1_HASH[20];
584 typedef UINT8 EFI_SHA224_HASH[28];
585 typedef UINT8 EFI_SHA256_HASH[32];
586 typedef UINT8 EFI_SHA384_HASH[48];
587 typedef UINT8 EFI_SHA512_HASH[64];
588 typedef union _EFI_HASH_OUTPUT {
589   EFI_MD5_HASH                    *Md5Hash;
590   EFI_SHA1_HASH                   *Sha1Hash;
591   EFI_SHA224_HASH                 *Sha224Hash;
592   EFI_SHA256_HASH                 *Sha256Hash;
593   EFI_SHA384_HASH                 *Sha384Hash;
594   EFI_SHA512_HASH                 *Sha512Hash;
595 } EFI_HASH_OUTPUT;
596 
597 typedef
598 EFI_STATUS
599 (EFIAPI *EFI_HASH_GET_HASH_SIZE) (
600   IN CONST struct _EFI_HASH       *This,
601   IN CONST EFI_GUID               *HashAlgorithm,
602   OUT UINTN                       *HashSize);
603 
604 typedef
605 EFI_STATUS
606 (EFIAPI *EFI_HASH_HASH) (
607   IN CONST struct _EFI_HASH       *This,
608   IN CONST EFI_GUID               *HashAlgorithm,
609   IN BOOLEAN                      Extend,
610   IN CONST UINT8                  *Message,
611   IN UINT64                       MessageSize,
612   IN OUT EFI_HASH_OUTPUT          *Hash);
613 
614 typedef struct _EFI_HASH {
615   EFI_HASH_GET_HASH_SIZE                  GetHashSize;
616   EFI_HASH_HASH                           Hash;
617 } EFI_HASH;
618 
619 
620 typedef struct _EFI_UNICODE_COLLATION_INTERFACE {
621 
622     // general
623     EFI_UNICODE_STRICOLL                StriColl;
624     EFI_UNICODE_METAIMATCH              MetaiMatch;
625     EFI_UNICODE_STRLWR                  StrLwr;
626     EFI_UNICODE_STRUPR                  StrUpr;
627 
628     // for supporting fat volumes
629     EFI_UNICODE_FATTOSTR                FatToStr;
630     EFI_UNICODE_STRTOFAT                StrToFat;
631 
632     CHAR8                               *SupportedLanguages;
633 } EFI_UNICODE_COLLATION_INTERFACE;
634 
635 /* Graphics output protocol */
636 #define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \
637   { \
638     0x9042a9de, 0x23dc, 0x4a38, {0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a } \
639   }
640 
641 typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL;
642 
643 typedef struct {
644   UINT32            RedMask;
645   UINT32            GreenMask;
646   UINT32            BlueMask;
647   UINT32            ReservedMask;
648 } EFI_PIXEL_BITMASK;
649 
650 typedef enum {
651   PixelRedGreenBlueReserved8BitPerColor,
652   PixelBlueGreenRedReserved8BitPerColor,
653   PixelBitMask,
654   PixelBltOnly,
655   PixelFormatMax
656 } EFI_GRAPHICS_PIXEL_FORMAT;
657 
658 typedef struct {
659   UINT32                     Version;
660   UINT32                     HorizontalResolution;
661   UINT32                     VerticalResolution;
662   EFI_GRAPHICS_PIXEL_FORMAT  PixelFormat;
663   EFI_PIXEL_BITMASK          PixelInformation;
664   UINT32                     PixelsPerScanLine;
665 } EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;
666 
667 /**
668   Return the current video mode information.
669 
670   @param  This       Protocol instance pointer.
671   @param  ModeNumber The mode number to return information on.
672   @param  SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
673   @param  Info       A pointer to callee allocated buffer that returns information about ModeNumber.
674 
675   @retval EFI_SUCCESS           Mode information returned.
676   @retval EFI_BUFFER_TOO_SMALL  The Info buffer was too small.
677   @retval EFI_DEVICE_ERROR      A hardware error occurred trying to retrieve the video mode.
678   @retval EFI_NOT_STARTED       Video display is not initialized. Call SetMode ()
679   @retval EFI_INVALID_PARAMETER One of the input args was NULL.
680 
681 **/
682 typedef
683 EFI_STATUS
684 (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) (
685   IN  EFI_GRAPHICS_OUTPUT_PROTOCOL          *This,
686   IN  UINT32                                ModeNumber,
687   OUT UINTN                                 *SizeOfInfo,
688   OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION  **Info
689   )
690 ;
691 
692 /**
693   Return the current video mode information.
694 
695   @param  This              Protocol instance pointer.
696   @param  ModeNumber        The mode number to be set.
697 
698   @retval EFI_SUCCESS       Graphics mode was changed.
699   @retval EFI_DEVICE_ERROR  The device had an error and could not complete the request.
700   @retval EFI_UNSUPPORTED   ModeNumber is not supported by this device.
701 
702 **/
703 typedef
704 EFI_STATUS
705 (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) (
706   IN  EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
707   IN  UINT32                       ModeNumber
708   );
709 
710 typedef struct {
711   UINT8 Blue;
712   UINT8 Green;
713   UINT8 Red;
714   UINT8 Reserved;
715 } EFI_GRAPHICS_OUTPUT_BLT_PIXEL;
716 
717 typedef union {
718   EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel;
719   UINT32                        Raw;
720 } EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION;
721 
722 typedef enum {
723   EfiBltVideoFill,
724   EfiBltVideoToBltBuffer,
725   EfiBltBufferToVideo,
726   EfiBltVideoToVideo,
727   EfiGraphicsOutputBltOperationMax
728 } EFI_GRAPHICS_OUTPUT_BLT_OPERATION;
729 
730 /**
731   The following table defines actions for BltOperations:
732 
733   <B>EfiBltVideoFill</B> - Write data from the  BltBuffer pixel (SourceX, SourceY)
734   directly to every pixel of the video display rectangle
735   (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
736   Only one pixel will be used from the BltBuffer. Delta is NOT used.
737 
738   <B>EfiBltVideoToBltBuffer</B> - Read data from the video display rectangle
739   (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
740   the BltBuffer rectangle (DestinationX, DestinationY )
741   (DestinationX + Width, DestinationY + Height). If DestinationX or
742   DestinationY is not zero then Delta must be set to the length in bytes
743   of a row in the BltBuffer.
744 
745   <B>EfiBltBufferToVideo</B> - Write data from the  BltBuffer rectangle
746   (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
747   video display rectangle (DestinationX, DestinationY)
748   (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
749   not zero then Delta must be set to the length in bytes of a row in the
750   BltBuffer.
751 
752   <B>EfiBltVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)
753   (SourceX + Width, SourceY + Height) .to the video display rectangle
754   (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
755   The BltBuffer and Delta  are not used in this mode.
756 
757   @param  This         Protocol instance pointer.
758   @param  BltBuffer    Buffer containing data to blit into video buffer. This
759                        buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
760   @param  BltOperation Operation to perform on BlitBuffer and video memory
761   @param  SourceX      X coordinate of source for the BltBuffer.
762   @param  SourceY      Y coordinate of source for the BltBuffer.
763   @param  DestinationX X coordinate of destination for the BltBuffer.
764   @param  DestinationY Y coordinate of destination for the BltBuffer.
765   @param  Width        Width of rectangle in BltBuffer in pixels.
766   @param  Height       Hight of rectangle in BltBuffer in pixels.
767   @param  Delta        OPTIONAL
768 
769   @retval EFI_SUCCESS           The Blt operation completed.
770   @retval EFI_INVALID_PARAMETER BltOperation is not valid.
771   @retval EFI_DEVICE_ERROR      A hardware error occured writting to the video buffer.
772 
773 **/
774 typedef
775 EFI_STATUS
776 (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) (
777   IN  EFI_GRAPHICS_OUTPUT_PROTOCOL            *This,
778   IN  EFI_GRAPHICS_OUTPUT_BLT_PIXEL           *BltBuffer,   OPTIONAL
779   IN  EFI_GRAPHICS_OUTPUT_BLT_OPERATION       BltOperation,
780   IN  UINTN                                   SourceX,
781   IN  UINTN                                   SourceY,
782   IN  UINTN                                   DestinationX,
783   IN  UINTN                                   DestinationY,
784   IN  UINTN                                   Width,
785   IN  UINTN                                   Height,
786   IN  UINTN                                   Delta         OPTIONAL
787   );
788 
789 typedef struct {
790   UINT32                                 MaxMode;
791   UINT32                                 Mode;
792   EFI_GRAPHICS_OUTPUT_MODE_INFORMATION   *Info;
793   UINTN                                  SizeOfInfo;
794   EFI_PHYSICAL_ADDRESS                   FrameBufferBase;
795   UINTN                                  FrameBufferSize;
796 } EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;
797 
798 struct _EFI_GRAPHICS_OUTPUT_PROTOCOL {
799   EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE  QueryMode;
800   EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE    SetMode;
801   EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT         Blt;
802   EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE        *Mode;
803 };
804 
805 
806 
807 /*
808  * EFI EDID Discovered Protocol
809  * UEFI Specification Version 2.5 Section 11.9
810  */
811 #define EFI_EDID_DISCOVERED_PROTOCOL_GUID \
812     { 0x1C0C34F6, 0xD380, 0x41FA, { 0xA0, 0x49, 0x8a, 0xD0, 0x6C, 0x1A, 0x66, 0xAA} }
813 
814 typedef struct _EFI_EDID_DISCOVERED_PROTOCOL {
815     UINT32   SizeOfEdid;
816     UINT8   *Edid;
817 } EFI_EDID_DISCOVERED_PROTOCOL;
818 
819 
820 
821 /*
822  * EFI EDID Active Protocol
823  * UEFI Specification Version 2.5 Section 11.9
824  */
825 #define EFI_EDID_ACTIVE_PROTOCOL_GUID \
826     { 0xBD8C1056, 0x9F36, 0x44EC, { 0x92, 0xA8, 0xA6, 0x33, 0x7F, 0x81, 0x79, 0x86} }
827 
828 typedef struct _EFI_EDID_ACTIVE_PROTOCOL {
829     UINT32   SizeOfEdid;
830     UINT8   *Edid;
831 } EFI_EDID_ACTIVE_PROTOCOL;
832 
833 
834 
835 /*
836  * EFI EDID Override Protocol
837  * UEFI Specification Version 2.5 Section 11.9
838  */
839 #define EFI_EDID_OVERRIDE_PROTOCOL_GUID \
840     { 0x48ECB431, 0xFB72, 0x45C0, { 0xA9, 0x22, 0xF4, 0x58, 0xFE, 0x04, 0x0B, 0xD5} }
841 
842 INTERFACE_DECL(_EFI_EDID_OVERRIDE_PROTOCOL);
843 
844 typedef
845 EFI_STATUS
846 (EFIAPI *EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID) (
847   IN      struct _EFI_EDID_OVERRIDE_PROTOCOL   *This,
848   IN      EFI_HANDLE                           *ChildHandle,
849   OUT     UINT32                               *Attributes,
850   IN OUT  UINTN                                *EdidSize,
851   IN OUT  UINT8                               **Edid);
852 
853 typedef struct _EFI_EDID_OVERRIDE_PROTOCOL {
854     EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID  GetEdid;
855 } EFI_EDID_OVERRIDE_PROTOCOL;
856 
857 
858 
859 INTERFACE_DECL(_EFI_SERVICE_BINDING);
860 
861 typedef
862 EFI_STATUS
863 (EFIAPI *EFI_SERVICE_BINDING_CREATE_CHILD) (
864     IN struct _EFI_SERVICE_BINDING *This,
865     IN EFI_HANDLE                  *ChildHandle
866     );
867 
868 typedef
869 EFI_STATUS
870 (EFIAPI *EFI_SERVICE_BINDING_DESTROY_CHILD) (
871     IN struct _EFI_SERVICE_BINDING *This,
872     IN EFI_HANDLE                  ChildHandle
873     );
874 
875 typedef struct _EFI_SERVICE_BINDING {
876     EFI_SERVICE_BINDING_CREATE_CHILD  CreateChild;
877     EFI_SERVICE_BINDING_DESTROY_CHILD DestroyChild;
878 } EFI_SERVICE_BINDING;
879 
880 
881 
882 /*
883  * EFI Driver Binding Protocol
884  * UEFI Specification Version 2.5 Section 10.1
885  */
886 #define EFI_DRIVER_BINDING_PROTOCOL_GUID \
887     { 0x18A031AB, 0xB443, 0x4D1A, { 0xA5, 0xC0, 0x0C, 0x09, 0x26, 0x1E, 0x9F, 0x71} }
888 
889 INTERFACE_DECL(_EFI_DRIVER_BINDING_PROTOCOL);
890 
891 typedef
892 EFI_STATUS
893 (EFIAPI *EFI_DRIVER_BINDING_PROTOCOL_SUPPORTED) (
894   IN      struct _EFI_DRIVER_BINDING_PROTOCOL *This,
895   IN      EFI_HANDLE                          ControllerHandle,
896   IN      EFI_DEVICE_PATH                     *RemainingDevicePath OPTIONAL);
897 
898 typedef
899 EFI_STATUS
900 (EFIAPI *EFI_DRIVER_BINDING_PROTOCOL_START) (
901   IN      struct _EFI_DRIVER_BINDING_PROTOCOL *This,
902   IN      EFI_HANDLE                          ControllerHandle,
903   IN      EFI_DEVICE_PATH                     *RemainingDevicePath OPTIONAL);
904 
905 typedef
906 EFI_STATUS
907 (EFIAPI *EFI_DRIVER_BINDING_PROTOCOL_STOP) (
908   IN      struct _EFI_DRIVER_BINDING_PROTOCOL *This,
909   IN      EFI_HANDLE                          ControllerHandle,
910   IN      UINTN                               NumberOfChildren,
911   IN      EFI_HANDLE                          *ChildHandleBuffer OPTIONAL);
912 
913 typedef struct _EFI_DRIVER_BINDING_PROTOCOL {
914   EFI_DRIVER_BINDING_PROTOCOL_SUPPORTED       Supported;
915   EFI_DRIVER_BINDING_PROTOCOL_START           Start;
916   EFI_DRIVER_BINDING_PROTOCOL_STOP            Stop;
917   UINT32                                      Version;
918   EFI_HANDLE                                  ImageHandle;
919   EFI_HANDLE                                  DriverBindingHandle;
920 } EFI_DRIVER_BINDING_PROTOCOL;
921 
922 
923 
924 /*
925  * Backwards compatibility with older GNU-EFI versions. Deprecated.
926  */
927 #define DRIVER_BINDING_PROTOCOL      EFI_DRIVER_BINDING_PROTOCOL_GUID
928 #define EFI_DRIVER_SUPPORTED         EFI_DRIVER_BINDING_PROTOCOL_SUPPORTED
929 #define EFI_DRIVER_START             EFI_DRIVER_BINDING_PROTOCOL_START
930 #define EFI_DRIVER_STOP              EFI_DRIVER_BINDING_PROTOCOL_STOP
931 #define _EFI_DRIVER_BINDING          _EFI_DRIVER_BINDING_PROTOCOL
932 #define EFI_DRIVER_BINDING           EFI_DRIVER_BINDING_PROTOCOL
933 
934 
935 
936 /*
937  * EFI Component Name Protocol
938  * Deprecated - use EFI Component Name 2 Protocol instead
939  */
940 #define EFI_COMPONENT_NAME_PROTOCOL_GUID \
941     {0x107A772C, 0xD5E1, 0x11D4, { 0x9A, 0x46, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
942 
943 INTERFACE_DECL(_EFI_COMPONENT_NAME_PROTOCOL);
944 
945 typedef
946 EFI_STATUS
947 (EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) (
948   IN      struct _EFI_COMPONENT_NAME_PROTOCOL   *This,
949   IN      CHAR8                                 *Language,
950   OUT     CHAR16                                **DriverName);
951 
952 typedef
953 EFI_STATUS
954 (EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) (
955   IN      struct _EFI_COMPONENT_NAME_PROTOCOL   *This,
956   IN      EFI_HANDLE                            ControllerHandle,
957   IN      EFI_HANDLE                            ChildHandle OPTIONAL,
958   IN      CHAR8                                 *Language,
959   OUT     CHAR16                                **ControllerName);
960 
961 typedef struct _EFI_COMPONENT_NAME_PROTOCOL {
962   EFI_COMPONENT_NAME_GET_DRIVER_NAME      GetDriverName;
963   EFI_COMPONENT_NAME_GET_CONTROLLER_NAME  GetControllerName;
964   CHAR8                                   *SupportedLanguages;
965 } EFI_COMPONENT_NAME_PROTOCOL;
966 
967 
968 
969 /*
970  * Backwards compatibility with older GNU-EFI versions. Deprecated.
971  */
972 #define COMPONENT_NAME_PROTOCOL  EFI_COMPONENT_NAME_PROTOCOL_GUID
973 #define _EFI_COMPONENT_NAME      _EFI_COMPONENT_NAME_PROTOCOL
974 #define EFI_COMPONENT_NAME       EFI_COMPONENT_NAME_PROTOCOL
975 
976 
977 
978 /*
979  * EFI Component Name 2 Protocol
980  * UEFI Specification Version 2.5 Section 10.5
981  */
982 #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
983     {0x6A7A5CFF, 0xE8D9, 0x4F70, { 0xBA, 0xDA, 0x75, 0xAB, 0x30, 0x25, 0xCE, 0x14} }
984 
985 INTERFACE_DECL(_EFI_COMPONENT_NAME2_PROTOCOL);
986 
987 typedef
988 EFI_STATUS
989 (EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME) (
990   IN      struct _EFI_COMPONENT_NAME2_PROTOCOL   *This,
991   IN      CHAR8                                  *Language,
992   OUT     CHAR16                                 **DriverName);
993 
994 typedef
995 EFI_STATUS
996 (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) (
997   IN      struct _EFI_COMPONENT_NAME2_PROTOCOL   *This,
998   IN      EFI_HANDLE                             ControllerHandle,
999   IN      EFI_HANDLE                             ChildHandle OPTIONAL,
1000   IN      CHAR8                                  *Language,
1001   OUT     CHAR16                                 **ControllerName);
1002 
1003 typedef struct _EFI_COMPONENT_NAME2_PROTOCOL {
1004   EFI_COMPONENT_NAME2_GET_DRIVER_NAME       GetDriverName;
1005   EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME   GetControllerName;
1006   CHAR8                                     *SupportedLanguages;
1007 } EFI_COMPONENT_NAME2_PROTOCOL;
1008 
1009 
1010 
1011 /*
1012  * Backwards compatibility with older GNU-EFI versions. Deprecated.
1013  */
1014 #define COMPONENT_NAME2_PROTOCOL  EFI_COMPONENT_NAME2_PROTOCOL_GUID
1015 #define _EFI_COMPONENT_NAME2      _EFI_COMPONENT_NAME2_PROTOCOL
1016 #define EFI_COMPONENT_NAME2       EFI_COMPONENT_NAME2_PROTOCOL
1017 
1018 
1019 
1020 /*
1021  * EFI Loaded Image Protocol
1022  * UEFI Specification Version 2.5 Section 8.1
1023  */
1024 #define EFI_LOADED_IMAGE_PROTOCOL_GUID \
1025     { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
1026 
1027 #define EFI_LOADED_IMAGE_PROTOCOL_REVISION  0x1000
1028 
1029 typedef
1030 EFI_STATUS
1031 (EFIAPI *EFI_IMAGE_UNLOAD) (
1032     IN EFI_HANDLE                   ImageHandle
1033     );
1034 
1035 typedef struct {
1036     UINT32                          Revision;
1037     EFI_HANDLE                      ParentHandle;
1038     struct _EFI_SYSTEM_TABLE        *SystemTable;
1039 
1040     // Source location of image
1041     EFI_HANDLE                      DeviceHandle;
1042     EFI_DEVICE_PATH                 *FilePath;
1043     VOID                            *Reserved;
1044 
1045     // Images load options
1046     UINT32                          LoadOptionsSize;
1047     VOID                            *LoadOptions;
1048 
1049     // Location of where image was loaded
1050     VOID                            *ImageBase;
1051     UINT64                          ImageSize;
1052     EFI_MEMORY_TYPE                 ImageCodeType;
1053     EFI_MEMORY_TYPE                 ImageDataType;
1054 
1055     // If the driver image supports a dynamic unload request
1056     EFI_IMAGE_UNLOAD                Unload;
1057 } EFI_LOADED_IMAGE_PROTOCOL;
1058 
1059 
1060 
1061 /*
1062  * Backwards compatibility with older GNU-EFI versions. Deprecated.
1063  */
1064 #define LOADED_IMAGE_PROTOCOL           EFI_LOADED_IMAGE_PROTOCOL_GUID
1065 #define EFI_IMAGE_INFORMATION_REVISION  EFI_LOADED_IMAGE_PROTOCOL_REVISION
1066 #define EFI_LOADED_IMAGE                EFI_LOADED_IMAGE_PROTOCOL
1067 
1068 
1069 
1070 /*
1071  * Random Number Generator Protocol
1072  * UEFI Specification Version 2.5 Section 35.5
1073  */
1074 #define EFI_RNG_PROTOCOL_GUID                          \
1075           { 0x3152bca5, 0xeade, 0x433d, {0x86, 0x2e, 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44} }
1076 
1077 typedef EFI_GUID EFI_RNG_ALGORITHM;
1078 
1079 #define EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID       \
1080      {0xa7af67cb, 0x603b, 0x4d42, {0xba, 0x21, 0x70, 0xbf, 0xb6, 0x29, 0x3f, 0x96} }
1081 
1082 #define EFI_RNG_ALGORITHM_SP800_90_HMAC_256_GUID       \
1083      {0xc5149b43, 0xae85, 0x4f53, {0x99, 0x82, 0xb9, 0x43, 0x35, 0xd3, 0xa9, 0xe7} }
1084 
1085 #define EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID        \
1086      {0x44f0de6e, 0x4d8c, 0x4045, {0xa8, 0xc7, 0x4d, 0xd1, 0x68, 0x85, 0x6b, 0x9e} }
1087 
1088 #define EFI_RNG_ALGORITHM_X9_31_3DES_GUID              \
1089      {0x63c4785a, 0xca34, 0x4012, {0xa3, 0xc8, 0x0b, 0x6a, 0x32, 0x4f, 0x55, 0x46} }
1090 
1091 #define EFI_RNG_ALGORITHM_X9_31_AES_GUID               \
1092      {0xacd03321, 0x777e, 0x4d3d, {0xb1, 0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9} }
1093 
1094 #define EFI_RNG_ALGORITHM_RAW                          \
1095      {0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61} }
1096 
1097 INTERFACE_DECL(_EFI_RNG_PROTOCOL);
1098 
1099 typedef
1100 EFI_STATUS
1101 (EFIAPI *EFI_RNG_GET_INFO) (
1102   IN      struct _EFI_RNG_PROTOCOL   *This,
1103   IN OUT  UINTN                      *RNGAlgorithmListSize,
1104   OUT     EFI_RNG_ALGORITHM          *RNGAlgorithmList
1105 );
1106 
1107 typedef
1108 EFI_STATUS
1109 (EFIAPI *EFI_RNG_GET_RNG) (
1110   IN      struct _EFI_RNG_PROTOCOL   *This,
1111   IN      EFI_RNG_ALGORITHM          *RNGAlgorithm,           OPTIONAL
1112   IN      UINTN                      RNGValueLength,
1113   OUT     UINT8                      *RNGValue
1114 );
1115 
1116 typedef struct _EFI_RNG_PROTOCOL {
1117           EFI_RNG_GET_INFO           GetInfo;
1118           EFI_RNG_GET_RNG            GetRNG;
1119 } EFI_RNG_PROTOCOL;
1120 
1121 
1122 //
1123 // EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL
1124 //
1125 
1126 #define EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_GUID          \
1127           { 0x6b30c738, 0xa391, 0x11d4, {0x9a, 0x3b, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
1128 
1129 INTERFACE_DECL(_EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL);
1130 
1131 typedef
1132 EFI_STATUS
1133 (EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER) (
1134 IN      struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL  *This,
1135 IN      EFI_HANDLE                                      ControllerHandle,
1136 IN OUT  EFI_HANDLE                                     *DriverImageHandle);
1137 
1138 typedef
1139 EFI_STATUS
1140 (EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH) (
1141 IN      struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL  *This,
1142 IN      EFI_HANDLE                                      ControllerHandle,
1143 IN OUT  EFI_DEVICE_PATH                               **DriverImagePath);
1144 
1145 typedef
1146 EFI_STATUS
1147 (EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED) (
1148 IN      struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL  *This,
1149 IN      EFI_HANDLE                                      ControllerHandle,
1150 IN      EFI_DEVICE_PATH                                *DriverImagePath,
1151 IN      EFI_HANDLE                                      DriverImageHandle);
1152 
1153 typedef struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL {
1154   EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER       GetDriver;
1155   EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH  GetDriverPath;
1156   EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED    DriverLoaded;
1157 } EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL;
1158 
1159 //
1160 // EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL
1161 //
1162 
1163 #define EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID          \
1164           { 0x3bc1b285, 0x8a15, 0x4a82, {0xaa, 0xbf, 0x4d, 0x7d, 0x13, 0xfb, 0x32, 0x65} }
1165 
1166 INTERFACE_DECL(_EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL);
1167 
1168 typedef
1169 EFI_STATUS
1170 (EFIAPI *EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER) (
1171 IN      struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL  *This,
1172 IN OUT  EFI_HANDLE                                         *DriverImageHandle);
1173 
1174 typedef struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL {
1175   EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER       GetDriver;
1176 } EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL;
1177 
1178 //
1179 // EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL
1180 //
1181 
1182 #define EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL_GUID          \
1183           { 0xb1ee129e, 0xda36, 0x4181, {0x91, 0xf8, 0x04, 0xa4, 0x92, 0x37, 0x66, 0xa7} }
1184 
1185 INTERFACE_DECL(_EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL);
1186 
1187 typedef
1188 UINT32
1189 (EFIAPI *EFI_DRIVER_FAMILY_OVERRIDE_GET_VERSION) (
1190 IN      struct _EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL  *This);
1191 
1192 typedef struct _EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL {
1193   EFI_DRIVER_FAMILY_OVERRIDE_GET_VERSION       GetVersion;
1194 } EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL;
1195 
1196 
1197 #endif
1198 
1199