diff options
| author | Prashanth Mundkur | 2018-10-08 09:35:11 -0700 |
|---|---|---|
| committer | Prashanth Mundkur | 2018-10-23 15:32:15 -0700 |
| commit | d43b475507ed9144b26be124376c3e656005a416 (patch) | |
| tree | 5d4bc4eba9b4993610ee9098abbd68c2cac01fe0 /riscv/platform.ml | |
| parent | e3490924e6bce23d3d4b236fdc61c7345a17e814 (diff) | |
RISC-V: Add a platform knob to control mtval contents on illegal instruction faults.
Diffstat (limited to 'riscv/platform.ml')
| -rw-r--r-- | riscv/platform.ml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/riscv/platform.ml b/riscv/platform.ml index 092df80f..06486ca2 100644 --- a/riscv/platform.ml +++ b/riscv/platform.ml @@ -56,6 +56,7 @@ module Elf = Elf_loader;; let config_enable_dirty_update = ref false let config_enable_misaligned_access = ref false +let config_mtval_has_illegal_inst_bits = ref false (* Mapping to Sail externs *) @@ -82,6 +83,7 @@ let make_rom start_pc = let enable_dirty_update () = !config_enable_dirty_update let enable_misaligned_access () = !config_enable_misaligned_access +let mtval_has_illegal_inst_bits () = !config_mtval_has_illegal_inst_bits let rom_base () = bits_of_int64 P.rom_base let rom_size () = bits_of_int !rom_size_ref |
