Rev 632 | Rev 663 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 632 | Rev 634 | ||
---|---|---|---|
Line 37... | Line 37... | ||
37 | 37 | ||
38 | /** Initialize trap table. */ |
38 | /** Initialize trap table. */ |
39 | void trap_init(void) |
39 | void trap_init(void) |
40 | { |
40 | { |
41 | /* |
41 | /* |
- | 42 | * Save kernel provided trap handlers. |
|
- | 43 | */ |
|
- | 44 | memcpy((void *) trap_table_save, (void *) trap_table, TRAP_TABLE_SIZE); |
|
- | 45 | ||
- | 46 | /* |
|
42 | * Copy OFW's trap table into kernel. |
47 | * Copy OFW's trap table into kernel. |
43 | */ |
48 | */ |
44 | memcpy((void *) trap_table, (void *) tba_read(), TRAP_TABLE_SIZE); |
49 | memcpy((void *) trap_table, (void *) tba_read(), TRAP_TABLE_SIZE); |
45 | 50 | ||
46 | /* |
51 | /* |
Line 71... | Line 76... | ||
71 | tt += TRAP_TABLE_ENTRY_COUNT/2; |
76 | tt += TRAP_TABLE_ENTRY_COUNT/2; |
72 | 77 | ||
73 | cnt = len/TRAP_TABLE_ENTRY_SIZE; |
78 | cnt = len/TRAP_TABLE_ENTRY_SIZE; |
74 | 79 | ||
75 | for (i = tt; i < tt + cnt; i++) { |
80 | for (i = tt; i < tt + cnt; i++) { |
76 | trap_table[i] = trap_table_kernel[i]; |
81 | trap_table[i] = trap_table_save[i]; |
77 | } |
82 | } |
78 | } |
83 | } |