Read/write at absolute memory address on Sys V/3.2 6386 UNIX

maurice.r.baker mrb1 at cbnewsh.ATT.COM
Fri Apr 28 05:34:28 AEST 1989


Hello ----

One more question for the net:

	Within the confines of System V/3.2 UNIX on an AT&T 6386E, I need
to read from and write to a particular range of memory locations......to
be specific, 0xC6000 to 0xC63FF (they are actually on a Matrox graphics  
board).

	Short of writing a device driver which gets linked into the kernel
and runs in privileged mode, is there any other way of doing the job?  Spe-
cifically, through /dev/mem ???  The manuals I have access to are very terse 
when it comes to describing much about /dev/mem.  I did try an intuitive test
program or two, without any luck.  (The /dev/mem permissions were set to
rw-rw-rw-, so that shouldn't have been a problem). 
Perhaps there is a neat way to do this,
although the ISDG does sound an ominous note ---

	"Because user programs and the operating system execute in different
address spaces, the I/O cannot take place directly from the device to the
user program ..."

	Which is kind of what I feared, but it certainly is worth a try
posting the question anyhow.  Maybe someone can give some interesting
historical view of /dev/mem, or how to use it, if nothing else.

Thanks for the help on this, and previous inquiries.

M. Baker
homxc!mrb1
201-949-3455



More information about the Comp.unix.questions mailing list