beautypg.com

Intel Extensible Firmware Interface User Manual

Page 402

background image

Extensible Firmware Interface Specification

11-42

12/01/02

Version 1.10

WriteBlocks

Writes the requested number of blocks to the device. See the

WriteBlocks()

function description.

FlushBlocks

Flushes and cache blocks. This function is optional and only
needs to be supported on block devices that cache writes. See
the

FlushBlocks()

function description.

Related Definitions

//*******************************************************
// EFI_BLOCK_IO_MEDIA
//*******************************************************

typedef struct {

UINT32 MediaId;

BOOLEAN RemovableMedia;

BOOLEAN MediaPresent;

BOOLEAN LogicalPartition;

BOOLEAN ReadOnly;

BOOLEAN WriteCaching;

UINT32 BlockSize;

UINT32 IoAlign;

EFI_LBA LastBlock;

} EFI_BLOCK_IO_MEDIA;


//*******************************************************
// EFI_LBA
//*******************************************************

typedef UINT64 EFI_LBA;

The following data values in

EFI_BLOCK_IO_MEDIA

are read-only and are updated by the

code that produces the

EFI_BLOCK_IO

protocol functions:

MediaId

The current media ID. If the media changes, this value is
changed.

RemovableMedia

TRUE

if the media is removable; otherwise,

FALSE

.

MediaPresent

TRUE

if there is a media currently present in the device;

otherwise,

FALSE

. This field shows the media present status as

of the most recent

ReadBlocks()

or

WriteBlocks()

call.

LogicalPartition

TRUE

if LBA 0 is the first block of a partition; otherwise

FALSE

. For media with only one partition this would be

TRUE

.