From: ebiederm@xmission.com (Eric W. Biederman)
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: suparna@in.ibm.com, fastboot@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [KEXEC][PATCH] Modified (smaller) x86 kexec hwfixes patch
Date: 14 Feb 2003 09:00:16 -0700 [thread overview]
Message-ID: <m1k7g27sz3.fsf@frodo.biederman.org> (raw)
In-Reply-To: <53360000.1045236737@[10.10.2.4]>
"Martin J. Bligh" <mbligh@aracnet.com> writes:
> >> Running on my 4-way P3 test box (just SMP, not NUMA) kexec_test
> >> prints this:
> >>
> >> Synchronizing SCSI caches:
> >> Shutting down devices
> >> Starting new kernel
> >> kexec_test 1.8 starting...
> >> eax: 0E1FB007 ebx: 0000011C ecx: 00000000 edx: 00000000
> >> esi: 00000000 edi: 00000000 esp: 00000000 ebp: 00000000
> >> idt: 00000000 C0000000
> >> gdt: 0000006F 000000A0
> >> Switching descriptors.
> >> Descriptors changed.
> >> Legacy pic setup.
> >> In real mode.
> >>
> >> Without that I just get:
> >>
> >> Synchronizing SCSI caches:
> >> Shutting down devices
> >> Starting new kernel
> >>
> >> Can someone interpret?
> >
> > Besides the fact that you cannot make BIOS calls, and kexec is working
> > there is not much to say. You cannot kexec another kernel?
>
> Nope, if I just kexec the same 2.5.59 kernel+kexec patches that I'm booted
> on it says:
>
> Synchronizing SCSI caches:
> Shutting down devices
> Starting new kernel
>
> Could you give me a high-level sketch of what you're doing? kexec -l loads
> the new kernel, then what do you do? Drop back into real mode and jump to
> the normal kernel entry point? Or decompress by hand, do some alternate
> setup of the early page tables and try to jump in at the 32-bit entry point?
With Interrupts disabled.
machine_kexec switch the cpu to physical address mode (it turns the mmu off).
Copies the kernel to where it needs to run.
Then it jumps to an entry point.
kexec has put in a stub piece of code, and pointed the entry point at that location.
The stub code setups of a gdt, the kernel can cope with.
The stub code setups a parameter table just like the real mode code generates.
The stub code jumps in at the 32bit entry point.
[There is another stub that will attempt to start the kernel at the 16bit entry
point but it is not used by default].
Interrupts are off the entire time.
> Is all I can assume from the above that I crash in the new kernel before
> console_init()?
Yes.
> Or should I expect something from the decompress code?
It is not hard to patch the decompression code to display a message, but
by default it does not output to serial...
You might want to run mkelfImage on a vmlinux so you can skip the decompression
step. It adds a stub to the elf file that gets passed to kexec so that
you can skip the decompression.
ftp://ftp.lnxi.com/pub/src/mkelfImage/mkelfImage-2.x
Also I have some assembly language macros that display text out the serial port, if you want
to instrument up the kernel you are booting.
Eric
next prev parent reply other threads:[~2003-02-14 15:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-13 10:40 [KEXEC][PATCH] Modified (smaller) x86 kexec hwfixes patch Suparna Bhattacharya
2003-02-13 15:09 ` Eric W. Biederman
2003-02-14 3:29 ` Suparna Bhattacharya
2003-02-14 4:08 ` Martin J. Bligh
2003-02-14 8:30 ` Eric W. Biederman
2003-02-14 6:47 ` Martin J. Bligh
2003-02-14 8:32 ` Eric W. Biederman
2003-02-14 15:32 ` Martin J. Bligh
2003-02-14 16:00 ` Eric W. Biederman [this message]
2003-02-14 8:39 ` Eric W. Biederman
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=m1k7g27sz3.fsf@frodo.biederman.org \
--to=ebiederm@xmission.com \
--cc=fastboot@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.com \
--cc=suparna@in.ibm.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