This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM335X: Kernel panic

Part Number: PROCESSOR-SDK-AM335X

I enabled CONFIG_EARLY_PRINTK kernel configuration.  with this i am getting some logs and there was a kernel panic during boot up.

After googling i came to know that  i need to disable omap rtc. Still i am getting the same issue. Any inputs on this is very helpful?

bootz 0x80200000 - 0x80f80000
Kernel image @ 0x80200000 [ 0x000000 - 0x3d0200 ]
## Flattened Device Tree blob at 80f80000
   Booting using the fdt blob at 0x80f80000
   Loading Device Tree to 87330000, end 8733d030 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.54-g0b59bc3be7 (oe-user@oe-host) (gcc version 7.3.0 (GCC)) #1 PREEMPT Fri Jan 3 08:35:37 UTC 2020
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: TI AM335x ALC
[    0.000000] bootconsole [earlycon0] 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 0x84000000
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (neon)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyO0,115200n8 loginShell=allow earlyprintk user_debug=0 loginShell=allow rootflags=dataB
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 67420K/131072K available (8192K kernel code, 333K rwdata, 2580K rodata, 1024K init, 278K bss, 14500K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 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 - 0xc0d53408   ( 334 kB)
[    0.000000]        .bss : 0xc0d53408 - 0xc0d98ea4   ( 279 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] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000019] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.008177] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.017752] OMAP clocksource: timer1 at 24000000 Hz
[    0.023105] timer_probe: no matching timers found
[    0.028361] Console: colour dummy device 80x30
[    0.033066] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    0.039866] This ensures that you still see kernel messages. Please
[    0.046411] update your kernel commandline.
[    0.050827] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
[    0.109152] pid_max: default: 32768 minimum: 301
[    0.114218] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.121116] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.129415] CPU: Testing write buffer coherency: ok
[    0.135389] Setting up static identity map for 0x80100000 - 0x80100060
[    0.142366] Hierarchical SRCU implementation.
[    0.147376] EFI services will not be available.
[    0.153925] devtmpfs: initialized
[    0.170087] random: get_random_u32 called from bucket_table_alloc+0x8c/0x1ac with crng_init=0
[    0.179721] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.188127] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.198378] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.209069] pinctrl core: initialized pinctrl subsystem
[    0.215478] DMI not present or invalid.
[    0.219991] NET: Registered protocol family 16
[    0.227671] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.253373] omap_hwmod: debugss: _wait_target_disable failed
[    0.259571] Unhandled fault: external abort on non-linefetch (0x1028) at 0xf9e3e078
[    0.267533] pgd = c0004000
[    0.270403] [f9e3e078] *pgd=44e11452(bad)
[    0.274631] Internal error: : 1028 [#1] PREEMPT ARM
[    0.279734] Modules linked in:
[    0.282971] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.54-g0b59bc3be7 #1
[    0.290127] Hardware name: Generic AM33XX (Flattened Device Tree)
[    0.296478] task: c3838000 task.stack: c383c000
[    0.301238] PC is at _update_sysc_cache+0x34/0x90
[    0.306164] LR is at _enable+0x1ac/0x284
[    0.310285] pc : [<c011b010>]    lr : [<c011b77c>]    psr: 40000013
[    0.316815] sp : c383de60  ip : 00000000  fp : c383de6c
[    0.322271] r10: c0c3b838  r9 : c0d53440  r8 : c0c3b820
[    0.327731] r7 : c0d0b314  r6 : c0d53974  r5 : 00000000  r4 : c0d0adc0
[    0.334533] r3 : f9e3e078  r2 : c0d0b89c  r1 : 00000078  r0 : c0d0adc0
[    0.341333] Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    0.348758] Control: 10c5387d  Table: 80004019  DAC: 00000051
[    0.354755] Process swapper (pid: 1, stack limit = 0xc383c208)
[    0.360843] Stack: (0xc383de60 to 0xc383e000)
[    0.365416] de60: c383de94 c383de70 c011b77c c011afe8 c0d0adc0 c0d09ac4 c0d0adc0 c0d0adf0
[    0.373920] de80: c0d0ae04 c0d53440 c383dec4 c383de98 c0c0b088 c011b5dc c383dec4 c383dea8
[    0.382421] dea0: c011a2d0 c088a3d0 c0d07e08 c0d0adc0 c0d07e60 ffffe000 c383dedc c383dec8
[    0.390925] dec0: c0c0b590 c0c0afc4 00000000 c0c0b49c c383df4c c383dee0 c0101a10 c0c0b4a8
[    0.399430] dee0: c383df4c c383def0 c0145800 c0c00624 c0aaef98 c0aaef78 c0aaefc4 c0ab96c4
[    0.407930] df00: 00000000 c0aaef50 00000002 00000002 c0aa61bc c0b83d7c c7fffbb9 c7fffbc5
[    0.416430] df20: 00000000 c0b83d7c 00000003 c0b83d7c c0c4c360 00000003 c0d53440 c0c3b820
[    0.424934] df40: c383df94 c383df50 c0c00eac c01019d0 00000002 00000002 00000000 c0c00618
[    0.433439] df60: c0c00618 000000e7 00000000 00000000 c088f780 00000000 00000000 00000000
[    0.441941] df80: 00000000 00000000 c383dfac c383df98 c088f790 c0c00d74 00000000 c088f780
[    0.450441] dfa0: 00000000 c383dfb0 c0108108 c088f78c 00000000 00000000 00000000 00000000
[    0.458944] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.467445] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 0085c082 50000094
[    0.475936] Backtrace:
[    0.478550] [<c011afdc>] (_update_sysc_cache) from [<c011b77c>] (_enable+0x1ac/0x284)
[    0.486710] [<c011b5d0>] (_enable) from [<c0c0b088>] (_setup.part.12+0xd0/0x3fc)
[    0.494404]  r7:c0d53440 r6:c0d0ae04 r5:c0d0adf0 r4:c0d0adc0
[    0.500320] [<c0c0afb8>] (_setup.part.12) from [<c0c0b590>] (__omap_hwmod_setup_all+0xf4/0x108)
[    0.509355]  r6:ffffe000 r5:c0d07e60 r4:c0d0adc0
[    0.514199] [<c0c0b49c>] (__omap_hwmod_setup_all) from [<c0101a10>] (do_one_initcall+0x4c/0x170)
[    0.523321]  r5:c0c0b49c r4:00000000
[    0.527091] [<c01019c4>] (do_one_initcall) from [<c0c00eac>] (kernel_init_freeable+0x144/0x1dc)
[    0.536127]  r8:c0c3b820 r7:c0d53440 r6:00000003 r5:c0c4c360 r4:c0b83d7c
[    0.543115] [<c0c00d68>] (kernel_init_freeable) from [<c088f790>] (kernel_init+0x10/0x11c)
[    0.551707]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c088f780
[    0.559844]  r4:00000000
[    0.562547] [<c088f780>] (kernel_init) from [<c0108108>] (ret_from_fork+0x14/0x2c)
[    0.570421]  r5:c088f780 r4:00000000
[    0.574190] Code: e31c0c01 e5903054 e0833001 1a00000a (e5933000)
[    0.580564] ---[ end trace 3e66a8fe4b34ad18 ]---
[    0.585479] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    0.585479]
[    0.595056] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    0.595056]
[    2.902648] random: fast init done

Regards,

Siva.

  • I tried  disabled RTC related kernel config flags. I made sure that RTC was disabled in generated dtb files. Still facing same kernel panic.

  • Hi,

    Please see this post:

    https://e2e.ti.com/support/processors/f/791/t/692004

    I hope this helps you.

  • I recommend creating a stripped down dtb that includes the bare minimum (e.g. support for the MMC ports, PMIC, and UART).  Please make sure you're building the dtb against the same kernel, i.e. don't reuse your old one.  Please share your minimal-dtb for review.

  •  I also tried with building dtb with latest kernel. I will share the minimalistic dtb for review.

  • I recommend creating a stripped down dtb that includes the bare minimum (e.g. support for the MMC ports, PMIC, and UART).  Please make sure you're building the dtb against the same kernel, i.e. don't reuse your old one.  Please share your minimal-dtb for review.

    I can not share the dtb as per company policies.

    based on thread  

    I removed  ti,hwmods = "disabled"  in the rtc device tree from my dts file. with this changes boot was successful and able to mount rootfs.

     rtc@44e3e000 {
                            clock-names = "int-clk";
                            clocks = <0x17>;
                            compatible = "ti,am3352-rtc", "ti,da830-rtc";
                            interrupts = <0x4b 0x4c>;
                            reg = <0x44e3e000 0x1000>;
                            status = "disabled";
                    };


    I am seeing some error messages during boot up.  

    omap_hwmod: rtc: no dt node
    [    0.247258] ------------[ cut here ]------------
    [    0.252127] WARNING: CPU: 0 PID: 1 at /usr/src/kernel/arch/arm/mach-omap2/omap_hwmod.c:2494 _init.constprop.22+0x23c/0x598
    [    0.263606] omap_hwmod: rtc: doesn't have mpu register target base
    [    0.270050] Modules linked in:
    [    0.273309] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.54-g0b59bc3be7 #1
    [    0.280464] Hardware name: Generic AM33XX (Flattened Device Tree)
    [    0.286827] Backtrace:
    [    0.289461] [<c010c7cc>] (dump_backtrace) from [<c010cab0>] (show_stack+0x18/0x1c)
    [    0.297356]  r7:00000009 r6:00000000 r5:c0abf9e0 r4:c383de20
    [    0.303297] [<c010ca98>] (show_stack) from [<c089f624>] (dump_stack+0x24/0x28)
    [    0.310827] [<c089f600>] (dump_stack) from [<c012a6d4>] (__warn+0xe8/0x100)
    [    0.318094] [<c012a5ec>] (__warn) from [<c012a72c>] (warn_slowpath_fmt+0x40/0x48)
    [    0.325899]  r9:c0d701c0 r8:c0c3c820 r7:00000000 r6:c0d0ae04 r5:00000000 r4:c0abfde0
    [    0.333974] [<c012a6f0>] (warn_slowpath_fmt) from [<c0c0af28>] (_init.constprop.22+0x23c/0x598)
    [    0.343026]  r3:c0b01a70 r2:c0abfde0
    [    0.346789]  r4:c0d0adc0
    [    0.349490] [<c0c0acec>] (_init.constprop.22) from [<c0c0b870>] (__omap_hwmod_setup_all+0x48/0x108)
    [    0.358900]  r9:c0d701c0 r8:c0c3c820 r7:c0d701c0 r6:ffffe000 r5:c0d07e60 r4:c0d0adc0
    [    0.366973] [<c0c0b828>] (__omap_hwmod_setup_all) from [<c0101a30>] (do_one_initcall+0x4c/0x170)
    [    0.376112]  r5:c0c0b828 r4:00000000
    [    0.379881] [<c01019e4>] (do_one_initcall) from [<c0c00eb8>] (kernel_init_freeable+0x144/0x1dc)
    [    0.388932]  r8:c0c3c820 r7:c0d701c0 r6:00000003 r5:c0c4d770 r4:c0bb4b70
    [    0.395936] [<c0c00d74>] (kernel_init_freeable) from [<c08b4588>] (kernel_init+0x10/0x11c)
    [    0.404543]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c08b4578
    [    0.412699]  r4:00000000
    [    0.415397] [<c08b4578>] (kernel_init) from [<c0108b88>] (ret_from_fork+0x14/0x2c)
    [    0.423284]  r5:c08b4578 r4:00000000
    [    0.427057] ---[ end trace d1f8cc5f69606436 ]---
    [    0.444819] omap_hwmod: debugss: _wait_target_disable failed
    [    0.505097] cpuidle: using governor ladder
    [    0.509430] cpuidle: using governor menu
    [    0.517630] OMAP GPIO hardware version 0.1
    [    0.536879] No ATAGs?
    [    0.536901] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.563955] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.574126] usbcore: registered new interface driver usbfs
    [    0.579923] usbcore: registered new interface driver hub
    [    0.585639] usbcore: registered new device driver usb
    [    0.591396] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, e
    [    0.605067] media: Linux media interface: v0.10
    [    0.609880] Linux video capture interface: v2.00


     

  • siva nallamalli said:
    I removed  ti,hwmods = "disabled"  in the rtc device tree from my dts file. with this changes boot was successful and able to mount rootfs.

    Where/how did you do that?  Was that in am33xx.dtsi or in your own dts file?  I don't think you should have touched this setting at all.  In the thread that Ron referenced, that was part of the problem, i.e. he should have left it alone, but had added a line of code that set it to disabled.  Don't do that.  Leave it alone.

    The one and only thing that should be necessary is to add the following your board.dts file:

    &rtc {
    status = "disabled";
    };

    Can you confirm that your board.dts file has the snippet above, and nothing else related to rtc?

    siva nallamalli said:
    I can not share the dtb as per company policies.

    Is your dts file including am33xx.dtsi?  That's a GPLv2-licensed file.  I think you should consult your legal team.