xref: /DragonStub/inc/efiprot.h (revision 447ad9aa3af1b2f6ef8a41e1f00197249a81aab6)
1530d68baSNigel Croxon #ifndef _EFI_PROT_H
2530d68baSNigel Croxon #define _EFI_PROT_H
3530d68baSNigel Croxon 
4530d68baSNigel Croxon /*++
5530d68baSNigel Croxon 
6530d68baSNigel Croxon Copyright (c) 1998  Intel Corporation
7530d68baSNigel Croxon 
8530d68baSNigel Croxon Module Name:
9530d68baSNigel Croxon 
10530d68baSNigel Croxon     efiprot.h
11530d68baSNigel Croxon 
12530d68baSNigel Croxon Abstract:
13530d68baSNigel Croxon 
14530d68baSNigel Croxon     EFI Protocols
15530d68baSNigel Croxon 
16530d68baSNigel Croxon 
17530d68baSNigel Croxon 
18530d68baSNigel Croxon Revision History
19530d68baSNigel Croxon 
20530d68baSNigel Croxon --*/
21530d68baSNigel Croxon 
22530d68baSNigel Croxon //
23530d68baSNigel Croxon //  FPSWA library protocol
24530d68baSNigel Croxon //
251b10394eSNigel Croxon #define EFI_FPSWA_PROTOCOL_GUID \
26530d68baSNigel Croxon     { 0xc41b6531, 0x97b9, 0x11d3, {0x9a, 0x29, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
271b10394eSNigel Croxon #define FPSWA_PROTOCOL EFI_FPSWA_PROTOCOL_GUID
28530d68baSNigel Croxon 
29530d68baSNigel Croxon //
30530d68baSNigel Croxon // Device Path protocol
31530d68baSNigel Croxon //
32530d68baSNigel Croxon 
331b10394eSNigel Croxon #define EFI_DEVICE_PATH_PROTOCOL_GUID \
34530d68baSNigel Croxon     { 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
351b10394eSNigel Croxon #define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID
36530d68baSNigel Croxon 
37530d68baSNigel Croxon 
38530d68baSNigel Croxon //
39530d68baSNigel Croxon // Block IO protocol
40530d68baSNigel Croxon //
41530d68baSNigel Croxon 
421b10394eSNigel Croxon #define EFI_BLOCK_IO_PROTOCOL_GUID \
43530d68baSNigel Croxon     { 0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
441b10394eSNigel Croxon #define BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL_GUID
45530d68baSNigel Croxon 
461b10394eSNigel Croxon #define EFI_BLOCK_IO_PROTOCOL_REVISION    0x00010000
471b10394eSNigel Croxon #define EFI_BLOCK_IO_PROTOCOL_REVISION2   0x00020001
481b10394eSNigel Croxon #define EFI_BLOCK_IO_PROTOCOL_REVISION3   ((2<<16) | 31)
491b10394eSNigel Croxon #define EFI_BLOCK_IO_INTERFACE_REVISION   EFI_BLOCK_IO_PROTOCOL_REVISION
501b10394eSNigel Croxon #define EFI_BLOCK_IO_INTERFACE_REVISION2  EFI_BLOCK_IO_PROTOCOL_REVISION2
511b10394eSNigel Croxon #define EFI_BLOCK_IO_INTERFACE_REVISION3  EFI_BLOCK_IO_PROTOCOL_REVISION3
521b10394eSNigel Croxon 
531b10394eSNigel Croxon INTERFACE_DECL(_EFI_BLOCK_IO_PROTOCOL);
54530d68baSNigel Croxon 
55530d68baSNigel Croxon typedef
56530d68baSNigel Croxon EFI_STATUS
57530d68baSNigel Croxon (EFIAPI *EFI_BLOCK_RESET) (
581b10394eSNigel Croxon     IN struct _EFI_BLOCK_IO_PROTOCOL  *This,
59530d68baSNigel Croxon     IN BOOLEAN                        ExtendedVerification
60530d68baSNigel Croxon     );
61530d68baSNigel Croxon 
62530d68baSNigel Croxon typedef
63530d68baSNigel Croxon EFI_STATUS
64530d68baSNigel Croxon (EFIAPI *EFI_BLOCK_READ) (
651b10394eSNigel Croxon     IN struct _EFI_BLOCK_IO_PROTOCOL  *This,
66530d68baSNigel Croxon     IN UINT32                         MediaId,
67530d68baSNigel Croxon     IN EFI_LBA                        LBA,
68530d68baSNigel Croxon     IN UINTN                          BufferSize,
69530d68baSNigel Croxon     OUT VOID                          *Buffer
70530d68baSNigel Croxon     );
71530d68baSNigel Croxon 
72530d68baSNigel Croxon 
73530d68baSNigel Croxon typedef
74530d68baSNigel Croxon EFI_STATUS
75530d68baSNigel Croxon (EFIAPI *EFI_BLOCK_WRITE) (
761b10394eSNigel Croxon     IN struct _EFI_BLOCK_IO_PROTOCOL  *This,
77530d68baSNigel Croxon     IN UINT32                         MediaId,
78530d68baSNigel Croxon     IN EFI_LBA                        LBA,
79530d68baSNigel Croxon     IN UINTN                          BufferSize,
80530d68baSNigel Croxon     IN VOID                           *Buffer
81530d68baSNigel Croxon     );
82530d68baSNigel Croxon 
83530d68baSNigel Croxon 
84530d68baSNigel Croxon typedef
85530d68baSNigel Croxon EFI_STATUS
86530d68baSNigel Croxon (EFIAPI *EFI_BLOCK_FLUSH) (
871b10394eSNigel Croxon     IN struct _EFI_BLOCK_IO_PROTOCOL  *This
88530d68baSNigel Croxon     );
89530d68baSNigel Croxon 
90530d68baSNigel Croxon 
91530d68baSNigel Croxon 
92530d68baSNigel Croxon typedef struct {
93530d68baSNigel Croxon     UINT32              MediaId;
94530d68baSNigel Croxon     BOOLEAN             RemovableMedia;
95530d68baSNigel Croxon     BOOLEAN             MediaPresent;
96530d68baSNigel Croxon 
97530d68baSNigel Croxon     BOOLEAN             LogicalPartition;
98530d68baSNigel Croxon     BOOLEAN             ReadOnly;
99530d68baSNigel Croxon     BOOLEAN             WriteCaching;
100530d68baSNigel Croxon 
101530d68baSNigel Croxon     UINT32              BlockSize;
102530d68baSNigel Croxon     UINT32              IoAlign;
103530d68baSNigel Croxon 
104530d68baSNigel Croxon     EFI_LBA             LastBlock;
105530d68baSNigel Croxon 
106530d68baSNigel Croxon     /* revision 2 */
107530d68baSNigel Croxon     EFI_LBA             LowestAlignedLba;
108530d68baSNigel Croxon     UINT32              LogicalBlocksPerPhysicalBlock;
109530d68baSNigel Croxon     /* revision 3 */
110530d68baSNigel Croxon     UINT32              OptimalTransferLengthGranularity;
111530d68baSNigel Croxon } EFI_BLOCK_IO_MEDIA;
112530d68baSNigel Croxon 
1131b10394eSNigel Croxon typedef struct _EFI_BLOCK_IO_PROTOCOL {
114530d68baSNigel Croxon     UINT64                  Revision;
115530d68baSNigel Croxon 
116530d68baSNigel Croxon     EFI_BLOCK_IO_MEDIA      *Media;
117530d68baSNigel Croxon 
118530d68baSNigel Croxon     EFI_BLOCK_RESET         Reset;
119530d68baSNigel Croxon     EFI_BLOCK_READ          ReadBlocks;
120530d68baSNigel Croxon     EFI_BLOCK_WRITE         WriteBlocks;
121530d68baSNigel Croxon     EFI_BLOCK_FLUSH         FlushBlocks;
122530d68baSNigel Croxon 
1231b10394eSNigel Croxon } EFI_BLOCK_IO_PROTOCOL;
124530d68baSNigel Croxon 
1251b10394eSNigel Croxon typedef struct _EFI_BLOCK_IO_PROTOCOL _EFI_BLOCK_IO;
1261b10394eSNigel Croxon typedef EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO;
127530d68baSNigel Croxon 
1287993cbccSNigel Croxon #define EFI_BLOCK_IO2_PROTOCOL_GUID \
1297993cbccSNigel Croxon     { 0xa77b2472, 0xe282, 0x4e9f, {0xa2, 0x45, 0xc2, 0xc0, 0xe2, 0x7b, 0xbc, 0xc1} }
1307993cbccSNigel Croxon 
1317993cbccSNigel Croxon INTERFACE_DECL(_EFI_BLOCK_IO2_PROTOCOL);
1327993cbccSNigel Croxon 
1337993cbccSNigel Croxon typedef struct {
1347993cbccSNigel Croxon     EFI_EVENT               Event;
1357993cbccSNigel Croxon     EFI_STATUS              TransactionStatus;
1367993cbccSNigel Croxon } EFI_BLOCK_IO2_TOKEN;
1377993cbccSNigel Croxon 
1387993cbccSNigel Croxon typedef
1397993cbccSNigel Croxon EFI_STATUS
1407993cbccSNigel Croxon (EFIAPI *EFI_BLOCK_RESET_EX) (
1417993cbccSNigel Croxon     IN struct _EFI_BLOCK_IO2_PROTOCOL  *This,
1427993cbccSNigel Croxon     IN BOOLEAN                         ExtendedVerification
1437993cbccSNigel Croxon     );
1447993cbccSNigel Croxon 
1457993cbccSNigel Croxon typedef
1467993cbccSNigel Croxon EFI_STATUS
1477993cbccSNigel Croxon (EFIAPI *EFI_BLOCK_READ_EX) (
1487993cbccSNigel Croxon     IN struct _EFI_BLOCK_IO2_PROTOCOL  *This,
1497993cbccSNigel Croxon     IN UINT32                          MediaId,
1507993cbccSNigel Croxon     IN EFI_LBA                         LBA,
1517993cbccSNigel Croxon     IN OUT EFI_BLOCK_IO2_TOKEN         *Token,
1527993cbccSNigel Croxon     IN UINTN                           BufferSize,
1537993cbccSNigel Croxon     OUT VOID                           *Buffer
1547993cbccSNigel Croxon     );
1557993cbccSNigel Croxon 
1567993cbccSNigel Croxon typedef
1577993cbccSNigel Croxon EFI_STATUS
1587993cbccSNigel Croxon (EFIAPI *EFI_BLOCK_WRITE_EX) (
1597993cbccSNigel Croxon     IN struct _EFI_BLOCK_IO2_PROTOCOL  *This,
1607993cbccSNigel Croxon     IN UINT32                          MediaId,
1617993cbccSNigel Croxon     IN EFI_LBA                         LBA,
1627993cbccSNigel Croxon     IN OUT EFI_BLOCK_IO2_TOKEN         *Token,
1637993cbccSNigel Croxon     IN UINTN                           BufferSize,
1647993cbccSNigel Croxon     IN VOID                            *Buffer
1657993cbccSNigel Croxon     );
1667993cbccSNigel Croxon 
1677993cbccSNigel Croxon typedef
1687993cbccSNigel Croxon EFI_STATUS
1697993cbccSNigel Croxon (EFIAPI *EFI_BLOCK_FLUSH_EX) (
1707993cbccSNigel Croxon     IN struct _EFI_BLOCK_IO2_PROTOCOL  *This,
1717993cbccSNigel Croxon     IN OUT EFI_BLOCK_IO2_TOKEN         *Token
1727993cbccSNigel Croxon     );
1737993cbccSNigel Croxon 
1747993cbccSNigel Croxon typedef struct _EFI_BLOCK_IO2_PROTOCOL {
1757993cbccSNigel Croxon     EFI_BLOCK_IO_MEDIA  *Media;
1767993cbccSNigel Croxon     EFI_BLOCK_RESET_EX  Reset;
1777993cbccSNigel Croxon     EFI_BLOCK_READ_EX   ReadBlocksEx;
1787993cbccSNigel Croxon     EFI_BLOCK_WRITE_EX  WriteBlocksEx;
1797993cbccSNigel Croxon     EFI_BLOCK_FLUSH_EX  FlushBlocksEx;
1807993cbccSNigel Croxon } EFI_BLOCK_IO2_PROTOCOL;
181530d68baSNigel Croxon 
182530d68baSNigel Croxon //
183530d68baSNigel Croxon // Disk Block IO protocol
184530d68baSNigel Croxon //
185530d68baSNigel Croxon 
1861b10394eSNigel Croxon #define EFI_DISK_IO_PROTOCOL_GUID \
187530d68baSNigel Croxon     { 0xce345171, 0xba0b, 0x11d2,  {0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
1881b10394eSNigel Croxon #define DISK_IO_PROTOCOL EFI_DISK_IO_PROTOCOL_GUID
189530d68baSNigel Croxon 
1901b10394eSNigel Croxon #define EFI_DISK_IO_PROTOCOL_REVISION  0x00010000
1911b10394eSNigel Croxon #define EFI_DISK_IO_INTERFACE_REVISION EFI_DISK_IO_PROTOCOL_REVISION
1921b10394eSNigel Croxon 
1931b10394eSNigel Croxon INTERFACE_DECL(_EFI_DISK_IO_PROTOCOL);
194530d68baSNigel Croxon 
195530d68baSNigel Croxon typedef
196530d68baSNigel Croxon EFI_STATUS
197530d68baSNigel Croxon (EFIAPI *EFI_DISK_READ) (
1981b10394eSNigel Croxon     IN struct _EFI_DISK_IO_PROTOCOL  *This,
199530d68baSNigel Croxon     IN UINT32                        MediaId,
200530d68baSNigel Croxon     IN UINT64                        Offset,
201530d68baSNigel Croxon     IN UINTN                         BufferSize,
202530d68baSNigel Croxon     OUT VOID                         *Buffer
203530d68baSNigel Croxon     );
204530d68baSNigel Croxon 
205530d68baSNigel Croxon 
206530d68baSNigel Croxon typedef
207530d68baSNigel Croxon EFI_STATUS
208530d68baSNigel Croxon (EFIAPI *EFI_DISK_WRITE) (
2091b10394eSNigel Croxon     IN struct _EFI_DISK_IO_PROTOCOL  *This,
210530d68baSNigel Croxon     IN UINT32                        MediaId,
211530d68baSNigel Croxon     IN UINT64                        Offset,
212530d68baSNigel Croxon     IN UINTN                         BufferSize,
213530d68baSNigel Croxon     IN VOID                          *Buffer
214530d68baSNigel Croxon     );
215530d68baSNigel Croxon 
216530d68baSNigel Croxon 
2171b10394eSNigel Croxon typedef struct _EFI_DISK_IO_PROTOCOL {
218530d68baSNigel Croxon     UINT64              Revision;
219530d68baSNigel Croxon     EFI_DISK_READ       ReadDisk;
220530d68baSNigel Croxon     EFI_DISK_WRITE      WriteDisk;
2211b10394eSNigel Croxon } EFI_DISK_IO_PROTOCOL;
222530d68baSNigel Croxon 
2231b10394eSNigel Croxon typedef struct _EFI_DISK_IO_PROTOCOL _EFI_DISK_IO;
2241b10394eSNigel Croxon typedef EFI_DISK_IO_PROTOCOL EFI_DISK_IO;
225530d68baSNigel Croxon 
2267993cbccSNigel Croxon 
2277993cbccSNigel Croxon #define EFI_DISK_IO2_PROTOCOL_GUID \
2287993cbccSNigel Croxon     { 0x151c8eae, 0x7f2c, 0x472c,  {0x9e, 0x54, 0x98, 0x28, 0x19, 0x4f, 0x6a, 0x88} }
2297993cbccSNigel Croxon 
2307993cbccSNigel Croxon #define EFI_DISK_IO2_PROTOCOL_REVISION  0x00020000
2317993cbccSNigel Croxon 
2327993cbccSNigel Croxon INTERFACE_DECL(_EFI_DISK_IO2_PROTOCOL);
2337993cbccSNigel Croxon 
2347993cbccSNigel Croxon typedef struct {
2357993cbccSNigel Croxon     EFI_EVENT  Event;
2367993cbccSNigel Croxon     EFI_STATUS TransactionStatus;
2377993cbccSNigel Croxon } EFI_DISK_IO2_TOKEN;
2387993cbccSNigel Croxon 
2397993cbccSNigel Croxon typedef
2407993cbccSNigel Croxon EFI_STATUS
2417993cbccSNigel Croxon (EFIAPI *EFI_DISK_CANCEL_EX) (
2427993cbccSNigel Croxon     IN struct _EFI_DISK_IO2_PROTOCOL  *This
2437993cbccSNigel Croxon     );
2447993cbccSNigel Croxon 
2457993cbccSNigel Croxon typedef
2467993cbccSNigel Croxon EFI_STATUS
2477993cbccSNigel Croxon (EFIAPI *EFI_DISK_READ_EX) (
2487993cbccSNigel Croxon     IN struct _EFI_DISK_IO2_PROTOCOL  *This,
2497993cbccSNigel Croxon     IN UINT32                         MediaId,
2507993cbccSNigel Croxon     IN UINT64                         Offset,
2517993cbccSNigel Croxon     IN OUT EFI_DISK_IO2_TOKEN         *Token,
2527993cbccSNigel Croxon     IN UINTN                          BufferSize,
2537993cbccSNigel Croxon     OUT VOID                          *Buffer
2547993cbccSNigel Croxon     );
2557993cbccSNigel Croxon 
2567993cbccSNigel Croxon typedef
2577993cbccSNigel Croxon EFI_STATUS
2587993cbccSNigel Croxon (EFIAPI *EFI_DISK_WRITE_EX) (
2597993cbccSNigel Croxon     IN struct _EFI_DISK_IO2_PROTOCOL  *This,
2607993cbccSNigel Croxon     IN UINT32                         MediaId,
2617993cbccSNigel Croxon     IN UINT64                         Offset,
2627993cbccSNigel Croxon     IN OUT EFI_DISK_IO2_TOKEN         *Token,
2637993cbccSNigel Croxon     IN UINTN                          BufferSize,
2647993cbccSNigel Croxon     IN VOID                           *Buffer
2657993cbccSNigel Croxon     );
2667993cbccSNigel Croxon 
2677993cbccSNigel Croxon typedef
2687993cbccSNigel Croxon EFI_STATUS
2697993cbccSNigel Croxon (EFIAPI *EFI_DISK_FLUSH_EX) (
2707993cbccSNigel Croxon     IN struct _EFI_DISK_IO2_PROTOCOL  *This,
2717993cbccSNigel Croxon     IN OUT EFI_DISK_IO2_TOKEN         *Token
2727993cbccSNigel Croxon     );
2737993cbccSNigel Croxon 
2747993cbccSNigel Croxon typedef struct _EFI_DISK_IO2_PROTOCOL {
2757993cbccSNigel Croxon     UINT64                            Revision;
2767993cbccSNigel Croxon     EFI_DISK_CANCEL_EX                Cancel;
2777993cbccSNigel Croxon     EFI_DISK_READ_EX                  ReadDiskEx;
2787993cbccSNigel Croxon     EFI_DISK_WRITE_EX                 WriteDiskEx;
2797993cbccSNigel Croxon     EFI_DISK_FLUSH_EX                 FlushDiskEx;
2807993cbccSNigel Croxon } EFI_DISK_IO2_PROTOCOL;
2817993cbccSNigel Croxon 
282530d68baSNigel Croxon //
283530d68baSNigel Croxon // Simple file system protocol
284530d68baSNigel Croxon //
285530d68baSNigel Croxon 
2861b10394eSNigel Croxon #define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \
287530d68baSNigel Croxon     { 0x964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
2881b10394eSNigel Croxon #define SIMPLE_FILE_SYSTEM_PROTOCOL EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID
289530d68baSNigel Croxon 
2901b10394eSNigel Croxon INTERFACE_DECL(_EFI_SIMPLE_FILE_SYSTEM_PROTOCOL);
291530d68baSNigel Croxon INTERFACE_DECL(_EFI_FILE_HANDLE);
292530d68baSNigel Croxon 
293530d68baSNigel Croxon typedef
294530d68baSNigel Croxon EFI_STATUS
295530d68baSNigel Croxon (EFIAPI *EFI_VOLUME_OPEN) (
2961b10394eSNigel Croxon     IN struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL    *This,
297530d68baSNigel Croxon     OUT struct _EFI_FILE_HANDLE                   **Root
298530d68baSNigel Croxon     );
299530d68baSNigel Croxon 
3001b10394eSNigel Croxon #define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION  0x00010000
3011b10394eSNigel Croxon #define EFI_FILE_IO_INTERFACE_REVISION EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION
302530d68baSNigel Croxon 
3031b10394eSNigel Croxon typedef struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL {
304530d68baSNigel Croxon     UINT64                  Revision;
305530d68baSNigel Croxon     EFI_VOLUME_OPEN         OpenVolume;
3061b10394eSNigel Croxon } EFI_SIMPLE_FILE_SYSTEM_PROTOCOL;
3071b10394eSNigel Croxon 
3081b10394eSNigel Croxon typedef struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL _EFI_FILE_IO_INTERFACE;
3091b10394eSNigel Croxon typedef EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_FILE_IO_INTERFACE;
310530d68baSNigel Croxon 
311530d68baSNigel Croxon //
312530d68baSNigel Croxon //
313530d68baSNigel Croxon //
314530d68baSNigel Croxon 
315530d68baSNigel Croxon typedef
316530d68baSNigel Croxon EFI_STATUS
317530d68baSNigel Croxon (EFIAPI *EFI_FILE_OPEN) (
318530d68baSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File,
319530d68baSNigel Croxon     OUT struct _EFI_FILE_HANDLE **NewHandle,
320530d68baSNigel Croxon     IN CHAR16                   *FileName,
321530d68baSNigel Croxon     IN UINT64                   OpenMode,
322530d68baSNigel Croxon     IN UINT64                   Attributes
323530d68baSNigel Croxon     );
324530d68baSNigel Croxon 
325530d68baSNigel Croxon // Open modes
326530d68baSNigel Croxon #define EFI_FILE_MODE_READ      0x0000000000000001
327530d68baSNigel Croxon #define EFI_FILE_MODE_WRITE     0x0000000000000002
328530d68baSNigel Croxon #define EFI_FILE_MODE_CREATE    0x8000000000000000
329530d68baSNigel Croxon 
330530d68baSNigel Croxon // File attributes
331530d68baSNigel Croxon #define EFI_FILE_READ_ONLY      0x0000000000000001
332530d68baSNigel Croxon #define EFI_FILE_HIDDEN         0x0000000000000002
333530d68baSNigel Croxon #define EFI_FILE_SYSTEM         0x0000000000000004
334530d68baSNigel Croxon #define EFI_FILE_RESERVIED      0x0000000000000008
335530d68baSNigel Croxon #define EFI_FILE_DIRECTORY      0x0000000000000010
336530d68baSNigel Croxon #define EFI_FILE_ARCHIVE        0x0000000000000020
337530d68baSNigel Croxon #define EFI_FILE_VALID_ATTR     0x0000000000000037
338530d68baSNigel Croxon 
339530d68baSNigel Croxon typedef
340530d68baSNigel Croxon EFI_STATUS
341530d68baSNigel Croxon (EFIAPI *EFI_FILE_CLOSE) (
342530d68baSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File
343530d68baSNigel Croxon     );
344530d68baSNigel Croxon 
345530d68baSNigel Croxon typedef
346530d68baSNigel Croxon EFI_STATUS
347530d68baSNigel Croxon (EFIAPI *EFI_FILE_DELETE) (
348530d68baSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File
349530d68baSNigel Croxon     );
350530d68baSNigel Croxon 
351530d68baSNigel Croxon typedef
352530d68baSNigel Croxon EFI_STATUS
353530d68baSNigel Croxon (EFIAPI *EFI_FILE_READ) (
354530d68baSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File,
355530d68baSNigel Croxon     IN OUT UINTN                *BufferSize,
356530d68baSNigel Croxon     OUT VOID                    *Buffer
357530d68baSNigel Croxon     );
358530d68baSNigel Croxon 
359530d68baSNigel Croxon typedef
360530d68baSNigel Croxon EFI_STATUS
361530d68baSNigel Croxon (EFIAPI *EFI_FILE_WRITE) (
362530d68baSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File,
363530d68baSNigel Croxon     IN OUT UINTN                *BufferSize,
364530d68baSNigel Croxon     IN VOID                     *Buffer
365530d68baSNigel Croxon     );
366530d68baSNigel Croxon 
367530d68baSNigel Croxon typedef
368530d68baSNigel Croxon EFI_STATUS
369530d68baSNigel Croxon (EFIAPI *EFI_FILE_SET_POSITION) (
370530d68baSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File,
371530d68baSNigel Croxon     IN UINT64                   Position
372530d68baSNigel Croxon     );
373530d68baSNigel Croxon 
374530d68baSNigel Croxon typedef
375530d68baSNigel Croxon EFI_STATUS
376530d68baSNigel Croxon (EFIAPI *EFI_FILE_GET_POSITION) (
377530d68baSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File,
378530d68baSNigel Croxon     OUT UINT64                  *Position
379530d68baSNigel Croxon     );
380530d68baSNigel Croxon 
381530d68baSNigel Croxon typedef
382530d68baSNigel Croxon EFI_STATUS
383530d68baSNigel Croxon (EFIAPI *EFI_FILE_GET_INFO) (
384530d68baSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File,
385530d68baSNigel Croxon     IN EFI_GUID                 *InformationType,
386530d68baSNigel Croxon     IN OUT UINTN                *BufferSize,
387530d68baSNigel Croxon     OUT VOID                    *Buffer
388530d68baSNigel Croxon     );
389530d68baSNigel Croxon 
390530d68baSNigel Croxon typedef
391530d68baSNigel Croxon EFI_STATUS
392530d68baSNigel Croxon (EFIAPI *EFI_FILE_SET_INFO) (
393530d68baSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File,
394530d68baSNigel Croxon     IN EFI_GUID                 *InformationType,
395530d68baSNigel Croxon     IN UINTN                    BufferSize,
396530d68baSNigel Croxon     IN VOID                     *Buffer
397530d68baSNigel Croxon     );
398530d68baSNigel Croxon 
399530d68baSNigel Croxon typedef
400530d68baSNigel Croxon EFI_STATUS
401530d68baSNigel Croxon (EFIAPI *EFI_FILE_FLUSH) (
402530d68baSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File
403530d68baSNigel Croxon     );
404530d68baSNigel Croxon 
4057993cbccSNigel Croxon typedef struct {
4067993cbccSNigel Croxon     EFI_EVENT       Event;
4077993cbccSNigel Croxon     EFI_STATUS      Status;
4087993cbccSNigel Croxon     UINTN           BufferSize;
4097993cbccSNigel Croxon     VOID            *Buffer;
4107993cbccSNigel Croxon } EFI_FILE_IO_TOKEN;
411530d68baSNigel Croxon 
4127993cbccSNigel Croxon typedef
4137993cbccSNigel Croxon EFI_STATUS
4147993cbccSNigel Croxon (EFIAPI *EFI_FILE_OPEN_EX)(
4157993cbccSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File,
4167993cbccSNigel Croxon     OUT struct _EFI_FILE_HANDLE **NewHandle,
4177993cbccSNigel Croxon     IN CHAR16                   *FileName,
4187993cbccSNigel Croxon     IN UINT64                   OpenMode,
4197993cbccSNigel Croxon     IN UINT64                   Attributes,
4207993cbccSNigel Croxon     IN OUT EFI_FILE_IO_TOKEN    *Token
4217993cbccSNigel Croxon     );
422530d68baSNigel Croxon 
4237993cbccSNigel Croxon typedef
4247993cbccSNigel Croxon EFI_STATUS
4257993cbccSNigel Croxon (EFIAPI *EFI_FILE_READ_EX) (
4267993cbccSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File,
4277993cbccSNigel Croxon     IN OUT EFI_FILE_IO_TOKEN    *Token
4287993cbccSNigel Croxon     );
4297993cbccSNigel Croxon 
4307993cbccSNigel Croxon typedef
4317993cbccSNigel Croxon EFI_STATUS
4327993cbccSNigel Croxon (EFIAPI *EFI_FILE_WRITE_EX) (
4337993cbccSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File,
4347993cbccSNigel Croxon     IN OUT EFI_FILE_IO_TOKEN    *Token
4357993cbccSNigel Croxon     );
4367993cbccSNigel Croxon 
4377993cbccSNigel Croxon typedef
4387993cbccSNigel Croxon EFI_STATUS
4397993cbccSNigel Croxon (EFIAPI *EFI_FILE_FLUSH_EX) (
4407993cbccSNigel Croxon     IN struct _EFI_FILE_HANDLE  *File,
4417993cbccSNigel Croxon     IN OUT EFI_FILE_IO_TOKEN    *Token
4427993cbccSNigel Croxon     );
4437993cbccSNigel Croxon 
4447993cbccSNigel Croxon #define EFI_FILE_PROTOCOL_REVISION         0x00010000
4457993cbccSNigel Croxon #define EFI_FILE_PROTOCOL_REVISION2        0x00020000
4467993cbccSNigel Croxon #define EFI_FILE_PROTOCOL_LATEST_REVISION  EFI_FILE_PROTOCOL_REVISION2
4477993cbccSNigel Croxon #define EFI_FILE_HANDLE_REVISION           EFI_FILE_PROTOCOL_REVISION
4487993cbccSNigel Croxon 
449530d68baSNigel Croxon typedef struct _EFI_FILE_HANDLE {
450530d68baSNigel Croxon     UINT64                  Revision;
451530d68baSNigel Croxon     EFI_FILE_OPEN           Open;
452530d68baSNigel Croxon     EFI_FILE_CLOSE          Close;
453530d68baSNigel Croxon     EFI_FILE_DELETE         Delete;
454530d68baSNigel Croxon     EFI_FILE_READ           Read;
455530d68baSNigel Croxon     EFI_FILE_WRITE          Write;
456530d68baSNigel Croxon     EFI_FILE_GET_POSITION   GetPosition;
457530d68baSNigel Croxon     EFI_FILE_SET_POSITION   SetPosition;
458530d68baSNigel Croxon     EFI_FILE_GET_INFO       GetInfo;
459530d68baSNigel Croxon     EFI_FILE_SET_INFO       SetInfo;
460530d68baSNigel Croxon     EFI_FILE_FLUSH          Flush;
4617993cbccSNigel Croxon     EFI_FILE_OPEN_EX        OpenEx;
4627993cbccSNigel Croxon     EFI_FILE_READ_EX        ReadEx;
4637993cbccSNigel Croxon     EFI_FILE_WRITE_EX       WriteEx;
4647993cbccSNigel Croxon     EFI_FILE_FLUSH_EX       FlushEx;
4657993cbccSNigel Croxon } EFI_FILE_PROTOCOL, *EFI_FILE_HANDLE;
4667993cbccSNigel Croxon 
4677993cbccSNigel Croxon typedef EFI_FILE_PROTOCOL EFI_FILE;
468530d68baSNigel Croxon 
469530d68baSNigel Croxon 
470530d68baSNigel Croxon //
471530d68baSNigel Croxon // File information types
472530d68baSNigel Croxon //
473530d68baSNigel Croxon 
474530d68baSNigel Croxon #define EFI_FILE_INFO_ID   \
475530d68baSNigel Croxon     { 0x9576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
476530d68baSNigel Croxon 
477530d68baSNigel Croxon typedef struct {
478530d68baSNigel Croxon     UINT64                  Size;
479530d68baSNigel Croxon     UINT64                  FileSize;
480530d68baSNigel Croxon     UINT64                  PhysicalSize;
481530d68baSNigel Croxon     EFI_TIME                CreateTime;
482530d68baSNigel Croxon     EFI_TIME                LastAccessTime;
483530d68baSNigel Croxon     EFI_TIME                ModificationTime;
484530d68baSNigel Croxon     UINT64                  Attribute;
485530d68baSNigel Croxon     CHAR16                  FileName[1];
486530d68baSNigel Croxon } EFI_FILE_INFO;
487530d68baSNigel Croxon 
488530d68baSNigel Croxon //
489530d68baSNigel Croxon // The FileName field of the EFI_FILE_INFO data structure is variable length.
490530d68baSNigel Croxon // Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
491530d68baSNigel Croxon // be the size of the data structure without the FileName field.  The following macro
492530d68baSNigel Croxon // computes this size correctly no matter how big the FileName array is declared.
493530d68baSNigel Croxon // This is required to make the EFI_FILE_INFO data structure ANSI compilant.
494530d68baSNigel Croxon //
495530d68baSNigel Croxon 
496530d68baSNigel Croxon #define SIZE_OF_EFI_FILE_INFO EFI_FIELD_OFFSET(EFI_FILE_INFO,FileName)
497530d68baSNigel Croxon 
498530d68baSNigel Croxon #define EFI_FILE_SYSTEM_INFO_ID    \
499530d68baSNigel Croxon     { 0x9576e93, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
500530d68baSNigel Croxon 
501530d68baSNigel Croxon typedef struct {
502530d68baSNigel Croxon     UINT64                  Size;
503530d68baSNigel Croxon     BOOLEAN                 ReadOnly;
504530d68baSNigel Croxon     UINT64                  VolumeSize;
505530d68baSNigel Croxon     UINT64                  FreeSpace;
506530d68baSNigel Croxon     UINT32                  BlockSize;
507530d68baSNigel Croxon     CHAR16                  VolumeLabel[1];
508530d68baSNigel Croxon } EFI_FILE_SYSTEM_INFO;
509530d68baSNigel Croxon 
510530d68baSNigel Croxon //
511530d68baSNigel Croxon // The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length.
512530d68baSNigel Croxon // Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs
513530d68baSNigel Croxon // to be the size of the data structure without the VolumeLable field.  The following macro
514530d68baSNigel Croxon // computes this size correctly no matter how big the VolumeLable array is declared.
515530d68baSNigel Croxon // This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant.
516530d68baSNigel Croxon //
517530d68baSNigel Croxon 
518530d68baSNigel Croxon #define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_INFO,VolumeLabel)
519530d68baSNigel Croxon 
520530d68baSNigel Croxon #define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID    \
521530d68baSNigel Croxon     { 0xDB47D7D3,0xFE81, 0x11d3, {0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
522530d68baSNigel Croxon 
523530d68baSNigel Croxon typedef struct {
524530d68baSNigel Croxon     CHAR16                  VolumeLabel[1];
525530d68baSNigel Croxon } EFI_FILE_SYSTEM_VOLUME_LABEL_INFO;
526530d68baSNigel Croxon 
527530d68baSNigel Croxon #define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_VOLUME_LABEL_INFO,VolumeLabel)
528530d68baSNigel Croxon 
529530d68baSNigel Croxon //
530530d68baSNigel Croxon // Load file protocol
531530d68baSNigel Croxon //
532530d68baSNigel Croxon 
533530d68baSNigel Croxon 
5341b10394eSNigel Croxon #define EFI_LOAD_FILE_PROTOCOL_GUID \
535530d68baSNigel Croxon     { 0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
5361b10394eSNigel Croxon #define LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL_GUID
537530d68baSNigel Croxon 
5381b10394eSNigel Croxon INTERFACE_DECL(_EFI_LOAD_FILE_PROTOCOL);
539530d68baSNigel Croxon 
540530d68baSNigel Croxon typedef
541530d68baSNigel Croxon EFI_STATUS
542530d68baSNigel Croxon (EFIAPI *EFI_LOAD_FILE) (
5431b10394eSNigel Croxon     IN struct _EFI_LOAD_FILE_PROTOCOL  *This,
544530d68baSNigel Croxon     IN EFI_DEVICE_PATH                  *FilePath,
545530d68baSNigel Croxon     IN BOOLEAN                          BootPolicy,
546530d68baSNigel Croxon     IN OUT UINTN                        *BufferSize,
547530d68baSNigel Croxon     IN VOID                             *Buffer OPTIONAL
548530d68baSNigel Croxon     );
549530d68baSNigel Croxon 
5501b10394eSNigel Croxon typedef struct _EFI_LOAD_FILE_PROTOCOL {
551530d68baSNigel Croxon     EFI_LOAD_FILE                       LoadFile;
5521b10394eSNigel Croxon } EFI_LOAD_FILE_PROTOCOL;
553530d68baSNigel Croxon 
5541b10394eSNigel Croxon typedef struct _EFI_LOAD_FILE_PROTOCOL _EFI_LOAD_FILE_INTERFACE;
5551b10394eSNigel Croxon typedef EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_INTERFACE;
556530d68baSNigel Croxon 
557530d68baSNigel Croxon //
558530d68baSNigel Croxon // Device IO protocol
559530d68baSNigel Croxon //
560530d68baSNigel Croxon 
5611b10394eSNigel Croxon #define EFI_DEVICE_IO_PROTOCOL_GUID \
562530d68baSNigel Croxon     { 0xaf6ac311, 0x84c3, 0x11d2, {0x8e, 0x3c, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
5631b10394eSNigel Croxon #define DEVICE_IO_PROTOCOL EFI_DEVICE_IO_PROTOCOL_GUID
564530d68baSNigel Croxon 
5651b10394eSNigel Croxon INTERFACE_DECL(_EFI_DEVICE_IO_PROTOCOL);
566530d68baSNigel Croxon 
567530d68baSNigel Croxon typedef enum {
568530d68baSNigel Croxon     IO_UINT8,
569530d68baSNigel Croxon     IO_UINT16,
570530d68baSNigel Croxon     IO_UINT32,
571530d68baSNigel Croxon     IO_UINT64,
572530d68baSNigel Croxon //
573530d68baSNigel Croxon // Specification Change: Copy from MMIO to MMIO vs. MMIO to buffer, buffer to MMIO
574530d68baSNigel Croxon //
575530d68baSNigel Croxon     MMIO_COPY_UINT8,
576530d68baSNigel Croxon     MMIO_COPY_UINT16,
577530d68baSNigel Croxon     MMIO_COPY_UINT32,
578530d68baSNigel Croxon     MMIO_COPY_UINT64
579530d68baSNigel Croxon } EFI_IO_WIDTH;
580530d68baSNigel Croxon 
581530d68baSNigel Croxon #define EFI_PCI_ADDRESS(_bus,_dev,_func) \
582530d68baSNigel Croxon     ( (UINT64) ( (((UINTN)_bus) << 24) + (((UINTN)_dev) << 16) + (((UINTN)_func) << 8) ) )
583530d68baSNigel Croxon 
584530d68baSNigel Croxon 
585530d68baSNigel Croxon typedef
586530d68baSNigel Croxon EFI_STATUS
587530d68baSNigel Croxon (EFIAPI *EFI_DEVICE_IO) (
5881b10394eSNigel Croxon     IN struct _EFI_DEVICE_IO_PROTOCOL *This,
589530d68baSNigel Croxon     IN EFI_IO_WIDTH                 Width,
590530d68baSNigel Croxon     IN UINT64                       Address,
591530d68baSNigel Croxon     IN UINTN                        Count,
592530d68baSNigel Croxon     IN OUT VOID                     *Buffer
593530d68baSNigel Croxon     );
594530d68baSNigel Croxon 
595530d68baSNigel Croxon typedef struct {
596530d68baSNigel Croxon     EFI_DEVICE_IO                   Read;
597530d68baSNigel Croxon     EFI_DEVICE_IO                   Write;
598530d68baSNigel Croxon } EFI_IO_ACCESS;
599530d68baSNigel Croxon 
600530d68baSNigel Croxon typedef
601530d68baSNigel Croxon EFI_STATUS
602530d68baSNigel Croxon (EFIAPI *EFI_PCI_DEVICE_PATH) (
6031b10394eSNigel Croxon     IN struct _EFI_DEVICE_IO_PROTOCOL   *This,
604530d68baSNigel Croxon     IN UINT64                           Address,
605530d68baSNigel Croxon     IN OUT EFI_DEVICE_PATH              **PciDevicePath
606530d68baSNigel Croxon     );
607530d68baSNigel Croxon 
608530d68baSNigel Croxon typedef enum {
609530d68baSNigel Croxon     EfiBusMasterRead,
610530d68baSNigel Croxon     EfiBusMasterWrite,
611530d68baSNigel Croxon     EfiBusMasterCommonBuffer
612530d68baSNigel Croxon } EFI_IO_OPERATION_TYPE;
613530d68baSNigel Croxon 
614530d68baSNigel Croxon typedef
615530d68baSNigel Croxon EFI_STATUS
616530d68baSNigel Croxon (EFIAPI *EFI_IO_MAP) (
6171b10394eSNigel Croxon     IN struct _EFI_DEVICE_IO_PROTOCOL   *This,
618530d68baSNigel Croxon     IN EFI_IO_OPERATION_TYPE            Operation,
619530d68baSNigel Croxon     IN EFI_PHYSICAL_ADDRESS             *HostAddress,
620530d68baSNigel Croxon     IN OUT UINTN                        *NumberOfBytes,
621530d68baSNigel Croxon     OUT EFI_PHYSICAL_ADDRESS            *DeviceAddress,
622530d68baSNigel Croxon     OUT VOID                            **Mapping
623530d68baSNigel Croxon     );
624530d68baSNigel Croxon 
625530d68baSNigel Croxon typedef
626530d68baSNigel Croxon EFI_STATUS
627530d68baSNigel Croxon (EFIAPI *EFI_IO_UNMAP) (
6281b10394eSNigel Croxon     IN struct _EFI_DEVICE_IO_PROTOCOL   *This,
629530d68baSNigel Croxon     IN VOID                             *Mapping
630530d68baSNigel Croxon     );
631530d68baSNigel Croxon 
632530d68baSNigel Croxon typedef
633530d68baSNigel Croxon EFI_STATUS
634530d68baSNigel Croxon (EFIAPI *EFI_IO_ALLOCATE_BUFFER) (
6351b10394eSNigel Croxon     IN struct _EFI_DEVICE_IO_PROTOCOL   *This,
636530d68baSNigel Croxon     IN EFI_ALLOCATE_TYPE                Type,
637530d68baSNigel Croxon     IN EFI_MEMORY_TYPE                  MemoryType,
638530d68baSNigel Croxon     IN UINTN                            Pages,
639530d68baSNigel Croxon     IN OUT EFI_PHYSICAL_ADDRESS         *HostAddress
640530d68baSNigel Croxon     );
641530d68baSNigel Croxon 
642530d68baSNigel Croxon typedef
643530d68baSNigel Croxon EFI_STATUS
644530d68baSNigel Croxon (EFIAPI *EFI_IO_FLUSH) (
6451b10394eSNigel Croxon     IN struct _EFI_DEVICE_IO_PROTOCOL   *This
646530d68baSNigel Croxon     );
647530d68baSNigel Croxon 
648530d68baSNigel Croxon typedef
649530d68baSNigel Croxon EFI_STATUS
650530d68baSNigel Croxon (EFIAPI *EFI_IO_FREE_BUFFER) (
6511b10394eSNigel Croxon     IN struct _EFI_DEVICE_IO_PROTOCOL   *This,
652530d68baSNigel Croxon     IN UINTN                            Pages,
653530d68baSNigel Croxon     IN EFI_PHYSICAL_ADDRESS             HostAddress
654530d68baSNigel Croxon     );
655530d68baSNigel Croxon 
6561b10394eSNigel Croxon typedef struct _EFI_DEVICE_IO_PROTOCOL {
657530d68baSNigel Croxon     EFI_IO_ACCESS                       Mem;
658530d68baSNigel Croxon     EFI_IO_ACCESS                       Io;
659530d68baSNigel Croxon     EFI_IO_ACCESS                       Pci;
660530d68baSNigel Croxon     EFI_IO_MAP                          Map;
661530d68baSNigel Croxon     EFI_PCI_DEVICE_PATH                 PciDevicePath;
662530d68baSNigel Croxon     EFI_IO_UNMAP                        Unmap;
663530d68baSNigel Croxon     EFI_IO_ALLOCATE_BUFFER              AllocateBuffer;
664530d68baSNigel Croxon     EFI_IO_FLUSH                        Flush;
665530d68baSNigel Croxon     EFI_IO_FREE_BUFFER                  FreeBuffer;
6661b10394eSNigel Croxon } EFI_DEVICE_IO_PROTOCOL;
667530d68baSNigel Croxon 
6681b10394eSNigel Croxon typedef struct _EFI_DEVICE_IO_PROTOCOL _EFI_DEVICE_IO_INTERFACE;
6691b10394eSNigel Croxon typedef EFI_DEVICE_IO_PROTOCOL EFI_DEVICE_IO_INTERFACE;
670530d68baSNigel Croxon 
671530d68baSNigel Croxon //
672530d68baSNigel Croxon // Unicode Collation protocol
673530d68baSNigel Croxon //
674530d68baSNigel Croxon 
6751b10394eSNigel Croxon #define EFI_UNICODE_COLLATION_PROTOCOL_GUID \
676530d68baSNigel Croxon     { 0x1d85cd7f, 0xf43d, 0x11d2, {0x9a, 0xc,  0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
6771b10394eSNigel Croxon #define UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL_GUID
678530d68baSNigel Croxon 
6791b10394eSNigel Croxon #define EFI_UNICODE_BYTE_ORDER_MARK       (CHAR16)(0xfeff)
6801b10394eSNigel Croxon #define UNICODE_BYTE_ORDER_MARK EFI_UNICODE_BYTE_ORDER_MARK
681530d68baSNigel Croxon 
6821b10394eSNigel Croxon INTERFACE_DECL(_EFI_UNICODE_COLLATION_PROTOCOL);
683530d68baSNigel Croxon 
684530d68baSNigel Croxon typedef
685530d68baSNigel Croxon INTN
686530d68baSNigel Croxon (EFIAPI *EFI_UNICODE_STRICOLL) (
6871b10394eSNigel Croxon     IN struct _EFI_UNICODE_COLLATION_PROTOCOL  *This,
688530d68baSNigel Croxon     IN CHAR16                         *s1,
689530d68baSNigel Croxon     IN CHAR16                         *s2
690530d68baSNigel Croxon     );
691530d68baSNigel Croxon 
692530d68baSNigel Croxon typedef
693530d68baSNigel Croxon BOOLEAN
694530d68baSNigel Croxon (EFIAPI *EFI_UNICODE_METAIMATCH) (
6951b10394eSNigel Croxon     IN struct _EFI_UNICODE_COLLATION_PROTOCOL  *This,
696530d68baSNigel Croxon     IN CHAR16                         *String,
697530d68baSNigel Croxon     IN CHAR16                         *Pattern
698530d68baSNigel Croxon     );
699530d68baSNigel Croxon 
700530d68baSNigel Croxon typedef
701530d68baSNigel Croxon VOID
702530d68baSNigel Croxon (EFIAPI *EFI_UNICODE_STRLWR) (
7031b10394eSNigel Croxon     IN struct _EFI_UNICODE_COLLATION_PROTOCOL  *This,
704530d68baSNigel Croxon     IN OUT CHAR16                       *Str
705530d68baSNigel Croxon     );
706530d68baSNigel Croxon 
707530d68baSNigel Croxon typedef
708530d68baSNigel Croxon VOID
709530d68baSNigel Croxon (EFIAPI *EFI_UNICODE_STRUPR) (
7101b10394eSNigel Croxon     IN struct _EFI_UNICODE_COLLATION_PROTOCOL  *This,
711530d68baSNigel Croxon     IN OUT CHAR16                       *Str
712530d68baSNigel Croxon     );
713530d68baSNigel Croxon 
714530d68baSNigel Croxon typedef
715530d68baSNigel Croxon VOID
716530d68baSNigel Croxon (EFIAPI *EFI_UNICODE_FATTOSTR) (
7171b10394eSNigel Croxon     IN struct _EFI_UNICODE_COLLATION_PROTOCOL  *This,
718530d68baSNigel Croxon     IN UINTN                            FatSize,
719530d68baSNigel Croxon     IN CHAR8                            *Fat,
720530d68baSNigel Croxon     OUT CHAR16                          *String
721530d68baSNigel Croxon     );
722530d68baSNigel Croxon 
723530d68baSNigel Croxon typedef
724530d68baSNigel Croxon BOOLEAN
725530d68baSNigel Croxon (EFIAPI *EFI_UNICODE_STRTOFAT) (
7261b10394eSNigel Croxon     IN struct _EFI_UNICODE_COLLATION_PROTOCOL  *This,
727530d68baSNigel Croxon     IN CHAR16                           *String,
728530d68baSNigel Croxon     IN UINTN                            FatSize,
729530d68baSNigel Croxon     OUT CHAR8                           *Fat
730530d68baSNigel Croxon     );
731530d68baSNigel Croxon 
7328c29617eSNigel Croxon //
7338c29617eSNigel Croxon // Hash Protocol
7348c29617eSNigel Croxon //
7351b10394eSNigel Croxon #define EFI_HASH_PROTOCOL_GUID \
7368c29617eSNigel Croxon   { 0xC5184932, 0xDBA5, 0x46DB, { 0xA5, 0xBA, 0xCC, 0x0B, 0xDA, 0x9C, 0x14, 0x35 } }
7371b10394eSNigel Croxon #define HASH_PROTOCOL EFI_HASH_PROTOCOL_GUID
7388c29617eSNigel Croxon 
7391b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA1_GUID \
7408c29617eSNigel Croxon   { 0x2AE9D80F, 0x3FB2, 0x4095, { 0xB7, 0xB1, 0xE9, 0x31, 0x57, 0xB9, 0x46, 0xB6 } } // Deprecated
7411b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA1 EFI_HASH_ALGORITHM_SHA1_GUID
7428c29617eSNigel Croxon 
7431b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA224_GUID \
7448c29617eSNigel Croxon   { 0x8DF01A06, 0x9BD5, 0x4BF7, { 0xB0, 0x21, 0xDB, 0x4F, 0xD9, 0xCC, 0xF4, 0x5B } } // Deprecated
7451b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA224 EFI_HASH_ALGORITHM_SHA224_GUID
7468c29617eSNigel Croxon 
7471b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA256_GUID \
7488c29617eSNigel Croxon   { 0x51AA59DE, 0xFDF2, 0x4EA3, { 0xBC, 0x63, 0x87, 0x5F, 0xB7, 0x84, 0x2E, 0xE9 } } // Deprecated
7491b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA256 EFI_HASH_ALGORITHM_SHA256_GUID
7508c29617eSNigel Croxon 
7511b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA384_GUID \
7528c29617eSNigel Croxon   { 0xEFA96432, 0xDE33, 0x4DD2, { 0xAE, 0xE6, 0x32, 0x8C, 0x33, 0xDF, 0x77, 0x7A } } // Deprecated
7531b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA384 EFI_HASH_ALGORITHM_SHA384_GUID
7548c29617eSNigel Croxon 
7551b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA512_GUID \
7568c29617eSNigel Croxon   { 0xCAA4381E, 0x750C, 0x4770, { 0xB8, 0x70, 0x7A, 0x23, 0xB4, 0xE4, 0x21, 0x30 } } // Deprecated
7571b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA512 EFI_HASH_ALGORITHM_SHA512_GUID
7588c29617eSNigel Croxon 
7591b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_MD5_GUID \
7608c29617eSNigel Croxon   { 0x0AF7C79C, 0x65B5, 0x4319, { 0xB0, 0xAE, 0x44, 0xEC, 0x48, 0x4E, 0x4A, 0xD7 } } // Deprecated
7611b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_MD5 EFI_HASH_ALGORITHM_MD5_GUID
7628c29617eSNigel Croxon 
7631b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA1_NOPAD_GUID \
7648c29617eSNigel Croxon   { 0x24C5DC2F, 0x53E2, 0x40CA, { 0x9E, 0xD6, 0xA5, 0xD9, 0xA4, 0x9F, 0x46, 0x3B } }
7651b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA1_NOPAD EFI_HASH_ALGORITHM_SHA1_NOPAD_GUID
7668c29617eSNigel Croxon 
7671b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA256_NOPAD_GUID \
7688c29617eSNigel Croxon   { 0x8628752A, 0x6CB7, 0x4814, { 0x96, 0xFC, 0x24, 0xA8, 0x15, 0xAC, 0x22, 0x26 } }
7691b10394eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA256_NOPAD EFI_HASH_ALGORITHM_SHA256_NOPAD_GUID
7708c29617eSNigel Croxon 
7718c29617eSNigel Croxon 
7721b10394eSNigel Croxon INTERFACE_DECL(_EFI_HASH_PROTOCOL);
7738c29617eSNigel Croxon 
7748c29617eSNigel Croxon typedef UINT8 EFI_MD5_HASH[16];
7758c29617eSNigel Croxon typedef UINT8 EFI_SHA1_HASH[20];
7768c29617eSNigel Croxon typedef UINT8 EFI_SHA224_HASH[28];
7778c29617eSNigel Croxon typedef UINT8 EFI_SHA256_HASH[32];
7788c29617eSNigel Croxon typedef UINT8 EFI_SHA384_HASH[48];
7798c29617eSNigel Croxon typedef UINT8 EFI_SHA512_HASH[64];
7808c29617eSNigel Croxon typedef union _EFI_HASH_OUTPUT {
7818c29617eSNigel Croxon   EFI_MD5_HASH                    *Md5Hash;
7828c29617eSNigel Croxon   EFI_SHA1_HASH                   *Sha1Hash;
7838c29617eSNigel Croxon   EFI_SHA224_HASH                 *Sha224Hash;
7848c29617eSNigel Croxon   EFI_SHA256_HASH                 *Sha256Hash;
7858c29617eSNigel Croxon   EFI_SHA384_HASH                 *Sha384Hash;
7868c29617eSNigel Croxon   EFI_SHA512_HASH                 *Sha512Hash;
7878c29617eSNigel Croxon } EFI_HASH_OUTPUT;
7888c29617eSNigel Croxon 
7898c29617eSNigel Croxon typedef
7908c29617eSNigel Croxon EFI_STATUS
7918c29617eSNigel Croxon (EFIAPI *EFI_HASH_GET_HASH_SIZE) (
7921b10394eSNigel Croxon   IN CONST struct _EFI_HASH_PROTOCOL  *This,
7938c29617eSNigel Croxon   IN CONST EFI_GUID               *HashAlgorithm,
7948c29617eSNigel Croxon   OUT UINTN                       *HashSize);
7958c29617eSNigel Croxon 
7968c29617eSNigel Croxon typedef
7978c29617eSNigel Croxon EFI_STATUS
7988c29617eSNigel Croxon (EFIAPI *EFI_HASH_HASH) (
7991b10394eSNigel Croxon   IN CONST struct _EFI_HASH_PROTOCOL  *This,
8008c29617eSNigel Croxon   IN CONST EFI_GUID               *HashAlgorithm,
8018c29617eSNigel Croxon   IN BOOLEAN                      Extend,
8028c29617eSNigel Croxon   IN CONST UINT8                  *Message,
8038c29617eSNigel Croxon   IN UINT64                       MessageSize,
8048c29617eSNigel Croxon   IN OUT EFI_HASH_OUTPUT          *Hash);
8058c29617eSNigel Croxon 
8061b10394eSNigel Croxon typedef struct _EFI_HASH_PROTOCOL {
8078c29617eSNigel Croxon   EFI_HASH_GET_HASH_SIZE                  GetHashSize;
8088c29617eSNigel Croxon   EFI_HASH_HASH                           Hash;
8091b10394eSNigel Croxon } EFI_HASH_PROTOCOL;
8101b10394eSNigel Croxon 
8111b10394eSNigel Croxon typedef struct _EFI_HASH_PROTOCOL _EFI_HASH;
8121b10394eSNigel Croxon typedef EFI_HASH_PROTOCOL EFI_HASH;
8138c29617eSNigel Croxon 
814530d68baSNigel Croxon 
8151b10394eSNigel Croxon typedef struct _EFI_UNICODE_COLLATION_PROTOCOL {
816530d68baSNigel Croxon 
817530d68baSNigel Croxon     // general
818530d68baSNigel Croxon     EFI_UNICODE_STRICOLL                StriColl;
819530d68baSNigel Croxon     EFI_UNICODE_METAIMATCH              MetaiMatch;
820530d68baSNigel Croxon     EFI_UNICODE_STRLWR                  StrLwr;
821530d68baSNigel Croxon     EFI_UNICODE_STRUPR                  StrUpr;
822530d68baSNigel Croxon 
823530d68baSNigel Croxon     // for supporting fat volumes
824530d68baSNigel Croxon     EFI_UNICODE_FATTOSTR                FatToStr;
825530d68baSNigel Croxon     EFI_UNICODE_STRTOFAT                StrToFat;
826530d68baSNigel Croxon 
827530d68baSNigel Croxon     CHAR8                               *SupportedLanguages;
8281b10394eSNigel Croxon } EFI_UNICODE_COLLATION_PROTOCOL;
8291b10394eSNigel Croxon 
8301b10394eSNigel Croxon typedef struct _EFI_UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL;
8311b10394eSNigel Croxon typedef EFI_UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_INTERFACE;
832530d68baSNigel Croxon 
833530d68baSNigel Croxon /* Graphics output protocol */
834530d68baSNigel Croxon #define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \
8351b10394eSNigel Croxon    { 0x9042a9de, 0x23dc, 0x4a38, {0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a } }
836530d68baSNigel Croxon typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL;
837530d68baSNigel Croxon 
838530d68baSNigel Croxon typedef struct {
839530d68baSNigel Croxon   UINT32            RedMask;
840530d68baSNigel Croxon   UINT32            GreenMask;
841530d68baSNigel Croxon   UINT32            BlueMask;
842530d68baSNigel Croxon   UINT32            ReservedMask;
843530d68baSNigel Croxon } EFI_PIXEL_BITMASK;
844530d68baSNigel Croxon 
845530d68baSNigel Croxon typedef enum {
846530d68baSNigel Croxon   PixelRedGreenBlueReserved8BitPerColor,
847530d68baSNigel Croxon   PixelBlueGreenRedReserved8BitPerColor,
848530d68baSNigel Croxon   PixelBitMask,
849530d68baSNigel Croxon   PixelBltOnly,
850530d68baSNigel Croxon   PixelFormatMax
851530d68baSNigel Croxon } EFI_GRAPHICS_PIXEL_FORMAT;
852530d68baSNigel Croxon 
853530d68baSNigel Croxon typedef struct {
854530d68baSNigel Croxon   UINT32                     Version;
855530d68baSNigel Croxon   UINT32                     HorizontalResolution;
856530d68baSNigel Croxon   UINT32                     VerticalResolution;
857530d68baSNigel Croxon   EFI_GRAPHICS_PIXEL_FORMAT  PixelFormat;
858530d68baSNigel Croxon   EFI_PIXEL_BITMASK          PixelInformation;
859530d68baSNigel Croxon   UINT32                     PixelsPerScanLine;
860530d68baSNigel Croxon } EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;
861530d68baSNigel Croxon 
862530d68baSNigel Croxon /**
863530d68baSNigel Croxon   Return the current video mode information.
864530d68baSNigel Croxon 
865530d68baSNigel Croxon   @param  This       Protocol instance pointer.
866530d68baSNigel Croxon   @param  ModeNumber The mode number to return information on.
867530d68baSNigel Croxon   @param  SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
868530d68baSNigel Croxon   @param  Info       A pointer to callee allocated buffer that returns information about ModeNumber.
869530d68baSNigel Croxon 
870530d68baSNigel Croxon   @retval EFI_SUCCESS           Mode information returned.
871530d68baSNigel Croxon   @retval EFI_BUFFER_TOO_SMALL  The Info buffer was too small.
872530d68baSNigel Croxon   @retval EFI_DEVICE_ERROR      A hardware error occurred trying to retrieve the video mode.
873530d68baSNigel Croxon   @retval EFI_NOT_STARTED       Video display is not initialized. Call SetMode ()
874530d68baSNigel Croxon   @retval EFI_INVALID_PARAMETER One of the input args was NULL.
875530d68baSNigel Croxon 
876530d68baSNigel Croxon **/
877530d68baSNigel Croxon typedef
878530d68baSNigel Croxon EFI_STATUS
879530d68baSNigel Croxon (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) (
880530d68baSNigel Croxon   IN  EFI_GRAPHICS_OUTPUT_PROTOCOL          *This,
881530d68baSNigel Croxon   IN  UINT32                                ModeNumber,
882530d68baSNigel Croxon   OUT UINTN                                 *SizeOfInfo,
883530d68baSNigel Croxon   OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION  **Info
884530d68baSNigel Croxon   )
885530d68baSNigel Croxon ;
886530d68baSNigel Croxon 
887530d68baSNigel Croxon /**
888530d68baSNigel Croxon   Return the current video mode information.
889530d68baSNigel Croxon 
890530d68baSNigel Croxon   @param  This              Protocol instance pointer.
891530d68baSNigel Croxon   @param  ModeNumber        The mode number to be set.
892530d68baSNigel Croxon 
893530d68baSNigel Croxon   @retval EFI_SUCCESS       Graphics mode was changed.
894530d68baSNigel Croxon   @retval EFI_DEVICE_ERROR  The device had an error and could not complete the request.
895530d68baSNigel Croxon   @retval EFI_UNSUPPORTED   ModeNumber is not supported by this device.
896530d68baSNigel Croxon 
897530d68baSNigel Croxon **/
898530d68baSNigel Croxon typedef
899530d68baSNigel Croxon EFI_STATUS
900530d68baSNigel Croxon (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) (
901530d68baSNigel Croxon   IN  EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
902530d68baSNigel Croxon   IN  UINT32                       ModeNumber
903530d68baSNigel Croxon   );
904530d68baSNigel Croxon 
905530d68baSNigel Croxon typedef struct {
906530d68baSNigel Croxon   UINT8 Blue;
907530d68baSNigel Croxon   UINT8 Green;
908530d68baSNigel Croxon   UINT8 Red;
909530d68baSNigel Croxon   UINT8 Reserved;
910530d68baSNigel Croxon } EFI_GRAPHICS_OUTPUT_BLT_PIXEL;
911530d68baSNigel Croxon 
912530d68baSNigel Croxon typedef union {
913530d68baSNigel Croxon   EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel;
914530d68baSNigel Croxon   UINT32                        Raw;
915530d68baSNigel Croxon } EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION;
916530d68baSNigel Croxon 
917530d68baSNigel Croxon typedef enum {
918530d68baSNigel Croxon   EfiBltVideoFill,
919530d68baSNigel Croxon   EfiBltVideoToBltBuffer,
920530d68baSNigel Croxon   EfiBltBufferToVideo,
921530d68baSNigel Croxon   EfiBltVideoToVideo,
922530d68baSNigel Croxon   EfiGraphicsOutputBltOperationMax
923530d68baSNigel Croxon } EFI_GRAPHICS_OUTPUT_BLT_OPERATION;
924530d68baSNigel Croxon 
925530d68baSNigel Croxon /**
926530d68baSNigel Croxon   The following table defines actions for BltOperations:
927530d68baSNigel Croxon 
928530d68baSNigel Croxon   <B>EfiBltVideoFill</B> - Write data from the  BltBuffer pixel (SourceX, SourceY)
929530d68baSNigel Croxon   directly to every pixel of the video display rectangle
930530d68baSNigel Croxon   (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
931530d68baSNigel Croxon   Only one pixel will be used from the BltBuffer. Delta is NOT used.
932530d68baSNigel Croxon 
933530d68baSNigel Croxon   <B>EfiBltVideoToBltBuffer</B> - Read data from the video display rectangle
934530d68baSNigel Croxon   (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
935530d68baSNigel Croxon   the BltBuffer rectangle (DestinationX, DestinationY )
936530d68baSNigel Croxon   (DestinationX + Width, DestinationY + Height). If DestinationX or
937530d68baSNigel Croxon   DestinationY is not zero then Delta must be set to the length in bytes
938530d68baSNigel Croxon   of a row in the BltBuffer.
939530d68baSNigel Croxon 
940530d68baSNigel Croxon   <B>EfiBltBufferToVideo</B> - Write data from the  BltBuffer rectangle
941530d68baSNigel Croxon   (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
942530d68baSNigel Croxon   video display rectangle (DestinationX, DestinationY)
943530d68baSNigel Croxon   (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
944530d68baSNigel Croxon   not zero then Delta must be set to the length in bytes of a row in the
945530d68baSNigel Croxon   BltBuffer.
946530d68baSNigel Croxon 
947530d68baSNigel Croxon   <B>EfiBltVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)
948530d68baSNigel Croxon   (SourceX + Width, SourceY + Height) .to the video display rectangle
949530d68baSNigel Croxon   (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
950530d68baSNigel Croxon   The BltBuffer and Delta  are not used in this mode.
951530d68baSNigel Croxon 
952530d68baSNigel Croxon   @param  This         Protocol instance pointer.
953530d68baSNigel Croxon   @param  BltBuffer    Buffer containing data to blit into video buffer. This
954530d68baSNigel Croxon                        buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
955530d68baSNigel Croxon   @param  BltOperation Operation to perform on BlitBuffer and video memory
956530d68baSNigel Croxon   @param  SourceX      X coordinate of source for the BltBuffer.
957530d68baSNigel Croxon   @param  SourceY      Y coordinate of source for the BltBuffer.
958530d68baSNigel Croxon   @param  DestinationX X coordinate of destination for the BltBuffer.
959530d68baSNigel Croxon   @param  DestinationY Y coordinate of destination for the BltBuffer.
960530d68baSNigel Croxon   @param  Width        Width of rectangle in BltBuffer in pixels.
961530d68baSNigel Croxon   @param  Height       Hight of rectangle in BltBuffer in pixels.
962530d68baSNigel Croxon   @param  Delta        OPTIONAL
963530d68baSNigel Croxon 
964530d68baSNigel Croxon   @retval EFI_SUCCESS           The Blt operation completed.
965530d68baSNigel Croxon   @retval EFI_INVALID_PARAMETER BltOperation is not valid.
966530d68baSNigel Croxon   @retval EFI_DEVICE_ERROR      A hardware error occured writting to the video buffer.
967530d68baSNigel Croxon 
968530d68baSNigel Croxon **/
969530d68baSNigel Croxon typedef
970530d68baSNigel Croxon EFI_STATUS
971530d68baSNigel Croxon (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) (
972530d68baSNigel Croxon   IN  EFI_GRAPHICS_OUTPUT_PROTOCOL            *This,
973530d68baSNigel Croxon   IN  EFI_GRAPHICS_OUTPUT_BLT_PIXEL           *BltBuffer,   OPTIONAL
974530d68baSNigel Croxon   IN  EFI_GRAPHICS_OUTPUT_BLT_OPERATION       BltOperation,
975530d68baSNigel Croxon   IN  UINTN                                   SourceX,
976530d68baSNigel Croxon   IN  UINTN                                   SourceY,
977530d68baSNigel Croxon   IN  UINTN                                   DestinationX,
978530d68baSNigel Croxon   IN  UINTN                                   DestinationY,
979530d68baSNigel Croxon   IN  UINTN                                   Width,
980530d68baSNigel Croxon   IN  UINTN                                   Height,
981530d68baSNigel Croxon   IN  UINTN                                   Delta         OPTIONAL
982530d68baSNigel Croxon   );
983530d68baSNigel Croxon 
984530d68baSNigel Croxon typedef struct {
985530d68baSNigel Croxon   UINT32                                 MaxMode;
986530d68baSNigel Croxon   UINT32                                 Mode;
987530d68baSNigel Croxon   EFI_GRAPHICS_OUTPUT_MODE_INFORMATION   *Info;
988530d68baSNigel Croxon   UINTN                                  SizeOfInfo;
989530d68baSNigel Croxon   EFI_PHYSICAL_ADDRESS                   FrameBufferBase;
990530d68baSNigel Croxon   UINTN                                  FrameBufferSize;
991530d68baSNigel Croxon } EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;
992530d68baSNigel Croxon 
993530d68baSNigel Croxon struct _EFI_GRAPHICS_OUTPUT_PROTOCOL {
994530d68baSNigel Croxon   EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE  QueryMode;
995530d68baSNigel Croxon   EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE    SetMode;
996530d68baSNigel Croxon   EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT         Blt;
997530d68baSNigel Croxon   EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE        *Mode;
998530d68baSNigel Croxon };
999530d68baSNigel Croxon 
10008118d087SNigel Croxon 
1001cae022d6SNigel Croxon 
1002cae022d6SNigel Croxon /*
1003cae022d6SNigel Croxon  * EFI EDID Discovered Protocol
1004cae022d6SNigel Croxon  * UEFI Specification Version 2.5 Section 11.9
1005cae022d6SNigel Croxon  */
1006cae022d6SNigel Croxon #define EFI_EDID_DISCOVERED_PROTOCOL_GUID \
1007cae022d6SNigel Croxon     { 0x1C0C34F6, 0xD380, 0x41FA, { 0xA0, 0x49, 0x8a, 0xD0, 0x6C, 0x1A, 0x66, 0xAA} }
1008cae022d6SNigel Croxon 
1009cae022d6SNigel Croxon typedef struct _EFI_EDID_DISCOVERED_PROTOCOL {
1010cae022d6SNigel Croxon     UINT32   SizeOfEdid;
1011cae022d6SNigel Croxon     UINT8   *Edid;
1012cae022d6SNigel Croxon } EFI_EDID_DISCOVERED_PROTOCOL;
1013cae022d6SNigel Croxon 
1014cae022d6SNigel Croxon 
1015cae022d6SNigel Croxon 
1016cae022d6SNigel Croxon /*
1017cae022d6SNigel Croxon  * EFI EDID Active Protocol
1018cae022d6SNigel Croxon  * UEFI Specification Version 2.5 Section 11.9
1019cae022d6SNigel Croxon  */
1020cae022d6SNigel Croxon #define EFI_EDID_ACTIVE_PROTOCOL_GUID \
1021cae022d6SNigel Croxon     { 0xBD8C1056, 0x9F36, 0x44EC, { 0x92, 0xA8, 0xA6, 0x33, 0x7F, 0x81, 0x79, 0x86} }
1022cae022d6SNigel Croxon 
1023cae022d6SNigel Croxon typedef struct _EFI_EDID_ACTIVE_PROTOCOL {
1024cae022d6SNigel Croxon     UINT32   SizeOfEdid;
1025cae022d6SNigel Croxon     UINT8   *Edid;
1026cae022d6SNigel Croxon } EFI_EDID_ACTIVE_PROTOCOL;
1027cae022d6SNigel Croxon 
1028cae022d6SNigel Croxon 
1029cae022d6SNigel Croxon 
1030cae022d6SNigel Croxon /*
1031cae022d6SNigel Croxon  * EFI EDID Override Protocol
1032cae022d6SNigel Croxon  * UEFI Specification Version 2.5 Section 11.9
1033cae022d6SNigel Croxon  */
1034cae022d6SNigel Croxon #define EFI_EDID_OVERRIDE_PROTOCOL_GUID \
1035cae022d6SNigel Croxon     { 0x48ECB431, 0xFB72, 0x45C0, { 0xA9, 0x22, 0xF4, 0x58, 0xFE, 0x04, 0x0B, 0xD5} }
1036cae022d6SNigel Croxon 
1037cae022d6SNigel Croxon INTERFACE_DECL(_EFI_EDID_OVERRIDE_PROTOCOL);
1038cae022d6SNigel Croxon 
1039cae022d6SNigel Croxon typedef
1040cae022d6SNigel Croxon EFI_STATUS
1041cae022d6SNigel Croxon (EFIAPI *EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID) (
1042cae022d6SNigel Croxon   IN      struct _EFI_EDID_OVERRIDE_PROTOCOL   *This,
1043cae022d6SNigel Croxon   IN      EFI_HANDLE                           *ChildHandle,
1044cae022d6SNigel Croxon   OUT     UINT32                               *Attributes,
1045cae022d6SNigel Croxon   IN OUT  UINTN                                *EdidSize,
1046cae022d6SNigel Croxon   IN OUT  UINT8                               **Edid);
1047cae022d6SNigel Croxon 
1048cae022d6SNigel Croxon typedef struct _EFI_EDID_OVERRIDE_PROTOCOL {
1049cae022d6SNigel Croxon     EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID  GetEdid;
1050cae022d6SNigel Croxon } EFI_EDID_OVERRIDE_PROTOCOL;
1051cae022d6SNigel Croxon 
1052cae022d6SNigel Croxon 
1053cae022d6SNigel Croxon 
1054530d68baSNigel Croxon INTERFACE_DECL(_EFI_SERVICE_BINDING);
1055530d68baSNigel Croxon 
1056530d68baSNigel Croxon typedef
1057530d68baSNigel Croxon EFI_STATUS
1058530d68baSNigel Croxon (EFIAPI *EFI_SERVICE_BINDING_CREATE_CHILD) (
1059530d68baSNigel Croxon     IN struct _EFI_SERVICE_BINDING *This,
1060530d68baSNigel Croxon     IN EFI_HANDLE                  *ChildHandle
1061530d68baSNigel Croxon     );
1062530d68baSNigel Croxon 
1063530d68baSNigel Croxon typedef
1064530d68baSNigel Croxon EFI_STATUS
1065530d68baSNigel Croxon (EFIAPI *EFI_SERVICE_BINDING_DESTROY_CHILD) (
1066530d68baSNigel Croxon     IN struct _EFI_SERVICE_BINDING *This,
1067530d68baSNigel Croxon     IN EFI_HANDLE                  ChildHandle
1068530d68baSNigel Croxon     );
1069530d68baSNigel Croxon 
1070530d68baSNigel Croxon typedef struct _EFI_SERVICE_BINDING {
1071530d68baSNigel Croxon     EFI_SERVICE_BINDING_CREATE_CHILD  CreateChild;
1072530d68baSNigel Croxon     EFI_SERVICE_BINDING_DESTROY_CHILD DestroyChild;
1073530d68baSNigel Croxon } EFI_SERVICE_BINDING;
1074530d68baSNigel Croxon 
1075533a042dSNigel Croxon 
10768118d087SNigel Croxon 
10778118d087SNigel Croxon /*
10788118d087SNigel Croxon  * EFI Driver Binding Protocol
10798118d087SNigel Croxon  * UEFI Specification Version 2.5 Section 10.1
10808118d087SNigel Croxon  */
10818118d087SNigel Croxon #define EFI_DRIVER_BINDING_PROTOCOL_GUID \
1082533a042dSNigel Croxon     { 0x18A031AB, 0xB443, 0x4D1A, { 0xA5, 0xC0, 0x0C, 0x09, 0x26, 0x1E, 0x9F, 0x71} }
10831b10394eSNigel Croxon #define DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL_GUID
1084533a042dSNigel Croxon 
10858118d087SNigel Croxon INTERFACE_DECL(_EFI_DRIVER_BINDING_PROTOCOL);
1086533a042dSNigel Croxon 
1087533a042dSNigel Croxon typedef
1088533a042dSNigel Croxon EFI_STATUS
10898118d087SNigel Croxon (EFIAPI *EFI_DRIVER_BINDING_PROTOCOL_SUPPORTED) (
10908118d087SNigel Croxon   IN      struct _EFI_DRIVER_BINDING_PROTOCOL *This,
1091533a042dSNigel Croxon   IN      EFI_HANDLE                          ControllerHandle,
1092533a042dSNigel Croxon   IN      EFI_DEVICE_PATH                     *RemainingDevicePath OPTIONAL);
1093533a042dSNigel Croxon 
1094533a042dSNigel Croxon typedef
1095533a042dSNigel Croxon EFI_STATUS
10968118d087SNigel Croxon (EFIAPI *EFI_DRIVER_BINDING_PROTOCOL_START) (
10978118d087SNigel Croxon   IN      struct _EFI_DRIVER_BINDING_PROTOCOL *This,
1098533a042dSNigel Croxon   IN      EFI_HANDLE                          ControllerHandle,
1099533a042dSNigel Croxon   IN      EFI_DEVICE_PATH                     *RemainingDevicePath OPTIONAL);
1100533a042dSNigel Croxon 
1101533a042dSNigel Croxon typedef
1102533a042dSNigel Croxon EFI_STATUS
11038118d087SNigel Croxon (EFIAPI *EFI_DRIVER_BINDING_PROTOCOL_STOP) (
11048118d087SNigel Croxon   IN      struct _EFI_DRIVER_BINDING_PROTOCOL *This,
1105533a042dSNigel Croxon   IN      EFI_HANDLE                          ControllerHandle,
1106533a042dSNigel Croxon   IN      UINTN                               NumberOfChildren,
1107533a042dSNigel Croxon   IN      EFI_HANDLE                          *ChildHandleBuffer OPTIONAL);
1108533a042dSNigel Croxon 
11098118d087SNigel Croxon typedef struct _EFI_DRIVER_BINDING_PROTOCOL {
11108118d087SNigel Croxon   EFI_DRIVER_BINDING_PROTOCOL_SUPPORTED       Supported;
11118118d087SNigel Croxon   EFI_DRIVER_BINDING_PROTOCOL_START           Start;
11128118d087SNigel Croxon   EFI_DRIVER_BINDING_PROTOCOL_STOP            Stop;
1113533a042dSNigel Croxon   UINT32                                      Version;
1114533a042dSNigel Croxon   EFI_HANDLE                                  ImageHandle;
1115533a042dSNigel Croxon   EFI_HANDLE                                  DriverBindingHandle;
11168118d087SNigel Croxon } EFI_DRIVER_BINDING_PROTOCOL;
1117533a042dSNigel Croxon 
11181b10394eSNigel Croxon typedef struct _EFI_DRIVER_BINDING_PROTOCOL _EFI_DRIVER_BINDING;
11191b10394eSNigel Croxon typedef EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING;
1120883702e8SNigel Croxon 
11218118d087SNigel Croxon 
11228118d087SNigel Croxon /*
11238118d087SNigel Croxon  * Backwards compatibility with older GNU-EFI versions. Deprecated.
11248118d087SNigel Croxon  */
11258118d087SNigel Croxon #define EFI_DRIVER_SUPPORTED         EFI_DRIVER_BINDING_PROTOCOL_SUPPORTED
11268118d087SNigel Croxon #define EFI_DRIVER_START             EFI_DRIVER_BINDING_PROTOCOL_START
11278118d087SNigel Croxon #define EFI_DRIVER_STOP              EFI_DRIVER_BINDING_PROTOCOL_STOP
11288118d087SNigel Croxon 
11298118d087SNigel Croxon 
11308118d087SNigel Croxon 
11318118d087SNigel Croxon /*
11328118d087SNigel Croxon  * EFI Component Name Protocol
11338118d087SNigel Croxon  * Deprecated - use EFI Component Name 2 Protocol instead
11348118d087SNigel Croxon  */
11358118d087SNigel Croxon #define EFI_COMPONENT_NAME_PROTOCOL_GUID \
1136883702e8SNigel Croxon     {0x107A772C, 0xD5E1, 0x11D4, { 0x9A, 0x46, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
11371b10394eSNigel Croxon #define COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL_GUID
1138883702e8SNigel Croxon 
11398118d087SNigel Croxon INTERFACE_DECL(_EFI_COMPONENT_NAME_PROTOCOL);
1140883702e8SNigel Croxon 
1141883702e8SNigel Croxon typedef
1142883702e8SNigel Croxon EFI_STATUS
1143883702e8SNigel Croxon (EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) (
11448118d087SNigel Croxon   IN      struct _EFI_COMPONENT_NAME_PROTOCOL   *This,
1145883702e8SNigel Croxon   IN      CHAR8                                 *Language,
1146883702e8SNigel Croxon   OUT     CHAR16                                **DriverName);
1147883702e8SNigel Croxon 
1148883702e8SNigel Croxon typedef
1149883702e8SNigel Croxon EFI_STATUS
1150883702e8SNigel Croxon (EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) (
11518118d087SNigel Croxon   IN      struct _EFI_COMPONENT_NAME_PROTOCOL   *This,
1152883702e8SNigel Croxon   IN      EFI_HANDLE                            ControllerHandle,
1153883702e8SNigel Croxon   IN      EFI_HANDLE                            ChildHandle OPTIONAL,
1154883702e8SNigel Croxon   IN      CHAR8                                 *Language,
1155883702e8SNigel Croxon   OUT     CHAR16                                **ControllerName);
1156883702e8SNigel Croxon 
11578118d087SNigel Croxon typedef struct _EFI_COMPONENT_NAME_PROTOCOL {
1158883702e8SNigel Croxon   EFI_COMPONENT_NAME_GET_DRIVER_NAME      GetDriverName;
1159883702e8SNigel Croxon   EFI_COMPONENT_NAME_GET_CONTROLLER_NAME  GetControllerName;
1160883702e8SNigel Croxon   CHAR8                                   *SupportedLanguages;
11618118d087SNigel Croxon } EFI_COMPONENT_NAME_PROTOCOL;
1162883702e8SNigel Croxon 
11631b10394eSNigel Croxon typedef struct _EFI_COMPONENT_NAME_PROTOCOL _EFI_COMPONENT_NAME;
11641b10394eSNigel Croxon typedef EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME;
11658118d087SNigel Croxon 
11668118d087SNigel Croxon 
11678118d087SNigel Croxon /*
11688118d087SNigel Croxon  * EFI Component Name 2 Protocol
11698118d087SNigel Croxon  * UEFI Specification Version 2.5 Section 10.5
11708118d087SNigel Croxon  */
11718118d087SNigel Croxon #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
1172883702e8SNigel Croxon     {0x6A7A5CFF, 0xE8D9, 0x4F70, { 0xBA, 0xDA, 0x75, 0xAB, 0x30, 0x25, 0xCE, 0x14} }
11731b10394eSNigel Croxon #define COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL_GUID
1174883702e8SNigel Croxon 
11758118d087SNigel Croxon INTERFACE_DECL(_EFI_COMPONENT_NAME2_PROTOCOL);
1176883702e8SNigel Croxon 
1177883702e8SNigel Croxon typedef
1178883702e8SNigel Croxon EFI_STATUS
1179883702e8SNigel Croxon (EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME) (
11808118d087SNigel Croxon   IN      struct _EFI_COMPONENT_NAME2_PROTOCOL   *This,
1181883702e8SNigel Croxon   IN      CHAR8                                  *Language,
1182883702e8SNigel Croxon   OUT     CHAR16                                 **DriverName);
1183883702e8SNigel Croxon 
1184883702e8SNigel Croxon typedef
1185883702e8SNigel Croxon EFI_STATUS
1186883702e8SNigel Croxon (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) (
11878118d087SNigel Croxon   IN      struct _EFI_COMPONENT_NAME2_PROTOCOL   *This,
1188883702e8SNigel Croxon   IN      EFI_HANDLE                             ControllerHandle,
1189883702e8SNigel Croxon   IN      EFI_HANDLE                             ChildHandle OPTIONAL,
1190883702e8SNigel Croxon   IN      CHAR8                                  *Language,
1191883702e8SNigel Croxon   OUT     CHAR16                                 **ControllerName);
1192883702e8SNigel Croxon 
11938118d087SNigel Croxon typedef struct _EFI_COMPONENT_NAME2_PROTOCOL {
1194883702e8SNigel Croxon   EFI_COMPONENT_NAME2_GET_DRIVER_NAME       GetDriverName;
1195883702e8SNigel Croxon   EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME   GetControllerName;
1196883702e8SNigel Croxon   CHAR8                                     *SupportedLanguages;
11978118d087SNigel Croxon } EFI_COMPONENT_NAME2_PROTOCOL;
1198883702e8SNigel Croxon 
11991b10394eSNigel Croxon typedef struct _EFI_COMPONENT_NAME2_PROTOCOL _EFI_COMPONENT_NAME2;
12001b10394eSNigel Croxon typedef EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2;
12018118d087SNigel Croxon 
12028118d087SNigel Croxon 
12038118d087SNigel Croxon 
12048118d087SNigel Croxon /*
12058118d087SNigel Croxon  * EFI Loaded Image Protocol
12068118d087SNigel Croxon  * UEFI Specification Version 2.5 Section 8.1
12078118d087SNigel Croxon  */
12088118d087SNigel Croxon #define EFI_LOADED_IMAGE_PROTOCOL_GUID \
12093b31a5e3SNigel Croxon     { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
12101b10394eSNigel Croxon #define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID
12113b31a5e3SNigel Croxon 
12128118d087SNigel Croxon #define EFI_LOADED_IMAGE_PROTOCOL_REVISION  0x1000
12131b10394eSNigel Croxon #define EFI_IMAGE_INFORMATION_REVISION  EFI_LOADED_IMAGE_PROTOCOL_REVISION
12148118d087SNigel Croxon 
12153b31a5e3SNigel Croxon typedef
12163b31a5e3SNigel Croxon EFI_STATUS
12173b31a5e3SNigel Croxon (EFIAPI *EFI_IMAGE_UNLOAD) (
12183b31a5e3SNigel Croxon     IN EFI_HANDLE                   ImageHandle
12193b31a5e3SNigel Croxon     );
12203b31a5e3SNigel Croxon 
12213b31a5e3SNigel Croxon typedef struct {
12223b31a5e3SNigel Croxon     UINT32                          Revision;
12233b31a5e3SNigel Croxon     EFI_HANDLE                      ParentHandle;
12243b31a5e3SNigel Croxon     struct _EFI_SYSTEM_TABLE        *SystemTable;
12253b31a5e3SNigel Croxon 
12263b31a5e3SNigel Croxon     // Source location of image
12273b31a5e3SNigel Croxon     EFI_HANDLE                      DeviceHandle;
12283b31a5e3SNigel Croxon     EFI_DEVICE_PATH                 *FilePath;
12293b31a5e3SNigel Croxon     VOID                            *Reserved;
12303b31a5e3SNigel Croxon 
12313b31a5e3SNigel Croxon     // Images load options
12323b31a5e3SNigel Croxon     UINT32                          LoadOptionsSize;
12333b31a5e3SNigel Croxon     VOID                            *LoadOptions;
12343b31a5e3SNigel Croxon 
12353b31a5e3SNigel Croxon     // Location of where image was loaded
12363b31a5e3SNigel Croxon     VOID                            *ImageBase;
12373b31a5e3SNigel Croxon     UINT64                          ImageSize;
12383b31a5e3SNigel Croxon     EFI_MEMORY_TYPE                 ImageCodeType;
12393b31a5e3SNigel Croxon     EFI_MEMORY_TYPE                 ImageDataType;
12403b31a5e3SNigel Croxon 
12413b31a5e3SNigel Croxon     // If the driver image supports a dynamic unload request
12423b31a5e3SNigel Croxon     EFI_IMAGE_UNLOAD                Unload;
12438118d087SNigel Croxon } EFI_LOADED_IMAGE_PROTOCOL;
12443b31a5e3SNigel Croxon 
12451b10394eSNigel Croxon typedef EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE;
12468118d087SNigel Croxon 
12478118d087SNigel Croxon 
12488118d087SNigel Croxon 
12498118d087SNigel Croxon /*
12508118d087SNigel Croxon  * Random Number Generator Protocol
12518118d087SNigel Croxon  * UEFI Specification Version 2.5 Section 35.5
12528118d087SNigel Croxon  */
12539b0fe34eSNigel Croxon #define EFI_RNG_PROTOCOL_GUID                          \
12549b0fe34eSNigel Croxon           { 0x3152bca5, 0xeade, 0x433d, {0x86, 0x2e, 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44} }
12559b0fe34eSNigel Croxon 
12569b0fe34eSNigel Croxon typedef EFI_GUID EFI_RNG_ALGORITHM;
12579b0fe34eSNigel Croxon 
12589b0fe34eSNigel Croxon #define EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID       \
12599b0fe34eSNigel Croxon      {0xa7af67cb, 0x603b, 0x4d42, {0xba, 0x21, 0x70, 0xbf, 0xb6, 0x29, 0x3f, 0x96} }
12609b0fe34eSNigel Croxon 
12619b0fe34eSNigel Croxon #define EFI_RNG_ALGORITHM_SP800_90_HMAC_256_GUID       \
12629b0fe34eSNigel Croxon      {0xc5149b43, 0xae85, 0x4f53, {0x99, 0x82, 0xb9, 0x43, 0x35, 0xd3, 0xa9, 0xe7} }
12639b0fe34eSNigel Croxon 
12649b0fe34eSNigel Croxon #define EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID        \
12659b0fe34eSNigel Croxon      {0x44f0de6e, 0x4d8c, 0x4045, {0xa8, 0xc7, 0x4d, 0xd1, 0x68, 0x85, 0x6b, 0x9e} }
12669b0fe34eSNigel Croxon 
12679b0fe34eSNigel Croxon #define EFI_RNG_ALGORITHM_X9_31_3DES_GUID              \
12689b0fe34eSNigel Croxon      {0x63c4785a, 0xca34, 0x4012, {0xa3, 0xc8, 0x0b, 0x6a, 0x32, 0x4f, 0x55, 0x46} }
12699b0fe34eSNigel Croxon 
12709b0fe34eSNigel Croxon #define EFI_RNG_ALGORITHM_X9_31_AES_GUID               \
12719b0fe34eSNigel Croxon      {0xacd03321, 0x777e, 0x4d3d, {0xb1, 0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9} }
12729b0fe34eSNigel Croxon 
12739b0fe34eSNigel Croxon #define EFI_RNG_ALGORITHM_RAW                          \
12749b0fe34eSNigel Croxon      {0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61} }
12759b0fe34eSNigel Croxon 
12769b0fe34eSNigel Croxon INTERFACE_DECL(_EFI_RNG_PROTOCOL);
12779b0fe34eSNigel Croxon 
12789b0fe34eSNigel Croxon typedef
12799b0fe34eSNigel Croxon EFI_STATUS
12809b0fe34eSNigel Croxon (EFIAPI *EFI_RNG_GET_INFO) (
12819b0fe34eSNigel Croxon   IN      struct _EFI_RNG_PROTOCOL   *This,
12829b0fe34eSNigel Croxon   IN OUT  UINTN                      *RNGAlgorithmListSize,
12839b0fe34eSNigel Croxon   OUT     EFI_RNG_ALGORITHM          *RNGAlgorithmList
12849b0fe34eSNigel Croxon );
12859b0fe34eSNigel Croxon 
12869b0fe34eSNigel Croxon typedef
12879b0fe34eSNigel Croxon EFI_STATUS
12889b0fe34eSNigel Croxon (EFIAPI *EFI_RNG_GET_RNG) (
12899b0fe34eSNigel Croxon   IN      struct _EFI_RNG_PROTOCOL   *This,
12909b0fe34eSNigel Croxon   IN      EFI_RNG_ALGORITHM          *RNGAlgorithm,           OPTIONAL
12919b0fe34eSNigel Croxon   IN      UINTN                      RNGValueLength,
12929b0fe34eSNigel Croxon   OUT     UINT8                      *RNGValue
12939b0fe34eSNigel Croxon );
12949b0fe34eSNigel Croxon 
12959b0fe34eSNigel Croxon typedef struct _EFI_RNG_PROTOCOL {
12969b0fe34eSNigel Croxon           EFI_RNG_GET_INFO           GetInfo;
12979b0fe34eSNigel Croxon           EFI_RNG_GET_RNG            GetRNG;
12989b0fe34eSNigel Croxon } EFI_RNG_PROTOCOL;
12999b0fe34eSNigel Croxon 
13009b0fe34eSNigel Croxon 
130163213a7bSNigel Croxon //
130263213a7bSNigel Croxon // EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL
130363213a7bSNigel Croxon //
130463213a7bSNigel Croxon 
130563213a7bSNigel Croxon #define EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_GUID          \
130663213a7bSNigel Croxon           { 0x6b30c738, 0xa391, 0x11d4, {0x9a, 0x3b, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
130763213a7bSNigel Croxon 
130863213a7bSNigel Croxon INTERFACE_DECL(_EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL);
130963213a7bSNigel Croxon 
131063213a7bSNigel Croxon typedef
131163213a7bSNigel Croxon EFI_STATUS
131263213a7bSNigel Croxon (EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER) (
131363213a7bSNigel Croxon IN      struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL  *This,
131463213a7bSNigel Croxon IN      EFI_HANDLE                                      ControllerHandle,
131563213a7bSNigel Croxon IN OUT  EFI_HANDLE                                     *DriverImageHandle);
131663213a7bSNigel Croxon 
131763213a7bSNigel Croxon typedef
131863213a7bSNigel Croxon EFI_STATUS
131963213a7bSNigel Croxon (EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH) (
132063213a7bSNigel Croxon IN      struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL  *This,
132163213a7bSNigel Croxon IN      EFI_HANDLE                                      ControllerHandle,
132263213a7bSNigel Croxon IN OUT  EFI_DEVICE_PATH                               **DriverImagePath);
132363213a7bSNigel Croxon 
132463213a7bSNigel Croxon typedef
132563213a7bSNigel Croxon EFI_STATUS
132663213a7bSNigel Croxon (EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED) (
132763213a7bSNigel Croxon IN      struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL  *This,
132863213a7bSNigel Croxon IN      EFI_HANDLE                                      ControllerHandle,
132963213a7bSNigel Croxon IN      EFI_DEVICE_PATH                                *DriverImagePath,
133063213a7bSNigel Croxon IN      EFI_HANDLE                                      DriverImageHandle);
133163213a7bSNigel Croxon 
133263213a7bSNigel Croxon typedef struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL {
133363213a7bSNigel Croxon   EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER       GetDriver;
133463213a7bSNigel Croxon   EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH  GetDriverPath;
133563213a7bSNigel Croxon   EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED    DriverLoaded;
133663213a7bSNigel Croxon } EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL;
133763213a7bSNigel Croxon 
133863213a7bSNigel Croxon //
133963213a7bSNigel Croxon // EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL
134063213a7bSNigel Croxon //
134163213a7bSNigel Croxon 
134263213a7bSNigel Croxon #define EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID          \
134363213a7bSNigel Croxon           { 0x3bc1b285, 0x8a15, 0x4a82, {0xaa, 0xbf, 0x4d, 0x7d, 0x13, 0xfb, 0x32, 0x65} }
134463213a7bSNigel Croxon 
134563213a7bSNigel Croxon INTERFACE_DECL(_EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL);
134663213a7bSNigel Croxon 
134763213a7bSNigel Croxon typedef
134863213a7bSNigel Croxon EFI_STATUS
134963213a7bSNigel Croxon (EFIAPI *EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER) (
135063213a7bSNigel Croxon IN      struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL  *This,
135163213a7bSNigel Croxon IN OUT  EFI_HANDLE                                         *DriverImageHandle);
135263213a7bSNigel Croxon 
135363213a7bSNigel Croxon typedef struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL {
135463213a7bSNigel Croxon   EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER       GetDriver;
135563213a7bSNigel Croxon } EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL;
135663213a7bSNigel Croxon 
135763213a7bSNigel Croxon //
135863213a7bSNigel Croxon // EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL
135963213a7bSNigel Croxon //
136063213a7bSNigel Croxon 
136163213a7bSNigel Croxon #define EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL_GUID          \
136263213a7bSNigel Croxon           { 0xb1ee129e, 0xda36, 0x4181, {0x91, 0xf8, 0x04, 0xa4, 0x92, 0x37, 0x66, 0xa7} }
136363213a7bSNigel Croxon 
136463213a7bSNigel Croxon INTERFACE_DECL(_EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL);
136563213a7bSNigel Croxon 
136663213a7bSNigel Croxon typedef
136763213a7bSNigel Croxon UINT32
136863213a7bSNigel Croxon (EFIAPI *EFI_DRIVER_FAMILY_OVERRIDE_GET_VERSION) (
136963213a7bSNigel Croxon IN      struct _EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL  *This);
137063213a7bSNigel Croxon 
137163213a7bSNigel Croxon typedef struct _EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL {
137263213a7bSNigel Croxon   EFI_DRIVER_FAMILY_OVERRIDE_GET_VERSION       GetVersion;
137363213a7bSNigel Croxon } EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL;
137463213a7bSNigel Croxon 
1375*447ad9aaSNigel Croxon //
1376*447ad9aaSNigel Croxon // EFI_EBC_PROTOCOL
1377*447ad9aaSNigel Croxon //
1378*447ad9aaSNigel Croxon 
1379*447ad9aaSNigel Croxon #define EFI_EBC_INTERPRETER_PROTOCOL_GUID              \
1380*447ad9aaSNigel Croxon      {0x13ac6dd1, 0x73d0, 0x11d4, {0xb0, 0x6b, 0x00, 0xaa, 0x00, 0xbd, 0x6d, 0xe7} }
1381*447ad9aaSNigel Croxon 
1382*447ad9aaSNigel Croxon #define EFI_EBC_PROTOCOL_GUID EFI_EBC_INTERPRETER_PROTOCOL_GUID
1383*447ad9aaSNigel Croxon 
1384*447ad9aaSNigel Croxon INTERFACE_DECL(_EFI_EBC_PROTOCOL);
1385*447ad9aaSNigel Croxon 
1386*447ad9aaSNigel Croxon typedef
1387*447ad9aaSNigel Croxon EFI_STATUS
1388*447ad9aaSNigel Croxon (EFIAPI *EFI_EBC_CREATE_THUNK)(
1389*447ad9aaSNigel Croxon   IN struct _EFI_EBC_PROTOCOL   *This,
1390*447ad9aaSNigel Croxon   IN EFI_HANDLE                 ImageHandle,
1391*447ad9aaSNigel Croxon   IN VOID                       *EbcEntryPoint,
1392*447ad9aaSNigel Croxon   OUT VOID                      **Thunk);
1393*447ad9aaSNigel Croxon 
1394*447ad9aaSNigel Croxon typedef
1395*447ad9aaSNigel Croxon EFI_STATUS
1396*447ad9aaSNigel Croxon (EFIAPI *EFI_EBC_UNLOAD_IMAGE)(
1397*447ad9aaSNigel Croxon   IN struct _EFI_EBC_PROTOCOL   *This,
1398*447ad9aaSNigel Croxon   IN EFI_HANDLE                 ImageHandle);
1399*447ad9aaSNigel Croxon 
1400*447ad9aaSNigel Croxon typedef
1401*447ad9aaSNigel Croxon EFI_STATUS
1402*447ad9aaSNigel Croxon (EFIAPI *EBC_ICACHE_FLUSH)(
1403*447ad9aaSNigel Croxon   IN EFI_PHYSICAL_ADDRESS       Start,
1404*447ad9aaSNigel Croxon   IN UINT64                     Length);
1405*447ad9aaSNigel Croxon 
1406*447ad9aaSNigel Croxon typedef
1407*447ad9aaSNigel Croxon EFI_STATUS
1408*447ad9aaSNigel Croxon (EFIAPI *EFI_EBC_REGISTER_ICACHE_FLUSH)(
1409*447ad9aaSNigel Croxon   IN struct _EFI_EBC_PROTOCOL   *This,
1410*447ad9aaSNigel Croxon   IN EBC_ICACHE_FLUSH           Flush);
1411*447ad9aaSNigel Croxon 
1412*447ad9aaSNigel Croxon typedef
1413*447ad9aaSNigel Croxon EFI_STATUS
1414*447ad9aaSNigel Croxon (EFIAPI *EFI_EBC_GET_VERSION)(
1415*447ad9aaSNigel Croxon   IN struct _EFI_EBC_PROTOCOL   *This,
1416*447ad9aaSNigel Croxon   IN OUT UINT64                 *Version);
1417*447ad9aaSNigel Croxon 
1418*447ad9aaSNigel Croxon typedef struct _EFI_EBC_PROTOCOL {
1419*447ad9aaSNigel Croxon   EFI_EBC_CREATE_THUNK          CreateThunk;
1420*447ad9aaSNigel Croxon   EFI_EBC_UNLOAD_IMAGE          UnloadImage;
1421*447ad9aaSNigel Croxon   EFI_EBC_REGISTER_ICACHE_FLUSH RegisterICacheFlush;
1422*447ad9aaSNigel Croxon   EFI_EBC_GET_VERSION           GetVersion;
1423*447ad9aaSNigel Croxon } EFI_EBC_PROTOCOL;
142463213a7bSNigel Croxon 
1425530d68baSNigel Croxon #endif
1426