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>
This commit is contained in:
committed by
Grant Likely
parent
02d748a9ee
commit
de32400dd2
@ -136,6 +136,14 @@ extern phys_addr_t total_lowmem;
|
||||
extern phys_addr_t memstart_addr;
|
||||
extern phys_addr_t lowmem_end_addr;
|
||||
|
||||
#ifdef CONFIG_WII
|
||||
extern unsigned long wii_hole_start;
|
||||
extern unsigned long wii_hole_size;
|
||||
|
||||
extern unsigned long wii_mmu_mapin_mem2(unsigned long top);
|
||||
extern void wii_memory_fixups(void);
|
||||
#endif
|
||||
|
||||
/* ...and now those things that may be slightly different between processor
|
||||
* architectures. -- Dan
|
||||
*/
|
||||
@ -155,5 +163,5 @@ extern void adjust_total_lowmem(void);
|
||||
#elif defined(CONFIG_PPC32)
|
||||
/* anything 32-bit except 4xx or 8xx */
|
||||
extern void MMU_init_hw(void);
|
||||
extern unsigned long mmu_mapin_ram(void);
|
||||
extern unsigned long mmu_mapin_ram(unsigned long top);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user