From 9048ef0ffbf21bedb803b785fb68f83e95c04db8 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Thu, 24 Jan 2019 14:13:39 +0000 Subject: [PATCH] configs: fs.py remove --generate-dtb and enable it by default The option is now enabled if neither --bare-metal nor --dtb-filename are given. This is what fs_bigLITTLE.py already did before this patch. Change-Id: I9179f8c9fa18edbd1e0f1a65ea2c1de0a26b7921 Reviewed-on: https://gem5-review.googlesource.com/c/15899 Reviewed-by: Andreas Sandberg Maintainer: Andreas Sandberg Maintainer: Jason Lowe-Power --- configs/common/FSConfig.py | 11 +++-------- configs/common/Options.py | 2 -- configs/example/fs.py | 14 ++++---------- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py index e8cd0083b..04793e98e 100644 --- a/configs/common/FSConfig.py +++ b/configs/common/FSConfig.py @@ -1,4 +1,4 @@ -# Copyright (c) 2010-2012, 2015-2018 ARM Limited +# Copyright (c) 2010-2012, 2015-2019 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -206,8 +206,7 @@ def makeSparcSystem(mem_mode, mdesc=None, cmdline=None): def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None, dtb_filename=None, bare_metal=False, cmdline=None, - external_memory="", ruby=False, security=False, - ignore_dtb=False): + external_memory="", ruby=False, security=False): assert machine_type pci_devices = [] @@ -238,10 +237,6 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None, machine_type = platform_class.__name__ self.realview = platform_class() - if not dtb_filename and not (bare_metal or ignore_dtb): - fatal("No DTB specified and no default DTB known for '%s'" % \ - machine_type) - if isinstance(self.realview, VExpress_EMM64): if os.path.split(mdesc.disk())[-1] == 'linux-aarch32-ael.img': print("Selected 64-bit ARM architecture, updating default " @@ -289,7 +284,7 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None, # EOT character on UART will end the simulation self.realview.uart[0].end_on_eot = True else: - if dtb_filename and not ignore_dtb: + if dtb_filename: self.dtb_filename = binary(dtb_filename) self.machine_type = machine_type if machine_type in ArmMachineType.map \ diff --git a/configs/common/Options.py b/configs/common/Options.py index 536da44f0..7963013df 100644 --- a/configs/common/Options.py +++ b/configs/common/Options.py @@ -363,8 +363,6 @@ def addFSOptions(parser): parser.add_option("--enable-context-switch-stats-dump", \ action="store_true", help="Enable stats dump at context "\ "switches and dump tasks file (required for Streamline)") - parser.add_option("--generate-dtb", action="store_true", default=False, - help="Automatically generate a dtb file") # Benchmark options parser.add_option("--dual", action="store_true", diff --git a/configs/example/fs.py b/configs/example/fs.py index 3fdf151c9..4d2165884 100644 --- a/configs/example/fs.py +++ b/configs/example/fs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2010-2013, 2016 ARM Limited +# Copyright (c) 2010-2013, 2016, 2019 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -95,7 +95,6 @@ def build_test_system(np): options.num_cpus, bm[0], options.dtb_filename, bare_metal=options.bare_metal, cmdline=cmdline, - ignore_dtb=options.generate_dtb, external_memory= options.external_memory_system, ruby=options.ruby, @@ -241,8 +240,7 @@ def build_drive_system(np): cmdline=cmdline) elif buildEnv['TARGET_ISA'] == 'arm': drive_sys = makeArmSystem(drive_mem_mode, options.machine_type, np, - bm[1], options.dtb_filename, cmdline=cmdline, - ignore_dtb=options.generate_dtb) + bm[1], options.dtb_filename, cmdline=cmdline) # Create a top-level voltage domain drive_sys.voltage_domain = VoltageDomain(voltage = options.sys_voltage) @@ -354,12 +352,8 @@ if options.timesync: if options.frame_capture: VncServer.frame_capture = True -if buildEnv['TARGET_ISA'] == "arm" and options.generate_dtb: - # Sanity checks - if options.dtb_filename: - fatal("--generate-dtb and --dtb-filename cannot be specified at the"\ - "same time.") - +if buildEnv['TARGET_ISA'] == "arm" and not options.bare_metal \ + and not options.dtb_filename: if options.machine_type not in ["VExpress_GEM5", "VExpress_GEM5_V1"]: warn("Can only correctly generate a dtb for VExpress_GEM5_V1 " \ "platforms, unless custom hardware models have been equipped "\ -- 2.30.2