x86/efi: Dump the EFI page table
This is very useful for debugging issues with the recently added pagetable switching code for EFI virtual mode. Signed-off-by: Borislav Petkov <bp@suse.de> Tested-by: Toshi Kani <toshi.kani@hp.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Dieser Commit ist enthalten in:

committet von
Matt Fleming

Ursprung
ef6bea6ddf
Commit
11cc851254
@@ -1021,6 +1021,7 @@ void __init efi_enter_virtual_mode(void)
|
||||
|
||||
efi_setup_page_tables();
|
||||
efi_sync_low_kernel_mappings();
|
||||
efi_dump_pagetable();
|
||||
|
||||
if (!efi_setup) {
|
||||
status = phys_efi_set_virtual_address_map(
|
||||
|
@@ -41,6 +41,7 @@ static unsigned long efi_rt_eflags;
|
||||
|
||||
void efi_sync_low_kernel_mappings(void) {}
|
||||
void efi_setup_page_tables(void) {}
|
||||
void __init efi_dump_pagetable(void) {}
|
||||
|
||||
void __init efi_map_region(efi_memory_desc_t *md)
|
||||
{
|
||||
|
@@ -242,3 +242,12 @@ void __init efi_runtime_mkexec(void)
|
||||
if (__supported_pte_mask & _PAGE_NX)
|
||||
runtime_code_page_mkexec();
|
||||
}
|
||||
|
||||
void __init efi_dump_pagetable(void)
|
||||
{
|
||||
#ifdef CONFIG_EFI_PGT_DUMP
|
||||
pgd_t *pgd = (pgd_t *)__va(real_mode_header->trampoline_pgd);
|
||||
|
||||
ptdump_walk_pgd_level(NULL, pgd);
|
||||
#endif
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren