]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/boot/i386/pc/boot.S: Ignore %dl if it's not in a sane range.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 19 Sep 2010 22:06:45 +0000 (00:06 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 19 Sep 2010 22:06:45 +0000 (00:06 +0200)
ChangeLog
grub-core/boot/i386/pc/boot.S

index 006f32073f39d14f6f51d7b57be55c19925018b2..1bde1bc8f92420c6dd6f760f2005302eb6bd2952 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-20  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/boot/i386/pc/boot.S: Ignore %dl if it's not in a sane range.
+
 2010-09-19  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Split config.h for util and core.
index 6b16a913ad760328a8e4dd15ee0c028f4c2950b2..32091856672b42b3de0b8c5293e1e816ef04aca0 100644 (file)
@@ -112,12 +112,16 @@ LOCAL(after_BPB):
          */
        . = _start + GRUB_BOOT_MACHINE_DRIVE_CHECK
 boot_drive_check:
-        jmp     1f     /* grub-setup may overwrite this jump */
+        jmp     3f     /* grub-setup may overwrite this jump */
         testb   $0x80, %dl
-        jnz     1f
+        jz      2f
+3:
+       /* Ignore %dl different from 0-0x0f and 0x80-0x8f.  */
+       testb   $0x70, %dl
+       jz      1f
+2:     
         movb    $0x80, %dl
 1:
-
        /*
         * ljmp to the next instruction because some bogus BIOSes
         * jump to 07C0:0000 instead of 0000:7C00.