Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/aim/aim_machdep.c
Show First 20 Lines • Show All 384 Lines • ▼ Show 20 Lines | if (cpu_features & PPC_FEATURE_64) { | ||||
trap_offset += (size_t)&restorebridgesize; | trap_offset += (size_t)&restorebridgesize; | ||||
bcopy(&restorebridge, (void *)EXC_RST, trap_offset); | bcopy(&restorebridge, (void *)EXC_RST, trap_offset); | ||||
bcopy(&restorebridge, (void *)EXC_DSI, trap_offset); | bcopy(&restorebridge, (void *)EXC_DSI, trap_offset); | ||||
bcopy(&restorebridge, (void *)EXC_ALI, trap_offset); | bcopy(&restorebridge, (void *)EXC_ALI, trap_offset); | ||||
bcopy(&restorebridge, (void *)EXC_PGM, trap_offset); | bcopy(&restorebridge, (void *)EXC_PGM, trap_offset); | ||||
bcopy(&restorebridge, (void *)EXC_MCHK, trap_offset); | bcopy(&restorebridge, (void *)EXC_MCHK, trap_offset); | ||||
bcopy(&restorebridge, (void *)EXC_TRC, trap_offset); | bcopy(&restorebridge, (void *)EXC_TRC, trap_offset); | ||||
bcopy(&restorebridge, (void *)EXC_BPT, trap_offset); | bcopy(&restorebridge, (void *)EXC_BPT, trap_offset); | ||||
} else { | |||||
/* | |||||
* Use an IBAT and a DBAT to map the bottom 256M segment. | |||||
* | |||||
* It is very important to do it *now* to avoid taking a | |||||
* fault in .text / .data before the MMU is bootstrapped, | |||||
* because until then, the translation data has not been | |||||
* copied over from OpenFirmware, so our DSI/ISI will fail | |||||
* to find a match. | |||||
*/ | |||||
battable[0x0].batl = BATL(0x00000000, BAT_M, BAT_PP_RW); | |||||
battable[0x0].batu = BATU(0x00000000, BAT_BL_256M, BAT_Vs); | |||||
__asm (".balign 32; \n" | |||||
"mtibatu 0,%0; mtibatl 0,%1; isync; \n" | |||||
"mtdbatu 0,%0; mtdbatl 0,%1; isync" | |||||
:: "r"(battable[0].batu), "r"(battable[0].batl)); | |||||
} | } | ||||
#else | #else | ||||
trapsize = (size_t)&hypertrapcodeend - (size_t)&hypertrapcode; | trapsize = (size_t)&hypertrapcodeend - (size_t)&hypertrapcode; | ||||
bcopy(&hypertrapcode, (void *)(EXC_HEA + trap_offset), trapsize); | bcopy(&hypertrapcode, (void *)(EXC_HEA + trap_offset), trapsize); | ||||
bcopy(&hypertrapcode, (void *)(EXC_HMI + trap_offset), trapsize); | bcopy(&hypertrapcode, (void *)(EXC_HMI + trap_offset), trapsize); | ||||
bcopy(&hypertrapcode, (void *)(EXC_HVI + trap_offset), trapsize); | bcopy(&hypertrapcode, (void *)(EXC_HVI + trap_offset), trapsize); | ||||
bcopy(&hypertrapcode, (void *)(EXC_SOFT_PATCH + trap_offset), trapsize); | bcopy(&hypertrapcode, (void *)(EXC_SOFT_PATCH + trap_offset), trapsize); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 363 Lines • Show Last 20 Lines |