From 8ffefbc9a1f7730d14a2f694906bcc681cbca2e5 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 12 Nov 2019 16:57:10 -0800 Subject: Add --priv option to control which privilege modes are available --- riscv/sim.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'riscv/sim.cc') diff --git a/riscv/sim.cc b/riscv/sim.cc index eca7057..7d6f3c1 100644 --- a/riscv/sim.cc +++ b/riscv/sim.cc @@ -25,7 +25,8 @@ static void handle_signal(int sig) signal(sig, &handle_signal); } -sim_t::sim_t(const char* isa, const char* varch, size_t nprocs, bool halted, +sim_t::sim_t(const char* isa, const char* priv, const char* varch, + size_t nprocs, bool halted, reg_t start_pc, std::vector> mems, std::vector> plugin_devices, const std::vector& args, @@ -51,7 +52,7 @@ sim_t::sim_t(const char* isa, const char* varch, size_t nprocs, bool halted, if (hartids.size() == 0) { for (size_t i = 0; i < procs.size(); i++) { - procs[i] = new processor_t(isa, varch, this, i, halted); + procs[i] = new processor_t(isa, priv, varch, this, i, halted); } } else { @@ -60,7 +61,7 @@ sim_t::sim_t(const char* isa, const char* varch, size_t nprocs, bool halted, exit(1); } for (size_t i = 0; i < procs.size(); i++) { - procs[i] = new processor_t(isa, varch, this, hartids[i], halted); + procs[i] = new processor_t(isa, priv, varch, this, hartids[i], halted); } } -- cgit v1.1