grub2/grub2-linuxefi-fix-boot-params.patch
Michael Chang 9b87c1a6f8 - Update PowerPC SBAT patches to upstream (bsc#1233730)
* 0007-grub-mkimage-Create-new-ELF-note-for-SBAT.patch
  * 0008-grub-mkimage-Add-SBAT-metadata-into-ELF-note-for-Pow.patch
- Replaced patches
  * 0007-mkimage-create-new-ELF-Note-for-SBAT.patch
  * 0008-mkimage-adding-sbat-data-into-sbat-ELF-Note-on-power.patch

- Fix missing requires in SLE package (bsc#1234264) (bsc#1234272)

OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=526
2024-12-09 03:05:05 +00:00

19 lines
745 B
Diff

--- a/grub-core/loader/i386/efi/linux.c
+++ b/grub-core/loader/i386/efi/linux.c
@@ -298,7 +298,14 @@
lh.code32_start = (grub_uint32_t)(grub_addr_t) kernel_mem;
}
- grub_memcpy(params, &lh, 2 * 512);
+ /* Grub linuxefi erroneously initialize linux's boot_params with non-zero values. (bsc#1025563)
+
+ From https://www.kernel.org/doc/Documentation/x86/boot.txt:
+ The memory for struct boot_params could be allocated anywhere (even above 4G)
+ and initialized to all zero.
+ Then, the setup header at offset 0x01f1 of kernel image on should be
+ loaded into struct boot_params and examined. */
+ grub_memcpy (&params->setup_sects, &lh.setup_sects, sizeof (lh) - 0x01f1);
params->type_of_loader = 0x21;