// SPDX-License-Identifier: GPL-2.0-only #include <linux/efi.h> #include <asm/boot.h> #include <asm/desc.h> #include <asm/efi.h> #include "efistub.h" #include "x86-stub.h" bool efi_no5lvl; static void (*la57_toggle)(void *cr3); static const struct desc_struct gdt[] = …; /* * Enabling (or disabling) 5 level paging is tricky, because it can only be * done from 32-bit mode with paging disabled. This means not only that the * code itself must be running from 32-bit addressable physical memory, but * also that the root page table must be 32-bit addressable, as programming * a 64-bit value into CR3 when running in 32-bit mode is not supported. */ efi_status_t efi_setup_5level_paging(void) { … } void efi_5level_switch(void) { … }