Rev 212 | Rev 239 | 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 | |
18 | volatile __u64 hlp,hlp2; |
||
212 | vana | 19 | |
20 | |||
238 | vana | 21 | int psr = 0x2000; |
22 | |||
23 | __asm__ volatile ( |
||
212 | vana | 24 | "mov r15 = %0;;" |
25 | "mov cr2 = r15;;" |
||
238 | vana | 26 | "mov psr.l = %1;;" |
212 | vana | 27 | : |
238 | vana | 28 | : "r" (p), "r" (psr) |
212 | vana | 29 | : "r15" |
30 | ); |
||
31 | |||
238 | vana | 32 | |
33 | |||
34 | /*Switch register bank of regs r16 .. r31 to 1 It is automaticly cleared on exception*/ |
||
35 | __asm__ volatile ("bsw.1;;"); |
||
36 | |||
37 | |||
212 | vana | 38 | } |
39 | |||
40 | |||
41 | void gugux_pokus(void); |
||
42 | void gugux_pokus(void) |
||
43 | { |
||
44 | panic("\n\nGUGUX Exception\n\n"); |
||
45 | } |
||
46 | |||
47 | |||
48 |