Date: Thu, 24 Jul 2008 17:02:38 -0700 From: "Jerry Toung" <jrytoung@gmail.com> To: "Oleksandr Tymoshenko" <gonzo@freebsd.org> Cc: freebsd-mips@freebsd.org Subject: Re: mips_phys_mask define Message-ID: <86068e730807241702u10c031a7k84cbcadaf727b810@mail.gmail.com> In-Reply-To: <4888F674.4010004@freebsd.org> References: <86068e730807241333v4d9f35d4ve4e4a266bb6d8121@mail.gmail.com> <4888F674.4010004@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 24, 2008 at 2:39 PM, Oleksandr Tymoshenko <gonzo@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86068e730807241702u10c031a7k84cbcadaf727b810>
