Advanced Technology Attachment (ATA) and Advanced Technology Attachment Packet Interface (ATAPI) drivers.
More...
|
static const char * | ata_get_device_error_str (uint8_t error) |
| Returns the set of ATA errors as a string. More...
|
|
static const char * | ata_get_device_status_str (uint8_t status) |
| Returns the device status as a string. More...
|
|
static const char * | ata_get_device_settings_str (ata_device_t *dev) |
| Returns the device configuration as string. More...
|
|
static const char * | ata_get_device_type_str (ata_device_type_t type) |
| Returns the device type as string. More...
|
|
static void | ata_dump_device (ata_device_t *dev) |
| Dumps on debugging output the device data. More...
|
|
static void | ata_io_wait (ata_device_t *dev) |
| Waits for approximately 400 nanoseconds by performing four I/O reads. More...
|
|
static int | ata_status_wait_not (ata_device_t *dev, long mask, long timeout) |
| Waits until the status bits selected through the mask are zero. More...
|
|
static int | ata_status_wait_for (ata_device_t *dev, long mask, long timeout) |
| Waits until the status bits selected through the mask are set. More...
|
|
static void | ata_print_status_error (ata_device_t *dev) |
| Prints the status and error information about the device. More...
|
|
static uint64_t | ata_max_offset (ata_device_t *dev) |
| Ge the maximum offset for the given device. More...
|
|
static void | ata_fix_string (char *str, size_t len) |
| Fixes all ATA-related strings. More...
|
|
static void | ata_soft_reset (ata_device_t *dev) |
| Performs a soft reset of the device. More...
|
|
static uintptr_t | ata_dma_alloc (size_t size, uintptr_t *physical) |
| Creates the DMA memory area used to write and read on the device. More...
|
|
static int | ata_dma_free (uintptr_t logical_addr) |
| Frees the DMA memory area previously allocated. More...
|
|
static int | ata_dma_enable_bus_mastering (void) |
| Enables bus mastering, allowing Direct Memory Access (DMA) transactions. More...
|
|
static int | ata_dma_disable_bus_mastering (void) |
| Disables bus mastering, preventing Direct Memory Access (DMA) transactions. More...
|
|
static int | ata_dma_initialize_bus_mastering_address (ata_device_t *dev) |
| Initializes the bus mastering register (BMR) fields of the ATA device. More...
|
|
static ata_device_type_t | ata_detect_device_type (ata_device_t *dev) |
| Detects the type of device. More...
|
|
static bool_t | ata_device_init (ata_device_t *dev) |
| Initialises the given device. More...
|
|
static void | ata_device_read_sector (ata_device_t *dev, uint32_t lba_sector, uint8_t *buffer) |
| Reads an ATA sector. More...
|
|
static void | ata_device_write_sector (ata_device_t *dev, uint32_t lba_sector, uint8_t *buffer) |
| Writs an ATA sector. More...
|
|
static vfs_file_t * | ata_open (const char *path, int flags, mode_t mode) |
| Implements the open function for an ATA device. More...
|
|
static int | ata_close (vfs_file_t *file) |
| Closes an ATA device. More...
|
|
static ssize_t | ata_read (vfs_file_t *file, char *buffer, off_t offset, size_t size) |
| Reads from an ATA device. More...
|
|
static ssize_t | ata_write (vfs_file_t *file, const void *buffer, off_t offset, size_t size) |
| Writes on an ATA device. More...
|
|
static int | _ata_stat (const ata_device_t *dev, stat_t *stat) |
| Stats an ATA device. More...
|
|
static int | ata_fstat (vfs_file_t *file, stat_t *stat) |
| Retrieves information concerning the file at the given position. More...
|
|
static int | ata_stat (const char *path, stat_t *stat) |
| Retrieves information concerning the file at the given position. More...
|
|
static vfs_file_t * | ata_mount_callback (const char *path, const char *device) |
| The mount call-back, which prepares everything and calls the actual ATA mount function. More...
|
|
static vfs_file_t * | ata_device_create (ata_device_t *dev) |
| Creates a VFS file, starting from an ATA device. More...
|
|
static ata_device_type_t | ata_device_detect (ata_device_t *dev) |
| Detects and mount the given ATA device. More...
|
|
static void | ata_irq_handler_master (pt_regs *f) |
|
static void | ata_irq_handler_slave (pt_regs *f) |
|
static void | pci_find_ata (uint32_t device, uint16_t vendorid, uint16_t deviceid, void *extra) |
| Used while scanning the PCI interface. More...
|
|
int | ata_initialize (void) |
| Initializes the ATA drivers. More...
|
|
int | ata_finalize (void) |
| De-initializes the ATA drivers. More...
|
|
Advanced Technology Attachment (ATA) and Advanced Technology Attachment Packet Interface (ATAPI) drivers.
- Copyright
- (c) 2014-2024 This file is distributed under the MIT License. See LICENSE.md for details.