Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

pci.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <ctype.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/pci.h>
#include "hd.h"
#include "hd_int.h"
#include "hddb.h"
#include "pci.h"

Defines

#define IORESOURCE_BITS   0x000000ff
#define IORESOURCE_IO   0x00000100
#define IORESOURCE_MEM   0x00000200
#define IORESOURCE_IRQ   0x00000400
#define IORESOURCE_DMA   0x00000800
#define IORESOURCE_PREFETCH   0x00001000
#define IORESOURCE_READONLY   0x00002000
#define IORESOURCE_CACHEABLE   0x00004000
#define IORESOURCE_DISABLED   0x10000000

Functions

sysfs_attribute * hd_read_single_sysfs_attribute (char *path, char *name)
void get_pci_data (hd_data_t *hd_data)
str_list_thd_attr_list (struct sysfs_attribute *attr)
void add_pci_data (hd_data_t *hd_data)
void add_driver_info (hd_data_t *hd_data)
pci_tadd_pci_entry (hd_data_t *hd_data, pci_t *new_pci)
unsigned char pci_cfg_byte (pci_t *pci, int fd, unsigned idx)
void dump_pci_data (hd_data_t *hd_data)
void hd_read_xen (hd_data_t *hd_data)
void add_xen_network (hd_data_t *hd_data)
void add_xen_storage (hd_data_t *hd_data)
void hd_scan_sysfs_pci (hd_data_t *hd_data)
int hd_attr_uint (struct sysfs_attribute *attr, uint64_t *u, int base)
char * hd_attr_str (struct sysfs_attribute *attr)
char * hd_sysfs_id (char *path)
char * hd_sysfs_name2_dev (char *str)
char * hd_sysfs_dev2_name (char *str)

Define Documentation

#define IORESOURCE_BITS   0x000000ff
 

#define IORESOURCE_CACHEABLE   0x00004000
 

#define IORESOURCE_DISABLED   0x10000000
 

#define IORESOURCE_DMA   0x00000800
 

#define IORESOURCE_IO   0x00000100
 

#define IORESOURCE_IRQ   0x00000400
 

#define IORESOURCE_MEM   0x00000200
 

#define IORESOURCE_PREFETCH   0x00001000
 

#define IORESOURCE_READONLY   0x00002000
 


Function Documentation

void add_driver_info hd_data_t hd_data  )  [static]
 

void add_pci_data hd_data_t hd_data  )  [static]
 

pci_t * add_pci_entry hd_data_t hd_data,
pci_t new_pci
[static]
 

void add_xen_network hd_data_t hd_data  )  [static]
 

void add_xen_storage hd_data_t hd_data  )  [static]
 

void dump_pci_data hd_data_t hd_data  )  [static]
 

void get_pci_data hd_data_t hd_data  )  [static]
 

str_list_t * hd_attr_list struct sysfs_attribute *  attr  )  [static]
 

char* hd_attr_str struct sysfs_attribute *  attr  ) 
 

int hd_attr_uint struct sysfs_attribute *  attr,
uint64_t *  u,
int  base
 

struct sysfs_attribute * hd_read_single_sysfs_attribute char *  path,
char *  name
[static]
 

void hd_read_xen hd_data_t hd_data  )  [static]
 

void hd_scan_sysfs_pci hd_data_t hd_data  ) 
 

char* hd_sysfs_dev2_name char *  str  ) 
 

char* hd_sysfs_id char *  path  ) 
 

char* hd_sysfs_name2_dev char *  str  ) 
 

unsigned char pci_cfg_byte pci_t pci,
int  fd,
unsigned  idx
[static]