From owner-freebsd-mips@FreeBSD.ORG Fri Jul 25 00:02:39 2008 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE1E31065686 for ; Fri, 25 Jul 2008 00:02:39 +0000 (UTC) (envelope-from jrytoung@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.232]) by mx1.freebsd.org (Postfix) with ESMTP id 856338FC08 for ; Fri, 25 Jul 2008 00:02:39 +0000 (UTC) (envelope-from jrytoung@gmail.com) Received: by wr-out-0506.google.com with SMTP id c8so1419595wra.27 for ; Thu, 24 Jul 2008 17:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=P714na9hTvVrNnvtp+feD2UTFF48ZmTotOBdKXk54G0=; b=HrgsyxhAUIOY6kq93FwUD+fxgdE1RoJTGM2h9W0VZqdq4RdtxFMzd4ZDoytsfFDn4c gGVzbFB8ZKwtW1WyrecZLWYMUjTOKxP3LoTNJUp+LhoV4yP5AiCGOpRFChKGKTeTfAla ClEysvacKVbZPqU8b5BRSugXRe9qnMrEw/Tt8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=HwKVGnQCNkOpbDxzQgG63QrYKxkFUyQkdiTaDakKzY+nF2pEEHSGu91mOQ3cVgiZF4 nz7fCnI/0gB1VMn6KX2FeNZvSBv3wXlWecQm3Myy0Y05XOvHEUYo4OtX6w9ZGsbl98fN dZPpJFTi/vunPArnfXpMBiBp/l8I5C8oI7b6g= Received: by 10.90.100.17 with SMTP id x17mr1180594agb.19.1216944158316; Thu, 24 Jul 2008 17:02:38 -0700 (PDT) Received: by 10.90.33.10 with HTTP; Thu, 24 Jul 2008 17:02:38 -0700 (PDT) Message-ID: <86068e730807241702u10c031a7k84cbcadaf727b810@mail.gmail.com> Date: Thu, 24 Jul 2008 17:02:38 -0700 From: "Jerry Toung" To: "Oleksandr Tymoshenko" In-Reply-To: <4888F674.4010004@freebsd.org> MIME-Version: 1.0 References: <86068e730807241333v4d9f35d4ve4e4a266bb6d8121@mail.gmail.com> <4888F674.4010004@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-mips@freebsd.org Subject: Re: mips_phys_mask define X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2008 00:02:40 -0000 On Thu, Jul 24, 2008 at 2:39 PM, Oleksandr Tymoshenko 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