Subject: PCI device driver for sparc, sparc64, and i386
To: None <>
From: Steven Grunza <>
List: tech-kern
Date: 02/06/2001 09:01:36
I'm not sure if this is the correct list for this question but:

I plan on writing a device driver for a PCI card.  I would like the same
source to work on sparc, sparc64, and i386.  Are there any issues betwen
the 32-bit sparc and i386 and the 64-bit sparc64 of which I should be
aware?  I'm expecting to be calling hton and ntoh to deal with the endian

I've done pseudo-drivers for NetBSD before but this is the first "real"
driver I've attempted.  I'll probably need a header file for things private
to the driver and one for things public to the users of the driver.  Where
should these two files go and is there a standard naming convention for
them?  I seem to recall X11 using a capital P at the end of the Public

If I don't hear otherwise, I'll probably try:

/usr/include/jaguar.h	for the public file (the board is called a jaguar)
/usr/include/sys/jag.h	for the driver's private file

Thanks in advance....

  If someone could provide a rough framework for calls necessary to set up
bus master dma's for a PCI card, that would really be appreciated.
Specifically, how to allocate memory for the PCI card and get it locked
(prevent it from being paged out).  I realize the details of informing the
card of the location of this memory (or chunks of memory for
scatter-gather) are my own problem...

"Luke, you're going to find that many | Steven Grunza
of the truths we cling to depend      | voice:  (856) 787 - 2759 
greatly on our own point of view."    | fax:    (856) 866 - 2033
 - Obi Wan Kenobi, Return of the Jedi | e-mail: