mips_phys_mask define

Oleksandr Tymoshenko gonzo at freebsd.org
Thu Jul 24 21:39:20 UTC 2008


Jerry Toung wrote:
> Hello list,
> still learning. Could someone explain why
> MIPS_PHYS_MASK is 0x1fffffff and not 0x7fffffff when you want to convert a
> program's address
> back to physical?
     MIPS_PHYS_MASK is used to convert addresses from KSEG0 and KSEG1 to physical
ones. KSEG0 and KSEG1 are 2**29 bytes each. So the mask should be 2**29 - 1.
That gives us 0x1fffffff.

I'd suggest you to read MIPS32(tm) Architecture For Programmers Volume III:
The MIPS32(tm) Privileged Resource Architecture. It's a nice starting point.
You can download the document from mips.com site.

-- 
gonzo


More information about the freebsd-mips mailing list