RS/6000 Device Driver Problems.
Andre Scheunemann
andre at eicon.eicon.qc.ca
Wed Nov 21 03:45:29 AEST 1990
Help needed with RS/6000 AIX 3.1 device driver.
I am writing a device driver for a micro-channel card for the RS/6000 with
AIX 3.1. I'm using the BUSIO_ATT() and BUSMEM_ATT() macros from
<sys/adspace.h> to access the card I/O ports and card memory respectively.
There are no problems accessing the I/O ports. However, when I try to access
the card memory the system crashes with a 102 320 led error code.
The following code is used:
{
ulong io_addr, mem_addr;
io_addr = BUSIO_ATT(bus_id, card_io_addr);
mem_addr = BUSMEM_ATT(bus_id, card_mem_addr);
data = BUSIO_GETC(io_addr); /* this works and causes a read */
/* of the I/O register */
data = BUSIO_GETC(mem_addr); /* this causes a system crash !!!!! */
BUSIO_DET(io_addr);
BUSMEM_DET(mem_addr);
}
The BUSIO_GETC() is a macro from <sys/ioacc.h>. The same code is used in the
sample device drivers provided in the /usr/lpp/bos/samples directory.
I know that the card memory can be accessed because I can access it using
ioctl's on the /dev/bus0 device.
Can anyone tell me what I'm doing wrong?
Thanks in advance,
andre%eicon at iro.umontreal.ca
More information about the Comp.unix.wizards
mailing list