[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: contradiction in boot/i386/pc/boot.S

From: Pavel Roskin
Subject: Re: contradiction in boot/i386/pc/boot.S
Date: Tue, 08 Jan 2008 13:13:48 -0500

On Tue, 2008-01-08 at 11:50 +0100, Robert Millan wrote:

> 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.

I think the code allows simplification regardless of what the comment

Actually, the shortest solution (and we really want to be short in the
bootsector) would be to only have NOPs there without any jumps, and have
grub-setup overwrite the NOPs with "movb $0x80, %dl" for hard drive

Or the other way around - have "movb $0x80, %dl" in the code and have
grub-setup overwrite it with NOPs if installing not on a hard drive.

And by the way, I would remove the "boot_drive_check" label where it is
now and rename "real_start" to it, moving that "movb" there.  That would
save a us label, making the code easier to read.

Pavel Roskin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]