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.

66AK2H12: Linux Ethernet/NetCP driver gives kernel Oops

Part Number: 66AK2H12
Other Parts Discussed in Thread: DA8XX

Hi,

We are trying to make the Linux kernel boot on the K2HK SoC, but there is a problem that seems to come down to memory management in the QMSS part of the NetCP driver. The kernel we are using is 4.19 because that is an LTS version.

Generically, what we are trying to achieve is to boot Linux over the 1 GB Ethernet interface. We can already have U-Boot load the kernel image using TFTP over the same network interface and therefor, this shouldn't be about a hardware problem. The step we are working on now is to have Linux kernel mount rootfs over NFS. For that, we need the driver for that interface in kernel to work, and that's when the problems start.

It seems that the problem is not in the driver for the interface but in the NetCP driver, or perhaps more specifically in the driver for the QMSS. That driver first allocates memory for a pool of descriptors related to DMA, then maps it to some virtual addresses and finally tries to access those virtual addresses. That last step leads to a failing paging request and a kernel Oops.

There is one interesting detail in this problem that is related to the amount of RAM in the hardware and the address ranges of the allocations/mappings. On the K2HK EVM, which has 2 GB of RAM, the driver works. The problems appear on custom hardware, which has the same SoC but 4 GB of RAM. Our debug prints show that the address ranges used are quite different depending on the amount of RAM.

Right now, our best guess is that something goes wrong with handling of pointers. With 2 GB of RAM, 32-bit pointers are enough, but having anything more requires more bits, and we are suspecting that they are not handled correctly.

One thing we have tried is to limit the amount of RAM seen by the kernel with kernel argument mem=2G. That fixed the issue and made address ranges on the EVM and our custom hardware similar, but it brought other issues. We are still analyzing them, but it looks as if not all parts of the kernel were abiding the limitation of memory.

At least for now, having the amount of RAM artificially limited to 2 GB would be an acceptable work-around, if it didn't bring in this another issue.

This leads to us having two alternative paths to follow: fixing the original problem leading to the kernel Oops or making the limiting of the amount of RAM work completely.

At least the problem leading to the kernel Oops originates from the TI driver code, so we wonder if we could get any help regarding it on this forum. As for the problem that comes with the attempt to limit the amount of RAM, we are not yet sure about the origins of that, but if it rings any bell on someone, we would be glad about any ideas.

  • Hi,

    Could you share the bootlog (dmesg) to try and trace the kernel oops.

    Best Regards,
    Yordan

  • Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 4.19.19-yocto-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Fri Aug 2 12:18:33 UTC 2019
    [ 0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), cr=30c5387d
    [ 0.000000] CPU: div instructions available: patching division code
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [ 0.000000] OF: fdt: Machine model: ACME board
    [ 0.000000] Memory policy: Data cache writealloc
    [ 0.000000] Switching physical address space to 0x800000000
    [ 0.000000] efi: Getting EFI parameters from FDT:
    [ 0.000000] efi: UEFI not found.
    [ 0.000000] INITRD: 0x88080000+0x05000000 is not a memory region - disabling initrd
    [ 0.000000] psci: probing for conduit method from DT.
    [ 0.000000] psci: Using PSCI v0.1 Function IDs from DT
    [ 0.000000] random: get_random_bytes called from start_kernel+0xa4/0x4b0 with crng_init=0
    [ 0.000000] percpu: Embedded 17 pages/cpu @(ptrval) s39628 r8192 d21812 u69632
    [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1046848
    [ 0.000000] Kernel command line: console=ttyS0,115200n8 rootwait=1 rdinit=/sbin/init rw root=/dev/ram0 initrd=0x88080000,80M rootfstype=nfs root=/dev/nfs rw nfsroot=192.168.1.10:/nfs,v3,tcp,rsize=4096,wsize=4096 ip=dhcp
    [ 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: 4130608K/4194304K available (10240K kernel code, 545K rwdata, 2248K rodata, 2048K init, 432K bss, 63696K reserved, 0K cma-reserved, 3407872K 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 : 0x(ptrval) - 0x(ptrval) (12256 kB)
    [ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (2048 kB)
    [ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 546 kB)
    [ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 433 kB)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    [ 0.000000] rcu: Hierarchical RCU implementation.
    [ 0.000000] rcu: RCU event tracing is enabled.
    [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
    [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
    [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [ 0.000000] GIC: Using split EOI/Deactivate mode
    [ 0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
    [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
    [ 0.000004] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
    [ 0.000014] Switching to timer-based delay loop, resolution 5ns
    [ 0.000199] keystone timer clock @200000000 Hz
    [ 0.000308] Console: colour dummy device 80x30
    [ 0.000346] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=200000)
    [ 0.000359] pid_max: default: 32768 minimum: 301
    [ 0.000421] Security Framework initialized
    [ 0.000470] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.000481] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.000956] CPU: Testing write buffer coherency: ok
    [ 0.000981] CPU0: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
    [ 0.001188] /cpus/cpu@0 missing clock-frequency property
    [ 0.001209] /cpus/cpu@1 missing clock-frequency property
    [ 0.001228] /cpus/cpu@2 missing clock-frequency property
    [ 0.001250] /cpus/cpu@3 missing clock-frequency property
    [ 0.001259] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [ 0.001609] Setting up static identity map for 0x80200000 - 0x80200138
    [ 0.001690] rcu: Hierarchical SRCU implementation.
    [ 0.001993] EFI services will not be available.
    [ 0.002132] smp: Bringing up secondary CPUs ...
    [ 0.007569] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    [ 0.007575] CPU1: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
    [ 0.013189] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
    [ 0.013196] CPU2: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
    [ 0.018779] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
    [ 0.018785] CPU3: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
    [ 0.018906] smp: Brought up 1 node, 4 CPUs
    [ 0.018916] SMP: Total of 4 processors activated (1600.00 BogoMIPS).
    [ 0.018923] CPU: All CPU(s) started in HYP mode.
    [ 0.018929] CPU: Virtualization extensions available.
    [ 0.019609] devtmpfs: initialized
    [ 0.024812] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [ 0.024992] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
    [ 0.025007] futex hash table entries: 1024 (order: 4, 65536 bytes)
    [ 0.025014] kworker/u8:0 (32) used greatest stack depth: 6464 bytes left
    [ 0.025157] xor: measuring software checksum speed
    [ 0.035200] arm4regs : 2484.000 MB/sec
    [ 0.045252] 8regs : 1964.000 MB/sec
    [ 0.055307] 32regs : 1952.000 MB/sec
    [ 0.065360] neon : 3940.000 MB/sec
    [ 0.065367] xor: using function: neon (3940.000 MB/sec)
    [ 0.065376] pinctrl core: initialized pinctrl subsystem
    [ 0.065970] DMI not present or invalid.
    [ 0.066189] NET: Registered protocol family 16
    [ 0.066435] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.067409] kworker/u8:0 (51) used greatest stack depth: 6344 bytes left
    [ 0.067887] cpuidle: using governor ladder
    [ 0.067913] cpuidle: using governor menu
    [ 0.068972] kworker/u8:0 (64) used greatest stack depth: 6136 bytes left
    [ 0.071488] kworker/u8:0 (83) used greatest stack depth: 6112 bytes left
    [ 0.073819] davinci_gpio 260bf00.gpio: Runtime PM disabled, clock forced on.
    [ 0.105874] raid6: int32x1 gen() 261 MB/s
    [ 0.122759] raid6: int32x1 xor() 285 MB/s
    [ 0.139990] raid6: int32x2 gen() 367 MB/s
    [ 0.156974] raid6: int32x2 xor() 367 MB/s
    [ 0.174068] raid6: int32x4 gen() 425 MB/s
    [ 0.191147] raid6: int32x4 xor() 390 MB/s
    [ 0.208236] raid6: int32x8 gen() 511 MB/s
    [ 0.225331] raid6: int32x8 xor() 376 MB/s
    [ 0.242402] raid6: neonx1 gen() 1003 MB/s
    [ 0.259471] raid6: neonx1 xor() 1380 MB/s
    [ 0.276569] raid6: neonx2 gen() 1386 MB/s
    [ 0.293629] raid6: neonx2 xor() 1812 MB/s
    [ 0.310712] raid6: neonx4 gen() 1796 MB/s
    [ 0.327792] raid6: neonx4 xor() 1660 MB/s
    [ 0.344900] raid6: neonx8 gen() 2000 MB/s
    [ 0.361968] raid6: neonx8 xor() 1558 MB/s
    [ 0.361974] raid6: using algorithm neonx8 gen() 2000 MB/s
    [ 0.361980] raid6: .... xor() 1558 MB/s, rmw enabled
    [ 0.361987] raid6: using neon recovery algorithm
    [ 0.362403] vgaarb: loaded
    [ 0.362946] SCSI subsystem initialized
    [ 0.363260] usbcore: registered new interface driver usbfs
    [ 0.363307] usbcore: registered new interface driver hub
    [ 0.363375] usbcore: registered new device driver usb
    [ 0.363523] i2c_davinci 2530000.i2c: Runtime PM disabled, clock forced on.
    [ 0.363770] i2c_davinci 2530400.i2c: Runtime PM disabled, clock forced on.
    [ 0.363925] i2c_davinci 2530800.i2c: Runtime PM disabled, clock forced on.
    [ 0.364132] pps_core: LinuxPPS API ver. 1 registered
    [ 0.364139] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 0.364171] EDAC MC: Ver: 3.0.0
    [ 0.365013] clocksource: Switched to clocksource arch_sys_counter
    [ 0.416189] NET: Registered protocol family 2
    [ 0.416608] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
    [ 0.416633] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [ 0.416688] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    [ 0.416800] TCP: Hash tables configured (established 8192 bind 8192)
    [ 0.416863] UDP hash table entries: 512 (order: 2, 16384 bytes)
    [ 0.416892] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    [ 0.417012] NET: Registered protocol family 1
    [ 0.417329] RPC: Registered named UNIX socket transport module.
    [ 0.417337] RPC: Registered udp transport module.
    [ 0.417344] RPC: Registered tcp transport module.
    [ 0.417350] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.417840] platform alarmtimer: set dma_pfn_offset00780000
    [ 0.418212] Initialise system trusted keyrings
    [ 0.418325] workingset: timestamp_bits=14 max_order=20 bucket_order=6
    [ 0.426438] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 0.427203] ntfs: driver 2.1.32 [Flags: R/W].
    [ 0.427720] pstore: using deflate compression
    [ 0.430665] Key type asymmetric registered
    [ 0.430676] Asymmetric key parser 'x509' registered
    [ 0.430714] bounce: pool size: 64 pages
    [ 0.430748] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
    [ 0.430760] io scheduler noop registered
    [ 0.430767] io scheduler deadline registered
    [ 0.430929] io scheduler cfq registered (default)
    [ 0.430938] io scheduler mq-deadline registered
    [ 0.430946] io scheduler kyber registered
    [ 0.431609] keystone_irq 26202a0.keystone_irq: irqchip registered, nr_irqs 28
    [ 0.432027] kworker/u8:3 (708) used greatest stack depth: 6080 bytes left
    [ 0.434612] keystone-navigator-qmss soc@0:qmss@2a40000: Runtime PM disabled, clock forced on.
    [ 0.434639] keystone-navigator-qmss soc@0:qmss@2a40000: qmgr start queue 0, number of queues 8192
    [ 0.434775] keystone-navigator-qmss soc@0:qmss@2a40000: added qmgr start queue 0, num of queues 8192, reg_peek (ptrval), reg_status (ptrval), reg_config (ptrval), reg_region (ptrval), reg_push (ptrval), reg_pop (ptrval)
    [ 0.434787] keystone-navigator-qmss soc@0:qmss@2a40000: qmgr start queue 8192, number of queues 8192
    [ 0.434889] keystone-navigator-qmss soc@0:qmss@2a40000: added qmgr start queue 8192, num of queues 8192, reg_peek (ptrval), reg_status (ptrval), reg_config (ptrval), reg_region (ptrval), reg_push (ptrval), reg_pop (ptrval)
    [ 0.435024] keystone-navigator-qmss soc@0:qmss@2a40000: failed to get firmware for pdsp
    [ 0.436549] keystone-navigator-qmss soc@0:qmss@2a40000: pdsp id 0 not started for range acc-low-0
    [ 0.436932] keystone-navigator-dma soc@0:knav_dmas@0: Runtime PM disabled, clock forced on.
    [ 0.437068] keystone-navigator-dma soc@0:knav_dmas@0: DMA dma_gbe registered 41 logical channels, flows 32, tx chans: 9, rx chans: 24
    [ 0.465057] kworker/u8:3 (1243) used greatest stack depth: 5944 bytes left
    [ 0.466247] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [ 0.466295] platform serial8250: set dma_pfn_offset00780000
    [ 0.467518] of_serial 2530c00.serial: Runtime PM disabled, clock forced on.
    [ 0.467998] console [ttyS0] disabled
    [ 0.468051] 2530c00.serial: ttyS0 at MMIO 0x2530c00 (irq = 27, base_baud = 12500000) is a TI DA8xx/66AK2x
    [ 1.485240] console [ttyS0] enabled
    [ 1.488913] of_serial 2531000.serial: Runtime PM disabled, clock forced on.
    [ 1.496351] 2531000.serial: ttyS1 at MMIO 0x2531000 (irq = 28, base_baud = 12500000) is a TI DA8xx/66AK2x
    [ 1.519153] ks-sa-rng 20e4000.rng: Runtime PM disabled, clock forced on.
    [ 1.532217] brd: module loaded
    [ 1.540811] loop: module loaded
    [ 1.545852] spi_davinci 21000400.spi: Runtime PM disabled, clock forced on.
    [ 1.553080] spi_davinci 21000400.spi: DMA is not supported (-19)
    [ 1.559602] m25p80 spi0.0: unrecognized JEDEC id bytes: ff, ff, ff
    [ 1.565832] spi_davinci 21000400.spi: Controller at 0x(ptrval)
    [ 1.571745] spi_davinci 21000600.spi: Runtime PM disabled, clock forced on.
    [ 1.578911] spi_davinci 21000600.spi: DMA is not supported (-19)
    [ 1.585212] spi_davinci 21000600.spi: Controller at 0x(ptrval)
    [ 1.591128] spi_davinci 21000800.spi: Runtime PM disabled, clock forced on.
    [ 1.598294] spi_davinci 21000800.spi: DMA is not supported (-19)
    [ 1.604591] spi_davinci 21000800.spi: Controller at 0x(ptrval)
    [ 1.610762] platform Fixed MDIO bus.0: set dma_pfn_offset00780000
    [ 1.617010] libphy: Fixed MDIO Bus: probed
    [ 1.622239] CAN device driver interface
    [ 1.626495] davinci_mdio 2090300.mdio: Runtime PM disabled, clock forced on.
    [ 1.667017] davinci_mdio 2090300.mdio: davinci mdio revision 1.5, bus freq 2500000
    [ 1.674627] libphy: 2090300.mdio: probed
    [ 1.679869] davinci_mdio 2090300.mdio: phy[0]: device 2090300.mdio:00, driver TI DP83867
    [ 1.688008] davinci_mdio 2090300.mdio: phy[1]: device 2090300.mdio:01, driver TI DP83867
    [ 1.696272] netcp-1.0 2620110.netcp: Runtime PM disabled, clock forced on.
    [ 2.731308] netcp-1.0 2620110.netcp: initialized cpsw ale version 1.3
    [ 2.737788] netcp-1.0 2620110.netcp: ALE Table size 1024
    [ 2.743145] netcp-1.0 2620110.netcp: cpts: overflow check period 3500 (jiffies)
    [ 2.750496] netcp-1.0 2620110.netcp: CPTS: ref_clk_freq:600000000 calc_mult:3579139413 calc_shift:31 error:-1 nsec/sec
    [ 2.761844] netcp-1.0 2620110.netcp: module(netcp-xgbe) not used for device
    [ 2.769078] i2c /dev entries driver
    [ 2.773105] Driver for 1-wire Dallas network protocol.
    [ 2.779338] davinci-wdt 22f0080.wdt: Runtime PM disabled, clock forced on.
    [ 2.786271] davinci-wdt 22f0080.wdt: heartbeat 60 sec
    [ 2.791924] EDAC MC0: Giving out device to module ti-emif-edac controller ti,emif-keystone: DEV 21010000.emif (INTERRUPT)
    [ 2.803163] hidraw: raw HID events driver (C) Jiri Kosina
    [ 2.809291] usbcore: registered new interface driver usbhid
    [ 2.814895] usbhid: USB HID core driver
    [ 2.819261] ti-aemif 21000a00.aemif: Runtime PM disabled, clock forced on.
    [ 2.826403] davinci_nand 30000000.nand: Runtime PM disabled, clock forced on.
    [ 2.834013] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xa3
    [ 2.840399] nand: Micron MT29F8G08ABBCAH4
    [ 2.844431] nand: 1024 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 224
    [ 2.852217] nand: WARNING: 30000000.nand: the ECC used on your system is too weak compared to the one required by the NAND chip
    [ 2.864251] Bad block table found at page 262080, version 0x01
    [ 2.871015] Bad block table found at page 262016, version 0x01
    [ 2.877414] 3 fixed-partitions partitions found on MTD device 30000000.nand
    [ 2.884414] Creating 3 MTD partitions on "30000000.nand":
    [ 2.889847] 0x000000000000-0x000000100000 : "u-boot"
    [ 2.895421] 0x000000100000-0x000000180000 : "params"
    [ 2.900932] 0x000000180000-0x000020000000 : "ubifs"
    [ 2.908026] davinci_nand 30000000.nand: controller rev. 2.5
    [ 2.913864] GACT probability on
    [ 2.917037] Mirror/redirect action on
    [ 2.920734] Simple TC action Loaded
    [ 2.924534] netem: version 1.3
    [ 2.927617] u32 classifier
    [ 2.930337] input device check on
    [ 2.934019] Actions configured
    [ 2.937854] IPVS: Registered protocols ()
    [ 2.941977] IPVS: Connection hash table configured (size=4096, memory=32Kbytes)
    [ 2.949604] IPVS: ipvs loaded.
    [ 2.952690] IPVS: [rr] scheduler registered.
    [ 2.957485] Initializing XFRM netlink socket
    [ 2.962308] NET: Registered protocol family 10
    [ 2.967677] Segment Routing with IPv6
    [ 2.971492] mip6: Mobile IPv6
    [ 2.974573] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [ 2.980879] NET: Registered protocol family 17
    [ 2.985361] NET: Registered protocol family 15
    [ 2.989923] Bridge firewalling registered
    [ 2.993957] can: controller area network core (rev 20170425 abi 9)
    [ 3.000264] NET: Registered protocol family 29
    [ 3.004737] can: raw protocol (rev 20170425)
    [ 3.009031] can: broadcast manager protocol (rev 20170425 t)
    [ 3.014722] can: netlink gateway (rev 20170425) max_hops=1
    [ 3.020311] 8021q: 802.1Q VLAN Support v1.8
    [ 3.024680] sctp: Hash tables configured (bind 512/512)
    [ 3.030173] Key type dns_resolver registered
    [ 3.034742] Registering SWP/SWPB emulation handler
    [ 3.039862] Loading compiled-in X.509 certificates
    [ 3.046445] Btrfs loaded, crc32c=crc32c-generic
    [ 3.065262] netcp-1.0 2620110.netcp eth0: Link is Down
    [ 3.070454] Unable to handle kernel paging request at virtual address 400090bc
    [ 3.077716] pgd = (ptrval)
    [ 3.080438] [400090bc] *pgd=80000800005003, *pmd=00000000
    [ 3.085874] Internal error: Oops: a06 [#1] SMP ARM
    [ 3.090680] Modules linked in:
    [ 3.093748] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.19.19-yocto-standard #1
    [ 3.101082] Hardware name: Keystone
    [ 3.104587] PC is at netcp_rxpool_refill+0x1ac/0x318
    [ 3.109568] LR is at netcp_rxpool_refill+0x154/0x318
    [ 3.114548] pc : [<c081eb54>] lr : [<c081eafc>] psr: 60000013
    [ 3.120837] sp : ed4cfcd0 ip : 00000630 fp : 00000000
    [ 3.126077] r10: c12d6380 r9 : ed782d04 r8 : 00000700
    [ 3.131318] r7 : ed4cfd00 r6 : ed782cc0 r5 : ec427900 r4 : 400090a0
    [ 3.137868] r3 : 00002200 r2 : ac427900 r1 : 00000000 r0 : ac427900
    [ 3.144419] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
    [ 3.151580] Control: 30c5387d Table: 00003000 DAC: 55555555
    [ 3.157345] Process swapper/0 (pid: 1, stack limit = 0x(ptrval))
    [ 3.163371] Stack: (0xed4cfcd0 to 0xed4d0000)
    [ 3.167742] fcc0: 00000001 00000000 00000000 c0c004d8
    [ 3.175951] fce0: 00480021 c12064c8 00000001 ed4cfd10 ac427900 00000000 c12064c8 0000007f
    [ 3.184159] fd00: c12064c8 ecd2ec00 0000004d 912448c8 60000013 ed782de0 ed782800 ed782f58
    [ 3.192367] fd20: c12064c8 ed782cc0 00000000 c0de7418 00000001 c081ee70 00000001 c0a339d0
    [ 3.200576] fd40: c081e940 ed782cc0 00000002 00000101 00000000 00000000 00000000 00000042
    [ 3.208783] fd60: 00002200 00000000 00000fa2 00000fa3 00000fa3 00000fa3 00000000 00000000
    [ 3.216991] fd80: 00000000 662d7872 652d7164 2d306874 ed780031 912448c8 00000000 ed782800
    [ 3.225198] fda0: c12064c8 00000000 c0c7bd60 ed78282c c106f604 c091229c ed780000 c0a440f4
    [ 3.233407] fdc0: ffffffec ed782800 00000000 912448c8 ed782800 c12064c8 00001003 00000001
    [ 3.241614] fde0: 00001002 c0912664 00000000 c023bb10 00000000 c12064c8 ed780000 912448c8
    [ 3.249821] fe00: ed780000 ed782800 00001002 00000000 ed78293c c106f614 c106f604 c09126dc
    [ 3.258029] fe20: ed782800 c0ddcb58 00001002 c12640a0 c106f614 c104a4b4 00000000 ecbf2a80
    [ 3.266235] fe40: c1277819 c03a930c ecbf2a80 00000000 00000000 c1264000 c1065838 10624dd3
    [ 3.274443] fe60: 00000002 00000001 00000000 c1264000 c0c0ba58 ed43f6c0 ed4a1800 c03aaca4
    [ 3.282650] fe80: 00000000 00000002 00000000 00000000 c1262710 c03ab560 00000000 c04b6460
    [ 3.290857] fea0: 00009080 00000000 c0c0ba58 c1262710 00000000 00000000 00000000 c1262710
    [ 3.299064] fec0: c12064c8 c03ab8d4 00000000 00000000 00000000 912448c8 00000000 00000008
    [ 3.307272] fee0: c104a1e0 c12064c8 00000000 c1065838 c10004bc c1065858 c107ab08 c02029e4
    [ 3.315479] ff00: efffcb3a c0239758 c0e2fed4 c0d3d200 00000000 00000007 00000007 c0d43b6c
    [ 3.323686] ff20: 00000000 c12064c8 c0d52b78 c0d43be0 cccccccd efffcb33 efffcb36 912448c8
    [ 3.331894] ff40: 00000000 00000007 c1288580 912448c8 00000008 c1288580 c1288580 0000010d
    [ 3.340102] ff60: c1065838 c1001144 00000007 00000007 00000000 c10004bc 00000000 00000000
    [ 3.348309] ff80: c0b02af0 00000000 c0b02af0 00000000 00000000 00000000 00000000 00000000
    [ 3.356516] ffa0: 00000000 c0b02af8 00000000 c02010d8 00000000 00000000 00000000 00000000
    [ 3.364722] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [ 3.372929] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
    [ 3.381144] [<c081eb54>] (netcp_rxpool_refill) from [<c081ee70>] (netcp_ndo_open+0x1b0/0x480)
    [ 3.389705] [<c081ee70>] (netcp_ndo_open) from [<c091229c>] (__dev_open+0xcc/0x150)
    [ 3.397393] [<c091229c>] (__dev_open) from [<c0912664>] (__dev_change_flags+0x164/0x1c4)
    [ 3.405516] [<c0912664>] (__dev_change_flags) from [<c09126dc>] (dev_change_flags+0x18/0x48)
    [ 3.413993] [<c09126dc>] (dev_change_flags) from [<c104a4b4>] (ip_auto_config+0x2d4/0x1184)
    [ 3.422381] [<c104a4b4>] (ip_auto_config) from [<c02029e4>] (do_one_initcall+0x40/0x20c)
    [ 3.430506] [<c02029e4>] (do_one_initcall) from [<c1001144>] (kernel_init_freeable+0x2bc/0x350)
    [ 3.439238] [<c1001144>] (kernel_init_freeable) from [<c0b02af8>] (kernel_init+0x8/0x114)
    [ 3.447449] [<c0b02af8>] (kernel_init) from [<c02010d8>] (ret_from_fork+0x14/0x3c)
    [ 3.455045] Exception stack(0xed4cffb0 to 0xed4cfff8)
    [ 3.460111] ffa0: 00000000 00000000 00000000 00000000
    [ 3.468319] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [ 3.476526] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
    [ 3.483165] Code: e3a08c07 e3a0ce63 e596303c e3a0b000 (e584001c)
    [ 3.489342] ---[ end trace a3c602548f82e065 ]---
    [ 3.494025] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
    [ 3.494025]
    [ 3.503201] CPU3: stopping
    [ 3.505920] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G D 4.19.19-yocto-standard #1
    [ 3.514650] Hardware name: Keystone
    [ 3.518163] [<c02108a8>] (unwind_backtrace) from [<c020bbc4>] (show_stack+0x10/0x14)
    [ 3.525944] [<c020bbc4>] (show_stack) from [<c0aedd78>] (dump_stack+0x88/0x9c)
    [ 3.533198] [<c0aedd78>] (dump_stack) from [<c020f6d0>] (handle_IPI+0x350/0x388)
    [ 3.540630] [<c020f6d0>] (handle_IPI) from [<c064b35c>] (gic_handle_irq+0x74/0x78)
    [ 3.548231] [<c064b35c>] (gic_handle_irq) from [<c02019f8>] (__irq_svc+0x58/0x74)
    [ 3.555740] Exception stack(0xed4fff60 to 0xed4fffa8)
    [ 3.560811] ff60: 00000000 00003094 edbd3338 c0216d60 ffffe000 c12064f4 c1206534 00000008
    [ 3.569019] ff80: 00000000 c12064c8 c10832b0 c12776e1 c1214d40 ed4fffb0 c0208fa4 c0208fa8
    [ 3.577226] ffa0: 60000013 ffffffff
    [ 3.580732] [<c02019f8>] (__irq_svc) from [<c0208fa8>] (arch_cpu_idle+0x38/0x3c)
    [ 3.588161] [<c0208fa8>] (arch_cpu_idle) from [<c0248a44>] (do_idle+0x210/0x248)
    [ 3.595588] [<c0248a44>] (do_idle) from [<c0248d18>] (cpu_startup_entry+0x18/0x20)
    [ 3.603189] [<c0248d18>] (cpu_startup_entry) from [<802023ec>] (0x802023ec)
    [ 3.610177] CPU2: stopping
    [ 3.612896] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G D 4.19.19-yocto-standard #1
    [ 3.621625] Hardware name: Keystone
    [ 3.625133] [<c02108a8>] (unwind_backtrace) from [<c020bbc4>] (show_stack+0x10/0x14)
    [ 3.632911] [<c020bbc4>] (show_stack) from [<c0aedd78>] (dump_stack+0x88/0x9c)
    [ 3.640164] [<c0aedd78>] (dump_stack) from [<c020f6d0>] (handle_IPI+0x350/0x388)
    [ 3.647593] [<c020f6d0>] (handle_IPI) from [<c064b35c>] (gic_handle_irq+0x74/0x78)
    [ 3.655195] [<c064b35c>] (gic_handle_irq) from [<c02019f8>] (__irq_svc+0x58/0x74)
    [ 3.662704] Exception stack(0xed4fdf60 to 0xed4fdfa8)
    [ 3.667774] df60: 00000000 00005020 edbc2338 c0216d60 ffffe000 c12064f4 c1206534 00000004
    [ 3.675981] df80: 00000000 c12064c8 c10832b0 c12776e1 00000002 ed4fdfb0 c0208fa4 c0208fa8
    [ 3.684188] dfa0: 60000113 ffffffff
    [ 3.687691] [<c02019f8>] (__irq_svc) from [<c0208fa8>] (arch_cpu_idle+0x38/0x3c)
    [ 3.695119] [<c0208fa8>] (arch_cpu_idle) from [<c0248a44>] (do_idle+0x210/0x248)
    [ 3.702547] [<c0248a44>] (do_idle) from [<c0248d18>] (cpu_startup_entry+0x18/0x20)
    [ 3.710145] [<c0248d18>] (cpu_startup_entry) from [<802023ec>] (0x802023ec)
    [ 3.717134] CPU0: stopping
    [ 3.719857] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 4.19.19-yocto-standard #1
    [ 3.728587] Hardware name: Keystone
    [ 3.732094] [<c02108a8>] (unwind_backtrace) from [<c020bbc4>] (show_stack+0x10/0x14)
    [ 3.739874] [<c020bbc4>] (show_stack) from [<c0aedd78>] (dump_stack+0x88/0x9c)
    [ 3.747128] [<c0aedd78>] (dump_stack) from [<c020f6d0>] (handle_IPI+0x350/0x388)
    [ 3.754557] [<c020f6d0>] (handle_IPI) from [<c064b35c>] (gic_handle_irq+0x74/0x78)
    [ 3.762158] [<c064b35c>] (gic_handle_irq) from [<c02019f8>] (__irq_svc+0x58/0x74)
    [ 3.769667] Exception stack(0xc1201f08 to 0xc1201f50)
    [ 3.774737] 1f00: 00000000 00003a08 edba0338 c0216d60 ffffe000 c12064f4
    [ 3.782946] 1f20: c1206534 00000001 00000000 c12064c8 c10832b0 c12776e1 00000003 c1201f58
    [ 3.791153] 1f40: c0208fa4 c0208fa8 60000013 ffffffff
    [ 3.796227] [<c02019f8>] (__irq_svc) from [<c0208fa8>] (arch_cpu_idle+0x38/0x3c)
    [ 3.803655] [<c0208fa8>] (arch_cpu_idle) from [<c0248a44>] (do_idle+0x210/0x248)
    [ 3.811080] [<c0248a44>] (do_idle) from [<c0248d18>] (cpu_startup_entry+0x18/0x20)
    [ 3.818682] [<c0248d18>] (cpu_startup_entry) from [<c1000e58>] (start_kernel+0x480/0x4b0)
    [ 3.826893] [<c1000e58>] (start_kernel) from [<00000000>] ( (null))
    [ 3.833282] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
    [ 3.833282] ]---

  • Hi,

    Some little new information regarding limitation of amount of RAM to 2 GB...

    I tried it again and concluded that the problem that comes along with it doesn't look as if caused by the limitation. It looks more like just another problem with the Ethernet/NetCP driver that could appear with 4 GB of RAM just as well if our boot proceeded far enough. Therefor, for now, we are not studying that path further.

    Of course, it is possible that we run into this later once the problem with allocation/mapping gets solved. Therefor, we are still welcoming any ideas that might help solving this and I can also try to provide more information if needed.

    In the beginning of the boot log, there is this line that says something alarming but not very specific:
    [ 0.000000] Invalid address space for memory (80000000-100000000)

    The last actions visible in the boot log before the problem appears are these:
    [ 3.240153] netcp-1.0 2620110.netcp eth0: Link is Down
    [ 3.247081] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [ 3.252947] 8021q: adding VLAN 0 to HW filter on device eth0
    [ 3.267001] netcp-1.0 2620110.netcp eth1: Link is Down
    [ 3.272817] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [ 3.278687] 8021q: adding VLAN 0 to HW filter on device eth1
    [ 7.396673] netcp-1.0 2620110.netcp eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [ 7.404649] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [ 7.408857] Sending DHCP requests ..

    After that, there is a series of dumps, and among them, these lines:
    [ 10.938757] Unable to handle kernel NULL pointer dereference at virtual address 00000ee3
    [ 11.351440] Kernel panic - not syncing: Fatal exception in interrupt
    [ 11.678666] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---

    The call stacks in the dumps keep referencing these functions, which are related to interrupts:
    [ 11.230198] [<c081f1d4>] (netcp_rx_poll) from [<c091148c>] (net_rx_action+0x12c/0x3d4)
    [ 11.238146] [<c091148c>] (net_rx_action) from [<c020210c>] (__do_softirq+0x114/0x364)

  • Hi,

    Could you add some debug prints in drivers/net/ethernet/ti/netcp_core.c? Specifically from the log, I see that the pc is stuck at netcp_rxpool_refill(), so could you track where this function is called within netcp_core.c and add some prints to locate whether this happens at netcp_rx_poll() or at netcp_ndo_open()?

    Also can you check your keystone-k2hk-netcp.dtsi if you've modified something in this dts file (maybe address mappings or dma channels?)? Another suggestion is to try and limit the number of descriptors in descriptor-regions  in the dtsi.

    Best Regards,
    Yordan

  • This problem got solved. It was caused by our configuration related to endianess. We fixed that and the Ethernet is now working.

    Thanks for you efforts trying to help!

  • Thanks for updating the thread.

    Best Regards,
    Yordan