diff options
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r-- | sys/powerpc/aim/locore32.S | 5 | ||||
-rw-r--r-- | sys/powerpc/aim/mmu_oea.c | 57 |
2 files changed, 40 insertions, 22 deletions
diff --git a/sys/powerpc/aim/locore32.S b/sys/powerpc/aim/locore32.S index f039db9..c1ac26c 100644 --- a/sys/powerpc/aim/locore32.S +++ b/sys/powerpc/aim/locore32.S @@ -64,6 +64,7 @@ #include <machine/param.h> #include <machine/spr.h> #include <machine/asm.h> +#include "opt_platform.h" #include "opt_kdtrace.h" @@ -129,7 +130,9 @@ __start: bdnz 1b sync isync - +#ifdef WII +#include <powerpc/wii/locore.S> +#endif /* Zero bss, in case we were started by something unhelpful */ li 0,0 lis 8,_edata@ha diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index 3ed8eb1..b173760 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -620,8 +620,17 @@ moea_cpu_bootstrap(mmu_t mmup, int ap) isync(); } - __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu)); - __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl)); +#ifdef WII + /* + * Special case for the Wii: don't install the PCI BAT. + */ + if (strcmp(installed_platform(), "wii") != 0) { +#endif + __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu)); + __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl)); +#ifdef WII + } +#endif isync(); __asm __volatile("mtibatu 1,%0" :: "r"(0)); @@ -660,26 +669,26 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend) battable[0x0].batl = BATL(0x00000000, BAT_M, BAT_PP_RW); battable[0x0].batu = BATU(0x00000000, BAT_BL_256M, BAT_Vs); - /* - * Map PCI memory space. - */ - battable[0x8].batl = BATL(0x80000000, BAT_I|BAT_G, BAT_PP_RW); - battable[0x8].batu = BATU(0x80000000, BAT_BL_256M, BAT_Vs); + /* + * Map PCI memory space. + */ + battable[0x8].batl = BATL(0x80000000, BAT_I|BAT_G, BAT_PP_RW); + battable[0x8].batu = BATU(0x80000000, BAT_BL_256M, BAT_Vs); - battable[0x9].batl = BATL(0x90000000, BAT_I|BAT_G, BAT_PP_RW); - battable[0x9].batu = BATU(0x90000000, BAT_BL_256M, BAT_Vs); + battable[0x9].batl = BATL(0x90000000, BAT_I|BAT_G, BAT_PP_RW); + battable[0x9].batu = BATU(0x90000000, BAT_BL_256M, BAT_Vs); - battable[0xa].batl = BATL(0xa0000000, BAT_I|BAT_G, BAT_PP_RW); - battable[0xa].batu = BATU(0xa0000000, BAT_BL_256M, BAT_Vs); + battable[0xa].batl = BATL(0xa0000000, BAT_I|BAT_G, BAT_PP_RW); + battable[0xa].batu = BATU(0xa0000000, BAT_BL_256M, BAT_Vs); - battable[0xb].batl = BATL(0xb0000000, BAT_I|BAT_G, BAT_PP_RW); - battable[0xb].batu = BATU(0xb0000000, BAT_BL_256M, BAT_Vs); + battable[0xb].batl = BATL(0xb0000000, BAT_I|BAT_G, BAT_PP_RW); + battable[0xb].batu = BATU(0xb0000000, BAT_BL_256M, BAT_Vs); - /* - * Map obio devices. - */ - battable[0xf].batl = BATL(0xf0000000, BAT_I|BAT_G, BAT_PP_RW); - battable[0xf].batu = BATU(0xf0000000, BAT_BL_256M, BAT_Vs); + /* + * Map obio devices. + */ + battable[0xf].batl = BATL(0xf0000000, BAT_I|BAT_G, BAT_PP_RW); + battable[0xf].batu = BATU(0xf0000000, BAT_BL_256M, BAT_Vs); /* * Use an IBAT and a DBAT to map the bottom segment of memory @@ -694,9 +703,15 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend) :: "r"(battable[0].batu), "r"(battable[0].batl)); mtmsr(msr); - /* map pci space */ - __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu)); - __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl)); +#ifdef WII + if (strcmp(installed_platform(), "wii") != 0) { +#endif + /* map pci space */ + __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu)); + __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl)); +#ifdef WII + } +#endif isync(); /* set global direct map flag */ |