Subject: Patches to support 48M IBM Workpad z50?

From: Chris Vandomelen <[email-masked]>
Date: Wed, 18 Jul 2001 21:09:42 -0700 (PDT)

Since I can't seem to find any information about this anywhere else, I
figured this would be the appropriate place to ask.

I'm using a moderately hacked 2.4.0-test9 kernel from the linux-vr
repository (the only complete kernel, excluding NetBSD, that I've found
which runs on CE devices at the moment), and it doesn't want to recognize
all 48M of RAM in the device, only the 1st 16. The memory is mapped as
such:

0M  - 16M:	On-board memory
16M - 32M:	Unmapped region
32M - 64M:	Memory expansion card

When the first 16M is checked, the memory immediately after that is found
to be non-existant.

Does anyone have a patch (other than the hack I tossed together to turn
the 32M-64M chunk into an MTD device) that would be useful to work past
the memory hole?

TIA

Chris

---

From: Ralf Baechle <[email-masked]>
Date: Thu, 19 Jul 2001 12:21:14 +0200

On Wed, Jul 18, 2001 at 09:09:42PM -0700, Chris Vandomelen wrote:

> the 32M-64M chunk into an MTD device)

Now that hack took longer to implement than a proper solution ...

> that would be useful to work past the memory hole?

Put something like the following into your systems prom_meminit:

	add_memory_region(0UL       , 16UL << 20, BOOT_MEM_RAM);
	add_memory_region(16UL      , 16UL << 20, BOOT_MEM_RESERVED);
	add_memory_region(32UL << 20, 32UL << 20, BOOT_MEM_RAM);

You may want to account for additional memory areas and do a proper detection
etc., exclude area which are used by the firmware etc.

  Ralf

---

From: Chris Vandomelen <[email-masked]>
Date: Thu, 19 Jul 2001 03:30:08 -0700 (PDT)

> Now that hack took longer to implement than a proper solution ...

Yeah, that hack did take longer to implement than a proper solution. But
it was what I could come up with at the time, as I haven't gone digging
that far down into the kernel sources yet (and unfortunately, the prom.c
source wasn't very helpful either.

> etc., exclude area which are used by the firmware etc.

I'm pretty sure that 16M region in the 16-32M area is unused: it's
possible to solder another 2 8M dram chips on the board and increase the
memory to 64M..

Thanks for the help. :)

Chris