From 677b4646bbab063b071a4402cbc71254859d1468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Tue, 27 Aug 2019 00:00:02 +0000 Subject: [PATCH] get rid of machine2, that was too insane --- README.adoc | 4 ++++ common.py | 10 ---------- run | 18 +++++++++--------- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/README.adoc b/README.adoc index ced00aa..c9cdc78 100644 --- a/README.adoc +++ b/README.adoc @@ -16582,6 +16582,10 @@ Version 2.0 (GICv2) is only described in terms of the GICv3 optional support for The specific models have names of type GIC-600, GIC-500, etc. +In QEMU v4.0.0, the GICv3 can be selected with an extra `-machine gic_version=3` option. + +In gem5 3126e84db773f64e46b1d02a9a27892bf6612d30, the GIC is determined by selecting the platform as explained at: <>. + ==== ARM paging TODO create a minimal working aarch64 example analogous to the x86 one at: https://github.com/cirosantilli/x86-bare-metal-examples/blob/6dc9a73830fc05358d8d66128f740ef9906f7677/paging.S diff --git a/common.py b/common.py index dcb5bcd..01161d3 100644 --- a/common.py +++ b/common.py @@ -719,16 +719,6 @@ Incompatible archs are skipped. else: if not env['_args_given']['machine']: env['machine'] = 'virt' - if env['arch'] == 'arm': - # highmem=off needed since v3.0.0 due to: - # http://lists.nongnu.org/archive/html/qemu-discuss/2018-08/msg00034.html - env['machine2'] = 'highmem=off' - elif env['arch'] == 'aarch64': - # TODO allow the Gic version to be controlled from the CLI. - # env['machine2'] = 'gic_version=3' - env['machine2'] = None - else: - env['machine2'] = None # Buildroot env['buildroot_build_dir'] = join(env['buildroot_out_dir'], 'build', env['buildroot_build_id'], env['arch']) diff --git a/run b/run index b273f7a..94e24b8 100755 --- a/run +++ b/run @@ -636,19 +636,19 @@ Extra options to append at the end of the emulator command line. .format(virtfs_dir=virtfs_dir, virtfs_tag=virtfs_tag), LF, ]) - if self.env['machine2'] is not None: - # Multiple -machine options can also be given comma separated in one -machine. - # We use multiple because the machine is used as an identifier on baremetal tests - # build paths, so better keep them clean. - machine2 = ['-machine', self.env['machine2'], LF] - else: - machine2 = [] + machines = [self.env['machine']] + if self.env['arch'] == 'arm': + # Needed since v3.0.0 due to: + # http://lists.nongnu.org/archive/html/qemu-discuss/2018-08/msg00034.html + machines.append('highmem=off') + machines_cli = [] + for machine in machines: + machines_cli.extend(['-machine', machine, LF]) cmd.extend( [ self.env['qemu_executable'], LF, - '-machine', self.env['machine'], LF, ] + - machine2 + + machines_cli + [ '-device', 'rtl8139,netdev=net0', LF, '-gdb', 'tcp::{}'.format(self.env['gdb_port']), LF,