FeatMgr Command Line Interface
FeatMgr can be configured from the command line through the FeatMgrBuilder class using the CliAdapter class.
- -h, –help
show this help message and exit
- –conf
Path to conf.py file for additional config and hooks.
- –tohost_nonzero_terminate, -tnt
Spike option to be forwarded. Ends simulation immediately when tohost becomes nonzero.
- –counter_event_path
path to counter event file, used to randomize events in counter files
- –max_logger_file_gb
Max size of testlog file in GB
- –test_priv_mode
Specify privilege mode for the test to be forced. e.g. –test_priv_mode user. Legal values are: user, super, machine
- –test_paging_mode
Specify paging mode for the test to be forced. e.g. –test_paging_mode sv57
- –test_paging_g_mode
Specify g-stage paging mode for the test to be forced. e.g. –test_paging_g_mode sv57
- –test_env
Specify environment for the test to be forced. e.g. –test_env bare_metal
- –test_env_any
Allow test environment to be randomly selected between bare_metal and virtualized if any is specified
- –test_secure_mode
Specify secure mode for the test to be forced. e.g. –test_secure_mode random If random or any is selected then the probability of secure mode is 20%%
- –supported_priv_modes
Specify privilege modes supported by the platform. e.g. –supported_priv_modes MSU. Default to MSU if not specified
- –tohost
Hardcoded address for tohost and HTIF IO section; Leaving blank uses value in memap, if none in memmap puts as variables at end of os_code
- –eot_pass_value
Sets the end of test pass value; defaults to 1
- –eot_fail_value
Sets the end of test fail value; defaults to 1
- –eot_print_htif_console
Emit RVCP FAIL lines via HTIF tohost putchar (64-bit sd per byte, device 1 cmd 1; Whisper-compatible) for each ;#test_failed() in Riescue-D generated tests. FAIL line is wrapped with ============ lines. Does not emit PASSED lines; use –print_rvcp_passes for those.
- –print_rvcp_passes
Emit RVCP PASSED lines via HTIF tohost putchar for ;#test_passed() and final ALL PASSED summary line. Off by default; independent of –eot_print_htif_console.
- –mp
Overrides MP enablement in cpuconfig file or overridden in test file. Legal values are: ‘on’, ‘off’
- –mp_mode
Overrides MP mode provided in cpuconfig file or overridden in test file. Legal values are: ‘simultaneous’, ‘parallel’
- –parallel_scheduling_mode
Overrides parallel scheduling mode provided in cpuconfig file or overridden in test file. Legal values are: ‘round_robin’, ‘exhaustive’
- –num_cpus
Overrides number of CPUs provided in cpuconfig file or overridden in test file. Legal values are positive integers
- –single_assembly_file, -saf
Indicates that all assembly is written to a single file. Ignoring this option means writing to a handful of .inc files
- –force_alignment
Forces all data and code to be byte-aligned; Removes –misaligned from spike run_iss’s args
- –c_used
Use C sections when generating code
- –small_bss
Sets bss section to 1200 4kb page instead of default
- –big_bss
Sets bss section to 3080 4kb pages instead of default
- –big_endian, -big_e
Mode for enabling big-endian for cross-compilers and ISS
- –more_os_pages
Ask riescued to generate more code and os_stack pages for long tests
- –add_gcc_cstdlib_sections
Add a gcc cstdlib section to the test for each library function as GCC likes to do.
- –addrgen_limit_indices
Limit addrgen to not generate more than 4 addresses with the same index
- –code_offset
Specify code offset where the test code should start. Must be 16-byte aligned. Default: Randomized 0-140h
- –randomize_code_location
Randomize the code location in the test. Default: follows .runtime section
- –identity_map_code
Identity map all contiguously allocated code sections. Forces VA == PA for these sections.
- –repeat_times, -rt
Number of times each discrete test should be run
- –selfcheck
Enable selfchecking at the end of each discrete test by compiling in golden data from a run of the test in Whisper
- –compiler-include-dir
Directory to add to compiler include search path. Passed through to the compiler with -I.
- –log_test_execution
Enable runtime logging of test execution
- –private_maps
Setup isolated page map address spaces
- –cfile
Use runtime c-files that must be specified with this arg. Can be specified multiple times
- –inc_path
Add this include path for c compiler. Can be specified multiple times
- –enable_machine_paging
Enable Machine privilege + paging mode for the test. Guest paging mode disabled
- –fe_tb, -fe_tb
Special considerations for FE testbench. They really can’t know taken vs not-taken branches. So, jump to passed|failed is same for them. So, making passed=failed label
- –wysiwyg
‘What You See Is What You Get mode; no OS code is added, only the test code is executed as it is. Intended for environments not monitoring tohost writes
- –linux_mode
Generate riescued OS code and prepare test to run it in the Linux environment. Runs endlessly
- –bringup_pagetables
Implies –wysiwyg and –addrgen_limit_indices, but enables switch to super and paging in the loader code
- –reserve_partial_phys_memory
By default, Riescue-D will only reserve full physical address size specified by ;page_mapping(pagesize) or ;random_addr(size). If you want Riescued to only reserve 4kb size for all the addresses, use this option
- –all_4kb_pages
Ask riescued to generate all 4KB pages
- –disallow_mmio
Disallow MMIO in the test
- –addrgen_limit_way_predictor_multihit, -ag_limit_wp_multihit
Limit addrgen to not generate address with multi-hit in the way predictor
- –deleg_excp_to, -deleg_excp_to
Specify privilege where all traps are handled. Can not be specified with any of –medeleg –mideleg –hedeleg –hideleg. “machine” specifies all traps should be handled in machine mode. “super” delegates all exceptions except ecalls to (hypervisor) supervisor mode.
- –switch_to_machine_page, -switch_to_machine_page
Specify the page where the handler will return control after using ecall function 0xf0010001
- –switch_to_super_page, -switch_to_super_page
Specify the page where the handler will return control after using ecall function 0xf0010002
- –switch_to_user_page, -switch_to_user_page
Specify the page where the handler will return control after using ecall function 0xf0010003
- –excp_hooks, -excp_hooks
Insert exception handler hooks. RiescueD will call excp_handler_pre: and excp_handler_post: functions right before entering the exception hndler and after before returning from exception handler respectively
- –interrupts_enabled, -ie
(deprecated) Interrupts are enabled by default. Disable with –interrupts_disabled
- –interrupts_disabled
Disable interrupts. By default interrupts are enabled in the handler.
- –skip_instruction_for_unexpected
Ambigious name - this should be something like ‘ignore unexpected exceptions’.
- –setup_pmp
Ask riescued to setup PMP registers
- –needs_pma
Indicates if the test wants to enable PMA functionality of Riescue-D
- –num_pmas
Number of PMACFG registers implemented. Default is 16. Changing this number requires an update in the whisper_config.json
- –csr_init
Initialize a CSR with a value. Format: ‘csr_name=value’ or ‘csr_number=value’. Can be specified multiple times. Example: –csr_init mstatus=0x8000 –csr_init 0x300=0x1
- –csr_init_mask
Initialize a CSR using read-modify-write with a mask. Format: ‘csr_name=mask=value’ or ‘csr_number=mask=value’. Can be specified multiple times. Example: –csr_init_mask mstatus=0x8000=0x8000
- –no_random_csr_reads, -no_random_csr_reads
Disable random CSR read randomization that happens in the OS scheduler code
- –max_random_csr_reads, -max_random_csr_read
Maximum number of CSRs read to inject for the randomization. Default: 16. Minimum: 3.
- –random_machine_csr_list, -random_machine_csr_list
List csr name that the CSR read randomization logic must include when OS is in machine mode. Specify list this: –random_machine_csr_list mstatus,mcause FIXME: use choices
- –random_supervisor_csr_list, -random_supervisor_csr_list
List csr name that the CSR read randomization logic must include when OS is in supervisor/machine mode. Specify list this: –random_supervisor_csr_list sstatus,scause
- –random_user_csr_list, -random_user_csr_list
List csr name that the CSR read randomization logic must include when OS is in user/supervisor/machine mode. Specify list this: –random_supervisor_csr_list fcsr,time
- –medeleg
Override medeleg when –test_env supervisor/user
- –mideleg
Override mideleg when –test_env supervisor/user
- –hedeleg
Override hedeleg when ‘–test_env supervisor/user’ and ‘–test_env virtualized’ in VS mode OS
- –hideleg
Override hideleg when ‘–test_env supervisor/user’ and ‘–test_env virtualized’ in VS mode OS
- –menvcfg
Override menvcfg value to write in loader
- –henvcfg
Override henvcfg value to write in loader
- –senvcfg
Override senvcfg value to write in loader. Default 0x0.
- –mstateen
Override mstateen0 value to write in loader. Default is -1 (all bits set).
- –hstateen
Override hstateen0 value to write in loader. Default is -1 (all bits set).
- –sstateen
Override sstateen0 value to write in loader. Default is -1 (all bits set).
- –secure_access_probability, -sap
Probability of secure access in the test. Default is 30%%
- –secure_pt_probability
Probability of secure pagetable in the test
- –a_d_bit_randomization
Probability of randomizing A and D bits in page table entries (0-100)
- –pbmt_ncio_randomization
Probability of randomizing PBMT NC vs IO bits in page table entries (0-100)
- –fs_randomization
Probability of randomizing mstatus/sstatus/vsstatus FS field (0-100). Only when F/D extension is supported.
- –fs_randomization_values
Comma-separated list of FS values to randomize (0-3). 0=Off, 1=Initial, 2=Clean, 3=Dirty. Default: 2. E.g. 1,2 for Initial and Clean.
- –vs_randomization
Probability of randomizing mstatus/sstatus/vsstatus VS field (0-100). Only when V extension is supported.
- –vs_randomization_values
Comma-separated list of VS values to randomize (0-3). 0=Off, 1=Initial, 2=Clean, 3=Dirty. Default: 2.