3 * Entered here from Compaq's bootldr. First relocate to
4 * the location we're linked for and then copy back the
10 MOVW $setR12(SB), R12 /* load the SB */
11 MOVW $1, R0 /* dance to make 5l think that the magic */
12 MOVW $1, R1 /* numbers in WORDs below are being used */
13 CMP.S R0, R1 /* and to align them to where bootldr wants */
15 WORD $0x016f2818 /* magic number to say we are a kernel */
16 WORD $0xc0008000 /* entry point address */
17 WORD $0 /* size?, or end of data? */
21 /* SVC mode, interrupts disabled */
22 MOVW $(PsrDirq|PsrDfiq|PsrMsvc), R1
27 MCR CpMMU, 0, R1, C(CpControl), C(0x0)
30 MRC CpMMU, 0, R0, C(CpControl), C(0x0)
31 ORR $(CpCdcache|CpCicache|CpCwb), R0
32 MCR CpMMU, 0, R0, C(CpControl), C(0x0)
35 MCR CpMMU, 0, R0, C(CpCacheFlush), C(0x7), 0
42 /* drain write buffer */
43 MCR CpMMU, 0, R0, C(CpCacheFlush), C(0xa), 4
45 /* relocate to where we expect to be */
58 MOVW $(MACHADDR+BY2PG), R13 /* stack */
59 SUB $4, R13 /* link */
61 /* jump to where we've been relocated */
62 MOVW $_relocated(SB),R15
64 TEXT _relocated(SB),$-4
67 /* we shouldn't get here */
70 BL _div(SB) /* hack to get _div etc loaded */
76 TEXT draincache(SB),$-4
77 /* write back any dirty data */
85 /* drain write buffer and invalidate i&d cache contents */
86 MCR CpMMU, 0, R0, C(CpCacheFlush), C(0xa), 4
87 MCR CpMMU, 0, R0, C(CpCacheFlush), C(0x7), 0
96 MRC CpMMU, 0, R0, C(CpControl), C(0x0)
97 BIC $(CpCdcache|CpCicache|CpCwb), R0
98 MCR CpMMU, 0, R0, C(CpControl), C(0x0)