[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b35d73e8-260e-4296-a710-f20676e17c27@app.fastmail.com>
Date: Thu, 12 Oct 2023 21:40:52 +0100
From: "Jiaxun Yang" <jiaxun.yang@...goat.com>
To: "Gregory CLEMENT" <gregory.clement@...tlin.com>,
"paulburton@...nel.org" <paulburton@...nel.org>,
"Thomas Bogendoerfer" <tsbogend@...ha.franken.de>,
"linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
"Rob Herring" <robh+dt@...nel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@...aro.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: "Vladimir Kondratiev" <vladimir.kondratiev@...el.com>,
"Tawfik Bayouk" <tawfik.bayouk@...ileye.com>,
"Alexandre Belloni" <alexandre.belloni@...tlin.com>,
Théo Lebrun <theo.lebrun@...tlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH 03/11] MIPS: support RAM beyond 32-bit
在2023年10月11日十月 下午3:46,Gregory CLEMENT写道:
> 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 0x10000000
is definitely within that range.
But I'd agree that 0x08000000 to 0x10000000 (32MB) seems too small for kernel
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 addresses
> 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
>
> --
> Gregory Clement, Bootlin
> Embedded Linux and Kernel engineering
> http://bootlin.com
--
- Jiaxun
Powered by blists - more mailing lists