linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] efi: arm64: add debugfs node to dump UEFI runtime page tables
@ 2016-08-16 12:13 Ard Biesheuvel
  2016-08-19 11:57 ` Matt Fleming
  0 siblings, 1 reply; 2+ messages in thread
From: Ard Biesheuvel @ 2016-08-16 12:13 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
v2: test for CONFIG_ARM64_PTDUMP rather than CONFIG_ARM64
    add Mark's ack

 drivers/firmware/efi/arm-runtime.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c
index c394b81fe452..7ff61749acef 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 = {
 	.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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH v2] efi: arm64: add debugfs node to dump UEFI runtime page tables
  2016-08-16 12:13 [PATCH v2] efi: arm64: add debugfs node to dump UEFI runtime page tables Ard Biesheuvel
@ 2016-08-19 11:57 ` Matt Fleming
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Fleming @ 2016-08-19 11:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 16 Aug, at 02:13:21PM, Ard Biesheuvel wrote:
> 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.
> 
> Acked-by: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> v2: test for CONFIG_ARM64_PTDUMP rather than CONFIG_ARM64
>     add Mark's ack
> 
>  drivers/firmware/efi/arm-runtime.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)

Thanks Ard. Queued up in 'next'.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-19 11:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-16 12:13 [PATCH v2] efi: arm64: add debugfs node to dump UEFI runtime page tables Ard Biesheuvel
2016-08-19 11:57 ` Matt Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).