参考DK1
开发板,增加eMMc芯片,去掉SD卡,去掉网络PHY,其它基本一致,移植完后,内核能被加载运行,但运行一会儿就重启了,请问这种问题怎么定位?(data/attachment/forum/202405/06/165358jp6amxdnuhz1h1kp.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "image.png")
U-Boot 2020.01-
STM32mp-r1 (Apr 22 2024 - 23:44:00 +0800)
CPU: STM32MP157AAA Rev.Z
Model: RDTC stm32mp157aaa3 Main Board
Board: stm32mp1 in trusted mode (st,stm32mp157a-rd-v1)
DRAM: 512 MiB
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
WDT: Started with servicing (32s
timeout)
NAND: 0 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
invalid MAC address in OTP 00:00:00:00:00:00
stm32 vrefbuf timed out: -110
adc@0: can't enable vdd-supply!board_check_usb_power: single shot failed for adc@0[18]!
Net: No ethernet found.
Hit any key to stop autoboot: 0
5792544 bytes read in 166 ms (33.3 MiB/s)
71291 bytes read in 35 ms (1.9 MiB/s)
## Booting kernel from Legacy Image at c2000000 ...
Image Name: Linux-5.4.31
Created: 2024-04-29 12:20:41 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5792480 Bytes = 5.5 MiB
Load Address: c2000040
Entry Point: c2000040
Verifying Checksum ... OK
## Flattened Device Tree blob at c4000000
Booting using the fdt blob at 0xc4000000
XIP Kernel Image
Loading Device Tree to cffeb000, end cffff67a ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.31 (tab@tab-virtual-machine) (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #1 SMP PREEMPT Mon Apr 29 20:15:02 CST 2024
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: RDTC STM32MP157A V1 Main Board
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created DMA memory pool at 0x10000000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node mcuram2@10000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x10040000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node vdev0vring0@10040000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x10041000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node vdev0vring1@10041000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x10042000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node vdev0buffer@10042000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x30000000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node mcuram@30000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x38000000, size 0 MiB
[ 0.000000] OF: reserved mem: initialized node retram@38000000, compatible id shared-dma-pool
[ 0.000000] cma: Reserved 128 MiB at 0xd2000000
[ 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.0
[ 0.000000] percpu: Embedded 19 pages/cpu s48396 r8192 d21236 u77824
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 113536
[ 0.000000] Kernel command line: console=ttySTM0,115200 root=/dev/mmcblk1p3 rootwait rw
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] mem auto-init: stack
ff, heap alloc
ff, heap free
ff
[ 0.000000] Memory: 308384K/458752K available (8192K kernel code, 621K rwdata, 2880K rodata, 1024K init, 187K bss, 19296K reserved, 131072K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x31c/0x4ec with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000009] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000027] Switching to timer-based delay loop, resolution 41ns
[ 0.001765] Console: colour dummy device 80x30
[ 0.001816] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.001839] pid_max: default: 32768 minimum: 301
[ 0.002094] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.002116] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.003332] CPU: Testing write buffer coherency: ok
[ 0.003872] /cpus/cpu@0 missing clock-frequency property
[ 0.003907] /cpus/cpu@1 missing clock-frequency property
[ 0.003926] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.059841] Setting up static identity map for 0xc0100000 - 0xc0100060
[ 0.079816] rcu: Hierarchical SRCU implementation.
[ 0.103744] smp: Bringing up secondary CPUs ...
[ 0.180461] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.180682] smp: Brought up 1 node, 2 CPUs
[ 0.180707] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[ 0.180717] CPU: All CPU(s) started in SVC mode.
[ 0.181556] devtmpfs: initialized
[ 0.207389] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.208074] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.208111] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 0.215021] pinctrl core: initialized pinctrl subsystem
[ 0.223206] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.225611] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.225633] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.226026] Serial: AMBA PL011 UART driver
[ 0.229179] stm32-pm-domain pm_domain: domain core-ret-power-domain registered
[ 0.229241] stm32-pm-domain pm_domain: subdomain core-power-domain registered
[ 0.229260] stm32-pm-domain pm_domain: domains probed
[ 0.266709] SCSI subsystem initialized
[ 0.267415] usbcore: registered new interface driver usbfs
[ 0.267500] usbcore: registered new interface driver hub
[ 0.267646] usbcore: registered new device driver usb
[ 0.268039] pps_core: LinuxPPS API ver. 1 registered
[ 0.268054] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <
giometti@linux.it>
[ 0.268322] EDAC MC: Ver: 3.0.0
[ 0.269668] Advanced Linux Sound Architecture Driver Initialized.
[ 0.270154] clocksource: Switched to clocksource arch_sys_counter
[ 0.353194] thermal_sys: Registered thermal governor 'step_wise'
[ 0.354558] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[ 0.356496] Initialise system trusted keyrings
[ 0.356886] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[ 0.367572] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.368032] ntfs: driver 2.1.32 [Flags: R/O].
[ 0.368528] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.369353] fuse: init (API version 7.31)
[ 0.370355] Key type asymmetric registered
[ 0.370377] Asymmetric key parser 'x509' registered
[ 0.370454] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 0.370470] io scheduler mq-deadline registered
[ 0.370482] io scheduler kyber registered
[ 0.380215] STM32 USART driver initialized
[ 0.400700] brd: module loaded
[ 0.415645] loop: module loaded
[ 0.420611] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.420669] ehci-platform: EHCI generic platform driver
[ 0.420881] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.420915] ohci-platform: OHCI generic platform driver
[ 0.421539] usbcore: registered new interface driver cdc_acm
[ 0.421553] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 0.421640] usbcore: registered new interface driver usb-storage
[ 0.425729] i2c /dev entries driver
[ 0.429665] stm32-cpufreq stm32-cpufreq: Failed to get chip info: -517
[ 0.433603] sdhci: Secure Digital Host Controller Interface driver
[ 0.433622] sdhci: Copyright(c) Pierre Ossman
[ 0.433633] Synopsys Designware Multimedia Card Interface Driver
[ 0.434077] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.435125] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.437134] usbcore: registered new interface driver usbhid
[ 0.437153] usbhid: USB HID core driver
[ 0.437450] arm-smc-mbox mailbox-0: ARM SMC mailbox enabled.
[ 0.437585] arm-smc-mbox mailbox-1: ARM SMC mailbox enabled.
[ 0.439045] remoteproc remoteproc0: releasing m4
[ 0.441640] Unable to get STM32 DDR PMU clock
[ 0.445112] ThumbEE CPU extension supported.
[ 0.445149] Registering SWP/SWPB emulation handler
[ 0.445528] Loading compiled-in X.509 certificates
[ 0.456878] Loaded X.509 cert 'Build time autogenerated kernel key: 24a70d4e2000c0f9fe99f89f3a1ac8e1ee046771'
[ 0.474294] arm-scmi firmware:scmi-0: SCMI Protocol v2.0 'ST:' Firmware version 0x0
[ 0.478649] remoteproc remoteproc0: releasing m4
[ 0.479525] Unable to get STM32 DDR PMU clock
[ 0.492854] debugfs: Directory 'cpu0' with parent 'opp' already present!
[ 0.501909] remoteproc remoteproc0: releasing m4
[ 0.502804] Unable to get STM32 DDR PMU clock
[ 0.541102] stm32-mdma 58000000.dma: STM32 MDMA driver registered
[ 0.543326] stm32-dma 48000000.dma: STM32 DMA driver registered
[ 0.545475] stm32-dma 48001000.dma: STM32 DMA driver registered
[ 0.559403] stm_thermal 50028000.thermal: stm_thermal_probe: Driver initialized successfully
[ 0.562353] debugfs: Directory 'cpu0' with parent 'opp' already present!
[ 0.565692] stm32-crc32 58009000.crc: Initialized
[ 0.567341] stm32-hash 54002000.hash: will run requests pump with realtime priority
[ 0.571190] random: fast init done
[ 0.571966] stm32-hash 54002000.hash: Init HASH done HW ver 23 DMA mode 1
[ 0.575601] random: crng init done
[ 0.584401] remoteproc remoteproc0: releasing m4
[ 0.585609] stm32-ddr-pmu: probed (ID=0x00140061 VER=0x00000010), DDR@533MHz
[ 0.586258] /soc/interrupt-controller@5000d000: bank0
[ 0.586278] /soc/interrupt-controller@5000d000: bank1
[ 0.586291] /soc/interrupt-controller@5000d000: bank2
[ 0.588355] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOA bank added
[ 0.588774] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOB bank added
[ 0.589171] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOC bank added
[ 0.589550] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOD bank added
[ 0.589904] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOE bank added
[ 0.590353] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOF bank added
[ 0.590763] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOG bank added
[ 0.591210] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOH bank added
[ 0.591624] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOI bank added
[ 0.592008] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOJ bank added
[ 0.592361] stm32mp157-pinctrl soc:pin-controller@50002000: GPIOK bank added
[ 0.592633] stm32mp157-pinctrl soc:pin-controller@50002000: Pinctrl STM32 initialized
[ 0.593541] stm32mp157-pinctrl soc:pin-controller-z@54004000: GPIOZ bank added
[ 0.593577] stm32mp157-pinctrl soc:pin-controller-z@54004000: Pinctrl STM32 initialized
[ 0.594714] stm32-usart 40011000.serial: interrupt mode for rx (no dma)
[ 0.594736] stm32-usart 40011000.serial: interrupt mode for tx (no dma)
[ 0.594775] 40011000.serial: ttySTM0 at MMIO 0x40011000 (irq = 46, base_baud = 4000000) is a stm32-usart
[ 1.577011] printk: console [ttySTM0] enabled
[ 1.584029] stm32_rtc 5c004000.rtc: registered as rtc0
[ 1.588070] stm32_rtc 5c004000.rtc: Date/Time must be initialized
[ 1.593911] stm32_rtc 5c004000.rtc: registered rev:1.2
[ 1.621201] stm32f7-i2c 5c002000.i2c: doesn't use DMA
[ 1.626333] stpmic1 0-0033: PMIC Chip Version: 0x21
[ 1.631022] genirq: irq_chip stm32-exti-h did not update eff. affinity mask of irq 50
[ 1.638813] BUCK1: supplied by vin
[ 1.644327] BUCK2: supplied by vin
[ 1.649317] BUCK3: supplied by vin
[ 1.654488] BUCK4: supplied by vin
[ 1.659417] LDO1: supplied by v3v3
[ 1.665243] LDO2: supplied by vin
[ 1.670393] LDO3: supplied by vdd_ddr
[ 1.675744] LDO4: supplied by vin
[ 1.680898] LDO5: supplied by vin
[ 1.686084] LDO6: supplied by v3v3
[ 1.691321] VREF_DDR: supplied by vin
[ 1.696448] BOOST: supplied by vin
[ 1.699175] VBUS_OTG: supplied by bst_out
[ 1.703286] SW_OUT: supplied by bst_out
[ 1.709507] input: pmic_onkey as /devices/platform/soc/5c002000.i2c/i2c-0/0-0033/5c002000.i2c:stpmic@33{:6:}nkey/input/input0
[ 1.719981] stm32f7-i2c 5c002000.i2c: STM32F7 I2C-0 bus adapter
[ 1.728230] mmci-pl18x 58007000.sdmmc: mmc0: PL180 manf 53 rev2 at 0x58007000 irq 44,0 (pio)
[ 1.764497] stm32-ipcc 4c001000.mailbox: ipcc rev:1.0 enabled, 6 chans, proc 0
[ 1.773241] stm32-rproc mlahb:m4@10000000: wdg irq registered
[ 1.778280] remoteproc remoteproc0: m4 is available
[ 1.783748] stm32_rtc 5c004000.rtc: setting system clock to 2000-01-01T00:02:39 UTC (946684959)
[ 1.791828] 8<--- cut here ---
[ 1.794172] Unable to handle kernel NULL pointer dereference at virtual address 00000020
[ 1.802274] pgd = 64175e13
[ 1.804970] [00000020] *pgd=00000000
[ 1.808549] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 1.813857] Modules linked in:
[ 1.816912] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.4.31 #1
[ 1.822828] Hardware name: STM32 (Device Tree Support)
[ 1.827983] PC is at mp1_mgate_clk_disable_safe+0x38/0x8c
[ 1.833373] LR is at mp1_mgate_clk_disable_safe+0x10/0x8c
[ 1.838772] pc : [] lr : [] psr: 60000093
[ 1.845044] sp : df091eb0 ip : 00000000 fp : 00000008
[ 1.850271] r10: 000000e9 r9 : c0d004a4 r8 : c0d4b858
[ 1.855500] r7 : 00000000 r6 : 00000000 r5 : df59f180 r4 : df59e540
[ 1.862034] r3 : 00000000 r2 : c0ec2a00 r1 : 00000001 r0 : df59e540
[ 1.868571] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
[ 1.875800] Control: 10c5387d Table: c000406a DAC: 00000051
[ 1.881550] Process swapper/0 (pid: 1, stack limit = 0x21c08e95)
[ 1.887561] Stack: (0xdf091eb0 to 0xdf092000)
[ 1.891921] 1ea0: 60000013 df59f180 c0e7c1c8 00000000
[ 1.900113] 1ec0: c0d4b858 c0546050 df59f180 df750a80 ffffe000 00000000 c0d4b858 c0545f98
[ 1.908302] 1ee0: df750a80 c0ec184c ffffe000 00000000 c0d4b858 c05480cc c0e7a260 c0548094
[ 1.916491] 1f00: ffffe000 c0102fa8 00000001 c01643e8 c0bcdee4 c0d00400 c0aff894 00000000
[ 1.924680] 1f20: 00000007 00000007 00000000 c0aa4540 c0a958a0 c0a95854 c0d5c620 dffffe74
[ 1.932869] 1f40: 00000000 c0e04c48 cccccccd 00000007 c0e9b800 c0e04c48 c0d4b834 c0d5d010
[ 1.941058] 1f60: c0e9b800 c0e9b800 c0d4b838 c0d01108 00000007 00000007 00000000 c0d004a4
[ 1.949247] 1f80: c08e97f8 00000000 c08e97f8 00000000 00000000 00000000 00000000 00000000
[ 1.957435] 1fa0: 00000000 c08e9800 00000000 c01010e8 00000000 00000000 00000000 00000000
[ 1.965623] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.973811] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 1.982021] [] (mp1_mgate_clk_disable_safe) from [] (clk_disable_unused_subtree+0xdc/0x260)
[ 1.992110] [] (clk_disable_unused_subtree) from [] (clk_disable_unused_subtree+0x24/0x260)
[ 2.002214] [] (clk_disable_unused_subtree) from [] (clk_disable_unused+0x38/0x128)
[ 2.011622] [] (clk_disable_unused) from [] (do_one_initcall+0x58/0x2b4)
[ 2.020075] [] (do_one_initcall) from [] (kernel_init_freeable+0x1c8/0x264)
[ 2.028782] [] (kernel_init_freeable) from [] (kernel_init+0x8/0x110)
[ 2.036969] [] (kernel_init) from [] (ret_from_fork+0x14/0x2c)
[ 2.044540] Exception stack(0xdf091fb0 to 0xdf091ff8)
[ 2.049596] 1fa0: 00000000 00000000 00000000 00000000
[ 2.057788] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 2.065975] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 2.072600] Code: e5933004 e3530000 18bd81f0 e590606c (e5963020)
[ 2.078694] ---[ end trace ae8bc017685b2c67 ]---
[ 2.083316] note: swapper/0[1] exited with preempt_count 1
[ 2.088797] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 2.096485] CPU0: stopping
[ 2.099169] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 5.4.31 #1
[ 2.106479] Hardware name: STM32 (Device Tree Support)
[ 2.111639] [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[ 2.119386] [] (show_stack) from [] (dump_stack+0xb0/0xc4)
[ 2.126616] [] (dump_stack) from [] (handle_IPI+0x41c/0x448)
[ 2.134024] [] (handle_IPI) from [] (gic_handle_irq+0x8c/0x90)
[ 2.141601] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0xa8)
[ 2.149082] Exception stack(0xc0e01f40 to 0xc0e01f88)
[ 2.154143] 1f40: 00000000 00000c98 dfae2bf4 c011b7c0 00000000 c0e00000 c0e04c68 c0e04ca8
[ 2.162331] 1f60: 00000001 c0d4ba40 dffffe00 00000000 00000001 c0e01f90 c010a1c8 c010a1cc
[ 2.170514] 1f80: 60000013 ffffffff
[ 2.174011] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c)
[ 2.181417] [] (arch_cpu_idle) from [] (do_idle+0xc4/0x14c)
[ 2.188734] [] (do_idle) from [] (cpu_startup_entry+0x18/0x1c)
[ 2.196313] [] (cpu_startup_entry) from [] (start_kernel+0x4b4/0x4ec)
[ 2.204500] [] (start_kernel) from [<00000000>] (0x0)
[ 2.210427] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---