CVS commit: src/sys/kern
Module Name:src Committed By: njoly Date: Sun May 19 11:02:12 UTC 2013 Modified Files: src/sys/kern: vfs_bio.c Log Message: Redo case where buf_map is not yet mapped when buf_memcalc() is called early from pmap_bootstrap(). Makes alpha, and probably others, boot again. To generate a diff of this commit: cvs rdiff -u -r1.243 -r1.244 src/sys/kern/vfs_bio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_bio.c diff -u src/sys/kern/vfs_bio.c:1.243 src/sys/kern/vfs_bio.c:1.244 --- src/sys/kern/vfs_bio.c:1.243 Mon Mar 18 13:36:22 2013 +++ src/sys/kern/vfs_bio.c Sun May 19 11:02:12 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_bio.c,v 1.243 2013/03/18 13:36:22 para Exp $ */ +/* $NetBSD: vfs_bio.c,v 1.244 2013/05/19 11:02:12 njoly Exp $ */ /*- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -123,7 +123,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_bio.c,v 1.243 2013/03/18 13:36:22 para Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_bio.c,v 1.244 2013/05/19 11:02:12 njoly Exp $); #include opt_bufcache.h @@ -396,7 +396,7 @@ u_long buf_memcalc(void) { u_long n; - vsize_t mapsz; + vsize_t mapsz = 0; /* * Determine the upper bound of memory to use for buffers. @@ -418,7 +418,8 @@ buf_memcalc(void) printf(forcing bufcache %d - 95, bufcache); bufcache = 95; } - mapsz = vm_map_max(buf_map) - vm_map_min(buf_map); + if (buf_map != NULL) + mapsz = vm_map_max(buf_map) - vm_map_min(buf_map); n = calc_cache_size(mapsz, bufcache, (buf_map != kernel_map) ? 100 : BUFCACHE_VA_MAXPCT) / PAGE_SIZE;
CVS commit: src/usr.sbin/gpioctl
Module Name:src Committed By: mbalmer Date: Sun May 19 14:06:35 UTC 2013 Modified Files: src/usr.sbin/gpioctl: gpioctl.8 Log Message: Remove stray 'To'. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/gpioctl/gpioctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/gpioctl/gpioctl.8 diff -u src/usr.sbin/gpioctl/gpioctl.8:1.16 src/usr.sbin/gpioctl/gpioctl.8:1.17 --- src/usr.sbin/gpioctl/gpioctl.8:1.16 Sun Nov 13 14:39:42 2011 +++ src/usr.sbin/gpioctl/gpioctl.8 Sun May 19 14:06:35 2013 @@ -1,6 +1,6 @@ -.\ $NetBSD: gpioctl.8,v 1.16 2011/11/13 14:39:42 mbalmer Exp $ +.\ $NetBSD: gpioctl.8,v 1.17 2013/05/19 14:06:35 mbalmer Exp $ .\ -.\ Copyright (c) 2009, 2010, 2011 Marc Balmer m...@msys.ch +.\ Copyright (c) 2009, 2010, 2011, 2013 Marc Balmer m...@msys.ch .\ Copyright (c) 2004 Alexander Yurchenko gra...@openbsd.org .\ .\ Permission to use, copy, modify, and distribute this software for any @@ -15,7 +15,7 @@ .\ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\ -.Dd November 13, 2011 +.Dd May 19, 2013 .Dt GPIOCTL 8 .Os .Sh NAME @@ -98,8 +98,6 @@ or .Ar toggle can be used. .Pp -To -.Pp Only pins that have been configured at securelevel 0, typically during system startup, are accessible once the securelevel has been raised. Pins can be given symbolic names for easier use.
CVS commit: src/share/misc
Module Name:src Committed By: riz Date: Sun May 19 15:04:39 UTC 2013 Modified Files: src/share/misc: bsd-family-tree Log Message: Added NetBSD 5.2, 6.0.1, 6.0.2 and 6.1. Someone *please* clean up my artwork. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/share/misc/bsd-family-tree Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/bsd-family-tree diff -u src/share/misc/bsd-family-tree:1.48 src/share/misc/bsd-family-tree:1.49 --- src/share/misc/bsd-family-tree:1.48 Tue May 7 14:55:36 2013 +++ src/share/misc/bsd-family-tree Sun May 19 15:04:39 2013 @@ -245,23 +245,26 @@ FreeBSD 5.2 | | | || | | \ OpenBSD 4.8 | | || | | NetBSD | | | FreeBSD FreeBSD | |5.1 | | - |8.2 7.4| | | | DragonFly 2.10.1 - | | | | | OpenBSD 4.9 | - | `-. Mac OS X | | | | - |\ 10.7| | | | - | | | | | OpenBSD 5.0 | - *--FreeBSD| | | | | | + |8.2 7.4| | |\ | DragonFly 2.10.1 + | | | | | \ OpenBSD 4.9 | + | `-. Mac OS X | | || | + |\ 10.7| | || | + | | | | | |OpenBSD 5.0 | + *--FreeBSD| | | | || | |9.0 | | | NetBSD 5.1.2 | DragonFly 3.0.1 - | |FreeBSD | | | | - | | 8.3 | | OpenBSD 5.1 | - | | Mac OS X | | | - | | 10.8| | | - | | | NetBSD 6.0 | | - | | | | OpenBSD 5.2 DragonFly 3.2.1 - | FreeBSD | | | | - |9.1 | | | | - || | | | - || |OpenBSD 5.3 DragonFly 3.4.1 + | |FreeBSD | ||| | + | | 8.3 | ||OpenBSD 5.1 | + | | Mac OS X ||| | + | | 10.8||| | + | | | NetBSD 6.0 || | + | | | |\\ |OpenBSD 5.2 DragonFly 3.2.1 + | FreeBSD | | |\ NetBSD 5.2 | | + |9.1 | | | \ | | + || | | NetBSD 6.0.1 | | + || | | | OpenBSD 5.3 DragonFly 3.4.1 + || | | || | + || | | NetBSD 6.0.2 | | + || | `-NetBSD 6.1 | | || | | | || | | | || | | | @@ -564,9 +567,13 @@ Mac OS X 10.8 2012-07-25 [APL] NetBSD 6.0 2012-10-17 [NBD] OpenBSD 5.2 2012-11-01 [OBD] DragonFly 3.2.1 2012-11-02 [DFB] +NetBSD 5.2 2012-12-03 [NBD] +NetBSD 6.0.1 2012-12-26 [NBD] (security/critical release) FreeBSD 9.1 2012-12-30 [FBD] DragonFly 3.4.1 2013-04-29 [DFB] OpenBSD 5.3 2013-05-01 [OBD] +NetBSD 6.0.2 2013-05-18 [NBD] (security/critical release) +NetBSD 6.1 2013-05-18 [NBD] Bibliography
CVS commit: src/usr.sbin/gpioctl
Module Name:src Committed By: mbalmer Date: Sun May 19 15:31:23 UTC 2013 Modified Files: src/usr.sbin/gpioctl: gpioctl.8 gpioctl.c Log Message: Make it easier to use gpioctl(8) in shell scripts: Add a -s flag which instructs gpioctl(8) to only output a single numeric value, either the number of pins if no pin number was passed as argumenti, or, the current state of the pin. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/gpioctl/gpioctl.8 cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/gpioctl/gpioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/gpioctl/gpioctl.8 diff -u src/usr.sbin/gpioctl/gpioctl.8:1.17 src/usr.sbin/gpioctl/gpioctl.8:1.18 --- src/usr.sbin/gpioctl/gpioctl.8:1.17 Sun May 19 14:06:35 2013 +++ src/usr.sbin/gpioctl/gpioctl.8 Sun May 19 15:31:23 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: gpioctl.8,v 1.17 2013/05/19 14:06:35 mbalmer Exp $ +.\ $NetBSD: gpioctl.8,v 1.18 2013/05/19 15:31:23 mbalmer Exp $ .\ .\ Copyright (c) 2009, 2010, 2011, 2013 Marc Balmer m...@msys.ch .\ Copyright (c) 2004 Alexander Yurchenko gra...@openbsd.org @@ -23,6 +23,9 @@ .Nd control GPIO devices .Sh SYNOPSIS .Nm gpioctl +.Op Fl qs +.Ar device +.Nm gpioctl .Op Fl q .Ar device .Cm attach @@ -31,12 +34,12 @@ .Ar mask .Op Ar flag .Nm gpioctl -.Op Fl q +.Op Fl qs .Ar device .Ar pin .Op Ar 0 | 1 | 2 .Nm gpioctl -.Op Fl q +.Op Fl qs .Ar device .Ar pin .Op Ar on | off | toggle @@ -156,6 +159,12 @@ The options are as follows: .Bl -tag -width Ds .It Fl q Operate quietly i.e. nothing is printed to stdout. +.It Fl s +Only output a single number on stdout, representing either the state of the +pin or the number of available pins if no pin number was passed as argument. +This option is useful e.g. when +.Nm +is used in shell scripts to query the state of a pin. .El .Sh FILES .Bl -tag -width /dev/gpiou -compact Index: src/usr.sbin/gpioctl/gpioctl.c diff -u src/usr.sbin/gpioctl/gpioctl.c:1.19 src/usr.sbin/gpioctl/gpioctl.c:1.20 --- src/usr.sbin/gpioctl/gpioctl.c:1.19 Sun Nov 13 13:20:02 2011 +++ src/usr.sbin/gpioctl/gpioctl.c Sun May 19 15:31:23 2013 @@ -1,7 +1,7 @@ -/* $NetBSD: gpioctl.c,v 1.19 2011/11/13 13:20:02 mbalmer Exp $ */ +/* $NetBSD: gpioctl.c,v 1.20 2013/05/19 15:31:23 mbalmer Exp $ */ /* - * Copyright (c) 2008, 2010, 2011 Marc Balmer mbal...@netbsd.org + * Copyright (c) 2008, 2010, 2011, 2013 Marc Balmer mbal...@netbsd.org * Copyright (c) 2004 Alexander Yurchenko gra...@openbsd.org * * Permission to use, copy, modify, and distribute this software for any @@ -39,6 +39,7 @@ static char *dev; static int devfd = -1; static int quiet = 0; +static int state = 0; static void getinfo(void); static void gpioread(int, char *); @@ -84,11 +85,14 @@ main(int argc, char *argv[]) char *flags; char devn[32]; - while ((ch = getopt(argc, argv, q)) != -1) + while ((ch = getopt(argc, argv, qs)) != -1) switch (ch) { case 'q': quiet = 1; break; + case 's': + quiet = state = 1; + break; default: usage(); /* NOTREACHED */ @@ -192,7 +196,6 @@ main(int argc, char *argv[]) } else gpioread(pin, nm); } - return EXIT_SUCCESS; } @@ -204,6 +207,9 @@ getinfo(void) if (ioctl(devfd, GPIOINFO, info) == -1) err(EXIT_FAILURE, GPIOINFO); + if (state) + printf(%d\n, info.gpio_npins); + if (quiet) return; @@ -224,6 +230,9 @@ gpioread(int pin, char *gp_name) if (ioctl(devfd, GPIOREAD, req) == -1) err(EXIT_FAILURE, GPIOREAD); + if (state) + printf(%d\n, req.gp_value); + if (quiet) return; @@ -256,6 +265,9 @@ gpiowrite(int pin, char *gp_name, int va err(EXIT_FAILURE, GPIOTOGGLE); } + if (state) + printf(%d\n, value 2 ? value : 1 - req.gp_value); + if (quiet) return; @@ -344,7 +356,7 @@ usage(void) const char *progname; progname = getprogname(); - fprintf(stderr, usage: %s [-q] device [pin] [0 | 1 | 2 | + fprintf(stderr, usage: %s [-qs] device [pin] [0 | 1 | 2 | on | off | toggle]\n, progname); fprintf(stderr,%s [-q] device pin set [flags] [name]\n, progname);
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: rkujawa Date: Sun May 19 15:34:55 UTC 2013 Added Files: src/sys/arch/arm/arm: cpufunc_asm_pj4b.S Log Message: Add CPU functions for PJ4B core. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/arm/cpufunc_asm_pj4b.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/arm/arm/cpufunc_asm_pj4b.S diff -u /dev/null src/sys/arch/arm/arm/cpufunc_asm_pj4b.S:1.1 --- /dev/null Sun May 19 15:34:55 2013 +++ src/sys/arch/arm/arm/cpufunc_asm_pj4b.S Sun May 19 15:34:55 2013 @@ -0,0 +1,214 @@ +/*** +Copyright (C) Marvell International Ltd. and its affiliates + +Developed by Semihalf + + +Marvell BSD License + +If you received this File from Marvell, you may opt to use, redistribute and/or +modify this File under the following licensing terms. +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +* Neither the name of Marvell nor the names of its contributors may be +used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +***/ + +#include assym.h +#include machine/cpu.h +#include machine/asm.h + +#define TTB_RGN_OC_WB (3 3) +#define TTB_IRGN_WB ((1 0) | (1 6)) + +/* PTWs cacheable, inner WB not shareable, outer WB not shareable */ +#define TTB_FLAGS_UP (TTB_IRGN_WB | TTB_RGN_OC_WB) + +.Lpj4b_cache_line_size: + .word _C_LABEL(arm_dcache_align) + +ENTRY(pj4b_setttb) + /* Cache synchronization is not required as this core has PIPT caches */ + dsb +#if defined(L2CACHE_ENABLE) defined(AURORA_L2_PT_WALK) + orr r2, r0, #TTB_FLAGS_UP +#else + bic r2, r0, #0x18 +#endif + mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ + mov r0, #0 + isb + mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ + RET + +ENTRY(pj4b_tlb_flushID) + mcr p15, 0, r0, c8, c7, 0 /* flush I+D tlb */ + dsb + RET +END(pj4b_tlb_flushID) + +ENTRY(pj4b_tlb_flushID_SE) + mcr p15, 0, r0, c8, c7, 1 @flush I+D tlb single entry + dsb + RET +END(pj4b_tlb_flushID_SE) + +ENTRY(pj4b_icache_sync_range) + ldr ip, .Lpj4b_cache_line_size + ldr ip, [ip] + sub r1, r1, #1 /* Don't overrun */ + sub r3, ip, #1 + and r2, r0, r3 + add r1, r1, r2 + bic r0, r0, r3 +1: + mcr p15, 0, r0, c7, c5, 1 /* Invalidate I cache SE with VA */ + mcr p15, 0, r0, c7, c14, 1 /* Clean and invalidate D cache SE with VA */ + add r0, r0, ip + subs r1, r1, ip + bpl 1b + isb/* instruction synchronization barrier */ + dsb + RET +END(pj4b_icache_sync_range) + +ENTRY(pj4b_dcache_inv_range) + ldr ip, .Lpj4b_cache_line_size + ldr ip, [ip] + sub r1, r1, #1 /* Don't overrun */ + sub r3, ip, #1 + and r2, r0, r3 + add r1, r1, r2 + bic r0, r0, r3 +1: + mcr p15, 0, r0, c7, c6, 1 + add r0, r0, ip + subs r1, r1, ip + bpl 1b + dsb + RET +END(pj4b_dcache_inv_range) + +ENTRY(pj4b_idcache_wbinv_range) + ldr ip, .Lpj4b_cache_line_size + ldr ip, [ip] + sub r1, r1, #1 /* Don't overrun */ + sub r3, ip, #1 + and r2, r0, r3 + add r1, r1, r2 + bic r0, r0, r3 +1: + mcr p15, 0, r0, c7, c5, 1 + mcr p15, 0, r0, c7, c14, 1 /* L2C clean and invalidate entry */ + add r0, r0, ip + subs r1, r1, ip + bpl 1b + dsb + RET +END(pj4b_idcache_wbinv_range) + +ENTRY(pj4b_dcache_wbinv_range) + ldr ip, .Lpj4b_cache_line_size + ldr ip, [ip] + sub r1, r1, #1 /* Don't overrun */ + sub r3, ip, #1 + and r2, r0, r3 + add r1, r1, r2 + bic r0, r0, r3 +1: + mcr p15, 0, r0, c7, c14, 1 + add r0, r0, ip + subs r1, r1, ip + bpl 1b + dsb + RET
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: rkujawa Date: Sun May 19 15:37:06 UTC 2013 Modified Files: src/sys/arch/arm/arm: cpufunc.c Log Message: Plug support for PJ4B core into our ARM CPU support infrastructure. Obtained from Marvell, Semihalf. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/arch/arm/arm/cpufunc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm/cpufunc.c diff -u src/sys/arch/arm/arm/cpufunc.c:1.119 src/sys/arch/arm/arm/cpufunc.c:1.120 --- src/sys/arch/arm/arm/cpufunc.c:1.119 Fri Dec 28 03:48:00 2012 +++ src/sys/arch/arm/arm/cpufunc.c Sun May 19 15:37:06 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.119 2012/12/28 03:48:00 msaitoh Exp $ */ +/* $NetBSD: cpufunc.c,v 1.120 2013/05/19 15:37:06 rkujawa Exp $ */ /* * arm7tdmi support code Copyright (c) 2001 John Fremlin @@ -49,7 +49,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.119 2012/12/28 03:48:00 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.120 2013/05/19 15:37:06 rkujawa Exp $); #include opt_compat_netbsd.h #include opt_cpuoptions.h @@ -1329,6 +1329,67 @@ struct cpu_functions cortex_cpufuncs = { }; #endif /* CPU_CORTEX */ +#ifdef CPU_PJ4B +struct cpu_functions pj4bv7_cpufuncs = { + /* CPU functions */ + + .cf_id = cpufunc_id, + .cf_cpwait = pj4b_drain_writebuf, + + /* MMU functions */ + + .cf_control = cpufunc_control, + .cf_domains = cpufunc_domains, + .cf_setttb = pj4b_setttb, + .cf_faultstatus = cpufunc_faultstatus, + .cf_faultaddress = cpufunc_faultaddress, + + /* TLB functions */ + + .cf_tlb_flushID = pj4b_tlb_flushID, + .cf_tlb_flushID_SE = pj4b_tlb_flushID_SE, + .cf_tlb_flushI = pj4b_tlb_flushID, + .cf_tlb_flushI_SE = pj4b_tlb_flushID_SE, + .cf_tlb_flushD = pj4b_tlb_flushID, + .cf_tlb_flushD_SE = pj4b_tlb_flushID_SE, + + /* Cache operations */ + + .cf_icache_sync_all = armv7_idcache_wbinv_all, + .cf_icache_sync_range = pj4b_icache_sync_range, + + .cf_dcache_wbinv_all = armv7_dcache_wbinv_all, + .cf_dcache_wbinv_range = pj4b_dcache_wbinv_range, + .cf_dcache_inv_range = pj4b_dcache_inv_range, + .cf_dcache_wb_range = pj4b_dcache_wb_range, + + .cf_sdcache_wbinv_range = (void *)cpufunc_nullop, + .cf_sdcache_inv_range = (void *)cpufunc_nullop, + .cf_sdcache_wb_range = (void *)cpufunc_nullop, + + .cf_idcache_wbinv_all = armv7_idcache_wbinv_all, + .cf_idcache_wbinv_range = pj4b_idcache_wbinv_range, + + /* Other functions */ + + .cf_flush_prefetchbuf = pj4b_drain_readbuf, + .cf_drain_writebuf = pj4b_drain_writebuf, + .cf_flush_brnchtgt_C = pj4b_flush_brnchtgt_all, + .cf_flush_brnchtgt_E = pj4b_flush_brnchtgt_va, + + .cf_sleep = (void *)cpufunc_nullop, + + /* Soft functions */ + + .cf_dataabt_fixup = cpufunc_null_fixup, + .cf_prefetchabt_fixup = cpufunc_null_fixup, + + .cf_context_switch = pj4b_context_switch, + + .cf_setup = pj4bv7_setup +}; +#endif /* CPU_PJ4B */ + #ifdef CPU_SHEEVA struct cpu_functions sheeva_cpufuncs = { /* CPU functions */ @@ -1403,7 +1464,7 @@ u_int cputype; defined(CPU_FA526) || \ defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(__CPU_XSCALE_PXA2XX) || defined(CPU_XSCALE_IXP425) || \ -defined(CPU_CORTEX) || defined(CPU_SHEEVA) +defined(CPU_CORTEX) || defined(CPU_PJ4B) || defined(CPU_SHEEVA) static void get_cachetype_cp15(void); /* Additional cache information local to this file. Log2 of some of the @@ -1418,7 +1479,7 @@ get_cachesize_cp15(int cssr) { u_int csid; -#if (CPU_CORTEX) 0 +#if ((CPU_CORTEX) 0) || defined(CPU_PJ4B) __asm volatile(.arch\tarmv7a); __asm volatile(mcr p15, 2, %0, c0, c0, 0 :: r (cssr)); __asm volatile(isb); /* sync to the new cssr */ @@ -2010,6 +2071,21 @@ set_cpufuncs(void) return 0; } #endif /* CPU_CORTEX */ + +#if defined(CPU_PJ4B) + if ((cputype == CPU_ID_MV88SV581X_V6 || + cputype == CPU_ID_MV88SV581X_V7 || + cputype == CPU_ID_MV88SV584X_V7 || + cputype == CPU_ID_ARM_88SV581X_V6 || + cputype == CPU_ID_ARM_88SV581X_V7) + (cpu_pfr(0) ARM_PFR0_THUMBEE_MASK)) { + cpufuncs = pj4bv7_cpufuncs; + get_cachetype_cp15(); + pmap_pte_init_armv7(); + return 0; + } +#endif /* CPU_PJ4B */ + /* * B. And the answer was ... */ @@ -2888,6 +2964,40 @@ arm11mpcore_setup(char *args) } #endif /* CPU_ARM11MPCORE */ +#ifdef CPU_PJ4B +void +pj4bv7_setup(char *args) +{ + int cpuctrl; + + pj4b_config(); + + cpuctrl = CPU_CONTROL_MMU_ENABLE; +#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS + cpuctrl |= CPU_CONTROL_AFLT_ENABLE; +#endif + cpuctrl |= CPU_CONTROL_DC_ENABLE; + cpuctrl |= CPU_CONTROL_IC_ENABLE; + cpuctrl |= (0xf 3); + cpuctrl |= CPU_CONTROL_BPRD_ENABLE; + cpuctrl |= (0x5 16) | (1 22); + cpuctrl |= CPU_CONTROL_XP_ENABLE; + + if (vector_page == ARM_VECTORS_HIGH) + cpuctrl |= CPU_CONTROL_VECRELOC; + + /* Clear out the cache */ + cpu_idcache_wbinv_all(); + + /* Set the control register
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: rkujawa Date: Sun May 19 15:42:23 UTC 2013 Modified Files: src/sys/arch/arm/arm32: cpu.c Log Message: Plug support for PJ4B into our ARM CPU infrastructure. Obtained from Marvell, Semihalf. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/arch/arm/arm32/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/cpu.c diff -u src/sys/arch/arm/arm32/cpu.c:1.93 src/sys/arch/arm/arm32/cpu.c:1.94 --- src/sys/arch/arm/arm32/cpu.c:1.93 Sun Feb 3 15:57:23 2013 +++ src/sys/arch/arm/arm32/cpu.c Sun May 19 15:42:23 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.93 2013/02/03 15:57:23 matt Exp $ */ +/* $NetBSD: cpu.c,v 1.94 2013/05/19 15:42:23 rkujawa Exp $ */ /* * Copyright (c) 1995 Mark Brinicombe. @@ -46,7 +46,7 @@ #include sys/param.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.93 2013/02/03 15:57:23 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.94 2013/05/19 15:42:23 rkujawa Exp $); #include sys/systm.h #include sys/conf.h @@ -74,6 +74,7 @@ uint32_t arm_cpu_marker __cacheline_alig void identify_arm_cpu(device_t dv, struct cpu_info *); void identify_cortex_caches(device_t dv); void identify_features(device_t dv); +u_int cpu_pfr(int num); /* * Identify the master (boot) CPU @@ -227,6 +228,7 @@ enum cpu_class { CPU_CLASS_ARM11J, CPU_CLASS_ARMV4, CPU_CLASS_CORTEX, + CPU_CLASS_PJ4B, }; static const char * const generic_steppings[16] = { @@ -487,6 +489,22 @@ const struct cpuidtab cpuids[] = { { CPU_ID_CORTEXA15R3, CPU_CLASS_CORTEX, Cortex-A15 r3, pN_steppings, 7A }, + { CPU_ID_MV88SV581X_V6, CPU_CLASS_PJ4B, Sheeva 88SV581x, + generic_steppings }, + { CPU_ID_ARM_88SV581X_V6, CPU_CLASS_PJ4B,Sheeva 88SV581x, + generic_steppings }, + { CPU_ID_MV88SV581X_V7, CPU_CLASS_PJ4B, Sheeva 88SV581x, + generic_steppings }, + { CPU_ID_ARM_88SV581X_V7, CPU_CLASS_PJ4B,Sheeva 88SV581x, + generic_steppings }, + { CPU_ID_MV88SV584X_V6, CPU_CLASS_PJ4B, Sheeva 88SV584x, + generic_steppings }, + { CPU_ID_ARM_88SV584X_V6, CPU_CLASS_PJ4B,Sheeva 88SV584x, + generic_steppings }, + { CPU_ID_MV88SV584X_V7, CPU_CLASS_PJ4B, Sheeva 88SV584x, + generic_steppings }, + + { 0, CPU_CLASS_NONE, NULL, NULL, } }; @@ -514,6 +532,7 @@ const struct cpu_classtab cpu_classes[] [CPU_CLASS_ARM11J] = { ARM11J, CPU_ARM11 }, [CPU_CLASS_ARMV4] = { ARMv4, CPU_ARMV4 }, [CPU_CLASS_CORTEX] = { Cortex, CPU_CORTEX }, + [CPU_CLASS_PJ4B] = { Marvell, CPU_PJ4B }, }; /* @@ -560,6 +579,29 @@ print_cache_info(device_t dv, struct arm } } +u_int cpu_pfr(int num) +{ + u_int feat; + + switch (num) { + case 0: + __asm __volatile(mrc p15, 0, %0, c0, c1, 0 + : =r (feat)); + break; + case 1: + __asm __volatile(mrc p15, 0, %0, c0, c1, 1 + : =r (feat)); + break; + default: + panic(Processor Feature Register %d not implemented, num); + break; + } + + return (feat); +} + + + void identify_arm_cpu(device_t dv, struct cpu_info *ci) { @@ -627,6 +669,7 @@ identify_arm_cpu(device_t dv, struct cpu case CPU_CLASS_ARM11J: case CPU_CLASS_ARMV4: case CPU_CLASS_CORTEX: + case CPU_CLASS_PJ4B: if ((ci-ci_ctrl CPU_CONTROL_DC_ENABLE) == 0) aprint_normal( DC disabled); else @@ -654,7 +697,7 @@ identify_arm_cpu(device_t dv, struct cpu aprint_normal(\n); - if (CPU_ID_CORTEX_P(cpuid) || CPU_ID_ARM11_P(cpuid)) { + if (CPU_ID_CORTEX_P(cpuid) || CPU_ID_ARM11_P(cpuid) || CPU_ID_MV88SV58XX_P(cpuid)) { identify_features(dv); } @@ -714,6 +757,9 @@ identify_arm_cpu(device_t dv, struct cpu #if defined(CPU_CORTEX) case CPU_CLASS_CORTEX: #endif +#if defined(CPU_PJ4B) + case CPU_CLASS_PJ4B: +#endif #if defined(CPU_FA526) case CPU_CLASS_ARMV4: #endif
CVS commit: src/sys/arch/arm
Module Name:src Committed By: rkujawa Date: Sun May 19 15:51:11 UTC 2013 Modified Files: src/sys/arch/arm/conf: files.arm src/sys/arch/arm/include: cpuconf.h cpufunc.h Log Message: Make PJ4B support code compilable. Obtained from Marvell, Semihalf. To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/sys/arch/arm/conf/files.arm cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/include/cpuconf.h cvs rdiff -u -r1.62 -r1.63 src/sys/arch/arm/include/cpufunc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/conf/files.arm diff -u src/sys/arch/arm/conf/files.arm:1.116 src/sys/arch/arm/conf/files.arm:1.117 --- src/sys/arch/arm/conf/files.arm:1.116 Thu Feb 14 07:26:23 2013 +++ src/sys/arch/arm/conf/files.arm Sun May 19 15:51:10 2013 @@ -1,4 +1,4 @@ -# $NetBSD: files.arm,v 1.116 2013/02/14 07:26:23 matt Exp $ +# $NetBSD: files.arm,v 1.117 2013/05/19 15:51:10 rkujawa Exp $ # temporary define to allow easy moving to ../arch/arm/arm32 defflagARM32 @@ -8,7 +8,7 @@ defflag opt_cputypes.h CPU_ARM2 CPU_ARM defflag opt_cputypes.h CPU_ARM6 CPU_ARM7 CPU_ARM7TDMI CPU_ARM8 CPU_ARM9 CPU_ARM9E CPU_ARM10 CPU_ARM11 CPU_SA110 CPU_SA1100 CPU_SA1110 CPU_IXP12X0 -CPU_FA526 CPU_CORTEX +CPU_FA526 CPU_CORTEX CPU_PJ4B CPU_XSCALE_80200 CPU_XSCALE_80321 CPU_XSCALE_PXA250 CPU_XSCALE_PXA270 CPU_XSCALE_IXP425 @@ -136,7 +136,8 @@ file arch/arm/arm/cpufunc_asm_armv5.S cp file arch/arm/arm/cpufunc_asm_armv5_ec.S cpu_arm9e | cpu_arm10 | cpu_sheeva file arch/arm/arm/cpufunc_asm_armv6.S cpu_arm11 | cpu_cortex -file arch/arm/arm/cpufunc_asm_armv7.S cpu_cortex +file arch/arm/arm/cpufunc_asm_armv7.S cpu_cortex | cpu_pj4b +file arch/arm/arm/cpufunc_asm_pj4b.S cpu_pj4b file arch/arm/arm/cpufunc_asm_sa1.S cpu_sa110 | cpu_sa1100 | cpu_sa1110 | cpu_ixp12x0 Index: src/sys/arch/arm/include/cpuconf.h diff -u src/sys/arch/arm/include/cpuconf.h:1.20 src/sys/arch/arm/include/cpuconf.h:1.21 --- src/sys/arch/arm/include/cpuconf.h:1.20 Thu Mar 10 07:47:14 2011 +++ src/sys/arch/arm/include/cpuconf.h Sun May 19 15:51:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuconf.h,v 1.20 2011/03/10 07:47:14 bsh Exp $ */ +/* $NetBSD: cpuconf.h,v 1.21 2013/05/19 15:51:10 rkujawa Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -132,7 +132,7 @@ #define ARM_ARCH_6 0 #endif -#if defined(CPU_CORTEX) +#if defined(CPU_CORTEX) || defined(CPU_PJ4B) #define ARM_ARCH_7 1 #else #define ARM_ARCH_7 0 @@ -217,7 +217,8 @@ defined(CPU_ARM1136) || \ defined(CPU_ARM1176) || \ defined(CPU_ARM11) \ - !defined(CPU_CORTEX) !defined(CPU_ARM11MPCORE) + !defined(CPU_CORTEX) \ + !defined(CPU_ARM11MPCORE) !defined(CPU_PJ4B) #define ARM_MMU_V6C 1 #else #define ARM_MMU_V6C 0 @@ -234,7 +235,7 @@ #if !defined(_KERNEL_OPT) || \ - defined(CPU_CORTEX) + defined(CPU_CORTEX) || defined(CPU_PJ4B) #define ARM_MMU_V7 1 #else #define ARM_MMU_V7 0 Index: src/sys/arch/arm/include/cpufunc.h diff -u src/sys/arch/arm/include/cpufunc.h:1.62 src/sys/arch/arm/include/cpufunc.h:1.63 --- src/sys/arch/arm/include/cpufunc.h:1.62 Mon Nov 12 18:00:37 2012 +++ src/sys/arch/arm/include/cpufunc.h Sun May 19 15:51:10 2013 @@ -221,6 +221,8 @@ void cpufunc_domains (u_int); u_int cpufunc_faultstatus (void); u_int cpufunc_faultaddress (void); +u_int cpu_pfr (int); + #if defined(CPU_ARM2) || defined(CPU_ARM250) || defined(CPU_ARM3) void arm3_cache_flush (void); #endif /* CPU_ARM2 || CPU_ARM250 || CPU_ARM3 */ @@ -468,8 +470,6 @@ void armv7_dcache_wbinv_range(vaddr_t, v void armv7_dcache_inv_range(vaddr_t, vsize_t); void armv7_idcache_wbinv_range(vaddr_t, vsize_t); -void armv7_dcache_wbinv_all (void); -void armv7_idcache_wbinv_all(void); void armv7_icache_sync_all(void); void armv7_cpu_sleep(int); void armv7_context_switch(u_int); @@ -478,6 +478,33 @@ void armv7_drain_writebuf(void); void armv7_setup(char *string); #endif +#if defined(CPU_CORTEX) || defined(CPU_PJ4B) +void armv7_dcache_wbinv_all (void); +void armv7_idcache_wbinv_all(void); +#endif + +#if defined(CPU_PJ4B) +void pj4b_setttb(u_int, bool); +void pj4b_tlb_flushID(void); +void pj4b_tlb_flushID_SE(u_int); + +void pj4b_icache_sync_range(vm_offset_t, vm_size_t); +void pj4b_idcache_wbinv_range(vm_offset_t, vm_size_t); +void pj4b_dcache_wbinv_range(vm_offset_t, vm_size_t); +void pj4b_dcache_inv_range(vm_offset_t, vm_size_t); +void pj4b_dcache_wb_range(vm_offset_t, vm_size_t); + +void pj4b_drain_writebuf(void); +void pj4b_drain_readbuf(void); +void pj4b_flush_brnchtgt_all(void); +void pj4b_flush_brnchtgt_va(u_int); +void pj4b_context_switch(u_int); +void pj4b_sleep(int); + +void pj4bv7_setup(char *string); +void pj4b_config(void); + +#endif /* CPU_PJ4B */ #if defined(CPU_ARM1136) || defined(CPU_ARM1176) void arm11x6_setttb (u_int, bool);
CVS commit: src/etc
Module Name:src Committed By: mbalmer Date: Sun May 19 16:09:04 UTC 2013 Modified Files: src/etc: MAKEDEV.tmpl group Log Message: Add a group 'gpio' and create gpio(4) device nodes under /dev with mode 664 and group ownership set to 'gpio'. This allows controlled access to specifically enabled gpio pins to members of the gpio group. See gpioctl(8), and, gpio(4) for details. To generate a diff of this commit: cvs rdiff -u -r1.168 -r1.169 src/etc/MAKEDEV.tmpl cvs rdiff -u -r1.28 -r1.29 src/etc/group Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/MAKEDEV.tmpl diff -u src/etc/MAKEDEV.tmpl:1.168 src/etc/MAKEDEV.tmpl:1.169 --- src/etc/MAKEDEV.tmpl:1.168 Wed May 1 13:12:00 2013 +++ src/etc/MAKEDEV.tmpl Sun May 19 16:09:04 2013 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV.tmpl,v 1.168 2013/05/01 13:12:00 kiyohara Exp $ +# $NetBSD: MAKEDEV.tmpl,v 1.169 2013/05/19 16:09:04 mbalmer Exp $ # # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -496,6 +496,7 @@ setup() u_root=%uid_root% u_uucp=%uid_uucp% + g_gpio=%gid_gpio% g_kmem=%gid_kmem% g_ntpd=%gid_ntpd% g_operator=%gid_operator% @@ -1458,7 +1459,7 @@ hdaudio[0-9]*) gpio[0-9]*) unit=${i#gpio} - mkdev gpio$unit c %gpio_chr% $unit 644 + mkdev gpio$unit c %gpio_chr% $unit 664 $g_gpio ;; rmidi[0-9]*) Index: src/etc/group diff -u src/etc/group:1.28 src/etc/group:1.29 --- src/etc/group:1.28 Sat Jan 28 02:17:29 2012 +++ src/etc/group Sun May 19 16:09:04 2013 @@ -30,4 +30,5 @@ utmp:*:45: authpf:*:72: users:*:100: dialer:*:117: +gpio:*:118: nogroup:*:32766:
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: christos Date: Sun May 19 16:52:04 UTC 2013 Modified Files: src/distrib/sets/lists/base: ad.arm Log Message: from the failed builds, it seems we always build ofctl and eeprom To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/lists/base/ad.arm Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/ad.arm diff -u src/distrib/sets/lists/base/ad.arm:1.15 src/distrib/sets/lists/base/ad.arm:1.16 --- src/distrib/sets/lists/base/ad.arm:1.15 Wed May 1 23:56:38 2013 +++ src/distrib/sets/lists/base/ad.arm Sun May 19 12:52:04 2013 @@ -1,4 +1,4 @@ -# $NetBSD: ad.arm,v 1.15 2013/05/02 03:56:38 matt Exp $ +# $NetBSD: ad.arm,v 1.16 2013/05/19 16:52:04 christos Exp $ ./sbin/ldconfig base-sysutil-root pic,endian=1234 ./lib/oabi base-compat-shlib compat ./lib/oabi/npf base-npf-shlib compat @@ -16,8 +16,8 @@ ./usr/sbin/apm base-sysutil-bin ./usr/sbin/apmd base-sysutil-bin ./usr/sbin/elftosbbase-sysutil-bin endian=1234 -./usr/sbin/eeprombase-sysutil-bin endian=1234 -./usr/sbin/ofctlbase-sysutil-bin endian=1234 +./usr/sbin/eeprombase-sysutil-bin +./usr/sbin/ofctlbase-sysutil-bin ./usr/sbin/sbtoolbase-sysutil-bin endian=1234 ./usr/sbin/sbkeygenbase-sysutil-bin endian=1234 ./usr/sbin/tpctlbase-sysutil-bin
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: rkujawa Date: Sun May 19 16:53:58 UTC 2013 Modified Files: src/sys/arch/arm/arm: cpufunc_asm_pj4b.S Log Message: Add CVS ID. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/arm/cpufunc_asm_pj4b.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm/cpufunc_asm_pj4b.S diff -u src/sys/arch/arm/arm/cpufunc_asm_pj4b.S:1.1 src/sys/arch/arm/arm/cpufunc_asm_pj4b.S:1.2 --- src/sys/arch/arm/arm/cpufunc_asm_pj4b.S:1.1 Sun May 19 15:34:55 2013 +++ src/sys/arch/arm/arm/cpufunc_asm_pj4b.S Sun May 19 16:53:58 2013 @@ -1,3 +1,5 @@ +/* $NetBSD: cpufunc_asm_pj4b.S,v 1.2 2013/05/19 16:53:58 rkujawa Exp $ */ + /*** Copyright (C) Marvell International Ltd. and its affiliates
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: christos Date: Sun May 19 17:07:05 UTC 2013 Modified Files: src/lib/libc/stdio: stdio.c Log Message: from kre: Don't fail if we are seeking on a pipe, clear the append bit since we always append. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/libc/stdio/stdio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/stdio.c diff -u src/lib/libc/stdio/stdio.c:1.21 src/lib/libc/stdio/stdio.c:1.22 --- src/lib/libc/stdio/stdio.c:1.21 Tue Mar 27 11:05:42 2012 +++ src/lib/libc/stdio/stdio.c Sun May 19 13:07:04 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: stdio.c,v 1.21 2012/03/27 15:05:42 christos Exp $ */ +/* $NetBSD: stdio.c,v 1.22 2013/05/19 17:07:04 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)stdio.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: stdio.c,v 1.21 2012/03/27 15:05:42 christos Exp $); +__RCSID($NetBSD: stdio.c,v 1.22 2013/05/19 17:07:04 christos Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -86,8 +86,12 @@ __swrite(void *cookie, const void *buf, _DIAGASSERT(buf != NULL); if (fp-_flags __SAPP) - if (lseek(__sfileno(fp), (off_t)0, SEEK_END) == (off_t)-1) - return -1; + if (lseek(__sfileno(fp), (off_t)0, SEEK_END) == (off_t)-1) { + if (errno == ESPIPE)/* if unseekable, OK, */ +fp-_flags = ~__SAPP; /* all writes append. */ + else +return -1; + } fp-_flags = ~__SOFF; /* in case FAPPEND mode is set */ return write(__sfileno(fp), buf, n); }
CVS commit: src
Module Name:src Committed By: rmind Date: Sun May 19 20:45:34 UTC 2013 Modified Files: src/sys/net/npf: npf_ctl.c npf_impl.h npf_tableset.c src/usr.sbin/npf/npfctl: npf_build.c npf_parse.y npfctl.c Log Message: - Add NPF table flushing functionality. - Fix line numbering for npfctl debug command. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/net/npf/npf_ctl.c cvs rdiff -u -r1.29 -r1.30 src/sys/net/npf/npf_impl.h cvs rdiff -u -r1.17 -r1.18 src/sys/net/npf/npf_tableset.c cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/npf/npfctl/npf_build.c \ src/usr.sbin/npf/npfctl/npf_parse.y cvs rdiff -u -r1.36 -r1.37 src/usr.sbin/npf/npfctl/npfctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/npf/npf_ctl.c diff -u src/sys/net/npf/npf_ctl.c:1.24 src/sys/net/npf/npf_ctl.c:1.25 --- src/sys/net/npf/npf_ctl.c:1.24 Wed Mar 20 00:29:47 2013 +++ src/sys/net/npf/npf_ctl.c Sun May 19 20:45:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_ctl.c,v 1.24 2013/03/20 00:29:47 christos Exp $ */ +/* $NetBSD: npf_ctl.c,v 1.25 2013/05/19 20:45:34 rmind Exp $ */ /*- * Copyright (c) 2009-2013 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: npf_ctl.c,v 1.24 2013/03/20 00:29:47 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: npf_ctl.c,v 1.25 2013/05/19 20:45:34 rmind Exp $); #include sys/param.h #include sys/conf.h @@ -813,6 +813,9 @@ npfctl_table(void *data) error = npf_table_list(tblset, nct-nct_tid, nct-nct_data.buf.buf, nct-nct_data.buf.len); break; + case NPF_CMD_TABLE_FLUSH: + error = npf_table_flush(tblset, nct-nct_tid); + break; default: error = EINVAL; break; Index: src/sys/net/npf/npf_impl.h diff -u src/sys/net/npf/npf_impl.h:1.29 src/sys/net/npf/npf_impl.h:1.30 --- src/sys/net/npf/npf_impl.h:1.29 Wed Mar 20 00:29:47 2013 +++ src/sys/net/npf/npf_impl.h Sun May 19 20:45:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_impl.h,v 1.29 2013/03/20 00:29:47 christos Exp $ */ +/* $NetBSD: npf_impl.h,v 1.30 2013/05/19 20:45:34 rmind Exp $ */ /*- * Copyright (c) 2009-2013 The NetBSD Foundation, Inc. @@ -220,6 +220,7 @@ int npf_table_remove(npf_tableset_t *, int npf_table_lookup(npf_tableset_t *, u_int, const int, const npf_addr_t *); int npf_table_list(npf_tableset_t *, u_int, void *, size_t); +int npf_table_flush(npf_tableset_t *, u_int); /* Ruleset interface. */ npf_ruleset_t * npf_ruleset_create(size_t); Index: src/sys/net/npf/npf_tableset.c diff -u src/sys/net/npf/npf_tableset.c:1.17 src/sys/net/npf/npf_tableset.c:1.18 --- src/sys/net/npf/npf_tableset.c:1.17 Sat Feb 9 03:35:32 2013 +++ src/sys/net/npf/npf_tableset.c Sun May 19 20:45:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_tableset.c,v 1.17 2013/02/09 03:35:32 rmind Exp $ */ +/* $NetBSD: npf_tableset.c,v 1.18 2013/05/19 20:45:34 rmind Exp $ */ /*- * Copyright (c) 2009-2012 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: npf_tableset.c,v 1.17 2013/02/09 03:35:32 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: npf_tableset.c,v 1.18 2013/05/19 20:45:34 rmind Exp $); #include sys/param.h #include sys/types.h @@ -223,6 +223,19 @@ table_hash_lookup(const npf_table_t *t, } static void +table_hash_destroy(npf_table_t *t) +{ + for (unsigned n = 0; n = t-t_hashmask; n++) { + npf_tblent_t *ent; + + while ((ent = LIST_FIRST(t-t_hashl[n])) != NULL) { + LIST_REMOVE(ent, te_entry.hashq); + pool_cache_put(tblent_cache, ent); + } + } +} + +static void table_tree_destroy(pt_tree_t *tree) { npf_tblent_t *ent; @@ -282,14 +295,7 @@ npf_table_destroy(npf_table_t *t) switch (t-t_type) { case NPF_TABLE_HASH: - for (unsigned n = 0; n = t-t_hashmask; n++) { - npf_tblent_t *ent; - - while ((ent = LIST_FIRST(t-t_hashl[n])) != NULL) { -LIST_REMOVE(ent, te_entry.hashq); -pool_cache_put(tblent_cache, ent); - } - } + table_hash_destroy(t); hashdone(t-t_hashl, HASH_LIST, t-t_hashmask); break; case NPF_TABLE_TREE: @@ -592,3 +598,34 @@ npf_table_list(npf_tableset_t *tset, u_i return error; } + +/* + * npf_table_flush: remove all table entries. + */ +int +npf_table_flush(npf_tableset_t *tset, u_int tid) +{ + npf_table_t *t; + + if ((u_int)tid = NPF_TABLE_SLOTS || (t = tset[tid]) == NULL) { + return EINVAL; + } + + rw_enter(t-t_lock, RW_WRITER); + switch (t-t_type) { + case NPF_TABLE_HASH: + table_hash_destroy(t); + t-t_nitems = 0; + break; + case NPF_TABLE_TREE: + table_tree_destroy(t-t_tree[0]); + table_tree_destroy(t-t_tree[1]); + t-t_nitems = 0; + break; + default: + KASSERT(false); + } + rw_exit(t-t_lock); + + return 0; +} Index: src/usr.sbin/npf/npfctl/npf_build.c diff -u src/usr.sbin/npf/npfctl/npf_build.c:1.23 src/usr.sbin/npf/npfctl/npf_build.c:1.24 --- src/usr.sbin/npf/npfctl/npf_build.c:1.23 Wed Mar 20 00:29:47 2013 +++
CVS commit: src/lib/libm/src
Module Name:src Committed By: martin Date: Sun May 19 20:50:02 UTC 2013 Modified Files: src/lib/libm/src: s_scalbnl.c Log Message: Try to fix bogus underflow test (obvious copy pasto) - someone please review to make sure I got it right. This fixes PR 47834. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libm/src/s_scalbnl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/src/s_scalbnl.c diff -u src/lib/libm/src/s_scalbnl.c:1.7 src/lib/libm/src/s_scalbnl.c:1.8 --- src/lib/libm/src/s_scalbnl.c:1.7 Sun Apr 28 14:46:16 2013 +++ src/lib/libm/src/s_scalbnl.c Sun May 19 20:50:02 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: s_scalbnl.c,v 1.7 2013/04/28 14:46:16 joerg Exp $ */ +/* $NetBSD: s_scalbnl.c,v 1.8 2013/05/19 20:50:02 martin Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: s_scalbnl.c,v 1.7 2013/04/28 14:46:16 joerg Exp $); +__RCSID($NetBSD: s_scalbnl.c,v 1.8 2013/05/19 20:50:02 martin Exp $); #include namespace.h @@ -82,7 +82,7 @@ scalblnl(long double x, long n) /* Protect against integer overflow in calculation of new exponent */ if (n LDBL_MAX_EXP - LDBL_MIN_EXP + LDBL_MANT_DIG) goto overflow; - if (n LDBL_MAX_EXP - LDBL_MIN_EXP + LDBL_MANT_DIG) + if (n LDBL_MIN_EXP - LDBL_MAX_EXP - LDBL_MANT_DIG) goto underflow; /* Scale denormalized numbers slightly, so that they are normal */
CVS commit: [netbsd-6] src
Module Name:src Committed By: riz Date: Sun May 19 21:22:01 UTC 2013 Modified Files: src/doc [netbsd-6]: README.files src/gnu/usr.bin/groff/tmac [netbsd-6]: mdoc.local src/sys/sys [netbsd-6]: param.h Log Message: Welcome to 6.1_STABLE! To generate a diff of this commit: cvs rdiff -u -r1.4.20.2 -r1.4.20.3 src/doc/README.files cvs rdiff -u -r1.66.2.2 -r1.66.2.3 src/gnu/usr.bin/groff/tmac/mdoc.local cvs rdiff -u -r1.408.2.12 -r1.408.2.13 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/README.files diff -u src/doc/README.files:1.4.20.2 src/doc/README.files:1.4.20.3 --- src/doc/README.files:1.4.20.2 Sun May 12 16:58:36 2013 +++ src/doc/README.files Sun May 19 21:22:01 2013 @@ -1,7 +1,9 @@ -# $NetBSD: README.files,v 1.4.20.2 2013/05/12 16:58:36 riz Exp $ +# $NetBSD: README.files,v 1.4.20.3 2013/05/19 21:22:01 riz Exp $ What's in this directory: +CHANGES-6.2 Changes between the 6.1 and 6.2 releases. + CHANGES-6.1 Changes between the 6.0 and 6.1 releases. CHANGES-6.0 Changes between the creation of the netbsd-6 branch and Index: src/gnu/usr.bin/groff/tmac/mdoc.local diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.66.2.2 src/gnu/usr.bin/groff/tmac/mdoc.local:1.66.2.3 --- src/gnu/usr.bin/groff/tmac/mdoc.local:1.66.2.2 Wed Oct 17 20:53:29 2012 +++ src/gnu/usr.bin/groff/tmac/mdoc.local Sun May 19 21:22:01 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: mdoc.local,v 1.66.2.2 2012/10/17 20:53:29 riz Exp $ +.\ $NetBSD: mdoc.local,v 1.66.2.3 2013/05/19 21:22:01 riz Exp $ .\ .\ Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -44,9 +44,9 @@ .as doc-str-St--ieee1275-94 (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq]) . .\ Default .Os value -.ds doc-operating-system NetBSD\~6.1 +.ds doc-operating-system NetBSD\~6.2 .\ Default footer operating system value -.ds doc-default-operating-system NetBSD\~6.1 +.ds doc-default-operating-system NetBSD\~6.2 .\ Other known versions, not yet in groff distribution .ds doc-operating-system-NetBSD-1.3.3 1.3.3 .ds doc-operating-system-NetBSD-1.6.3 1.6.3 @@ -60,6 +60,7 @@ .ds doc-operating-system-NetBSD-5.15.1 .ds doc-operating-system-NetBSD-6.06.0 .ds doc-operating-system-NetBSD-6.16.1 +.ds doc-operating-system-NetBSD-6.26.2 .ds doc-operating-system-FreeBSD-4.11 4.11 .ds doc-operating-system-FreeBSD-5.4 5.4 .ds doc-operating-system-FreeBSD-5.5 5.5 Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.408.2.12 src/sys/sys/param.h:1.408.2.13 --- src/sys/sys/param.h:1.408.2.12 Sun May 12 23:49:43 2013 +++ src/sys/sys/param.h Sun May 19 21:22:01 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.408.2.12 2013/05/12 23:49:43 riz Exp $ */ +/* $NetBSD: param.h,v 1.408.2.13 2013/05/19 21:22:01 riz Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -63,7 +63,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 60100 /* NetBSD 6.1 */ +#define __NetBSD_Version__ 60100 /* NetBSD 6.1_STABLE */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) = __NetBSD_Version__)
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Sun May 19 21:22:29 UTC 2013 Added Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Welcome to 6.1_STABLE! To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/doc/CHANGES-6.2 diff -u /dev/null src/doc/CHANGES-6.2:1.1.2.1 --- /dev/null Sun May 19 21:22:29 2013 +++ src/doc/CHANGES-6.2 Sun May 19 21:22:29 2013 @@ -0,0 +1,10 @@ +# $NetBSD: CHANGES-6.2,v 1.1.2.1 2013/05/19 21:22:29 riz Exp $ + +A complete list of changes from the 6.1 release until the 6.2 release: + +doc/README.filespatched by hand +gnu/usr.bin/groff/tmac/mdoc.local patched by hand +sys/sys/param.h patched by hand + + Welcome to 6.1_STABLE! +
CVS commit: [netbsd-6-1] src
Module Name:src Committed By: riz Date: Sun May 19 21:44:51 UTC 2013 Modified Files: src/doc [netbsd-6-1]: README.files src/gnu/usr.bin/groff/tmac [netbsd-6-1]: mdoc.local src/sys/sys [netbsd-6-1]: param.h Added Files: src/doc [netbsd-6-1]: CHANGES-6.1.1 Log Message: Welcome to 6.1.0_PATCH! To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/doc/CHANGES-6.1.1 cvs rdiff -u -r1.4.20.2 -r1.4.20.2.2.1 src/doc/README.files cvs rdiff -u -r1.66.2.2 -r1.66.2.2.2.1 src/gnu/usr.bin/groff/tmac/mdoc.local cvs rdiff -u -r1.408.2.12 -r1.408.2.12.2.1 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/README.files diff -u src/doc/README.files:1.4.20.2 src/doc/README.files:1.4.20.2.2.1 --- src/doc/README.files:1.4.20.2 Sun May 12 16:58:36 2013 +++ src/doc/README.files Sun May 19 21:44:51 2013 @@ -1,7 +1,9 @@ -# $NetBSD: README.files,v 1.4.20.2 2013/05/12 16:58:36 riz Exp $ +# $NetBSD: README.files,v 1.4.20.2.2.1 2013/05/19 21:44:51 riz Exp $ What's in this directory: +CHANGES-6.1.1 Changes between the 6.1 and 6.1.1 releases. + CHANGES-6.1 Changes between the 6.0 and 6.1 releases. CHANGES-6.0 Changes between the creation of the netbsd-6 branch and Index: src/gnu/usr.bin/groff/tmac/mdoc.local diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.66.2.2 src/gnu/usr.bin/groff/tmac/mdoc.local:1.66.2.2.2.1 --- src/gnu/usr.bin/groff/tmac/mdoc.local:1.66.2.2 Wed Oct 17 20:53:29 2012 +++ src/gnu/usr.bin/groff/tmac/mdoc.local Sun May 19 21:44:51 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: mdoc.local,v 1.66.2.2 2012/10/17 20:53:29 riz Exp $ +.\ $NetBSD: mdoc.local,v 1.66.2.2.2.1 2013/05/19 21:44:51 riz Exp $ .\ .\ Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -44,9 +44,9 @@ .as doc-str-St--ieee1275-94 (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq]) . .\ Default .Os value -.ds doc-operating-system NetBSD\~6.1 +.ds doc-operating-system NetBSD\~6.1.1 .\ Default footer operating system value -.ds doc-default-operating-system NetBSD\~6.1 +.ds doc-default-operating-system NetBSD\~6.1.1 .\ Other known versions, not yet in groff distribution .ds doc-operating-system-NetBSD-1.3.3 1.3.3 .ds doc-operating-system-NetBSD-1.6.3 1.6.3 @@ -60,6 +60,7 @@ .ds doc-operating-system-NetBSD-5.15.1 .ds doc-operating-system-NetBSD-6.06.0 .ds doc-operating-system-NetBSD-6.16.1 +.ds doc-operating-system-NetBSD-6.1.1 6.1.1 .ds doc-operating-system-FreeBSD-4.11 4.11 .ds doc-operating-system-FreeBSD-5.4 5.4 .ds doc-operating-system-FreeBSD-5.5 5.5 Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.408.2.12 src/sys/sys/param.h:1.408.2.12.2.1 --- src/sys/sys/param.h:1.408.2.12 Sun May 12 23:49:43 2013 +++ src/sys/sys/param.h Sun May 19 21:44:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.408.2.12 2013/05/12 23:49:43 riz Exp $ */ +/* $NetBSD: param.h,v 1.408.2.12.2.1 2013/05/19 21:44:51 riz Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -63,7 +63,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 60100 /* NetBSD 6.1 */ +#define __NetBSD_Version__ 60101 /* NetBSD 6.1.0_PATCH */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) = __NetBSD_Version__) Added files: Index: src/doc/CHANGES-6.1.1 diff -u /dev/null src/doc/CHANGES-6.1.1:1.1.2.1 --- /dev/null Sun May 19 21:44:51 2013 +++ src/doc/CHANGES-6.1.1 Sun May 19 21:44:51 2013 @@ -0,0 +1,12 @@ +# $NetBSD: CHANGES-6.1.1,v 1.1.2.1 2013/05/19 21:44:51 riz Exp $ + +A complete list of changes from the NetBSD 6.1 release to the NetBSD 6.1.1 +release: + +doc/README.filespatched by hand +gnu/usr.bin/groff/tmac/mdoc.local patched by hand +sys/sys/param.h patched by hand + + Welcome to 6.1.0_PATCH. + [riz] +
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: christos Date: Sun May 19 21:45:00 UTC 2013 Modified Files: src/lib/libc/stdio: vasprintf.c vswprintf.c Log Message: don't cast malloc To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/stdio/vasprintf.c cvs rdiff -u -r1.5 -r1.6 src/lib/libc/stdio/vswprintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/vasprintf.c diff -u src/lib/libc/stdio/vasprintf.c:1.16 src/lib/libc/stdio/vasprintf.c:1.17 --- src/lib/libc/stdio/vasprintf.c:1.16 Fri May 17 08:55:57 2013 +++ src/lib/libc/stdio/vasprintf.c Sun May 19 17:45:00 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vasprintf.c,v 1.16 2013/05/17 12:55:57 joerg Exp $ */ +/* $NetBSD: vasprintf.c,v 1.17 2013/05/19 21:45:00 christos Exp $ */ /* * Copyright (c) 1997 Todd C. Miller todd.mil...@courtesan.com @@ -29,7 +29,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: vasprintf.c,v 1.16 2013/05/17 12:55:57 joerg Exp $); +__RCSID($NetBSD: vasprintf.c,v 1.17 2013/05/19 21:45:00 christos Exp $); #endif /* LIBC_SCCS and not lint */ #include namespace.h @@ -63,7 +63,7 @@ vasprintf_l(char **str, locale_t loc, co _FILEEXT_SETUP(f, fext); f._file = -1; f._flags = __SWR | __SSTR | __SALC; - f._bf._base = f._p = (unsigned char *)malloc(128); + f._bf._base = f._p = malloc(128); if (f._bf._base == NULL) goto err; f._bf._size = f._w = 127; /* Leave room for the NUL */ Index: src/lib/libc/stdio/vswprintf.c diff -u src/lib/libc/stdio/vswprintf.c:1.5 src/lib/libc/stdio/vswprintf.c:1.6 --- src/lib/libc/stdio/vswprintf.c:1.5 Fri May 17 08:55:57 2013 +++ src/lib/libc/stdio/vswprintf.c Sun May 19 17:45:00 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vswprintf.c,v 1.5 2013/05/17 12:55:57 joerg Exp $ */ +/* $NetBSD: vswprintf.c,v 1.6 2013/05/19 21:45:00 christos Exp $ */ /* * Copyright (c) 1997 Todd C. Miller todd.mil...@courtesan.com @@ -32,7 +32,7 @@ #if 0 __FBSDID($FreeBSD: src/lib/libc/stdio/vswprintf.c,v 1.6 2005/02/21 19:41:44 fjoe Exp $); #else -__RCSID($NetBSD: vswprintf.c,v 1.5 2013/05/17 12:55:57 joerg Exp $); +__RCSID($NetBSD: vswprintf.c,v 1.6 2013/05/19 21:45:00 christos Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -70,7 +70,7 @@ vswprintf_l(wchar_t * __restrict s, size _FILEEXT_SETUP(f, fext); f._file = -1; f._flags = __SWR | __SSTR | __SALC; - f._bf._base = f._p = (unsigned char *)malloc(128); + f._bf._base = f._p = malloc(128); if (f._bf._base == NULL) { errno = ENOMEM; return -1;
CVS commit: [netbsd-6] src/sys/dev/usb
Module Name:src Committed By: riz Date: Sun May 19 21:51:00 UTC 2013 Modified Files: src/sys/dev/usb [netbsd-6]: usb_quirks.c usbdevs Log Message: Pull up following revision(s) (requested by garbled in ticket #849): sys/dev/usb/usb_quirks.c: revision 1.78 sys/dev/usb/usbdevs: revision 1.639 Add my tripplite UPS If the tripplite SMARTLCD ups connects as a usbhid device, it doesn't work at all, connect as ugen instead. Verified working with ups-nut. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.74.2.1 src/sys/dev/usb/usb_quirks.c cvs rdiff -u -r1.607.2.7 -r1.607.2.8 src/sys/dev/usb/usbdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usb_quirks.c diff -u src/sys/dev/usb/usb_quirks.c:1.74 src/sys/dev/usb/usb_quirks.c:1.74.2.1 --- src/sys/dev/usb/usb_quirks.c:1.74 Sat Feb 11 05:27:23 2012 +++ src/sys/dev/usb/usb_quirks.c Sun May 19 21:51:00 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_quirks.c,v 1.74 2012/02/11 05:27:23 plunky Exp $ */ +/* $NetBSD: usb_quirks.c,v 1.74.2.1 2013/05/19 21:51:00 riz Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.30 2003/01/02 04:15:55 imp Exp $ */ /* @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: usb_quirks.c,v 1.74 2012/02/11 05:27:23 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: usb_quirks.c,v 1.74.2.1 2013/05/19 21:51:00 riz Exp $); #include sys/param.h #include sys/systm.h @@ -63,6 +63,8 @@ Static const struct usbd_quirk_entry { ANY, { UQ_HID_IGNORE }}, { USB_VENDOR_TRIPPLITE2, USB_PRODUCT_TRIPPLITE2_UPS, ANY, { UQ_HID_IGNORE }}, + { USB_VENDOR_TRIPPLITE2, USB_PRODUCT_TRIPPLITE2_SMARTLCD, + ANY, { UQ_HID_IGNORE }}, { USB_VENDOR_MISC, USB_PRODUCT_MISC_WISPY_24X, ANY, { UQ_HID_IGNORE }}, { USB_VENDOR_KYE, USB_PRODUCT_KYE_NICHE, 0x100, { UQ_NO_SET_PROTO}}, Index: src/sys/dev/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.607.2.7 src/sys/dev/usb/usbdevs:1.607.2.8 --- src/sys/dev/usb/usbdevs:1.607.2.7 Wed Feb 13 01:36:17 2013 +++ src/sys/dev/usb/usbdevs Sun May 19 21:51:00 2013 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.607.2.7 2013/02/13 01:36:17 riz Exp $ +$NetBSD: usbdevs,v 1.607.2.8 2013/05/19 21:51:00 riz Exp $ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -2899,6 +2899,7 @@ product TRENDNET RTL8188CU 0x648b RTL818 /* Tripp-Lite products */ product TRIPPLITE U209 0x2008 U209 Serial adapter product TRIPPLITE2 UPS 0x1007 Tripp Lite UPS +product TRIPPLITE2 SMARTLCD 0x2009 SmartLCD UPS /* Trumpion products */ product TRUMPION T33521 0x1003 USB/MP3 decoder
CVS commit: [netbsd-6] src/sys/dev/usb
Module Name:src Committed By: riz Date: Sun May 19 21:51:46 UTC 2013 Modified Files: src/sys/dev/usb [netbsd-6]: usbdevs.h usbdevs_data.h Log Message: Regen for ticket 849. To generate a diff of this commit: cvs rdiff -u -r1.600.2.7 -r1.600.2.8 src/sys/dev/usb/usbdevs.h cvs rdiff -u -r1.601.2.7 -r1.601.2.8 src/sys/dev/usb/usbdevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbdevs.h diff -u src/sys/dev/usb/usbdevs.h:1.600.2.7 src/sys/dev/usb/usbdevs.h:1.600.2.8 --- src/sys/dev/usb/usbdevs.h:1.600.2.7 Wed Feb 13 01:36:17 2013 +++ src/sys/dev/usb/usbdevs.h Sun May 19 21:51:46 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs.h,v 1.600.2.7 2013/02/13 01:36:17 riz Exp $ */ +/* $NetBSD: usbdevs.h,v 1.600.2.8 2013/05/19 21:51:46 riz Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.607.2.6 2012/10/24 03:45:59 riz Exp + * NetBSD: usbdevs,v 1.607.2.8 2013/05/19 21:51:00 riz Exp */ /* @@ -2906,6 +2906,7 @@ /* Tripp-Lite products */ #define USB_PRODUCT_TRIPPLITE_U209 0x2008 /* U209 Serial adapter */ #define USB_PRODUCT_TRIPPLITE2_UPS 0x1007 /* Tripp Lite UPS */ +#define USB_PRODUCT_TRIPPLITE2_SMARTLCD 0x2009 /* SmartLCD UPS */ /* Trumpion products */ #define USB_PRODUCT_TRUMPION_T33521 0x1003 /* USB/MP3 decoder */ Index: src/sys/dev/usb/usbdevs_data.h diff -u src/sys/dev/usb/usbdevs_data.h:1.601.2.7 src/sys/dev/usb/usbdevs_data.h:1.601.2.8 --- src/sys/dev/usb/usbdevs_data.h:1.601.2.7 Wed Feb 13 01:36:18 2013 +++ src/sys/dev/usb/usbdevs_data.h Sun May 19 21:51:46 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs_data.h,v 1.601.2.7 2013/02/13 01:36:18 riz Exp $ */ +/* $NetBSD: usbdevs_data.h,v 1.601.2.8 2013/05/19 21:51:46 riz Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.607.2.6 2012/10/24 03:45:59 riz Exp + * NetBSD: usbdevs,v 1.607.2.8 2013/05/19 21:51:00 riz Exp */ /* @@ -8647,6 +8647,10 @@ const struct usb_product usb_products[] Tripp Lite UPS, }, { + USB_VENDOR_TRIPPLITE2, USB_PRODUCT_TRIPPLITE2_SMARTLCD, + SmartLCD UPS, + }, + { USB_VENDOR_TRUMPION, USB_PRODUCT_TRUMPION_T33521, USB/MP3 decoder, }, @@ -9135,4 +9139,4 @@ const struct usb_product usb_products[] Prestige, }, }; -const int usb_nproducts = 1768; +const int usb_nproducts = 1769;
CVS commit: [netbsd-6] src/sys/dev/usb
Module Name:src Committed By: riz Date: Sun May 19 21:54:27 UTC 2013 Modified Files: src/sys/dev/usb [netbsd-6]: usb.h Log Message: Pull up following revision(s) (requested by skrll in ticket #850): sys/dev/usb/usb.h: revision 1.101 sys/dev/usb/usb.h: revision 1.102 sys/dev/usb/usb.h: revision 1.103 Add some defines from the USB 2.0 specification and suppliments. Also, add some accessor macros while I'm here. Add a UPS_PORT_L1 define Add a UPS_C_PORT_L1 define To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.93.10.1 src/sys/dev/usb/usb.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usb.h diff -u src/sys/dev/usb/usb.h:1.93 src/sys/dev/usb/usb.h:1.93.10.1 --- src/sys/dev/usb/usb.h:1.93 Tue Aug 23 16:16:43 2011 +++ src/sys/dev/usb/usb.h Sun May 19 21:54:27 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.h,v 1.93 2011/08/23 16:16:43 christos Exp $ */ +/* $NetBSD: usb.h,v 1.93.10.1 2013/05/19 21:54:27 riz Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $ */ /* @@ -96,6 +96,7 @@ MALLOC_DECLARE(M_USBHC); #define USB_STACK_VERSION 2 #define USB_MAX_DEVICES 128 +#define USB_MIN_DEVICES 2 /* unused + root HUB */ #define USB_START_ADDR 0 #define USB_CONTROL_ENDPOINT 0 @@ -145,11 +146,16 @@ typedef struct { uWord wLength; } UPACKED usb_device_request_t; +#define UT_GET_DIR(a) ((a) 0x80) #define UT_WRITE 0x00 #define UT_READ 0x80 + +#define UT_GET_TYPE(a) ((a) 0x60) #define UT_STANDARD 0x00 #define UT_CLASS 0x20 #define UT_VENDOR 0x40 + +#define UT_GET_RECIPIENT(a) ((a) 0x1f) #define UT_DEVICE 0x00 #define UT_INTERFACE 0x01 #define UT_ENDPOINT 0x02 @@ -178,7 +184,7 @@ typedef struct { #define UT_WRITE_VENDOR_OTHER (UT_WRITE | UT_VENDOR | UT_OTHER) #define UT_WRITE_VENDOR_ENDPOINT (UT_WRITE | UT_VENDOR | UT_ENDPOINT) -/* Requests */ +/* Standard Requests Codes from the USB 2.0 spec, table 9-4 */ #define UR_GET_STATUS 0x00 #define UR_CLEAR_FEATURE 0x01 #define UR_SET_FEATURE 0x03 @@ -208,10 +214,16 @@ typedef struct { #define UR_SET_INTERFACE 0x0b #define UR_SYNCH_FRAME 0x0c -/* Feature numbers */ +/* + * Feature selectors. USB 2.0 spec, table 9-6 and OTG and EH suppliment, + * table 6-2 + */ #define UF_ENDPOINT_HALT 0 #define UF_DEVICE_REMOTE_WAKEUP 1 #define UF_TEST_MODE 2 +#define UF_DEVICE_B_HNP_ENABLE 3 +#define UF_DEVICE_A_HNP_SUPPORT 4 +#define UF_DEVICE_A_ALT_HNP_SUPPORT 5 #define USB_MAX_IPACKET 8 /* maximum size of the initial packet */ @@ -330,7 +342,10 @@ typedef struct { #define UR_GET_TT_STATE 0x0a #define UR_STOP_TT 0x0b -/* Hub features */ +/* + * Hub features from USB 2.0 spec, table 11-17 and updated by the + * LPM ECN table 4-7. + */ #define UHF_C_HUB_LOCAL_POWER 0 #define UHF_C_HUB_OVER_CURRENT 1 #define UHF_PORT_CONNECTION 0 @@ -340,6 +355,7 @@ typedef struct { #define UHF_PORT_RESET 4 #define UHF_PORT_POWER 8 #define UHF_PORT_LOW_SPEED 9 +#define UHF_PORT_L1 10 #define UHF_C_PORT_CONNECTION 16 #define UHF_C_PORT_ENABLE 17 #define UHF_C_PORT_SUSPEND 18 @@ -347,6 +363,7 @@ typedef struct { #define UHF_C_PORT_RESET 20 #define UHF_PORT_TEST 21 #define UHF_PORT_INDICATOR 22 +#define UHF_C_PORT_L1 23 typedef struct { uByte bDescLength; @@ -434,6 +451,7 @@ typedef struct { #define UPS_SUSPEND 0x0004 #define UPS_OVERCURRENT_INDICATOR 0x0008 #define UPS_RESET 0x0010 +#define UPS_PORT_L1 0x0020 #define UPS_PORT_POWER 0x0100 #define UPS_FULL_SPEED 0x /* for completeness */ #define UPS_LOW_SPEED 0x0200 @@ -446,6 +464,7 @@ typedef struct { #define UPS_C_SUSPEND 0x0004 #define UPS_C_OVERCURRENT_INDICATOR 0x0008 #define UPS_C_PORT_RESET 0x0010 +#define UPS_C_PORT_L1 0x0020 } UPACKED usb_port_status_t; /* Device class codes */
CVS commit: [netbsd-6] src/crypto/external/bsd/heimdal/bin/krb5-config
Module Name:src Committed By: riz Date: Sun May 19 22:18:06 UTC 2013 Modified Files: src/crypto/external/bsd/heimdal/bin/krb5-config [netbsd-6]: Makefile Log Message: Pull up following revision(s) (requested by joerg in ticket #871): crypto/external/bsd/heimdal/bin/krb5-config/Makefile: revision 1.2 Don't force pthread linkage. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.6.1 \ src/crypto/external/bsd/heimdal/bin/krb5-config/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/heimdal/bin/krb5-config/Makefile diff -u src/crypto/external/bsd/heimdal/bin/krb5-config/Makefile:1.1 src/crypto/external/bsd/heimdal/bin/krb5-config/Makefile:1.1.6.1 --- src/crypto/external/bsd/heimdal/bin/krb5-config/Makefile:1.1 Wed Apr 13 19:16:46 2011 +++ src/crypto/external/bsd/heimdal/bin/krb5-config/Makefile Sun May 19 22:18:06 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/04/13 19:16:46 elric Exp $ +# $NetBSD: Makefile,v 1.1.6.1 2013/05/19 22:18:06 riz Exp $ .include bsd.own.mk .include ${.CURDIR}/../../Makefile.inc @@ -24,7 +24,7 @@ krb5-config: krb5-config.in -e s!@LIB_dlopen\@!!g \ -e s!@LIB_door_create\@!!g \ -e s!@LIB_pkinit\@!-lhx509!g \ - -e s!@PTHREAD_LIBADD\@!-lpthread!g \ + -e s!@PTHREAD_LIBADD\@!!g \ -e s!@LIBS\@!!g \ ${HEIMDIST}/tools/krb5-config.in $@ chmod +x $@
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Sun May 19 22:20:17 UTC 2013 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Tickets 849, 850, 871 To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.1 src/doc/CHANGES-6.2:1.1.2.2 --- src/doc/CHANGES-6.2:1.1.2.1 Sun May 19 21:22:29 2013 +++ src/doc/CHANGES-6.2 Sun May 19 22:20:17 2013 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.1 2013/05/19 21:22:29 riz Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.2 2013/05/19 22:20:17 riz Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -8,3 +8,21 @@ sys/sys/param.h patched by hand Welcome to 6.1_STABLE! +sys/dev/usb/usb_quirks.c 1.78 +sys/dev/usb/usbdevs1.639 +sys/dev/usb/usbdevs.hregen +sys/dev/usb/usbdevs_data.h regen + + Fix the detection of the tripplite USB SMARTLCD UPS. + [garbled, ticket #849] + +sys/dev/usb/usb.h1.101-1.103 + + Add some defines and macros. + [skrll, ticket #850] + +crypto/external/bsd/heimdal/bin/krb5-config/Makefile 1.2 + + Don't force pthread linkage. + [joerg, ticket #871] +