From: Vivek Goyal <vgoyal@redhat.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Haren Myneni <hbabu@us.ibm.com>,
Simon Horman <horms@verge.net.au>,
kexec@lists.infradead.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH v3 4/4] kexec, x86_64: Load bzImage64 above 4G
Date: Wed, 21 Nov 2012 15:07:22 -0500 [thread overview]
Message-ID: <20121121200721.GI13114@redhat.com> (raw)
In-Reply-To: <CAE9FiQUHapB8_uGwMtM84xOHpMvWmVbn2Z8h0C=n_rfHPCbY_g@mail.gmail.com>
On Wed, Nov 21, 2012 at 11:50:56AM -0800, Yinghai Lu wrote:
> On Wed, Nov 21, 2012 at 6:50 AM, Vivek Goyal <vgoyal@redhat.com> wrote:
> > On Tue, Nov 20, 2012 at 11:31:38PM -0800, Yinghai Lu wrote:
> >
> > [..]
> >> +int bzImage64_probe(const char *buf, off_t len)
> >> +{
> >> + const struct x86_linux_header *header;
> >> + if ((uintmax_t)len < (uintmax_t)(2 * 512)) {
> >> + if (probe_debug) {
> >> + fprintf(stderr, "File is too short to be a bzImage!\n");
> >> + }
> >> + return -1;
> >> + }
> >> + header = (const struct x86_linux_header *)buf;
> >> + if (memcmp(header->header_magic, "HdrS", 4) != 0) {
> >> + if (probe_debug) {
> >> + fprintf(stderr, "Not a bzImage\n");
> >> + }
> >> + return -1;
> >> + }
> >> + if (header->boot_sector_magic != 0xAA55) {
> >> + if (probe_debug) {
> >> + fprintf(stderr, "No x86 boot sector present\n");
> >> + }
> >> + /* No x86 boot sector present */
> >> + return -1;
> >> + }
> >> + if (header->protocol_version < 0x020C) {
> >> + if (probe_debug) {
> >> + fprintf(stderr, "Must be at least protocol version 2.12\n");
> >> + }
> >> + /* Must be at least protocol version 2.12 */
> >> + return -1;
> >> + }
> >> + if ((header->loadflags & 1) == 0) {
> >> + if (probe_debug) {
> >> + fprintf(stderr, "zImage not a bzImage\n");
> >> + }
> >> + /* Not a bzImage */
> >> + return -1;
> >> + }
> >> + if (!(header->xloadflags & 1)) {
> >> + if (probe_debug) {
> >> + fprintf(stderr, "Not a bzImage64\n");
> >> + }
> >> + /* Must be LOADED_ABOVE_4G */
> >> + return -1;
> >> + }
> >
> > So how do I force a 16bit or 32bit entry using a bzImage64?
>
> kexec -t bzImage -l ....
> will load low and use 32bit entry.
>
> kexec -t bzImage64 -l ...
> kexec -l ...
> will try to load high and use 64bit entry.
Also bzImage64 is not really a new image format. It is just enhancement
of bzImage format. We keep on doing extention of bzImage and don't call it
a new image format. I am not sure how good an idea it is to export the
notion of new image type bzImage64 to user.
Thanks
Vivek
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2012-11-21 20:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 7:31 [PATCH v3 0/4] kexec: put bzImage and ramdisk above 4G for x86 64bit Yinghai Lu
2012-11-21 7:31 ` [PATCH v3 1/4] kexec, x86: add boot header member for version 2.12 Yinghai Lu
2012-11-21 7:31 ` [PATCH v3 2/4] kexec, x86: put ramdisk high for 64bit bzImage Yinghai Lu
2012-11-21 7:31 ` [PATCH v3 3/4] kexec, x86: set ext_cmd_line_ptr when boot_param is above 4g Yinghai Lu
2012-11-21 7:31 ` [PATCH v3 4/4] kexec, x86_64: Load bzImage64 above 4G Yinghai Lu
2012-11-21 14:37 ` Vivek Goyal
2012-11-21 17:24 ` H. Peter Anvin
2012-11-21 19:54 ` Yinghai Lu
2012-11-21 19:56 ` H. Peter Anvin
2012-11-21 20:01 ` Yinghai Lu
2012-11-21 20:16 ` H. Peter Anvin
2012-11-21 20:47 ` Yinghai Lu
2012-11-21 20:56 ` H. Peter Anvin
2012-11-21 23:34 ` H. Peter Anvin
2012-11-22 5:52 ` Yinghai Lu
2012-11-21 14:50 ` Vivek Goyal
2012-11-21 19:50 ` Yinghai Lu
2012-11-21 19:52 ` H. Peter Anvin
2012-11-21 19:57 ` Yinghai Lu
2012-11-21 20:00 ` Vivek Goyal
2012-11-21 20:09 ` Yinghai Lu
2012-11-21 20:12 ` Vivek Goyal
2012-11-21 20:17 ` Yinghai Lu
2012-11-21 20:07 ` Vivek Goyal [this message]
2012-11-22 11: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=20121121200721.GI13114@redhat.com \
--to=vgoyal@redhat.com \
--cc=ebiederm@xmission.com \
--cc=hbabu@us.ibm.com \
--cc=horms@verge.net.au \
--cc=hpa@zytor.com \
--cc=kexec@lists.infradead.org \
--cc=yinghai@kernel.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.