On Mon, Jun 22, 2009 at 05:36:22PM -0400, Pavel Roskin wrote:
> > What's the problem with removing %cs?  It's presence there is bogus.  It
> > *seems* to indicate gdtdesc is a segment-relative reference, but in fact
> > it's not, and it just happens to work because %cs was set to 0.
> 
> I just wanted to make sure we are not doing anything wrong.  I have a
> feeling that somebody with a good knowledge of assembler tricks could
> write the code to use %cs and a 16-bit address, but I don't know how to
> do it.

We *could* convert the absolute reference generated by binutils into
something relative to %cs with a combination of macros (so realmode.S
knows what's the %cs value going to be), substract _start, bitshift,
etc.

But in that case I really think the added complexity makes it unworthy.

> Anyway, your code is correct and I have no objections.  Please commit.

Committed.  Feel free to get rid of ADDR32 if you figure out a clean way
to do it :-)

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to