configs: Enabling SimObj CLI for baremetal platform

Change-Id: I0d4059976c8fb6a1d796998af302eaa764609f86
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27347
Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Giacomo Travaglini
2020-01-29 09:41:20 +00:00
parent 0d0979ba17
commit 303663d5c9

View File

@@ -225,12 +225,22 @@ def main():
"(default: gem5's stderr)")
parser.add_argument("args", default=[], nargs="*",
help="Semihosting arguments to pass to benchmark")
parser.add_argument("-P", "--param", action="append", default=[],
help="Set a SimObject parameter relative to the root node. "
"An extended Python multi range slicing syntax can be used "
"for arrays. For example: "
"'system.cpu[0,1,3:8:2].max_insts_all_threads = 42' "
"sets max_insts_all_threads for cpus 0, 1, 3, 5 and 7 "
"Direct parameters of the root object are not accessible, "
"only parameters of its children.")
args = parser.parse_args()
root = Root(full_system=True)
root.system = create(args)
root.apply_config(args.param)
if args.restore is not None:
m5.instantiate(args.restore)
else: