Subject: My first try; /dev/rom
To: None <port-mac68k@NetBSD.ORG>
From: Stefan Arentz <stefan.arentz@soze.com>
List: port-mac68k
Date: 03/21/1998 23:08:17
Hi folks,
As a spare time hack project I'm tinkering with NetBSD/mac68k code.. the
first thing I'm trying to do is to create a /dev/rom device to read
from the Macintosh ROM.
This is the device that I created:
crw-r--r-- 1 root wheel 2, 3 Mar 20 21:36 /dev/rom
I added the following code to mmrw() in mem.c:
/* minor device 3 is ROM */
case 3:
if (uio->uio_rw == UIO_WRITE)
return EFAULT;
v = uio->uio_offset + ROMBASE;
c = min(iov->iov_len, ROMLEN);
error = uiomove((caddr_t)v, c, uio);
continue;
But I'm getting the following results:
wopr# hexdump /dev/rom
hexdump: /dev/rom: Bad address
What am I doing wrong here? I was under the impression that it was
possible to read from the ROM while in kernel mode...
This is on a Q660AV, NetBSD 1.3
Greetings,
Stefan