linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <bh40@calva.net>
To: Gabriel Paubert <paubert@iram.es>, linuxppc-dev@lists.linuxppc.org
Cc: paulus@cs.anu.edu.au
Subject: Re: Problem with iMacs and kernel entry
Date: Mon, 15 Feb 1999 17:48:41 +0100	[thread overview]
Message-ID: <19990215174841.011716@mail.mipsys.com> (raw)
In-Reply-To: <Pine.HPP.3.96.990215164341.5352k-100000@gra-ux1.iram.es>


On Mon, Feb 15, 1999, Gabriel Paubert <paubert@iram.es> wrote:

>Well, in prepboot the MMU is enabled for a lot of reasons. This requires
>the installation of 603 TLB miss handlers (which are well tested since I
>only have 603), then I play with a lot of I/O (including complete
>reconfiguration of PCI I/O and memory spaces to work around braindead PreP
>firmware: I don't want to sacrifice 256 Mb to PCI I/O) and disable the MMU
>before passing control to the kernel.  So it's doable. There are also some
>documents about how to perform a smooth transition of MMU management
>between OF and client program.  I wanted to implement this but am lacking
>time right now.

I'm interested in pointer to those documents, do you have URLs handy ?

I finally have the boostrap working on my G3. It's about 400 bytes of PPC
asm, that's all ;-) Basically, what it does is:

 - Switch Interrupts off, MMU off, invalidate BATs, flush TLB
 - Copy itself elsewhere in case it overlaps the kernel destination
 - Execute a "script" of copy operations to perform, the script is appended to
   the boostrap itself by BootX. This scripts will copy kernel pages from
whatever
   location they occupy in memory (kernel is not made contiguous under
MacOS anymore).
   At the end of this process, we have the kernel copied at 0 physical
and contiguous
   (by "kernel", I mean here the pack
kernel+ramdisk+args+colormap+device-tree.
 - The kernel is entered with a stack pointer pointing to the
(top-512bytes) of
   a 64Kb area located just after the kernel "block".

The best way to fix the iMac problem is, I beleive, to move the code for
switching the USB controller off to BootX (it's in a BootX-specific
section of code anyway) and remove the one in the kernel. This will cause
compatibility trouble between new BootX and old kernels on the iMac, but
iMac users, I beleive, still update their kernels quite often, so it's
not a very big problem. Note that we can probably remove the
page-touching code from prom.c too.

-- 
           E-Mail: <mailto:bh40@calva.net>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>





[[ 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. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

      reply	other threads:[~1999-02-15 16:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-15 12:41 Problem with iMacs and kernel entry Benjamin Herrenschmidt
1999-02-15 15:55 ` Gabriel Paubert
1999-02-15 16:48   ` Benjamin Herrenschmidt [this message]

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=19990215174841.011716@mail.mipsys.com \
    --to=bh40@calva.net \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=paubert@iram.es \
    --cc=paulus@cs.anu.edu.au \
    /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).