#include <pci_bridge_base.hpp>


Public Member Functions | |
| virtual int | reset (void) |
| Resets the bridge and all registered PCI devices as when powering up the machine. | |
| virtual int | register_device (pci_device *device) |
| Registers the PCI device at this bridge. | |
| virtual int | unregister_device (const pci_device *device) |
| Unregisters the PCI device. | |
| virtual pci_device * | get_device (const pci_devfn devfn) const |
| Returns the device at the specified bus location or NULL, if this slot is empty. | |
| virtual const search_result | search_ioregion (enum pci_ioregion::type type, l4_gpa_t base, l4_gpa_t size=1) const |
| Searchs an I/O region and returns it in a search_result struct. | |
Static Public Attributes | |
| static const uint8_t | MAX_DEVICES = 32 |
| Number of PCI devices this bridge implementation can handle. | |
Defines everything needed to handle several PCI devices (or to act as a container of PCI devices).
| virtual int pci_bridge_base::register_device | ( | pci_device * | device | ) | [inline, virtual] |
Registers the PCI device at this bridge.
Registered devices are automatically freed when the bridge is destroyed.
Implements pci_bridge.
References device_container< DeviceT >::register_device().
| virtual const search_result pci_bridge_base::search_ioregion | ( | enum pci_ioregion::type | type, | |
| l4_gpa_t | base, | |||
| l4_gpa_t | size = 1 | |||
| ) | const [inline, virtual] |
Searchs an I/O region and returns it in a search_result struct.
base & size are I/O space addresses (ports) or guest physical addresses depending on the type to search for.
Implements pci_bridge.
References device_container< pci_device >::begin(), device_container< pci_device >::end(), and pci_device::search_result::is_valid().