unsigned long image_scan (unsigned long start, unsigned long end)

The image_scan() function scans memory for a valid system image. It looks on 4 KB boundaries for the image identifier bytes and then does a checksum on the image.

The function scans between start and end. If a valid image is found, image_scan() returns the image's address. If no valid image is found, it returns -1.

Note that image_scan() will search for all images within the given range, and will pick the "best" one as described above (in the "IPL code structure" section).