phys(2) and accessing physical memory

Chris Torek chris at umcp-cs.UUCP
Tue Dec 24 11:20:24 AEST 1985


In article <264 at twitch.UUCP> grt at twitch.UUCP (G.R.Tomasevich) writes:

> My suggestion about reading from /dev/mem and calculating the
> address is trivial only if the physical address space is commensurate
> with the number of address bits in the DMA device,

And if the device does not need byte transfers or something
else exotic, and if on a Vax, can tolerate longword transfers
(as opposed to word transfers; see /dev/kUmem).

> If you need to access something like a Unibus map, for example,
> it would be a pain from user space.

kUmem in 4BSD does not go through the Unibus maps for you; it is
just kmem with word transfers.  This is necessary anyway on Vaxen
since there can be multiple UBAs.

On Vaxen, kmem is easier to use than mem, since you need not look
up all the page tables.  As long as the object of your search is
in system space, you are OK.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at mimsy.umd.edu



More information about the Comp.unix.wizards mailing list