Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jul 2008 00:39:00 +0300
From:      Oleksandr Tymoshenko <gonzo@freebsd.org>
To:        Jerry Toung <jrytoung@gmail.com>
Cc:        freebsd-mips@freebsd.org
Subject:   Re: mips_phys_mask define
Message-ID:  <4888F674.4010004@freebsd.org>
In-Reply-To: <86068e730807241333v4d9f35d4ve4e4a266bb6d8121@mail.gmail.com>
References:  <86068e730807241333v4d9f35d4ve4e4a266bb6d8121@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4888F674.4010004>