diff --git a/src/core/fdtmem.c b/src/core/fdtmem.c index b357287c5..ef1ceb59d 100644 --- a/src/core/fdtmem.c +++ b/src/core/fdtmem.c @@ -300,7 +300,8 @@ physaddr_t fdtmem_relocate ( struct fdt_header *hdr, physaddr_t max ) { assert ( region.last >= region.addr ); /* Use highest possible region */ - if ( memmap_is_usable ( ®ion ) && ( next >= len ) ) { + if ( memmap_is_usable ( ®ion ) && + ( ( next == 0 ) || ( next >= len ) ) ) { /* Determine candidate address after alignment */ try = ( ( next - len ) & ~( max_align - 1 ) );