Commit 6e2da8d8 authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

x86/efi/mixed: Remove dependency on legacy startup_32 code



The EFI mixed mode startup code calls into startup_32 in the legacy
decompressor with a mocked up boot_params struct, only to get it to set
up the 1:1 mapping of the lower 4 GiB of memory and switch to a GDT that
supports 64-bit mode.

In order to be able to reuse the EFI mixed mode startup code in EFI
zboot images, which do not incorporate the legacy decompressor code,
decouple it, by dealing with the GDT and IDT directly.

Doing so makes it possible to construct a GDT that is compatible with
the one the firmware uses, with one additional entry for a 64-bit mode
code segment appended. This removes the need entirely to switch between
GDTs and IDTs or data segment selector values and all of this code can
be removed.

Acked-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent d545e182
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment