From f87cdfec1dd79afdabccc848e730d780589b8a65 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 9 Nov 2017 18:46:27 -0800 Subject: [PATCH] H-mode no longer exists It's supplanted by the hypervisor extension, which doesn't use the privilege encoding of 2; it still looks like supervisor (i.e. 1). --- riscv/processor.cc | 1 - riscv/processor.h | 1 - 2 files changed, 2 deletions(-) diff --git a/riscv/processor.cc b/riscv/processor.cc index ebae384..f177090 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -242,7 +242,6 @@ void processor_t::take_trap(trap_t& t, reg_t epc) if (t.cause() == CAUSE_BREAKPOINT && ( (state.prv == PRV_M && state.dcsr.ebreakm) || - (state.prv == PRV_H && state.dcsr.ebreakh) || (state.prv == PRV_S && state.dcsr.ebreaks) || (state.prv == PRV_U && state.dcsr.ebreaku))) { enter_debug_mode(DCSR_CAUSE_SWBP); diff --git a/riscv/processor.h b/riscv/processor.h index 16416a4..87cb6a4 100644 --- a/riscv/processor.h +++ b/riscv/processor.h @@ -222,7 +222,6 @@ public: (operation == OPERATION_STORE && !state.mcontrol[i].store) || (operation == OPERATION_LOAD && !state.mcontrol[i].load) || (state.prv == PRV_M && !state.mcontrol[i].m) || - (state.prv == PRV_H && !state.mcontrol[i].h) || (state.prv == PRV_S && !state.mcontrol[i].s) || (state.prv == PRV_U && !state.mcontrol[i].u)) { continue; -- 2.30.2