603 support

Benjamin Herrenschmidt mol-devel@lists.maconlinux.org
Wed, 30 Aug 2034 16:23:44 +0200


>On Wed, May 01, 2002 at 12:45:44PM -0500, Greg Alexander wrote:
>> 1.) Is there still a way to get the current MOL working with a 2.2.20
>> kernel?  i.e. when did linux stop using page tables on the 603?
>> 
>Hmm... I think it ought to work. The 603 code is present
>in recent 2.2 kernels (but disabled by default). Change
>
>	#define NO_RELOAD_HTAB 	1

To be precise, linux do use the page tables, it doesn't use the hash
table.

Greg: what happens is that the 603 doesn't autmatically load PTEs
from the hash table. Instead, it faults on TLB miss exceptions which
are then responsible for loading the TLB appropriately.

The kernel 2.4 and the kernel 2.2 with NO_RELOAD_HTAB set to 1 will
directly load the TLBs from the linux page tables. The kernel 2.2
without the NO_RELOAD_HTAB "emulates" the hash table by using
TLB miss exception vectors that do the hash table lookup.

The performance of the whole kernel is much better when loading the
TLBs directly from the linux page tables, so it would be better
to make MOL work with it instead of relying on the old behaviour.

>to zero in arch/ppc/kernel/head.S and arch/ppc/mm/init.c
>in order to activate it. To get mol running, you will
>have to disable the 603 hooks (and the SDR1 manipulation).
>
>> 2.) The 603 problems seem to be related to telling linux that we've got
>> a 603... why not tell it we're running a sort of 604 in a kernel patch? 
>> Then wouldn't it use "real" page tables?
>
>More or less, but the exception handlers for the 603 traps 
>are needed (those that are in the 2.2 kernel).

As I stated above, the 603 don't have the HW to lookup the hash
table automatically.

>> 3.) If not #2, what do we currently try to do to get around the kernel
>> not using PPC page tables?
>> 
>> It looks to me like we build our own hash table, correct?
>
>Yes. Essentially MOL contains the code that used to be in
>the 2.2 kernels.
>
>> How do we ensure that this is kept in sync with what's really in memory?
>
>The same way as on non-603 machines. MOL uses a hook to detect
>page table flushes. If a page used by MOL is affected, it
>is flushed from the hash table and and TLB cache.
>
>> 4.) Do we really need to use SDR1? (not that I suspect this is the
>> problem, but it's worth looking into.)  Actually, the SDR1 code looks a
>> little suspiscious to me.  I'm going to look at it some more.
>
>The benefit of using SDR1 is that the hardware computes certain
>things before the 603 exception is taken. It is not *necessary*
>to use SDR1, but it simplifies things. And since the kernel
>doesn't use it...
>
>Cheers,
>
>/Samuel
>_______________________________________________
>mol-devel mailing list
>mol-devel@lists.maconlinux.org
>http://lists.maconlinux.org/mailman/listinfo/mol-devel