[PATCH 14/16] arm: rmobile: Support RZ/G2L memory map
Paul Barker
paul.barker.ct at bp.renesas.com
Wed Oct 4 15:54:02 CEST 2023
On Wed, Oct 04, 2023 at 02:30:53PM +0200, Marek Vasut wrote:
> On 10/4/23 11:18, Paul Barker wrote:
>
> [...]
>
> > > > +static struct mm_region rzg2l_mem_map[RZG2L_NR_REGIONS] = {
> > > > + {
> > > > + .virt = 0x0UL,
> > > > + .phys = 0x0UL,
> > > > + .size = 0x40000000UL,
> > > > + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
> > > > + PTE_BLOCK_NON_SHARE |
> > > > + PTE_BLOCK_PXN | PTE_BLOCK_UXN
> > > > + }, {
> > > > + .virt = 0x40000000UL,
> > > > + .phys = 0x40000000UL,
> > > > + .size = 0x03F00000UL,
> > > > + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
> > > > + PTE_BLOCK_INNER_SHARE
> > > > + }, {
> > > > + .virt = 0x47E00000UL,
> > >
> > > What's this part about ?
> >
> > This is copied from the RCar Gen3 memory map.
>
> I suspected as much. Please recheck the memory map instead of copy-paste and
> make sure it is really matching the hardware.
Sorry, I wasn't specific enough there.
The addition of an entry at 0x40000000 of size 0x03F00000, followed by a
gap until 0x47E00000, is coped from R-Car as the way TrustedFirmware and
OP-TEE use the first 128MiB of system memory is the same. The mappings
here are due to the software configuration of TrustedFirmware & OP-TEE,
not due to the hardware.
The hardware itself has a pretty simple memory map which is shown in the
commit message. The memory map in this file is complete.
I have a note in the commit that says "Within the DDR area, the first
128 MiB are reserved by TrustedFirmware.", I probably just need to
expand on why we need the mappings at 0x40000000 and 0x47E00000, instead
of just using the mapping from 0x48000000 that's in the dtb.
>
> > > > + .phys = 0x47E00000UL,
> > > > + .size = 0xF8200000UL,
> > > > + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
> > > > + PTE_BLOCK_INNER_SHARE
> > > > + }, {
> > > > + /* List terminator */
> > > > + 0,
> > > > + }
> > > > +};
Thanks,
Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231004/ea603875/attachment.sig>
More information about the U-Boot
mailing list