ophub / amlogic-s9xxx-openwrt

Support for OpenWrt in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
1.93k stars 1.7k forks source link

Firefly-RK3399 启动时内核报错 #516

Closed ridethepig closed 11 months ago

ridethepig commented 12 months ago

Device Information | 设备信息

OpenWrt Version | 系统版本

Describe the bug | 问题描述 使用SD卡刷入最新编译的镜像(20231206),出现内核报错Unable to handle kernel implementation fault (unsupported exclusive)

尝试将内核替换为 #491 中使用的6.1.58版本后,启动日志类似于该issue中 https://github.com/ophub/amlogic-s9xxx-openwrt/issues/491#issuecomment-1768513444 的情况。

感觉和内核版本有关,由于无法找到 #491 中可以成功启动的镜像,无法验证。

启动日志如下:

U-Boot 2022.04-armbian (Oct 10 2023 - 14:19:41 +0300)

SoC: Rockchip rk3399
Reset cause: POR
Model: Firefly-RK3399 Board
DRAM:  3.9 GiB
PMIC:  RK808 
Core:  286 devices, 28 uclasses, devicetree: separate
MMC:   mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial
Out:   vidconsole
Err:   vidconsole
Model: Firefly-RK3399 Board
Net:   eth0: ethernet@fe300000
Hit any key to stop autoboot:  0 
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe900000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 2 USB Device(s) found
scanning bus usb@fe900000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
1:  Armbian
Retrieving file: /uInitrd
Retrieving file: /Image
append: root=UUID=08775507-9354-4560-9c85-d1ea487db512 rootflags=compress=zstd:6 rootfstype=btrfs console=ttyS2,1500000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles
Retrieving file: /dtb/rockchip/rk3399-firefly.dtb
Moving Image from 0x2080000 to 0x2200000, end=4330000
## Loading init Ramdisk from Legacy Image at 06000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    16865661 Bytes = 16.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to f0ef6000, end f1f0b97d ... OK
   Loading Device Tree to 00000000f0ede000, end 00000000f0ef5cbe ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.1.65-ophub (root@fv-az841-991) (aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 13.2.1 20231009, GNU ld (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 2.41.0.20231009) #1 SMP Sun Dec  3 05:14:23 EST 2023
[    0.000000] Machine model: Firefly-RK3399 Board
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000200000-0x00000000f7ffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000200000-0x00000000f7ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x00000000f7ffffff]
[    0.000000] On node 0, zone DMA: 512 pages in unavailable ranges
[    0.000000] cma: Reserved 256 MiB at 0x00000000e0e00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] percpu: Embedded 19 pages/cpu s38056 r8192 d31576 u77824
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 999432
[    0.000000] Kernel command line: root=UUID=08775507-9354-4560-9c85-d1ea487db512 rootflags=compress=zstd:6 rootfstype=btrfs console=ttyS2,1500000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles
[    0.000000] Unknown kernel command line parameters "splash", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 3677888K/4061184K available (16960K kernel code, 2920K rwdata, 8188K rodata, 4864K init, 892K bss, 121152K reserved, 262144K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=6.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=6
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 256 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv3: GICv3 features: 16 PPIs
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000fef00000
[    0.000000] ITS [mem 0xfee20000-0xfee3ffff]
[    0.000000] ITS@0x00000000fee20000: allocated 65536 Devices @480000 (flat, esz 8, psz 64K, shr 0)
[    0.000000] ITS: using cache flushing for cmd queue
[    0.000000] GICv3: using LPI property table @0x0000000000440000
[    0.000000] GIC: using cache flushing for LPI property table
[    0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000000450000
[    0.000000] GICv3: GIC: PPI partition interrupt-partition-0[0] { /cpus/cpu@0[0] /cpus/cpu@1[1] /cpus/cpu@2[2] /cpus/cpu@3[3] }
[    0.000000] GICv3: GIC: PPI partition interrupt-partition-1[1] { /cpus/cpu@100[4] /cpus/cpu@101[5] }
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    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.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.002131] Console: colour dummy device 80x25
[    0.002739] printk: console [tty0] enabled
[    0.002798] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.002832] pid_max: default: 32768 minimum: 301
[    0.003202] LSM: Security Framework initializing
[    0.003395] SELinux:  Initializing.
[    0.003944] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.003994] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.006108] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.007039] cblist_init_generic: Setting adjustable number of callback queues.
[    0.007065] cblist_init_generic: Setting shift to 3 and lim to 1.
[    0.007334] rcu: Hierarchical SRCU implementation.
[    0.007353] rcu:     Max phase no-delay instances is 1000.
[    0.009322] Platform MSI: interrupt-controller@fee20000 domain created
[    0.009792] PCI/MSI: /interrupt-controller@fee00000/interrupt-controller@fee20000 domain created
[    0.010595] EFI services will not be available.
[    0.011230] smp: Bringing up secondary CPUs ...
[    0.011992] Detected VIPT I-cache on CPU1
[    0.012118] cacheinfo: Unable to detect cache hierarchy for CPU 1
[    0.012134] GICv3: CPU1: found redistributor 1 region 0:0x00000000fef20000
[    0.012155] GICv3: CPU1: using allocated LPI pending table @0x0000000000460000
[    0.012206] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.012955] Detected VIPT I-cache on CPU2
[    0.013062] cacheinfo: Unable to detect cache hierarchy for CPU 2
[    0.013076] GICv3: CPU2: found redistributor 2 region 0:0x00000000fef40000
[    0.013094] GICv3: CPU2: using allocated LPI pending table @0x0000000000470000
[    0.013129] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.013878] Detected VIPT I-cache on CPU3
[    0.013986] cacheinfo: Unable to detect cache hierarchy for CPU 3
[    0.014000] GICv3: CPU3: found redistributor 3 region 0:0x00000000fef60000
[    0.014017] GICv3: CPU3: using allocated LPI pending table @0x0000000000500000
[    0.014051] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.014784] CPU features: detected: Spectre-v2
[    0.014795] CPU features: detected: Spectre-v4
[    0.014801] CPU features: detected: Spectre-BHB
[    0.014808] CPU features: detected: ARM erratum 1742098
[    0.014814] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.014819] Detected PIPT I-cache on CPU4
[    0.014927] cacheinfo: Unable to detect cache hierarchy for CPU 4
[    0.014941] GICv3: CPU4: found redistributor 100 region 0:0x00000000fef80000
[    0.014958] GICv3: CPU4: using allocated LPI pending table @0x0000000000510000
[    0.014998] CPU4: Booted secondary processor 0x0000000100 [0x410fd082]
[    0.015749] Detected PIPT I-cache on CPU5
[    0.015846] cacheinfo: Unable to detect cache hierarchy for CPU 5
[    0.015859] GICv3: CPU5: found redistributor 101 region 0:0x00000000fefa0000
[    0.015876] GICv3: CPU5: using allocated LPI pending table @0x0000000000520000
[    0.015906] CPU5: Booted secondary processor 0x0000000101 [0x410fd082]
[    0.015997] smp: Brought up 1 node, 6 CPUs
[    0.016333] SMP: Total of 6 processors activated.
[    0.016351] CPU features: detected: 32-bit EL0 Support
[    0.016366] CPU features: detected: 32-bit EL1 Support
[    0.016384] CPU features: detected: CRC32 instructions
[    0.016508] CPU: All CPU(s) started at EL2
[    0.016533] alternatives: applying system-wide alternatives
[    0.020064] devtmpfs: initialized
[    0.036783] Registered cp15_barrier emulation handler
[    0.036817] Registered setend emulation handler
[    0.037000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.037032] futex hash table entries: 2048 (order: 5, 131072 bytes, linear)
[    0.041934] prandom: seed boundary self test passed
[    0.043652] prandom: 100 self tests passed

[    0.043702] pinctrl core: initialized pinctrl subsystem
[    0.044264] DMI not present or invalid.
[    0.044839] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.046656] DMA: preallocated 2048 KiB GFP_KERNEL pool for atomic allocations
[    0.047499] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.048172] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.048249] audit: initializing netlink subsys (disabled)
[    0.048469] audit: type=2000 audit(0.048:1): state=initialized audit_enabled=0 res=1
[    0.049627] thermal_sys: Registered thermal governor 'step_wise'
[    0.049676] cpuidle: using governor ladder
[    0.049853] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.050017] ASID allocator initialised with 65536 entries
[    0.050135] Serial: AMBA PL011 UART driver
[    0.072167] platform fe330000.mmc: Fixed dependency cycle(s) with /syscon@ff770000/phy@f780
[    0.076860] platform ff940000.hdmi: Fixed dependency cycle(s) with /vop@ff8f0000/port/endpoint@2
[    0.076903] platform ff940000.hdmi: Fixed dependency cycle(s) with /vop@ff900000/port/endpoint@2
[    0.084862] rockchip-gpio ff720000.gpio: probed /pinctrl/gpio@ff720000
[    0.085611] rockchip-gpio ff730000.gpio: probed /pinctrl/gpio@ff730000
[    0.086247] rockchip-gpio ff780000.gpio: probed /pinctrl/gpio@ff780000
[    0.086877] rockchip-gpio ff788000.gpio: probed /pinctrl/gpio@ff788000
[    0.087521] rockchip-gpio ff790000.gpio: probed /pinctrl/gpio@ff790000
[    0.106266] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[    0.106292] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[    0.106308] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
[    0.106322] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
[    0.106336] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.106350] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[    0.106364] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
[    0.106376] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
[    0.107563] cryptd: max_cpu_qlen set to 1000
[    0.175916] raid6: neonx8   gen()  1784 MB/s
[    0.244015] raid6: neonx4   gen()  1732 MB/s
[    0.312136] raid6: neonx2   gen()  1434 MB/s
[    0.380242] raid6: neonx1   gen()  1040 MB/s
[    0.448348] raid6: int64x8  gen()   997 MB/s
[    0.516457] raid6: int64x4  gen()   976 MB/s
[    0.584553] raid6: int64x2  gen()   943 MB/s
[    0.652653] raid6: int64x1  gen()   721 MB/s
[    0.652665] raid6: using algorithm neonx8 gen() 1784 MB/s
[    0.720733] raid6: .... xor() 1309 MB/s, rmw enabled
[    0.720746] raid6: using neon recovery algorithm
[    0.720941] fbcon: Taking over console
[    0.720978] ACPI: Interpreter disabled.
[    0.722829] iommu: Default domain type: Translated 
[    0.722850] iommu: DMA domain TLB invalidation policy: strict mode 
[    0.723317] SCSI subsystem initialized
[    0.723731] usbcore: registered new interface driver usbfs
[    0.723805] usbcore: registered new interface driver hub
[    0.723878] usbcore: registered new device driver usb
[    0.724402] mc: Linux media interface: v0.10
[    0.724452] videodev: Linux video capture interface: v2.00
[    0.724761] EDAC MC: Ver: 3.0.0
[    0.725934] Advanced Linux Sound Architecture Driver Initialized.
[    0.726737] vgaarb: loaded
[    0.727093] clocksource: Switched to clocksource arch_sys_counter
[    0.727453] VFS: Disk quotas dquot_6.6.0
[    0.727537] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.727677] FS-Cache: Loaded
[    0.727954] pnp: PnP ACPI: disabled
[    0.737692] NET: Registered PF_INET protocol family
[    0.737983] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.742648] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.742723] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.742781] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.743151] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[    0.744438] TCP: Hash tables configured (established 32768 bind 32768)
[    0.744727] MPTCP token hash table entries: 4096 (order: 4, 98304 bytes, linear)
[    0.744876] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.745022] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.745403] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.745449] NET: Registered PF_XDP protocol family
[    0.745468] PCI: CLS 0 bytes, default 64
[    0.746021] Trying to unpack rootfs image as initramfs...
[    0.757410] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    0.758640] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[    0.759392] kvm [1]: IPA Size Limit: 40 bits
[    0.761125] kvm [1]: vgic-v2@fff20000
[    0.761161] kvm [1]: GIC system register CPU interface enabled
[    0.762193] kvm [1]: vgic interrupt IRQ18
[    0.763319] kvm [1]: Hyp mode initialized successfully
[    0.765678] Initialise system trusted keyrings
[    0.765948] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    0.773368] zbud: loaded
[    0.775413] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.776026] fuse: init (API version 7.37)
[    0.776610] SGI XFS with ACLs, security attributes, quota, no debug enabled
[    0.845398] NET: Registered PF_ALG protocol family
[    0.845455] xor: measuring software checksum speed
[    0.848864]    8regs           :  2921 MB/sec
[    0.852020]    32regs          :  3143 MB/sec
[    0.855835]    arm64_neon      :  2594 MB/sec
[    0.855849] xor: using function: 32regs (3143 MB/sec)
[    0.855870] Key type asymmetric registered
[    0.855882] Asymmetric key parser 'x509' registered
[    0.855987] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[    0.856153] io scheduler mq-deadline registered
[    0.856169] io scheduler kyber registered
[    0.856344] io scheduler bfq registered
[    0.954427] dma-pl330 ff6d0000.dma-controller: Loaded driver for PL330 DMAC-241330
[    0.954463] dma-pl330 ff6d0000.dma-controller:   DBUFF-32x8bytes Num_Chans-6 Num_Peri-12 Num_Events-12
[    0.955935] dma-pl330 ff6e0000.dma-controller: Loaded driver for PL330 DMAC-241330
[    0.955961] dma-pl330 ff6e0000.dma-controller:   DBUFF-128x8bytes Num_Chans-8 Num_Peri-20 Num_Events-16
[    0.960198] Serial: 8250/16550 driver, 5 ports, IRQ sharing enabled
[    0.962544] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 37, base_baud = 1500000) is a 16550A
[    0.962715] serial serial0: tty port ttyS0 registered
[    0.963582] ff1a0000.serial: ttyS2 at MMIO 0xff1a0000 (irq = 38, base_baud = 1500000) is a 16550A
[    1.079710] printk: console [ttyS2] enabled
[    1.081325] Serial: AMBA driver
[    1.083413] random: crng init done
[    1.087942] rockchip-vop ff8f0000.vop: Adding to iommu group 2
[    1.089039] rockchip-vop ff900000.vop: Adding to iommu group 3
[    1.098361] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.101226] brd: module loaded
[    1.164270] loop: module loaded
[    1.167911] spi-nor spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
[    1.175695] usbcore: registered new interface driver cdc_wdm
[    1.176261] usbcore: registered new interface driver usb-storage
[    1.176869] usbcore: registered new interface driver usbserial_generic
[    1.177470] usbserial: USB Serial support registered for generic
[    1.178034] usbcore: registered new interface driver ch341
[    1.178541] usbserial: USB Serial support registered for ch341-uart
[    1.179141] usbcore: registered new interface driver cp210x
[    1.179656] usbserial: USB Serial support registered for cp210x
[    1.180214] usbcore: registered new interface driver ftdi_sio
[    1.180744] usbserial: USB Serial support registered for FTDI USB Serial Device
[    1.181425] usbcore: registered new interface driver garmin_gps
[    1.181973] usbserial: USB Serial support registered for Garmin GPS usb/tty
[    1.182624] usbcore: registered new interface driver ipw
[    1.183127] usbserial: USB Serial support registered for IPWireless converter
[    1.183790] usbcore: registered new interface driver opticon
[    1.184312] usbserial: USB Serial support registered for opticon
[    1.184873] usbcore: registered new interface driver pl2303
[    1.185391] usbserial: USB Serial support registered for pl2303
[    1.185949] usbcore: registered new interface driver qcaux
[    1.186455] usbserial: USB Serial support registered for qcaux
[    1.187002] usbcore: registered new interface driver qcserial
[    1.187542] usbserial: USB Serial support registered for Qualcomm USB modem
[    1.188189] usbcore: registered new interface driver symbolserial
[    1.188748] usbserial: USB Serial support registered for symbol
[    1.189916] mousedev: PS/2 mouse device common for all mice
[    1.191635] SPI driver rmi4_spi has no spi_device_id for syna,rmi4-spi
[    1.193128] i2c_dev: i2c /dev entries driver
[    1.197372] dw-apb-uart ff180000.serial: Failed to create device link (0x180) with 0-001b
[    1.198186] i2c 0-001b: Fixed dependency cycle(s) with /i2c@ff3c0000/pmic@1b/regulators/LDO_REG8
[    1.208836] sdhci: Secure Digital Host Controller Interface driver
[    1.209400] sdhci: Copyright(c) Pierre Ossman
[    1.209793] Synopsys Designware Multimedia Card Interface Driver
[    1.211565] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.214701] ledtrig-cpu: registered to indicate activity on CPUs
[    1.217618] hid: raw HID events driver (C) Jiri Kosina
[    1.218186] usbcore: registered new interface driver usbhid
[    1.218688] usbhid: USB HID core driver
[    1.247815] Initializing XFRM netlink socket
[    1.248717] NET: Registered PF_INET6 protocol family
[    1.887137] Freeing initrd memory: 16468K
[    1.957003] Segment Routing with IPv6
[    1.957353] RPL Segment Routing with IPv6
[    1.957751] In-situ OAM (IOAM) with IPv6
[    1.958249] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.959767] NET: Registered PF_PACKET protocol family
[    1.960242] NET: Registered PF_KEY protocol family
[    1.960994] 8021q: 802.1Q VLAN Support v1.8
[    1.961985] registered taskstats version 1
[    1.962383] Loading compiled-in X.509 certificates
[    1.970798] zswap: loaded using pool zstd/zbud
[    1.972580] Key type .fscrypt registered
[    1.972952] Key type fscrypt-provisioning registered
[    1.974768] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
[    2.419059] alg: No test for 842 (842-scomp)
[    2.420149] alg: No test for 842 (842-generic)
[    3.460376] dw-apb-uart ff180000.serial: Failed to create device link (0x180) with vcc3v3-sys
[    3.474122] rk808 0-001b: chip id: 0x0
[    3.485047] rk808-regulator rk808-regulator: there is no dvs0 gpio
[    3.485660] rk808-regulator rk808-regulator: there is no dvs1 gpio
[    3.492817] vcca1v8_hdmi: Bringing 2800000uV into 1800000-1800000uV
[    3.501244] vcca0v9_hdmi: Bringing 1800000uV into 900000-900000uV
[    3.514356] rk808-rtc rk808-rtc: registered as rtc0
[    3.516087] rk808-rtc rk808-rtc: setting system clock to 2013-01-18T08:51:12 UTC (1358499072)
[    3.517630] dw-apb-uart ff180000.serial: Failed to create device link (0x180) with 0-001b
[    3.519620] fan53555-regulator 0-0040: FAN53555 Option[8] Rev[1] Detected!
[    3.524710] fan53555-regulator 0-0041: FAN53555 Option[8] Rev[1] Detected!
[    3.532736] cpu cpu0: EM: created perf domain
[    3.534940] cpu cpu4: EM: created perf domain
[    3.548269] rockchip-pcie f8000000.pcie: host bridge /pcie@f8000000 ranges:
[    3.548923] rockchip-pcie f8000000.pcie:      MEM 0x00fa000000..0x00fbdfffff -> 0x00fa000000
[    3.549673] rockchip-pcie f8000000.pcie:       IO 0x00fbe00000..0x00fbefffff -> 0x00fbe00000
[    3.550766] rockchip-pcie f8000000.pcie: no vpcie12v regulator found
[    4.107382] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout with x524289!
[    4.635578] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout with x524289!
[    4.636343] Unable to handle kernel implementation fault (unsupported exclusive) at virtual address ffffffc0110002d0
[    4.637299] Mem abort info:
[    4.637565]   ESR = 0x0000000096000035
[    4.637917]   EC = 0x25: DABT (current EL), IL = 32 bits
[    4.638410]   SET = 0, FnV = 0
[    4.638701]   EA = 0, S1PTW = 0
[    4.638999]   FSC = 0x35: implementation fault (unsupported exclusive)
[    4.639628] Data abort info:
[    4.639905]   ISV = 0, ISS = 0x00000035
[    4.640264]   CM = 0, WnR = 0
[    4.640548] swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000003aaa000
[    4.641165] [ffffffc0110002d0] pgd=10000000f7fff003, p4d=10000000f7fff003, pud=10000000f7fff003, pmd=00680000fd000711
[    4.642157] Internal error: Oops: 0000000096000035 [#1] SMP
[    4.642676] Modules linked in:
[    4.642973] CPU: 0 PID: 63 Comm: kworker/u12:1 Not tainted 6.1.65-ophub #1
[    4.643610] Hardware name: Firefly-RK3399 Board (DT)
[    4.644072] Workqueue: events_unbound deferred_probe_work_func
[    4.644633] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    4.645279] pc : mutex_lock+0x24/0x64
[    4.645646] lr : mutex_lock+0x18/0x64
[    4.646008] sp : ffffffc00aadbaf0
[    4.646321] x29: ffffffc00aadbaf0 x28: ffffff8000c21500 x27: ffffff800040ec00
[    4.646997] x26: 0000000000000005 x25: 00000000ffffffff x24: ffffff8000f56c10
[    4.647670] x23: ffffff8008759358 x22: ffffff8008759000 x21: ffffff8000f56c10
[    4.648344] x20: ffffffc0110002d0 x19: ffffffc0110002d0 x18: ffffffffffffffff
[    4.649019] x17: 7469772074756f65 x16: 6d697420316e6567 x15: 20676e696e696172
[    4.649693] x14: 74206b6e696c2065 x13: ffffffc009d9ce78 x12: 00000000000003ab
[    4.650366] x11: 0000000000000139 x10: ffffffc009e4ce78 x9 : ffffffc009d9ce78
[    4.651040] x8 : 00000000ffffdfff x7 : ffffffc009e4ce78 x6 : 80000000ffffe000
[    4.651712] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
[    4.652383] x2 : 0000000000000000 x1 : ffffff800104c600 x0 : 0000000000000000
[    4.653056] Call trace:
[    4.653294]  mutex_lock+0x24/0x64
[    4.653628]  phy_power_off+0x28/0xd0
[    4.653978]  rockchip_pcie_probe+0xb04/0xc1c
[    4.654394]  platform_probe+0x68/0xc4
[    4.654756]  really_probe+0xc0/0x3e0
[    4.655104]  __driver_probe_device+0x7c/0x15c
[    4.655523]  driver_probe_device+0x40/0xe0
[    4.655918]  __device_attach_driver+0xbc/0x160
[    4.656346]  bus_for_each_drv+0x7c/0xdc
[    4.656716]  __device_attach+0xa0/0x1c4
[    4.657088]  device_initial_probe+0x14/0x20
[    4.657491]  bus_probe_device+0x98/0xa0
[    4.657863]  deferred_probe_work_func+0x9c/0xf0
[    4.658296]  process_one_work+0x1dc/0x370
[    4.658689]  worker_thread+0x268/0x4e0
[    4.659059]  kthread+0xd4/0xdc
[    4.659361]  ret_from_fork+0x10/0x20
[    4.659719] Code: 97fffa2b d2800000 d5384101 f9800271 (c85ffe62) 
[    4.660282] ---[ end trace 0000000000000000 ]---
ophub commented 12 months ago

你可以把内核更新到旧版测试下

ridethepig commented 12 months ago

你可以把内核更新到旧版测试下

我使用项目README中所说的Local Package的流程, 将内核替换为6.1.58(之前issue中成功启动的版本), 执行命令如下

sudo ./make -b firefly-rk3399 -k 6.1.58 -a false

使用的openwrt-armvirt目录中的文件为最新的immortalwrt-armsr-armv8-generic-rootfs.tar.gz

刷入SD卡后, 启动依然失败, 得到如下结果, 之后卡住, 现象类似于 https://github.com/ophub/amlogic-s9xxx-openwrt/issues/491#issuecomment-1768513444 :

Boot1 Release Time: May 29 2020 17:36:36, version: 1.26
CPUId = 0x0
ChipType = 0x10, 336
SdmmcInit=2 0
BootCapSize=100000
UserCapSize=14910MB
FwPartOffset=2000 , 100000
mmc0:cmd5,20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=14832MB
FwPartOffset=2000 , 0
StorageInit ok = 95490
SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit read PBA: 0x1404
SecureInit read PBA: 0x1804
SecureInit read PBA: 0x1c04
SecureInit ret = 0, SecureMode = 0
atags_set_bootdev: ret:(0)
GPT part:  0, name:          primary, start:0x8000, size:0x7f800
GPT part:  1, name:          primary, start:0x88000, size:0x1ff800
no find partition:uboot.
Trust Addr:0x4000, 0x58334c42
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0xd9d98
RunBL31 0x40000 @ 222693 us
 NOTICE:  BL31: v1.3(release):845ee93
NOTICE:  BL31: Built : 15:51:11, Jul 22 2020
NOTICE:  BL31: Rockchip release version: v1.1
INFO:    GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO:    Using opteed sec cpu_context!
INFO:    boot cpu mask: 0
INFO:    plat_rockchip_pmu_init(1196): pd status 3e
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9

U-Boot 2022.04-armbian (Oct 10 2023 - 14:19:41 +0300)

SoC: Rockchip rk3399
Reset cause: POR
Model: Firefly-RK3399 Board
DRAM:  3.9 GiB
PMIC:  RK808 
Core:  286 devices, 28 uclasses, devicetree: separate
MMC:   mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Model: Firefly-RK3399 Board
Net:   eth0: ethernet@fe300000
Hit any key to stop autoboot:  0 
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe900000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 2 USB Device(s) found
scanning bus usb@fe900000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
1:  Armbian
Retrieving file: /uInitrd
Retrieving file: /Image
append: root=UUID=9696600b-561a-4119-b192-6458e6a8d986 rootflags=compress=zstd:6 rootfstype=btrfs console=ttyS2,1500000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles
Retrieving file: /dtb/rockchip/rk3399-firefly.dtb
Moving Image from 0x2080000 to 0x2200000, end=4340000
## Loading init Ramdisk from Legacy Image at 06000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    16866219 Bytes = 16.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to f0ef6000, end f1f0bbab ... OK
   Loading Device Tree to 00000000f0ede000, end 00000000f0ef539b ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.1.58-ophub (root@fv-az1256-949) (aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 12.3.Rel1 (Build arm-12.35)) 12.3.1 20230626, GNU ld (Arm GNU Toolchain 12.3.Rel1 (Build arm-12.35)) 2.40.0.20230627) #1 SMP Mon Oct 16 04:55:03 EDT 2023
[    0.000000] Machine model: Firefly-RK3399 Board
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000200000-0x00000000f7ffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000200000-0x00000000f7ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x00000000f7ffffff]
[    0.000000] On node 0, zone DMA: 512 pages in unavailable ranges
[    0.000000] cma: Reserved 256 MiB at 0x00000000e0e00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] percpu: Embedded 19 pages/cpu s38056 r8192 d31576 u77824
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 999432
[    0.000000] Kernel command line: root=UUID=9696600b-561a-4119-b192-6458e6a8d986 rootflags=compress=zstd:6 rootfstype=btrfs console=ttyS2,1500000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles
[    0.000000] Unknown kernel command line parameters "splash", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 3677844K/4061184K available (16896K kernel code, 2920K rwdata, 8300K rodata, 4864K init, 892K bss, 121196K reserved, 262144K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=6.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=6
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 256 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv3: GICv3 features: 16 PPIs
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000fef00000
[    0.000000] ITS [mem 0xfee20000-0xfee3ffff]
[    0.000000] ITS@0x00000000fee20000: allocated 65536 Devices @480000 (flat, esz 8, psz 64K, shr 0)
[    0.000000] ITS: using cache flushing for cmd queue
[    0.000000] GICv3: using LPI property table @0x0000000000440000
[    0.000000] GIC: using cache flushing for LPI property table
[    0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000000450000
[    0.000000] GICv3: GIC: PPI partition interrupt-partition-0[0] { /cpus/cpu@0[0] /cpus/cpu@1[1] /cpus/cpu@2[2] /cpus/cpu@3[3] }
[    0.000000] GICv3: GIC: PPI partition interrupt-partition-1[1] { /cpus/cpu@100[4] /cpus/cpu@101[5] }
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    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.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.002066] Console: colour dummy device 80x25
[    0.002697] printk: console [tty0] enabled
[    0.002758] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.002793] pid_max: default: 32768 minimum: 301
[    0.003185] LSM: Security Framework initializing
[    0.003384] SELinux:  Initializing.
[    0.003954] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.004003] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.006173] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.007113] cblist_init_generic: Setting adjustable number of callback queues.
[    0.007139] cblist_init_generic: Setting shift to 3 and lim to 1.
[    0.007410] rcu: Hierarchical SRCU implementation.
[    0.007429] rcu:     Max phase no-delay instances is 1000.
[    0.009452] Platform MSI: interrupt-controller@fee20000 domain created
[    0.009911] PCI/MSI: /interrupt-controller@fee00000/interrupt-controller@fee20000 domain created
[    0.010696] EFI services will not be available.
[    0.011344] smp: Bringing up secondary CPUs ...
[    0.012118] Detected VIPT I-cache on CPU1
[    0.012242] cacheinfo: Unable to detect cache hierarchy for CPU 1
[    0.012258] GICv3: CPU1: found redistributor 1 region 0:0x00000000fef20000
[    0.012279] GICv3: CPU1: using allocated LPI pending table @0x0000000000460000
[    0.012330] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.013091] Detected VIPT I-cache on CPU2
[    0.013195] cacheinfo: Unable to detect cache hierarchy for CPU 2
[    0.013209] GICv3: CPU2: found redistributor 2 region 0:0x00000000fef40000
[    0.013227] GICv3: CPU2: using allocated LPI pending table @0x0000000000470000
[    0.013264] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.014028] Detected VIPT I-cache on CPU3
[    0.014139] cacheinfo: Unable to detect cache hierarchy for CPU 3
[    0.014154] GICv3: CPU3: found redistributor 3 region 0:0x00000000fef60000
[    0.014171] GICv3: CPU3: using allocated LPI pending table @0x0000000000500000
[    0.014205] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.014949] CPU features: detected: Spectre-v2
[    0.014961] CPU features: detected: Spectre-v4
[    0.014966] CPU features: detected: Spectre-BHB
[    0.014973] CPU features: detected: ARM erratum 1742098
[    0.014980] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.014985] Detected PIPT I-cache on CPU4
[    0.015095] cacheinfo: Unable to detect cache hierarchy for CPU 4
[    0.015109] GICv3: CPU4: found redistributor 100 region 0:0x00000000fef80000
[    0.015127] GICv3: CPU4: using allocated LPI pending table @0x0000000000510000
[    0.015165] CPU4: Booted secondary processor 0x0000000100 [0x410fd082]
[    0.015932] Detected PIPT I-cache on CPU5
[    0.016028] cacheinfo: Unable to detect cache hierarchy for CPU 5
[    0.016042] GICv3: CPU5: found redistributor 101 region 0:0x00000000fefa0000
[    0.016058] GICv3: CPU5: using allocated LPI pending table @0x0000000000520000
[    0.016089] CPU5: Booted secondary processor 0x0000000101 [0x410fd082]
[    0.016182] smp: Brought up 1 node, 6 CPUs
[    0.016529] SMP: Total of 6 processors activated.
[    0.016547] CPU features: detected: 32-bit EL0 Support
[    0.016562] CPU features: detected: 32-bit EL1 Support
[    0.016581] CPU features: detected: CRC32 instructions
[    0.016700] CPU: All CPU(s) started at EL2
[    0.016727] alternatives: applying system-wide alternatives
[    0.020366] devtmpfs: initialized
[    0.036698] Registered cp15_barrier emulation handler
[    0.036732] Registered setend emulation handler
[    0.036893] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.036924] futex hash table entries: 2048 (order: 5, 131072 bytes, linear)
[    0.041940] prandom: seed boundary self test passed
[    0.043663] prandom: 100 self tests passed
[    0.043712] pinctrl core: initialized pinctrl subsystem
[    0.044275] DMI not present or invalid.
[    0.044854] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.046690] DMA: preallocated 2048 KiB GFP_KERNEL pool for atomic allocations
[    0.047552] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.048227] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.048289] audit: initializing netlink subsys (disabled)
[    0.048526] audit: type=2000 audit(0.048:1): state=initialized audit_enabled=0 res=1
[    0.049684] thermal_sys: Registered thermal governor 'step_wise'
[    0.049732] cpuidle: using governor ladder
[    0.049928] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.050095] ASID allocator initialised with 65536 entries
[    0.050211] Serial: AMBA PL011 UART driver
[    0.070611] platform fe330000.mmc: Fixed dependency cycle(s) with /syscon@ff770000/phy@f780
[    0.075459] platform ff940000.hdmi: Fixed dependency cycle(s) with /vop@ff8f0000/port/endpoint@2
[    0.075501] platform ff940000.hdmi: Fixed dependency cycle(s) with /vop@ff900000/port/endpoint@2
[    0.082686] rockchip-gpio ff720000.gpio: probed /pinctrl/gpio@ff720000
[    0.083414] rockchip-gpio ff730000.gpio: probed /pinctrl/gpio@ff730000
[    0.084001] rockchip-gpio ff780000.gpio: probed /pinctrl/gpio@ff780000
[    0.084627] rockchip-gpio ff788000.gpio: probed /pinctrl/gpio@ff788000
[    0.085247] rockchip-gpio ff790000.gpio: probed /pinctrl/gpio@ff790000
[    0.088691] platform spdif-dit: Fixed dependency cycle(s) with /spdif@ff870000/port/endpoint
[    0.102309] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[    0.102334] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[    0.102351] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
[    0.102365] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
[    0.102380] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.102394] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[    0.102408] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
[    0.102422] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
[    0.103609] cryptd: max_cpu_qlen set to 1000
[    0.171939] raid6: neonx8   gen()  1766 MB/s
[    0.240040] raid6: neonx4   gen()  1727 MB/s
[    0.308148] raid6: neonx2   gen()  1425 MB/s
[    0.376261] raid6: neonx1   gen()  1040 MB/s
[    0.444364] raid6: int64x8  gen()  1000 MB/s
[    0.512488] raid6: int64x4  gen()   973 MB/s
[    0.580579] raid6: int64x2  gen()   937 MB/s
[    0.648690] raid6: int64x1  gen()   719 MB/s
[    0.648703] raid6: using algorithm neonx8 gen() 1766 MB/s
[    0.716801] raid6: .... xor() 1301 MB/s, rmw enabled
[    0.716814] raid6: using neon recovery algorithm
[    0.717027] fbcon: Taking over console
[    0.717065] ACPI: Interpreter disabled.
[    0.719310] iommu: Default domain type: Translated 
[    0.719333] iommu: DMA domain TLB invalidation policy: strict mode 
[    0.719803] SCSI subsystem initialized
[    0.720255] usbcore: registered new interface driver usbfs
[    0.720320] usbcore: registered new interface driver hub
[    0.720365] usbcore: registered new device driver usb
[    0.720877] mc: Linux media interface: v0.10
[    0.720926] videodev: Linux video capture interface: v2.00
[    0.721240] EDAC MC: Ver: 3.0.0
[    0.722386] Advanced Linux Sound Architecture Driver Initialized.
[    0.723171] vgaarb: loaded
[    0.723518] clocksource: Switched to clocksource arch_sys_counter
[    0.723882] VFS: Disk quotas dquot_6.6.0
[    0.723965] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.724174] FS-Cache: Loaded
[    0.724428] pnp: PnP ACPI: disabled
[    0.734265] NET: Registered PF_INET protocol family
[    0.734546] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.739195] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.739269] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.739330] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.739702] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[    0.740985] TCP: Hash tables configured (established 32768 bind 32768)
[    0.741297] MPTCP token hash table entries: 4096 (order: 4, 98304 bytes, linear)
[    0.741434] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.741580] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.741906] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.741949] NET: Registered PF_XDP protocol family
[    0.741972] PCI: CLS 0 bytes, default 64
[    0.742461] Trying to unpack rootfs image as initramfs...
[    0.753774] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    0.755008] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[    0.755745] kvm [1]: IPA Size Limit: 40 bits
[    0.757483] kvm [1]: vgic-v2@fff20000
[    0.757520] kvm [1]: GIC system register CPU interface enabled
[    0.758536] kvm [1]: vgic interrupt IRQ18
[    0.759686] kvm [1]: Hyp mode initialized successfully
[    0.762061] Initialise system trusted keyrings
[    0.762341] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    0.769812] zbud: loaded
[    0.771841] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.772469] fuse: init (API version 7.37)
[    0.773072] SGI XFS with ACLs, security attributes, quota, no debug enabled
[    0.843293] NET: Registered PF_ALG protocol family
[    0.843349] xor: measuring software checksum speed
[    0.846753]    8regs           :  2923 MB/sec
[    0.849911]    32regs          :  3139 MB/sec
[    0.853735]    arm64_neon      :  2588 MB/sec
[    0.853748] xor: using function: 32regs (3139 MB/sec)
[    0.853771] Key type asymmetric registered
[    0.853784] Asymmetric key parser 'x509' registered
[    0.853887] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[    0.854089] io scheduler mq-deadline registered
[    0.854105] io scheduler kyber registered
[    0.854280] io scheduler bfq registered
[    0.945787] rockchip-pcie f8000000.pcie: host bridge /pcie@f8000000 ranges:
[    0.945846] rockchip-pcie f8000000.pcie:      MEM 0x00fa000000..0x00fbdfffff -> 0x00fa000000
[    0.945878] rockchip-pcie f8000000.pcie:       IO 0x00fbe00000..0x00fbefffff -> 0x00fbe00000
[    0.946443] rockchip-pcie f8000000.pcie: no vpcie12v regulator found
[    0.946470] rockchip-pcie f8000000.pcie: no vpcie3v3 regulator found
[    0.946492] rockchip-pcie f8000000.pcie: supply vpcie1v8 not found, using dummy regulator
[    0.946639] rockchip-pcie f8000000.pcie: supply vpcie0v9 not found, using dummy regulator
[    1.507555] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout!
[    1.507608] rockchip-pcie: probe of f8000000.pcie failed with error -110
[    1.515148] dma-pl330 ff6d0000.dma-controller: Loaded driver for PL330 DMAC-241330
[    1.515181] dma-pl330 ff6d0000.dma-controller:   DBUFF-32x8bytes Num_Chans-6 Num_Peri-12 Num_Events-12
[    1.516685] dma-pl330 ff6e0000.dma-controller: Loaded driver for PL330 DMAC-241330
[    1.516712] dma-pl330 ff6e0000.dma-controller:   DBUFF-128x8bytes Num_Chans-8 Num_Peri-20 Num_Events-16
[    1.521196] Serial: 8250/16550 driver, 5 ports, IRQ sharing enabled
[    1.523490] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 37, base_baud = 1500000) is a 16550A
[    1.524375] ff1a0000.serial: ttyS2 at MMIO 0xff1a0000 (irq = 38, base_baud = 1500000) is a 16550A
[    1.646635] printk: console [ttyS2] enabled
[    1.648219] Serial: AMBA driver
[    1.650316] random: crng init done
[    1.654784] rockchip-vop ff8f0000.vop: Adding to iommu group 2
[    1.655949] rockchip-vop ff900000.vop: Adding to iommu group 3
[    1.662729] rockchip-drm display-subsystem: bound ff8f0000.vop (ops vop_component_ops)
[    1.663561] [drm] unsupported AFBC format[3231564e]
[    1.665064] rockchip-drm display-subsystem: bound ff900000.vop (ops vop_component_ops)
[    1.665855] dwhdmi-rockchip ff940000.hdmi: supply avdd-0v9 not found, using dummy regulator
[    1.666741] dwhdmi-rockchip ff940000.hdmi: supply avdd-1v8 not found, using dummy regulator
[    1.671536] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.674371] brd: module loaded
[    1.737476] loop: module loaded
[    1.746772] usbcore: registered new interface driver cdc_wdm
[    1.747333] usbcore: registered new interface driver usb-storage
[    1.747965] usbcore: registered new interface driver usbserial_generic
[    1.748567] usbserial: USB Serial support registered for generic
[    1.749142] usbcore: registered new interface driver ch341
[    1.749648] usbserial: USB Serial support registered for ch341-uart
[    1.750231] usbcore: registered new interface driver cp210x
[    1.750749] usbserial: USB Serial support registered for cp210x
[    1.751302] usbcore: registered new interface driver ftdi_sio
[    1.751854] usbserial: USB Serial support registered for FTDI USB Serial Device
[    1.752533] usbcore: registered new interface driver garmin_gps
[    1.753078] usbserial: USB Serial support registered for Garmin GPS usb/tty
[    1.753722] usbcore: registered new interface driver ipw
[    1.754218] usbserial: USB Serial support registered for IPWireless converter
[    1.754881] usbcore: registered new interface driver opticon
[    1.755403] usbserial: USB Serial support registered for opticon
[    1.755980] usbcore: registered new interface driver pl2303
[    1.756496] usbserial: USB Serial support registered for pl2303
[    1.757050] usbcore: registered new interface driver qcaux
[    1.757556] usbserial: USB Serial support registered for qcaux
[    1.758109] usbcore: registered new interface driver qcserial
[    1.758639] usbserial: USB Serial support registered for Qualcomm USB modem
[    1.759287] usbcore: registered new interface driver symbolserial
[    1.759863] usbserial: USB Serial support registered for symbol
[    1.761039] mousedev: PS/2 mouse device common for all mice
[    1.762712] SPI driver rmi4_spi has no spi_device_id for syna,rmi4-spi
[    1.764200] i2c_dev: i2c /dev entries driver
[    1.767333] i2c 0-001b: Fixed dependency cycle(s) with /i2c@ff3c0000/pmic@1b/regulators/LDO_REG3
[    1.768969] fan53555-regulator 0-0040: FAN53555 Option[8] Rev[1] Detected!
wackejohn commented 12 months ago

rk3399的device tree需要修正。。。 我的补丁:

diff -uNr linux-6.1.61_orig/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts linux-6.1.61/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
--- linux-6.1.61_orig/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts   2023-11-02 16:35:33.000000000 +0800
+++ linux-6.1.61/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts    2023-12-01 14:20:59.689883577 +0800
@@ -17,8 +17,12 @@

    aliases {
        mmc0 = &sdio0;
-       mmc1 = &sdmmc;
-       mmc2 = &sdhci;
+       mmc1 = &sdhci;
+       mmc2 = &sdmmc;
+       led-boot = &work_led;
+       led-failsafe = &work_led;
+       led-running = &work_led;
+       led-upgrade = &work_led;
    };

    chosen {
@@ -294,8 +298,8 @@
    snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
    snps,reset-active-low;
    snps,reset-delays-us = <0 10000 50000>;
-   tx_delay = <0x28>;
-   rx_delay = <0x11>;
+   tx_delay = <0x2a>;
+   rx_delay = <0x21>;
    status = "okay";
 };

@@ -503,7 +507,7 @@
    vdd_cpu_b: regulator@40 {
        compatible = "silergy,syr827";
        reg = <0x40>;
-       fcs,suspend-voltage-selector = <0>;
+       fcs,suspend-voltage-selector = <1>;
        regulator-name = "vdd_cpu_b";
        regulator-min-microvolt = <712500>;
        regulator-max-microvolt = <1500000>;
@@ -786,9 +790,6 @@
    brcmf: wifi@1 {
        reg = <1>;
        compatible = "brcm,bcm4329-fmac";
-       interrupt-parent = <&gpio0>;
-       interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
-       interrupt-names = "host-wake";
        brcm,drive-strength = <5>;
        pinctrl-names = "default";
        pinctrl-0 = <&wifi_host_wake_l>;

其中tx_delay rx_delay用于修正rtl8211e网卡速率,所有rk3399的device tree里的delay都有问题,网卡速率在100Mbps\(包括uboot里也需要修正)。

wackejohn commented 12 months ago

Device Information | 设备信息

  • SOC: rk3399
  • Model Firefly-RK3399

OpenWrt Version | 系统版本

  • Kernel Version: 6.1.65
  • Release: official&lede&immortalwrt

Describe the bug | 问题描述 使用SD卡刷入最新编译的镜像(20231206),出现内核报错Unable to handle kernel implementation fault (unsupported exclusive)

尝试将内核替换为 #491 中使用的6.1.58版本后,启动日志类似于该issue中 #491 (comment) 的情况。

感觉和内核版本有关,由于无法找到 #491 中可以成功启动的镜像,无法验证。

启动日志如下:

U-Boot 2022.04-armbian (Oct 10 2023 - 14:19:41 +0300)

SoC: Rockchip rk3399
Reset cause: POR
Model: Firefly-RK3399 Board
DRAM:  3.9 GiB
PMIC:  RK808 
Core:  286 devices, 28 uclasses, devicetree: separate
MMC:   mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial
Out:   vidconsole
Err:   vidconsole
Model: Firefly-RK3399 Board
Net:   eth0: ethernet@fe300000
Hit any key to stop autoboot:  0 
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe900000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 2 USB Device(s) found
scanning bus usb@fe900000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
1:    Armbian
Retrieving file: /uInitrd
Retrieving file: /Image
append: root=UUID=08775507-9354-4560-9c85-d1ea487db512 rootflags=compress=zstd:6 rootfstype=btrfs console=ttyS2,1500000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles
Retrieving file: /dtb/rockchip/rk3399-firefly.dtb
Moving Image from 0x2080000 to 0x2200000, end=4330000
## Loading init Ramdisk from Legacy Image at 06000000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    16865661 Bytes = 16.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to f0ef6000, end f1f0b97d ... OK
   Loading Device Tree to 00000000f0ede000, end 00000000f0ef5cbe ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.1.65-ophub (root@fv-az841-991) (aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 13.2.1 20231009, GNU ld (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 2.41.0.20231009) #1 SMP Sun Dec  3 05:14:23 EST 2023
[    0.000000] Machine model: Firefly-RK3399 Board
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000200000-0x00000000f7ffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000200000-0x00000000f7ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x00000000f7ffffff]
[    0.000000] On node 0, zone DMA: 512 pages in unavailable ranges
[    0.000000] cma: Reserved 256 MiB at 0x00000000e0e00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] percpu: Embedded 19 pages/cpu s38056 r8192 d31576 u77824
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 999432
[    0.000000] Kernel command line: root=UUID=08775507-9354-4560-9c85-d1ea487db512 rootflags=compress=zstd:6 rootfstype=btrfs console=ttyS2,1500000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles
[    0.000000] Unknown kernel command line parameters "splash", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 3677888K/4061184K available (16960K kernel code, 2920K rwdata, 8188K rodata, 4864K init, 892K bss, 121152K reserved, 262144K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:   RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=6.
[    0.000000]    Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=6
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 256 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv3: GICv3 features: 16 PPIs
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000fef00000
[    0.000000] ITS [mem 0xfee20000-0xfee3ffff]
[    0.000000] ITS@0x00000000fee20000: allocated 65536 Devices @480000 (flat, esz 8, psz 64K, shr 0)
[    0.000000] ITS: using cache flushing for cmd queue
[    0.000000] GICv3: using LPI property table @0x0000000000440000
[    0.000000] GIC: using cache flushing for LPI property table
[    0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000000450000
[    0.000000] GICv3: GIC: PPI partition interrupt-partition-0[0] { /cpus/cpu@0[0] /cpus/cpu@1[1] /cpus/cpu@2[2] /cpus/cpu@3[3] }
[    0.000000] GICv3: GIC: PPI partition interrupt-partition-1[1] { /cpus/cpu@100[4] /cpus/cpu@101[5] }
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    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.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.002131] Console: colour dummy device 80x25
[    0.002739] printk: console [tty0] enabled
[    0.002798] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.002832] pid_max: default: 32768 minimum: 301
[    0.003202] LSM: Security Framework initializing
[    0.003395] SELinux:  Initializing.
[    0.003944] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.003994] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.006108] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.007039] cblist_init_generic: Setting adjustable number of callback queues.
[    0.007065] cblist_init_generic: Setting shift to 3 and lim to 1.
[    0.007334] rcu: Hierarchical SRCU implementation.
[    0.007353] rcu:   Max phase no-delay instances is 1000.
[    0.009322] Platform MSI: interrupt-controller@fee20000 domain created
[    0.009792] PCI/MSI: /interrupt-controller@fee00000/interrupt-controller@fee20000 domain created
[    0.010595] EFI services will not be available.
[    0.011230] smp: Bringing up secondary CPUs ...
[    0.011992] Detected VIPT I-cache on CPU1
[    0.012118] cacheinfo: Unable to detect cache hierarchy for CPU 1
[    0.012134] GICv3: CPU1: found redistributor 1 region 0:0x00000000fef20000
[    0.012155] GICv3: CPU1: using allocated LPI pending table @0x0000000000460000
[    0.012206] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.012955] Detected VIPT I-cache on CPU2
[    0.013062] cacheinfo: Unable to detect cache hierarchy for CPU 2
[    0.013076] GICv3: CPU2: found redistributor 2 region 0:0x00000000fef40000
[    0.013094] GICv3: CPU2: using allocated LPI pending table @0x0000000000470000
[    0.013129] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.013878] Detected VIPT I-cache on CPU3
[    0.013986] cacheinfo: Unable to detect cache hierarchy for CPU 3
[    0.014000] GICv3: CPU3: found redistributor 3 region 0:0x00000000fef60000
[    0.014017] GICv3: CPU3: using allocated LPI pending table @0x0000000000500000
[    0.014051] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.014784] CPU features: detected: Spectre-v2
[    0.014795] CPU features: detected: Spectre-v4
[    0.014801] CPU features: detected: Spectre-BHB
[    0.014808] CPU features: detected: ARM erratum 1742098
[    0.014814] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.014819] Detected PIPT I-cache on CPU4
[    0.014927] cacheinfo: Unable to detect cache hierarchy for CPU 4
[    0.014941] GICv3: CPU4: found redistributor 100 region 0:0x00000000fef80000
[    0.014958] GICv3: CPU4: using allocated LPI pending table @0x0000000000510000
[    0.014998] CPU4: Booted secondary processor 0x0000000100 [0x410fd082]
[    0.015749] Detected PIPT I-cache on CPU5
[    0.015846] cacheinfo: Unable to detect cache hierarchy for CPU 5
[    0.015859] GICv3: CPU5: found redistributor 101 region 0:0x00000000fefa0000
[    0.015876] GICv3: CPU5: using allocated LPI pending table @0x0000000000520000
[    0.015906] CPU5: Booted secondary processor 0x0000000101 [0x410fd082]
[    0.015997] smp: Brought up 1 node, 6 CPUs
[    0.016333] SMP: Total of 6 processors activated.
[    0.016351] CPU features: detected: 32-bit EL0 Support
[    0.016366] CPU features: detected: 32-bit EL1 Support
[    0.016384] CPU features: detected: CRC32 instructions
[    0.016508] CPU: All CPU(s) started at EL2
[    0.016533] alternatives: applying system-wide alternatives
[    0.020064] devtmpfs: initialized
[    0.036783] Registered cp15_barrier emulation handler
[    0.036817] Registered setend emulation handler
[    0.037000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.037032] futex hash table entries: 2048 (order: 5, 131072 bytes, linear)
[    0.041934] prandom: seed boundary self test passed
[    0.043652] prandom: 100 self tests passed

[    0.043702] pinctrl core: initialized pinctrl subsystem
[    0.044264] DMI not present or invalid.
[    0.044839] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.046656] DMA: preallocated 2048 KiB GFP_KERNEL pool for atomic allocations
[    0.047499] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.048172] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.048249] audit: initializing netlink subsys (disabled)
[    0.048469] audit: type=2000 audit(0.048:1): state=initialized audit_enabled=0 res=1
[    0.049627] thermal_sys: Registered thermal governor 'step_wise'
[    0.049676] cpuidle: using governor ladder
[    0.049853] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.050017] ASID allocator initialised with 65536 entries
[    0.050135] Serial: AMBA PL011 UART driver
[    0.072167] platform fe330000.mmc: Fixed dependency cycle(s) with /syscon@ff770000/phy@f780
[    0.076860] platform ff940000.hdmi: Fixed dependency cycle(s) with /vop@ff8f0000/port/endpoint@2
[    0.076903] platform ff940000.hdmi: Fixed dependency cycle(s) with /vop@ff900000/port/endpoint@2
[    0.084862] rockchip-gpio ff720000.gpio: probed /pinctrl/gpio@ff720000
[    0.085611] rockchip-gpio ff730000.gpio: probed /pinctrl/gpio@ff730000
[    0.086247] rockchip-gpio ff780000.gpio: probed /pinctrl/gpio@ff780000
[    0.086877] rockchip-gpio ff788000.gpio: probed /pinctrl/gpio@ff788000
[    0.087521] rockchip-gpio ff790000.gpio: probed /pinctrl/gpio@ff790000
[    0.106266] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[    0.106292] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[    0.106308] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
[    0.106322] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
[    0.106336] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.106350] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[    0.106364] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
[    0.106376] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
[    0.107563] cryptd: max_cpu_qlen set to 1000
[    0.175916] raid6: neonx8   gen()  1784 MB/s
[    0.244015] raid6: neonx4   gen()  1732 MB/s
[    0.312136] raid6: neonx2   gen()  1434 MB/s
[    0.380242] raid6: neonx1   gen()  1040 MB/s
[    0.448348] raid6: int64x8  gen()   997 MB/s
[    0.516457] raid6: int64x4  gen()   976 MB/s
[    0.584553] raid6: int64x2  gen()   943 MB/s
[    0.652653] raid6: int64x1  gen()   721 MB/s
[    0.652665] raid6: using algorithm neonx8 gen() 1784 MB/s
[    0.720733] raid6: .... xor() 1309 MB/s, rmw enabled
[    0.720746] raid6: using neon recovery algorithm
[    0.720941] fbcon: Taking over console
[    0.720978] ACPI: Interpreter disabled.
[    0.722829] iommu: Default domain type: Translated 
[    0.722850] iommu: DMA domain TLB invalidation policy: strict mode 
[    0.723317] SCSI subsystem initialized
[    0.723731] usbcore: registered new interface driver usbfs
[    0.723805] usbcore: registered new interface driver hub
[    0.723878] usbcore: registered new device driver usb
[    0.724402] mc: Linux media interface: v0.10
[    0.724452] videodev: Linux video capture interface: v2.00
[    0.724761] EDAC MC: Ver: 3.0.0
[    0.725934] Advanced Linux Sound Architecture Driver Initialized.
[    0.726737] vgaarb: loaded
[    0.727093] clocksource: Switched to clocksource arch_sys_counter
[    0.727453] VFS: Disk quotas dquot_6.6.0
[    0.727537] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.727677] FS-Cache: Loaded
[    0.727954] pnp: PnP ACPI: disabled
[    0.737692] NET: Registered PF_INET protocol family
[    0.737983] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.742648] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.742723] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.742781] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.743151] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[    0.744438] TCP: Hash tables configured (established 32768 bind 32768)
[    0.744727] MPTCP token hash table entries: 4096 (order: 4, 98304 bytes, linear)
[    0.744876] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.745022] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.745403] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.745449] NET: Registered PF_XDP protocol family
[    0.745468] PCI: CLS 0 bytes, default 64
[    0.746021] Trying to unpack rootfs image as initramfs...
[    0.757410] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    0.758640] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[    0.759392] kvm [1]: IPA Size Limit: 40 bits
[    0.761125] kvm [1]: vgic-v2@fff20000
[    0.761161] kvm [1]: GIC system register CPU interface enabled
[    0.762193] kvm [1]: vgic interrupt IRQ18
[    0.763319] kvm [1]: Hyp mode initialized successfully
[    0.765678] Initialise system trusted keyrings
[    0.765948] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    0.773368] zbud: loaded
[    0.775413] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.776026] fuse: init (API version 7.37)
[    0.776610] SGI XFS with ACLs, security attributes, quota, no debug enabled
[    0.845398] NET: Registered PF_ALG protocol family
[    0.845455] xor: measuring software checksum speed
[    0.848864]    8regs           :  2921 MB/sec
[    0.852020]    32regs          :  3143 MB/sec
[    0.855835]    arm64_neon      :  2594 MB/sec
[    0.855849] xor: using function: 32regs (3143 MB/sec)
[    0.855870] Key type asymmetric registered
[    0.855882] Asymmetric key parser 'x509' registered
[    0.855987] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[    0.856153] io scheduler mq-deadline registered
[    0.856169] io scheduler kyber registered
[    0.856344] io scheduler bfq registered
[    0.954427] dma-pl330 ff6d0000.dma-controller: Loaded driver for PL330 DMAC-241330
[    0.954463] dma-pl330 ff6d0000.dma-controller:     DBUFF-32x8bytes Num_Chans-6 Num_Peri-12 Num_Events-12
[    0.955935] dma-pl330 ff6e0000.dma-controller: Loaded driver for PL330 DMAC-241330
[    0.955961] dma-pl330 ff6e0000.dma-controller:     DBUFF-128x8bytes Num_Chans-8 Num_Peri-20 Num_Events-16
[    0.960198] Serial: 8250/16550 driver, 5 ports, IRQ sharing enabled
[    0.962544] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 37, base_baud = 1500000) is a 16550A
[    0.962715] serial serial0: tty port ttyS0 registered
[    0.963582] ff1a0000.serial: ttyS2 at MMIO 0xff1a0000 (irq = 38, base_baud = 1500000) is a 16550A
[    1.079710] printk: console [ttyS2] enabled
[    1.081325] Serial: AMBA driver
[    1.083413] random: crng init done
[    1.087942] rockchip-vop ff8f0000.vop: Adding to iommu group 2
[    1.089039] rockchip-vop ff900000.vop: Adding to iommu group 3
[    1.098361] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.101226] brd: module loaded
[    1.164270] loop: module loaded
[    1.167911] spi-nor spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
[    1.175695] usbcore: registered new interface driver cdc_wdm
[    1.176261] usbcore: registered new interface driver usb-storage
[    1.176869] usbcore: registered new interface driver usbserial_generic
[    1.177470] usbserial: USB Serial support registered for generic
[    1.178034] usbcore: registered new interface driver ch341
[    1.178541] usbserial: USB Serial support registered for ch341-uart
[    1.179141] usbcore: registered new interface driver cp210x
[    1.179656] usbserial: USB Serial support registered for cp210x
[    1.180214] usbcore: registered new interface driver ftdi_sio
[    1.180744] usbserial: USB Serial support registered for FTDI USB Serial Device
[    1.181425] usbcore: registered new interface driver garmin_gps
[    1.181973] usbserial: USB Serial support registered for Garmin GPS usb/tty
[    1.182624] usbcore: registered new interface driver ipw
[    1.183127] usbserial: USB Serial support registered for IPWireless converter
[    1.183790] usbcore: registered new interface driver opticon
[    1.184312] usbserial: USB Serial support registered for opticon
[    1.184873] usbcore: registered new interface driver pl2303
[    1.185391] usbserial: USB Serial support registered for pl2303
[    1.185949] usbcore: registered new interface driver qcaux
[    1.186455] usbserial: USB Serial support registered for qcaux
[    1.187002] usbcore: registered new interface driver qcserial
[    1.187542] usbserial: USB Serial support registered for Qualcomm USB modem
[    1.188189] usbcore: registered new interface driver symbolserial
[    1.188748] usbserial: USB Serial support registered for symbol
[    1.189916] mousedev: PS/2 mouse device common for all mice
[    1.191635] SPI driver rmi4_spi has no spi_device_id for syna,rmi4-spi
[    1.193128] i2c_dev: i2c /dev entries driver
[    1.197372] dw-apb-uart ff180000.serial: Failed to create device link (0x180) with 0-001b
[    1.198186] i2c 0-001b: Fixed dependency cycle(s) with /i2c@ff3c0000/pmic@1b/regulators/LDO_REG8
[    1.208836] sdhci: Secure Digital Host Controller Interface driver
[    1.209400] sdhci: Copyright(c) Pierre Ossman
[    1.209793] Synopsys Designware Multimedia Card Interface Driver
[    1.211565] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.214701] ledtrig-cpu: registered to indicate activity on CPUs
[    1.217618] hid: raw HID events driver (C) Jiri Kosina
[    1.218186] usbcore: registered new interface driver usbhid
[    1.218688] usbhid: USB HID core driver
[    1.247815] Initializing XFRM netlink socket
[    1.248717] NET: Registered PF_INET6 protocol family
[    1.887137] Freeing initrd memory: 16468K
[    1.957003] Segment Routing with IPv6
[    1.957353] RPL Segment Routing with IPv6
[    1.957751] In-situ OAM (IOAM) with IPv6
[    1.958249] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.959767] NET: Registered PF_PACKET protocol family
[    1.960242] NET: Registered PF_KEY protocol family
[    1.960994] 8021q: 802.1Q VLAN Support v1.8
[    1.961985] registered taskstats version 1
[    1.962383] Loading compiled-in X.509 certificates
[    1.970798] zswap: loaded using pool zstd/zbud
[    1.972580] Key type .fscrypt registered
[    1.972952] Key type fscrypt-provisioning registered
[    1.974768] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
[    2.419059] alg: No test for 842 (842-scomp)
[    2.420149] alg: No test for 842 (842-generic)
[    3.460376] dw-apb-uart ff180000.serial: Failed to create device link (0x180) with vcc3v3-sys
[    3.474122] rk808 0-001b: chip id: 0x0
[    3.485047] rk808-regulator rk808-regulator: there is no dvs0 gpio
[    3.485660] rk808-regulator rk808-regulator: there is no dvs1 gpio
[    3.492817] vcca1v8_hdmi: Bringing 2800000uV into 1800000-1800000uV
[    3.501244] vcca0v9_hdmi: Bringing 1800000uV into 900000-900000uV
[    3.514356] rk808-rtc rk808-rtc: registered as rtc0
[    3.516087] rk808-rtc rk808-rtc: setting system clock to 2013-01-18T08:51:12 UTC (1358499072)
[    3.517630] dw-apb-uart ff180000.serial: Failed to create device link (0x180) with 0-001b
[    3.519620] fan53555-regulator 0-0040: FAN53555 Option[8] Rev[1] Detected!
[    3.524710] fan53555-regulator 0-0041: FAN53555 Option[8] Rev[1] Detected!
[    3.532736] cpu cpu0: EM: created perf domain
[    3.534940] cpu cpu4: EM: created perf domain
[    3.548269] rockchip-pcie f8000000.pcie: host bridge /pcie@f8000000 ranges:
[    3.548923] rockchip-pcie f8000000.pcie:      MEM 0x00fa000000..0x00fbdfffff -> 0x00fa000000
[    3.549673] rockchip-pcie f8000000.pcie:       IO 0x00fbe00000..0x00fbefffff -> 0x00fbe00000
[    3.550766] rockchip-pcie f8000000.pcie: no vpcie12v regulator found
[    4.107382] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout with x524289!
[    4.635578] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout with x524289!
[    4.636343] Unable to handle kernel implementation fault (unsupported exclusive) at virtual address ffffffc0110002d0
[    4.637299] Mem abort info:
[    4.637565]   ESR = 0x0000000096000035
[    4.637917]   EC = 0x25: DABT (current EL), IL = 32 bits
[    4.638410]   SET = 0, FnV = 0
[    4.638701]   EA = 0, S1PTW = 0
[    4.638999]   FSC = 0x35: implementation fault (unsupported exclusive)
[    4.639628] Data abort info:
[    4.639905]   ISV = 0, ISS = 0x00000035
[    4.640264]   CM = 0, WnR = 0
[    4.640548] swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000003aaa000
[    4.641165] [ffffffc0110002d0] pgd=10000000f7fff003, p4d=10000000f7fff003, pud=10000000f7fff003, pmd=00680000fd000711
[    4.642157] Internal error: Oops: 0000000096000035 [#1] SMP
[    4.642676] Modules linked in:
[    4.642973] CPU: 0 PID: 63 Comm: kworker/u12:1 Not tainted 6.1.65-ophub #1
[    4.643610] Hardware name: Firefly-RK3399 Board (DT)
[    4.644072] Workqueue: events_unbound deferred_probe_work_func
[    4.644633] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    4.645279] pc : mutex_lock+0x24/0x64
[    4.645646] lr : mutex_lock+0x18/0x64
[    4.646008] sp : ffffffc00aadbaf0
[    4.646321] x29: ffffffc00aadbaf0 x28: ffffff8000c21500 x27: ffffff800040ec00
[    4.646997] x26: 0000000000000005 x25: 00000000ffffffff x24: ffffff8000f56c10
[    4.647670] x23: ffffff8008759358 x22: ffffff8008759000 x21: ffffff8000f56c10
[    4.648344] x20: ffffffc0110002d0 x19: ffffffc0110002d0 x18: ffffffffffffffff
[    4.649019] x17: 7469772074756f65 x16: 6d697420316e6567 x15: 20676e696e696172
[    4.649693] x14: 74206b6e696c2065 x13: ffffffc009d9ce78 x12: 00000000000003ab
[    4.650366] x11: 0000000000000139 x10: ffffffc009e4ce78 x9 : ffffffc009d9ce78
[    4.651040] x8 : 00000000ffffdfff x7 : ffffffc009e4ce78 x6 : 80000000ffffe000
[    4.651712] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
[    4.652383] x2 : 0000000000000000 x1 : ffffff800104c600 x0 : 0000000000000000
[    4.653056] Call trace:
[    4.653294]  mutex_lock+0x24/0x64
[    4.653628]  phy_power_off+0x28/0xd0
[    4.653978]  rockchip_pcie_probe+0xb04/0xc1c
[    4.654394]  platform_probe+0x68/0xc4
[    4.654756]  really_probe+0xc0/0x3e0
[    4.655104]  __driver_probe_device+0x7c/0x15c
[    4.655523]  driver_probe_device+0x40/0xe0
[    4.655918]  __device_attach_driver+0xbc/0x160
[    4.656346]  bus_for_each_drv+0x7c/0xdc
[    4.656716]  __device_attach+0xa0/0x1c4
[    4.657088]  device_initial_probe+0x14/0x20
[    4.657491]  bus_probe_device+0x98/0xa0
[    4.657863]  deferred_probe_work_func+0x9c/0xf0
[    4.658296]  process_one_work+0x1dc/0x370
[    4.658689]  worker_thread+0x268/0x4e0
[    4.659059]  kthread+0xd4/0xdc
[    4.659361]  ret_from_fork+0x10/0x20
[    4.659719] Code: 97fffa2b d2800000 d5384101 f9800271 (c85ffe62) 
[    4.660282] ---[ end trace 0000000000000000 ]---

卡死的原因,似乎是因为pcie补丁:

From 08d70acd0f1057eaaf06d76021b4d89ff559909d Mon Sep 17 00:00:00 2001
From: Igor Pecovnik <igor.pecovnik@gmail.com>
Date: Thu, 20 Oct 2022 21:46:01 +0200
Subject: [PATCH] Add an attempt counter, which helps buggy PCIe links

(c) David Manouchehri

Adjusted by igor@armbian.com
---
 drivers/pci/controller/pcie-rockchip-host.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/controller/pcie-rockchip-host.c b/drivers/pci/controller/pcie-rockchip-host.c
index a7974007d..8e2a89dd3 100644
--- a/drivers/pci/controller/pcie-rockchip-host.c
+++ b/drivers/pci/controller/pcie-rockchip-host.c
@@ -300,9 +300,9 @@ static void rockchip_pcie_set_power_limit(struct rockchip_pcie *rockchip)
 static int rockchip_pcie_host_init_port(struct rockchip_pcie *rockchip)
 {
    struct device *dev = rockchip->dev;
-   int err, i = MAX_LANE_NUM;
+   int err, i = MAX_LANE_NUM, attempt_counter = 0;
    u32 status;
-
+err_retry_init:
    gpiod_set_value_cansleep(rockchip->ep_gpio, 0);

    err = rockchip_pcie_init_port(rockchip);
@@ -338,7 +338,7 @@ static int rockchip_pcie_host_init_port(struct rockchip_pcie *rockchip)
                 status, PCIE_LINK_UP(status), 20,
                 500 * USEC_PER_MSEC);
    if (err) {
-       dev_err(dev, "PCIe link training gen1 timeout!\n");
+       dev_err(dev, "PCIe link training gen1 timeout with x%d!\n", status);
        goto err_power_off_phy;
    }

@@ -356,6 +356,7 @@ static int rockchip_pcie_host_init_port(struct rockchip_pcie *rockchip)
                     500 * USEC_PER_MSEC);
        if (err)
            dev_dbg(dev, "PCIe link training gen2 timeout, fall back to gen1!\n");
+           dev_dbg(dev, "PCIe link training gen2 timeout with x%d, fall back to gen1!\n", status);
    }

    /* Check the final link width from negotiated lane counter from MGMT */
@@ -403,6 +404,9 @@ static int rockchip_pcie_host_init_port(struct rockchip_pcie *rockchip)
    i = MAX_LANE_NUM;
    while (i--)
        phy_exit(rockchip->phys[i]);
+   if(attempt_counter++ < 5)
+
+goto err_retry_init;
    return err;
 }

-- 

我的openwrt加入上述pcie补丁后:

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.1.65 (Wacke@HOME-Server) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 13.2.0 r24592-230a2b8a5e) 13.2.0, GNU ld (GNU Binutils) 2.41) #0 SMP PREEMPT Thu Dec  7 23:08:11 2023
[    0.000000] Machine model: Firefly-RK3399 Board
[    0.000000] earlycon: uart8250 at MMIO32 0x00000000ff1a0000 (options '')
[    0.000000] printk: bootconsole [uart8250] enabled
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000200000-0x00000000f7ffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000200000-0x00000000f7ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x00000000f7ffffff]
[    0.000000] On node 0, zone DMA: 512 pages in unavailable ranges
[    0.000000] cma: Reserved 16 MiB at 0x00000000f6600000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 18 pages/cpu s33640 r8192 d31896 u73728
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 999432
[    0.000000] Kernel command line: console=ttyS2,1500000 earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1 root=PARTUUID=e2ad27ae-dfd2-8dd5-3e3a-6906644f1bfb rw rootwait
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 3949604K/4061184K available (8896K kernel code, 2408K rwdata, 2688K rodata, 1792K init, 724K bss, 95196K reserved, 16384K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=6.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=6
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 256 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv3: GICv3 features: 16 PPIs
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000fef00000
[    0.000000] ITS [mem 0xfee20000-0xfee3ffff]
[    0.000000] ITS@0x00000000fee20000: allocated 65536 Devices @480000 (flat, esz 8, psz 64K, shr 0)
[    0.000000] ITS: using cache flushing for cmd queue
[    0.000000] GICv3: using LPI property table @0x0000000000440000
[    0.000000] GIC: using cache flushing for LPI property table
[    0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000000450000
[    0.000000] GICv3: GIC: PPI partition interrupt-partition-0[0] { /cpus/cpu@0[0] /cpus/cpu@1[1] /cpus/cpu@2[2] /cpus/cpu@3[3] }
[    0.000000] GICv3: GIC: PPI partition interrupt-partition-1[1] { /cpus/cpu@100[4] /cpus/cpu@101[5] }
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    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.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.001910] Console: colour dummy device 80x25
[    0.002391] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.003389] pid_max: default: 32768 minimum: 301
[    0.004482] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.005217] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.007890] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.009365] cblist_init_generic: Setting adjustable number of callback queues.
[    0.010056] cblist_init_generic: Setting shift to 3 and lim to 1.
[    0.010767] cblist_init_generic: Setting adjustable number of callback queues.
[    0.011458] cblist_init_generic: Setting shift to 3 and lim to 1.
[    0.012318] rcu: Hierarchical SRCU implementation.
[    0.012779] rcu:     Max phase no-delay instances is 1000.
[    0.013646] Platform MSI: interrupt-controller@fee20000 domain created
[    0.014688] PCI/MSI: /interrupt-controller@fee00000/interrupt-controller@fee20000 domain created
[    0.016269] smp: Bringing up secondary CPUs ...
[    0.017401] Detected VIPT I-cache on CPU1
[    0.017525] cacheinfo: Unable to detect cache hierarchy for CPU 1
[    0.017542] GICv3: CPU1: found redistributor 1 region 0:0x00000000fef20000
[    0.017563] GICv3: CPU1: using allocated LPI pending table @0x0000000000460000
[    0.017619] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.018434] Detected VIPT I-cache on CPU2
[    0.018543] cacheinfo: Unable to detect cache hierarchy for CPU 2
[    0.018558] GICv3: CPU2: found redistributor 2 region 0:0x00000000fef40000
[    0.018577] GICv3: CPU2: using allocated LPI pending table @0x0000000000470000
[    0.018615] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.019316] Detected VIPT I-cache on CPU3
[    0.019429] cacheinfo: Unable to detect cache hierarchy for CPU 3
[    0.019443] GICv3: CPU3: found redistributor 3 region 0:0x00000000fef60000
[    0.019461] GICv3: CPU3: using allocated LPI pending table @0x0000000000500000
[    0.019496] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.020237] CPU features: detected: Spectre-v2
[    0.020248] CPU features: detected: Spectre-v3a
[    0.020258] CPU features: detected: Spectre-BHB
[    0.020268] Detected PIPT I-cache on CPU4
[    0.020374] cacheinfo: Unable to detect cache hierarchy for CPU 4
[    0.020389] GICv3: CPU4: found redistributor 100 region 0:0x00000000fef80000
[    0.020407] GICv3: CPU4: using allocated LPI pending table @0x0000000000510000
[    0.020444] CPU4: Booted secondary processor 0x0000000100 [0x410fd082]
[    0.021210] Detected PIPT I-cache on CPU5
[    0.021304] cacheinfo: Unable to detect cache hierarchy for CPU 5
[    0.021318] GICv3: CPU5: found redistributor 101 region 0:0x00000000fefa0000
[    0.021334] GICv3: CPU5: using allocated LPI pending table @0x0000000000520000
[    0.021365] CPU5: Booted secondary processor 0x0000000101 [0x410fd082]
[    0.021473] smp: Brought up 1 node, 6 CPUs
[    0.037750] SMP: Total of 6 processors activated.
[    0.038205] CPU features: detected: 32-bit EL0 Support
[    0.038699] CPU features: detected: CRC32 instructions
[    0.039335] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.040136] CPU: All CPU(s) started at EL2
[    0.040527] alternatives: applying system-wide alternatives
[    0.059173] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.060153] futex hash table entries: 2048 (order: 5, 131072 bytes, linear)
[    0.061376] pinctrl core: initialized pinctrl subsystem
[    0.063287] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.065452] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations
[    0.066628] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.067751] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.069661] thermal_sys: Registered thermal governor 'step_wise'
[    0.069669] thermal_sys: Registered thermal governor 'power_allocator'
[    0.070294] cpuidle: using governor menu
[    0.071420] ASID allocator initialised with 65536 entries
[    0.072040] Serial: AMBA PL011 UART driver
[    0.101593] rockchip-gpio ff720000.gpio: probed /pinctrl/gpio@ff720000
[    0.102815] rockchip-gpio ff730000.gpio: probed /pinctrl/gpio@ff730000
[    0.103910] rockchip-gpio ff780000.gpio: probed /pinctrl/gpio@ff780000
[    0.105052] rockchip-gpio ff788000.gpio: probed /pinctrl/gpio@ff788000
[    0.106152] rockchip-gpio ff790000.gpio: probed /pinctrl/gpio@ff790000
[    0.112558] KASLR disabled due to lack of seed
[    0.118955] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[    0.119623] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[    0.120239] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
[    0.120902] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
[    0.121516] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.122192] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[    0.122807] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
[    0.123470] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
[    0.125096] cryptd: max_cpu_qlen set to 1000
[    0.128763] iommu: Default domain type: Passthrough 
[    0.129589] SCSI subsystem initialized
[    0.130152] usbcore: registered new interface driver usbfs
[    0.130735] usbcore: registered new interface driver hub
[    0.131287] usbcore: registered new device driver usb
[    0.132044] pps_core: LinuxPPS API ver. 1 registered
[    0.132554] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.133472] PTP clock support registered
[    0.135407] clocksource: Switched to clocksource arch_sys_counter
[    0.136322] VFS: Disk quotas dquot_6.6.0
[    0.136770] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.141397] NET: Registered PF_INET protocol family
[    0.142132] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.147243] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.148169] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.148938] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.150057] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[    0.152052] TCP: Hash tables configured (established 32768 bind 32768)
[    0.152828] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.153629] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.154635] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.155227] PCI: CLS 0 bytes, default 64
[    0.157222] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    0.163713] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.164291] jffs2: version 2.2 (NAND) (SUMMARY) (ZLIB) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.166889] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.167775] io scheduler mq-deadline registered
[    0.177444] rockchip-pcie f8000000.pcie: host bridge /pcie@f8000000 ranges:
[    0.178163] rockchip-pcie f8000000.pcie:      MEM 0x00fa000000..0x00fbdfffff -> 0x00fa000000
[    0.179001] rockchip-pcie f8000000.pcie:       IO 0x00fbe00000..0x00fbefffff -> 0x00fbe00000
[    0.180343] rockchip-pcie f8000000.pcie: no vpcie12v regulator found
[    0.180978] rockchip-pcie f8000000.pcie: no vpcie3v3 regulator found
[    0.181610] rockchip-pcie f8000000.pcie: supply vpcie1v8 not found, using dummy regulator
[    0.182539] rockchip-pcie f8000000.pcie: supply vpcie0v9 not found, using dummy regulator
[    0.755457] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout with x524289!
[    1.295471] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout with x524289!
[    1.296253] SError Interrupt on CPU5, code 0x00000000bf000002 -- SError
[    1.296263] CPU: 5 PID: 1 Comm: swapper/0 Not tainted 6.1.65 #0
[    1.296273] Hardware name: Firefly-RK3399 Board (DT)
[    1.296278] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    1.296288] pc : mutex_lock+0xc/0x44
[    1.296309] lr : phy_power_off+0x28/0xd0
[    1.296323] sp : ffff80000909bb50
[    1.296327] x29: ffff80000909bb50 x28: 0000000000000000 x27: ffff800008b700c8
[    1.296343] x26: 0000000000000005 x25: 00000000ffffffff x24: ffff000000e60410
[    1.296356] x23: ffff000000f42358 x22: ffff000000f42000 x21: ffff80000d0002d0
[    1.296369] x20: ffff000000f42340 x19: ffff80000d000000 x18: 0000000000000005
[    1.296381] x17: 7469772074756f65 x16: 6d697420316e6567 x15: 20676e696e696172
[    1.296393] x14: 74206b6e696c2065 x13: ffff800008d4f040 x12: 0000000000000204
[    1.296405] x11: 00000000000000ac x10: ffff800008eaf040 x9 : ffff800008d4f040
[    1.296418] x8 : ffff800008eaf040 x7 : ffff800008d4f040 x6 : 0000000000000000
[    1.296429] x5 : ffff800008eaf040 x4 : 0000000000000001 x3 : 0000000000000000
[    1.296440] x2 : ffff000000614b00 x1 : 0000000000000000 x0 : ffff80000d0002d0
[    1.296453] Kernel panic - not syncing: Asynchronous SError Interrupt
[    1.296458] CPU: 5 PID: 1 Comm: swapper/0 Not tainted 6.1.65 #0
[    1.296466] Hardware name: Firefly-RK3399 Board (DT)
[    1.296470] Call trace:
[    1.296473]  dump_backtrace.part.0+0xbc/0xd0
[    1.296489]  show_stack+0x18/0x30
[    1.296500]  dump_stack_lvl+0x64/0x80
[    1.296514]  dump_stack+0x18/0x34
[    1.296526]  panic+0x150/0x30c
[    1.296539]  add_taint+0x0/0xb0
[    1.296549]  arm64_serror_panic+0x6c/0x7c
[    1.296555]  do_serror+0x34/0x74
[    1.296561]  el1h_64_error_handler+0x30/0x4c
[    1.296574]  el1h_64_error+0x68/0x6c
[    1.296581]  mutex_lock+0xc/0x44
[    1.296590]  rockchip_pcie_probe+0xa94/0xb7c
[    1.296603]  platform_probe+0x68/0xc4
[    1.296618]  really_probe+0xbc/0x2dc
[    1.296629]  __driver_probe_device+0x78/0x114
[    1.296639]  driver_probe_device+0x40/0x11c
[    1.296650]  __driver_attach+0x90/0x19c
[    1.296661]  bus_for_each_dev+0x60/0xa0
[    1.296670]  driver_attach+0x24/0x30
[    1.296680]  bus_add_driver+0x158/0x21c
[    1.296690]  driver_register+0x78/0x130
[    1.296702]  __platform_driver_register+0x28/0x34
[    1.296714]  rockchip_pcie_driver_init+0x1c/0x28
[    1.296723]  do_one_initcall+0x4c/0x1c0
[    1.296730]  kernel_init_freeable+0x20c/0x270
[    1.296737]  kernel_init+0x24/0x130
[    1.296744]  ret_from_fork+0x10/0x20
[    1.296753] SMP: stopping secondary CPUs
[    1.296763] Kernel Offset: disabled
[    1.296765] CPU features: 0x00000,0002c084,0000400b
[    1.296773] Memory Limit: none
[    1.320458] ---[ end Kernel panic - not syncing: Asynchronous SError Interrupt ]---
ophub commented 12 months ago

感谢分享,你添加补丁测试好了,把补丁提交到f大的内核仓库吧: https://github.com/unifreq/linux-6.1.y

dts: https://github.com/unifreq/linux-6.1.y/blob/main/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts

wackejohn commented 12 months ago

感谢分享,你添加补丁测试好了,把补丁提交到f大的内核仓库吧: https://github.com/unifreq/linux-6.1.y

dts: https://github.com/unifreq/linux-6.1.y/blob/main/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts

呃,具体需要你们测试了,我使用的是官方openwrt直接编译的固件。。。。

ophub commented 11 months ago

https://github.com/ophub/amlogic-s9xxx-openwrt/issues/516#issuecomment-1845550308

你使用这个补丁后正常了?

wackejohn commented 11 months ago

#516 (comment)

你使用这个补丁后正常了?

这个补丁解决的是fan53555-regulator 0-0040: FAN53555 Option[8] Rev[1] Detected! 卡死,以及rtl8211e速率不正常的问题,最开始的kernel崩溃,不在这个补丁修正范围内,那个kernel崩溃,可能跟pcie初始化补丁有关。。。。

ridethepig commented 11 months ago

rk3399的device tree需要修正。。。 我的补丁:

diff -uNr linux-6.1.61_orig/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts linux-6.1.61/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
--- linux-6.1.61_orig/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts 2023-11-02 16:35:33.000000000 +0800
+++ linux-6.1.61/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts  2023-12-01 14:20:59.689883577 +0800
@@ -17,8 +17,12 @@

  aliases {
      mmc0 = &sdio0;
-     mmc1 = &sdmmc;
-     mmc2 = &sdhci;
+     mmc1 = &sdhci;
+     mmc2 = &sdmmc;
+     led-boot = &work_led;
+     led-failsafe = &work_led;
+     led-running = &work_led;
+     led-upgrade = &work_led;
  };

  chosen {
@@ -294,8 +298,8 @@
  snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
  snps,reset-active-low;
  snps,reset-delays-us = <0 10000 50000>;
- tx_delay = <0x28>;
- rx_delay = <0x11>;
+ tx_delay = <0x2a>;
+ rx_delay = <0x21>;
  status = "okay";
 };

@@ -503,7 +507,7 @@
  vdd_cpu_b: regulator@40 {
      compatible = "silergy,syr827";
      reg = <0x40>;
-     fcs,suspend-voltage-selector = <0>;
+     fcs,suspend-voltage-selector = <1>;
      regulator-name = "vdd_cpu_b";
      regulator-min-microvolt = <712500>;
      regulator-max-microvolt = <1500000>;
@@ -786,9 +790,6 @@
  brcmf: wifi@1 {
      reg = <1>;
      compatible = "brcm,bcm4329-fmac";
-     interrupt-parent = <&gpio0>;
-     interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
-     interrupt-names = "host-wake";
      brcm,drive-strength = <5>;
      pinctrl-names = "default";
      pinctrl-0 = <&wifi_host_wake_l>;

其中tx_delay rx_delay用于修正rtl8211e网卡速率,所有rk3399的device tree里的delay都有问题,网卡速率在100Mbps\(包括uboot里也需要修正)。

似乎在这个项目中使用的kernel(也就是https://github.com/unifreq/linux-6.1.y/blob/main/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts)中, 6.1.65已经不存在这个问题了.

ridethepig commented 11 months ago

在设备树中暂时禁用pcie可以将boot流程继续下去, 虽然这完全没有解决该问题

wackejohn commented 11 months ago

rk3399的device tree需要修正。。。 我的补丁:

diff -uNr linux-6.1.61_orig/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts linux-6.1.61/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
--- linux-6.1.61_orig/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts   2023-11-02 16:35:33.000000000 +0800
+++ linux-6.1.61/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts    2023-12-01 14:20:59.689883577 +0800
@@ -17,8 +17,12 @@

    aliases {
        mmc0 = &sdio0;
-       mmc1 = &sdmmc;
-       mmc2 = &sdhci;
+       mmc1 = &sdhci;
+       mmc2 = &sdmmc;
+       led-boot = &work_led;
+       led-failsafe = &work_led;
+       led-running = &work_led;
+       led-upgrade = &work_led;
    };

    chosen {
@@ -294,8 +298,8 @@
    snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
    snps,reset-active-low;
    snps,reset-delays-us = <0 10000 50000>;
-   tx_delay = <0x28>;
-   rx_delay = <0x11>;
+   tx_delay = <0x2a>;
+   rx_delay = <0x21>;
    status = "okay";
 };

@@ -503,7 +507,7 @@
    vdd_cpu_b: regulator@40 {
        compatible = "silergy,syr827";
        reg = <0x40>;
-       fcs,suspend-voltage-selector = <0>;
+       fcs,suspend-voltage-selector = <1>;
        regulator-name = "vdd_cpu_b";
        regulator-min-microvolt = <712500>;
        regulator-max-microvolt = <1500000>;
@@ -786,9 +790,6 @@
    brcmf: wifi@1 {
        reg = <1>;
        compatible = "brcm,bcm4329-fmac";
-       interrupt-parent = <&gpio0>;
-       interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
-       interrupt-names = "host-wake";
        brcm,drive-strength = <5>;
        pinctrl-names = "default";
        pinctrl-0 = <&wifi_host_wake_l>;

其中tx_delay rx_delay用于修正rtl8211e网卡速率,所有rk3399的device tree里的delay都有问题,网卡速率在100Mbps\(包括uboot里也需要修正)。

似乎在这个项目中使用的kernel(也就是https://github.com/unifreq/linux-6.1.y/blob/main/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts)中%E4%B8%AD), 6.1.65已经不存在这个问题了.

启动卡死可能不存在了,但是rtl8211e网卡速率异常这个,肯定还存在(包括armbian包含的uboot,一样速度异常)...