EFI BLOCK IO MEDIA

From PhoenixWiki

Jump to: navigation, search

Prototype

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;

Members

Member Description
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 the EFI_BLOCK_IO_PROTOCOL was produced to abstract partition structures on the disk. FALSE if the EFI_BLOCK_IO_PROTOCOL was produced to abstract the logical blocks on a hardware device.
ReadOnly TRUE if the media is marked read-only otherwise, FALSE. This field shows the read-only status as of the most recent WriteBlocks() call.
WriteCaching TRUE if the WriteBlocks() function caches write data.
BlockSize The intrinsic block size of the device. If the media changes, then this field is updated.
IoAlign Supplies the alignment requirement for any buffer used in a data transfer. IoAlign values of 0 and 1 mean that the buffer can

be placed anywhere in memory. Otherwise, IoAlign must be a power of 2, and the requirement is that the start address of a buffer must be evenly divisible by IoAlign with no remainder.

LastBlock The last logical block address on the device. If the media changes, then this field is updated.

Description

The data values in EFI_BLOCK_IO_MEDIA are read-only and are updated by the code that produces the EFI_BLOCK_IO_PROTOCOL functions.

The LogicalPartition is TRUE if the device handle is for a partition. For media that have only one partition, the value will always be TRUE. For media that have multiple partitions, this value is FALSE for the handle that accesses the entire device. The firmware is responsible for adding device handles for each partition on such media.


Copyright (C) 2008,2010 Phoenix Technologies Ltd. All Rights Reserved. Portions copyright (C) 2008 UEFI Forum, Inc. Used with permission.

Personal tools