TianoCore EDK2 master
Loading...
Searching...
No Matches
DiskIo2.h File Reference

Go to the source code of this file.

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 EFI_STATUS(EFIAPI * EFI_DISK_CANCEL_EX) (IN EFI_DISK_IO2_PROTOCOL *This)
 
typedef EFI_STATUS(EFIAPI * EFI_DISK_READ_EX) (IN EFI_DISK_IO2_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Offset, IN OUT EFI_DISK_IO2_TOKEN *Token, IN UINTN BufferSize, OUT VOID *Buffer)
 
typedef EFI_STATUS(EFIAPI * EFI_DISK_WRITE_EX) (IN EFI_DISK_IO2_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Offset, IN OUT EFI_DISK_IO2_TOKEN *Token, IN UINTN BufferSize, IN VOID *Buffer)
 
typedef EFI_STATUS(EFIAPI * EFI_DISK_FLUSH_EX) (IN EFI_DISK_IO2_PROTOCOL *This, IN OUT EFI_DISK_IO2_TOKEN *Token)
 

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

Definition in file DiskIo2.h.

Macro Definition Documentation

◆ EFI_DISK_IO2_PROTOCOL_GUID

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

Definition at line 15 of file DiskIo2.h.

◆ EFI_DISK_IO2_PROTOCOL_REVISION

#define EFI_DISK_IO2_PROTOCOL_REVISION   0x00020000

Definition at line 146 of file DiskIo2.h.

Typedef Documentation

◆ EFI_DISK_CANCEL_EX

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

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.

Definition at line 51 of file DiskIo2.h.

◆ EFI_DISK_FLUSH_EX

typedef EFI_STATUS(EFIAPI * EFI_DISK_FLUSH_EX) (IN EFI_DISK_IO2_PROTOCOL *This, IN OUT EFI_DISK_IO2_TOKEN *Token)

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.

Definition at line 140 of file DiskIo2.h.

◆ EFI_DISK_IO2_PROTOCOL

Definition at line 20 of file DiskIo2.h.

◆ EFI_DISK_READ_EX

typedef EFI_STATUS(EFIAPI * EFI_DISK_READ_EX) (IN EFI_DISK_IO2_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Offset, IN OUT EFI_DISK_IO2_TOKEN *Token, IN UINTN BufferSize, OUT VOID *Buffer)

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.

Definition at line 79 of file DiskIo2.h.

◆ EFI_DISK_WRITE_EX

typedef EFI_STATUS(EFIAPI * EFI_DISK_WRITE_EX) (IN EFI_DISK_IO2_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Offset, IN OUT EFI_DISK_IO2_TOKEN *Token, 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 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.

Definition at line 112 of file DiskIo2.h.