From patchwork Thu Jun 30 10:01:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 71229 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp306721qgy; Thu, 30 Jun 2016 03:03:41 -0700 (PDT) X-Received: by 10.67.23.197 with SMTP id ic5mr19671966pad.127.1467281020255; Thu, 30 Jun 2016 03:03:40 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id x72si3803667pff.224.2016.06.30.03.03.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jun 2016 03:03:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIYnY-00033X-OG; Thu, 30 Jun 2016 10:02:16 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIYnU-0002yg-Ry for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2016 10:02:14 +0000 Received: by mail-wm0-x235.google.com with SMTP id a66so110692482wme.0 for ; Thu, 30 Jun 2016 03:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=8PJdstl1pIms0IGpc9VA0pA/BLIUjnbGUvjfXyUyOfU=; b=EbJ3toB1oUuBzk25TKsn4CPy+gcf9h1eeC+CTh2TCVu3OQRfUPAzESWA4JkBRxoB8N ClPPmdjrLwb5TVe1Xc+ZX1bjzD/Gx+E6K/HFF2ITmftF3VwcDPM37tamLYKEZBuis8/b B/gG/Hr2bO5SjqOIkG8Vdzml1F9cq4JKzAlP8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8PJdstl1pIms0IGpc9VA0pA/BLIUjnbGUvjfXyUyOfU=; b=JDukLgGMZjME++uoeTcS8/Juqf3ZaMrNcjdHA2UGH/CFJZcO0K0w+FEef/elwu1hWg /N5WUFMLSM2+/+ydViJXhyxkKYXzjwPUrKAaoIzYeoAFDrumzyLwZDNRWX8uRAPmw8cf cDEfY/eOnjO+FYMN1RhgpadwcT/seyowWhqFrSy04mFHKUOcAUjez5UdXfdRpffXQtzS CVocpKOnlgH1rMMpKFZp1rFbDau+4vmKXLDbOGCBssqND9TANguKxzUkHLHKMFjbhGF4 atHshm9ta1EybYoADIf0f1gu2ruBYpXPzmrejlwWrqO2qnXb2iBhergdJ4uYw+lIddgH nvfA== X-Gm-Message-State: ALyK8tLEgyKa9d9AxVIfGbf3IXCRick4mdzFB+nEzpGJAvzGDn1LB0buwe3gRLJI6MVkG6u9 X-Received: by 10.28.220.6 with SMTP id t6mr14096137wmg.42.1467280910229; Thu, 30 Jun 2016 03:01:50 -0700 (PDT) Received: from localhost.localdomain ([188.203.148.129]) by smtp.gmail.com with ESMTPSA id a84sm2311997wma.0.2016.06.30.03.01.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Jun 2016 03:01:49 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com, matt@codeblueprint.co.uk Subject: [PATCH] efi: arm64: add debugfs node to dump UEFI runtime page tables Date: Thu, 30 Jun 2016 12:01:46 +0200 Message-Id: <1467280906-31158-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160630_030213_225557_684498BB X-CRM114-Status: GOOD ( 11.33 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:235 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.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 --- This patch could be helpful in assessing the series 'arm64: avoid block entries that we need to split later' that I sent out yesterday. drivers/firmware/efi/arm-runtime.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel Acked-by: Mark Rutland diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c index 17ccf0a8787a..4197a1da013d 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 +#include + +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;