iPXE
Data Structures | Macros | Typedefs | Functions | Variables
DiskIo.h File Reference

Disk IO protocol as defined in the UEFI 2.0 specification. More...

Go to the source code of this file.

Data Structures

struct  _EFI_DISK_IO_PROTOCOL
 This protocol is used to abstract Block I/O interfaces. More...
 

Macros

#define EFI_DISK_IO_PROTOCOL_GUID
 
#define DISK_IO_PROTOCOL   EFI_DISK_IO_PROTOCOL_GUID
 Protocol GUID name defined in EFI1.1. More...
 
#define EFI_DISK_IO_PROTOCOL_REVISION   0x00010000
 
#define EFI_DISK_IO_INTERFACE_REVISION   EFI_DISK_IO_PROTOCOL_REVISION
 Revision defined in EFI1.1. More...
 

Typedefs

typedef struct _EFI_DISK_IO_PROTOCOL EFI_DISK_IO_PROTOCOL
 
typedef EFI_DISK_IO_PROTOCOL EFI_DISK_IO
 Protocol defined in EFI1.1. More...
 
typedef EFI_STATUS(EFIAPIEFI_DISK_READ) (IN EFI_DISK_IO_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Offset, IN UINTN BufferSize, OUT VOID *Buffer)
 Read BufferSize bytes from Offset into Buffer. More...
 
typedef EFI_STATUS(EFIAPIEFI_DISK_WRITE) (IN EFI_DISK_IO_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Offset, IN UINTN BufferSize, IN VOID *Buffer)
 Writes a specified number of bytes to a device. More...
 

Functions

 FILE_LICENCE (BSD2_PATENT)
 

Variables

EFI_GUID gEfiDiskIoProtocolGuid
 

Detailed Description

Disk IO protocol as defined in the UEFI 2.0 specification.

The Disk IO protocol is used to convert block oriented devices into byte oriented devices. The Disk IO protocol is intended to layer on top of the Block IO protocol.

Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file DiskIo.h.

Macro Definition Documentation

◆ EFI_DISK_IO_PROTOCOL_GUID

#define EFI_DISK_IO_PROTOCOL_GUID
Value:
{ \
0xce345171, 0xba0b, 0x11d2, {0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
}

Definition at line 18 of file DiskIo.h.

◆ DISK_IO_PROTOCOL

#define DISK_IO_PROTOCOL   EFI_DISK_IO_PROTOCOL_GUID

Protocol GUID name defined in EFI1.1.

Definition at line 26 of file DiskIo.h.

◆ EFI_DISK_IO_PROTOCOL_REVISION

#define EFI_DISK_IO_PROTOCOL_REVISION   0x00010000

Definition at line 90 of file DiskIo.h.

◆ EFI_DISK_IO_INTERFACE_REVISION

#define EFI_DISK_IO_INTERFACE_REVISION   EFI_DISK_IO_PROTOCOL_REVISION

Revision defined in EFI1.1.

Definition at line 95 of file DiskIo.h.

Typedef Documentation

◆ EFI_DISK_IO_PROTOCOL

Definition at line 28 of file DiskIo.h.

◆ EFI_DISK_IO

Protocol defined in EFI1.1.

Definition at line 33 of file DiskIo.h.

◆ EFI_DISK_READ

typedef EFI_STATUS(EFIAPI * EFI_DISK_READ) (IN EFI_DISK_IO_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Offset, IN UINTN BufferSize, OUT VOID *Buffer)

Read BufferSize bytes from Offset into Buffer.

Parameters
ThisProtocol instance pointer.
MediaIdId of the media, changes every time the media is replaced.
OffsetThe starting byte offset to read from
BufferSizeSize of Buffer
BufferBuffer containing read data
Return values
EFI_SUCCESSThe data was read correctly from the device.
EFI_DEVICE_ERRORThe device reported an error while performing the read.
EFI_NO_MEDIAThere is no media in the device.
EFI_MEDIA_CHNAGEDThe MediaId does not matched the current device.
EFI_INVALID_PARAMETERThe read request contains device addresses that are not valid for the device.

Definition at line 54 of file DiskIo.h.

◆ EFI_DISK_WRITE

typedef EFI_STATUS(EFIAPI * EFI_DISK_WRITE) (IN EFI_DISK_IO_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Offset, IN UINTN BufferSize, IN VOID *Buffer)

Writes a specified number of bytes to a device.

Parameters
ThisIndicates a pointer to the calling context.
MediaIdID of the medium to be written.
OffsetThe starting byte offset on the logical block I/O device to write.
BufferSizeThe size in bytes of Buffer. The number of bytes to write to the device.
BufferA pointer to the buffer containing the data to be written.
Return values
EFI_SUCCESSThe data was written correctly to the device.
EFI_WRITE_PROTECTEDThe device can not be written to.
EFI_DEVICE_ERRORThe device reported an error while performing the write.
EFI_NO_MEDIAThere is no media in the device.
EFI_MEDIA_CHNAGEDThe MediaId does not matched the current device.
EFI_INVALID_PARAMETERThe write request contains device addresses that are not valid for the device.

Definition at line 82 of file DiskIo.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( BSD2_PATENT  )

Variable Documentation

◆ gEfiDiskIoProtocolGuid

EFI_GUID gEfiDiskIoProtocolGuid