Received: by 2002:aa6:cad3:0:b0:147:287a:cb84 with SMTP id e19csp814713lky; Mon, 27 Sep 2021 03:38:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS4I9IC3Jt/btdaupvXtIHjnngubIfvjkg9pACjEf4peDS7xUpsF3xzokvoS21ou3OyeQB X-Received: by 2002:a63:710d:: with SMTP id m13mr15875265pgc.467.1632739134544; Mon, 27 Sep 2021 03:38:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632739134; cv=none; d=google.com; s=arc-20160816; b=nJIeU1yYjHMHdCy81uyrkuM21AbaL8AMz6WhQGqpzm04VtyWYwsHi04cZf9dpnBEz1 7cwYvE9vsFdxzLWkBGzrE28SW9tZrdy+tF3KfQBBeesK/4V11H0IDiiUtwpSSvpqFKFr teh7xPIWJAnWXTHX2j9booRMg01FCnPHcxIIaYhnDc+LpLE5yGBtwnAH5+MuS/E2MSM3 Z6uZhM9Pw8GUoTLp2ZBXKntS+zyRQrcJUU0Y9RhxzUACrcHnXZANfp83ewjCt10+Bwot RBSxt07TJbL5HUX8+3NZNfgnm+I0lzx2nuePdTH31aVnnpOvmvilQ03m7T06rVE4YILX hdsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=mAnd5KiHTt2o9udeEea+f0KpDD4+jJqAz7K9Ox0HwO4=; b=PNFwiqrV8PdSAVGfl0uouSRotKUWKQg+yYNKTmvld84LFVD7quin4WYdUoPT+tpceq bbDUeXirEyujwUWjgY1fpa7A0X0fsU63NqoAd3nOLRGExd4CwQ32Oqnp0qD4lJ8XwleY QB+Oj02gx8NhXcK7NmvTNsA01vC/IsoVUPsRgeRbliO7Wonar1TKPg3dMqCsVZDk6unb MeP12i7TWzGQMs7k16U/nVZl+LrS3B8ziX4vyZJtGZ6A0l4lkNGbvZWD5WVjoHR/VCiv fe0Il7KtmtMt63wpF54la/Nz7kGEcTtMkcwa4sEvCA5O7GWBrNHDg/em2cF97mIb4PDH MzYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s2si21612422plq.267.2021.09.27.03.38.40; Mon, 27 Sep 2021 03:38:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233852AbhI0KhG (ORCPT + 99 others); Mon, 27 Sep 2021 06:37:06 -0400 Received: from pegase2.c-s.fr ([93.17.235.10]:50143 "EHLO pegase2.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233784AbhI0KhF (ORCPT ); Mon, 27 Sep 2021 06:37:05 -0400 Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4HHzYV1XSWz9sXr; Mon, 27 Sep 2021 12:35:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3EqNz8x0GQ36; Mon, 27 Sep 2021 12:35:26 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4HHzYV0kzhz9sSm; Mon, 27 Sep 2021 12:35:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 05F3F8B76C; Mon, 27 Sep 2021 12:35:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id e0qsAuGYeeiY; Mon, 27 Sep 2021 12:35:25 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.103]) by messagerie.si.c-s.fr (Postfix) with ESMTP id E30848B763; Mon, 27 Sep 2021 12:35:25 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.16.1/8.16.1) with ESMTPS id 18RAZ8vP1402689 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 27 Sep 2021 12:35:08 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.16.1/8.16.1/Submit) id 18RAZ75q1402687; Mon, 27 Sep 2021 12:35:07 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, cp Subject: [PATCH] powerpc/40x: Map 32Mbytes of memory at startup Date: Mon, 27 Sep 2021 12:34:52 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Cc: cp Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_40x.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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