Skip to content

fs.py --generate-dtb Linux kernel boot simulation fails for aarch64 with "Exiting @ tick because simulate() limit reached" #18

@cirosantilli2

Description

@cirosantilli2

https://www.mail-archive.com/[email protected]/msg15539.html

I had both aarch64 and arm working with --dtb-file using: https://github.com/cirosantilli/linux-kernel-module-cheat/tree/0678bd82ac61f0decce3480fef798bd5edbfd0c3#gem5

But now I've learnt about the awesome --generate-dtb option, which would make my setup simpler, and I'd like to use it.

If I replace my --dtb-file with --generate-dtb on an arm simulation, it all worked fine and Linux booted.

However, for a very analogous boot of aarch64 nothing shows on the terminal and gem5 exits with an error.

gem5 revision: 49f96e7b77925837aa5bc84d4c3453ab5f07408e (current master)

full gem5 command line:

M5_PATH='/work/linux-kernel-module-cheat/out/common/gem5/system' \
 '/work/linux-kernel-module-cheat/out/common/gem5/build/ARM/gem5.opt' \
--debug-file=trace.txt \
 -d '/work/linux-kernel-module-cheat/out/aarch64/gem5/m5out' \
'/work/linux-kernel-module-cheat/gem5/gem5/configs/example/fs.py' \
--disk-image='/work/linux-kernel-module-cheat/out/aarch64/buildroot/images/rootfs.ext2' \
--kernel='/work/linux-kernel-module-cheat/out/aarch64/buildroot/build/linux-custom/vmlinux' \
--mem-size='256MB' \
--num-cpus='1' \
--script='/work/linux-kernel-module-cheat/data/readfile' \
 --command-line='earlyprintk=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 rw loglevel=8 mem=256MB root=/dev/sda console_msg_format=syslog nokaslr norandmaps printk.devkmsg=on printk.time=y' \
--generate-dtb \
--machine-type=VExpress_GEM5_V1 \

It boots correctly however I use instead of --generate-dtb:

--dtb-file='/work/linux-kernel-module-cheat/out/common/gem5/system/arm/dt/armv8_gem5_v1_1cpu.dtb' \

Error message:

**** REAL SIMULATION ****
warn: Existing EnergyCtrl, but no enabled DVFSHandler found.
info: Entering event queue @ 0.  Starting simulation...
warn: SCReg: Access to unknown device dcc0:site0:pos0:fn7:dev0
warn: Tried to read RealView I/O at offset 0x60 that doesn't exist
warn: Tried to read RealView I/O at offset 0x48 that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
Exiting @ tick 18446744073709551615 because simulate() limit reached

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions