From: Justin Carlson <[email-masked]>
Date: Tue, 6 Feb 2001 10:11:00 -0800

On Tue, 06 Feb 2001, Greeen-III wrote:
> All experts,
> 
> I am trying to port mips to my target board.
> The board has two pieces of ram. One is addressed at 0x80000000(bank0).
> The other is addressed at 0x82000000(bank1).
> The loader will load the kernel and ramdisk to the bank0.
> The ramdisk seems too small. The system will halt at gunzip() function.
> 

The memory is at physical address 0 and 0x2000000, then, as those addresses are
unmapped virtual in KSEG0 that map to these general addresses.

You need to find a way to call add_memory_region, typically from the
prom_meminit function for your board.  This function (among other things)
should be able to figure out what the physical memory map is, usually by
querying the firmware. 

Take a look at arch/mips/arc/memory.c in prom_meminit() for sample code on how
to do this.

> So I modify the file "/linux-vr/arch/mips/ld.script".
> >From the address ". = 0x80020000" to ". = 0x82020000 "
> But the situation still exist.

This just moves the entry point for the kernel to your second chunk of memory. 
For things to work properly, the kernel needs to be able to figure out what
the physical memory layout looks like; where the kernel lies within this
memory, so long as it's reserved, isn't terribly important.

How much memory is on your board, anyways, and what kind of board is it?  As
the initrd stuff is currently set up, the whole ramdisk is loaded into the
buffer cache, and *then* the ramdisk image memory is freed.  I've got a small
patch to do the image reclamation on the fly, which I'm using for really tiny
memory systems, but it's not really a clean solution.  If you're on a really
small memory system, I'll post it for you to try out.

-Justin