• Nicolas Pitre's avatar
    [ARM] 4224/2: allow XIP kernel to boot again · e98ff7f6
    Nicolas Pitre authored
    Since commit 2552fc27 XIP kernels failed
    to boot because (_end - PAGE_OFFSET - 1) is much smaller than the size
    of the kernel text and data in the XIP case, causing the kernel not to
    be entirely mapped.
    
    Even in the non-XIP case, the use of (_end - PAGE_OFFSET - 1) is wrong
    because it produces a too large value if TEXT_OFFSET is larger than 1MB.
    
    Finally the original code was performing one loop too many.
    
    Let's break the loop when the section pointer has passed the last byte
    of the kernel instead.
    Signed-off-by: default avatarNicolas Pitre <nico@cam.org>
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    e98ff7f6
head.S 8.6 KB