Re: /dev/kmem /dev/mem PATCH for kernel 2.1.15

Hans Lermen (lermen@elserv.ffm.fgan.de)
Mon, 16 Dec 1996 13:50:43 +0100 (MET)


On Mon, 16 Dec 1996, Marcin Dalecki wrote:

> Just recently someone created an device with major number 1 and minor
> number 0. It was called ram but that's exactly what /dev/mem is supposed
^^^ ^^^^^^^^
> to do: read the physical ram mapping.

I guess you mixed the things a bit ;-)

MAJOR 1, MINOR 0 /dev/ram0 == block device, == ramdisk
^^^^^ ^^^^
MAJOR 1, MINOR 1 /dev/mem == character device, == memory device
^^^^^^^^^

> The virtual address space should be
> accessed by /dev/kmem (see man 2 kmem or man 2 mem for confirmance.)

... better see linux/Documentation/devices.txt:

1 char Memory devices
1 = /dev/mem Physical memory access
2 = /dev/kmem Kernel virtual memory access

( this always is the actual source for device assignments )

Hans
<lermen@fgan.de>