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:1631
s_pci_t::rom_base_addr
uint64_t rom_base_addr
memory base for card ROM
Definition: hd.h:1049
hd_pci_read_data
void hd_pci_read_data(hd_data_t *hd_data)
Definition: pci.c:144
hd_log_hex
void hd_log_hex(hd_data_t *hd_data, int with_ascii, unsigned data_len, unsigned char *data)
Definition: hd.c:2394
s_pci_t::data_len
unsigned data_len
the actual length of the data field
Definition: hd.h:1033
sc_sto_other
Definition: hd.h:182
s_hd_t::prog_if
hd_id_t prog_if
(PCI) programming interface (id and name).
Definition: hd.h:2246
hd_is_xen
int hd_is_xen(hd_data_t *hd_data)
Definition: hd.c:3170
s_hd_t::base_class
hd_id_t base_class
Base class (id and name).
Definition: hd.h:2236
res_irq_t::type
enum resource_types type
Definition: hd.h:1718
s_hd_t::attached_to
unsigned attached_to
Device this hardware is attached to.
Definition: hd.h:2331
pif_usb_xhci
Definition: hd.h:281
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:348
hd_data_t::hd
hd_t * hd
Current hardware list.
Definition: hd.h:2615
add_pci_data
static void add_pci_data(hd_data_t *hd_data)
Definition: pci.c:374
add_pci_entry
static pci_t * add_pci_entry(hd_data_t *hd_data, pci_t *new_pci)
Definition: pci.c:602
bc_serial
Definition: hd.h:164
remove_hd_entries
void remove_hd_entries(hd_data_t *hd_data)
Definition: hd.c:2728
s_pci_t::vend
unsigned vend
Definition: hd.h:1044
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:2208
res_mem
Definition: hd.h:1640
s_pci_t::irq
unsigned irq
used irq, if any
Definition: hd.h:1045
s_pci_t::next
struct s_pci_t * next
linked list
Definition: hd.h:1032
bc_multimedia
Definition: hd.h:162
s_hd_t::hw_class
hd_hw_item_t hw_class
Hardware class.
Definition: hd.h:2310
new_str
char * new_str(const char *s)
Definition: hd.c:1594
hd_read_uisvirtpci
static void hd_read_uisvirtpci(hd_data_t *hd_data)
Definition: pci.c:1747
read_dir
str_list_t * read_dir(char *dir_name, int type)
Definition: hd.c:2593
PROGRESS
#define PROGRESS(a, b, c)
Definition: hd_int.h:65
s_pci_t::bus
unsigned bus
PCI bus #, nothing to do with hw_t.bus.
Definition: hd.h:1041
s_hd_t::is_s::notready
unsigned notready
block devices: no medium, other: device not configured
Definition: hd.h:2477
hd_detail_t::type
enum hd_detail_type type
Definition: hd.h:2147
bc_other
Definition: hd.h:164
res_io
Definition: hd.h:1640
sc_sto_ide
Definition: hd.h:181
s_pci_t::modalias
char * modalias
module alias
Definition: hd.h:1053
IORESOURCE_MEM
#define IORESOURCE_MEM
Definition: pci.c:30
s_hd_t::modalias
char * modalias
module alias
Definition: hd.h:2594
s_str_list_t::next
struct s_str_list_t * next
Link to next member.
Definition: hd.h:411
s_hd_t::slot
unsigned slot
Slot and bus number.
Definition: hd.h:2226
hd_find_sysfs_id
hd_t * hd_find_sysfs_id(hd_data_t *hd_data, char *id)
Definition: hd.c:5740
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:1315
s_hd_t::drivers
str_list_t * drivers
List of currently active drivers.
Definition: hd.h:2542
s_pci_t::secondary_bus
unsigned secondary_bus
0 for PCI & CB bridges
Definition: hd.h:1037
sc_sto_scsi
Definition: hd.h:181
hd_read_macio
static void hd_read_macio(hd_data_t *hd_data)
Definition: pci.c:706
s_hd_t::compat_device
hd_id_t compat_device
Device id and name of some compatible hardware.
Definition: hd.h:2304
bc_bridge
Definition: hd.h:163
mod_pci
Definition: hd_int.h:78
hd_detail_pci
Definition: hd.h:2069
res_mem_t::prefetch
unsigned prefetch
enum yes_no_flag
Definition: hd.h:1696
hd_scan_sysfs_pci
void hd_scan_sysfs_pci(hd_data_t *hd_data)
Definition: pci.c:70
s_hd_t::unix_dev_name
char * unix_dev_name
Special device file.
Definition: hd.h:2353
bus_pci
Definition: hd.h:297
res_irq_t::base
unsigned base
Definition: hd.h:1719
res_io_t::enabled
unsigned enabled
0: disabled, 1 enabled
Definition: hd.h:1712
s_pci_t::func
unsigned func
slot & function
Definition: hd.h:1041
bus_vio
Definition: hd.h:302
s_hd_t
Individual hardware item.
Definition: hd.h:2201
res_mem_t::type
enum resource_types type
Definition: hd.h:1693
hd_detail_pci_t::data
pci_t * data
Definition: hd.h:2077
hw_unknown
append new entries here
Definition: hd.h:150
pci.h
res_io_t::type
enum resource_types type
Definition: hd.h:1709
s_pci_t::base_addr
uint64_t base_addr[7]
I/O or memory base.
Definition: hd.h:1046
bus_sdio
Definition: hd.h:303
s_hd_t::rom_id
char * rom_id
BIOS/PROM id.
Definition: hd.h:2387
u_hd_res_t
libhd resource union
Definition: hd.h:1827
hd_read_of_platform
static void hd_read_of_platform(hd_data_t *hd_data)
Definition: pci.c:1081
s_hd_t::sysfs_bus_id
char * sysfs_bus_id
sysfs bus id for this hardware, if any.
Definition: hd.h:2341
pif_usb_ohci
Definition: hd.h:281
s_hd_t::next
struct s_hd_t * next
Link to next hardware item.
Definition: hd.h:2202
bus_mmc
Definition: hd.h:303
s_pci_t
structure holding the (raw) PCI data
Definition: hd.h:1031
hd_sysfs_id
char * hd_sysfs_id(char *path)
Definition: hd.c:6031
acc_rw
read/write
Definition: hd.h:1661
s_hd_t::device
hd_id_t device
Device id and name.
Definition: hd.h:2264
add_xen_network
static void add_xen_network(hd_data_t *hd_data)
Definition: pci.c:1517
res_mem_t::range
uint64_t range
Definition: hd.h:1694
res_irq
Definition: hd.h:1640
bus_nd
Definition: hd.h:303
hd_read_vm
static void hd_read_vm(hd_data_t *hd_data)
Definition: pci.c:1549
s_str_list_t::free_str_list
str_list_t * free_str_list(str_list_t *list)
Definition: hd.c:2510
IORESOURCE_IO
#define IORESOURCE_IO
Definition: pci.c:29
s_pci_t::cmd
unsigned cmd
PCI_COMMAND.
Definition: hd.h:1037
u_hd_res_t::io
res_io_t io
Definition: hd.h:1830
bc_network
Definition: hd.h:162
hddb.h
device_class
Definition: isdn_cdb_def.h:12
res_any_t::type
enum resource_types type
Definition: hd.h:1688
pif_usb_ehci
Definition: hd.h:281
pci_flag_ok
Definition: hd.h:1064
pci_cfg_byte
static unsigned char pci_cfg_byte(pci_t *pci, int fd, unsigned idx)
Definition: pci.c:630
u_hd_res_t::next
union u_hd_res_t * next
Definition: hd.h:1828
dump_pci_data
static void dump_pci_data(hd_data_t *hd_data)
Definition: pci.c:648
hd_data_t::module
unsigned module
(Internal) the current probing module we are in
Definition: hd.h:2686
sc_nif_other
Definition: hd.h:246
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:1052
s_hd_t::is_s::agp
unsigned agp
AGP device.
Definition: hd.h:2475
s_pci_t::base_class
unsigned base_class
Definition: hd.h:1043
bc_none
Definition: hd.h:162
ADD2LOG
#define ADD2LOG(a...)
Definition: hd_int.h:66
s_str_list_t
String list type.
Definition: hd.h:410
sc_ser_usb
Definition: hd.h:219
u_hd_res_t::mem
res_mem_t mem
Definition: hd.h:1831
pci_flag_pm
Definition: hd.h:1064
s_hd_t::detail
hd_detail_t * detail
Special info associated with this hardware.
Definition: hd.h:2438
s_pci_t::slot
unsigned slot
Definition: hd.h:1041
res_io_t::range
uint64_t range
Definition: hd.h:1710
s_pci_t::dev
unsigned dev
Definition: hd.h:1044
add_hd_entry
hd_t * add_hd_entry(hd_data_t *hd_data, unsigned line, unsigned count)
Definition: hd.c:1794
add_mv643xx_eth
static void add_mv643xx_eth(hd_data_t *hd_data, char *entry, char *platform_type)
Definition: pci.c:913
hd_read_mdio
static void hd_read_mdio(hd_data_t *hd_data)
Definition: pci.c:2149
hd_data_t::debug
unsigned debug
Debug flags.
Definition: hd.h:2640
bc_storage
Definition: hd.h:162
hd_module_is_active
int hd_module_is_active(hd_data_t *hd_data, char *mod)
Definition: hd.c:2767
pr_pci
Definition: hd.h:113
u_hd_res_t::irq
res_irq_t irq
Definition: hd.h:1833
hd_probe_feature
int hd_probe_feature(hd_data_t *hd_data, enum probe_feature feature)
Definition: hd.c:595
flag_yes
yes
Definition: hd.h:1668
s_hd_t::sub_device
hd_id_t sub_device
Subdevice id and name.
Definition: hd.h:2280
hd_data_t::pci
pci_t * pci
(Internal) raw PCI data
Definition: hd.h:2689
MAKE_ID
#define MAKE_ID(tag, id_val)
Combine tag and id value.
Definition: hd.h:105
TAG_SDIO
#define TAG_SDIO
SDIO ids.
Definition: hd.h:90
res_irq_t::enabled
unsigned enabled
0: disabled, 1 enabled
Definition: hd.h:1721
res_io_t::access
unsigned access
enum access_flags
Definition: hd.h:1712
s_hd_t::label
char * label
Consistent Device Name (CDN), pci firmware spec 3.1, chapter 4.6.7.
Definition: hd.h:2595
hd_id_t::id
unsigned id
Numeric id.
Definition: hd.h:401
hd.h
bus_ps3_system_bus
Definition: hd.h:302
hd_read_vio
static void hd_read_vio(hd_data_t *hd_data)
Definition: pci.c:810
pci_flag_agp
Definition: hd.h:1064
s_hd_t::compat_vendor
hd_id_t compat_vendor
Vendor id and name of some compatible hardware.
Definition: hd.h:2298
s_hd_t::sysfs_id
char * sysfs_id
sysfs entry for this hardware, if any.
Definition: hd.h:2336
hd_attr_uint
int hd_attr_uint(char *attr, uint64_t *u, int base)
Definition: hd.c:6000
hd_read_visorbus
static void hd_read_visorbus(hd_data_t *hd_data)
Definition: pci.c:2076
s_pci_t::sub_vend
unsigned sub_vend
Definition: hd.h:1044
res_mem_t::base
uint64_t base
Definition: hd.h:1694
bc_mmc_ctrl
Definition: hd.h:171
s_hd_t::res
hd_res_t * res
Device resources.
Definition: hd.h:2432
s_hd_t::sub_class
hd_id_t sub_class
Sub class (id and name).
Definition: hd.h:2241
bc_display
Definition: hd.h:162
sc_multi_audio
Definition: hd.h:251
sc_dis_vga
Definition: hd.h:187
s_pci_t::prog_if
unsigned prog_if
PCI device classes.
Definition: hd.h:1043
bus_ibmebus
Definition: hd.h:303
hd_detail_t::pci
hd_detail_pci_t pci
Definition: hd.h:2148
bus_none
Definition: hd.h:297
s_pci_t::edid_len
unsigned edid_len[6]
edid record length
Definition: hd.h:1055
s_pci_t::data
unsigned char data[256]
the PCI data
Definition: hd.h:1035
acc_ro
read only
Definition: hd.h:1659
s_hd_t::sub_vendor
hd_id_t sub_vendor
Subvendor id and name.
Definition: hd.h:2272
s_hd_t::vendor
hd_id_t vendor
Vendor id and name.
Definition: hd.h:2254
hd_id_t::name
char * name
Name (if any) that corresponds to hd_id_t::id.
Definition: hd.h:402
res_mem_t::access
unsigned access
enum access_flags
Definition: hd.h:1696
hd_int.h
res_io_t::base
uint64_t base
Definition: hd.h:1710
s_hd_t::bus
hd_id_t bus
Bus type (id and name).
Definition: hd.h:2220
hd_read_ps3_system_bus
static void hd_read_ps3_system_bus(hd_data_t *hd_data)
Definition: pci.c:1180
s_hd_t::is_s::wlan
unsigned wlan
WLAN card.
Definition: hd.h:2502
hd_attr_list
str_list_t * hd_attr_list(char *str)
Definition: hd.c:6018
TAG_PCI
#define TAG_PCI
PCI ids.
Definition: hd.h:85
s_hd_t::idx
unsigned idx
Unique index, starting at 1.
Definition: hd.h:2208
hd_data
static hd_data_t * hd_data
Definition: pppoe.c:29
sc_ser_fire
Definition: hd.h:219
str_printf
void str_printf(char **buf, int offset, char *format,...)
Definition: hd.c:2418
s_pci_t::addr_flags
unsigned addr_flags[7]
I/O or memory address flags.
Definition: hd.h:1048
hd_read_sdio
static void hd_read_sdio(hd_data_t *hd_data)
Definition: pci.c:1902
s_pci_t::data_ext_len
unsigned data_ext_len
max.
Definition: hd.h:1034
add_res_entry
hd_res_t * add_res_entry(hd_res_t **res, hd_res_t *new_res)
Definition: hd.c:1786
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:1056
hd_read_sysfs_link
char * hd_read_sysfs_link(char *base_dir, char *link_name)
Definition: hd.c:2648
s_pci_t::base_len
uint64_t base_len[7]
I/O or memory ranges.
Definition: hd.h:1047
s_hd_t::revision
hd_id_t revision
Revision id or string.
Definition: hd.h:2287
s_pci_t::sysfs_id
char * sysfs_id
sysfs path
Definition: hd.h:1051
flag_no
no
Definition: hd.h:1667
hd_pci_complete_data
void hd_pci_complete_data(hd_t *hd)
Definition: pci.c:479
s_pci_t::hdr_type
unsigned hdr_type
PCI_HEADER_TYPE.
Definition: hd.h:1037
s_hd_t::func
unsigned func
(PCI) function.
Definition: hd.h:2231
res_mem_t::enabled
unsigned enabled
0: disabled, 1 enabled
Definition: hd.h:1696
s_str_list_t::add_str_list
str_list_t * add_str_list(str_list_t **sl, char *str)
Definition: hd.c:2496
s_pci_t::sub_class
unsigned sub_class
Definition: hd.h:1043
hd_read_platform
static void hd_read_platform(hd_data_t *hd_data)
Definition: pci.c:939
hd_read_mmc
static void hd_read_mmc(hd_data_t *hd_data)
Definition: pci.c:1820
module
Definition: isdn_cdb_def.h:22
bus_virtio
Definition: hd.h:303
TAG_SPECIAL
#define TAG_SPECIAL
Internally used ids.
Definition: hd.h:88
s_hd_t::is
struct s_hd_t::is_s is
hd_read_nd
static void hd_read_nd(hd_data_t *hd_data)
Definition: pci.c:1987
hd_data_t
Holds all data accumulated during hardware probing.
Definition: hd.h:2609
new_mem
void * new_mem(size_t size)
Definition: hd.c:1552
hd_sysfs_driver_list
void hd_sysfs_driver_list(hd_data_t *hd_data)
Definition: hd.c:5796
s_pci_t::label
char * label
Consistant Device Name (CDN), pci firmware spec 3.1, chapter 4.6.7.
Definition: hd.h:1054
s_pci_t::rev
unsigned rev
vendor & device ids
Definition: hd.h:1044
s_pci_t::log
char * log
log messages
Definition: hd.h:1036
s_pci_t::sub_dev
unsigned sub_dev
Definition: hd.h:1044
u_hd_res_t::any
res_any_t any
Definition: hd.h:1829
add_xen_storage
static void add_xen_storage(hd_data_t *hd_data)
Definition: pci.c:1533
s_pci_t::flags
unsigned flags
various info, see enum pci_flags
Definition: hd.h:1037
s_str_list_t::str
char * str
Some string data.
Definition: hd.h:412
free_mem
void * free_mem(void *p)
Definition: hd.c:1611
get_sysfs_attr_by_path
char * get_sysfs_attr_by_path(const char *path, const char *attr)
Definition: hd.c:6098
hd_read_xen
static void hd_read_xen(hd_data_t *hd_data)
Definition: pci.c:1405