AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
ata_drive Struct Reference

A drive on a channel. More...

#include <ata.h>

Data Fields

struct ioaddr base
struct ioaddr ctrl
struct ata_channel * channel
uint8_t id
uint8_t mode
uint16_t type
uint8_t slave
size_t poff [4]
size_t psize [4]
uint16_t signature
uint16_t capabilities
uint32_t command_sets
uint64_t max_lba
char model [41]
ssize_t(*) read (struct ata_drive *drive, uint64_t lba, size_t count, void *buf)
ssize_t(*) write (struct ata_drive *drive, uint64_t lba, size_t count, void *buf)
int(*) flush (struct ata_drive *drive)

Detailed Description

A drive on a channel.

Definition at line 126 of file ata.h.

Field Documentation

◆ base

◆ capabilities

uint16_t ata_drive::capabilities

Definition at line 141 of file ata.h.

Referenced by ata_detect_drive(), dma_init(), pio_read_sectors(), and pio_write_sectors().

◆ channel

struct ata_channel* ata_drive::channel

Definition at line 129 of file ata.h.

Referenced by ata_irq(), ata_locate(), ata_sync(), dma_init(), dma_transfer(), drive_read(), and drive_write().

◆ command_sets

uint32_t ata_drive::command_sets

Definition at line 142 of file ata.h.

Referenced by ata_detect_drive().

◆ ctrl

struct ioaddr ata_drive::ctrl

Definition at line 128 of file ata.h.

Referenced by ata_probe(), ata_reset(), and ata_wait().

◆ flush

int(*) ata_drive::flush(struct ata_drive *drive)

Definition at line 149 of file ata.h.

Referenced by pio_init().

◆ id

uint8_t ata_drive::id

Definition at line 131 of file ata.h.

Referenced by ata_detect_drive(), ata_probe(), channel_index(), and dma_transfer().

◆ max_lba

uint64_t ata_drive::max_lba

Definition at line 143 of file ata.h.

Referenced by ata_detect_drive(), ata_partition(), and ata_read().

◆ mode

◆ model

char ata_drive::model[41]

Definition at line 144 of file ata.h.

Referenced by ata_detect_drive().

◆ poff

size_t ata_drive::poff[4]

Definition at line 135 of file ata.h.

Referenced by ata_partition().

◆ psize

size_t ata_drive::psize[4]

Definition at line 136 of file ata.h.

Referenced by ata_partition().

◆ read

ssize_t(*) ata_drive::read(struct ata_drive *drive, uint64_t lba, size_t count, void *buf)

Definition at line 147 of file ata.h.

Referenced by ata_locate(), ata_partition(), dma_init(), drive_read(), and pio_init().

◆ signature

uint16_t ata_drive::signature

Definition at line 140 of file ata.h.

Referenced by ata_detect_drive().

◆ slave

uint8_t ata_drive::slave

Definition at line 134 of file ata.h.

Referenced by ata_detect_drive(), ata_probe(), ata_select_drive(), and ata_setup().

◆ type

uint16_t ata_drive::type

Definition at line 133 of file ata.h.

Referenced by ata_detect_drive().

◆ write

ssize_t(*) ata_drive::write(struct ata_drive *drive, uint64_t lba, size_t count, void *buf)

Definition at line 148 of file ata.h.

Referenced by ata_locate(), dma_init(), drive_write(), and pio_init().


The documentation for this struct was generated from the following file: