/tmp/l4check/full_tree/trunk/l4/pkg/l4io/server/src/pci.c File Reference

L4Env l4io I/O Server PCI module (wrapper to PCIlib). More...

#include <l4/env/errno.h>
#include <l4/sys/types.h>
#include <l4/generic_io/types.h>
#include <l4/generic_io/generic_io-server.h>
#include "io.h"
#include "pci.h"
#include "res.h"
#include "pcilib.h"
#include "pcilib_pci.h"
#include "__config.h"
#include "__macros.h"

Go to the source code of this file.

Functions

static void * _pci_get_addr (l4_io_pdev_t pdev)
 helper
int io_pci_init (int list)
 PCI module initialization.
Find PCI Devices (IPC interface)
Locate PCI devices based on their properties.

We use busno:devfn as PCI device handle.

long l4_io_pci_find_device_component (CORBA_Object _dice_corba_obj, unsigned short vendor_id, unsigned short device_id, l4_io_pdev_t start_at, l4_io_pci_dev_t *pci_dev, CORBA_Server_Environment *_dice_corba_env)
 Locate PCI device according to vendor and device id.
long l4_io_pci_find_slot_component (CORBA_Object _dice_corba_obj, unsigned long bus, unsigned long slot, l4_io_pci_dev_t *pci_dev, CORBA_Server_Environment *_dice_corba_env)
 Locate PCI device according to bus and slot info.
long l4_io_pci_find_class_component (CORBA_Object _dice_corba_obj, unsigned long class_id, l4_io_pdev_t start_at, l4_io_pci_dev_t *pci_dev, CORBA_Server_Environment *_dice_corba_env)
 Locate PCI device according to device class id.
Read PCI Configuration Space (IPC interface)
Read the PCI configuration space portions (byte, word, dword).

long l4_io_pci_read_config_byte_component (CORBA_Object _dice_corba_obj, l4_io_pdev_t pdev, long offset, unsigned char *val, CORBA_Server_Environment *_dice_corba_env)
 Read one byte of PCI configuration space.
long l4_io_pci_read_config_word_component (CORBA_Object _dice_corba_obj, l4_io_pdev_t pdev, long offset, unsigned short *val, CORBA_Server_Environment *_dice_corba_env)
 Read one word of PCI configuration space.
long l4_io_pci_read_config_dword_component (CORBA_Object _dice_corba_obj, l4_io_pdev_t pdev, long offset, l4_uint32_t *val, CORBA_Server_Environment *_dice_corba_env)
 Read one double word of PCI configuration space.
Modify PCI Configuration Space (IPC interface)
Write portions of PCI configuration space (bytes, word, dwords).

Todo:
Maybe check for well-known region that should _not_ be altered. Implementation.


long l4_io_pci_write_config_byte_component (CORBA_Object _dice_corba_obj, l4_io_pdev_t pdev, long offset, unsigned char val, CORBA_Server_Environment *_dice_corba_env)
 Write one byte into PCI configuration space.
long l4_io_pci_write_config_word_component (CORBA_Object _dice_corba_obj, l4_io_pdev_t pdev, long offset, unsigned short val, CORBA_Server_Environment *_dice_corba_env)
 Write one word into PCI configuration space.
long l4_io_pci_write_config_dword_component (CORBA_Object _dice_corba_obj, l4_io_pdev_t pdev, long offset, unsigned long val, CORBA_Server_Environment *_dice_corba_env)
 Write one double word into PCI configuration space.
PCI Device Initialization (IPC interface)
Activation, Busmastering and Power Management (PM).

long l4_io_pci_enable_device_component (CORBA_Object _dice_corba_obj, l4_io_pdev_t pdev, CORBA_Server_Environment *_dice_corba_env)
 Initialize device before it's used by a driver.
long l4_io_pci_disable_device_component (CORBA_Object _dice_corba_obj, l4_io_pdev_t pdev, CORBA_Server_Environment *_dice_corba_env)
 Finalize device after use.
long l4_io_pci_set_master_component (CORBA_Object _dice_corba_obj, l4_io_pdev_t pdev, CORBA_Server_Environment *_dice_corba_env)
 Enable Busmastering for PCI device.
long l4_io_pci_set_power_state_component (CORBA_Object _dice_corba_obj, l4_io_pdev_t pdev, int *state, CORBA_Server_Environment *_dice_corba_env)
 Set power management state for PCI device.


Detailed Description

L4Env l4io I/O Server PCI module (wrapper to PCIlib).

Date:
05/28/2003
Author:
Christian Helmuth <ch12@os.inf.tu-dresden.de>

Definition in file pci.c.


l4io, written by Christian Helmuth  © 2003 Technische Universitaet Dresden