Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit ebf5a79

Browse files
committed
x86/efistub: Drop redundant clearing of BSS
As it turns out, clearing the BSS was not the right fix for the issue that was ultimately fixed by commit decd347 ("x86/efistub: Reinstate soft limit for initrd loading"), and given that the Windows EFI loader becomes very unhappy when entered with garbage in BSS, this is one thing that x86 PC EFI implementations can be expected to get right. So drop it from the pure PE entrypoint. The handover protocol entrypoint still needs this - it is used by the flaky distro bootloaders that barely implement PE/COFF at all. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
1 parent fb318ca commit ebf5a79

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/firmware/efi/libstub/x86-stub.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,6 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
541541
efi_status_t status;
542542
char *cmdline_ptr;
543543

544-
if (efi_is_native())
545-
memset(_bss, 0, _ebss - _bss);
546-
547544
efi_system_table = sys_table_arg;
548545

549546
/* Check if we were booted by the EFI firmware */

0 commit comments

Comments
 (0)