Commit ff38bbba authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

x86/efi/mixed: Factor out and clean up long mode entry



Entering long mode involves setting the EFER_LME and CR4.PAE bits before
enabling paging by setting CR0.PG bit.

It also involves disabling interrupts, given that the firmware's 32-bit
IDT becomes invalid as soon as the CPU transitions into long mode.

Reloading the CR3 register is not necessary at boot time, given that the
EFI firmware as well as the kernel's EFI stub use a 1:1 mapping of the
32-bit addressable memory in the system.

Break out this code into a separate helper for clarity, and so that it
can be reused in a subsequent patch.

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