linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Andrew_Klosterman@3com.com
To: linuxppc-dev@lists.linuxppc.org
Subject: PPC kernel bootstrapping and relocation
Date: Tue, 3 Aug 1999 16:52:47 -0700	[thread overview]
Message-ID: <882567C2.008325F6.00@hqoutbound.ops.3com.com> (raw)





I have inherited a board (developed in-house) and been tasked with porting Linux
to it.  I have started from the 2.2.10 kernel and have been able to get the boot
process working up to the branch to identify_machine in /arch/ppc/kernel/head.S.
Coming to this point, I still have some nagging questions that I hope someone
with more experience porting operating systems (Linux) to PPC hardware can help
me with.

1. What is the rationale behind the address at which the kernel should be
compiled?  There is the KERNELLOAD value defined in /arch/ppc/Makefile that is
set to 0xc000_0000 as well as a value in /include/asm-ppc/page.h that defines
PAGE_OFFSET and KERNELBASE to 0xc000_0000.  KERNELLOAD is used as the text
linkage address for the kernel, but the kernel gets relocated during the boot
process.

2. Is the kernel supposed to run at 0 or at 0xc000_0000?  Sure it gets compiled
for 0xc000_0000, but then it gets copied down to zero by relocate_kernel in
/arch/ppc/kernel/head.S.

3. Do the BATs do the necessary translation of addresses while the kernel is
starting/running (wherever it end up executing at)?  I haven't quite sorted out
the way that memory ends up for the running kernel because I haven't yet managed
to get the kernel running yet.  :)

4. Ultimately, what is the view of memory that the BATs set up for the kernel?
(This leads in to point #5.)

5. How can I exclude the kernel from using certain memory regions?  I have some
special memory areas to worry about that other hardware on this board needs.
Therefore, I need to be able to exclude some memory ranges from use by the
kernel.  Any hints?

6. What sort of environment is the kernel expecting to be starting from?  What
are the default settings for the memory architecture (BATs) that is expected?  I
still have to deal with the peculiarities of this particular board, but I can
have my own boot code set things up to a more standard configuration before
passing jumping to the kernel start.

Thanks for whatever aid you can contribute to yet another Linux port!

--Andy Klosterman



[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

             reply	other threads:[~1999-08-03 23:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-03 23:52 Andrew_Klosterman [this message]
1999-08-04  0:29 ` PPC kernel bootstrapping and relocation Paul Mackerras
1999-08-04  9:02   ` Adrian Cox

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=882567C2.008325F6.00@hqoutbound.ops.3com.com \
    --to=andrew_klosterman@3com.com \
    --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).