diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-08-16 08:13:21 -0400 |
---|---|---|
committer | Matt Fleming <matt@codeblueprint.co.uk> | 2016-09-09 11:08:51 -0400 |
commit | 9d80448ac92b720512c415265597d349d8b5c3e8 (patch) | |
tree | efafa5259fed5072fc5fa90793dd616babad0681 /drivers/firmware | |
parent | 15cf7cae087a2eaf5e1feeef2bbba1b5a94c7639 (diff) |
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>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/efi/arm-runtime.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c index ae001450545f..7c75a8d9091a 100644 --- a/drivers/firmware/efi/arm-runtime.c +++ b/drivers/firmware/efi/arm-runtime.c | |||
@@ -39,6 +39,26 @@ static struct mm_struct efi_mm = { | |||
39 | .mmlist = LIST_HEAD_INIT(efi_mm.mmlist), | 39 | .mmlist = LIST_HEAD_INIT(efi_mm.mmlist), |
40 | }; | 40 | }; |
41 | 41 | ||
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 | |||
42 | static bool __init efi_virtmap_init(void) | 62 | static bool __init efi_virtmap_init(void) |
43 | { | 63 | { |
44 | efi_memory_desc_t *md; | 64 | efi_memory_desc_t *md; |