CVS commit: src/sys/arch/vax/vax
Module Name:src Committed By: jklos Date: Tue Dec 16 11:23:11 UTC 2014 Modified Files: src/sys/arch/vax/vax: machdep.c Log Message: Fix leds.h include. To generate a diff of this commit: cvs rdiff -u -r1.190 -r1.191 src/sys/arch/vax/vax/machdep.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/vax/vax/machdep.c diff -u src/sys/arch/vax/vax/machdep.c:1.190 src/sys/arch/vax/vax/machdep.c:1.191 --- src/sys/arch/vax/vax/machdep.c:1.190 Mon Mar 24 20:06:33 2014 +++ src/sys/arch/vax/vax/machdep.c Tue Dec 16 11:23:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.190 2014/03/24 20:06:33 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.191 2014/12/16 11:23:11 jklos Exp $ */ /* * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. @@ -83,7 +83,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.190 2014/03/24 20:06:33 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.191 2014/12/16 11:23:11 jklos Exp $); #include opt_ddb.h #include opt_compat_netbsd.h @@ -122,6 +122,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v #include machine/nexus.h #include machine/reg.h #include machine/scb.h +#include machine/leds.h #include vax/vax/gencons.h #ifdef DDB @@ -132,7 +133,6 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v #include smg.h #include ksyms.h -#include leds.h #define DEV_LEDS 13 /* minor device 13 is leds */
CVS commit: src/sys/arch/vax/vsa
Module Name:src Committed By: jklos Date: Tue Dec 16 11:34:17 UTC 2014 Added Files: src/sys/arch/vax/vsa: lcg.c Log Message: Adds VAXstation VLC and 4000/60 framebuffer support. From Blaz Antonic and updated by BjörnJohannesson. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/vax/vsa/lcg.c 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/vax/vsa/lcg.c diff -u /dev/null src/sys/arch/vax/vsa/lcg.c:1.1 --- /dev/null Tue Dec 16 11:34:17 2014 +++ src/sys/arch/vax/vsa/lcg.c Tue Dec 16 11:34:17 2014 @@ -0,0 +1,1289 @@ +/* $NetBSD: lcg.c,v 1.1 2014/12/16 11:34:17 jklos Exp $ */ +/* + * LCG accelerated framebuffer driver + * Copyright (c) 2003, 2004 Blaz Antonic + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. All advertising materials mentioning features or use of this software + *must display the abovementioned copyrights + * 4. The name of the author may not be used to endorse or promote products + *derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + */ +/* + * Resurrection and dumb framebuffer mode by Björn Johannesson + * rherdw...@yahoo.com in December 2014 + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: lcg.c,v 1.1 2014/12/16 11:34:17 jklos Exp $); + +#define LCG_NO_ACCEL + +#include sys/param.h +#include sys/device.h +#include sys/systm.h +#include sys/callout.h +#include sys/time.h +#include sys/malloc.h +#include sys/conf.h +#include sys/kernel.h +#include sys/systm.h + +#include machine/vsbus.h +#include machine/sid.h +#include machine/cpu.h +#include machine/lcgreg.h + +#include dev/cons.h + +#include dev/dec/dzreg.h +#include dev/dec/dzvar.h +#include dev/dec/dzkbdvar.h + +#include dev/wscons/wsdisplayvar.h +#include dev/wscons/wsconsio.h +#include dev/wscons/wscons_callbacks.h +#include dev/wsfont/wsfont.h + +#include machine/scb.h + +#include dzkbd.h + +/* Screen hardware defs */ + +#define LCG_FB_ADDR 0x21801000 /* Frame buffer */ + +/* FIFO defines */ +#define LCG_FIFO_SIZE 0x1 /* 64 KB */ +#define LCG_FIFO_WIN_ADDR 0x2018 +#define LCG_FIFO_WIN_SIZE VAX_NBPG +#define LCG_FIFO_ALIGN 0x1 + +/* font rendering defines */ +#define LCG_FONT_ADDR (LCG_FB_ADDR + lcg_fb_size) +#define LCG_FONT_STORAGE_SIZE 0x4 /* 16 KB, enough to accomodate 16x32 font bitmaps */ + +/* register space defines */ +#define LCG_REG_ADDR 0x2010 /* LCG registers */ +#define LCG_REG_SIZE 0x4000 /* 16384 bytes */ +#define LCG_REG(reg) regaddr[(reg / 4)] + +/* LUT defines */ +#define LCG_LUT_ADDR 0x21800800 /* LUT right before onscreen FB */ +#define LCG_LUT_OFFSET 0x0800 +#define LCG_LUT_SIZE 0x800 /* 2048 bytes */ + +#define LCG_BG_COLOR WSCOL_BLACK +#define LCG_FG_COLOR WSCOL_WHITE + +#define LCG_CONFIG 0x200f0010 /* LCG model information */ + +/* implement sanity checks at certain points to ensure safer operation */ +#define LCG_SAFE +//#define LCG_DEBUG + +static int lcg_match(struct device *, struct cfdata *, void *); +static void lcg_attach(struct device *, struct device *, void *); + +struct lcg_softc { + struct device ss_dev; + bus_dmamap_t sc_dm; +}; + +CFATTACH_DECL_NEW(lcg, sizeof(struct lcg_softc), +lcg_match, lcg_attach, NULL, NULL); + +static void lcg_cursor(void *, int, int, int); +static int lcg_mapchar(void *, int, unsigned int *); +static void lcg_putchar(void *, int, int, u_int, long); +static void lcg_copycols(void *, int, int, int,int); +static void lcg_erasecols(void *, int, int, int, long); +static void lcg_copyrows(void *, int, int, int); +static void lcg_eraserows(void *, int, int, long); +static int lcg_allocattr(void *, int, int, int, long *); +static int
CVS commit: src/sys/netinet6
Module Name:src Committed By: roy Date: Tue Dec 16 11:42:27 UTC 2014 Modified Files: src/sys/netinet6: nd6.c nd6.h nd6_nbr.c nd6_rtr.c Log Message: Report route additions/changes/deletions for cached neighbours to userland. To generate a diff of this commit: cvs rdiff -u -r1.155 -r1.156 src/sys/netinet6/nd6.c cvs rdiff -u -r1.60 -r1.61 src/sys/netinet6/nd6.h cvs rdiff -u -r1.102 -r1.103 src/sys/netinet6/nd6_nbr.c cvs rdiff -u -r1.94 -r1.95 src/sys/netinet6/nd6_rtr.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/netinet6/nd6.c diff -u src/sys/netinet6/nd6.c:1.155 src/sys/netinet6/nd6.c:1.156 --- src/sys/netinet6/nd6.c:1.155 Wed Dec 3 01:32:11 2014 +++ src/sys/netinet6/nd6.c Tue Dec 16 11:42:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.c,v 1.155 2014/12/03 01:32:11 christos Exp $ */ +/* $NetBSD: nd6.c,v 1.156 2014/12/16 11:42:27 roy Exp $ */ /* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: nd6.c,v 1.155 2014/12/03 01:32:11 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: nd6.c,v 1.156 2014/12/16 11:42:27 roy Exp $); #include bridge.h #include carp.h @@ -1037,6 +1037,7 @@ nd6_free(struct rtentry *rt, int gc) struct llinfo_nd6 *ln = (struct llinfo_nd6 *)rt-rt_llinfo, *next; struct in6_addr in6 = satocsin6(rt_getkey(rt))-sin6_addr; struct nd_defrouter *dr; + struct rtentry *oldrt; /* * we used to have pfctlinput(PRC_HOSTDEAD) here. @@ -1129,7 +1130,15 @@ nd6_free(struct rtentry *rt, int gc) * caches, and disable the route entry not to be used in already * cached routes. */ - rtrequest(RTM_DELETE, rt_getkey(rt), NULL, rt_mask(rt), 0, NULL); + oldrt = NULL; + rtrequest(RTM_DELETE, rt_getkey(rt), NULL, rt_mask(rt), 0, oldrt); + if (oldrt) { + nd6_rtmsg(RTM_DELETE, oldrt); /* tell user process */ + if (oldrt-rt_refcnt = 0) { + oldrt-rt_refcnt++; + rtfree(oldrt); + } + } return next; } @@ -2059,6 +2068,9 @@ fail: break; } + if (do_update) + nd6_rtmsg(RTM_CHANGE, rt); /* tell user process */ + /* * When the link-layer address of a router changes, select the * best router again. In particular, when the neighbor entry is newly Index: src/sys/netinet6/nd6.h diff -u src/sys/netinet6/nd6.h:1.60 src/sys/netinet6/nd6.h:1.61 --- src/sys/netinet6/nd6.h:1.60 Fri Sep 5 06:08:15 2014 +++ src/sys/netinet6/nd6.h Tue Dec 16 11:42:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.h,v 1.60 2014/09/05 06:08:15 matt Exp $ */ +/* $NetBSD: nd6.h,v 1.61 2014/12/16 11:42:27 roy Exp $ */ /* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */ /* @@ -413,6 +413,7 @@ void nd6_option_init(void *, int, union struct nd_opt_hdr *nd6_option(union nd_opts *); int nd6_options(union nd_opts *); struct rtentry *nd6_lookup(const struct in6_addr *, int, struct ifnet *); +void nd6_rtmsg(int, struct rtentry *); void nd6_setmtu(struct ifnet *); void nd6_llinfo_settimer(struct llinfo_nd6 *, long); void nd6_timer(void *); Index: src/sys/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.102 src/sys/netinet6/nd6_nbr.c:1.103 --- src/sys/netinet6/nd6_nbr.c:1.102 Sun Oct 12 20:05:50 2014 +++ src/sys/netinet6/nd6_nbr.c Tue Dec 16 11:42:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.102 2014/10/12 20:05:50 roy Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.103 2014/12/16 11:42:27 roy Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: nd6_nbr.c,v 1.102 2014/10/12 20:05:50 roy Exp $); +__KERNEL_RCSID(0, $NetBSD: nd6_nbr.c,v 1.103 2014/12/16 11:42:27 roy Exp $); #include opt_inet.h #include opt_ipsec.h @@ -567,6 +567,7 @@ nd6_na_input(struct mbuf *m, int off, in struct sockaddr_dl *sdl; union nd_opts ndopts; struct sockaddr_in6 ssin6; + int rt_announce; if (ip6-ip6_hlim != 255) { nd6log((LOG_ERR, @@ -669,6 +670,7 @@ nd6_na_input(struct mbuf *m, int off, in ((sdl = satosdl(rt-rt_gateway)) == NULL)) goto freeit; + rt_announce = 0; if (ln-ln_state == ND6_LLINFO_INCOMPLETE) { /* * If the link-layer has address, and no lladdr option came, @@ -682,6 +684,7 @@ nd6_na_input(struct mbuf *m, int off, in */ (void)sockaddr_dl_setaddr(sdl, sdl-sdl_len, lladdr, ifp-if_addrlen); + rt_announce = 1; if (is_solicited) { ln-ln_state = ND6_LLINFO_REACHABLE; ln-ln_byhint = 0; @@ -712,11 +715,11 @@ nd6_na_input(struct mbuf *m, int off, in else { if (sdl-sdl_alen) { if (memcmp(lladdr, CLLADDR(sdl), ifp-if_addrlen)) - llchange = 1; + llchange = rt_announce = 1; else llchange = 0; } else -llchange = 1; +llchange = rt_announce = 1; } /* @@ -819,6 +822,8 @@ nd6_na_input(struct mbuf *m, int off, in rt-rt_flags = ~RTF_REJECT; ln-ln_asked = 0; nd6_llinfo_release_pkts(ln, ifp, rt); + if (rt_announce) /* tell
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: nat Date: Tue Dec 16 13:09:33 UTC 2014 Modified Files: src/sys/arch/arm/broadcom: bcm2835_tmr.c Log Message: Clear status of BCM2835_STIMER_M3 only as timer comparison reg 0 and 2 are used by the VideoCore on Raspberry Pi. This fixes audio playback. Addresses PR 48805. This commit was approved by skrll@ To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/broadcom/bcm2835_tmr.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/broadcom/bcm2835_tmr.c diff -u src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.3 src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.4 --- src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.3 Tue Jan 8 12:13:58 2013 +++ src/sys/arch/arm/broadcom/bcm2835_tmr.c Tue Dec 16 13:09:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_tmr.c,v 1.3 2013/01/08 12:13:58 skrll Exp $ */ +/* $NetBSD: bcm2835_tmr.c,v 1.4 2014/12/16 13:09:33 nat Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bcm2835_tmr.c,v 1.3 2013/01/08 12:13:58 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: bcm2835_tmr.c,v 1.4 2014/12/16 13:09:33 nat Exp $); #include sys/param.h #include sys/systm.h @@ -201,7 +201,7 @@ clockhandler(void *arg) if (!(status BCM2835_STIMER_M3)) return 0; - bus_space_write_4(sc-sc_iot, sc-sc_ioh, BCM2835_STIMER_CS, status); + bus_space_write_4(sc-sc_iot, sc-sc_ioh, BCM2835_STIMER_CS, BCM2835_STIMER_M3); hardclock(frame);
CVS commit: src/lib/libpci
Module Name:src Committed By: msaitoh Date: Tue Dec 16 13:38:36 UTC 2014 Modified Files: src/lib/libpci: pci.3 Log Message: Add int showclass argument to pci_devinfo(). The API was changed 10 years ago. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libpci/pci.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpci/pci.3 diff -u src/lib/libpci/pci.3:1.9 src/lib/libpci/pci.3:1.10 --- src/lib/libpci/pci.3:1.9 Fri Jul 25 10:21:34 2014 +++ src/lib/libpci/pci.3 Tue Dec 16 13:38:36 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: pci.3,v 1.9 2014/07/25 10:21:34 wiz Exp $ +.\ $NetBSD: pci.3,v 1.10 2014/12/16 13:38:36 msaitoh Exp $ .\ .\ Copyright 2001 Wasabi Systems, Inc. .\ All rights reserved. @@ -33,7 +33,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd July 24, 2014 +.Dd December 16, 2014 .Dt PCI 3 .Os .Sh NAME @@ -56,7 +56,7 @@ .Ft char * .Fn pci_findvendor pcireg_t id_reg .Ft void -.Fn pci_devinfo pcireg_t id_reg pcireg_t class_reg char *devinfo size_t len +.Fn pci_devinfo pcireg_t id_reg pcireg_t class_reg int showclass char *devinfo size_t len .Ft void .Fn pci_conf_print int pcifd u_int bus u_int dev u_int func .Ft int @@ -128,6 +128,9 @@ The description is placed into the buffe .Fa devinfo ; the size of that buffer is specified in .Fa len . +If +.Fa showclass +is not 0, the class, subclass and interface are added into the buffer. .It Fn pci_conf_print Print the PCI configuration information for the device located at
CVS commit: src/sys/rump/share/man/man7
Module Name:src Committed By: pooka Date: Tue Dec 16 15:33:22 UTC 2014 Modified Files: src/sys/rump/share/man/man7: rumpkernel.7 Log Message: workaround bin/49481 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/share/man/man7/rumpkernel.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/share/man/man7/rumpkernel.7 diff -u src/sys/rump/share/man/man7/rumpkernel.7:1.2 src/sys/rump/share/man/man7/rumpkernel.7:1.3 --- src/sys/rump/share/man/man7/rumpkernel.7:1.2 Tue Dec 2 09:05:15 2014 +++ src/sys/rump/share/man/man7/rumpkernel.7 Tue Dec 16 15:33:22 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: rumpkernel.7,v 1.2 2014/12/02 09:05:15 wiz Exp $ +.\ $NetBSD: rumpkernel.7,v 1.3 2014/12/16 15:33:22 pooka Exp $ .\ .\ Copyright (c) 2008-2014 Antti Kantee. All rights reserved. .\ @@ -92,7 +92,7 @@ available by invoking its internal paged .Rs .%A Antti Kantee .%A Justin Cormack -.%T Rump Kernels: No OS? No Problem! +.%T Rump Kernels: No OS? No Problem! .%D October 2014 .%I USENIX .%J ;login:
CVS commit: [netbsd-7] src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: msaitoh Date: Tue Dec 16 16:18:21 UTC 2014 Modified Files: src/external/gpl3/gdb/dist/gdb [netbsd-7]: armnbsd-tdep.c Log Message: Pull up following revision(s) (requested by martin in ticket #315): external/gpl3/gdb/dist/gdb/armnbsd-tdep.c: revision 1.2 Fix byte order selection for breakpoints: on arm the byte order for code might differ from the generic BFD endianess. Fixes PR toolchain/49445. To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.1.1.3.2.1 \ src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c diff -u src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.1.1.3 src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.1.1.3.2.1 --- src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c:1.1.1.3 Sun Jun 22 23:40:55 2014 +++ src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c Tue Dec 16 16:18:21 2014 @@ -43,7 +43,7 @@ arm_netbsd_init_abi_common (struct gdbar struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); tdep-lowest_pc = 0x8000; - switch (info.byte_order) + switch (info.byte_order_for_code) { case BFD_ENDIAN_LITTLE: tdep-arm_breakpoint = arm_nbsd_arm_le_breakpoint;
CVS commit: [netbsd-7] src/sys/dev/bluetooth
Module Name:src Committed By: msaitoh Date: Tue Dec 16 16:19:36 UTC 2014 Modified Files: src/sys/dev/bluetooth [netbsd-7]: btms.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #330): sys/dev/bluetooth/btms.c: revision 1.12 Added quirk for ELECOM M-XG2BB. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.11.12.1 src/sys/dev/bluetooth/btms.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/dev/bluetooth/btms.c diff -u src/sys/dev/bluetooth/btms.c:1.11 src/sys/dev/bluetooth/btms.c:1.11.12.1 --- src/sys/dev/bluetooth/btms.c:1.11 Sat Oct 27 17:18:15 2012 +++ src/sys/dev/bluetooth/btms.c Tue Dec 16 16:19:36 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: btms.c,v 1.11 2012/10/27 17:18:15 chs Exp $ */ +/* $NetBSD: btms.c,v 1.11.12.1 2014/12/16 16:19:36 msaitoh Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: btms.c,v 1.11 2012/10/27 17:18:15 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: btms.c,v 1.11.12.1 2014/12/16 16:19:36 msaitoh Exp $); #include sys/param.h #include sys/conf.h @@ -86,6 +86,15 @@ __KERNEL_RCSID(0, $NetBSD: btms.c,v 1.1 #include dev/wscons/wsconsio.h #include dev/wscons/wsmousevar.h +#ifdef BTMS_DEBUG +int btms_debug = 0; +#define BTMSDBG(s) if (btms_debug) printf s +#define BTMSDBGN(n,s) if (btms_debug (n)) printf s +#else +#define BTMSDBG(s) +#define BTMSDBGN(n,s) +#endif + #define MAX_BUTTONS 31 #define BUTTON(n) (1 (((n) == 1 || (n) == 2) ? 3 - (n) : (n))) #define NOTMOUSE(f) (((f) (HIO_CONST | HIO_RELATIVE)) != HIO_RELATIVE) @@ -135,6 +144,40 @@ static const struct wsmouse_accessops bt /* bthid methods */ static void btms_input(struct bthidev *, uint8_t *, int); +#ifdef BTMS_DEBUG +static void btms_print_device(struct btms_softc *); +#endif + +/* + * quirks + */ +static const struct btms_quirk { + int vendor; + int product; + + uint32_t flags; +#define BTMS_QUIRK_ELECOM __BIT(0) +} btms_quirk_table[] = { + /* ELECOM M-XG2BB */ + { 0x056e, 0x00d2, BTMS_QUIRK_ELECOM }, +}; + +static uint32_t +btms_lookup_quirk_flags(int vendor, int product) +{ + const struct btms_quirk *q; + int i; + + for (i = 0; i __arraycount(btms_quirk_table); ++i) { + q = btms_quirk_table[i]; + if (vendor == q-vendor product == q-product) + return q-flags; + } + return 0; +} + +static void btms_fixup_elecom(struct bthidev_attach_args *,struct btms_softc *); + /* * * btms autoconf(9) routines @@ -159,11 +202,13 @@ btms_attach(device_t parent, device_t se struct bthidev_attach_args *ba = aux; struct wsmousedev_attach_args wsma; struct hid_location *zloc; - uint32_t flags; + uint32_t flags, quirks; int i, hl; ba-ba_input = btms_input; + quirks = btms_lookup_quirk_flags(ba-ba_vendor, ba-ba_product); + /* control the horizontal */ hl = hid_locate(ba-ba_desc, ba-ba_dlen, @@ -265,12 +310,19 @@ btms_attach(device_t parent, device_t se } sc-sc_num_buttons = i - 1; + if (ISSET(quirks, BTMS_QUIRK_ELECOM)) + btms_fixup_elecom(ba, sc); + aprint_normal(: %d button%s%s%s%s.\n, sc-sc_num_buttons, sc-sc_num_buttons == 1 ? : s, sc-sc_flags BTMS_HASW ? , W : , sc-sc_flags BTMS_HASZ ? and Z dir : , sc-sc_flags BTMS_HASW ? s : ); +#ifdef BTMS_DEBUG + if (btms_debug) + btms_print_device(sc); +#endif wsma.accessops = btms_wsmouse_accessops; wsma.accesscookie = sc; @@ -354,6 +406,16 @@ btms_input(struct bthidev *hidev, uint8_ if (sc-sc_wsmouse == NULL || sc-sc_enabled == 0) return; +#ifdef BTMS_DEBUG + if (btms_debug 9) { + printf(%s: data: , __func__); + for (i = 0; i len; ++i) { + printf(%02x, data[i]); + } + printf(\n); + } +#endif + dx = hid_get_data(data, sc-sc_loc_x); dy = -hid_get_data(data, sc-sc_loc_y); dz = hid_get_data(data, sc-sc_loc_z); @@ -367,6 +429,8 @@ btms_input(struct bthidev *hidev, uint8_ if (hid_get_data(data, sc-sc_loc_button[i])) buttons |= BUTTON(i); + BTMSDBGN(9,(%s: dx=%d, dy=%d, dz=%d, dw=%d, buttons=0x%08x\n, + __func__, dx, dy, dz, dw, buttons)); if (dx != 0 || dy != 0 || dz != 0 || dw != 0 || buttons != sc-sc_buttons) { sc-sc_buttons = buttons; @@ -378,3 +442,51 @@ btms_input(struct bthidev *hidev, uint8_ splx(s); } } + +#ifdef BTMS_DEBUG +static void +btms_print_device(struct btms_softc *sc) +{ + int i; + + printf(btms: X: pos=%d, size=%d\n, + sc-sc_loc_x.pos, sc-sc_loc_x.size); + printf(btms: Y: pos=%d, size=%d\n, + sc-sc_loc_y.pos, sc-sc_loc_y.size); + if (sc-sc_flags BTMS_HASZ) { + printf(btms: Z: pos=%d, size=%d%s\n, + sc-sc_loc_z.pos, sc-sc_loc_z.size, + ((sc-sc_flags BTMS_REVZ) ? , REVZ : )); + } + if (sc-sc_flags BTMS_HASW) { + printf(btms: W: pos=%d, size=%d\n, + sc-sc_loc_w.pos, sc-sc_loc_w.size); + } + + for (i = 0; i
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: msaitoh Date: Tue Dec 16 16:21:35 UTC 2014 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Ticket 315 and 330. To generate a diff of this commit: cvs rdiff -u -r1.1.2.132 -r1.1.2.133 src/doc/CHANGES-7.0 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-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.132 src/doc/CHANGES-7.0:1.1.2.133 --- src/doc/CHANGES-7.0:1.1.2.132 Mon Dec 15 11:57:50 2014 +++ src/doc/CHANGES-7.0 Tue Dec 16 16:21:35 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.132 2014/12/15 11:57:50 martin Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.133 2014/12/16 16:21:35 msaitoh Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -3586,4 +3586,14 @@ sys/arch/arm/broadcom/bcm2835_emmc.c 1. Fixes PR/49463. [mlelstv, ticket #328] +external/gpl3/gdb/dist/gdb/armnbsd-tdep.c 1.2 + Fix byte order selection for breakpoints: on arm the byte order for + code might differ from the generic BFD endianess. + Fixes PR toolchain/49445. + [martin, ticket #315] + +sys/dev/bluetooth/btms.c 1.12 + + Added quirk for ELECOM M-XG2BB. + [nonaka, ticket #330]
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Tue Dec 16 17:00:17 UTC 2014 Modified Files: src/lib/librumpuser: rumpuser_pth.c Log Message: With glibc on ARM kthread_exit() aborts because pthread_exit() fails to unwind the stack. Add a temporary workaround where we simply don't allow the thread to exit (a kernel thread exit is a relatively uncommon event in a rump kernel anyway). To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/lib/librumpuser/rumpuser_pth.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/librumpuser/rumpuser_pth.c diff -u src/lib/librumpuser/rumpuser_pth.c:1.43 src/lib/librumpuser/rumpuser_pth.c:1.44 --- src/lib/librumpuser/rumpuser_pth.c:1.43 Tue Nov 4 19:05:17 2014 +++ src/lib/librumpuser/rumpuser_pth.c Tue Dec 16 17:00:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_pth.c,v 1.43 2014/11/04 19:05:17 pooka Exp $ */ +/* $NetBSD: rumpuser_pth.c,v 1.44 2014/12/16 17:00:17 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser_pth.c,v 1.43 2014/11/04 19:05:17 pooka Exp $); +__RCSID($NetBSD: rumpuser_pth.c,v 1.44 2014/12/16 17:00:17 pooka Exp $); #endif /* !lint */ #include sys/queue.h @@ -104,6 +104,17 @@ __dead void rumpuser_thread_exit(void) { + /* + * FIXXXME: with glibc on ARM pthread_exit() aborts because + * it fails to unwind the stack. In the typical case, only + * the mountroothook thread will exit and even that's + * conditional on vfs being present. + */ +#if (defined(__ARMEL__) || defined(__ARMEB__)) defined(__GLIBC__) + for (;;) + pause(); +#endif + pthread_exit(NULL); }
CVS commit: src/usr.bin/mail
Module Name:src Committed By: christos Date: Tue Dec 16 19:30:24 UTC 2014 Modified Files: src/usr.bin/mail: cmd3.c extern.h fio.c mail.1 names.c send.c Log Message: Fix various security related issues: 0001. Do not recognize paths, mail folders, and pipes in mail addresses by default. That avoids a direct command injection with syntactically valid email addresses starting with |. Such addresses can be specified both on the command line, the mail headers (with -t) or in address lines copied over from previous while replying. This was assigned CVE-2014-7844 for some versions of BSD mailx. It is documented behavior for Heirloom mailx, and was mentioned in an old technical report about BSD mailx (which does not usually make its way into operating system installations). The patch switches off this processing and updates the documentation. Added expandaddr option to explicitly enable this behavior. 0002. When invoking sendmail, prevent option processing for email address arguments. This prevents changing e.g. the Postfix configuration file in unexpected ways. This behavior was documented for BSD mailx (sort of), but not for Heirloom mailx. We did not assign a CVE to this because it is more of a missing feature, and code invoking mailx needs adjustment in the caller as well. Fixed. 0003. Make wordexp support mandatory. (No functional change.) Fixed (replaced explicit shell pipe implementation). 0004. Prevent command execution in the expand function, which is IMHO unexpected. (Not really required with patch 1, and there is still information disclosure/DoS potential if this expansion occurs.) This is a historic vulnerability already fixed in the Debian package, retroactively assigned CVE-2004-2771: Fixed (as part of the pipe replacement with wordexp). To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.bin/mail/cmd3.c cvs rdiff -u -r1.32 -r1.33 src/usr.bin/mail/extern.h cvs rdiff -u -r1.40 -r1.41 src/usr.bin/mail/fio.c cvs rdiff -u -r1.60 -r1.61 src/usr.bin/mail/mail.1 cvs rdiff -u -r1.30 -r1.31 src/usr.bin/mail/names.c cvs rdiff -u -r1.37 -r1.38 src/usr.bin/mail/send.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.bin/mail/cmd3.c diff -u src/usr.bin/mail/cmd3.c:1.42 src/usr.bin/mail/cmd3.c:1.43 --- src/usr.bin/mail/cmd3.c:1.42 Sun Apr 29 19:50:22 2012 +++ src/usr.bin/mail/cmd3.c Tue Dec 16 14:30:24 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cmd3.c,v 1.42 2012/04/29 23:50:22 christos Exp $ */ +/* $NetBSD: cmd3.c,v 1.43 2014/12/16 19:30:24 christos Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)cmd3.c 8.2 (Berkeley) 4/20/95; #else -__RCSID($NetBSD: cmd3.c,v 1.42 2012/04/29 23:50:22 christos Exp $); +__RCSID($NetBSD: cmd3.c,v 1.43 2014/12/16 19:30:24 christos Exp $); #endif #endif /* not lint */ @@ -577,7 +577,7 @@ bounce(void *v) if (hdr.h_to == NULL) return 1; - smargs = unpack(hdr.h_to); + smargs = unpack(NULL, hdr.h_to); for (ip = msgvec; *ip; ip++) { int e; if ((e = bounce_one(*ip, smargs, hdr.h_to)) != 0) Index: src/usr.bin/mail/extern.h diff -u src/usr.bin/mail/extern.h:1.32 src/usr.bin/mail/extern.h:1.33 --- src/usr.bin/mail/extern.h:1.32 Tue Feb 28 17:30:44 2012 +++ src/usr.bin/mail/extern.h Tue Dec 16 14:30:24 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.32 2012/02/28 22:30:44 joerg Exp $ */ +/* $NetBSD: extern.h,v 1.33 2014/12/16 19:30:24 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * @(#)extern.h 8.2 (Berkeley) 4/20/95 - * $NetBSD: extern.h,v 1.32 2012/02/28 22:30:44 joerg Exp $ + * $NetBSD: extern.h,v 1.33 2014/12/16 19:30:24 christos Exp $ */ #ifndef __EXTERN_H__ @@ -224,7 +224,7 @@ struct name * extract(char [], int); struct name * gexpand(struct name *, struct grouphead *, int, int); struct name * nalloc(char [], int); struct name * outof(struct name *, FILE *, struct header *); -const char ** unpack(struct name *); +const char ** unpack(struct name *, struct name *); struct name * usermap(struct name *); #if 0 void prettyprint(struct name *); /* commented out? */ Index: src/usr.bin/mail/fio.c diff -u src/usr.bin/mail/fio.c:1.40 src/usr.bin/mail/fio.c:1.41 --- src/usr.bin/mail/fio.c:1.40 Sat Mar 9 14:43:07 2013 +++ src/usr.bin/mail/fio.c Tue Dec 16 14:30:24 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fio.c,v 1.40 2013/03/09 19:43:07 christos Exp $ */ +/* $NetBSD: fio.c,v 1.41 2014/12/16 19:30:24 christos Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)fio.c 8.2 (Berkeley) 4/20/95; #else -__RCSID($NetBSD: fio.c,v 1.40 2013/03/09 19:43:07 christos Exp $); +__RCSID($NetBSD: fio.c,v 1.41 2014/12/16 19:30:24 christos Exp $); #endif #endif /* not lint */ @@ -42,6 +42,7 @@
CVS commit: src/lib/libpthread
Module Name:src Committed By: pooka Date: Tue Dec 16 20:05:54 UTC 2014 Modified Files: src/lib/libpthread: Makefile pthread.c pthread_int.h Added Files: src/lib/libpthread: pthread_makelwp.h pthread_makelwp_netbsd.c Log Message: Allow for arbitrary MI scheduler implementations. A concrete result is enabling unpatched libpthread to run on the rumprun stacks (e.g. Xen and bare metal) with a non-NetBSD scheduler. Those schedulers hook into the existing _lwp_frobnitz() NetBSD syscall interfaces (well, syscall interfaces in that scenario ;) More specifically about the change itself: 1) instead of calling _lwp_makecontext() followed by _lwp_create() and passing the entry point in ucontext_t (MD) through the calls, roll the calls into pthread__makelwp() and allow alternate implementations for that MI interface. 2) allow compile-time overriding of __lwp_gettcb_fast() or __lwp_getprivate_fast, which are inline and leak MD scheduler/thread details into libpthread Additionally, two small nits: I) define LIB=pthread before including mk.conf so that it's possible to test for LIB==pthread in mk.conf II) make it possible to leave out pthread_cancelstub.c. This is required by the current implementation of rumprun-posix (i.e. rumprun on POSIX hosts) due to symbol collisions. It needs to be fixed properly some day, but for now allows an almost-correct libpthread to run. I am sure @justin will be happy to explain the details ;) no change to NetBSD tested: anita+atf To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/lib/libpthread/Makefile cvs rdiff -u -r1.144 -r1.145 src/lib/libpthread/pthread.c cvs rdiff -u -r1.89 -r1.90 src/lib/libpthread/pthread_int.h cvs rdiff -u -r0 -r1.1 src/lib/libpthread/pthread_makelwp.h \ src/lib/libpthread/pthread_makelwp_netbsd.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/libpthread/Makefile diff -u src/lib/libpthread/Makefile:1.84 src/lib/libpthread/Makefile:1.85 --- src/lib/libpthread/Makefile:1.84 Sun Aug 10 23:25:49 2014 +++ src/lib/libpthread/Makefile Tue Dec 16 20:05:54 2014 @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.84 2014/08/10 23:25:49 matt Exp $ +# $NetBSD: Makefile,v 1.85 2014/12/16 20:05:54 pooka Exp $ # WARNS?= 5 +LIB= pthread .include bsd.own.mk @@ -35,7 +36,10 @@ CPPFLAGS+= -D__LIBPTHREAD_SOURCE__ -D__L # XXX: This crappy poke at libc's internals needs to be fixed. CPPFLAGS+=-I${NETBSDSRCDIR}/sys -I${.CURDIR}/../libc -LIB= pthread +# providing alternative MI implementations for creating an lwp is +# possible by setting PTHREAD_MAKELWP. Currently, alternatives are +# set by the rumprun software stacks (see repo.rumpkernel.org) +PTHREAD_MAKELWP?= pthread_makelwp_netbsd.c # # NOTE: When you create a new file for libpthread, make sure that pthread.c @@ -45,9 +49,13 @@ LIB= pthread SRCS= pthread.c SRCS+= pthread_attr.c SRCS+= pthread_barrier.c +# used by rumprun-posix to work around symbol collisions +.if ${PTHREAD_CANCELSTUB:Uyes} != no SRCS+= pthread_cancelstub.c +.endif SRCS+= pthread_cond.c SRCS+= pthread_lock.c +SRCS+= ${PTHREAD_MAKELWP} SRCS+= pthread_misc.c SRCS+= pthread_mutex.c SRCS+= pthread_once.c Index: src/lib/libpthread/pthread.c diff -u src/lib/libpthread/pthread.c:1.144 src/lib/libpthread/pthread.c:1.145 --- src/lib/libpthread/pthread.c:1.144 Fri Jan 31 20:44:01 2014 +++ src/lib/libpthread/pthread.c Tue Dec 16 20:05:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread.c,v 1.144 2014/01/31 20:44:01 christos Exp $ */ +/* $NetBSD: pthread.c,v 1.145 2014/12/16 20:05:54 pooka Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: pthread.c,v 1.144 2014/01/31 20:44:01 christos Exp $); +__RCSID($NetBSD: pthread.c,v 1.145 2014/12/16 20:05:54 pooka Exp $); #define __EXPOSE_STACK 1 @@ -59,6 +59,7 @@ __RCSID($NetBSD: pthread.c,v 1.144 2014 #include pthread.h #include pthread_int.h +#include pthread_makelwp.h #include reentrant.h pthread_rwlock_t pthread__alltree_lock = PTHREAD_RWLOCK_INITIALIZER; @@ -464,10 +465,6 @@ pthread_create(pthread_t *thread, const return ENOMEM; } - /* This is used only when creating the thread. */ - _INITCONTEXT_U(newthread-pt_uc); - newthread-pt_uc.uc_stack = newthread-pt_stack; - newthread-pt_uc.uc_link = NULL; #if defined(__HAVE_TLS_VARIANT_I) || defined(__HAVE_TLS_VARIANT_II) newthread-pt_tls = NULL; #endif @@ -487,9 +484,6 @@ pthread_create(pthread_t *thread, const pthread_mutex_unlock(pthread__deadqueue_lock); return ENOMEM; } - _INITCONTEXT_U(newthread-pt_uc); - newthread-pt_uc.uc_stack = newthread-pt_stack; - newthread-pt_uc.uc_link = NULL; } /* @@ -505,15 +499,14 @@ pthread_create(pthread_t *thread, const private_area = newthread; #endif -
CVS commit: src/sys/dev/sbus
Module Name:src Committed By: macallan Date: Tue Dec 16 21:01:34 UTC 2014 Modified Files: src/sys/dev/sbus: files.sbus Added Files: src/sys/dev/sbus: mgx.c mgxreg.h Log Message: first draft of a driver for SMSI,mgx More or less an Alliance Semiconductors ProMotion AT24 with some PCI-SBus glue and 4MB framebuffer. No acceleration yet, just enough wsdisplay/vcons setup and DAC programming to be functional. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/dev/sbus/files.sbus cvs rdiff -u -r0 -r1.1 src/sys/dev/sbus/mgx.c src/sys/dev/sbus/mgxreg.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/sbus/files.sbus diff -u src/sys/dev/sbus/files.sbus:1.39 src/sys/dev/sbus/files.sbus:1.40 --- src/sys/dev/sbus/files.sbus:1.39 Sat Oct 20 13:52:11 2012 +++ src/sys/dev/sbus/files.sbus Tue Dec 16 21:01:34 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.sbus,v 1.39 2012/10/20 13:52:11 macallan Exp $ +# $NetBSD: files.sbus,v 1.40 2014/12/16 21:01:34 macallan Exp $ # # Config file and device description for machine-independent SBUS code. # Included by ports that need it. @@ -154,3 +154,9 @@ defflag opt_cgtwelve.h CG12_DEBUG CG12_C device cgtwelve: fb, rasops1, rasops8, wsemuldisplaydev, vcons attach cgtwelve at sbus file dev/sbus/cgtwelve.c cgtwelve + +# SSB MGX +defflag opt_mgx.h MGX_DEBUG +device mgx: fb, rasops8, wsemuldisplaydev, vcons +attach mgx at sbus +file dev/sbus/mgx.c mgx Added files: Index: src/sys/dev/sbus/mgx.c diff -u /dev/null src/sys/dev/sbus/mgx.c:1.1 --- /dev/null Tue Dec 16 21:01:34 2014 +++ src/sys/dev/sbus/mgx.c Tue Dec 16 21:01:34 2014 @@ -0,0 +1,368 @@ +/* $NetBSD: mgx.c,v 1.1 2014/12/16 21:01:34 macallan Exp $ */ + +/*- + * Copyright (c) 2014 Michael Lorenz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. 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. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +/* a console driver for the SSB 4096V-MGX graphics card */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: mgx.c,v 1.1 2014/12/16 21:01:34 macallan Exp $); + +#include sys/param.h +#include sys/systm.h +#include sys/buf.h +#include sys/device.h +#include sys/ioctl.h +#include sys/conf.h +#include sys/kmem.h + +#include sys/bus.h +#include machine/autoconf.h + +#include dev/sbus/sbusvar.h +#include dev/sun/fbio.h +#include dev/sun/fbvar.h + +#include dev/wscons/wsdisplayvar.h +#include dev/wscons/wsconsio.h +#include dev/wsfont/wsfont.h +#include dev/rasops/rasops.h + +#include dev/wscons/wsdisplay_vconsvar.h + +#include dev/ic/vgareg.h +#include dev/sbus/mgxreg.h + +#include opt_wsemul.h + + +struct mgx_softc { + device_t sc_dev; + bus_space_tag_t sc_tag; + bus_space_handle_t sc_blith; + bus_space_handle_t sc_vgah; + bus_addr_t sc_paddr; + void *sc_fbaddr; + int sc_width; + int sc_height; + int sc_stride; + int sc_fbsize; + int sc_mode; + u_char sc_cmap_red[256]; + u_char sc_cmap_green[256]; + u_char sc_cmap_blue[256]; + struct vcons_screen sc_console_screen; + struct wsscreen_descr sc_defaultscreen_descr; + const struct wsscreen_descr *sc_screens[1]; + struct wsscreen_list sc_screenlist; + struct vcons_data vd; +}; + +static int mgx_match(device_t, cfdata_t, void *); +static void mgx_attach(device_t, device_t, void *); +static int mgx_ioctl(void *, void *, u_long, void *, int, + struct lwp*); +static paddr_t mgx_mmap(void *, void *, off_t, int); +static void mgx_init_screen(void *, struct vcons_screen *, int, + long *); +static void mgx_write_dac(struct mgx_softc *, int, int, int, int); +static void mgx_setup(struct mgx_softc *, int); +static void mgx_init_palette(struct mgx_softc *); + +CFATTACH_DECL_NEW(mgx, sizeof(struct
CVS commit: src/lib/libpthread
Module Name:src Committed By: pooka Date: Wed Dec 17 01:49:08 UTC 2014 Modified Files: src/lib/libpthread: pthread_makelwp_netbsd.c Log Message: include correct header for last minute just-in-case defensive addition that's too trivial to check To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libpthread/pthread_makelwp_netbsd.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/libpthread/pthread_makelwp_netbsd.c diff -u src/lib/libpthread/pthread_makelwp_netbsd.c:1.1 src/lib/libpthread/pthread_makelwp_netbsd.c:1.2 --- src/lib/libpthread/pthread_makelwp_netbsd.c:1.1 Tue Dec 16 20:05:54 2014 +++ src/lib/libpthread/pthread_makelwp_netbsd.c Wed Dec 17 01:49:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_makelwp_netbsd.c,v 1.1 2014/12/16 20:05:54 pooka Exp $ */ +/* $NetBSD: pthread_makelwp_netbsd.c,v 1.2 2014/12/17 01:49:08 pooka Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,12 +30,13 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: pthread_makelwp_netbsd.c,v 1.1 2014/12/16 20:05:54 pooka Exp $); +__RCSID($NetBSD: pthread_makelwp_netbsd.c,v 1.2 2014/12/17 01:49:08 pooka Exp $); #include sys/param.h #include lwp.h #include pthread.h +#include string.h #include pthread_int.h #include pthread_makelwp.h
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: msaitoh Date: Wed Dec 17 03:39:02 UTC 2014 Modified Files: src/sys/arch/x86/x86: intel_busclock.c Log Message: - Round off some bus clock values. - Add 333.33MHz for Pentium 4. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x86/x86/intel_busclock.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/x86/x86/intel_busclock.c diff -u src/sys/arch/x86/x86/intel_busclock.c:1.19 src/sys/arch/x86/x86/intel_busclock.c:1.20 --- src/sys/arch/x86/x86/intel_busclock.c:1.19 Fri Jul 25 14:34:22 2014 +++ src/sys/arch/x86/x86/intel_busclock.c Wed Dec 17 03:39:02 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_busclock.c,v 1.19 2014/07/25 14:34:22 msaitoh Exp $ */ +/* $NetBSD: intel_busclock.c,v 1.20 2014/12/17 03:39:02 msaitoh Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intel_busclock.c,v 1.19 2014/07/25 14:34:22 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: intel_busclock.c,v 1.20 2014/12/17 03:39:02 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -316,7 +316,7 @@ p4_get_bus_clock(struct cpu_info *ci) switch (bus) { case 0: bus_clock = (CPUID_TO_MODEL(ci-ci_signature) == 2) ? - 1 : 2; + 1 : 26667; break; case 1: bus_clock = 1; @@ -325,7 +325,10 @@ p4_get_bus_clock(struct cpu_info *ci) bus_clock = 2; break; case 3: - bus_clock = 1; + bus_clock = 16667; + break; + case 4: + bus_clock = 3; break; default: aprint_debug(%s: unknown Pentium 4 (model %d)
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: skrll Date: Wed Dec 17 06:54:48 UTC 2014 Modified Files: src/sys/arch/arm/broadcom: bcm2835_tmr.c Log Message: Wrap a long line. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/broadcom/bcm2835_tmr.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/broadcom/bcm2835_tmr.c diff -u src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.4 src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.5 --- src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.4 Tue Dec 16 13:09:33 2014 +++ src/sys/arch/arm/broadcom/bcm2835_tmr.c Wed Dec 17 06:54:48 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_tmr.c,v 1.4 2014/12/16 13:09:33 nat Exp $ */ +/* $NetBSD: bcm2835_tmr.c,v 1.5 2014/12/17 06:54:48 skrll Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bcm2835_tmr.c,v 1.4 2014/12/16 13:09:33 nat Exp $); +__KERNEL_RCSID(0, $NetBSD: bcm2835_tmr.c,v 1.5 2014/12/17 06:54:48 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -201,7 +201,8 @@ clockhandler(void *arg) if (!(status BCM2835_STIMER_M3)) return 0; - bus_space_write_4(sc-sc_iot, sc-sc_ioh, BCM2835_STIMER_CS, BCM2835_STIMER_M3); + bus_space_write_4(sc-sc_iot, sc-sc_ioh, BCM2835_STIMER_CS, + BCM2835_STIMER_M3); hardclock(frame);