Hi Giacomo,
Just re-build gem5 from scratch (after `rm -rf` the build folder).
Also, thanks for the info about the --bare-metal. I was posting for
completeness, but won't use it any further.
I've re-downloaded the guest binary. Executing:
$ readelf -e -s $M5_PATH/binaries/vmlinux.arm64
returns:
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: AArch64
Version: 0x1
Entry point address: 0xffffff8008080000
Start of program headers: 64 (bytes into file)
Start of section headers: 137210936 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 4
Size of section headers: 64 (bytes)
Number of section headers: 36
Section header string table index: 35
readelf: Error: Reading 2304 bytes extends past end of file for section headers
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
LOAD 0x0000000000010000 0xffffff8008080000 0xffffff8008080000
0x00000000006bb3e0 0x00000000006bb3e0 R E 0x10000
LOAD 0x00000000006d0000 0xffffff8008740000 0xffffff8008740000
0x0000000000331008 0x00000000003674b0 RWE 0x10000
NOTE 0x0000000000914260 0xffffff8008984260 0xffffff8008984260
0x0000000000000024 0x0000000000000024 R 0x4
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 RW 0x10
Which seems to be a pretty short output compared to other files. Indeed, there
are no symbols reported. But this happens for both downloaded kernels
(downloaded now and before). Running this on gem5 does not change anything.
So I went after a previous version of the pre-built kernels to see what their
readelf output would be like. Downloaded
http://dist.gem5.org/dist/current/arm/aarch-system-20180409.tar.xz because it
seems to be of 2018, so not that old.
readelf for one of the kernels in there (I ran over the
vmlinux.vexpress_gem5_v1_64 file) shows a lot of symbols! So I though ok, let's
try gem5 with that.
changed the M5_PATH to this older guest binary folder
export M5_PATH=/home/pedro/Projects/gem5/fs_files/aarch-system-20180409
Ran gem5 again:
$ ./build/ARM/gem5.opt configs/example/arm/starter_fs.py --kernel
$M5_PATH/binaries/vmlinux.vexpress_emm64 --disk-image
/home/pedro/Projects/gem5/fs_files/ubuntu-18.04-arm64-docker.img --root /dev/vda
failed with error:
Can't find file 'boot.arm64' on M5_PATH.
Indeed, there was no boot.arm64 in the binaries folder, I just cp whatever 64
version there to have the required name
$ cp boot_emm.arm64 boot.arm64
Running again:
$ ./build/ARM/gem5.opt configs/example/arm/starter_fs.py --kernel
$M5_PATH/binaries/vmlinux.vexpress_emm64 --disk-image
/home/pedro/Projects/gem5/fs_files/ubuntu-18.04-arm64-docker.img --root /dev/vda
Boot actually start! (It later fails, though)
gem5 output:
warn: membus.master is deprecated. `master` is now called `mem_side_ports`
warn: iobus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: iobridge.master is deprecated. `master` is now called `mem_side_port`
warn: membus.master is deprecated. `master` is now called `mem_side_ports`
warn: iobridge.slave is deprecated. `slave` is now called `cpu_side_port`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: dmabridge.master is deprecated. `master` is now called `mem_side_port`
warn: iobus.master is deprecated. `master` is now called `mem_side_ports`
warn: dmabridge.slave is deprecated. `slave` is now called `cpu_side_port`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
Global frequency set at 1000000000000 ticks per second
warn: DRAM device capacity (8192 Mbytes) does not match the address range
assigned (2048 Mbytes)
info: kernel located at:
/home/pedro/Projects/gem5/fs_files/aarch-system-20180409/binaries/vmlinux.vexpress_emm64
warn: Highest ARM exception-level set to AArch32 but the workload is for
AArch64. Assuming you wanted these to match.
system.vncserver: Listening for connections on port 5900
system.terminal: Listening for connections on port 3456
system.realview.uart1.device: Listening for connections on port 3457
system.realview.uart2.device: Listening for connections on port 3458
system.realview.uart3.device: Listening for connections on port 3459
0: system.remote_gdb: listening for remote gdb on port 7000
info: Using bootloader at address 0x10
info: Using kernel entry physical address at 0x80080000
info: Loading DTB file: m5out/system.dtb at address 0x88000000
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 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
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn't exist
warn: Tried to read RealView I/O at offset 0x8 that doesn't exist
warn: Tried to read RealView I/O at offset 0x48 that doesn't exist
info: Dumping kernel dmesg buffer to system.workload.dmesg...
warn: Kernel panic in simulated kernel
18500522336500: system.terminal: attach terminal 0
^Cuser interrupt received @ 408156306221000 <--------- I finished
(ctrl-C) here because I saw a error in the boot output with m5term.
@gem5/util/term$, running ./m5term localhost 3456:
==== m5 terminal: Terminal 0 ====
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.16.0-rc6+ (root@c84b8fb6e283) (gcc version
4.8.5 (Ubuntu/Linaro 4.8.5-4ubuntu1) ) #1 SMP PREEMPT Mon Apr 9 07:00:03 UTC
2018
[ 0.000000] CPU: AArch64 Processor [410fd070] revision 0
[ 0.000000] Memory limited to 2048MB
[ 0.000000] cma: CMA: reserved 16 MiB at ff000000
[ 0.000000] PERCPU: Embedded 11 pages/cpu @ffffffc07efd9000 s12800 r8192
d24064 u45056
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total
pages: 517120
[ 0.000000] Kernel command line: console=ttyAMA0 lpj=19988480 norandmaps
root=/dev/vda rw mem=2GB
[ 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] Memory: 2041896K/2097152K available (4561K kernel code, 314K
rwdata, 1640K rodata, 208K init, 185K bss, 55256K reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vmalloc : 0xffffff8000000000 - 0xffffffbbffff0000
(245759 MB)
[ 0.000000] vmemmap : 0xffffffbc01c00000 - 0xffffffbc03800000 (
28 MB)
[ 0.000000] modules : 0xffffffbffc000000 - 0xffffffc000000000 (
64 MB)
[ 0.000000] memory : 0xffffffc000000000 - 0xffffffc080000000 (
2048 MB)
[ 0.000000] .init : 0xffffffc000690000 - 0xffffffc0006c4200 (
209 kB)
[ 0.000000] .text : 0xffffffc000080000 - 0xffffffc00068f504 (
6206 kB)
[ 0.000000] .data : 0xffffffc0006c5000 - 0xffffffc0007138a0 (
315 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS:64 nr_irqs:64 0
[ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every
178956969942ns
[ 0.000022] Architected cp15 and mmio timer(s) running at 25.16MHz
(virt/virt).
[ 0.000023] sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every
2730666655744ns
[ 0.000046] Console: colour dummy device 80x25
[ 0.000047] Calibrating delay loop (skipped) preset value.. 3997.69
BogoMIPS (lpj=19988480)
[ 0.000049] pid_max: default: 32768 minimum: 301
[ 0.000061] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000063] Mountpoint-cache hash table entries: 4096 (order: 3, 32768
bytes)
[ 0.000160] hw perfevents: no hardware support available
[ 0.040051] Brought up 1 CPUs
[ 0.040053] SMP: Total of 1 processors activated.
[ 0.040105] devtmpfs: initialized
[ 0.044061] atomic64_test: passed
[ 0.044107] regulator-dummy: no parameters
[ 0.044640] NET: Registered protocol family 16
[ 0.140232] vdso: 2 pages (1 code, 1 data) at base ffffffc0006cd000
[ 0.140237] hw-breakpoint: found 16 breakpoint and 16 watchpoint registers.
[ 0.140315] software IO TLB [mem 0xfc400000-0xfc800000] (4MB) mapped at
[ffffffc07c400000-ffffffc07c7fffff]
[ 0.140318] Serial: AMBA PL011 UART driver
[ 0.140413] of_amba_device_create(): amba_device_add() failed (-2) for
/watchdog@2a490000
[ 0.140475] of_amba_device_create(): amba_device_add() failed (-2) for
/watchdog@2b060000
[ 0.140511] 1c090000.uart: ttyAMA0 at MMIO 0x1c090000 (irq = 37, base_baud
= 0) is a PL011 rev3
[ 0.140574] console [ttyAMA0] enabled
[ 0.140650] 1c0a0000.uart: ttyAMA1 at MMIO 0x1c0a0000 (irq = 38, base_baud
= 0) is a PL011 rev3
[ 0.140718] 1c0b0000.uart: ttyAMA2 at MMIO 0x1c0b0000 (irq = 39, base_baud
= 0) is a PL011 rev3
[ 0.140788] 1c0c0000.uart: ttyAMA3 at MMIO 0x1c0c0000 (irq = 40, base_baud
= 0) is a PL011 rev3
[ 0.140842] of_amba_device_create(): amba_device_add() failed (-2) for
/kmi@1c060000
[ 0.140860] of_amba_device_create(): amba_device_add() failed (-2) for
/kmi@1c070000
[ 0.140878] /watchdog@1c0f0000: could not find phandle
[ 0.140880] ERROR: could not get clock /watchdog@1c0f0000:apb_pclk(1)
[ 0.140883] of_amba_device_create(): amba_device_add() failed (-2) for
/watchdog@1c0f0000
[ 0.140900] /rtc@1c170000: could not find phandle
[ 0.140902] ERROR: could not get clock /rtc@1c170000:apb_pclk(0)
[ 0.140905] of_amba_device_create(): amba_device_add() failed (-2) for
/rtc@1c170000
[ 0.170438] vgaarb: loaded
[ 0.170498] SCSI subsystem initialized
[ 0.170582] usbcore: registered new interface driver usbfs
[ 0.170595] usbcore: registered new interface driver hub
[ 0.170623] usbcore: registered new device driver usb
[ 0.170645] pps_core: LinuxPPS API ver. 1 registered
[ 0.170647] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo
Giometti <[email protected]>
[ 0.170653] PTP clock support registered
[ 0.170790] Switched to clocksource arch_sys_counter
[ 0.172078] NET: Registered protocol family 2
[ 0.172174] TCP established hash table entries: 16384 (order: 5, 131072
bytes)
[ 0.172223] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[ 0.172283] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.172292] TCP: reno registered
[ 0.172294] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.172306] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.172337] NET: Registered protocol family 1
[ 0.172382] RPC: Registered named UNIX socket transport module.
[ 0.172384] RPC: Registered udp transport module.
[ 0.172386] RPC: Registered tcp transport module.
[ 0.172387] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.172547] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.172646] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 0.175080] fuse init (API version 7.23)
[ 0.175183] msgmni has been set to 4020
[ 0.177618] io scheduler noop registered
[ 0.177684] io scheduler cfq registered (default)
[ 0.178230] pci-host-generic 30000000.pci: PCI host bridge to bus 0000:00
[ 0.178233] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 0.178236] pci_bus 0000:00: root bus resource [mem 0x40000000-0x7fffffff]
(bus address [0x00000000-0x3fffffff])
[ 0.178240] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.178303] pci 0000:00:01.0: BAR 6: assigned [mem 0x40000000-0x400007ff
pref]
[ 0.178306] pci 0000:00:01.0: BAR 0: assigned [io 0x1000-0x101f]
[ 0.178899] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 0.179328] e1000: Intel(R) PRO/1000 Network Driver - version
7.3.21-k8-NAPI
[ 0.179330] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 0.179345] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
[ 0.179347] e1000e: Copyright(c) 1999 - 2014 Intel Corporation.
[ 0.179362] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.0.5-k
[ 0.179364] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 0.179460] usbcore: registered new interface driver usb-storage
[ 0.179507] mousedev: PS/2 mouse device common for all mice
[ 0.179719] usbcore: registered new interface driver usbhid
[ 0.179721] usbhid: USB HID core driver
[ 0.179751] TCP: cubic registered
[ 0.179754] NET: Registered protocol family 17
[ 0.180038] VFS: Cannot open root device "vda" or unknown-block(0,0):
error -6
[ 0.180040] Please append a correct "root=" boot option; here are the
available partitions:
[ 0.180043] Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0)
[ 0.180045] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.16.0-rc6+ #1
[ 0.180046] Call trace:
[ 0.180048] [<ffffffc000087ca4>] dump_backtrace+0x0/0x12c
[ 0.180051] [<ffffffc000087de0>] show_stack+0x10/0x1c
[ 0.180053] [<ffffffc0004e6b34>] dump_stack+0x74/0xc0
[ 0.180055] [<ffffffc0004e3b98>] panic+0xe0/0x218
[ 0.180057] [<ffffffc000690e84>] mount_block_root+0x1cc/0x26c
[ 0.180060] [<ffffffc000691034>] mount_root+0x110/0x130
[ 0.180062] [<ffffffc00069118c>] prepare_namespace+0x138/0x184
[ 0.180064] [<ffffffc000690afc>] kernel_init_freeable+0x1b4/0x1d8
[ 0.180067] [<ffffffc0004e1f70>] kernel_init+0x14/0xd4
[ 0.180068] ---[ end Kernel panic - not syncing: VFS: Unable to mount root
fs on unknown-block(0,0)
So two main things:
1) Could the most up-to-date kernel in the website be broken
(http://dist.gem5.org/dist/current/arm/aarch-system-201901106.tar.bz2)? I had
problematic readelf outputs after two different download attempts.
2) Let's say it works (or I stick with the older, working version). There is
also a panic with the "root" option. I am using the one you told me, but
panic'd when trying to show me the available partitions.
Could the image be corrupted as well? Or I'm just using a wrong parameter?
Sorry for the very long response and thanks for the help.
Pedro.
_______________________________________________
gem5-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s