SGI: Development

Device drivers development experience

Does anybody has development experience with driver develoment for Irix??
Or another O.S.?

_________________
__Zacatito__ Image 600 MHZ R14000; 17GBytes HD
__Nopalito__ Image 200 MHZ R5000; 9GBytes HD
Guadalajara, Jal and Aguascalientes, Ags
Mexico
is this about your USB porting amigo? :) sorry for not able to help testing coz life was a roller coaster here..

for your question, i got experience but most are on embedded platforms.. running on RTOS..

_________________
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
BSDero wrote:
Does anybody has development experience with driver develoment for Irix??

Yes. Written a couple of years ago, still maintaining it.
BSDero wrote:
Or another O.S.?

Yes (Linux, Windows, several PPC based vxWorks platforms, some special purpose in-house RTOSes and a couple others).

I wouldn't choose IRIX as the platform for 'my first device driver'. IRIX isn't all that different from e.g. Linux but the necessary information can be a little harder to find and due to the closed nature of IRIX you cannot inspect the code behind the published interfaces.

But really, the concepts of device drivers are pretty universal. The constraints imposed by the platform/OS vary, but in the end you have to implement these bits:

* device registration.
* PIO or memory mapped register I/O
* interrupt handling
* uncached memory manangement for DMA
* interrupt handling
* implement an interface to user space, or to protocol layers

... and FWIW I'd do it in that order. The OS provides primitives to implement these functions and in case of IRIX they are documented on Techpubs and in to 1000+ page Device Driver Writer's Guide . In the case of IRIX, the PCI bus can sometimes be a little oddball because the PCI bus is never the primary system bus and the PCI-XTalk interface can impose some limitations (or amplify effects you wouldn't have noticed on another platform), but really the essentials are all there.

Try to keep your code clean, modular and elegant because (depending on the platform), debugging options beyond 'kprintf' can be a hard enough to be not worth bothering. Apply copious amounts of assert(). And *know* the hardware you're talking to.

_________________
Now this is a deep dark secret, so everybody keep it quiet :)
It turns out that when reset, the WD33C93 defaults to a SCSI ID of 0, and it was simpler to leave it that way... -- Dave Olson, in comp.sys.sgi

Currently in commercial service: Image :Onyx2: (2x) :O3x02L:
In the museum : almost every MIPS/IRIX system.
Wanted : GM1 board for Professional Series GT graphics (030-0076-003, 030-0076-004)
Jan-jaap already gave some very good advice, so the only thing I'll add is to also study the multiprocessor locking/interupt masking primitives and things like the deferred interrupt processing model (e.g. what Linux calls top half processing) before writing anything, and factor synchronisation issues into your design from the very start. It can affect how you structure and implement a driver.
I do this question, cause I'm working in a USB stack in kernel mode in my free time.
I got stuck with USB transfers in UHCI module, altough the drivers detect when a new USB device is connected and disconnected.
The PCI host controller is detected, I'm using VIA VT6212 in a Fuel R14000.

Had to do some weird things, cause the Irix drivers developers manual does not cover some interesting functionalities, needed for a USB stack, like communication from one modules to another.

However, things seems to work, except DMA transfers from PCI Host Controller to DMA memory. (well, the UHCI transfers get stuck, no errors signals from host controller received... just a sudden stop in communication). I think it has something to do with the DMA management and transfers from the PCI controller, some Irix specific stuff....

Does anybody would like to check things? I'll send code under request.

_________________
__Zacatito__ Image 600 MHZ R14000; 17GBytes HD
__Nopalito__ Image 200 MHZ R5000; 9GBytes HD
Guadalajara, Jal and Aguascalientes, Ags
Mexico