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 // 25530d68baSNigel Croxon #define FPSWA_PROTOCOL \ 26530d68baSNigel Croxon { 0xc41b6531, 0x97b9, 0x11d3, {0x9a, 0x29, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } 27530d68baSNigel Croxon 28530d68baSNigel Croxon // 29530d68baSNigel Croxon // Device Path protocol 30530d68baSNigel Croxon // 31530d68baSNigel Croxon 32530d68baSNigel Croxon #define DEVICE_PATH_PROTOCOL \ 33530d68baSNigel Croxon { 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } 34530d68baSNigel Croxon 35530d68baSNigel Croxon 36530d68baSNigel Croxon // 37530d68baSNigel Croxon // Block IO protocol 38530d68baSNigel Croxon // 39530d68baSNigel Croxon 40530d68baSNigel Croxon #define BLOCK_IO_PROTOCOL \ 41530d68baSNigel Croxon { 0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } 42530d68baSNigel Croxon #define EFI_BLOCK_IO_INTERFACE_REVISION 0x00010000 43530d68baSNigel Croxon #define EFI_BLOCK_IO_INTERFACE_REVISION2 0x00020001 44530d68baSNigel Croxon #define EFI_BLOCK_IO_INTERFACE_REVISION3 ((2<<16) | 31) 45530d68baSNigel Croxon 46530d68baSNigel Croxon INTERFACE_DECL(_EFI_BLOCK_IO); 47530d68baSNigel Croxon 48530d68baSNigel Croxon typedef 49530d68baSNigel Croxon EFI_STATUS 50530d68baSNigel Croxon (EFIAPI *EFI_BLOCK_RESET) ( 51530d68baSNigel Croxon IN struct _EFI_BLOCK_IO *This, 52530d68baSNigel Croxon IN BOOLEAN ExtendedVerification 53530d68baSNigel Croxon ); 54530d68baSNigel Croxon 55530d68baSNigel Croxon typedef 56530d68baSNigel Croxon EFI_STATUS 57530d68baSNigel Croxon (EFIAPI *EFI_BLOCK_READ) ( 58530d68baSNigel Croxon IN struct _EFI_BLOCK_IO *This, 59530d68baSNigel Croxon IN UINT32 MediaId, 60530d68baSNigel Croxon IN EFI_LBA LBA, 61530d68baSNigel Croxon IN UINTN BufferSize, 62530d68baSNigel Croxon OUT VOID *Buffer 63530d68baSNigel Croxon ); 64530d68baSNigel Croxon 65530d68baSNigel Croxon 66530d68baSNigel Croxon typedef 67530d68baSNigel Croxon EFI_STATUS 68530d68baSNigel Croxon (EFIAPI *EFI_BLOCK_WRITE) ( 69530d68baSNigel Croxon IN struct _EFI_BLOCK_IO *This, 70530d68baSNigel Croxon IN UINT32 MediaId, 71530d68baSNigel Croxon IN EFI_LBA LBA, 72530d68baSNigel Croxon IN UINTN BufferSize, 73530d68baSNigel Croxon IN VOID *Buffer 74530d68baSNigel Croxon ); 75530d68baSNigel Croxon 76530d68baSNigel Croxon 77530d68baSNigel Croxon typedef 78530d68baSNigel Croxon EFI_STATUS 79530d68baSNigel Croxon (EFIAPI *EFI_BLOCK_FLUSH) ( 80530d68baSNigel Croxon IN struct _EFI_BLOCK_IO *This 81530d68baSNigel Croxon ); 82530d68baSNigel Croxon 83530d68baSNigel Croxon 84530d68baSNigel Croxon 85530d68baSNigel Croxon typedef struct { 86530d68baSNigel Croxon UINT32 MediaId; 87530d68baSNigel Croxon BOOLEAN RemovableMedia; 88530d68baSNigel Croxon BOOLEAN MediaPresent; 89530d68baSNigel Croxon 90530d68baSNigel Croxon BOOLEAN LogicalPartition; 91530d68baSNigel Croxon BOOLEAN ReadOnly; 92530d68baSNigel Croxon BOOLEAN WriteCaching; 93530d68baSNigel Croxon 94530d68baSNigel Croxon UINT32 BlockSize; 95530d68baSNigel Croxon UINT32 IoAlign; 96530d68baSNigel Croxon 97530d68baSNigel Croxon EFI_LBA LastBlock; 98530d68baSNigel Croxon 99530d68baSNigel Croxon /* revision 2 */ 100530d68baSNigel Croxon EFI_LBA LowestAlignedLba; 101530d68baSNigel Croxon UINT32 LogicalBlocksPerPhysicalBlock; 102530d68baSNigel Croxon /* revision 3 */ 103530d68baSNigel Croxon UINT32 OptimalTransferLengthGranularity; 104530d68baSNigel Croxon } EFI_BLOCK_IO_MEDIA; 105530d68baSNigel Croxon 106530d68baSNigel Croxon typedef struct _EFI_BLOCK_IO { 107530d68baSNigel Croxon UINT64 Revision; 108530d68baSNigel Croxon 109530d68baSNigel Croxon EFI_BLOCK_IO_MEDIA *Media; 110530d68baSNigel Croxon 111530d68baSNigel Croxon EFI_BLOCK_RESET Reset; 112530d68baSNigel Croxon EFI_BLOCK_READ ReadBlocks; 113530d68baSNigel Croxon EFI_BLOCK_WRITE WriteBlocks; 114530d68baSNigel Croxon EFI_BLOCK_FLUSH FlushBlocks; 115530d68baSNigel Croxon 116530d68baSNigel Croxon } EFI_BLOCK_IO; 117530d68baSNigel Croxon 118530d68baSNigel Croxon 119530d68baSNigel Croxon 120530d68baSNigel Croxon // 121530d68baSNigel Croxon // Disk Block IO protocol 122530d68baSNigel Croxon // 123530d68baSNigel Croxon 124530d68baSNigel Croxon #define DISK_IO_PROTOCOL \ 125530d68baSNigel Croxon { 0xce345171, 0xba0b, 0x11d2, {0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } 126530d68baSNigel Croxon #define EFI_DISK_IO_INTERFACE_REVISION 0x00010000 127530d68baSNigel Croxon 128530d68baSNigel Croxon INTERFACE_DECL(_EFI_DISK_IO); 129530d68baSNigel Croxon 130530d68baSNigel Croxon typedef 131530d68baSNigel Croxon EFI_STATUS 132530d68baSNigel Croxon (EFIAPI *EFI_DISK_READ) ( 133530d68baSNigel Croxon IN struct _EFI_DISK_IO *This, 134530d68baSNigel Croxon IN UINT32 MediaId, 135530d68baSNigel Croxon IN UINT64 Offset, 136530d68baSNigel Croxon IN UINTN BufferSize, 137530d68baSNigel Croxon OUT VOID *Buffer 138530d68baSNigel Croxon ); 139530d68baSNigel Croxon 140530d68baSNigel Croxon 141530d68baSNigel Croxon typedef 142530d68baSNigel Croxon EFI_STATUS 143530d68baSNigel Croxon (EFIAPI *EFI_DISK_WRITE) ( 144530d68baSNigel Croxon IN struct _EFI_DISK_IO *This, 145530d68baSNigel Croxon IN UINT32 MediaId, 146530d68baSNigel Croxon IN UINT64 Offset, 147530d68baSNigel Croxon IN UINTN BufferSize, 148530d68baSNigel Croxon IN VOID *Buffer 149530d68baSNigel Croxon ); 150530d68baSNigel Croxon 151530d68baSNigel Croxon 152530d68baSNigel Croxon typedef struct _EFI_DISK_IO { 153530d68baSNigel Croxon UINT64 Revision; 154530d68baSNigel Croxon EFI_DISK_READ ReadDisk; 155530d68baSNigel Croxon EFI_DISK_WRITE WriteDisk; 156530d68baSNigel Croxon } EFI_DISK_IO; 157530d68baSNigel Croxon 158530d68baSNigel Croxon 159530d68baSNigel Croxon // 160530d68baSNigel Croxon // Simple file system protocol 161530d68baSNigel Croxon // 162530d68baSNigel Croxon 163530d68baSNigel Croxon #define SIMPLE_FILE_SYSTEM_PROTOCOL \ 164530d68baSNigel Croxon { 0x964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } 165530d68baSNigel Croxon 166530d68baSNigel Croxon INTERFACE_DECL(_EFI_FILE_IO_INTERFACE); 167530d68baSNigel Croxon INTERFACE_DECL(_EFI_FILE_HANDLE); 168530d68baSNigel Croxon 169530d68baSNigel Croxon typedef 170530d68baSNigel Croxon EFI_STATUS 171530d68baSNigel Croxon (EFIAPI *EFI_VOLUME_OPEN) ( 172530d68baSNigel Croxon IN struct _EFI_FILE_IO_INTERFACE *This, 173530d68baSNigel Croxon OUT struct _EFI_FILE_HANDLE **Root 174530d68baSNigel Croxon ); 175530d68baSNigel Croxon 176530d68baSNigel Croxon #define EFI_FILE_IO_INTERFACE_REVISION 0x00010000 177530d68baSNigel Croxon 178530d68baSNigel Croxon typedef struct _EFI_FILE_IO_INTERFACE { 179530d68baSNigel Croxon UINT64 Revision; 180530d68baSNigel Croxon EFI_VOLUME_OPEN OpenVolume; 181530d68baSNigel Croxon } EFI_FILE_IO_INTERFACE; 182530d68baSNigel Croxon 183530d68baSNigel Croxon // 184530d68baSNigel Croxon // 185530d68baSNigel Croxon // 186530d68baSNigel Croxon 187530d68baSNigel Croxon typedef 188530d68baSNigel Croxon EFI_STATUS 189530d68baSNigel Croxon (EFIAPI *EFI_FILE_OPEN) ( 190530d68baSNigel Croxon IN struct _EFI_FILE_HANDLE *File, 191530d68baSNigel Croxon OUT struct _EFI_FILE_HANDLE **NewHandle, 192530d68baSNigel Croxon IN CHAR16 *FileName, 193530d68baSNigel Croxon IN UINT64 OpenMode, 194530d68baSNigel Croxon IN UINT64 Attributes 195530d68baSNigel Croxon ); 196530d68baSNigel Croxon 197530d68baSNigel Croxon // Open modes 198530d68baSNigel Croxon #define EFI_FILE_MODE_READ 0x0000000000000001 199530d68baSNigel Croxon #define EFI_FILE_MODE_WRITE 0x0000000000000002 200530d68baSNigel Croxon #define EFI_FILE_MODE_CREATE 0x8000000000000000 201530d68baSNigel Croxon 202530d68baSNigel Croxon // File attributes 203530d68baSNigel Croxon #define EFI_FILE_READ_ONLY 0x0000000000000001 204530d68baSNigel Croxon #define EFI_FILE_HIDDEN 0x0000000000000002 205530d68baSNigel Croxon #define EFI_FILE_SYSTEM 0x0000000000000004 206530d68baSNigel Croxon #define EFI_FILE_RESERVIED 0x0000000000000008 207530d68baSNigel Croxon #define EFI_FILE_DIRECTORY 0x0000000000000010 208530d68baSNigel Croxon #define EFI_FILE_ARCHIVE 0x0000000000000020 209530d68baSNigel Croxon #define EFI_FILE_VALID_ATTR 0x0000000000000037 210530d68baSNigel Croxon 211530d68baSNigel Croxon typedef 212530d68baSNigel Croxon EFI_STATUS 213530d68baSNigel Croxon (EFIAPI *EFI_FILE_CLOSE) ( 214530d68baSNigel Croxon IN struct _EFI_FILE_HANDLE *File 215530d68baSNigel Croxon ); 216530d68baSNigel Croxon 217530d68baSNigel Croxon typedef 218530d68baSNigel Croxon EFI_STATUS 219530d68baSNigel Croxon (EFIAPI *EFI_FILE_DELETE) ( 220530d68baSNigel Croxon IN struct _EFI_FILE_HANDLE *File 221530d68baSNigel Croxon ); 222530d68baSNigel Croxon 223530d68baSNigel Croxon typedef 224530d68baSNigel Croxon EFI_STATUS 225530d68baSNigel Croxon (EFIAPI *EFI_FILE_READ) ( 226530d68baSNigel Croxon IN struct _EFI_FILE_HANDLE *File, 227530d68baSNigel Croxon IN OUT UINTN *BufferSize, 228530d68baSNigel Croxon OUT VOID *Buffer 229530d68baSNigel Croxon ); 230530d68baSNigel Croxon 231530d68baSNigel Croxon typedef 232530d68baSNigel Croxon EFI_STATUS 233530d68baSNigel Croxon (EFIAPI *EFI_FILE_WRITE) ( 234530d68baSNigel Croxon IN struct _EFI_FILE_HANDLE *File, 235530d68baSNigel Croxon IN OUT UINTN *BufferSize, 236530d68baSNigel Croxon IN VOID *Buffer 237530d68baSNigel Croxon ); 238530d68baSNigel Croxon 239530d68baSNigel Croxon typedef 240530d68baSNigel Croxon EFI_STATUS 241530d68baSNigel Croxon (EFIAPI *EFI_FILE_SET_POSITION) ( 242530d68baSNigel Croxon IN struct _EFI_FILE_HANDLE *File, 243530d68baSNigel Croxon IN UINT64 Position 244530d68baSNigel Croxon ); 245530d68baSNigel Croxon 246530d68baSNigel Croxon typedef 247530d68baSNigel Croxon EFI_STATUS 248530d68baSNigel Croxon (EFIAPI *EFI_FILE_GET_POSITION) ( 249530d68baSNigel Croxon IN struct _EFI_FILE_HANDLE *File, 250530d68baSNigel Croxon OUT UINT64 *Position 251530d68baSNigel Croxon ); 252530d68baSNigel Croxon 253530d68baSNigel Croxon typedef 254530d68baSNigel Croxon EFI_STATUS 255530d68baSNigel Croxon (EFIAPI *EFI_FILE_GET_INFO) ( 256530d68baSNigel Croxon IN struct _EFI_FILE_HANDLE *File, 257530d68baSNigel Croxon IN EFI_GUID *InformationType, 258530d68baSNigel Croxon IN OUT UINTN *BufferSize, 259530d68baSNigel Croxon OUT VOID *Buffer 260530d68baSNigel Croxon ); 261530d68baSNigel Croxon 262530d68baSNigel Croxon typedef 263530d68baSNigel Croxon EFI_STATUS 264530d68baSNigel Croxon (EFIAPI *EFI_FILE_SET_INFO) ( 265530d68baSNigel Croxon IN struct _EFI_FILE_HANDLE *File, 266530d68baSNigel Croxon IN EFI_GUID *InformationType, 267530d68baSNigel Croxon IN UINTN BufferSize, 268530d68baSNigel Croxon IN VOID *Buffer 269530d68baSNigel Croxon ); 270530d68baSNigel Croxon 271530d68baSNigel Croxon typedef 272530d68baSNigel Croxon EFI_STATUS 273530d68baSNigel Croxon (EFIAPI *EFI_FILE_FLUSH) ( 274530d68baSNigel Croxon IN struct _EFI_FILE_HANDLE *File 275530d68baSNigel Croxon ); 276530d68baSNigel Croxon 277530d68baSNigel Croxon 278530d68baSNigel Croxon 279530d68baSNigel Croxon #define EFI_FILE_HANDLE_REVISION 0x00010000 280530d68baSNigel Croxon typedef struct _EFI_FILE_HANDLE { 281530d68baSNigel Croxon UINT64 Revision; 282530d68baSNigel Croxon EFI_FILE_OPEN Open; 283530d68baSNigel Croxon EFI_FILE_CLOSE Close; 284530d68baSNigel Croxon EFI_FILE_DELETE Delete; 285530d68baSNigel Croxon EFI_FILE_READ Read; 286530d68baSNigel Croxon EFI_FILE_WRITE Write; 287530d68baSNigel Croxon EFI_FILE_GET_POSITION GetPosition; 288530d68baSNigel Croxon EFI_FILE_SET_POSITION SetPosition; 289530d68baSNigel Croxon EFI_FILE_GET_INFO GetInfo; 290530d68baSNigel Croxon EFI_FILE_SET_INFO SetInfo; 291530d68baSNigel Croxon EFI_FILE_FLUSH Flush; 292530d68baSNigel Croxon } EFI_FILE, *EFI_FILE_HANDLE; 293530d68baSNigel Croxon 294530d68baSNigel Croxon 295530d68baSNigel Croxon // 296530d68baSNigel Croxon // File information types 297530d68baSNigel Croxon // 298530d68baSNigel Croxon 299530d68baSNigel Croxon #define EFI_FILE_INFO_ID \ 300530d68baSNigel Croxon { 0x9576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } 301530d68baSNigel Croxon 302530d68baSNigel Croxon typedef struct { 303530d68baSNigel Croxon UINT64 Size; 304530d68baSNigel Croxon UINT64 FileSize; 305530d68baSNigel Croxon UINT64 PhysicalSize; 306530d68baSNigel Croxon EFI_TIME CreateTime; 307530d68baSNigel Croxon EFI_TIME LastAccessTime; 308530d68baSNigel Croxon EFI_TIME ModificationTime; 309530d68baSNigel Croxon UINT64 Attribute; 310530d68baSNigel Croxon CHAR16 FileName[1]; 311530d68baSNigel Croxon } EFI_FILE_INFO; 312530d68baSNigel Croxon 313530d68baSNigel Croxon // 314530d68baSNigel Croxon // The FileName field of the EFI_FILE_INFO data structure is variable length. 315530d68baSNigel Croxon // Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to 316530d68baSNigel Croxon // be the size of the data structure without the FileName field. The following macro 317530d68baSNigel Croxon // computes this size correctly no matter how big the FileName array is declared. 318530d68baSNigel Croxon // This is required to make the EFI_FILE_INFO data structure ANSI compilant. 319530d68baSNigel Croxon // 320530d68baSNigel Croxon 321530d68baSNigel Croxon #define SIZE_OF_EFI_FILE_INFO EFI_FIELD_OFFSET(EFI_FILE_INFO,FileName) 322530d68baSNigel Croxon 323530d68baSNigel Croxon #define EFI_FILE_SYSTEM_INFO_ID \ 324530d68baSNigel Croxon { 0x9576e93, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } 325530d68baSNigel Croxon 326530d68baSNigel Croxon typedef struct { 327530d68baSNigel Croxon UINT64 Size; 328530d68baSNigel Croxon BOOLEAN ReadOnly; 329530d68baSNigel Croxon UINT64 VolumeSize; 330530d68baSNigel Croxon UINT64 FreeSpace; 331530d68baSNigel Croxon UINT32 BlockSize; 332530d68baSNigel Croxon CHAR16 VolumeLabel[1]; 333530d68baSNigel Croxon } EFI_FILE_SYSTEM_INFO; 334530d68baSNigel Croxon 335530d68baSNigel Croxon // 336530d68baSNigel Croxon // The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length. 337530d68baSNigel Croxon // Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs 338530d68baSNigel Croxon // to be the size of the data structure without the VolumeLable field. The following macro 339530d68baSNigel Croxon // computes this size correctly no matter how big the VolumeLable array is declared. 340530d68baSNigel Croxon // This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant. 341530d68baSNigel Croxon // 342530d68baSNigel Croxon 343530d68baSNigel Croxon #define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_INFO,VolumeLabel) 344530d68baSNigel Croxon 345530d68baSNigel Croxon #define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID \ 346530d68baSNigel Croxon { 0xDB47D7D3,0xFE81, 0x11d3, {0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} } 347530d68baSNigel Croxon 348530d68baSNigel Croxon typedef struct { 349530d68baSNigel Croxon CHAR16 VolumeLabel[1]; 350530d68baSNigel Croxon } EFI_FILE_SYSTEM_VOLUME_LABEL_INFO; 351530d68baSNigel Croxon 352530d68baSNigel Croxon #define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_VOLUME_LABEL_INFO,VolumeLabel) 353530d68baSNigel Croxon 354530d68baSNigel Croxon // 355530d68baSNigel Croxon // Load file protocol 356530d68baSNigel Croxon // 357530d68baSNigel Croxon 358530d68baSNigel Croxon 359530d68baSNigel Croxon #define LOAD_FILE_PROTOCOL \ 360530d68baSNigel Croxon { 0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} } 361530d68baSNigel Croxon 362530d68baSNigel Croxon INTERFACE_DECL(_EFI_LOAD_FILE_INTERFACE); 363530d68baSNigel Croxon 364530d68baSNigel Croxon typedef 365530d68baSNigel Croxon EFI_STATUS 366530d68baSNigel Croxon (EFIAPI *EFI_LOAD_FILE) ( 367530d68baSNigel Croxon IN struct _EFI_LOAD_FILE_INTERFACE *This, 368530d68baSNigel Croxon IN EFI_DEVICE_PATH *FilePath, 369530d68baSNigel Croxon IN BOOLEAN BootPolicy, 370530d68baSNigel Croxon IN OUT UINTN *BufferSize, 371530d68baSNigel Croxon IN VOID *Buffer OPTIONAL 372530d68baSNigel Croxon ); 373530d68baSNigel Croxon 374530d68baSNigel Croxon typedef struct _EFI_LOAD_FILE_INTERFACE { 375530d68baSNigel Croxon EFI_LOAD_FILE LoadFile; 376530d68baSNigel Croxon } EFI_LOAD_FILE_INTERFACE; 377530d68baSNigel Croxon 378530d68baSNigel Croxon 379530d68baSNigel Croxon // 380530d68baSNigel Croxon // Device IO protocol 381530d68baSNigel Croxon // 382530d68baSNigel Croxon 383530d68baSNigel Croxon #define DEVICE_IO_PROTOCOL \ 384530d68baSNigel Croxon { 0xaf6ac311, 0x84c3, 0x11d2, {0x8e, 0x3c, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } 385530d68baSNigel Croxon 386530d68baSNigel Croxon INTERFACE_DECL(_EFI_DEVICE_IO_INTERFACE); 387530d68baSNigel Croxon 388530d68baSNigel Croxon typedef enum { 389530d68baSNigel Croxon IO_UINT8, 390530d68baSNigel Croxon IO_UINT16, 391530d68baSNigel Croxon IO_UINT32, 392530d68baSNigel Croxon IO_UINT64, 393530d68baSNigel Croxon // 394530d68baSNigel Croxon // Specification Change: Copy from MMIO to MMIO vs. MMIO to buffer, buffer to MMIO 395530d68baSNigel Croxon // 396530d68baSNigel Croxon MMIO_COPY_UINT8, 397530d68baSNigel Croxon MMIO_COPY_UINT16, 398530d68baSNigel Croxon MMIO_COPY_UINT32, 399530d68baSNigel Croxon MMIO_COPY_UINT64 400530d68baSNigel Croxon } EFI_IO_WIDTH; 401530d68baSNigel Croxon 402530d68baSNigel Croxon #define EFI_PCI_ADDRESS(_bus,_dev,_func) \ 403530d68baSNigel Croxon ( (UINT64) ( (((UINTN)_bus) << 24) + (((UINTN)_dev) << 16) + (((UINTN)_func) << 8) ) ) 404530d68baSNigel Croxon 405530d68baSNigel Croxon 406530d68baSNigel Croxon typedef 407530d68baSNigel Croxon EFI_STATUS 408530d68baSNigel Croxon (EFIAPI *EFI_DEVICE_IO) ( 409530d68baSNigel Croxon IN struct _EFI_DEVICE_IO_INTERFACE *This, 410530d68baSNigel Croxon IN EFI_IO_WIDTH Width, 411530d68baSNigel Croxon IN UINT64 Address, 412530d68baSNigel Croxon IN UINTN Count, 413530d68baSNigel Croxon IN OUT VOID *Buffer 414530d68baSNigel Croxon ); 415530d68baSNigel Croxon 416530d68baSNigel Croxon typedef struct { 417530d68baSNigel Croxon EFI_DEVICE_IO Read; 418530d68baSNigel Croxon EFI_DEVICE_IO Write; 419530d68baSNigel Croxon } EFI_IO_ACCESS; 420530d68baSNigel Croxon 421530d68baSNigel Croxon typedef 422530d68baSNigel Croxon EFI_STATUS 423530d68baSNigel Croxon (EFIAPI *EFI_PCI_DEVICE_PATH) ( 424530d68baSNigel Croxon IN struct _EFI_DEVICE_IO_INTERFACE *This, 425530d68baSNigel Croxon IN UINT64 Address, 426530d68baSNigel Croxon IN OUT EFI_DEVICE_PATH **PciDevicePath 427530d68baSNigel Croxon ); 428530d68baSNigel Croxon 429530d68baSNigel Croxon typedef enum { 430530d68baSNigel Croxon EfiBusMasterRead, 431530d68baSNigel Croxon EfiBusMasterWrite, 432530d68baSNigel Croxon EfiBusMasterCommonBuffer 433530d68baSNigel Croxon } EFI_IO_OPERATION_TYPE; 434530d68baSNigel Croxon 435530d68baSNigel Croxon typedef 436530d68baSNigel Croxon EFI_STATUS 437530d68baSNigel Croxon (EFIAPI *EFI_IO_MAP) ( 438530d68baSNigel Croxon IN struct _EFI_DEVICE_IO_INTERFACE *This, 439530d68baSNigel Croxon IN EFI_IO_OPERATION_TYPE Operation, 440530d68baSNigel Croxon IN EFI_PHYSICAL_ADDRESS *HostAddress, 441530d68baSNigel Croxon IN OUT UINTN *NumberOfBytes, 442530d68baSNigel Croxon OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, 443530d68baSNigel Croxon OUT VOID **Mapping 444530d68baSNigel Croxon ); 445530d68baSNigel Croxon 446530d68baSNigel Croxon typedef 447530d68baSNigel Croxon EFI_STATUS 448530d68baSNigel Croxon (EFIAPI *EFI_IO_UNMAP) ( 449530d68baSNigel Croxon IN struct _EFI_DEVICE_IO_INTERFACE *This, 450530d68baSNigel Croxon IN VOID *Mapping 451530d68baSNigel Croxon ); 452530d68baSNigel Croxon 453530d68baSNigel Croxon typedef 454530d68baSNigel Croxon EFI_STATUS 455530d68baSNigel Croxon (EFIAPI *EFI_IO_ALLOCATE_BUFFER) ( 456530d68baSNigel Croxon IN struct _EFI_DEVICE_IO_INTERFACE *This, 457530d68baSNigel Croxon IN EFI_ALLOCATE_TYPE Type, 458530d68baSNigel Croxon IN EFI_MEMORY_TYPE MemoryType, 459530d68baSNigel Croxon IN UINTN Pages, 460530d68baSNigel Croxon IN OUT EFI_PHYSICAL_ADDRESS *HostAddress 461530d68baSNigel Croxon ); 462530d68baSNigel Croxon 463530d68baSNigel Croxon typedef 464530d68baSNigel Croxon EFI_STATUS 465530d68baSNigel Croxon (EFIAPI *EFI_IO_FLUSH) ( 466530d68baSNigel Croxon IN struct _EFI_DEVICE_IO_INTERFACE *This 467530d68baSNigel Croxon ); 468530d68baSNigel Croxon 469530d68baSNigel Croxon typedef 470530d68baSNigel Croxon EFI_STATUS 471530d68baSNigel Croxon (EFIAPI *EFI_IO_FREE_BUFFER) ( 472530d68baSNigel Croxon IN struct _EFI_DEVICE_IO_INTERFACE *This, 473530d68baSNigel Croxon IN UINTN Pages, 474530d68baSNigel Croxon IN EFI_PHYSICAL_ADDRESS HostAddress 475530d68baSNigel Croxon ); 476530d68baSNigel Croxon 477530d68baSNigel Croxon typedef struct _EFI_DEVICE_IO_INTERFACE { 478530d68baSNigel Croxon EFI_IO_ACCESS Mem; 479530d68baSNigel Croxon EFI_IO_ACCESS Io; 480530d68baSNigel Croxon EFI_IO_ACCESS Pci; 481530d68baSNigel Croxon EFI_IO_MAP Map; 482530d68baSNigel Croxon EFI_PCI_DEVICE_PATH PciDevicePath; 483530d68baSNigel Croxon EFI_IO_UNMAP Unmap; 484530d68baSNigel Croxon EFI_IO_ALLOCATE_BUFFER AllocateBuffer; 485530d68baSNigel Croxon EFI_IO_FLUSH Flush; 486530d68baSNigel Croxon EFI_IO_FREE_BUFFER FreeBuffer; 487530d68baSNigel Croxon } EFI_DEVICE_IO_INTERFACE; 488530d68baSNigel Croxon 489530d68baSNigel Croxon 490530d68baSNigel Croxon // 491530d68baSNigel Croxon // Unicode Collation protocol 492530d68baSNigel Croxon // 493530d68baSNigel Croxon 494530d68baSNigel Croxon #define UNICODE_COLLATION_PROTOCOL \ 495530d68baSNigel Croxon { 0x1d85cd7f, 0xf43d, 0x11d2, {0x9a, 0xc, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} } 496530d68baSNigel Croxon 497530d68baSNigel Croxon #define UNICODE_BYTE_ORDER_MARK (CHAR16)(0xfeff) 498530d68baSNigel Croxon 499530d68baSNigel Croxon INTERFACE_DECL(_EFI_UNICODE_COLLATION_INTERFACE); 500530d68baSNigel Croxon 501530d68baSNigel Croxon typedef 502530d68baSNigel Croxon INTN 503530d68baSNigel Croxon (EFIAPI *EFI_UNICODE_STRICOLL) ( 504530d68baSNigel Croxon IN struct _EFI_UNICODE_COLLATION_INTERFACE *This, 505530d68baSNigel Croxon IN CHAR16 *s1, 506530d68baSNigel Croxon IN CHAR16 *s2 507530d68baSNigel Croxon ); 508530d68baSNigel Croxon 509530d68baSNigel Croxon typedef 510530d68baSNigel Croxon BOOLEAN 511530d68baSNigel Croxon (EFIAPI *EFI_UNICODE_METAIMATCH) ( 512530d68baSNigel Croxon IN struct _EFI_UNICODE_COLLATION_INTERFACE *This, 513530d68baSNigel Croxon IN CHAR16 *String, 514530d68baSNigel Croxon IN CHAR16 *Pattern 515530d68baSNigel Croxon ); 516530d68baSNigel Croxon 517530d68baSNigel Croxon typedef 518530d68baSNigel Croxon VOID 519530d68baSNigel Croxon (EFIAPI *EFI_UNICODE_STRLWR) ( 520530d68baSNigel Croxon IN struct _EFI_UNICODE_COLLATION_INTERFACE *This, 521530d68baSNigel Croxon IN OUT CHAR16 *Str 522530d68baSNigel Croxon ); 523530d68baSNigel Croxon 524530d68baSNigel Croxon typedef 525530d68baSNigel Croxon VOID 526530d68baSNigel Croxon (EFIAPI *EFI_UNICODE_STRUPR) ( 527530d68baSNigel Croxon IN struct _EFI_UNICODE_COLLATION_INTERFACE *This, 528530d68baSNigel Croxon IN OUT CHAR16 *Str 529530d68baSNigel Croxon ); 530530d68baSNigel Croxon 531530d68baSNigel Croxon typedef 532530d68baSNigel Croxon VOID 533530d68baSNigel Croxon (EFIAPI *EFI_UNICODE_FATTOSTR) ( 534530d68baSNigel Croxon IN struct _EFI_UNICODE_COLLATION_INTERFACE *This, 535530d68baSNigel Croxon IN UINTN FatSize, 536530d68baSNigel Croxon IN CHAR8 *Fat, 537530d68baSNigel Croxon OUT CHAR16 *String 538530d68baSNigel Croxon ); 539530d68baSNigel Croxon 540530d68baSNigel Croxon typedef 541530d68baSNigel Croxon BOOLEAN 542530d68baSNigel Croxon (EFIAPI *EFI_UNICODE_STRTOFAT) ( 543530d68baSNigel Croxon IN struct _EFI_UNICODE_COLLATION_INTERFACE *This, 544530d68baSNigel Croxon IN CHAR16 *String, 545530d68baSNigel Croxon IN UINTN FatSize, 546530d68baSNigel Croxon OUT CHAR8 *Fat 547530d68baSNigel Croxon ); 548530d68baSNigel Croxon 549*8c29617eSNigel Croxon // 550*8c29617eSNigel Croxon // Hash Protocol 551*8c29617eSNigel Croxon // 552*8c29617eSNigel Croxon #define HASH_PROTOCOL \ 553*8c29617eSNigel Croxon { 0xC5184932, 0xDBA5, 0x46DB, { 0xA5, 0xBA, 0xCC, 0x0B, 0xDA, 0x9C, 0x14, 0x35 } } 554*8c29617eSNigel Croxon 555*8c29617eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA1 \ 556*8c29617eSNigel Croxon { 0x2AE9D80F, 0x3FB2, 0x4095, { 0xB7, 0xB1, 0xE9, 0x31, 0x57, 0xB9, 0x46, 0xB6 } } // Deprecated 557*8c29617eSNigel Croxon 558*8c29617eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA224 \ 559*8c29617eSNigel Croxon { 0x8DF01A06, 0x9BD5, 0x4BF7, { 0xB0, 0x21, 0xDB, 0x4F, 0xD9, 0xCC, 0xF4, 0x5B } } // Deprecated 560*8c29617eSNigel Croxon 561*8c29617eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA256 \ 562*8c29617eSNigel Croxon { 0x51AA59DE, 0xFDF2, 0x4EA3, { 0xBC, 0x63, 0x87, 0x5F, 0xB7, 0x84, 0x2E, 0xE9 } } // Deprecated 563*8c29617eSNigel Croxon 564*8c29617eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA384 \ 565*8c29617eSNigel Croxon { 0xEFA96432, 0xDE33, 0x4DD2, { 0xAE, 0xE6, 0x32, 0x8C, 0x33, 0xDF, 0x77, 0x7A } } // Deprecated 566*8c29617eSNigel Croxon 567*8c29617eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA512 \ 568*8c29617eSNigel Croxon { 0xCAA4381E, 0x750C, 0x4770, { 0xB8, 0x70, 0x7A, 0x23, 0xB4, 0xE4, 0x21, 0x30 } } // Deprecated 569*8c29617eSNigel Croxon 570*8c29617eSNigel Croxon #define EFI_HASH_ALGORITHM_MD5 \ 571*8c29617eSNigel Croxon { 0x0AF7C79C, 0x65B5, 0x4319, { 0xB0, 0xAE, 0x44, 0xEC, 0x48, 0x4E, 0x4A, 0xD7 } } // Deprecated 572*8c29617eSNigel Croxon 573*8c29617eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA1_NOPAD \ 574*8c29617eSNigel Croxon { 0x24C5DC2F, 0x53E2, 0x40CA, { 0x9E, 0xD6, 0xA5, 0xD9, 0xA4, 0x9F, 0x46, 0x3B } } 575*8c29617eSNigel Croxon 576*8c29617eSNigel Croxon #define EFI_HASH_ALGORITHM_SHA256_NOPAD \ 577*8c29617eSNigel Croxon { 0x8628752A, 0x6CB7, 0x4814, { 0x96, 0xFC, 0x24, 0xA8, 0x15, 0xAC, 0x22, 0x26 } } 578*8c29617eSNigel Croxon 579*8c29617eSNigel Croxon 580*8c29617eSNigel Croxon INTERFACE_DECL(_EFI_HASH); 581*8c29617eSNigel Croxon 582*8c29617eSNigel Croxon typedef UINT8 EFI_MD5_HASH[16]; 583*8c29617eSNigel Croxon typedef UINT8 EFI_SHA1_HASH[20]; 584*8c29617eSNigel Croxon typedef UINT8 EFI_SHA224_HASH[28]; 585*8c29617eSNigel Croxon typedef UINT8 EFI_SHA256_HASH[32]; 586*8c29617eSNigel Croxon typedef UINT8 EFI_SHA384_HASH[48]; 587*8c29617eSNigel Croxon typedef UINT8 EFI_SHA512_HASH[64]; 588*8c29617eSNigel Croxon typedef union _EFI_HASH_OUTPUT { 589*8c29617eSNigel Croxon EFI_MD5_HASH *Md5Hash; 590*8c29617eSNigel Croxon EFI_SHA1_HASH *Sha1Hash; 591*8c29617eSNigel Croxon EFI_SHA224_HASH *Sha224Hash; 592*8c29617eSNigel Croxon EFI_SHA256_HASH *Sha256Hash; 593*8c29617eSNigel Croxon EFI_SHA384_HASH *Sha384Hash; 594*8c29617eSNigel Croxon EFI_SHA512_HASH *Sha512Hash; 595*8c29617eSNigel Croxon } EFI_HASH_OUTPUT; 596*8c29617eSNigel Croxon 597*8c29617eSNigel Croxon typedef 598*8c29617eSNigel Croxon EFI_STATUS 599*8c29617eSNigel Croxon (EFIAPI *EFI_HASH_GET_HASH_SIZE) ( 600*8c29617eSNigel Croxon IN CONST struct _EFI_HASH *This, 601*8c29617eSNigel Croxon IN CONST EFI_GUID *HashAlgorithm, 602*8c29617eSNigel Croxon OUT UINTN *HashSize); 603*8c29617eSNigel Croxon 604*8c29617eSNigel Croxon typedef 605*8c29617eSNigel Croxon EFI_STATUS 606*8c29617eSNigel Croxon (EFIAPI *EFI_HASH_HASH) ( 607*8c29617eSNigel Croxon IN CONST struct _EFI_HASH *This, 608*8c29617eSNigel Croxon IN CONST EFI_GUID *HashAlgorithm, 609*8c29617eSNigel Croxon IN BOOLEAN Extend, 610*8c29617eSNigel Croxon IN CONST UINT8 *Message, 611*8c29617eSNigel Croxon IN UINT64 MessageSize, 612*8c29617eSNigel Croxon IN OUT EFI_HASH_OUTPUT *Hash); 613*8c29617eSNigel Croxon 614*8c29617eSNigel Croxon typedef struct _EFI_HASH { 615*8c29617eSNigel Croxon EFI_HASH_GET_HASH_SIZE GetHashSize; 616*8c29617eSNigel Croxon EFI_HASH_HASH Hash; 617*8c29617eSNigel Croxon } EFI_HASH; 618*8c29617eSNigel Croxon 619530d68baSNigel Croxon 620530d68baSNigel Croxon typedef struct _EFI_UNICODE_COLLATION_INTERFACE { 621530d68baSNigel Croxon 622530d68baSNigel Croxon // general 623530d68baSNigel Croxon EFI_UNICODE_STRICOLL StriColl; 624530d68baSNigel Croxon EFI_UNICODE_METAIMATCH MetaiMatch; 625530d68baSNigel Croxon EFI_UNICODE_STRLWR StrLwr; 626530d68baSNigel Croxon EFI_UNICODE_STRUPR StrUpr; 627530d68baSNigel Croxon 628530d68baSNigel Croxon // for supporting fat volumes 629530d68baSNigel Croxon EFI_UNICODE_FATTOSTR FatToStr; 630530d68baSNigel Croxon EFI_UNICODE_STRTOFAT StrToFat; 631530d68baSNigel Croxon 632530d68baSNigel Croxon CHAR8 *SupportedLanguages; 633530d68baSNigel Croxon } EFI_UNICODE_COLLATION_INTERFACE; 634530d68baSNigel Croxon 635530d68baSNigel Croxon /* Graphics output protocol */ 636530d68baSNigel Croxon #define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \ 637530d68baSNigel Croxon { \ 638530d68baSNigel Croxon 0x9042a9de, 0x23dc, 0x4a38, {0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a } \ 639530d68baSNigel Croxon } 640530d68baSNigel Croxon 641530d68baSNigel Croxon typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL; 642530d68baSNigel Croxon 643530d68baSNigel Croxon typedef struct { 644530d68baSNigel Croxon UINT32 RedMask; 645530d68baSNigel Croxon UINT32 GreenMask; 646530d68baSNigel Croxon UINT32 BlueMask; 647530d68baSNigel Croxon UINT32 ReservedMask; 648530d68baSNigel Croxon } EFI_PIXEL_BITMASK; 649530d68baSNigel Croxon 650530d68baSNigel Croxon typedef enum { 651530d68baSNigel Croxon PixelRedGreenBlueReserved8BitPerColor, 652530d68baSNigel Croxon PixelBlueGreenRedReserved8BitPerColor, 653530d68baSNigel Croxon PixelBitMask, 654530d68baSNigel Croxon PixelBltOnly, 655530d68baSNigel Croxon PixelFormatMax 656530d68baSNigel Croxon } EFI_GRAPHICS_PIXEL_FORMAT; 657530d68baSNigel Croxon 658530d68baSNigel Croxon typedef struct { 659530d68baSNigel Croxon UINT32 Version; 660530d68baSNigel Croxon UINT32 HorizontalResolution; 661530d68baSNigel Croxon UINT32 VerticalResolution; 662530d68baSNigel Croxon EFI_GRAPHICS_PIXEL_FORMAT PixelFormat; 663530d68baSNigel Croxon EFI_PIXEL_BITMASK PixelInformation; 664530d68baSNigel Croxon UINT32 PixelsPerScanLine; 665530d68baSNigel Croxon } EFI_GRAPHICS_OUTPUT_MODE_INFORMATION; 666530d68baSNigel Croxon 667530d68baSNigel Croxon /** 668530d68baSNigel Croxon Return the current video mode information. 669530d68baSNigel Croxon 670530d68baSNigel Croxon @param This Protocol instance pointer. 671530d68baSNigel Croxon @param ModeNumber The mode number to return information on. 672530d68baSNigel Croxon @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer. 673530d68baSNigel Croxon @param Info A pointer to callee allocated buffer that returns information about ModeNumber. 674530d68baSNigel Croxon 675530d68baSNigel Croxon @retval EFI_SUCCESS Mode information returned. 676530d68baSNigel Croxon @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small. 677530d68baSNigel Croxon @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode. 678530d68baSNigel Croxon @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode () 679530d68baSNigel Croxon @retval EFI_INVALID_PARAMETER One of the input args was NULL. 680530d68baSNigel Croxon 681530d68baSNigel Croxon **/ 682530d68baSNigel Croxon typedef 683530d68baSNigel Croxon EFI_STATUS 684530d68baSNigel Croxon (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) ( 685530d68baSNigel Croxon IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, 686530d68baSNigel Croxon IN UINT32 ModeNumber, 687530d68baSNigel Croxon OUT UINTN *SizeOfInfo, 688530d68baSNigel Croxon OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info 689530d68baSNigel Croxon ) 690530d68baSNigel Croxon ; 691530d68baSNigel Croxon 692530d68baSNigel Croxon /** 693530d68baSNigel Croxon Return the current video mode information. 694530d68baSNigel Croxon 695530d68baSNigel Croxon @param This Protocol instance pointer. 696530d68baSNigel Croxon @param ModeNumber The mode number to be set. 697530d68baSNigel Croxon 698530d68baSNigel Croxon @retval EFI_SUCCESS Graphics mode was changed. 699530d68baSNigel Croxon @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. 700530d68baSNigel Croxon @retval EFI_UNSUPPORTED ModeNumber is not supported by this device. 701530d68baSNigel Croxon 702530d68baSNigel Croxon **/ 703530d68baSNigel Croxon typedef 704530d68baSNigel Croxon EFI_STATUS 705530d68baSNigel Croxon (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) ( 706530d68baSNigel Croxon IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, 707530d68baSNigel Croxon IN UINT32 ModeNumber 708530d68baSNigel Croxon ); 709530d68baSNigel Croxon 710530d68baSNigel Croxon typedef struct { 711530d68baSNigel Croxon UINT8 Blue; 712530d68baSNigel Croxon UINT8 Green; 713530d68baSNigel Croxon UINT8 Red; 714530d68baSNigel Croxon UINT8 Reserved; 715530d68baSNigel Croxon } EFI_GRAPHICS_OUTPUT_BLT_PIXEL; 716530d68baSNigel Croxon 717530d68baSNigel Croxon typedef union { 718530d68baSNigel Croxon EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel; 719530d68baSNigel Croxon UINT32 Raw; 720530d68baSNigel Croxon } EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION; 721530d68baSNigel Croxon 722530d68baSNigel Croxon typedef enum { 723530d68baSNigel Croxon EfiBltVideoFill, 724530d68baSNigel Croxon EfiBltVideoToBltBuffer, 725530d68baSNigel Croxon EfiBltBufferToVideo, 726530d68baSNigel Croxon EfiBltVideoToVideo, 727530d68baSNigel Croxon EfiGraphicsOutputBltOperationMax 728530d68baSNigel Croxon } EFI_GRAPHICS_OUTPUT_BLT_OPERATION; 729530d68baSNigel Croxon 730530d68baSNigel Croxon /** 731530d68baSNigel Croxon The following table defines actions for BltOperations: 732530d68baSNigel Croxon 733530d68baSNigel Croxon <B>EfiBltVideoFill</B> - Write data from the BltBuffer pixel (SourceX, SourceY) 734530d68baSNigel Croxon directly to every pixel of the video display rectangle 735530d68baSNigel Croxon (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). 736530d68baSNigel Croxon Only one pixel will be used from the BltBuffer. Delta is NOT used. 737530d68baSNigel Croxon 738530d68baSNigel Croxon <B>EfiBltVideoToBltBuffer</B> - Read data from the video display rectangle 739530d68baSNigel Croxon (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in 740530d68baSNigel Croxon the BltBuffer rectangle (DestinationX, DestinationY ) 741530d68baSNigel Croxon (DestinationX + Width, DestinationY + Height). If DestinationX or 742530d68baSNigel Croxon DestinationY is not zero then Delta must be set to the length in bytes 743530d68baSNigel Croxon of a row in the BltBuffer. 744530d68baSNigel Croxon 745530d68baSNigel Croxon <B>EfiBltBufferToVideo</B> - Write data from the BltBuffer rectangle 746530d68baSNigel Croxon (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the 747530d68baSNigel Croxon video display rectangle (DestinationX, DestinationY) 748530d68baSNigel Croxon (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is 749530d68baSNigel Croxon not zero then Delta must be set to the length in bytes of a row in the 750530d68baSNigel Croxon BltBuffer. 751530d68baSNigel Croxon 752530d68baSNigel Croxon <B>EfiBltVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY) 753530d68baSNigel Croxon (SourceX + Width, SourceY + Height) .to the video display rectangle 754530d68baSNigel Croxon (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). 755530d68baSNigel Croxon The BltBuffer and Delta are not used in this mode. 756530d68baSNigel Croxon 757530d68baSNigel Croxon @param This Protocol instance pointer. 758530d68baSNigel Croxon @param BltBuffer Buffer containing data to blit into video buffer. This 759530d68baSNigel Croxon buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) 760530d68baSNigel Croxon @param BltOperation Operation to perform on BlitBuffer and video memory 761530d68baSNigel Croxon @param SourceX X coordinate of source for the BltBuffer. 762530d68baSNigel Croxon @param SourceY Y coordinate of source for the BltBuffer. 763530d68baSNigel Croxon @param DestinationX X coordinate of destination for the BltBuffer. 764530d68baSNigel Croxon @param DestinationY Y coordinate of destination for the BltBuffer. 765530d68baSNigel Croxon @param Width Width of rectangle in BltBuffer in pixels. 766530d68baSNigel Croxon @param Height Hight of rectangle in BltBuffer in pixels. 767530d68baSNigel Croxon @param Delta OPTIONAL 768530d68baSNigel Croxon 769530d68baSNigel Croxon @retval EFI_SUCCESS The Blt operation completed. 770530d68baSNigel Croxon @retval EFI_INVALID_PARAMETER BltOperation is not valid. 771530d68baSNigel Croxon @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer. 772530d68baSNigel Croxon 773530d68baSNigel Croxon **/ 774530d68baSNigel Croxon typedef 775530d68baSNigel Croxon EFI_STATUS 776530d68baSNigel Croxon (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) ( 777530d68baSNigel Croxon IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, 778530d68baSNigel Croxon IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL 779530d68baSNigel Croxon IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, 780530d68baSNigel Croxon IN UINTN SourceX, 781530d68baSNigel Croxon IN UINTN SourceY, 782530d68baSNigel Croxon IN UINTN DestinationX, 783530d68baSNigel Croxon IN UINTN DestinationY, 784530d68baSNigel Croxon IN UINTN Width, 785530d68baSNigel Croxon IN UINTN Height, 786530d68baSNigel Croxon IN UINTN Delta OPTIONAL 787530d68baSNigel Croxon ); 788530d68baSNigel Croxon 789530d68baSNigel Croxon typedef struct { 790530d68baSNigel Croxon UINT32 MaxMode; 791530d68baSNigel Croxon UINT32 Mode; 792530d68baSNigel Croxon EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info; 793530d68baSNigel Croxon UINTN SizeOfInfo; 794530d68baSNigel Croxon EFI_PHYSICAL_ADDRESS FrameBufferBase; 795530d68baSNigel Croxon UINTN FrameBufferSize; 796530d68baSNigel Croxon } EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE; 797530d68baSNigel Croxon 798530d68baSNigel Croxon struct _EFI_GRAPHICS_OUTPUT_PROTOCOL { 799530d68baSNigel Croxon EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode; 800530d68baSNigel Croxon EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode; 801530d68baSNigel Croxon EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt; 802530d68baSNigel Croxon EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode; 803530d68baSNigel Croxon }; 804530d68baSNigel Croxon 805530d68baSNigel Croxon INTERFACE_DECL(_EFI_SERVICE_BINDING); 806530d68baSNigel Croxon 807530d68baSNigel Croxon typedef 808530d68baSNigel Croxon EFI_STATUS 809530d68baSNigel Croxon (EFIAPI *EFI_SERVICE_BINDING_CREATE_CHILD) ( 810530d68baSNigel Croxon IN struct _EFI_SERVICE_BINDING *This, 811530d68baSNigel Croxon IN EFI_HANDLE *ChildHandle 812530d68baSNigel Croxon ); 813530d68baSNigel Croxon 814530d68baSNigel Croxon typedef 815530d68baSNigel Croxon EFI_STATUS 816530d68baSNigel Croxon (EFIAPI *EFI_SERVICE_BINDING_DESTROY_CHILD) ( 817530d68baSNigel Croxon IN struct _EFI_SERVICE_BINDING *This, 818530d68baSNigel Croxon IN EFI_HANDLE ChildHandle 819530d68baSNigel Croxon ); 820530d68baSNigel Croxon 821530d68baSNigel Croxon typedef struct _EFI_SERVICE_BINDING { 822530d68baSNigel Croxon EFI_SERVICE_BINDING_CREATE_CHILD CreateChild; 823530d68baSNigel Croxon EFI_SERVICE_BINDING_DESTROY_CHILD DestroyChild; 824530d68baSNigel Croxon } EFI_SERVICE_BINDING; 825530d68baSNigel Croxon 826533a042dSNigel Croxon // 827533a042dSNigel Croxon // Driver Binding Protocol 828533a042dSNigel Croxon // 829533a042dSNigel Croxon 830533a042dSNigel Croxon #define DRIVER_BINDING_PROTOCOL \ 831533a042dSNigel Croxon { 0x18A031AB, 0xB443, 0x4D1A, { 0xA5, 0xC0, 0x0C, 0x09, 0x26, 0x1E, 0x9F, 0x71} } 832533a042dSNigel Croxon 833533a042dSNigel Croxon INTERFACE_DECL(_EFI_DRIVER_BINDING); 834533a042dSNigel Croxon 835533a042dSNigel Croxon typedef 836533a042dSNigel Croxon EFI_STATUS 837533a042dSNigel Croxon (EFIAPI *EFI_DRIVER_SUPPORTED) ( 838533a042dSNigel Croxon IN struct _EFI_DRIVER_BINDING *This, 839533a042dSNigel Croxon IN EFI_HANDLE ControllerHandle, 840533a042dSNigel Croxon IN EFI_DEVICE_PATH *RemainingDevicePath OPTIONAL); 841533a042dSNigel Croxon 842533a042dSNigel Croxon typedef 843533a042dSNigel Croxon EFI_STATUS 844533a042dSNigel Croxon (EFIAPI *EFI_DRIVER_START) ( 845533a042dSNigel Croxon IN struct _EFI_DRIVER_BINDING *This, 846533a042dSNigel Croxon IN EFI_HANDLE ControllerHandle, 847533a042dSNigel Croxon IN EFI_DEVICE_PATH *RemainingDevicePath OPTIONAL); 848533a042dSNigel Croxon 849533a042dSNigel Croxon typedef 850533a042dSNigel Croxon EFI_STATUS 851533a042dSNigel Croxon (EFIAPI *EFI_DRIVER_STOP) ( 852533a042dSNigel Croxon IN struct _EFI_DRIVER_BINDING *This, 853533a042dSNigel Croxon IN EFI_HANDLE ControllerHandle, 854533a042dSNigel Croxon IN UINTN NumberOfChildren, 855533a042dSNigel Croxon IN EFI_HANDLE *ChildHandleBuffer OPTIONAL); 856533a042dSNigel Croxon 857533a042dSNigel Croxon typedef struct _EFI_DRIVER_BINDING { 858533a042dSNigel Croxon EFI_DRIVER_SUPPORTED Supported; 859533a042dSNigel Croxon EFI_DRIVER_START Start; 860533a042dSNigel Croxon EFI_DRIVER_STOP Stop; 861533a042dSNigel Croxon UINT32 Version; 862533a042dSNigel Croxon EFI_HANDLE ImageHandle; 863533a042dSNigel Croxon EFI_HANDLE DriverBindingHandle; 864533a042dSNigel Croxon } EFI_DRIVER_BINDING; 865533a042dSNigel Croxon 866883702e8SNigel Croxon // 867883702e8SNigel Croxon // Component Name Protocol 868883702e8SNigel Croxon // Deprecated - use Component Name 2 Protocol instead 869883702e8SNigel Croxon // 870883702e8SNigel Croxon 871883702e8SNigel Croxon #define COMPONENT_NAME_PROTOCOL \ 872883702e8SNigel Croxon {0x107A772C, 0xD5E1, 0x11D4, { 0x9A, 0x46, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} } 873883702e8SNigel Croxon 874883702e8SNigel Croxon INTERFACE_DECL(_EFI_COMPONENT_NAME); 875883702e8SNigel Croxon 876883702e8SNigel Croxon typedef 877883702e8SNigel Croxon EFI_STATUS 878883702e8SNigel Croxon (EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) ( 879883702e8SNigel Croxon IN struct _EFI_COMPONENT_NAME *This, 880883702e8SNigel Croxon IN CHAR8 *Language, 881883702e8SNigel Croxon OUT CHAR16 **DriverName); 882883702e8SNigel Croxon 883883702e8SNigel Croxon typedef 884883702e8SNigel Croxon EFI_STATUS 885883702e8SNigel Croxon (EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) ( 886883702e8SNigel Croxon IN struct _EFI_COMPONENT_NAME *This, 887883702e8SNigel Croxon IN EFI_HANDLE ControllerHandle, 888883702e8SNigel Croxon IN EFI_HANDLE ChildHandle OPTIONAL, 889883702e8SNigel Croxon IN CHAR8 *Language, 890883702e8SNigel Croxon OUT CHAR16 **ControllerName); 891883702e8SNigel Croxon 892883702e8SNigel Croxon typedef struct _EFI_COMPONENT_NAME { 893883702e8SNigel Croxon EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName; 894883702e8SNigel Croxon EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName; 895883702e8SNigel Croxon CHAR8 *SupportedLanguages; 896883702e8SNigel Croxon } EFI_COMPONENT_NAME; 897883702e8SNigel Croxon 898883702e8SNigel Croxon // 899883702e8SNigel Croxon // Component Name 2 Protocol 900883702e8SNigel Croxon // 901883702e8SNigel Croxon 902883702e8SNigel Croxon #define COMPONENT_NAME2_PROTOCOL \ 903883702e8SNigel Croxon {0x6A7A5CFF, 0xE8D9, 0x4F70, { 0xBA, 0xDA, 0x75, 0xAB, 0x30, 0x25, 0xCE, 0x14} } 904883702e8SNigel Croxon 905883702e8SNigel Croxon INTERFACE_DECL(_EFI_COMPONENT_NAME2); 906883702e8SNigel Croxon 907883702e8SNigel Croxon typedef 908883702e8SNigel Croxon EFI_STATUS 909883702e8SNigel Croxon (EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME) ( 910883702e8SNigel Croxon IN struct _EFI_COMPONENT_NAME2 *This, 911883702e8SNigel Croxon IN CHAR8 *Language, 912883702e8SNigel Croxon OUT CHAR16 **DriverName); 913883702e8SNigel Croxon 914883702e8SNigel Croxon typedef 915883702e8SNigel Croxon EFI_STATUS 916883702e8SNigel Croxon (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) ( 917883702e8SNigel Croxon IN struct _EFI_COMPONENT_NAME2 *This, 918883702e8SNigel Croxon IN EFI_HANDLE ControllerHandle, 919883702e8SNigel Croxon IN EFI_HANDLE ChildHandle OPTIONAL, 920883702e8SNigel Croxon IN CHAR8 *Language, 921883702e8SNigel Croxon OUT CHAR16 **ControllerName); 922883702e8SNigel Croxon 923883702e8SNigel Croxon typedef struct _EFI_COMPONENT_NAME2 { 924883702e8SNigel Croxon EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName; 925883702e8SNigel Croxon EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName; 926883702e8SNigel Croxon CHAR8 *SupportedLanguages; 927883702e8SNigel Croxon } EFI_COMPONENT_NAME2; 928883702e8SNigel Croxon 929530d68baSNigel Croxon #endif 930530d68baSNigel Croxon 931