L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
L4vbus::Pci_host_bridge Class Reference

A Pci host bridge. More...

#include <vbus_pci>

+ Inheritance diagram for L4vbus::Pci_host_bridge:
+ Collaboration diagram for L4vbus::Pci_host_bridge:

Public Member Functions

int cfg_read (l4_uint32_t bus, l4_uint32_t devfn, l4_uint32_t reg, l4_uint32_t *value, l4_uint32_t width) const
 Read from the vPCI configuration space using the PCI root bridge.
 
int cfg_write (l4_uint32_t bus, l4_uint32_t devfn, l4_uint32_t reg, l4_uint32_t value, l4_uint32_t width) const
 Write to the vPCI configuration space using the PCI root bridge.
 
int irq_enable (l4_uint32_t bus, l4_uint32_t devfn, int pin, unsigned char *trigger, unsigned char *polarity) const
 Enable PCI interrupt for a specific device using the PCI root bridge.
 
- Public Member Functions inherited from L4vbus::Device
 Device ()
 Construct a new vbus device using the NULL device L4VBUS_NULL.
 
 Device (L4::Cap< Vbus > bus, l4vbus_device_handle_t dev)
 Construct a new vbus device using a device handle.
 
L4::Cap< Vbusbus_cap () const
 Access the Vbus capability of the underlying virtual bus.
 
l4vbus_device_handle_t dev_handle () const
 Access the device handle of this device.
 
int device_by_hid (Device *child, char const *hid, int depth=L4VBUS_MAX_DEPTH, l4vbus_device_t *devinfo=0) const
 Find a device by the hardware interface identifier (HID).
 
int next_device (Device *child, int depth=L4VBUS_MAX_DEPTH, l4vbus_device_t *devinfo=0) const
 Find next child following child.
 
int device (l4vbus_device_t *devinfo) const
 Obtain detailed information about a Vbus device.
 
int get_resource (int res_idx, l4vbus_resource_t *res) const
 Obtain the resource description of an individual device resource.
 
int is_compatible (char const *cid) const
 Check if the given device has a compatibility ID (CID) or HID that matches cid.
 
bool operator== (Device const &o) const
 Test if two devices are the same Vbus device.
 
bool operator!= (Device const &o) const
 Test if two Vbus devices are not the same.
 
- Public Member Functions inherited from L4vbus::Pm< Device >
int pm_suspend () const
 Suspend the device.
 
int pm_resume () const
 Resume the device.
 

Additional Inherited Members

- Protected Attributes inherited from L4vbus::Device
L4::Cap< Vbus_bus
 The Vbus capability where this device is located on.
 
l4vbus_device_handle_t _dev
 The device handle for this device.
 

Detailed Description

A Pci host bridge.

Definition at line 27 of file vbus_pci.

Member Function Documentation

◆ cfg_read()

int L4vbus::Pci_host_bridge::cfg_read ( l4_uint32_t  bus,
l4_uint32_t  devfn,
l4_uint32_t  reg,
l4_uint32_t value,
l4_uint32_t  width 
) const
inline

Read from the vPCI configuration space using the PCI root bridge.

Parameters
busBus number
devfnDevice id (upper 16bit) and function (lower 16bit)
regRegister in configuration space to read
[out]valueValue that has been read
widthWidth to read in bits (e.g. 8, 16, 32)
Returns
0 on success, else failure

Definition at line 41 of file vbus_pci.

References L4vbus::Device::_dev, L4vbus::Device::bus_cap(), and l4vbus_pci_cfg_read().

+ Here is the call graph for this function:

◆ cfg_write()

int L4vbus::Pci_host_bridge::cfg_write ( l4_uint32_t  bus,
l4_uint32_t  devfn,
l4_uint32_t  reg,
l4_uint32_t  value,
l4_uint32_t  width 
) const
inline

Write to the vPCI configuration space using the PCI root bridge.

Parameters
busBus number
devfnDevice id (upper 16bit) and function (lower 16bit)
regRegister in configuration space to write
valueValue to write
widthWidth to write in bits (e.g. 8, 16, 32)
Returns
0 on success, else failure

Definition at line 60 of file vbus_pci.

References L4vbus::Device::_dev, L4vbus::Device::bus_cap(), and l4vbus_pci_cfg_write().

+ Here is the call graph for this function:

◆ irq_enable()

int L4vbus::Pci_host_bridge::irq_enable ( l4_uint32_t  bus,
l4_uint32_t  devfn,
int  pin,
unsigned char *  trigger,
unsigned char *  polarity 
) const
inline

Enable PCI interrupt for a specific device using the PCI root bridge.

Parameters
busBus number
devfnDevice id (upper 16bit) and function (lower 16bit)
pinInterrupt pin (normally as reported in configuration register INTR)
[out]triggerFalse if interrupt is level-triggered
[out]polarityTrue if interrupt is of low polarity
Returns
On success: Interrupt line to be used, else failure

Definition at line 81 of file vbus_pci.

References L4vbus::Device::_dev, L4vbus::Device::bus_cap(), and l4vbus_pci_irq_enable().

+ Here is the call graph for this function:

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