Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp559205rdg; Thu, 12 Oct 2023 13:43:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHB55N594Q8Dv1cfkjz87cFmEuvRYnX7UvQ2xVDg1SA8Cr/73HGga/9DZ8VOFhN//ZoyAOX X-Received: by 2002:ac2:43c9:0:b0:507:9691:f854 with SMTP id u9-20020ac243c9000000b005079691f854mr1201198lfl.2.1697143429984; Thu, 12 Oct 2023 13:43:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697143429; cv=none; d=google.com; s=arc-20160816; b=mibSqFaGBdstyyaFkbiAYCuQDzESxaEbkqK5UN96wCDGp0LSCmN/iqoavci4i3U3Mc 3zOz///qO90T1nYHD4C5ureqI81uwT50zcPgEQXvB+gbCtSRayClaSc1vqmDde2eojcr b8X0ckqykIX6B08/p+mER2Lp5p8RdcJ9M576x0o8T0XNilB7YMH7bdworCKeFm0ehEIr 7Pn950hintWcPLsN+047cF6yXGdYN+5G2gFcQ6SVwsa6/c1NfyPdr2j+s2MA3Gd/699y YOMUZya0ntLb7UI9+0LobPXG7L6dCwzQsx4AjWA81AMqeBgTuQ2UOwIPrN7EnEAcRSMQ 4FQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=Kcx2chQljPp1tO/RTaI3fBXk8864d+5dqsfCYXZoMXY=; fh=OkVIfZu6hUmEm15jTL3DnRei0gdKEmtHJXZ/s8d4biY=; b=Qz5c/gys9FsIYI4IEyDFj3Vj16LNqZ68TYkCOq+v+i6ha48/yRQsBm7qO8SUckGmtt eoJyQJGVo7LQpsBcZW+B1DqAfi1X9uF1sumbkJBjYn66noXfRaRog9WwwiUrVti2RTzk XvV6jkl2hOAePOD20AgFaHiolQtzElV/kLfcjJvL8q+AP/bZp/QQh/YETY2+C1Cx9cYq 9HCp6tiTpVx6M2tTc44EAzBZtu/mQWbdZu9zbnXd3u+EwTM6ub/OWlkR/8i2iLDuYBr2 P9RXk2L66bOFgFLndnQQegfJQkwwhIdYcWUGJGFzUfC+zD0ElDKHCuipQWkQiwAyvjRe WGbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm3 header.b=rJRlgRpG; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=IbEzv8FB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id v4-20020a056512048400b004fb73692ea1si3781394lfq.58.2023.10.12.13.43.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 13:43:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm3 header.b=rJRlgRpG; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=IbEzv8FB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 3584C8087261; Thu, 12 Oct 2023 13:41:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442228AbjJLUlj (ORCPT + 99 others); Thu, 12 Oct 2023 16:41:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344079AbjJLUli (ORCPT ); Thu, 12 Oct 2023 16:41:38 -0400 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40B87CA; Thu, 12 Oct 2023 13:41:20 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 35F223200B37; Thu, 12 Oct 2023 16:41:14 -0400 (EDT) Received: from imap44 ([10.202.2.94]) by compute3.internal (MEProxy); Thu, 12 Oct 2023 16:41:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1697143273; x=1697229673; bh=Kcx2chQljPp1tO/RTaI3fBXk8864d+5dqsf CYXZoMXY=; b=rJRlgRpG0v+aFSEnYV5yUdnk8chd0XOqsm+FEQ+dQmn8KgHPA98 IK9kHWFRXx6rwNcWu4DczT7uz4qWT4lm25rLGUm8u3xF6ONyrr2fsYJM2U+r/7v6 5AkYBAhSGeyiw6lFxXvLhFSd8ha6BU4wGHjRGpKpDgZD8vO9HPSESnko3hMBTX76 7xef4ex0to/kkOHJSy2MATuFzPM7cDj+OygowP5UkK89dNi2LZnlxro8DBu6VLaC 7wLtJa+bm7Kr5xBVhlMM+lFe6+p9ZgKh7FTRzFFjxKrDXT41STfosb6vgIBnIAC0 cz1W5I7FVx0RvHS89CzJHuxXVbgICNSbpAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1697143273; x=1697229673; bh=Kcx2chQljPp1tO/RTaI3fBXk8864d+5dqsf CYXZoMXY=; b=IbEzv8FB9FajJZsu6CyFe0MV4PqB6XXzBLEwaOl12s8pz3x6zJb riJYZpepjEglaEWbb/9QM0FqPYkfKOXT1+ZoN9SJTV67m+MAEFNeZ1cMdzqYQ999 MkdMzMfNk/REbYThagYky0NxMAVH3OJTPFQP6UoJiaX6LqEcp43qAu+5OVF45FHo LGoioNFenrq4jKUMSaVVNmjd4BTbw5k6NzIrxizNV+ygq93TNyfgTaLxitmstdhL 9PlliNUEiyVpA9Y0NHhTOA1LP+FXnisystXN7ChH/LVtJ+85b3s6IdIYIhEJLSNl hIO2qzbP6nJgt6ZP5TcPOlOKooxMWMJ9ZTg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedriedtgddugeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdfl ihgrgihunhcujggrnhhgfdcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtoh hmqeenucggtffrrghtthgvrhhnpeetleegheefvdejfeeftdfhtdevfefgjeeufefgiedu vdetheefheefgfelfeehudenucffohhmrghinhepvghlihhnuhigrdhorhhgpdgsohhoth hlihhnrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 3734536A0075; Thu, 12 Oct 2023 16:41:13 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1019-ged83ad8595-fm-20231002.001-ged83ad85 MIME-Version: 1.0 Message-Id: In-Reply-To: <878r89b4jh.fsf@BL-laptop> References: <20231004161038.2818327-1-gregory.clement@bootlin.com> <20231004161038.2818327-4-gregory.clement@bootlin.com> <87edi3bxcl.fsf@BL-laptop> <878r89b4jh.fsf@BL-laptop> Date: Thu, 12 Oct 2023 21:40:52 +0100 From: "Jiaxun Yang" To: "Gregory CLEMENT" , "paulburton@kernel.org" , "Thomas Bogendoerfer" , "linux-mips@vger.kernel.org" , "Rob Herring" , "Krzysztof Kozlowski" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Vladimir Kondratiev" , "Tawfik Bayouk" , "Alexandre Belloni" , =?UTF-8?Q?Th=C3=A9o_Lebrun?= , "Thomas Petazzoni" Subject: Re: [PATCH 03/11] MIPS: support RAM beyond 32-bit Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 12 Oct 2023 13:41:59 -0700 (PDT) =E5=9C=A82023=E5=B9=B410=E6=9C=8811=E6=97=A5=E5=8D=81=E6=9C=88 =E4=B8=8B= =E5=8D=883:46=EF=BC=8CGregory CLEMENT=E5=86=99=E9=81=93=EF=BC=9A > Hello Jiaxun, > [...] > > There is a kind of mirror but its physical address start at 0x8000000 > so beyond the first 512MBytes that are used for KSEG0. Really, KSEG0 range is 0x00000000 to 0x20000000, and 0x08000000 to 0x100= 00000 is definitely within that range. But I'd agree that 0x08000000 to 0x10000000 (32MB) seems too small for k= ernel text and data. So yeah, it makes sense to load kernel into XKPHYS. My sugesstion is, kernel does not have to be aware of the mirror deisgn. Say that you have DDR fully mapped at 0x100000000, you can split memory space into two trunks: 0x08000000 to 0x10000000 and 0x102000000 to end of the dram. Since memblock always allocate from first continuous range in system, we can guarantee that ebase is allocated with in the first trunk. Thanks > > In short the 32bits mapping is the following: > > - the controllers registers of the SoC are located until 0x8000000, > - then from 0x8000000 to 0x10000000 there is the alias to low address= es > of the DDR > - then the SPIflash is mapped to from 0x10000000 to 0x20000000 > - after the PCIe Memory 32-bit addr space is from 0x20000000 to > 0x40000000 > > Gregory > >> [1]: https://elinux.org/images/1/1f/New-tricks-mips-linux.pdf > > --=20 > Gregory Clement, Bootlin > Embedded Linux and Kernel engineering > http://bootlin.com --=20 - Jiaxun