Re: [PATCH v2 4/5] mips: Make sure dt memory regions are valid

From: Paul Burton
Date: Mon May 06 2019 - 15:12:53 EST


Serge Semin wrote:
> There are situations when memory regions coming from dts may be
> too big for the platform physical address space. This especially
> concerns XPA-capable systems. Bootloader may determine more than 4GB
> memory available and pass it to the kernel over dts memory node, while
> kernel is built without XPA/64BIT support. In this case the region
> may either simply be truncated by add_memory_region() method
> or by u64->phys_addr_t type casting. But in worst case the method
> can even drop the memory region if it exceeds PHYS_ADDR_MAX size.
> So lets make sure the retrieved from dts memory regions are valid,
> and if some of them aren't, just manually truncate them with a warning
> printed out.
> Signed-off-by: Serge Semin <fancer.lancer@xxxxxxxxx>

Applied to mips-next.


[ This message was auto-generated; if you believe anything is incorrect
then please email paul.burton@xxxxxxxx to report it. ]