[PATCH] powerpc: prpmc2800 - Don't trust documented memory size

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE6895d

2 messages, 1 author, 2007-11-06 · open the first message on its own page

[PATCH] powerpc: prpmc2800 - Don't trust documented memory size

From: Mark A. Greer <hidden>
Date: 2007-11-06 01:28:05

It turns out that the firmware on some PrPMC2800 processor modules
initializes the memory controller for 512 MB even when there is more
memory.  As a simple work around, set the amount of memory in the
device tree passed to the kernel to the lesser of what the memory
controller is set up for and the actual amount of memory.

Signed-off-by: Mark A. Greer <redacted>
---
 arch/powerpc/boot/prpmc2800.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/boot/prpmc2800.c b/arch/powerpc/boot/prpmc2800.c
index 9614e1d..559c45e 100644
--- a/arch/powerpc/boot/prpmc2800.c
+++ b/arch/powerpc/boot/prpmc2800.c
@@ -405,7 +405,10 @@ static void prpmc2800_fixups(void)
 
 	bip = prpmc2800_get_bip(); /* Get board info based on VPD */
 
-	mem_size = (bip) ? bip->mem_size : mv64x60_get_mem_size(bridge_base);
+	mem_size = mv64x60_get_mem_size(bridge_base);
+	if (bip)
+		mem_size = min(mem_size, bip->mem_size);
+
 	prpmc2800_bridge_setup(mem_size); /* Do necessary bridge setup */
 
 	/* If the VPD doesn't match what we know about, just use the

Re: [PATCH] powerpc: prpmc2800 - Don't trust documented memory size

From: Mark A. Greer <hidden>
Date: 2007-11-06 01:59:17

On Mon, Nov 05, 2007 at 06:28:05PM -0700, Mark A. Greer wrote:
It turns out that the firmware on some PrPMC2800 processor modules
initializes the memory controller for 512 MB even when there is more
memory.  As a simple work around, set the amount of memory in the
device tree passed to the kernel to the lesser of what the memory
controller is set up for and the actual amount of memory.

Signed-off-by: Mark A. Greer <redacted>
---
Paul, please ignore this patch.  There is still something wrong.

Sorry for the noise.

Mark
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help