From 1bd44c71a13f3d8d25de112fb5346589c03e332d Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 2 Jun 2023 12:10:38 -0700 Subject: sim_t: Merge sim_t::plugin_devices with sim_t::devices --- riscv/sim.cc | 5 +++-- riscv/sim.h | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/riscv/sim.cc b/riscv/sim.cc index 43c91f6..877d5c2 100644 --- a/riscv/sim.cc +++ b/riscv/sim.cc @@ -45,7 +45,6 @@ sim_t::sim_t(const cfg_t *cfg, bool halted, isa(cfg->isa(), cfg->priv()), cfg(cfg), mems(mems), - plugin_devices(plugin_devices), procs(std::max(cfg->nprocs(), size_t(1))), dtb_enabled(dtb_enabled), log_file(log_path), @@ -66,8 +65,10 @@ sim_t::sim_t(const cfg_t *cfg, bool halted, for (auto& x : mems) bus.add_device(x.first, x.second); - for (auto& x : plugin_devices) + for (auto& x : plugin_devices) { bus.add_device(x.first, x.second.get()); + devices.push_back(x.second); + } debug_module.add_device(&bus); diff --git a/riscv/sim.h b/riscv/sim.h index ba95666..6e69078 100644 --- a/riscv/sim.h +++ b/riscv/sim.h @@ -63,7 +63,6 @@ private: isa_parser_t isa; const cfg_t * const cfg; std::vector> mems; - std::vector>> plugin_devices; std::vector procs; std::map harts; std::pair initrd_range; -- cgit v1.1