[OpenWrt-Devel] [linux-usb] [openwrt] Does KGDB work on MIPS32 24kc (Atheros AR9331 chip)?

Xuebing Wang xbing6 at gmail.com
Wed Oct 18 21:23:06 EDT 2017


Hi community,

When I try KGDB (with kgdboc), and 'echo g > /proc/sysrq-trigger' to 
trigger kgdb, I got below error:
------
CPU 0 Unable to handle kernel paging request at virtual address 
00000000, epc == 00000000, ra == 80223f38
KGDB: re-enter exception: ALL breakpoints killed
(This causes a kernel panic)
------

My setup is:
-  Atheros AR9331 chip, which is MIPS32 24kc
-  OpenWRT tag 15.05
-  Linux kernel v3.18.29

The issue seems with inline assembly?
void arch_kgdb_breakpoint(void)
{
     __asm__ __volatile__(
         ".globl breakinst\n\t"
         ".set\tnoreorder\n\t"
         "nop\n"
         "breakinst:\tbreak\n\t"
         "nop\n\t"
         ".set\treorder");
}

There seems a fundamental question about OpenWRT linux kernel?
-  In file OpenWRT file target/linux/ar71xx/Makefile, there is CPU_TYPE=34kc
-  Atheros AR9331 datasheet says it is 24kc (rather than 34kc)
-  With CPU_TYPE=34kc, it uses gcc options "-mips32r2 -mtune=34kc"

Quotes from mips website: https://www.imgtec.com/mips/classic/
------
MIPS32 34Kc/f
The MIPS32 34K is a 9-stage pipeline multi-threaded processor core with 
support for up to two Virtual Processing Elements (VPE) and nine Thread 
Context (TC)s per VPE.
MIPS32 24K
The MIPS32 24K is a 8-stage pipeline processor core that implements the 
MIPS32 Release 2 Architecture,
------

Does KGDB work on MIPS32 24kc (Atheros AR9331 chip)? Thanks.

Xuebing Wang
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list