Re: Bootstrapping an Olimex A64-OLinuXino
On Tuesday, 13.03.2018 at 13:45, Joonas Kylmälä wrote:
> Martin Lucina:
> > (arm-trusted-firmware) $ make PLAT=sun50iw1p1 DEBUG=1 bl31 CROSS_COMPILE=aarch64- linux-gnu-
> > (u-boot) $ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- a64-olinuxino_defconfig
> > (u-boot) $ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- BL31=$(pwd)/../arm-trusted-firmware/build/sun50iw1p1/debug/bl31.bin
>
> Try ARCH=arm64. No idea if it helps.
U-boot seems fine -- it's once I start the kernel that things start to go
wrong. Just tried a mainline 4.16-rc5, and I get the same kernel BUG fairly
early during boot (though no immediate panic).
Once thing I'm not clear on -- should I be using the dtb that came with the
kernel (arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dtb) or just use
the one provided by U-boot via $fdtcontroladdr?
Full boot log of 4.16-rc5 using the U-boot provided dtb follows.
-mato
=== cut here ===
U-Boot SPL 2018.01 (Mar 12 2018 - 17:31:02)
DRAM: 1024 MiB
Trying to boot from MMC1
NOTICE: BL3-1: Running on A64/H64 (1689) in SRAM A2 (@0x44000)
NOTICE: Configuring SPC Controller
NOTICE: BL3-1: v1.0(debug):ae787242
NOTICE: BL3-1: Built : 17:30:05, Mar 12 2018
NOTICE: DT: sun50i-a64-olinuxino
NOTICE: Configuring AXP PMIC
NOTICE: PMIC: setup successful
NOTICE: SCPI: dummy stub handler, implementation level: 000000
INFO: BL3-1: Initializing runtime services
INFO: BL3-1: Preparing for EL3 exit to normal world
INFO: BL3-1: Next image address: 0x4a000000, SPSR: 0x3c9
U-Boot 2018.01 (Mar 12 2018 - 17:31:02 +0100) Allwinner Technology
CPU: Allwinner A64 (SUN50I)
Model: Olimex A64-Olinuxino
DRAM: 1 GiB
MMC: SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
220 bytes read in 15 ms (13.7 KiB/s)
## Executing script at 4fc00000
reading Image
17601024 bytes read in 901 ms (18.6 MiB/s)
## Flattened Device Tree blob at 79f2bed8
Booting using the fdt blob at 0x79f2bed8
Loading Device Tree to 0000000049ffb000, end 0000000049ffff15 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 4.16.0-rc5 (mato@nodbug) (gcc version 6.3.0 20170516 (Debian 6.3.0-18)) #2 SMP PREEMPT Tue Mar 13 14:33:15 CET 2018
[ 0.000000] Machine model: Olimex A64-Olinuxino
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 16 MiB at 0x000000007f000000
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7efe9e80-0x7efeb97f]
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000040000000-0x000000007fffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] random: get_random_bytes called from start_kernel+0xac/0x40c with crng_init=0
[ 0.000000] percpu: Embedded 24 pages/cpu @ (ptrval) s57880 r8192 d32232 u98304
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258048
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10
[ 0.000000] Memory: 997684K/1048576K available (10108K kernel code, 1252K rwdata, 4620K rodata, 1152K init, 404K bss, 34508K reserved, 16384K
cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000005] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000231] Console: colour dummy device 80x25
[ 0.000292] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.000305] pid_max: default: 32768 minimum: 301
[ 0.000386] Security Framework initialized
[ 0.001045] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.001374] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.001407] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.001426] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.016058] ASID allocator initialised with 32768 entries
[ 0.024049] Hierarchical SRCU implementation.
[ 0.032665] EFI services will not be available.
[ 0.040088] smp: Bringing up secondary CPUs ...
[ 0.069049] Detected VIPT I-cache on CPU1
[ 0.069107] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.096692] Detected VIPT I-cache on CPU2
[ 0.096726] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.124732] Detected VIPT I-cache on CPU3
[ 0.124762] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.124835] smp: Brought up 1 node, 4 CPUs
[ 0.124859] SMP: Total of 4 processors activated.
[ 0.124868] CPU features: detected feature: 32-bit EL0 Support
[ 0.124875] CPU features: detected feature: Kernel page table isolation (KPTI)
[ 0.128906] CPU: All CPU(s) started at EL2
[ 0.128926] alternatives: patching kernel code
[ 0.129962] devtmpfs: initialized
[ 0.132334] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.132342] random: fast init done
[ 0.132394] futex hash table entries: 1024 (order: 5, 131072 bytes)
[ 0.133109] pinctrl core: initialized pinctrl subsystem
[ 0.134312] DMI not present or invalid.
[ 0.134737] NET: Registered protocol family 16
[ 0.135117] audit: initializing netlink subsys (disabled)
[ 0.135268] audit: type=2000 audit(0.132:1): state=initialized audit_enabled=0 res=1
[ 0.136901] cpuidle: using governor menu
[ 0.137147] vdso: 2 pages (1 code @ (ptrval), 1 data @ (ptrval))
[ 0.137166] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.141408] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.142169] Serial: AMBA PL011 UART driver
[ 0.156626] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.157065] cryptd: max_cpu_qlen set to 1000
[ 0.157711] ACPI: Interpreter disabled.
[ 0.158660] vgaarb: loaded
[ 0.158964] SCSI subsystem initialized
[ 0.159510] usbcore: registered new interface driver usbfs
[ 0.159565] usbcore: registered new interface driver hub
[ 0.159650] usbcore: registered new device driver usb
[ 0.160202] pps_core: LinuxPPS API ver. 1 registered
[ 0.160211] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.160240] PTP clock support registered
[ 0.160359] EDAC MC: Ver: 3.0.0
[ 0.161092] Advanced Linux Sound Architecture Driver Initialized.
[ 0.161921] clocksource: Switched to clocksource arch_sys_counter
[ 0.162109] VFS: Disk quotas dquot_6.6.0
[ 0.162176] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.162333] pnp: PnP ACPI: disabled
[ 0.169407] NET: Registered protocol family 2
[ 0.169878] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes)
[ 0.170059] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.170171] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[ 0.170344] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.170507] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.170611] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.170794] NET: Registered protocol family 1
[ 0.171215] RPC: Registered named UNIX socket transport module.
[ 0.171224] RPC: Registered udp transport module.
[ 0.171230] RPC: Registered tcp transport module.
[ 0.171235] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.171864] kvm [1]: 8-bit VMID
[ 0.171873] kvm [1]: IDMAP page: 40a48000
[ 0.171880] kvm [1]: HYP VA range: 800000000000:ffffffffffff
[ 0.172861] kvm [1]: vgic-v2@1c84000
[ 0.172945] kvm [1]: vgic interrupt IRQ1
[ 0.172989] kvm [1]: virtual timer IRQ4
[ 0.173074] kvm [1]: Hyp mode initialized successfully
[ 0.176291] Initialise system trusted keyrings
[ 0.176430] workingset: timestamp_bits=44 max_order=18 bucket_order=0
[ 0.185478] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.186255] NFS: Registering the id_resolver key type
[ 0.186290] Key type id_resolver registered
[ 0.186297] Key type id_legacy registered
[ 0.186312] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.186542] 9p: Installing v9fs 9p2000 file system support
[ 0.189310] Key type asymmetric registered
[ 0.189322] Asymmetric key parser 'x509' registered
[ 0.189524] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 0.189535] io scheduler noop registered
[ 0.189759] io scheduler cfq registered (default)
[ 0.189769] io scheduler mq-deadline registered
[ 0.189776] io scheduler kyber registered
[ 0.195756] sun50i-a64-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[ 0.198058] EINJ: ACPI disabled.
[ 0.205744] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.207692] dw-apb-uart 1c28000.serial: could not find pctldev for node /soc/pinctrl@1c20800/uart0@0, deferring probe
[ 0.208021] SuperH (H)SCI(F) driver initialized
[ 0.208247] msm_serial: driver initialized
[ 0.208771] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 0.215800] loop: module loaded
[ 0.219117] libphy: Fixed MDIO Bus: probed
[ 0.219587] tun: Universal TUN/TAP device driver, 1.6
[ 0.220293] thunder_xcv, ver 1.0
[ 0.220346] thunder_bgx, ver 1.0
[ 0.220400] nicpf, ver 1.0
[ 0.220631] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 0.220638] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.220699] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[ 0.220706] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 0.220760] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[ 0.220767] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 0.220999] sky2: driver version 1.30
[ 0.221422] VFIO - User Level meta-driver version: 0.3
[ 0.222429] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.222441] ehci-pci: EHCI PCI platform driver
[ 0.222495] ehci-platform: EHCI generic platform driver
[ 0.222573] ehci-orion: EHCI orion driver
[ 0.222638] ehci-exynos: EHCI EXYNOS driver
[ 0.222702] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.222731] ohci-pci: OHCI PCI platform driver
[ 0.222786] ohci-platform: OHCI generic platform driver
[ 0.222856] ohci-exynos: OHCI EXYNOS driver
[ 0.223182] usbcore: registered new interface driver usb-storage
[ 0.225316] sun6i-rtc 1f00000.rtc: rtc core: registered rtc-sun6i as rtc0
[ 0.225332] sun6i-rtc 1f00000.rtc: RTC enabled
[ 0.225551] i2c /dev entries driver
[ 0.227905] sdhci: Secure Digital Host Controller Interface driver
[ 0.227919] sdhci: Copyright(c) Pierre Ossman
[ 0.228090] Synopsys Designware Multimedia Card Interface Driver
[ 0.228508] sunxi-mmc 1c0f000.mmc: could not find pctldev for node /soc/pinctrl@1c20800/mmc0-pins, deferring probe
[ 0.228636] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.229438] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.230416] usbcore: registered new interface driver usbhid
[ 0.230428] usbhid: USB HID core driver
[ 0.232589] NET: Registered protocol family 17
[ 0.232687] 9pnet: Installing 9P2000 support
[ 0.232763] Key type dns_resolver registered
[ 0.233455] registered taskstats version 1
[ 0.233464] Loading compiled-in X.509 certificates
[ 0.234158] BUG: Bad page state in process swapper/0 pfn:7d541
[ 0.234172] page:ffff7e0000f55040 count:72 mapcount:0 mapping:0000000000000000 index:0x0
[ 0.234183] flags: 0xfffc00000000000()
[ 0.234197] raw: 0fffc00000000000 0000000000000000 0000000000000000 00000048ffffffff
[ 0.234207] raw: ffff7e0000f55060 ffff7e0000f55060 0000000000000000 0000000000000000
[ 0.234213] page dumped because: nonzero _count
[ 0.234218] Modules linked in:
[ 0.234232] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.16.0-rc5 #2
[ 0.234238] Hardware name: Olimex A64-Olinuxino (DT)
[ 0.234244] Call trace:
[ 0.234264] dump_backtrace+0x0/0x198
[ 0.234274] show_stack+0x14/0x20
[ 0.234286] dump_stack+0x98/0xbc
[ 0.234297] bad_page+0xe4/0x148
[ 0.234305] check_new_page_bad+0x68/0x90
[ 0.234315] get_page_from_freelist+0x600/0x1090
[ 0.234324] __alloc_pages_nodemask+0xfc/0xc00
[ 0.234337] alloc_page_interleave+0x18/0xa8
[ 0.234344] alloc_pages_current+0xd4/0xe8
[ 0.234354] new_slab+0x41c/0x610
[ 0.234363] ___slab_alloc+0x4ac/0x560
[ 0.234372] __slab_alloc.isra.23+0x24/0x38
[ 0.234381] kmem_cache_alloc+0x1ac/0x1e0
[ 0.234392] alloc_inode+0x5c/0xa0
[ 0.234401] new_inode_pseudo+0x10/0x50
[ 0.234410] new_inode+0x18/0x38
[ 0.234419] debugfs_get_inode+0x10/0x58
[ 0.234426] __debugfs_create_file+0x4c/0x110
[ 0.234434] debugfs_create_file_unsafe+0x28/0x30
[ 0.234443] debugfs_create_mode_unsafe+0x48/0x50
[ 0.234450] debugfs_create_ulong+0x20/0x28
[ 0.234461] clk_debug_create_one+0x48/0x1a8
[ 0.234473] clk_debug_init+0x10c/0x14c
[ 0.234482] do_one_initcall+0x50/0x160
[ 0.234492] kernel_init_freeable+0x184/0x224
[ 0.234501] kernel_init+0x10/0x108
[ 0.234509] ret_from_fork+0x10/0x18
[ 0.234516] Disabling lock debugging due to kernel taint
[ 0.243399] sun50i-a64-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.244630] console [ttyS0] disabled
[ 0.266350] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 10, base_baud = 1500000) is a U6_16550A
[ 1.393515] console [ttyS0] enabled
[ 1.399569] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[ 1.429285] sunxi-mmc 1c0f000.mmc: base:0x (ptrval) irq:6
[ 1.435580] sun6i-rtc 1f00000.rtc: setting system clock to 1970-01-01 00:00:06 UTC (6)
[ 1.443771] ALSA device list:
[ 1.446755] No soundcards found.
[ 1.450577] Waiting for root device /dev/mmcblk0p2...
[ 1.471160] mmc0: new high speed SDHC card at address 1234
[ 1.478032] mmcblk0: mmc0:1234 SA04G 3.64 GiB
[ 1.484452] mmcblk0: p1 p2
[ 1.503600] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.525088] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.533257] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[ 1.541747] devtmpfs: mounted
[ 1.545547] Freeing unused kernel memory: 1152K
/bin/sh: 0: can't access tty; job control turned off
# [ 210.369977] random: crng init done
Reply to: