TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | EFI_BLOCK_IO_MEDIA |
struct | _EFI_BLOCK_IO_PROTOCOL |
Macros | |
#define | EFI_BLOCK_IO_PROTOCOL_GUID |
#define | BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL_GUID |
#define | EFI_BLOCK_IO_PROTOCOL_REVISION 0x00010000 |
#define | EFI_BLOCK_IO_PROTOCOL_REVISION2 0x00020001 |
#define | EFI_BLOCK_IO_PROTOCOL_REVISION3 0x0002001F |
#define | EFI_BLOCK_IO_INTERFACE_REVISION EFI_BLOCK_IO_PROTOCOL_REVISION |
Typedefs | |
typedef struct _EFI_BLOCK_IO_PROTOCOL | EFI_BLOCK_IO_PROTOCOL |
typedef EFI_BLOCK_IO_PROTOCOL | EFI_BLOCK_IO |
typedef EFI_STATUS(EFIAPI * | EFI_BLOCK_RESET) (IN EFI_BLOCK_IO_PROTOCOL *This, IN BOOLEAN ExtendedVerification) |
typedef EFI_STATUS(EFIAPI * | EFI_BLOCK_READ) (IN EFI_BLOCK_IO_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA Lba, IN UINTN BufferSize, OUT VOID *Buffer) |
typedef EFI_STATUS(EFIAPI * | EFI_BLOCK_WRITE) (IN EFI_BLOCK_IO_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA Lba, IN UINTN BufferSize, IN VOID *Buffer) |
typedef EFI_STATUS(EFIAPI * | EFI_BLOCK_FLUSH) (IN EFI_BLOCK_IO_PROTOCOL *This) |
Variables | |
EFI_GUID | gEfiBlockIoProtocolGuid |
Block IO protocol as defined in the UEFI 2.0 specification.
The Block IO protocol is used to abstract block devices like hard drives, DVD-ROMs and floppy drives.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file BlockIo.h.
#define BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL_GUID |
#define EFI_BLOCK_IO_INTERFACE_REVISION EFI_BLOCK_IO_PROTOCOL_REVISION |
#define EFI_BLOCK_IO_PROTOCOL_GUID |
typedef EFI_STATUS(EFIAPI * EFI_BLOCK_FLUSH) (IN EFI_BLOCK_IO_PROTOCOL *This) |
Flush the Block Device.
This | Indicates a pointer to the calling context. |
EFI_SUCCESS | All outstanding data was written to the device |
EFI_DEVICE_ERROR | The device reported an error while writting back the data |
EFI_NO_MEDIA | There is no media in the device. |
typedef EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO |
typedef struct _EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL |
typedef EFI_STATUS(EFIAPI * EFI_BLOCK_READ) (IN EFI_BLOCK_IO_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA Lba, IN UINTN BufferSize, OUT VOID *Buffer) |
Read BufferSize bytes from Lba into Buffer.
This | Indicates a pointer to the calling context. |
MediaId | Id of the media, changes every time the media is replaced. |
Lba | The starting Logical Block Address to read from |
BufferSize | Size of Buffer, must be a multiple of device block size. |
Buffer | A pointer to the destination buffer for the data. The caller is responsible for either having implicit or explicit ownership of the buffer. |
EFI_SUCCESS | The data was read correctly from the device. |
EFI_DEVICE_ERROR | The device reported an error while performing the read. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId does not matched the current device. |
EFI_BAD_BUFFER_SIZE | The Buffer was not a multiple of the block size of the device. |
EFI_INVALID_PARAMETER | The read request contains LBAs that are not valid, or the buffer is not on proper alignment. |
typedef EFI_STATUS(EFIAPI * EFI_BLOCK_RESET) (IN EFI_BLOCK_IO_PROTOCOL *This, IN BOOLEAN ExtendedVerification) |
Reset the Block Device.
This | Indicates a pointer to the calling context. |
ExtendedVerification | Driver may perform diagnostics on reset. |
EFI_SUCCESS | The device was reset. |
EFI_DEVICE_ERROR | The device is not functioning properly and could not be reset. |
typedef EFI_STATUS(EFIAPI * EFI_BLOCK_WRITE) (IN EFI_BLOCK_IO_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA Lba, IN UINTN BufferSize, IN VOID *Buffer) |
Write BufferSize bytes from Lba into Buffer.
This | Indicates a pointer to the calling context. |
MediaId | The media ID that the write request is for. |
Lba | The starting logical block address to be written. The caller is responsible for writing to only legitimate locations. |
BufferSize | Size of Buffer, must be a multiple of device block size. |
Buffer | A pointer to the source buffer for the data. |
EFI_SUCCESS | The data was written correctly to the device. |
EFI_WRITE_PROTECTED | The device can not be written to. |
EFI_DEVICE_ERROR | The device reported an error while performing the write. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHNAGED | The MediaId does not matched the current device. |
EFI_BAD_BUFFER_SIZE | The Buffer was not a multiple of the block size of the device. |
EFI_INVALID_PARAMETER | The write request contains LBAs that are not valid, or the buffer is not on proper alignment. |