diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-06-22 08:38:44 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-07-09 23:04:23 +0530 |
commit | 2cb19ac699b51d38fba57f4acb1ce02f06e7548f (patch) | |
tree | 5fef42799cb4cc024905ca5d0d08f79bfb3b4117 /riscv/sim.cc | |
parent | 564ed97f618321b8499a3e8837c36f622ee8a893 (diff) | |
download | riscv-isa-sim-2cb19ac699b51d38fba57f4acb1ce02f06e7548f.zip riscv-isa-sim-2cb19ac699b51d38fba57f4acb1ce02f06e7548f.tar.gz riscv-isa-sim-2cb19ac699b51d38fba57f4acb1ce02f06e7548f.tar.bz2 |
Add bootargs command-line option to Spike
We add bootargs command-line option to Spike which allows us to
provide custom kernel parameters to Linux and Xvisor.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'riscv/sim.cc')
-rw-r--r-- | riscv/sim.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/riscv/sim.cc b/riscv/sim.cc index b25d79e..2aced1b 100644 --- a/riscv/sim.cc +++ b/riscv/sim.cc @@ -28,7 +28,7 @@ static void handle_signal(int sig) sim_t::sim_t(const char* isa, const char* priv, const char* varch, size_t nprocs, bool halted, bool real_time_clint, - reg_t initrd_start, reg_t initrd_end, + reg_t initrd_start, reg_t initrd_end, const char* bootargs, reg_t start_pc, std::vector<std::pair<reg_t, mem_t*>> mems, std::vector<std::pair<reg_t, abstract_device_t*>> plugin_devices, const std::vector<std::string>& args, @@ -42,6 +42,7 @@ sim_t::sim_t(const char* isa, const char* priv, const char* varch, procs(std::max(nprocs, size_t(1))), initrd_start(initrd_start), initrd_end(initrd_end), + bootargs(bootargs), start_pc(start_pc), dtb_file(dtb_file ? dtb_file : ""), dtb_enabled(dtb_enabled), @@ -230,7 +231,7 @@ void sim_t::make_dtb() dtb = strstream.str(); } else { - dts = make_dts(INSNS_PER_RTC_TICK, CPU_HZ, initrd_start, initrd_end, procs, mems); + dts = make_dts(INSNS_PER_RTC_TICK, CPU_HZ, initrd_start, initrd_end, bootargs, procs, mems); dtb = dts_compile(dts); } } @@ -271,7 +272,7 @@ void sim_t::set_rom() dtb = strstream.str(); } else { - dts = make_dts(INSNS_PER_RTC_TICK, CPU_HZ, initrd_start, initrd_end, procs, mems); + dts = make_dts(INSNS_PER_RTC_TICK, CPU_HZ, initrd_start, initrd_end, bootargs, procs, mems); dtb = dts_compile(dts); } |