-/*++\r
-\r
-Copyright (c) 2004, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-Module Name:\r
-\r
- DiskIo.h\r
-\r
-Abstract:\r
-\r
- Disk IO protocol as defined in the EFI 1.0 specification.\r
-\r
- The Disk IO protocol is used to convert block oriented devices into byte\r
- oriented devices. The Disk IO protocol is intended to layer on top of the\r
- Block IO protocol.\r
- \r
---*/\r
-\r
-#ifndef __DISK_IO_H__\r
-#define __DISK_IO_H__\r
-\r
-#define EFI_DISK_IO_PROTOCOL_GUID \\r
- { \\r
- 0xce345171, 0xba0b, 0x11d2, 0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \\r
- }\r
-\r
-EFI_FORWARD_DECLARATION (EFI_DISK_IO_PROTOCOL);\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_DISK_READ) (\r
- IN EFI_DISK_IO_PROTOCOL * This,\r
- IN UINT32 MediaId,\r
- IN UINT64 Offset,\r
- IN UINTN BufferSize,\r
- OUT VOID *Buffer\r
- )\r
-/*++\r
-\r
- Routine Description:\r
- Read BufferSize bytes from Offset into Buffer.\r
-\r
- Arguments:\r
- This - Protocol instance pointer.\r
- MediaId - Id of the media, changes every time the media is replaced.\r
- Offset - The starting byte offset to read from\r
- BufferSize - Size of Buffer\r
- Buffer - Buffer containing read data\r
-\r
- Returns:\r
- EFI_SUCCESS - The data was read correctly from the device.\r
- EFI_DEVICE_ERROR - The device reported an error while performing the read.\r
- EFI_NO_MEDIA - There is no media in the device.\r
- EFI_MEDIA_CHNAGED - The MediaId does not matched the current device.\r
- EFI_INVALID_PARAMETER - The read request contains device addresses that are not \r
- valid for the device.\r
-\r
---*/\r
-;\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_DISK_WRITE) (\r
- IN EFI_DISK_IO_PROTOCOL * This,\r
- IN UINT32 MediaId,\r
- IN UINT64 Offset,\r
- IN UINTN BufferSize,\r
- IN VOID *Buffer\r
- )\r
-/*++\r
-\r
- Routine Description:\r
- Read BufferSize bytes from Offset into Buffer.\r
-\r
- Arguments:\r
- This - Protocol instance pointer.\r
- MediaId - Id of the media, changes every time the media is replaced. \r
- Offset - The starting byte offset to read from\r
- BufferSize - Size of Buffer\r
- Buffer - Buffer containing read data\r
-\r
- Returns:\r
- EFI_SUCCESS - The data was written correctly to the device.\r
- EFI_WRITE_PROTECTED - The device can not be written to.\r
- EFI_DEVICE_ERROR - The device reported an error while performing the write.\r
- EFI_NO_MEDIA - There is no media in the device.\r
- EFI_MEDIA_CHNAGED - The MediaId does not matched the current device.\r
- EFI_INVALID_PARAMETER - The write request contains device addresses that are not \r
- valid for the device.\r
-\r
---*/\r
-;\r
-\r
-#define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000\r
-\r
-typedef struct _EFI_DISK_IO_PROTOCOL {\r
- UINT64 Revision;\r
- EFI_DISK_READ ReadDisk;\r
- EFI_DISK_WRITE WriteDisk;\r
-} EFI_DISK_IO_PROTOCOL;\r
-\r
-extern EFI_GUID gEfiDiskIoProtocolGuid;\r
-\r
-#endif\r