aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2016-02-09 00:16:44 -0800
committerAndrew Waterman <waterman@cs.berkeley.edu>2016-02-19 13:01:11 -0800
commitef524be3940e58d2dc566840132cbbde6b981436 (patch)
tree9ae36c4937cc99ecfb6bf2b9b37e0e1638538a18
parentd00cb5a5414198379575bc1fc5d5afb79d19ed00 (diff)
downloadpk-ef524be3940e58d2dc566840132cbbde6b981436.zip
pk-ef524be3940e58d2dc566840132cbbde6b981436.tar.gz
pk-ef524be3940e58d2dc566840132cbbde6b981436.tar.bz2
S-mode shouldn't ever see misaligned load traps
-rw-r--r--pk/handlers.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/pk/handlers.c b/pk/handlers.c
index 34e39fe..bc82b5d 100644
--- a/pk/handlers.c
+++ b/pk/handlers.c
@@ -31,17 +31,10 @@ static void handle_misaligned_fetch(trapframe_t* tf)
panic("Misaligned instruction access!");
}
-void handle_misaligned_load(trapframe_t* tf)
-{
- // TODO emulate misaligned loads and stores
- dump_tf(tf);
- panic("Misaligned load!");
-}
-
void handle_misaligned_store(trapframe_t* tf)
{
dump_tf(tf);
- panic("Misaligned store!");
+ panic("Misaligned AMO!");
}
static void segfault(trapframe_t* tf, uintptr_t addr, const char* type)
@@ -94,7 +87,6 @@ void handle_trap(trapframe_t* tf)
[CAUSE_ILLEGAL_INSTRUCTION] = handle_illegal_instruction,
[CAUSE_USER_ECALL] = handle_syscall,
[CAUSE_BREAKPOINT] = handle_breakpoint,
- [CAUSE_MISALIGNED_LOAD] = handle_misaligned_load,
[CAUSE_MISALIGNED_STORE] = handle_misaligned_store,
[CAUSE_FAULT_LOAD] = handle_fault_load,
[CAUSE_FAULT_STORE] = handle_fault_store,