From owner-svn-src-user@FreeBSD.ORG Sun Apr 4 23:12:03 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 A9320106564A; Sun, 4 Apr 2010 23:12:03 +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 988278FC0A; Sun, 4 Apr 2010 23:12:03 +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 o34NC3hd051653; Sun, 4 Apr 2010 23:12:03 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34NC32C051652; Sun, 4 Apr 2010 23:12:03 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004042312.o34NC32C051652@svn.freebsd.org> From: Juli Mallett Date: Sun, 4 Apr 2010 23:12:03 +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: r206169 - 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: Sun, 04 Apr 2010 23:12:03 -0000 Author: jmallett Date: Sun Apr 4 23:12:03 2010 New Revision: 206169 URL: http://svn.freebsd.org/changeset/base/206169 Log: o) If we double the number of PTEs in a page table page, we have to double the segment size. If we double the amount of memory each PTE covers we need to double the segment size yet again. Increase the segment shift by 2 since we doubled the page size (and further, define it in terms of shift first and foremost.) Modified: user/jmallett/octeon/sys/mips/include/vmparam.h Modified: user/jmallett/octeon/sys/mips/include/vmparam.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/vmparam.h Sun Apr 4 16:48:33 2010 (r206168) +++ user/jmallett/octeon/sys/mips/include/vmparam.h Sun Apr 4 23:12:03 2010 (r206169) @@ -191,8 +191,8 @@ */ #define VM_NFREEORDER 9 -#define NBSEG 0x400000 /* bytes/segment */ +#define SEGSHIFT 24 /* LOG2(NBSEG) */ +#define NBSEG (1 << SEGSHIFT) /* bytes/segment */ #define SEGOFSET (NBSEG-1) /* byte offset into segment */ -#define SEGSHIFT 22 /* LOG2(NBSEG) */ #endif /* !_MACHINE_VMPARAM_H_ */ From owner-svn-src-user@FreeBSD.ORG Sun Apr 4 23:33:44 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 9ABA2106566C; Sun, 4 Apr 2010 23:33:44 +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 7E4CE8FC08; Sun, 4 Apr 2010 23:33:44 +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 o34NXi1A056442; Sun, 4 Apr 2010 23:33:44 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34NXieS056440; Sun, 4 Apr 2010 23:33:44 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004042333.o34NXieS056440@svn.freebsd.org> From: Juli Mallett Date: Sun, 4 Apr 2010 23:33:44 +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: r206171 - user/jmallett/octeon/sys/mips/mips 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: Sun, 04 Apr 2010 23:33:44 -0000 Author: jmallett Date: Sun Apr 4 23:33:44 2010 New Revision: 206171 URL: http://svn.freebsd.org/changeset/base/206171 Log: o) Adjust bitmasks for PTE and page directory pages. o) Add hazards after mtc0s. Modified: user/jmallett/octeon/sys/mips/mips/exception.S Modified: user/jmallett/octeon/sys/mips/mips/exception.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/exception.S Sun Apr 4 23:19:11 2010 (r206170) +++ user/jmallett/octeon/sys/mips/mips/exception.S Sun Apr 4 23:33:44 2010 (r206171) @@ -136,20 +136,22 @@ MipsDoTLBMiss: PTR_L k1, PC_SEGBASE(k1) beqz k1, 2f #05: make sure segbase is not null #if defined(__mips_n64) - andi k0, k0, 0xff8 #06: k0=seg offset (mask 0x7) + andi k0, k0, 0x1ff8 #06: k0=seg offset (mask 0x7) #else - andi k0, k0, 0x7fc #06: k0=seg offset (mask 0x3) + andi k0, k0, 0x1ffc #06: k0=seg offset (mask 0x3) #endif PTR_ADDU k1, k0, k1 #07: k1=seg entry address + PTR_L k1, 0(k1) #08: k1=seg entry MFC0 k0, COP_0_BAD_VADDR #09: k0=bad address (again) beq k1, zero, 2f #0a: ==0 -- no page table srl k0, PAGE_SHIFT - 2 #0b: k0=VPN (aka va>>10) - andi k0, k0, 0xffc #0c: k0=page tab offset + andi k0, k0, 0x1ffc #0c: k0=page tab offset PTR_ADDU k1, k1, k0 #0d: k1=pte address lw k0, 0(k1) #0e: k0=lo0 pte CLEAR_PTE_SWBITS(k0) MTC0 k0, COP_0_TLB_LO0 #12: lo0 is loaded + HAZARD_DELAY addu k0, TLBLO_PFN_ODD MTC0 k0, COP_0_TLB_LO1 #15: lo1 is loaded HAZARD_DELAY @@ -836,7 +838,7 @@ NLEAF(MipsTLBInvalidException) #if defined(__mips_n64) andi k0, k0, 0x1ff8 # k0=seg offset (mask 0x7) #else - andi k0, k0, 0xffc # k0=seg offset (mask 0x3) + andi k0, k0, 0x1ffc # k0=seg offset (mask 0x3) #endif PTR_ADDU k1, k0, k1 # k1=seg entry address PTR_L k1, 0(k1) # k1=seg entry @@ -847,7 +849,7 @@ NLEAF(MipsTLBInvalidException) MFC0 k0, COP_0_BAD_VADDR # k0=bad address (again) PTR_SRL k0, PAGE_SHIFT - 2 # k0=VPN - andi k0, k0, 0xffc # k0=page tab offset + andi k0, k0, 0x1ffc # k0=page tab offset PTR_ADDU k1, k1, k0 # k1=pte address lw k0, 0(k1) # k0=this PTE @@ -859,8 +861,10 @@ NLEAF(MipsTLBInvalidException) lw k0, 0(k1) CLEAR_PTE_SWBITS(k0) MTC0 k0, COP_0_TLB_LO0 + HAZARD_DELAY addu k0, TLBLO_PFN_ODD MTC0 k0, COP_0_TLB_LO1 + HAZARD_DELAY tlbp HAZARD_DELAY @@ -986,18 +990,19 @@ NLEAF(MipsTLBMissException) #if defined(__mips_n64) andi k0, k0, 0x1ff8 # k0=seg offset (mask 0x7) #else - andi k0, k0, 0xffc # k0=seg offset (mask 0x3) + andi k0, k0, 0x1ffc # k0=seg offset (mask 0x3) #endif PTR_ADDU k1, k0, k1 # k1=seg entry address PTR_L k1, 0(k1) # k1=seg entry MFC0 k0, COP_0_BAD_VADDR # k0=bad address (again) beq k1, zero, MipsKernGenException # ==0 -- no page table PTR_SRL k0, PAGE_SHIFT - 2 # k0=VPN - andi k0, k0, 0xffc # k0=page tab offset + andi k0, k0, 0x1ffc # k0=page tab offset PTR_ADDU k1, k1, k0 # k1=pte address lw k0, 0(k1) # k0=lo0 pte CLEAR_PTE_SWBITS(k0) MTC0 k0, COP_0_TLB_LO0 # lo0 is loaded + HAZARD_DELAY addu k0, TLBLO_PFN_ODD MTC0 k0, COP_0_TLB_LO1 # lo1 is loaded HAZARD_DELAY From owner-svn-src-user@FreeBSD.ORG Sun Apr 4 23:45:13 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 5C53D1065672; Sun, 4 Apr 2010 23:45:13 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C3228FC15; Sun, 4 Apr 2010 23:45:13 +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 o34NjDfY058969; Sun, 4 Apr 2010 23:45:13 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34NjD1k058967; Sun, 4 Apr 2010 23:45:13 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004042345.o34NjD1k058967@svn.freebsd.org> From: Doug Barton Date: Sun, 4 Apr 2010 23:45:13 +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: r206172 - user/dougb/portmaster 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: Sun, 04 Apr 2010 23:45:13 -0000 Author: dougb Date: Sun Apr 4 23:45:13 2010 New Revision: 206172 URL: http://svn.freebsd.org/changeset/base/206172 Log: If we're already root, in addition to unsetting PM_SU_CMD we also need to unset PM_SU_VERBOSE to avoid spamming for no reason. While I'm here, unset euid when we're done with it. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Sun Apr 4 23:33:44 2010 (r206171) +++ user/dougb/portmaster/portmaster Sun Apr 4 23:45:13 2010 (r206172) @@ -38,7 +38,8 @@ if [ -z "$PM_PARENT_PID" ]; then # If we are already root, unset this to avoid potential conflict euid=`ps -o uid $$` ; euid=${euid##* } - [ "$euid" -eq 0 ] && unset PM_SU_CMD + [ "$euid" -eq 0 ] && unset PM_SU_CMD PM_SU_VERBOSE + unset euid fi umask 022 From owner-svn-src-user@FreeBSD.ORG Mon Apr 5 19:25:30 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 01DD51065677; Mon, 5 Apr 2010 19:25:30 +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 E3CFC8FC23; Mon, 5 Apr 2010 19:25:29 +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 o35JPTLK021732; Mon, 5 Apr 2010 19:25:29 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35JPTTa021718; Mon, 5 Apr 2010 19:25:29 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004051925.o35JPTTa021718@svn.freebsd.org> From: Juli Mallett Date: Mon, 5 Apr 2010 19:25:29 +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: r206205 - in user/jmallett/octeon/sys/mips: include mips 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: Mon, 05 Apr 2010 19:25:30 -0000 Author: jmallett Date: Mon Apr 5 19:25:29 2010 New Revision: 206205 URL: http://svn.freebsd.org/changeset/base/206205 Log: o) Add an inline function to do a COP0_SYNC. o) Make intr_disable() just return the IE bit's status. o) Make intr_restore just do intr_enable if intr_disable returned IE, rather than spamming the whole status register. o) Remove some TLB-related macros that are unused and have counterparts in pte.h now. (XXX They should move to tlb.h.) o) Use the existing mips_rd_count() inline for get_cyclecount() rather than having an extern function that does the same thing. o) Convert everything to intr_disable(), intr_enable() and intr_restore(). o) Remove everything but get_intr_mask and set_intr_mask from psraccess. o) Add the EntryHi ASID mask to pte.h. o) Clean up some left-over spam in pmap.c from when I was making the page directory 32-bit on N64. o) Remove trapframe->badvaddr modification that was needed to use the old tlb.S routines. o) Use COP0_SYNC instead of the less-ambitious HAZARD_DELAY for some mtc0 hazards. Modified: user/jmallett/octeon/sys/mips/include/asm.h user/jmallett/octeon/sys/mips/include/cpu.h user/jmallett/octeon/sys/mips/include/cpufunc.h user/jmallett/octeon/sys/mips/include/pte.h user/jmallett/octeon/sys/mips/include/trap.h user/jmallett/octeon/sys/mips/mips/exception.S user/jmallett/octeon/sys/mips/mips/machdep.c user/jmallett/octeon/sys/mips/mips/mp_machdep.c user/jmallett/octeon/sys/mips/mips/nexus.c user/jmallett/octeon/sys/mips/mips/pmap.c user/jmallett/octeon/sys/mips/mips/psraccess.S user/jmallett/octeon/sys/mips/mips/tlb.c user/jmallett/octeon/sys/mips/mips/trap.c Modified: user/jmallett/octeon/sys/mips/include/asm.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/asm.h Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/include/asm.h Mon Apr 5 19:25:29 2010 (r206205) @@ -306,28 +306,32 @@ _C_LABEL(x): /* * Call ast if required + * + * XXX Do we really need to disable interrupts? */ #define DO_AST \ 44: \ - PTR_LA s0, _C_LABEL(disableintr) ;\ - jalr s0 ;\ - nop ;\ - move a0, v0 ;\ + mfc0 t0, MIPS_COP_0_STATUS ;\ + and a0, t0, MIPS_SR_INT_IE ;\ + xor t0, a0, t0 ;\ + mtc0 t0, MIPS_COP_0_STATUS ;\ + COP0_SYNC ;\ GET_CPU_PCPU(s1) ;\ PTR_L s3, PC_CURPCB(s1) ;\ PTR_L s1, PC_CURTHREAD(s1) ;\ lw s2, TD_FLAGS(s1) ;\ li s0, TDF_ASTPENDING | TDF_NEEDRESCHED;\ and s2, s0 ;\ - PTR_LA s0, _C_LABEL(restoreintr) ;\ - jalr s0 ;\ - nop ;\ + mfc0 t0, MIPS_COP_0_STATUS ;\ + or t0, a0, t0 ;\ + mtc0 t0, MIPS_COP_0_STATUS ;\ + COP0_SYNC ;\ beq s2, zero, 4f ;\ nop ;\ PTR_LA s0, _C_LABEL(ast) ;\ jalr s0 ;\ PTR_ADDU a0, s3, U_PCB_REGS ;\ - j 44b ;\ + j 44b ;\ nop ;\ 4: Modified: user/jmallett/octeon/sys/mips/include/cpu.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/cpu.h Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/include/cpu.h Mon Apr 5 19:25:29 2010 (r206205) @@ -275,27 +275,6 @@ #define OPCODE_C1 0x11 /* - * The low part of the TLB entry. - */ -#define VMTLB_PF_NUM 0x3fffffc0 -#define VMTLB_ATTR_MASK 0x00000038 -#define VMTLB_MOD_BIT 0x00000004 -#define VMTLB_VALID_BIT 0x00000002 -#define VMTLB_GLOBAL_BIT 0x00000001 - -#define VMTLB_PHYS_PAGE_SHIFT 6 - -/* - * The high part of the TLB entry. - */ -#define VMTLB_VIRT_PAGE_NUM 0xffffe000 -#define VMTLB_PID 0x000000ff -#define VMTLB_PID_R9K 0x00000fff -#define VMTLB_PID_SHIFT 0 -#define VMTLB_VIRT_PAGE_SHIFT 12 -#define VMTLB_VIRT_PAGE_SHIFT_R9K 13 - -/* * The first TLB entry that write random hits. * TLB entry 0 maps the kernel stack of the currently running thread * TLB entry 1 maps the pcpu area of processor (only for SMP builds) @@ -314,14 +293,6 @@ #define VMNUM_PIDS 256 /* - * TLB probe return codes. - */ -#define VMTLB_NOT_FOUND 0 -#define VMTLB_FOUND 1 -#define VMTLB_FOUND_WITH_PATCH 2 -#define VMTLB_PROBE_ERROR 3 - -/* * Exported definitions unique to mips cpu support. */ @@ -334,7 +305,9 @@ #define cpu_swapout(p) panic("cpu_swapout: can't get here"); #ifndef _LOCORE +#include #include + /* * Arguments to hardclock and gatherstats encapsulate the previous * machine state in an opaque clockframe. @@ -351,6 +324,11 @@ #define cpu_getstack(td) ((td)->td_frame->sp) /* + * A machine-independent interface to the CPU's counter. + */ +#define get_cyclecount() mips_rd_count() + +/* * CPU identification, from PRID register. */ union cpuprid { @@ -453,7 +431,6 @@ extern union cpuprid fpu_id; struct user; -u_int32_t mips_cp0_config1_read(void); int Mips_ConfigCache(void); void Mips_SyncCache(void); @@ -520,23 +497,12 @@ extern int intr_nesting_level; * Low level access routines to CPU registers */ -void setsoftintr0(void); -void clearsoftintr0(void); -void setsoftintr1(void); -void clearsoftintr1(void); - - -int disableintr(void); -void restoreintr(int); -int enableintr(void); - void swi_vm(void *); void cpu_halt(void); void cpu_reset(void); u_int32_t set_intr_mask(u_int32_t); u_int32_t get_intr_mask(void); -u_int32_t get_cyclecount(void); #define cpu_spinwait() /* nothing */ Modified: user/jmallett/octeon/sys/mips/include/cpufunc.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/cpufunc.h Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/include/cpufunc.h Mon Apr 5 19:25:29 2010 (r206205) @@ -83,6 +83,12 @@ mips_barrier(void) } static __inline void +mips_cp0_sync(void) +{ + __asm __volatile (__XSTRING(COP0_SYNC)); +} + +static __inline void mips_wbflush(void) { __asm __volatile ("sync" : : : "memory"); @@ -237,7 +243,7 @@ intr_disable(void) s = mips_rd_status(); mips_wr_status(s & ~MIPS_SR_INT_IE); - return (s); + return (s & MIPS_SR_INT_IE); } static __inline register_t @@ -251,7 +257,13 @@ intr_enable(void) return (s); } -#define intr_restore(s) mips_wr_status((s)) +static __inline void +intr_restore(register_t ie) +{ + if (ie == MIPS_SR_INT_IE) { + intr_enable(); + } +} static __inline void breakpoint(void) Modified: user/jmallett/octeon/sys/mips/include/pte.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/pte.h Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/include/pte.h Mon Apr 5 19:25:29 2010 (r206205) @@ -89,6 +89,7 @@ typedef pt_entry_t *pd_entry_t; * * Note that in FreeBSD, we map 2 TLB pages is equal to 1 VM page. */ +#define TLBHI_ASID_MASK (0xff) #if defined(__mips_n64) #define TLBHI_R_SHIFT 62 #define TLBHI_R_USER (0x00UL << TLBHI_R_SHIFT) @@ -102,9 +103,9 @@ typedef pt_entry_t *pd_entry_t; #define TLBHI_VA_TO_VPN2(va) ((va) & TLBHI_VPN2_MASK) #define TLBHI_ENTRY(va, asid) ((TLBHI_VA_R((va))) /* Region. */ | \ (TLBHI_VA_TO_VPN2((va))) /* VPN2. */ | \ - ((asid))) + ((asid) & TLBHI_ASID_MASK)) #else -#define TLBHI_ENTRY(va, asid) (((va) & ~PAGE_MASK) | (asid)) +#define TLBHI_ENTRY(va, asid) (((va) & ~PAGE_MASK) | ((asid) & TLBHI_ASID_MASK)) #endif /* Modified: user/jmallett/octeon/sys/mips/include/trap.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/trap.h Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/include/trap.h Mon Apr 5 19:25:29 2010 (r206205) @@ -84,7 +84,7 @@ struct trapdebug { /* trap history buff }; #define trapdebug_enter(x, cd) { \ - intrmask_t s = disableintr(); \ + register_t s = intr_disable(); \ trp->status = x->sr; \ trp->cause = x->cause; \ trp->vadr = x->badvaddr; \ @@ -94,7 +94,7 @@ struct trapdebug { /* trap history buff trp->code = cd; \ if (++trp == &trapdebug[TRAPSIZE]) \ trp = trapdebug; \ - restoreintr(s); \ + intr_restore(s); \ } #define TRAPSIZE 10 /* Trap log buffer length */ Modified: user/jmallett/octeon/sys/mips/mips/exception.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/exception.S Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/mips/exception.S Mon Apr 5 19:25:29 2010 (r206205) @@ -151,10 +151,10 @@ MipsDoTLBMiss: lw k0, 0(k1) #0e: k0=lo0 pte CLEAR_PTE_SWBITS(k0) MTC0 k0, COP_0_TLB_LO0 #12: lo0 is loaded - HAZARD_DELAY + COP0_SYNC addu k0, TLBLO_PFN_ODD MTC0 k0, COP_0_TLB_LO1 #15: lo1 is loaded - HAZARD_DELAY + COP0_SYNC tlbwr #1a: write to tlb HAZARD_DELAY eret #1f: retUrn from exception @@ -861,15 +861,14 @@ NLEAF(MipsTLBInvalidException) lw k0, 0(k1) CLEAR_PTE_SWBITS(k0) MTC0 k0, COP_0_TLB_LO0 - HAZARD_DELAY + COP0_SYNC addu k0, TLBLO_PFN_ODD MTC0 k0, COP_0_TLB_LO1 - HAZARD_DELAY + COP0_SYNC tlbp HAZARD_DELAY mfc0 k0, COP_0_TLB_INDEX - HAZARD_DELAY bltz k0, tlb_insert_random nop tlbwi @@ -1002,10 +1001,10 @@ NLEAF(MipsTLBMissException) lw k0, 0(k1) # k0=lo0 pte CLEAR_PTE_SWBITS(k0) MTC0 k0, COP_0_TLB_LO0 # lo0 is loaded - HAZARD_DELAY + COP0_SYNC addu k0, TLBLO_PFN_ODD MTC0 k0, COP_0_TLB_LO1 # lo1 is loaded - HAZARD_DELAY + COP0_SYNC tlbwr # write to tlb HAZARD_DELAY eret # return from exception @@ -1179,7 +1178,7 @@ NESTED_NOPROFILE(MipsCacheException, KER li k1, SR_DIAG_DE # ignore further errors or k0, k1 mtc0 k0, COP_0_STATUS_REG # restore status - HAZARD_DELAY + COP0_SYNC eret Modified: user/jmallett/octeon/sys/mips/mips/machdep.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/machdep.c Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/mips/machdep.c Mon Apr 5 19:25:29 2010 (r206205) @@ -373,7 +373,7 @@ mips_vector_init(void) * when handler is installed for it */ set_intr_mask(ALL_INT_MASK); - enableintr(); + intr_enable(); /* Clear BEV in SR so we start handling our own exceptions */ mips_wr_status(mips_rd_status() & ~SR_BOOT_EXC_VEC); @@ -474,7 +474,7 @@ spinlock_enter(void) td = curthread; if (td->td_md.md_spinlock_count == 0) - td->td_md.md_saved_intr = disableintr(); + td->td_md.md_saved_intr = intr_disable(); td->td_md.md_spinlock_count++; critical_enter(); } @@ -488,16 +488,7 @@ spinlock_exit(void) critical_exit(); td->td_md.md_spinlock_count--; if (td->td_md.md_spinlock_count == 0) - restoreintr(td->td_md.md_saved_intr); -} - -u_int32_t -get_cyclecount(void) -{ - u_int32_t count; - - mfc0_macro(count, 9); - return (count); + intr_restore(td->td_md.md_saved_intr); } /* Modified: user/jmallett/octeon/sys/mips/mips/mp_machdep.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/mp_machdep.c Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/mips/mp_machdep.c Mon Apr 5 19:25:29 2010 (r206205) @@ -245,7 +245,7 @@ smp_init_secondary(u_int32_t cpuid) mips_dcache_wbinv_all(); mips_icache_sync_all(); - mips_wr_entryhi(0 << VMTLB_PID_SHIFT); + mips_wr_entryhi(0); pcpu_init(PCPU_ADDR(cpuid), cpuid, sizeof(struct pcpu)); dpcpu_init(dpcpu, cpuid); Modified: user/jmallett/octeon/sys/mips/mips/nexus.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/nexus.c Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/mips/nexus.c Mon Apr 5 19:25:29 2010 (r206205) @@ -166,16 +166,19 @@ static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) { + register_t s; int irq; - intrmask_t s = disableintr(); + s = intr_disable(); irq = rman_get_start(res); - if (irq >= NUM_MIPS_IRQS) + if (irq >= NUM_MIPS_IRQS) { + intr_restore(s); return (0); + } cpu_establish_hardintr(device_get_nameunit(child), filt, intr, arg, irq, flags, cookiep); - restoreintr(s); + intr_restore(s); return (0); } Modified: user/jmallett/octeon/sys/mips/mips/pmap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/pmap.c Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Mon Apr 5 19:25:29 2010 (r206205) @@ -213,7 +213,7 @@ pt_entry_t * pmap_segmap(pmap_t pmap, vm_offset_t va) { if (pmap->pm_segtab) - return ((pt_entry_t *)(intptr_t)*pmap_pde(pmap, va)); + return (*pmap_pde(pmap, va)); else return ((pd_entry_t)0); } @@ -445,7 +445,7 @@ again: * level page table. */ for (i = 0, j = pmap_segshift(virtual_avail); i < nkpt; i++, j++) - kernel_segmap[j] = (pd_entry_t)(intptr_t)(pgtab + (i * NPTEPG)); + kernel_segmap[j] = pgtab + (i * NPTEPG); /* * The kernel's pmap is statically allocated so we don't have to use @@ -459,7 +459,7 @@ again: kernel_pmap->pm_asid[0].asid = PMAP_ASID_RESERVED; kernel_pmap->pm_asid[0].gen = 0; pmap_max_asid = VMNUM_PIDS; - mips_wr_entryhi(0 << VMTLB_PID_SHIFT); + mips_wr_entryhi(0); } /* @@ -2146,7 +2146,7 @@ pmap_kenter_temporary(vm_paddr_t pa, int { vm_offset_t va; #if !defined(__mips_n64) - int int_level; + register_t intr; #endif if (i != 0) printf("%s: ERROR!!! More than one page of virtual address mapping not supported\n", @@ -2171,7 +2171,7 @@ pmap_kenter_temporary(vm_paddr_t pa, int * we get to this point, we might want to consider this (leaving things * disabled as a starting point ;-) */ - int_level = disableintr(); + intr = intr_disable(); cpu = PCPU_GET(cpuid); sysm = &sysmap_lmem[cpu]; /* Since this is for the debugger, no locks or any other fun */ @@ -2179,7 +2179,7 @@ pmap_kenter_temporary(vm_paddr_t pa, int sysm->valid1 = 1; pmap_update_page(kernel_pmap, (vm_offset_t)sysm->CADDR1, sysm->CMAP1); va = (vm_offset_t)sysm->CADDR1; - restoreintr(int_level); + intr_restore(intr); } #endif return ((void *)va); @@ -2190,7 +2190,7 @@ pmap_kenter_temporary_free(vm_paddr_t pa { #if !defined(__mips_n64) int cpu; - int int_level; + register_t intr; struct local_sysmaps *sysm; if (pa < MIPS_KSEG0_LARGEST_PHYS) { @@ -2200,9 +2200,9 @@ pmap_kenter_temporary_free(vm_paddr_t pa cpu = PCPU_GET(cpuid); sysm = &sysmap_lmem[cpu]; if (sysm->valid1) { - int_level = disableintr(); + intr = intr_disable(); pmap_invalidate_page(kernel_pmap, (vm_offset_t)sysm->CADDR1); - restoreintr(int_level); + intr_restore(intr); sysm->CMAP1 = 0; sysm->valid1 = 0; } @@ -2316,7 +2316,7 @@ pmap_zero_page(vm_page_t m) vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); #if !defined(__mips_n64) - int int_level; + register_t intr; #endif #ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { @@ -2360,13 +2360,13 @@ pmap_zero_page(vm_page_t m) sysm = &sysmap_lmem[cpu]; PMAP_LGMEM_LOCK(sysm); sched_pin(); - int_level = disableintr(); + intr = intr_disable(); sysm->CMAP1 = TLBLO_PA_TO_PFN(phys) | PG_D | PG_V | PG_G | PG_W | PG_C_CNC; sysm->valid1 = 1; pmap_update_page(kernel_pmap, (vm_offset_t)sysm->CADDR1, sysm->CMAP1); bzero(sysm->CADDR1, PAGE_SIZE); pmap_invalidate_page(kernel_pmap, (vm_offset_t)sysm->CADDR1); - restoreintr(int_level); + intr_restore(intr); sysm->CMAP1 = 0; sysm->valid1 = 0; sched_unpin(); @@ -2387,7 +2387,7 @@ pmap_zero_page_area(vm_page_t m, int off vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); #if !defined(__mips_n64) - int int_level; + register_t intr; #endif #ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { @@ -2425,14 +2425,14 @@ pmap_zero_page_area(vm_page_t m, int off cpu = PCPU_GET(cpuid); sysm = &sysmap_lmem[cpu]; PMAP_LGMEM_LOCK(sysm); - int_level = disableintr(); + intr = intr_disable(); sched_pin(); sysm->CMAP1 = TLBLO_PA_TO_PFN(phys) | PG_D | PG_V | PG_G | PG_W | PG_C_CNC; sysm->valid1 = 1; pmap_update_page(kernel_pmap, (vm_offset_t)sysm->CADDR1, sysm->CMAP1); bzero((char *)sysm->CADDR1 + off, size); pmap_invalidate_page(kernel_pmap, (vm_offset_t)sysm->CADDR1); - restoreintr(int_level); + intr_restore(intr); sysm->CMAP1 = 0; sysm->valid1 = 0; sched_unpin(); @@ -2447,7 +2447,7 @@ pmap_zero_page_idle(vm_page_t m) vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); #if !defined(__mips_n64) - int int_level; + register_t intr; #endif #ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { @@ -2476,14 +2476,14 @@ pmap_zero_page_idle(vm_page_t m) cpu = PCPU_GET(cpuid); sysm = &sysmap_lmem[cpu]; PMAP_LGMEM_LOCK(sysm); - int_level = disableintr(); + intr = intr_disable(); sched_pin(); sysm->CMAP1 = TLBLO_PA_TO_PFN(phys) | PG_D | PG_V | PG_G | PG_W | PG_C_CNC; sysm->valid1 = 1; pmap_update_page(kernel_pmap, (vm_offset_t)sysm->CADDR1, sysm->CMAP1); bzero(sysm->CADDR1, PAGE_SIZE); pmap_invalidate_page(kernel_pmap, (vm_offset_t)sysm->CADDR1); - restoreintr(int_level); + intr_restore(intr); sysm->CMAP1 = 0; sysm->valid1 = 0; sched_unpin(); @@ -2505,7 +2505,7 @@ pmap_copy_page(vm_page_t src, vm_page_t vm_paddr_t phy_src = VM_PAGE_TO_PHYS(src); vm_paddr_t phy_dst = VM_PAGE_TO_PHYS(dst); #if !defined(__mips_n64) - int int_level; + register_t intr; #endif #ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { @@ -2564,7 +2564,7 @@ pmap_copy_page(vm_page_t src, vm_page_t sysm = &sysmap_lmem[cpu]; PMAP_LGMEM_LOCK(sysm); sched_pin(); - int_level = disableintr(); + intr = intr_disable(); if (phy_src < MIPS_KSEG0_LARGEST_PHYS) { /* one side needs mapping - dest */ va_src = MIPS_PHYS_TO_KSEG0(phy_src); @@ -2600,7 +2600,7 @@ pmap_copy_page(vm_page_t src, vm_page_t sysm->CMAP2 = 0; sysm->valid2 = 0; } - restoreintr(int_level); + intr_restore(intr); sched_unpin(); PMAP_LGMEM_UNLOCK(sysm); } @@ -3058,7 +3058,7 @@ pmap_activate(struct thread *td) pmap_asid_alloc(pmap); if (td == curthread) { PCPU_SET(segbase, pmap->pm_segtab); - mips_wr_entryhi(pmap->pm_asid[PCPU_GET(cpuid)].asid << VMTLB_PID_SHIFT); + mips_wr_entryhi(pmap->pm_asid[PCPU_GET(cpuid)].asid); } PCPU_SET(curpmap, pmap); Modified: user/jmallett/octeon/sys/mips/mips/psraccess.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/psraccess.S Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/mips/psraccess.S Mon Apr 5 19:25:29 2010 (r206205) @@ -53,109 +53,6 @@ .set noreorder # Noreorder is default style! -/* - * Set/clear software interrupt. - */ - -LEAF(setsoftintr0) - mfc0 v0, COP_0_CAUSE_REG # read cause register - nop - or v0, v0, SOFT_INT_MASK_0 # set soft clock interrupt - mtc0 v0, COP_0_CAUSE_REG # save it - j ra - nop -END(setsoftintr0) - -LEAF(clearsoftintr0) - mfc0 v0, COP_0_CAUSE_REG # read cause register - nop - and v0, v0, ~SOFT_INT_MASK_0 # clear soft clock interrupt - mtc0 v0, COP_0_CAUSE_REG # save it - j ra - nop -END(clearsoftintr0) - -LEAF(setsoftintr1) - mfc0 v0, COP_0_CAUSE_REG # read cause register - nop - or v0, v0, SOFT_INT_MASK_1 # set soft net interrupt - mtc0 v0, COP_0_CAUSE_REG # save it - j ra - nop -END(setsoftintr1) - -LEAF(clearsoftintr1) - mfc0 v0, COP_0_CAUSE_REG # read cause register - nop - and v0, v0, ~SOFT_INT_MASK_1 # clear soft net interrupt - mtc0 v0, COP_0_CAUSE_REG # save it - j ra - nop -END(clearsoftintr1) - -/* - * Set/change interrupt priority routines. - * These routines return the previous state. - */ -LEAF(restoreintr) - mfc0 t0,COP_0_STATUS_REG - and t1,t0,SR_INT_ENAB - beq a0,t1,1f - xor t0,SR_INT_ENAB - - .set noreorder - - mtc0 t0,COP_0_STATUS_REG - nop - nop - nop - nop -1: - j ra - nop -END(restoreintr) - -/* - * Set/change interrupt priority routines. - * These routines return the previous state. - */ - -LEAF(enableintr) -#ifdef TARGET_OCTEON - .set mips64r2 - ei v0 - and v0, SR_INT_ENAB # return old interrupt enable bit - .set mips0 -#else - mfc0 v0, COP_0_STATUS_REG # read status register - nop - or v1, v0, SR_INT_ENAB - mtc0 v1, COP_0_STATUS_REG # enable all interrupts - and v0, SR_INT_ENAB # return old interrupt enable -#endif - j ra - nop -END(enableintr) - - -LEAF(disableintr) -#ifdef TARGET_OCTEON - .set mips64r2 - di v0 - and v0, SR_INT_ENAB # return old interrupt enable bit - .set mips0 -#else - mfc0 v0, COP_0_STATUS_REG # read status register - nop - and v1, v0, ~SR_INT_ENAB - mtc0 v1, COP_0_STATUS_REG # disable all interrupts - MIPS_CPU_NOP_DELAY - and v0, SR_INT_ENAB # return old interrupt enable -#endif - j ra - nop -END(disableintr) - LEAF(set_intr_mask) li t0, SR_INT_MASK # 1 means masked so invert. not a0, a0 # 1 means masked so invert. @@ -182,17 +79,3 @@ LEAF(get_intr_mask) nop END(get_intr_mask) - -/* - * u_int32_t mips_cp0_config1_read(void) - * - * Return the current value of the CP0 Config (Select 1) register. - */ -LEAF(mips_cp0_config1_read) - .set push - .set mips32 - mfc0 v0, COP_0_CONFIG, 1 - j ra - nop - .set pop -END(mips_cp0_config1_read) Modified: user/jmallett/octeon/sys/mips/mips/tlb.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/tlb.c Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/mips/tlb.c Mon Apr 5 19:25:29 2010 (r206205) @@ -167,8 +167,8 @@ DB_SHOW_COMMAND(tlb, ddb_dump_tlb) continue; db_printf("#%u\t=> %jx\n", i, (intmax_t)ehi); - db_printf(" Lo0\t%jx\n", (intmax_t)elo0); - db_printf(" Lo1\t%jx\n", (intmax_t)elo1); + db_printf(" Lo0\t%jx\t(%#jx)\n", (intmax_t)elo0, (intmax_t)TLBLO_PTE_TO_PA(elo0)); + db_printf(" Lo1\t%jx\t(%#jx)\n", (intmax_t)elo1, (intmax_t)TLBLO_PTE_TO_PA(elo1)); } db_printf("Finished.\n"); } Modified: user/jmallett/octeon/sys/mips/mips/trap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/trap.c Mon Apr 5 18:46:29 2010 (r206204) +++ user/jmallett/octeon/sys/mips/mips/trap.c Mon Apr 5 19:25:29 2010 (r206205) @@ -307,9 +307,9 @@ trap(struct trapframe *trapframe) */ if (trapframe->sr & SR_INT_ENAB) { set_intr_mask(~(trapframe->sr & ALL_INT_MASK)); - enableintr(); + intr_enable(); } else { - disableintr(); + intr_disable(); } #ifdef TRAP_DEBUG @@ -330,7 +330,7 @@ trap(struct trapframe *trapframe) #ifdef SMP printf("cpuid = %d\n", PCPU_GET(cpuid)); #endif - pid = mips_rd_entryhi() & VMTLB_PID; + pid = mips_rd_entryhi() & TLBHI_ASID_MASK; printf("badaddr = %#jx, pc = %#jx, ra = %#jx, sp = %#jx, sr = %jx, pid = %d, ASID = %u\n", (intmax_t)trapframe->badvaddr, (intmax_t)trapframe->pc, (intmax_t)trapframe->ra, (intmax_t)trapframe->sp, (intmax_t)trapframe->sr, @@ -383,7 +383,6 @@ trap(struct trapframe *trapframe) #ifdef SMP /* It is possible that some other CPU changed m-bit */ if (!pte_test(pte, PG_V) || pte_test(pte, PG_D)) { - trapframe->badvaddr &= ~PAGE_MASK; pmap_update_page(kernel_pmap, trapframe->badvaddr, *pte); PMAP_UNLOCK(kernel_pmap); @@ -400,7 +399,6 @@ trap(struct trapframe *trapframe) goto kernel_fault; } pte_set(pte, PG_D); - trapframe->badvaddr &= ~PAGE_MASK; pmap_update_page(kernel_pmap, trapframe->badvaddr, *pte); pa = TLBLO_PTE_TO_PA(*pte); if (!page_is_managed(pa)) @@ -424,7 +422,6 @@ trap(struct trapframe *trapframe) #ifdef SMP /* It is possible that some other CPU changed m-bit */ if (!pte_test(pte, PG_V) || pte_test(pte, PG_D)) { - trapframe->badvaddr = (trapframe->badvaddr & ~PAGE_MASK); pmap_update_page(pmap, trapframe->badvaddr, entry); PMAP_UNLOCK(pmap); goto out; @@ -441,9 +438,7 @@ trap(struct trapframe *trapframe) goto dofault; } pte_set(pte, PG_D); - trapframe->badvaddr = (trapframe->badvaddr & ~PAGE_MASK); pmap_update_page(pmap, trapframe->badvaddr, *pte); - trapframe->badvaddr |= (pmap->pm_asid[PCPU_GET(cpuid)].asid << VMTLB_PID_SHIFT); pa = TLBLO_PTE_TO_PA(*pte); if (!page_is_managed(pa)) panic("trap: utlbmod: unmanaged page"); @@ -1033,9 +1028,10 @@ out: void trapDump(char *msg) { - int i, s; + register_t s; + int i; - s = disableintr(); + s = intr_disable(); printf("trapDump(%s)\n", msg); for (i = 0; i < TRAPSIZE; i++) { if (trp == trapdebug) { @@ -1053,7 +1049,7 @@ trapDump(char *msg) printf(" RA %jx SP %jx code %d\n", (intmax_t)trp->ra, (intmax_t)trp->sp, (int)trp->code); } - restoreintr(s); + intr_restore(s); } #endif From owner-svn-src-user@FreeBSD.ORG Mon Apr 5 19:43:27 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 6B5F0106566B; Mon, 5 Apr 2010 19:43:27 +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 4073F8FC13; Mon, 5 Apr 2010 19:43:27 +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 o35JhRfu025734; Mon, 5 Apr 2010 19:43:27 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35JhRkF025732; Mon, 5 Apr 2010 19:43:27 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004051943.o35JhRkF025732@svn.freebsd.org> From: Juli Mallett Date: Mon, 5 Apr 2010 19:43:27 +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: r206207 - user/jmallett/octeon/sys/mips/mips 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: Mon, 05 Apr 2010 19:43:27 -0000 Author: jmallett Date: Mon Apr 5 19:43:26 2010 New Revision: 206207 URL: http://svn.freebsd.org/changeset/base/206207 Log: Save and restore ASID and PageMask. Modified: user/jmallett/octeon/sys/mips/mips/tlb.c Modified: user/jmallett/octeon/sys/mips/mips/tlb.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/tlb.c Mon Apr 5 19:40:13 2010 (r206206) +++ user/jmallett/octeon/sys/mips/mips/tlb.c Mon Apr 5 19:43:26 2010 (r206207) @@ -50,6 +50,7 @@ static inline void tlb_probe(void) { __asm __volatile ("tlbp" : : : "memory"); + mips_cp0_sync(); mips_barrier(); } @@ -57,6 +58,7 @@ static inline void tlb_read(void) { __asm __volatile ("tlbr" : : : "memory"); + mips_cp0_sync(); mips_barrier(); } @@ -64,6 +66,7 @@ static inline void tlb_write_indexed(void) { __asm __volatile ("tlbwi" : : : "memory"); + mips_cp0_sync(); mips_barrier(); } @@ -71,6 +74,7 @@ static inline void tlb_write_random(void) { __asm __volatile ("tlbwr" : : : "memory"); + mips_cp0_sync(); mips_barrier(); } @@ -79,43 +83,56 @@ static void tlb_invalidate_one(unsigned) void tlb_invalidate_address(struct pmap *pmap, vm_offset_t va) { + register_t mask, asid; register_t s; int i; va &= ~PAGE_MASK; s = intr_disable(); + mask = mips_rd_pagemask(); + asid = mips_rd_entryhi() & TLBHI_ASID_MASK; + mips_wr_pagemask(0); mips_wr_entryhi(TLBHI_ENTRY(va, pmap_asid(pmap))); tlb_probe(); i = mips_rd_index(); if (i >= 0) tlb_invalidate_one(i); + mips_wr_entryhi(asid); + mips_wr_pagemask(mask); intr_restore(s); } void tlb_invalidate_all(void) { + register_t mask, asid; register_t s; unsigned i; s = intr_disable(); + mask = mips_rd_pagemask(); + asid = mips_rd_entryhi() & TLBHI_ASID_MASK; for (i = mips_rd_wired(); i < num_tlbentries; i++) tlb_invalidate_one(i); + mips_wr_entryhi(asid); + mips_wr_pagemask(mask); intr_restore(s); } void tlb_update(struct pmap *pmap, vm_offset_t va, pt_entry_t pte) { - register_t asid; + register_t mask, asid; register_t s; int i; va &= ~PAGE_MASK; s = intr_disable(); - asid = mips_rd_entryhi(); + mask = mips_rd_pagemask(); + asid = mips_rd_entryhi() & TLBHI_ASID_MASK; + mips_wr_pagemask(0); mips_wr_entryhi(TLBHI_ENTRY(va, pmap_asid(pmap))); tlb_probe(); i = mips_rd_index(); @@ -126,6 +143,7 @@ tlb_update(struct pmap *pmap, vm_offset_ else tlb_write_random(); mips_wr_entryhi(asid); + mips_wr_pagemask(mask); intr_restore(s); } @@ -136,6 +154,7 @@ tlb_invalidate_one(unsigned i) mips_wr_entryhi(TLBHI_ENTRY(MIPS_KSEG0_START + (i * PAGE_SIZE), 0)); mips_wr_entrylo0(0); mips_wr_entrylo1(0); + mips_wr_pagemask(0); mips_wr_index(i); tlb_write_indexed(); } From owner-svn-src-user@FreeBSD.ORG Mon Apr 5 19:59:05 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 970601065670; Mon, 5 Apr 2010 19:59:05 +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 86B048FC0C; Mon, 5 Apr 2010 19:59:05 +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 o35Jx5EA029279; Mon, 5 Apr 2010 19:59:05 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35Jx50N029277; Mon, 5 Apr 2010 19:59:05 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004051959.o35Jx50N029277@svn.freebsd.org> From: Juli Mallett Date: Mon, 5 Apr 2010 19:59:05 +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: r206208 - user/jmallett/octeon/sys/mips/mips 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: Mon, 05 Apr 2010 19:59:05 -0000 Author: jmallett Date: Mon Apr 5 19:59:05 2010 New Revision: 206208 URL: http://svn.freebsd.org/changeset/base/206208 Log: Whoops. Clear software-managed bits from PTE before writing it to TLB. Modified: user/jmallett/octeon/sys/mips/mips/tlb.c Modified: user/jmallett/octeon/sys/mips/mips/tlb.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/tlb.c Mon Apr 5 19:43:26 2010 (r206207) +++ user/jmallett/octeon/sys/mips/mips/tlb.c Mon Apr 5 19:59:05 2010 (r206208) @@ -128,6 +128,7 @@ tlb_update(struct pmap *pmap, vm_offset_ int i; va &= ~PAGE_MASK; + pte &= ~TLBLO_SWBITS_MASK; s = intr_disable(); mask = mips_rd_pagemask(); From owner-svn-src-user@FreeBSD.ORG Mon Apr 5 20:01:21 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 CE65A106566B; Mon, 5 Apr 2010 20:01:21 +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 BDF948FC15; Mon, 5 Apr 2010 20:01:21 +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 o35K1Lfs029884; Mon, 5 Apr 2010 20:01:21 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35K1L4K029882; Mon, 5 Apr 2010 20:01:21 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004052001.o35K1L4K029882@svn.freebsd.org> From: Juli Mallett Date: Mon, 5 Apr 2010 20:01:21 +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: r206209 - user/jmallett/octeon/sys/mips/mips 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: Mon, 05 Apr 2010 20:01:21 -0000 Author: jmallett Date: Mon Apr 5 20:01:21 2010 New Revision: 206209 URL: http://svn.freebsd.org/changeset/base/206209 Log: o) Make it clear that CMAP1 and CMAP2 are initialized to PG_G. o) Set PG_W correctly (not that it matters) in one CMAP1 use. XXX We really should be updating the page table for these mappings, not just putting them in the TLB. With random replacement, it's quite possible that inserting the second entry would invalidate the first one, even if it is terribly unlikely, and in the case where we map two pages, that's an issue. Modified: user/jmallett/octeon/sys/mips/mips/pmap.c Modified: user/jmallett/octeon/sys/mips/mips/pmap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/pmap.c Mon Apr 5 19:59:05 2010 (r206208) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Mon Apr 5 20:01:21 2010 (r206209) @@ -389,8 +389,8 @@ again: */ if (memory_larger_than_512meg) { for (i = 0; i < MAXCPU; i++) { - pte_set(&sysmap_lmem[i].CMAP1, PG_G); - pte_set(&sysmap_lmem[i].CMAP2, PG_G); + sysmap_lmem[i].CMAP1 = PG_G; + sysmap_lmem[i].CMAP2 = PG_G; sysmap_lmem[i].CADDR1 = (caddr_t)virtual_avail; virtual_avail += PAGE_SIZE; sysmap_lmem[i].CADDR2 = (caddr_t)virtual_avail; @@ -2175,7 +2175,7 @@ pmap_kenter_temporary(vm_paddr_t pa, int cpu = PCPU_GET(cpuid); sysm = &sysmap_lmem[cpu]; /* Since this is for the debugger, no locks or any other fun */ - sysm->CMAP1 = TLBLO_PA_TO_PFN(pa) | PG_D | PG_V | PG_G | PG_G | PG_C_CNC; + sysm->CMAP1 = TLBLO_PA_TO_PFN(pa) | PG_D | PG_V | PG_G | PG_W | PG_C_CNC; sysm->valid1 = 1; pmap_update_page(kernel_pmap, (vm_offset_t)sysm->CADDR1, sysm->CMAP1); va = (vm_offset_t)sysm->CADDR1; From owner-svn-src-user@FreeBSD.ORG Mon Apr 5 20:51:30 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 E7590106566B; Mon, 5 Apr 2010 20:51:30 +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 D78C88FC0C; Mon, 5 Apr 2010 20:51:30 +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 o35KpU72041238; Mon, 5 Apr 2010 20:51:30 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35KpU8M041236; Mon, 5 Apr 2010 20:51:30 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004052051.o35KpU8M041236@svn.freebsd.org> From: Juli Mallett Date: Mon, 5 Apr 2010 20:51:30 +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: r206212 - 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: Mon, 05 Apr 2010 20:51:31 -0000 Author: jmallett Date: Mon Apr 5 20:51:30 2010 New Revision: 206212 URL: http://svn.freebsd.org/changeset/base/206212 Log: o) Move down the start of user stack to be 8K below the top rather than 4K. We should really define this as minuseraddr-page_size. Modified: user/jmallett/octeon/sys/mips/include/vmparam.h Modified: user/jmallett/octeon/sys/mips/include/vmparam.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/vmparam.h Mon Apr 5 20:39:44 2010 (r206211) +++ user/jmallett/octeon/sys/mips/include/vmparam.h Mon Apr 5 20:51:30 2010 (r206212) @@ -60,7 +60,7 @@ * and some QED CPUs perform some virtual address checks before the * offset is calculated. */ -#define USRSTACK 0x7ffff000 /* Start of user stack */ +#define USRSTACK 0x7fffe000 /* Start of user stack */ #if defined(COMPAT_FREEBSD32) #define FREEBSD32_USRSTACK USRSTACK #endif From owner-svn-src-user@FreeBSD.ORG Mon Apr 5 21:33:33 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 83E09106567B; Mon, 5 Apr 2010 21:33:33 +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 744258FC0A; Mon, 5 Apr 2010 21:33:33 +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 o35LXXQU050634; Mon, 5 Apr 2010 21:33:33 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35LXXc2050632; Mon, 5 Apr 2010 21:33:33 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004052133.o35LXXc2050632@svn.freebsd.org> From: Juli Mallett Date: Mon, 5 Apr 2010 21:33:33 +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: r206213 - user/jmallett/octeon/sys/mips/mips 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: Mon, 05 Apr 2010 21:33:33 -0000 Author: jmallett Date: Mon Apr 5 21:33:33 2010 New Revision: 206213 URL: http://svn.freebsd.org/changeset/base/206213 Log: Use XKPHYS for mapdev on N64. Modified: user/jmallett/octeon/sys/mips/mips/pmap.c Modified: user/jmallett/octeon/sys/mips/mips/pmap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/pmap.c Mon Apr 5 20:51:30 2010 (r206212) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Mon Apr 5 21:33:33 2010 (r206213) @@ -2945,6 +2945,9 @@ pmap_clear_reference(vm_page_t m) void * pmap_mapdev(vm_offset_t pa, vm_size_t size) { +#if defined(__mips_n64) + return ((void *)MIPS_PHYS_TO_XKPHYS(MIPS_XKPHYS_CCA_UC, pa)); +#else vm_offset_t va, tmpva, offset; /* @@ -2970,11 +2973,13 @@ pmap_mapdev(vm_offset_t pa, vm_size_t si } return ((void *)(va + offset)); +#endif } void pmap_unmapdev(vm_offset_t va, vm_size_t size) { +#if !defined(__mips_n64) vm_offset_t base, offset, tmpva; /* If the address is within KSEG1 then there is nothing to do */ @@ -2987,6 +2992,7 @@ pmap_unmapdev(vm_offset_t va, vm_size_t for (tmpva = base; tmpva < base + size; tmpva += PAGE_SIZE) pmap_kremove(tmpva); kmem_free(kernel_map, base, size); +#endif } /* From owner-svn-src-user@FreeBSD.ORG Mon Apr 5 21:36:04 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 6D220106566B; Mon, 5 Apr 2010 21:36:04 +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 5D7528FC1D; Mon, 5 Apr 2010 21:36:04 +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 o35La4A1051254; Mon, 5 Apr 2010 21:36:04 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35La4ao051252; Mon, 5 Apr 2010 21:36:04 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004052136.o35La4ao051252@svn.freebsd.org> From: Juli Mallett Date: Mon, 5 Apr 2010 21:36:04 +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: r206214 - user/jmallett/octeon/sys/mips/mips 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: Mon, 05 Apr 2010 21:36:04 -0000 Author: jmallett Date: Mon Apr 5 21:36:04 2010 New Revision: 206214 URL: http://svn.freebsd.org/changeset/base/206214 Log: Don't duplicate NBSEG as MIPS_SEGSIZE. Modified: user/jmallett/octeon/sys/mips/mips/pmap.c Modified: user/jmallett/octeon/sys/mips/mips/pmap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/pmap.c Mon Apr 5 21:33:33 2010 (r206213) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Mon Apr 5 21:36:04 2010 (r206214) @@ -124,8 +124,7 @@ __FBSDID("$FreeBSD$"); #define segtab_pde(m, v) ((m)[pmap_segshift((v))]) #define NUSERPGTBLS (pmap_segshift(VM_MAXUSER_ADDRESS)) -#define MIPS_SEGSIZE (1L << SEGSHIFT) -#define mips_segtrunc(va) ((va) & ~(MIPS_SEGSIZE-1)) +#define mips_segtrunc(va) ((va) & ~SEGOFSET) #define is_kernel_pmap(x) ((x) == kernel_pmap) struct pmap kernel_pmap_store; @@ -1655,7 +1654,7 @@ pmap_remove(struct pmap *pmap, vm_offset } for (va = sva; va < eva; va = nva) { if (!*pmap_pde(pmap, va)) { - nva = mips_segtrunc(va + MIPS_SEGSIZE); + nva = mips_segtrunc(va + NBSEG); continue; } pmap_remove_page(pmap, va); @@ -1771,7 +1770,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv * If segment table entry is empty, skip this segment. */ if (!*pmap_pde(pmap, sva)) { - sva = mips_segtrunc(sva + MIPS_SEGSIZE); + sva = mips_segtrunc(sva + NBSEG); continue; } /* From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 01:00:27 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 61700106566B; Tue, 6 Apr 2010 01:00:27 +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 3601C8FC08; Tue, 6 Apr 2010 01:00:27 +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 o3610R3e097727; Tue, 6 Apr 2010 01:00:27 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3610R23097726; Tue, 6 Apr 2010 01:00:27 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060100.o3610R23097726@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 01:00:27 +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: r206229 - 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: Tue, 06 Apr 2010 01:00:27 -0000 Author: jmallett Date: Tue Apr 6 01:00:26 2010 New Revision: 206229 URL: http://svn.freebsd.org/changeset/base/206229 Log: Remove unused file. Deleted: user/jmallett/octeon/sys/mips/include/segments.h From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 01:04:32 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 D3296106572F; Tue, 6 Apr 2010 01:04:32 +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 C1E788FC16; Tue, 6 Apr 2010 01:04:32 +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 o3614Wka098650; Tue, 6 Apr 2010 01:04:32 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3614WaO098648; Tue, 6 Apr 2010 01:04:32 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060104.o3614WaO098648@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 01:04:32 +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: r206230 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 01:04:32 -0000 Author: jmallett Date: Tue Apr 6 01:04:32 2010 New Revision: 206230 URL: http://svn.freebsd.org/changeset/base/206230 Log: Add a hazard delay after the upte tlblo0 mtc0. Modified: user/jmallett/octeon/sys/mips/mips/swtch.S Modified: user/jmallett/octeon/sys/mips/mips/swtch.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/swtch.S Tue Apr 6 01:00:26 2010 (r206229) +++ user/jmallett/octeon/sys/mips/mips/swtch.S Tue Apr 6 01:04:32 2010 (r206230) @@ -328,6 +328,7 @@ entry0set: /* SMP!! - Works only for unshared TLB case - i.e. no v-cpus */ mtc0 zero, COP_0_TLB_INDEX # TLB entry #0 mtc0 a1, COP_0_TLB_LO0 # upte + HAZARD_DELAY addu a1, TLBLO_PFN_ODD mtc0 a1, COP_0_TLB_LO1 # upte + odd HAZARD_DELAY From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 01:06:52 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 E496F106566B; Tue, 6 Apr 2010 01:06:52 +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 D2B0D8FC16; Tue, 6 Apr 2010 01:06:52 +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 o3616qR8099275; Tue, 6 Apr 2010 01:06:52 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3616q4s099269; Tue, 6 Apr 2010 01:06:52 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060106.o3616q4s099269@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 01:06:52 +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: r206231 - in user/jmallett/octeon/sys/mips: include mips rmi 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: Tue, 06 Apr 2010 01:06:53 -0000 Author: jmallett Date: Tue Apr 6 01:06:52 2010 New Revision: 206231 URL: http://svn.freebsd.org/changeset/base/206231 Log: o) Use TRAPF_USERMODE(tf) rather than USERMODE(tf->sr). o) Remove unused . Deleted: user/jmallett/octeon/sys/mips/include/psl.h Modified: user/jmallett/octeon/sys/mips/include/cpu.h user/jmallett/octeon/sys/mips/include/param.h user/jmallett/octeon/sys/mips/mips/tick.c user/jmallett/octeon/sys/mips/mips/trap.c user/jmallett/octeon/sys/mips/rmi/clock.c Modified: user/jmallett/octeon/sys/mips/include/cpu.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/cpu.h Tue Apr 6 01:04:32 2010 (r206230) +++ user/jmallett/octeon/sys/mips/include/cpu.h Tue Apr 6 01:06:52 2010 (r206231) @@ -47,7 +47,6 @@ #ifndef _MACHINE_CPU_H_ #define _MACHINE_CPU_H_ -#include #include #define MIPS_KSEG0_LARGEST_PHYS (0x20000000) @@ -315,7 +314,6 @@ #define clockframe trapframe /* Use normal trap frame */ #define CLKF_USERMODE(framep) ((framep)->sr & SR_KSU_USER) -#define CLKF_BASEPRI(framep) ((framep)->cpl == 0) #define CLKF_PC(framep) ((framep)->pc) #define CLKF_INTR(framep) (0) #define MIPS_CLKF_INTR() (intr_nesting_level >= 1) Modified: user/jmallett/octeon/sys/mips/include/param.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/param.h Tue Apr 6 01:04:32 2010 (r206230) +++ user/jmallett/octeon/sys/mips/include/param.h Tue Apr 6 01:06:52 2010 (r206231) @@ -46,9 +46,7 @@ #include #ifdef _KERNEL -#ifdef _LOCORE -#include -#else +#ifndef _LOCORE #include #endif #endif Modified: user/jmallett/octeon/sys/mips/mips/tick.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/tick.c Tue Apr 6 01:04:32 2010 (r206230) +++ user/jmallett/octeon/sys/mips/mips/tick.c Tue Apr 6 01:06:52 2010 (r206231) @@ -301,16 +301,16 @@ clock_intr(void *arg) if (cpu_ticks->hard_ticks >= cycles_per_hz) { cpu_ticks->hard_ticks -= cycles_per_hz; if (PCPU_GET(cpuid) == 0) - hardclock(USERMODE(tf->sr), tf->pc); + hardclock(TRAPF_USERMODE(tf), tf->pc); else - hardclock_cpu(USERMODE(tf->sr)); + hardclock_cpu(TRAPF_USERMODE(tf)); } /* Fire statclock at stathz. */ cpu_ticks->stat_ticks += delta; if (cpu_ticks->stat_ticks >= cycles_per_stathz) { cpu_ticks->stat_ticks -= cycles_per_stathz; - statclock(USERMODE(tf->sr)); + statclock(TRAPF_USERMODE(tf)); } /* Fire profclock at profhz, but only when needed. */ @@ -318,7 +318,7 @@ clock_intr(void *arg) if (cpu_ticks->prof_ticks >= cycles_per_profhz) { cpu_ticks->prof_ticks -= cycles_per_profhz; if (profprocs != 0) - profclock(USERMODE(tf->sr), tf->pc); + profclock(TRAPF_USERMODE(tf), tf->pc); } critical_exit(); #if 0 /* TARGET_OCTEON */ Modified: user/jmallett/octeon/sys/mips/mips/trap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/trap.c Tue Apr 6 01:04:32 2010 (r206230) +++ user/jmallett/octeon/sys/mips/mips/trap.c Tue Apr 6 01:06:52 2010 (r206231) @@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -293,7 +292,7 @@ trap(struct trapframe *trapframe) trapdebug_enter(trapframe, 0); type = (trapframe->cause & CR_EXC_CODE) >> CR_EXC_CODE_SHIFT; - if (USERMODE(trapframe->sr)) { + if (TRAPF_USERMODE(trapframe)) { type |= T_USER; usermode = 1; } else { Modified: user/jmallett/octeon/sys/mips/rmi/clock.c ============================================================================== --- user/jmallett/octeon/sys/mips/rmi/clock.c Tue Apr 6 01:04:32 2010 (r206230) +++ user/jmallett/octeon/sys/mips/rmi/clock.c Tue Apr 6 01:06:52 2010 (r206231) @@ -116,11 +116,11 @@ count_compare_clockhandler(struct trapfr cycles += XLR_CPU_HZ / hz; mips_wr_compare(cycles); - hardclock_cpu(USERMODE(tf->sr)); + hardclock_cpu(TRAPF_USERMODE(tf)); if (count_scale_factor[cpu] == STAT_PROF_CLOCK_SCALE_FACTOR) { - statclock(USERMODE(tf->sr)); + statclock(TRAPF_USERMODE(tf)); if (profprocs != 0) { - profclock(USERMODE(tf->sr), tf->pc); + profclock(TRAPF_USERMODE(tf), tf->pc); } count_scale_factor[cpu] = 0; } @@ -148,11 +148,11 @@ pic_hardclockhandler(struct trapframe *t printf("Clock tick foo at %ld\n", clock_tick_foo); } */ - hardclock(USERMODE(tf->sr), tf->pc); + hardclock(TRAPF_USERMODE(tf), tf->pc); if (scale_factor == STAT_PROF_CLOCK_SCALE_FACTOR) { - statclock(USERMODE(tf->sr)); + statclock(TRAPF_USERMODE(tf)); if (profprocs != 0) { - profclock(USERMODE(tf->sr), tf->pc); + profclock(TRAPF_USERMODE(tf), tf->pc); } scale_factor = 0; } From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 01:08:21 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 AC1671065670; Tue, 6 Apr 2010 01:08:21 +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 9A8A98FC13; Tue, 6 Apr 2010 01:08:21 +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 o3618L0Q099640; Tue, 6 Apr 2010 01:08:21 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3618LGU099637; Tue, 6 Apr 2010 01:08:21 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060108.o3618LGU099637@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 01:08:21 +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: r206232 - in user/jmallett/octeon/sys/mips: include mips 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: Tue, 06 Apr 2010 01:08:21 -0000 Author: jmallett Date: Tue Apr 6 01:08:21 2010 New Revision: 206232 URL: http://svn.freebsd.org/changeset/base/206232 Log: o) Add a UMA small allocator that uses XKPHYS for N64 kernels. o) Sort some defines. Modified: user/jmallett/octeon/sys/mips/include/vmparam.h user/jmallett/octeon/sys/mips/mips/vm_machdep.c Modified: user/jmallett/octeon/sys/mips/include/vmparam.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/vmparam.h Tue Apr 6 01:06:52 2010 (r206231) +++ user/jmallett/octeon/sys/mips/include/vmparam.h Tue Apr 6 01:08:21 2010 (r206232) @@ -104,17 +104,18 @@ /* user/kernel map constants */ #define VM_MIN_ADDRESS ((vm_offset_t)0x00000000) +#define VM_MAX_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0xffffffff) + #define VM_MAXUSER_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0x80000000) #define VM_MAX_MMAP_ADDR VM_MAXUSER_ADDRESS -#define VM_MAX_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0x80000000) #ifndef VM_KERNEL_ALLOC_OFFSET #define VM_KERNEL_ALLOC_OFFSET ((vm_offset_t)0x00000000) #endif #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0xC0000000) +#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0xFFFFC000) #define VM_KERNEL_WIRED_ADDR_END (VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET) -#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0xFFFFC000) #if 0 #define KERNBASE (VM_MIN_KERNEL_ADDRESS) #else @@ -156,6 +157,11 @@ #define VM_INITIAL_PAGEIN 16 #endif +/* provide our own memory allocator for small uma allocations */ +#if defined(__mips_n64) +#define UMA_MD_SMALL_ALLOC +#endif + /* * max number of non-contig chunks of physical RAM you can have */ Modified: user/jmallett/octeon/sys/mips/mips/vm_machdep.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/vm_machdep.c Tue Apr 6 01:06:52 2010 (r206231) +++ user/jmallett/octeon/sys/mips/mips/vm_machdep.c Tue Apr 6 01:08:21 2010 (r206232) @@ -64,12 +64,15 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include +#include #include -#include #include -#include +#include +#include +#include +#include +#include #include #include @@ -570,6 +573,56 @@ swi_vm(void *dummy) { } +#if defined(__mips_n64) +void * +uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) +{ + static vm_pindex_t color; + vm_paddr_t pa; + vm_page_t m; + int pflags; + void *va; + + *flags = UMA_SLAB_PRIV; + + if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) + pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; + else + pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED; + + if (wait & M_ZERO) + pflags |= VM_ALLOC_ZERO; + + for (;;) { + m = vm_page_alloc(NULL, color++, pflags | VM_ALLOC_NOOBJ); + if (m == NULL) { + if (wait & M_NOWAIT) + return (NULL); + else + VM_WAIT; + } else + break; + } + + pa = VM_PAGE_TO_PHYS(m); + va = (void *)MIPS_PHYS_TO_XKPHYS(MIPS_XKPHYS_CCA_CNC, pa); + if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) + bzero(va, PAGE_SIZE); + return (va); +} + +void +uma_small_free(void *mem, int size, u_int8_t flags) +{ + vm_page_t m; + + m = PHYS_TO_VM_PAGE(MIPS_XKPHYS_TO_PHYS((vm_offset_t)mem)); + m->wire_count--; + vm_page_free(m); + atomic_subtract_int(&cnt.v_wire_count, 1); +} +#endif + int cpu_set_user_tls(struct thread *td, void *tls_base) { From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 01:09:18 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 0CB031065672; Tue, 6 Apr 2010 01:09:18 +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 EFA438FC08; Tue, 6 Apr 2010 01:09:17 +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 o3619H09099872; Tue, 6 Apr 2010 01:09:17 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3619Hon099870; Tue, 6 Apr 2010 01:09:17 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060109.o3619Hon099870@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 01:09:17 +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: r206233 - 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: Tue, 06 Apr 2010 01:09:18 -0000 Author: jmallett Date: Tue Apr 6 01:09:17 2010 New Revision: 206233 URL: http://svn.freebsd.org/changeset/base/206233 Log: Remove a missed include. Modified: user/jmallett/octeon/sys/mips/include/db_machdep.h Modified: user/jmallett/octeon/sys/mips/include/db_machdep.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/db_machdep.h Tue Apr 6 01:08:21 2010 (r206232) +++ user/jmallett/octeon/sys/mips/include/db_machdep.h Tue Apr 6 01:09:17 2010 (r206233) @@ -38,7 +38,6 @@ #define _MIPS_DB_MACHDEP_H_ #include -#include #include #include From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 01:12:04 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 9CC05106564A; Tue, 6 Apr 2010 01:12:04 +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 718648FC17; Tue, 6 Apr 2010 01:12:04 +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 o361C4mL000614; Tue, 6 Apr 2010 01:12:04 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o361C464000613; Tue, 6 Apr 2010 01:12:04 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060112.o361C464000613@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 01:12:04 +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: r206234 - 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: Tue, 06 Apr 2010 01:12:04 -0000 Author: jmallett Date: Tue Apr 6 01:12:04 2010 New Revision: 206234 URL: http://svn.freebsd.org/changeset/base/206234 Log: Remove what seems to be a gratuitous JunOS file. Deleted: user/jmallett/octeon/sys/mips/include/defs.h From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 01:13:30 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 6EEEC106566B; Tue, 6 Apr 2010 01:13:30 +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 43CC98FC19; Tue, 6 Apr 2010 01:13:30 +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 o361DUEP000988; Tue, 6 Apr 2010 01:13:30 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o361DU0e000987; Tue, 6 Apr 2010 01:13:30 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060113.o361DU0e000987@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 01:13:30 +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: r206235 - 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: Tue, 06 Apr 2010 01:13:30 -0000 Author: jmallett Date: Tue Apr 6 01:13:29 2010 New Revision: 206235 URL: http://svn.freebsd.org/changeset/base/206235 Log: Remove another stray JunOS file. Deleted: user/jmallett/octeon/sys/mips/include/queue.h From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 01:32:12 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 7E78E106564A; Tue, 6 Apr 2010 01:32:12 +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 6D00E8FC08; Tue, 6 Apr 2010 01:32:12 +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 o361WCgD005318; Tue, 6 Apr 2010 01:32:12 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o361WCib005316; Tue, 6 Apr 2010 01:32:12 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060132.o361WCib005316@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 01:32:12 +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: r206238 - 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: Tue, 06 Apr 2010 01:32:12 -0000 Author: jmallett Date: Tue Apr 6 01:32:12 2010 New Revision: 206238 URL: http://svn.freebsd.org/changeset/base/206238 Log: Most MIPS platforms have sparse (or at least gap-ridden) physical address spaces, don't waste a bunch of vm_page_t structrures on memory that's not going to exist. This may be too conservative of a definition of denseness. Modified: user/jmallett/octeon/sys/mips/include/vmparam.h Modified: user/jmallett/octeon/sys/mips/include/vmparam.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/vmparam.h Tue Apr 6 01:17:47 2010 (r206237) +++ user/jmallett/octeon/sys/mips/include/vmparam.h Tue Apr 6 01:32:12 2010 (r206238) @@ -168,9 +168,9 @@ #define VM_PHYSSEG_MAX 32 /* - * The physical address space is densely populated. + * The physical address space is sparsely populated. */ -#define VM_PHYSSEG_DENSE +#define VM_PHYSSEG_SPARSE /* * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 01:32:42 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 AA81F106564A; Tue, 6 Apr 2010 01:32:42 +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 7EE1D8FC14; Tue, 6 Apr 2010 01:32:42 +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 o361WgLW005481; Tue, 6 Apr 2010 01:32:42 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o361WgUd005479; Tue, 6 Apr 2010 01:32:42 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060132.o361WgUd005479@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 01:32:42 +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: r206239 - user/jmallett/octeon/sys/mips/cavium 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: Tue, 06 Apr 2010 01:32:42 -0000 Author: jmallett Date: Tue Apr 6 01:32:42 2010 New Revision: 206239 URL: http://svn.freebsd.org/changeset/base/206239 Log: o) Don't set Maxmem, pmap_bootstrap will. o) Remove some (but not all) duplicate printfs. Modified: user/jmallett/octeon/sys/mips/cavium/octeon_machdep.c Modified: user/jmallett/octeon/sys/mips/cavium/octeon_machdep.c ============================================================================== --- user/jmallett/octeon/sys/mips/cavium/octeon_machdep.c Tue Apr 6 01:32:12 2010 (r206238) +++ user/jmallett/octeon/sys/mips/cavium/octeon_machdep.c Tue Apr 6 01:32:42 2010 (r206239) @@ -526,12 +526,8 @@ octeon_memory_init(void) uint32_t realmem_bytes; if (octeon_board_real()) { - printf("octeon_dram == %jx\n", (intmax_t)octeon_dram); - printf("reduced to ram: %u MB", (uint32_t)octeon_dram >> 20); - realmem_bytes = (octeon_dram - PAGE_SIZE); realmem_bytes &= ~(PAGE_SIZE - 1); - printf("Real memory bytes is %x\n", realmem_bytes); } else { /* Simulator we limit to 96 meg */ realmem_bytes = (96 << 20); @@ -545,8 +541,6 @@ octeon_memory_init(void) phys_avail[1] = realmem_bytes; realmem_bytes -= OCTEON_DRAM_FIRST_256_END; realmem_bytes &= ~(PAGE_SIZE - 1); - printf("phys_avail[0] = %#lx phys_avail[1] = %#lx\n", - (long)phys_avail[0], (long)phys_avail[1]); } else { /* Simulator gets 96Meg period. */ phys_avail[1] = (96 << 20); @@ -572,23 +566,14 @@ octeon_memory_init(void) realmem_bytes &= ~(PAGE_SIZE - 1); /* Now map the rest of the memory */ phys_avail[2] = 0x20000000; - printf("realmem_bytes is now at %x\n", realmem_bytes); phys_avail[3] = ((uint32_t) 0x20000000 + realmem_bytes); - printf("Next block of memory goes from %#lx to %#lx\n", - (long)phys_avail[2], (long)phys_avail[3]); physmem += btoc(phys_avail[3] - phys_avail[2]); - } else { - printf("realmem_bytes is %d\n", realmem_bytes); } realmem = physmem; printf("Total DRAM Size %#X\n", (uint32_t) octeon_dram); printf("Bank 0 = %#08lX -> %#08lX\n", (long)phys_avail[0], (long)phys_avail[1]); printf("Bank 1 = %#08lX -> %#08lX\n", (long)phys_avail[2], (long)phys_avail[3]); - printf("physmem: %#lx\n", physmem); - - Maxmem = physmem; - } void From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 01:42:21 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 91921106566C; Tue, 6 Apr 2010 01:42:21 +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 806948FC25; Tue, 6 Apr 2010 01:42:21 +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 o361gLG2007638; Tue, 6 Apr 2010 01:42:21 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o361gL1o007636; Tue, 6 Apr 2010 01:42:21 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060142.o361gL1o007636@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 01:42:21 +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: r206240 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 01:42:21 -0000 Author: jmallett Date: Tue Apr 6 01:42:21 2010 New Revision: 206240 URL: http://svn.freebsd.org/changeset/base/206240 Log: Now that we're using a sparse page array, don't use the size of the page array to determine whether a page is managed. Modified: user/jmallett/octeon/sys/mips/mips/pmap.c Modified: user/jmallett/octeon/sys/mips/mips/pmap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/pmap.c Tue Apr 6 01:32:42 2010 (r206239) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Tue Apr 6 01:42:21 2010 (r206240) @@ -3259,7 +3259,7 @@ page_is_managed(vm_offset_t pa) { vm_offset_t pgnum = mips_btop(pa); - if (pgnum >= first_page && (pgnum < (first_page + vm_page_array_size))) { + if (pgnum >= first_page) { vm_page_t m; m = PHYS_TO_VM_PAGE(pa); From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 04:57:41 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 CE95C106564A; Tue, 6 Apr 2010 04:57:41 +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 BDA888FC0A; Tue, 6 Apr 2010 04:57:41 +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 o364vfK7050774; Tue, 6 Apr 2010 04:57:41 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o364vf0l050772; Tue, 6 Apr 2010 04:57:41 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060457.o364vf0l050772@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 04:57:41 +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: r206243 - 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: Tue, 06 Apr 2010 04:57:41 -0000 Author: jmallett Date: Tue Apr 6 04:57:41 2010 New Revision: 206243 URL: http://svn.freebsd.org/changeset/base/206243 Log: Fix xkphys->phys macro. Modified: user/jmallett/octeon/sys/mips/include/cpuregs.h Modified: user/jmallett/octeon/sys/mips/include/cpuregs.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/cpuregs.h Tue Apr 6 03:07:39 2010 (r206242) +++ user/jmallett/octeon/sys/mips/include/cpuregs.h Tue Apr 6 04:57:41 2010 (r206243) @@ -111,7 +111,7 @@ #define MIPS_PHYS_TO_XKPHYS(cca,x) \ ((0x2ULL << 62) | ((unsigned long long)(cca) << 59) | (x)) -#define MIPS_XKPHYS_TO_PHYS(x) ((x) & 0x0effffffffffffffULL) +#define MIPS_XKPHYS_TO_PHYS(x) ((x) & 0x07ffffffffffffffULL) /* CPU dependent mtc0 hazard hook */ #ifdef TARGET_OCTEON From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 05:06:14 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 41C3F106564A; Tue, 6 Apr 2010 05:06:14 +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 3089D8FC23; Tue, 6 Apr 2010 05:06:14 +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 o3656EdQ052690; Tue, 6 Apr 2010 05:06:14 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3656EXN052688; Tue, 6 Apr 2010 05:06:14 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060506.o3656EXN052688@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 05:06:14 +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: r206244 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 05:06:14 -0000 Author: jmallett Date: Tue Apr 6 05:06:13 2010 New Revision: 206244 URL: http://svn.freebsd.org/changeset/base/206244 Log: Simplify pmap_kextract, with the added bonus of not using chains of conditionals such that it is possible (er, yeah) to add a case that can not ever be reached. Also panic if we don't know what address space an address is in; that's probably a good sign that something has gone wrong. Modified: user/jmallett/octeon/sys/mips/mips/pmap.c Modified: user/jmallett/octeon/sys/mips/mips/pmap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/pmap.c Tue Apr 6 04:57:41 2010 (r206243) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Tue Apr 6 05:06:13 2010 (r206244) @@ -3329,73 +3329,67 @@ pmap_set_modified(vm_offset_t pa) /* PMAP_INLINE */ vm_offset_t pmap_kextract(vm_offset_t va) { - vm_offset_t pa = 0; + /* + * First, the direct-mapped regions. + */ +#if defined(__mips_n64) + if (va >= MIPS_XKPHYS_START && va < MIPS_XKPHYS_END) + return (MIPS_XKPHYS_TO_PHYS(va)); +#endif + + if (va >= MIPS_KSEG0_START && va < MIPS_KSEG0_END) + return (MIPS_KSEG0_TO_PHYS(va)); + + if (va >= MIPS_KSEG1_START && va < MIPS_KSEG1_END) + return (MIPS_KSEG1_TO_PHYS(va)); - if (va < MIPS_KSEG0_START) { - /* user virtual address */ + /* + * User virtual addresses. + */ + if (va < VM_MAXUSER_ADDRESS) { pt_entry_t *ptep; if (curproc && curproc->p_vmspace) { ptep = pmap_pte(&curproc->p_vmspace->vm_pmap, va); - if (ptep) - pa = TLBLO_PTE_TO_PA(*ptep) | - (va & PAGE_MASK); + if (ptep) { + return (TLBLO_PTE_TO_PA(*ptep) | + (va & PAGE_MASK)); + } + return (0); } - } else if (va >= MIPS_KSEG0_START && - va < MIPS_KSEG1_START) - pa = MIPS_KSEG0_TO_PHYS(va); - else if (va >= MIPS_KSEG1_START && - va < MIPS_KSEG2_START) - pa = MIPS_KSEG1_TO_PHYS(va); + } + #ifdef VM_ALLOC_WIRED_TLB_PG_POOL - else if (need_wired_tlb_page_pool && ((va >= VM_MIN_KERNEL_ADDRESS) && + if (need_wired_tlb_page_pool && ((va >= VM_MIN_KERNEL_ADDRESS) && (va < (VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET)))) - pa = MIPS_KSEG0_TO_PHYS(va); + return (MIPS_KSEG0_TO_PHYS(va)); #endif -#if defined(__mips_n64) - else if (va >= MIPS_XKPHYS_START && va < MIPS_XKPHYS_END) - pa = MIPS_XKPHYS_TO_PHYS(va); -#endif - else if (va >= MIPS_KSEG2_START && va < VM_MAX_KERNEL_ADDRESS) { + + /* + * Kernel virtual. + */ + if (va >= MIPS_KSEG2_START && va < MIPS_KSEG2_END) { pt_entry_t *ptep; /* Is the kernel pmap initialized? */ if (kernel_pmap->pm_active) { #if !defined(__mips_n64) - if (va >= (vm_offset_t)virtual_sys_start) { + if (va < (vm_offset_t)virtual_sys_start) { + panic("%s for special address %p.", __func__, (void *)va); + } #endif - /* Its inside the virtual address range */ - ptep = pmap_pte(kernel_pmap, va); - if (ptep) - pa = TLBLO_PTE_TO_PA(*ptep) | - (va & PAGE_MASK); -#if !defined(__mips_n64) - } else { - int i; - /* - * its inside the special mapping area, I - * don't think this should happen, but if it - * does I want it toa all work right :-) - * Note if it does happen, we assume the - * caller has the lock? FIXME, this needs to - * be checked FIXEM - RRS. - */ - for (i = 0; i < MAXCPU; i++) { - if ((sysmap_lmem[i].valid1) && ((vm_offset_t)sysmap_lmem[i].CADDR1 == va)) { - pa = TLBLO_PTE_TO_PA(sysmap_lmem[i].CMAP1); - break; - } - if ((sysmap_lmem[i].valid2) && ((vm_offset_t)sysmap_lmem[i].CADDR2 == va)) { - pa = TLBLO_PTE_TO_PA(sysmap_lmem[i].CMAP2); - break; - } - } + /* Its inside the virtual address range */ + ptep = pmap_pte(kernel_pmap, va); + if (ptep) { + return (TLBLO_PTE_TO_PA(*ptep) | + (va & PAGE_MASK)); } -#endif + return (0); } } - return pa; + + panic("%s for unknown address space %p.", __func__, (void *)va); } void From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 05:11:54 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 54F1F106566B; Tue, 6 Apr 2010 05:11:54 +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 443FA8FC1B; Tue, 6 Apr 2010 05:11:54 +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 o365BsYZ053951; Tue, 6 Apr 2010 05:11:54 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o365BsDO053949; Tue, 6 Apr 2010 05:11:54 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060511.o365BsDO053949@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 05:11:54 +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: r206245 - 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: Tue, 06 Apr 2010 05:11:54 -0000 Author: jmallett Date: Tue Apr 6 05:11:53 2010 New Revision: 206245 URL: http://svn.freebsd.org/changeset/base/206245 Log: Add a PTR_LI, useful for getting the correct sign extension of pointer values, which is lost with REG_LI, for N32. Modified: user/jmallett/octeon/sys/mips/include/asm.h Modified: user/jmallett/octeon/sys/mips/include/asm.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/asm.h Tue Apr 6 05:06:13 2010 (r206244) +++ user/jmallett/octeon/sys/mips/include/asm.h Tue Apr 6 05:11:53 2010 (r206245) @@ -406,6 +406,7 @@ _C_LABEL(x): #define PTR_SUBIU subu #define PTR_L lw #define PTR_LA la +#define PTR_LI li #define PTR_S sw #define PTR_SLL sll #define PTR_SLLV sllv @@ -428,6 +429,7 @@ _C_LABEL(x): #define PTR_SUBIU dsubu #define PTR_L ld #define PTR_LA dla +#define PTR_LI dli #define PTR_S sd #define PTR_SLL dsll #define PTR_SLLV dsllv From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 05:12:47 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 749DB106566B; Tue, 6 Apr 2010 05:12:47 +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 63DFE8FC12; Tue, 6 Apr 2010 05:12:47 +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 o365Clg7054182; Tue, 6 Apr 2010 05:12:47 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o365Clt1054180; Tue, 6 Apr 2010 05:12:47 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060512.o365Clt1054180@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 05:12:47 +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: r206246 - 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: Tue, 06 Apr 2010 05:12:47 -0000 Author: jmallett Date: Tue Apr 6 05:12:47 2010 New Revision: 206246 URL: http://svn.freebsd.org/changeset/base/206246 Log: Give the correct maxuser address. Modified: user/jmallett/octeon/sys/mips/include/vmparam.h Modified: user/jmallett/octeon/sys/mips/include/vmparam.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/vmparam.h Tue Apr 6 05:11:53 2010 (r206245) +++ user/jmallett/octeon/sys/mips/include/vmparam.h Tue Apr 6 05:12:47 2010 (r206246) @@ -106,7 +106,11 @@ #define VM_MIN_ADDRESS ((vm_offset_t)0x00000000) #define VM_MAX_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0xffffffff) -#define VM_MAXUSER_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0x80000000) +#if defined(__mips_n64) +#define VM_MAXUSER_ADDRESS ((vm_offset_t)0x0000010000000000) /* XUSEG_END */ +#else +#define VM_MAXUSER_ADDRESS ((vm_offset_t)0x80000000) /* USEG_END */ +#endif #define VM_MAX_MMAP_ADDR VM_MAXUSER_ADDRESS #ifndef VM_KERNEL_ALLOC_OFFSET From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 05:13:04 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 7FE43106564A; Tue, 6 Apr 2010 05:13:04 +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 547608FC19; Tue, 6 Apr 2010 05:13:04 +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 o365D4Xx054291; Tue, 6 Apr 2010 05:13:04 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o365D41Z054287; Tue, 6 Apr 2010 05:13:04 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060513.o365D41Z054287@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 05:13:04 +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: r206247 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 05:13:04 -0000 Author: jmallett Date: Tue Apr 6 05:13:04 2010 New Revision: 206247 URL: http://svn.freebsd.org/changeset/base/206247 Log: Use PTR_LI where appropriate. Modified: user/jmallett/octeon/sys/mips/mips/exception.S user/jmallett/octeon/sys/mips/mips/support.S user/jmallett/octeon/sys/mips/mips/swtch.S Modified: user/jmallett/octeon/sys/mips/mips/exception.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/exception.S Tue Apr 6 05:12:47 2010 (r206246) +++ user/jmallett/octeon/sys/mips/mips/exception.S Tue Apr 6 05:13:04 2010 (r206247) @@ -811,7 +811,7 @@ NLEAF(MipsTLBInvalidException) .set noreorder MFC0 k0, COP_0_BAD_VADDR - li k1, VM_MAXUSER_ADDRESS + PTR_LI k1, VM_MAXUSER_ADDRESS sltu k1, k0, k1 bnez k1, 1f nop @@ -975,7 +975,7 @@ END(MipsTLBInvalidException) NLEAF(MipsTLBMissException) .set noat MFC0 k0, COP_0_BAD_VADDR # k0=bad address - li k1, VM_MAX_KERNEL_ADDRESS # check fault address against + PTR_LI k1, VM_MAX_KERNEL_ADDRESS # check fault address against sltu k1, k1, k0 # upper bound of kernel_segmap bnez k1, MipsKernGenException # out of bound lui k1, %hi(kernel_segmap) # k1=hi of segbase @@ -1151,7 +1151,7 @@ VECTOR(MipsCache, unknown) PTR_LA k0, _C_LABEL(MipsCacheException) li k1, MIPS_PHYS_MASK and k0, k1 - li k1, MIPS_KSEG1_START + PTR_LI k1, MIPS_KSEG1_START or k0, k1 j k0 nop Modified: user/jmallett/octeon/sys/mips/mips/support.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/support.S Tue Apr 6 05:12:47 2010 (r206246) +++ user/jmallett/octeon/sys/mips/mips/support.S Tue Apr 6 05:13:04 2010 (r206247) @@ -1409,8 +1409,7 @@ END(fusufault) a pointer that is in user space. It will be used as the basic primitive for a kernel supported user space lock implementation. */ LEAF(casuptr) - - li t0, VM_MAXUSER_ADDRESS /* verify address validity */ + PTR_LI t0, VM_MAXUSER_ADDRESS /* verify address validity */ blt a0, t0, fusufault /* trap faults */ nop Modified: user/jmallett/octeon/sys/mips/mips/swtch.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/swtch.S Tue Apr 6 05:12:47 2010 (r206246) +++ user/jmallett/octeon/sys/mips/mips/swtch.S Tue Apr 6 05:13:04 2010 (r206247) @@ -294,7 +294,7 @@ blocked_loop: PTR_L a2, TD_PCB(a1) PTR_S a2, PC_CURPCB(a3) PTR_L v0, TD_KSTACK(a1) - li s0, (MIPS_KSEG2_START+VM_KERNEL_ALLOC_OFFSET) # If Uarea addr is below kseg2, + PTR_LI s0, (MIPS_KSEG2_START+VM_KERNEL_ALLOC_OFFSET) # If Uarea addr is below kseg2, bltu v0, s0, sw2 # no need to insert in TLB. lw a1, TD_UPTE(s7) # t0 = u. pte /* @@ -311,7 +311,7 @@ blocked_loop: mfc0 s0, COP_0_TLB_INDEX nop - li t1, MIPS_KSEG0_START # invalidate tlb entry + PTR_LI t1, MIPS_KSEG0_START # invalidate tlb entry bltz s0, entry0set nop sll s0, PAGE_SHIFT From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 05:52:22 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 A028B106564A; Tue, 6 Apr 2010 05:52:22 +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 8F0C28FC0C; Tue, 6 Apr 2010 05:52:22 +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 o365qM9w062976; Tue, 6 Apr 2010 05:52:22 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o365qMtW062973; Tue, 6 Apr 2010 05:52:22 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060552.o365qMtW062973@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 05:52:22 +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: r206249 - in user/jmallett/octeon/sys/mips: include mips 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: Tue, 06 Apr 2010 05:52:22 -0000 Author: jmallett Date: Tue Apr 6 05:52:22 2010 New Revision: 206249 URL: http://svn.freebsd.org/changeset/base/206249 Log: o) Retire pmap_segbase for the near future... o) Make pmap_segshift mask based on the number of page directory entries in the page directory. Exception processing code should do the same thing and then we should tune NPDEPG downwards so that we don't end up with (as we do with this commit) a bunch of empty page tables in the kernel page directory on N64. Of course, on N64 we should really switch to allocating virtual addresses from the XKSEG, which we could now do quite easily... Modified: user/jmallett/octeon/sys/mips/include/param.h user/jmallett/octeon/sys/mips/mips/pmap.c Modified: user/jmallett/octeon/sys/mips/include/param.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/param.h Tue Apr 6 05:20:46 2010 (r206248) +++ user/jmallett/octeon/sys/mips/include/param.h Tue Apr 6 05:52:22 2010 (r206249) @@ -104,6 +104,7 @@ #define PAGE_SIZE (1<> SEGSHIFT)) -#define pmap_segbase(v) ((vm_offset_t)(intptr_t)(int32_t)((v) << SEGSHIFT)) +#define pmap_segshift(v) (((v) >> SEGSHIFT) & (NPDEPG - 1)) #define pmap_pde(m, v) (&((m)->pm_segtab[pmap_segshift((v))])) #define segtab_pde(m, v) ((m)[pmap_segshift((v))]) @@ -3099,127 +3098,6 @@ pmap_align_superpage(vm_object_t object, *addr = ((*addr + SEGOFSET) & ~SEGOFSET) + superpage_offset; } -int pmap_pid_dump(int pid); - -int -pmap_pid_dump(int pid) -{ - pmap_t pmap; - struct proc *p; - int npte = 0; - int index; - - sx_slock(&allproc_lock); - LIST_FOREACH(p, &allproc, p_list) { - if (p->p_pid != pid) - continue; - - if (p->p_vmspace) { - int i, j; - - printf("vmspace is %p\n", - p->p_vmspace); - index = 0; - pmap = vmspace_pmap(p->p_vmspace); - printf("pmap asid:%x generation:%x\n", - pmap->pm_asid[0].asid, - pmap->pm_asid[0].gen); - for (i = 0; i < NUSERPGTBLS; i++) { - pd_entry_t *pde; - pt_entry_t *pte; - unsigned base = pmap_segbase(i); - - pde = &pmap->pm_segtab[i]; - if (pde && *pde != 0) { - for (j = 0; j < 1024; j++) { - vm_offset_t va = base + - (j << PAGE_SHIFT); - - pte = pmap_pte(pmap, va); - if (pte && pte_test(pte, PG_V)) { - vm_offset_t pa; - vm_page_t m; - - pa = TLBLO_PTE_TO_PA(*pte); - m = PHYS_TO_VM_PAGE(pa); - printf("va: %p, pt: %p, h: %d, w: %d, f: 0x%x", - (void *)va, - (void *)pa, - m->hold_count, - m->wire_count, - m->flags); - npte++; - index++; - if (index >= 2) { - index = 0; - printf("\n"); - } else { - printf(" "); - } - } - } - } - } - } else { - printf("Process pid:%d has no vm_space\n", pid); - } - break; - } - sx_sunlock(&allproc_lock); - return npte; -} - - -#if defined(DEBUG) - -static void pads(pmap_t pm); -void pmap_pvdump(vm_offset_t pa); - -/* print address space of pmap*/ -static void -pads(pmap_t pm) -{ - unsigned va, i, j; - pt_entry_t *ptep; - - if (pm == kernel_pmap) - return; - for (i = 0; i < NPTEPG; i++) - if (pm->pm_segtab[i]) - for (j = 0; j < NPTEPG; j++) { - va = pmap_segbase(i) + (j << PAGE_SHIFT); - if (pm == kernel_pmap && va < KERNBASE) - continue; - if (pm != kernel_pmap && - va >= VM_MAXUSER_ADDRESS) - continue; - ptep = pmap_pte(pm, va); - if (pmap_pte_v(ptep)) - printf("%x:%x ", va, *(int *)ptep); - } - -} - -void -pmap_pvdump(vm_offset_t pa) -{ - pv_entry_t pv; - vm_page_t m; - - printf("pa %x", pa); - m = PHYS_TO_VM_PAGE(pa); - for (pv = TAILQ_FIRST(&m->md.pv_list); pv; - pv = TAILQ_NEXT(pv, pv_list)) { - printf(" -> pmap %p, va %x", (void *)pv->pv_pmap, pv->pv_va); - pads(pv->pv_pmap); - } - printf(" "); -} - -/* N/C */ -#endif - - /* * Allocate TLB address space tag (called ASID or TLBPID) and return it. * It takes almost as much or more time to search the TLB for a From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 05:53:54 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 BE16F106566C; Tue, 6 Apr 2010 05:53:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 939408FC13; Tue, 6 Apr 2010 05:53:54 +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 o365rshl063339; Tue, 6 Apr 2010 05:53:54 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o365rsP2063337; Tue, 6 Apr 2010 05:53:54 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004060553.o365rsP2063337@svn.freebsd.org> From: Doug Barton Date: Tue, 6 Apr 2010 05:53:54 +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: r206250 - user/dougb/portmaster 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: Tue, 06 Apr 2010 05:53:54 -0000 Author: dougb Date: Tue Apr 6 05:53:54 2010 New Revision: 206250 URL: http://svn.freebsd.org/changeset/base/206250 Log: For the command line options -d/-D and -b/-B, allow the command line version to override values the user has in ~/.portmaster rc For the -F/-G conflict, just unset -G. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Tue Apr 6 05:52:22 2010 (r206249) +++ user/dougb/portmaster/portmaster Tue Apr 6 05:53:54 2010 (r206250) @@ -36,6 +36,8 @@ if [ -z "$PM_PARENT_PID" ]; then [ -r "$HOME/.portmasterrc" ] && . $HOME/.portmasterrc set +o allexport + my_environment=`set` + # If we are already root, unset this to avoid potential conflict euid=`ps -o uid $$` ; euid=${euid##* } [ "$euid" -eq 0 ] && unset PM_SU_CMD PM_SU_VERBOSE @@ -1062,20 +1064,44 @@ unset -f packages_init [ -n "$PM_EXCL" ] && export PM_EXCL +test_command_line () { + local var envar + + for var in $my_environment; do + case "$var" in + ${1}=*) envar=$1 ;; + ${2}=*) envar=$2 ;; + esac + done + + if [ -n "$envar" ]; then + unset $envar + return 0 + fi + + return 1 +} + # Error checking for getopts [ -n "$PM_FORCE" -a "$INTERACTIVE_UPDATE" ] && fail "The -f and -i options are mutually exclusive" -[ -n "$BACKUP" -a -n "$NO_BACKUP" ] && - fail "The -b and -B options are mutually exclusive" -[ -n "$ALWAYS_SCRUB_DISTFILES" -a -n "$DONT_SCRUB_DISTFILES" ] && - fail "The -d and -D options are mutually exclusive" +if [ -n "$BACKUP" -a -n "$NO_BACKUP" ]; then + test_command_line NO_BACKUP BACKUP || + fail "The -b and -B options are mutually exclusive" +fi +if [ -n "$ALWAYS_SCRUB_DISTFILES" -a -n "$DONT_SCRUB_DISTFILES" ]; then + test_command_line ALWAYS_SCRUB_DISTFILES DONT_SCRUB_DISTFILES || + fail "The -d and -D options are mutually exclusive" +fi [ -n "$FETCH_ONLY" -a -n "$NO_RECURSIVE_CONFIG" ] && - fail "The -F and -G options are mutually exclusive" + unset NO_RECURSIVE_CONFIG [ -n "$NO_RECURSIVE_CONFIG" -a -n "$PM_PACKAGES_BUILD" ] && fail 'The --packages-build and -G options are mutually exclusive' [ -n "$NO_RECURSIVE_CONFIG" -a -n "$PM_DEL_BUILD_ONLY" ] && fail 'The --delete-build-only and -G options are mutually exclusive' +unset my_environment + #=============== Begin functions for getopts features and main =============== check_state () { From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 07:40:43 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 97A27106566B; Tue, 6 Apr 2010 07:40:43 +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 872748FC17; Tue, 6 Apr 2010 07:40:43 +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 o367eh3i086832; Tue, 6 Apr 2010 07:40:43 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o367ehRR086828; Tue, 6 Apr 2010 07:40:43 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060740.o367ehRR086828@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 07:40:43 +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: r206251 - in user/jmallett/octeon/sys/mips: include mips 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: Tue, 06 Apr 2010 07:40:43 -0000 Author: jmallett Date: Tue Apr 6 07:40:43 2010 New Revision: 206251 URL: http://svn.freebsd.org/changeset/base/206251 Log: Switch to using XKSEG for N64. Modified: user/jmallett/octeon/sys/mips/include/cpuregs.h user/jmallett/octeon/sys/mips/include/vmparam.h user/jmallett/octeon/sys/mips/mips/pmap.c Modified: user/jmallett/octeon/sys/mips/include/cpuregs.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/cpuregs.h Tue Apr 6 05:53:54 2010 (r206250) +++ user/jmallett/octeon/sys/mips/include/cpuregs.h Tue Apr 6 07:40:43 2010 (r206251) @@ -113,6 +113,9 @@ ((0x2ULL << 62) | ((unsigned long long)(cca) << 59) | (x)) #define MIPS_XKPHYS_TO_PHYS(x) ((x) & 0x07ffffffffffffffULL) +#define MIPS_XKSEG_START 0xc000000000000000 +#define MIPS_XKSEG_END 0xc00000ff80000000 + /* CPU dependent mtc0 hazard hook */ #ifdef TARGET_OCTEON #define COP0_SYNC nop; nop; nop; nop; nop; Modified: user/jmallett/octeon/sys/mips/include/vmparam.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/vmparam.h Tue Apr 6 05:53:54 2010 (r206250) +++ user/jmallett/octeon/sys/mips/include/vmparam.h Tue Apr 6 07:40:43 2010 (r206251) @@ -117,8 +117,13 @@ #define VM_KERNEL_ALLOC_OFFSET ((vm_offset_t)0x00000000) #endif +#if defined(__mips_n64) +#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xc000000000000000) +#define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + (NPDEPG * NPTEPG * PAGE_SIZE)) +#else #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0xC0000000) #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0xFFFFC000) +#endif #define VM_KERNEL_WIRED_ADDR_END (VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET) #if 0 #define KERNBASE (VM_MIN_KERNEL_ADDRESS) Modified: user/jmallett/octeon/sys/mips/mips/pmap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/pmap.c Tue Apr 6 05:53:54 2010 (r206250) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Tue Apr 6 07:40:43 2010 (r206251) @@ -3246,16 +3246,29 @@ pmap_kextract(vm_offset_t va) /* * Kernel virtual. */ +#if defined(__mips_n64) + if (va >= MIPS_XKSEG_START && va < MIPS_XKSEG_END) { + pt_entry_t *ptep; + + /* Is the kernel pmap initialized? */ + if (kernel_pmap->pm_active) { + /* It's inside the virtual address range */ + ptep = pmap_pte(kernel_pmap, va); + if (ptep) { + return (TLBLO_PTE_TO_PA(*ptep) | + (va & PAGE_MASK)); + } + } + } +#else if (va >= MIPS_KSEG2_START && va < MIPS_KSEG2_END) { pt_entry_t *ptep; /* Is the kernel pmap initialized? */ if (kernel_pmap->pm_active) { -#if !defined(__mips_n64) if (va < (vm_offset_t)virtual_sys_start) { panic("%s for special address %p.", __func__, (void *)va); } -#endif /* Its inside the virtual address range */ ptep = pmap_pte(kernel_pmap, va); @@ -3266,6 +3279,7 @@ pmap_kextract(vm_offset_t va) return (0); } } +#endif panic("%s for unknown address space %p.", __func__, (void *)va); } From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 07:49:07 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 6A353106566B; Tue, 6 Apr 2010 07:49:07 +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 3FD318FC13; Tue, 6 Apr 2010 07:49:07 +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 o367n7UY088699; Tue, 6 Apr 2010 07:49:07 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o367n7gI088696; Tue, 6 Apr 2010 07:49:07 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060749.o367n7gI088696@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 07:49:07 +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: r206252 - 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: Tue, 06 Apr 2010 07:49:07 -0000 Author: jmallett Date: Tue Apr 6 07:49:06 2010 New Revision: 206252 URL: http://svn.freebsd.org/changeset/base/206252 Log: o) Add XUSEG start and end macros. o) Calculate the address space we can handle for user space based on our page table layout. Modified: user/jmallett/octeon/sys/mips/include/cpuregs.h user/jmallett/octeon/sys/mips/include/vmparam.h Modified: user/jmallett/octeon/sys/mips/include/cpuregs.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/cpuregs.h Tue Apr 6 07:40:43 2010 (r206251) +++ user/jmallett/octeon/sys/mips/include/cpuregs.h Tue Apr 6 07:49:06 2010 (r206252) @@ -88,7 +88,7 @@ #define KSEG_ADDRESS(x) ((intptr_t)(int32_t)__CONCAT(0x, x)) #endif -#define MIPS_KUSEG_START 0x0 +#define MIPS_KUSEG_START 0x00000000 #define MIPS_KSEG0_START KSEG_ADDRESS(80000000) #define MIPS_KSEG0_END KSEG_ADDRESS(9fffffff) #define MIPS_KSEG1_START KSEG_ADDRESS(a0000000) @@ -113,6 +113,9 @@ ((0x2ULL << 62) | ((unsigned long long)(cca) << 59) | (x)) #define MIPS_XKPHYS_TO_PHYS(x) ((x) & 0x07ffffffffffffffULL) +#define MIPS_XUSEG_START 0x0000000000000000 +#define MIPS_XUSEG_END 0x0000010000000000 + #define MIPS_XKSEG_START 0xc000000000000000 #define MIPS_XKSEG_END 0xc00000ff80000000 Modified: user/jmallett/octeon/sys/mips/include/vmparam.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/vmparam.h Tue Apr 6 07:40:43 2010 (r206251) +++ user/jmallett/octeon/sys/mips/include/vmparam.h Tue Apr 6 07:49:06 2010 (r206252) @@ -106,10 +106,11 @@ #define VM_MIN_ADDRESS ((vm_offset_t)0x00000000) #define VM_MAX_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0xffffffff) +#define VM_MINUSER_ADDRESS ((vm_offset_t)0x00000000) #if defined(__mips_n64) -#define VM_MAXUSER_ADDRESS ((vm_offset_t)0x0000010000000000) /* XUSEG_END */ +#define VM_MAXUSER_ADDRESS (VM_MINUSER_ADDRESS + (NPDEPG * NPTEPG * PAGE_SIZE)) #else -#define VM_MAXUSER_ADDRESS ((vm_offset_t)0x80000000) /* USEG_END */ +#define VM_MAXUSER_ADDRESS ((vm_offset_t)0x80000000) #endif #define VM_MAX_MMAP_ADDR VM_MAXUSER_ADDRESS @@ -121,8 +122,8 @@ #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xc000000000000000) #define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + (NPDEPG * NPTEPG * PAGE_SIZE)) #else -#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0xC0000000) -#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)(intptr_t)(int32_t)0xFFFFC000) +#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xC0000000) +#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFFFFC000) #endif #define VM_KERNEL_WIRED_ADDR_END (VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET) #if 0 From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 08:29:59 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 DF973106564A; Tue, 6 Apr 2010 08:29:58 +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 C40D58FC0A; Tue, 6 Apr 2010 08:29:58 +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 o368TwK9097689; Tue, 6 Apr 2010 08:29:58 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o368Twpk097685; Tue, 6 Apr 2010 08:29:58 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060829.o368Twpk097685@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 08:29:58 +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: r206253 - in user/jmallett/octeon/sys/mips: include mips 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: Tue, 06 Apr 2010 08:29:59 -0000 Author: jmallett Date: Tue Apr 6 08:29:58 2010 New Revision: 206253 URL: http://svn.freebsd.org/changeset/base/206253 Log: o) Make calling convention for trap() and cpu_intr() the same, reduce diffs between KernGenException and KernIntr. Modified: user/jmallett/octeon/sys/mips/include/intr_machdep.h user/jmallett/octeon/sys/mips/mips/exception.S user/jmallett/octeon/sys/mips/mips/intr_machdep.c Modified: user/jmallett/octeon/sys/mips/include/intr_machdep.h ============================================================================== --- user/jmallett/octeon/sys/mips/include/intr_machdep.h Tue Apr 6 07:49:06 2010 (r206252) +++ user/jmallett/octeon/sys/mips/include/intr_machdep.h Tue Apr 6 08:29:58 2010 (r206253) @@ -43,7 +43,7 @@ void cpu_establish_hardintr(const char * void *, int, int, void **); void cpu_establish_softintr(const char *, driver_filter_t *, void (*)(void*), void *, int, int, void **); -void cpu_intr(struct trapframe *); +register_t cpu_intr(struct trapframe *); /* * Allow a platform to override the default hard interrupt mask and unmask Modified: user/jmallett/octeon/sys/mips/mips/exception.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/exception.S Tue Apr 6 07:49:06 2010 (r206252) +++ user/jmallett/octeon/sys/mips/mips/exception.S Tue Apr 6 08:29:58 2010 (r206253) @@ -591,24 +591,22 @@ NNON_LEAF(MipsKernIntr, KERN_EXC_FRAME_S PTR_SUBU sp, sp, KERN_EXC_FRAME_SIZE .mask 0x80000000, (CALLFRAME_RA - KERN_EXC_FRAME_SIZE) /* - * Save the relevant kernel registers onto the stack. + * Save CPU state, building 'frame'. */ SAVE_CPU - /* - * Call the interrupt handler. + * Call the interrupt handler. a0 points at the saved frame. */ PTR_LA gp, _C_LABEL(_gp) - PTR_ADDU a0, sp, CALLFRAME_SIZ PTR_LA k0, _C_LABEL(cpu_intr) jalr k0 - REG_S a3, CALLFRAME_RA + KERN_REG_SIZE(sp) - /* Why no AST processing here? */ + REG_S a3, CALLFRAME_RA + KERN_REG_SIZE(sp) # for debugging /* * Update interrupt mask in saved status register * Some of interrupts could be disabled by - * intr filters + * intr filters if interrupts are enabled later + * in trap handler */ mfc0 a0, COP_0_STATUS_REG and a0, a0, SR_INT_MASK @@ -616,12 +614,7 @@ NNON_LEAF(MipsKernIntr, KERN_EXC_FRAME_S and a1, a1, ~SR_INT_MASK or a1, a1, a0 SAVE_REG(a1, SR, sp) - -/* - * Restore registers and return from the interrupt. - */ - REG_L v0, CALLFRAME_RA + KERN_REG_SIZE(sp) - RESTORE_CPU + RESTORE_CPU # v0 contains the return address. sync eret .set at Modified: user/jmallett/octeon/sys/mips/mips/intr_machdep.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/intr_machdep.c Tue Apr 6 07:49:06 2010 (r206252) +++ user/jmallett/octeon/sys/mips/mips/intr_machdep.c Tue Apr 6 08:29:58 2010 (r206253) @@ -213,7 +213,7 @@ cpu_establish_softintr(const char *name, mips_intrcnt_setname(mips_intr_counters[irq], event->ie_fullname); } -void +register_t cpu_intr(struct trapframe *tf) { struct intr_event *event; @@ -266,4 +266,6 @@ cpu_intr(struct trapframe *tf) KASSERT(i == 0, ("all interrupts handled")); critical_exit(); + + return (tf->pc); } From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 08:30:21 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 755A6106566B; Tue, 6 Apr 2010 08:30:21 +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 4B8B28FC0C; Tue, 6 Apr 2010 08:30:21 +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 o368ULvY097837; Tue, 6 Apr 2010 08:30:21 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o368ULeo097835; Tue, 6 Apr 2010 08:30:21 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060830.o368ULeo097835@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 08:30:21 +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: r206254 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 08:30:21 -0000 Author: jmallett Date: Tue Apr 6 08:30:21 2010 New Revision: 206254 URL: http://svn.freebsd.org/changeset/base/206254 Log: Turn off trap debugging again. Modified: user/jmallett/octeon/sys/mips/mips/trap.c Modified: user/jmallett/octeon/sys/mips/mips/trap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/trap.c Tue Apr 6 08:29:58 2010 (r206253) +++ user/jmallett/octeon/sys/mips/mips/trap.c Tue Apr 6 08:30:21 2010 (r206254) @@ -95,7 +95,6 @@ __FBSDID("$FreeBSD$"); #include -#define TRAP_DEBUG #ifdef TRAP_DEBUG int trap_debug = 1; #endif From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 08:35:05 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 82A83106566C; Tue, 6 Apr 2010 08:35:05 +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 32C838FC12; Tue, 6 Apr 2010 08:35:05 +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 o368Z5u8098894; Tue, 6 Apr 2010 08:35:05 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o368Z5qm098891; Tue, 6 Apr 2010 08:35:05 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060835.o368Z5qm098891@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 08:35:05 +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: r206255 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 08:35:05 -0000 Author: jmallett Date: Tue Apr 6 08:35:04 2010 New Revision: 206255 URL: http://svn.freebsd.org/changeset/base/206255 Log: Move interrupt enable to configure_final(). Modified: user/jmallett/octeon/sys/mips/mips/autoconf.c user/jmallett/octeon/sys/mips/mips/machdep.c Modified: user/jmallett/octeon/sys/mips/mips/autoconf.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/autoconf.c Tue Apr 6 08:30:21 2010 (r206254) +++ user/jmallett/octeon/sys/mips/mips/autoconf.c Tue Apr 6 08:35:04 2010 (r206255) @@ -102,6 +102,7 @@ static void configure_final(dummy) void *dummy; { + intr_enable(); cninit_finish(); Modified: user/jmallett/octeon/sys/mips/mips/machdep.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/machdep.c Tue Apr 6 08:30:21 2010 (r206254) +++ user/jmallett/octeon/sys/mips/mips/machdep.c Tue Apr 6 08:35:04 2010 (r206255) @@ -373,11 +373,9 @@ mips_vector_init(void) * when handler is installed for it */ set_intr_mask(ALL_INT_MASK); - intr_enable(); /* Clear BEV in SR so we start handling our own exceptions */ mips_wr_status(mips_rd_status() & ~SR_BOOT_EXC_VEC); - } /* From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 09:04:18 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 EAFD21065672; Tue, 6 Apr 2010 09:04:18 +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 DB7268FC0A; Tue, 6 Apr 2010 09:04:18 +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 o3694Ic6005635; Tue, 6 Apr 2010 09:04:18 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3694IIp005633; Tue, 6 Apr 2010 09:04:18 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060904.o3694IIp005633@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 09:04:18 +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: r206256 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 09:04:19 -0000 Author: jmallett Date: Tue Apr 6 09:04:18 2010 New Revision: 206256 URL: http://svn.freebsd.org/changeset/base/206256 Log: o) Use CLEAR_STATUS rather than mtc0 zero, cp0_status, since the latter would disable all sorts of bits we care about. Modified: user/jmallett/octeon/sys/mips/mips/exception.S Modified: user/jmallett/octeon/sys/mips/mips/exception.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/exception.S Tue Apr 6 08:35:04 2010 (r206255) +++ user/jmallett/octeon/sys/mips/mips/exception.S Tue Apr 6 09:04:18 2010 (r206256) @@ -252,7 +252,7 @@ SlowFault: and a0, a0, a2 ; \ mtc0 a0, COP_0_STATUS_REG #endif - + /* * Save CPU and CP0 register state. * @@ -317,7 +317,7 @@ SlowFault: REG_L reg, CALLFRAME_SIZ + (SZREG * offs) (base) #define RESTORE_CPU \ - mtc0 zero,COP_0_STATUS_REG ;\ + CLEAR_STATUS ;\ RESTORE_REG(k0, SR, sp) ;\ RESTORE_REG(t0, MULLO, sp) ;\ RESTORE_REG(t1, MULHI, sp) ;\ From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 09:06:01 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 172261065673; Tue, 6 Apr 2010 09:06:01 +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 073758FC0C; Tue, 6 Apr 2010 09:06:01 +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 o36960HG006154; Tue, 6 Apr 2010 09:06:00 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o369607L006152; Tue, 6 Apr 2010 09:06:00 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060906.o369607L006152@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 09:06:00 +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: r206257 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 09:06:01 -0000 Author: jmallett Date: Tue Apr 6 09:06:00 2010 New Revision: 206257 URL: http://svn.freebsd.org/changeset/base/206257 Log: Make copystr() work with 64-bit pointers. Modified: user/jmallett/octeon/sys/mips/mips/support.S Modified: user/jmallett/octeon/sys/mips/mips/support.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/support.S Tue Apr 6 09:04:18 2010 (r206256) +++ user/jmallett/octeon/sys/mips/mips/support.S Tue Apr 6 09:06:00 2010 (r206257) @@ -144,24 +144,24 @@ END(badaddr) * string is too long, return ENAMETOOLONG; else return 0. */ LEAF(copystr) - move t0, a2 - beq a2, zero, 4f + move t0, a2 + beq a2, zero, 4f 1: - lbu v0, 0(a0) - subu a2, a2, 1 - beq v0, zero, 2f - sb v0, 0(a1) # each byte until NIL - addu a0, a0, 1 - bne a2, zero, 1b # less than maxlen - addu a1, a1, 1 + lbu v0, 0(a0) + PTR_SUBU a2, a2, 1 + beq v0, zero, 2f + sb v0, 0(a1) # each byte until NIL + PTR_ADDU a0, a0, 1 + bne a2, zero, 1b # less than maxlen + PTR_ADDU a1, a1, 1 4: - li v0, ENAMETOOLONG # run out of space + li v0, ENAMETOOLONG # run out of space 2: - beq a3, zero, 3f # return num. of copied bytes - subu a2, t0, a2 # if the 4th arg was non-NULL - sw a2, 0(a3) + beq a3, zero, 3f # return num. of copied bytes + PTR_SUBU a2, t0, a2 # if the 4th arg was non-NULL + sw a2, 0(a3) 3: - j ra # v0 is 0 or ENAMETOOLONG + j ra # v0 is 0 or ENAMETOOLONG nop END(copystr) From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 09:26:55 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 0E89A106564A; Tue, 6 Apr 2010 09:26:55 +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 F2ED88FC18; Tue, 6 Apr 2010 09:26:54 +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 o369Qsje012239; Tue, 6 Apr 2010 09:26:54 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o369Qsgl012237; Tue, 6 Apr 2010 09:26:54 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060926.o369Qsgl012237@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 09:26:54 +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: r206258 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 09:26:55 -0000 Author: jmallett Date: Tue Apr 6 09:26:54 2010 New Revision: 206258 URL: http://svn.freebsd.org/changeset/base/206258 Log: o) Reduce structural diffs with NetBSD wrt exception table lookup. o) Really, don't move 0 to CP0_STATUS. Modified: user/jmallett/octeon/sys/mips/mips/exception.S Modified: user/jmallett/octeon/sys/mips/mips/exception.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/exception.S Tue Apr 6 09:06:00 2010 (r206257) +++ user/jmallett/octeon/sys/mips/mips/exception.S Tue Apr 6 09:26:54 2010 (r206258) @@ -179,16 +179,12 @@ VECTOR(MipsException, unknown) and k0, k0, SR_KSU_USER # test for user mode # sneaky but the bits are # with us........ -#if defined(__mips_n64) - sll k0, k0, 4 # shift user bit for cause index -#else sll k0, k0, 3 # shift user bit for cause index -#endif and k1, k1, CR_EXC_CODE # Mask out the cause bits. + or k1, k1, k0 # change index to user table #if defined(__mips_n64) - sll k1, k1, 1 # shift code to get 8-byte offset + PTR_SLL k1, k1, 1 # shift to get 8-byte offset #endif - or k1, k1, k0 # change index to user table 1: PTR_LA k0, _C_LABEL(machExceptionTable) # get base of the jump table PTR_ADDU k0, k0, k1 # Get the address of the @@ -388,7 +384,6 @@ NNON_LEAF(MipsKernGenException, KERN_EXC * in trap handler */ mfc0 a0, COP_0_STATUS_REG - mtc0 zero, COP_0_STATUS_REG and a0, a0, SR_INT_MASK RESTORE_REG(a1, SR, sp) and a1, a1, ~SR_INT_MASK From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 09:28:26 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 C4331106564A; Tue, 6 Apr 2010 09:28:26 +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 99E208FC1B; Tue, 6 Apr 2010 09:28:26 +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 o369SQOg012717; Tue, 6 Apr 2010 09:28:26 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o369SQH9012715; Tue, 6 Apr 2010 09:28:26 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060928.o369SQH9012715@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 09:28:26 +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: r206259 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 09:28:26 -0000 Author: jmallett Date: Tue Apr 6 09:28:26 2010 New Revision: 206259 URL: http://svn.freebsd.org/changeset/base/206259 Log: Aggressively PTRize. Some of these functions probably aren't used. The ones that are probably deserve a closer look than I gave them. Modified: user/jmallett/octeon/sys/mips/mips/support.S Modified: user/jmallett/octeon/sys/mips/mips/support.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/support.S Tue Apr 6 09:26:54 2010 (r206258) +++ user/jmallett/octeon/sys/mips/mips/support.S Tue Apr 6 09:28:26 2010 (r206259) @@ -171,12 +171,12 @@ END(copystr) */ LEAF(fillw) 1: - addiu a2, a2, -1 - sh a0, 0(a1) - bne a2,zero, 1b - addiu a1, a1, 2 + PTR_ADDU a2, a2, -1 + sh a0, 0(a1) + bne a2,zero, 1b + PTR_ADDU a1, a1, 2 - jr ra + jr ra nop END(fillw) @@ -185,13 +185,13 @@ END(fillw) * mem_zero_page(addr); */ LEAF(mem_zero_page) - li v0, PAGE_SIZE + li v0, PAGE_SIZE 1: - subu v0, 8 - sd zero, 0(a0) - bne zero, v0, 1b - addu a0, 8 - jr ra + PTR_SUBU v0, 8 + sd zero, 0(a0) + bne zero, v0, 1b + PTR_ADDU a0, 8 + jr ra nop END(mem_zero_page) @@ -203,56 +203,56 @@ END(mem_zero_page) * a2 = count */ LEAF(insb) - beq a2, zero, 2f - addu a2, a1 + beq a2, zero, 2f + PTR_ADDU a2, a1 1: - lbu v0, 0(a0) - addiu a1, 1 - bne a1, a2, 1b - sb v0, -1(a1) + lbu v0, 0(a0) + PTR_ADDU a1, 1 + bne a1, a2, 1b + sb v0, -1(a1) 2: - jr ra + jr ra nop END(insb) LEAF(insw) - beq a2, zero, 2f - addu a2, a2 - addu a2, a1 -1: - lhu v0, 0(a0) - addiu a1, 2 - bne a1, a2, 1b - sh v0, -2(a1) + beq a2, zero, 2f + PTR_ADDU a2, a2 + PTR_ADDU a2, a1 +1: + lhu v0, 0(a0) + PTR_ADDU a1, 2 + bne a1, a2, 1b + sh v0, -2(a1) 2: - jr ra + jr ra nop END(insw) LEAF(insl) - beq a2, zero, 2f - sll a2, 2 - addu a2, a1 -1: - lw v0, 0(a0) - addiu a1, 4 - bne a1, a2, 1b - sw v0, -4(a1) + beq a2, zero, 2f + sll a2, 2 + PTR_ADDU a2, a1 +1: + lw v0, 0(a0) + PTR_ADDU a1, 4 + bne a1, a2, 1b + sw v0, -4(a1) 2: - jr ra + jr ra nop END(insl) LEAF(outsb) - beq a2, zero, 2f - addu a2, a1 + beq a2, zero, 2f + PTR_ADDU a2, a1 1: - lbu v0, 0(a1) - addiu a1, 1 - bne a1, a2, 1b - sb v0, 0(a0) + lbu v0, 0(a1) + PTR_ADDU a1, 1 + bne a1, a2, 1b + sb v0, 0(a0) 2: - jr ra + jr ra nop END(outsb) From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 09:33:16 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 5646C1065674; Tue, 6 Apr 2010 09:33:16 +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 4684B8FC28; Tue, 6 Apr 2010 09:33:16 +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 o369XFiO014155; Tue, 6 Apr 2010 09:33:15 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o369XF1r014153; Tue, 6 Apr 2010 09:33:15 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004060933.o369XF1r014153@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 09:33:15 +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: r206260 - user/jmallett/octeon/contrib/binutils/ld/emulparams 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: Tue, 06 Apr 2010 09:33:16 -0000 Author: jmallett Date: Tue Apr 6 09:33:15 2010 New Revision: 206260 URL: http://svn.freebsd.org/changeset/base/206260 Log: Revert previous change, we can probably deal with loading at the normal text address real soon now. Modified: user/jmallett/octeon/contrib/binutils/ld/emulparams/elf64btsmip.sh Modified: user/jmallett/octeon/contrib/binutils/ld/emulparams/elf64btsmip.sh ============================================================================== --- user/jmallett/octeon/contrib/binutils/ld/emulparams/elf64btsmip.sh Tue Apr 6 09:28:26 2010 (r206259) +++ user/jmallett/octeon/contrib/binutils/ld/emulparams/elf64btsmip.sh Tue Apr 6 09:33:15 2010 (r206260) @@ -13,6 +13,4 @@ OTHER_SECTIONS=' .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } ' -# XXX/juli -# We really only have 32-bit pmap on FreeBSD right now, so don't override the start addr. -#TEXT_START_ADDR="0x120000000" +TEXT_START_ADDR="0x120000000" From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 17:56:48 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 B7B9F1065702; Tue, 6 Apr 2010 17:56:48 +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 A87FF8FC17; Tue, 6 Apr 2010 17:56:48 +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 o36HumH1037265; Tue, 6 Apr 2010 17:56:48 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36Hum7s037263; Tue, 6 Apr 2010 17:56:48 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004061756.o36Hum7s037263@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 17:56:48 +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: r206277 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 17:56:48 -0000 Author: jmallett Date: Tue Apr 6 17:56:48 2010 New Revision: 206277 URL: http://svn.freebsd.org/changeset/base/206277 Log: o) Don't check whether the uarea is below kseg2 in the N64 case. Not sure what case should replace this, but it's wrong for XKSEG. o) Set all 64 bits of EntryHi on N64 when loading uarea. Modified: user/jmallett/octeon/sys/mips/mips/swtch.S Modified: user/jmallett/octeon/sys/mips/mips/swtch.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/swtch.S Tue Apr 6 16:23:12 2010 (r206276) +++ user/jmallett/octeon/sys/mips/mips/swtch.S Tue Apr 6 17:56:48 2010 (r206277) @@ -294,8 +294,10 @@ blocked_loop: PTR_L a2, TD_PCB(a1) PTR_S a2, PC_CURPCB(a3) PTR_L v0, TD_KSTACK(a1) +#if !defined(__mips_n64) PTR_LI s0, (MIPS_KSEG2_START+VM_KERNEL_ALLOC_OFFSET) # If Uarea addr is below kseg2, bltu v0, s0, sw2 # no need to insert in TLB. +#endif lw a1, TD_UPTE(s7) # t0 = u. pte /* * Wiredown the USPACE of newproc in TLB entry#0. Check whether target @@ -309,24 +311,25 @@ blocked_loop: tlbp # probe VPN HAZARD_DELAY mfc0 s0, COP_0_TLB_INDEX - nop + HAZARD_DELAY PTR_LI t1, MIPS_KSEG0_START # invalidate tlb entry bltz s0, entry0set nop sll s0, PAGE_SHIFT addu t1, s0 - mtc0 t1, COP_0_TLB_HI + MTC0 t1, COP_0_TLB_HI mtc0 zero, COP_0_TLB_LO0 mtc0 zero, COP_0_TLB_LO1 HAZARD_DELAY tlbwi HAZARD_DELAY - mtc0 v0, COP_0_TLB_HI # set VPN again + MTC0 v0, COP_0_TLB_HI # set VPN again entry0set: /* SMP!! - Works only for unshared TLB case - i.e. no v-cpus */ mtc0 zero, COP_0_TLB_INDEX # TLB entry #0 + HAZARD_DELAY mtc0 a1, COP_0_TLB_LO0 # upte HAZARD_DELAY addu a1, TLBLO_PFN_ODD From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 18:37:26 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 4EC1B106564A; Tue, 6 Apr 2010 18:37:26 +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 400BA8FC16; Tue, 6 Apr 2010 18:37:26 +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 o36IbQJV046323; Tue, 6 Apr 2010 18:37:26 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36IbQQh046321; Tue, 6 Apr 2010 18:37:26 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004061837.o36IbQQh046321@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 18:37:26 +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: r206279 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 18:37:26 -0000 Author: jmallett Date: Tue Apr 6 18:37:25 2010 New Revision: 206279 URL: http://svn.freebsd.org/changeset/base/206279 Log: Give KERNLAND a plausible definition on N64. Modified: user/jmallett/octeon/sys/mips/mips/trap.c Modified: user/jmallett/octeon/sys/mips/mips/trap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/trap.c Tue Apr 6 17:57:27 2010 (r206278) +++ user/jmallett/octeon/sys/mips/mips/trap.c Tue Apr 6 18:37:25 2010 (r206279) @@ -225,8 +225,8 @@ void stacktrace(struct trapframe *); void logstacktrace(struct trapframe *); #endif -#define KERNLAND(x) ((int)(x) < 0) -#define DELAYBRANCH(x) ((int)(x) < 0) +#define KERNLAND(x) ((vm_offset_t)(x) >= VM_MIN_KERNEL_ADDRESS && (vm_offset_t)(x) < VM_MAX_KERNEL_ADDRESS) +#define DELAYBRANCH(x) ((int)(x) < 0) /* * MIPS load/store access type @@ -503,7 +503,7 @@ dofault: vm = p->p_vmspace; map = &vm->vm_map; va = trunc_page((vm_offset_t)trapframe->badvaddr); - if ((vm_offset_t)trapframe->badvaddr >= VM_MIN_KERNEL_ADDRESS) { + if (KERNLAND(trapframe->badvaddr)) { /* * Don't allow user-mode faults in kernel * address space. From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 19:00:35 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 ACAA1106566C; Tue, 6 Apr 2010 19:00:35 +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 9D4DE8FC08; Tue, 6 Apr 2010 19:00:35 +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 o36J0ZZv051590; Tue, 6 Apr 2010 19:00:35 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36J0Zvi051587; Tue, 6 Apr 2010 19:00:35 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004061900.o36J0Zvi051587@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 19:00:35 +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: r206282 - user/jmallett/octeon/sys/mips/mips 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: Tue, 06 Apr 2010 19:00:35 -0000 Author: jmallett Date: Tue Apr 6 19:00:35 2010 New Revision: 206282 URL: http://svn.freebsd.org/changeset/base/206282 Log: o) Set PX in addition to UX, KX and SX. o) Don't mask off UX, KX and SX bits when returning from user exceptions and interrupts. We leave those bits set in userland and intend to. This blows up on N64. o) Adjust NUSERPGTBLS. Modified: user/jmallett/octeon/sys/mips/mips/exception.S user/jmallett/octeon/sys/mips/mips/pmap.c Modified: user/jmallett/octeon/sys/mips/mips/exception.S ============================================================================== --- user/jmallett/octeon/sys/mips/mips/exception.S Tue Apr 6 18:57:50 2010 (r206281) +++ user/jmallett/octeon/sys/mips/mips/exception.S Tue Apr 6 19:00:35 2010 (r206282) @@ -472,7 +472,7 @@ NNON_LEAF(MipsUserGenException, CALLFRAM # Turn off fpu and enter kernel mode and t0, a0, ~(SR_COP_1_BIT | SR_EXL | SR_KSU_MASK | SR_INT_ENAB) #ifdef TARGET_OCTEON - or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) + or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS32_SR_PX) #endif mtc0 t0, COP_0_STATUS_REG PTR_ADDU a0, k1, U_PCB_REGS @@ -491,10 +491,7 @@ NNON_LEAF(MipsUserGenException, CALLFRAM */ DO_AST - mfc0 t0, COP_0_STATUS_REG # disable int - and t0, t0, ~(MIPS_SR_INT_IE) - mtc0 t0, COP_0_STATUS_REG - ITLBNOPFIX + CLEAR_STATUS /* * The use of k1 for storing the PCB pointer must be done only @@ -551,9 +548,6 @@ NNON_LEAF(MipsUserGenException, CALLFRAM RESTORE_U_PCB_REG(k0, SR, k1) RESTORE_U_PCB_REG(s8, S8, k1) RESTORE_U_PCB_REG(ra, RA, k1) -#ifdef TARGET_OCTEON - and k0, k0, ~(MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) -#endif .set noat RESTORE_U_PCB_REG(AT, AST, k1) @@ -693,7 +687,7 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r # Turn off fpu, disable interrupts, set kernel mode kernel mode, clear exception level. and t0, a0, ~(SR_COP_1_BIT | SR_EXL | SR_INT_ENAB | SR_KSU_MASK) #ifdef TARGET_OCTEON - or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) + or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS32_SR_PX) #endif mtc0 t0, COP_0_STATUS_REG ITLBNOPFIX @@ -725,10 +719,7 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r /* * Restore user registers and return. */ - mfc0 t0, COP_0_STATUS_REG # disable int - and t0, t0, ~(MIPS_SR_INT_IE) - mtc0 t0, COP_0_STATUS_REG - ITLBNOPFIX + CLEAR_STATUS GET_CPU_PCPU(k1) PTR_L k1, PC_CURPCB(k1) @@ -780,9 +771,6 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r RESTORE_U_PCB_REG(k0, SR, k1) RESTORE_U_PCB_REG(sp, SP, k1) RESTORE_U_PCB_REG(ra, RA, k1) -#ifdef TARGET_OCTEON - and k0, k0, ~(MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) -#endif .set noat RESTORE_U_PCB_REG(AT, AST, k1) @@ -987,6 +975,10 @@ NLEAF(MipsTLBMissException) andi k0, k0, 0x1ffc # k0=page tab offset PTR_ADDU k1, k1, k0 # k1=pte address lw k0, 0(k1) # k0=lo0 pte + andi k0, PG_V + beqz k0, MipsKernGenException # no PTE + nop + lw k0, 0(k1) # k0=lo0 pte CLEAR_PTE_SWBITS(k0) MTC0 k0, COP_0_TLB_LO0 # lo0 is loaded COP0_SYNC Modified: user/jmallett/octeon/sys/mips/mips/pmap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/pmap.c Tue Apr 6 18:57:50 2010 (r206281) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Tue Apr 6 19:00:35 2010 (r206282) @@ -117,12 +117,22 @@ __FBSDID("$FreeBSD$"); /* * Get PDEs and PTEs for user/kernel address space + * + * XXX The & for pmap_segshift() is wrong, as is the fact that it doesn't + * trim off gratuitous bits of the address space. By having the & + * there, we break defining NUSERPGTBLS below because the address space + * is defined such that it ends immediately after NPDEPG*NPTEPG*PAGE_SIZE, + * so we end up getting NUSERPGTBLS of 0. */ #define pmap_segshift(v) (((v) >> SEGSHIFT) & (NPDEPG - 1)) #define pmap_pde(m, v) (&((m)->pm_segtab[pmap_segshift((v))])) #define segtab_pde(m, v) ((m)[pmap_segshift((v))]) +#if defined(__mips_n64) +#define NUSERPGTBLS (NPDEPG) +#else #define NUSERPGTBLS (pmap_segshift(VM_MAXUSER_ADDRESS)) +#endif #define mips_segtrunc(va) ((va) & ~SEGOFSET) #define is_kernel_pmap(x) ((x) == kernel_pmap) From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 19:11:33 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 726031065672; Tue, 6 Apr 2010 19:11:33 +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 63BAC8FC25; Tue, 6 Apr 2010 19:11:33 +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 o36JBXKw054037; Tue, 6 Apr 2010 19:11:33 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36JBX9k054035; Tue, 6 Apr 2010 19:11:33 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004061911.o36JBX9k054035@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 19:11:33 +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: r206283 - user/jmallett/octeon/lib/csu/mips 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: Tue, 06 Apr 2010 19:11:33 -0000 Author: jmallett Date: Tue Apr 6 19:11:33 2010 New Revision: 206283 URL: http://svn.freebsd.org/changeset/base/206283 Log: Adjust for nathanw's fix to kern_exec to store argc as an int. Modified: user/jmallett/octeon/lib/csu/mips/crt1.c Modified: user/jmallett/octeon/lib/csu/mips/crt1.c ============================================================================== --- user/jmallett/octeon/lib/csu/mips/crt1.c Tue Apr 6 19:00:35 2010 (r206282) +++ user/jmallett/octeon/lib/csu/mips/crt1.c Tue Apr 6 19:11:33 2010 (r206283) @@ -79,7 +79,7 @@ __start(char **ap, char **argv; char **env; - argc = * (long *) ap; + argc = * (int *) ap; argv = ap + 1; env = ap + 2 + argc; environ = env; From owner-svn-src-user@FreeBSD.ORG Tue Apr 6 19:26:00 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 4B4A6106566C; Tue, 6 Apr 2010 19:26:00 +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 37AED8FC23; Tue, 6 Apr 2010 19:26:00 +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 o36JQ0Hw057309; Tue, 6 Apr 2010 19:26:00 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36JPxCv057288; Tue, 6 Apr 2010 19:25:59 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004061925.o36JPxCv057288@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Apr 2010 19:25:59 +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: r206285 - in user/jmallett/octeon: . bin/cp bin/ls bin/pax bin/rcp bin/sh bin/test cddl/contrib/opensolaris/lib/libzfs/common contrib/bsnmp/gensnmpdef contrib/bsnmp/snmpd contrib/top co... 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: Tue, 06 Apr 2010 19:26:00 -0000 Author: jmallett Date: Tue Apr 6 19:25:58 2010 New Revision: 206285 URL: http://svn.freebsd.org/changeset/base/206285 Log: Merge from head. Added: user/jmallett/octeon/lib/libpmc/pmc.corei7.3 - copied unchanged from r206283, head/lib/libpmc/pmc.corei7.3 user/jmallett/octeon/lib/libpmc/pmc.corei7uc.3 - copied unchanged from r206283, head/lib/libpmc/pmc.corei7uc.3 user/jmallett/octeon/lib/libpmc/pmc.ucf.3 - copied unchanged from r206283, head/lib/libpmc/pmc.ucf.3 user/jmallett/octeon/lib/libpmc/pmc.westmere.3 - copied unchanged from r206283, head/lib/libpmc/pmc.westmere.3 user/jmallett/octeon/lib/libpmc/pmc.westmereuc.3 - copied unchanged from r206283, head/lib/libpmc/pmc.westmereuc.3 user/jmallett/octeon/share/examples/indent/ - copied from r206283, head/share/examples/indent/ user/jmallett/octeon/sys/dev/e1000/if_lem.c - copied unchanged from r206283, head/sys/dev/e1000/if_lem.c user/jmallett/octeon/sys/dev/e1000/if_lem.h - copied unchanged from r206283, head/sys/dev/e1000/if_lem.h user/jmallett/octeon/sys/dev/hwpmc/hwpmc_uncore.c - copied unchanged from r206283, head/sys/dev/hwpmc/hwpmc_uncore.c user/jmallett/octeon/sys/dev/hwpmc/hwpmc_uncore.h - copied unchanged from r206283, head/sys/dev/hwpmc/hwpmc_uncore.h user/jmallett/octeon/sys/modules/alq/ - copied from r206283, head/sys/modules/alq/ user/jmallett/octeon/tools/regression/bin/sh/expansion/arith4.0 - copied unchanged from r206283, head/tools/regression/bin/sh/expansion/arith4.0 user/jmallett/octeon/tools/regression/bin/sh/expansion/arith5.0 - copied unchanged from r206283, head/tools/regression/bin/sh/expansion/arith5.0 user/jmallett/octeon/tools/regression/bin/sh/expansion/plus-minus2.0 - copied unchanged from r206283, head/tools/regression/bin/sh/expansion/plus-minus2.0 user/jmallett/octeon/tools/regression/bin/sh/expansion/tilde1.0 - copied unchanged from r206283, head/tools/regression/bin/sh/expansion/tilde1.0 user/jmallett/octeon/tools/regression/bin/sh/expansion/tilde2.0 - copied unchanged from r206283, head/tools/regression/bin/sh/expansion/tilde2.0 user/jmallett/octeon/tools/regression/bin/sh/expansion/trim1.0 - copied unchanged from r206283, head/tools/regression/bin/sh/expansion/trim1.0 user/jmallett/octeon/tools/regression/bin/sh/expansion/trim2.0 - copied unchanged from r206283, head/tools/regression/bin/sh/expansion/trim2.0 user/jmallett/octeon/tools/regression/bin/sh/parser/heredoc2.0 - copied unchanged from r206283, head/tools/regression/bin/sh/parser/heredoc2.0 user/jmallett/octeon/usr.bin/calendar/dates.c - copied unchanged from r206283, head/usr.bin/calendar/dates.c user/jmallett/octeon/usr.bin/calendar/events.c - copied unchanged from r206283, head/usr.bin/calendar/events.c user/jmallett/octeon/usr.bin/calendar/locale.c - copied unchanged from r206283, head/usr.bin/calendar/locale.c user/jmallett/octeon/usr.bin/calendar/parsedata.c - copied unchanged from r206283, head/usr.bin/calendar/parsedata.c user/jmallett/octeon/usr.bin/calendar/pom.c - copied unchanged from r206283, head/usr.bin/calendar/pom.c user/jmallett/octeon/usr.bin/calendar/sunpos.c - copied unchanged from r206283, head/usr.bin/calendar/sunpos.c user/jmallett/octeon/usr.sbin/services_mkdb/ - copied from r206283, head/usr.sbin/services_mkdb/ Deleted: user/jmallett/octeon/bin/pax/cpio.1 user/jmallett/octeon/bin/pax/tar.1 user/jmallett/octeon/sys/ia64/include/nexusvar.h Modified: user/jmallett/octeon/ObsoleteFiles.inc user/jmallett/octeon/UPDATING user/jmallett/octeon/bin/cp/utils.c user/jmallett/octeon/bin/ls/cmp.c user/jmallett/octeon/bin/pax/Makefile user/jmallett/octeon/bin/pax/getoldopt.c user/jmallett/octeon/bin/rcp/rcp.c user/jmallett/octeon/bin/sh/expand.c user/jmallett/octeon/bin/sh/mksyntax.c user/jmallett/octeon/bin/sh/options.c user/jmallett/octeon/bin/sh/parser.c user/jmallett/octeon/bin/sh/sh.1 user/jmallett/octeon/bin/test/test.c user/jmallett/octeon/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c user/jmallett/octeon/contrib/bsnmp/gensnmpdef/gensnmpdef.c user/jmallett/octeon/contrib/bsnmp/snmpd/config.c user/jmallett/octeon/contrib/top/utils.h user/jmallett/octeon/contrib/tzdata/asia user/jmallett/octeon/contrib/tzdata/europe user/jmallett/octeon/contrib/tzdata/zone.tab user/jmallett/octeon/crypto/openssl/CHANGES user/jmallett/octeon/crypto/openssl/FAQ user/jmallett/octeon/crypto/openssl/Makefile user/jmallett/octeon/crypto/openssl/NEWS user/jmallett/octeon/crypto/openssl/README user/jmallett/octeon/crypto/openssl/apps/req.c user/jmallett/octeon/crypto/openssl/apps/speed.c user/jmallett/octeon/crypto/openssl/config user/jmallett/octeon/crypto/openssl/crypto/asn1/a_object.c user/jmallett/octeon/crypto/openssl/crypto/bio/bss_file.c user/jmallett/octeon/crypto/openssl/crypto/bn/asm/ppc.pl user/jmallett/octeon/crypto/openssl/crypto/bn/asm/x86_64-gcc.c user/jmallett/octeon/crypto/openssl/crypto/bn/bn_div.c user/jmallett/octeon/crypto/openssl/crypto/engine/eng_all.c user/jmallett/octeon/crypto/openssl/crypto/engine/eng_cryptodev.c user/jmallett/octeon/crypto/openssl/crypto/evp/digest.c user/jmallett/octeon/crypto/openssl/crypto/evp/evp_locl.h user/jmallett/octeon/crypto/openssl/crypto/evp/names.c user/jmallett/octeon/crypto/openssl/crypto/md32_common.h user/jmallett/octeon/crypto/openssl/crypto/ocsp/ocsp_prn.c user/jmallett/octeon/crypto/openssl/crypto/opensslv.h user/jmallett/octeon/crypto/openssl/crypto/rand/rand_win.c user/jmallett/octeon/crypto/openssl/engines/e_capi.c user/jmallett/octeon/crypto/openssl/engines/e_chil.c user/jmallett/octeon/crypto/openssl/fips/Makefile user/jmallett/octeon/crypto/openssl/openssl.spec user/jmallett/octeon/crypto/openssl/ssl/kssl.c user/jmallett/octeon/crypto/openssl/ssl/s3_pkt.c user/jmallett/octeon/etc/inetd.conf user/jmallett/octeon/etc/rc.subr user/jmallett/octeon/games/fortune/Notes user/jmallett/octeon/games/fortune/datfiles/fortunes user/jmallett/octeon/games/fortune/datfiles/fortunes-o.real user/jmallett/octeon/games/fortune/datfiles/fortunes.sp.ok user/jmallett/octeon/games/fortune/datfiles/limerick user/jmallett/octeon/games/fortune/datfiles/startrek user/jmallett/octeon/games/fortune/datfiles/zippy user/jmallett/octeon/gnu/usr.bin/diff/context.c.diff user/jmallett/octeon/gnu/usr.bin/diff/diff.c.diff user/jmallett/octeon/include/inttypes.h user/jmallett/octeon/include/netdb.h user/jmallett/octeon/include/nsswitch.h user/jmallett/octeon/lib/libc/db/hash/hash.c user/jmallett/octeon/lib/libc/db/hash/hash.h user/jmallett/octeon/lib/libc/db/man/hash.3 user/jmallett/octeon/lib/libc/gen/__getosreldate.c user/jmallett/octeon/lib/libc/gen/_spinlock_stub.c user/jmallett/octeon/lib/libc/gen/_thread_init.c user/jmallett/octeon/lib/libc/net/getservent.c user/jmallett/octeon/lib/libc/net/nsdispatch.3 user/jmallett/octeon/lib/libc/posix1e/acl_to_text_nfs4.c user/jmallett/octeon/lib/libc/stdio/printf.3 user/jmallett/octeon/lib/libc/stdio/vasprintf.c user/jmallett/octeon/lib/libc/sys/stat.2 user/jmallett/octeon/lib/libpmc/Makefile user/jmallett/octeon/lib/libpmc/libpmc.c user/jmallett/octeon/lib/libstand/assert.c user/jmallett/octeon/lib/libusbhid/data.c user/jmallett/octeon/lib/libusbhid/descr.c user/jmallett/octeon/lib/libusbhid/parse.c user/jmallett/octeon/lib/libusbhid/usage.c user/jmallett/octeon/lib/libusbhid/usbhid.h user/jmallett/octeon/lib/libusbhid/usbvar.h user/jmallett/octeon/lib/libz/ChangeLog user/jmallett/octeon/lib/libz/README user/jmallett/octeon/lib/libz/crc32.c user/jmallett/octeon/lib/libz/deflate.c user/jmallett/octeon/lib/libz/gzguts.h (contents, props changed) user/jmallett/octeon/lib/libz/gzlib.c user/jmallett/octeon/lib/libz/gzread.c user/jmallett/octeon/lib/libz/inftrees.c user/jmallett/octeon/lib/libz/minigzip.c user/jmallett/octeon/lib/libz/zconf.h user/jmallett/octeon/lib/libz/zlib.3 user/jmallett/octeon/lib/libz/zlib.h user/jmallett/octeon/lib/libz/zutil.c user/jmallett/octeon/lib/libz/zutil.h user/jmallett/octeon/libexec/fingerd/fingerd.8 user/jmallett/octeon/libexec/fingerd/fingerd.c user/jmallett/octeon/sbin/geom/class/multipath/geom_multipath.c user/jmallett/octeon/sbin/hastd/primary.c user/jmallett/octeon/sbin/ipfw/ipfw2.c user/jmallett/octeon/secure/lib/libcrypto/Makefile.inc user/jmallett/octeon/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 user/jmallett/octeon/secure/lib/libcrypto/man/ASN1_STRING_length.3 user/jmallett/octeon/secure/lib/libcrypto/man/ASN1_STRING_new.3 user/jmallett/octeon/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 user/jmallett/octeon/secure/lib/libcrypto/man/ASN1_generate_nconf.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_ctrl.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_f_base64.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_f_buffer.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_f_cipher.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_f_md.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_f_null.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_f_ssl.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_find_type.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_new.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_push.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_read.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_s_accept.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_s_bio.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_s_connect.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_s_fd.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_s_file.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_s_mem.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_s_null.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_s_socket.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_set_callback.3 user/jmallett/octeon/secure/lib/libcrypto/man/BIO_should_retry.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_BLINDING_new.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_CTX_new.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_CTX_start.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_add.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_add_word.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_bn2bin.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_cmp.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_copy.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_generate_prime.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_mod_inverse.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_new.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_num_bytes.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_rand.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_set_bit.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_swap.3 user/jmallett/octeon/secure/lib/libcrypto/man/BN_zero.3 user/jmallett/octeon/secure/lib/libcrypto/man/CONF_modules_free.3 user/jmallett/octeon/secure/lib/libcrypto/man/CONF_modules_load_file.3 user/jmallett/octeon/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 user/jmallett/octeon/secure/lib/libcrypto/man/DH_generate_key.3 user/jmallett/octeon/secure/lib/libcrypto/man/DH_generate_parameters.3 user/jmallett/octeon/secure/lib/libcrypto/man/DH_get_ex_new_index.3 user/jmallett/octeon/secure/lib/libcrypto/man/DH_new.3 user/jmallett/octeon/secure/lib/libcrypto/man/DH_set_method.3 user/jmallett/octeon/secure/lib/libcrypto/man/DH_size.3 user/jmallett/octeon/secure/lib/libcrypto/man/DSA_SIG_new.3 user/jmallett/octeon/secure/lib/libcrypto/man/DSA_do_sign.3 user/jmallett/octeon/secure/lib/libcrypto/man/DSA_dup_DH.3 user/jmallett/octeon/secure/lib/libcrypto/man/DSA_generate_key.3 user/jmallett/octeon/secure/lib/libcrypto/man/DSA_generate_parameters.3 user/jmallett/octeon/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 user/jmallett/octeon/secure/lib/libcrypto/man/DSA_new.3 user/jmallett/octeon/secure/lib/libcrypto/man/DSA_set_method.3 user/jmallett/octeon/secure/lib/libcrypto/man/DSA_sign.3 user/jmallett/octeon/secure/lib/libcrypto/man/DSA_size.3 user/jmallett/octeon/secure/lib/libcrypto/man/ERR_GET_LIB.3 user/jmallett/octeon/secure/lib/libcrypto/man/ERR_clear_error.3 user/jmallett/octeon/secure/lib/libcrypto/man/ERR_error_string.3 user/jmallett/octeon/secure/lib/libcrypto/man/ERR_get_error.3 user/jmallett/octeon/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 user/jmallett/octeon/secure/lib/libcrypto/man/ERR_load_strings.3 user/jmallett/octeon/secure/lib/libcrypto/man/ERR_print_errors.3 user/jmallett/octeon/secure/lib/libcrypto/man/ERR_put_error.3 user/jmallett/octeon/secure/lib/libcrypto/man/ERR_remove_state.3 user/jmallett/octeon/secure/lib/libcrypto/man/ERR_set_mark.3 user/jmallett/octeon/secure/lib/libcrypto/man/EVP_BytesToKey.3 user/jmallett/octeon/secure/lib/libcrypto/man/EVP_DigestInit.3 user/jmallett/octeon/secure/lib/libcrypto/man/EVP_EncryptInit.3 user/jmallett/octeon/secure/lib/libcrypto/man/EVP_OpenInit.3 user/jmallett/octeon/secure/lib/libcrypto/man/EVP_PKEY_new.3 user/jmallett/octeon/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 user/jmallett/octeon/secure/lib/libcrypto/man/EVP_SealInit.3 user/jmallett/octeon/secure/lib/libcrypto/man/EVP_SignInit.3 user/jmallett/octeon/secure/lib/libcrypto/man/EVP_VerifyInit.3 user/jmallett/octeon/secure/lib/libcrypto/man/OBJ_nid2obj.3 user/jmallett/octeon/secure/lib/libcrypto/man/OPENSSL_Applink.3 user/jmallett/octeon/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 user/jmallett/octeon/secure/lib/libcrypto/man/OPENSSL_config.3 user/jmallett/octeon/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 user/jmallett/octeon/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 user/jmallett/octeon/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 user/jmallett/octeon/secure/lib/libcrypto/man/PKCS12_create.3 user/jmallett/octeon/secure/lib/libcrypto/man/PKCS12_parse.3 user/jmallett/octeon/secure/lib/libcrypto/man/PKCS7_decrypt.3 user/jmallett/octeon/secure/lib/libcrypto/man/PKCS7_encrypt.3 user/jmallett/octeon/secure/lib/libcrypto/man/PKCS7_sign.3 user/jmallett/octeon/secure/lib/libcrypto/man/PKCS7_verify.3 user/jmallett/octeon/secure/lib/libcrypto/man/RAND_add.3 user/jmallett/octeon/secure/lib/libcrypto/man/RAND_bytes.3 user/jmallett/octeon/secure/lib/libcrypto/man/RAND_cleanup.3 user/jmallett/octeon/secure/lib/libcrypto/man/RAND_egd.3 user/jmallett/octeon/secure/lib/libcrypto/man/RAND_load_file.3 user/jmallett/octeon/secure/lib/libcrypto/man/RAND_set_rand_method.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_blinding_on.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_check_key.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_generate_key.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_new.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_print.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_private_encrypt.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_public_encrypt.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_set_method.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_sign.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 user/jmallett/octeon/secure/lib/libcrypto/man/RSA_size.3 user/jmallett/octeon/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 user/jmallett/octeon/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 user/jmallett/octeon/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 user/jmallett/octeon/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 user/jmallett/octeon/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 user/jmallett/octeon/secure/lib/libcrypto/man/X509_NAME_print_ex.3 user/jmallett/octeon/secure/lib/libcrypto/man/X509_new.3 user/jmallett/octeon/secure/lib/libcrypto/man/bio.3 user/jmallett/octeon/secure/lib/libcrypto/man/blowfish.3 user/jmallett/octeon/secure/lib/libcrypto/man/bn.3 user/jmallett/octeon/secure/lib/libcrypto/man/bn_internal.3 user/jmallett/octeon/secure/lib/libcrypto/man/buffer.3 user/jmallett/octeon/secure/lib/libcrypto/man/crypto.3 user/jmallett/octeon/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 user/jmallett/octeon/secure/lib/libcrypto/man/d2i_DHparams.3 user/jmallett/octeon/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 user/jmallett/octeon/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 user/jmallett/octeon/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 user/jmallett/octeon/secure/lib/libcrypto/man/d2i_X509.3 user/jmallett/octeon/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 user/jmallett/octeon/secure/lib/libcrypto/man/d2i_X509_CRL.3 user/jmallett/octeon/secure/lib/libcrypto/man/d2i_X509_NAME.3 user/jmallett/octeon/secure/lib/libcrypto/man/d2i_X509_REQ.3 user/jmallett/octeon/secure/lib/libcrypto/man/d2i_X509_SIG.3 user/jmallett/octeon/secure/lib/libcrypto/man/des.3 user/jmallett/octeon/secure/lib/libcrypto/man/dh.3 user/jmallett/octeon/secure/lib/libcrypto/man/dsa.3 user/jmallett/octeon/secure/lib/libcrypto/man/ecdsa.3 user/jmallett/octeon/secure/lib/libcrypto/man/engine.3 user/jmallett/octeon/secure/lib/libcrypto/man/err.3 user/jmallett/octeon/secure/lib/libcrypto/man/evp.3 user/jmallett/octeon/secure/lib/libcrypto/man/hmac.3 user/jmallett/octeon/secure/lib/libcrypto/man/lh_stats.3 user/jmallett/octeon/secure/lib/libcrypto/man/lhash.3 user/jmallett/octeon/secure/lib/libcrypto/man/md5.3 user/jmallett/octeon/secure/lib/libcrypto/man/mdc2.3 user/jmallett/octeon/secure/lib/libcrypto/man/pem.3 user/jmallett/octeon/secure/lib/libcrypto/man/rand.3 user/jmallett/octeon/secure/lib/libcrypto/man/rc4.3 user/jmallett/octeon/secure/lib/libcrypto/man/ripemd.3 user/jmallett/octeon/secure/lib/libcrypto/man/rsa.3 user/jmallett/octeon/secure/lib/libcrypto/man/sha.3 user/jmallett/octeon/secure/lib/libcrypto/man/threads.3 user/jmallett/octeon/secure/lib/libcrypto/man/ui.3 user/jmallett/octeon/secure/lib/libcrypto/man/ui_compat.3 user/jmallett/octeon/secure/lib/libcrypto/man/x509.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CIPHER_get_name.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_add_session.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_ctrl.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_free.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_new.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_sess_number.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_sessions.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_mode.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_options.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_timeout.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_set_verify.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_CTX_use_certificate.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_SESSION_free.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_SESSION_get_time.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_accept.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_alert_type_string.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_clear.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_connect.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_do_handshake.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_free.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_SSL_CTX.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_ciphers.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_client_CA_list.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_current_cipher.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_default_timeout.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_error.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_ex_new_index.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_fd.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_peer_certificate.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_rbio.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_session.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_verify_result.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_get_version.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_library_init.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_load_client_CA_file.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_new.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_pending.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_read.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_rstate_string.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_session_reused.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_set_bio.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_set_connect_state.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_set_fd.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_set_session.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_set_shutdown.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_set_verify_result.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_shutdown.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_state_string.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_want.3 user/jmallett/octeon/secure/lib/libssl/man/SSL_write.3 user/jmallett/octeon/secure/lib/libssl/man/d2i_SSL_SESSION.3 user/jmallett/octeon/secure/lib/libssl/man/ssl.3 user/jmallett/octeon/secure/usr.bin/openssl/man/CA.pl.1 user/jmallett/octeon/secure/usr.bin/openssl/man/asn1parse.1 user/jmallett/octeon/secure/usr.bin/openssl/man/ca.1 user/jmallett/octeon/secure/usr.bin/openssl/man/ciphers.1 user/jmallett/octeon/secure/usr.bin/openssl/man/crl.1 user/jmallett/octeon/secure/usr.bin/openssl/man/crl2pkcs7.1 user/jmallett/octeon/secure/usr.bin/openssl/man/dgst.1 user/jmallett/octeon/secure/usr.bin/openssl/man/dhparam.1 user/jmallett/octeon/secure/usr.bin/openssl/man/dsa.1 user/jmallett/octeon/secure/usr.bin/openssl/man/dsaparam.1 user/jmallett/octeon/secure/usr.bin/openssl/man/ec.1 user/jmallett/octeon/secure/usr.bin/openssl/man/ecparam.1 user/jmallett/octeon/secure/usr.bin/openssl/man/enc.1 user/jmallett/octeon/secure/usr.bin/openssl/man/errstr.1 user/jmallett/octeon/secure/usr.bin/openssl/man/gendsa.1 user/jmallett/octeon/secure/usr.bin/openssl/man/genrsa.1 user/jmallett/octeon/secure/usr.bin/openssl/man/nseq.1 user/jmallett/octeon/secure/usr.bin/openssl/man/ocsp.1 user/jmallett/octeon/secure/usr.bin/openssl/man/openssl.1 user/jmallett/octeon/secure/usr.bin/openssl/man/passwd.1 user/jmallett/octeon/secure/usr.bin/openssl/man/pkcs12.1 user/jmallett/octeon/secure/usr.bin/openssl/man/pkcs7.1 user/jmallett/octeon/secure/usr.bin/openssl/man/pkcs8.1 user/jmallett/octeon/secure/usr.bin/openssl/man/rand.1 user/jmallett/octeon/secure/usr.bin/openssl/man/req.1 user/jmallett/octeon/secure/usr.bin/openssl/man/rsa.1 user/jmallett/octeon/secure/usr.bin/openssl/man/rsautl.1 user/jmallett/octeon/secure/usr.bin/openssl/man/s_client.1 user/jmallett/octeon/secure/usr.bin/openssl/man/s_server.1 user/jmallett/octeon/secure/usr.bin/openssl/man/s_time.1 user/jmallett/octeon/secure/usr.bin/openssl/man/sess_id.1 user/jmallett/octeon/secure/usr.bin/openssl/man/smime.1 user/jmallett/octeon/secure/usr.bin/openssl/man/speed.1 user/jmallett/octeon/secure/usr.bin/openssl/man/spkac.1 user/jmallett/octeon/secure/usr.bin/openssl/man/verify.1 user/jmallett/octeon/secure/usr.bin/openssl/man/version.1 user/jmallett/octeon/secure/usr.bin/openssl/man/x509.1 user/jmallett/octeon/secure/usr.bin/openssl/man/x509v3_config.1 user/jmallett/octeon/share/man/man5/nsswitch.conf.5 user/jmallett/octeon/share/man/man5/services.5 user/jmallett/octeon/share/man/man7/build.7 user/jmallett/octeon/share/man/man9/ieee80211.9 user/jmallett/octeon/share/man/man9/ieee80211_crypto.9 user/jmallett/octeon/share/man/man9/ieee80211_node.9 user/jmallett/octeon/share/man/man9/ieee80211_output.9 user/jmallett/octeon/share/man/man9/ieee80211_scan.9 user/jmallett/octeon/share/misc/committers-ports.dot user/jmallett/octeon/share/mk/bsd.lib.mk user/jmallett/octeon/share/mk/bsd.port.mk user/jmallett/octeon/share/mk/bsd.prog.mk user/jmallett/octeon/share/mk/sys.mk user/jmallett/octeon/sys/amd64/amd64/apic_vector.S user/jmallett/octeon/sys/amd64/amd64/local_apic.c user/jmallett/octeon/sys/amd64/amd64/pmap.c user/jmallett/octeon/sys/amd64/include/apicvar.h user/jmallett/octeon/sys/amd64/include/pmc_mdep.h user/jmallett/octeon/sys/amd64/include/reg.h user/jmallett/octeon/sys/amd64/linux32/linux.h user/jmallett/octeon/sys/arm/conf/KB920X user/jmallett/octeon/sys/arm/mv/mv_sata.c user/jmallett/octeon/sys/cam/cam_xpt.c user/jmallett/octeon/sys/cam/scsi/scsi_all.h user/jmallett/octeon/sys/cam/scsi/scsi_da.c user/jmallett/octeon/sys/compat/freebsd32/freebsd32.h user/jmallett/octeon/sys/compat/freebsd32/freebsd32_misc.c user/jmallett/octeon/sys/compat/ia32/ia32_signal.h user/jmallett/octeon/sys/compat/linprocfs/linprocfs.c user/jmallett/octeon/sys/compat/linux/linux_stats.c user/jmallett/octeon/sys/compat/svr4/svr4_stat.c user/jmallett/octeon/sys/conf/NOTES user/jmallett/octeon/sys/conf/files user/jmallett/octeon/sys/conf/files.amd64 user/jmallett/octeon/sys/conf/files.i386 user/jmallett/octeon/sys/conf/files.pc98 user/jmallett/octeon/sys/conf/kern.mk user/jmallett/octeon/sys/conf/kern.post.mk user/jmallett/octeon/sys/conf/kern.pre.mk user/jmallett/octeon/sys/conf/kmod.mk user/jmallett/octeon/sys/contrib/dev/acpica/changes.txt user/jmallett/octeon/sys/contrib/dev/acpica/common/dmextern.c user/jmallett/octeon/sys/contrib/dev/acpica/compiler/aslanalyze.c user/jmallett/octeon/sys/contrib/dev/acpica/compiler/aslcompiler.h user/jmallett/octeon/sys/contrib/dev/acpica/compiler/aslpredef.c user/jmallett/octeon/sys/contrib/dev/acpica/compiler/aslstubs.c user/jmallett/octeon/sys/contrib/dev/acpica/compiler/asltypes.h user/jmallett/octeon/sys/contrib/dev/acpica/debugger/dbdisply.c user/jmallett/octeon/sys/contrib/dev/acpica/events/evgpe.c user/jmallett/octeon/sys/contrib/dev/acpica/events/evgpeblk.c user/jmallett/octeon/sys/contrib/dev/acpica/events/evxface.c user/jmallett/octeon/sys/contrib/dev/acpica/events/evxfevnt.c user/jmallett/octeon/sys/contrib/dev/acpica/executer/exdebug.c user/jmallett/octeon/sys/contrib/dev/acpica/executer/exmutex.c user/jmallett/octeon/sys/contrib/dev/acpica/executer/exoparg2.c user/jmallett/octeon/sys/contrib/dev/acpica/executer/exregion.c user/jmallett/octeon/sys/contrib/dev/acpica/include/acevents.h user/jmallett/octeon/sys/contrib/dev/acpica/include/acexcep.h user/jmallett/octeon/sys/contrib/dev/acpica/include/acglobal.h user/jmallett/octeon/sys/contrib/dev/acpica/include/aclocal.h user/jmallett/octeon/sys/contrib/dev/acpica/include/acpixf.h user/jmallett/octeon/sys/contrib/dev/acpica/include/actables.h user/jmallett/octeon/sys/contrib/dev/acpica/include/actypes.h user/jmallett/octeon/sys/contrib/dev/acpica/include/platform/acfreebsd.h user/jmallett/octeon/sys/contrib/dev/acpica/parser/psxface.c user/jmallett/octeon/sys/contrib/dev/acpica/tables/tbutils.c user/jmallett/octeon/sys/contrib/dev/acpica/tables/tbxface.c user/jmallett/octeon/sys/contrib/dev/acpica/utilities/utglobal.c user/jmallett/octeon/sys/dev/acpica/acpi.c user/jmallett/octeon/sys/dev/acpica/acpi_button.c user/jmallett/octeon/sys/dev/acpica/acpi_ec.c user/jmallett/octeon/sys/dev/acpica/acpi_lid.c user/jmallett/octeon/sys/dev/acpica/acpivar.h user/jmallett/octeon/sys/dev/ata/ata-all.h user/jmallett/octeon/sys/dev/bce/if_bce.c user/jmallett/octeon/sys/dev/bce/if_bcereg.h user/jmallett/octeon/sys/dev/bktr/ioctl_bt848.h user/jmallett/octeon/sys/dev/bktr/ioctl_meteor.h user/jmallett/octeon/sys/dev/cxgb/common/cxgb_ael1002.c user/jmallett/octeon/sys/dev/cxgb/common/cxgb_common.h user/jmallett/octeon/sys/dev/cxgb/common/cxgb_t3_hw.c user/jmallett/octeon/sys/dev/cxgb/cxgb_adapter.h user/jmallett/octeon/sys/dev/cxgb/cxgb_main.c user/jmallett/octeon/sys/dev/cxgb/cxgb_sge.c user/jmallett/octeon/sys/dev/e1000/e1000_80003es2lan.c user/jmallett/octeon/sys/dev/e1000/e1000_82571.c user/jmallett/octeon/sys/dev/e1000/e1000_82575.c user/jmallett/octeon/sys/dev/e1000/e1000_82575.h user/jmallett/octeon/sys/dev/e1000/e1000_defines.h user/jmallett/octeon/sys/dev/e1000/e1000_hw.h user/jmallett/octeon/sys/dev/e1000/e1000_ich8lan.c user/jmallett/octeon/sys/dev/e1000/e1000_ich8lan.h user/jmallett/octeon/sys/dev/e1000/e1000_mac.c user/jmallett/octeon/sys/dev/e1000/e1000_manage.c user/jmallett/octeon/sys/dev/e1000/e1000_phy.c user/jmallett/octeon/sys/dev/e1000/e1000_regs.h user/jmallett/octeon/sys/dev/e1000/if_em.c user/jmallett/octeon/sys/dev/e1000/if_em.h user/jmallett/octeon/sys/dev/e1000/if_igb.c user/jmallett/octeon/sys/dev/e1000/if_igb.h user/jmallett/octeon/sys/dev/firewire/sbp.c user/jmallett/octeon/sys/dev/hwpmc/hwpmc_core.c user/jmallett/octeon/sys/dev/hwpmc/hwpmc_core.h user/jmallett/octeon/sys/dev/hwpmc/hwpmc_intel.c user/jmallett/octeon/sys/dev/hwpmc/hwpmc_mod.c user/jmallett/octeon/sys/dev/hwpmc/pmc_events.h user/jmallett/octeon/sys/dev/ixgbe/LICENSE user/jmallett/octeon/sys/dev/ixgbe/ixgbe.c user/jmallett/octeon/sys/dev/ixgbe/ixgbe.h user/jmallett/octeon/sys/dev/ixgbe/ixgbe_82598.c user/jmallett/octeon/sys/dev/ixgbe/ixgbe_82599.c user/jmallett/octeon/sys/dev/ixgbe/ixgbe_api.c user/jmallett/octeon/sys/dev/ixgbe/ixgbe_api.h user/jmallett/octeon/sys/dev/ixgbe/ixgbe_common.c user/jmallett/octeon/sys/dev/ixgbe/ixgbe_phy.c user/jmallett/octeon/sys/dev/ixgbe/ixgbe_phy.h user/jmallett/octeon/sys/dev/ixgbe/ixgbe_type.h user/jmallett/octeon/sys/dev/malo/if_malo.c user/jmallett/octeon/sys/dev/mpt/mpt_cam.c user/jmallett/octeon/sys/dev/ofw/ofw_standard.c user/jmallett/octeon/sys/dev/sound/pci/envy24.c user/jmallett/octeon/sys/dev/sound/pci/envy24.h user/jmallett/octeon/sys/dev/sound/pci/envy24ht.c user/jmallett/octeon/sys/dev/sound/pci/envy24ht.h user/jmallett/octeon/sys/dev/sound/pci/es137x.c user/jmallett/octeon/sys/dev/sound/pci/spicds.c user/jmallett/octeon/sys/dev/sound/pci/spicds.h user/jmallett/octeon/sys/dev/sound/pcm/dsp.c user/jmallett/octeon/sys/dev/syscons/scvidctl.c user/jmallett/octeon/sys/dev/syscons/syscons.c user/jmallett/octeon/sys/dev/ubsec/ubsec.c user/jmallett/octeon/sys/dev/usb/controller/ehci_pci.c user/jmallett/octeon/sys/dev/usb/controller/ohci_pci.c user/jmallett/octeon/sys/dev/usb/input/ukbd.c user/jmallett/octeon/sys/dev/usb/quirk/usb_quirk.c user/jmallett/octeon/sys/dev/usb/usb_compat_linux.c user/jmallett/octeon/sys/dev/usb/usbdevs user/jmallett/octeon/sys/fs/coda/cnode.h user/jmallett/octeon/sys/fs/coda/coda.h user/jmallett/octeon/sys/fs/coda/coda_subr.c user/jmallett/octeon/sys/fs/coda/coda_subr.h user/jmallett/octeon/sys/fs/coda/coda_venus.c user/jmallett/octeon/sys/fs/coda/coda_venus.h user/jmallett/octeon/sys/fs/coda/coda_vfsops.c user/jmallett/octeon/sys/fs/coda/coda_vfsops.h user/jmallett/octeon/sys/fs/coda/coda_vnops.c user/jmallett/octeon/sys/fs/deadfs/dead_vnops.c user/jmallett/octeon/sys/fs/msdosfs/msdosfs_vfsops.c user/jmallett/octeon/sys/fs/nfs/nfs_commonport.c user/jmallett/octeon/sys/fs/nfs/nfs_commonsubs.c user/jmallett/octeon/sys/fs/nfs/nfs_var.h user/jmallett/octeon/sys/fs/nfs/nfsport.h user/jmallett/octeon/sys/fs/nfs/nfsrvstate.h user/jmallett/octeon/sys/fs/nfsserver/nfs_nfsdport.c user/jmallett/octeon/sys/fs/nfsserver/nfs_nfsdserv.c user/jmallett/octeon/sys/fs/nfsserver/nfs_nfsdstate.c user/jmallett/octeon/sys/geom/geom_vfs.c user/jmallett/octeon/sys/geom/multipath/g_multipath.c user/jmallett/octeon/sys/i386/i386/apic_vector.s user/jmallett/octeon/sys/i386/i386/local_apic.c user/jmallett/octeon/sys/i386/i386/pmap.c user/jmallett/octeon/sys/i386/ibcs2/ibcs2_stat.c user/jmallett/octeon/sys/i386/include/apicvar.h user/jmallett/octeon/sys/i386/include/pmc_mdep.h user/jmallett/octeon/sys/i386/linux/linux.h user/jmallett/octeon/sys/ia64/conf/GENERIC user/jmallett/octeon/sys/ia64/ia64/autoconf.c user/jmallett/octeon/sys/ia64/ia64/interrupt.c user/jmallett/octeon/sys/ia64/ia64/mp_machdep.c user/jmallett/octeon/sys/ia64/ia64/nexus.c user/jmallett/octeon/sys/ia64/ia64/sapic.c user/jmallett/octeon/sys/ia64/include/intr.h user/jmallett/octeon/sys/kern/init_main.c user/jmallett/octeon/sys/kern/kern_alq.c user/jmallett/octeon/sys/kern/kern_event.c user/jmallett/octeon/sys/kern/kern_sig.c user/jmallett/octeon/sys/kern/sys_pipe.c user/jmallett/octeon/sys/kern/tty_pts.c user/jmallett/octeon/sys/kern/uipc_mqueue.c user/jmallett/octeon/sys/kern/uipc_sem.c user/jmallett/octeon/sys/kern/uipc_shm.c user/jmallett/octeon/sys/kern/vfs_bio.c user/jmallett/octeon/sys/kern/vfs_default.c user/jmallett/octeon/sys/kern/vfs_subr.c user/jmallett/octeon/sys/kern/vfs_syscalls.c user/jmallett/octeon/sys/kern/vfs_vnops.c user/jmallett/octeon/sys/mips/conf/AR71XX user/jmallett/octeon/sys/modules/Makefile user/jmallett/octeon/sys/modules/em/Makefile user/jmallett/octeon/sys/modules/hwpmc/Makefile user/jmallett/octeon/sys/modules/ixgbe/Makefile user/jmallett/octeon/sys/net/bpf.c user/jmallett/octeon/sys/net80211/ieee80211_hostap.c user/jmallett/octeon/sys/net80211/ieee80211_input.c user/jmallett/octeon/sys/net80211/ieee80211_var.h user/jmallett/octeon/sys/netgraph/ng_deflate.c user/jmallett/octeon/sys/netgraph/ng_ksocket.c user/jmallett/octeon/sys/netgraph/ng_l2tp.c user/jmallett/octeon/sys/netgraph/ng_mppc.c user/jmallett/octeon/sys/netgraph/ng_ppp.c user/jmallett/octeon/sys/netgraph/ng_pptpgre.c user/jmallett/octeon/sys/netgraph/ng_tcpmss.c user/jmallett/octeon/sys/netinet/in.h user/jmallett/octeon/sys/netinet/ipfw/ip_dn_io.c user/jmallett/octeon/sys/netinet/ipfw/ip_fw_sockopt.c user/jmallett/octeon/sys/netinet/sctp_asconf.c user/jmallett/octeon/sys/netinet/sctp_constants.h user/jmallett/octeon/sys/netinet/sctp_indata.c user/jmallett/octeon/sys/netinet/sctp_indata.h user/jmallett/octeon/sys/netinet/sctp_input.c user/jmallett/octeon/sys/netinet/sctp_output.c user/jmallett/octeon/sys/netinet/sctp_output.h user/jmallett/octeon/sys/netinet/sctp_pcb.c user/jmallett/octeon/sys/netinet/sctp_pcb.h user/jmallett/octeon/sys/netinet/sctp_structs.h user/jmallett/octeon/sys/netinet/sctp_usrreq.c user/jmallett/octeon/sys/netinet/sctp_var.h user/jmallett/octeon/sys/netinet/sctputil.c user/jmallett/octeon/sys/netinet/sctputil.h user/jmallett/octeon/sys/netinet6/sctp6_usrreq.c user/jmallett/octeon/sys/netipsec/ipsec.c user/jmallett/octeon/sys/netipsec/key.c user/jmallett/octeon/sys/powerpc/ofw/ofw_real.c user/jmallett/octeon/sys/powerpc/ofw/ofw_syscons.c user/jmallett/octeon/sys/sparc64/fhc/fhc.c user/jmallett/octeon/sys/sparc64/pci/apb.c user/jmallett/octeon/sys/sparc64/pci/psycho.c user/jmallett/octeon/sys/sparc64/pci/schizo.c user/jmallett/octeon/sys/sparc64/sbus/sbus.c user/jmallett/octeon/sys/sparc64/sparc64/trap.c user/jmallett/octeon/sys/sys/_timespec.h user/jmallett/octeon/sys/sys/ioccom.h user/jmallett/octeon/sys/sys/pcpu.h user/jmallett/octeon/sys/sys/pmc.h user/jmallett/octeon/sys/sys/proc.h user/jmallett/octeon/sys/sys/stat.h user/jmallett/octeon/sys/sys/timespec.h user/jmallett/octeon/sys/sys/vnode.h user/jmallett/octeon/sys/sys/vtoc.h user/jmallett/octeon/sys/teken/teken.c user/jmallett/octeon/sys/ufs/ffs/ffs_vfsops.c user/jmallett/octeon/sys/vm/vm_fault.c user/jmallett/octeon/sys/vm/vm_map.c user/jmallett/octeon/sys/vm/vm_map.h user/jmallett/octeon/sys/vm/vm_page.c user/jmallett/octeon/sys/vm/vm_pageout.c user/jmallett/octeon/tools/tools/nanobsd/gateworks/common user/jmallett/octeon/tools/tools/nanobsd/nanobsd.sh user/jmallett/octeon/usr.bin/calendar/Makefile user/jmallett/octeon/usr.bin/calendar/calendar.1 user/jmallett/octeon/usr.bin/calendar/calendar.c user/jmallett/octeon/usr.bin/calendar/calendar.h user/jmallett/octeon/usr.bin/calendar/calendars/calendar.australia user/jmallett/octeon/usr.bin/calendar/calendars/calendar.dutch user/jmallett/octeon/usr.bin/calendar/calendars/calendar.freebsd user/jmallett/octeon/usr.bin/calendar/day.c user/jmallett/octeon/usr.bin/calendar/io.c user/jmallett/octeon/usr.bin/calendar/ostern.c user/jmallett/octeon/usr.bin/calendar/paskha.c user/jmallett/octeon/usr.bin/calendar/pathnames.h user/jmallett/octeon/usr.bin/compress/compress.c user/jmallett/octeon/usr.bin/getent/getent.c user/jmallett/octeon/usr.bin/gzip/gzip.c user/jmallett/octeon/usr.bin/indent/args.c user/jmallett/octeon/usr.bin/indent/indent.1 user/jmallett/octeon/usr.bin/indent/indent.c user/jmallett/octeon/usr.bin/indent/indent_globs.h user/jmallett/octeon/usr.bin/indent/lexi.c user/jmallett/octeon/usr.bin/kdump/kdump.c user/jmallett/octeon/usr.bin/mail/util.c user/jmallett/octeon/usr.bin/make/main.c user/jmallett/octeon/usr.bin/sed/main.c user/jmallett/octeon/usr.bin/sed/sed.1 user/jmallett/octeon/usr.bin/sockstat/sockstat.c user/jmallett/octeon/usr.bin/touch/touch.c user/jmallett/octeon/usr.sbin/Makefile user/jmallett/octeon/usr.sbin/ac/ac.c user/jmallett/octeon/usr.sbin/config/config.y user/jmallett/octeon/usr.sbin/config/lang.l user/jmallett/octeon/usr.sbin/config/main.c user/jmallett/octeon/usr.sbin/config/mkmakefile.c user/jmallett/octeon/usr.sbin/config/mkoptions.c user/jmallett/octeon/usr.sbin/mailwrapper/mailwrapper.8 user/jmallett/octeon/usr.sbin/mailwrapper/mailwrapper.c user/jmallett/octeon/usr.sbin/mtree/compare.c user/jmallett/octeon/usr.sbin/mtree/create.c user/jmallett/octeon/usr.sbin/mtree/mtree.8 user/jmallett/octeon/usr.sbin/pkg_install/add/futil.c user/jmallett/octeon/usr.sbin/pkg_install/add/perform.c user/jmallett/octeon/usr.sbin/pkg_install/delete/perform.c user/jmallett/octeon/usr.sbin/pkg_install/lib/file.c user/jmallett/octeon/usr.sbin/pkg_install/lib/lib.h user/jmallett/octeon/usr.sbin/pkg_install/lib/match.c user/jmallett/octeon/usr.sbin/pkg_install/lib/pen.c user/jmallett/octeon/usr.sbin/pkg_install/lib/plist.c user/jmallett/octeon/usr.sbin/pkg_install/lib/url.c user/jmallett/octeon/usr.sbin/pkg_install/version/perform.c user/jmallett/octeon/usr.sbin/pmcstat/pmcpl_callgraph.c user/jmallett/octeon/usr.sbin/pmcstat/pmcpl_calltree.c user/jmallett/octeon/usr.sbin/pmcstat/pmcstat_log.c user/jmallett/octeon/usr.sbin/pmcstat/pmcstat_log.h user/jmallett/octeon/usr.sbin/vidcontrol/vidcontrol.c Directory Properties: user/jmallett/octeon/ (props changed) user/jmallett/octeon/contrib/tzdata/ (props changed) user/jmallett/octeon/crypto/openssl/ (props changed) user/jmallett/octeon/lib/libz/ (props changed) user/jmallett/octeon/sys/contrib/dev/acpica/ (props changed) user/jmallett/octeon/sys/contrib/x86emu/ (props changed) Modified: user/jmallett/octeon/ObsoleteFiles.inc ============================================================================== --- user/jmallett/octeon/ObsoleteFiles.inc Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/ObsoleteFiles.inc Tue Apr 6 19:25:58 2010 (r206285) @@ -14,11 +14,14 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100326: [ia64] removed +.if ${TARGET_ARCH} == "ia64" +OLD_FILES+=usr/include/machine/nexusvar.h +.endif # 20100326: gcpio removal OLD_FILES+=usr/bin/gcpio OLD_FILES+=usr/share/info/cpio.info.gz OLD_FILES+=usr/share/man/man1/gcpio.1.gz - # 20100322: libz update OLD_LIBS+=lib/libz.so.5 .if ${TARGET_ARCH} == "amd64" Modified: user/jmallett/octeon/UPDATING ============================================================================== --- user/jmallett/octeon/UPDATING Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/UPDATING Tue Apr 6 19:25:58 2010 (r206285) @@ -22,6 +22,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20100402: + WITH_CTF can now be specified in src.conf (not recommended, there + are some problems with static executables), make.conf (would also + affect ports which do not use GNU make and do not override the + compile targets) or in the kernel config (via "makeoptions + WITH_CTF=yes"). + When WITH_CTF was specified there before this was silently ignored, + so make sure that WITH_CTF is not used in places which could lead + to unwanted behavior. + 20100311: The kernel option COMPAT_IA32 has been replaced with COMPAT_FREEBSD32 to allow 32-bit compatibility on non-x86 platforms. All kernel Modified: user/jmallett/octeon/bin/cp/utils.c ============================================================================== --- user/jmallett/octeon/bin/cp/utils.c Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/bin/cp/utils.c Tue Apr 6 19:25:58 2010 (r206285) @@ -323,8 +323,8 @@ setfile(struct stat *fs, int fd) fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO; - TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec); - TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec); + TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim); + TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim); if (islink ? lutimes(to.p_path, tv) : utimes(to.p_path, tv)) { warn("%sutimes: %s", islink ? "l" : "", to.p_path); rval = 1; Modified: user/jmallett/octeon/bin/ls/cmp.c ============================================================================== --- user/jmallett/octeon/bin/ls/cmp.c Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/bin/ls/cmp.c Tue Apr 6 19:25:58 2010 (r206285) @@ -66,17 +66,17 @@ int modcmp(const FTSENT *a, const FTSENT *b) { - if (b->fts_statp->st_mtimespec.tv_sec > - a->fts_statp->st_mtimespec.tv_sec) + if (b->fts_statp->st_mtim.tv_sec > + a->fts_statp->st_mtim.tv_sec) return (1); - if (b->fts_statp->st_mtimespec.tv_sec < - a->fts_statp->st_mtimespec.tv_sec) + if (b->fts_statp->st_mtim.tv_sec < + a->fts_statp->st_mtim.tv_sec) return (-1); - if (b->fts_statp->st_mtimespec.tv_nsec > - a->fts_statp->st_mtimespec.tv_nsec) + if (b->fts_statp->st_mtim.tv_nsec > + a->fts_statp->st_mtim.tv_nsec) return (1); - if (b->fts_statp->st_mtimespec.tv_nsec < - a->fts_statp->st_mtimespec.tv_nsec) + if (b->fts_statp->st_mtim.tv_nsec < + a->fts_statp->st_mtim.tv_nsec) return (-1); return (strcoll(a->fts_name, b->fts_name)); } @@ -92,17 +92,17 @@ int acccmp(const FTSENT *a, const FTSENT *b) { - if (b->fts_statp->st_atimespec.tv_sec > - a->fts_statp->st_atimespec.tv_sec) + if (b->fts_statp->st_atim.tv_sec > + a->fts_statp->st_atim.tv_sec) return (1); - if (b->fts_statp->st_atimespec.tv_sec < - a->fts_statp->st_atimespec.tv_sec) + if (b->fts_statp->st_atim.tv_sec < + a->fts_statp->st_atim.tv_sec) return (-1); - if (b->fts_statp->st_atimespec.tv_nsec > - a->fts_statp->st_atimespec.tv_nsec) + if (b->fts_statp->st_atim.tv_nsec > + a->fts_statp->st_atim.tv_nsec) return (1); - if (b->fts_statp->st_atimespec.tv_nsec < - a->fts_statp->st_atimespec.tv_nsec) + if (b->fts_statp->st_atim.tv_nsec < + a->fts_statp->st_atim.tv_nsec) return (-1); return (strcoll(a->fts_name, b->fts_name)); } @@ -118,17 +118,17 @@ int birthcmp(const FTSENT *a, const FTSENT *b) { - if (b->fts_statp->st_birthtimespec.tv_sec > - a->fts_statp->st_birthtimespec.tv_sec) + if (b->fts_statp->st_birthtim.tv_sec > + a->fts_statp->st_birthtim.tv_sec) return (1); - if (b->fts_statp->st_birthtimespec.tv_sec < - a->fts_statp->st_birthtimespec.tv_sec) + if (b->fts_statp->st_birthtim.tv_sec < + a->fts_statp->st_birthtim.tv_sec) return (-1); - if (b->fts_statp->st_birthtimespec.tv_nsec > - a->fts_statp->st_birthtimespec.tv_nsec) + if (b->fts_statp->st_birthtim.tv_nsec > + a->fts_statp->st_birthtim.tv_nsec) return (1); - if (b->fts_statp->st_birthtimespec.tv_nsec < - a->fts_statp->st_birthtimespec.tv_nsec) + if (b->fts_statp->st_birthtim.tv_nsec < + a->fts_statp->st_birthtim.tv_nsec) return (-1); return (strcoll(a->fts_name, b->fts_name)); } @@ -144,17 +144,17 @@ int statcmp(const FTSENT *a, const FTSENT *b) { - if (b->fts_statp->st_ctimespec.tv_sec > - a->fts_statp->st_ctimespec.tv_sec) + if (b->fts_statp->st_ctim.tv_sec > + a->fts_statp->st_ctim.tv_sec) return (1); - if (b->fts_statp->st_ctimespec.tv_sec < - a->fts_statp->st_ctimespec.tv_sec) + if (b->fts_statp->st_ctim.tv_sec < + a->fts_statp->st_ctim.tv_sec) return (-1); - if (b->fts_statp->st_ctimespec.tv_nsec > - a->fts_statp->st_ctimespec.tv_nsec) + if (b->fts_statp->st_ctim.tv_nsec > + a->fts_statp->st_ctim.tv_nsec) return (1); - if (b->fts_statp->st_ctimespec.tv_nsec < - a->fts_statp->st_ctimespec.tv_nsec) + if (b->fts_statp->st_ctim.tv_nsec < + a->fts_statp->st_ctim.tv_nsec) return (-1); return (strcoll(a->fts_name, b->fts_name)); } Modified: user/jmallett/octeon/bin/pax/Makefile ============================================================================== --- user/jmallett/octeon/bin/pax/Makefile Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/bin/pax/Makefile Tue Apr 6 19:25:58 2010 (r206285) @@ -29,8 +29,5 @@ PROG= pax SRCS= ar_io.c ar_subs.c buf_subs.c cache.c cpio.c file_subs.c ftree.c \ gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c \ tables.c tar.c tty_subs.c -#XXX NOTYET -#MAN= pax.1 tar.1 cpio.1 -#LINKS= ${BINDIR}/pax ${BINDIR}/tar ${BINDIR}/pax ${BINDIR}/cpio .include Modified: user/jmallett/octeon/bin/pax/getoldopt.c ============================================================================== --- user/jmallett/octeon/bin/pax/getoldopt.c Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/bin/pax/getoldopt.c Tue Apr 6 19:25:58 2010 (r206285) @@ -1,4 +1,4 @@ -/* $OpenBSD: getoldopt.c,v 1.4 2000/01/22 20:24:51 deraadt Exp $ */ +/* $OpenBSD: getoldopt.c,v 1.9 2009/10/27 23:59:22 deraadt Exp $ */ /* $NetBSD: getoldopt.c,v 1.3 1995/03/21 09:07:28 cgd Exp $ */ /*- @@ -7,7 +7,7 @@ * otherwise, it uses the old rules used by tar, dump, and ps. * * Written 25 August 1985 by John Gilmore (ihnp4!hoptoad!gnu) and placed - * in the Pubic Domain for your edification and enjoyment. + * in the Public Domain for your edification and enjoyment. */ #include @@ -33,7 +33,8 @@ getoldopt(int argc, char **argv, const c optarg = NULL; if (key == NULL) { /* First time */ - if (argc < 2) return EOF; + if (argc < 2) + return (-1); key = argv[1]; if (*key == '-') use_getopt++; @@ -42,18 +43,18 @@ getoldopt(int argc, char **argv, const c } if (use_getopt) - return getopt(argc, argv, optstring); + return (getopt(argc, argv, optstring)); c = *key++; if (c == '\0') { key--; - return EOF; + return (-1); } place = strchr(optstring, c); if (place == NULL || c == ':') { fprintf(stderr, "%s: unknown option %c\n", argv[0], c); - return('?'); + return ('?'); } place++; @@ -64,9 +65,9 @@ getoldopt(int argc, char **argv, const c } else { fprintf(stderr, "%s: %c argument missing\n", argv[0], c); - return('?'); + return ('?'); } } - return(c); + return (c); } Modified: user/jmallett/octeon/bin/rcp/rcp.c ============================================================================== --- user/jmallett/octeon/bin/rcp/rcp.c Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/bin/rcp/rcp.c Tue Apr 6 19:25:58 2010 (r206285) @@ -390,8 +390,8 @@ syserr: run_err("%s: %s", name, strerr * versions expecting microseconds. */ (void)snprintf(buf, sizeof(buf), "T%ld 0 %ld 0\n", - (long)stb.st_mtimespec.tv_sec, - (long)stb.st_atimespec.tv_sec); + (long)stb.st_mtim.tv_sec, + (long)stb.st_atim.tv_sec); (void)write(rem, buf, strlen(buf)); if (response() < 0) goto next; @@ -454,8 +454,8 @@ rsource(char *name, struct stat *statp) last++; if (pflag) { (void)snprintf(path, sizeof(path), "T%ld 0 %ld 0\n", - (long)statp->st_mtimespec.tv_sec, - (long)statp->st_atimespec.tv_sec); + (long)statp->st_mtim.tv_sec, + (long)statp->st_atim.tv_sec); (void)write(rem, path, strlen(path)); if (response() < 0) { closedir(dirp); Modified: user/jmallett/octeon/bin/sh/expand.c ============================================================================== --- user/jmallett/octeon/bin/sh/expand.c Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/bin/sh/expand.c Tue Apr 6 19:25:58 2010 (r206285) @@ -273,7 +273,6 @@ exptilde(char *p, int flag) switch(c) { case CTLESC: /* This means CTL* are always considered quoted. */ case CTLVAR: - case CTLENDVAR: case CTLBACKQ: case CTLBACKQ | CTLQUOTE: case CTLARI: @@ -285,6 +284,7 @@ exptilde(char *p, int flag) goto done; break; case '/': + case CTLENDVAR: goto done; } p++; @@ -506,7 +506,9 @@ subevalvar(char *p, char *str, int strlo int amount; herefd = -1; - argstr(p, 0); + argstr(p, (subtype == VSTRIMLEFT || subtype == VSTRIMLEFTMAX || + subtype == VSTRIMRIGHT || subtype == VSTRIMRIGHTMAX ? + EXP_CASE : 0) | EXP_TILDE); STACKSTRNUL(expdest); herefd = saveherefd; argbackq = saveargbackq; Modified: user/jmallett/octeon/bin/sh/mksyntax.c ============================================================================== --- user/jmallett/octeon/bin/sh/mksyntax.c Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/bin/sh/mksyntax.c Tue Apr 6 19:25:58 2010 (r206285) @@ -232,8 +232,6 @@ main(int argc __unused, char **argv __un add("\n", "CNL"); add("\\", "CBACK"); add("`", "CBQUOTE"); - add("'", "CSQUOTE"); - add("\"", "CDQUOTE"); add("$", "CVAR"); add("}", "CENDVAR"); add("(", "CLP"); Modified: user/jmallett/octeon/bin/sh/options.c ============================================================================== --- user/jmallett/octeon/bin/sh/options.c Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/bin/sh/options.c Tue Apr 6 19:25:58 2010 (r206285) @@ -93,8 +93,11 @@ procargs(int argc, char **argv) options(1); if (*argptr == NULL && minusc == NULL) sflag = 1; - if (iflag == 2 && sflag == 1 && isatty(0) && isatty(1)) + if (iflag != 0 && sflag == 1 && isatty(0) && isatty(1)) { iflag = 1; + if (Eflag == 2) + Eflag = 1; + } if (mflag == 2) mflag = iflag; for (i = 0; i < NOPTS; i++) Modified: user/jmallett/octeon/bin/sh/parser.c ============================================================================== --- user/jmallett/octeon/bin/sh/parser.c Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/bin/sh/parser.c Tue Apr 6 19:25:58 2010 (r206285) @@ -79,6 +79,10 @@ struct heredoc { int striptabs; /* if set, strip leading tabs */ }; +struct parser_temp { + struct parser_temp *next; + void *data; +}; STATIC struct heredoc *heredoclist; /* list of here documents to read */ @@ -94,6 +98,7 @@ STATIC struct heredoc *heredoc; STATIC int quoteflag; /* set if (part of) last token was quoted */ STATIC int startlinno; /* line # where last token started */ STATIC int funclinno; /* line # where the current function started */ +STATIC struct parser_temp *parser_temp; /* XXX When 'noaliases' is set to one, no alias expansion takes place. */ static int noaliases = 0; @@ -117,6 +122,73 @@ STATIC void synerror(const char *); STATIC void setprompt(int); +STATIC void * +parser_temp_alloc(size_t len) +{ + struct parser_temp *t; + + INTOFF; + t = ckmalloc(sizeof(*t)); + t->data = NULL; + t->next = parser_temp; + parser_temp = t; + t->data = ckmalloc(len); + INTON; + return t->data; +} + + +STATIC void * +parser_temp_realloc(void *ptr, size_t len) +{ + struct parser_temp *t; + + INTOFF; + t = parser_temp; + if (ptr != t->data) + error("bug: parser_temp_realloc misused"); + t->data = ckrealloc(t->data, len); + INTON; + return t->data; +} + + +STATIC void +parser_temp_free_upto(void *ptr) +{ + struct parser_temp *t; + int done = 0; + + INTOFF; + while (parser_temp != NULL && !done) { + t = parser_temp; + parser_temp = t->next; + done = t->data == ptr; + ckfree(t->data); + ckfree(t); + } + INTON; + if (!done) + error("bug: parser_temp_free_upto misused"); +} + + +STATIC void +parser_temp_free_all(void) +{ + struct parser_temp *t; + + INTOFF; + while (parser_temp != NULL) { + t = parser_temp; + parser_temp = t->next; + ckfree(t->data); + ckfree(t); + } + INTON; +} + + /* * Read and parse a command. Returns NEOF on end of file. (NULL is a * valid parse tree indicating a blank line.) @@ -127,6 +199,11 @@ parsecmd(int interact) { int t; + /* This assumes the parser is not re-entered, + * which could happen if we add command substitution on PS1/PS2. + */ + parser_temp_free_all(); + tokpushback = 0; doprompt = interact; if (doprompt) @@ -863,6 +940,21 @@ breakloop: } +#define MAXNEST_STATIC 8 +struct tokenstate +{ + const char *syntax; /* *SYNTAX */ + int parenlevel; /* levels of parentheses in arithmetic */ + enum tokenstate_category + { + TSTATE_TOP, + TSTATE_VAR_OLD, /* ${var+-=?}, inherits dquotes */ + TSTATE_VAR_NEW, /* other ${var...}, own dquote state */ + TSTATE_ARITH + } category; +}; + + /* * Called to parse command substitutions. */ @@ -1040,7 +1132,7 @@ done: #define PARSEARITH() {goto parsearith; parsearith_return:;} STATIC int -readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) +readtoken1(int firstc, char const *initialsyntax, char *eofmark, int striptabs) { int c = firstc; char *out; @@ -1048,22 +1140,21 @@ readtoken1(int firstc, char const *synta char line[EOFMARKLEN + 1]; struct nodelist *bqlist; int quotef; - int dblquote; - int varnest; /* levels of variables expansion */ - int arinest; /* levels of arithmetic expansion */ - int parenlevel; /* levels of parens in arithmetic */ - char const *prevsyntax; /* syntax before arithmetic */ + int newvarnest; + int level; int synentry; + struct tokenstate state_static[MAXNEST_STATIC]; + int maxnest = MAXNEST_STATIC; + struct tokenstate *state = state_static; startlinno = plinno; - dblquote = 0; - if (syntax == DQSYNTAX) - dblquote = 1; quotef = 0; bqlist = NULL; - varnest = 0; - arinest = 0; - parenlevel = 0; + newvarnest = 0; + level = 0; + state[level].syntax = initialsyntax; + state[level].parenlevel = 0; + state[level].category = TSTATE_TOP; STARTSTACKSTR(out); loop: { /* for each line, until end of word */ @@ -1071,11 +1162,11 @@ readtoken1(int firstc, char const *synta for (;;) { /* until end of line or end of word */ CHECKSTRSPACE(3, out); /* permit 3 calls to USTPUTC */ - synentry = syntax[c]; + synentry = state[level].syntax[c]; switch(synentry) { case CNL: /* '\n' */ - if (syntax == BASESYNTAX) + if (state[level].syntax == BASESYNTAX) goto endword; /* exit outer loop */ USTPUTC(c, out); plinno++; @@ -1089,7 +1180,7 @@ readtoken1(int firstc, char const *synta USTPUTC(c, out); break; case CCTL: - if (eofmark == NULL || dblquote) + if (eofmark == NULL || initialsyntax != SQSYNTAX) USTPUTC(CTLESC, out); USTPUTC(c, out); break; @@ -1105,41 +1196,34 @@ readtoken1(int firstc, char const *synta else setprompt(0); } else { - if (dblquote && c != '\\' && - c != '`' && c != '$' && - (c != '"' || eofmark != NULL)) + if (state[level].syntax == DQSYNTAX && + c != '\\' && c != '`' && c != '$' && + (c != '"' || (eofmark != NULL && + newvarnest == 0)) && + (c != '}' || state[level].category != TSTATE_VAR_OLD)) USTPUTC('\\', out); if (SQSYNTAX[c] == CCTL) USTPUTC(CTLESC, out); - else if (eofmark == NULL) + else if (eofmark == NULL || + newvarnest > 0) USTPUTC(CTLQUOTEMARK, out); USTPUTC(c, out); quotef++; } break; case CSQUOTE: - if (eofmark == NULL) - USTPUTC(CTLQUOTEMARK, out); - syntax = SQSYNTAX; + USTPUTC(CTLQUOTEMARK, out); + state[level].syntax = SQSYNTAX; break; case CDQUOTE: - if (eofmark == NULL) - USTPUTC(CTLQUOTEMARK, out); - syntax = DQSYNTAX; - dblquote = 1; + USTPUTC(CTLQUOTEMARK, out); + state[level].syntax = DQSYNTAX; break; case CENDQUOTE: - if (eofmark != NULL && arinest == 0 && - varnest == 0) { + if (eofmark != NULL && newvarnest == 0) USTPUTC(c, out); - } else { - if (arinest) { - syntax = ARISYNTAX; - dblquote = 0; - } else if (eofmark == NULL) { - syntax = BASESYNTAX; - dblquote = 0; - } + else { + state[level].syntax = BASESYNTAX; quotef++; } break; @@ -1147,30 +1231,33 @@ readtoken1(int firstc, char const *synta PARSESUB(); /* parse substitution */ break; case CENDVAR: /* '}' */ - if (varnest > 0) { - varnest--; + if (level > 0 && + (state[level].category == TSTATE_VAR_OLD || + state[level].category == TSTATE_VAR_NEW)) { + if (state[level].category == TSTATE_VAR_OLD) + state[level - 1].syntax = state[level].syntax; + else + newvarnest--; + level--; USTPUTC(CTLENDVAR, out); } else { USTPUTC(c, out); } break; case CLP: /* '(' in arithmetic */ - parenlevel++; + state[level].parenlevel++; USTPUTC(c, out); break; case CRP: /* ')' in arithmetic */ - if (parenlevel > 0) { + if (state[level].parenlevel > 0) { USTPUTC(c, out); - --parenlevel; + --state[level].parenlevel; } else { if (pgetc() == ')') { - if (--arinest == 0) { + if (level > 0 && + state[level].category == TSTATE_ARITH) { + level--; USTPUTC(CTLENDARI, out); - syntax = prevsyntax; - if (syntax == DQSYNTAX) - dblquote = 1; - else - dblquote = 0; } else USTPUTC(')', out); } else { @@ -1184,13 +1271,15 @@ readtoken1(int firstc, char const *synta } break; case CBQUOTE: /* '`' */ - out = parsebackq(out, &bqlist, 1, dblquote, - arinest || dblquote); + out = parsebackq(out, &bqlist, 1, + state[level].syntax == DQSYNTAX && + (eofmark == NULL || newvarnest > 0), + state[level].syntax == DQSYNTAX || state[level].syntax == ARISYNTAX); break; case CEOF: goto endword; /* exit outer loop */ default: - if (varnest == 0) + if (level == 0) goto endword; /* exit outer loop */ USTPUTC(c, out); } @@ -1198,14 +1287,17 @@ readtoken1(int firstc, char const *synta } } endword: - if (syntax == ARISYNTAX) + if (state[level].syntax == ARISYNTAX) synerror("Missing '))'"); - if (syntax != BASESYNTAX && eofmark == NULL) + if (state[level].syntax != BASESYNTAX && eofmark == NULL) synerror("Unterminated quoted string"); - if (varnest != 0) { + if (state[level].category == TSTATE_VAR_OLD || + state[level].category == TSTATE_VAR_NEW) { startlinno = plinno; synerror("Missing '}'"); } + if (state != state_static) + parser_temp_free_upto(state); USTPUTC('\0', out); len = out - stackblock(); out = stackblock(); @@ -1228,7 +1320,6 @@ endword: /* end of readtoken routine */ - /* * Check to see whether we are at the end of the here document. When this * is called, c is set to the first character of the next input line. If @@ -1345,8 +1436,11 @@ parsesub: { PARSEARITH(); } else { pungetc(); - out = parsebackq(out, &bqlist, 0, dblquote, - arinest || dblquote); + out = parsebackq(out, &bqlist, 0, + state[level].syntax == DQSYNTAX && + (eofmark == NULL || newvarnest > 0), + state[level].syntax == DQSYNTAX || + state[level].syntax == ARISYNTAX); } } else { USTPUTC(CTLVAR, out); @@ -1401,6 +1495,8 @@ parsesub: { subtype = VSERROR; if (c == '}') pungetc(); + else if (c == '\n' || c == PEOF) + synerror("Unexpected end of line in substitution"); else USTPUTC(c, out); } else { @@ -1417,6 +1513,8 @@ parsesub: { default: p = strchr(types, c); if (p == NULL) { + if (c == '\n' || c == PEOF) + synerror("Unexpected end of line in substitution"); if (flags == VSNUL) STPUTC(':', out); STPUTC(c, out); @@ -1442,11 +1540,44 @@ parsesub: { pungetc(); } STPUTC('=', out); - if (subtype != VSLENGTH && (dblquote || arinest)) + if (subtype != VSLENGTH && (state[level].syntax == DQSYNTAX || + state[level].syntax == ARISYNTAX)) flags |= VSQUOTE; *(stackblock() + typeloc) = subtype | flags; - if (subtype != VSNORMAL) - varnest++; + if (subtype != VSNORMAL) { + if (level + 1 >= maxnest) { + maxnest *= 2; + if (state == state_static) { + state = parser_temp_alloc( + maxnest * sizeof(*state)); + memcpy(state, state_static, + MAXNEST_STATIC * sizeof(*state)); + } else + state = parser_temp_realloc(state, + maxnest * sizeof(*state)); + } + level++; + state[level].parenlevel = 0; + if (subtype == VSMINUS || subtype == VSPLUS || + subtype == VSQUESTION || subtype == VSASSIGN) { + /* + * For operators that were in the Bourne shell, + * inherit the double-quote state. + */ + state[level].syntax = state[level - 1].syntax; + state[level].category = TSTATE_VAR_OLD; + } else { + /* + * The other operators take a pattern, + * so go to BASESYNTAX. + * Also, ' and " are now special, even + * in here documents. + */ + state[level].syntax = BASESYNTAX; + state[level].category = TSTATE_VAR_NEW; + newvarnest++; + } + } } goto parsesub_return; } @@ -1457,21 +1588,26 @@ parsesub: { */ parsearith: { - if (++arinest == 1) { - prevsyntax = syntax; - syntax = ARISYNTAX; - USTPUTC(CTLARI, out); - if (dblquote) - USTPUTC('"',out); - else - USTPUTC(' ',out); - } else { - /* - * we collapse embedded arithmetic expansion to - * parenthesis, which should be equivalent - */ - USTPUTC('(', out); + if (level + 1 >= maxnest) { + maxnest *= 2; + if (state == state_static) { + state = parser_temp_alloc( + maxnest * sizeof(*state)); + memcpy(state, state_static, + MAXNEST_STATIC * sizeof(*state)); + } else + state = parser_temp_realloc(state, + maxnest * sizeof(*state)); } + level++; + state[level].syntax = ARISYNTAX; + state[level].parenlevel = 0; + state[level].category = TSTATE_ARITH; + USTPUTC(CTLARI, out); + if (state[level - 1].syntax == DQSYNTAX) + USTPUTC('"',out); + else + USTPUTC(' ',out); goto parsearith_return; } Modified: user/jmallett/octeon/bin/sh/sh.1 ============================================================================== --- user/jmallett/octeon/bin/sh/sh.1 Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/bin/sh/sh.1 Tue Apr 6 19:25:58 2010 (r206285) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd March 6, 2010 +.Dd April 5, 2010 .Dt SH 1 .Os .Sh NAME @@ -210,7 +210,8 @@ Enable the built-in .Xr emacs 1 command line editor (disables the .Fl V -option if it has been set). +option if it has been set; +set automatically when interactive on terminals). .It Fl e Li errexit Exit immediately if any untested command fails in non-interactive mode. The exit status of a command is considered to be @@ -1178,10 +1179,20 @@ consists of all characters until the mat .Ql } . Any .Ql } -escaped by a backslash or within a quoted string, and characters in +escaped by a backslash or within a single-quoted string, and characters in embedded arithmetic expansions, command substitutions, and variable expansions, are not examined in determining the matching .Ql } . +Except for the variants with +.Ql + , +.Ql - , +.Ql = +or +.Ql ?\& , +any +.Ql } +within a double-quoted string is also not examined in determining the matching +.Ql } . .Pp The simplest form for parameter expansion is: .Pp @@ -1265,6 +1276,14 @@ is substituted. In the parameter expansions shown previously, use of the colon in the format results in a test for a parameter that is unset or null; omission of the colon results in a test for a parameter that is only unset. +.Pp +The +.Ar word +inherits the type of quoting +(unquoted, double-quoted or here-document) +from the surroundings, +with the exception that a backslash that quotes a closing brace is removed +during quote removal. .Bl -tag -width indent .It Li ${# Ns Ar parameter Ns Li } String Length. Modified: user/jmallett/octeon/bin/test/test.c ============================================================================== --- user/jmallett/octeon/bin/test/test.c Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/bin/test/test.c Tue Apr 6 19:25:58 2010 (r206285) @@ -572,12 +572,12 @@ newerf (const char *f1, const char *f2) if (stat(f1, &b1) != 0 || stat(f2, &b2) != 0) return 0; - if (b1.st_mtimespec.tv_sec > b2.st_mtimespec.tv_sec) + if (b1.st_mtim.tv_sec > b2.st_mtim.tv_sec) return 1; - if (b1.st_mtimespec.tv_sec < b2.st_mtimespec.tv_sec) + if (b1.st_mtim.tv_sec < b2.st_mtim.tv_sec) return 0; - return (b1.st_mtimespec.tv_nsec > b2.st_mtimespec.tv_nsec); + return (b1.st_mtim.tv_nsec > b2.st_mtim.tv_nsec); } static int Modified: user/jmallett/octeon/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- user/jmallett/octeon/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Apr 6 19:25:58 2010 (r206285) @@ -4288,7 +4288,12 @@ zfs_prune_proplist(zfs_handle_t *zhp, ui zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); - if (props[zfs_prop] == B_FALSE) + /* + * We leave user:props in the nvlist, so there will be + * some ZPROP_INVAL. To be extra safe, don't prune + * those. + */ + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) (void) nvlist_remove(zhp->zfs_props, nvpair_name(curr), nvpair_type(curr)); curr = next; Modified: user/jmallett/octeon/contrib/bsnmp/gensnmpdef/gensnmpdef.c ============================================================================== --- user/jmallett/octeon/contrib/bsnmp/gensnmpdef/gensnmpdef.c Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/contrib/bsnmp/gensnmpdef/gensnmpdef.c Tue Apr 6 19:25:58 2010 (r206285) @@ -59,7 +59,7 @@ struct tdef { SLIST_ENTRY(tdef) link; }; -static SLIST_HEAD(, tdef) tdefs = SLIST_HEAD_INITIALIZER(tdef); +static SLIST_HEAD(, tdef) tdefs = SLIST_HEAD_INITIALIZER(tdefs); static int do_typedef = 0; static void print_node(SmiNode *n, u_int level); Modified: user/jmallett/octeon/contrib/bsnmp/snmpd/config.c ============================================================================== --- user/jmallett/octeon/contrib/bsnmp/snmpd/config.c Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/contrib/bsnmp/snmpd/config.c Tue Apr 6 19:25:58 2010 (r206285) @@ -134,7 +134,7 @@ struct macro { LIST_ENTRY(macro) link; int perm; }; -static LIST_HEAD(, macro) macros = LIST_HEAD_INITIALIZER(¯os); +static LIST_HEAD(, macro) macros = LIST_HEAD_INITIALIZER(macros); enum { TOK_EOF = 0200, Modified: user/jmallett/octeon/contrib/top/utils.h ============================================================================== --- user/jmallett/octeon/contrib/top/utils.h Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/contrib/top/utils.h Tue Apr 6 19:25:58 2010 (r206285) @@ -21,4 +21,4 @@ long percentages(); char *errmsg(); char *format_time(); char *format_k(); -char *format_k2(); +char *format_k2(unsigned long long); Modified: user/jmallett/octeon/contrib/tzdata/asia ============================================================================== --- user/jmallett/octeon/contrib/tzdata/asia Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/contrib/tzdata/asia Tue Apr 6 19:25:58 2010 (r206285) @@ -1,4 +1,4 @@ -# @(#)asia 8.56 +# @(#)asia 8.58 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -214,42 +214,20 @@ Zone Asia/Bahrain 3:22:20 - LMT 1920 # # 2010 midnight. The decision came at a cabinet meeting at the Prime # Minister's Office last night..." -# From Danvin Ruangchan (2009-12-24): -# ...the news mentions DST will be turned off again 7 months after March -# 31st on Oct 31, 2010. - -# From Arthur David Olson (2009-12-26): -# Indeed, "The government will advance again the Banglasdesh Standard -# Time by one one hour on March 31 next year by enforcing the Daylight -# Saving Time (DST) for seven months. It will continue till October 31 -# until further notice." I take that last sentence as the -# establishment of a rule. - -# From Nobutomo Nakano (2010-02-19): -# We received a report from Bangladesh saying that the start/end of -# Bangladesh DST is incorrect. Currently we have only the Bengali version -# of the official mail from BTRC which describes the following: -# -# "From 2010 each year when local standard time is about to reach -# March 31 at 10:59:00 PM clocks are turned forward 1 hour (11:59:00 PM) -# and when local daylight time is about to October 31 at 11:59:00 PM -# clocks are turned backward 1 hour (10:59:00 PM)." -# -# So, DST will start/end 1 minute earlier. - -# From Arthur David Olson (2010-03-03): -# The file -# -# http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf +# From Alexander Krivenyshev (2010-03-22): +# According to Bangladesh newspaper "The Daily Star," +# Cabinet cancels Daylight Saving Time +# +# http://www.thedailystar.net/newDesign/latest_news.php?nid=22817 +# +# or +# +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh06.html # -# is in Bengali; it does contain two "31"s as well as two "11.59"s and a "10.59" -# which is consistent with the information provided by Nobutomo Nakano. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Dhaka 2009 only - Jun 19 23:00 1:00 S Rule Dhaka 2009 only - Dec 31 23:59 0 - -Rule Dhaka 2010 max - Mar 31 22:59 1:00 S -Rule Dhaka 2010 max - Oct 31 23:59 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 @@ -2129,6 +2107,32 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # http://www.worldtimezone.com/dst_news/dst_news_gazastrip02.html # +# From Alexander Krivenyshev (2010-03-19): +# According to Voice of Palestine DST will last for 191 days, from March +# 26, 2010 till "the last Sunday before the tenth day of Tishri +# (October), each year" (October 03, 2010?) +# +# +# http://palvoice.org/forums/showthread.php?t=245697 +# +# (in Arabic) +# or +# +# http://www.worldtimezone.com/dst_news/dst_news_westbank03.html +# + +# From Steffen Thorsen (2010-03-24): +# ...Ma'an News Agency reports that Hamas cabinet has decided it will +# start one day later, at 12:01am. Not sure if they really mean 12:01am or +# noon though: +# +# +# http://www.maannews.net/eng/ViewDetails.aspx?ID=271178 +# +# (Ma'an News Agency) +# "At 12:01am Friday, clocks in Israel and the West Bank will change to +# 1:01am, while Gaza clocks will change at 12:01am Saturday morning." + # The rules for Egypt are stolen from the `africa' file. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -2146,7 +2150,8 @@ Rule Palestine 2006 2008 - Apr 1 0:00 1 Rule Palestine 2006 only - Sep 22 0:00 0 - Rule Palestine 2007 only - Sep Thu>=8 2:00 0 - Rule Palestine 2008 only - Aug lastFri 2:00 0 - -Rule Palestine 2009 max - Mar lastFri 0:00 1:00 S +Rule Palestine 2009 only - Mar lastFri 0:00 1:00 S +Rule Palestine 2010 max - Mar lastSat 0:01 1:00 S Rule Palestine 2009 max - Sep Fri>=1 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Modified: user/jmallett/octeon/contrib/tzdata/europe ============================================================================== --- user/jmallett/octeon/contrib/tzdata/europe Tue Apr 6 19:20:31 2010 (r206284) +++ user/jmallett/octeon/contrib/tzdata/europe Tue Apr 6 19:25:58 2010 (r206285) @@ -1,5 +1,5 @@ #

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-user@FreeBSD.ORG  Wed Apr  7 01:11:35 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 79307106566C;
	Wed,  7 Apr 2010 01:11:35 +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 6713A8FC0A;
	Wed,  7 Apr 2010 01:11:35 +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 o371BZ4g041951;
	Wed, 7 Apr 2010 01:11:35 GMT (envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o371BZ9v041949;
	Wed, 7 Apr 2010 01:11:35 GMT (envelope-from jmallett@svn.freebsd.org)
Message-Id: <201004070111.o371BZ9v041949@svn.freebsd.org>
From: Juli Mallett 
Date: Wed, 7 Apr 2010 01:11:35 +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: r206333 - user/jmallett/octeon/lib/csu/mips
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: Wed, 07 Apr 2010 01:11:35 -0000

Author: jmallett
Date: Wed Apr  7 01:11:35 2010
New Revision: 206333
URL: http://svn.freebsd.org/changeset/base/206333

Log:
  Revert previous change.  After discussion with nathanw I understand that it is
  not necessary and was not the cause of the problems I was experiencing.

Modified:
  user/jmallett/octeon/lib/csu/mips/crt1.c

Modified: user/jmallett/octeon/lib/csu/mips/crt1.c
==============================================================================
--- user/jmallett/octeon/lib/csu/mips/crt1.c	Wed Apr  7 00:34:05 2010	(r206332)
+++ user/jmallett/octeon/lib/csu/mips/crt1.c	Wed Apr  7 01:11:35 2010	(r206333)
@@ -79,7 +79,7 @@ __start(char **ap,
 	char **argv;
 	char **env;
 
-	argc = * (int *) ap;
+	argc = * (long *) ap;
 	argv = ap + 1;
 	env  = ap + 2 + argc;
 	environ = env;

From owner-svn-src-user@FreeBSD.ORG  Wed Apr  7 01:48:37 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 D62A61065672;
	Wed,  7 Apr 2010 01:48:37 +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 C2FCE8FC0C;
	Wed,  7 Apr 2010 01:48:37 +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 o371mbWr050051;
	Wed, 7 Apr 2010 01:48:37 GMT (envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o371mbKp050042;
	Wed, 7 Apr 2010 01:48:37 GMT (envelope-from jmallett@svn.freebsd.org)
Message-Id: <201004070148.o371mbKp050042@svn.freebsd.org>
From: Juli Mallett 
Date: Wed, 7 Apr 2010 01:48:37 +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: r206334 - user/jmallett/octeon/lib/libc/mips/string
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: Wed, 07 Apr 2010 01:48:37 -0000

Author: jmallett
Date: Wed Apr  7 01:48:37 2010
New Revision: 206334
URL: http://svn.freebsd.org/changeset/base/206334

Log:
  Merge matt@NetBSD's PTRization of string functions and PTRize the ones that
  NetBSD doesn't seem to bother implementing in assembly anymore, at least not
  in common libc.

Modified:
  user/jmallett/octeon/lib/libc/mips/string/bcmp.S
  user/jmallett/octeon/lib/libc/mips/string/bcopy.S
  user/jmallett/octeon/lib/libc/mips/string/bzero.S
  user/jmallett/octeon/lib/libc/mips/string/ffs.S
  user/jmallett/octeon/lib/libc/mips/string/index.S
  user/jmallett/octeon/lib/libc/mips/string/rindex.S
  user/jmallett/octeon/lib/libc/mips/string/strcmp.S
  user/jmallett/octeon/lib/libc/mips/string/strlen.S

Modified: user/jmallett/octeon/lib/libc/mips/string/bcmp.S
==============================================================================
--- user/jmallett/octeon/lib/libc/mips/string/bcmp.S	Wed Apr  7 01:11:35 2010	(r206333)
+++ user/jmallett/octeon/lib/libc/mips/string/bcmp.S	Wed Apr  7 01:48:37 2010	(r206334)
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcmp.S,v 1.8 2003/08/07 16:42:16 agc Exp $	*/
+/*	$NetBSD: bcmp.S,v 1.9 2009/12/14 01:07:42 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,9 +35,15 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#define _LOCORE		/* XXX not really, just assembly-code source */
+#include 	/* LWLO/LWHI, SWLO/SWHI */
+
 #if defined(LIBC_SCCS) && !defined(lint)
+#if 0
 	ASMSTR("from: @(#)bcmp.s	8.1 (Berkeley) 6/4/93")
-	ASMSTR("$NetBSD: bcmp.S,v 1.8 2003/08/07 16:42:16 agc Exp $")
+#else
+	ASMSTR("$NetBSD: bcmp.S,v 1.9 2009/12/14 01:07:42 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef __ABICALLS__
@@ -49,86 +55,76 @@ __FBSDID("$FreeBSD$");
 
 LEAF(bcmp)
 	.set	noreorder
-	blt	a2, 16, small		# is it worth any trouble?
-	xor	v0, a0, a1		# compare low two bits of addresses
-	and	v0, v0, 3
-	subu	a3, zero, a1		# compute # bytes to word align address
-	bne	v0, zero, unaligned	# not possible to align addresses
-	and	a3, a3, 3
-
-	beq	a3, zero, 1f
-	subu	a2, a2, a3		# subtract from remaining count
-	move	v0, v1			# init v0,v1 so unmodified bytes match
-#ifdef __MIPSEB__
-	lwl	v0, 0(a0)		# read 1, 2, or 3 bytes
-	lwl	v1, 0(a1)
-#else
-	lwr	v0, 0(a0)		# read 1, 2, or 3 bytes
-	lwr	v1, 0(a1)
-#endif
-	addu	a1, a1, a3
-	bne	v0, v1, nomatch
-	addu	a0, a0, a3
+	blt		a2, 16, small	# is it worth any trouble?
+	xor		v0, a0, a1	# compare low two bits of addresses
+	and		v0, v0, 3
+	PTR_SUBU	a3, zero, a1	# compute # bytes to word align address
+	bne		v0, zero, unaligned # not possible to align addresses
+	and		a3, a3, 3
+
+	beq		a3, zero, 1f
+	PTR_SUBU	a2, a2, a3	# subtract from remaining count
+	move		v0, v1		# init v0,v1 so unmodified bytes match
+	LWHI		v0, 0(a0)	# read 1, 2, or 3 bytes
+	LWHI		v1, 0(a1)
+	PTR_ADDU	a1, a1, a3
+	bne		v0, v1, nomatch
+	PTR_ADDU	a0, a0, a3
 1:
-	and	a3, a2, ~3		# compute number of whole words left
-	subu	a2, a2, a3		#   which has to be >= (16-3) & ~3
-	addu	a3, a3, a0		# compute ending address
+	and		a3, a2, ~3	# compute number of whole words left
+	PTR_SUBU	a2, a2, a3	#   which has to be >= (16-3) & ~3
+	PTR_ADDU	a3, a3, a0	# compute ending address
 2:
-	lw	v0, 0(a0)		# compare words
-	lw	v1, 0(a1)
-	addu	a0, a0, 4
-	bne	v0, v1, nomatch
-	addu	a1, a1, 4
-	bne	a0, a3, 2b
+	lw		v0, 0(a0)	# compare words
+	lw		v1, 0(a1)
+	PTR_ADDU	a0, a0, 4
+	bne		v0, v1, nomatch
+	PTR_ADDU	a1, a1, 4
+	bne		a0, a3, 2b
 	nop
-	b	small			# finish remainder
+	b		small		# finish remainder
 	nop
 unaligned:
-	beq	a3, zero, 2f
-	subu	a2, a2, a3		# subtract from remaining count
-	addu	a3, a3, a0		# compute ending address
+	beq		a3, zero, 2f
+	PTR_SUBU	a2, a2, a3	# subtract from remaining count
+	PTR_ADDU	a3, a3, a0	# compute ending address
 1:
-	lbu	v0, 0(a0)		# compare bytes until a1 word aligned
-	lbu	v1, 0(a1)
-	addu	a0, a0, 1
-	bne	v0, v1, nomatch
-	addu	a1, a1, 1
-	bne	a0, a3, 1b
+	lbu		v0, 0(a0)	# compare bytes until a1 word aligned
+	lbu		v1, 0(a1)
+	PTR_ADDU	a0, a0, 1
+	bne		v0, v1, nomatch
+	PTR_ADDU	a1, a1, 1
+	bne		a0, a3, 1b
 	nop
 2:
-	and	a3, a2, ~3		# compute number of whole words left
-	subu	a2, a2, a3		#   which has to be >= (16-3) & ~3
-	addu	a3, a3, a0		# compute ending address
+	and		a3, a2, ~3	# compute number of whole words left
+	PTR_SUBU	a2, a2, a3	#   which has to be >= (16-3) & ~3
+	PTR_ADDU	a3, a3, a0	# compute ending address
 3:
-#ifdef __MIPSEB__
-	lwl	v0, 0(a0)		# compare words a0 unaligned, a1 aligned
-	lwr	v0, 3(a0)
-#else
-	lwr	v0, 0(a0)		# compare words a0 unaligned, a1 aligned
-	lwl	v0, 3(a0)
-#endif
-	lw	v1, 0(a1)
-	addu	a0, a0, 4
-	bne	v0, v1, nomatch
-	addu	a1, a1, 4
-	bne	a0, a3, 3b
+	LWHI		v0, 0(a0)	# compare words a0 unaligned, a1 aligned
+	LWLO		v0, 3(a0)
+	lw		v1, 0(a1)
+	PTR_ADDU	a0, a0, 4
+	bne		v0, v1, nomatch
+	PTR_ADDU	a1, a1, 4
+	bne		a0, a3, 3b
 	nop
 small:
-	ble	a2, zero, match
-	addu	a3, a2, a0		# compute ending address
+	ble		a2, zero, match
+	PTR_ADDU	a3, a2, a0		# compute ending address
 1:
-	lbu	v0, 0(a0)
-	lbu	v1, 0(a1)
-	addu	a0, a0, 1
-	bne	v0, v1, nomatch
-	addu	a1, a1, 1
-	bne	a0, a3, 1b
+	lbu		v0, 0(a0)
+	lbu		v1, 0(a1)
+	PTR_ADDU	a0, a0, 1
+	bne		v0, v1, nomatch
+	PTR_ADDU	a1, a1, 1
+	bne		a0, a3, 1b
 	nop
 match:
-	j	ra
-	move	v0, zero
+	j		ra
+	move		v0, zero
 nomatch:
-	j	ra
-	li	v0, 1
+	j		ra
+	li		v0, 1
 	.set	reorder
 END(bcmp)

Modified: user/jmallett/octeon/lib/libc/mips/string/bcopy.S
==============================================================================
--- user/jmallett/octeon/lib/libc/mips/string/bcopy.S	Wed Apr  7 01:11:35 2010	(r206333)
+++ user/jmallett/octeon/lib/libc/mips/string/bcopy.S	Wed Apr  7 01:48:37 2010	(r206334)
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcopy.S,v 1.2 2005/12/27 11:23:53 tsutsui Exp $	*/
+/*	$NetBSD: bcopy.S,v 1.3 2009/12/14 00:39:00 matt Exp $	*/
 
 /*
  * Mach Operating System
@@ -38,9 +38,15 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#define _LOCORE		/* XXX not really, just assembly-code source */
+#include 
+
 #if defined(LIBC_SCCS) && !defined(lint)
+#if 0
 	ASMSTR("from: @(#)mips_bcopy.s	2.2 CMU 18/06/93")
-	ASMSTR("$NetBSD: bcopy.S,v 1.2 2005/12/27 11:23:53 tsutsui Exp $")
+#else
+	ASMSTR("$NetBSD: bcopy.S,v 1.3 2009/12/14 00:39:00 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef __ABICALLS__
@@ -99,71 +105,72 @@ LEAF(FUNCTION)
 	 *	copy is alignable.  eg if src and dest are both
 	 *	on a halfword boundary.
 	 */
-	andi	t1,DSTREG,3		# get last 3 bits of dest
-	bne	t1,zero,3f
-	andi	t0,SRCREG,3		# get last 3 bits of src
-	bne	t0,zero,5f
+	andi		t1,DSTREG,(SZREG-1)	# get last bits of dest
+	bne		t1,zero,3f		# dest unaligned
+	andi		t0,SRCREG,(SZREG-1)	# get last bits of src
+	bne		t0,zero,5f
 
 	/*
-	 *	Forward aligned->aligned copy, 8*4 bytes at a time.
+	 *	Forward aligned->aligned copy, 8 words at a time.
 	 */
-	li	AT,-32
-	and	t0,SIZEREG,AT		# count truncated to multiple of 32 */
-	addu	a3,SRCREG,t0		# run fast loop up to this address
-	sltu	AT,SRCREG,a3		# any work to do?
-	beq	AT,zero,2f
-	subu	SIZEREG,t0
+98:
+	li		AT,-(SZREG*8)
+	and		t0,SIZEREG,AT		# count truncated to multiples
+	PTR_ADDU	a3,SRCREG,t0		# run fast loop up to this addr
+	sltu		AT,SRCREG,a3		# any work to do?
+	beq		AT,zero,2f
+	PTR_SUBU	SIZEREG,t0
 
 	/*
 	 *	loop body
 	 */
 1:	# cp
-	lw	t3,0(SRCREG)
-	lw	v1,4(SRCREG)
-	lw	t0,8(SRCREG)
-	lw	t1,12(SRCREG)
-	addu	SRCREG,32
-	sw	t3,0(DSTREG)
-	sw	v1,4(DSTREG)
-	sw	t0,8(DSTREG)
-	sw	t1,12(DSTREG)
-	lw	t1,-4(SRCREG)
-	lw	t0,-8(SRCREG)
-	lw	v1,-12(SRCREG)
-	lw	t3,-16(SRCREG)
-	addu	DSTREG,32
-	sw	t1,-4(DSTREG)
-	sw	t0,-8(DSTREG)
-	sw	v1,-12(DSTREG)
-	bne	SRCREG,a3,1b
-	sw	t3,-16(DSTREG)
+	REG_L		t3,(0*SZREG)(SRCREG)
+	REG_L		v1,(1*SZREG)(SRCREG)
+	REG_L		t0,(2*SZREG)(SRCREG)
+	REG_L		t1,(3*SZREG)(SRCREG)
+	PTR_ADDU	SRCREG,SZREG*8
+	REG_S		t3,(0*SZREG)(DSTREG)
+	REG_S		v1,(1*SZREG)(DSTREG)
+	REG_S		t0,(2*SZREG)(DSTREG)
+	REG_S		t1,(3*SZREG)(DSTREG)
+	REG_L		t1,(-1*SZREG)(SRCREG)
+	REG_L		t0,(-2*SZREG)(SRCREG)
+	REG_L		v1,(-3*SZREG)(SRCREG)
+	REG_L		t3,(-4*SZREG)(SRCREG)
+	PTR_ADDU	DSTREG,SZREG*8
+	REG_S		t1,(-1*SZREG)(DSTREG)
+	REG_S		t0,(-2*SZREG)(DSTREG)
+	REG_S		v1,(-3*SZREG)(DSTREG)
+	bne		SRCREG,a3,1b
+	REG_S		t3,(-4*SZREG)(DSTREG)
 
 	/*
 	 *	Copy a word at a time, no loop unrolling.
 	 */
 2:	# wordcopy
-	andi	t2,SIZEREG,3		# get byte count / 4
-	subu	t2,SIZEREG,t2		# t2 = number of words to copy * 4
-	beq	t2,zero,3f
-	addu	t0,SRCREG,t2		# stop at t0
-	subu	SIZEREG,SIZEREG,t2
+	andi		t2,SIZEREG,(SZREG-1)	# get byte count / SZREG
+	PTR_SUBU	t2,SIZEREG,t2		# t2 = words to copy * SZREG
+	beq		t2,zero,3f
+	PTR_ADDU	t0,SRCREG,t2		# stop at t0
+	PTR_SUBU	SIZEREG,SIZEREG,t2
 1:
-	lw	t3,0(SRCREG)
-	addu	SRCREG,4
-	sw	t3,0(DSTREG)
-	bne	SRCREG,t0,1b
-	addu	DSTREG,4
+	REG_L		t3,0(SRCREG)
+	PTR_ADDU	SRCREG,SZREG
+	REG_S		t3,0(DSTREG)
+	bne		SRCREG,t0,1b
+	PTR_ADDU	DSTREG,SZREG
 
 3:	# bytecopy
-	beq	SIZEREG,zero,4f	# nothing left to do?
+	beq		SIZEREG,zero,4f		# nothing left to do?
 	nop
 1:
-	lb	t3,0(SRCREG)
-	addu	SRCREG,1
-	sb	t3,0(DSTREG)
-	subu	SIZEREG,1
-	bgtz	SIZEREG,1b
-	addu	DSTREG,1
+	lb		t3,0(SRCREG)
+	PTR_ADDU	SRCREG,1
+	sb		t3,0(DSTREG)
+	PTR_SUBU	SIZEREG,1
+	bgtz		SIZEREG,1b
+	PTR_ADDU	DSTREG,1
 
 4:	# copydone
 	j	ra
@@ -173,96 +180,91 @@ LEAF(FUNCTION)
 	 *	Copy from unaligned source to aligned dest.
 	 */
 5:	# destaligned
-	andi	t0,SIZEREG,3		# t0 = bytecount mod 4
-	subu	a3,SIZEREG,t0		# number of words to transfer
-	beq	a3,zero,3b
+	andi		t0,SIZEREG,(SZREG-1)	# t0 = bytecount mod SZREG
+	PTR_SUBU	a3,SIZEREG,t0		# number of words to transfer
+	beq		a3,zero,3b
 	nop
-	move	SIZEREG,t0		# this many to do after we are done
-	addu	a3,SRCREG,a3		# stop point
+	move		SIZEREG,t0		# this many to do after we are done
+	PTR_ADDU	a3,SRCREG,a3		# stop point
 
 1:
-#ifdef __MIPSEB__
-	lwl	t3,0(SRCREG)
-	lwr	t3,3(SRCREG)
-#else
-	lwr	t3,0(SRCREG)
-	lwl	t3,3(SRCREG)
-#endif
-	addi	SRCREG,4
-	sw	t3,0(DSTREG)
-	bne	SRCREG,a3,1b
-	addi	DSTREG,4
+	REG_LHI		t3,0(SRCREG)
+	REG_LLO		t3,SZREG-1(SRCREG)
+	PTR_ADDI	SRCREG,SZREG
+	REG_S		t3,0(DSTREG)
+	bne		SRCREG,a3,1b
+	PTR_ADDI	DSTREG,SZREG
 
-	j	3b
+	b		3b
 	nop
 
 6:	# backcopy -- based on above
-	addu	SRCREG,SIZEREG
-	addu	DSTREG,SIZEREG
-	andi	t1,DSTREG,3		# get last 3 bits of dest
-	bne	t1,zero,3f
-	andi	t0,SRCREG,3		# get last 3 bits of src
-	bne	t0,zero,5f
+	PTR_ADDU	SRCREG,SIZEREG
+	PTR_ADDU	DSTREG,SIZEREG
+	andi		t1,DSTREG,SZREG-1	# get last 3 bits of dest
+	bne		t1,zero,3f
+	andi		t0,SRCREG,SZREG-1	# get last 3 bits of src
+	bne		t0,zero,5f
 
 	/*
 	 *	Forward aligned->aligned copy, 8*4 bytes at a time.
 	 */
-	li	AT,-32
-	and	t0,SIZEREG,AT		# count truncated to multiple of 32
-	beq	t0,zero,2f		# any work to do?
-	subu	SIZEREG,t0
-	subu	a3,SRCREG,t0
+	li		AT,(-8*SZREG)
+	and		t0,SIZEREG,AT		# count truncated to multiple of 32
+	beq		t0,zero,2f		# any work to do?
+	PTR_SUBU	SIZEREG,t0
+	PTR_SUBU	a3,SRCREG,t0
 
 	/*
 	 *	loop body
 	 */
 1:	# cp
-	lw	t3,-16(SRCREG)
-	lw	v1,-12(SRCREG)
-	lw	t0,-8(SRCREG)
-	lw	t1,-4(SRCREG)
-	subu	SRCREG,32
-	sw	t3,-16(DSTREG)
-	sw	v1,-12(DSTREG)
-	sw	t0,-8(DSTREG)
-	sw	t1,-4(DSTREG)
-	lw	t1,12(SRCREG)
-	lw	t0,8(SRCREG)
-	lw	v1,4(SRCREG)
-	lw	t3,0(SRCREG)
-	subu	DSTREG,32
-	sw	t1,12(DSTREG)
-	sw	t0,8(DSTREG)
-	sw	v1,4(DSTREG)
-	bne	SRCREG,a3,1b
-	sw	t3,0(DSTREG)
+	REG_L		t3,(-4*SZREG)(SRCREG)
+	REG_L		v1,(-3*SZREG)(SRCREG)
+	REG_L		t0,(-2*SZREG)(SRCREG)
+	REG_L		t1,(-1*SZREG)(SRCREG)
+	PTR_SUBU	SRCREG,8*SZREG
+	REG_S		t3,(-4*SZREG)(DSTREG)
+	REG_S		v1,(-3*SZREG)(DSTREG)
+	REG_S		t0,(-2*SZREG)(DSTREG)
+	REG_S		t1,(-1*SZREG)(DSTREG)
+	REG_L		t1,(3*SZREG)(SRCREG)
+	REG_L		t0,(2*SZREG)(SRCREG)
+	REG_L		v1,(1*SZREG)(SRCREG)
+	REG_L		t3,(0*SZREG)(SRCREG)
+	PTR_SUBU	DSTREG,8*SZREG
+	REG_S		t1,(3*SZREG)(DSTREG)
+	REG_S		t0,(2*SZREG)(DSTREG)
+	REG_S		v1,(1*SZREG)(DSTREG)
+	bne		SRCREG,a3,1b
+	REG_S		t3,(0*SZREG)(DSTREG)
 
 	/*
 	 *	Copy a word at a time, no loop unrolling.
 	 */
 2:	# wordcopy
-	andi	t2,SIZEREG,3		# get byte count / 4
-	subu	t2,SIZEREG,t2		# t2 = number of words to copy * 4
-	beq	t2,zero,3f
-	subu	t0,SRCREG,t2		# stop at t0
-	subu	SIZEREG,SIZEREG,t2
+	andi		t2,SIZEREG,SZREG-1	# get byte count / 4
+	PTR_SUBU	t2,SIZEREG,t2		# t2 = number of words to copy
+	beq		t2,zero,3f
+	PTR_SUBU	t0,SRCREG,t2		# stop at t0
+	PTR_SUBU	SIZEREG,SIZEREG,t2
 1:
-	lw	t3,-4(SRCREG)
-	subu	SRCREG,4
-	sw	t3,-4(DSTREG)
-	bne	SRCREG,t0,1b
-	subu	DSTREG,4
+	REG_L		t3,-SZREG(SRCREG)
+	PTR_SUBU	SRCREG,SZREG
+	REG_S		t3,-SZREG(DSTREG)
+	bne		SRCREG,t0,1b
+	PTR_SUBU	DSTREG,SZREG
 
 3:	# bytecopy
-	beq	SIZEREG,zero,4f		# nothing left to do?
+	beq		SIZEREG,zero,4f		# nothing left to do?
 	nop
 1:
-	lb	t3,-1(SRCREG)
-	subu	SRCREG,1
-	sb	t3,-1(DSTREG)
-	subu	SIZEREG,1
-	bgtz	SIZEREG,1b
-	subu	DSTREG,1
+	lb		t3,-1(SRCREG)
+	PTR_SUBU	SRCREG,1
+	sb		t3,-1(DSTREG)
+	PTR_SUBU	SIZEREG,1
+	bgtz		SIZEREG,1b
+	PTR_SUBU	DSTREG,1
 
 4:	# copydone
 	j	ra
@@ -272,27 +274,22 @@ LEAF(FUNCTION)
 	 *	Copy from unaligned source to aligned dest.
 	 */
 5:	# destaligned
-	andi	t0,SIZEREG,3		# t0 = bytecount mod 4
-	subu	a3,SIZEREG,t0		# number of words to transfer
-	beq	a3,zero,3b
+	andi		t0,SIZEREG,SZREG-1	# t0 = bytecount mod 4
+	PTR_SUBU	a3,SIZEREG,t0		# number of words to transfer
+	beq		a3,zero,3b
 	nop
-	move	SIZEREG,t0		# this many to do after we are done
-	subu	a3,SRCREG,a3		# stop point
+	move		SIZEREG,t0		# this many to do after we are done
+	PTR_SUBU	a3,SRCREG,a3		# stop point
 
 1:
-#ifdef __MIPSEB__
-	lwl	t3,-4(SRCREG)
-	lwr	t3,-1(SRCREG)
-#else
-	lwr	t3,-4(SRCREG)
-	lwl	t3,-1(SRCREG)
-#endif
-	subu	SRCREG,4
-	sw	t3,-4(DSTREG)
-	bne	SRCREG,a3,1b
-	subu	DSTREG,4
+	REG_LHI		t3,-SZREG(SRCREG)
+	REG_LLO		t3,-1(SRCREG)
+	PTR_SUBU	SRCREG,SZREG
+	REG_S		t3,-SZREG(DSTREG)
+	bne		SRCREG,a3,1b
+	PTR_SUBU	DSTREG,SZREG
 
-	j	3b
+	b		3b
 	nop
 
 	.set	reorder

Modified: user/jmallett/octeon/lib/libc/mips/string/bzero.S
==============================================================================
--- user/jmallett/octeon/lib/libc/mips/string/bzero.S	Wed Apr  7 01:11:35 2010	(r206333)
+++ user/jmallett/octeon/lib/libc/mips/string/bzero.S	Wed Apr  7 01:48:37 2010	(r206334)
@@ -1,4 +1,4 @@
-/*	$NetBSD: bzero.S,v 1.8 2003/08/07 16:42:16 agc Exp $	*/
+/*	$NetBSD: bzero.S,v 1.10 2009/12/14 02:53:52 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -36,10 +36,15 @@
 __FBSDID("$FreeBSD$");
 
 #if defined(LIBC_SCCS) && !defined(lint)
+#if 0
 	ASMSTR("from: @(#)bzero.s	8.1 (Berkeley) 6/4/93")
-	ASMSTR("$NetBSD: bzero.S,v 1.8 2003/08/07 16:42:16 agc Exp $")
+#else
+	ASMSTR("$NetBSD: bzero.S,v 1.10 2009/12/14 02:53:52 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
+#define _LOCORE		/* XXX not really, just assembly-code source */
+#include 
 
 #ifdef __ABICALLS__
 	.abicalls
@@ -49,34 +54,48 @@ __FBSDID("$FreeBSD$");
 
 LEAF(bzero)
 	.set	noreorder
-	blt	a1, 12, smallclr	# small amount to clear?
-	subu	a3, zero, a0		# compute # bytes to word align address
-	and	a3, a3, 3
-	beq	a3, zero, 1f		# skip if word aligned
-	subu	a1, a1, a3		# subtract from remaining count
-#ifdef __MIPSEB__
-	swl	zero, 0(a0)		# clear 1, 2, or 3 bytes to align
-#else
-	swr	zero, 0(a0)		# clear 1, 2, or 3 bytes to align
+	blt		a1, 3*SZREG, smallclr # small amount to clear?
+	PTR_SUBU	a3, zero, a0	# compute # bytes to word align address
+	and		a3, a3, SZREG-1
+	beq		a3, zero, 1f	# skip if word aligned
+#if SZREG == 4
+	PTR_SUBU	a1, a1, a3	# subtract from remaining count
+	SWHI		zero, 0(a0)	# clear 1, 2, or 3 bytes to align
+	PTR_ADDU	a0, a0, a3
+#endif
+#if SZREG == 8
+	PTR_SUBU	a1, a1, a3	# subtract from remaining count
+	PTR_ADDU	a0, a0, a3	# align dst to next word
+	sll		a3, a3, 3	# bits to bytes
+	li		a2, -1		# make a mask
+#if _BYTE_ORDER == _BIG_ENDIAN
+	REG_SRLV	a2, a2, a3	# we want to keep the MSB bytes
+#endif
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+	REG_SLLV	a2, a2, a3	# we want to keep the LSB bytes
+#endif
+	nor		a2, zero, a2	# complement the mask
+	REG_L		v0, -SZREG(a0)	# load the word to partially clear
+	and		v0, v0, a2	# clear the bytes
+	REG_S		v0, -SZREG(a0)	# store it back
 #endif
-	addu	a0, a0, a3
 1:
-	and	v0, a1, 3		# compute number of words left
-	subu	a3, a1, v0
-	move	a1, v0
-	addu	a3, a3, a0		# compute ending address
+	and		v0, a1, SZREG-1	# compute number of words left
+	PTR_SUBU	a3, a1, v0
+	move		a1, v0
+	PTR_ADDU	a3, a3, a0	# compute ending address
 2:
-	addu	a0, a0, 4		# clear words
-	bne	a0, a3, 2b		#   unrolling loop doesnt help
-	sw	zero, -4(a0)		#   since we are limited by memory speed
+	PTR_ADDU	a0, a0, SZREG	# clear words
+	bne		a0, a3, 2b	#  unrolling loop doesnt help
+	REG_S		zero, -SZREG(a0) # since we are limited by memory speed
 smallclr:
-	ble	a1, zero, 2f
-	addu	a3, a1, a0		# compute ending address
+	ble		a1, zero, 2f
+	PTR_ADDU	a3, a1, a0	# compute ending address
 1:
-	addu	a0, a0, 1		# clear bytes
-	bne	a0, a3, 1b
-	sb	zero, -1(a0)
+	PTR_ADDU	a0, a0, 1	# clear bytes
+	bne		a0, a3, 1b
+	sb		zero, -1(a0)
 2:
-	j	ra
+	j		ra
 	nop
 END(bzero)

Modified: user/jmallett/octeon/lib/libc/mips/string/ffs.S
==============================================================================
--- user/jmallett/octeon/lib/libc/mips/string/ffs.S	Wed Apr  7 01:11:35 2010	(r206333)
+++ user/jmallett/octeon/lib/libc/mips/string/ffs.S	Wed Apr  7 01:48:37 2010	(r206334)
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs.S,v 1.1 2005/12/20 19:28:49 christos Exp $	*/
+/*	$NetBSD: ffs.S,v 1.2 2009/12/14 00:39:00 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
 
 #if defined(LIBC_SCCS) && !defined(lint)
 	ASMSTR("from: @(#)ffs.s	8.1 (Berkeley) 6/4/93")
-	ASMSTR("$NetBSD: ffs.S,v 1.1 2005/12/20 19:28:49 christos Exp $")
+	ASMSTR("$NetBSD: ffs.S,v 1.2 2009/12/14 00:39:00 matt Exp $")
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef __ABICALLS__

Modified: user/jmallett/octeon/lib/libc/mips/string/index.S
==============================================================================
--- user/jmallett/octeon/lib/libc/mips/string/index.S	Wed Apr  7 01:11:35 2010	(r206333)
+++ user/jmallett/octeon/lib/libc/mips/string/index.S	Wed Apr  7 01:48:37 2010	(r206334)
@@ -46,14 +46,14 @@ __FBSDID("$FreeBSD$");
 
 LEAF(index)
 1:
-	lbu	a2, 0(a0)		# get a byte
-	addu	a0, a0, 1
-	beq	a2, a1, fnd
-	bne	a2, zero, 1b
+	lbu		a2, 0(a0)		# get a byte
+	PTR_ADDU	a0, a0, 1
+	beq		a2, a1, fnd
+	bne		a2, zero, 1b
 notfnd:
-	move	v0, zero
-	j	ra
+	move		v0, zero
+	j		ra
 fnd:
-	subu	v0, a0, 1
-	j	ra
+	PTR_SUBU	v0, a0, 1
+	j		ra
 END(index)

Modified: user/jmallett/octeon/lib/libc/mips/string/rindex.S
==============================================================================
--- user/jmallett/octeon/lib/libc/mips/string/rindex.S	Wed Apr  7 01:11:35 2010	(r206333)
+++ user/jmallett/octeon/lib/libc/mips/string/rindex.S	Wed Apr  7 01:48:37 2010	(r206334)
@@ -45,13 +45,13 @@ __FBSDID("$FreeBSD$");
 #endif
 
 LEAF(rindex)
-	move	v0, zero		# default if not found
+	move		v0, zero		# default if not found
 1:
-	lbu	a3, 0(a0)		# get a byte
-	addu	a0, a0, 1
-	bne	a3, a1, 2f
-	subu	v0, a0, 1		# save address of last match
+	lbu		a3, 0(a0)		# get a byte
+	PTR_ADDU	a0, a0, 1
+	bne		a3, a1, 2f
+	PTR_SUBU	v0, a0, 1		# save address of last match
 2:
-	bne	a3, zero, 1b		# continue if not end
-	j	ra
+	bne		a3, zero, 1b		# continue if not end
+	j		ra
 END(rindex)

Modified: user/jmallett/octeon/lib/libc/mips/string/strcmp.S
==============================================================================
--- user/jmallett/octeon/lib/libc/mips/string/strcmp.S	Wed Apr  7 01:11:35 2010	(r206333)
+++ user/jmallett/octeon/lib/libc/mips/string/strcmp.S	Wed Apr  7 01:48:37 2010	(r206334)
@@ -1,4 +1,4 @@
-/*	$NetBSD: strcmp.S,v 1.1 2005/12/20 19:28:50 christos Exp $	*/
+/*	$NetBSD: strcmp.S,v 1.2 2009/12/14 00:39:00 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
 
 #if defined(LIBC_SCCS) && !defined(lint)
 	ASMSTR("from: @(#)strcmp.s	8.1 (Berkeley) 6/4/93")
-	ASMSTR("$NetBSD: strcmp.S,v 1.1 2005/12/20 19:28:50 christos Exp $")
+	ASMSTR("$NetBSD: strcmp.S,v 1.2 2009/12/14 00:39:00 matt Exp $")
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef __ABICALLS__
@@ -55,9 +55,9 @@ LEAF(strcmp)
 	bne	t0, t1, NotEq
 	lbu	t0, 1(a0)		# unroll loop
 	lbu	t1, 1(a1)
-	add	a0, a0, 2
+	PTR_ADD	a0, a0, 2
 	beq	t0, zero, LessOrEq	# end of first string?
-	add	a1, a1, 2
+	PTR_ADD	a1, a1, 2
 	beq	t0, t1, 1b
 NotEq:
 	subu	v0, t0, t1

Modified: user/jmallett/octeon/lib/libc/mips/string/strlen.S
==============================================================================
--- user/jmallett/octeon/lib/libc/mips/string/strlen.S	Wed Apr  7 01:11:35 2010	(r206333)
+++ user/jmallett/octeon/lib/libc/mips/string/strlen.S	Wed Apr  7 01:48:37 2010	(r206334)
@@ -1,4 +1,4 @@
-/*	$NetBSD: strlen.S,v 1.1 2005/12/20 19:28:50 christos Exp $	*/
+/*	$NetBSD: strlen.S,v 1.2 2009/12/14 00:39:00 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
 
 #if defined(LIBC_SCCS) && !defined(lint)
 	ASMSTR("from: @(#)strlen.s	8.1 (Berkeley) 6/4/93")
-	ASMSTR("$NetBSD: strlen.S,v 1.1 2005/12/20 19:28:50 christos Exp $")
+	ASMSTR("$NetBSD: strlen.S,v 1.2 2009/12/14 00:39:00 matt Exp $")
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef __ABICALLS__
@@ -45,11 +45,11 @@ __FBSDID("$FreeBSD$");
 #endif
 
 LEAF(strlen)
-	addu	v1, a0, 1
+	PTR_ADDU	v1, a0, 1
 1:
-	lb	v0, 0(a0)		# get byte from string
-	addu	a0, a0, 1		# increment pointer
-	bne	v0, zero, 1b		# continue if not end
-	subu	v0, a0, v1		# compute length - 1 for '\0' char
-	j	ra
+	lb		v0, 0(a0)	# get byte from string
+	PTR_ADDU	a0, a0, 1	# increment pointer
+	bne		v0, zero, 1b	# continue if not end
+	PTR_SUBU 	v0, a0, v1	# compute length - 1 for '\0' char
+	j		ra
 END(strlen)

From owner-svn-src-user@FreeBSD.ORG  Wed Apr  7 01:53:01 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 45739106564A;
	Wed,  7 Apr 2010 01:53:01 +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 33E0A8FC1A;
	Wed,  7 Apr 2010 01:53:01 +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 o371r1Zq051063;
	Wed, 7 Apr 2010 01:53:01 GMT (envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o371r1ZP051061;
	Wed, 7 Apr 2010 01:53:01 GMT (envelope-from jmallett@svn.freebsd.org)
Message-Id: <201004070153.o371r1ZP051061@svn.freebsd.org>
From: Juli Mallett 
Date: Wed, 7 Apr 2010 01:53:01 +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: r206335 - 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: Wed, 07 Apr 2010 01:53:01 -0000

Author: jmallett
Date: Wed Apr  7 01:53:00 2010
New Revision: 206335
URL: http://svn.freebsd.org/changeset/base/206335

Log:
  Merge NetBSD 's helpful macros for unaligned
  accesses.

Modified:
  user/jmallett/octeon/sys/mips/include/asm.h

Modified: user/jmallett/octeon/sys/mips/include/asm.h
==============================================================================
--- user/jmallett/octeon/sys/mips/include/asm.h	Wed Apr  7 01:48:37 2010	(r206334)
+++ user/jmallett/octeon/sys/mips/include/asm.h	Wed Apr  7 01:53:00 2010	(r206335)
@@ -98,21 +98,43 @@
 
 #define	_C_LABEL(x)	x
 
-/* 
- *  Endian-independent assembly-code aliases for unaligned memory accesses.
+/*
+ *   Endian-independent assembly-code aliases for unaligned memory accesses.
  */
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define	LWLO	lwl
-#define	LWHI	lwr
-#define	SWLO	swl
-#define	SWHI	swr
-#endif
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define	LWLO	lwr
-#define	LWHI	lwl
-#define	SWLO	swr
-#define	SWHI	swl
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+# define LWHI lwr
+# define LWLO lwl
+# define SWHI swr
+# define SWLO swl
+# if SZREG == 4
+#  define REG_LHI   lwr
+#  define REG_LLO   lwl
+#  define REG_SHI   swr
+#  define REG_SLO   swl
+# else
+#  define REG_LHI   ldr
+#  define REG_LLO   ldl
+#  define REG_SHI   sdr
+#  define REG_SLO   sdl
+# endif
+#endif
+
+#if _BYTE_ORDER == _BIG_ENDIAN
+# define LWHI lwl
+# define LWLO lwr
+# define SWHI swl
+# define SWLO swr
+# if SZREG == 4
+#  define REG_LHI   lwl
+#  define REG_LLO   lwr
+#  define REG_SHI   swl
+#  define REG_SLO   swr
+# else
+#  define REG_LHI   ldl
+#  define REG_LLO   ldr
+#  define REG_SHI   sdl
+#  define REG_SLO   sdr
+# endif
 #endif
 
 #ifdef USE_AENT

From owner-svn-src-user@FreeBSD.ORG  Wed Apr  7 04:51:19 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 8F4041065672;
	Wed,  7 Apr 2010 04:51:19 +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 7AA5C8FC15;
	Wed,  7 Apr 2010 04:51:19 +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 o374pJBi090482;
	Wed, 7 Apr 2010 04:51:19 GMT (envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o374pJvr090480;
	Wed, 7 Apr 2010 04:51:19 GMT (envelope-from jmallett@svn.freebsd.org)
Message-Id: <201004070451.o374pJvr090480@svn.freebsd.org>
From: Juli Mallett 
Date: Wed, 7 Apr 2010 04:51:19 +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: r206338 - in user/jmallett/octeon:
	libexec/rtld-elf/mips 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: Wed, 07 Apr 2010 04:51:19 -0000

Author: jmallett
Date: Wed Apr  7 04:51:19 2010
New Revision: 206338
URL: http://svn.freebsd.org/changeset/base/206338

Log:
  o) Fix unaligned macros in .
  o) Do function calls in rtld via t9 for clarity.

Modified:
  user/jmallett/octeon/libexec/rtld-elf/mips/rtld_start.S
  user/jmallett/octeon/sys/mips/include/asm.h

Modified: user/jmallett/octeon/libexec/rtld-elf/mips/rtld_start.S
==============================================================================
--- user/jmallett/octeon/libexec/rtld-elf/mips/rtld_start.S	Wed Apr  7 02:25:36 2010	(r206337)
+++ user/jmallett/octeon/libexec/rtld-elf/mips/rtld_start.S	Wed Apr  7 04:51:19 2010	(r206338)
@@ -68,7 +68,8 @@ LEAF(rtld_start)
 	move	a0, s0			/* sp */
 	PTR_ADDU a1, sp, 2*PTR_SIZE	/* &our atexit function */
 	PTR_ADDU a2, sp, 3*PTR_SIZE	/* obj_main entry */
-	jal	_C_LABEL(_rtld)		/* v0 = _rtld(sp, cleanup, objp) */
+	PTR_LA	t9, _C_LABEL(_rtld)
+	jalr	t9			/* v0 = _rtld(sp, cleanup, objp) */
 	 nop
 
 	PTR_L	a1, 2*PTR_SIZE(sp)	/* our atexit function */
@@ -123,7 +124,7 @@ _rtld_bind_start:
 	move	s0, sp
 
 	move	a0, v1			/* old GP */
-	subu	a0, a0, 0x7ff0		/* The offset of $gp from the	*/
+	PTR_SUBU	a0, a0, 0x7ff0		/* The offset of $gp from the	*/
        					/* beginning of the .got section: */
 					/* $gp = .got + 0x7ff0, so	*/
 					/* .got = $gp - 0x7ff0		*/
@@ -136,7 +137,8 @@ _rtld_bind_start:
 	and	a0, a0, 0x7fffffff
 	move	a1, t8			/* symbol index */
 
-	jal	_C_LABEL(_mips_rtld_bind)
+	PTR_LA	t9, _C_LABEL(_mips_rtld_bind)
+	jalr	t9
 	 nop
 
 	move	sp, s0

Modified: user/jmallett/octeon/sys/mips/include/asm.h
==============================================================================
--- user/jmallett/octeon/sys/mips/include/asm.h	Wed Apr  7 02:25:36 2010	(r206337)
+++ user/jmallett/octeon/sys/mips/include/asm.h	Wed Apr  7 04:51:19 2010	(r206338)
@@ -98,45 +98,6 @@
 
 #define	_C_LABEL(x)	x
 
-/*
- *   Endian-independent assembly-code aliases for unaligned memory accesses.
- */
-#if _BYTE_ORDER == _LITTLE_ENDIAN
-# define LWHI lwr
-# define LWLO lwl
-# define SWHI swr
-# define SWLO swl
-# if SZREG == 4
-#  define REG_LHI   lwr
-#  define REG_LLO   lwl
-#  define REG_SHI   swr
-#  define REG_SLO   swl
-# else
-#  define REG_LHI   ldr
-#  define REG_LLO   ldl
-#  define REG_SHI   sdr
-#  define REG_SLO   sdl
-# endif
-#endif
-
-#if _BYTE_ORDER == _BIG_ENDIAN
-# define LWHI lwl
-# define LWLO lwr
-# define SWHI swl
-# define SWLO swr
-# if SZREG == 4
-#  define REG_LHI   lwl
-#  define REG_LLO   lwr
-#  define REG_SHI   swl
-#  define REG_SLO   swr
-# else
-#  define REG_LHI   ldl
-#  define REG_LLO   ldr
-#  define REG_SHI   sdl
-#  define REG_SLO   sdr
-# endif
-#endif
-
 #ifdef USE_AENT
 #define	AENT(x)		\
 	.aent	x, 0
@@ -409,6 +370,45 @@ _C_LABEL(x):
 #define	CALLFRAME_RA	(CALLFRAME_SIZ - 1 * SZREG)
 
 /*
+ *   Endian-independent assembly-code aliases for unaligned memory accesses.
+ */
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+# define LWHI lwr
+# define LWLO lwl
+# define SWHI swr
+# define SWLO swl
+# if SZREG == 4
+#  define REG_LHI   lwr
+#  define REG_LLO   lwl
+#  define REG_SHI   swr
+#  define REG_SLO   swl
+# else
+#  define REG_LHI   ldr
+#  define REG_LLO   ldl
+#  define REG_SHI   sdr
+#  define REG_SLO   sdl
+# endif
+#endif
+
+#if _BYTE_ORDER == _BIG_ENDIAN
+# define LWHI lwl
+# define LWLO lwr
+# define SWHI swl
+# define SWLO swr
+# if SZREG == 4
+#  define REG_LHI   lwl
+#  define REG_LLO   lwr
+#  define REG_SHI   swl
+#  define REG_SLO   swr
+# else
+#  define REG_LHI   ldl
+#  define REG_LLO   ldr
+#  define REG_SHI   sdl
+#  define REG_SLO   sdr
+# endif
+#endif
+
+/*
  * While it would be nice to be compatible with the SGI
  * REG_L and REG_S macros, because they do not take parameters, it
  * is impossible to use them with the _MIPS_SIM_ABIX32 model.

From owner-svn-src-user@FreeBSD.ORG  Wed Apr  7 13:21:52 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 EE17E106564A;
	Wed,  7 Apr 2010 13:21:52 +0000 (UTC)
	(envelope-from luigi@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C361C8FC1C;
	Wed,  7 Apr 2010 13:21:52 +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 o37DLqjD006628;
	Wed, 7 Apr 2010 13:21:52 GMT (envelope-from luigi@svn.freebsd.org)
Received: (from luigi@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37DLqZi006627;
	Wed, 7 Apr 2010 13:21:52 GMT (envelope-from luigi@svn.freebsd.org)
Message-Id: <201004071321.o37DLqZi006627@svn.freebsd.org>
From: Luigi Rizzo 
Date: Wed, 7 Apr 2010 13:21:52 +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: r206343 - user/luigi/ipfw3-r8
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: Wed, 07 Apr 2010 13:21:53 -0000

Author: luigi
Date: Wed Apr  7 13:21:52 2010
New Revision: 206343
URL: http://svn.freebsd.org/changeset/base/206343

Log:
  code merged to RELENG_8

Deleted:
  user/luigi/ipfw3-r8/

From owner-svn-src-user@FreeBSD.ORG  Thu Apr  8 06:42:20 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 38BAF106566B;
	Thu,  8 Apr 2010 06:42:20 +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 0DA288FC08;
	Thu,  8 Apr 2010 06:42:20 +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 o386gJBw040699;
	Thu, 8 Apr 2010 06:42:19 GMT (envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o386gJSR040697;
	Thu, 8 Apr 2010 06:42:19 GMT (envelope-from jmallett@svn.freebsd.org)
Message-Id: <201004080642.o386gJSR040697@svn.freebsd.org>
From: Juli Mallett 
Date: Thu, 8 Apr 2010 06:42:19 +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: r206391 - user/jmallett/octeon/sys/mips/mips
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: Thu, 08 Apr 2010 06:42:20 -0000

Author: jmallett
Date: Thu Apr  8 06:42:19 2010
New Revision: 206391
URL: http://svn.freebsd.org/changeset/base/206391

Log:
  o) Print pointers in vm_fault tracing more nicely.
  o) Add a SYSCALL_TRACING mode which shows more human-readable syscall traces.
     XXX It'd be nice to just modify the ktrace hooks to have truss-like output
         to the kernel console if some option is set.
  o) When logging a bad page fault, log the PDE and PTE of the bad address as
     well as the pc at exception time.

Modified:
  user/jmallett/octeon/sys/mips/mips/trap.c

Modified: user/jmallett/octeon/sys/mips/mips/trap.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/trap.c	Thu Apr  8 00:55:08 2010	(r206390)
+++ user/jmallett/octeon/sys/mips/mips/trap.c	Thu Apr  8 06:42:19 2010	(r206391)
@@ -525,9 +525,9 @@ dofault:
 			--p->p_lock;
 			PROC_UNLOCK(p);
 #ifdef VMFAULT_TRACE
-			printf("vm_fault(%p (pmap %p), %x (%x), %x, %d) -> %x at pc %x\n",
-			    map, &vm->vm_pmap, va, trapframe->badvaddr, ftype, VM_FAULT_NORMAL,
-			    rv, trapframe->pc);
+			printf("vm_fault(%p (pmap %p), %p (%p), %x, %d) -> %x at pc %p\n",
+			    map, &vm->vm_pmap, (void *)va, (void *)(intptr_t)trapframe->badvaddr,
+			    ftype, VM_FAULT_NORMAL, rv, (void *)(intptr_t)trapframe->pc);
 #endif
 
 			if (rv == KERN_SUCCESS) {
@@ -729,6 +729,13 @@ dofault:
 				printf("args[%d] = %#jx\n", i, (intmax_t)args[i]);
 			}
 #endif
+#ifdef SYSCALL_TRACING
+			printf("%s(", syscallnames[code]);
+			for (i = 0; i < nargs; i++) {
+				printf("%s%#jx", i == 0 ? "" : ", ", (intmax_t)args[i]);
+			}
+			printf(")\n");
+#endif
 #ifdef KTRACE
 			if (KTRPOINT(td, KTR_SYSCALL))
 				ktrsyscall(code, nargs, args);
@@ -1414,7 +1421,10 @@ log_bad_page_fault(char *msg, struct tra
 		log(LOG_ERR, "pc address %#jx is inaccessible, pde = %p, pte = %#x\n",
 		    (intmax_t)pc, (void *)(intptr_t)*pdep, ptep ? *ptep : 0);
 	}
-	/*	panic("Bad trap");*/
+
+	get_mapping_info((vm_offset_t)frame->badvaddr, &pdep, &ptep);
+	log(LOG_ERR, "Page table info for bad address %#jx: pde = %p, pte = %#x\n",
+	    (intmax_t)frame->badvaddr, (void *)(intptr_t)*pdep, ptep ? *ptep : 0);
 }
 
 

From owner-svn-src-user@FreeBSD.ORG  Thu Apr  8 06:48:20 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 DB4B0106566C;
	Thu,  8 Apr 2010 06:48:20 +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 CAABB8FC0A;
	Thu,  8 Apr 2010 06:48:20 +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 o386mKE3042062;
	Thu, 8 Apr 2010 06:48:20 GMT (envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o386mKnr042060;
	Thu, 8 Apr 2010 06:48:20 GMT (envelope-from jmallett@svn.freebsd.org)
Message-Id: <201004080648.o386mKnr042060@svn.freebsd.org>
From: Juli Mallett 
Date: Thu, 8 Apr 2010 06:48:20 +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: r206392 - user/jmallett/octeon/sys/mips/mips
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: Thu, 08 Apr 2010 06:48:20 -0000

Author: jmallett
Date: Thu Apr  8 06:48:20 2010
New Revision: 206392
URL: http://svn.freebsd.org/changeset/base/206392

Log:
  Hide quad syscall calling convention behind __mips_o32.

Modified:
  user/jmallett/octeon/sys/mips/mips/vm_machdep.c

Modified: user/jmallett/octeon/sys/mips/mips/vm_machdep.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/vm_machdep.c	Thu Apr  8 06:42:19 2010	(r206391)
+++ user/jmallett/octeon/sys/mips/mips/vm_machdep.c	Thu Apr  8 06:48:20 2010	(r206392)
@@ -265,19 +265,29 @@ cpu_set_syscall_retval(struct thread *td
 {
 	struct trapframe *locr0 = td->td_frame;
 	unsigned int code;
+#if defined(__mips_o32)
 	int quad_syscall;
+#endif
 
 	code = locr0->v0;
+#if defined(__mips_o32)
 	quad_syscall = 0;
+#endif
+
 	if (code == SYS_syscall)
 		code = locr0->a0;
 	else if (code == SYS___syscall) {
+#if defined(__mips_o32)
 		code = _QUAD_LOWWORD ? locr0->a1 : locr0->a0;
 		quad_syscall = 1;
+#else
+		code = locr0->a0;
+#endif
 	}
 
 	switch (error) {
 	case 0:
+#if defined(__mips_o32)
 		if (quad_syscall && code != SYS_lseek) {
 			/*
 			 * System call invoked through the
@@ -290,10 +300,13 @@ cpu_set_syscall_retval(struct thread *td
 				locr0->v1 = td->td_retval[0];
 			locr0->a3 = 0;
 		} else {
+#endif
 			locr0->v0 = td->td_retval[0];
 			locr0->v1 = td->td_retval[1];
 			locr0->a3 = 0;
+#if defined(__mips_o32)
 		}
+#endif
 		break;
 
 	case ERESTART:
@@ -304,15 +317,19 @@ cpu_set_syscall_retval(struct thread *td
 		break;	/* nothing to do */
 
 	default:
+#if defined(__mips_o32)
 		if (quad_syscall && code != SYS_lseek) {
 			locr0->v0 = error;
 			if (_QUAD_LOWWORD)
 				locr0->v1 = error;
 			locr0->a3 = 1;
 		} else {
+#endif
 			locr0->v0 = error;
 			locr0->a3 = 1;
+#if defined(__mips_o32)
 		}
+#endif
 	}
 }
 

From owner-svn-src-user@FreeBSD.ORG  Thu Apr  8 15:14:01 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 DCCE2106568C
	for ; Thu,  8 Apr 2010 15:14:01 +0000 (UTC)
	(envelope-from nwhitehorn@freebsd.org)
Received: from agogare.doit.wisc.edu (agogare.doit.wisc.edu [144.92.197.211])
	by mx1.freebsd.org (Postfix) with ESMTP id B156D8FC23
	for ; Thu,  8 Apr 2010 15:14:01 +0000 (UTC)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; CHARSET=US-ASCII; format=flowed
Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by
	smtpauth2.wiscmail.wisc.edu
	(Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30
	2009)) id <0L0K00702A7BIX00@smtpauth2.wiscmail.wisc.edu>; Thu,
	08 Apr 2010 09:13:59 -0500 (CDT)
Received: from comporellon.tachypleus.net
	(adsl-99-135-74-201.dsl.mdsnwi.sbcglobal.net [99.135.74.201])
	by smtpauth2.wiscmail.wisc.edu
	(Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30
	2009))
	with ESMTPSA id <0L0K00G33A7A6750@smtpauth2.wiscmail.wisc.edu>; Thu,
	08 Apr 2010 09:13:59 -0500 (CDT)
Date: Thu, 08 Apr 2010 09:13:57 -0500
From: Nathan Whitehorn 
In-reply-to: <201004080648.o386mKnr042060@svn.freebsd.org>
To: Juli Mallett 
Message-id: <4BBDE4A5.8090604@freebsd.org>
X-Spam-Report: AuthenticatedSender=yes, SenderIP=99.135.74.201
X-Spam-PmxInfo: Server=avs-13, Version=5.5.5.374460,
	Antispam-Engine: 2.7.1.369594, Antispam-Data: 2010.4.8.140344,
	SenderIP=99.135.74.201
References: <201004080648.o386mKnr042060@svn.freebsd.org>
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9)
	Gecko/20100407 Thunderbird/3.0.4
Cc: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: Re: svn commit: r206392 - user/jmallett/octeon/sys/mips/mips
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: Thu, 08 Apr 2010 15:14:01 -0000

On 04/08/10 01:48, Juli Mallett wrote:
> Author: jmallett
> Date: Thu Apr  8 06:48:20 2010
> New Revision: 206392
> URL: http://svn.freebsd.org/changeset/base/206392
>
> Log:
>    Hide quad syscall calling convention behind __mips_o32.
>
> Modified:
>    user/jmallett/octeon/sys/mips/mips/vm_machdep.c
>
> Modified: user/jmallett/octeon/sys/mips/mips/vm_machdep.c
> ==============================================================================
> --- user/jmallett/octeon/sys/mips/mips/vm_machdep.c	Thu Apr  8 06:42:19 2010	(r206391)
> +++ user/jmallett/octeon/sys/mips/mips/vm_machdep.c	Thu Apr  8 06:48:20 2010	(r206392)
> @@ -265,19 +265,29 @@ cpu_set_syscall_retval(struct thread *td
>   {
>   	struct trapframe *locr0 = td->td_frame;
>   	unsigned int code;
> +#if defined(__mips_o32)
>   	int quad_syscall;
> +#endif
>    
What about 32-bit O32 compatibility? For PPC64, I wrapped this kind of 
code in if  (p->p_sysent->sv_flags & SV_ILP32).
-Nathan

From owner-svn-src-user@FreeBSD.ORG  Thu Apr  8 21:27:52 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 123B9106566B;
	Thu,  8 Apr 2010 21:27:52 +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 9057D8FC14;
	Thu,  8 Apr 2010 21:27:51 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o38LGheI051992;
	Thu, 8 Apr 2010 15:16:43 -0600 (MDT) (envelope-from imp@bsdimp.com)
Date: Thu, 08 Apr 2010 15:16:46 -0600 (MDT)
Message-Id: <20100408.151646.884721755803198764.imp@bsdimp.com>
To: nwhitehorn@FreeBSD.org
From: "M. Warner Losh" 
In-Reply-To: <4BBDE4A5.8090604@freebsd.org>
References: <201004080648.o386mKnr042060@svn.freebsd.org>
	<4BBDE4A5.8090604@freebsd.org>
X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: jmallett@FreeBSD.org, src-committers@FreeBSD.org, svn-src-user@FreeBSD.org
Subject: Re: svn commit: r206392 - user/jmallett/octeon/sys/mips/mips
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: Thu, 08 Apr 2010 21:27:52 -0000

In message: <4BBDE4A5.8090604@freebsd.org>
            Nathan Whitehorn  writes:
: On 04/08/10 01:48, Juli Mallett wrote:
: > Author: jmallett
: > Date: Thu Apr  8 06:48:20 2010
: > New Revision: 206392
: > URL: http://svn.freebsd.org/changeset/base/206392
: >
: > Log:
: >    Hide quad syscall calling convention behind __mips_o32.
: >
: > Modified:
: >    user/jmallett/octeon/sys/mips/mips/vm_machdep.c
: >
: > Modified: user/jmallett/octeon/sys/mips/mips/vm_machdep.c
: > ==============================================================================
: > --- user/jmallett/octeon/sys/mips/mips/vm_machdep.c Thu Apr 8 06:42:19
: > --- 2010 (r206391)
: > +++ user/jmallett/octeon/sys/mips/mips/vm_machdep.c Thu Apr 8 06:48:20
: > 2010 (r206392)
: > @@ -265,19 +265,29 @@ cpu_set_syscall_retval(struct thread *td
: >   {
: >   	struct trapframe *locr0 = td->td_frame;
: >   	unsigned int code;
: > +#if defined(__mips_o32)
: >   	int quad_syscall;
: > +#endif
: >    
: What about 32-bit O32 compatibility? For PPC64, I wrapped this kind of
: code in if (p->p_sysent->sv_flags & SV_ILP32).

Right now I don't think we support running binaries that are a
different ABI than the kernel ABI.  Long term, we'll need to do that.

Warner

From owner-svn-src-user@FreeBSD.ORG  Sat Apr 10 01:49:40 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 9452C1065676;
	Sat, 10 Apr 2010 01:49:40 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 83E628FC19;
	Sat, 10 Apr 2010 01:49:40 +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 o3A1neFG033992;
	Sat, 10 Apr 2010 01:49:40 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3A1neKQ033990;
	Sat, 10 Apr 2010 01:49:40 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201004100149.o3A1neKQ033990@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 10 Apr 2010 01:49:40 +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: r206438 - user/dougb/portmaster
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, 10 Apr 2010 01:49:40 -0000

Author: dougb
Date: Sat Apr 10 01:49:40 2010
New Revision: 206438
URL: http://svn.freebsd.org/changeset/base/206438

Log:
  Slight tweaks to usage()
  
  Redirect stderr to /dev/null for stat of a non-existent INDEX file
  
  If the user has -B and -g at the same time, initialize the
  PACKAGES directory
  
  Add a find_glob_dirs() function so that I can avoid having to repeat
  the same code in so many different places.
   * Handle the problem of different parts of the code using the information
     slightly differently with a combination of a global variable and multiple
     return codes
   * Use this new function in the old places where the code was duplicated:
     the main parser, multiport(), and the -r option
   * Add support for globs using this function to -o, and -e
  
  For the -o option, add -DDISABLE_CONFLICTS

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Fri Apr  9 23:15:37 2010	(r206437)
+++ user/dougb/portmaster/portmaster	Sat Apr 10 01:49:40 2010	(r206438)
@@ -249,7 +249,7 @@ usage () {
 	echo ''
 	echo 'Usage:'
 	echo "Common flags: [--force-config] [-CGHKgntvw B|b f|i D|d]"
-	echo "    [[--packages|--packages-only] [-P|-PP] | [--packages-build]]"
+	echo "    [[[--packages|-P]|[--packages-only|-PP]] | [--packages-build]]"
 	echo "    [--packages-if-newer] [--delete-build-only] [--always-fetch]"
 	echo "    [--local-packagedir=] [--delete-packages]"
 	echo "    [--no-confirm] [--no-term-title] [--index|--index-only]"
@@ -271,7 +271,7 @@ usage () {
 	echo ''
 	echo "${0##*/} -[l|L]"
 	echo ''
-	echo "${0##*/} [-b D|d] -e "
+	echo "${0##*/} [-b D|d] -e "
 	echo "${0##*/} [-b D|d] -s"
 	echo ''
 	echo "${0##*/} [--force-config] [-aftv] -F"
@@ -319,6 +319,7 @@ usage () {
 	echo '-o replace the installed port with a port from a different origin'
 	echo '[-R] -r rebuild port, and all ports that depend on it'
 	echo '-R used with -[rf] to skip ports updated on a previous run'
+	echo ''
 	echo '-a check all ports, update as necessary'
 	echo ''
 	echo '--delete-build-only delete ports that are build-only dependencies'
@@ -485,7 +486,7 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then
 		fi
 
 		PM_INDEX="${INDEXDIR}/${INDEXFILE}"
-		index_time=`stat -f '%Ua' $PM_INDEX`
+		index_time=`stat -f '%Ua' $PM_INDEX 2>/dev/null`
 		pm_sv Updating INDEX file
 		$PM_SU_CMD $FETCHINDEX ${PM_INDEX}.bz2 ${MASTER_SITE_INDEX}${INDEXFILE}.bz2
 		if [ $index_time -ne `stat -f '%Ua' $PM_INDEX` ]; then
@@ -850,6 +851,32 @@ delete_empty_dist_subdirs () {
 	find -d $distdir -type d \( -empty -and ! -path \*\.zfs/\* \) -delete
 }
 
+# Takes a pattern as input
+# Return values:
+# 0 - Matched one and only one directory in $pdb
+# 1 - No match
+# 2 - Matched multiple directories
+#
+find_glob_dirs () {
+	# Global: glob_dirs
+	local pattern
+
+	pattern=`globstrip $1`
+echo "Debug> pattern: $pattern"
+
+	glob_dirs=`find $pdb -maxdepth 1 -type d -name ${pattern}\*`
+echo "Debug> glob_dirs: $glob_dirs"
+	case "$glob_dirs" in
+	# Match a newline in multiple responses from find
+	*'
+'*)		return 2 ;;
+	$pdb/*)	return ;;
+	esac
+
+	unset glob_dirs
+	return 1
+}
+
 #=============== End functions relevant to --features and main ===============
 #=============== Begin code relevant only to --features ===============
 
@@ -1036,15 +1063,11 @@ while getopts 'BCDFGHKLPRabde:fghilm:nop
 		if [ -d "$pdb/$OPTARG" ]; then
 			glob_dirs=$OPTARG
 		else
-			port=`globstrip $OPTARG`
-			glob_dirs=`find $pdb -maxdepth 1 -type d -name ${port}\*`
-			case "$glob_dirs" in
-			*\*|'') fail "$pdb/$port does not exist" ;;
-			# Match a newline in multiple responses from find
-			*'
-'*)				fail 'The argument to -r must match only one port' ;;
+			find_glob_dirs $OPTARG
+			case $? in
+			1)	fail "$pdb/$OPTARG does not exist" ;;
+			2)	fail 'The argument to -r must match only one port' ;;
 			esac
-			unset port
 		fi
 		portdir=`origin_from_pdb ${glob_dirs##*/}` ; unset glob_dirs ;;
 	s)	CLEAN_STALE=sopt ;;
@@ -1662,7 +1685,14 @@ if [ -n "$LIST" -o -n "$LIST_PLUS" ]; th
 fi
 
 if [ -n "$EXPUNGE" ]; then
-	[ -d "$pdb/$EXPUNGE" ] || fail "No such directory/port: $pdb/$EXPUNGE"
+	if [ ! -d "$pdb/$EXPUNGE" ]; then
+		if find_glob_dirs $EXPUNGE; then
+			EXPUNGE=${glob_dirs#$pdb/}
+			unset glob_dirs
+		else
+			fail "No such directory/port: $pdb/$EXPUNGE"
+		fi
+	fi
 
 	origin=`origin_from_pdb $EXPUNGE`
 	deplist=`grep -l DEPORIGIN:$origin$ $pdb/*/+CONTENTS`
@@ -2263,16 +2293,15 @@ multiport () {
 		*)	if [ -d "$pdb/$port" ]; then
 				worklist_temp="$worklist_temp $port"
 			else
-				# Keep synched with code in MAIN
-				local glob_dirs dir
-				port=`globstrip $port`
-		glob_dirs=`find $pdb -maxdepth 1 -type d -name ${port}\*`
-				case "$glob_dirs" in
-				*\*|'') fail "$pdb/$port does not exist" ;;
-				*)	for dir in $glob_dirs; do
-				worklist_temp="$worklist_temp ${dir#$pdb/}"
-					done ;;
+				find_glob_dirs $port
+				case $? in
+				1)	fail "$pdb/$port does not exist" ;;
+				*)	local dir
+					for dir in $glob_dirs; do
+					worklist_temp="$worklist_temp ${dir#$pdb/}"
+					done;;
 				esac
+				unset glob_dirs
 			fi ;;
 		esac
 	done
@@ -2415,8 +2444,16 @@ if [ "$$" -eq "$PM_PARENT_PID" -a -z "$S
 		fi
 	fi
 
-	[ -n "$NO_BACKUP" -a -z "$MAKE_PACKAGE" ] || init_packages
+	[ -z "$NO_BACKUP" ] && init_packages
 	[ -z "$NO_BACKUP" -a -z "$BACKUP" ] && export NB_DELETE
+	if [ -n "$MAKE_PACKAGE" ]; then
+		init_packages_var
+
+		if [ ! -d "$PACKAGES" ]; then
+			pm_sv Creating $PACKAGES
+			pm_mkdir_s $PACKAGES
+		fi
+	fi
 
 	# Set the file name here so it's visible to the children
 	if [ -z "$DONT_SCRUB_DISTFILES" -a -z "$FETCH_ONLY" \
@@ -2556,40 +2593,47 @@ if [ -z "$REPLACE_ORIGIN" ]; then
 	esac
 
 	if [ -z "$portdir" -a -z "$upg_port" ]; then
-		# Keep synched with code in multiport()
-		glob_dirs=`find $pdb -maxdepth 1 -type d -name ${argv}\*`
-		case "$glob_dirs" in
-		*\*|'')	echo '' ; no_valid_port ;;
-		# Match a newline in multiple responses from find
-		*'
-'*)			multiport $glob_dirs ;;
-		$pdb/*)	upg_port=${glob_dirs#$pdb/} ;;
-		*)	echo '' ; no_valid_port ;;
+		find_glob_dirs $argv
+		case $? in
+		1)	echo '' ; no_valid_port ;;
+		2)	multiport $glob_dirs ;;
+		0)	upg_port=${glob_dirs#$pdb/} ;;
 		esac
+		unset glob_dirs
 	fi
 else
 	portdir="${1#$pd/}" ; portdir="${portdir%/}"
 	[ -d "$pd/$portdir" ] || { echo ''
-		echo "===>>> The first argument must be a directory in $pd"
+		echo "===>>> The first argument to -o must be a directory in $pd"
 		echo '' ; no_valid_port; }
-	upg_port=${2#$pdb/} ; upg_port="${upg_port%/}"
-	if [ -d "$pdb/$upg_port" ]; then
-		ro_opd=`origin_from_pdb $upg_port`	# Old port directory
-	else
-		ro_opd=${upg_port#$pd/}			# Portupgrade syntax
-		upg_port=`iport_from_origin $ro_opd`
-		if [ -z "$upg_port" -o ! -d "$pdb/$upg_port" ]; then
-			if grep -ql "DEPORIGIN:$ro_opd$" $pdb/*/+CONTENTS; then
-				unset upg_port
+
+	arg2=${2#$pd/} ; arg2=${arg2#$pdb/} ; arg2=${arg2%/}
+
+	case "$arg2" in
+	*/*)	ro_opd=$arg2 ; upg_port=`iport_from_origin $ro_opd` ;;
+	*)	if [ -d "$pdb/$arg2" ]; then
+			upg_port=$arg2
+		else
+			find_glob_dirs $arg2 && upg_port=${glob_dirs#$pdb/}
+			unset glob_dirs
+		fi
+		[ -n "$upg_port" ] && ro_opd=`origin_from_pdb $upg_port`
+	esac
+	unset arg2
+
+	if [ -z "$upg_port" ]; then
+		if grep -ql "DEPORIGIN:$ro_opd$" $pdb/*/+CONTENTS; then
+			unset upg_port
 			PM_MAKE_ARGS="-DFORCE_PKG_REGISTER $PM_MAKE_ARGS"
-			else
-				echo ''
-			echo "===>>> The second argument can be a port in $pdb,"
-				echo "       or a port directory from $pd"
-				echo '' ; no_valid_port
-			fi
+		else
+			echo ''
+			echo "===>>> The second argument to -o can be a port in $pdb,"
+			echo "       or a port directory from $pd"
+			echo '' ; no_valid_port
 		fi
 	fi
+
+	PM_MAKE_ARGS="-DDISABLE_CONFLICTS $PM_MAKE_ARGS"
 fi
 
 if [ -n "$upg_port" -a -z "$REPLACE_ORIGIN" ]; then

From owner-svn-src-user@FreeBSD.ORG  Sat Apr 10 02:11:01 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 511CA1065670;
	Sat, 10 Apr 2010 02:11:01 +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 40F2F8FC0A;
	Sat, 10 Apr 2010 02:11:01 +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 o3A2B1Cd039032;
	Sat, 10 Apr 2010 02:11:01 GMT
	(envelope-from jmallett@svn.freebsd.org)
Received: (from jmallett@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3A2B1ZQ039025;
	Sat, 10 Apr 2010 02:11:01 GMT
	(envelope-from jmallett@svn.freebsd.org)
Message-Id: <201004100211.o3A2B1ZQ039025@svn.freebsd.org>
From: Juli Mallett 
Date: Sat, 10 Apr 2010 02:11:01 +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: r206439 - in user/jmallett/octeon/sys: conf
	mips/include mips/mips
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, 10 Apr 2010 02:11:01 -0000

Author: jmallett
Date: Sat Apr 10 02:11:00 2010
New Revision: 206439
URL: http://svn.freebsd.org/changeset/base/206439

Log:
  o) Destroy pmap locks correctly.
  o) Remove another unused file.
  o) Adjust freebsd32 sysvec to be more correct.
  o) Define the top of the user stack as being a page below the max user
     address.  Because of problems related to USRSTACK (by way of PS_STRINGS)
     being compiled into binaries, page sizes will probably be going back to
     4k in this branch in the near future, meaning this macro will return to
     its original value.
  o) Use PTR_S for what's really a SIZE_T_S instead of sw.
  o) Correct segtab shifting in trap.  XXX trap really shouldn't be doing this
     by hand.

Deleted:
  user/jmallett/octeon/sys/mips/mips/copystr.S
Modified:
  user/jmallett/octeon/sys/conf/files.mips
  user/jmallett/octeon/sys/mips/include/vmparam.h
  user/jmallett/octeon/sys/mips/mips/freebsd32_machdep.c
  user/jmallett/octeon/sys/mips/mips/pmap.c
  user/jmallett/octeon/sys/mips/mips/support.S
  user/jmallett/octeon/sys/mips/mips/trap.c

Modified: user/jmallett/octeon/sys/conf/files.mips
==============================================================================
--- user/jmallett/octeon/sys/conf/files.mips	Sat Apr 10 01:49:40 2010	(r206438)
+++ user/jmallett/octeon/sys/conf/files.mips	Sat Apr 10 02:11:00 2010	(r206439)
@@ -50,7 +50,6 @@ mips/mips/bus_space_generic.c 	standard
 mips/mips/busdma_machdep.c 	standard
 mips/mips/cache.c		standard
 mips/mips/cache_mipsNN.c	standard
-#mips/mips/copystr.S		standard
 mips/mips/db_disasm.c		optional	ddb
 mips/mips/db_interface.c	optional	ddb
 mips/mips/db_trace.c		optional	ddb

Modified: user/jmallett/octeon/sys/mips/include/vmparam.h
==============================================================================
--- user/jmallett/octeon/sys/mips/include/vmparam.h	Sat Apr 10 01:49:40 2010	(r206438)
+++ user/jmallett/octeon/sys/mips/include/vmparam.h	Sat Apr 10 02:11:00 2010	(r206439)
@@ -60,9 +60,9 @@
  * and some QED CPUs perform some virtual address checks before the
  * offset is calculated.
  */
-#define	USRSTACK	0x7fffe000	/* Start of user stack */
+#define	USRSTACK	(VM_MAXUSER_ADDRESS - PAGE_SIZE)	/* Start of user stack */
 #if defined(COMPAT_FREEBSD32)
-#define	FREEBSD32_USRSTACK	USRSTACK
+#define	FREEBSD32_USRSTACK	(0x80000000 - PAGE_SIZE)
 #endif
 
 /*

Modified: user/jmallett/octeon/sys/mips/mips/freebsd32_machdep.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/freebsd32_machdep.c	Sat Apr 10 01:49:40 2010	(r206438)
+++ user/jmallett/octeon/sys/mips/mips/freebsd32_machdep.c	Sat Apr 10 02:11:00 2010	(r206439)
@@ -61,7 +61,7 @@ __FBSDID("$FreeBSD: user/jmallett/octeon
  */
 struct sysentvec elf32_freebsd_sysvec = {
 	.sv_size	= SYS_MAXSYSCALL,
-	.sv_table	= sysent,
+	.sv_table	= freebsd32_sysent,
 	.sv_mask	= 0,
 	.sv_sigsize	= 0,
 	.sv_sigtbl	= NULL,
@@ -79,11 +79,11 @@ struct sysentvec elf32_freebsd_sysvec = 
 	.sv_minsigstksz	= MINSIGSTKSZ,
 	.sv_pagesize	= PAGE_SIZE,
 	.sv_minuser	= VM_MIN_ADDRESS,
-	.sv_maxuser	= VM_MAXUSER_ADDRESS,
+	.sv_maxuser	= (vm_offset_t)0x80000000,
 	.sv_usrstack	= FREEBSD32_USRSTACK,
-	.sv_psstrings	= PS_STRINGS,
+	.sv_psstrings	= FREEBSD32_USRSTACK - sizeof(struct ps_strings),
 	.sv_stackprot	= VM_PROT_ALL,
-	.sv_copyout_strings = exec_copyout_strings,
+	.sv_copyout_strings = freebsd32_copyout_strings,
 	.sv_setregs	= exec_setregs,
 	.sv_fixlimit	= NULL,
 	.sv_maxssiz	= NULL,

Modified: user/jmallett/octeon/sys/mips/mips/pmap.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/pmap.c	Sat Apr 10 01:49:40 2010	(r206438)
+++ user/jmallett/octeon/sys/mips/mips/pmap.c	Sat Apr 10 02:11:00 2010	(r206439)
@@ -1263,6 +1263,7 @@ pmap_release(pmap_t pmap)
 	ptdpg->wire_count--;
 	atomic_subtract_int(&cnt.v_wire_count, 1);
 	vm_page_free_zero(ptdpg);
+	PMAP_LOCK_DESTROY(pmap);
 }
 
 /*

Modified: user/jmallett/octeon/sys/mips/mips/support.S
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/support.S	Sat Apr 10 01:49:40 2010	(r206438)
+++ user/jmallett/octeon/sys/mips/mips/support.S	Sat Apr 10 02:11:00 2010	(r206439)
@@ -159,7 +159,7 @@ LEAF(copystr)
 2:
 	beq		a3, zero, 3f		# return num. of copied bytes
 	PTR_SUBU	a2, t0, a2		# if the 4th arg was non-NULL
-	sw		a2, 0(a3)
+	PTR_S		a2, 0(a3)
 3:
 	j		ra			# v0 is 0 or ENAMETOOLONG
 	nop

Modified: user/jmallett/octeon/sys/mips/mips/trap.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/trap.c	Sat Apr 10 01:49:40 2010	(r206438)
+++ user/jmallett/octeon/sys/mips/mips/trap.c	Sat Apr 10 02:11:00 2010	(r206439)
@@ -1304,7 +1304,7 @@ get_mapping_info(vm_offset_t va, pd_entr
 	pd_entry_t *pdep;
 	struct proc *p = curproc;
 
-	pdep = (&(p->p_vmspace->vm_pmap.pm_segtab[(uint32_t)va >> SEGSHIFT]));
+	pdep = (&(p->p_vmspace->vm_pmap.pm_segtab[(va >> SEGSHIFT) & (NPDEPG - 1)]));
 	if (*pdep)
 		ptep = pmap_pte(&p->p_vmspace->vm_pmap, va);
 	else

From owner-svn-src-user@FreeBSD.ORG  Sat Apr 10 04:00:16 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 90A71106566C;
	Sat, 10 Apr 2010 04:00:16 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 766D58FC18;
	Sat, 10 Apr 2010 04:00:16 +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 o3A40G03065168;
	Sat, 10 Apr 2010 04:00:16 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3A40GXk065167;
	Sat, 10 Apr 2010 04:00:16 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201004100400.o3A40GXk065167@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 10 Apr 2010 04:00:16 +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: r206440 - user/dougb/portmaster
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, 10 Apr 2010 04:00:16 -0000

Author: dougb
Date: Sat Apr 10 04:00:16 2010
New Revision: 206440
URL: http://svn.freebsd.org/changeset/base/206440

Log:
  Improve markup slightly for --packages options
  
  Document --index and --index-only
  
  Reflect that -e now takes a glob
  
  Add a note about the nature of glob patterns

Modified:
  user/dougb/portmaster/portmaster.8

Modified: user/dougb/portmaster/portmaster.8
==============================================================================
--- user/dougb/portmaster/portmaster.8	Sat Apr 10 02:11:00 2010	(r206439)
+++ user/dougb/portmaster/portmaster.8	Sat Apr 10 04:00:16 2010	(r206440)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 28, 2010
+.Dd April 9, 2010
 .Dt PORTMASTER 8
 .Os
 .Sh NAME
@@ -33,7 +33,7 @@
 .Sh SYNOPSIS
 Common Flags:
 .Op Fl -force-config CGHgntvw [B|b] [f|i] [D|d]
-.Op [--packages|--packages-only] [-P|-PP] | [--packages-build]
+.Op [[--packages|-P]|[--packages-only|-PP]] | [--packages-build]
 .Op Fl -packages-if-newer
 .Op Fl -delete-build-only
 .Op Fl -always-fetch
@@ -41,6 +41,7 @@ Common Flags:
 .Op Fl -delete-packages
 .Op Fl -no-confirm
 .Op Fl -no-term-title
+.Op --index|--index-only
 .Op Fl m Ar arguments for make
 .Op Fl x Ar glob pattern to exclude from building
 .Nm
@@ -101,8 +102,7 @@ and/or multiple globs from /var/db/pkg
 .Fl [l|L]
 .Nm
 .Op Fl b [D|d]
-.Fl e Ar full name of port directory in
-.Pa /var/db/pkg
+.Fl e Ar name/glob of port directory in /var/db/pkg
 .Nm
 .Op Fl b [D|d]
 .Fl s
@@ -121,6 +121,16 @@ and/or multiple globs from /var/db/pkg
 .Fl h|--help
 .Nm
 .Fl -version
+.Pp
+The
+.Qq glob
+patterns mentioned above are not regular expressions.
+For example:
+.Qq portmaster perl
+would match every port dirctory name in
+.Pa /var/db/pkg
+that fits the pattern
+.Qq /var/db/pkg/perl* .
 .Sh QUICK START GUIDE
 This manual contains a lot of valuable information about
 .Nm ,
@@ -367,7 +377,7 @@ show what dependent ports are, and are n
 .Fl t ) .
 .It Fl o Ar  
 replace the installed port with a port from a different origin
-.It [-R] Fl r Ar name/glob of port in /var/db/pkg
+.It [-R] Fl r Ar name/glob of port directory in /var/db/pkg
 rebuild the specified port, and all ports that depend on it
 .It Fl R
 used with the
@@ -422,11 +432,21 @@ do not ask the user to confirm the list 
 be installed and/or updated before proceeding
 .It Fl -no-term-title
 do not update the xterm title bar
+.It Fl -index
+use INDEX-[6-9] to check if a port is out of date
+.It Fl -index-only
+do not try to use
+.Pa /usr/ports .
+For updating ports when no
+.Pa /usr/ports
+directory is present the
+.Fl PP|--packages-only
+option is required.
 .It Fl l
 list all installed ports by category
 .It Fl L
 list all installed ports by category, and search for updates
-.It Fl e Ar name of port directory in /var/db/pkg
+.It Fl e Ar name/glob of port directory in /var/db/pkg
 expunge port using
 .Xr pkg_delete 1 ,
 and optionally remove all distfiles.
@@ -620,6 +640,13 @@ along with their related options.
 #
 # Do not update the xterm title bar (--no-term-title)
 # PM_NO_TERM_TITLE=pm_no_term_title
+#
+# Use the INDEX file to check if a port is out of date (--index)
+# PM_INDEX=pm_index
+#
+# Use the INDEX file instead of /usr/ports (--index-only)
+# PM_INDEX=pm_index
+# PM_INDEX_ONLY=pm_index_only
 .Ed
 .Pp
 .It Pa /var/db/pkg/*/+IGNOREME

From owner-svn-src-user@FreeBSD.ORG  Sat Apr 10 04:44:45 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 F0454106564A;
	Sat, 10 Apr 2010 04:44:45 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 74DB08FC0C;
	Sat, 10 Apr 2010 04:44:45 +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 o3A4ijuH075388;
	Sat, 10 Apr 2010 04:44:45 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3A4ijuW075386;
	Sat, 10 Apr 2010 04:44:45 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201004100444.o3A4ijuW075386@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 10 Apr 2010 04:44:45 +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: r206441 - user/dougb/portmaster
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, 10 Apr 2010 04:44:46 -0000

Author: dougb
Date: Sat Apr 10 04:44:45 2010
New Revision: 206441
URL: http://svn.freebsd.org/changeset/base/206441

Log:
  Update for version 2.21: Document necessary environment variables

Modified:
  user/dougb/portmaster/portmaster.8

Modified: user/dougb/portmaster/portmaster.8
==============================================================================
--- user/dougb/portmaster/portmaster.8	Sat Apr 10 04:00:16 2010	(r206440)
+++ user/dougb/portmaster/portmaster.8	Sat Apr 10 04:44:45 2010	(r206441)
@@ -442,6 +442,8 @@ For updating ports when no
 directory is present the
 .Fl PP|--packages-only
 option is required.
+See the ENVIRONMENT section below for additional
+requirements.
 .It Fl l
 list all installed ports by category
 .It Fl L
@@ -540,6 +542,21 @@ and
 variables
 are set to the full package name string and version
 of the existing package being replaced, if any.
+.Pp
+When using the
+.Fl -index-only
+option the
+.Ev PACKAGES
+and
+.Ev INDEXDIR
+variables must each be set to a dirctory where the
+superuser has write permissions.
+Other useful variables include:
+.Bd -literal
+MASTER_SITE_INDEX	(default http://www.FreeBSD.org/ports/)
+FETCHINDEX		(default fetch -am -o)
+INDEXFILE		(default auto per FreeBSD version)
+.Ed
 .Sh FILES
 .Bl -tag -width "1234" -compact
 .It Pa /usr/local/etc/portmaster.rc

From owner-svn-src-user@FreeBSD.ORG  Sat Apr 10 04:47:11 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 69B051065674;
	Sat, 10 Apr 2010 04:47:11 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4EB6E8FC08;
	Sat, 10 Apr 2010 04:47:11 +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 o3A4lBIe075957;
	Sat, 10 Apr 2010 04:47:11 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3A4lBnw075955;
	Sat, 10 Apr 2010 04:47:11 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201004100447.o3A4lBnw075955@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 10 Apr 2010 04:47:11 +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: r206442 - user/dougb/portmaster
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, 10 Apr 2010 04:47:11 -0000

Author: dougb
Date: Sat Apr 10 04:47:11 2010
New Revision: 206442
URL: http://svn.freebsd.org/changeset/base/206442

Log:
  Minor tweaks for release version 2.21:
  
  Minor updates to usage()
  
  Change SUDO to SU in pm_sv() to be more generic
  
  Remove debugging and XXX's
  
  Direct stderr for the other stat to /dev/null too
  
  Couple of whitespace tweaks to avoid diffs to ports version

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Sat Apr 10 04:44:45 2010	(r206441)
+++ user/dougb/portmaster/portmaster	Sat Apr 10 04:47:11 2010	(r206442)
@@ -308,10 +308,12 @@ usage () {
 	echo "-m "
 	echo "-x "
 	echo '   Can be specified more than once'
+	echo ''
 	echo '--no-confirm do not ask user to confirm list of ports to be'
 	echo '   installed and/or updated before proceeding'
 	echo '--no-term-title do not update the xterm title bar'
-	echo "--index use $pd/INDEX-[6-9] to check if a port is out of date"
+	echo ''
+	echo '--index use INDEX-[6-9] to check if a port is out of date'
 	echo '--index-only do not try to use /usr/ports'
 	echo ''
 	echo '--show-work list what ports are and would be installed'
@@ -387,7 +389,7 @@ pm_rm_s           () { $PM_SU_CMD /bin/r
 pm_rmdir_s        () { $PM_SU_CMD /bin/rmdir $*; }
 pm_unlink_s       () { /bin/test -e $1 && $PM_SU_CMD /bin/unlink $1; }
 
-pm_sv             () { [ -n "$PM_SU_VERBOSE" ] && echo "===>>> SUDO $*"; }
+pm_sv             () { [ -n "$PM_SU_VERBOSE" ] && echo "===>>> SU $*"; }
 
 #=============== End functions we always want to have ===============
 
@@ -457,9 +459,6 @@ done
 # Do this here so it can use the fancy functions above, and default values
 # can be overridden in the rc files
 if [ "$$" -eq "$PM_PARENT_PID" ]; then
-
-# XXX
-
 	if [ -n "$PM_INDEX" ]; then
 		[ -d "$pd" ] && pm_cd_pd
 		if [ -z "$FETCHINDEX" ]; then
@@ -489,7 +488,7 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then
 		index_time=`stat -f '%Ua' $PM_INDEX 2>/dev/null`
 		pm_sv Updating INDEX file
 		$PM_SU_CMD $FETCHINDEX ${PM_INDEX}.bz2 ${MASTER_SITE_INDEX}${INDEXFILE}.bz2
-		if [ $index_time -ne `stat -f '%Ua' $PM_INDEX` ]; then
+		if [ $index_time -ne `stat -f '%Ua' $PM_INDEX 2>/dev/null` ]; then
 			temp_index=`pm_mktemp index`
 			bunzip2 < ${PM_INDEX}.bz2 > $temp_index
 			pm_install_s $temp_index $PM_INDEX
@@ -862,10 +861,8 @@ find_glob_dirs () {
 	local pattern
 
 	pattern=`globstrip $1`
-echo "Debug> pattern: $pattern"
 
 	glob_dirs=`find $pdb -maxdepth 1 -type d -name ${pattern}\*`
-echo "Debug> glob_dirs: $glob_dirs"
 	case "$glob_dirs" in
 	# Match a newline in multiple responses from find
 	*'
@@ -1145,8 +1142,6 @@ check_state () {
 	return 0
 }
 
-# XXX
-
 parse_index () {
 	local pd line
 
@@ -1213,11 +1208,9 @@ check_for_updates () {
 		fi
 		return 0
 	fi
-# XXX
 
 	if [ -n "$PM_INDEX" ]; then
 		port_ver=`parse_index $origin name`
-
 		check_pkg_version $iport $port_ver || { do_update=update_index ; }
 	fi
 
@@ -2299,7 +2292,7 @@ multiport () {
 				*)	local dir
 					for dir in $glob_dirs; do
 					worklist_temp="$worklist_temp ${dir#$pdb/}"
-					done;;
+					done ;;
 				esac
 				unset glob_dirs
 			fi ;;