mips_phys_mask define

Jerry Toung jrytoung at gmail.com
Fri Jul 25 00:02:40 UTC 2008


On Thu, Jul 24, 2008 at 2:39 PM, Oleksandr Tymoshenko <gonzo at freebsd.org>
wrote:

> 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
>

thank you for the explaination Gonzo.
I have been reading "see MIPS run Linux, 2nd edition" as suggested by Warner
a while back.
I'll download the doc you mentioned.

Jerry


More information about the freebsd-mips mailing list