Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package limine for openSUSE:Factory checked in at 2025-12-01 11:14:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/limine (Old) and /work/SRC/openSUSE:Factory/.limine.new.14147 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "limine" Mon Dec 1 11:14:40 2025 rev:26 rq:1320612 version:10.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/limine/limine.changes 2025-11-24 14:15:59.054462174 +0100 +++ /work/SRC/openSUSE:Factory/.limine.new.14147/limine.changes 2025-12-01 11:15:26.311883779 +0100 @@ -1,0 +2,14 @@ +Sun Nov 30 00:58:17 UTC 2025 - Marvin Friedrich <[email protected]> + +- Update to 10.4.0: + * Add new configuration file option "global_dtb" to allow overriding + the device tree used by Limine itself as well as for all boot entries + (unless overridden by entry-local "dtb_path" option). + * Flush entire I-Cache if it is not PIPT on aarch64. + * Fix use-after-free bug in riscv64 initialisation code related to + device tree handling. + * Framebuffer-related caching improvements for riscv64 and aarch64. + * Prioritise using ACPI for riscv64 initialisation code if available + and if a DTB is not manually specified. + +------------------------------------------------------------------- Old: ---- limine-10.3.2.tar.gz New: ---- limine-10.4.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ limine.spec ++++++ --- /var/tmp/diff_new_pack.9y1495/_old 2025-12-01 11:15:26.979912057 +0100 +++ /var/tmp/diff_new_pack.9y1495/_new 2025-12-01 11:15:26.983912226 +0100 @@ -15,7 +15,7 @@ # Name: limine -Version: 10.3.2 +Version: 10.4.0 Release: 0 Summary: Modern, advanced, portable, multiprotocol bootloader and boot manager License: BSD-2-Clause ++++++ limine-10.3.2.tar.gz -> limine-10.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/CONFIG.md new/limine-10.4.0/CONFIG.md --- old/limine-10.3.2/CONFIG.md 2025-11-23 09:01:57.000000000 +0100 +++ new/limine-10.4.0/CONFIG.md 2025-11-30 01:56:35.000000000 +0100 @@ -85,6 +85,9 @@ * `serial_baudrate` - If `serial` is set to `yes`, this specifies the baudrate to use for serial I/O. Defaults to `115200`. BIOS only, ignored with Limine UEFI. +* `global_dtb` - If set, use this DTB instead of the firmware-provided DTB for + Limine itself, as well as for any booted entry whose protocol supports DTBs + and the DTB is not locally overridden with `dtb_path`. * `default_entry` - 1-based entry index of the entry which will be automatically selected at startup. If unspecified, it is `1`. * `remember_last_entry` - If set to `yes`, remember last booted entry. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/ChangeLog new/limine-10.4.0/ChangeLog --- old/limine-10.3.2/ChangeLog 2025-11-23 09:01:57.000000000 +0100 +++ new/limine-10.4.0/ChangeLog 2025-11-30 01:56:35.000000000 +0100 @@ -1,3 +1,27 @@ +2025-11-30 Mintsuki <[email protected]> + + *** Release 10.4.0 *** + + Noteworthy changes compared to the previous release, 10.3.2: + + New features: + - Add new configuration file option "global_dtb" to allow overriding + the device tree used by Limine itself as well as for all boot entries + (unless overridden by entry-local "dtb_path" option). + + Bug fixes: + - Flush entire I-Cache if it is not PIPT on aarch64. + - Fix use-after-free bug in riscv64 initialisation code related to + device tree handling. + + Miscellaneous: + - Framebuffer-related caching improvements for riscv64 and aarch64. + This should fix a long standing issue where, on a lot of riscv64 + boards, the Limine interface would look mangled due to missing cache + flushing. + - Prioritise using ACPI for riscv64 initialisation code if available + and if a DTB is not manually specified. + 2025-11-23 Mintsuki <[email protected]> *** Release 10.3.2 *** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/GNUmakefile.in new/limine-10.4.0/GNUmakefile.in --- old/limine-10.3.2/GNUmakefile.in 2025-11-23 09:01:57.000000000 +0100 +++ new/limine-10.4.0/GNUmakefile.in 2025-11-30 01:56:35.000000000 +0100 @@ -316,10 +316,8 @@ echo "$(PACKAGE_VERSION)" > '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/version" cd '$(call SHESCAPE,$(BUILDDIR))' && tar -cf "$(DIST_OUTPUT).tar" "$(DIST_OUTPUT)" cd '$(call SHESCAPE,$(BUILDDIR))' && gzip < "$(DIST_OUTPUT).tar" > "$(DIST_OUTPUT).tar.gz" - cd '$(call SHESCAPE,$(BUILDDIR))' && ( lzip < "$(DIST_OUTPUT).tar" > "$(DIST_OUTPUT).tar.lz" || rm -f "$(DIST_OUTPUT).tar.lz" ) cd '$(call SHESCAPE,$(BUILDDIR))' && ( bzip2 < "$(DIST_OUTPUT).tar" > "$(DIST_OUTPUT).tar.bz2" || rm -f "$(DIST_OUTPUT).tar.bz2" ) cd '$(call SHESCAPE,$(BUILDDIR))' && ( xz < "$(DIST_OUTPUT).tar" > "$(DIST_OUTPUT).tar.xz" || rm -f "$(DIST_OUTPUT).tar.xz" ) - cd '$(call SHESCAPE,$(BUILDDIR))' && ( zstd < "$(DIST_OUTPUT).tar" > "$(DIST_OUTPUT).tar.zst" || rm -f "$(DIST_OUTPUT).tar.zst" ) cd '$(call SHESCAPE,$(BUILDDIR))' && rm "$(DIST_OUTPUT).tar" rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/bootstrap new/limine-10.4.0/bootstrap --- old/limine-10.3.2/bootstrap 2025-11-23 09:01:57.000000000 +0100 +++ new/limine-10.4.0/bootstrap 2025-11-30 01:56:35.000000000 +0100 @@ -104,7 +104,7 @@ clone_repo_commit \ https://codeberg.org/Mintsuki/Flanterm.git \ flanterm \ - 55d228ff16234513b0df0dd12de8bc58160fc196 + ea6a6cdecf3b830f2a8cb4ffe3e58098937224c3 download_by_hash \ https://github.com/nothings/stb/raw/5c205738c191bcb0abc65c4febfa9bd25ff35234/stb_image.h \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/common/lib/gterm.c new/limine-10.4.0/common/lib/gterm.c --- old/limine-10.3.2/common/lib/gterm.c 2025-11-23 09:01:57.000000000 +0100 +++ new/limine-10.4.0/common/lib/gterm.c 2025-11-30 01:56:35.000000000 +0100 @@ -13,6 +13,7 @@ #include <flanterm.h> #include <flanterm_backends/fb.h> #include <lib/term.h> +#include <sys/cpu.h> // Builtin font originally taken from: // https://github.com/viler-int10h/vga-text-mode-fonts/raw/master/FONTS/PC-OTHER/TOSH-SAT.F16 @@ -458,6 +459,22 @@ } } +#if defined (__riscv) +__attribute__((target("arch=+zicbom"))) +static void riscv_flush_callback(volatile void *base, size_t length) { + const size_t cbom_block_size = 0x40; + uintptr_t start = ALIGN_DOWN((uintptr_t)base, cbom_block_size); + uintptr_t end = ALIGN_UP((uintptr_t)(base + length), cbom_block_size); + for (uintptr_t ptr = start; ptr < end; ptr += cbom_block_size) { + asm volatile("cbo.flush (%0)" :: "r"(ptr) : "memory"); + } +} +#elif defined (__aarch64__) +static void aarch64_flush_callback(volatile void *base, size_t length) { + clean_dcache_poc((uintptr_t)base, (uintptr_t)base + length); +} +#endif + bool gterm_init(struct fb_info **_fbs, size_t *_fbs_count, char *config, size_t width, size_t height) { static struct fb_info *fbs; @@ -789,6 +806,13 @@ term->rows = min_rows; flanterm_context_reinit(term); +#if defined (__riscv) + if (riscv_check_isa_extension("zicbom", NULL, NULL)) { + flanterm_fb_set_flush_callback(term, riscv_flush_callback); + } +#elif defined (__aarch64__) + flanterm_fb_set_flush_callback(term, aarch64_flush_callback); +#endif } term_backend = GTERM; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/common/lib/misc.c new/limine-10.4.0/common/lib/misc.c --- old/limine-10.3.2/common/lib/misc.c 2025-11-23 09:01:57.000000000 +0100 +++ new/limine-10.4.0/common/lib/misc.c 2025-11-30 01:56:35.000000000 +0100 @@ -146,11 +146,20 @@ void *dtb = NULL; { - char *dtb_path = config_get_value(config, 0, "DTB_PATH"); - if (dtb_path) { + char *dtb_path = NULL; + bool soft_panic; + if (config != NULL) { + dtb_path = config_get_value(config, 0, "dtb_path"); + soft_panic = true; + } + if (dtb_path == NULL) { + dtb_path = config_get_value(NULL, 0, "global_dtb"); + soft_panic = false; + } + if (dtb_path != NULL) { struct file_handle *dtb_file; if ((dtb_file = uri_open(dtb_path)) == NULL) - panic(true, "dtb: Failed to open device tree blob with path `%#`. Is the path correct?", dtb_path); + panic(soft_panic, "dtb: Failed to open device tree blob with path `%#`. Is the path correct?", dtb_path); dtb = freadall(dtb_file, MEMMAP_BOOTLOADER_RECLAIMABLE); size = dtb_file->size; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/common/menu.c new/limine-10.4.0/common/menu.c --- old/limine-10.3.2/common/menu.c 2025-11-23 09:01:57.000000000 +0100 +++ new/limine-10.4.0/common/menu.c 2025-11-30 01:56:35.000000000 +0100 @@ -779,6 +779,10 @@ } } +#if defined (__riscv) + init_riscv(NULL); +#endif + char *quiet_str = config_get_value(NULL, 0, "QUIET"); quiet = quiet_str != NULL && strcmp(quiet_str, "yes") == 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/common/sys/cpu.h new/limine-10.4.0/common/sys/cpu.h --- old/limine-10.3.2/common/sys/cpu.h 2025-11-23 09:01:57.000000000 +0100 +++ new/limine-10.4.0/common/sys/cpu.h 2025-11-30 01:56:35.000000000 +0100 @@ -260,6 +260,13 @@ return ((ctr >> 16) & 0b1111) << 4; } +static inline bool is_icache_pipt(void) { + uint64_t ctr; + asm volatile ("mrs %0, ctr_el0" : "=r"(ctr)); + + return ((ctr >> 14) & 0b11) == 0b11; +} + // Clean D-Cache to Point of Coherency static inline void clean_dcache_poc(uintptr_t start, uintptr_t end) { size_t dsz = dcache_line_size(); @@ -275,6 +282,12 @@ // Invalidate I-Cache to Point of Unification static inline void inval_icache_pou(uintptr_t start, uintptr_t end) { + if (!is_icache_pipt()) { + asm volatile ("ic ialluis" ::: "memory"); + asm volatile ("dsb sy\n\tisb"); + return; + } + size_t isz = icache_line_size(); uintptr_t addr = start & ~(isz - 1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/common/sys/cpu_riscv.c new/limine-10.4.0/common/sys/cpu_riscv.c --- old/limine-10.3.2/common/sys/cpu_riscv.c 2025-11-23 09:01:57.000000000 +0100 +++ new/limine-10.4.0/common/sys/cpu_riscv.c 2025-11-30 01:56:35.000000000 +0100 @@ -4,6 +4,7 @@ #include <lib/acpi.h> #include <lib/misc.h> #include <lib/print.h> +#include <lib/config.h> #include <sys/cpu.h> #include <mm/pmm.h> #include <stddef.h> @@ -57,9 +58,12 @@ uint8_t mmu_type; } __attribute__((packed)); +void *riscv_fdt = NULL; + size_t bsp_hartid; -struct riscv_hart *hart_list; +struct riscv_hart *hart_list = NULL; static struct riscv_hart *bsp_hart; +static const char *current_config = NULL; static struct riscv_hart *riscv_get_hart(size_t hartid) { for (struct riscv_hart *hart = hart_list; hart != NULL; hart = hart->next) { @@ -225,14 +229,34 @@ } void init_riscv(const char *config) { - void *fdt = get_device_tree_blob(config, 0); - if (fdt != NULL) { - init_riscv_fdt(fdt); - pmm_free(fdt, fdt_totalsize(fdt)); - } else if (acpi_get_rsdp()) { + while (hart_list != NULL && current_config != config) { + void *cur_hart = hart_list; + hart_list = hart_list->next; + pmm_free(cur_hart, sizeof(struct riscv_hart)); + } + + if (riscv_fdt != NULL) { + pmm_free(riscv_fdt, fdt_totalsize(riscv_fdt)); + riscv_fdt = NULL; + } + + bool prioritise_dtb = false; + if (config != NULL) { + prioritise_dtb = config_get_value(config, 0, "dtb_path"); + } + if (!prioritise_dtb) { + prioritise_dtb = config_get_value(NULL, 0, "global_dtb"); + } + + if (!prioritise_dtb && acpi_get_rsdp()) { init_riscv_acpi(); } else { - panic(false, "riscv: requires DTB or ACPI"); + riscv_fdt = get_device_tree_blob(config, 0); + if (riscv_fdt != NULL) { + init_riscv_fdt(riscv_fdt); + } else { + panic(false, "riscv: requires DTB or ACPI"); + } } if (bsp_hart == NULL) { @@ -248,6 +272,8 @@ hart->flags |= RISCV_HART_COPROC; } } + + current_config = config; } struct isa_extension { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/configure new/limine-10.4.0/configure --- old/limine-10.3.2/configure 2025-11-23 09:02:01.000000000 +0100 +++ new/limine-10.4.0/configure 2025-11-30 01:56:40.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for Limine 10.3.2. +# Generated by GNU Autoconf 2.72 for Limine 10.4.0. # # Report bugs to <https://codeberg.org/Limine/Limine/issues>. # @@ -604,8 +604,8 @@ # Identity of this package. PACKAGE_NAME='Limine' PACKAGE_TARNAME='limine' -PACKAGE_VERSION='10.3.2' -PACKAGE_STRING='Limine 10.3.2' +PACKAGE_VERSION='10.4.0' +PACKAGE_STRING='Limine 10.4.0' PACKAGE_BUGREPORT='https://codeberg.org/Limine/Limine/issues' PACKAGE_URL='https://limine-bootloader.org/' @@ -1324,7 +1324,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures Limine 10.3.2 to adapt to many kinds of systems. +'configure' configures Limine 10.4.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1390,7 +1390,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Limine 10.3.2:";; + short | recursive ) echo "Configuration of Limine 10.4.0:";; esac cat <<\_ACEOF @@ -1509,7 +1509,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Limine configure 10.3.2 +Limine configure 10.4.0 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -1621,7 +1621,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Limine $as_me 10.3.2, which was +It was created by Limine $as_me 10.4.0, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -6334,7 +6334,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Limine $as_me 10.3.2, which was +This file was extended by Limine $as_me 10.4.0, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6390,7 +6390,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Limine config.status 10.3.2 +Limine config.status 10.4.0 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/flanterm/src/flanterm_backends/fb.c new/limine-10.4.0/flanterm/src/flanterm_backends/fb.c --- old/limine-10.3.2/flanterm/src/flanterm_backends/fb.c 2025-11-23 09:01:58.000000000 +0100 +++ new/limine-10.4.0/flanterm/src/flanterm_backends/fb.c 2025-11-30 01:56:36.000000000 +0100 @@ -841,6 +841,10 @@ ctx->old_cursor_y = ctx->cursor_y; ctx->queue_i = 0; + + if (ctx->flush_callback) { + ctx->flush_callback(ctx->framebuffer, ctx->pitch * ctx->height); + } } static void flanterm_fb_raw_putchar(struct flanterm_context *_ctx, uint8_t c) { @@ -890,6 +894,10 @@ if (_ctx->cursor_enabled) { draw_cursor(_ctx); } + + if (ctx->flush_callback) { + ctx->flush_callback(ctx->framebuffer, ctx->pitch * ctx->height); + } } static void flanterm_fb_deinit(struct flanterm_context *_ctx, void (*_free)(void *, size_t)) { @@ -1252,3 +1260,8 @@ return NULL; } + +void flanterm_fb_set_flush_callback(struct flanterm_context *_ctx, void (*flush_callback)(volatile void *address, size_t length)) { + struct flanterm_fb_context *ctx = (void *)_ctx; + ctx->flush_callback = flush_callback; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/flanterm/src/flanterm_backends/fb.h new/limine-10.4.0/flanterm/src/flanterm_backends/fb.h --- old/limine-10.3.2/flanterm/src/flanterm_backends/fb.h 2025-11-23 09:01:58.000000000 +0100 +++ new/limine-10.4.0/flanterm/src/flanterm_backends/fb.h 2025-11-30 01:56:36.000000000 +0100 @@ -61,6 +61,8 @@ size_t margin ); +void flanterm_fb_set_flush_callback(struct flanterm_context *ctx, void (*flush_callback)(volatile void *address, size_t length)); + #ifdef __cplusplus } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/flanterm/src/flanterm_backends/fb_private.h new/limine-10.4.0/flanterm/src/flanterm_backends/fb_private.h --- old/limine-10.3.2/flanterm/src/flanterm_backends/fb_private.h 2025-11-23 09:01:58.000000000 +0100 +++ new/limine-10.4.0/flanterm/src/flanterm_backends/fb_private.h 2025-11-30 01:56:36.000000000 +0100 @@ -55,6 +55,7 @@ struct flanterm_context term; void (*plot_char)(struct flanterm_context *ctx, struct flanterm_fb_char *c, size_t x, size_t y); + void (*flush_callback)(volatile void *address, size_t length); size_t font_width; size_t font_height; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/timestamps new/limine-10.4.0/timestamps --- old/limine-10.3.2/timestamps 2025-11-23 09:01:58.000000000 +0100 +++ new/limine-10.4.0/timestamps 2025-11-30 01:56:37.000000000 +0100 @@ -1,3 +1,3 @@ REGEN_DATE="November 2025" -SOURCE_DATE_EPOCH="1763884445" -SOURCE_DATE_EPOCH_TOUCH="202511230854" +SOURCE_DATE_EPOCH="1764463125" +SOURCE_DATE_EPOCH_TOUCH="202511300138" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-10.3.2/version new/limine-10.4.0/version --- old/limine-10.3.2/version 2025-11-23 09:02:01.000000000 +0100 +++ new/limine-10.4.0/version 2025-11-30 01:56:40.000000000 +0100 @@ -1 +1 @@ -10.3.2 +10.4.0
