Re: bzImage ~ 900K with i386 test11-pre2

From: Andi Kleen (ak@suse.de)
Date: Sun Nov 12 2000 - 14:33:53 EST


[This is quite a bizarre discussion, but I'll answer anyways. I am not exactly
sure what your point is]

On Sun, Nov 12, 2000 at 11:57:15AM -0700, Eric W. Biederman wrote:
>
> > > I can tell you don't have real hardware. The non obviousness
>
> I need to retract this a bit. You are still building a compressed image,
> and the code in the boot/compressed/head.S remains unchanged and loads
> segment registers, so it works by luck. If you didn't build a
> compressed image you would be in trouble.

boot/compressed/head.S does run in 32bit legacy mode, where you of course
need segment registers. After you got into long mode segments are only
needed to jump between 32/64bit code segments and and for a the data segment
of the 32bit emulation (+ the iretd bug currently which I hope will be fixed
in final hardware)

Also note that boot/compressed/* currently does not even link, because the
x86-64 toolchain cannot generate relocated 32bit code ATM (the linker chokes
on the 32bit relocations) The tests we did so far used a precompiled
relocated binary compressed/{head,misc}.o from a IA32 build.

> > In 64-bit mode, the contents of the ES, DS, and SS segment registers
> > are ignored. All fields (base, limit, and attribute) in the
> > corresponding segment descriptor registers (hidden part) are also
> > ignored.
>
> Hmm. I'll have to look and see if FS & GS are also ignored.

They are not, you to fully use them you need privileged MSRs.
Their limit is ignored.

> > Sure, go ahead if you weren't missing that basic part of the long mode specs.
> > Thanks.
>
> Nope. Though I suspect we should do the switch to 64bit mode in
> setup.S and not have these issues pollute head.S at all.

I see no advantage in doing it there instead of in head.S

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Nov 15 2000 - 21:00:22 EST