summaryrefslogtreecommitdiff
path: root/src/sim/process.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/process.cc')
-rw-r--r--src/sim/process.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/sim/process.cc b/src/sim/process.cc
index 21b365296..0ba215511 100644
--- a/src/sim/process.cc
+++ b/src/sim/process.cc
@@ -82,6 +82,8 @@
#include "arch/x86/linux/process.hh"
#elif THE_ISA == POWER_ISA
#include "arch/power/linux/process.hh"
+#elif THE_ISA == RISCV_ISA
+#include "arch/riscv/linux/process.hh"
#else
#error "THE_ISA not set"
#endif
@@ -704,6 +706,19 @@ LiveProcess::create(LiveProcessParams * params)
default:
fatal("Unknown/unsupported operating system.");
}
+#elif THE_ISA == RISCV_ISA
+ if (objFile->getArch() != ObjectFile::Riscv)
+ fatal("Object file architecture does not match compiled ISA (RISCV).");
+ switch (objFile->getOpSys()) {
+ case ObjectFile::UnknownOpSys:
+ warn("Unknown operating system; assuming Linux.");
+ // fall through
+ case ObjectFile::Linux:
+ process = new RiscvLinuxProcess(params, objFile);
+ break;
+ default:
+ fatal("Unknown/unsupported operating system.");
+ }
#else
#error "THE_ISA not set"
#endif