From: ebiederm@xmission.com (Eric W. Biederman)
To: Andi Kleen <ak@suse.de>
Cc: Andrea Arcangeli <andrea@suse.de>,
Tigran Aivazian <tigran@aivazian.fsnet.co.uk>,
Tigran Aivazian <tigran@veritas.com>,
"H. Peter Anvin" <hpa@transmeta.com>,
Max Inux <maxinux@bigfoot.com>, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org
Subject: Re: bzImage ~ 900K with i386 test11-pre2
Date: 16 Nov 2000 10:43:05 -0700 [thread overview]
Message-ID: <m1snor7qza.fsf@frodo.biederman.org> (raw)
In-Reply-To: <Pine.LNX.4.21.0011111644110.1036-100000@saturn.homenet> <m1ofzmcne5.fsf@frodo.biederman.org> <20001112122910.A2366@athlon.random> <m1k8a9badf.fsf@frodo.biederman.org> <20001112163705.A4933@athlon.random> <m1bsvlauic.fsf@frodo.biederman.org> <20001112203353.A13289@gruyere.muc.suse.de>
In-Reply-To: Andi Kleen's message of "Sun, 12 Nov 2000 20:33:53 +0100"
Andi Kleen <ak@suse.de> writes:
> [This is quite a bizarre discussion, but I'll answer anyways. I am not exactly
> sure what your point is]
Let me step aside a second and explain where I'm coming from. As a spin
off of the work of the linuxBIOS project I have implemented a system
call that implements exec functionality at the kernel level. Essentially
allowing you to warm boot linux from linux. To get this to work no
bios calls are involved, so I'm not using setup.S. This also has the
interesting side effect of allowing a boot loader to be written that
will work on all linux platforms. (I have currently just begun my
port to alpha).
In the process of the above I have learned quite a bit about how
the current boot loader works. And want eventually to convert linux
to not need wrapper code to use my bootloader.
Booting vmlinux is fun :)
> 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.
...
> > > 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
After reading through the long mode specs I now agree. If you could
be in long mode with the mmu disabled that would be a different story
but you can't and it isn't.
I was thinking of symmetry with the x86 and how much easier everything
is if you only use one processor mode for the initial boot strap. No
need for super assemblers etc. Oh well.
On x86 there are some real advantages to moving the segment loads into
setup.S from the various head.S's and they still apply (although to a
lesser extent) to x86-64. This causes less code confusion.
For my kexec stuff I now need to think really hard how I want
to handle x86-64. What I was thinking would work well in general
is to start the processor it's native/optimal mode with the mmu
disabled. With x86-64 I can't do this unfortunately :(
Eric
-
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/
next prev parent reply other threads:[~2000-11-16 20:01 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-10 23:37 bzImage ~ 900K with i386 test11-pre2 Robert Lynch
2000-11-10 23:47 ` H. Peter Anvin
2000-11-11 2:25 ` Max Inux
2000-11-11 3:03 ` H. Peter Anvin
2000-11-11 5:28 ` Chmouel Boudjnah
2000-11-11 11:27 ` Max Inux
2000-11-11 11:28 ` Jan Niehusmann
2000-11-11 11:38 ` bzImage ~ 900K with i386 test11-pre2, I stand corrected Max Inux
2000-11-11 13:49 ` bzImage ~ 900K with i386 test11-pre2 James A. Sutherland
2000-11-11 20:08 ` H. Peter Anvin
2000-11-11 11:36 ` Tigran Aivazian
2000-11-11 11:38 ` Tigran Aivazian
2000-11-11 11:52 ` Max Inux
2000-11-11 14:42 ` Andrea Arcangeli
2000-11-11 14:51 ` Tigran Aivazian
2000-11-11 16:26 ` Andrea Arcangeli
2000-11-11 16:46 ` Tigran Aivazian
2000-11-11 18:47 ` Andrea Arcangeli
2000-11-11 19:35 ` Eric W. Biederman
2000-11-12 11:29 ` Andrea Arcangeli
2000-11-12 13:14 ` Eric W. Biederman
2000-11-12 15:37 ` Andrea Arcangeli
2000-11-12 15:44 ` Andi Kleen
2000-11-12 16:33 ` Andrea Arcangeli
2000-11-12 18:57 ` Eric W. Biederman
2000-11-12 19:33 ` Andi Kleen
2000-11-16 17:43 ` Eric W. Biederman [this message]
2000-11-12 22:30 ` Andrea Arcangeli
2000-11-12 19:20 ` Eric W. Biederman
2000-11-12 23:03 ` Andrea Arcangeli
2000-11-11 20:09 ` H. Peter Anvin
2000-11-12 16:22 ` Andrea Arcangeli
2000-11-11 16:05 ` Andrzej Krzysztofowicz
2000-11-11 17:27 ` Jeff Garzik
2000-11-14 14:02 ` Werner Almesberger
2000-11-11 5:47 ` Peter Samuelson
2000-11-11 14:30 ` Andi Kleen
2000-11-11 15:43 ` Thomas Köhler
2000-11-11 18:03 ` Robert Lynch
2000-11-11 18:30 ` Andi Kleen
2000-11-11 18:57 ` Robert Lynch
2000-11-11 20:35 ` Andi Kleen
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=m1snor7qza.fsf@frodo.biederman.org \
--to=ebiederm@xmission.com \
--cc=ak@suse.de \
--cc=andrea@suse.de \
--cc=hpa@transmeta.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxinux@bigfoot.com \
--cc=tigran@aivazian.fsnet.co.uk \
--cc=tigran@veritas.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox