diff options
author | Albert Herranz <albert_herranz@yahoo.es> | 2009-12-12 01:31:53 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2009-12-13 00:24:31 -0500 |
commit | de32400dd26e743c5d500aa42d8d6818b79edb73 (patch) | |
tree | 5fee868e4fac044dca4fb3a18532b67b62c90c96 /arch/powerpc/mm/mmu_decl.h | |
parent | 02d748a9ee56735641bade9b734dc2fa9be4df4c (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/mmu_decl.h')
-rw-r--r-- | arch/powerpc/mm/mmu_decl.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h index d2e5321d5ea6..9aa39fe74f8a 100644 --- a/arch/powerpc/mm/mmu_decl.h +++ b/arch/powerpc/mm/mmu_decl.h | |||
@@ -136,6 +136,14 @@ extern phys_addr_t total_lowmem; | |||
136 | extern phys_addr_t memstart_addr; | 136 | extern phys_addr_t memstart_addr; |
137 | extern phys_addr_t lowmem_end_addr; | 137 | extern phys_addr_t lowmem_end_addr; |
138 | 138 | ||
139 | #ifdef CONFIG_WII | ||
140 | extern unsigned long wii_hole_start; | ||
141 | extern unsigned long wii_hole_size; | ||
142 | |||
143 | extern unsigned long wii_mmu_mapin_mem2(unsigned long top); | ||
144 | extern void wii_memory_fixups(void); | ||
145 | #endif | ||
146 | |||
139 | /* ...and now those things that may be slightly different between processor | 147 | /* ...and now those things that may be slightly different between processor |
140 | * architectures. -- Dan | 148 | * architectures. -- Dan |
141 | */ | 149 | */ |
@@ -155,5 +163,5 @@ extern void adjust_total_lowmem(void); | |||
155 | #elif defined(CONFIG_PPC32) | 163 | #elif defined(CONFIG_PPC32) |
156 | /* anything 32-bit except 4xx or 8xx */ | 164 | /* anything 32-bit except 4xx or 8xx */ |
157 | extern void MMU_init_hw(void); | 165 | extern void MMU_init_hw(void); |
158 | extern unsigned long mmu_mapin_ram(void); | 166 | extern unsigned long mmu_mapin_ram(unsigned long top); |
159 | #endif | 167 | #endif |