9
0
Fork 0

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:
Sascha Hauer 2013-11-25 11:54:48 +01:00
parent 94e0337ef0
commit ce0ccefb15
1 changed files with 1 additions and 1 deletions

View File

@ -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);