From owner-freebsd-mips@FreeBSD.ORG Fri Jul 9 20:51:33 2010 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 AA9B4106566C; Fri, 9 Jul 2010 20:51:33 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4AF7A8FC2C; Fri, 9 Jul 2010 20:51:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o69KkCT6091191; Fri, 9 Jul 2010 14:46:12 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 09 Jul 2010 14:46:31 -0600 (MDT) Message-Id: <20100709.144631.1141490504242621103.imp@bsdimp.com> To: c.jayachandran@gmail.com From: "M. Warner Losh" In-Reply-To: References: <20100708.021250.1099368555950605809.imp@bsdimp.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: jmallett@FreeBSD.org, freebsd-mips@FreeBSD.org Subject: Re: Merging 64 bit changes to -HEAD - part 4 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, 09 Jul 2010 20:51:33 -0000 In message: "Jayachandran C." writes: : On Thu, Jul 8, 2010 at 2:52 PM, Jayachandran C. : wrote: : > On Thu, Jul 8, 2010 at 1:42 PM, M. Warner Losh wro= te: : >> In message: : >> =A0 =A0 =A0 =A0 =A0 =A0"Jayachandran C." writes: : [...] : >> : pmap-n64.patch : >> : =A0The main n64 patch (from Juli's branch) : >> : =A0 This still uses the old 2-level page tables. But this adds o= ther : >> : pmap code to support n64. I have re-arranged some of =A0Juli's c= ode to : >> : reduce #ifdefs. : >> : >> I think this could be done in smaller bites. =A0At least the : >> MIPS_{PYHS,KSEGx}_TO_{KSEGx,PHYS} stuff can be done as a separate : >> patch. : [...] : > Thanks for the review, I'll try to get the patches other than pmap-= n64 : > in first (with mentor approval). I'll post a new split version of : > pmap-n64 after that. : = : Here are the pmap changes again, along with a ddb patch. : = : kseg-def-to-cpu.h.patch : Move KSEG address definitions from cpu.h to cpuregs.h with the other : definitions, add some XKPHYS related definitions. This looks good. : mips-pmap-intial-n64.patch (from Juli's branch) : Initial changes to pmap.c for n64 support. When compiled for n64, pma= p : can use XKPHYS for a lot of its operations. The page tables are still= : 2-level. +#if !defined(__mips_n64) + if (phys_avail[i - 1] >=3D MIPS_KSEG0_LARGEST_PHYS) + memory_larger_than_512meg =3D 1; +#endif We never set memory_larger_than_512meg then for __mips_n64. Do we need to ifdef both the declaration of this variable, as well as the if (memory_larger_than_512mb) clauses later in the function? pmap_map should likely have a comment to the effect: * For memory that's directly mappable, we return the direct map * address. For other addresses, we create a map. A similar comment is needed for pmap_kenter_temporary, pmap_zero_page, pmap_zero_page_area, pmap_zero_page_idle, pmap_copy_page, pmap_mapdev, pmap_unmapdev, pmap_kextract. Hmmm, or maybe a general comment? : mips-tlb64.patch (from Juli's branch) : 64 bit TLB definitions. This looks good. : mips-ddb-64.patch (from Juli's branch) : Minor fixups for ddb support. Can you explain the casting for all the calls to kbdpeek*? : This should get n64 up to mountroot - let me know you comments. Cool! thanks for your work. Also, I've been providing reviews on many of these commits, but I haven't seen a 'Reviewed by: imp' in the commit messages. I'd appreciate it if you could add then when I provide a review. Warner