#include <mmio_handler.hpp>


Public Member Functions | |
| virtual | ~mmio_handler (void) |
| Empty virtual destructor to enforce derived virtual destructors. | |
| virtual l4_umword_t | read_mmio (l4_gpa_t address, access_size access_size)=0 |
| 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)=0 |
| 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)=0 |
| 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)=0 |
| Unmaps the specified (guest) physical memory region from the hosts (virtual) address space. | |
Static Public Attributes | |
| static const l4_umword_t | INVALID = ~0ul |
| The invalid value to be returned on invalid read accesses. | |
These functions are called whenever the memory_manager detects accesses to memory claimed by this handler.
| virtual l4_umword_t mmio_handler::read_mmio | ( | l4_gpa_t | address, | |
| access_size | access_size | |||
| ) | [pure 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.
Implemented in device_base, host_resource_owner, and ata_channel.
| virtual int mmio_handler::write_mmio | ( | l4_gpa_t | address, | |
| l4_umword_t | data, | |||
| access_size | access_size | |||
| ) | [pure virtual] |
Emulate a device's memory mapped I/O write access.
This function is intended to be overridden.
Implemented in device_base, host_resource_owner, and ata_channel.
| virtual l4_hva_t mmio_handler::map_mmio_region | ( | int | flags, | |
| l4_gpa_t | base, | |||
| l4_gpa_t | size = 1 | |||
| ) | [pure virtual] |
Maps the specified (guest) physical memory region to the hosts (virtual) address space.
This function is intended to be overridden.
Implemented in device_base, host_resource_owner, pci_device_base< SpaceT >, ata_channel, l4io_device, pci_device_base< l4io_device_config_space >, pci_device_base< piix_ide_config_space >, and pci_device_base< dummy_device_config_space >.
| virtual int mmio_handler::unmap_mmio_region | ( | l4_gpa_t | base, | |
| l4_gpa_t | size = 1 | |||
| ) | [pure virtual] |
Unmaps the specified (guest) physical memory region from the hosts (virtual) address space.
This function is intended to be overridden.
Implemented in device_base, host_resource_owner, pci_device_base< SpaceT >, ata_channel, l4io_device, pci_device_base< l4io_device_config_space >, pci_device_base< piix_ide_config_space >, and pci_device_base< dummy_device_config_space >.