From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3CEADC4332F for ; Tue, 22 Nov 2022 17:07:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=a7BQHzQ0J9tA0HQPo3jrggAtJfglMWmUBH1zBt6MRog=; b=Sr8YUK4HvMS7x1 OcUxmUyQqfO8+QzYqMkGiCpS7GknWtPYzvmXKMStRUswdu3jsPXVjUX+ZvuEqYn33hKfguLeWpUH/ hYEy8mkMPCjOWDyihJbin0K6BP5RHmeR/JGSZwiNUUEoqbqYQtc244rP+EI9UnnRpm/t+ocWnCTN6 TAvbpAo6lELzkpOAlCYTtIlfRATfmRIljhkriY9It3TH70EBPALeqXLBrh1b2vpai5XQ1CMluGuxP RcMVtq5Y36fjQQI7t7nmz087sYQPeyl6KUvlPSLBP29e3TY+CugbjqhDWXLr6wOsfvcTppibbNWSX vqMbv+aekfpqweAGpzSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxWik-00AwbM-RI; Tue, 22 Nov 2022 17:06:07 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxWif-00AwZG-AM for linux-arm-kernel@lists.infradead.org; Tue, 22 Nov 2022 17:06:02 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AE1621FB; Tue, 22 Nov 2022 09:06:05 -0800 (PST) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.32.179]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 82F8C3F73D; Tue, 22 Nov 2022 09:05:58 -0800 (PST) Date: Tue, 22 Nov 2022 17:05:55 +0000 From: Mark Rutland To: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org, will@kernel.org, catalin.marinas@arm.com Subject: Re: [PATCH] arm64: booting: Require placement within 48-bit addressable memory Message-ID: References: <20221122170249.2453853-1-ardb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221122170249.2453853-1-ardb@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221122_090601_444326_104E9A62 X-CRM114-Status: GOOD ( 21.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Nov 22, 2022 at 06:02:49PM +0100, Ard Biesheuvel wrote: > Some configurations (i.e., 64k + LVA/LPA) can tolerate a physical > placement of the kernel image outside of the 48-bit addressable region, > but given that the loader has no way of knowing whether or not the image > in question supports LVA/LPA, it currently has no choice but to place it > below the 48-bit mark. > > Once we add support for LPA2, which allows 52-bit physical and virtual > addressing when using 4k or 16k pages, but in way that relies on > increasing the number of paging levels, there will be more variety in > the configurations that may or may not support this. > > So redefine bit #3 in the Image header as 'must be placed within 48-bit > addressable memory', as this is the current de facto meaning. > > Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland Thanks for the respin! Mark. > --- > Documentation/arm64/booting.rst | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/Documentation/arm64/booting.rst b/Documentation/arm64/booting.rst > index 8c324ad638de2b27..5a764fabfea821f0 100644 > --- a/Documentation/arm64/booting.rst > +++ b/Documentation/arm64/booting.rst > @@ -121,8 +121,9 @@ Header notes: > to the base of DRAM, since memory below it is not > accessible via the linear mapping > 1 > - 2MB aligned base may be anywhere in physical > - memory > + 2MB aligned base such that all image_size bytes > + counted from the start of the image are within > + the 48-bit addressable range of physical memory > Bits 4-63 Reserved. > ============= =============================================================== > > -- > 2.35.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel