1 // Copyright 2016 The Fuchsia Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #pragma once 6 7 #include <efi/types.h> 8 #include <efi/boot-services.h> 9 #include <efi/runtime-services.h> 10 11 #define EFI_DISK_IO_PROTOCOL_GUID \ 12 {0xCE345171, 0xBA0B, 0x11d2, {0x8e, 0x4F, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b}} 13 14 extern efi_guid DiskIoProtocol; 15 16 #define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000 17 18 typedef struct efi_disk_io_protocol efi_disk_io_protocol; 19 20 struct efi_disk_io_protocol { 21 uint64_t Revision; 22 efi_status (*ReadDisk)(efi_disk_io_protocol* self, 23 uint32_t MediaId, uint64_t Offset, 24 uint64_t BufferSize, void* Buffer) EFIAPI; 25 efi_status (*WriteDisk)(efi_disk_io_protocol* self, 26 uint32_t MediaId, uint64_t Offset, 27 uint64_t BufferSize, const void* Buffer) EFIAPI; 28 }; 29