ARM: start: fix fdt inside valid memory check
We want to check whether boarddata contains a valid dtb if it's inside valid memory. This includes the base of SDRAM, so use '>=' instead of '>'. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
94e0337ef0
commit
ce0ccefb15
|
@ -82,7 +82,7 @@ static noinline __noreturn void __start(uint32_t membase, uint32_t memsize,
|
|||
* If boarddata is a pointer inside valid memory and contains a
|
||||
* FDT magic then use it as later to probe devices
|
||||
*/
|
||||
if (boarddata > membase && boarddata < membase + memsize &&
|
||||
if (boarddata >= membase && boarddata < membase + memsize &&
|
||||
get_unaligned_be32((void *)boarddata) == FDT_MAGIC) {
|
||||
uint32_t totalsize = get_unaligned_be32((void *)boarddata + 4);
|
||||
endmem -= ALIGN(totalsize, 64);
|
||||
|
|
Loading…
Reference in New Issue