]> git.baikalelectronics.ru Git - kernel.git/commit
efi/x86: Avoid using code32_start
authorArvind Sankar <nivedita@alum.mit.edu>
Sun, 8 Mar 2020 08:08:43 +0000 (09:08 +0100)
committerIngo Molnar <mingo@kernel.org>
Sun, 8 Mar 2020 08:58:17 +0000 (09:58 +0100)
commit43d03542ca975f0cb516e34bce6c29661e9394c1
tree357541e3062049db304f4b612d01abc7cb44bddd
parent0d1d36c658340a9bc025b4717a3fc6826cf1f4ec
efi/x86: Avoid using code32_start

code32_start is meant for 16-bit real-mode bootloaders to inform the
kernel where the 32-bit protected mode code starts. Nothing in the
protected mode kernel except the EFI stub uses it.

efi_main() currently returns boot_params, with code32_start set inside it
to tell efi_stub_entry() where startup_32 is located. Since it was invoked
by efi_stub_entry() in the first place, boot_params is already known.
Return the address of startup_32 instead.

This will allow a 64-bit kernel to live above 4Gb, for example, and it's
cleaner as well.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200301230436.2246909-5-nivedita@alum.mit.edu
Link: https://lore.kernel.org/r/20200308080859.21568-13-ardb@kernel.org
arch/x86/boot/compressed/head_32.S
arch/x86/boot/compressed/head_64.S
arch/x86/kernel/asm-offsets.c
drivers/firmware/efi/libstub/x86-stub.c