1 /* 2 * Possible userfeature macro flags: 3 * 4 * RUMPCOMP_USERFEATURE_PCI_DMAFREE: 5 * Support free'ing DMA memory. If not, panic() when free() is called. 6 * 7 * RUMPCOMP_USERFEATURE_PCI_IOSPACE 8 * Support for PCI I/O space. If yes, rumpcomp_pci_iospace_init() 9 * must be provided. 10 */ 11 12 #include "rumpcomp_userfeatures_pci.h" 13 14 void *rumpcomp_pci_map(unsigned long, unsigned long); 15 int rumpcomp_pci_confread(unsigned, unsigned, unsigned, int, unsigned int *); 16 int rumpcomp_pci_confwrite(unsigned, unsigned, unsigned, int, unsigned int); 17 18 int rumpcomp_pci_irq_map(unsigned, unsigned, unsigned, int, unsigned); 19 void *rumpcomp_pci_irq_establish(unsigned, int (*)(void *), void *); 20 21 /* XXX: needs work: support boundary-restricted allocations */ 22 int rumpcomp_pci_dmalloc(size_t, size_t, unsigned long *, unsigned long *); 23 #ifdef RUMPCOMP_USERFEATURE_PCI_DMAFREE 24 void rumpcomp_pci_dmafree(unsigned long, size_t); 25 #endif 26 27 struct rumpcomp_pci_dmaseg { 28 unsigned long ds_pa; 29 unsigned long ds_len; 30 unsigned long ds_vacookie; 31 }; 32 int rumpcomp_pci_dmamem_map(struct rumpcomp_pci_dmaseg *, size_t, size_t, 33 void **); 34 35 unsigned long rumpcomp_pci_virt_to_mach(void *); 36 37 #ifdef RUMPCOMP_USERFEATURE_PCI_IOSPACE 38 int rumpcomp_pci_iospace_init(void); 39 #endif 40