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