[U-Boot] [BUG] Wandboard fails to boot via U-Boot bootefi, GRUB

Leif Lindholm leif.lindholm at linaro.org
Mon Jul 1 14:02:35 UTC 2019


Hi Heinrich,

On Sat, Jun 29, 2019 at 07:47:10PM +0200, Heinrich Schuchardt wrote:
> Hello Leif,
> 
> the Wandboard Quad rev B1 cannot be booted via U-Boot, GRUB-efi-arm.
> GRUB loads the initial ramdisk into an area which the the mainline
> 4.19.55 kernel simply does not accept because it thinks the minimum
> address is 0x68000000 and not 0x10000000. Booting via bootz works
> without problem.
> 
> Did you see a similar problems before?

Hmm...
It's been about 5 years since I looked at this code in Linux last, so
I may need to start with some stupid questions.

> This is the memory map when it is last read from U-Boot.
> 
> typ, phys, virt, pages, attrib
> 00000002, 8f797000, 8f797000,              869,                8
> 00000005, 8f796000, 8f796000,                1, 8000000000000008
> 00000002, 8dd8c000, 8dd8c000,             1a0a,                8
> 00000000, 8dd8b000, 8dd8b000,                1,                8
> 00000006, 8dd8a000, 8dd8a000,                1, 8000000000000008
> 00000000, 8dd83000, 8dd83000,                7,                8
> 00000006, 8dd82000, 8dd82000,                1, 8000000000000008
> 00000000, 8dd7e000, 8dd7e000,                4,                8
> 00000001, 8dd67000, 8dd67000,               17,                8
> 00000004, 8dd66000, 8dd66000,                1,                8
> 00000000, 8dd64000, 8dd64000,                2,                8
> 00000002, 8dd63000, 8dd63000,                1,                8
> 00000006, 8dd62000, 8dd62000,                1, 8000000000000008
> 00000002, 8dd61000, 8dd61000,                1,                8
> 00000001, 6e60c000, 6e60c000,            1f755,                8
> 00000002, 6e1f8000, 6e1f8000,              414,                8
> 00000001, 6dded000, 6dded000,              40b,                8
> 00000002, 6ddec000, 6ddec000,                1,                8
> 00000004, 6ddeb000, 6ddeb000,                1,                8
> 00000002, 6dde9000, 6dde9000,                2,                8
> 00000007, 2ffff000, 2ffff000,            3ddea,                8
> 00000002, 2e1f1000, 2e1f1000,             1e0e,                8

According to this, we have an allocation of somewhat below 8MB, I
assume this matches the size of the initrd?

> 00000007, 17f0c000, 17f0c000,            162e5,                8
> 00000004, 17f00000, 17f00000,                c,                8
> 00000002, 17d00000, 17d00000,              200,                8
> 00000007, 1240b000, 1240b000,             58f5,                8
> 00000002, 12000000, 12000000,              40b,                8
> 00000004, 10000000, 10000000,             2000,                8
> 
> The initial ramdisk is loaded at 2e1f1000.
> 
> The problem occurs in drivers/of/fdt.c where some memory areas including
> the one containig the initial ramdisk are excluded. I have added some
> extra debug lines to early_init_dt_add_memory_arch().

Do you have a pointer to the device tree sources?
If the DT is explicitly excluding regions not marked such in the UEFI
memory map ... that would cause problems.

Best Regards,

Leif

> [    0.000000] Booting Linux on physical CPU 0x0
> [    0.000000] Linux version 4.19.55-armmp (zfsdt at family) (gcc version
> 8.3.0 (Debian 8.3.0-6)) #8 SMP Sat Jun 29 17:04:52 CES9
> [    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7),
> cr=10c5387d
> [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
> instruction cache
> [    0.000000] OF: fdt: Machine model: Wandboard i.MX6 Quad Board rev B1
> [    0.000000] OF: fdt: base 10000000 < phys_offset 68000000
> [    0.000000] OF: fdt: Ignoring memory range 0x10000000 - 0x68000000
> [    0.000000] bootconsole [earlycon0] enabled
> [    0.000000] Memory policy: Data cache writealloc
> [    0.000000] efi: Getting EFI parameters from FDT:
> [    0.000000] efi: EFI v2.80 by Das U-Boot
> [    0.000000] efi:  SMBIOS=0x8dd82000
> [    0.000000] OF: fdt: base 0000000010000000 + size 0000000002000000 <
> phys_offset 0000000068000000
> [    0.000000] OF: fdt: Ignoring memory block 0x10000000 - 0x12000000
> [    0.000000] OF: fdt: base 0000000012000000 + size 000000000040b000 <
> phys_offset 0000000068000000
> [    0.000000] OF: fdt: Ignoring memory block 0x12000000 - 0x1240b000
> [    0.000000] OF: fdt: base 000000001240b000 + size 00000000058f5000 <
> phys_offset 0000000068000000
> [    0.000000] OF: fdt: Ignoring memory block 0x1240b000 - 0x17d00000
> [    0.000000] OF: fdt: base 0000000017d00000 + size 0000000000200000 <
> phys_offset 0000000068000000
> [    0.000000] OF: fdt: Ignoring memory block 0x17d00000 - 0x17f00000
> [    0.000000] OF: fdt: phys_offset 0000000068000000
> [    0.000000] OF: fdt: base 0000000017f00000 + size 000000000000c000 <
> phys_offset 0000000068000000
> [    0.000000] OF: fdt: Ignoring memory block 0x17f00000 - 0x17f0c000
> [    0.000000] OF: fdt: phys_offset 0000000068000000
> [    0.000000] OF: fdt: base 0000000017f0c000 + size 00000000162e5000 <
> phys_offset 0000000068000000
> [    0.000000] OF: fdt: Ignoring memory block 0x17f0c000 - 0x2e1f1000
> [    0.000000] OF: fdt: phys_offset 0000000068000000
> [    0.000000] OF: fdt: base 000000002e1f1000 + size 0000000001e0e000 <
> phys_offset 0000000068000000
> [    0.000000] OF: fdt: Ignoring memory block 0x2e1f1000 - 0x2ffff000
> [    0.000000] INITRD: 0x2e1f1000+0x01e0e000 is not a memory region -
> disabling initrd
> [    0.000000] cma: Reserved 16 MiB at 0x8e000000
> [    0.000000] Unable to handle kernel paging request at virtual address
> 6fd00000
> [    0.000000] pgd = (ptrval)
> [    0.000000] [6fd00000] *pgd=00000000
> [    0.000000] Internal error: Oops: 5 [#1] SMP ARM
> [    0.000000] Modules linked in:
> [    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.55-armmp #8
> [    0.000000] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
> [    0.000000] PC is at fdt_check_header+0xc/0x80
> [    0.000000] LR is at __unflatten_device_tree+0x4c/0x274
> [    0.000000] pc : [<c0ae9d48>]    lr : [<c09696dc>]    psr: 200000d3
> [    0.000000] sp : c1201ec0  ip : c1201ed0  fp : c1201ecc
> [    0.000000] r10: c1316340  r9 : 00000000  r8 : c135e308
> [    0.000000] r7 : 00000000  r6 : 6fd00000  r5 : c1074be8  r4 : c1074be8
> [    0.000000] r3 : c1074be8  r2 : c135e308  r1 : 00000000  r0 : 6fd00000
> [    0.000000] Flags: nzCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM
> Segment none
> [    0.000000] Control: 10c5387d  Table: 6820404a  DAC: 00000051
> [    0.000000] Process swapper (pid: 0, stack limit = 0x(ptrval))
> [    0.000000] Stack: (0xc1201ec0 to 0xc1202000)
> [    0.000000] 1ec0: c1201efc c1201ed0 c09696dc c0ae9d48 c1074be8
> c1074be8 c1209900 8fffffff
> [    0.000000] 1ee0: 8f980000 c1349880 e7fffc80 c1316340 c1201f1c
> c1201f00 c1076000 c096969c
> [    0.000000] 1f00: 00000000 c1201f10 c0358230 c1083028 c1201fa4
> c1201f20 c1004a38 c1075fc8
> [    0.000000] 1f20: ffffffff 10c5387d c03bcd50 c03bc83c c0d61908
> c0d6349c c1205dcc c1201fbc
> [    0.000000] 1f40: c0e340c8 fffff000 c1201fa4 c1201f58 c1022158
> c0af8b54 c1205dcc c1205dcc
> [    0.000000] 1f60: c1205dcc ffffffff c1201f94 c1201f78 c03bd0c8
> 00000000 c1201f9c 00000000
> [    0.000000] 1f80: c1205dcc c1205dcc ffffffff c1205dc0 412fc09a
> 10c5387d c1201ff4 c
> 
> Best regards
> 
> Heinrich


More information about the U-Boot mailing list