aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/init_32.c
diff options
context:
space:
mode:
authorAlbert Herranz <albert_herranz@yahoo.es>2009-12-12 01:31:53 -0500
committerGrant Likely <grant.likely@secretlab.ca>2009-12-13 00:24:31 -0500
commitde32400dd26e743c5d500aa42d8d6818b79edb73 (patch)
tree5fee868e4fac044dca4fb3a18532b67b62c90c96 /arch/powerpc/mm/init_32.c
parent02d748a9ee56735641bade9b734dc2fa9be4df4c (diff)
wii: use both mem1 and mem2 as ram
The Nintendo Wii video game console has two discontiguous RAM regions: - MEM1: 24MB @ 0x00000000 - MEM2: 64MB @ 0x10000000 Unfortunately, the kernel currently does not support discontiguous RAM memory regions on 32-bit PowerPC platforms. This patch adds a series of workarounds to allow the use of the second memory region (MEM2) as RAM by the kernel. Basically, a single range of memory from the beginning of MEM1 to the end of MEM2 is reported to the kernel, and a memory reservation is created for the hole between MEM1 and MEM2. With this patch the system is able to use all the available RAM and not just ~27% of it. This will no longer be needed when proper discontig memory support for 32-bit PowerPC is added to the kernel. Signed-off-by: Albert Herranz <albert_herranz@yahoo.es> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/powerpc/mm/init_32.c')
-rw-r--r--arch/powerpc/mm/init_32.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 9ddcfb4dc139..703c7c2e0d9f 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -131,9 +131,13 @@ void __init MMU_init(void)
131 MMU_setup(); 131 MMU_setup();
132 132
133 if (lmb.memory.cnt > 1) { 133 if (lmb.memory.cnt > 1) {
134#ifndef CONFIG_WII
134 lmb.memory.cnt = 1; 135 lmb.memory.cnt = 1;
135 lmb_analyze(); 136 lmb_analyze();
136 printk(KERN_WARNING "Only using first contiguous memory region"); 137 printk(KERN_WARNING "Only using first contiguous memory region");
138#else
139 wii_memory_fixups();
140#endif
137 } 141 }
138 142
139 total_lowmem = total_memory = lmb_end_of_DRAM() - memstart_addr; 143 total_lowmem = total_memory = lmb_end_of_DRAM() - memstart_addr;