CVS commit: src/sys
Module Name:src Committed By: maxv Date: Thu May 3 06:41:30 UTC 2018 Modified Files: src/sys/netinet6: in6_proto.c Removed Files: src/sys/net: net_osdep.h Log Message: Remove net_osdep.h completely. To generate a diff of this commit: cvs rdiff -u -r1.20 -r0 src/sys/net/net_osdep.h cvs rdiff -u -r1.122 -r1.123 src/sys/netinet6/in6_proto.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/in6_proto.c diff -u src/sys/netinet6/in6_proto.c:1.122 src/sys/netinet6/in6_proto.c:1.123 --- src/sys/netinet6/in6_proto.c:1.122 Thu Mar 15 08:15:21 2018 +++ src/sys/netinet6/in6_proto.c Thu May 3 06:41:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_proto.c,v 1.122 2018/03/15 08:15:21 maxv Exp $ */ +/* $NetBSD: in6_proto.c,v 1.123 2018/05/03 06:41:30 maxv Exp $ */ /* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.122 2018/03/15 08:15:21 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.123 2018/05/03 06:41:30 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_gateway.h" @@ -138,8 +138,6 @@ __KERNEL_RCSID(0, "$NetBSD: in6_proto.c, #include -#include - /* * TCP/IP protocol family: IP6, ICMP6, UDP, TCP. */
CVS commit: src/usr.bin/midiplay
Module Name:src Committed By: wiz Date: Thu May 3 05:14:55 UTC 2018 Modified Files: src/usr.bin/midiplay: midiplay.c Log Message: Sync usage with manpage. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/usr.bin/midiplay/midiplay.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/midiplay/midiplay.c diff -u src/usr.bin/midiplay/midiplay.c:1.31 src/usr.bin/midiplay/midiplay.c:1.32 --- src/usr.bin/midiplay/midiplay.c:1.31 Thu May 3 01:12:57 2018 +++ src/usr.bin/midiplay/midiplay.c Thu May 3 05:14:55 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: midiplay.c,v 1.31 2018/05/03 01:12:57 mrg Exp $ */ +/* $NetBSD: midiplay.c,v 1.32 2018/05/03 05:14:55 wiz Exp $ */ /* * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: midiplay.c,v 1.31 2018/05/03 01:12:57 mrg Exp $"); +__RCSID("$NetBSD: midiplay.c,v 1.32 2018/05/03 05:14:55 wiz Exp $"); #endif @@ -155,8 +155,8 @@ static u_char silence_sample[] = { static void __attribute__((__noreturn__)) usage(void) { - fprintf(stderr, "usage: %s [-d unit] [-f file] [-l] [-m] [-p pgm] [-q] " - "[-t %%tempo] [-v] [-x] [-s] [file ...]\n", + fprintf(stderr, "usage: %s [-lmqsvx] [-d devno] [-f file] " + "[-p pgm] [-t tempo] [file ...]\n", getprogname()); exit(1); }
CVS commit: src/usr.bin/midiplay
Module Name:src Committed By: wiz Date: Thu May 3 05:13:20 UTC 2018 Modified Files: src/usr.bin/midiplay: midiplay.1 Log Message: Merge options without arguments in synopsis. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/midiplay/midiplay.1 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/midiplay/midiplay.1 diff -u src/usr.bin/midiplay/midiplay.1:1.20 src/usr.bin/midiplay/midiplay.1:1.21 --- src/usr.bin/midiplay/midiplay.1:1.20 Thu May 3 01:12:57 2018 +++ src/usr.bin/midiplay/midiplay.1 Thu May 3 05:13:20 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: midiplay.1,v 1.20 2018/05/03 01:12:57 mrg Exp $ +.\" $NetBSD: midiplay.1,v 1.21 2018/05/03 05:13:20 wiz Exp $ .\" .\" Copyright (c) 1998 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -34,16 +34,11 @@ .Nd play MIDI and RMID files .Sh SYNOPSIS .Nm +.Op Fl lmqsvx .Op Fl d Ar devno .Op Fl f Ar file -.Op Fl l -.Op Fl m .Op Fl p Ar pgm -.Op Fl q -.Op Fl s .Op Fl t Ar tempo -.Op Fl v -.Op Fl x .Op Ar file ... .Sh DESCRIPTION The
CVS commit: src/bin/sh
Module Name:src Committed By: wiz Date: Thu May 3 05:11:43 UTC 2018 Modified Files: src/bin/sh: sh.1 Log Message: Remove Pps without effect. To generate a diff of this commit: cvs rdiff -u -r1.205 -r1.206 src/bin/sh/sh.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/sh.1 diff -u src/bin/sh/sh.1:1.205 src/bin/sh/sh.1:1.206 --- src/bin/sh/sh.1:1.205 Thu May 3 00:32:11 2018 +++ src/bin/sh/sh.1 Thu May 3 05:11:43 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: sh.1,v 1.205 2018/05/03 00:32:11 kre Exp $ +.\" $NetBSD: sh.1,v 1.206 2018/05/03 05:11:43 wiz Exp $ .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -175,7 +175,6 @@ Place commands within the and .Dq Ic esac below (these commands are described later): -.Pp .Bd -literal -offset indent case $- in *i*) # commands for interactive use only @@ -3280,7 +3279,6 @@ The choice between hard limit (which no violate, and which may not be raised once it has been lowered) and soft limit (which causes processes to be signaled but not necessarily killed, and which may be raised) is made with these flags: -.Pp .Bl -tag -width Fl .It Fl H set or inquire about hard limits @@ -3297,7 +3295,6 @@ If both are specified, the last one wins .Pp The limit to be interrogated or set, then, is chosen by specifying any one of these flags: -.Pp .Bl -tag -width Fl .It Fl a show all the current limits
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Thu May 3 05:09:48 UTC 2018 Modified Files: src/lib/libc/sys: mremap.2 Log Message: Sort sections. Sort ERRORS. Remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/sys/mremap.2 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/sys/mremap.2 diff -u src/lib/libc/sys/mremap.2:1.6 src/lib/libc/sys/mremap.2:1.7 --- src/lib/libc/sys/mremap.2:1.6 Wed May 2 15:25:13 2018 +++ src/lib/libc/sys/mremap.2 Thu May 3 05:09:48 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: mremap.2,v 1.6 2018/05/02 15:25:13 christos Exp $ +.\" $NetBSD: mremap.2,v 1.7 2018/05/03 05:09:48 wiz Exp $ .\" .\" Copyright (c) 2007 Thomas Klausner and Joerg Sonnenberger .\" All rights reserved. @@ -172,13 +172,25 @@ main(int argc, char *argv[]) return EXIT_SUCCESS; } .Ed +.Sh COMPATIBILITY +The semantics of +.Fn mremap +differ from the one provided by glibc on Linux in that the +.Ar newp +argument was added and a different set of +.Ar flags +are implemented. .Sh ERRORS The .Fn mremap function fails if: .Bl -tag -width Er +.It Bq Er E2BIG +A request to extend +.Fa oldp +failed because of address overflow. .It Bq Er EINVAL -If +If .Fa oldp or .Fa newp @@ -186,7 +198,7 @@ are not page aligned, or .Fa oldsize or .Fa newsize -are not a multiple of the page size, or if +are not a multiple of the page size, or if .Fa oldp + .Fa oldsize or @@ -198,28 +210,16 @@ argument, or if the request was to exten .Fa oldp and the extension address space either did not fit, was already occupied, or had set permissions. +.It Bq Er ENOENT +If the +.Fa oldp +segmented was not already mapped. .It Bq Er ENOMEM If there was either no space to allocate/move memory, or if a fixed allocation was requested in the .Fa flags that could not be accommodated. -.It Bq Er ENOENT -If the -.Fa oldp -segmented was not already mapped. -.It Bq Er E2BIG -A request to extend -.Fa oldp -failed because of address overflow. .El -.Sh COMPATIBILITY -The semantics of -.Fn mremap -differ from the one provided by glibc on Linux in that the -.Ar newp -argument was added and a different set of -.Ar flags -are implemented. .Sh SEE ALSO .Xr mmap 2 , .Xr munmap 2
CVS commit: src/sys/dev/pci
Module Name:src Committed By: maya Date: Thu May 3 04:21:10 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some broadcom 802.11ac wifi devices To generate a diff of this commit: cvs rdiff -u -r1.1332 -r1.1333 src/sys/dev/pci/pcidevs 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/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1332 src/sys/dev/pci/pcidevs:1.1333 --- src/sys/dev/pci/pcidevs:1.1332 Sat Apr 28 05:11:49 2018 +++ src/sys/dev/pci/pcidevs Thu May 3 04:21:10 2018 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1332 2018/04/28 05:11:49 mlelstv Exp $ +$NetBSD: pcidevs,v 1.1333 2018/05/03 04:21:10 maya Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -1889,6 +1889,8 @@ product BROADCOM BCM43224 0x4353 BCM4322 product BROADCOM BCM43225 0x4357 BCM43225 2.4GHz 802.11 product BROADCOM BCM43227 0x4358 BCM43227 2.4GHz 802.11 product BROADCOM BCM43228 0x4359 BCM43228 Dualband 802.11 +product BROADCOM BCM4350 0x43a3 BCM4350 802.11ac Wireless Network Adapter +product BROADCOM BCM43602 0x43ba BCM43602 802.11ac Wireless LAN SoC product BROADCOM BCM4401 0x4401 BCM4401 10/100 Ethernet product BROADCOM BCM4401_B0 0x4401 BCM4401-B0 10/100 Ethernet product BROADCOM BCM4727 0x4727 BCM4727 802.11b/g/n
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Thu May 3 02:10:17 UTC 2018 Modified Files: src/sys/dev/i2c: axp806.c files.i2c Log Message: Add support for poweroff and the power on-off key (POK). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/axp806.c cvs rdiff -u -r1.88 -r1.89 src/sys/dev/i2c/files.i2c 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/i2c/axp806.c diff -u src/sys/dev/i2c/axp806.c:1.2 src/sys/dev/i2c/axp806.c:1.3 --- src/sys/dev/i2c/axp806.c:1.2 Thu May 3 01:15:49 2018 +++ src/sys/dev/i2c/axp806.c Thu May 3 02:10:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: axp806.c,v 1.2 2018/05/03 01:15:49 jmcneill Exp $ */ +/* $NetBSD: axp806.c,v 1.3 2018/05/03 02:10:17 jmcneill Exp $ */ /*- * Copyright (c) 2014-2018 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: axp806.c,v 1.2 2018/05/03 01:15:49 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: axp806.c,v 1.3 2018/05/03 02:10:17 jmcneill Exp $"); #include #include @@ -39,6 +39,9 @@ __KERNEL_RCSID(0, "$NetBSD: axp806.c,v 1 #include +#include +#include + #include #define AXP_STARTUP_SOURCE_REG 0x00 @@ -71,12 +74,14 @@ __KERNEL_RCSID(0, "$NetBSD: axp806.c,v 1 #define AXP_CLDO3_CTRL_REG 0x26 #define AXP_POWER_WAKE_CTRL_REG 0x31 #define AXP_POWER_DISABLE_REG 0x32 +#define AXP_POWER_DISABLE_CTRL __BIT(7) #define AXP_WAKEUP_PINFUNC_REG 0x35 #define AXP_POK_SETTING_REG 0x36 -#define AXP_MODE_SEL_REG 0x3e +#define AXP_MODE_SEL_REG 0axp806_power_funcsx3e #define AXP_SPECIAL_CTRL_REG 0x3f #define AXP_IRQ_ENABLE1_REG 0x40 #define AXP_IRQ_ENABLE2_REG 0x41 +#define AXP_IRQ2_POKSIRQ __BIT(1) #define AXP_IRQ_STATUS1_REG 0x48 #define AXP_IRQ_STATUS2_REG 0x49 #define AXP_VREF_TEMP_WARN_REG 0xf3 @@ -153,6 +158,8 @@ struct axp806_softc { i2c_tag_t sc_i2c; i2c_addr_t sc_addr; int sc_phandle; + + struct sysmon_pswitch sc_smpsw; }; struct axp806reg_softc { @@ -176,17 +183,15 @@ static const char *compatible[] = { }; static int -axp806_read(i2c_tag_t tag, i2c_addr_t addr, uint8_t reg, uint8_t *val) +axp806_read(i2c_tag_t tag, i2c_addr_t addr, uint8_t reg, uint8_t *val, int flags) { - return iic_smbus_read_byte(tag, addr, reg, val, - cold ? I2C_F_POLL : 0); + return iic_smbus_read_byte(tag, addr, reg, val, flags); } static int -axp806_write(i2c_tag_t tag, i2c_addr_t addr, uint8_t reg, uint8_t val) +axp806_write(i2c_tag_t tag, i2c_addr_t addr, uint8_t reg, uint8_t val, int flags) { - return iic_smbus_write_byte(tag, addr, reg, val, - cold ? I2C_F_POLL : 0); + return iic_smbus_write_byte(tag, addr, reg, val, flags); } static int @@ -220,10 +225,10 @@ axp806_set_voltage(i2c_tag_t tag, i2c_ad return EINVAL; iic_acquire_bus(tag, flags); - if ((error = axp806_read(tag, addr, c->c_voltage_reg, &val)) == 0) { + if ((error = axp806_read(tag, addr, c->c_voltage_reg, &val, flags)) == 0) { val &= ~c->c_voltage_mask; val |= __SHIFTIN(reg_val, c->c_voltage_mask); - error = axp806_write(tag, addr, c->c_voltage_reg, val); + error = axp806_write(tag, addr, c->c_voltage_reg, val, flags); } iic_release_bus(tag, flags); @@ -241,7 +246,7 @@ axp806_get_voltage(i2c_tag_t tag, i2c_ad return EINVAL; iic_acquire_bus(tag, flags); - error = axp806_read(tag, addr, c->c_voltage_reg, &val); + error = axp806_read(tag, addr, c->c_voltage_reg, &val, flags); iic_release_bus(tag, flags); if (error) return error; @@ -257,6 +262,52 @@ axp806_get_voltage(i2c_tag_t tag, i2c_ad return 0; } +static void +axp806_power_poweroff(device_t dev) +{ + struct axp806_softc *sc = device_private(dev); + + delay(100); + + iic_acquire_bus(sc->sc_i2c, I2C_F_POLL); + axp806_write(sc->sc_i2c, sc->sc_addr, AXP_POWER_DISABLE_REG, AXP_POWER_DISABLE_CTRL, I2C_F_POLL); + iic_release_bus(sc->sc_i2c, I2C_F_POLL); +} + +static struct fdtbus_power_controller_func axp806_power_funcs = { + .poweroff = axp806_power_poweroff, +}; + +static void +axp806_task_shut(void *priv) +{ + struct axp806_softc *sc = priv; + + sysmon_pswitch_event(&sc->sc_smpsw, PSWITCH_EVENT_PRESSED); +} + +static int +axp806_intr(void *priv) +{ + struct axp806_softc *sc = priv; + const int flags = I2C_F_POLL; + uint8_t stat1, stat2; + + iic_acquire_bus(sc->sc_i2c, flags); + if (axp806_read(sc->sc_i2c, sc->sc_addr, AXP_IRQ_STATUS1_REG, &stat1, flags) == 0) { + axp806_write(sc->sc_i2c, sc->sc_addr, AXP_IRQ_STATUS1_REG, stat1, flags); + } + if (axp806_read(sc->sc_i2c, sc->sc_addr, AXP_IRQ_STATUS2_REG, &stat2, flags) == 0) { + if (stat2 & AXP_IRQ2_POKSIRQ) + sysmon_task_queue_sched(0, axp806_task_shut, sc); + + axp806_write(sc->sc_i2c, sc->sc_addr, AXP_IRQ_STATUS2_REG, stat2, flags); + } + iic_release_bus(sc->sc_i2c, flags); + + return 1; +} + static int axp806_match(device_t parent, cfdata_t match, void *aux) { @@ -275,6 +326,7 @@ axp806_attach(device_t parent, device_t struct
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Thu May 3 02:08:52 UTC 2018 Modified Files: src/sys/dev/i2c: gttwsi_core.c Log Message: Use IPL_VM for bus lock so we can do i2c xfers from interrupt context To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/gttwsi_core.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/i2c/gttwsi_core.c diff -u src/sys/dev/i2c/gttwsi_core.c:1.3 src/sys/dev/i2c/gttwsi_core.c:1.4 --- src/sys/dev/i2c/gttwsi_core.c:1.3 Sun Oct 29 14:59:05 2017 +++ src/sys/dev/i2c/gttwsi_core.c Thu May 3 02:08:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: gttwsi_core.c,v 1.3 2017/10/29 14:59:05 jmcneill Exp $ */ +/* $NetBSD: gttwsi_core.c,v 1.4 2018/05/03 02:08:52 jmcneill Exp $ */ /* * Copyright (c) 2008 Eiji Kawauchi. * All rights reserved. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gttwsi_core.c,v 1.3 2017/10/29 14:59:05 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gttwsi_core.c,v 1.4 2018/05/03 02:08:52 jmcneill Exp $"); #include "locators.h" #include @@ -148,7 +148,7 @@ gttwsi_attach_subr(device_t self, bus_sp if (sc->sc_reg_write == NULL) sc->sc_reg_write = gttwsi_default_write_4; - mutex_init(&sc->sc_buslock, MUTEX_DEFAULT, IPL_NONE); + mutex_init(&sc->sc_buslock, MUTEX_DEFAULT, IPL_VM); mutex_init(&sc->sc_mtx, MUTEX_DEFAULT, IPL_BIO); cv_init(&sc->sc_cv, device_xname(self));
CVS commit: src/external/bsd/elftosb/usr.sbin/elftosb
Module Name:src Committed By: christos Date: Thu May 3 01:32:17 UTC 2018 Modified Files: src/external/bsd/elftosb/usr.sbin/elftosb: Makefile Log Message: Fix the tools build. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/elftosb/usr.sbin/elftosb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftosb/usr.sbin/elftosb/Makefile diff -u src/external/bsd/elftosb/usr.sbin/elftosb/Makefile:1.5 src/external/bsd/elftosb/usr.sbin/elftosb/Makefile:1.6 --- src/external/bsd/elftosb/usr.sbin/elftosb/Makefile:1.5 Mon Jun 19 16:12:34 2017 +++ src/external/bsd/elftosb/usr.sbin/elftosb/Makefile Wed May 2 21:32:17 2018 @@ -1,9 +1,13 @@ -# $NetBSD: Makefile,v 1.5 2017/06/19 20:12:34 christos Exp $ +# $NetBSD: Makefile,v 1.6 2018/05/03 01:32:17 christos Exp $ .include .include .include +.if !defined(DIST) +.include "${.PARSEDIR}/../../Makefile.inc" +.endif + .PATH: ${DIST}/elftosb2 .if ${MACHINE_CPU} == "arm" && ${TARGET_ENDIANNESS} == "1234"
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Thu May 3 01:17:04 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 SUNXI Log Message: Add axp806pmic, axp806reg To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/conf/GENERIC64 cvs rdiff -u -r1.68 -r1.69 src/sys/arch/evbarm/conf/SUNXI 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/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.9 src/sys/arch/evbarm/conf/GENERIC64:1.10 --- src/sys/arch/evbarm/conf/GENERIC64:1.9 Wed May 2 21:20:58 2018 +++ src/sys/arch/evbarm/conf/GENERIC64 Thu May 3 01:17:04 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.9 2018/05/02 21:20:58 jmcneill Exp $ +# $NetBSD: GENERIC64,v 1.10 2018/05/03 01:17:04 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -209,6 +209,8 @@ titemp* at iic? seeprom* at iic? as3722pmic* at iic? as3722reg* at as3722pmic? +axp806pmic* at iic? # AXP805/806 Power Management IC +axp806reg* at axp806pmic? max77620pmic* at iic? pcf8563rtc* at iic? # PCF8563 RTC tcagpio* at iic? Index: src/sys/arch/evbarm/conf/SUNXI diff -u src/sys/arch/evbarm/conf/SUNXI:1.68 src/sys/arch/evbarm/conf/SUNXI:1.69 --- src/sys/arch/evbarm/conf/SUNXI:1.68 Wed May 2 21:20:58 2018 +++ src/sys/arch/evbarm/conf/SUNXI Thu May 3 01:17:04 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: SUNXI,v 1.68 2018/05/02 21:20:58 jmcneill Exp $ +# $NetBSD: SUNXI,v 1.69 2018/05/03 01:17:04 jmcneill Exp $ # # Allwinner sunxi family # @@ -245,6 +245,8 @@ wskbd* at tcakp? console ? axp20x* at iic? # AXP209 Power Management IC axp20xreg* at axp20x? axp22x* at iic? # AXP221 Power Management IC +axp806pmic* at iic? # AXP805/806 Power Management IC +axp806reg* at axp806pmic? sy8106a* at iic? # Silergy SY81061 regulator pcf8563rtc* at iic? # PCF8563 RTC seeprom* at iic? # AT24Cxx Serial EEPROM
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Thu May 3 01:15:49 UTC 2018 Modified Files: src/sys/dev/i2c: axp806.c files.i2c Removed Files: src/sys/dev/i2c: axp806.h Log Message: FDT-ize X-Powers AXP805/806 PMIC driver. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/axp806.c cvs rdiff -u -r1.1 -r0 src/sys/dev/i2c/axp806.h cvs rdiff -u -r1.87 -r1.88 src/sys/dev/i2c/files.i2c 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/i2c/axp806.c diff -u src/sys/dev/i2c/axp806.c:1.1 src/sys/dev/i2c/axp806.c:1.2 --- src/sys/dev/i2c/axp806.c:1.1 Sun Dec 7 00:33:26 2014 +++ src/sys/dev/i2c/axp806.c Thu May 3 01:15:49 2018 @@ -1,7 +1,7 @@ -/* $NetBSD: axp806.c,v 1.1 2014/12/07 00:33:26 jmcneill Exp $ */ +/* $NetBSD: axp806.c,v 1.2 2018/05/03 01:15:49 jmcneill Exp $ */ /*- - * Copyright (c) 2014 Jared D. McNeill + * Copyright (c) 2014-2018 Jared McNeill * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,10 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#define AXP_DEBUG - #include -__KERNEL_RCSID(0, "$NetBSD: axp806.c,v 1.1 2014/12/07 00:33:26 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: axp806.c,v 1.2 2018/05/03 01:15:49 jmcneill Exp $"); #include #include @@ -40,7 +38,8 @@ __KERNEL_RCSID(0, "$NetBSD: axp806.c,v 1 #include #include -#include + +#include #define AXP_STARTUP_SOURCE_REG 0x00 #define AXP_IC_TYPE_REG 0x03 @@ -117,35 +116,35 @@ struct axp806_ctrl { .c_voltage_reg = AXP_##vreg##_REG, .c_voltage_mask = (vmask) } static const struct axp806_ctrl axp806_ctrls[] = { - AXP_CTRL2("DCDCA", 600, 1520, 10, 51, 20, 21, + AXP_CTRL2("dcdca", 600, 1520, 10, 51, 20, 21, OUT_CTRL1, __BIT(0), DCDCA_CTRL, __BITS(6,0)), - AXP_CTRL("DCDCB", 1000, 2550, 50, + AXP_CTRL("dcdcb", 1000, 2550, 50, OUT_CTRL1, __BIT(1), DCDCB_CTRL, __BITS(4,0)), - AXP_CTRL2("DCDCC", 600, 1520, 10, 51, 20, 21, + AXP_CTRL2("dcdcc", 600, 1520, 10, 51, 20, 21, OUT_CTRL1, __BIT(2), DCDCC_CTRL, __BITS(6,0)), - AXP_CTRL2("DCDCD", 600, 3300, 20, 46, 100, 18, + AXP_CTRL2("dcdcd", 600, 3300, 20, 46, 100, 18, OUT_CTRL1, __BIT(3), DCDCD_CTRL, __BITS(5,0)), - AXP_CTRL("DCDCE", 1100, 3400, 100, + AXP_CTRL("dcdce", 1100, 3400, 100, OUT_CTRL1, __BIT(4), DCDCE_CTRL, __BITS(4,0)), - AXP_CTRL("ALDO1", 700, 3300, 100, + AXP_CTRL("aldo1", 700, 3300, 100, OUT_CTRL1, __BIT(5), ALDO1_CTRL, __BITS(4,0)), - AXP_CTRL("ALDO2", 700, 3400, 100, + AXP_CTRL("aldo2", 700, 3400, 100, OUT_CTRL1, __BIT(6), ALDO2_CTRL, __BITS(4,0)), - AXP_CTRL("ALDO3", 700, 3300, 100, + AXP_CTRL("aldo3", 700, 3300, 100, OUT_CTRL1, __BIT(7), ALDO3_CTRL, __BITS(4,0)), - AXP_CTRL("BLDO1", 700, 1900, 100, + AXP_CTRL("bldo1", 700, 1900, 100, OUT_CTRL2, __BIT(0), BLDO1_CTRL, __BITS(3,0)), - AXP_CTRL("BLDO2", 700, 1900, 100, + AXP_CTRL("bldo2", 700, 1900, 100, OUT_CTRL2, __BIT(1), BLDO2_CTRL, __BITS(3,0)), - AXP_CTRL("BLDO3", 700, 1900, 100, + AXP_CTRL("bldo3", 700, 1900, 100, OUT_CTRL2, __BIT(2), BLDO3_CTRL, __BITS(3,0)), - AXP_CTRL("BLDO4", 700, 1900, 100, + AXP_CTRL("bldo4", 700, 1900, 100, OUT_CTRL2, __BIT(3), BLDO4_CTRL, __BITS(3,0)), - AXP_CTRL("CLDO1", 700, 3300, 100, + AXP_CTRL("cldo1", 700, 3300, 100, OUT_CTRL2, __BIT(4), CLDO1_CTRL, __BITS(4,0)), - AXP_CTRL2("CLDO2", 700, 4200, 100, 28, 200, 4, + AXP_CTRL2("cldo2", 700, 4200, 100, 28, 200, 4, OUT_CTRL2, __BIT(5), CLDO2_CTRL, __BITS(4,0)), - AXP_CTRL("CLDO3", 700, 3300, 100, + AXP_CTRL("cldo3", 700, 3300, 100, OUT_CTRL2, __BIT(6), CLDO3_CTRL, __BITS(4,0)), }; @@ -153,117 +152,47 @@ struct axp806_softc { device_t sc_dev; i2c_tag_t sc_i2c; i2c_addr_t sc_addr; - - u_int sc_nctrl; - struct axp806_ctrl *sc_ctrl; + int sc_phandle; }; -static int axp806_match(device_t, cfdata_t, void *); -static void axp806_attach(device_t, device_t, void *); - -static int axp806_read(struct axp806_softc *, uint8_t, uint8_t *); -static int axp806_write(struct axp806_softc *, uint8_t, uint8_t); - -static void axp806_print(struct axp806_ctrl *c); - -CFATTACH_DECL_NEW(axp806pm, sizeof(struct axp806_softc), -axp806_match, axp806_attach, NULL, NULL); - -static int -axp806_match(device_t parent, cfdata_t match, void *aux) -{ - return 1; -} - -static void -axp806_attach(device_t parent, device_t self, void *aux) -{ - struct axp806_softc *sc = device_private(self); - struct i2c_attach_args *ia = aux; - u_int n; - - sc->sc_dev = self; - sc->sc_i2c = ia->ia_tag; - sc->sc_addr = ia->ia_addr; - - aprint_naive("\n"); - aprint_normal("\n"); +struct axp806reg_softc { + device_t sc_dev; + i2c_tag_t sc_i2c; + i2c_addr_t sc_addr; + const struct axp806_ctrl *sc_ctrl; +}; - sc->sc_nctrl = __arraycount(axp806_ctrls); - sc->sc_ctrl = kmem_alloc(sizeof(axp806_ctrls), KM_SLEEP); - memcpy(sc->sc_ctrl, axp806_ctrls, sizeof(axp806_ctrls)); - for (n = 0; n < sc->sc_nctrl; n++) { - sc
CVS commit: src/crypto/external/bsd/netpgp/bindings/lua
Module Name:src Committed By: christos Date: Thu May 3 01:14:54 UTC 2018 Modified Files: src/crypto/external/bsd/netpgp/bindings/lua: Makefile Log Message: don't build for non pic To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/crypto/external/bsd/netpgp/bindings/lua/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/netpgp/bindings/lua/Makefile diff -u src/crypto/external/bsd/netpgp/bindings/lua/Makefile:1.1 src/crypto/external/bsd/netpgp/bindings/lua/Makefile:1.2 --- src/crypto/external/bsd/netpgp/bindings/lua/Makefile:1.1 Sun Apr 29 15:47:35 2018 +++ src/crypto/external/bsd/netpgp/bindings/lua/Makefile Wed May 2 21:14:54 2018 @@ -1,5 +1,7 @@ -# $NetBSD: Makefile,v 1.1 2018/04/29 19:47:35 sevan Exp $ +# $NetBSD: Makefile,v 1.2 2018/05/03 01:14:54 christos Exp $ +.include +.if ${MKPIC} != no LUA_MODULES=netpgp LUA_SRCS.netpgp=glue.c LUA_DPLIBS+=netpgp ${.CURDIR}/../../lib/netpgp @@ -7,5 +9,6 @@ LUA_DPLIBS+=netpgp ${.CURDIR}/../../lib/ EXTDIST=${.CURDIR}/../../dist .PATH: ${EXTDIST}/bindings/lua +.endif .include
CVS commit: src/usr.bin/midiplay
Module Name:src Committed By: mrg Date: Thu May 3 01:12:57 UTC 2018 Modified Files: src/usr.bin/midiplay: midiplay.1 midiplay.c Log Message: if just parsing don't try to read the uninitialised device name, or display the unit number. add a "-s" option that sends an ALL_SOUNDS_OFF midi event. very useful after an interrupted midiplay leaves notes on. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.bin/midiplay/midiplay.1 cvs rdiff -u -r1.30 -r1.31 src/usr.bin/midiplay/midiplay.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/midiplay/midiplay.1 diff -u src/usr.bin/midiplay/midiplay.1:1.19 src/usr.bin/midiplay/midiplay.1:1.20 --- src/usr.bin/midiplay/midiplay.1:1.19 Sat Jan 16 08:50:29 2010 +++ src/usr.bin/midiplay/midiplay.1 Thu May 3 01:12:57 2018 @@ -1,4 +1,5 @@ -.\" $NetBSD: midiplay.1,v 1.19 2010/01/16 08:50:29 mbalmer Exp $ +.\" $NetBSD: midiplay.1,v 1.20 2018/05/03 01:12:57 mrg Exp $ +.\" .\" Copyright (c) 1998 The NetBSD Foundation, Inc. .\" All rights reserved. .\" @@ -25,7 +26,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 16, 2010 +.Dd May 2, 2018 .Dt MIDIPLAY 1 .Os .Sh NAME @@ -39,6 +40,7 @@ .Op Fl m .Op Fl p Ar pgm .Op Fl q +.Op Fl s .Op Fl t Ar tempo .Op Fl v .Op Fl x @@ -86,6 +88,11 @@ There is no way at present to have selectively map channels or instruments. .It Fl q specifies that the MIDI file should not be played, just parsed. +.It Fl s +send an +.Dq ALL SOUNDS OFF +MIDI event. +Useful if an interrupted MIDI file left notes playing. .It Fl t Ar tempo-adjust specifies an adjustment (in percent) to the tempi recorded in the file. The default of 100 plays as specified in the file, 50 halves every tempo, @@ -123,3 +130,8 @@ It may take a long while before playing .Nm is interrupted, as the data already buffered in the sequencer will contain timing events. +Use +.Nm +with the +.Fl s +option to silence any sounds left after an interrupted call. Index: src/usr.bin/midiplay/midiplay.c diff -u src/usr.bin/midiplay/midiplay.c:1.30 src/usr.bin/midiplay/midiplay.c:1.31 --- src/usr.bin/midiplay/midiplay.c:1.30 Sun Mar 22 22:47:43 2015 +++ src/usr.bin/midiplay/midiplay.c Thu May 3 01:12:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: midiplay.c,v 1.30 2015/03/22 22:47:43 mrg Exp $ */ +/* $NetBSD: midiplay.c,v 1.31 2018/05/03 01:12:57 mrg Exp $ */ /* * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: midiplay.c,v 1.30 2015/03/22 22:47:43 mrg Exp $"); +__RCSID("$NetBSD: midiplay.c,v 1.31 2018/05/03 01:12:57 mrg Exp $"); #endif @@ -128,6 +128,13 @@ static u_char sample[] = { #undef E #undef F +static u_char silence_sample[] = { + 'M', 'T', 'h', 'd', 0, 0, 0, 6, 0, 1, 0, 1, 0, 8, + 'M', 'T', 'r', 'k', 0, 0, 0, 8, + 0, 0xb0, 0x78, 0x00, + 0, 0xff, 0x2f, 0 +}; + #define MARK_HEADER "MThd" #define MARK_TRACK "MTrk" #define MARK_LEN 4 @@ -149,7 +156,7 @@ static void __attribute__((__noreturn__) usage(void) { fprintf(stderr, "usage: %s [-d unit] [-f file] [-l] [-m] [-p pgm] [-q] " - "[-t %%tempo] [-v] [-x] [file ...]\n", + "[-t %%tempo] [-v] [-x] [-s] [file ...]\n", getprogname()); exit(1); } @@ -408,9 +415,12 @@ playdata(u_char *buf, u_int tot, const c err(1, "ioctl(SEQUENCER_INFO) failed"); end = buf + tot; - if (verbose) - printf("Playing %s (%d bytes) on %s (unit %d)... \n", - name, tot, info.name, info.device); + if (verbose) { + printf("Playing %s (%d bytes)", name, tot); + if (play) + printf(" on %s (unit %d)...", info.name, info.device); + puts("\n"); + } if (tot < MARK_LEN + 4) { warnx("Not a MIDI file, too short"); @@ -716,6 +726,7 @@ main(int argc, char **argv) int ch; int listdevs = 0; int example = 0; + int silence = 0; int nmidi; const char *file = DEVMUSIC; const char *sunit; @@ -725,7 +736,7 @@ main(int argc, char **argv) if ((sunit = getenv("MIDIUNIT"))) unit = parse_unit(sunit); - while ((ch = getopt(argc, argv, "?d:f:lmp:qt:vx")) != -1) { + while ((ch = getopt(argc, argv, "?d:f:lmp:qst:vx")) != -1) { switch(ch) { case 'd': unit = parse_unit(optarg); @@ -745,6 +756,9 @@ main(int argc, char **argv) case 'q': play = 0; break; + case 's': + silence++; + break; case 't': ttempo = atoi(optarg); break; @@ -785,6 +799,10 @@ main(int argc, char **argv) if (example) while (example--) playdata(sample, sizeof sample, ""); + else if (silence) + while (silence--) + playdata(silence_sample, sizeof silence_sample, + ""); else if (argc == 0) playfile(stdin, ""); else
CVS commit: src/external/gpl2/texinfo/makedoc
Module Name:src Committed By: nonaka Date: Thu May 3 01:12:26 UTC 2018 Modified Files: src/external/gpl2/texinfo/makedoc: Makefile Log Message: Restore MAKEDOC. Fix a build failure on non NetBSD host. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/texinfo/makedoc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/texinfo/makedoc/Makefile diff -u src/external/gpl2/texinfo/makedoc/Makefile:1.2 src/external/gpl2/texinfo/makedoc/Makefile:1.3 --- src/external/gpl2/texinfo/makedoc/Makefile:1.2 Tue May 1 19:59:43 2018 +++ src/external/gpl2/texinfo/makedoc/Makefile Thu May 3 01:12:26 2018 @@ -1,5 +1,6 @@ -# $NetBSD: Makefile,v 1.2 2018/05/01 19:59:43 christos Exp $ +# $NetBSD: Makefile,v 1.3 2018/05/03 01:12:26 nonaka Exp $ +MAKEDOC= .include HOSTPROG= makedoc
CVS commit: src/tools/m68k-elf2aout
Module Name:src Committed By: christos Date: Thu May 3 01:09:05 UTC 2018 Modified Files: src/tools/m68k-elf2aout: Makefile Log Message: need bsd.hostinit.mk before bsd.endian.mk To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tools/m68k-elf2aout/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/m68k-elf2aout/Makefile diff -u src/tools/m68k-elf2aout/Makefile:1.2 src/tools/m68k-elf2aout/Makefile:1.3 --- src/tools/m68k-elf2aout/Makefile:1.2 Tue May 1 08:38:40 2018 +++ src/tools/m68k-elf2aout/Makefile Wed May 2 21:09:04 2018 @@ -1,4 +1,6 @@ -# $NetBSD: Makefile,v 1.2 2018/05/01 12:38:40 christos Exp $ +# $NetBSD: Makefile,v 1.3 2018/05/03 01:09:04 christos Exp $ + +.include HOSTPROGNAME= ${_TOOL_PREFIX}m68k-elf2aout HOST_SRCDIR= usr.bin/elf2aout
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Thu May 3 00:32:11 UTC 2018 Modified Files: src/bin/sh: sh.1 Log Message: Simplify convoluted language, and remove incorrect statement (that I added a while ago) about what is required by POSIX. To generate a diff of this commit: cvs rdiff -u -r1.204 -r1.205 src/bin/sh/sh.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/sh.1 diff -u src/bin/sh/sh.1:1.204 src/bin/sh/sh.1:1.205 --- src/bin/sh/sh.1:1.204 Wed May 2 21:43:38 2018 +++ src/bin/sh/sh.1 Thu May 3 00:32:11 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: sh.1,v 1.204 2018/05/02 21:43:38 pgoyette Exp $ +.\" $NetBSD: sh.1,v 1.205 2018/05/03 00:32:11 kre Exp $ .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -2321,15 +2321,12 @@ or .Xr fcntl 2 .Dv F_SETFD / .Dv FD_CLOEXEC ) , -unless the descriptors to which they point refer to the standard input, +unless the descriptors refer to the standard input, output, or error (file descriptors 0, 1, 2). Traditionally Bourne-like shells (except .Xr ksh 1 ) , made those file descriptors available to exec'ed processes. -This behavior is required by the POSIX standard, so when the -.Cm posix -option is set, this shell also acts that way. To be assured the close-on-exec setting is off, redirect the descriptor to (or from) itself, either when invoking a command for which the descriptor is wanted open,
CVS commit: src/doc
Module Name:src Committed By: roy Date: Wed May 2 22:11:49 UTC 2018 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-7.0.4 To generate a diff of this commit: cvs rdiff -u -r1.1517 -r1.1518 src/doc/3RDPARTY cvs rdiff -u -r1.2384 -r1.2385 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1517 src/doc/3RDPARTY:1.1518 --- src/doc/3RDPARTY:1.1517 Sat Apr 28 18:29:21 2018 +++ src/doc/3RDPARTY Wed May 2 22:11:49 2018 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1517 2018/04/28 18:29:21 jmcneill Exp $ +# $NetBSD: 3RDPARTY,v 1.1518 2018/05/02 22:11:49 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -334,8 +334,8 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 7.0.3 -Current Vers: 7.0.3 +Version: 7.0.4 +Current Vers: 7.0.4 Maintainer: roy Archive Site: ftp://roy.marples.name/pub/dhcpcd/ Home Page: http://roy.marples.name/projects/dhcpcd/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2384 src/doc/CHANGES:1.2385 --- src/doc/CHANGES:1.2384 Wed May 2 00:14:56 2018 +++ src/doc/CHANGES Wed May 2 22:11:49 2018 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2384 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2385 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -149,3 +149,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: file(1): Upgraded to 5.33. [christos 20180415] netpgp(3lua): Add Lua binding for libnetpgp(3). [sevan 20180429] arm: Add support for Allwinner H6 SoC. [jmcneill 20180501] + dhcpcd: Import 7.0.4. [roy 20180502]
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Wed May 2 22:08:45 UTC 2018 Modified Files: src/external/bsd/dhcpcd/dist/src: if-options.c Log Message: Sync To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/bsd/dhcpcd/dist/src/if-options.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/bsd/dhcpcd/dist/src/if-options.c diff -u src/external/bsd/dhcpcd/dist/src/if-options.c:1.8 src/external/bsd/dhcpcd/dist/src/if-options.c:1.9 --- src/external/bsd/dhcpcd/dist/src/if-options.c:1.8 Fri Apr 6 10:47:47 2018 +++ src/external/bsd/dhcpcd/dist/src/if-options.c Wed May 2 22:08:45 2018 @@ -1850,6 +1850,7 @@ err_sla: logerrx("invalid code: %s", arg); return -1; } + fp = strskipwhite(fp); if (fp) { s = parse_string(NULL, 0, fp); if (s == -1) { @@ -1912,12 +1913,32 @@ err_sla: } if (fp) *fp++ = '\0'; - if (strcasecmp(arg, "hmacmd5") == 0 || - strcasecmp(arg, "hmac-md5") == 0) - ifo->auth.algorithm = AUTH_ALG_HMAC_MD5; - else { - logerrx("%s: unsupported algorithm", arg); - return 1; + if (ifo->auth.protocol == AUTH_PROTO_TOKEN) { + np = strchr(arg, '/'); + if (np) { +if (fp == NULL || np < fp) + *np++ = '\0'; +else + np = NULL; + } + if (parse_uint32(&ifo->auth.token_snd_secretid, + arg) == -1) +logerrx("%s: not a number", arg); + else +ifo->auth.token_rcv_secretid = +ifo->auth.token_snd_secretid; + if (np && + parse_uint32(&ifo->auth.token_rcv_secretid, + np) == -1) +logerrx("%s: not a number", arg); + } else { + if (strcasecmp(arg, "hmacmd5") == 0 || + strcasecmp(arg, "hmac-md5") == 0) +ifo->auth.algorithm = AUTH_ALG_HMAC_MD5; + else { +logerrx("%s: unsupported algorithm", arg); +return 1; + } } arg = fp; if (arg == NULL) {
CVS commit: src/sys/arch/macppc/conf
Module Name:src Committed By: macallan Date: Wed May 2 22:07:37 UTC 2018 Modified Files: src/sys/arch/macppc/conf: files.macppc Log Message: don't pull in pic_u3_ht with uninorth - it's part of ibmcpc To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/arch/macppc/conf/files.macppc 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/macppc/conf/files.macppc diff -u src/sys/arch/macppc/conf/files.macppc:1.109 src/sys/arch/macppc/conf/files.macppc:1.110 --- src/sys/arch/macppc/conf/files.macppc:1.109 Fri Apr 20 18:22:50 2018 +++ src/sys/arch/macppc/conf/files.macppc Wed May 2 22:07:37 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.macppc,v 1.109 2018/04/20 18:22:50 macallan Exp $ +# $NetBSD: files.macppc,v 1.110 2018/05/02 22:07:37 macallan Exp $ # # macppc-specific configuration info @@ -106,7 +106,7 @@ device grackle: pcibus, pic_heathrow attach grackle at mainbus file arch/macppc/pci/grackle.c grackle -device uninorth: pcibus, pic_openpic, ipi_openpic, pic_u3_ht +device uninorth: pcibus, pic_openpic, ipi_openpic attach uninorth at mainbus file arch/macppc/pci/uninorth.c uninorth
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Wed May 2 22:06:42 UTC 2018 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv11048 Log Message: Import dhcpcd-7.0.4 with the following changes: * Routing: Fix case when cloning route changes but needs to be replaced * DHCP6: Transpose DHCP userclass option into DHCP6 * DHCP6: Fix sending custom vendor class option * Auth: Allow zero value replay detection data * Auth: Allow different tokens for send and receive * ND6: Warn if router lifetime is set to zero * DHCP6: Softwire Address and Port-Mapped Clients, RFC7598 Status: Vendor Tag: roy Release Tags: dhcpcd-7-0-4 U src/external/bsd/dhcpcd/dist/.arcconfig U src/external/bsd/dhcpcd/dist/.gitignore U src/external/bsd/dhcpcd/dist/BUILDING.md U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/Makefile U src/external/bsd/dhcpcd/dist/Makefile.inc U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/config-null.mk U src/external/bsd/dhcpcd/dist/configure U src/external/bsd/dhcpcd/dist/iconfig.mk U src/external/bsd/dhcpcd/dist/compat/_strtoi.h U src/external/bsd/dhcpcd/dist/compat/arc4random.c U src/external/bsd/dhcpcd/dist/compat/arc4random.h U src/external/bsd/dhcpcd/dist/compat/bitops.h U src/external/bsd/dhcpcd/dist/compat/queue.h U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h U src/external/bsd/dhcpcd/dist/compat/reallocarray.c U src/external/bsd/dhcpcd/dist/compat/dprintf.c U src/external/bsd/dhcpcd/dist/compat/dprintf.h U src/external/bsd/dhcpcd/dist/compat/endian.h U src/external/bsd/dhcpcd/dist/compat/pidfile.c U src/external/bsd/dhcpcd/dist/compat/pidfile.h U src/external/bsd/dhcpcd/dist/compat/reallocarray.h U src/external/bsd/dhcpcd/dist/compat/strlcpy.c U src/external/bsd/dhcpcd/dist/compat/strlcpy.h U src/external/bsd/dhcpcd/dist/compat/strtoi.c U src/external/bsd/dhcpcd/dist/compat/strtoi.h U src/external/bsd/dhcpcd/dist/compat/strtou.c U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h U src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/GNUmakefile U src/external/bsd/dhcpcd/dist/src/Makefile U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.c U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/dev.c U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in U src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in U src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/src/genembedc U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c U src/external/bsd/dhcpcd/dist/src/genembedh U src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/if-linux.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/if-sun.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpc
CVS commit: src/bin/sh
Module Name:src Committed By: pgoyette Date: Wed May 2 21:43:38 UTC 2018 Modified Files: src/bin/sh: sh.1 Log Message: Minor grammatical correction (don't end a sentence/phrase with a preposition). To generate a diff of this commit: cvs rdiff -u -r1.203 -r1.204 src/bin/sh/sh.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/sh.1 diff -u src/bin/sh/sh.1:1.203 src/bin/sh/sh.1:1.204 --- src/bin/sh/sh.1:1.203 Sat Mar 17 01:53:06 2018 +++ src/bin/sh/sh.1 Wed May 2 21:43:38 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: sh.1,v 1.203 2018/03/17 01:53:06 uwe Exp $ +.\" $NetBSD: sh.1,v 1.204 2018/05/02 21:43:38 pgoyette Exp $ .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -31,7 +31,7 @@ .\" .\" @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" -.Dd October 24, 2017 +.Dd May 3, 2018 .Dt SH 1 .\" everything except c o and s (keep them ordered) .ds flags abCEeFfhIiLmnpquVvXx @@ -2321,7 +2321,7 @@ or .Xr fcntl 2 .Dv F_SETFD / .Dv FD_CLOEXEC ) , -unless the descriptors they point to refer to the standard input, +unless the descriptors to which they point refer to the standard input, output, or error (file descriptors 0, 1, 2). Traditionally Bourne-like shells (except
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Wed May 2 21:20:58 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 SUNXI Log Message: Add sunxinmi To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/GENERIC64 cvs rdiff -u -r1.67 -r1.68 src/sys/arch/evbarm/conf/SUNXI 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/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.8 src/sys/arch/evbarm/conf/GENERIC64:1.9 --- src/sys/arch/evbarm/conf/GENERIC64:1.8 Wed May 2 11:02:42 2018 +++ src/sys/arch/evbarm/conf/GENERIC64 Wed May 2 21:20:58 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.8 2018/05/02 11:02:42 jmcneill Exp $ +# $NetBSD: GENERIC64,v 1.9 2018/05/02 21:20:58 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -105,6 +105,7 @@ bcmicu* at fdt? pass 1 # Broadcom BCM2 tegralic* at fdt? pass 1 # NVIDIA Tegra LIC gic* at fdt? pass 1 # ARM GIC armgic0 at gic? +sunxinmi* at fdt? pass 2 # Allwinner NMI / R_INTC # Memory controller tegramc* at fdt? pass 4 # NVIDIA Tegra MC Index: src/sys/arch/evbarm/conf/SUNXI diff -u src/sys/arch/evbarm/conf/SUNXI:1.67 src/sys/arch/evbarm/conf/SUNXI:1.68 --- src/sys/arch/evbarm/conf/SUNXI:1.67 Wed May 2 11:02:42 2018 +++ src/sys/arch/evbarm/conf/SUNXI Wed May 2 21:20:58 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: SUNXI,v 1.67 2018/05/02 11:02:42 jmcneill Exp $ +# $NetBSD: SUNXI,v 1.68 2018/05/02 21:20:58 jmcneill Exp $ # # Allwinner sunxi family # @@ -214,6 +214,7 @@ sunxiwdt* at fdt? # Allwinner watchdog gic* at fdt? pass 1 # GIC armgic0 at gic? sunxiintc* at fdt? pass 1 # Allwinner INTC +sunxinmi* at fdt? pass 2 # Allwinner NMI / R_INTC # Memory controller
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Wed May 2 21:20:20 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: files.sunxi Added Files: src/sys/arch/arm/sunxi: sunxi_nmi.c Log Message: Add driver for Allwinner NMI / R_INTC interrupt controller. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sunxi_nmi.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/sunxi/files.sunxi diff -u src/sys/arch/arm/sunxi/files.sunxi:1.51 src/sys/arch/arm/sunxi/files.sunxi:1.52 --- src/sys/arch/arm/sunxi/files.sunxi:1.51 Wed May 2 11:02:21 2018 +++ src/sys/arch/arm/sunxi/files.sunxi Wed May 2 21:20:20 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.sunxi,v 1.51 2018/05/02 11:02:21 jmcneill Exp $ +# $NetBSD: files.sunxi,v 1.52 2018/05/02 21:20:20 jmcneill Exp $ # # Configuration info for Allwinner sunxi family SoCs # @@ -94,6 +94,10 @@ device sunxiintc: pic, pic_splfuncs attach sunxiintc at fdt with sunxi_intc file arch/arm/sunxi/sunxi_intc.c sunxi_intc +device sunxinmi +attach sunxinmi at fdt with sunxi_nmi +file arch/arm/sunxi/sunxi_nmi.c sunxi_nmi + # GPIO device sunxigpio: gpiobus attach sunxigpio at fdt with sunxi_gpio Added files: Index: src/sys/arch/arm/sunxi/sunxi_nmi.c diff -u /dev/null src/sys/arch/arm/sunxi/sunxi_nmi.c:1.1 --- /dev/null Wed May 2 21:20:20 2018 +++ src/sys/arch/arm/sunxi/sunxi_nmi.c Wed May 2 21:20:20 2018 @@ -0,0 +1,283 @@ +/* $NetBSD: sunxi_nmi.c,v 1.1 2018/05/02 21:20:20 jmcneill Exp $ */ + +/*- + * Copyright (c) 2018 Jared McNeill + * 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 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. + */ + +#define _INTR_PRIVATE + +#include +__KERNEL_RCSID(0, "$NetBSD: sunxi_nmi.c,v 1.1 2018/05/02 21:20:20 jmcneill Exp $"); + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +/* ctrl_reg */ +#define NMI_CTRL_IRQ_LOW_LEVEL 0 +#define NMI_CTRL_IRQ_LOW_EDGE 1 +#define NMI_CTRL_IRQ_HIGH_LEVEL 2 +#define NMI_CTRL_IRQ_HIGH_EDGE 3 +#define NMI_CTRL_IRQ_TYPE __BITS(1,0) + +/* pend_reg */ +#define NMI_PEND_IRQ_ACK __BIT(0) + +/* enable_reg */ +#define NMI_ENABLE_IRQEN __BIT(0) + +struct sunxi_nmi_config { + const char * name; + bus_size_t ctrl_reg; + bus_size_t pend_reg; + bus_size_t enable_reg; +}; + +static const struct sunxi_nmi_config sun7i_a20_sc_nmi_config = { + .name = "NMI", + .ctrl_reg = 0x00, + .pend_reg = 0x04, + .enable_reg = 0x08, +}; + +static const struct sunxi_nmi_config sun6i_a31_r_intc_config = { + .name = "R_INTC", + .ctrl_reg = 0x0c, + .pend_reg = 0x10, + .enable_reg = 0x40, +}; + +static const struct of_compat_data compat_data[] = { + { "allwinner,sun7i-a20-sc-nmi", (uintptr_t)&sun7i_a20_sc_nmi_config }, + { "allwinner,sun6i-a31-r-intc", (uintptr_t)&sun6i_a31_r_intc_config }, + { NULL } +}; + +struct sunxi_nmi_softc { + device_t sc_dev; + bus_space_tag_t sc_bst; + bus_space_handle_t sc_bsh; + int sc_phandle; + + const struct sunxi_nmi_config *sc_config; + + int (*sc_func)(void *); + void *sc_arg; +}; + +#define NMI_READ(sc, reg) \ + bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (reg)) +#define NMI_WRITE(sc, reg, val) \ + bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (val)) + +static void +sunxi_nmi_irq_ack(struct sunxi_nmi_softc *sc) +{ + uint32_t val; + + val = NMI_READ(sc, sc->sc_config->pend_reg); + val |= NMI_PEND_IRQ_ACK; + NMI_WRITE(sc, sc->sc_config->pend_reg, val); +} + +static void +sunxi_nmi_irq_enable(struct sunxi_nmi_softc *sc, bool on) +{ + uint32_t val; + + val = NMI_READ(sc, sc->sc_config->enable_reg); + if (on) + val |= NMI_ENABLE_IRQEN; + else + va
CVS commit: src
Module Name:src Committed By: kamil Date: Wed May 2 18:46:05 UTC 2018 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/c++: Makefile src/tests/usr.bin/cc: Makefile Added Files: src/tests/usr.bin/c++: t_ubsan_int_add_overflow.sh t_ubsan_int_divzero.sh t_ubsan_int_neg_overflow.sh t_ubsan_int_sub_overflow.sh t_ubsan_vla_out_of_bounds.sh src/tests/usr.bin/cc: t_ubsan_int_add_overflow.sh t_ubsan_int_divzero.sh t_ubsan_int_neg_overflow.sh t_ubsan_int_sub_overflow.sh t_ubsan_vla_out_of_bounds.sh Log Message: Add new ATF Undefined Behavior Sanitizer tests Add new cc and c++ tests to check whether UBSan works. These tests are prepared for GCC (in base) and Clang (with external patches). Enable these tests for all ports by default, just verify whether we are using GCC/Clang or a compatible compiler. Add five equivalent C and C++ tests: - Integer addition overflow - Integer divide by zero - Integer negation overflow - Integer subtraction overflow - VLA out of bounds All tests pass on NetBSD/amd64. Patch submitted by Minor cleanup by To generate a diff of this commit: cvs rdiff -u -r1.781 -r1.782 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/c++/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/c++/t_ubsan_int_add_overflow.sh \ src/tests/usr.bin/c++/t_ubsan_int_divzero.sh \ src/tests/usr.bin/c++/t_ubsan_int_neg_overflow.sh \ src/tests/usr.bin/c++/t_ubsan_int_sub_overflow.sh \ src/tests/usr.bin/c++/t_ubsan_vla_out_of_bounds.sh cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/cc/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/cc/t_ubsan_int_add_overflow.sh \ src/tests/usr.bin/cc/t_ubsan_int_divzero.sh \ src/tests/usr.bin/cc/t_ubsan_int_neg_overflow.sh \ src/tests/usr.bin/cc/t_ubsan_int_sub_overflow.sh \ src/tests/usr.bin/cc/t_ubsan_vla_out_of_bounds.sh 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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.781 src/distrib/sets/lists/tests/mi:1.782 --- src/distrib/sets/lists/tests/mi:1.781 Wed Apr 11 03:25:25 2018 +++ src/distrib/sets/lists/tests/mi Wed May 2 18:46:05 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.781 2018/04/11 03:25:25 kamil Exp $ +# $NetBSD: mi,v 1.782 2018/05/02 18:46:05 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3641,6 +3641,11 @@ ./usr/tests/usr.bin/c++/t_asan_off_by_one tests-usr.bin-tests compattestfile,atf,cxx ./usr/tests/usr.bin/c++/t_asan_poison tests-usr.bin-tests compattestfile,atf,cxx ./usr/tests/usr.bin/c++/t_asan_uaf tests-usr.bin-tests compattestfile,atf,cxx +./usr/tests/usr.bin/c++/t_ubsan_int_add_overflow tests-usr.bin-tests compattestfile,atf,cxx +./usr/tests/usr.bin/c++/t_ubsan_int_sub_overflow tests-usr.bin-tests compattestfile,atf,cxx +./usr/tests/usr.bin/c++/t_ubsan_int_neg_overflow tests-usr.bin-tests compattestfile,atf,cxx +./usr/tests/usr.bin/c++/t_ubsan_int_divzero tests-usr.bin-tests compattestfile,atf,cxx +./usr/tests/usr.bin/c++/t_ubsan_vla_out_of_bounds tests-usr.bin-tests compattestfile,atf,cxx ./usr/tests/usr.bin/c++/t_call_once tests-usr.bin-tests compattestfile,atf,cxx ./usr/tests/usr.bin/c++/t_call_once2 tests-usr.bin-tests compattestfile,atf,cxx ./usr/tests/usr.bin/c++/t_cxxruntime tests-usr.bin-tests compattestfile,atf,cxx @@ -3657,6 +3662,11 @@ ./usr/tests/usr.bin/cc/t_asan_off_by_one tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/cc/t_asan_poison tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/cc/t_asan_uaf tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/cc/t_ubsan_int_add_overflow tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/cc/t_ubsan_int_sub_overflow tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/cc/t_ubsan_int_neg_overflow tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/cc/t_ubsan_int_divzero tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/cc/t_ubsan_vla_out_of_bounds tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/cmptests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/cmp/Atffile tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/cmp/Kyuafile tests-usr.bin-tests compattestfile,atf,kyua Index: src/tests/usr.bin/c++/Makefile diff -u src/tests/usr.bin/c++/Makefile:1.8 src/tests/usr.bin/c++/Makefile:1.9 --- src/tests/usr.bin/c++/Makefile:1.8 Wed Apr 11 03:25:25 2018 +++ src/tests/usr.bin/c++/Makefile Wed May 2 18:46:05 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2018/04/11 03:25:25 kamil Exp $ +# $NetBSD: Makefile,v 1.9 2018/05/02 18:46:05 kamil Exp $ .include @@ -11,6 +11,11 @@ TESTS_SH+= t_asan_heap_overflow TESTS_SH+= t_asan_off_by_one TESTS_SH+= t_asan_poison TESTS_SH+= t_asan_uaf +TESTS_SH+= t_ubsan_int_add_ove
CVS commit: src/lib/libc/sys
Module Name:src Committed By: christos Date: Wed May 2 16:00:20 UTC 2018 Modified Files: src/lib/libc/sys: mmap.2 Log Message: Explain PROT_MPROTECT better, add references to mremap(2), document the unimplemented flags, documented the alignment pre-defined constants. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/lib/libc/sys/mmap.2 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/sys/mmap.2 diff -u src/lib/libc/sys/mmap.2:1.51 src/lib/libc/sys/mmap.2:1.52 --- src/lib/libc/sys/mmap.2:1.51 Mon Jun 12 10:59:04 2017 +++ src/lib/libc/sys/mmap.2 Wed May 2 12:00:20 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: mmap.2,v 1.51 2017/06/12 14:59:04 abhinav Exp $ +.\" $NetBSD: mmap.2,v 1.52 2018/05/02 16:00:20 christos Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" -.Dd April 27, 2017 +.Dd May 2, 2018 .Dt MMAP 2 .Os .Sh NAME @@ -89,12 +89,22 @@ Placeholder when requesting no access pe .Pp As a .Nx -extension, +extension, the .Dv PROT_MPROTECT -can be used to request additional permissions for later use with +macro can be used to request additional permissions for later use with .Fn mprotect 2 . +For example +.Dv PROT_MPROTECT(PROT_READ) +requests that future +.Dv PROT_READ +mappings are allowed and can be enabled using +.Xr mprotect 2 , +but does not currently grant read mappings to the returned memory segment. This is necessary for switching pages between writable and executable -when PAX mprotect restrictions are in place. +when PaX MPROTECT restrictions are in place. +See +.Xr mremap 2 +for a sample use case. .Pp .Bf -symbolic Note that, due to hardware limitations, on some platforms @@ -137,6 +147,21 @@ size as returned by with the .Dv _SC_PAGESIZE request. +The following constants are defined for convenience: +.Bl -bullet -compact -offset indent +.It +.Dv MAP_ALIGNMENT_64KB +.It +.Dv MAP_ALIGNMENT_16MB +.It +.Dv MAP_ALIGNMENT_4GB +.It +.Dv MAP_ALIGNMENT_1TB +.It +.Dv MAP_ALIGNMENT_256TB +.It +.Dv MAP_ALIGNMENT_64PB +.El .It Dv MAP_ANON Map anonymous memory not associated with any specific file. The file descriptor is not used for creating @@ -170,6 +195,23 @@ handling may be necessary. Permit regions to be inherited across .Xr execve 2 system calls. +.It Dv MAP_NORESERVE +Only reserve address space, but do not reserve swap space or any other +resources for this mapping. +Access to the address space is not guaranteed and may result in a segmentation +violation. +Unimplemented. +.It Dv MAP_REMAPDUP +Only valid for +.Xr mremap 2 . +.It Dv MAP_RENAME +Assign the referenced private pages to the file descriptor provided. +Unimplemented. +.It Dv MAP_STACK +Allocate a memory segment that can be used either for a process or thread stack. +This currently has no effect, but its use is reserved for architectures +that might require special treatment of that address space. +Unimplemented. .It Dv MAP_TRYFIXED Attempt to use the address .Fa addr @@ -303,6 +345,7 @@ would exceed the offset maximum establis .Xr mincore 2 , .Xr mlock 2 , .Xr mprotect 2 , +.Xr mremap 2 , .Xr msync 2 , .Xr munmap 2 , .Xr getpagesize 3 ,
CVS commit: src/lib/libc/sys
Module Name:src Committed By: christos Date: Wed May 2 15:25:13 UTC 2018 Modified Files: src/lib/libc/sys: mremap.2 Log Message: Add EXAMPLE and ERRORS section. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/sys/mremap.2 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/sys/mremap.2 diff -u src/lib/libc/sys/mremap.2:1.5 src/lib/libc/sys/mremap.2:1.6 --- src/lib/libc/sys/mremap.2:1.5 Sat May 6 17:34:51 2017 +++ src/lib/libc/sys/mremap.2 Wed May 2 11:25:13 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: mremap.2,v 1.5 2017/05/06 21:34:51 joerg Exp $ +.\" $NetBSD: mremap.2,v 1.6 2018/05/02 15:25:13 christos Exp $ .\" .\" Copyright (c) 2007 Thomas Klausner and Joerg Sonnenberger .\" All rights reserved. @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd April 28, 2017 +.Dd May 2, 2018 .Dt MREMAP 2 .Os .Sh NAME @@ -91,6 +91,127 @@ Both address ranges reference the same p returns the new address or .Dv MAP_FAILED , if the remap failed. +.Sh EXAMPLES +The following example program creates a two mappings for the same +memory range, one RW- and one R-X. +.Bd -literal +#include +#include + +#include +#include +#include +#include +#include + +static int +return_1(void) +{ + return 1; +} + +static void +return_1_end(void) +{ +} + +static int +return_2(void) +{ + return 2; +} + +static void +return_2_end(void) +{ +} + +int +main(int argc, char *argv[]) +{ +void *maprw, *maprx; + int rv; + size_t page = (size_t)sysconf(_SC_PAGESIZE); + + // Create the first mapping that has no protections, but intended + // protections only + maprw = mmap(NULL, page, + PROT_MPROTECT(PROT_EXEC|PROT_WRITE|PROT_READ), +MAP_ANON, -1, 0); + if (maprw == MAP_FAILED) + err(EXIT_FAILURE, "mmap failed"); + +// Create the second mapping for the same physical space, which + // again has no protections. + maprx = mremap(maprw, page, NULL, page, MAP_REMAPDUP); + if (maprx == MAP_FAILED) + err(EXIT_FAILURE, "mremap failed"); + + // Set the first mapping read/write +if (mprotect(maprw, page, PROT_READ|PROT_WRITE) == -1) + err(EXIT_FAILURE, "mprotect(rw) failed"); + + // Set the second mapping read/execute +if (mprotect(maprx, page, PROT_READ|PROT_EXEC) == -1) + err(EXIT_FAILURE, "mprotect(rx) failed"); + +#define XS(a) (size_t)((uintptr_t)(a ## _end) - (uintptr_t)(a)) + + // Copy and run the first function + memcpy(maprw, return_1, XS(return_1)); + __builtin___clear_cache(maprw, (void *)((uintptr_t)maprw + page)); + rv = ((int (*)(void))maprx)(); + printf("%d\en", rv); + + // Copy and run the second function + memcpy(maprw, return_2, XS(return_2)); + __builtin___clear_cache(maprw, (void *)((uintptr_t)maprw + page)); + rv = ((int (*)(void))maprx)(); + printf("%d\en", rv); + + return EXIT_SUCCESS; +} +.Ed +.Sh ERRORS +The +.Fn mremap +function fails if: +.Bl -tag -width Er +.It Bq Er EINVAL +If +.Fa oldp +or +.Fa newp +are not page aligned, or +.Fa oldsize +or +.Fa newsize +are not a multiple of the page size, or if +.Fa oldp + +.Fa oldsize +or +.Fa newp + +.Fa newsize +wrap around, or if an invalid alignment was requested in the +.Fa flags +argument, or if the request was to extend +.Fa oldp +and the extension address space either did not fit, was already occupied, +or had set permissions. +.It Bq Er ENOMEM +If there was either no space to allocate/move memory, +or if a fixed allocation was requested in the +.Fa flags +that could not be accommodated. +.It Bq Er ENOENT +If the +.Fa oldp +segmented was not already mapped. +.It Bq Er E2BIG +A request to extend +.Fa oldp +failed because of address overflow. +.El .Sh COMPATIBILITY The semantics of .Fn mremap
CVS commit: src/external/bsd/bind/include/isc
Module Name:src Committed By: martin Date: Wed May 2 14:43:59 UTC 2018 Modified Files: src/external/bsd/bind/include/isc: platform.h Log Message: Use crypto code from openssl. Fixes PR bin/53250, suggested by Christos. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/external/bsd/bind/include/isc/platform.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/bind/include/isc/platform.h diff -u src/external/bsd/bind/include/isc/platform.h:1.25 src/external/bsd/bind/include/isc/platform.h:1.26 --- src/external/bsd/bind/include/isc/platform.h:1.25 Sat Apr 7 22:23:27 2018 +++ src/external/bsd/bind/include/isc/platform.h Wed May 2 14:43:59 2018 @@ -349,7 +349,7 @@ /* * Define if the hash functions must be provided by OpenSSL. */ -#undef ISC_PLATFORM_OPENSSLHASH +#define ISC_PLATFORM_OPENSSLHASH /* * Define if AES support is wanted
CVS commit: src/external/apache2/mDNSResponder/dist/mDNSShared
Module Name:src Committed By: christos Date: Wed May 2 12:12:13 UTC 2018 Modified Files: src/external/apache2/mDNSResponder/dist/mDNSShared: PlatformCommon.c Log Message: initialize addr to 0. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.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/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c diff -u src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:1.4 src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:1.5 --- src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:1.4 Sun Jan 14 15:04:56 2018 +++ src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c Wed May 2 08:12:13 2018 @@ -44,6 +44,7 @@ mDNSexport void mDNSPlatformSourceAddrFo int sock = socket(AF_INET, SOCK_DGRAM, 0); src->type = mDNSAddrType_None; if (sock == -1) return; +memset(&addr, 0, sizeof(addr)); if (dst->type == mDNSAddrType_IPv4) { inner_len = sizeof(addr.a4);
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Wed May 2 11:02:42 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 SUNXI Log Message: Add sun50ih6rccu To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/GENERIC64 cvs rdiff -u -r1.66 -r1.67 src/sys/arch/evbarm/conf/SUNXI 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/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.7 src/sys/arch/evbarm/conf/GENERIC64:1.8 --- src/sys/arch/evbarm/conf/GENERIC64:1.7 Wed May 2 10:09:15 2018 +++ src/sys/arch/evbarm/conf/GENERIC64 Wed May 2 11:02:42 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.7 2018/05/02 10:09:15 jmcneill Exp $ +# $NetBSD: GENERIC64,v 1.8 2018/05/02 11:02:42 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -132,6 +132,7 @@ sun8ih3ccu* at fdt? pass 2 # Allwinner sun8ih3rccu* at fdt? pass 2 # Allwinner H3/H5 CCU (PRCM) sun50ia64ccu* at fdt? pass 2 # Allwinner A64 CCU sun50ih6ccu* at fdt? pass 2 # Allwinner H6 CCU +sun50ih6rccu* at fdt? pass 2 # Allwinner H6 CCU (PRCM) sunxiresets* at fdt? pass 1 # Allwinner misc. resets sunxigates* at fdt? pass 1 # Allwinner misc. gates sunxigmacclk* at fdt? pass 2 # Allwinner GMAC MII/RGMII clock mux Index: src/sys/arch/evbarm/conf/SUNXI diff -u src/sys/arch/evbarm/conf/SUNXI:1.66 src/sys/arch/evbarm/conf/SUNXI:1.67 --- src/sys/arch/evbarm/conf/SUNXI:1.66 Wed May 2 00:02:06 2018 +++ src/sys/arch/evbarm/conf/SUNXI Wed May 2 11:02:42 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: SUNXI,v 1.66 2018/05/02 00:02:06 jmcneill Exp $ +# $NetBSD: SUNXI,v 1.67 2018/05/02 11:02:42 jmcneill Exp $ # # Allwinner sunxi family # @@ -185,6 +185,7 @@ sun8ih3rccu* at fdt? pass 2 # H3 CCU (P sun9ia80ccu* at fdt? pass 2 # A80 CCU sun50ia64ccu* at fdt? pass 2 # A64 CCU sun50ih6ccu* at fdt? pass 2 # H6 CCU +sun50ih6rccu* at fdt? pass 2 # H6 CCU (PRCM) sunxiresets* at fdt? pass 1 # Misc. clock resets sunxigates* at fdt? pass 1 # Misc. clock gates sunxigmacclk* at fdt? pass 2 # GMAC MII/RGMII clock mux
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Wed May 2 11:02:21 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: files.sunxi Added Files: src/sys/arch/arm/sunxi: sun50i_h6_r_ccu.c sun50i_h6_r_ccu.h Log Message: Add driver for Allwinner H6 PRCM CCU. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sun50i_h6_r_ccu.c \ src/sys/arch/arm/sunxi/sun50i_h6_r_ccu.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/sunxi/files.sunxi diff -u src/sys/arch/arm/sunxi/files.sunxi:1.50 src/sys/arch/arm/sunxi/files.sunxi:1.51 --- src/sys/arch/arm/sunxi/files.sunxi:1.50 Tue May 1 23:59:42 2018 +++ src/sys/arch/arm/sunxi/files.sunxi Wed May 2 11:02:21 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.sunxi,v 1.50 2018/05/01 23:59:42 jmcneill Exp $ +# $NetBSD: files.sunxi,v 1.51 2018/05/02 11:02:21 jmcneill Exp $ # # Configuration info for Allwinner sunxi family SoCs # @@ -64,6 +64,11 @@ device sun50ih6ccu: sunxi_ccu attach sun50ih6ccu at fdt with sunxi_h6_ccu file arch/arm/sunxi/sun50i_h6_ccu.c sunxi_h6_ccu +# CCU (H6 PRCM) +device sun50ih6rccu: sunxi_ccu +attach sun50ih6rccu at fdt with sunxi_h6_r_ccu +file arch/arm/sunxi/sun50i_h6_r_ccu.c sunxi_h6_r_ccu + # Misc. clock resets device sunxiresets attach sunxiresets at fdt with sunxi_resets Added files: Index: src/sys/arch/arm/sunxi/sun50i_h6_r_ccu.c diff -u /dev/null src/sys/arch/arm/sunxi/sun50i_h6_r_ccu.c:1.1 --- /dev/null Wed May 2 11:02:21 2018 +++ src/sys/arch/arm/sunxi/sun50i_h6_r_ccu.c Wed May 2 11:02:21 2018 @@ -0,0 +1,156 @@ +/* $NetBSD: sun50i_h6_r_ccu.c,v 1.1 2018/05/02 11:02:21 jmcneill Exp $ */ + +/*- + * Copyright (c) 2018 Jared McNeill + * 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 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. + */ + +#include + +__KERNEL_RCSID(1, "$NetBSD: sun50i_h6_r_ccu.c,v 1.1 2018/05/02 11:02:21 jmcneill Exp $"); + +#include +#include +#include +#include + +#include + +#include +#include + +#define AR100_CFG_REG 0x00 +#define APB1_CFG_REG 0x0c +#define APB2_CFG_REG 0x10 +#define IR_CFG_REG 0x1c0 +#define W1_CFG_REG 0x1e0 + +static int sun50i_h6_r_ccu_match(device_t, cfdata_t, void *); +static void sun50i_h6_r_ccu_attach(device_t, device_t, void *); + +static const char * const compatible[] = { + "allwinner,sun50i-h6-r-ccu", + NULL +}; + +CFATTACH_DECL_NEW(sunxi_h6_r_ccu, sizeof(struct sunxi_ccu_softc), + sun50i_h6_r_ccu_match, sun50i_h6_r_ccu_attach, NULL, NULL); + +static struct sunxi_ccu_reset sun50i_h6_r_ccu_resets[] = { + SUNXI_CCU_RESET(H6_R_RST_APB1_TIMER, 0x11c, 16), + SUNXI_CCU_RESET(H6_R_RST_APB1_TWD, 0x12c, 16), + SUNXI_CCU_RESET(H6_R_RST_APB1_PWM, 0x13c, 16), + SUNXI_CCU_RESET(H6_R_RST_APB2_UART, 0x18c, 16), + SUNXI_CCU_RESET(H6_R_RST_APB2_I2C, 0x19c, 16), + SUNXI_CCU_RESET(H6_R_RST_APB1_IR, 0x1cc, 16), + SUNXI_CCU_RESET(H6_R_RST_APB1_W1, 0x1ec, 16), +}; + +static const char *ar100_parents[] = { "hosc", "losc", "pll-periph", "iosc" }; +static const char *apb1_parents[] = { "ahb" }; +static const char *apb2_parents[] = { "hosc", "losc", "pll-periph", "iosc" }; +static const char *mod_parents[] = { "losc", "hosc" }; + +static struct sunxi_ccu_clk sun50i_h6_r_ccu_clks[] = { + SUNXI_CCU_PREDIV(H6_R_CLK_AR100, "ar100", ar100_parents, + AR100_CFG_REG, /* reg */ + __BITS(4,0), /* prediv */ + __BIT(2), /* prediv_sel */ + __BITS(9,8), /* div */ + __BITS(25,24), /* sel */ + SUNXI_CCU_PREDIV_POWER_OF_TWO), + + SUNXI_CCU_FIXED_FACTOR(H6_R_CLK_AHB, "ahb", "ar100", 1, 1), + + SUNXI_CCU_DIV(H6_R_CLK_APB1, "apb1", apb1_parents, + APB1_CFG_REG, /* reg */ + __BITS(1,0), /* div
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Wed May 2 10:09:16 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 Log Message: add pcf8563rtc To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/GENERIC64 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/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.6 src/sys/arch/evbarm/conf/GENERIC64:1.7 --- src/sys/arch/evbarm/conf/GENERIC64:1.6 Wed May 2 00:02:15 2018 +++ src/sys/arch/evbarm/conf/GENERIC64 Wed May 2 10:09:15 2018 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.6 2018/05/02 00:02:15 jmcneill Exp $ +# $NetBSD: GENERIC64,v 1.7 2018/05/02 10:09:15 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -208,6 +208,7 @@ seeprom* at iic? as3722pmic* at iic? as3722reg* at as3722pmic? max77620pmic* at iic? +pcf8563rtc* at iic? # PCF8563 RTC tcagpio* at iic? # Random number generators
CVS commit: src/sys/external/gpl2/dts/dist
Module Name:src Committed By: jmcneill Date: Wed May 2 10:06:56 UTC 2018 Modified Files: src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner: sun50i-h6-pine-h64.dts sun50i-h6.dtsi Added Files: src/sys/external/gpl2/dts/dist/include/dt-bindings/clock: sun50i-h6-r-ccu.h src/sys/external/gpl2/dts/dist/include/dt-bindings/reset: sun50i-h6-r-ccu.h Log Message: Updated Allwinner H6 dts from https://github.com/Icenowy/linux/tree/h6-init To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts \ src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi cvs rdiff -u -r0 -r1.1 \ src/sys/external/gpl2/dts/dist/include/dt-bindings/clock/sun50i-h6-r-ccu.h cvs rdiff -u -r0 -r1.1 \ src/sys/external/gpl2/dts/dist/include/dt-bindings/reset/sun50i-h6-r-ccu.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/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts diff -u src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts:1.1.1.1 src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts:1.2 --- src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts:1.1.1.1 Sat Apr 28 18:25:53 2018 +++ src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts Wed May 2 10:06:56 2018 @@ -1,6 +1,7 @@ -// SPDX-License-Identifier: (GPL-2.0+ or MIT) /* * Copyright (c) 2017 Icenowy Zheng + * + * SPDX-License-Identifier: (GPL-2.0+ or MIT) */ /dts-v1/; @@ -14,12 +15,227 @@ compatible = "pine64,pine-h64", "allwinner,sun50i-h6"; aliases { + ethernet0 = &emac; serial0 = &uart0; }; chosen { stdout-path = "serial0:115200n8"; }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc-gmac-3v3"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + startup-delay-us = <10>; + gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_vcc3v3: vcc3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + }; + + reg_vcc1v8: vcc1v8 { + compatible = "regulator-fixed"; + regulator-name = "vcc1v8"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + }; + + reg_usb_vbus: vbus { + compatible = "regulator-fixed"; + regulator-name = "usb-vbus"; + regulator-min-microvolt = <500>; + regulator-max-microvolt = <500>; + startup-delay-us = <10>; + gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&cpu0 { + cpu-supply = <®_dcdca>; +}; + +&dwc3 { + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ehci3 { + status = "okay"; +}; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&ext_rgmii_pins>; + phy-mode = "rgmii"; + phy-handle = <&ext_rgmii_phy>; + phy-supply = <®_gmac_3v3>; + allwinner,rx-delay-ps = <200>; + allwinner,tx-delay-ps = <200>; + status = "okay"; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; + vmmc-supply = <®_vcc3v3>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_pins>; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc1v8>; + non-removable; + cap-mmc-hw-reset; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&ohci3 { + status = "okay"; +}; + +&r_i2c { + pinctrl-names = "default"; + pinctrl-0 = <&r_i2c_pins>; + status = "okay"; + + axp805: pmic@36 { + compatible = "x-powers,axp805"; + reg = <0x36>; + interrupt-parent = <&r_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + #interrupt-cells = <1>; + x-powers,master-mode; + + regulators { + reg_aldo1: aldo1 { +regulator-always-on; +regulator-min-microvolt = <330>; +regulator-max-microvolt = <330>; +regulator-name = "vcc-pl"; + }; + + reg_aldo2: aldo2 { +regulator-min-microvolt = <330>; +regulator-max-microvolt = <330>; +regulator-name = "vcc-ac200"; + }; + + reg_aldo3: aldo3 { +/* This regulator is connected with CLDO1 */ +regulator-always-on; +regulator-min-microvolt = <330>; +regulator-max-microvolt = <330>; +regulator-name = "vcc-3v3-1"; + }; + + reg_bldo1: bldo1 { +regulator-always-on; +regulator-min-microvolt = <180>; +regulator-max-microvolt = <180>; +regulator-name = "vcc-ddr-bias-pll"; + }; + + reg_bldo2: bldo2 { +regulator-always-on; +regulator-min-microvolt = <180>; +regulator-max-microvolt = <
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jmcneill Date: Wed May 2 09:55:22 UTC 2018 Modified Files: src/sys/dev/usb: xhci.c Log Message: "Root Hub" -> "root hub" for consistency with other HC drivers To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/dev/usb/xhci.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/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.90 src/sys/dev/usb/xhci.c:1.91 --- src/sys/dev/usb/xhci.c:1.90 Mon Apr 23 19:55:00 2018 +++ src/sys/dev/usb/xhci.c Wed May 2 09:55:22 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.90 2018/04/23 19:55:00 jdolecek Exp $ */ +/* $NetBSD: xhci.c,v 1.91 2018/05/02 09:55:22 jmcneill Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.90 2018/04/23 19:55:00 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.91 2018/05/02 09:55:22 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -3403,7 +3403,7 @@ xhci_roothub_ctrl(struct usbd_bus *bus, #define sd ((usb_string_descriptor_t *)buf) case C(2, UDESC_STRING): /* Product */ - totlen = usb_makestrdesc(sd, len, "xHCI Root Hub"); + totlen = usb_makestrdesc(sd, len, "xHCI root hub"); break; #undef sd default:
CVS commit: src/lib/libedit
Module Name:src Committed By: abhinav Date: Wed May 2 08:45:03 UTC 2018 Modified Files: src/lib/libedit: filecomplete.c Log Message: Add '*' and '[' to the list of characters which need escaping during autocompletion To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/lib/libedit/filecomplete.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/libedit/filecomplete.c diff -u src/lib/libedit/filecomplete.c:1.48 src/lib/libedit/filecomplete.c:1.49 --- src/lib/libedit/filecomplete.c:1.48 Fri Oct 27 18:16:09 2017 +++ src/lib/libedit/filecomplete.c Wed May 2 08:45:03 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: filecomplete.c,v 1.48 2017/10/27 18:16:09 abhinav Exp $ */ +/* $NetBSD: filecomplete.c,v 1.49 2018/05/02 08:45:03 abhinav Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: filecomplete.c,v 1.48 2017/10/27 18:16:09 abhinav Exp $"); +__RCSID("$NetBSD: filecomplete.c,v 1.49 2018/05/02 08:45:03 abhinav Exp $"); #endif /* not lint && not SCCSID */ #include @@ -151,6 +151,8 @@ needs_escaping(char c) case '{': case '}': case '&': + case '*': + case '[': return 1; default: return 0;
CVS commit: src/sys/arch/powerpc/powerpc
Module Name:src Committed By: phx Date: Wed May 2 08:24:40 UTC 2018 Modified Files: src/sys/arch/powerpc/powerpc: trap_subr.S Log Message: Fixed non-critical typo in tlbdsmiss: %r8 -> 8. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/arch/powerpc/powerpc/trap_subr.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/powerpc/powerpc/trap_subr.S diff -u src/sys/arch/powerpc/powerpc/trap_subr.S:1.78 src/sys/arch/powerpc/powerpc/trap_subr.S:1.79 --- src/sys/arch/powerpc/powerpc/trap_subr.S:1.78 Tue Jul 29 16:19:45 2014 +++ src/sys/arch/powerpc/powerpc/trap_subr.S Wed May 2 08:24:40 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: trap_subr.S,v 1.78 2014/07/29 16:19:45 joerg Exp $ */ +/* $NetBSD: trap_subr.S,v 1.79 2018/05/02 08:24:40 phx Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -598,7 +598,7 @@ _C_LABEL(tlbdlmsize) = .-_C_LABEL(tlbdlm .globl _C_LABEL(tlbdsmiss),_C_LABEL(tlbdsmsize) _C_LABEL(tlbdsmiss): mfspr %r2,SPR_HASH1 /* get first pointer */ - li %r1,%r8 + li %r1,8 mfctr %r0 /* save counter */ mfspr %r3,SPR_DCMP /* get first compare value */ addi %r2,%r2,-8 /* predec pointer */