All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: contradiction in boot/i386/pc/boot.S
Date: Tue, 08 Jan 2008 13:13:48 -0500	[thread overview]
Message-ID: <1199816028.30874.9.camel@dv> (raw)
In-Reply-To: <20080108105057.GA24604@thorin>

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

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

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.

-- 
Regards,
Pavel Roskin



  reply	other threads:[~2008-01-08 18:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08 10:50 contradiction in boot/i386/pc/boot.S Robert Millan
2008-01-08 18:13 ` Pavel Roskin [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1199816028.30874.9.camel@dv \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.