Rev 239 | Rev 272 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
212 | vana | 1 | #include <cpu.h> |
2 | #include <print.h> |
||
3 | #include <panic.h> |
||
238 | vana | 4 | #include <arch/types.h> |
212 | vana | 5 | |
6 | extern int IVT; |
||
7 | |||
8 | |||
9 | |||
10 | |||
11 | void cpu_arch_init(void) |
||
12 | { |
||
13 | |||
14 | |||
15 | |||
16 | int *p=&IVT; |
||
238 | vana | 17 | volatile __u64 hlp,hlp2; |
212 | vana | 18 | |
19 | |||
238 | vana | 20 | int psr = 0x2000; |
249 | vana | 21 | |
238 | vana | 22 | |
23 | __asm__ volatile ( |
||
249 | vana | 24 | "mov cr2 = %0;;\n" |
25 | "mov psr.l = %1;;\n" |
||
26 | "srlz.i;" |
||
27 | "srlz.d;;" |
||
212 | vana | 28 | : |
238 | vana | 29 | : "r" (p), "r" (psr) |
212 | vana | 30 | ); |
31 | |||
238 | vana | 32 | |
33 | |||
34 | /*Switch register bank of regs r16 .. r31 to 1 It is automaticly cleared on exception*/ |
||
249 | vana | 35 | __asm__ volatile |
36 | ( |
||
37 | "bsw.1;;\n" |
||
38 | ); |
||
238 | vana | 39 | |
40 | |||
212 | vana | 41 | } |
42 | |||
43 |