ipq8064 openwrt 上KGDB工作不正常

来源:互联网 发布:单片机 控制 四轴 编辑:程序博客网 时间:2024/05/17 22:39

1,内核打开了KGDB/KDB选项之后,BOOTARGS中指定了KGDBWAIT,但没见停下来。

确认参数如下:

root@OpenWrt:/# dmesg | grep tty
[    0.000000] Kernel command line: console=ttyHSL1,115200n8 kgdboc=ttyHSL1,115200 root=mtd:rootfs rootfstype=squashfs
[    0.718650] msm_serial_hs.0: ttyHS0 at MMIO 0x12490000 (irq = 227) is a MSM HS UART
[    0.719650] msm_serial_hsl.1: ttyHSL1 at MMIO 0x16340000 (irq = 184) is a MSM
[    1.376788] console [ttyHSL1] enabled


2.手工打开ttyHSL1,结果报没有这个设备


3.改成ttyS0,打栈出错,如下,比较怀疑串口驱动程序没有修改好:

 echo ttyHSL1 >/sys/module/kgdboc/parameters/kgdboc 
ash: write error: No such device
root@OpenWrt:/# echo ttyS0 >/sys/module/kgdboc/parameters/kgdboc [  514.138113] kgdb: Registered I/O driver kgdboc.


root@OpenWrt:/# echo g >/proc/sysrq-trigger 
[  524.181974] SysRq : DEBUG
[  524.183723] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[  524.191627] pgd = da9a4000
[  524.194345] [00000000] *pgd=5ef9e831, *pte=00000000, *ppte=00000000
[  524.200593] Internal error: Oops: 80000007 [#1] PREEMPT SMP ARM
[  524.206529] KGDB: re-enter exception: ALL breakpoints killed
[  524.212214] ---[ end trace 8c9f143dae7c010a ]---
[  524.217088] note: ash[1181] exited with preempt_count 5
[  524.221993] BUG: scheduling while atomic: ash/1181/0x40000006
[  524.227710] Modules linked in: fuse usb_storage snd_soc_ipq_pcm_voip snd_soc_ipq_pcm_mi2s snd_soc_ipq_pcm_spdif snd_soc_ipq_lpass_codec snd_soc_ipq
_cpu_dai snd_soc_ipq_spdif snd_soc_ipq_dmlite snd_soc_ipq_pcm_raw snd_soc_ipq_lpaif snd_soc_ipq806x_clk snd_soc_ipq806x leds_gpio gpio_keys snd_soc_co
re ecm(O) qca_nss_tunipip6(O) qca_nss_tun6rd(O) nf_nat_proto_sctp dwc3_ipq ledtrig_usbdev nf_conntrack_proto_sctp ip6t_REJECT ip6t_rt ip6t_hbh ip6t_mh
 ip6t_ipv6header ip6t_frag ip6t_eui64 ip6t_ah ip6table_raw ip6_queue ip6table_mangle ip6table_filter ip6_tables nf_conntrack_ipv6 nf_defrag_ipv6 nf_na
t_rtsp(O) nf_conntrack_rtsp(O) nf_nat_tftp nf_conntrack_tftp nf_nat_snmp_basic nf_conntrack_snmp nf_nat_sip nf_conntrack_sip nf_nat_pptp nf_conntrack_
pptp nf_nat_h323 nf_conntrack_h323 nf_nat_proto_gre nf_conntrack_proto_gre nf_nat_amanda nf_conntrack_amanda nf_conntrack_broadcast nf_nat_irc nf_conn
track_irc nf_nat_ftp nf_conntrack_ftp xt_HL xt_hl xt_ecn ipt_ECN xt_CLASSIFY xt_time xt_tcpmss xt_statistic xt_mark xt_length xt_DSCP xt_dscp xt_quota
 xt_pkttype xt_physdev xt_owner ipt_MASQUERADE iptable_nat nf_nat xt_recent xt_helper xt_connmark xt_connbytes pptp l2tp_ppp pppoe xt_conntrack xt_CT 
xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ehci_hcd xhci_hcd dwc3 udc_core sd_mod pppox ipt_REJECT xt_TCPMSS xt_com
ment xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables msdos bonding ip_gre gre smart_antenna(PO) ath_pktlog(PO)
 umac(O) ath_dev(PO) hst_tx99(PO) ath_spectral(PO) ath_dfs(PO) ath_rate_atheros(PO) ath_hal(PO) adf(PO) asf(PO) qca_nss_macsec(O) qca_nss_qdisc(O) sit
 qca_nss_drv(O) l2tp_netlink l2tp_core ip6_tunnel qca_nss_gmac(O) ppp_mppe tunnel6 tunnel4 snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd
_seq_device snd_hwdep snd_page_alloc snd soundcore ppp_async ppp_generic slhc vfat fat ntfs button_hotplug(O) raid1 raid0 linear md_mod nls_iso8859_1 
nls_cp437 usbcore usb_common nls_base ts_fsm ts_bm ts_kmp libcrc32c crc_ccitt ipv6 regmap_spi qca_ssdk(O) sha1_generic ecb arc4 crc32c
[  524.408747] Backtrace: 
[  524.411184] [<c00124f0>] (dump_backtrace+0x0/0x118) from [<c038d0cc>] (dump_stack+0x18/0x1c)
[  524.419681]  r6:de1a4380 r5:c0cae380 r4:dda56000 r3:60000113
[  524.425273] [<c038d0b4>] (dump_stack+0x0/0x1c) from [<c038d9c4>] (__schedule_bug+0x4c/0x58)
[  524.433645] [<c038d978>] (__schedule_bug+0x0/0x58) from [<c03942d8>] (__schedule+0x4f0/0x5d0)
[  524.442143] [<c0393de8>] (__schedule+0x0/0x5d0) from [<c0081758>] (__cond_resched+0x28/0x38)
[  524.450609] [<c0081730>] (__cond_resched+0x0/0x38) from [<c039444c>] (_cond_resched+0x38/0x48)
[  524.459137]  r4:00000000 r3:00000005
[  524.462667] [<c0394414>] (_cond_resched+0x0/0x48) from [<c00d70b4>] (unmap_single_vma+0x214/0x55c)
[  524.471696] [<c00d6ea0>] (unmap_single_vma+0x0/0x55c) from [<c00d7c90>] (unmap_vmas+0x4c/0x60)
[  524.480224] [<c00d7c44>] (unmap_vmas+0x0/0x60) from [<c00dbef0>] (exit_mmap+0xac/0x1e4)
[  524.488284] [<c00dbe44>] (exit_mmap+0x0/0x1e4) from [<c005ccc4>] (mmput+0x40/0x10c)
[  524.495845]  r6:de1a4380 r5:00000000 r4:dd768380
[  524.500437] [<c005cc84>] (mmput+0x0/0x10c) from [<c00610b0>] (exit_mm+0x110/0x140)
[  524.508184]  r5:dd768380 r4:de1a4660
[  524.511527] [<c0060fa0>] (exit_mm+0x0/0x140) from [<c00626f4>] (do_exit+0x16c/0x7c8)
[  524.519275]  r7:80000007 r6:dda57b60 r5:00000009 r4:de1a4380
[  524.524992] [<c0062588>] (do_exit+0x0/0x7c8) from [<c038d13c>] (__do_kernel_fault.part.10+0x6c/0x7c)
[  524.534051]  r7:80000007
[  524.536551] [<c038d0d0>] (__do_kernel_fault.part.10+0x0/0x7c) from [<c001a908>] (do_page_fault+0x2b8/0x354)
[  524.546329]  r7:de1a4380 r3:dda57b60
[  524.549828] [<c001a650>] (do_page_fault+0x0/0x354) from [<c0008548>] (do_PrefetchAbort+0x3c/0xa4)
[  524.558700] [<c000850c>] (do_PrefetchAbort+0x0/0xa4) from [<c000e6b8>] (__pabt_svc+0x38/0x80)
[  524.567260] Exception stack(0xdda57b60 to 0xdda57ba8)
[  524.572258] 7b60: c087d430 00000001 0000000a 00000000 c087d430 0000000a c0825524 00000000
[  524.580412] 7b80: c078aaa0 c0829950 0000002d dda57bc4 dda57bc8 dda57ba8 c0230238 00000000
[  524.588597] 7ba0: a0000093 ffffffff
[  524.592002]  r7:dda57b94 r6:ffffffff r5:a0000093 r4:00000000
[  524.597656] [<c0230218>] (serial8250_put_poll_char+0x0/0xb0) from [<c022b38c>] (uart_poll_put_char+0x3c/0x40)
[  524.607716]  r6:c0825524 r5:00000001 r4:0000002d r3:c0230218
[  524.613183] [<c022b350>] (uart_poll_put_char+0x0/0x40) from [<c02365cc>] (kgdboc_put_char+0x30/0x38)
[  524.622336] [<c023659c>] (kgdboc_put_char+0x0/0x38) from [<c00a20dc>] (vkdb_printf+0x2c4/0x78c)
[  524.631084] [<c00a1e18>] (vkdb_printf+0x0/0x78c) from [<c00a25c8>] (kdb_printf+0x24/0x2c)
[  524.639175] [<c00a25a4>] (kdb_printf+0x0/0x2c) from [<c00a6240>] (kdb_main_loop+0xfc/0x734)
[  524.647578]  r3:c0829c64 r2:0000049d r1:de1a4380 r0:c04ae280
[  524.653108] [<c00a6144>] (kdb_main_loop+0x0/0x734) from [<c00a8f3c>] (kdb_stub+0x328/0x400)
[  524.661480] [<c00a8c14>] (kdb_stub+0x0/0x400) from [<c009ffe0>] (kgdb_cpu_enter+0x264/0x564)
[  524.669978] [<c009fd7c>] (kgdb_cpu_enter+0x0/0x564) from [<c00a04b0>] (kgdb_handle_exception+0x90/0x178)
[  524.679350] [<c00a0420>] (kgdb_handle_exception+0x0/0x178) from [<c0014c24>] (kgdb_compiled_brk_fn+0x28/0x34)
[  524.689315]  r7:c0014bfc r6:c009f714 r5:dda57e68 r4:e7ffdeff
[  524.694876] [<c0014bfc>] (kgdb_compiled_brk_fn+0x0/0x34) from [<c00082d0>] (do_undefinstr+0x13c/0x1ac)
[  524.704186] [<c0008194>] (do_undefinstr+0x0/0x1ac) from [<c000e66c>] (__und_svc_finish+0x0/0x14)
[  524.712933] Exception stack(0xdda57e68 to 0xdda57eb0)
[  524.718056] 7e60:                   00000000 00000001 c082550c c0825508 c0782660 00000067
[  524.726148] 7e80: 00000007 00000000 60000013 dda57f70 00000002 dda57ebc dda57ec0 dda57eb0
[  524.734270] 7ea0: c009f96c c009f714 60000093 ffffffff
[  524.739425]  r7:00000000 r6:c000e914 r5:60000093 r4:c009f718
[  524.744985] [<c009f6e8>] (kgdb_breakpoint+0x0/0x50) from [<c009f96c>] (sysrq_handle_dbg+0x3c/0x68)
[  524.753951] [<c009f930>] (sysrq_handle_dbg+0x0/0x68) from [<c021235c>] (__handle_sysrq+0x90/0x15c)
[  524.762855] [<c02122cc>] (__handle_sysrq+0x0/0x15c) from [<c0212468>] (write_sysrq_trigger+0x40/0x50)
[  524.772133]  r8:01e3ff78 r7:dd3f73c0 r6:de1946cc r5:de194680 r4:00000002
[  524.778537] r3:dda56000
[  524.781162] [<c0212428>] (write_sysrq_trigger+0x0/0x50) from [<c012ef90>] (proc_reg_write+0x78/0x9c)
[  524.790284]  r4:c0212428 r3:dda57f70
[  524.793845] [<c012ef18>] (proc_reg_write+0x0/0x9c) from [<c00ee694>] (vfs_write+0xb0/0x13c)
[  524.802374] [<c00ee5e4>] (vfs_write+0x0/0x13c) from [<c00ee90c>] (sys_write+0x44/0x70)
[  524.810090]  r8:00000000 r7:00000004 r6:00000002 r5:01e3ff78 r4:dd3f73c0
[  524.816744] [<c00ee8c8>] (sys_write+0x0/0x70) from [<c000ea00>] (ret_fast_syscall+0x0/0x30)
[  524.825085]  r9:dda56000 r8:c000eb84 r6:01e3ff78 r5:00000002 r4:0006c930


Please press Enter to activate this console. 




BusyBox v1.19.4 (2016-01-09 09:05:49 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.


     MM           NM                    MMMMMMM          M       M
   $MMMMM        MMMMM                MMMMMMMMMMM      MMM     MMM
  MMMMMMMM     MM MMMMM.              MMMMM:MMMMMM:   MMMM   MMMMM
MMMM= MMMMMM  MMM   MMMM       MMMMM   MMMM  MMMMMM   MMMM  MMMMM'
MMMM=  MMMMM MMMM    MM       MMMMM    MMMM    MMMM   MMMMNMMMMM
MMMM=   MMMM  MMMMM          MMMMM     MMMM    MMMM   MMMMMMMM
MMMM=   MMMM   MMMMMM       MMMMM      MMMM    MMMM   MMMMMMMMM
MMMM=   MMMM     MMMMM,    NMMMMMMMM   MMMM    MMMM   MMMMMMMMMMM
MMMM=   MMMM      MMMMMM   MMMMMMMM    MMMM    MMMM   MMMM  MMMMMM
MMMM=   MMMM   MM    MMMM    MMMM      MMMM    MMMM   MMMM    MMMM
MMMM$ ,MMMMM  MMMMM  MMMM    MMM       MMMM   MMMMM   MMMM    MMMM
  MMMMMMM:      MMMMMMM     M         MMMMMMMMMMMM  MMMMMMM MMMMMMM
    MMMMMM       MMMMN     M           MMMMMMMMM      MMMM    MMMM
     MMMM          M                    MMMMMMM        M       M
       M
 ---------------------------------------------------------------
   For those about to rock... (IPQ806X.LN, unknown)
 ---------------------------------------------------------------
root@OpenWrt:/# [  584.864761] INFO: rcu_preempt detected stalls on CPUs/tasks: { 1} (detected by 0, t=6003 jiffies)
[  584.872602] INFO: Stall ended before state dump start
[  597.674757] INFO: rcu_bh detected stalls on CPUs/tasks: { 1} (detected by 0, t=6002 jiffies)
[  597.682161] INFO: Stall ended before state dump start

0 0
原创粉丝点击