]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[int13] Do not zero %edx when jumping to a boot sector
authorMichael Brown <mcb30@ipxe.org>
Fri, 5 Oct 2012 14:02:30 +0000 (15:02 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 5 Oct 2012 14:04:27 +0000 (15:04 +0100)
Commit 73eb3f1 ("[int13] Zero all possible registers when jumping to a
boot sector") introduced a regression preventing the SAN-booting of
boot sectors which rely upon %dl containing the correct drive number
(such as most CD-ROM boot sectors).

Fix by not zeroing %edx.

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

index faf21c6fc7a109a12b77533be21127381a6fdc79..ab3cf94c21fbeda059d47d95cc6ae413a33b40e8 100644 (file)
@@ -87,7 +87,7 @@ int call_bootsector ( unsigned int segment, unsigned int offset,
                                           "xorl %%eax, %%eax\n\t"
                                           "xorl %%ebx, %%ebx\n\t"
                                           "xorl %%ecx, %%ecx\n\t"
-                                          "xorl %%edx, %%edx\n\t"
+                                          /* %edx contains drive number */
                                           "xorl %%esi, %%esi\n\t"
                                           "xorl %%edi, %%edi\n\t"
                                           "xorl %%ebp, %%ebp\n\t"