Skip to content

Commit 9d80448

Browse files
Ard Biesheuvelmfleming
authored andcommitted
efi/arm64: Add debugfs node to dump UEFI runtime page tables
Register the debugfs node 'efi_page_tables' to allow the UEFI runtime page tables to be inspected. Note that ARM does not have 'asm/ptdump.h' [yet] so for now, this is arm64 only. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
1 parent 15cf7ca commit 9d80448

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

drivers/firmware/efi/arm-runtime.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,26 @@ static struct mm_struct efi_mm = {
3939
.mmlist = LIST_HEAD_INIT(efi_mm.mmlist),
4040
};
4141

42+
#ifdef CONFIG_ARM64_PTDUMP
43+
#include <asm/ptdump.h>
44+
45+
static struct ptdump_info efi_ptdump_info = {
46+
.mm = &efi_mm,
47+
.markers = (struct addr_marker[]){
48+
{ 0, "UEFI runtime start" },
49+
{ TASK_SIZE_64, "UEFI runtime end" }
50+
},
51+
.base_addr = 0,
52+
};
53+
54+
static int __init ptdump_init(void)
55+
{
56+
return ptdump_register(&efi_ptdump_info, "efi_page_tables");
57+
}
58+
device_initcall(ptdump_init);
59+
60+
#endif
61+
4262
static bool __init efi_virtmap_init(void)
4363
{
4464
efi_memory_desc_t *md;

0 commit comments

Comments
 (0)