raspberrypi / firmware

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.
5.14k stars 1.68k forks source link

Loading U-boot on Raspberry Pi Zero W failed #1157

Open KozikR opened 5 years ago

KozikR commented 5 years ago

Updating start.elf and bootcode.bin to "firmware: Updates for Pi4" (commit Id: 64b5649a41b69d09bfe0ed05448d28a66be3edfd) caused "CACHE: Misaligned operation" warning printed in infinite loop during U-boot starting. Issue not reproduced on firmware from previous commit "kernel: Bump to 4.19.50" (07937c7d48bcd44cc1015c6257ae2cfa5da51298).

U-boot version: v2019.04.

jonathangray commented 5 years ago

After updating to firmware with the release tag of 1.20190620 rpi3b also gets stuck in a loop with U-Boot.

MMC: mmc@7e202000: 0, mmcnr@7e300000: 1 Loading Environment from FAT... OK mbox: Header response code invalid bcm2835: Could not configure display "Synchronous Abort" handler, esr 0x8a000000 elr: b2e262ab67cc3a9b lr : b2e262ab67cc3a9b (reloc) elr: b2e262aba2fa2a9b lr : b2e262aba2fa2a9b x0 : 000000003b000000 x1 : 000000003b000000 x2 : 0000000000000040 x3 : 000000000000003f x4 : 0000000000000008 x5 : 0000000000000000 x6 : 0000000000003500 x7 : 0000000000000015 x8 : 000000003ae00000 x9 : 0000000000000008 x10: 0000000000000000 x11: 0000000000200000 x12: 0000000000000002 x13: 000000003ae00000 x14: 0000000000000000 x15: 00000000ffffffff x16: 0000000000004110 x17: deec4042bc705879 x18: 000000003af5ade8 x19: 0000000000000002 x20: 000000003af6a200 x21: 0000000000000002 x22: 8226bb2ab0cfad09 x23: aa8eafaaeeae8eab x24: 8eaeab8f2a2a3ab7 x25: 0000000000000002 x26: 000000003af6a200 x27: 0000000000000002 x28: 8226bb2ab0cfad09 x29: aaa8aaaaeaa286aa

Resetting CPU ...

resetting ...

pelwell commented 5 years ago

Although we try not to break existing behaviour, we don't officially support U-boot, so you'll need to provide a set of minimal instructions allowing us to reproduce these boot failures.

jonathangray commented 5 years ago

U-Boot will be required as long as hardware doesn't ship with UEFI.

To reproduce an OpenBSD/arm64 network install disk image can be used on rpi3b. dd the following to a uSD card:

https://cdn.openbsd.org/pub/OpenBSD/6.5/arm64/miniroot65.fs

This includes U-Boot 2019.01, u-boot.bin is created from rpi_3_defconfig with CONFIG_OF_EMBED=y removed and CONFIG_OF_BOARD=y added.

It includes raspberrypi-firmware-1.20190215

SHA1 (bootcode.bin) = c43d24c2dbed7cad569e82395bfc29461fd3e2db SHA1 (fixup.dat) = cf7ee5379de97479947a3cccf96111c20f483685 SHA1 (start.elf) = 9ae62dd2723f29b20842035c7e8e1f9eedf4dc82

and uses the following config.txt: arm_64bit=1 enable_uart=1 device_tree_address=0x02600000 kernel=u-boot.bin

With serial attached this disk image boots to an OpenBSD install prompt on rpi3b.

Replacing bootcode.bin fixup.dat and start.elf with the 1.20190620 versions gets stuck in a loop. SHA1 (bootcode.bin) = e895819e68e97eec73ad0aa5ecda8a92745dcae5 SHA1 (fixup.dat) = 28e2b354e11f1bde66f963200f068527552319df SHA1 (start.elf) = 6ba6098877a5b200c5cd10784cad9fae12fa734f

The latest U-Boot master at the time of writing (5eea874b5e989e62519824ad140aa086432d01ee) still has the same problem with the new firmware.

Googulator commented 5 years ago

Does this also affect the RaspberryPiPkg UEFI bootloader?

satmandu commented 5 years ago

I'm seeing a similar issue with current ubuntu server arm64 builds and this new bootcode.bin, which also use u-boot, on a 3b+.

You should be able to write the image at http://cdimage.ubuntu.com/ubuntu-server/daily-preinstalled/current/eoan-preinstalled-server-arm64+raspi3.img.xz to a sd card, and replace the bootcode.bin, .dat, and .elf files on the fat boot partition to see a similar boot issue.

pelwell commented 5 years ago

Thanks, that helps. I am aware of a possible problem for some platforms in situations where a Device Tree file is not available, but I doubt that would be the case here.

ggardet commented 5 years ago

I confirm the problem on RPi3B+

Vogtinator commented 5 years ago

I hit this issue as well while trying to get u-boot to work on the Pi4. Possible workaround:

diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c
index bc41090aed..4c7962cad8 100644
--- a/drivers/video/bcm2835.c
+++ b/drivers/video/bcm2835.c
@@ -19,13 +19,15 @@ static int bcm2835_video_probe(struct udevice *dev)

        debug("bcm2835: Query resolution...\n");
        ret = bcm2835_get_video_size(&w, &h);
-       if (ret)
+       if (ret || w == 0 || h == 0)
                return -EIO;

        debug("bcm2835: Setting up display for %d x %d\n", w, h);
        ret = bcm2835_set_video_params(&w, &h, 32, BCM2835_MBOX_PIXEL_ORDER_RGB,
                                       BCM2835_MBOX_ALPHA_MODE_IGNORED,
                                       &fb_base, &fb_size, &pitch);
+       if(ret)
+               return -EIO;

        debug("bcm2835: Final resolution is %d x %d\n", w, h);
nullr0ute commented 5 years ago

So I tested this on Fedora because we saw something similar. It's late and I only had a RPi3A+ to hand. If necessary I can test across RPi2/3B/3B+ too.

Testing with firmware "2019-06-21 18:44" with both a ARMv7 and aarch64 image both using U-Boot 2019.04 I got the same result but two slightly different outputs. If I have a HDMI display attached they both boot fine, if I don't I have a crash, the 32 bit is the "CACHE: Misaligned operation", on 64 bit I get the ""Synchronous Abort" handler, esr 0x86000004"

RPi3A+ 64 bit, serial console (no display) U-Boot 2019.04:

MMC:   mmc@7e202000: 0, mmcnr@7e300000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

mbox: Header response code invalid
bcm2835: Could not configure display
"Synchronous Abort" handler, esr 0x86000004
elr: 80000003e2141004 lr : 80000003e2141004 (reloc)
elr: 8000000400000004 lr : 8000000400000004
x0 : 000000001dc00000 x1 : 000000001dc00000
x2 : 0000000000000040 x3 : 000000000000003f
x4 : 0000000000000008 x5 : 000000001da00701
x6 : ffffffff80800000 x7 : 0000000000000002
x8 : 000000001da00000 x9 : 0000000000000008
x10: 0000000000000000 x11: 0000000000200000
x12: 0000000000000002 x13: 000000001da00000
x14: 0000000000000000 x15: 0000000000000020
x16: 000000001df66844 x17: 0000000000000000
x18: 000000001db3ade8 x19: 0000000000000000
x20: 000000001df671fc x21: 8000000000000020
x22: 0000000800028001 x23: 0000000080000008
x24: 0000000000000001 x25: 000000001db467f0
x26: 000000001db46a30 x27: 0000000000000002
x28: 000000001db46a38 x29: 0004000800000000

Resetting CPU ...

resetting ...

RPi3A+ 64 bit, serial console (HDMI display) U-Boot 2019.04:

boots as expected

RPi3A+ 32 bit, serial console (no display) U-Boot 2019.04:

MMC:   mmc@7e202000: 0, mmcnr@7e300000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

mbox: Header response code invalid
bcm2835: Could not configure display
In:    serial
Out:   vidconsole
Err:   vidconsole
Net:   CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]
CACHE: Misaligned operation at range [1dfbabe8, 1dfbac00]

RPi3A+ 32 bit, serial console (HDMI display) U-Boot 2019.04:

boots as expected
nullr0ute commented 5 years ago

To reproduce it's probably enough just to put the U-Boot binary in the VFAT partition and adjust the config.txt. The relevant bits for the Fedora config is basically:

64 bit:

[pi3]
kernel=rpi3-u-boot.bin
# Put the RPi3 into 64 bit mode
arm_control=0x200
[all]
# Enable UART
enable_uart=1

32 bit:

[pi2]
kernel=rpi2-u-boot.bin
[pi3]
kernel=rpi3_32-u-boot.bin
[all]
# Enable UART
enable_uart=1

The above U-Boot builds can be found here: https://pbrobinson.fedorapeople.org/rpi-u-boot/

Looking at the output above given it works fine with a HDMI display attached and doesn't without, at least for me (others may be able to confirm whether their configs are headless) I suspect these two lines might be of issue (I don't see them with a display attached):

mbox: Header response code invalid
bcm2835: Could not configure display
GoofySpeed commented 5 years ago

I'm also having the same issue on a Raspberry Pi 3 running Arch Linux Arm aarch64, the following is the serial output during the loop. Just like @nullr0ute I was able to get it to boot by hooking the HDMI to a monitor, then just remove the monitor after a successful boot. I was talking with an individual on Reddit about this problem, but they were not able to get it to boot with a monitor attached, https://www.reddit.com/r/archlinux/comments/c6pzv3/anyone_elses_raspberry_pi_dead/.



DRAM:  948 MiB
RPI 3 Model B (0xa02082)
MMC:   mmc@7e202000: 0, sdhci@7e300000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

Failed (-5)
mbox: Header response code invalid
bcm2835: Could not configure display
"Synchronous Abort" handler, esr 0x86000004
elr: 80000003c4d3b004 lr : 80000003c4d3b004 (reloc)
elr: 8000000400000004 lr : 8000000400000004
x0 : 000000003b000000 x1 : 000000003b000000
x2 : 0000000000000040 x3 : 000000000000003f
x4 : 0000000000000008 x5 : 0000000000000000
x6 : ffffffff80800000 x7 : 0000000000000002
x8 : 000000003ae00000 x9 : 0000000000000008
x10: 0000000000200000 x11: 0000000000000000
x12: 0000000000000002 x13: 000000003ae00000
x14: 0000000000000000 x15: 00000000ffffffff
x16: 0000000000004110 x17: fe4fff49ed2df6ec
x18: 000000003af40df0 x19: 0000000000000000
x20: 000000003b36afbc x21: 000000003af44ad8
x22: 0000000000000002 x23: 0004000800000000
x24: 8000000400000004 x25: 000000003af44ad0
x26: 000000003af44890 x27: 000000003af44ad8
x28: 0000000000000002 x29: 0004000800000000

Resetting CPU ...

resetting ...```
Vogtinator commented 5 years ago

@nullr0ute @GoofySpeed: Can you try the diff I posted?

lategoodbye commented 5 years ago

The video driver in u-boot relies on the mbox interface. I think the problem is the introduction of multi framebuffer support. This possibly resulted in change in the mbox property 0x00040003 (Get physical display width / height) behavior (https://github.com/raspberrypi/linux/commit/4600e91bb6dd75140bbafb271f30370bc2e33d60#diff-7434d1db58b58fb45a55de66c12bdc1a).

First the documentation of the mbox should be updated and then the video driver in u-boot.

6by9 commented 5 years ago

I thought @JamesH65 had retained the old API too.

JamesH65 commented 5 years ago

I don't remember changing that API, and did put in a lot of effort to retain backwards compatibility. I'll check the mbox call.

JamesH65 commented 5 years ago

Cannot see any changes to that specific property. There are additional properties -

  SET_DISPLAY_NUM            = 0x00048013,
  GET_NUM_DISPLAYS           = 0x00040013,
  GET_DISPLAY_SETTINGS       = 0x00040014,

which are used for multiframebuffer support. But things should work without using any of those, but perhaps not. I guess will need to debug at the firmware level but not time to set everything up and understand how uboot works to look at that right now.

nullr0ute commented 5 years ago

It seems to work, at least for me, when a display is attached to HDMI, it's when there's no display that things fall apart.

Vogtinator commented 5 years ago

Let me go into more detail what the diff I posted works around.

u-boot first queries the "GET_PHYSICAL_W_H" property, but with the newer firmware that fails (response is not 0x80000000).

u-boot prints an error message but ignores the error. This leads to u-boot using uninitialized values for the width and height, causing the reported cache warnings and aborts.

lategoodbye commented 5 years ago

@Vogtinator Could you please clarify the influence of "HDMI attached or not"?

JamesH65 commented 5 years ago

Hmm, so maybe when no device is attached, there is no default values for width and height and somehow that affects the mbox call. I'll have a quick look.

satmandu commented 5 years ago

@Vogtinator I can confirm that your patch allows current firmware to be used to boot a current arm64 build of ubuntu using (patched) u-boot without any attached monitor.

On 3B+:

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.0.0-1012-raspi2 (buildd@bos02-arm64-060) (gcc version 8.3.0 (Ubuntu/Linaro 8.3.0-6ubuntu1)) #12-Ubuntu SMP Mon Jun 24 17:20:46 UTC 2019 (Ubuntu 5.0.0-1012.12-raspi2 5.0.8)
[    0.000000] Machine model: Raspberry Pi 3 Model B Plus Rev 1.3
[    0.000000] cma: Reserved 8 MiB at 0x000000003ac00000
[    0.000000] On node 0 totalpages: 242688
[    0.000000]   DMA32 zone: 3792 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 242688 pages, LIFO batch:63
[    0.000000] random: get_random_bytes called from start_kernel+0xa0/0x4a8 with crng_init=0
[    0.000000] percpu: Embedded 24 pages/cpu @(____ptrval____) s60952 r8192 d29160 u98304
[    0.000000] pcpu-alloc: s60952 r8192 d29160 u98304 alloc=24*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: detected: ARM erratum 843419
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 238896
[    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fsck.mode=force fsck.repair=yes lan78xx.blacklist=yes
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Memory: 892320K/970752K available (11774K kernel code, 1184K rwdata, 3552K rodata, 4096K init, 1128K bss, 70240K reserved, 8192K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 34407 entries in 135 pages
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000003] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000144] Console: colour dummy device 80x25
[    0.000355] printk: console [tty1] enabled
[    0.000394] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=76800)
[    0.000414] pid_max: default: 32768 minimum: 301
[    0.000572] LSM: Security Framework initializing
[    0.000611] Yama: becoming mindful.
[    0.000693] AppArmor: AppArmor initialized
[    0.000830] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.000854] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.001652] Disabling memory control group subsystem
[    0.002566] ASID allocator initialised with 32768 entries
[    0.002682] rcu: Hierarchical SRCU implementation.
[    0.004694] smp: Bringing up secondary CPUs ...
[    0.005295] Detected VIPT I-cache on CPU1
[    0.005339] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.006150] Detected VIPT I-cache on CPU2
[    0.006176] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.006957] Detected VIPT I-cache on CPU3
[    0.006981] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.007200] smp: Brought up 1 node, 4 CPUs
[    0.007258] SMP: Total of 4 processors activated.
[    0.007271] CPU features: detected: 32-bit EL0 Support
[    0.007283] CPU features: detected: CRC32 instructions
[    0.010919] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.010940] CPU: All CPU(s) started at EL2
[    0.010997] alternatives: patching kernel code
[    0.012649] devtmpfs: initialized
[    0.018825] Enabled cp15_barrier support
[    0.018854] Enabled setend support
[    0.019162] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.019185] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.019641] pinctrl core: initialized pinctrl subsystem
[    0.020496] NET: Registered protocol family 16
[    0.022647] audit: initializing netlink subsys (disabled)
[    0.022852] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[    0.023204] cpuidle: using governor ladder
[    0.023230] cpuidle: using governor menu
[    0.023482] vdso: 2 pages (1 code @ (____ptrval____), 1 data @ (____ptrval____))
[    0.023497] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.025038] DMA: preallocated 256 KiB pool for atomic allocations
[    0.025183] Serial: AMBA PL011 UART driver
[    0.027045] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.043608] bcm2835-dma 3f007000.dma: DMA legacy API manager at (____ptrval____), dmachans=0x1
[    0.045290] SCSI subsystem initialized
[    0.045489] libata version 3.00 loaded.
[    0.045662] usbcore: registered new interface driver usbfs
[    0.045699] usbcore: registered new interface driver hub
[    0.045759] usbcore: registered new device driver usb
[    0.045975] pps_core: LinuxPPS API ver. 1 registered
[    0.045986] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.046007] PTP clock support registered
[    0.046200] EDAC MC: Ver: 3.0.0
[    0.051055] raspberrypi-firmware soc:firmware: Attached to firmware from 2019-07-02 15:14, variant start
[    0.055056] raspberrypi-firmware soc:firmware: Firmware hash is ed91d1ef6611f40e1881cdb241f30a11e0d8b5db

On 3B:

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.0.0-1012-raspi2 (buildd@bos02-arm64-060) (gcc version 8.3.0 (Ubuntu/Linaro 8.3.0-6ubuntu1)) #12-Ubuntu SMP Mon Jun 24 17:20:46 UTC 2019 (Ubuntu 5.0.0-1012.12-raspi2 5.0.8)
[    0.000000] Machine model: Raspberry Pi 3 Model B Rev 1.2
[    0.000000] cma: Reserved 8 MiB at 0x000000003ac00000
[    0.000000] On node 0 totalpages: 242688
[    0.000000]   DMA32 zone: 3792 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 242688 pages, LIFO batch:63
[    0.000000] random: get_random_bytes called from start_kernel+0xa0/0x4a8 with crng_init=0
[    0.000000] percpu: Embedded 24 pages/cpu @(____ptrval____) s60952 r8192 d29160 u98304
[    0.000000] pcpu-alloc: s60952 r8192 d29160 u98304 alloc=24*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: detected: ARM erratum 843419
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 238896
[    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Memory: 892680K/970752K available (11774K kernel code, 1184K rwdata, 3552K rodata, 4096K init, 1128K bss, 69880K reserved, 8192K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 34407 entries in 135 pages
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000007] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000253] Console: colour dummy device 80x25
[    0.000661] printk: console [tty1] enabled
[    0.000726] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=76800)
[    0.000766] pid_max: default: 32768 minimum: 301
[    0.001058] LSM: Security Framework initializing
[    0.001131] Yama: becoming mindful.
[    0.001274] AppArmor: AppArmor initialized
[    0.001530] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.001575] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.003010] Disabling memory control group subsystem
[    0.004702] ASID allocator initialised with 32768 entries
[    0.004926] rcu: Hierarchical SRCU implementation.
[    0.008447] smp: Bringing up secondary CPUs ...
[    0.009578] Detected VIPT I-cache on CPU1
[    0.009647] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.011164] Detected VIPT I-cache on CPU2
[    0.011212] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.012803] Detected VIPT I-cache on CPU3
[    0.012848] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.013277] smp: Brought up 1 node, 4 CPUs
[    0.013388] SMP: Total of 4 processors activated.
[    0.013413] CPU features: detected: 32-bit EL0 Support
[    0.013438] CPU features: detected: CRC32 instructions
[    0.020363] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.020398] CPU: All CPU(s) started at EL2
[    0.020500] alternatives: patching kernel code
[    0.023553] devtmpfs: initialized
[    0.036564] Enabled cp15_barrier support
[    0.036620] Enabled setend support
[    0.037257] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.037305] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.038166] pinctrl core: initialized pinctrl subsystem
[    0.039833] NET: Registered protocol family 16
[    0.044593] audit: initializing netlink subsys (disabled)
[    0.044961] audit: type=2000 audit(0.044:1): state=initialized audit_enabled=0 res=1
[    0.045652] cpuidle: using governor ladder
[    0.045713] cpuidle: using governor menu
[    0.046190] vdso: 2 pages (1 code @ (____ptrval____), 1 data @ (____ptrval____))
[    0.046223] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.049596] DMA: preallocated 256 KiB pool for atomic allocations
[    0.049892] Serial: AMBA PL011 UART driver
[    0.053940] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.091970] bcm2835-dma 3f007000.dma: DMA legacy API manager at (____ptrval____), dmachans=0x1
[    0.095696] SCSI subsystem initialized
[    0.096041] libata version 3.00 loaded.
[    0.096305] usbcore: registered new interface driver usbfs
[    0.096397] usbcore: registered new interface driver hub
[    0.096535] usbcore: registered new device driver usb
[    0.096964] pps_core: LinuxPPS API ver. 1 registered
[    0.096988] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.097035] PTP clock support registered
[    0.097406] EDAC MC: Ver: 3.0.0
[    0.105074] raspberrypi-firmware soc:firmware: Attached to firmware from 2019-07-02 15:14, variant start
[    0.109080] raspberrypi-firmware soc:firmware: Firmware hash is ed91d1ef6611f40e1881cdb241f30a11e0d8b5db
GoofySpeed commented 5 years ago

@Vogtinator Yes, the workaround worked for my Arch Linux Arm aarch64. Thanks

Edited: Boot console added


U-Boot 2019.07-rc4 (Jul 02 2019 - 23:22:24 -0400)

DRAM:  948 MiB
RPI 3 Model B (0xa02082)
MMC:   mmc@7e202000: 0, sdhci@7e300000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
starting USB...
Bus usb@7e980000: scanning bus usb@7e980000 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  2  1  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
708 bytes read in 1 ms (691.4 KiB/s)
## Executing script at 02400000
25778688 bytes read in 1070 ms (23 MiB/s)
19477 bytes read in 4 ms (4.6 MiB/s)
7262444 bytes read in 304 ms (22.8 MiB/s)
## Flattened Device Tree blob at 02600000
   Booting using the fdt blob at 0x2600000
   Using Device Tree in place at 0000000002600000, end 0000000002607c14

Starting kernel ...
...
[    6.918142] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
...

Arch Linux 5.1.15-2-ARCH (ttyS1)

alarm login: `
ggardet commented 5 years ago

I cannot reproduce on my Pi3B+ with https://github.com/raspberrypi/firmware/commit/025759b8634c2f8df35203be02c19a0633f1cec1

Same for you guys?

mbgg commented 5 years ago

I cannot reproduce on my Pi3B+ with 025759b

Same for you guys?

I tried with RPi3B and it worked. I suppose that got fixed in the new FW. @JamesH65 can you confirm please.

JamesH65 commented 5 years ago

There was a change to ensure composite started up correctly if nothing else did which may have fixed this issue - it would mean if nothing was connected, a composite display would be assumed, which in turn would mean a default framebuffer would be created.

jonathangray commented 5 years ago

The 1.20190709 tagged firmware works with U-Boot on rpi3b.

nullr0ute commented 5 years ago

When testing RPi4 support with this patch set for U-Boot with the 2019.07 release https://lists.denx.de/pipermail/u-boot/2019-July/378340.html I'm seeing the same crash on a RPi4 4Gb Edition when the display isn't attached using firmware cba4be2 (Jul 15):

MMC:   emmc2@7e340000: 0, mmcnr@7e300000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

mbox: Header response code invalid
bcm2835: Could not configure display
"Synchronous Abort" handler, esr 0x86000004
elr: 80000003c2116004 lr : 80000003c2116004 (reloc)
elr: 8000000400000004 lr : 8000000400000004
x0 : 000000003dc00000 x1 : 000000003dc00000
x2 : 0000000000000040 x3 : 000000000000003f
x4 : 0000000000000008 x5 : 000000003da00701
x6 : ffffffff80800000 x7 : 0000000000000002
x8 : 000000003da00000 x9 : 0000000000000008
x10: 0000000000000000 x11: 0000000000200000
x12: 0000000000000002 x13: 000000003da00000
x14: 0000000000000000 x15: 0000000000000020
x16: 000000003df8a8f0 x17: 4293900008300680
x18: 000000003db65de8 x19: 0000000000000000
x20: 000000003df8cad4 x21: 8000000000000020
x22: 0000000800028001 x23: 0000000080000008
x24: 0000000000000001 x25: 000000003db73b50
x26: 000000003db73d10 x27: 0000000000000002
x28: 000000003db73d18 x29: 0004000800000000

Resetting CPU ...

resetting ...
mbgg commented 5 years ago

Please try to cherry-pick: 970baf16d1 ("video: arm: rpi: Bail out early if querying video information fails")

From the master branch.

nullr0ute commented 5 years ago

It had been fixed in firmware for the rpi3, will take a look

SamPovilus commented 4 years ago

I'm trying this on a rpi4 2gbyte, I have head and 970baf16d1 has been merged, I still get this error. Anybody got any other thoughts?

I tried with a monitor attached to hdmi 0 and with it attached to hdmi 1, but I don't have enough mini-hdmi cables to try both.

Edit: Wait, I'm confused now, kernel is starting and I'm seeing this in the kernel? Im trying to get 5.2 64 bit Linux working.

[19:16:22:846] U-Boot 2020.01-rc3-00082-g4b19b89ca4 (Nov 30 2019 - 18:54:25 -0700)␍␊ [19:16:22:846] ␍␊ [19:16:22:846] DRAM: 1.9 GiB␍␊ [19:16:22:878] RPI 4 Model B (0xb03111)␍␊ [19:16:22:910] MMC: emmc2@7e340000: 0, mmcnr@7e300000: 1␍␊ [19:16:22:910] Loading Environment from FAT... OK␍␊ [19:16:23:028] In: serial␍␊ [19:16:23:028] Out: serial␍␊ [19:16:23:028] Err: serial␍␊ [19:16:23:028] Net: Net Initialization Skipped␍␊ [19:16:23:028] No ethernet found.␍␊ [19:16:23:028] Hit any key to stop autoboot: 20 <0x08><0x08><0x08>19 <0x08><0x08><0x08>18 <0x08><0x08><0x08>17 <0x08><0x08><0x08>16 <0x08><0x08><0x08>15 <0x08><0x08><0x08>14 <0x08><0x08><0x08>13 <0x08><0x08><0x08>12 <0x08><0x08><0x08>11 <0x08><0x08><0x08>10 <0x08><0x08><0x08> 9 <0x08><0x08><0x08> 8 <0x08><0x08><0x08> 7 <0x08><0x08><0x08> 6 <0x08><0x08><0x08> 5 <0x08><0x08><0x08> 4 <0x08><0x08><0x08> 3 <0x08><0x08><0x08> 2 <0x08><0x08><0x08> 1 <0x08><0x08><0x08> 0 ␍␊ [19:16:43:057] switch to partitions #0, OK␍␊ [19:16:43:057] mmc0 is current device␍␊ [19:16:43:073] Scanning mmc 0:1...␍␊ [19:16:43:152] Found U-Boot script /boot.scr.uimg␍␊ [19:16:43:212] 330 bytes read in 36 ms (8.8 KiB/s)␍␊ [19:16:43:212] ## Executing script at 02400000␍␊ [19:16:43:252] switch to partitions #0, OK␍␊ [19:16:43:252] mmc0 is current device␍␊ [19:16:43:252] Saving Environment to FAT... OK␍␊ [19:16:43:364] 40559 bytes read in 26 ms (1.5 MiB/s)␍␊ [19:16:43:801] 5032408 bytes read in 405 ms (11.8 MiB/s)␍␊ [19:16:43:801] Kernel image @ 0x080000 [ 0x000000 - 0x4cc9d8 ]␍␊ [19:16:43:801] ## Flattened Device Tree blob at 02600000␍␊ [19:16:43:801] Booting using the fdt blob at 0x2600000␍␊ [19:16:43:801] Loading Device Tree to 000000003af48000, end 000000003af54e6e ... OK␍␊ [19:16:43:801] ␍␊ [19:16:43:801] Starting kernel ...␍␊ [19:16:43:801] ␍␊ [19:16:43:847] "Synchronous Abort" handler, esr 0x02000000␍␊ [19:16:43:847] elr: ffffffffc4d98000 lr : 0000000000082734 (reloc)␍␊ [19:16:43:847] elr: 0000000000080000 lr : 000000003b36a734␍␊ [19:16:43:847] x0 : 000000003af48000 x1 : 0000000000000000␍␊ [19:16:43:847] x2 : 0000000000000000 x3 : 0000000000000000␍␊ [19:16:43:847] x4 : 0000000000080000 x5 : 0000000000000001␍␊ [19:16:43:847] x6 : 0000000000000008 x7 : 0000000000000000␍␊ [19:16:43:847] x8 : 000000003af56798 x9 : 0000000000000002␍␊ [19:16:43:847] x10: 000000000a200023 x11: 0000000000000002␍␊ [19:16:43:847] x12: 0000000000000002 x13: 000000003af54e6e␍␊ [19:16:43:847] x14: 000000003af566e8 x15: 000000003b369b0c␍␊ [19:16:43:894] x16: 000000003b38cf10 x17: 0000000000000000␍␊ [19:16:43:894] x18: 000000003af63dd0 x19: 000000003b3d5618␍␊ [19:16:43:894] x20: 0000000000000000 x21: 0000000000000400␍␊ [19:16:43:894] x22: 0000000000000003 x23: 000000003af863d8␍␊ [19:16:43:894] x24: 0000000000000003 x25: 000000003af863d8␍␊ [19:16:43:894] x26: 000000003b3c7f90 x27: 0000000000000000␍␊ [19:16:43:894] x28: 000000003af86400 x29: 000000003af567d0␍␊ [19:16:43:894] ␍␊ [19:16:43:894] Code: ffffffff ffffffff ffffffff ffffffff (e1a00000) ␍␊ [19:16:43:894] Resetting CPU ...␍␊ [19:16:43:894] ␍␊ [19:16:43:990] resetting ...␍␊ [19:16:44:032] [19:16:48:888] ␍␊ [19:16:48:888] ␍␊ [19:16:48:888] U-Boot 2020.01-rc3-00082-g4b19b89ca4 (Nov 30 2019 - 18:54:25 -0700)␍␊

ggardet commented 4 years ago

It looks like a different issue, since this is after Starting kernel... message.

vivsundar commented 3 years ago

@nullr0ute @SamPovilus I to observed this issue with Rpi 4B board with the latest master branch of u-boot code. But with Tag v2020.07 this issue does not occur.

rzr commented 3 years ago

I am tracking related issues on latest release observed on RPi4

https://github.com/raspberrypi/firmware/search?q=%22Synchronous+Abort%22+handler%2C+esr&type=issues

https://github.com/raspberrypi/firmware/issues/1165

https://github.com/raspberrypi/firmware/issues/1157