1 #ifndef __LUNAIX_PCI_HBA_H
2 #define __LUNAIX_PCI_HBA_H
5 #include <lunaix/types.h>
9 #define PCI_CONFIG_ADDR 0xcf8
10 #define PCI_CONFIG_DATA 0xcfc
12 static inline pci_reg_t
13 pci_read_cspace(ptr_t base, int offset)
15 port_wrdword(PCI_CONFIG_ADDR, base | (offset & ~0x3));
16 return port_rddword(PCI_CONFIG_DATA);
20 pci_write_cspace(ptr_t base, int offset, pci_reg_t data)
22 port_wrdword(PCI_CONFIG_ADDR, base | (offset & ~0x3));
23 port_wrdword(PCI_CONFIG_DATA, data);
27 pci_config_msi_data(int vector) {
37 #endif /* __LUNAIX_PCI_HBA_H */