--- linux-2.6.11.2/arch/arm/mm/proc-xscale.S 2005-03-09 00:12:44.000000000 -0800 +++ linux-2.6.11.2/arch/arm/mm/proc-xscale.S 2005-06-18 15:39:22.701222319 -0700 @@ -137,23 +137,129 @@ * same state as it would be if it had been reset, and branch * to what would be the reset vector. * + * This code is ixp425 specific with respect to the reset of + * the 'configuration register' - to be found at address + * 0xC40000020 'IXP425_EXP_CNFGO' + * * loc: location to jump to for soft reset */ .align 5 ENTRY(cpu_xscale_reset) + @ always branch to 0 + mov r0, #0 + + @ disable both FIQ and IRQ, put us into 32 bit + @ SVC mode (no thumb). mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE msr cpsr_c, r1 @ reset CPSR - mrc p15, 0, r1, c1, c0, 0 @ ctrl register - bic r1, r1, #0x0086 @ ........B....CA. - bic r1, r1, #0x3900 @ ..VIZ..S........ - mcr p15, 0, r1, c1, c0, 0 @ ctrl register - mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches & BTB - bic r1, r1, #0x0001 @ ...............M - mcr p15, 0, r1, c1, c0, 0 @ ctrl register - @ CAUTION: MMU turned off from this point. We count on the pipeline - @ already containing those two last instructions to survive. + + @ disable debug, clock and power registers are + @ unimplemented. + mcr p14, 0, r0, c10, c0, 0 @ disable debug + + @ disable the performance monitor + mcr p14, 0, r0, c0, c1, 0 @ PMNC (ctrl reg) + mcr p14, 0, r0, c4, c1, 0 @ INTEN (intrpt enable) + + @ wait for p14 to complete + mrc p14, 0, ip, c4, c1, 0 @ arbitrary read + mov ip, ip @ sync + + @ clear the PID register + mcr p15, 0, r0, c13, c0, 0 @ OR nothing with address! + + @ unlock the TLBs and the I/D cache locks + mcr p15, 0, r0, c10, c8, 1 @ data TLB unlocked + mcr p15, 0, r0, c10, c4, 1 @ instruction TLB unlocked + mcr p15, 0, r0, c9, c2, 1 @ unlock data cache + mcr p15, 0, r0, c9, c1, 1 @ unlock instruction cache + + @ zap the minidata cache to write through with write coalescing + @ disabled. + mov r1, #0x21 @ MD=b10, K=1 + mcr p15, 0, r0, c7, c10, 4 @ drain write buffer + mrc p15, 0, ip, c1, c0, 0 @ read of ctrl register + mov ip, ip @ sync + mcr p15, 0, r1, c1, c0, 1 @ write through, no coalesc + + @ set the control register, the MMU is enabled but everything else + @ is disabled at this point, r1 contains the control register flags + @ the process is now in little-endian mode (no matter, we aren't + @ going to do any