78#define G1_ATA_MASTER 0x00
90#define G1_ATA_MASTER_ALT 0x90
98#define G1_ATA_SLAVE 0xB0
108#define G1_ATA_LBA_MODE 0x40
412 uint8_t *partition_type);
Definitions for a simple block device interface.
int g1_ata_flush(void)
Flush the write cache on the attached disk.
int g1_ata_lba_mode(void)
Get LBA mode of the attached disk.
int g1_ata_blockdev_for_partition(int partition, int dma, kos_blockdev_t *rv, uint8_t *partition_type)
Get a block device for a given partition on the slave ATA device.
void g1_ata_shutdown(void)
Shut down G1 ATA support.
int g1_ata_read_lba_dma(uint64_t sector, size_t count, void *buf, int block)
DMA read disk sectors with Linear Block Addressing (LBA).
int g1_ata_write_lba(uint64_t sector, size_t count, const void *buf)
Write one or more disk sectors with Linear Block Addressing (LBA).
int g1_dma_in_progress(void)
Is there a G1 DMA in progress currently?
int g1_ata_mutex_unlock(void)
Unlock the G1 ATA mutex.
int g1_ata_write_lba_dma(uint64_t sector, size_t count, const void *buf, int block)
DMA Write disk sectors with Linear Block Addressing (LBA).
int g1_ata_blockdev_for_device(int dma, kos_blockdev_t *rv)
Get a block device for the attached ATA device.
int g1_ata_read_chs(uint16_t c, uint8_t h, uint8_t s, size_t count, void *buf)
Read one or more disk sectors with Cylinder-Head-Sector addressing.
uint8_t g1_ata_select_device(uint8_t dev)
Set the active ATA device.
int g1_ata_init(void)
Initialize G1 ATA support.
int g1_ata_mutex_lock(void)
Lock the G1 ATA mutex.
int g1_ata_read_lba(uint64_t sector, size_t count, void *buf)
Read one or more disk sectors with Linear Block Addressing (LBA).
int g1_ata_write_chs(uint16_t c, uint8_t h, uint8_t s, size_t count, const void *buf)
Write one or more disk sectors with Cylinder-Head-Sector addressing.
A simple block device.
Definition blockdev.h:54