Rev 619 | Rev 630 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 619 | Rev 627 | ||
---|---|---|---|
Line 29... | Line 29... | ||
29 | #include <arch/trap.h> |
29 | #include <arch/trap.h> |
30 | #include <arch/trap_table.h> |
30 | #include <arch/trap_table.h> |
31 | #include <arch/asm.h> |
31 | #include <arch/asm.h> |
32 | #include <memstr.h> |
32 | #include <memstr.h> |
33 | 33 | ||
- | 34 | /** Initialize trap table. */ |
|
34 | void trap_init(void) |
35 | void trap_init(void) |
35 | { |
36 | { |
36 | /* |
37 | /* |
37 | * Copy OFW's trap table into kernel. |
38 | * Copy OFW's trap table into kernel. |
38 | */ |
39 | */ |
39 | memcpy((void *) trap_table, (void *) tba_read(), TRAP_TABLE_SIZE); |
40 | memcpy((void *) trap_table, (void *) tba_read(), TRAP_TABLE_SIZE); |
40 | - | ||
41 | /* Point TBA to kernel copy of OFW's trap table. */ |
- | |
42 | tba_write((__u64) trap_table); |
- | |
43 | } |
41 | } |