]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[int13] Zero all possible registers when jumping to a boot sector
authorMichael Brown <mcb30@ipxe.org>
Fri, 14 Sep 2012 14:42:54 +0000 (15:42 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 14 Sep 2012 14:42:54 +0000 (15:42 +0100)
commit73eb3f17db3ff0a57a52507eafb5ef78eb5dc66e
tree40e8a24989186167640249b752c99671809cb458
parent8509dbf86acce7aacb3518c3f8b5bcb0cb4809da
[int13] Zero all possible registers when jumping to a boot sector

At least one boot sector (the DUET boot sector used for bootstrapping
EFI from a non-EFI system) fails to initialise the high words of
registers before using them in calculations, leading to undefined
behaviour.

Work around such broken boot sectors by explicitly zeroing the
contents of all registers apart from %cs:%ip and %ss:%sp.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/image/bootsector.c