#include <ata_channel.hpp>


Public Member Functions | |
| ata_channel (machine_base &machine, const string &channel_name, ata_drive *drives[2]) | |
| virtual uint32_t | read_ioport (l4_port_t port, access_size access_size) |
| Emulate a device's I/O space read access and return the value that should have been read. | |
| virtual int | write_ioport (l4_port_t port, uint32_t data, access_size access_size) |
| Emulate a device's I/O space write access. | |
| virtual l4_umword_t | read_mmio (l4_gpa_t address, access_size access_size) |
| Emulate a device's memory mapped I/O read access and return the value that should have been read. | |
| virtual int | write_mmio (l4_gpa_t address, l4_umword_t data, access_size access_size) |
| Emulate a device's memory mapped I/O write access. | |
| virtual l4_hva_t | map_mmio_region (int flags, l4_gpa_t base, l4_gpa_t size=1) |
| Maps the specified (guest) physical memory region to the hosts (virtual) address space. | |
| virtual int | unmap_mmio_region (l4_gpa_t base, l4_gpa_t size=1) |
| Unmaps the specified (guest) physical memory region from the hosts (virtual) address space. | |
| const char * | name (void) const |
| int | reset (void) |
| void | locate_registers (const l4_gpa_t command_base=0, const l4_gpa_t control_base=0) |
| void | set_irq (const l4_irq_t irq) |
| void | assert_irq_if_enabled (void) |
| int | read_write_DMA (uint8_t read_write, l4_gpa_t PRD_base) |
Protected Member Functions | |
| template<const char *& AddressTypeC, typename AddressT> | |
| l4_umword_t | read_blocks (AddressT address, access_size access_size) |
| template<const char *& AddressTypeC, typename AddressT> | |
| int | write_blocks (AddressT address, l4_umword_t data, access_size access_size) |
Protected Attributes | |
| const string | channel_name |
| The channel's name returned by name(). | |
| l4_gpa_t | command_base |
| The ATA command block base. | |
| l4_gpa_t | control_base |
| The ATA control block base. | |
| ata_drive * | drives [2] |
| Master & slave drives. | |
| uint8_t | current_drive |
| The current (selected) drive index. | |
| virtual uint32_t ata_channel::read_ioport | ( | l4_port_t | port, | |
| access_size | access_size | |||
| ) | [inline, virtual] |
Emulate a device's I/O space read access and return the value that should have been read.
This function is intended to be overridden.
Implements iospace_handler.
| virtual int ata_channel::write_ioport | ( | l4_port_t | port, | |
| uint32_t | data, | |||
| access_size | access_size | |||
| ) | [inline, virtual] |
Emulate a device's I/O space write access.
This function is intended to be overridden.
Implements iospace_handler.
| virtual l4_umword_t ata_channel::read_mmio | ( | l4_gpa_t | address, | |
| access_size | access_size | |||
| ) | [inline, virtual] |
Emulate a device's memory mapped I/O read access and return the value that should have been read.
This function is intended to be overridden.
Implements mmio_handler.
| virtual int ata_channel::write_mmio | ( | l4_gpa_t | address, | |
| l4_umword_t | data, | |||
| access_size | access_size | |||
| ) | [inline, virtual] |
Emulate a device's memory mapped I/O write access.
This function is intended to be overridden.
Implements mmio_handler.
| virtual l4_hva_t ata_channel::map_mmio_region | ( | int | flags, | |
| l4_gpa_t | base, | |||
| l4_gpa_t | size = 1 | |||
| ) | [inline, virtual] |
Maps the specified (guest) physical memory region to the hosts (virtual) address space.
This function is intended to be overridden.
Implements mmio_handler.
| virtual int ata_channel::unmap_mmio_region | ( | l4_gpa_t | base, | |
| l4_gpa_t | size = 1 | |||
| ) | [inline, virtual] |
Unmaps the specified (guest) physical memory region from the hosts (virtual) address space.
This function is intended to be overridden.
Implements mmio_handler.