Overview   API Reference  

pci_device Struct Reference

Interface for PCI devices. More...

#include <pci_device.hpp>

Inheritance diagram for pci_device:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~pci_device (void)
 Empty virtual destructor to enforce derived virtual destructors.
virtual const char * name (void) const =0
 Returns the device's name.
virtual int reset (void)=0
 Resets the device's state and all writable PCI configuration space values back to defaults as when powering up the machine.
virtual const pci_ioregionget_ioregion (uint8_t region_num) const =0
 Returns a device's I/O region by its index or NULL, if the index is invalid.
virtual const search_result search_ioregion (enum pci_ioregion::type type, l4_gpa_t base, l4_gpa_t size=1) const =0
 Searchs an I/O region and returns it in a search_result struct.
virtual const pci_config_header64 & get_config_space (void) const =0
 Returns a device's PCI configuration space.
virtual l4_umword_t read_config_space (pci_config_header16::offset_t offset, access_size access_size)=0
 Emulates a device's PCI configuration space read access and returns the value that should have been read.
virtual int write_config_space (pci_config_header16::offset_t offset, l4_umword_t data, access_size access_size)=0
 Emulates a device's PCI configuration space write access.

Static Public Member Functions

static const char * class_name (void)
 Returns the class' name to generate customized log messages in templates.

Classes

struct  search_result
 Result type for search region functions. More...


Detailed Description

Interface for PCI devices.

Defines everything a PCI bridge needs to know about a PCI device.


Member Function Documentation

virtual const search_result pci_device::search_ioregion ( enum pci_ioregion::type  type,
l4_gpa_t  base,
l4_gpa_t  size = 1 
) const [pure virtual]

Searchs an I/O region and returns it in a search_result struct.

base & size are I/O space addresses or guest physical addresses depending on the type to search for.

Implemented in pci_device_base< SpaceT >, pci_device_base< l4io_device_config_space >, pci_device_base< piix_ide_config_space >, and pci_device_base< dummy_device_config_space >.

virtual l4_umword_t pci_device::read_config_space ( pci_config_header16::offset_t  offset,
access_size  access_size 
) [pure virtual]

Emulates a device's PCI configuration space read access and returns the value that should have been read.

This function is intended to be overridden.

Implemented in i440fx_host_bridge, pci_device_base< SpaceT >, 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 pci_device::write_config_space ( pci_config_header16::offset_t  offset,
l4_umword_t  data,
access_size  access_size 
) [pure virtual]

Emulates a device's PCI configuration space write access.

This function is intended to be overridden.

Implemented in i440fx_host_bridge, pci_device_base< SpaceT >, dummy_device, l4io_device, piix_ide, pci_device_base< l4io_device_config_space >, pci_device_base< piix_ide_config_space >, and pci_device_base< dummy_device_config_space >.


The documentation for this struct was generated from the following file:

L4vmm Reference Manual, written by Mario Schwalbe  © 2006-2008