Ciro Santilli has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/15899 )

Change subject: configs: fs.py remove --generate-dtb and enable it by default
......................................................................

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 <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
---
M configs/common/FSConfig.py
M configs/common/Options.py
M configs/example/fs.py
3 files changed, 7 insertions(+), 20 deletions(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
  Jason Lowe-Power: Looks good to me, approved



diff --git a/configs/common/FSConfig.py b/configs/common/FSConfig.py
index e8cd008..04793e9 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 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 @@
     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 @@
         # 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 536da44..7963013 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -363,8 +363,6 @@
         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 3fdf151..4d21658 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 @@
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 @@
                                        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.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 "\

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/15899
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I9179f8c9fa18edbd1e0f1a65ea2c1de0a26b7921
Gerrit-Change-Number: 15899
Gerrit-PatchSet: 2
Gerrit-Owner: Ciro Santilli <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Ciro Santilli <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to