From: Marcel Ziswiler Date: Thu, 11 Jun 2026 07:16:00 +0000 (+0200) Subject: boot: Fix gdb support for RISC-V X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=f62021663306e46f26b3d3d56af42bac1311befe;p=thirdparty%2Fsystemd.git 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 --- diff --git a/src/boot/util.c b/src/boot/util.c index e0d2788c202..0e01fdf9171 100644 --- a/src/boot/util.c +++ b/src/boot/util.c @@ -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