TacOS  0.2
 Tout Structures de données Fichiers Fonctions Variables Définitions de type Énumérations Macros
pci_config.h
Aller à la documentation de ce fichier.
1 
30 #ifndef _PCI_CONFIG_H
31 #define _PCI_CONFIG_H
32 
33 #include <pci_types.h>
34 
35 #define PCI_DEVICE_ID 0x00, 16, 0xffff
36 #define PCI_VENDOR_ID 0x00, 0, 0xffff
37 #define PCI_STATUS 0x04, 16, 0xffff
38 #define PCI_COMMAND 0x04, 0, 0xffff
39 #define PCI_CLASS_CODE 0x08, 24, 0x00ff
40 #define PCI_SUBCLASS 0x08, 16, 0x00ff
41 #define PCI_PROG_IF 0x08, 8, 0x00ff
42 #define PCI_REVISION_ID 0x08, 0, 0x00ff
43 #define PCI_BIST 0x0C, 24, 0x00ff
44 #define PCI_HEADER_TYPE 0x0C, 16, 0x00ff
45 #define PCI_LATENCY_TIMER 0x0C, 8, 0x00ff
46 #define PCI_CACHE_LINE_SIZE 0x0C, 0, 0x00ff
47 #define PCI_BAR0 0x10, 0, 0xffffffff
48 #define PCI_BAR1 0x14, 0, 0xffffffff
49 #define PCI_BAR2 0x18, 0, 0xffffffff
50 #define PCI_BAR3 0x1C, 0, 0xffffffff
51 #define PCI_BAR4 0x20, 0, 0xffffffff
52 #define PCI_BAR5 0x24, 0, 0xffffffff
53 #define PCI_CARDBUS_CIS_POINTER 0x28, 0, 0xffffffff
54 #define PCI_SUBSYS_ID 0x2C, 16, 0xffff
55 #define PCI_SUBSYS_VENDOR_ID 0x2C, 0, 0xffff
56 #define PCI_EXPROM_BAR 0x30, 0, 0xffffffff
57 #define PCI_CAP_POINTER 0x34, 0, 0x00ff
58 #define PCI_MAX_LATENCY 0x3c, 24, 0x00ff
59 #define PCI_MIN_GRANT 0x3c, 16, 0x00ff
60 #define PCI_INTERRUPT_PIN 0x3c, 8, 0x00ff
61 #define PCI_INTERRUPT_LINE 0x3c, 0, 0x00ff
62 
63 uint32_t pci_read_register(uint8_t bus, uint8_t device, uint8_t func, uint8_t reg);
64 
65 uint32_t pci_read_value(pci_function_p func, uint8_t reg, uint8_t offset, uint32_t mask);
66 
67 uint32_t pci_write_register(uint8_t bus, uint8_t slot, uint8_t func, uint8_t reg, uint32_t value);
68 
69 void pci_print_info( pci_function_p function);
70 void pci_print_detailed_info(pci_function_p func);
71 
72 
73 #endif
Definition: pci_types.h:37
unsigned char uint8_t
Definition: types.h:34
unsigned long int uint32_t
Definition: types.h:36