aboutsummaryrefslogtreecommitdiff
path: root/riscv/cfg.h
AgeCommit message (Collapse)AuthorFilesLines
2024-06-21Remove all --varch parsingJerry Zhao1-1/+0
2023-12-08Remove old explicit-fields cfg_t constructor, switch to default constructorJerry Zhao1-27/+0
2023-12-08Add cfg_t default constructor with default settingsJerry Zhao1-0/+1
2023-12-08Remove cfg_arg_t from cfg_tJerry Zhao1-18/+18
Argument parsing should be scoped to the code which constucts cfg_t
2023-11-04expose pmp granularity as a cli option.Karthik B K1-0/+3
PMP Granularity is made available as a command line option. The default value is 4 Bytes. The value can be changed by passing the option --pmp-granularity=<value> to spike. Signed-off-by: Karthik B K <karthik.bk@incoresemi.com>
2023-02-27Add cfg_t::max_hartid accessorAndrew Waterman1-0/+1
The implementation assumes (correctly) that hart IDs are sorted. Encapsulate that assumption here, rather than scattering it around the codebase.
2023-02-27Use size_t, rather than int, for hartidsAndrew Waterman1-2/+2
They aren't signed quantities.
2023-01-27Remove dirty_enabled from cfg_tAaron Durbin1-3/+0
The addition of Svadu support and removal of --mmu-dirty command line flag results in the dirty_enabled configuration state no longer being used. Remove the remnants of this state.
2023-01-18Add trigger_count field to cfg_tJerry Zhao1-2/+5
2023-01-09get_inclusive_end implementation for mem_cfg_tParshintsev Anatoly1-0/+4
The method can simplify proper processing of sitiations when (base + size) overflows 64-bit interger.
2023-01-09implement get_size() getter for mem_cfg_t objectParshintsev Anatoly1-0/+5
NFT. We also mark `base` and `size` fields as private.
2023-01-09implement get_base() getter for mem_cfg_t objectParshintsev Anatoly1-0/+4
NFC. The intention is for `base` and `size` fields of mem_cfg_t to be private members. This is the fist part of this commit.
2023-01-04Add cfg_t field to enable PTE dirtyingJerry Zhao1-0/+3
2023-01-03Add --[no-]misaligned command-line optionsAndrew Waterman1-0/+3
They don't do anything yet.
2022-12-15Fix build broken by #1170 and #1180Andrew Waterman1-0/+1
It looks like #1170 and #1180 conflict, so they individually pass CI but collectively don't. Trivially fix by #including <vector>.
2022-12-15Rename memif_endianness_t to endianness_tJerry Zhao1-5/+5
2022-12-15Pull memif_endianness_t into cfg.hJerry Zhao1-1/+5
2022-12-15Add cfg.cc to hold internal implementation of mem_cfg_tJerry Zhao1-16/+2
2022-10-25Remove set_target_endianness | add --big-endian flagJerry Zhao1-0/+3
Set target endianess in constructors
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.