Hello!
I am sorry for the newbie question in advance I am trying to debug BBL + Linux kernel with GDB through OpenOCD. If I set a breakpoint in the Linux kernel address space (e.g. 0x80200000
which is the beginning of arch/riscv/kernel/head.S), then CPU will freeze at wfi
instruction in the following loop inside BBL (bbl/bbl.c):
while (1) {
__asm__ volatile("wfi");
#ifdef __riscv_div
__asm__ volatile("div x0, x0, x0");
#endif
}
As I understand CPU will wait forever until any interrupt signal. But I do not understand why does it is freezes under GDB after I had set bp inside Linux address space?