Thread (12 messages) 12 messages, 7 authors, 2011-03-16

Re: any chance to use a modern linux kernel on Pegasos1 G3 ?

flat view

From: Gerhard Pircher <hidden>
Date: 2011-03-15 20:09:00

-------- Original-Nachricht --------
Datum: Tue, 15 Mar 2011 18:49:24 +0100
Von: Sven Luther [off-list ref]
An: Gerhard Pircher [off-list ref]
CC: nello martuscielli <redacted>, 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:
[...]
quoted
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) :
quoted
       node = call_prom("finddevice", 1, 1, "/");
       rc = call_prom("getprop", 4, 1, node, "model", model,
sizeof(model));
quoted
quoted
       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
quoted
quoted
                * loaded by an OF bootloader which did set a BAT for
us.
quoted
quoted
                * 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",
quoted
quoted
                                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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help