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:1584
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:136
hd_log_hex
void hd_log_hex(hd_data_t *hd_data, int with_ascii, unsigned data_len, unsigned char *data)
Definition: hd.c:2378
s_pci_t::data_len
unsigned data_len
the actual length of the data field
Definition: hd.h:1033
sc_sto_other
@ 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:2245
hd_is_xen
int hd_is_xen(hd_data_t *hd_data)
Definition: hd.c:3152
s_hd_t::base_class
hd_id_t base_class
Base class (id and name).
Definition: hd.h:2235
res_irq_t::type
enum resource_types type
Definition: hd.h:1717
s_hd_t::attached_to
unsigned attached_to
Device this hardware is attached to.
Definition: hd.h:2330
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:340
hd_data_t::hd
hd_t * hd
Current hardware list.
Definition: hd.h:2614
add_pci_data
static void add_pci_data(hd_data_t *hd_data)
Definition: pci.c:366
add_pci_entry
static pci_t * add_pci_entry(hd_data_t *hd_data, pci_t *new_pci)
Definition: pci.c:594
bc_serial
@ bc_serial
Definition: hd.h:164
remove_hd_entries
void remove_hd_entries(hd_data_t *hd_data)
Definition: hd.c:2712
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:2192
res_mem
@ res_mem
Definition: hd.h:1639
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
@ bc_multimedia
Definition: hd.h:162
s_hd_t::hw_class
hd_hw_item_t hw_class
Hardware class.
Definition: hd.h:2309
new_str
char * new_str(const char *s)
Definition: hd.c:1578
hd_read_uisvirtpci
static void hd_read_uisvirtpci(hd_data_t *hd_data)
Definition: pci.c:1700
read_dir
str_list_t * read_dir(char *dir_name, int type)
Definition: hd.c:2577
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:2476
hd_detail_t::type
enum hd_detail_type type
Definition: hd.h:2146
bc_other
@ bc_other
Definition: hd.h:164
res_io
@ res_io
Definition: hd.h:1639
sc_sto_ide
@ 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:2593
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:2225
hd_find_sysfs_id
hd_t * hd_find_sysfs_id(hd_data_t *hd_data, char *id)
Definition: hd.c:5701
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:1268
s_hd_t::drivers
str_list_t * drivers
List of currently active drivers.
Definition: hd.h:2541
s_pci_t::secondary_bus
unsigned secondary_bus
0 for PCI & CB bridges
Definition: hd.h:1040
sc_sto_scsi
@ sc_sto_scsi
Definition: hd.h:181
hd_read_macio
static void hd_read_macio(hd_data_t *hd_data)
Definition: pci.c:698
s_hd_t::compat_device
hd_id_t compat_device
Device id and name of some compatible hardware.
Definition: hd.h:2303
bc_bridge
@ bc_bridge
Definition: hd.h:163
mod_pci
@ mod_pci
Definition: hd_int.h:78
hd_detail_pci
@ hd_detail_pci
Definition: hd.h:2068
res_mem_t::prefetch
unsigned prefetch
enum yes_no_flag
Definition: hd.h:1697
hd_scan_sysfs_pci
void hd_scan_sysfs_pci(hd_data_t *hd_data)
Definition: pci.c:68
s_hd_t::unix_dev_name
char * unix_dev_name
Special device file.
Definition: hd.h:2352
bus_pci
@ bus_pci
Definition: hd.h:297
res_irq_t::base
unsigned base
Definition: hd.h:1718
res_io_t::enabled
unsigned enabled
0: disabled, 1 enabled
Definition: hd.h:1711
s_pci_t::func
unsigned func
slot & function
Definition: hd.h:1042
bus_vio
@ bus_vio
Definition: hd.h:302
s_hd_t
Individual hardware item.
Definition: hd.h:2200
res_mem_t::type
enum resource_types type
Definition: hd.h:1692
hd_detail_pci_t::data
pci_t * data
Definition: hd.h:2076
hw_unknown
@ hw_unknown
append new entries here
Definition: hd.h:150
pci.h
res_io_t::type
enum resource_types type
Definition: hd.h:1708
s_pci_t::base_addr
uint64_t base_addr[7]
I/O or memory base.
Definition: hd.h:1046
bus_sdio
@ bus_sdio
Definition: hd.h:303
s_hd_t::rom_id
char * rom_id
BIOS/PROM id.
Definition: hd.h:2386
u_hd_res_t
libhd resource union
Definition: hd.h:1826
hd_read_of_platform
static void hd_read_of_platform(hd_data_t *hd_data)
Definition: pci.c:1034
s_hd_t::sysfs_bus_id
char * sysfs_bus_id
sysfs bus id for this hardware, if any.
Definition: hd.h:2340
pif_usb_ohci
@ pif_usb_ohci
Definition: hd.h:281
s_hd_t::next
struct s_hd_t * next
Link to next hardware item.
Definition: hd.h:2201
bus_mmc
@ 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:5992
acc_rw
@ acc_rw
read/write
Definition: hd.h:1660
s_hd_t::device
hd_id_t device
Device id and name.
Definition: hd.h:2263
add_xen_network
static void add_xen_network(hd_data_t *hd_data)
Definition: pci.c:1470
res_mem_t::range
uint64_t range
Definition: hd.h:1693
res_irq
@ res_irq
Definition: hd.h:1639
bus_nd
@ bus_nd
Definition: hd.h:303
hd_read_vm
static void hd_read_vm(hd_data_t *hd_data)
Definition: pci.c:1502
s_str_list_t::free_str_list
str_list_t * free_str_list(str_list_t *list)
Definition: hd.c:2494
IORESOURCE_IO
#define IORESOURCE_IO
Definition: pci.c:29
s_pci_t::cmd
unsigned cmd
PCI_COMMAND.
Definition: hd.h:1038
u_hd_res_t::io
res_io_t io
Definition: hd.h:1829
bc_network
@ bc_network
Definition: hd.h:162
hddb.h
device_class
@ device_class
Definition: isdn_cdb_def.h:12
res_any_t::type
enum resource_types type
Definition: hd.h:1687
pci_flag_ok
@ 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:622
u_hd_res_t::next
union u_hd_res_t * next
Definition: hd.h:1827
dump_pci_data
static void dump_pci_data(hd_data_t *hd_data)
Definition: pci.c:640
hd_data_t::module
unsigned module
(Internal) the current probing module we are in
Definition: hd.h:2685
sc_nif_other
@ 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:2474
s_pci_t::base_class
unsigned base_class
Definition: hd.h:1043
bc_none
@ 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
@ sc_ser_usb
Definition: hd.h:219
u_hd_res_t::mem
res_mem_t mem
Definition: hd.h:1830
pci_flag_pm
@ pci_flag_pm
Definition: hd.h:1064
s_hd_t::detail
hd_detail_t * detail
Special info associated with this hardware.
Definition: hd.h:2437
s_pci_t::slot
unsigned slot
Definition: hd.h:1042
res_io_t::range
uint64_t range
Definition: hd.h:1709
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:1778
add_mv643xx_eth
static void add_mv643xx_eth(hd_data_t *hd_data, char *entry, char *platform_type)
Definition: pci.c:905
hd_data_t::debug
unsigned debug
Debug flags.
Definition: hd.h:2639
bc_storage
@ 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:2751
pr_pci
@ pr_pci
Definition: hd.h:113
u_hd_res_t::irq
res_irq_t irq
Definition: hd.h:1832
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:1667
s_hd_t::sub_device
hd_id_t sub_device
Subdevice id and name.
Definition: hd.h:2279
hd_data_t::pci
pci_t * pci
(Internal) raw PCI data
Definition: hd.h:2688
MAKE_ID
#define MAKE_ID(tag, id_val)
Combine tag and id value.
Definition: hd.h:105
s_hd_t::is
struct s_hd_t::is_s is
TAG_SDIO
#define TAG_SDIO
SDIO ids.
Definition: hd.h:90
res_irq_t::enabled
unsigned enabled
0: disabled, 1 enabled
Definition: hd.h:1720
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:2594
hd_id_t::id
unsigned id
Numeric id.
Definition: hd.h:401
hd.h
bus_ps3_system_bus
@ bus_ps3_system_bus
Definition: hd.h:302
hd_read_vio
static void hd_read_vio(hd_data_t *hd_data)
Definition: pci.c:802
pci_flag_agp
@ 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:2297
s_hd_t::sysfs_id
char * sysfs_id
sysfs entry for this hardware, if any.
Definition: hd.h:2335
hd_attr_uint
int hd_attr_uint(char *attr, uint64_t *u, int base)
Definition: hd.c:5961
s_pci_t::sub_vend
unsigned sub_vend
Definition: hd.h:1044
res_mem_t::base
uint64_t base
Definition: hd.h:1693
bc_mmc_ctrl
@ bc_mmc_ctrl
Definition: hd.h:171
s_hd_t::res
hd_res_t * res
Device resources.
Definition: hd.h:2431
s_hd_t::sub_class
hd_id_t sub_class
Sub class (id and name).
Definition: hd.h:2240
bc_display
@ bc_display
Definition: hd.h:162
sc_multi_audio
@ sc_multi_audio
Definition: hd.h:251
sc_dis_vga
@ sc_dis_vga
Definition: hd.h:187
s_pci_t::prog_if
unsigned prog_if
PCI device classes.
Definition: hd.h:1043
bus_ibmebus
@ bus_ibmebus
Definition: hd.h:303
hd_detail_t::pci
hd_detail_pci_t pci
Definition: hd.h:2147
bus_none
@ 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
@ acc_ro
read only
Definition: hd.h:1658
s_hd_t::sub_vendor
hd_id_t sub_vendor
Subvendor id and name.
Definition: hd.h:2271
s_hd_t::vendor
hd_id_t vendor
Vendor id and name.
Definition: hd.h:2253
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:1709
s_hd_t::bus
hd_id_t bus
Bus type (id and name).
Definition: hd.h:2219
hd_read_ps3_system_bus
static void hd_read_ps3_system_bus(hd_data_t *hd_data)
Definition: pci.c:1133
s_hd_t::is_s::wlan
unsigned wlan
WLAN card.
Definition: hd.h:2501
hd_attr_list
str_list_t * hd_attr_list(char *str)
Definition: hd.c:5979
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:2207
hd_data
static hd_data_t * hd_data
Definition: pppoe.c:29
sc_ser_fire
@ sc_ser_fire
Definition: hd.h:219
str_printf
void str_printf(char **buf, int offset, char *format,...)
Definition: hd.c:2402
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:1855
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:1770
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:2632
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:2286
s_pci_t::sysfs_id
char * sysfs_id
sysfs path
Definition: hd.h:1051
flag_no
@ flag_no
no
Definition: hd.h:1666
hd_pci_complete_data
void hd_pci_complete_data(hd_t *hd)
Definition: pci.c:471
s_pci_t::hdr_type
unsigned hdr_type
PCI_HEADER_TYPE.
Definition: hd.h:1039
s_hd_t::func
unsigned func
(PCI) function.
Definition: hd.h:2230
res_mem_t::enabled
unsigned enabled
0: disabled, 1 enabled
Definition: hd.h:1695
s_str_list_t::add_str_list
str_list_t * add_str_list(str_list_t **sl, char *str)
Definition: hd.c:2480
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:931
hd_read_mmc
static void hd_read_mmc(hd_data_t *hd_data)
Definition: pci.c:1773
module
@ module
Definition: isdn_cdb_def.h:22
bus_virtio
@ bus_virtio
Definition: hd.h:303
TAG_SPECIAL
#define TAG_SPECIAL
Internally used ids.
Definition: hd.h:88
hd_read_nd
static void hd_read_nd(hd_data_t *hd_data)
Definition: pci.c:1940
hd_data_t
Holds all data accumulated during hardware probing.
Definition: hd.h:2608
new_mem
void * new_mem(size_t size)
Definition: hd.c:1536
hd_sysfs_driver_list
void hd_sysfs_driver_list(hd_data_t *hd_data)
Definition: hd.c:5757
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:1828
add_xen_storage
static void add_xen_storage(hd_data_t *hd_data)
Definition: pci.c:1486
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:1595
get_sysfs_attr_by_path
char * get_sysfs_attr_by_path(const char *path, const char *attr)
Definition: hd.c:6059
hd_read_xen
static void hd_read_xen(hd_data_t *hd_data)
Definition: pci.c:1358