summaryrefslogtreecommitdiff
path: root/riscv/platform_main.ml
diff options
context:
space:
mode:
authorPrashanth Mundkur2018-06-22 17:14:35 -0700
committerPrashanth Mundkur2018-06-22 17:46:59 -0700
commit74e459da59e8411de84bded89d010e62fd735d29 (patch)
tree22a40cd953b990973efb6795434602df2571f9b4 /riscv/platform_main.ml
parent66ae0071f94a1ee33b021a5a0d34acbd510a8827 (diff)
Make riscv pte dirty-bit update handling configurable via a platform cli option.
Fix a redundant clock tick.
Diffstat (limited to 'riscv/platform_main.ml')
-rw-r--r--riscv/platform_main.ml10
1 files changed, 7 insertions, 3 deletions
diff --git a/riscv/platform_main.ml b/riscv/platform_main.ml
index e0032bf8..a087e90c 100644
--- a/riscv/platform_main.ml
+++ b/riscv/platform_main.ml
@@ -51,7 +51,8 @@
open Elf_loader
open Sail_lib
open Riscv
-module P = Platform_impl
+module PI = Platform_impl
+module P = Platform
(* OCaml driver for generated RISC-V model. *)
@@ -66,6 +67,9 @@ let options = Arg.align ([("-dump-dts",
("-dump-dtb",
Arg.Set opt_dump_dtb,
" dump the *binary* platform device-tree blob to stdout");
+ ("-enable-dirty-update",
+ Arg.Set P.config_enable_dirty_update,
+ " enable dirty-bit update during page-table walks")
])
let usage_msg = "RISC-V platform options:"
@@ -73,8 +77,8 @@ let usage_msg = "RISC-V platform options:"
let elf_arg =
Arg.parse options (fun s -> opt_file_arguments := !opt_file_arguments @ [s])
usage_msg;
- if !opt_dump_dts then (P.dump_dts (); exit 0);
- if !opt_dump_dtb then (P.dump_dtb (); exit 0);
+ if !opt_dump_dts then (PI.dump_dts (); exit 0);
+ if !opt_dump_dtb then (PI.dump_dtb (); exit 0);
( match !opt_file_arguments with
| f :: _ -> prerr_endline ("Sail/RISC-V: running ELF file " ^ f); f
| _ -> (prerr_endline "Please provide an ELF file."; exit 0)