aboutsummaryrefslogtreecommitdiff
path: root/riscv/cfg.h
AgeCommit message (Collapse)AuthorFilesLines
2022-10-14Support command-line configuration of number of pmpregionsJerry Zhao1-0/+3
2022-10-14Report error if an unsupported memory configuration is detectedParshintsev Anatoly1-6/+10
2022-04-12Move real_time_clint into cfg_tRupert Swarbrick1-2/+5
2022-04-12Move varch into cfg_tRupert Swarbrick1-0/+3
2022-04-12Remove nprocs from cfg_tRupert Swarbrick1-3/+3
Now we have hartids, we can remove nprocs so that we have a single source of truth.
2022-04-12Move hartids into cfg_tRupert Swarbrick1-2/+7
The only slightly difficult thing here is that hartids will always be considered "overridden" by the time we get to sim_t::sim_t (either overridden by a command line argument, or overridden when we set default hartids just before the constructor). To allow downstream code to distinguish between "I picked IDs 0, 1, 2, 3 because the user asked for 4 processors" and "The user explicitly asked for IDs 0, 1, 2, 3", we have an extra explicit_hartids field.
2022-04-12Move start_pc into cfg_tRupert Swarbrick1-0/+2
2022-04-11Split mem layout computation in spike.cc (#957)Rupert Swarbrick1-2/+29
The motivation here is mostly to enable a refactoring where the memory layout (sans allocated memory) gets passed to DTS/DTB code before we ever allocate anything. But it turns out to make merge_overlapping_memory_regions a bit simpler, which is an added bonus.
2022-03-18Fold priv parameter into cfg_tRupert Swarbrick1-2/+4
2022-03-18Fold isa parameter into cfg_tRupert Swarbrick1-2/+5
2022-03-18Fold nprocs parameter into cfg_tRupert Swarbrick1-2/+4
2022-03-18Fold bootargs parameter in the new cfg_t typeRupert Swarbrick1-2/+5
2022-03-18Initial step towards factoring out command line configurationRupert Swarbrick1-0/+38
This commit defines a "cfg_t" structure, which currently just holds the initrd address range. It will be augmented in future commits to hold other configuration arguments as well. To represent a configuration argument, we define an arg_t base class. This holds a current value, together with a flag that tells us whether the value has been updated from the default. The idea is that in future we're going to use that flag when reading a DTB file: if an argument has actually been specified on the command line, we need to take it into account; if not, we can ignore the default and use the DTB file's supplied value.