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: 00
INFO:BL3-1: Initializing runtime services
INFO:BL3-1: Preparing for EL3 exit to normal world
INFO:BL3-1: Next image address: 0x4a00, 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 4fc0
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 49ffb000, end 4915 ... OK
Starting kernel ...
[0.00] Booting Linux on physical CPU 0x00 [0x410fd034]
[0.00] 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.00] Machine model: Olimex A64-Olinuxino
[0.00] efi: Getting EFI parameters from FDT:
[0.00] efi: UEFI not found.
[0.00] cma: Reserved 16 MiB at 0x7f00
[0.00] NUMA: No NUMA configuration found
[0.00] NUMA: Faking a node at [mem
0x-0x7fff]
[0.00] NUMA: NODE_DATA [mem 0x7efe9e80-0x7efeb97f]
[0.00] Zone ranges:
[0.00] DMA32[mem 0x4000-0x7fff]
[0.00] Normal empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00] node 0: [mem 0x4000-0x7fff]
[0.00] Initmem setup node 0 [mem 0x4000-0x7fff]
[0.00] psci: probing for conduit method from DT.
[0.00] psci: PSCIv0.2 detected in firmware.
[0.00] psci: Using standard PSCI v0.2 function IDs
[0.00] psci: Trusted OS migration not required
[0.00] random: get_random_bytes called from start_kernel+0xac/0x40c
with crng_init=0
[0.00] percpu: Embedded 24 pages/cpu @(ptrval) s57880 r8192
d32232 u98304
[0.00] Detected VIPT I-cache on CPU0
[0.00] CPU features: enabling workaround for ARM erratum 845719
[0.00] Built 1 zonelists, mobility grouping on. Total pages: 258048
[0.00] Policy zone: DMA32
[0.00] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2
rootwait panic=10
[0.00] Memory: 997684K/1048576K available (10108K kernel code, 1252K
rwdata, 4620K rodata, 1152K init, 404K bss, 34508K reserved, 16384K
cma-reserved)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[0.00] Preemptible hierarchical RCU implementation.
[0.00] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[0.00] Tasks RCU enabled.
[0.00] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[0.00] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[0.00] GIC: Using split EOI/Deactivate mode
[0.00] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[0.00] clocksource: arch_sys_counter: mask: 0xff
max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[0.05] 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