Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!altitude!eicon!eicon.eicon.qc.ca!andre From: andre@eicon.eicon.qc.ca (Andre Scheunemann) Newsgroups: comp.unix.aix Subject: RS/6000 device driver problem. Message-ID: <1990Nov7.152309.7672@eicon.UUCP> Date: 7 Nov 90 15:23:09 GMT Sender: root@eicon.UUCP (Super User) Distribution: na Organization: EICON Technology Inc., Montreal Lines: 36 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 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 . 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@iro.umontreal.ca