Subject: Re: mother board
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 01/09/2002 11:37:20
>> So I was wondering if any one knows how to read absolute memory
>> addresses in netbsd of course or has some other ideas??? :)

> [.../dev/mem...]

This may or may not do what the poster wanted.  The original message
didn't specify which port this was on (though the use of "bios" seems
to imply i386).  On at least some ports, the driver backing /dev/mem
allows access only to real RAM, not device space or anything else
funky.  I ran into this myself when I was investigating how certain
SPARCs handle their RAM; I found that if a block of RAM didn't pass
selftest, it wasn't accessible via /dev/mem because it wasn't in the
list of RAM that the ROMs passed to the kernel.

For the original poster - /dev/mem probably can do what you want, but
you may have to hack on it to remove the check I allude to above.
(That's what I did on the SPARCs I was playing with; I simply made
/dev/mem work for the first 64M regardless of what the ROMs told the
kernel.  That was suitable for the situation I was dealing with.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B