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-05-08 18:22:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/limine (Old) and /work/SRC/openSUSE:Factory/.limine.new.30101 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "limine" Thu May 8 18:22:11 2025 rev:5 rq:1275311 version:9.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/limine/limine.changes 2025-04-20 20:02:11.330477310 +0200 +++ /work/SRC/openSUSE:Factory/.limine.new.30101/limine.changes 2025-05-08 18:24:48.124033523 +0200 @@ -1,0 +2,10 @@ +Wed May 7 15:19:40 UTC 2025 - Marvin Friedrich <cont...@marvinf.com> + +- Update to 9.3.0: + * Add optional support for the 64-bit x86-64 boot protocol for Linux. + * Fix away some ungraceful handling of out-of-memory situations when + loading files using the Linux boot protocol. + * Improve performance and memory usage of loading modules for the + Linux boot protocol. + +------------------------------------------------------------------- Old: ---- limine-9.2.3.tar.gz New: ---- limine-9.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ limine.spec ++++++ --- /var/tmp/diff_new_pack.LjplNv/_old 2025-05-08 18:24:48.528050376 +0200 +++ /var/tmp/diff_new_pack.LjplNv/_new 2025-05-08 18:24:48.528050376 +0200 @@ -15,7 +15,7 @@ # Name: limine -Version: 9.2.3 +Version: 9.3.0 Release: 0 Summary: Modern, advanced, portable, multiprotocol bootloader and boot manager License: BSD-2-Clause ++++++ limine-9.2.3.tar.gz -> limine-9.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-9.2.3/ChangeLog new/limine-9.3.0/ChangeLog --- old/limine-9.2.3/ChangeLog 2025-04-12 21:47:46.000000000 +0200 +++ new/limine-9.3.0/ChangeLog 2025-05-07 03:35:55.000000000 +0200 @@ -1,3 +1,25 @@ +2025-05-07 Mintsuki <mints...@protonmail.com> + + *** Release 9.3.0 *** + + Noteworthy changes compared to the previous release, 9.2.3: + + New features: + - Add optional support for the 64-bit x86-64 boot protocol for Linux. + This is supported on the UEFI/x86-64 port of Limine, and it is + preferred over the 32-bit boot protocol if supported by the given + kernel. This helps with loading larger modules on certain systems + with low amounts of low memory which would otherwise panic. + + Bug fixes: + - Fix away some ungraceful handling of out-of-memory situations when + loading files using the Linux boot protocol. Make into panics instead + of crashes or hangs. + + Miscellaneous: + - Improve performance and memory usage of loading modules for the Linux + boot protocol. + 2025-04-12 Mintsuki <mints...@protonmail.com> *** Release 9.2.3 *** Binary files old/limine-9.2.3/build-aux/freestanding-toolchain/.git/index and new/limine-9.3.0/build-aux/freestanding-toolchain/.git/index differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-9.2.3/build-aux/freestanding-toolchain/.git/logs/HEAD new/limine-9.3.0/build-aux/freestanding-toolchain/.git/logs/HEAD --- old/limine-9.2.3/build-aux/freestanding-toolchain/.git/logs/HEAD 2025-04-12 21:47:49.000000000 +0200 +++ new/limine-9.3.0/build-aux/freestanding-toolchain/.git/logs/HEAD 2025-05-07 03:35:57.000000000 +0200 @@ -1,2 +1,2 @@ -0000000000000000000000000000000000000000 b285931385edc926decab5c69934af5c045bd2dd Mintsuki <mints...@protonmail.com> 1744487269 +0000 clone: from https://codeberg.org/osdev/freestanding-toolchain.git -b285931385edc926decab5c69934af5c045bd2dd b285931385edc926decab5c69934af5c045bd2dd Mintsuki <mints...@protonmail.com> 1744487269 +0000 checkout: moving from trunk to b285931385edc926decab5c69934af5c045bd2dd +0000000000000000000000000000000000000000 b285931385edc926decab5c69934af5c045bd2dd Mintsuki <mints...@protonmail.com> 1746581757 +0000 clone: from https://codeberg.org/osdev/freestanding-toolchain.git +b285931385edc926decab5c69934af5c045bd2dd b285931385edc926decab5c69934af5c045bd2dd Mintsuki <mints...@protonmail.com> 1746581757 +0000 checkout: moving from trunk to b285931385edc926decab5c69934af5c045bd2dd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-9.2.3/build-aux/freestanding-toolchain/.git/logs/refs/heads/trunk new/limine-9.3.0/build-aux/freestanding-toolchain/.git/logs/refs/heads/trunk --- old/limine-9.2.3/build-aux/freestanding-toolchain/.git/logs/refs/heads/trunk 2025-04-12 21:47:49.000000000 +0200 +++ new/limine-9.3.0/build-aux/freestanding-toolchain/.git/logs/refs/heads/trunk 2025-05-07 03:35:57.000000000 +0200 @@ -1 +1 @@ -0000000000000000000000000000000000000000 b285931385edc926decab5c69934af5c045bd2dd Mintsuki <mints...@protonmail.com> 1744487269 +0000 clone: from https://codeberg.org/osdev/freestanding-toolchain.git +0000000000000000000000000000000000000000 b285931385edc926decab5c69934af5c045bd2dd Mintsuki <mints...@protonmail.com> 1746581757 +0000 clone: from https://codeberg.org/osdev/freestanding-toolchain.git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-9.2.3/build-aux/freestanding-toolchain/.git/logs/refs/remotes/origin/HEAD new/limine-9.3.0/build-aux/freestanding-toolchain/.git/logs/refs/remotes/origin/HEAD --- old/limine-9.2.3/build-aux/freestanding-toolchain/.git/logs/refs/remotes/origin/HEAD 2025-04-12 21:47:49.000000000 +0200 +++ new/limine-9.3.0/build-aux/freestanding-toolchain/.git/logs/refs/remotes/origin/HEAD 2025-05-07 03:35:57.000000000 +0200 @@ -1 +1 @@ -0000000000000000000000000000000000000000 b285931385edc926decab5c69934af5c045bd2dd Mintsuki <mints...@protonmail.com> 1744487269 +0000 clone: from https://codeberg.org/osdev/freestanding-toolchain.git +0000000000000000000000000000000000000000 b285931385edc926decab5c69934af5c045bd2dd Mintsuki <mints...@protonmail.com> 1746581757 +0000 clone: from https://codeberg.org/osdev/freestanding-toolchain.git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-9.2.3/common/fs/file.s2.c new/limine-9.3.0/common/fs/file.s2.c --- old/limine-9.2.3/common/fs/file.s2.c 2025-04-12 21:47:46.000000000 +0200 +++ new/limine-9.3.0/common/fs/file.s2.c 2025-05-07 03:35:55.000000000 +0200 @@ -117,7 +117,18 @@ #endif return fd->fd; } +#if defined (UEFI) && defined (__x86_64__) + if (!allow_high_allocs && (uintptr_t)fd->fd >= 0x100000000) { + void *newptr = ext_mem_alloc_type(fd->size, type); + memcpy(newptr, fd->fd, fd->size); + pmm_free(fd->fd, fd->size); + fd->fd = newptr; + } else { +#endif memmap_alloc_range((uint64_t)(size_t)fd->fd, ALIGN_UP(fd->size, 4096), type, 0, true, false, false); +#if defined (UEFI) && defined (__x86_64__) + } +#endif fd->readall = true; #if defined (__i386__) if (allow_high_allocs == true) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-9.2.3/common/lib/uri.c new/limine-9.3.0/common/lib/uri.c --- old/limine-9.2.3/common/lib/uri.c 2025-04-12 21:47:46.000000000 +0200 +++ new/limine-9.3.0/common/lib/uri.c 2025-05-07 03:35:55.000000000 +0200 @@ -238,7 +238,11 @@ if (hash != NULL && ret != NULL) { uint8_t out_buf[BLAKE2B_OUT_BYTES]; +#if defined (UEFI) && defined (__x86_64__) + void *file_buf = freadall_mode(ret, MEMMAP_BOOTLOADER_RECLAIMABLE, true); +#else void *file_buf = freadall(ret, MEMMAP_BOOTLOADER_RECLAIMABLE); +#endif blake2b(out_buf, file_buf, ret->size); uint8_t hash_buf[BLAKE2B_OUT_BYTES]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-9.2.3/common/protos/linux.c new/limine-9.3.0/common/protos/linux.c --- old/limine-9.2.3/common/protos/linux.c 2025-04-12 21:47:46.000000000 +0200 +++ new/limine-9.3.0/common/protos/linux.c 2025-05-07 03:35:55.000000000 +0200 @@ -21,6 +21,9 @@ #include <drivers/gop.h> noreturn void linux_spinup(void *entry, void *boot_params); +#if defined (UEFI) && defined (__x86_64__) + noreturn void linux_spinup64(void *entry, void *boot_params); +#endif // The following definitions and struct were copied and adapted from Linux // kernel headers released under GPL-2.0 WITH Linux-syscall-note @@ -368,8 +371,13 @@ MEMMAP_BOOTLOADER_RECLAIMABLE, MEMMAP_USABLE, false, false, false)) break; + if (kernel_load_addr == 0xfff00000) { + panic(true, "linux: Failed to allocate memory for kernel"); + } + kernel_load_addr += 0x100000; } + fread(kernel_file, (void *)kernel_load_addr, real_mode_code_size, kernel_file->size - real_mode_code_size); fclose(kernel_file); @@ -377,57 +385,93 @@ /////////////////////////////////////// // Modules /////////////////////////////////////// + size_t size_of_all_modules = 0; - uint32_t modules_mem_base = setup_header->initrd_addr_max; - if (modules_mem_base == 0) - modules_mem_base = 0x38000000; + size_t module_count; + for (module_count = 0; ; module_count++) { + char *module_path = config_get_value(config, module_count, "MODULE_PATH"); + if (module_path == NULL) + break; + } - size_t size_of_all_modules = 0; + struct file_handle **modules = ext_mem_alloc(module_count * sizeof(struct file_handle *)); for (size_t i = 0; ; i++) { char *module_path = config_get_value(config, i, "MODULE_PATH"); if (module_path == NULL) break; + print("linux: Loading module `%#`...\n", module_path); + struct file_handle *module; if ((module = uri_open(module_path)) == NULL) panic(true, "linux: Failed to open module with path `%s`. Is the path correct?", module_path); size_of_all_modules += module->size; - fclose(module); + modules[i] = module; + } + + uintptr_t modules_mem_base; + +#if defined (UEFI) && defined (__x86_64__) + if ((setup_header->xloadflags & 3) == 3) { + modules_mem_base = (uintptr_t)ext_mem_alloc_type_aligned_mode( + size_of_all_modules, + MEMMAP_BOOTLOADER_RECLAIMABLE, + 0x100000, + true + ); + } else { +#endif + if (setup_header->version <= 0x202 || setup_header->initrd_addr_max == 0) { + modules_mem_base = 0x38000000; + } else { + modules_mem_base = setup_header->initrd_addr_max + 1; } modules_mem_base -= size_of_all_modules; - modules_mem_base = ALIGN_DOWN(modules_mem_base, 4096); + modules_mem_base = ALIGN_DOWN(modules_mem_base, 0x100000); for (;;) { - if (memmap_alloc_range(modules_mem_base, ALIGN_UP(size_of_all_modules, 4096), + if (modules_mem_base < 0x100000) { + panic(true, "linux: Failed to allocate memory for modules"); + } + + if (memmap_alloc_range(modules_mem_base, ALIGN_UP(size_of_all_modules, 0x100000), MEMMAP_BOOTLOADER_RECLAIMABLE, MEMMAP_USABLE, false, false, false)) break; - modules_mem_base -= 4096; + + modules_mem_base -= 0x100000; } +#if defined (UEFI) && defined (__x86_64__) + } +#endif - size_t _modules_mem_base = modules_mem_base; + uintptr_t _modules_mem_base = modules_mem_base; for (size_t i = 0; ; i++) { char *module_path = config_get_value(config, i, "MODULE_PATH"); if (module_path == NULL) break; - print("linux: Loading module `%#`...\n", module_path); + fread(modules[i], (void *)_modules_mem_base, 0, modules[i]->size); - struct file_handle *module; - if ((module = uri_open(module_path)) == NULL) - panic(true, "linux: Could not open `%#`", module_path); - - fread(module, (void *)_modules_mem_base, 0, module->size); + _modules_mem_base += modules[i]->size; - _modules_mem_base += module->size; + fclose(modules[i]); } + pmm_free(modules, module_count * sizeof(struct file_handle *)); + if (size_of_all_modules != 0) { setup_header->ramdisk_image = (uint32_t)modules_mem_base; - setup_header->ramdisk_size = (uint32_t)size_of_all_modules; +#if defined (UEFI) && defined (__x86_64__) + boot_params->ext_ramdisk_image = (uint32_t)(modules_mem_base >> 32); +#endif + setup_header->ramdisk_size = (uint32_t)size_of_all_modules; +#if defined (UEFI) && defined (__x86_64__) + boot_params->ext_ramdisk_size = (uint32_t)(size_of_all_modules >> 32); +#endif } /////////////////////////////////////// @@ -559,6 +603,13 @@ irq_flush_type = IRQ_PIC_ONLY_FLUSH; +#if defined (UEFI) && defined (__x86_64__) + if ((setup_header->xloadflags & 3) == 3) { + flush_irqs(); + linux_spinup64((void *)kernel_load_addr + 0x200, boot_params); + } +#endif + common_spinup(linux_spinup, 2, (uint32_t)kernel_load_addr, (uint32_t)(uintptr_t)boot_params); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-9.2.3/common/protos/linux_64.asm_uefi_x86_64 new/limine-9.3.0/common/protos/linux_64.asm_uefi_x86_64 --- old/limine-9.2.3/common/protos/linux_64.asm_uefi_x86_64 1970-01-01 01:00:00.000000000 +0100 +++ new/limine-9.3.0/common/protos/linux_64.asm_uefi_x86_64 2025-05-07 03:35:55.000000000 +0200 @@ -0,0 +1,62 @@ +section .data + +align 16 +linux_gdt64: + dq 0 + + dq 0 + + dw 0xffff + dw 0x0000 + db 0x00 + db 10011011b + db 10101111b + db 0x00 + + dw 0xffff + dw 0x0000 + db 0x00 + db 10010011b + db 10001111b + db 0x00 + + .end: + +align 16 +linux_gdt64_ptr: + dw (linux_gdt64.end - linux_gdt64) - 1 + dq linux_gdt64 + +section .text + +bits 64 + +global linux_spinup64 +linux_spinup64: + cli + cld + + lgdt [rel linux_gdt64_ptr] + + lea rbx, [rel .fj] + push 0x10 + push rbx + retfq + + .fj: + mov eax, 0x18 + mov ds, eax + mov es, eax + mov fs, eax + mov gs, eax + mov ss, eax + + mov rax, rdi + + xor ebp, ebp + xor edi, edi + xor ebx, ebx + + jmp rax + +section .note.GNU-stack noalloc noexec nowrite progbits diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-9.2.3/configure new/limine-9.3.0/configure --- old/limine-9.2.3/configure 2025-04-12 21:47:55.000000000 +0200 +++ new/limine-9.3.0/configure 2025-05-07 03:36:03.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for Limine 9.2.3. +# Generated by GNU Autoconf 2.72 for Limine 9.3.0. # # Report bugs to <https://github.com/limine-bootloader/limine/issues>. # @@ -605,8 +605,8 @@ # Identity of this package. PACKAGE_NAME='Limine' PACKAGE_TARNAME='limine' -PACKAGE_VERSION='9.2.3' -PACKAGE_STRING='Limine 9.2.3' +PACKAGE_VERSION='9.3.0' +PACKAGE_STRING='Limine 9.3.0' PACKAGE_BUGREPORT='https://github.com/limine-bootloader/limine/issues' PACKAGE_URL='https://limine-bootloader.org/' @@ -1320,7 +1320,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 9.2.3 to adapt to many kinds of systems. +'configure' configures Limine 9.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1386,7 +1386,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Limine 9.2.3:";; + short | recursive ) echo "Configuration of Limine 9.3.0:";; esac cat <<\_ACEOF @@ -1505,7 +1505,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Limine configure 9.2.3 +Limine configure 9.3.0 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -1617,7 +1617,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 9.2.3, which was +It was created by Limine $as_me 9.3.0, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -5156,7 +5156,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 9.2.3, which was +This file was extended by Limine $as_me 9.3.0, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5212,7 +5212,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Limine config.status 9.2.3 +Limine config.status 9.3.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-9.2.3/timestamps new/limine-9.3.0/timestamps --- old/limine-9.2.3/timestamps 2025-04-12 21:47:53.000000000 +0200 +++ new/limine-9.3.0/timestamps 2025-05-07 03:36:01.000000000 +0200 @@ -1,3 +1,3 @@ -REGEN_DATE="April 2025" -SOURCE_DATE_EPOCH="1744486866" -SOURCE_DATE_EPOCH_TOUCH="202504122141" +REGEN_DATE="May 2025" +SOURCE_DATE_EPOCH="1746581421" +SOURCE_DATE_EPOCH_TOUCH="202505070330" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/limine-9.2.3/version new/limine-9.3.0/version --- old/limine-9.2.3/version 2025-04-12 21:47:56.000000000 +0200 +++ new/limine-9.3.0/version 2025-05-07 03:36:03.000000000 +0200 @@ -1 +1 @@ -9.2.3 +9.3.0