Home | History | Annotate | Line # | Download | only in libpci
pci_user.h revision 1.2.10.2
      1  1.2.10.2  skrll /*
      2  1.2.10.2  skrll  * Possible userfeature macro flags:
      3  1.2.10.2  skrll  *
      4  1.2.10.2  skrll  *   RUMPCOMP_USERFEATURE_PCI_DMAFREE:
      5  1.2.10.2  skrll  *	Support free'ing DMA memory.  If not, panic() when free() is called.
      6  1.2.10.2  skrll  *
      7  1.2.10.2  skrll  *   RUMPCOMP_USERFEATURE_PCI_IOSPACE
      8  1.2.10.2  skrll  *	Support for PCI I/O space.  If yes, rumpcomp_pci_iospace_init()
      9  1.2.10.2  skrll  *	must be provided.
     10  1.2.10.2  skrll  */
     11  1.2.10.2  skrll 
     12  1.2.10.1  skrll #include "rumpcomp_userfeatures_pci.h"
     13  1.2.10.1  skrll 
     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.2.10.2  skrll #ifdef RUMPCOMP_USERFEATURE_PCI_DMAFREE
     24  1.2.10.2  skrll void rumpcomp_pci_dmafree(unsigned long, size_t);
     25  1.2.10.1  skrll #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.2.10.2  skrll 
     37  1.2.10.2  skrll #ifdef RUMPCOMP_USERFEATURE_PCI_IOSPACE
     38  1.2.10.2  skrll int rumpcomp_pci_iospace_init(void);
     39  1.2.10.2  skrll #endif
     40