-------- Original-Nachricht -------- > Datum: Tue, 15 Mar 2011 18:49:24 +0100 > Von: Sven Luther <s...@z-innov.com> > An: Gerhard Pircher <gerhard_pirc...@gmx.net> > CC: nello martuscielli <ppc.ad...@gmail.com>, linuxppc-dev@lists.ozlabs.org, > acrux...@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 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev