Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1480129

[PATCH 23/29] efi/arm64: Add debugfs node to dump UEFI runtime page tables

From Matt Fleming <matt@codeblueprint.co.uk>
Newsgroups linux.kernel
Subject [PATCH 23/29] efi/arm64: Add debugfs node to dump UEFI runtime page tables
Date 2016-09-09 17:30 +0200
Message-ID <sfvUC-4IV-29@gated-at.bofh.it> (permalink)
References <sfvKV-4Fq-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Ard Biesheuvel <ard.biesheuvel@linaro.org>

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 | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

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 = {
 	.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.9.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL 00/29] EFI changes for v4.9 Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 20/29] x86/efi: Map in physical addresses in efi_map_region_fixed Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 27/29] x86/efi: Use kmalloc_array() in efi_call_phys_prolog() Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 04/29] efi: Add efi_memmap_init_late() for permanent EFI memmap Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 12/29] efi/esrt: Use memremap not ioremap to access ESRT table in memory Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 25/29] efi: Add efi_test driver for exporting UEFI runtime service interfaces Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 23/29] efi/arm64: Add debugfs node to dump UEFI runtime page tables Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 08/29] efi: Allow drivers to reserve boot services forever Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 22/29] x86/efi: Remove unused find_bits() function Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 10/29] efi/esrt: Use efi_mem_reserve() and avoid a kmalloc() Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 16/29] efi: Replace runtime services spinlock with semaphore Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 28/29] x86/efi: Optimize away setup_gop32/64 if unused Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 17/29] x86/efi: Initialize status to ensure garbage is not returned on small size Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 18/29] firmware-gsmi: Delete an unnecessary check before the function call "dma_pool_destroy" Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  [PATCH 21/29] fs/efivarfs: Fix double kfree() in error path Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-09 17:30 +0200
  Re: [GIT PULL 00/29] EFI changes for v4.9 Matt Fleming <matt@codeblueprint.co.uk> - 2016-09-12 13:00 +0200
    Re: [GIT PULL 00/29] EFI changes for v4.9 Ingo Molnar <mingo@kernel.org> - 2016-09-12 13:50 +0200
  Re: [GIT PULL 00/29] EFI changes for v4.9 Ingo Molnar <mingo@kernel.org> - 2016-09-13 20:40 +0200

csiph-web