Version in base suite: 2.12-9+deb13u1 Base version: grub2_2.12-9+deb13u1 Target version: grub2_2.12-9+deb13u2 Base file: /srv/ftp-master.debian.org/ftp/pool/main/g/grub2/grub2_2.12-9+deb13u1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/g/grub2/grub2_2.12-9+deb13u2.dsc changelog | 8 + patches/series | 1 patches/upstream/kern-riscv-efi-init-Use-time-register-in-grub_efi_ge.patch | 47 ++++++++++ 3 files changed, 56 insertions(+) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp2ibi240n/grub2_2.12-9+deb13u1.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp2ibi240n/grub2_2.12-9+deb13u2.dsc: no acceptable signature found diff -Nru grub2-2.12/debian/changelog grub2-2.12/debian/changelog --- grub2-2.12/debian/changelog 2026-02-15 13:50:20.000000000 +0000 +++ grub2-2.12/debian/changelog 2026-04-30 19:02:01.000000000 +0000 @@ -1,3 +1,11 @@ +grub2 (2.12-9+deb13u2) trixie; urgency=medium + + * Non-maintainer upload. + * Apply patch from upstream to fix an illegal instruction on riscv64 in + grub.efi (Closes: #1108898) + + -- Aurelien Jarno Thu, 30 Apr 2026 21:02:01 +0200 + grub2 (2.12-9+deb13u1) trixie; urgency=medium * Non-maintainer upload. diff -Nru grub2-2.12/debian/patches/series grub2-2.12/debian/patches/series --- grub2-2.12/debian/patches/series 2026-02-15 13:50:20.000000000 +0000 +++ grub2-2.12/debian/patches/series 2026-04-30 19:02:01.000000000 +0000 @@ -71,6 +71,7 @@ extra_deps_lst.patch upstream/acpi-Fix-out-of-bounds-access-in-grub_acpi_xsdt_find_tabl.patch upstream/zfs-fix-LINUX_ROOT_DEVICE-when-grub-probe-fails.patch +upstream/kern-riscv-efi-init-Use-time-register-in-grub_efi_ge.patch install-signed.patch grub-install-extra-removable.patch grub-install-removable-shim.patch diff -Nru grub2-2.12/debian/patches/upstream/kern-riscv-efi-init-Use-time-register-in-grub_efi_ge.patch grub2-2.12/debian/patches/upstream/kern-riscv-efi-init-Use-time-register-in-grub_efi_ge.patch --- grub2-2.12/debian/patches/upstream/kern-riscv-efi-init-Use-time-register-in-grub_efi_ge.patch 1970-01-01 00:00:00.000000000 +0000 +++ grub2-2.12/debian/patches/upstream/kern-riscv-efi-init-Use-time-register-in-grub_efi_ge.patch 2026-04-30 19:02:01.000000000 +0000 @@ -0,0 +1,47 @@ +From c5ae124e11f28f637cbd38cb4d6c1b9817baa135 Mon Sep 17 00:00:00 2001 +From: Heinrich Schuchardt +Date: Mon, 12 Aug 2024 16:13:18 +0200 +Subject: [PATCH] kern/riscv/efi/init: Use time register in + grub_efi_get_time_ms() + +The cycle register is not guaranteed to count at constant frequency. +If it is counting at all depends on the state the performance monitoring +unit. Use the time register to measure time. + +Signed-off-by: Heinrich Schuchardt +Reviewed-by: Daniel Kiper +--- + grub-core/kern/riscv/efi/init.c | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +diff --git a/grub-core/kern/riscv/efi/init.c b/grub-core/kern/riscv/efi/init.c +index 38795fe67..0d7de4f54 100644 +--- a/grub-core/kern/riscv/efi/init.c ++++ b/grub-core/kern/riscv/efi/init.c +@@ -33,16 +33,15 @@ grub_efi_get_time_ms (void) + grub_uint64_t tmr; + + #if __riscv_xlen == 64 +- asm volatile ("rdcycle %0" : "=r" (tmr)); ++ asm volatile ("rdtime %0" : "=r"(tmr)); + #else + grub_uint32_t lo, hi, tmp; +- asm volatile ( +- "1:\n" +- "rdcycleh %0\n" +- "rdcycle %1\n" +- "rdcycleh %2\n" +- "bne %0, %2, 1b" +- : "=&r" (hi), "=&r" (lo), "=&r" (tmp)); ++ asm volatile ("1:\n" ++ "rdtimeh %0\n" ++ "rdtime %1\n" ++ "rdtimeh %2\n" ++ "bne %0, %2, 1b" ++ : "=&r" (hi), "=&r" (lo), "=&r" (tmp)); + tmr = ((grub_uint64_t)hi << 32) | lo; + #endif + +-- +2.53.0 +