From owner-svn-src-user@FreeBSD.ORG Sat Jun 19 10:23:24 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A2BC1065670; Sat, 19 Jun 2010 10:23:24 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3D828FC0A; Sat, 19 Jun 2010 10:23:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5JANNkU052473; Sat, 19 Jun 2010 10:23:23 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5JANNLq052471; Sat, 19 Jun 2010 10:23:23 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201006191023.o5JANNLq052471@svn.freebsd.org> From: Juli Mallett Date: Sat, 19 Jun 2010 10:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209336 - user/jmallett/octeon/sys/mips/include X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2010 10:23:24 -0000 Author: jmallett Date: Sat Jun 19 10:23:23 2010 New Revision: 209336 URL: http://svn.freebsd.org/changeset/base/209336 Log: Add notes about comments I need to update and attempt to explain the wired bit (and mostly fail.) Modified: user/jmallett/octeon/sys/mips/include/pte.h Modified: user/jmallett/octeon/sys/mips/include/pte.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/pte.h Sat Jun 19 10:14:43 2010 (r209335) +++ user/jmallett/octeon/sys/mips/include/pte.h Sat Jun 19 10:23:23 2010 (r209336) @@ -55,6 +55,8 @@ typedef pt_entry_t *pd_entry_t; #define TLBMASK_MASK ((PAGE_MASK >> TLBMASK_SHIFT) << TLBMASK_SHIFT) /* + * XXX This comment is not correct for FreeBSD. + * * PFN for EntryLo register. Upper bits are 0, which is to say that * bit 29 is the last hardware bit; Bits 30 and upwards (EntryLo is * 64 bit though it can be referred to in 32-bits providing 2 software @@ -73,11 +75,14 @@ typedef pt_entry_t *pd_entry_t; #define TLBLO_PTE_TO_PA(pte) (TLBLO_PFN_TO_PA(TLBLO_PTE_TO_PFN((pte)))) /* + * XXX This comment is not correct for anything more modern than R4K. + * * VPN for EntryHi register. Upper two bits select user, supervisor, * or kernel. Bits 61 to 40 copy bit 63. VPN2 is bits 39 and down to * as low as 13, down to PAGE_SHIFT, to index 2 TLB pages*. From bit 12 * to bit 8 there is a 5-bit 0 field. Low byte is ASID. * + * XXX This comment is not correct for FreeBSD. * Note that in FreeBSD, we map 2 TLB pages is equal to 1 VM page. */ #define TLBHI_ASID_MASK (0xff) @@ -121,7 +126,9 @@ typedef pt_entry_t *pd_entry_t; * VM flags managed in software: * RO: Read only. Never set PTE_D on this page, and don't * listen to requests to write to it. - * W: Wired. ??? + * W: Wired. Allows us to quickly increment and decrement + * the wired count by looking at the PTE and skip wired + * mappings when removing mappings from a process. */ #define PTE_RO (0x01 << TLBLO_SWBITS_SHIFT) #define PTE_W (0x02 << TLBLO_SWBITS_SHIFT)