From: Giacomo Travaglini Date: Wed, 15 Apr 2020 16:27:02 +0000 (+0100) Subject: configs: Use workloads.py in baremetal.py X-Git-Tag: v20.0.0.0~166 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=701d16c1b397c1688a43af656619c5e81cdd7dbe;p=gem5.git configs: Use workloads.py in baremetal.py Change-Id: I806b771df448241a7a61f496ac22c29d5bc6b84c Signed-off-by: Giacomo Travaglini Reviewed-by: Nikos Nikoleris Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27971 Reviewed-by: Daniel Carvalho Tested-by: kokoro --- diff --git a/configs/example/arm/baremetal.py b/configs/example/arm/baremetal.py index 00a350a45..24f40ec2e 100644 --- a/configs/example/arm/baremetal.py +++ b/configs/example/arm/baremetal.py @@ -57,6 +57,7 @@ from common import ObjectList from common.cores.arm import HPI import devices +import workloads # Pre-defined CPU configurations. Each tuple must be ordered as : (cpu_class, # l1_icache_class, l1_dcache_class, walk_cache_class, l2_Cache_class). Any of @@ -100,9 +101,6 @@ def create(args): args.mem_size, platform=platform(), mem_mode=mem_mode, - workload=ArmFsWorkload( - atags_addr=0, - object_file=args.kernel), readfile=args.readfile) MemConfig.config_mem(args, system) @@ -162,6 +160,10 @@ def create(args): system.have_virtualization = True system.have_security = True + workload_class = workloads.workload_list.get(args.workload) + system.workload = workload_class( + args.kernel, system) + return system def run(args): @@ -190,6 +192,10 @@ def main(): parser.add_argument("--kernel", type=str, default=None, help="Binary to run") + parser.add_argument("--workload", type=str, + default="ArmBaremetal", + choices=workloads.workload_list.get_names(), + help="Workload type") parser.add_argument("--disk-image", type=str, default=None, help="Disk to instantiate")