All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gerhard Pircher" <gerhard_pircher@gmx.net>
To: Sven Luther <sven@z-innov.com>
Cc: ppc.addon@gmail.com, linuxppc-dev@lists.ozlabs.org, acrux_it@libero.it
Subject: Re: any chance to use a modern linux kernel on Pegasos1 G3 ?
Date: Tue, 15 Mar 2011 21:08:55 +0100	[thread overview]
Message-ID: <20110315200855.240730@gmx.net> (raw)
In-Reply-To: <20110315174924.GA24001@z-innov.com>


-------- Original-Nachricht --------
> Datum: Tue, 15 Mar 2011 18:49:24 +0100
> Von: Sven Luther <sven@z-innov.com>
> An: Gerhard Pircher <gerhard_pircher@gmx.net>
> CC: nello martuscielli <ppc.addon@gmail.com>, linuxppc-dev@lists.ozlabs.org, acrux_it@libero.it
> Betreff: Re: any chance to use a modern linux kernel on Pegasos1 G3 ?

> On Tue, Mar 15, 2011 at 06:14:48PM +0100, Gerhard Pircher wrote:
[...]

> > On the other side you mentioned this workaround in
> > arch/ppc/kernel/prom_init.c to me some time ago:
> > 
> > unsigned long __init prom_init(int r3, int r4, prom_entry pp) :
> > >        node = call_prom("finddevice", 1, 1, "/");
> > >        rc = call_prom("getprop", 4, 1, node, "model", model,
> sizeof(model));
> > >        if (rc > 0 && !strncmp (model, "Pegasos", 7)
> > >                && strncmp (model, "Pegasos2", 8)) {
> > >                /* Pegasos 1 has a broken translate method in the OF,
> > >                 * and furthermore the BATs are mapped 1:1 so the phys
> > >                 * address calculated above is correct, so let's use
> > >                 * it directly.
> > >                 */
> > >        } else if (offset == 0) {
> > >                /* If we are already running at 0xc0000000, we assume
> we were
> > >                 * loaded by an OF bootloader which did set a BAT for
> us.
> > >                 * This breaks OF translate so we force phys to be 0.
> > >                 */
> > >                prom_print("(already at 0xc0000000) phys=0\n");
> > >                phys = 0;
> > >        } else if (call_prom("getprop", 4, 1, prom_chosen, "mmu",
> > >                             &prom_mmu, sizeof(prom_mmu)) <= 0) {
> > >                prom_print(" no MMU found\n");
> > >        } else if (call_prom_ret("call-method", 4, 4, result,
> "translate",
> > >                                 prom_mmu, &_stext, 1) != 0) {
> > >                prom_print(" (translate failed)\n");
> > >        } else {
> > >                /* We assume the phys. address size is 3 cells */
> > >                phys = result[2];
> > >        }
> > 
> > Can anybody comment, if this "broken translate method in the OF" would
> > still be needed for arch/powerpc?
> 
> Well, since this is long dead hardware not produced anymore, i don't see
> how the OF could have unbroken itself by moving to powerpc.
> 
> It has been age since i looked into this, but to the best of my knowledge
> (and i wrote the above code or at least the earlier versions) it should
> be still broken.
Any idea then, how the workaround can be ported to arch/powerpc/ or if
there is a better one available?

regards,
Gerhard
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

  reply	other threads:[~2011-03-15 20:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12 19:05 any chance to use a modern linux kernel on Pegasos1 G3 ? nello martuscielli
2011-03-12 19:38 ` kevin diggs
2011-03-14 12:39   ` nello martuscielli
2011-03-15 16:44     ` nello martuscielli
2011-03-15 16:54       ` Baurzhan Ismagulov
2011-03-15 17:14       ` Gerhard Pircher
2011-03-15 17:49         ` Sven Luther
2011-03-15 20:08           ` Gerhard Pircher [this message]
2011-03-15 21:41             ` Sven Luther
2011-03-16  0:23               ` acrux
2011-03-16  8:14                 ` Sven Luther
2011-03-16 23:39         ` nello martuscielli
  -- strict thread matches above, loose matches on Subject: below --
2011-03-18 16:11 Gerhard Pircher

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=20110315200855.240730@gmx.net \
    --to=gerhard_pircher@gmx.net \
    --cc=acrux_it@libero.it \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ppc.addon@gmail.com \
    --cc=sven@z-innov.com \
    /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.