aboutsummaryrefslogtreecommitdiff
path: root/pk/riscv-pk.c
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>2010-10-05 15:08:18 -0700
committerAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>2010-10-05 15:08:18 -0700
commit3aaacd44769a04e4aff3a3c788183e6a7fa75081 (patch)
treeed6c783560f17ba6428c129db732b6713ad76dd3 /pk/riscv-pk.c
parent74727add67bb5eea0fb6970dee1b44c415d6bbb4 (diff)
downloadpk-3aaacd44769a04e4aff3a3c788183e6a7fa75081.zip
pk-3aaacd44769a04e4aff3a3c788183e6a7fa75081.tar.gz
pk-3aaacd44769a04e4aff3a3c788183e6a7fa75081.tar.bz2
[xcc,sim] eliminated vectored traps
now, the evec register holds the address that all traps vector to, and the cause register is set with the trap number.
Diffstat (limited to 'pk/riscv-pk.c')
-rw-r--r--pk/riscv-pk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pk/riscv-pk.c b/pk/riscv-pk.c
index efe4239..3e4c76f 100644
--- a/pk/riscv-pk.c
+++ b/pk/riscv-pk.c
@@ -5,9 +5,9 @@ void __attribute__((section(".boottext"))) __start()
extern char stack_top;
asm("move $sp,%0" : : "r"(&stack_top-64));
- extern char trap_table;
- register void* tt = &trap_table;
- mtpcr(tt,PCR_TBR);
+ extern char trap_entry;
+ register void* te = &trap_entry;
+ mtpcr(te,PCR_EVEC);
mtpcr(0,PCR_COUNT);
mtpcr(0,PCR_COMPARE);