ARM: 9255/1: efi/dump UEFI runtime page tables for ARM
authorWang Kefeng <wangkefeng.wang@huawei.com>
Tue, 11 Oct 2022 01:35:07 +0000 (02:35 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 7 Nov 2022 14:19:01 +0000 (14:19 +0000)
UEFI runtime page tables dump only for ARM64 at present,
but ARM support EFI and ARM_PTDUMP_DEBUGFS now. Since
ARM could potentially execute with a 1G/3G user/kernel
split, choosing 1G as the upper limit for UEFI runtime
end, with this, we could enable UEFI runtime page tables
on ARM.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/include/asm/ptdump.h
arch/arm64/include/asm/ptdump.h
drivers/firmware/efi/arm-runtime.c

index 0c2d3d0d4cc69594226a97df936cdde1fbc10cd7..aad1d034136cea4f31cb9316ae2cdb9b24adaf20 100644 (file)
@@ -21,6 +21,7 @@ struct ptdump_info {
 
 void ptdump_walk_pgd(struct seq_file *s, struct ptdump_info *info);
 #ifdef CONFIG_ARM_PTDUMP_DEBUGFS
+#define EFI_RUNTIME_MAP_END    SZ_1G
 void ptdump_debugfs_register(struct ptdump_info *info, const char *name);
 #else
 static inline void ptdump_debugfs_register(struct ptdump_info *info,
index b1dd7ecff7efb4a3b1edcf954bb3368080d9bb48..581caac525b03affb45808198bce14be5d7a13fa 100644 (file)
@@ -23,6 +23,7 @@ struct ptdump_info {
 
 void ptdump_walk(struct seq_file *s, struct ptdump_info *info);
 #ifdef CONFIG_PTDUMP_DEBUGFS
+#define EFI_RUNTIME_MAP_END    DEFAULT_MAP_WINDOW_64
 void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name);
 #else
 static inline void ptdump_debugfs_register(struct ptdump_info *info,
index 3359ae2adf24ba93ba8511f79bfc5ba1198d63ef..8f8ae479061be3544f3ce8bd2afe3a6dda20433e 100644 (file)
 #include <asm/mmu.h>
 #include <asm/pgalloc.h>
 
-#if defined(CONFIG_PTDUMP_DEBUGFS) && defined(CONFIG_ARM64)
+#if defined(CONFIG_PTDUMP_DEBUGFS) || defined(CONFIG_ARM_PTDUMP_DEBUGFS)
 #include <asm/ptdump.h>
 
 static struct ptdump_info efi_ptdump_info = {
        .mm             = &efi_mm,
        .markers        = (struct addr_marker[]){
                { 0,                            "UEFI runtime start" },
-               { DEFAULT_MAP_WINDOW_64,        "UEFI runtime end" },
+               { EFI_RUNTIME_MAP_END,          "UEFI runtime end" },
                { -1,                           NULL }
        },
        .base_addr      = 0,