Simone Pech <simone@wizardconsultoria.com.br> wrote:
Hello.
What is the difference between cstart_int19 and cstart_copy for x86 IPL
code? Using cstart_copy and changing the last jmp $ for int 19h, does it
function like cstart_int19? When cstart_int19 returns to BIOS, does it make
any configuration or just display the machine configuration?
Regards,
Simone
cstart_int19 re-vectors the int19 disk boot code to some other vector, then
places the segment and offset of its own flash boot code at int19. It then
returns control to the BIOS, which continues executing as it normally would.
When the BIOS finishes executing, it calls int19, to boot from disk. Instead
of the regular int19 code getting executed, our IPL gets executed, which
copies itself to DRAM just below 1M, and then calls our flash boot functions
(image_scan, image_setup, image_start) from c main(). If the user chooses not
to boot from flash, or the flash boot fails, c main() exits, and control returns
to cstart_int19, which calls int xx (wherever the real int19 code was re-vectored
to), and the board boots from hard drive.
by contrast, cstart_copy does not re-vector anything, and simply goes ahead and
copies itself to DRAM below 1M, jumps to c main(), and executes the flash boot
functions. If the flash boot fails, c main() exits and returns control to
cstart_copy, but from there, it normally just spins (jmp $). Using this method,
control never returns to the BIOS once cstart_copy is executed.
So, the main difference is that cstart_int19 is used with a system which would
normally boot from hard drive, and cstart_copy is used when there is no need to
use the int19 vector.
In the first type of system, it is desireable to have the BIOS complete all of
its own init code first before executing user BIOS extensions.
In the latter type of system, the BIOS already has some “awareness”
of an alternate boot method, and completes all of its own initialization code first
before executing user BIOS extensions.
\
Dave Green (dgreen@qnx.com)
QNX Software Systems Ltd.
http://www.qnx.com