1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #ifndef BIOS32_H
23 #define BIOS32_H
24
25 extern int pcibios_present (void);
26 unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end);
27
28 #define PCIBIOS_SUCCESSFUL 0x00
29 #define PCIBIOS_FUNC_NOT_SUPPORTED 0x81
30 #define PCIBIOS_BAD_VENDOR_ID 0x83
31 #define PCIBIOS_DEVICE_NOT_FOUND 0x86
32 #define PCIBIOS_BAD_REGISTER_NUMBER 0x87
33
34 extern int pcibios_find_class (unsigned long class_code, unsigned short index,
35 unsigned char *bus, unsigned char *device_fn);
36 extern int pcibios_find_device (unsigned short vendor, unsigned short device_id,
37 unsigned short index, unsigned char *bus, unsigned char *device_fn);
38 extern int pcibios_read_config_byte (unsigned char bus,
39 unsigned char device_fn, unsigned char where, unsigned char *value);
40 extern int pcibios_read_config_word (unsigned char bus,
41 unsigned char device_fn, unsigned char where, unsigned short *value);
42 extern int pcibios_read_config_dword (unsigned char bus,
43 unsigned char device_fn, unsigned char where, unsigned long *value);
44 extern int pcibios_present (void);
45 extern int pcibios_write_config_byte (unsigned char bus,
46 unsigned char device_fn, unsigned char where, unsigned char value);
47 extern int pcibios_write_config_word (unsigned char bus,
48 unsigned char device_fn, unsigned char where, unsigned short value);
49 extern pcibios_write_config_dword (unsigned char bus,
50 unsigned char device_fn, unsigned char where, unsigned long value);
51 extern char *pcibios_strerror (int error);
52 #endif