Re: Walking all the physical memory in an x86 system

From: Alan Cox
Date: Tue Nov 30 2004 - 15:03:40 EST


On Maw, 2004-11-30 at 17:34, Jan Engelhardt wrote:
> unsigned short p;
> fd = open("/dev/mem", O_RDONLY | O_BINARY);
> lseek(fd, 0x400, SEEK_SET);
> read(fd, &p, 2);

You want ports for that not mem, has always been the case since back
before Linux existed.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/