Chapter 46. Configuring the DISK I/O Package

This chapter shows how to include the DISK I/O package an eCos configuration and how to configure it once installed.

46.1. Including DISK I/O in a Configuration

The DISK I/O subsystem is contained in a single eCos package, CYGPKG_IO_DISK. However, it depends on the services of the following other packages for complete functionality:

CYGPKG_IO
Device IO package. Disk devices operate within the generic device infrastructure.
CYGPKG_ERROR
The error package. Disk devices need to return standard error codes when operations fail.

The DISK I/O package can be added to any configuration just by adding its package during configuration. However, it is usually added as part of a group which also includes a filesystem implementation and hardware device drivers.

46.2. Configuring the DISK I/O Package

The option "Detect FAT boot sector" (CYGSEM_IO_DISK_DETECT_FAT_BOOT) can be used with certain types of removable media which are treated undeterministically by Windows PCs, such as USB keys. These usually contain a partition table, but if completely wiped, Windows will not recreate the partition table, and instead place a FAT filesystem directly on the device with no partition table. Enabling this option detects this and fabricates a partition table in memory instead. This option is usually only needed on systems which use removable media likely to be shared with Windows PCs, as indicated from low level drivers with the CYGINT_IO_DISK_DETECT_FAT_BOOT_DEFAULT CDL interface.

The CDL option CYGSEM_IO_DISK_EFI_GPT is used to support media formatted with an Extensible Firmware Interface (EFI) GUID Partition Table (GPT). This is limited to media presenting a single \"protective\" MBR partition entry covering the GPT managed space. Currently the feature is limited to providing the number of partitions supported by the parent filesystem package, and only those partitions accessible using 32-bit LBA values.

The CDL interface CYGINT_IO_DISK_ALIGN_BUFS_TO_CACHELINE indicates to the disk I/O package, and to its users, that data transfer buffers need to be aligned to data cache line boundaries.

The CDL interface CYGINT_IO_DISK_REMOVABLE_MEDIA_SUPPORT indicates that the hardware disk driver implements removable media support. This will cause the disk I/O package to implement the CYG_IO_SET_CONFIG_DISK_EVENT and CYG_IO_GET_CONFIG_DISK_EVENT configuration option keys.