linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: msokolov@ivan.Harhan.ORG (Michael Sokolov)
To: linuxppc-dev@lists.linuxppc.org
Subject: Re: Please make K2 Linux bootable without PeeMON again
Date: Tue, 27 Nov 01 07:33:27 PST	[thread overview]
Message-ID: <0111271533.AA24180@ivan.Harhan.ORG> (raw)


Tom Rini <trini@kernel.crashing.org> wrote:

> Er, why can't you find the magic location for the bi_recs and set that
> as well as the other registers you need to?

Because that location is tied to the kernel's symbols (__bss_start in this
case), and I have no way of knowing where that is. The kernel has already been
loaded into memory (by occult) by the time my booter runs, and my booter
doesn't have access to the original vmlinux ELF header or to System.map.

> > The patch below makes the K2 vmlinux expect a pointer to bi_recs in R3 like I
> > do on the Adirondack and makes the "simple" zImage goo pass a pointer to its
> > magic bi_recs in R3.
>
> And breaks all of the other ports which use 'simple' and expect bi_recs
> in the 'normal' place.

No, it doesn't. The patch I posted yesterday doesn't and cannot break anything.
The bi_recs are still being created in exactly the same place as before, I just
made the wrapper set R3 to point to that location before jumping to the kernel.
As R3 on entry to the kernel was previously undefined for "simple", this cannot
break anything. Why R3? Because there already is a precedent for it
(Adirondack).

> For now I'd much rather add back in the register
> checks.

You mean put arch/ppc/platforms/k2_setup.c back the way it was? That would work
for me. In that case you would also need to make
arch/ppc/boot/common/relocate.S put at least some meaningful values in R4 and
R6 (at least zeros) so that the kernel doesn't interpret garbage in those
registers as pointers to stuff.

> For 2.5 we can agree on a less magical and more predictable
> location.  Would somewhere around the end of memory work for you?

But why won't you just let me put it where I want and tell the kernel where I
put it? I'll fork Linux if I have to, but I would prefer not to.

MS

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

             reply	other threads:[~2001-11-27 15:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-27 15:33 Michael Sokolov [this message]
2001-11-27 15:58 ` Please make K2 Linux bootable without PeeMON again Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2001-11-27 20:58 Michael Sokolov
2001-11-27 20:40 Michael Sokolov
2001-11-27 20:50 ` Tom Rini
2001-11-27 18:46 Michael Sokolov
2001-11-27 20:21 ` Tom Rini
2001-11-27 16:34 Michael Sokolov
2001-11-27 18:19 ` Tom Rini
2001-11-26 21:01 Michael Sokolov
2001-11-27  5:24 ` Tom Rini

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=0111271533.AA24180@ivan.Harhan.ORG \
    --to=msokolov@ivan.harhan.org \
    --cc=linuxppc-dev@lists.linuxppc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).