Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: evbppc reserved-tlb cleanup



On Sun, Sep 24, 2006 at 03:33:27PM +0200, Jachym Holecek wrote:
> # Izumi Tsutsui 2006-09-24:
> > freza%dspfpga.com@localhost wrote:
> > 
> > > Hmm, can you try moving consinit() after TLB setup? It doesn't matter
> > > whether you try with or without my patch. After recent mapiodev() changes,
> > > bus_space_map() must be called after reserved TLB entries were filled
> > > (back then, I overlooked Explora451 calls consinit() earlier than that,
> > > sorry for breakage).
> > 
> > I moved consinit() right after set_tlb()s in explora/machdep.c:bootstrap(),
> > now kernel got the following panic:
> > 
> > panic: mapiodev: no TLB entry reserved for 740000c0+2
> > Stopped at  0x2698fc:       lxz     r0, r1, 0x14
> > db> 
> > 
> > It looks pckbc also needs to be mapped.
> 
> Hmm, interesting it worked before (pckbc was never reserve-mapped ;-).
> I guess we can uncondionally map 0x7400'0000 -- 0x7500'0000 like below
> (patch against -current, see the very end).
> 
>       -- Jachym

The current set_tlb() aligns its address as 'addr &= ~(TLB_PG_SIZE-1);'

This converts BASE_COM == 0x740005f0 to 0x74000000 and so maps the complete
ISA bus.

Best way is to add a '#define BASE_ISA 0x74000000' to evbppc/include/explora.h
and use it here like

        ppc4xx_tlb_reserve(BASE_ISA, BASE_ISA, TLB_PG_SIZE, TLB_I | TLB_G);
#ifndef COM_IS_CONSOLE
        ppc4xx_tlb_reserve(BASE_FB,  BASE_FB,  TLB_PG_SIZE, TLB_I | TLB_G);
        ppc4xx_tlb_reserve(BASE_FB2, BASE_FB2, TLB_PG_SIZE, TLB_I | TLB_G);
#endif

-- 
Juergen Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig 
(Germany)



Home | Main Index | Thread Index | Old Index