On 10 September 2014 12:28, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > On 10 September 2014 13:21, Peter Maydell <peter.mayd...@linaro.org> wrote: >> The conditional means we won't try to load the DTB even if the >> ELF file fit into the address space entirely below loader_start, >> which doesn't look right. >> > > Ah right, I though loader_start was the start of usable RAM
It is, but the ELF file doesn't necessarily have to be in RAM: it could be linked so as to load at an address in the flash... > What about assigning elf_high_addr as well, and changing the test to > > if ((elf_low_addr > info->loader_start > || elf_high_addr < info_loader_start) > && load_dtb(info->loader_start, info, > (elf_high_addr < info_loader_start) ? 0 : elf_low_addr) < 0) { I think that's right, though maybe there's a less confusing way of phrasing it. -- PMM