15 #define CLASS_DEVICE_TOO_OLD 0x00
16 #define CLASS_MASS_STORAGE 0x01
17 #define CLASS_NETWORK_CTRLR 0x02
18 #define CLASS_DISPLAY 0x03
19 #define CLASS_MULTIMEDIA 0x04
20 #define CLASS_MEMORY 0x05
21 #define CLASS_BRIDGE 0x06
22 #define CLASS_SCC 0x07
23 #define CLASS_SYSTEM 0x08
24 #define CLASS_INPUT 0x09
25 #define CLASS_DOCK 0x0A
26 #define CLASS_PROCESSOR 0x0B
27 #define CLASS_SERIAL_BUS 0x0C
28 #define CLASS_WIRELESS 0x0D
29 #define CLASS_INTELLIGENTIO 0x0E
30 #define CLASS_SATELLITE 0x0F
31 #define CLASS_ENCRYPT 0x10
32 #define CLASS_SIGNAL_PROC 0x11
33 #define CLASS_PROC_ACCEL 0x12
34 #define CLASS_NO_ESS_INS 0x13
35 #define CLASS_CO_CPU 0x40
37 #define PCI_ADDRESS_PORT 0xCF8
38 #define PCI_DATA_PORT 0xCFC
40 #define PCI_VENDOR_NO_DEVICE 0xFFFF
89 uint8_t
pci_get_class(uint8_t bus, uint8_t slot, uint8_t
function);
92 uint16_t
pci_get_vendor(uint8_t bus, uint8_t slot, uint8_t
function);
93 uint16_t
pci_get_device(uint8_t bus, uint8_t slot, uint8_t
function);
96 uint32_t
pci_get_bar(uint8_t hdrtype, uint8_t bus, uint8_t slot, uint8_t func, uint8_t bar_number, uint8_t *bar_type);
97 void pci_find_device(uint16_t vendor, uint16_t device, uint8_t *bus_ret, uint8_t *slot_ret, uint8_t *func_ret);
98 void pci_print_list();
99 void pci_write(uint8_t bus, uint8_t slot, uint8_t func, uint32_t offset, uint32_t value);
100 void pci_find_device_by_class_and_subclass(uint16_t
class, uint16_t subclass, uint16_t *vendor_ret, uint16_t *deviceid_ret,
101 uint8_t *bus_ret, uint8_t *slot_ret, uint8_t *func_ret);
102 void pci_enable_bus_mastering(uint8_t bus, uint8_t slot, uint8_t func);
103 uint32_t
pci_read32(uint8_t bus, uint8_t slot, uint8_t
function, uint8_t offset);
105 void pci_scan_everything();
Основные определения ядра
uint32_t pci_get_bar(uint8_t hdrtype, uint8_t bus, uint8_t slot, uint8_t func, uint8_t bar_number, uint8_t *bar_type)
[PCI] ???
uint16_t pci_read_confspc_word(uint8_t bus, uint8_t slot, uint8_t function, uint8_t offset)
[PCI] Чтение 16-битных полей из пространства механизма конфигураций 1
void pci_find_device(uint16_t vendor, uint16_t device, uint8_t *bus_ret, uint8_t *slot_ret, uint8_t *func_ret)
[PCI] Поиск устройства по ID-поставшика и устройства
uint8_t pci_get_hdr_type(uint8_t bus, uint8_t slot, uint8_t function)
[PCI] Получение HDR-тип устройства
uint16_t pci_get_vendor(uint8_t bus, uint8_t slot, uint8_t function)
[PCI] Получение ID-поставщика
const char * pci_get_device_type(uint8_t klass, uint8_t subclass)
[PCI] Получение классификации устройства
const char * pci_get_vendor_name(uint16_t vendor)
[PCI] Получение названия поставщика
uint32_t pci_read32(uint8_t bus, uint8_t slot, uint8_t function, uint8_t offset)
Чтение данных из шины PCI.
uint8_t pci_get_class(uint8_t bus, uint8_t slot, uint8_t function)
[PCI] Получение основной категории устройства
uint16_t pci_get_device(uint8_t bus, uint8_t slot, uint8_t function)
[PCI] Получение ID-Устройства
uint8_t pci_get_subclass(uint8_t bus, uint8_t slot, uint8_t function)
[PCI] Получение под-категории устройства