603 support

mol-devel@lists.maconlinux.org mol-devel@lists.maconlinux.org
Wed, 1 May 2002 20:42:18 +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 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).

> 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