Subject: Re: indipendent machine PCI code
To: Dante Profeta <dante@mclink.it>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 06/11/1998 14:41:52
On Thu, 11 Jun 1998 20:23:35 +0200 
 Dante Profeta <dante@mclink.it> wrote:

 > I have to use these functions:
 > 
 > pcireg_t    pci_conf_read __P((pci_chipset_tag_t, pcitag_t, int));
 > void        pci_conf_write __P((pci_chipset_tag_t, pcitag_t, int,
 > 		pcireg_t));
 > void        *pci_map_int __P((pcitag_t, int, int (*)(void *), void *));
 > int         pci_map_io __P((pcitag_t, int, int *));
 > int         pci_map_mem __P((pcitag_t, int, vm_offset_t *,
 > 		vm_offset_t *));
 > 
 > What are the equivalent ones to use to write a machine indipendent code?

I suggest you look at sys/dev/pci/if_ne_pci.c for examples of how
to use the NetBSD PCI functions.  (I point to that one because I
wrote it, and therefore know it's easy to read :-)

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-5                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 650 428 6939