boot: Fix gdb support for RISC-V

This will also allow debugging systemd-boot easily on RISC-V.

Note that the following much simpler variant won't work, as we might be missing
the optional 'zihintpause' extension:

    asm volatile("pause");

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@codethink.co.uk>
This commit is contained in:
Marcel Ziswiler
2026-06-15 07:23:22 +09:00
committed by Yu Watanabe
parent 4290607eae
commit f620216633
+2
View File
@@ -402,6 +402,8 @@ __attribute__((noinline)) void notify_debugger(const char *identity, volatile bo
asm volatile("pause");
# elif defined(__aarch64__)
asm volatile("wfi");
# elif defined(__riscv)
asm volatile(".insn i 0x0F, 0, x0, x0, 0x010");
# else
BS->Stall(5000);
# endif