On 07/02/18 19:35, Icenowy Zheng wrote: > Allwinner 64-bit SoCs can use 4GiB DRAM chip, however their memory map > has only allocated 3GiB for DRAM, so only 3GiB of the DRAM is > accessible. > > Add a Kconfig option for the maximum accessible DRAM.
That looks fine to me, but have you checked CONFIG_MAX_MEM_MAPPED? get_effective_memsize() in common/memsize.c looks like it's solving this very problem. > For A80 it should be a much higher value (8GiB), but as I have no A80 > device to test and originally U-Boot only supports 2GiB DRAM on A80, it > currently still falls under the 2GiB situation. Well, that depends on how we will use SUNXI_DRAM_SIZE. If that's to limit the size we eventually report in the DT, that should be indeed 8GB on the A80. But U-Boot itself can't use more than 3GB on sunxi/ARMv7 (due to the static 1:1 mapping). I think we should separate those two numbers (actual DRAM size and U-Boot's own DRAM size), if we really want to support >3GB on the A80. But maybe we should not get carried away by something that doesn't really exist. Thanks, Andre. > > Signed-off-by: Icenowy Zheng <icen...@aosc.io> > --- > arch/arm/mach-sunxi/Kconfig | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig > index 1fededd0a3..32739e0f33 100644 > --- a/arch/arm/mach-sunxi/Kconfig > +++ b/arch/arm/mach-sunxi/Kconfig > @@ -63,6 +63,13 @@ config MACH_SUNXI_H3_H5 > select SUNXI_GEN_SUN6I > select SUPPORT_SPL > > +# TODO: try out A80's 8GiB DRAM space > +config SUNXI_DRAM_MAX_SIZE > + hex > + default 0xC0000000 if MACH_SUN50I > + default 0xC0000000 if MACH_SUN50I_H5 > + default 0x80000000 > + > choice > prompt "Sunxi SoC Variant" > optional > -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.