diff options
author | Chih-Min Chao <chihmin.chao@sifive.com> | 2020-04-23 19:19:29 -0700 |
---|---|---|
committer | Chih-Min Chao <chihmin.chao@sifive.com> | 2020-04-27 21:16:43 -0700 |
commit | 3b26740205c401498fe77c2c9a16c8907a139cd8 (patch) | |
tree | 609d267768097a6b46c533ab4f5b5e01fac932c0 /spike_main | |
parent | 65f42ac88a871a5464a63a83cec6987f17aa599e (diff) | |
download | spike-3b26740205c401498fe77c2c9a16c8907a139cd8.zip spike-3b26740205c401498fe77c2c9a16c8907a139cd8.tar.gz spike-3b26740205c401498fe77c2c9a16c8907a139cd8.tar.bz2 |
fdt: restructure dtb create and config flow
1. pass dtb option from constructor
2. separate dtb generation from rom initialization
3. setup clint base from dtb
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Diffstat (limited to 'spike_main')
-rw-r--r-- | spike_main/spike.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/spike_main/spike.cc b/spike_main/spike.cc index d88f5b8..da3e22c 100644 --- a/spike_main/spike.cc +++ b/spike_main/spike.cc @@ -312,7 +312,7 @@ int main(int argc, char** argv) sim_t s(isa, priv, varch, nprocs, halted, real_time_clint, initrd_start, initrd_end, start_pc, mems, plugin_devices, htif_args, - std::move(hartids), dm_config, log_path); + std::move(hartids), dm_config, log_path, dtb_enabled, dtb_file); std::unique_ptr<remote_bitbang_t> remote_bitbang((remote_bitbang_t *) NULL); std::unique_ptr<jtag_dtm_t> jtag_dtm( new jtag_dtm_t(&s.debug_module, dmi_rti)); @@ -320,8 +320,6 @@ int main(int argc, char** argv) remote_bitbang.reset(new remote_bitbang_t(rbb_port, &(*jtag_dtm))); s.set_remote_bitbang(&(*remote_bitbang)); } - s.set_dtb_enabled(dtb_enabled); - s.set_dtb_file(dtb_file); if (dump_dts) { printf("%s", s.get_dts()); |