|
|
|
@ -46,7 +46,7 @@ sim_t::sim_t(const cfg_t *cfg, bool halted, |
|
|
|
bool socket_enabled, |
|
|
|
FILE *cmd_file) // needed for command line option --cmd
|
|
|
|
: htif_t(args), |
|
|
|
isa(cfg->isa(), cfg->priv()), |
|
|
|
isa(cfg->isa, cfg->priv), |
|
|
|
cfg(cfg), |
|
|
|
mems(mems), |
|
|
|
procs(std::max(cfg->nprocs(), size_t(1))), |
|
|
|
@ -99,9 +99,9 @@ sim_t::sim_t(const cfg_t *cfg, bool halted, |
|
|
|
debug_mmu = new mmu_t(this, cfg->endianness, NULL); |
|
|
|
|
|
|
|
for (size_t i = 0; i < cfg->nprocs(); i++) { |
|
|
|
procs[i] = new processor_t(&isa, cfg, this, cfg->hartids()[i], halted, |
|
|
|
procs[i] = new processor_t(&isa, cfg, this, cfg->hartids[i], halted, |
|
|
|
log_file.get(), sout_); |
|
|
|
harts[cfg->hartids()[i]] = procs[i]; |
|
|
|
harts[cfg->hartids[i]] = procs[i]; |
|
|
|
} |
|
|
|
|
|
|
|
// When running without using a dtb, skip the fdt-based configuration steps
|
|
|
|
@ -134,13 +134,13 @@ sim_t::sim_t(const cfg_t *cfg, bool halted, |
|
|
|
strstream << fin.rdbuf(); |
|
|
|
dtb = strstream.str(); |
|
|
|
} else { |
|
|
|
std::pair<reg_t, reg_t> initrd_bounds = cfg->initrd_bounds(); |
|
|
|
std::pair<reg_t, reg_t> initrd_bounds = cfg->initrd_bounds; |
|
|
|
std::string device_nodes; |
|
|
|
for (const device_factory_t *factory : device_factories) |
|
|
|
device_nodes.append(factory->generate_dts(this)); |
|
|
|
dts = make_dts(INSNS_PER_RTC_TICK, CPU_HZ, |
|
|
|
initrd_bounds.first, initrd_bounds.second, |
|
|
|
cfg->bootargs(), cfg->pmpregions, cfg->pmpgranularity, |
|
|
|
cfg->bootargs, cfg->pmpregions, cfg->pmpgranularity, |
|
|
|
procs, mems, device_nodes); |
|
|
|
dtb = dts_compile(dts); |
|
|
|
} |
|
|
|
|