Skip to content

Exclusively setting up kgdb on uart panics #1

@Ham22

Description

@Ham22

If you attempt to give kgdb exclusive access to uart (i.e. put console somewhere else) e.g. setenv console console=fdc2 kgdboc=ttyS1,115200 kernel panics

[    0.229815] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.255669] 18101400.uart: ttyS0 at MMIO 0x18101400 (irq = 21, base_baud = 115740) is a 16550A
[    0.274699] 18101500.uart: ttyS1 at MMIO 0x18101500 (irq = 22, base_baud = 115740) is a 16550A
[    0.290354] ------------[ cut here ]------------
[    0.297321] WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:594 clk_core_disable_lock+0x24/0x3c
[    0.316173] Modules linked in:
[    0.325172] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.10 #0
[    0.333262] Stack : 00000000 00000000 80b47e8a 00000033 80984724 00000000 00000000 80b40000
[    0.357268]         8fc6841c 80ad2607 80a2d24c 00000000 00000001 80b43ae4 80adfe14 80b40000
[    0.373165]         80b40000 8047759c 00000000 80b40000 80ad9114 80ad9118 80a330b0 8fc53c1c
[    0.397139]         00000003 804bcb3c 80adfe14 80b40000 80b40000 80ad0000 80b40000 00c53c1c
[    0.417186]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.441171]         ...
[    0.449145] Call Trace:
[    0.449306] [<8040b76c>] show_stack+0x50/0x84
[    0.465169] [<8065f2f4>] dump_stack+0xd4/0x110
[    0.468487] [<8042da30>] __warn+0xe4/0x118
[    0.472465] [<8042daf8>] warn_slowpath_null+0x1c/0x34
[    0.479224] [<806bbab8>] clk_core_disable_lock+0x24/0x3c
[    0.482904] [<806f8c40>] dw8250_set_termios+0x5c/0x110
[    0.492435] [<806ed7c0>] uart_set_options+0x140/0x188
[    0.496422] [<806ed90c>] uart_poll_init+0x104/0x140
[    0.503499] [<806d0514>] tty_find_polling_driver+0x134/0x20c
[    0.510003] [<806f9f70>] configure_kgdboc+0xdc/0x1a0
[    0.517543] [<80400670>] do_one_initcall+0xdc/0x1ac
[    0.522945] [<80b03da0>] kernel_init_freeable+0x184/0x244
[    0.537237] [<80964eec>] kernel_init+0x10/0x114
[    0.545248] [<804054f8>] ret_from_kernel_thread+0x14/0x1c
[    0.561186] ---[ end trace 1b27f5f5f578d62a ]---
[    0.569330] ------------[ cut here ]------------
[    0.577155] WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:476 clk_unprepare+0x30/0x48
[    0.590843] Modules linked in:
[    0.594772] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W       4.9.10 #0
[    0.601381] Stack : 00000000 00000000 80b47e8a 00000041 80984724 00000000 00000000 80b40000
[    0.625186]         8fc6841c 80ad2607 80a2d24c 00000000 00000001 80b43ae4 80adfe14 80b40000
[    0.645203]         80b40000 8047759c 00000001 80b40000 80ad9114 80ad9118 80a330b0 8fc53c24
[    0.669213]         00000003 804bcb3c 80adfe14 80b40000 000001aa 80ad0000 00000000 00c53c24
[    0.688167]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.713246]         ...
[    0.721219] Call Trace:
[    0.729183] [<8040b76c>] show_stack+0x50/0x84
[    0.737352] [<8065f2f4>] dump_stack+0xd4/0x110
[    0.745325] [<8042da30>] __warn+0xe4/0x118
[    0.761154] [<8042daf8>] warn_slowpath_null+0x1c/0x34
[    0.769229] [<806bbc70>] clk_unprepare+0x30/0x48
[    0.777301] [<806f8c48>] dw8250_set_termios+0x64/0x110
[    0.789629] [<806ed7c0>] uart_set_options+0x140/0x188
[    0.797305] [<806ed90c>] uart_poll_init+0x104/0x140
[    0.813201] [<806d0514>] tty_find_polling_driver+0x134/0x20c
[    0.829143] [<806f9f70>] configure_kgdboc+0xdc/0x1a0
[    0.837224] [<80400670>] do_one_initcall+0xdc/0x1ac
[    0.845299] [<80b03da0>] kernel_init_freeable+0x184/0x244
[    0.861275] [<80964eec>] kernel_init+0x10/0x114
[    0.869269] [<804054f8>] ret_from_kernel_thread+0x14/0x1c
[    0.885259] ---[ end trace 1b27f5f5f578d62b ]---

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions