Re: memory layout in i386 linux

Ingo Molnar (mingo@pc5829.hil.siemens.at)
Mon, 28 Apr 1997 12:29:03 +0200 (MET DST)


On Sun, 27 Apr 1997, Eddie C. Dost wrote:

> Hi,
>
> I am currently working on getting Linux to run on an embedded 386EX
> system. Everything is looking good so far, but I have some strange
> memory layout to cope with:
>
> 0x00000000 - 0x00200000 is SRAM,
> 0x03f00000 - 0x04000000 is FLASH memory.
>
> I want to put a 512Kb initrd in the flash at 0x03f00000, and wonder
> if there is a way besides hacking arch/i386/mm code to tell the kernel
> there is some memory at these addresses...

use virt_addr=ioremap(phys_addr,size) to map arbitrary physical space into
kernel virtual space. You should save the return value into some global
variable and then dereference through it when you want to use that space.

this new virtual memory range is visible from kernel-space, for all
processes in the system.

-- mingo