Subject: Re: bumping ASID
To: None <port-mips@netbsd.org, nisimura@itc.aist-nara.ac.jp>
From: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
List: port-mips
Date: 03/28/2000 16:27:24
Jason Thorpe replied to my question;

>> I have a question about how ASID (== TLBpid, ASN) should be managed.
>> Should kernel_pmap() be immune to bump ASID by pmap_asid_alloc()? (see
>> mips/mips/pmap.c)
>
> Look at how its done in NetBSD/alpha.  Kernel mappings are all Global,
> so the ASID doesn't apply.  In NetBSD/alpha, I think I made the kernel
> use a "reserved" ASN (the Alpha name for ASID) which also meant "invalid"
> for user pmaps.

Got it.  I'll seek a solution to modify cpu_switch_resume() or
cpu_switch() rather than add "if (pmap == kernel_map())" conditional
in pmap_alloc_asid() because MIPS processor's "current ASID" is
updated as a side effect of setting TLB entry Hi/Lo pairs, and (ahem)
I'm not sure whether 'G' bit for pmap0 is (correctly) ensured for MIPS
pmap.c this moment. 

Tohru Nishimura