Lines Matching +full:page +full:- +full:based
1 // SPDX-License-Identifier: GPL-2.0
41 * This code is based on reserve_bios_regions().
48 * Only look for values in the legacy ROM for non-EFI system.
50 signature = (char *)&boot_params_ptr->efi_info.efi_loader_signature;
66 for (i = boot_params_ptr->e820_entries - 1; i >= 0; i--) {
69 entry = &boot_params_ptr->e820_table[i];
72 if (bios_start <= entry->addr)
75 /* Skip non-RAM entries. */
76 if (entry->type != E820_TYPE_RAM)
80 if (bios_start > entry->addr + entry->size)
81 new = entry->addr + entry->size;
83 /* Keep bios_start page-aligned. */
87 if (new - TRAMPOLINE_32BIT_SIZE < entry->addr)
91 if (new - TRAMPOLINE_32BIT_SIZE > bios_start)
99 return bios_start - TRAMPOLINE_32BIT_SIZE;
115 * - if user asked to disable 5-level paging: no5lvl in cmdline
116 * - if the machine supports 5-level paging:
124 /* Initialize variables for 5-level paging */
151 * Avoid the need for a stack in the 32-bit trampoline code, by using
153 * immediate absolute address, which needs to be adjusted based on the
160 * The code below prepares page table in trampoline memory.
162 * The new page table will be used by trampoline code for switching
163 * from 4- to 5-level paging or vice versa.
168 * For 4- to 5-level paging transition, set up current CR3 as
169 * the first and the only entry in a new top-level page table.
176 * For 5- to 4-level paging transition, copy page table pointed
177 * by first entry in the current top-level page table as our
178 * new top-level page table.
180 * We cannot just point to the page table from trampoline as it
190 * Move the top level page table out of trampoline memory.