diff options
-rw-r--r-- | src/boot/efi/linux_x86.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/boot/efi/linux_x86.c b/src/boot/efi/linux_x86.c index 83bd7b2c31..c664abd461 100644 --- a/src/boot/efi/linux_x86.c +++ b/src/boot/efi/linux_x86.c @@ -107,6 +107,10 @@ static void linux_efi_handover(EFI_HANDLE image, uintptr_t kernel, BootParams *p kernel += (params->hdr.setup_sects + 1) * KERNEL_SECTOR_SIZE; /* 32bit entry address. */ + /* Old kernels needs this set, while newer ones seem to ignore this. Note that this gets truncated on + * above 4G boots, which is fine as long as we do not use the value to jump to kernel entry. */ + params->hdr.code32_start = kernel; + #ifdef __x86_64__ kernel += KERNEL_SECTOR_SIZE; /* 64bit entry address. */ #endif |