#include <pci_ioregion.hpp>


Public Types | |
| enum | type { UNUSED = 0x00, IOSPACE = 0x01, MEM = 0x02, MEM_PREFETCH = 0x04, ROM = 0x08, IOMEMORY = MEM | MEM_PREFETCH | ROM, ALL_MASK = UNUSED | IOSPACE | MEM | MEM_PREFETCH | ROM | IOMEMORY } |
| This PCI I/O region's type. More... | |
| typedef resource_region< l4_gpa_t > | super_type |
Public Member Functions | |
| pci_ioregion (const enum type type, const l4_gpa_t base, const l4_gpa_t size, const l4_hva_t virtual_base=0) | |
| pci_ioregion (const union pci_config_header64::base_address ®, const l4_gpa_t size, const l4_hva_t virtual_base=0) | |
| pci_ioregion (const union pci_config_header64::expansion_ROM_address ®, const l4_gpa_t size, const l4_hva_t virtual_base) | |
| pci_ioregion & | operator() (const enum type type, const l4_gpa_t base, const l4_gpa_t size, const l4_hva_t virtual_base=0) |
| pci_ioregion & | operator() (const union pci_config_header64::base_address ®, const l4_gpa_t size, const l4_hva_t virtual_base=0) |
| pci_ioregion & | operator() (const union pci_config_header64::expansion_ROM_address ®, const l4_gpa_t size, const l4_hva_t virtual_base) |
| pci_ioregion & | reset (void) |
| Resets this PCI I/O region's physical base address to 0 as when powering up the machine. | |
| bool | is (const enum type type) const |
| Returns whether this PCI I/O region is the specified type. | |
| bool | is_iospace (void) const |
| Returns whether this PCI I/O region is an I/O space region. | |
| bool | is_iomemory (void) const |
| Returns whether this PCI I/O region is an I/O memory region. | |
| bool | is_located (void) const |
| Returns whether this PCI I/O region has been located by the client operating system. | |
| bool | is_used (void) const |
| Returns whether this PCI I/O region is used by the owning PCI device. | |
| l4_gpa_t | size_mask (void) const |
| Returns this PCI I/O region's size mask. | |
| template<typename WordT> | |
| WordT | base2bar (void) const |
| Calculates the word for the current base to be stored in the PCI configuration space (in CPU byte order). | |
| template<typename WordT> | |
| WordT | size2bar (void) const |
| Calculates the word for the current size to be stored in the PCI configuration space (in CPU byte order). | |
| operator l4_umword_t (void) const | |
| Calculates the word for the current base to be stored in the PCI configuration space (in CPU byte order). | |
| const char * | type2string (void) const |
| Returns this PCI I/O region's type as string. | |
| int | print (const char *prefix="", const char *suffix="") const |
| Prints this PCI I/O region's base, end, size, and type. | |
| int | print_short (const char *prefix="", const char *suffix="") const |
| Prints this PCI I/O region's base, size, and type. | |
Static Public Member Functions | |
| template<typename WordT> | |
| static WordT | register_value (const enum type type, const WordT value) |
| Calculates the word for the specified value (usually base or size) to be stored in the PCI configuration space (in CPU byte order). | |
| static const char * | type2string (const enum type type) |
| Returns the specified PCI I/O region type as string. | |
Public Attributes | |
| enum pci_ioregion::type | type |
| This PCI I/O region's type. | |
| l4_hva_t | virtual_base |
| This PCI I/O region's corresponding virtual base address, if applicable. | |
A value of 0 has a special meaning for base & size: A 0 base indicates that the region is not located by the client operating system. A 0 size indicates that the region is not used by the device.
| enum pci_ioregion::type |
| l4_gpa_t pci_ioregion::size_mask | ( | void | ) | const [inline] |
Returns this PCI I/O region's size mask.
That is a value with the upper bits set and the lower (not modifiable) bits cleared.
Referenced by size2bar().
| l4_hva_t pci_ioregion::virtual_base |
This PCI I/O region's corresponding virtual base address, if applicable.
For I/O memory regions, this value should be initialized upon construction. I/O space regions don't need it.
Referenced by l4io_device::map_mmio_region(), and l4io_device::unmap_mmio_region().