image_scan(), image_scan_ext()

Scans memory for a valid system image

Synopsis:

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

Arguments:

start
The address in memory from which to start scanning
end
The address in memory at which to stop scanning

Description:

The image_scan() function scans memory for valid system images. As it scans memory, image_scan():

Because the address range it scans may contain more than one OS image, image_scan() compiles a list of valid OS images, picks the most recent image, and returns this image's start address. If image_scan() doesn't find a valid image, it returns -1.

You use the image_scan_ext() function for an x86 system with a BIOS. This function copies the startup code to memory from where it is stored using an industry-standard BIOS routine.

Returns:

≥0
Success: the start address of the most recent valid image found
-1
Failure