Writing device driver under AIX

Writing device driver under AIX

Post by Salvatore Palm » Sat, 22 May 1999 04:00:00



Hi to all you,
I'm porting a driver for a serial board from LynxOS to AIX 4.2.
The problem I meet was that the entry point of the driver have
different prototipe on the two OS and on AIX is very difficult to
has an online manual.
Please could you sent me a little peace of code that show how
to use the parameters of the entry point passed by AIX ?

Best regards
Salvatore Palma

 
 
 

Writing device driver under AIX

Post by Jens-Uwe Mag » Sat, 22 May 1999 04:00:00



>I'm porting a driver for a serial board from LynxOS to AIX 4.2.
>The problem I meet was that the entry point of the driver have
>different prototipe on the two OS and on AIX is very difficult to
>has an online manual.

Get the AIX device driver guide, that explains all the details.

--
Jens-Uwe Mager  <pgp-mailto:62CFDB25>
When your hammer is C++ everything starts to look like a thumb.

 
 
 

Writing device driver under AIX

Post by Steven A. Bad » Mon, 24 May 1999 04:00:00




> >I'm porting a driver for a serial board from LynxOS to AIX 4.2.
> >The problem I meet was that the entry point of the driver have
> >different prototipe on the two OS and on AIX is very difficult to
> >has an online manual.

> Get the AIX device driver guide, that explains all the details.

> --
> Jens-Uwe Mager  <pgp-mailto:62CFDB25>
> When your hammer is C++ everything starts to look like a thumb.

Unfortunatly, the "Writing a device driver guide" is not available any
longer.  The best suggestion is to get a subscription to the "Developers
Connection",  it contains several driver samples, and the documentation
regarding writing the driver.

The entry point for initialization is the "config", and is
invoked when the config method loads the driver. The configuration
method invokes the sysconfig system call with SYS_CFGDD, and a pointer
to a cfg_dd structure (with the command set to CFG_INIT, and a pointer
to a device dependent structure (containing the setup information
obtained through ODM).  The config entrypoint will have 3 parameters
(devno, cmd, and uiop)).  The cmd is the CFG_INIT (or CFG_TERM for
unloading the driver).   In the config entry point sets up the device
switch table, pins any code that has to be permanent in the kernel (AIX
has a pageable kernel, parts of drivers can be paged), initializes the
interrupt handler into the chain etc...
--
Steven A. Bade

RS Technical Services Inc.

 
 
 

Writing device driver under AIX

Post by Jens-Uwe Mag » Mon, 24 May 1999 04:00:00



Quote:>Unfortunatly, the "Writing a device driver guide" is not available any
>longer.  The best suggestion is to get a subscription to the "Developers
>Connection",  it contains several driver samples, and the documentation
>regarding writing the driver.

Any idea why they discontinued this book? It contained lots of information
not available elsewhere.

--
Jens-Uwe Mager  <pgp-mailto:62CFDB25>

 
 
 

1. How to write device drivers for IBM RT running AIX 2.2.1?

Hi,

the question says near all: How do I write a (presumably character)
device driver for the AT? Where should I look for docs? The tons of
documentation that I found here when I got the job cover nearly
everything, but not how to write an AIX device driver...

The device in question is a 8-bit PC card, which is read-only at an
I/O address port. Yes, I sort of found the relevant machine language/
machine architecture reference chapters in the documentation.

                        Ignatios Souvatzis

2. Colorado 250 w/FC-20 contoller

3. "Writing a Device Driver for AIX , ver. 3.2" -How to order??

4. Indestructible socket problem

5. Q: Writing AIX Device Drivers

6. where do I find mdcreate, etc?

7. to write or not to write a BLASTED device driver

8. Printing Problem w/ Ghostview

9. user space device driver can't write to isa device

10. Writing control codes to device through a device driver

11. How to write aix shell-script to check tape device

12. User written device support for RS6000/AIX

13. Device driver calling another device driver.