libhd  5.0
pci.h
Go to the documentation of this file.
hd_read_virtio
static void hd_read_virtio(hd_data_t *hd_data)
Definition: pci.c:1570
s_pci_t::rom_base_addr
uint64_t rom_base_addr
memory base for card ROM
Definition: hd.h:1045
hd_pci_read_data
void hd_pci_read_data(hd_data_t *hd_data)
Definition: pci.c:124
hd_log_hex
void hd_log_hex(hd_data_t *hd_data, int with_ascii, unsigned data_len, unsigned char *data)
Definition: hd.c:2377
s_pci_t::data_len
unsigned data_len
the actual length of the data field
Definition: hd.h:1029
sc_sto_other
@ sc_sto_other
Definition: hd.h:178
s_hd_t::prog_if
hd_id_t prog_if
(PCI) programming interface (id and name).
Definition: hd.h:2241
hd_is_xen
int hd_is_xen(hd_data_t *hd_data)
Definition: hd.c:3151
s_hd_t::base_class
hd_id_t base_class
Base class (id and name).
Definition: hd.h:2231
res_irq_t::type
enum resource_types type
Definition: hd.h:1713
s_hd_t::attached_to
unsigned attached_to
Device this hardware is attached to.
Definition: hd.h:2326
add_edid_from_file
static void add_edid_from_file(const char *file, pci_t *pci, int index, hd_data_t *hd_data)
Definition: pci.c:328
hd_data_t::hd
hd_t * hd
Current hardware list.
Definition: hd.h:2610
add_pci_data
static void add_pci_data(hd_data_t *hd_data)
Definition: pci.c:354
add_pci_entry
static pci_t * add_pci_entry(hd_data_t *hd_data, pci_t *new_pci)
Definition: pci.c:581
bc_serial
@ bc_serial
Definition: hd.h:161
remove_hd_entries
void remove_hd_entries(hd_data_t *hd_data)
Definition: hd.c:2711
s_pci_t::vend
unsigned vend
Definition: hd.h:1040
hd_sysfs_find_driver
char * hd_sysfs_find_driver(hd_data_t *hd_data, char *sysfs_id, int exact)
Definition: block.c:388
canon_str
char * canon_str(char *s, int len)
Definition: hd.c:2191
res_mem
@ res_mem
Definition: hd.h:1635
s_pci_t::irq
unsigned irq
used irq, if any
Definition: hd.h:1041
s_pci_t::next
struct s_pci_t * next
linked list
Definition: hd.h:1028
bc_multimedia
@ bc_multimedia
Definition: hd.h:159
new_str
char * new_str(const char *s)
Definition: hd.c:1577
hd_read_uisvirtpci
static void hd_read_uisvirtpci(hd_data_t *hd_data)
Definition: pci.c:1659
read_dir
str_list_t * read_dir(char *dir_name, int type)
Definition: hd.c:2576
PROGRESS
#define PROGRESS(a, b, c)
Definition: hd_int.h:61
s_pci_t::bus
unsigned bus
PCI bus #, nothing to do with hw_t.bus.
Definition: hd.h:1037
s_hd_t::is_s::notready
unsigned notready
block devices: no medium, other: device not configured
Definition: hd.h:2472
hd_detail_t::type
enum hd_detail_type type
Definition: hd.h:2142
bc_other
@ bc_other
Definition: hd.h:161
res_io
@ res_io
Definition: hd.h:1635
sc_sto_ide
@ sc_sto_ide
Definition: hd.h:177
s_pci_t::modalias
char * modalias
module alias
Definition: hd.h:1049
IORESOURCE_MEM
#define IORESOURCE_MEM
Definition: pci.c:30
s_hd_t::modalias
char * modalias
module alias
Definition: hd.h:2589
s_str_list_t::next
struct s_str_list_t * next
Link to next member.
Definition: hd.h:407
s_hd_t::slot
unsigned slot
Slot and bus number.
Definition: hd.h:2221
hd_find_sysfs_id
hd_t * hd_find_sysfs_id(hd_data_t *hd_data, char *id)
Definition: hd.c:5695
IORESOURCE_PREFETCH
#define IORESOURCE_PREFETCH
Definition: pci.c:33
hd_read_ibmebus
static void hd_read_ibmebus(hd_data_t *hd_data)
Definition: pci.c:1254
s_hd_t::drivers
str_list_t * drivers
List of currently active drivers.
Definition: hd.h:2537
s_pci_t::secondary_bus
unsigned secondary_bus
0 for PCI & CB bridges
Definition: hd.h:1036
sc_sto_scsi
@ sc_sto_scsi
Definition: hd.h:177
hd_read_macio
static void hd_read_macio(hd_data_t *hd_data)
Definition: pci.c:685
s_hd_t::compat_device
hd_id_t compat_device
Device id and name of some compatible hardware.
Definition: hd.h:2299
bc_bridge
@ bc_bridge
Definition: hd.h:160
mod_pci
@ mod_pci
Definition: hd_int.h:74
hd_detail_pci
@ hd_detail_pci
Definition: hd.h:2064
res_mem_t::prefetch
unsigned prefetch
enum yes_no_flag
Definition: hd.h:1693
hd_scan_sysfs_pci
void hd_scan_sysfs_pci(hd_data_t *hd_data)
Definition: pci.c:65
s_hd_t::unix_dev_name
char * unix_dev_name
Special device file.
Definition: hd.h:2348
bus_pci
@ bus_pci
Definition: hd.h:293
res_irq_t::base
unsigned base
Definition: hd.h:1714
res_io_t::enabled
unsigned enabled
0: disabled, 1 enabled
Definition: hd.h:1707
s_pci_t::func
unsigned func
slot & function
Definition: hd.h:1038
bus_vio
@ bus_vio
Definition: hd.h:298
s_hd_t
Individual hardware item.
Definition: hd.h:2196
res_mem_t::type
enum resource_types type
Definition: hd.h:1688
hd_detail_pci_t::data
pci_t * data
Definition: hd.h:2072
pci.h
res_io_t::type
enum resource_types type
Definition: hd.h:1704
s_pci_t::base_addr
uint64_t base_addr[7]
I/O or memory base.
Definition: hd.h:1042
s_hd_t::rom_id
char * rom_id
BIOS/PROM id.
Definition: hd.h:2382
u_hd_res_t
libhd resource union
Definition: hd.h:1822
hd_read_of_platform
static void hd_read_of_platform(hd_data_t *hd_data)
Definition: pci.c:1020
s_hd_t::sysfs_bus_id
char * sysfs_bus_id
sysfs bus id for this hardware, if any.
Definition: hd.h:2336
pif_usb_ohci
@ pif_usb_ohci
Definition: hd.h:277
s_hd_t::next
struct s_hd_t * next
Link to next hardware item.
Definition: hd.h:2197
s_pci_t
structure holding the (raw) PCI data
Definition: hd.h:1027
hd_sysfs_id
char * hd_sysfs_id(char *path)
Definition: hd.c:5986
acc_rw
@ acc_rw
read/write
Definition: hd.h:1656
s_hd_t::device
hd_id_t device
Device id and name.
Definition: hd.h:2259
add_xen_network
static void add_xen_network(hd_data_t *hd_data)
Definition: pci.c:1456
res_mem_t::range
uint64_t range
Definition: hd.h:1689
res_irq
@ res_irq
Definition: hd.h:1635
hd_read_vm
static void hd_read_vm(hd_data_t *hd_data)
Definition: pci.c:1488
s_str_list_t::free_str_list
str_list_t * free_str_list(str_list_t *list)
Definition: hd.c:2493
IORESOURCE_IO
#define IORESOURCE_IO
Definition: pci.c:29
s_pci_t::cmd
unsigned cmd
PCI_COMMAND.
Definition: hd.h:1034
u_hd_res_t::io
res_io_t io
Definition: hd.h:1825
bc_network
@ bc_network
Definition: hd.h:159
hddb.h
device_class
@ device_class
Definition: isdn_cdb_def.h:12
res_any_t::type
enum resource_types type
Definition: hd.h:1683
pci_flag_ok
@ pci_flag_ok
Definition: hd.h:1060
pci_cfg_byte
static unsigned char pci_cfg_byte(pci_t *pci, int fd, unsigned idx)
Definition: pci.c:609
u_hd_res_t::next
union u_hd_res_t * next
Definition: hd.h:1823
dump_pci_data
static void dump_pci_data(hd_data_t *hd_data)
Definition: pci.c:627
hd_data_t::module
unsigned module
(Internal) the current probing module we are in
Definition: hd.h:2681
IORESOURCE_READONLY
#define IORESOURCE_READONLY
Definition: pci.c:34
s_pci_t::sysfs_bus_id
char * sysfs_bus_id
sysfs bus id
Definition: hd.h:1048
s_hd_t::is_s::agp
unsigned agp
AGP device.
Definition: hd.h:2470
s_pci_t::base_class
unsigned base_class
Definition: hd.h:1039
bc_none
@ bc_none
Definition: hd.h:159
ADD2LOG
#define ADD2LOG(a...)
Definition: hd_int.h:62
s_str_list_t
String list type.
Definition: hd.h:406
sc_ser_usb
@ sc_ser_usb
Definition: hd.h:215
u_hd_res_t::mem
res_mem_t mem
Definition: hd.h:1826
pci_flag_pm
@ pci_flag_pm
Definition: hd.h:1060
s_hd_t::detail
hd_detail_t * detail
Special info associated with this hardware.
Definition: hd.h:2433
s_pci_t::slot
unsigned slot
Definition: hd.h:1038
res_io_t::range
uint64_t range
Definition: hd.h:1705
s_pci_t::dev
unsigned dev
Definition: hd.h:1040
add_hd_entry
hd_t * add_hd_entry(hd_data_t *hd_data, unsigned line, unsigned count)
Definition: hd.c:1777
add_mv643xx_eth
static void add_mv643xx_eth(hd_data_t *hd_data, char *entry, char *platform_type)
Definition: pci.c:891
hd_data_t::debug
unsigned debug
Debug flags.
Definition: hd.h:2635
bc_storage
@ bc_storage
Definition: hd.h:159
hd_module_is_active
int hd_module_is_active(hd_data_t *hd_data, char *mod)
Definition: hd.c:2750
pr_pci
@ pr_pci
Definition: hd.h:110
u_hd_res_t::irq
res_irq_t irq
Definition: hd.h:1828
hd_probe_feature
int hd_probe_feature(hd_data_t *hd_data, enum probe_feature feature)
Definition: hd.c:579
flag_yes
@ flag_yes
yes
Definition: hd.h:1663
s_hd_t::sub_device
hd_id_t sub_device
Subdevice id and name.
Definition: hd.h:2275
hd_data_t::pci
pci_t * pci
(Internal) raw PCI data
Definition: hd.h:2684
MAKE_ID
#define MAKE_ID(tag, id_val)
Combine tag and id value.
Definition: hd.h:102
s_hd_t::is
struct s_hd_t::is_s is
res_irq_t::enabled
unsigned enabled
0: disabled, 1 enabled
Definition: hd.h:1716
res_io_t::access
unsigned access
enum access_flags
Definition: hd.h:1708
s_hd_t::label
char * label
Consistent Device Name (CDN), pci firmware spec 3.1, chapter 4.6.7.
Definition: hd.h:2590
hd_id_t::id
unsigned id
Numeric id.
Definition: hd.h:397
hd.h
bus_ps3_system_bus
@ bus_ps3_system_bus
Definition: hd.h:298
hd_read_vio
static void hd_read_vio(hd_data_t *hd_data)
Definition: pci.c:789
pci_flag_agp
@ pci_flag_agp
Definition: hd.h:1060
s_hd_t::compat_vendor
hd_id_t compat_vendor
Vendor id and name of some compatible hardware.
Definition: hd.h:2293
s_hd_t::sysfs_id
char * sysfs_id
sysfs entry for this hardware, if any.
Definition: hd.h:2331
hd_attr_uint
int hd_attr_uint(char *attr, uint64_t *u, int base)
Definition: hd.c:5955
s_pci_t::sub_vend
unsigned sub_vend
Definition: hd.h:1040
res_mem_t::base
uint64_t base
Definition: hd.h:1689
s_hd_t::res
hd_res_t * res
Device resources.
Definition: hd.h:2427
s_hd_t::sub_class
hd_id_t sub_class
Sub class (id and name).
Definition: hd.h:2236
bc_display
@ bc_display
Definition: hd.h:159
sc_multi_audio
@ sc_multi_audio
Definition: hd.h:247
sc_dis_vga
@ sc_dis_vga
Definition: hd.h:183
s_pci_t::prog_if
unsigned prog_if
PCI device classes.
Definition: hd.h:1039
bus_ibmebus
@ bus_ibmebus
Definition: hd.h:299
hd_detail_t::pci
hd_detail_pci_t pci
Definition: hd.h:2143
bus_none
@ bus_none
Definition: hd.h:293
s_pci_t::edid_len
unsigned edid_len[6]
edid record length
Definition: hd.h:1051
s_pci_t::data
unsigned char data[256]
the PCI data
Definition: hd.h:1031
acc_ro
@ acc_ro
read only
Definition: hd.h:1654
s_hd_t::sub_vendor
hd_id_t sub_vendor
Subvendor id and name.
Definition: hd.h:2267
s_hd_t::vendor
hd_id_t vendor
Vendor id and name.
Definition: hd.h:2249
hd_id_t::name
char * name
Name (if any) that corresponds to hd_id_t::id.
Definition: hd.h:398
res_mem_t::access
unsigned access
enum access_flags
Definition: hd.h:1692
hd_int.h
res_io_t::base
uint64_t base
Definition: hd.h:1705
s_hd_t::bus
hd_id_t bus
Bus type (id and name).
Definition: hd.h:2215
hd_read_ps3_system_bus
static void hd_read_ps3_system_bus(hd_data_t *hd_data)
Definition: pci.c:1119
s_hd_t::is_s::wlan
unsigned wlan
WLAN card.
Definition: hd.h:2497
hd_attr_list
str_list_t * hd_attr_list(char *str)
Definition: hd.c:5973
TAG_PCI
#define TAG_PCI
PCI ids.
Definition: hd.h:83
s_hd_t::idx
unsigned idx
Unique index, starting at 1.
Definition: hd.h:2203
hd_data
static hd_data_t * hd_data
Definition: pppoe.c:29
sc_ser_fire
@ sc_ser_fire
Definition: hd.h:215
str_printf
void str_printf(char **buf, int offset, char *format,...)
Definition: hd.c:2401
s_pci_t::addr_flags
unsigned addr_flags[7]
I/O or memory address flags.
Definition: hd.h:1044
s_pci_t::data_ext_len
unsigned data_ext_len
max.
Definition: hd.h:1030
add_res_entry
hd_res_t * add_res_entry(hd_res_t **res, hd_res_t *new_res)
Definition: hd.c:1769
IORESOURCE_DISABLED
#define IORESOURCE_DISABLED
Definition: pci.c:36
s_pci_t::edid_data
unsigned char edid_data[6][0x80]
edid record
Definition: hd.h:1052
hd_read_sysfs_link
char * hd_read_sysfs_link(char *base_dir, char *link_name)
Definition: hd.c:2631
s_pci_t::base_len
uint64_t base_len[7]
I/O or memory ranges.
Definition: hd.h:1043
s_hd_t::revision
hd_id_t revision
Revision id or string.
Definition: hd.h:2282
s_pci_t::sysfs_id
char * sysfs_id
sysfs path
Definition: hd.h:1047
flag_no
@ flag_no
no
Definition: hd.h:1662
hd_pci_complete_data
void hd_pci_complete_data(hd_t *hd)
Definition: pci.c:458
s_pci_t::hdr_type
unsigned hdr_type
PCI_HEADER_TYPE.
Definition: hd.h:1035
s_hd_t::func
unsigned func
(PCI) function.
Definition: hd.h:2226
res_mem_t::enabled
unsigned enabled
0: disabled, 1 enabled
Definition: hd.h:1691
s_str_list_t::add_str_list
str_list_t * add_str_list(str_list_t **sl, char *str)
Definition: hd.c:2479
s_pci_t::sub_class
unsigned sub_class
Definition: hd.h:1039
hd_read_platform
static void hd_read_platform(hd_data_t *hd_data)
Definition: pci.c:917
module
@ module
Definition: isdn_cdb_def.h:22
bus_virtio
@ bus_virtio
Definition: hd.h:299
TAG_SPECIAL
#define TAG_SPECIAL
Internally used ids.
Definition: hd.h:86
hd_data_t
Holds all data accumulated during hardware probing.
Definition: hd.h:2604
new_mem
void * new_mem(size_t size)
Definition: hd.c:1535
hd_sysfs_driver_list
void hd_sysfs_driver_list(hd_data_t *hd_data)
Definition: hd.c:5751
s_pci_t::label
char * label
Consistant Device Name (CDN), pci firmware spec 3.1, chapter 4.6.7.
Definition: hd.h:1050
s_pci_t::rev
unsigned rev
vendor & device ids
Definition: hd.h:1040
s_pci_t::log
char * log
log messages
Definition: hd.h:1032
s_pci_t::sub_dev
unsigned sub_dev
Definition: hd.h:1040
u_hd_res_t::any
res_any_t any
Definition: hd.h:1824
add_xen_storage
static void add_xen_storage(hd_data_t *hd_data)
Definition: pci.c:1472
s_pci_t::flags
unsigned flags
various info, see enum pci_flags
Definition: hd.h:1033
s_str_list_t::str
char * str
Some string data.
Definition: hd.h:408
free_mem
void * free_mem(void *p)
Definition: hd.c:1594
get_sysfs_attr_by_path
char * get_sysfs_attr_by_path(const char *path, const char *attr)
Definition: hd.c:6053
hd_read_xen
static void hd_read_xen(hd_data_t *hd_data)
Definition: pci.c:1344