L4Re - L4 Runtime Environment
vbus_pci.h
1 /*
2  * (c) 2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3  * Alexander Warg <warg@os.inf.tu-dresden.de>
4  * economic rights: Technische Universit├Ąt Dresden (Germany)
5  *
6  * This file is part of TUD:OS and distributed under the terms of the
7  * GNU General Public License 2.
8  * Please see the COPYING-GPL-2 file for details.
9  */
10 #pragma once
11 
12 #include <l4/sys/compiler.h>
13 #include <l4/vbus/vbus_types.h>
14 #include <l4/sys/types.h>
15 
23 __BEGIN_DECLS
24 
31 int L4_CV
32 l4vbus_pci_cfg_read(l4_cap_idx_t vbus, l4vbus_device_handle_t handle,
33  l4_uint32_t bus, l4_uint32_t devfn,
34  l4_uint32_t reg, l4_uint32_t *value, l4_uint32_t width);
35 
42 int L4_CV
43 l4vbus_pci_cfg_write(l4_cap_idx_t vbus, l4vbus_device_handle_t handle,
44  l4_uint32_t bus, l4_uint32_t devfn,
45  l4_uint32_t reg, l4_uint32_t value, l4_uint32_t width);
46 
53 int L4_CV
54 l4vbus_pci_irq_enable(l4_cap_idx_t vbus, l4vbus_device_handle_t handle,
55  l4_uint32_t bus, l4_uint32_t devfn,
56  int pin, unsigned char *trigger,
57  unsigned char *polarity);
58 
59 
66 int L4_CV
67 l4vbus_pcidev_cfg_read(l4_cap_idx_t vbus, l4vbus_device_handle_t handle,
68  l4_uint32_t reg, l4_uint32_t *value, l4_uint32_t width);
69 
76 int L4_CV
77 l4vbus_pcidev_cfg_write(l4_cap_idx_t vbus, l4vbus_device_handle_t handle,
78  l4_uint32_t reg, l4_uint32_t value, l4_uint32_t width);
79 
86 int L4_CV
87 l4vbus_pcidev_irq_enable(l4_cap_idx_t vbus, l4vbus_device_handle_t handle,
88  unsigned char *trigger,
89  unsigned char *polarity);
90 
91 
92 
int l4vbus_pcidev_cfg_read(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, l4_uint32_t reg, l4_uint32_t *value, l4_uint32_t width)
Read from the device&#39;s vPCI configuration space.
int l4vbus_pci_cfg_write(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, l4_uint32_t bus, l4_uint32_t devfn, l4_uint32_t reg, l4_uint32_t value, l4_uint32_t width)
Write to the vPCI configuration space using the PCI root bridge.
Common L4 ABI Data Types.
unsigned long l4_cap_idx_t
L4 Capability selector Type.
Definition: types.h:342
#define __END_DECLS
End section with C types and functions.
Definition: compiler.h:193
int l4vbus_pci_irq_enable(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, l4_uint32_t bus, l4_uint32_t devfn, int pin, unsigned char *trigger, unsigned char *polarity)
Enable PCI interrupt for a specific device using the PCI root bridge.
L4 compiler related defines.
int l4vbus_pci_cfg_read(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, l4_uint32_t bus, l4_uint32_t devfn, l4_uint32_t reg, l4_uint32_t *value, l4_uint32_t width)
Read from the vPCI configuration space using the PCI root bridge.
#define L4_CV
Define calling convention.
Definition: linkage.h:44
This header file contains descriptions of vbus related data types and constants.
int l4vbus_pcidev_irq_enable(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, unsigned char *trigger, unsigned char *polarity)
Enable the device&#39;s PCI interrupt.
int l4vbus_pcidev_cfg_write(l4_cap_idx_t vbus, l4vbus_device_handle_t handle, l4_uint32_t reg, l4_uint32_t value, l4_uint32_t width)
Write to the device&#39;s vPCI configuration space.
unsigned int l4_uint32_t
Unsigned 32bit value.
Definition: l4int.h:40