From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pf1-f194.google.com ([209.85.210.194]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gootn-0002Vz-6E for kexec@lists.infradead.org; Wed, 30 Jan 2019 12:23:25 +0000 Received: by mail-pf1-f194.google.com with SMTP id b85so11349898pfc.3 for ; Wed, 30 Jan 2019 04:23:22 -0800 (PST) From: Bhupesh Sharma Subject: [PATCH] arm64, vmcoreinfo : Append 'MAX_USER_VA_BITS' and 'MAX_PHYSMEM_BITS' to vmcoreinfo Date: Wed, 30 Jan 2019 17:53:11 +0530 Message-Id: <1548850991-11879-1-git-send-email-bhsharma@redhat.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: linux-arm-kernel@lists.infradead.org Cc: Mark Rutland , ard.biesheuvel@linaro.org, catalin.marinas@arm.com, bhsharma@redhat.com, kexec@lists.infradead.org, Will Deacon , AKASHI Takahiro , James Morse , bhupesh.linux@gmail.com With ARMv8.2-LVA and LPA architecture extensions, arm64 hardware which supports these extensions can support upto 52-bit virtual and 52-bit physical addresses respectively. Since at the moment we enable the support of these extensions via CONFIG flags, e.g. - LPA via CONFIG_ARM64_PA_BITS_52 there are no clear mechanisms in user-space right now to deteremine these CONFIG flag values and also determine the PARange and VARange address values. User-space tools like 'makedumpfile' and 'crash-utility' can instead use the 'MAX_USER_VA_BITS' and 'MAX_PHYSMEM_BITS' values to determine the maximum virtual address and physical address (respectively) supported by underlying kernel. A reference 'makedumpfile' implementation which uses this approach to determining the maximum physical address is available in [0]. [0]. https://github.com/bhupesh-sharma/makedumpfile/blob/52-bit-pa-support-via-vmcore-v1/arch/arm64.c#L490 Cc: AKASHI Takahiro Cc: Mark Rutland Cc: Will Deacon Cc: James Morse Signed-off-by: Bhupesh Sharma --- arch/arm64/kernel/crash_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/kernel/crash_core.c b/arch/arm64/kernel/crash_core.c index ca4c3e12d8c5..ad231be5c0d8 100644 --- a/arch/arm64/kernel/crash_core.c +++ b/arch/arm64/kernel/crash_core.c @@ -10,6 +10,8 @@ void arch_crash_save_vmcoreinfo(void) { VMCOREINFO_NUMBER(VA_BITS); + VMCOREINFO_NUMBER(MAX_USER_VA_BITS); + VMCOREINFO_NUMBER(MAX_PHYSMEM_BITS); /* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */ vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n", kimage_voffset); -- 2.7.4 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec