error running gem5 full system on ARM bigLITTLE

1

I installed gem5 on my ubuntu 18.04.5. If I run a generic fs.py ARM architecture then the simulation boots up fine no matter what configuration I use. For example:

./build/ARM/gem5.opt configs/example/fs.py --kernel=/home/ting-bazinga/gem5/fs_imgs/binaries/vmlinux.arm64
--disk-image=/home/ting-bazinga/gem5/fs_imgs/disks/aarch32-ubuntu-natty-headless.img

I followed multiple tutorials to run gem5 in full system mode in ARM bigLITTLE architecture but none succeeded. I tried different disk image files, kernels and bootscript combinations and no luck. Some gives kernel panic errors and some gives:

[    0.199882] init: hwclock main process (592) terminated with status 1

For example if I use the command(which is provided in http://www.gem5.org/assets/files/ASPLOS2017_gem5_tutorial.pdf):

./build/ARM/gem5.opt configs/example/arm/fs_bigLITTLE.py --kernel=/home/ting-bazinga/gem5/linux-arm-gem5/vmlinux 
--cpu-type=atomic --dtb=/home/ting-bazinga/gem5/system/arm/dt/armv8_gem5_v1_big_little_2_4.dtb --disk=/home/ting-bazinga/gem5/fs_imgs/disks/aarch64-ubuntu-trusty-headless.img

then the output is

==== m5 terminal: Terminal 0 ====
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 4.4.0+ (ting-bazinga@tingbazinga-Alienware-17-R5) (gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) ) #1 SMP PREEMPT Fri Mar 5 00:17:28 CST 2021
[    0.000000] Boot CPU: AArch64 Processor [410fd070]
[    0.000000] earlycon: Early serial console at MMIO 0x1c090000 (options '')
[    0.000000] bootconsole [uart0] enabled
[    0.000000] Memory limited to 2048MB
[    0.000000] cma: Reserved 16 MiB at 0x00000000ff000000
[    0.000000] On node 0 totalpages: 524288
[    0.000000]   DMA zone: 8192 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 524288 pages, LIFO batch:31
[    0.000000] PERCPU: Embedded 15 pages/cpu @ffffffc07efc9000 s23704 r8192 d29544 u61440
[    0.000000] pcpu-alloc: s23704 r8192 d29544 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 832075
[    0.000000] CPU features: enabling workaround for ARM erratum 834220
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 516096
[    0.000000] Kernel command line: earlyprintk earlycon=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 norandmaps loglevel=8 mem=2GB root=/dev/vda1 rw init=/sbin/init vmalloc=768MB
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] software IO TLB [mem 0xf8a00000-0xfca00000] (64MB) mapped at [ffffffc078a00000-ffffffc07c9fffff]
[    0.000000] Memory: 1970336K/2097152K available (5478K kernel code, 138K rwdata, 1760K rodata, 236K init, 239K bss, 110432K reserved, 16384K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vmalloc : 0xffffff8000000000 - 0xffffffbdbfff0000   (   246 GB)
[    0.000000]     vmemmap : 0xffffffbdc0000000 - 0xffffffbfc0000000   (     8 GB maximum)
[    0.000000]               0xffffffbdc2000000 - 0xffffffbdc4000000   (    32 MB actual)
[    0.000000]     fixed   : 0xffffffbffa7fd000 - 0xffffffbffac00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbffae00000 - 0xffffffbffbe00000   (    16 MB)
[    0.000000]     modules : 0xffffffbffc000000 - 0xffffffc000000000   (    64 MB)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc080000000   (  2048 MB)
[    0.000000]       .init : 0xffffffc000793000 - 0xffffffc0007ce000   (   236 KB)
[    0.000000]       .text : 0xffffffc000080000 - 0xffffffc000792a04   (  7243 KB)
[    0.000000]       .data : 0xffffffc0007e1000 - 0xffffffc000803b60   (   139 KB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 64.
[    0.000000]  RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=2
[    0.000000] NR_IRQS:64 nr_irqs:64 0
[    0.000000] clk_gem5_energy_ctrl: No cpu-map in DT! Falling back to old detection method!
[    0.000000] clk_gem5_energy_ctrl: No clusters in DT! Falling back to using CPU topology!
[    0.000000] Architected cp15 and mmio timer(s) running at 25.16MHz (virt/virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x5cdd39714, max_idle_ns: 440795202620 ns
[    0.000001] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every 4398046511084ns
[    0.000053] Console: colour dummy device 80x25
[    0.000057] Calibrating delay loop (skipped) preset value.. 9994.24 BogoMIPS (lpj=19988480)
[    0.000062] pid_max: default: 32768 minimum: 301
[    0.000088] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000092] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000283] ASID allocator initialised with 256 entries
[    0.032000] Detected PIPT I-cache on CPU1
[    0.032015] CPU1: Booted secondary processor [410fd070]
[    0.032030] Brought up 2 CPUs
[    0.032037] SMP: Total of 2 processors activated.
[    0.032040] CPU features: detected feature: Privileged Access Never
[    0.032046] CPU: All CPU(s) started at EL1
[    0.032053] alternatives: patching kernel code
[    0.032426] devtmpfs: initialized
[    0.033559] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.033792] atomic64_test: passed
[    0.034739] NET: Registered protocol family 16
[    0.072492] vdso: 2 pages (1 code @ ffffffc0007e9000, 1 data @ ffffffc0007e8000)
[    0.072503] hw-breakpoint: found 16 breakpoint and 16 watchpoint registers.
[    0.072876] DMA: preallocated 256 KiB pool for atomic allocations
[    0.072881] Serial: AMBA PL011 UART driver
[    0.073000] /rtc@1c170000: could not find phandle
[    0.073004] ERROR: could not get clock /rtc@1c170000:apb_pclk(0)
[    0.073009] of_amba_device_create(): amba_device_add() failed (-2) for /rtc@1c170000
[    0.073053] of_amba_device_create(): amba_device_add() failed (-2) for /watchdog@2a490000
[    0.073097] of_amba_device_create(): amba_device_add() failed (-2) for /watchdog@2b060000
[    0.073141] /watchdog@1c0f0000: could not find phandle
[    0.073144] ERROR: could not get clock /watchdog@1c0f0000:apb_pclk(1)
[    0.073149] of_amba_device_create(): amba_device_add() failed (-2) for /watchdog@1c0f0000
[    0.073680] 1c090000.uart: ttyAMA0 at MMIO 0x1c090000 (irq = 12, base_baud = 0) is a PL011 rev3
[    0.073685] console [ttyAMA0] enabled
[    0.073685] console [ttyAMA0] enabled
[    0.073689] bootconsole [uart0] disabled
[    0.073689] bootconsole [uart0] disabled
[    0.074091] 1c0a0000.uart: ttyAMA1 at MMIO 0x1c0a0000 (irq = 13, base_baud = 0) is a PL011 rev3
[    0.074282] 1c0b0000.uart: ttyAMA2 at MMIO 0x1c0b0000 (irq = 14, base_baud = 0) is a PL011 rev3
[    0.074481] 1c0c0000.uart: ttyAMA3 at MMIO 0x1c0c0000 (irq = 15, base_baud = 0) is a PL011 rev3
[    0.074626] of_amba_device_create(): amba_device_add() failed (-2) for /kmi@1c070000
[    0.074669] of_amba_device_create(): amba_device_add() failed (-2) for /kmi@1c060000
[    0.096153] vgaarb: loaded
[    0.096283] SCSI subsystem initialized
[    0.100053] libata version 3.00 loaded.
[    0.100155] usbcore: registered new interface driver usbfs
[    0.100181] usbcore: registered new interface driver hub
[    0.100200] usbcore: registered new device driver usb
[    0.100247] pps_core: LinuxPPS API ver. 1 registered
[    0.100251] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.100264] PTP clock support registered
[    0.100616] clocksource: Switched to clocksource arch_sys_counter
[    0.104724] NET: Registered protocol family 2
[    0.104888] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.104976] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    0.105071] TCP: Hash tables configured (established 16384 bind 16384)
[    0.105089] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    0.105111] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    0.105175] NET: Registered protocol family 1
[    0.105271] RPC: Registered named UNIX socket transport module.
[    0.105274] RPC: Registered udp transport module.
[    0.105278] RPC: Registered tcp transport module.
[    0.105281] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.105287] PCI: CLS 0 bytes, default 128
[    0.105477] kvm [1]: HYP mode not available
[    0.105757] futex hash table entries: 512 (order: 4, 65536 bytes)
[    0.105956] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.115434] fuse init (API version 7.23)
[    0.115945] io scheduler noop registered
[    0.116020] io scheduler cfq registered (default)
[    0.116127] PCI host bridge /pci ranges:
[    0.116131]   No bus range found for /pci, using [bus 00-ff]
[    0.116138]    IO 0x2f000000..0x2f00ffff -> 0x00000000
[    0.116144]   MEM 0x40000000..0x7fffffff -> 0x00000000
[    0.117325] pci-host-generic 30000000.pci: PCI host bridge to bus 0000:00
[    0.117331] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.117336] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    0.117342] pci_bus 0000:00: root bus resource [mem 0x40000000-0x7fffffff] (bus address [0x00000000-0x3fffffff])
[    0.117348] pci_bus 0000:00: scanning bus
[    0.117356] pci 0000:00:01.0: [1af4:1000] type 00 class 0xff0000
[    0.117363] pci 0000:00:01.0: reg 0x10: [io  0x0000-0x001f]
[    0.117374] pci 0000:00:01.0: reg 0x30: [mem 0x40000000-0x400007ff pref]
[    0.117463] pci_bus 0000:00: fixups for bus
[    0.117467] pci_bus 0000:00: bus scan returning with max=00
[    0.117478] pci 0000:00:01.0: fixup irq: got 19
[    0.117482] pci 0000:00:01.0: assigning IRQ 19
[    0.117489] pci 0000:00:01.0: BAR 6: assigned [mem 0x40000000-0x400007ff pref]
[    0.117495] pci 0000:00:01.0: BAR 0: assigned [io  0x1000-0x101f]
[    0.117603] virtio-pci 0000:00:01.0: enabling device (0000 -> 0001)
[    0.117609] virtio-pci 0000:00:01.0: virtio_pci: leaving for legacy driver
[    0.117615] virtio-pci 0000:00:01.0: enabling bus mastering
[    0.119296] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.124177]  vda: vda1
[    0.128799] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
[    0.128803] e1000: Copyright (c) 1999-2006 Intel Corporation.
[    0.128834] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    0.128838] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    0.128869] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.3.0-k
[    0.128873] igb: Copyright (c) 2007-2014 Intel Corporation.
[    0.128905] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 4.2.1-k
[    0.128909] ixgbe: Copyright (c) 1999-2015 Intel Corporation.
[    0.128944] ixgbevf: Intel(R) 10 Gigabit PCI Express Virtual Function Network Driver - version 2.12.1-k
[    0.128948] ixgbevf: Copyright (c) 2009 - 2012 Intel Corporation.
[    0.128980] i40e: Intel(R) Ethernet Connection XL710 Network Driver - version 1.3.46-k
[    0.128984] i40e: Copyright (c) 2013 - 2014 Intel Corporation.
[    0.129017] ixgb: Intel(R) PRO/10GbE Network Driver - version 1.0.135-k2-NAPI
[    0.129021] ixgb: Copyright (c) 1999-2008 Intel Corporation.
[    0.129053] i40evf: Intel(R) XL710/X710 Virtual Function Network Driver - version 1.3.33
[    0.129057] Copyright (c) 2013 - 2015 Intel Corporation.
[    0.129267] usbcore: registered new interface driver usb-storage
[    0.129408] mousedev: PS/2 mouse device common for all mice
[    0.133710] gem5 DVFS handler is disabled
[    0.133713] gem5-energy-ctrl loaded at ffffff800007c000
[    0.133717] gem5_energy_ctrl_mc: gem5_mc_init: DVFS handler in energy controller is disabled,                         ARM gem5 multi-cluster cpufreq driver                         will not be registered
[    0.134007] usbcore: registered new interface driver usbhid
[    0.134011] usbhid: USB HID core driver
[    0.134079] NET: Registered protocol family 17
[    0.138928] EXT4-fs (vda1): couldn't mount as ext3 due to feature incompatibilities
[    0.143482] EXT4-fs (vda1): mounted filesystem without journal. Opts: (null)
[    0.143490] VFS: Mounted root (ext4 filesystem) on device 254:1.
[    0.143795] devtmpfs: mounted
[    0.143836] Freeing unused kernel memory: 236K (ffffffc000793000 - ffffffc0007ce000)
[    0.143846] Freeing alternatives memory: 52K (ffffffc0007ce000 - ffffffc0007db000)
Mount failed for selinuxfs on /sys/fs/selinux:  No such file or directory
[    0.184933] random: init urandom read with 6 bits of entropy available
[    0.199882] init: hwclock main process (592) terminated with status 1

Can anyone please help me with this? I can't find any configuration that successfully boots up a bigLITTLE arm simulation. Has anyone been able to do this?

Just FYI I found the fs_bigLITTLE.py I downloaded is different from the ones provided by others. Some tutorials use command without the --kernel option but mine says:

fs_bigLITTLE.py: error: argument --kernel is required
linux
linux-kernel
gem5
asked on Stack Overflow Mar 5, 2021 by Ting Bazinga

1 Answer

0

I see a problem in your commandline:

./build/ARM/gem5.opt configs/example/arm/fs_bigLITTLE.py \
    --kernel=/home/ting-bazinga/gem5/linux-arm-gem5/vmlinux 
    --cpu-type=atomic \
    --dtb=/home/ting-bazinga/gem5/system/arm/dt/armv8_gem5_v1_big_little_2_4.dtb \
    --disk=/home/ting-bazinga/gem5/fs_imgs/disks/aarch64-ubuntu-trusty-headless.img

The fs_bigLITTLE is by default using 1 little core and 1 big core, whereas the DTB you are using is assuming 2 big cores and 4 little cores. Removing the --dtb option should just work (relying on DTB autogeneration). The other option is to align the command line to the dtb (using --big-cpus and --little-cpus option)

answered on Stack Overflow Apr 1, 2021 by Giacomo Travaglini

User contributions licensed under CC BY-SA 3.0