[PATCH v2 3/4] ARM: mm: truncate memory banks to fit in 4GB space for classic MMU

Will Deacon will.deacon at arm.com
Wed Apr 11 11:07:37 EDT 2012


On Wed, Apr 11, 2012 at 03:44:22PM +0100, Nicolas Pitre wrote:
> On Wed, 11 Apr 2012, Will Deacon wrote:
> 
> > If a bank of memory spanning the 4GB boundary is added on a !CONFIG_LPAE
> > kernel then we will hang early during boot since the memory bank will
> > have wrapped around to zero.
> > 
> > This patch truncates memory banks for !LPAE configurations when the end
> > address is not representable in 32 bits.
> > 
> > Cc: Nicolas Pitre <nico at fluxnic.net>
> > Signed-off-by: Will Deacon <will.deacon at arm.com>
> 
> Acked-by: Nicolas Pitre <nico at linaro.org>

Thanks Nicolas.

> Now what if start = 1G and size = 5G? The size variable is an unsigned 
> long, meaning that right now the size might be truncated to 1G.

membank->size is also an unsigned long, so I guess we'd have to create two
adjacent banks for this scenario. This is easy for ATAGs, because the
tag_mem32 structure has a u32 for size but obviously a DT blob could pass
something larger.

Will



More information about the linux-arm-kernel mailing list