From: "Dale Farnsworth" <dale@farnsworth•org>
To: Paul Mackerras <paulus@samba•org>
Cc: linuxppc-dev@lists•linuxppc.org
Subject: Re: Patch boot/common/relocate.S to start kernel at 0x000c
Date: Tue, 11 Mar 2003 11:45:11 -0700 [thread overview]
Message-ID: <20030311184511.GA3776@rover.farnsworth.org> (raw)
In-Reply-To: <15973.24544.124365.553602@argo.ozlabs.ibm.com>
On Wed, Mar 05, 2003 at 02:24:32AM +0000, Paul Mackerras wrote:
> Well, there is no reason why the secondary hold code shouldn't just
> reference an ordinary variable in the kernel data section. It would
> take a couple more instructions, but that shouldn't be a problem. The
> starting address for the secondary hold code needs to be well-known
> (at least to the prep boot wrapper) but the variable that it spins on
> doesn't.
>
> Paul.
I took a stab at implementing this. It's simple when the kernel text
and data are relocated as a unit and PIC references work. Unfortunately,
that doesn't always happen. On OF machines, prom_hold_cpus() in
prom_init.c only copies the first 0x100 bytes of kernel text to
location 0 and starts the secondary cpus running at secondary_hold()
within that area. I thought of passing in a pointer to kernel data,
but that's not sufficient because it looks like in some cases kernel
data is relocated while secondary_hold() is running.
So, if kernel data may be relocated while secondary_hold is polling,
the polled location can't be in kernel data. Location 0x0 and 0x4 are
beginning to look good to me.
Does this seem right, or am I misreading the code?
-Dale
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2003-03-11 18:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-04 19:16 Patch boot/common/relocate.S to start kernel at 0x000c Dale Farnsworth
2003-03-04 19:24 ` Dan Malek
2003-03-04 20:13 ` Dale Farnsworth
2003-03-04 20:21 ` Dan Malek
2003-03-04 23:08 ` Dale Farnsworth
2003-03-04 23:21 ` Dan Malek
2003-03-04 23:35 ` Dale Farnsworth
2003-03-04 23:42 ` Tom Rini
2003-03-05 0:07 ` Dale Farnsworth
2003-03-05 0:47 ` Paul Mackerras
2003-03-05 1:01 ` Wolfgang Denk
2003-03-05 1:03 ` Wolfgang Denk
[not found] ` <20030305022134.GR24171@kalmia.hozed.org>
2003-03-05 4:40 ` Dale Farnsworth
2003-03-05 17:07 ` Tom Rini
2003-03-05 17:24 ` Dan Malek
[not found] ` <15973.24544.124365.553602@argo.ozlabs.ibm.com>
2003-03-05 4:28 ` Dale Farnsworth
2003-03-05 9:54 ` Benjamin Herrenschmidt
2003-03-05 17:10 ` Tom Rini
2003-03-11 18:45 ` Dale Farnsworth [this message]
2003-03-13 22:38 ` Dale Farnsworth
2003-03-14 11:43 ` Gabriel Paubert
2003-03-14 17:52 ` Dale Farnsworth
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=20030311184511.GA3776@rover.farnsworth.org \
--to=dale@farnsworth$(echo .)org \
--cc=linuxppc-dev@lists$(echo .)linuxppc.org \
--cc=paulus@samba$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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