Subject: Re: VM change for R4000
To: None <port-mips@netbsd.org>
From: Toru Nishimura <locore64@alkyltechnology.com>
List: port-mips
Date: 03/13/2005 11:21:17
> mixing KSEG access and VA access will make no virtual alias condition.

Here goes what VM must care for R4000 VIPT cache.

1. the natural size to handle VA
The minimal is 8KB, aligned in that size.  4K+4K due to dual entry TLB design.
Cache size and way makes more constraints.  If 16KB direct mapped, the
VA chunk size is 16KB.  If 16KB 2 away set associative, 8KB.  If 16KB 4 way
associative, this is PIPT cache and plain 8KB is just OK to handle all the case
without any additional care.  (escape for the last resort...)

2. VM chooses all VA in the natural size mentioned above to avoid any single
page to share incompatible VA.  If VM allows pages to have incompatible VA,
virtual alias would happen and it's *impossible* to care at runtime.

3. VM chooses all PA compatible VA.  Even KSEG0 access is attempted, virtual
alias will never happen since all cache line is stored in predetermined cache line
store.

4. kernel must ensure mmap() to return compatible VA when user tries to take
VA for any purpose.  Dynld is a typical case.

Toru Nishimura/ALKYL Technology