2 * on return from this function we will be running in virtual mode.
3 * We set up the Block Address Translation (BAT) registers thus:
4 * 1) first 3 BATs are 256M blocks, starting from KZERO->0
5 * 2) remaining BAT maps last 256M directly
8 /* reset all the tlbs */
20 /* BATs 0 and 1 cover memory from 0x00000000 to 0x20000000 */
22 /* KZERO -> 0, IBAT2 and DBAT2, 256 MB */
23 MOVW $(KZERO|(0x7ff<<2)|2), R3
24 MOVW $(PTEVALID|PTEWRITE), R4 /* PTEVALID => Cache coherency on */
25 MOVW R3, SPR(DBATU(2))
26 MOVW R4, SPR(DBATL(2))
27 MOVW R3, SPR(IBATU(2))
28 MOVW R4, SPR(IBATL(2))
33 MOVW R3, SPR(SRR0) /* Stored PC for RFI instruction */
35 OR $(MSR_IR|MSR_DR|MSR_RI|MSR_FP), R4
37 RFI /* resume in kernel mode in caller */