Subject: Re: MMU problems (Was: JavaStation w/ OBP3 - some progress)
To: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
From: Pete Zaitcev <zaitcev@redhat.com>
List: port-sparc
Date: 04/11/2001 15:38:08
On Wed, Apr 11, 2001 at 10:50:46AM +0400, Valeriy E. Ushakov wrote:
> Date: Wed, 11 Apr 2001 10:50:46 +0400
> From: "Valeriy E. Ushakov" <uwe@ptc.spbu.ru>
> To: zaitcev@redhat.com
> Subject: [uwe@ptc.spbu.ru: Re: MMU problems (Was: JavaStation w/ OBP3 ...)]
> User-Agent: Mutt/1.3.3i

> I'm not sure if you're subscribed to the port-sparc@netbsd.  Sorry for
> spamming if you do.

It's ok. I follow your progress with the help of mail-index,
so I know that you found 1275 support in NetBSD decided against
using PROLL.

> Do you have any hints as to why this netbsd code, that is essentialy
> the same in linux, crashes upon jump to freshly remapped high
> addresses, while linux under proll works fine.

I do not have any good suggestions except to read docs together
with the code. For studying PROLL you need to look into file
plan.t in the top directory. CPU core is described well in
sparc v8 (available from sparc.com for free), and in IIep manual
(minus the PCI controller):
http://www.sun.com/microelectronics/manuals/microSPARC-IIep/802-7100-01.pdf

> Date: Tue, 10 Apr 2001 10:41:37 +0400
> From: "Valeriy E. Ushakov" <uwe@ptc.spbu.ru>
> To: port-sparc@netbsd.org

> > ! right before we do the remap
> > 
> > ok %pc dis      
> > 7184     sta         %l4, [%o1]20
> > 7188     sethi       f0007000, %g1	! startmap_done:
> > 718c     or          %g1, 198, %g1
> > 7190     jmp         %g1, %g0, %g0
> > 7194     sethi       0, %g0
> > 
> > ok f0007000 map?
> > Virtual  : f000.7000 
> > Context  : @ 0.03ff.f000  003f.eec1 # 0 
> > Region   : @ 0.03fe.efc0  003f.eeb1 
> > Segment  : @ 0.03fe.eb00  003f.eea1 
> > Page     : @ 0.03fe.ea1c  003f.c1fe Cached Modified Referenced Access : rwx---
> > Physical : 0.03fc.1000  

First thing that stands out is that you did not quote
"f0007000 20 dump" or equivalent before the jump.
You just look at maps. It is possible that you have good
maps that point at garbage.

Second, before you start, visit nodes "virtual-memory"
and "memory" and get ".properties" on paper. That will
give you an idea of virtual addresses and physical memory
that you must not touch.

-- Pete