Subject: Re: "pmap_unwire: wiring ... didn't change!"
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Chuck Silvers <chuq@chuq.com>
List: port-mips
Date: 09/03/2005 08:46:50
On Sat, Sep 03, 2005 at 02:10:05AM +0900, Izumi Tsutsui wrote:
> > my point was, in any running kernel the pagemask will always be the same,
> > 0x1800 for 4100s and 0 for everything else.  we shouldn't need to
> > save and restore the pagemask in more places if it's always 0x1800 than
> > if it's always 0, should we?
> 
> On ews4800mips, the pagemask is 0x1ffe000 on PROM but the previous
> MachTLBUpdate() updates (and actually initializes, because old
> pagemask is not restored there) it on creating a new TLB entry,
> then new mipsX_subr.S (which no longer creates an entry)
> cause "uninitialized pagemask" problem.
> I just thought the same scenario could happen on hpcmips.

sure, I agree that we need to initialize pagemask.

I put in some code to print the pagemask value that the kernel inherits
when it gets control and it's 0.  I'm just thinking that once pagemask
is initialized, the need to save and restore it is the same regardless
of whether we initialized it to 0x1800 (for 41xx) or 0 (for everything else).
your most recent patch does more saves/restores for 41xx than for the
other CPU variations.

your most recent patch still doesn't work, though.
it also hangs before printing the copyright.


> arch/hpcmips/pbsdboot/vr41xx.c has "1KByte page" comment,
> but I don't know it means the pagesize register is zero on
> pbsdboot.

it seems that pbsdboot does use a pagemask of 0, I printed the TLB entries
that pbsdboot installs (just calling db_tlbdump_cmd()) and the pagemask
is 0 for all of them.

-Chuck