All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Kyle McMartin <kyle@infradead.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	linux-parisc@vger.kernel.org
Subject: Re: Hacking SuperDome
Date: Sun, 8 Feb 2009 16:15:33 -0700	[thread overview]
Message-ID: <20090208231533.GI31509@parisc-linux.org> (raw)
In-Reply-To: <20090208170516.GB11398@bombadil.infradead.org>

On Sun, Feb 08, 2009 at 12:05:16PM -0500, Kyle McMartin wrote:
> I'd forgotten how simplistic our boot protocol is... we've really got
> very little way to communicate, well, anything extra, since we didn't
> sanitize the other unused registers before branching to the kernel
> entrypoint.

The usual solution to this is to put a magic value in a register.  For
example, mount(2) has 0xC0ED in the upper 16 bits of the flag register.
We're not exactly short on registers, so if one of the unused ones is
set to, say 0x0c2cd240, we would know that we're using the v2 protocol.

> Current plan is to define an extensible v2 palo format, using a
> 4096-byte data page (similar to the command line) and use the top
> 2048-bytes for the command line (so maybe people will whinge less.)

Heck, we could put a pointer in the data page, and have the command line
an unlimited length.  Or make one of the unused registers be the command
line.

> It's ugly, but aside from doing some ELF jiggery pokery or something, or
> reading the first couple instructions from the kernel, we've fairly
> little choice... I've decided that since %ret0 is guaranteed to have
> the start address of _stext in it, since we returned it from iplload,
> I'll just 'borrow' that as a flag to use the v2 boot protocol.
> (ie: if %ret0 isn't 0x10000, use v2.)

I'm fully in support, as long as a new palo will boot an old kernel, and
vice versa.  This doesn't seem like it would be too hard.

(Obviously, if you're using an old palo or an old kernel, you have to
live with the limitations of the v1 protocol).

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  reply	other threads:[~2009-02-08 23:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-07 14:29 Hacking SuperDome Thomas Bogendoerfer
2009-02-08  4:30 ` Kyle McMartin
2009-02-08 17:05   ` Kyle McMartin
2009-02-08 23:15     ` Matthew Wilcox [this message]
2009-02-08 11:33 ` Matthew Wilcox
2009-02-11  7:23 ` Grant Grundler
2009-02-11 10:00   ` Thomas Bogendoerfer
2009-02-11 16:26     ` Matthew Wilcox
2009-02-11 17:02     ` Grant Grundler
2009-02-11 18:14   ` Kyle McMartin
2009-02-11 18:28     ` Kyle McMartin
2009-02-11 19:29     ` Grant Grundler
2009-02-12  0:36 ` Kyle McMartin
2009-02-13 20:46   ` Thomas Bogendoerfer
2009-02-15 15:33 ` Jan-Benedict Glaw

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=20090208231533.GI31509@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=kyle@infradead.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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.