-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boot process hangs during start.elf when MT7921K is connected #1766
Comments
After a successful reboot I can trigger a kernel panic by disabling and enabling PCIe via an overlay, it sometimes requires disabling and enabling PCIe several times, but eventually I can trigger a kernel panic. Here is the output. [ 69.005037] SError Interrupt on CPU0, code 0x00000000bf000002 -- SError |
I don't think enabling PCie at runtime is supported. I wouldn't be surprised (can't check right now) if the firmware has to turn on some clocks etc. |
Adding dtparm=pcie=off to boot/config.txt I was able to disable PCIe and get the system to reliably boot/reboot without hanging. After the system is booted I can use dtparm pcie=on to enable PCIe and the MT7921K Wi-Fi module, however intermittently the system will kernel panic while PCIe is enabling, I'm assuming this is the same reason the system hangs trying to load the kernel. Any ideas how to debug what is causing this? �recover4.elf not found (6) ASRT:00:00:05.120497:0: ../../../../../vcfw/drivers/chip/vciv/2708/clock_2711.c::clock_wait_busy!2151: timeout != 0 |
We are running into the exact same issue on our custom board. Except on the other end of our PCI lane is a PCI Packet Switch (PI7C9X2G606PRDNJAE) off of that is a Texas Instruments USB host controller (TUSB7340IRKMT). We plug in various E key wifi modules, but even without any plugged in we run into this unfortunate reboot issue. This is a piece of industrial equipment that will be placed in hard to reach places. Unreliable reboots are going to be an issue that we need to resolve before we can deploy. Any insight on how to handle this would be appreciated. Boot Uart final output before getting stuck: [ 201.589330] reboot: Restarting system RPi: BOOTLOADER release VERSION:0fc8fc8e DATE: 2022/12/07 TIME: 14:24:15 Boot mode: USB-MSD (04) order f2561 A successful boot looks like this: RPi: BOOTLOADER release VERSION:0fc8fc8e DATE: 2022/12/07 TIME: 14:24:15 Boot mode: USB-MSD (04) order f2561 Ubuntu 22.04 LTS node4969 ttyS0 node4969 login: Lots of pcieport errors, but once it is up pci works great and without any issues. Any pointers on where to start looking for a solution would be great! |
@CGDevHusky92 the workaround we've come up with is to disable PCIe on boot and then enable PCIe after boot. Not ideal, but it does work around the issue and prevents the unit from hanging on boot. |
@jolla I'm dealing with this EXACT same issue. You talk about disabling pcie using config.txt and enabling it after boot. Could you explain in a bit more detail on how you are doing this? |
I forgot about this post, but I actually found a patch that helped a few months after commenting here. I can't for the life of me find where this patch exists on the internet, but it fixed all of my pci reset issues without the need to shut off and turn on pci. I have posted a copy of the patch to the pastebin below and I think I had modified it slightly for openwrt os, but hopefully it can help you or anyone else that finds it. |
I'm using OpenWRT as well. Looking at your patch, I found a VERY similar patch on the snapshot branch. Did you have the freezing right before starting the linux kernel, or the "PCIe Bus Error" messages, or both? |
Oh nice for some reason I couldn’t find it. It was mostly the freeze prior to kernel start. On a different custom board using a different pci packet switch we would get the bus error and then it would come up with no devices. This patch fixed it for both boards in our case.On Oct 9, 2024, at 6:35 PM, Christopher McKinzie ***@***.***> wrote:
@CGDevHusky92
I'm using OpenWRT as well. Looking at your patch, I found a VERY similar patch on the snapshot tree. Did you have the freezing right before starting the linux kernel, or the "PCIe Bus Error" messages, or both?
Patch:
https://github.com/openwrt/openwrt/blob/c3251f5d52aef636f0cec432a27bf90f7537e1e7/target/linux/bcm27xx/patches-6.6/950-0697-drivers-pci-brcmstb-optionally-extend-Tperst_clk-tim.patch
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
K, just to make a note for others, running OpenWRT on the snapshot branch, I was able to overcome my issues by adding "pcie_tperst_clk_ms=300" to /boot/config.txt. The snapshot branch had the patch discussed above already installed. |
Describe the bug
Boot process intermittantly hangs during (or just after) start.elf stage when Mediatek MT7921K (Wi-Fi 6E module) is connected
To reproduce
Insert MT7921K Wi-Fi module and power on or reboot system
Expected behaviour
start.elf process should complete and linux kernel should start booting
Actual behaviour
System hangs during (or just after) start.elf process (see log output below)
System
Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW
CM4
Which OS and version (
cat /etc/rpi-issue
)?Raspberry Pi reference 2022-12-19
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 9ecb50a577fa3772440cd37b7dbff5f327a6191f, wlanpi1
Which firmware version (
vcgencmd version
)?Oct 26 2022 11:09:36
Copyright (c) 2012 Broadcom
version c72ad6b26ff40c91ef776b847436094ee63fabee (clean) (release) (start_db)
Which kernel version (
uname -a
)?Linux wlanpi-627 5.19.17-v8-wlanpi+ libilclient.a in hardffp not hardfp #1 SMP PREEMPT Sun Dec 18 21:51:50 UTC 2022 aarch64 GNU/Linux
Logs
If applicable, add the relevant output from
dmesg
or similar.This is where it hangs during the boot process
�recover4.elf not found (6)
recovery.elf not found (6)
Read start4db.elf bytes 3746856 hnd 0x000163a2 hash '06629a6b6aeaa30e'
Read fixup4db.dat bytes 8382 hnd 0x0000040e hash 'd93f7d3e8ffe6eb8'
0x00a03140 0x00000000 0x00001fff
MEM GPU: 76 ARM: 948 TOTAL: 1024
Starting start4db.elf @ 0xfec00200 partition 0
ASRT:00:00:05.088140:0: ../../../../../vcfw/drivers/chip/vciv/2708/clock_2711.c::clock_wait_busy!2151: timeout != 0
MESS:00:00:05.184667:0: arasan: arasan_emmc_open
MESS:00:00:05.347863:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:05.351212:0: brfs: File read: 1521 bytes
MESS:00:00:05.371331:0: HDMI0:EDID error reading EDID block 0 attempt 0
MESS:00:00:05.375837:0: HDMI0:EDID giving up on reading EDID block 0
MESS:00:00:05.392886:0: HDMI1:EDID error reading EDID block 0 attempt 0
MESS:00:00:05.397393:0: HDMI1:EDID giving up on reading EDID block 0
MESS:00:00:05.404059:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:05.408612:0: gpioman: gpioman_get_pin_num: pin DISPLAY_SDA not defined
MESS:00:00:05.414974:0: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
MESS:00:00:05.950519:0: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
MESS:00:00:05.956326:0: *** Restart logging
MESS:00:00:05.958807:0: brfs: File read: 1521 bytes
MESS:00:00:05.968848:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 0
MESS:00:00:05.973871:0: hdmi: HDMI0:EDID giving up on reading EDID block 0
MESS:00:00:05.984497:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 0
MESS:00:00:05.989525:0: hdmi: HDMI0:EDID giving up on reading EDID block 0
MESS:00:00:05.995124:0: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
MESS:00:00:06.008916:0: hdmi: HDMI1:EDID error reading EDID block 0 attempt 0
MESS:00:00:06.013945:0: hdmi: HDMI1:EDID giving up on reading EDID block 0
MESS:00:00:06.024568:0: hdmi: HDMI1:EDID error reading EDID block 0 attempt 0
MESS:00:00:06.029589:0: hdmi: HDMI1:EDID giving up on reading EDID block 0
MESS:00:00:06.035187:0: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
MESS:00:00:06.043952:0: HDMI0: hdmi_pixel_encoding: 300000000
MESS:00:00:06.049425:0: HDMI1: hdmi_pixel_encoding: 300000000
MESS:00:00:06.055254:0: gpioman: gpioman_get_pin_num: pin CAMERA_0_I2C_PORT not defined
MESS:00:00:06.085198:0: dtb_file 'bcm2711-rpi-cm4.dtb'
MESS:00:00:06.093897:0: brfs: File read: /mfs/sd/bcm2711-rpi-cm4.dtb
MESS:00:00:06.097144:0: Loaded 'bcm2711-rpi-cm4.dtb' to 0x100 size 0xcddf
MESS:00:00:06.116912:0: brfs: File read: 52703 bytes
MESS:00:00:06.135922:0: brfs: File read: /mfs/sd/overlays/overlay_map.dtb
MESS:00:00:06.211636:0: brfs: File read: 2231 bytes
MESS:00:00:06.228913:0: brfs: File read: /mfs/sd/overlays/rpi-poe.dtbo
MESS:00:00:06.250264:0: Loaded overlay 'rpi-poe'
MESS:00:00:06.332295:0: brfs: File read: 4168 bytes
MESS:00:00:06.336557:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:06.339571:0: brfs: File read: 1521 bytes
MESS:00:00:06.356614:0: brfs: File read: /mfs/sd/overlays/pcie-32bit-dma.dtbo
MESS:00:00:06.367462:0: Loaded overlay 'pcie-32bit-dma'
MESS:00:00:06.380079:0: brfs: File read: 438 bytes
MESS:00:00:06.387356:0: brfs: File read: /mfs/sd/overlays/dwc2.dtbo
MESS:00:00:06.396796:0: Loaded overlay 'dwc2'
MESS:00:00:06.398036:0: dtparam: dr_mode=host
MESS:00:00:06.413274:0: brfs: File read: 801 bytes
MESS:00:00:06.419708:0: brfs: File read: /mfs/sd/overlays/disable-wifi.dtbo
MESS:00:00:06.432527:0: Loaded overlay 'disable-wifi'
MESS:00:00:06.448799:0: brfs: File read: 387 bytes
MESS:00:00:06.455827:0: brfs: File read: /mfs/sd/overlays/disable-bt.dtbo
MESS:00:00:06.474765:0: Loaded overlay 'disable-bt'
MESS:00:00:06.511022:0: brfs: File read: 1073 bytes
MESS:00:00:06.532603:0: brfs: File read: /mfs/sd/overlays/vc4-fkms-v3d-pi4.dtbo
MESS:00:00:06.555179:0: Loaded overlay 'vc4-fkms-v3d'
MESS:00:00:06.593679:0: brfs: File read: 1446 bytes
MESS:00:00:06.600197:0: brfs: File read: /mfs/sd/overlays/disable-wifi.dtbo
MESS:00:00:06.613020:0: Loaded overlay 'disable-wifi'
MESS:00:00:06.629180:0: brfs: File read: 387 bytes
MESS:00:00:06.636456:0: brfs: File read: /mfs/sd/overlays/dwc2.dtbo
MESS:00:00:06.645905:0: Loaded overlay 'dwc2'
MESS:00:00:06.647147:0: dtparam: dr_mode=otg
MESS:00:00:06.651356:0: dtparam: i2c_arm=on
MESS:00:00:06.664105:0: dtparam: spi=on
MESS:00:00:06.673350:0: dtparam: act_led_trigger=heartbeat
MESS:00:00:06.719890:0: brfs: File read: 801 bytes
MESS:00:00:06.723579:0: brfs: File read: /mfs/sd/cmdline.txt
MESS:00:00:06.726968:0: Read command line from file 'cmdline.txt':
MESS:00:00:06.732847:0: 'console=serial0,115200 console=tty1 root=PARTUUID=46a9230e-02 rootfstype=ext4 fsck.repair=yes rootwait'
MESS:00:00:06.774038:0: CMA size reduced to 256MB (total_mem 1024MB, gpu_mem 76MB)
MESS:00:00:06.849640:0: kernel=kernel8-wp.img
MESS:00:00:06.850886:0: brfs: File read: 103 bytes
MESS:00:00:08.627399:0: brfs: File read: /mfs/sd/kernel8-wp.img
MESS:00:00:08.630218:0: Loaded 'kernel8-wp.img' to 0x80000 size 0x157ca00
MESS:00:00:08.657841:0: Kernel relocated to 0x200000
MESS:00:00:08.659694:0: Device tree loaded to 0x2eff2500 (size 0xda30)
MESS:00:00:08.668777:0: uart: Set PL011 baud rate to 103448.300000 Hz
MESS:00:00:08.675104:0: uart: Baud rate change done...
MESS:00:00:08.677164:0: uart: Baud rate change done...
MESS:00:00:08.686287:0: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
The text was updated successfully, but these errors were encountered: