]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Use the XML target descriptions to report 3 system registers
authorVincent Chen <vincent.chen@sifive.com>
Thu, 16 Apr 2020 02:38:07 +0000 (10:38 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 18 May 2020 18:38:11 +0000 (11:38 -0700)
commita6f5591101f700bbc4994e15d0b61366321a5395
tree73935f4d016aa0de26ce4276e2715ae84bd5c731
parent419648664162bc3625c15628f914790b05d6a264
riscv: Use the XML target descriptions to report 3 system registers

The $status, $badaddr, and $cause registers belong to the thread context,
so KGDB can obtain their contents from pt_regs in each trap. However, the
sequential number of these registers in the gdb register list is far from
the general-purpose registers. If riscv port uses the existing method to
report these three registers, many trivial registers with sequence numbers
in the middle of them will also be packaged to the reply packets. To solve
this problem, the riscv port wants to introduce the GDB target description
mechanism to customize the reported register list. By the list, the KGDB
can ignore the intermediate registers and just reports the general-purpose
registers and these three system registers.

Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig
arch/riscv/include/asm/gdb_xml.h [new file with mode: 0644]
arch/riscv/include/asm/kgdb.h
arch/riscv/kernel/kgdb.c