All of lore.kernel.org
 help / color / mirror / Atom feed
* contradiction in boot/i386/pc/boot.S
@ 2008-01-08 10:50 Robert Millan
  2008-01-08 18:13 ` Pavel Roskin
  2008-01-08 18:24 ` Pavel Roskin
  0 siblings, 2 replies; 10+ messages in thread
From: Robert Millan @ 2008-01-08 10:50 UTC (permalink / raw)
  To: grub-devel


boot/i386/pc/boot.S reads:

        /*
         * This is a workaround for buggy BIOSes which don't pass boot
         * drive correctly. If GRUB is installed into a HDD, check if
         * DL is masked correctly. If not, assume that the BIOS passed
         * a bogus value and set DL to 0x80, since this is the only
         * possible boot drive. If GRUB is installed into a floppy,
         * this does nothing (only jump).
         */
boot_drive_check:
        jmp     1f      /* grub-setup may overwrite this jump */
        testb   $0x80, %dl
        jnz     1f
        movb    $0x80, %dl
1:

However, if 0x80 is really "the only possible boot drive", that means the
test is pointless and can be replaced with:

boot_drive_check:
        jmp     1f      /* grub-setup may overwrite this jump */
        movb    $0x80, %dl
1:

So AFAICT either the comment or the code needs adjusting.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-01-08 23:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-08 10:50 contradiction in boot/i386/pc/boot.S Robert Millan
2008-01-08 18:13 ` Pavel Roskin
2008-01-08 18:24 ` Pavel Roskin
2008-01-08 20:24   ` Robert Millan
2008-01-08 22:57     ` Pavel Roskin
2008-01-08 23:37       ` Robert Millan
2008-01-08 23:48         ` Vincent Pelletier
2008-01-08 23:51           ` Vincent Pelletier
2008-01-08 23:52         ` Pavel Roskin
2008-01-08 23:57           ` Robert Millan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.