]> git.karo-electronics.de Git - linux-beck.git/commitdiff
efi/arm64: Add debugfs node to dump UEFI runtime page tables
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 16 Aug 2016 12:13:21 +0000 (14:13 +0200)
committerMatt Fleming <matt@codeblueprint.co.uk>
Fri, 9 Sep 2016 15:08:51 +0000 (16:08 +0100)
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>
drivers/firmware/efi/arm-runtime.c

index ae001450545f32de92c516a8036ca218dd46c57d..7c75a8d9091a2be575c9b4bb2a63b88395818577 100644 (file)
@@ -39,6 +39,26 @@ static struct mm_struct efi_mm = {
        .mmlist                 = LIST_HEAD_INIT(efi_mm.mmlist),
 };
 
+#ifdef CONFIG_ARM64_PTDUMP
+#include <asm/ptdump.h>
+
+static struct ptdump_info efi_ptdump_info = {
+       .mm             = &efi_mm,
+       .markers        = (struct addr_marker[]){
+               { 0,            "UEFI runtime start" },
+               { TASK_SIZE_64, "UEFI runtime end" }
+       },
+       .base_addr      = 0,
+};
+
+static int __init ptdump_init(void)
+{
+       return ptdump_register(&efi_ptdump_info, "efi_page_tables");
+}
+device_initcall(ptdump_init);
+
+#endif
+
 static bool __init efi_virtmap_init(void)
 {
        efi_memory_desc_t *md;