Unhandled fault: imprecise external abort (0x1406) at 0x00000000

Hi,大家好!

我的板子是根据GP——evm来修改的,没有EEPROM nand flash  mmc挂emmc,从qspiflash启动,使用am437x-evm-linux-sdk-src-05.00.00.15.tar代码包

,修改一些代码uboot启动ok,现在遇到一个奇怪的问题内核启动奔溃,在omap_hwmod设置阶段出错,这个应该和我修改的设备树没关系因为把am4378x-gp-evm.dts改到很小还是一样的效果,内核代码哪里需要修改吗?

U-Boot 2018.01-00228-g555fffa9f6-dirty (Dec 20 2018 - 08:55:54 +0800)

CPU : AM437X-GP rev 1.2
I2C: ready
DRAM: 2 GiB
PMIC: TPS65218
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
SF: Detected s25fl512s_256k with page size 512 Bytes, erase size 256 KiB, total 64 MiB, mapped at 30000000
Net: cpsw
Hit any key to stop autoboot: 0
SF: Detected s25fl512s_256k with page size 512 Bytes, erase size 256 KiB, total 64 MiB, mapped at 30000000
qspi-kernel is loading ... ...
device 0 offset 0x180000, size 0x400000
SF: 4194304 bytes @ 0x180000 Read: OK
qspi_devicetree is loading ... ...
device 0 offset 0x5c0000, size 0x40000
SF: 262144 bytes @ 0x5c0000 Read: OK
Kernel image @ 0x82000000 [ 0x000000 - 0x3ad200 ]
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8fff3000, end 8ffffb5b ... OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.40-g4796173fc5 (root@Ge-machine) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #1 PREEMPT Sun Dec 23 15:23:11 CST 2018
[ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: TI AM437x GP EVM
[ 0.000000] earlycon: omap8250 at MMIO 0x44e09000 (options '')
[ 0.000000] bootconsole [omap8250] enabled
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 48 MiB at 0xfcc00000
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM437x ES1.2 (sgx neon)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 522559
[ 0.000000] Kernel command line: console=ttyS0,115200n8 root=/dev/mtdblock1 rootfstype=jffs2 earlycon
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 2015636K/2097148K available (8192K kernel code, 328K rwdata, 2444K rodata, 1024K init, 276K bss, 32360K reserved, 49152K cma-reserved, 1261564K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0900000 (9184 kB)
[ 0.000000] .init : 0xc0c00000 - 0xc0d00000 (1024 kB)
[ 0.000000] .data : 0xc0d00000 - 0xc0d52210 ( 329 kB)
[ 0.000000] .bss : 0xc0d52210 - 0xc0d9748c ( 277 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] L2C: platform modifies aux control register: 0x0e030000 -> 0x3e430000
[ 0.000000] L2C: DT/platform modifies aux control register: 0x0e030000 -> 0x3e430000
[ 0.000000] L2C-310 enabling early BRESP for Cortex-A9
[ 0.000000] OMAP L2C310: ROM does not support power control setting
[ 0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
[ 0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
[ 0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x4e430000
[ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[ 0.000010] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.008106] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.017629] OMAP clocksource: timer1 at 24000000 Hz
[ 0.023010] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
[ 0.033252] OMAP clocksource: 32k_counter at 32768 Hz
[ 0.038825] Console: colour dummy device 80x30
[ 0.043463] Calibrating delay loop... 1993.93 BogoMIPS (lpj=9969664)
[ 0.109390] pid_max: default: 32768 minimum: 301
[ 0.114308] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.121154] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.129120] CPU: Testing write buffer coherency: ok
[ 0.134842] Setting up static identity map for 0x80100000 - 0x80100060
[ 0.141707] Hierarchical SRCU implementation.
[ 0.146522] EFI services will not be available.
[ 0.152171] devtmpfs: initialized
[ 0.162239] random: get_random_u32 called from bucket_table_alloc+0x8c/0x1ac with crng_init=0
[ 0.171475] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 0.179729] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.189919] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.199492] pinctrl core: initialized pinctrl subsystem
[ 0.205593] DMI not present or invalid.
[ 0.209920] NET: Registered protocol family 16
[ 0.216071] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.290713] Unhandled fault: imprecise external abort (0x1406) at 0x00000000
[ 0.298003] pgd = c0004000
[ 0.300793] [00000000] *pgd=00000000
[ 0.304489] Internal error: : 1406 [#1] PREEMPT ARM
[ 0.309523] Modules linked in:
[ 0.312678] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.40-g4796173fc5 #1
[ 0.319775] Hardware name: Generic AM43 (Flattened Device Tree)
[ 0.325886] task: ee858000 task.stack: ee856000
[ 0.330570] PC is at _get_clkdm+0x4/0x50
[ 0.334618] LR is at _enable_sysc+0x60/0x248
[ 0.339023] pc : [<c011af00>] lr : [<c011b594>] psr: 40000053
[ 0.345492] sp : ee857e40 ip : ee857e40 fp : ee857e6c
[ 0.350883] r10: c0d52240 r9 : 000000d3 r8 : c0c3c820
[ 0.356274] r7 : c0d0cd7c r6 : c0d5278c r5 : 00000020 r4 : c0d0c828
[ 0.363012] r3 : c0d0d324 r2 : 00000000 r1 : c0d0d304 r0 : c0d0c828
[ 0.369753] Flags: nZcv IRQs on FIQs off Mode SVC_32 ISA ARM Segment none
[ 0.377209] Control: 10c53c7d Table: 80004059 DAC: 00000051
[ 0.383139] Process swapper (pid: 1, stack limit = 0xee856208)
[ 0.389160] Stack: (0xee857e40 to 0xee858000)
[ 0.393659] 7e40: c0d09528 00000000 ee857e6c 00000000 c0124dc8 c0d0c828 00000000 c0d5278c
[ 0.402106] 7e60: ee857e94 ee857e70 c011b8c4 c011b540 c0d0c828 c0d0b52c c0d0c828 c0d0c858
[ 0.410552] 7e80: c0d0c86c c0d52240 ee857ec4 ee857e98 c0c0b230 c011b788 ee857ec4 ee857ea8
[ 0.418998] 7ea0: c011a45c 00000011 c0d085b8 c0d0c828 c0d08610 c0c0b64c ee857edc ee857ec8
[ 0.427444] 7ec0: c0c0b740 c0c0b16c ffffe000 00000000 ee857f4c ee857ee0 c01019e4 c0c0b658
[ 0.435890] 7ee0: ee857f4c ee857ef0 c0147800 c0c00624 c0a970a8 c0a97088 c0a970d4 c0aa1284
[ 0.444335] 7f00: 00000000 c0a97060 00000002 00000002 c0a8e10c c0b61a44 efffec3c 00000000
[ 0.452781] 7f20: 00000000 c0b61a44 00000003 c0b61a44 c0c4ddac 00000003 c0d52240 c0c3c820
[ 0.461227] 7f40: ee857f94 ee857f50 c0c00eb4 c01019a4 00000002 00000002 00000000 c0c00618
[ 0.469673] 7f60: 15555555 c0c00618 55145555 00000000 c0841c78 00000000 00000000 00000000
[ 0.478118] 7f80: 00000000 00000000 ee857fac ee857f98 c0841c88 c0c00d78 00000000 c0841c78
[ 0.486564] 7fa0: 00000000 ee857fb0 c0107e68 c0841c84 00000000 00000000 00000000 00000000
[ 0.495009] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 0.503455] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 55555555 5d5555d5
[ 0.511895] Backtrace:
[ 0.514423] [<c011b534>] (_enable_sysc) from [<c011b8c4>] (_enable+0x148/0x284)
[ 0.521970] r6:c0d5278c r5:00000000 r4:c0d0c828
[ 0.526744] [<c011b77c>] (_enable) from [<c0c0b230>] (_setup.part.12+0xd0/0x404)
[ 0.534382] r7:c0d52240 r6:c0d0c86c r5:c0d0c858 r4:c0d0c828
[ 0.540227] [<c0c0b160>] (_setup.part.12) from [<c0c0b740>] (__omap_hwmod_setup_all+0xf4/0x108)
[ 0.549209] r6:c0c0b64c r5:c0d08610 r4:c0d0c828
[ 0.553980] [<c0c0b64c>] (__omap_hwmod_setup_all) from [<c01019e4>] (do_one_initcall+0x4c/0x170)
[ 0.563051] r5:00000000 r4:ffffe000
[ 0.566748] [<c0101998>] (do_one_initcall) from [<c0c00eb4>] (kernel_init_freeable+0x148/0x1e4)
[ 0.575731] r8:c0c3c820 r7:c0d52240 r6:00000003 r5:c0c4ddac r4:c0b61a44
[ 0.582660] [<c0c00d6c>] (kernel_init_freeable) from [<c0841c88>] (kernel_init+0x10/0x110)
[ 0.591196] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0841c78
[ 0.599279] r4:00000000
[ 0.601898] [<c0841c78>] (kernel_init) from [<c0107e68>] (ret_from_fork+0x14/0x2c)
[ 0.609712] r5:c0841c78 r4:00000000
[ 0.613402] Code: e16f0f10 e1a002a0 e89da8f0 e1a0c00d (e92dd830)
[ 0.619705] ---[ end trace 1eeb79dd9f92aabb ]---
[ 0.624527] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 0.624527]
[ 0.633966] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 0.633966]

  • 建议在__omap_hwmod_setup_all()这个函数里加打印
    定位一下那条代码导致的crash
  • 回复 Denny Yang:

    omap_hwmod_for_each(_setup, NULL);
    遍历omap_hwmod_list调用_setup

    打印到 oh->name=vpfe1
    clkdm = _get_clkdm(oh);
    _get_clkdm函数奔溃了
    这些都是很base的代码啊
  • 回复 Denny Yang:

    am4372.dtsi中屏蔽
    rtc: rtc@44e3e000 {
    compatible = "ti,am4372-rtc", "ti,am3352-rtc",
    "ti,da830-rtc";
    reg = <0x44e3e000 0x1000>;
    interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH
    GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
    ti,hwmods = "rtc";
    clocks = <&clk_32768_ck>;
    clock-names = "int-clk";
    system-power-controller;
    status = "disabled";
    };
    能正常启动
    [ 0.216015] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.237338] omap_hwmod: rtc: no dt node
    [ 0.241311] ------------[ cut here ]------------
    [ 0.246127] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2494 _init.constprop.20+0x1e0/0x4a4
    [ 0.256109] omap_hwmod: rtc: doesn't have mpu register target base
    [ 0.262488] Modules linked in:
    [ 0.265652] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.40-g4796173fc5 #1
    [ 0.272751] Hardware name: Generic AM43 (Flattened Device Tree)
    [ 0.278868] Backtrace:
    [ 0.281415] [<c010baa8>] (dump_backtrace) from [<c010bd8c>] (show_stack+0x18/0x1c)
    [ 0.289244] r7:00000009 r6:00000000 r5:c0a932c0 r4:ee857e20
    [ 0.295101] [<c010bd74>] (show_stack) from [<c082ec48>] (dump_stack+0x24/0x28)
    [ 0.302565] [<c082ec24>] (dump_stack) from [<c012b0bc>] (__warn+0xe8/0x100)
    [ 0.309762] [<c012afd4>] (__warn) from [<c012b114>] (warn_slowpath_fmt+0x40/0x48)
    [ 0.317497] r9:000000d3 r8:c0c3c820 r7:00000000 r6:c0d0c86c r5:00000000 r4:c0a93574
    [ 0.325501] [<c012b0d8>] (warn_slowpath_fmt) from [<c0c0ae9c>] (_init.constprop.20+0x1e0/0x4a4)
    [ 0.334490] r3:c0acb5b4 r2:c0a93574
    [ 0.338175] r4:c0d0c828
    [ 0.340789] [<c0c0acbc>] (_init.constprop.20) from [<c0c0b694>] (__omap_hwmod_setup_all+0x48/0x108)
    [ 0.350139] r10:c0d52240 r9:000000d3 r8:c0c3c820 r7:c0d52240 r6:c0c0b64c r5:c0d08610
    [ 0.358228] r4:c0d0c828
    [ 0.360842] [<c0c0b64c>] (__omap_hwmod_setup_all) from [<c01019e4>] (do_one_initcall+0x4c/0x170)
    [ 0.369921] r5:00000000 r4:ffffe000
    [ 0.373624] [<c0101998>] (do_one_initcall) from [<c0c00eb4>] (kernel_init_freeable+0x148/0x1e4)
    [ 0.382609] r8:c0c3c820 r7:c0d52240 r6:00000003 r5:c0c4ddac r4:c0b61a44
    [ 0.389542] [<c0c00d6c>] (kernel_init_freeable) from [<c0841c88>] (kernel_init+0x10/0x110)
    [ 0.398086] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0841c78
    [ 0.406174] r4:00000000
    [ 0.408789] [<c0841c78>] (kernel_init) from [<c0107e68>] (ret_from_fork+0x14/0x2c)
    [ 0.416610] r5:c0841c78 r4:00000000
    [ 0.420303] ---[ end trace 1eeb79dd9f92aabb ]---
    [ 0.478226] cpuidle: using governor ladder
    [ 0.482483] cpuidle: using governor menu
    [ 0.488182] omap_l3_noc 44000000.ocp: L3 debug error: target 8 mod:0 (unclearable)

    没接32k的oscillator ,硬件设计师没告诉我。。。