Subject: Re: Kernel Start-up Question
To: None <ijonglin@EE.Princeton.EDU>
From: Ken Nakata <kenn@synap.ne.jp>
List: port-mac68k
Date: 08/26/1998 11:32:44
On Tue, 25 Aug 98 21:13:46 EDT, I-Jong Lin wrote:
> 
> The '040 definitely has its MMU off.  However, I'm unsure whether
> the initial '030 (pre-accelerator swithch) has its MMU off.  Well, actually, 
> I'm not too sure  -- before I asked a question to newsgroup whether logical 
> address 0 was equal to physical address 0 when netbsd hit the start symbol.
> And the general consensus was no, that was not true -> ergo, my belief that
> MMU in the '030 must be off. 

The answer "no" was "in general"; i.e. it may be yes under a
particular circumstance but you cannot generally guarantee that it is
always "yes" under any circumstance.  IOW, that may depend on the
machine you are talking about.  IIci and IIsi come to mind IIRC.

Anyway, you might want to pass some of the 030's context to the 040
through reset vector's initial SP.

	- Save context including MMU registers to somewhere.
	- Get the physical address of the saved context - you must
	check MMU status here.
	- *(void *)0 = physical address of instruction you want 040 to
	start.
	- *(void *)4 = physical address of the saved context.
	- Wake up 040.

When 040 starts execution, it can just pop the context from the stack.
With this, even if 030 MMU is enabled, there's at least a way to
reconstruct the mapping from the page table in memory because you have
access to the Root Pointers.

Ken