MdePkg[all]  1.08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DiskIo2.h File Reference

Data Structures

struct  EFI_DISK_IO2_TOKEN
 
struct  _EFI_DISK_IO2_PROTOCOL
 

Macros

#define EFI_DISK_IO2_PROTOCOL_GUID
 
#define EFI_DISK_IO2_PROTOCOL_REVISION   0x00020000
 

Typedefs

typedef struct
_EFI_DISK_IO2_PROTOCOL 
EFI_DISK_IO2_PROTOCOL
 
typedef IN UINT32 MediaId
 
typedef IN UINT32 IN UINT64 Offset
 
typedef IN UINT32 IN UINT64 IN
OUT EFI_DISK_IO2_TOKEN
Token
 
typedef IN UINT32 IN UINT64 IN
OUT EFI_DISK_IO2_TOKEN IN
UINTN 
BufferSize
 
typedef IN UINT32 IN UINT64 IN
OUT EFI_DISK_IO2_TOKEN IN
UINTN OUT VOID
Buffer
 

Functions

typedef EFI_STATUS (EFIAPI *EFI_DISK_CANCEL_EX)(IN EFI_DISK_IO2_PROTOCOL *This)
 

Variables

EFI_GUID gEfiDiskIo2ProtocolGuid
 

Detailed Description

Disk I/O 2 protocol as defined in the UEFI 2.4 specification.

The Disk I/O 2 protocol defines an extension to the Disk I/O protocol to enable non-blocking / asynchronous byte-oriented disk operation.

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

Macro Definition Documentation

#define EFI_DISK_IO2_PROTOCOL_GUID
Value:
{ \
0x151c8eae, 0x7f2c, 0x472c, 0x9e, 0x54, 0x98, 0x28, 0x19, 0x4f, 0x6a, 0x88 \
}
#define EFI_DISK_IO2_PROTOCOL_REVISION   0x00020000

Typedef Documentation

typedef IN UINT32 MediaId

Function Documentation

typedef EFI_STATUS ( EFIAPI EFI_DISK_FLUSH_EX)

Terminate outstanding asynchronous requests to a device.

Parameters
ThisIndicates a pointer to the calling context.
Return values
EFI_SUCCESSAll outstanding requests were successfully terminated.
EFI_DEVICE_ERRORThe device reported an error while performing the cancel operation.

Reads a specified number of bytes from a device.

Parameters
ThisIndicates a pointer to the calling context.
MediaIdID of the medium to be read.
OffsetThe starting byte offset on the logical block I/O device to read from.
TokenA pointer to the token associated with the transaction. If this field is NULL, synchronous/blocking IO is performed.
BufferSizeThe size in bytes of Buffer. The number of bytes to read from the device.
BufferA pointer to the destination buffer for the data. The caller is responsible either having implicit or explicit ownership of the buffer.
Return values
EFI_SUCCESSIf Event is NULL (blocking I/O): The data was read correctly from the device. If Event is not NULL (asynchronous I/O): The request was successfully queued for processing. Event will be signaled upon completion.
EFI_DEVICE_ERRORThe device reported an error while performing the write.
EFI_NO_MEDIAThere is no medium in the device.
EFI_MEDIA_CHNAGEDThe MediaId is not for the current medium.
EFI_INVALID_PARAMETERThe read request contains device addresses that are not valid for the device.
EFI_OUT_OF_RESOURCESThe request could not be completed due to a lack of resources.

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 to.
TokenA pointer to the token associated with the transaction. If this field is NULL, synchronous/blocking IO is performed.
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_SUCCESSIf Event is NULL (blocking I/O): The data was written correctly to the device. If Event is not NULL (asynchronous I/O): The request was successfully queued for processing. Event will be signaled upon completion.
EFI_WRITE_PROTECTEDThe device cannot be written to.
EFI_DEVICE_ERRORThe device reported an error while performing the write operation.
EFI_NO_MEDIAThere is no medium in the device.
EFI_MEDIA_CHNAGEDThe MediaId is not for the current medium.
EFI_INVALID_PARAMETERThe write request contains device addresses that are not valid for the device.
EFI_OUT_OF_RESOURCESThe request could not be completed due to a lack of resources.

Flushes all modified data to the physical device.

Parameters
ThisIndicates a pointer to the calling context.
MediaIdID of the medium to be written.
TokenA pointer to the token associated with the transaction. If this field is NULL, synchronous/blocking IO is performed.
Return values
EFI_SUCCESSIf Event is NULL (blocking I/O): The data was flushed successfully to the device. If Event is not NULL (asynchronous I/O): The request was successfully queued for processing. Event will be signaled upon completion.
EFI_WRITE_PROTECTEDThe device cannot be written to.
EFI_DEVICE_ERRORThe device reported an error while performing the write operation.
EFI_NO_MEDIAThere is no medium in the device.
EFI_MEDIA_CHNAGEDThe MediaId is not for the current medium.
EFI_OUT_OF_RESOURCESThe request could not be completed due to a lack of resources.

Variable Documentation

EFI_GUID gEfiDiskIo2ProtocolGuid