libhd  5.0
isapnp.h
Go to the documentation of this file.
1 /*
2  * These are fixed and write only. Reads are done from a port with a
3  * relocatable address...
4  */
5 #define ISAPNP_ADDR_PORT 0x279
6 #define ISAPNP_DATA_PORT 0xa79
7 
8 
9 /*
10  * ISA PnP resource types
11  */
12 #define RES_PNP_VERSION 0x01
13 #define RES_LOG_DEV_ID 0x02
14 #define RES_COMPAT_DEV_ID 0x03
15 #define RES_IRQ 0x04
16 #define RES_DMA 0x05
17 #define RES_START_DEP 0x06
18 #define RES_END_DEP 0x07
19 #define RES_IO 0x08
20 #define RES_FIXED_IO 0x09
21 #define RES_VENDOR_SMALL 0x0e
22 #define RES_END 0x0f
23 
24 #define RES_MEM_RANGE 0x81
25 #define RES_ANSI_NAME 0x82
26 #define RES_UNICODE_NAME 0x83
27 #define RES_VENDOR_LARGE 0x84
28 #define RES_MEM32_RANGE 0x85
29 #define RES_FIXED_MEM32_RANGE 0x86
30 
31 
32 /*
33  * ISA PnP configuration regs
34  */
35 #define CFG_MEM24 0x40
36 #define CFG_MEM32_0 0x76
37 #define CFG_MEM32_1 0x80
38 #define CFG_MEM32_2 0x90
39 #define CFG_MEM32_3 0xa0
40 #define CFG_IO_HI_BASE 0x60
41 #define CFG_IO_LO_BASE 0x61
42 #define CFG_IRQ 0x70
43 #define CFG_IRQ_TYPE 0x71
44 #define CFG_DMA 0x74
45 
46 
47 /* gather ISA-PnP info */
49 
50 
51 /*
52  * Interface functions to the pnpdump lib.
53  */
54 int pnpdump(hd_data_t *hd_data, int read_boards);
55 unsigned char *add_isapnp_card_res(isapnp_card_t *, int, int);
57 
isapnp_card_t::card_regs
unsigned char * card_regs
Definition: hd.h:1106
pnpdump
int pnpdump(hd_data_t *hd_data, int read_boards)
read_file
str_list_t * read_file(char *file_name, unsigned start_line, unsigned lines)
Definition: hd.c:2544
isapnp_res_t::type
int type
Definition: hd.h:1095
s_hd_t::base_class
hd_id_t base_class
Base class (id and name).
Definition: hd.h:2236
mod_isapnp
@ mod_isapnp
Definition: hd_int.h:78
res_irq_t::type
enum resource_types type
Definition: hd.h:1718
isapnp_card_t::serial
unsigned char * serial
Definition: hd.h:1105
hd_data_t::isapnp
isapnp_t * isapnp
(Internal) raw ISA-PnP data
Definition: hd.h:2690
isapnp_card_t::res
isapnp_res_t * res
Definition: hd.h:1110
isapnp_card_t::log_devs
int log_devs
Definition: hd.h:1104
isa_isdn_s::has_io
unsigned has_io
Definition: isa.h:4
hd_data_t::misc
misc_t * misc
(Internal) data gathered in the misc module
Definition: hd.h:2694
remove_hd_entries
void remove_hd_entries(hd_data_t *hd_data)
Definition: hd.c:2728
isapnp_t
ISA-PnP collected card information struct.
Definition: hd.h:1116
pr_isapnp
@ pr_isapnp
Definition: hd.h:113
res_dma_t::type
enum resource_types type
Definition: hd.h:1726
PROC_ISAPNP
#define PROC_ISAPNP
Definition: hd_int.h:25
sc_int_isapnp_if
@ sc_int_isapnp_if
Definition: hd.h:225
canon_str
char * canon_str(char *s, int len)
Definition: hd.c:2208
bc_multimedia
@ bc_multimedia
Definition: hd.h:162
new_str
char * new_str(const char *s)
Definition: hd.c:1594
res_dma_t::base
unsigned base
Definition: hd.h:1727
read_dir
str_list_t * read_dir(char *dir_name, int type)
Definition: hd.c:2593
isa_isdn_s::io
unsigned io
Definition: isa.h:5
PROGRESS
#define PROGRESS(a, b, c)
Definition: hd_int.h:65
res_io
@ res_io
Definition: hd.h:1640
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
isapnp_card_t::res_len
int res_len
Definition: hd.h:1108
ISAPNP_ADDR_PORT
#define ISAPNP_ADDR_PORT
Definition: isapnp.h:5
isapnp_card_t::csn
int csn
Definition: hd.h:1103
s_hd_t::compat_device
hd_id_t compat_device
Device id and name of some compatible hardware.
Definition: hd.h:2304
res_dma
@ res_dma
Definition: hd.h:1640
sub_device_class
unsigned sub_device_class(hd_data_t *hd_data, unsigned vendor, unsigned device, unsigned sub_vendor, unsigned sub_device)
Definition: hddb.c:1824
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_hd_t
Individual hardware item.
Definition: hd.h:2201
name2eisa_id
unsigned name2eisa_id(char *s)
Definition: hd.c:2187
ISAPNP_DATA_PORT
#define ISAPNP_DATA_PORT
Definition: isapnp.h:6
res_io_t::type
enum resource_types type
Definition: hd.h:1709
u_hd_res_t
libhd resource union
Definition: hd.h:1827
isdn_detect
isa_isdn_t * isdn_detect(void)
s_hd_t::sysfs_bus_id
char * sysfs_bus_id
sysfs bus id for this hardware, if any.
Definition: hd.h:2341
W_IO
#define W_IO
Definition: hd_int.h:167
hd_sysfs_id
char * hd_sysfs_id(char *path)
Definition: hd.c:6016
acc_rw
@ acc_rw
read/write
Definition: hd.h:1661
s_hd_t::device
hd_id_t device
Device id and name.
Definition: hd.h:2264
res_irq
@ res_irq
Definition: hd.h:1640
s_str_list_t::free_str_list
str_list_t * free_str_list(str_list_t *list)
Definition: hd.c:2510
isa_isdn_s::has_irq
unsigned has_irq
Definition: isa.h:4
isapnp_res_t::data
unsigned char * data
Definition: hd.h:1096
u_hd_res_t::io
res_io_t io
Definition: hd.h:1830
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:1688
isapnp_t::card
isapnp_card_t * card
Definition: hd.h:1119
add_isapnp_card
isapnp_card_t * add_isapnp_card(isapnp_t *, int)
hd_data_t::module
unsigned module
(Internal) the current probing module we are in
Definition: hd.h:2686
ADD2LOG
#define ADD2LOG(a...)
Definition: hd_int.h:66
s_str_list_t
String list type.
Definition: hd.h:410
res_io_t::range
uint64_t range
Definition: hd.h:1710
add_hd_entry
hd_t * add_hd_entry(hd_data_t *hd_data, unsigned line, unsigned count)
Definition: hd.c:1794
hd_data_t::debug
unsigned debug
Debug flags.
Definition: hd.h:2640
s_hd_t::is_s::isapnp
unsigned isapnp
ISA-PnP device.
Definition: hd.h:2476
bc_storage
@ bc_storage
Definition: hd.h:162
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
add_isapnp_card_res
unsigned char * add_isapnp_card_res(isapnp_card_t *, int, int)
s_hd_t::sub_device
hd_id_t sub_device
Subdevice id and name.
Definition: hd.h:2280
isa_isdn_s
Definition: isa.h:2
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
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:1713
hd_id_t::id
unsigned id
Numeric id.
Definition: hd.h:401
hd.h
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
isa_isdn_s::irq
unsigned irq
Definition: isa.h:5
HD_DEB_ISAPNP
#define HD_DEB_ISAPNP
Definition: hd.h:38
isa.h
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
isapnp_card_t
ISA-PnP card information (raw)
Definition: hd.h:1102
isapnp.h
isapnp_t::cards
int cards
Definition: hd.h:1118
ID_VALUE
#define ID_VALUE(id)
Get the real id value.
Definition: hd.h:95
bus_isa
@ bus_isa
Definition: hd.h:297
free_res_list
hd_res_t * free_res_list(hd_res_t *res)
Definition: hd.c:1743
RES_LOG_DEV_ID
#define RES_LOG_DEV_ID
Definition: isapnp.h:13
res_dma_t::enabled
unsigned enabled
0: disabled, 1 enabled
Definition: hd.h:1728
acc_ro
@ 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
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
new_isa_isdn
isa_isdn_t * new_isa_isdn(isa_isdn_t **ii)
hd_data
static hd_data_t * hd_data
Definition: pppoe.c:29
add_mem
void * add_mem(void *p, size_t elem_size, size_t n)
Definition: hd.c:1580
add_res_entry
hd_res_t * add_res_entry(hd_res_t **res, hd_res_t *new_res)
Definition: hd.c:1786
isa_isdn_s::type
unsigned type
Definition: isa.h:5
acc_wo
@ acc_wo
write only
Definition: hd.h:1660
hd_read_sysfs_link
char * hd_read_sysfs_link(char *base_dir, char *link_name)
Definition: hd.c:2648
bc_modem
@ bc_modem
Definition: hd.h:167
s_hd_t::func
unsigned func
(PCI) function.
Definition: hd.h:2231
u_hd_res_t::dma
res_dma_t dma
Definition: hd.h:1834
isapnp_t::read_port
int read_port
Definition: hd.h:1117
isapnp_res_t::len
int len
Definition: hd.h:1094
hd_scan_isapnp
void hd_scan_isapnp(hd_data_t *hd_data)
gather_resources
void gather_resources(misc_t *m, hd_res_t **r, char *name, unsigned which)
Definition: misc.c:603
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
isa_isdn_s::subtype
unsigned subtype
Definition: isa.h:5
eisa_vendor_str
char * eisa_vendor_str(unsigned v)
Definition: hd.c:2171
TAG_EISA
#define TAG_EISA
EISA ids (monitors, ISA-PnP, modems, mice etc).
Definition: hd.h:86
u_hd_res_t::any
res_any_t any
Definition: hd.h:1829
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
bc_internal
@ bc_internal
Definition: hd.h:167
get_sysfs_attr_by_path
char * get_sysfs_attr_by_path(const char *path, const char *attr)
Definition: hd.c:6083