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.

Linux/AM3358: Kernel boot error

Part Number: AM3358


Tool/software: Linux

Hi,

We are currently attempting to boot minimal Linux system on newly developed AM3358 based platform. We are using ti-processor-sdk-linux-am335x-evm-04.03.00.09 with Linaro 5.4 compiler and CCS7 for debugging. while first stage bootloader from IRAM and U-Boot in DDR3 RAM run just fine, Linux is failing during init phase with data abort exception on some odd address. Please see the log below at the [0.185312] timestamp. The offending address seems to fall into the vmalloc range (0xf0800000 < 0xf9e3e078 < 0xff800000) and is read from register 0x44e11452 that does fall outside of the CM DDR configuration/control registers. Se we are not sure what the issue may be here as we have not been able to 'break' in  with hw breakpoint using CCS7 and XDS100v2 in the omap_hwmod_setup_all function. We can break in the DataAbort exception handler in arch/arm/mm/fault.c with not enough information on what caused the exception.

The device tree we use for booting the linux is minimal and including only the basic am335x.dtsi as can be seen below as well. 

Any help would be appreciated. Please let me know if you have any questions or need more data.

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.59-ga75d8e9305 (rronge@horus) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #4 PREEMPT Thu Feb 8 21:36:40 EST 2018
[ 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 CSYSOBC
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 48 MiB at 0xbd000000
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (sgx neon)
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260416
[ 0.000000] Kernel command line: earlyprintk console=ttyS0,115200n8;
[ 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: 979496K/1048576K available (6144K kernel code, 233K rwdata, 1856K rodata, 1024K init, 265K bss, 19928K reserved, 49152K cma-reserved, 212992K 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 - 0xc0700000 (7136 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a3a460 ( 234 kB)
[ 0.000000] .bss : 0xc0a3a460 - 0xc0a7cb74 ( 266 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] NR_IRQS:16 nr_irqs:16 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.000013] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.008162] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.017730] OMAP clocksource: timer1 at 24000000 Hz
[ 0.022946] clocksource_probe: no matching clocksources found
[ 0.029180] Console: colour dummy device 80x30
[ 0.033878] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[ 0.076484] pid_max: default: 32768 minimum: 301
[ 0.081424] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.088331] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.096470] CPU: Testing write buffer coherency: ok
[ 0.101915] Setting up static identity map for 0x80100000 - 0x80100060
[ 0.109509] EFI services will not be available.
[ 0.115550] devtmpfs: initialized
[ 0.127549] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.135931] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.146165] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.155894] pinctrl core: initialized pinctrl subsystem
[ 0.162535] NET: Registered protocol family 16
[ 0.168780] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.185312] Unhandled fault: external abort on non-linefetch (0x1028) at 0xf9e3e078
[ 0.193288] pgd = c0004000
[ 0.196154] [f9e3e078] *pgd=44e11452(bad)
[ 0.200371] Internal error: : 1028 [#1] PREEMPT ARM
[ 0.205471] Modules linked in:
[ 0.208703] CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.59-ga75d8e9305 #4
[ 0.215767] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 0.222118] task: ee860000 task.stack: ee864000
[ 0.226881] PC is at _update_sysc_cache+0x64/0x90
[ 0.231805] LR is at _enable+0x208/0x2d8
[ 0.235924] pc : [<c011a58c>] lr : [<c011b3d8>] psr: 40000013
[ 0.235924] sp : ee865e58 ip : ee865e68 fp : ee865e64
[ 0.247904] r10: c0938838 r9 : 00000003 r8 : 00000000
[ 0.253358] r7 : c0a0af84 r6 : c0a3aa18 r5 : 00000000 r4 : c0a0a8d0
[ 0.260157] r3 : f9e3e078 r2 : c0a0b448 r1 : f9e3e000 r0 : c0a0a8d0
[ 0.266959] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 0.274379] Control: 10c5387d Table: 80004019 DAC: 00000051
[ 0.280371] Process swapper (pid: 1, stack limit = 0xee864208)
[ 0.286453] Stack: (0xee865e58 to 0xee866000)
[ 0.291020] 5e40: ee865e8c ee865e68
[ 0.299519] 5e60: c011b3d8 c011a534 c0a0a8d0 00000001 c0a0a8d0 00000002 c0a0a91c c0938820
[ 0.308017] 5e80: ee865ebc ee865e90 c090d1e4 c011b1dc c083c7a0 c0a07808 c0a07808 c0a07868
[ 0.316518] 5ea0: ee865ebc c0a0a8d0 c0a07868 c0a3a480 ee865ed4 ee865ec0 c090d6e8 c090d114
[ 0.325017] 5ec0: ffffe000 c090d5ec ee865f4c ee865ed8 c0101804 c090d5f8 c0900534 c03b04d0
[ 0.333519] 5ee0: efffc64c c071f1b8 ee865f00 ee865ef8 c0147394 c0900524 00000000 c08438bc
[ 0.342020] 5f00: c0843908 c084318c 00000002 00000002 00000000 c08cebcc c0839b18 00000000
[ 0.350521] 5f20: 00000000 c08cebcc c0a3a480 c08cebcc c09462a8 c0a3a480 c0938820 c0a3a480
[ 0.359019] 5f40: ee865f94 ee865f50 c0900e94 c0101754 00000002 00000002 00000000 c0900518
[ 0.367520] 5f60: c0900518 00000087 5ffdfff5 00000000 c06b4dc8 00000000 00000000 00000000
[ 0.376021] 5f80: 00000000 00000000 ee865fac ee865f98 c06b4dd8 c0900d5c 00000000 c06b4dc8
[ 0.384519] 5fa0: 00000000 ee865fb0 c0107d38 c06b4dd4 00000000 00000000 00000000 00000000
[ 0.393016] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 0.401512] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ff7fb79f fbfef6eb
[ 0.410006] Backtrace:
[ 0.412614] [<c011a528>] (_update_sysc_cache) from [<c011b3d8>] (_enable+0x208/0x2d8)
[ 0.420767] [<c011b1d0>] (_enable) from [<c090d1e4>] (_setup.constprop.6+0xdc/0x410)
[ 0.428818] r7:c0938820 r6:c0a0a91c r5:00000002 r4:c0a0a8d0
[ 0.434726] [<c090d108>] (_setup.constprop.6) from [<c090d6e8>] (__omap_hwmod_setup_all+0xfc/0x120)
[ 0.444115] r6:c0a3a480 r5:c0a07868 r4:c0a0a8d0
[ 0.448952] [<c090d5ec>] (__omap_hwmod_setup_all) from [<c0101804>] (do_one_initcall+0xbc/0x174)
[ 0.458074] r5:c090d5ec r4:ffffe000
[ 0.461847] [<c0101748>] (do_one_initcall) from [<c0900e94>] (kernel_init_freeable+0x144/0x1e0)
[ 0.470881] r8:c0a3a480 r7:c0938820 r6:c0a3a480 r5:c09462a8 r4:c08cebcc
[ 0.477875] [<c0900d50>] (kernel_init_freeable) from [<c06b4dd8>] (kernel_init+0x10/0x118)
[ 0.486465] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c06b4dc8
[ 0.494600] r4:00000000
[ 0.497296] [<c06b4dc8>] (kernel_init) from [<c0107d38>] (ret_from_fork+0x14/0x3c)
[ 0.505166] r5:c06b4dc8 r4:00000000
[ 0.508928] Code: 0a000002 e1d330b0 e6ff3073 ea000000 (e5933000)
[ 0.515296] ---[ end trace a9ab14e0c1b108c7 ]---
[ 0.520211] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 0.520211]
[ 0.529783] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 0.529783]
[ 2.903593] random: fast init done

.....

am335x-obc.dts:


/*
* basic OBC DTS
*/

/dts-v1/;

#include "am33xx.dtsi"
/* #include "am335x-bone-common.dtsi" */

/ {
model = "TI AM335x CSYSOBC";
compatible = "ti,am335x-obc", "ti,am33xx";

memory@80000000 {
device_type = "memory";
reg = <0x80000000 0x40000000>; /* 256 MB */
};
};

&wdt2 {
status = "disabled";
};
&timer3 {

status = "disabled";
};

&timer4 {
status = "disabled";
};

&timer5 {
status = "disabled";
};

&timer6 {
status = "disabled";
};

&timer7 {
status = "disabled";
};


&rtc {
clocks = <&clk_32768_ck>, <&clkdiv32k_ick>;
clock-names = "ext-clk", "int-clk";
system-power-controller;
};

&cpu0_opp_table {
oppnitro-1000000000 {
opp-supported-hw = <0x06 0x0100>;
};
};