Efi_block_io.readblocks(), Readblocks(), Func – Intel Extensible Firmware Interface User Manual
Page 405: Cent

Protocols
— Bootable Image Support
Version 1.10
12/01/02
11-45
EFI_BLOCK_IO.ReadBlocks()
Summary
Reads the requested number of blocks from the device.
Prototype
EFI_STATUS
(EFIAPI *EFI_BLOCK_READ) (
IN
EFI_BLOCK_IO
*This,
IN
UINT32
MediaId,
IN
EFI_LBA
LBA,
IN
UINTN
BufferSize,
OUT
VOID
*Buffer
);
Parameters
This
Indicates a pointer to the calling context. Type
EFI_BLOCK_IO
is
defined in the
protocol description.
MediaId
The media ID that the read request is for.
LBA
The starting logical block address to read from on the device. Type
is defined in the
BLOCK_IO
protocol description.
BufferSize
The size of the
Buffer
in bytes. This must be a multiple of the intrinsic
block size of the device.
Buffer
A pointer to the destination buffer for the data. The caller is responsible
for either having implicit or explicit ownership of the buffer.
Description
The
ReadBlocks()
function reads the requested number of blocks from the device. All the
blocks are read, or an error is returned.
If there is no media in the device, the function returns
EFI_NO_MEDIA
. If the
MediaId
is not
the ID for the current media in the device, the function returns
EFI_MEDIA_CHANGED
.