From f9fc7aa372bf7bc09c332d93633b402de33deccb 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: Sun, 14 Jul 2019 00:00:01 +0000 Subject: [PATCH] run: make gem5-shell work even when not on cwd --- README.adoc | 62 ------------------------------------------ bisect-gem5-linux-boot | 2 +- run | 2 +- 3 files changed, 2 insertions(+), 64 deletions(-) diff --git a/README.adoc b/README.adoc index bc18844..8a7e770 100644 --- a/README.adoc +++ b/README.adoc @@ -10090,68 +10090,6 @@ Build the kernel with the <>, and then run: ; .... -====== gem5 X86 multicore TimingSimpleCPU hangs - -Original report: https://stackoverflow.com/questions/56642695/a-working-linux-kernel-gem5-config-for-fs-boot-up-in-x86-smp/56644363#56644363 - -At 08c79a194d1a3430801c04f37d13216cc9ec1da3: - -.... -./run --cpus 2 --emulator gem5 -- --cpu-type TimingSimpleCPU --caches --l2cache -.... - -Boot hangs, the last terminal message is: - -.... -pci 0000:00:04.0: legacy IDE quirk: reg 0x1c: [io 0x0376] -.... - -and a bit above we can see the suspicious message: - -.... -[Firmware Bug]: CPU1: APIC id mismatch. Firmware: 1 APIC: 0 -.... - -====== gem5 ARM multicore HPI boot fails - -Original report: https://www.mail-archive.com/gem5-users@gem5.org/msg16677.html - -At d334a0db538db1a82db62fd5f74a169ca9e21f23 + 1: - -.... -./run --arch aarch64 --emulator gem5 --cpu 2 -- --cpu-type=HPI --caches --l2cache --l1d_size=64kB --l1i_size=64kB --l2_size=256kB -.... - -The simulator fails with: - -.... -Exiting @ tick 18446744073709551615 because simulate() limit reached -.... - -and the last log message is: - -.... -<6>[ 0.103629] printk: console [ttyAMA0] enabled -.... - -With 1 core, boot works, and the next message would have been: - -.... -<3>[ 0.103586] OF: amba_device_add() failed (-2) for /kmi@1c070000 -.... - -With `TimingSimpleCPU`, boot went further, also failed with those options just after init finished, the last message is: - -.... -root@buildroot# -.... - -and once again we have: - -.... -Exiting @ tick 18446744073709551615 because simulate() limit reached -.... - ===== gem5 cache size https://stackoverflow.com/questions/49624061/how-to-run-gem5-simulator-in-fs-mode-without-cache/49634544#49634544 diff --git a/bisect-gem5-linux-boot b/bisect-gem5-linux-boot index a46e53f..edc6196 100755 --- a/bisect-gem5-linux-boot +++ b/bisect-gem5-linux-boot @@ -7,7 +7,7 @@ root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" set +e # Setup for quick failures: # https://stackoverflow.com/questions/4713088/how-to-use-git-bisect/22592593#22592593 -timeout 5 "${root_dir}/run" --emulator gem5 --gem5-build-id bisect --quit-after-boot "$@" +timeout 400 "${root_dir}/run" --emulator gem5 --gem5-build-id bisect --quit-after-boot "$@" if [ $? -ne 124 ]; then exit 1 fi diff --git a/run b/run index 8b33987..1938e11 100755 --- a/run +++ b/run @@ -723,7 +723,7 @@ Extra options to append at the end of the emulator command line. tmux_args = '--run-id {}'.format(self.env['run_id']) if self.env['tmux_program'] == 'shell': if self.env['emulator'] == 'gem5': - tmux_cmd = './gem5-shell' + tmux_cmd = os.path.join(self.env['root_dir'], 'gem5-shell') else: raise Exception('--tmux-program is only supported in gem5 currently.') elif self.env['tmux_program'] == 'gdb':