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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47EAEC433EF for ; Tue, 28 Sep 2021 00:20:08 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 97F38611CE for ; Tue, 28 Sep 2021 00:20:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 97F38611CE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HJKs21GBMz2ymP for ; Tue, 28 Sep 2021 10:20:06 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=WY0WSjfK; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ellerman.id.au (client-ip=150.107.74.76; helo=gandalf.ozlabs.org; envelope-from=mpe@ellerman.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=WY0WSjfK; dkim-atps=neutral Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HJKrM0BdTz2xWf for ; Tue, 28 Sep 2021 10:19:30 +1000 (AEST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4HJKrJ5M3zz4xLs; Tue, 28 Sep 2021 10:19:28 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1632788368; bh=mIwKTL/6vQf6UwYRTbvOgxIEqEcbaxe7nzUDzD7ufKk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WY0WSjfKEYV81l5c4MWdMF3j3Y/k5/zK/IffwOYcBARS5Iupu3Connde/bNmIDjee MTscRq5RVYLAcr/uJOiXlIp5qEsHZSHFqpeNoy1cF5oO1kN38XiCMbvMLOxEaDT4oZ kPH8eGG38SPEZ8l8fLYVT7d4UcWTtvYVOJv1pXtUa/FEOQrSEP+NSDpo2JsoVkz9fm TyVoxuMM5nwXiFJnr7yOW2JGsNgGvrFbTtQVnxGyQ2hLTdb+y4EMLmGe2n78StUyB2 gp91MY21/yF1KPXSFDUoPj4q5lVPlkkiqOzTZqPm/lepPlkkEvL9ts+9H9R6fhcDBX B6ILLbR+5x6kg== From: Michael Ellerman To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras Subject: Re: [PATCH] powerpc/40x: Map 32Mbytes of memory at startup In-Reply-To: References: Date: Tue, 28 Sep 2021 10:19:28 +1000 Message-ID: <87mtnx1rhr.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cp , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Christophe Leroy writes: > As reported by Carlo, 16Mbytes is not enough with modern kernels > that tend to be a bit big, so map another 16M page at boot. I guess we're not expecting systems with less than 32MB, so making it unconditional is OK? cheers > diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S > index 7d72ee5ab387..5fce4680d2d3 100644 > --- a/arch/powerpc/kernel/head_40x.S > +++ b/arch/powerpc/kernel/head_40x.S > @@ -650,7 +650,7 @@ start_here: > b . /* prevent prefetch past rfi */ > > /* Set up the initial MMU state so we can do the first level of > - * kernel initialization. This maps the first 16 MBytes of memory 1:1 > + * kernel initialization. This maps the first 32 MBytes of memory 1:1 > * virtual to physical and more importantly sets the cache mode. > */ > initial_mmu: > @@ -687,6 +687,12 @@ initial_mmu: > tlbwe r4,r0,TLB_DATA /* Load the data portion of the entry */ > tlbwe r3,r0,TLB_TAG /* Load the tag portion of the entry */ > > + li r0,62 /* TLB slot 62 */ > + addis r4,r4,SZ_16M > + addis r3,r3,SZ_16M > + tlbwe r4,r0,TLB_DATA /* Load the data portion of the entry */ > + tlbwe r3,r0,TLB_TAG /* Load the tag portion of the entry */ > + > isync > > /* Establish the exception vector base > -- > 2.31.1