mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
run: make gem5-shell work even when not on cwd
This commit is contained in:
62
README.adoc
62
README.adoc
@@ -10090,68 +10090,6 @@ Build the kernel with the <<gem5-arm-linux-kernel-patches>>, 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
|
===== gem5 cache size
|
||||||
|
|
||||||
https://stackoverflow.com/questions/49624061/how-to-run-gem5-simulator-in-fs-mode-without-cache/49634544#49634544
|
https://stackoverflow.com/questions/49624061/how-to-run-gem5-simulator-in-fs-mode-without-cache/49634544#49634544
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
|||||||
set +e
|
set +e
|
||||||
# Setup for quick failures:
|
# Setup for quick failures:
|
||||||
# https://stackoverflow.com/questions/4713088/how-to-use-git-bisect/22592593#22592593
|
# 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
|
if [ $? -ne 124 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
2
run
2
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'])
|
tmux_args = '--run-id {}'.format(self.env['run_id'])
|
||||||
if self.env['tmux_program'] == 'shell':
|
if self.env['tmux_program'] == 'shell':
|
||||||
if self.env['emulator'] == 'gem5':
|
if self.env['emulator'] == 'gem5':
|
||||||
tmux_cmd = './gem5-shell'
|
tmux_cmd = os.path.join(self.env['root_dir'], 'gem5-shell')
|
||||||
else:
|
else:
|
||||||
raise Exception('--tmux-program is only supported in gem5 currently.')
|
raise Exception('--tmux-program is only supported in gem5 currently.')
|
||||||
elif self.env['tmux_program'] == 'gdb':
|
elif self.env['tmux_program'] == 'gdb':
|
||||||
|
|||||||
Reference in New Issue
Block a user