CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Thu Jul 25 05:58:25 UTC 2019 Modified Files: src/sys/dev/pci/ixgbe: ixv.c Log Message: Set IVAR (Interrupt Vector Allocation Register) correctly in ixgbe_set_ivar(). Found by KUBSan. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/sys/dev/pci/ixgbe/ixv.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/pci/ixgbe/ixv.c diff -u src/sys/dev/pci/ixgbe/ixv.c:1.120 src/sys/dev/pci/ixgbe/ixv.c:1.121 --- src/sys/dev/pci/ixgbe/ixv.c:1.120 Wed Jul 17 03:26:24 2019 +++ src/sys/dev/pci/ixgbe/ixv.c Thu Jul 25 05:58:25 2019 @@ -1,4 +1,4 @@ -/*$NetBSD: ixv.c,v 1.120 2019/07/17 03:26:24 msaitoh Exp $*/ +/*$NetBSD: ixv.c,v 1.121 2019/07/25 05:58:25 msaitoh Exp $*/ /** @@ -2190,8 +2190,8 @@ ixv_set_ivar(struct adapter *adapter, u8 } else { /* RX/TX IVARS */ index = (16 * (entry & 1)) + (8 * type); ivar = IXGBE_READ_REG(hw, IXGBE_VTIVAR(entry >> 1)); - ivar &= ~(0xFF << index); - ivar |= (vector << index); + ivar &= ~(0xffUL << index); + ivar |= ((u32)vector << index); IXGBE_WRITE_REG(hw, IXGBE_VTIVAR(entry >> 1), ivar); } } /* ixv_set_ivar */
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Thu Jul 25 05:58:25 UTC 2019 Modified Files: src/sys/dev/pci/ixgbe: ixv.c Log Message: Set IVAR (Interrupt Vector Allocation Register) correctly in ixgbe_set_ivar(). Found by KUBSan. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Thu Jul 25 04:25:40 UTC 2019 Modified Files: src/sys/dev/i2c: tsl256x.c Log Message: The i2c code handles the 'cold' dance with I2C_F_POLL now; no need to do it here. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/tsl256x.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Thu Jul 25 04:25:40 UTC 2019 Modified Files: src/sys/dev/i2c: tsl256x.c Log Message: The i2c code handles the 'cold' dance with I2C_F_POLL now; no need to do it here. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/tsl256x.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/tsl256x.c diff -u src/sys/dev/i2c/tsl256x.c:1.6 src/sys/dev/i2c/tsl256x.c:1.7 --- src/sys/dev/i2c/tsl256x.c:1.6 Tue Jun 26 06:03:57 2018 +++ src/sys/dev/i2c/tsl256x.c Thu Jul 25 04:25:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: tsl256x.c,v 1.6 2018/06/26 06:03:57 thorpej Exp $ */ +/* $NetBSD: tsl256x.c,v 1.7 2019/07/25 04:25:40 thorpej Exp $ */ /*- * Copyright (c) 2018 Jason R. Thorpe @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tsl256x.c,v 1.6 2018/06/26 06:03:57 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tsl256x.c,v 1.7 2019/07/25 04:25:40 thorpej Exp $"); #include #include @@ -49,7 +49,6 @@ struct tsllux_softc { device_t sc_dev; i2c_tag_t sc_i2c; i2c_addr_t sc_addr; - int sc_i2c_flags; uint32_t sc_poweron; @@ -125,11 +124,11 @@ tsllux_match(device_t parent, cfdata_t m return (0); } - if (iic_acquire_bus(ia->ia_tag, I2C_F_POLL) != 0) + if (iic_acquire_bus(ia->ia_tag, 0) != 0) return (0); error = iic_smbus_read_byte(ia->ia_tag, ia->ia_addr, - TSL256x_REG_ID | COMMAND_CMD, &id_reg, I2C_F_POLL); - iic_release_bus(ia->ia_tag, I2C_F_POLL); + TSL256x_REG_ID | COMMAND_CMD, &id_reg, 0); + iic_release_bus(ia->ia_tag, 0); if (error) return (0); @@ -154,14 +153,12 @@ tsllux_attach(device_t parent, device_t sc->sc_dev = self; sc->sc_i2c = ia->ia_tag; sc->sc_addr = ia->ia_addr; - sc->sc_i2c_flags = I2C_F_POLL; if (self->dv_cfdata != NULL && self->dv_cfdata->cf_flags & TSLLUX_F_CS_PACKAGE) sc->sc_cs_package = true; - if (iic_acquire_bus(ia->ia_tag, I2C_F_POLL) != 0) { - iic_release_bus(ia->ia_tag, I2C_F_POLL); + if (iic_acquire_bus(ia->ia_tag, 0) != 0) { return; } @@ -195,7 +192,7 @@ tsllux_attach(device_t parent, device_t tsllux_poweroff(sc); - iic_release_bus(ia->ia_tag, I2C_F_POLL); + iic_release_bus(ia->ia_tag, 0); have_i2c = false; tsllux_sysctl_attach(sc); @@ -217,10 +214,8 @@ tsllux_attach(device_t parent, device_t if (have_i2c) { if (sc->sc_poweron) tsllux_poweroff(sc); - iic_release_bus(ia->ia_tag, I2C_F_POLL); + iic_release_bus(ia->ia_tag, 0); } - - sc->sc_i2c_flags = 0; } static int @@ -327,13 +322,13 @@ tsllux_sysctl_gain(SYSCTLFN_ARGS) return (EINVAL); } - if ((error = iic_acquire_bus(sc->sc_i2c, sc->sc_i2c_flags)) != 0) { + if ((error = iic_acquire_bus(sc->sc_i2c, 0)) != 0) { mutex_exit(&sc->sc_lock); return (error); } error = tsllux_set_gain(sc, new_gain); - iic_release_bus(sc->sc_i2c, sc->sc_i2c_flags); + iic_release_bus(sc->sc_i2c, 0); mutex_exit(&sc->sc_lock); return (error); @@ -393,13 +388,13 @@ tsllux_sysctl_itime(SYSCTLFN_ARGS) return (EINVAL); } - if ((error = iic_acquire_bus(sc->sc_i2c, sc->sc_i2c_flags)) != 0) { + if ((error = iic_acquire_bus(sc->sc_i2c, 0)) != 0) { mutex_exit(&sc->sc_lock); return (error); } error = tsllux_set_integration_time(sc, new_itime); - iic_release_bus(sc->sc_i2c, sc->sc_i2c_flags); + iic_release_bus(sc->sc_i2c, 0); mutex_exit(&sc->sc_lock); return (error); @@ -465,9 +460,9 @@ tsllux_sensors_refresh(struct sysmon_env mutex_enter(&sc->sc_lock); - if ((error = iic_acquire_bus(sc->sc_i2c, sc->sc_i2c_flags)) == 0) { + if ((error = iic_acquire_bus(sc->sc_i2c, 0)) == 0) { error = tsllux_get_lux(sc, &lux, NULL, NULL); - iic_release_bus(sc->sc_i2c, sc->sc_i2c_flags); + iic_release_bus(sc->sc_i2c, 0); } if (error) { @@ -489,24 +484,21 @@ static int tsllux_read1(struct tsllux_softc *sc, uint8_t reg, uint8_t *valp) { reg = (reg & REGMASK) | COMMAND_CMD; - return (iic_smbus_read_byte(sc->sc_i2c, sc->sc_addr, reg, valp, -sc->sc_i2c_flags)); + return (iic_smbus_read_byte(sc->sc_i2c, sc->sc_addr, reg, valp, 0)); } static int tsllux_read2(struct tsllux_softc *sc, uint8_t reg, uint16_t *valp) { reg = (reg & REGMASK) | COMMAND_CMD | COMMAND_WORD; - return (iic_smbus_read_word(sc->sc_i2c, sc->sc_addr, reg, valp, -sc->sc_i2c_flags)); + return (iic_smbus_read_word(sc->sc_i2c, sc->sc_addr, reg, valp, 0)); } static int tsllux_write1(struct tsllux_softc *sc, uint8_t reg, uint8_t val) { reg = (reg & REGMASK) | COMMAND_CMD; - return (iic_smbus_write_byte(sc->sc_i2c, sc->sc_addr, reg, val, - sc->sc_i2c_flags)); + return (iic_smbus_write_byte(sc->sc_i2c, sc->sc_addr, reg, val, 0)); } #if 0 @@ -514,8 +506,7 @@ static int tsllux_write2(struct tsllux_softc *sc, uint8_t reg, uint16_t val) { reg = (reg & REGMASK) | COMMAND_CMD | COMMAND_WORD; - return (iic_smbus_write_word(sc->sc_i2c, sc-
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Thu Jul 25 04:24:44 UTC 2019 Modified Files: src/sys/dev/i2c: pca9685.c Log Message: Do the iic_acquire_bus() / iic_release_bus() dance that I, um, forgot to do. (oops) Also, no need to do the dance with 'cold' aymore; the i2c code does it for us now. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/pca9685.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/pca9685.c diff -u src/sys/dev/i2c/pca9685.c:1.2 src/sys/dev/i2c/pca9685.c:1.3 --- src/sys/dev/i2c/pca9685.c:1.2 Wed Jul 24 05:47:39 2019 +++ src/sys/dev/i2c/pca9685.c Thu Jul 25 04:24:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pca9685.c,v 1.2 2019/07/24 05:47:39 thorpej Exp $ */ +/* $NetBSD: pca9685.c,v 1.3 2019/07/25 04:24:44 thorpej Exp $ */ /*- * Copyright (c) 2018, 2019 Jason R. Thorpe @@ -27,12 +27,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pca9685.c,v 1.2 2019/07/24 05:47:39 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pca9685.c,v 1.3 2019/07/25 04:24:44 thorpej Exp $"); #include #include #include -#include #include #include @@ -58,7 +57,6 @@ struct pcapwm_softc { device_t sc_dev; i2c_tag_t sc_i2c; i2c_addr_t sc_addr; - int sc_i2c_flags; /* * Locking order is: @@ -100,7 +98,7 @@ pcapwm_read1(struct pcapwm_softc * const return iic_exec(sc->sc_i2c, I2C_OP_READ_WITH_STOP, sc->sc_addr, ®, sizeof(reg), - valp, sizeof(*valp), cold ? I2C_F_POLL : 0); + valp, sizeof(*valp), 0); } static int @@ -109,7 +107,7 @@ pcapwm_write1(struct pcapwm_softc * cons return iic_exec(sc->sc_i2c, I2C_OP_WRITE_WITH_STOP, sc->sc_addr, ®, sizeof(reg), - &val, sizeof(val), cold ? I2C_F_POLL : 0); + &val, sizeof(val), 0); } static int @@ -120,7 +118,7 @@ pcapwm_read_LEDn(struct pcapwm_softc * c /* We rely on register auto-increment being enabled. */ return iic_exec(sc->sc_i2c, I2C_OP_READ_WITH_STOP, sc->sc_addr, ®, sizeof(reg), - buf, buflen, cold ? I2C_F_POLL : 0); + buf, buflen, 0); } static int @@ -131,7 +129,7 @@ pcapwm_write_LEDn(struct pcapwm_softc * /* We rely on register auto-increment being enabled. */ return iic_exec(sc->sc_i2c, I2C_OP_WRITE_WITH_STOP, sc->sc_addr, ®, sizeof(reg), - buf, buflen, cold ? I2C_F_POLL : 0); + buf, buflen, 0); } static int @@ -142,13 +140,25 @@ pcapwm_program_channel(struct pcapwm_sof const uint8_t reg = chan->ch_number == PCA9685_ALL_CHANNELS ? PCA9685_ALL_LED_ON_L : PCA9685_LEDx_ON_L(chan->ch_number); uint8_t regs[4]; + int error; regs[0] = (uint8_t)(on_tick & 0xff); regs[1] = (uint8_t)((on_tick >> 8) & 0xff); regs[2] = (uint8_t)(off_tick & 0xff); regs[3] = (uint8_t)((off_tick >> 8) & 0xff); - return pcapwm_write_LEDn(sc, reg, regs, sizeof(regs)); + error = iic_acquire_bus(sc->sc_i2c, 0); + if (error) { + device_printf(sc->sc_dev, + "program_channel: failed to acquire I2C bus\n"); + return error; + } + + error = pcapwm_write_LEDn(sc, reg, regs, sizeof(regs)); + + iic_release_bus(sc->sc_i2c, 0); + + return error; } static int @@ -161,7 +171,17 @@ pcapwm_inspect_channel(struct pcapwm_sof uint8_t regs[4]; int error; + error = iic_acquire_bus(sc->sc_i2c, 0); + if (error) { + device_printf(sc->sc_dev, + "inspect_channel: failed to acquire I2C bus\n"); + return error; + } + error = pcapwm_read_LEDn(sc, reg, regs, sizeof(regs)); + + iic_release_bus(sc->sc_i2c, 0); + if (error) { return error; } @@ -359,12 +379,19 @@ pcapwm_pwm_set_config(pwm_tag_t pwm, con goto out; } + error = iic_acquire_bus(sc->sc_i2c, 0); + if (error) { + device_printf(sc->sc_dev, + "set_config: unable to acquire I2C bus\n"); + goto out; + } + uint8_t mode1; error = pcapwm_read1(sc, PCA9685_MODE1, &mode1); if (error) { device_printf(sc->sc_dev, "set_config: unable to read MODE1\n"); - goto out; + goto out_release_i2c; } /* Disable the internal oscillator. */ @@ -373,7 +400,7 @@ pcapwm_pwm_set_config(pwm_tag_t pwm, con if (error) { device_printf(sc->sc_dev, "set_config: unable to write MODE1\n"); - goto out; + goto out_release_i2c; } /* Update the prescale register. */ @@ -382,7 +409,7 @@ pcapwm_pwm_set_config(pwm_tag_t pwm, con if (error) { device_printf(sc->sc_dev, "set_config: unable to write PRE_SCALE\n"); - goto out; + goto out_release_i2c; } /* @@ -411,9 +438,11 @@ pcapwm_pwm_set_config(pwm_tag_t pwm, con if (error) { device_printf(sc->sc_dev, "set_config: unable to write MODE1\n"); - goto out; + goto out_release_i2c; } + iic_release_bus(sc->sc_i2c, 0); + if (sc->sc_ext_clk == false) { /* Wait for 500us for the clock to settle. */ delay(500); @@ -470,6 +499,10 @@ pcapwm_pwm_set_config(pwm_tag_t pwm, con mutex_exit(&sc->sc_lock); return error; + + out_release_i2c: +
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Thu Jul 25 04:24:44 UTC 2019 Modified Files: src/sys/dev/i2c: pca9685.c Log Message: Do the iic_acquire_bus() / iic_release_bus() dance that I, um, forgot to do. (oops) Also, no need to do the dance with 'cold' aymore; the i2c code does it for us now. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/pca9685.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Thu Jul 25 04:20:13 UTC 2019 Modified Files: src/sys/dev/i2c: i2c_exec.c Log Message: If cold, automagically set I2C_F_POLL. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/i2c/i2c_exec.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/i2c_exec.c diff -u src/sys/dev/i2c/i2c_exec.c:1.11 src/sys/dev/i2c/i2c_exec.c:1.12 --- src/sys/dev/i2c/i2c_exec.c:1.11 Mon Dec 10 00:31:45 2018 +++ src/sys/dev/i2c/i2c_exec.c Thu Jul 25 04:20:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: i2c_exec.c,v 1.11 2018/12/10 00:31:45 thorpej Exp $ */ +/* $NetBSD: i2c_exec.c,v 1.12 2019/07/25 04:20:13 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: i2c_exec.c,v 1.11 2018/12/10 00:31:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i2c_exec.c,v 1.12 2019/07/25 04:20:13 thorpej Exp $"); #include #include @@ -44,6 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: i2c_exec.c,v #include #include #include +#include #define _I2C_PRIVATE #include @@ -53,6 +54,13 @@ static uint8_t iic_smbus_pec(int, uint8_ static int i2cexec_modcmd(modcmd_t, void *); +static inline int +iic_op_flags(int flags) +{ + + return flags | (cold ? I2C_F_POLL : 0); +} + /* * iic_acquire_bus: * @@ -62,6 +70,8 @@ int iic_acquire_bus(i2c_tag_t tag, int flags) { + flags = iic_op_flags(flags); + return (*tag->ic_acquire_bus)(tag->ic_cookie, flags); } @@ -74,6 +84,8 @@ void iic_release_bus(i2c_tag_t tag, int flags) { + flags = iic_op_flags(flags); + (*tag->ic_release_bus)(tag->ic_cookie, flags); } @@ -96,6 +108,8 @@ iic_exec(i2c_tag_t tag, i2c_op_t op, i2c int error; size_t len; + flags = iic_op_flags(flags); + if ((flags & I2C_F_PEC) && cmdlen > 0 && tag->ic_exec != NULL) { uint8_t data[33]; /* XXX */ uint8_t b[3];
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Thu Jul 25 04:20:13 UTC 2019 Modified Files: src/sys/dev/i2c: i2c_exec.c Log Message: If cold, automagically set I2C_F_POLL. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/i2c/i2c_exec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Jul 25 03:02:44 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.h rasops1.c rasops15.c rasops2.c rasops24.c rasops32.c rasops4.c rasops8.c Log Message: Provide and use FONT_GLYPH macro, tiny optimization version of WSFONT_GLYPH. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/dev/rasops/rasops.h cvs rdiff -u -r1.27 -r1.28 src/sys/dev/rasops/rasops1.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/rasops/rasops32.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/rasops/rasops4.c cvs rdiff -u -r1.40 -r1.41 src/sys/dev/rasops/rasops8.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/rasops/rasops.h diff -u src/sys/dev/rasops/rasops.h:1.35 src/sys/dev/rasops/rasops.h:1.36 --- src/sys/dev/rasops/rasops.h:1.35 Wed Jul 24 18:33:49 2019 +++ src/sys/dev/rasops/rasops.h Thu Jul 25 03:02:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.h,v 1.35 2019/07/24 18:33:49 rin Exp $ */ +/* $NetBSD: rasops.h,v 1.36 2019/07/25 03:02:44 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -149,6 +149,10 @@ struct rasops_info { (ri->ri_optfont.data != NULL)) ? \ &ri->ri_optfont : ri->ri_font +#define FONT_GLYPH(uc, font, ri) \ + ((uint8_t *)(font)->data + ((uc) - ((font)->firstchar)) * \ + (ri)->ri_fontscale) + /* * rasops_init(). * Index: src/sys/dev/rasops/rasops1.c diff -u src/sys/dev/rasops/rasops1.c:1.27 src/sys/dev/rasops/rasops1.c:1.28 --- src/sys/dev/rasops/rasops1.c:1.27 Thu Jul 25 02:26:32 2019 +++ src/sys/dev/rasops/rasops1.c Thu Jul 25 03:02:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops1.c,v 1.27 2019/07/25 02:26:32 rin Exp $ */ +/* $NetBSD: rasops1.c,v 1.28 2019/07/25 03:02:44 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops1.c,v 1.27 2019/07/25 02:26:32 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops1.c,v 1.28 2019/07/25 03:02:44 rin Exp $"); #include "opt_rasops.h" @@ -123,8 +123,7 @@ rasops1_putchar(void *cookie, int row, i fr = 0; /* shutup gcc */ fs = 0; /* shutup gcc */ } else { - uc -= font->firstchar; - fr = (uint8_t *)font->data + uc * ri->ri_fontscale; + fr = FONT_GLYPH(uc, font, ri); fs = font->stride; } @@ -314,8 +313,7 @@ rasops1_putchar8(void *cookie, int row, } } } else { - uc -= font->firstchar; - fr = (uint8_t *)font->data + uc * ri->ri_fontscale; + fr = FONT_GLYPH(uc, font, ri); fs = font->stride; /* NOT fontbits if bg is white */ @@ -394,8 +392,7 @@ rasops1_putchar16(void *cookie, int row, } } } else { - uc -= font->firstchar; - fr = (uint8_t *)font->data + uc * ri->ri_fontscale; + fr = FONT_GLYPH(uc, font, ri); fs = font->stride; /* NOT fontbits if bg is white */ Index: src/sys/dev/rasops/rasops15.c diff -u src/sys/dev/rasops/rasops15.c:1.26 src/sys/dev/rasops/rasops15.c:1.27 --- src/sys/dev/rasops/rasops15.c:1.26 Thu Jul 25 02:26:32 2019 +++ src/sys/dev/rasops/rasops15.c Thu Jul 25 03:02:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops15.c,v 1.26 2019/07/25 02:26:32 rin Exp $ */ +/* $NetBSD: rasops15.c,v 1.27 2019/07/25 03:02:44 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.26 2019/07/25 02:26:32 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.27 2019/07/25 03:02:44 rin Exp $"); #include "opt_rasops.h" @@ -164,8 +164,7 @@ rasops15_putchar(void *cookie, int row, } } } else { - uc -= font->firstchar; - fr = (uint8_t *)font->data + uc * ri->ri_fontscale; + fr = FONT_GLYPH(uc, font, ri); while (height--) { dp = rp; @@ -254,7 +253,7 @@ rasops15_putchar_aa(void *cookie, int ro memcpy(dp, buffer, width << 1); } } else { - fr = WSFONT_GLYPH(uc, font); + fr = FONT_GLYPH(uc, font, ri); fgo = ((attr >> 24) & 0xf) * 3; bgo = ((attr >> 16) & 0xf) * 3; @@ -383,8 +382,7 @@ rasops15_putchar8(void *cookie, int row, } } } else { - uc -= font->firstchar; - fr = (uint8_t *)font->data + uc*ri->ri_fontscale; + fr = FONT_GLYPH(uc, font, ri); fs = font->stride; while (height--) { @@ -481,8 +479,7 @@ rasops15_putchar12(void *cookie, int row } } } else { - uc -= font->firstchar; - fr = (uint8_t *)font->data + uc*ri->ri_fontscale; + fr = FONT_GLYPH(uc, font, ri); fs = font->stride; while (height--) { @@ -587,8 +584,7 @@ rasops15_putchar16(void *cookie, int row } } } else { - uc -= font->firstchar; - fr = (uint8_t *)font->data + uc*ri->ri_fontscale; + fr = FONT_GLYPH(uc, font, ri); fs = font->stride; while (height--) { Index: src/sys/dev/rasops/rasop
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Jul 25 03:02:44 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.h rasops1.c rasops15.c rasops2.c rasops24.c rasops32.c rasops4.c rasops8.c Log Message: Provide and use FONT_GLYPH macro, tiny optimization version of WSFONT_GLYPH. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/dev/rasops/rasops.h cvs rdiff -u -r1.27 -r1.28 src/sys/dev/rasops/rasops1.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/rasops/rasops32.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/rasops/rasops4.c cvs rdiff -u -r1.40 -r1.41 src/sys/dev/rasops/rasops8.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Jul 25 02:26:32 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c rasops1.c rasops15.c rasops2.c rasops24.c rasops4.c rasops8.c rasops_bitops.h Log Message: Misc cleen up: - Make 32bit mask unsigned - DPRINTF --> __nothing ifndef DEBUG_RASOPS - "#ifdef DIAGNOSTIC if (x) panic(); #endif" --> KASSERT(!x); - KNF No functional changes intended. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/rasops/rasops1.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/rasops/rasops4.c \ src/sys/dev/rasops/rasops_bitops.h cvs rdiff -u -r1.39 -r1.40 src/sys/dev/rasops/rasops8.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.87 src/sys/dev/rasops/rasops.c:1.88 --- src/sys/dev/rasops/rasops.c:1.87 Thu Jul 25 00:55:13 2019 +++ src/sys/dev/rasops/rasops.c Thu Jul 25 02:26:32 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.87 2019/07/25 00:55:13 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.88 2019/07/25 02:26:32 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.87 2019/07/25 00:55:13 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.88 2019/07/25 02:26:32 rin Exp $"); #include "opt_rasops.h" #include "rasops_glue.h" @@ -54,9 +54,9 @@ __KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1 #endif #ifdef RASOPS_DEBUG -#define DPRINTF aprint_error +#define DPRINTF(...) aprint_error(...) #else -#define DPRINTF while (0) printf +#define DPRINTF(...) __nothing #endif struct rasops_matchdata { @@ -223,7 +223,7 @@ rasops_init(struct rasops_info *ri, int */ if (cookie <= 0) { aprint_error("rasops_init: font table is empty\n"); - return (-1); + return -1; } #if NRASOPS_ROTATION > 0 @@ -241,7 +241,7 @@ rasops_init(struct rasops_info *ri, int if (wsfont_lock(cookie, &ri->ri_font)) { aprint_error("rasops_init: couldn't lock font\n"); - return (-1); + return -1; } ri->ri_wsfcookie = cookie; @@ -251,21 +251,23 @@ rasops_init(struct rasops_info *ri, int /* This should never happen in reality... */ #ifdef DEBUG if ((long)ri->ri_bits & 3) { - aprint_error("rasops_init: bits not aligned on 32-bit boundary\n"); - return (-1); + aprint_error( + "rasops_init: bits not aligned on 32-bit boundary\n"); + return -1; } if ((int)ri->ri_stride & 3) { - aprint_error("rasops_init: stride not aligned on 32-bit boundary\n"); - return (-1); + aprint_error( + "rasops_init: stride not aligned on 32-bit boundary\n"); + return -1; } #endif if (rasops_reconfig(ri, wantrows, wantcols)) - return (-1); + return -1; rasops_init_devcmap(ri); - return (0); + return 0; } /* @@ -392,7 +394,8 @@ rasops_reconfig(struct rasops_info *ri, if (ri->ri_hwbits != NULL) { ri->ri_hwbits += (((ri->ri_width * bpp >> 3) - ri->ri_emustride) >> 1) & ~3; - ri->ri_hwbits += ((ri->ri_height - ri->ri_emuheight) >> 1) * + ri->ri_hwbits += + ((ri->ri_height - ri->ri_emuheight) >> 1) * ri->ri_stride; } ri->ri_yorigin = (int)(ri->ri_bits - ri->ri_origbits) @@ -465,7 +468,7 @@ rasops_reconfig(struct rasops_info *ri, default: ri->ri_flg &= ~RI_CFGDONE; splx(s); - return (-1); + return -1; } #if NRASOPS_ROTATION > 0 @@ -490,7 +493,7 @@ rasops_reconfig(struct rasops_info *ri, ri->ri_flg |= RI_CFGDONE; splx(s); - return (0); + return 0; } /* @@ -503,29 +506,26 @@ rasops_mapchar(void *cookie, int c, u_in ri = (struct rasops_info *)cookie; -#ifdef DIAGNOSTIC - if (ri->ri_font == NULL) - panic("rasops_mapchar: no font selected"); -#endif + KASSERT(ri->ri_font != NULL); if ( (c = wsfont_map_unichar(ri->ri_font, c)) < 0) { *cp = ' '; - return (0); + return 0; } if (c < ri->ri_font->firstchar) { *cp = ' '; - return (0); + return 0; } #if 0 if (c - ri->ri_font->firstchar >= ri->ri_font->numchars) { *cp = ' '; - return (0); + return 0; } #endif *cp = c; - return (5); + return 5; } /* @@ -539,14 +539,14 @@ rasops_allocattr_color(void *cookie, int if (__predict_false((unsigned int)fg >= sizeof(rasops_isgray) || (unsigned int)bg >= sizeof(rasops_isgray))) - return (EINVAL); + return EINVAL; #ifdef RASOPS_CLIPPING fg &= 7; bg &= 7; #endif if ((flg & WSATTR_BLINK) != 0) - return (EINVAL); + return EINVAL; if ((flg & WSATTR_WSCOLORS) == 0) { #ifdef WS_DEFAULT_FG @@ -579,7 +579,7 @@ rasops_allocattr_color(void *cookie, int flg |= WSATTR_PRIVATE2; *attr = (bg << 16) | (fg << 24) | flg; - return (0); + retu
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Jul 25 02:26:32 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c rasops1.c rasops15.c rasops2.c rasops24.c rasops4.c rasops8.c rasops_bitops.h Log Message: Misc cleen up: - Make 32bit mask unsigned - DPRINTF --> __nothing ifndef DEBUG_RASOPS - "#ifdef DIAGNOSTIC if (x) panic(); #endif" --> KASSERT(!x); - KNF No functional changes intended. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/rasops/rasops1.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.15 -r1.16 src/sys/dev/rasops/rasops4.c \ src/sys/dev/rasops/rasops_bitops.h cvs rdiff -u -r1.39 -r1.40 src/sys/dev/rasops/rasops8.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: jmcneill Date: Thu Jul 25 02:00:40 UTC 2019 Modified Files: src/sys/arch/arm/arm: efi_runtime.c Log Message: Only try to call EFI RT's reset once. If it faults for some reason, just return an error so the kernel will try to PSCI reset instead. Otherwise we get stuck in an endless loop.. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/arm/efi_runtime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: jmcneill Date: Thu Jul 25 02:00:40 UTC 2019 Modified Files: src/sys/arch/arm/arm: efi_runtime.c Log Message: Only try to call EFI RT's reset once. If it faults for some reason, just return an error so the kernel will try to PSCI reset instead. Otherwise we get stuck in an endless loop.. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/arm/efi_runtime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm/efi_runtime.c diff -u src/sys/arch/arm/arm/efi_runtime.c:1.1 src/sys/arch/arm/arm/efi_runtime.c:1.2 --- src/sys/arch/arm/arm/efi_runtime.c:1.1 Sun Oct 28 10:21:42 2018 +++ src/sys/arch/arm/arm/efi_runtime.c Thu Jul 25 02:00:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: efi_runtime.c,v 1.1 2018/10/28 10:21:42 jmcneill Exp $ */ +/* $NetBSD: efi_runtime.c,v 1.2 2019/07/25 02:00:40 jmcneill Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: efi_runtime.c,v 1.1 2018/10/28 10:21:42 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: efi_runtime.c,v 1.2 2019/07/25 02:00:40 jmcneill Exp $"); #include #include @@ -113,13 +113,19 @@ arm_efirt_settime(struct efi_tm *tm) int arm_efirt_reset(enum efi_reset type) { + static int reset_called = false; efi_status status; if (RT == NULL || RT->rt_reset == NULL) return ENXIO; mutex_enter(&efi_lock); - status = RT->rt_reset(type, 0, 0, NULL); + if (reset_called == false) { + reset_called = true; + status = RT->rt_reset(type, 0, 0, NULL); + } else { + status = 1; + } mutex_exit(&efi_lock); if (status) return EIO;
Re: CVS commit: src/sys/dev
Hi, Yorick Hardy writes: > Dear Ryo, > > On 2019-07-09, Ryo ONODERA wrote: >> Module Name: src >> Committed By:ryoon >> Date:Tue Jul 9 12:52:51 UTC 2019 >> >> Modified Files: >> src/sys/dev/hid: hidms.c hidms.h >> src/sys/dev/i2c: ims.c >> >> Log Message: >> Add tpcalib, touch panel calibration to ims(4) >> >> Suggested by ryo@ at Japan NetBSD Users' Group BOF 2019-07-06. >> >> >> To generate a diff of this commit: >> cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hid/hidms.c >> cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hid/hidms.h >> cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/ims.c >> >> Please note that diffs are not public domain; they are subject to the >> copyright notices on the relevant files. > > I think this change has the side effect that ums(4) devices which > report absolute coordinates seem to stop "moving" because > tcpalib_init is never called for these devices. > > Is the patch below okay? Or, should hidms call tcpalib_init? > (I tested the patch with an ACECAD digimemo.) Sorry for breakage. It looks good to me. And I feel tpcalib_init should be called from ums.c like your patch. Could you commit it? Thank you. > -- > Kind regards, > > Yorick Hardy > > Index: sys/dev/usb/ums.c > === > RCS file: /cvsroot/src/sys/dev/usb/ums.c,v > retrieving revision 1.93 > diff -u -r1.93 ums.c > --- sys/dev/usb/ums.c 5 May 2019 03:17:54 - 1.93 > +++ sys/dev/usb/ums.c 24 Jul 2019 21:29:35 - > @@ -192,6 +192,7 @@ > } > } > > + tpcalib_init(&sc->sc_ms.sc_tpcalib); > hidms_attach(self, &sc->sc_ms, &ums_accessops); > } > -- Ryo ONODERA // r...@tetera.org PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
CVS commit: src/usr.sbin/npf/npftest/libnpftest
Module Name:src Committed By: rmind Date: Thu Jul 25 01:18:06 UTC 2019 Modified Files: src/usr.sbin/npf/npftest/libnpftest: npf_nbuf_test.c Log Message: npftest: fix double-free in npf_nbuf_test(). To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c diff -u src/usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c:1.8 src/usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c:1.9 --- src/usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c:1.8 Tue Jul 23 00:52:02 2019 +++ src/usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c Thu Jul 25 01:18:05 2019 @@ -201,7 +201,6 @@ npf_nbuf_test(bool verbose) bufb = parse_nbuf_chain(m1); ok = validate_mbuf_data(bufa, bufb); CHECK_TRUE(ok); - m_freem(m1); } m2 = mbuf_bytesize(MBUF_CHAIN_LEN); @@ -209,7 +208,6 @@ npf_nbuf_test(bool verbose) bufb = parse_nbuf_chain(m2); ok = validate_mbuf_data(bufa, bufb); CHECK_TRUE(ok); - m_freem(m2); (void)verbose; return true;
CVS commit: src/usr.sbin/npf/npftest/libnpftest
Module Name:src Committed By: rmind Date: Thu Jul 25 01:18:06 UTC 2019 Modified Files: src/usr.sbin/npf/npftest/libnpftest: npf_nbuf_test.c Log Message: npftest: fix double-free in npf_nbuf_test(). To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Jul 25 01:07:33 UTC 2019 Modified Files: src/sys/dev/rasops: rasops8.c Log Message: Cosmetic changes. No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/dev/rasops/rasops8.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/rasops/rasops8.c diff -u src/sys/dev/rasops/rasops8.c:1.38 src/sys/dev/rasops/rasops8.c:1.39 --- src/sys/dev/rasops/rasops8.c:1.38 Thu Jul 25 00:59:04 2019 +++ src/sys/dev/rasops/rasops8.c Thu Jul 25 01:07:32 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops8.c,v 1.38 2019/07/25 00:59:04 rin Exp $ */ +/* $NetBSD: rasops8.c,v 1.39 2019/07/25 01:07:32 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.38 2019/07/25 00:59:04 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.39 2019/07/25 01:07:32 rin Exp $"); #include "opt_rasops.h" @@ -159,7 +159,8 @@ rasops8_putchar(void *cookie, int row, i dp = rp; if (ri->ri_hwbits) hp = hrp; - fb = fr[3] | (fr[2] << 8) | (fr[1] << 16) | (fr[0] << 24); + fb = fr[3] | (fr[2] << 8) | (fr[1] << 16) | + (fr[0] << 24); fr += fs; rp += ri->ri_stride; if (ri->ri_hwbits) @@ -379,8 +380,7 @@ rasops8_putchar8(void *cookie, int row, rp[0] = rp[1] = stamp[0]; DELTA(rp, ri->ri_stride, uint32_t *); if (ri->ri_hwbits) { -hp[0] = stamp[0]; -hp[1] = stamp[0]; +hp[0] = hp[1] = stamp[0]; DELTA(hp, ri->ri_stride, uint32_t *); } } @@ -411,8 +411,7 @@ rasops8_putchar8(void *cookie, int row, rp[0] = rp[1] = stamp[15]; if (ri->ri_hwbits) { DELTA(hp, -(ri->ri_stride << 1), uint32_t *); - hp[0] = stamp[15]; - hp[1] = stamp[15]; + hp[0] = hp[1] = stamp[15]; } } @@ -441,7 +440,7 @@ rasops8_putchar12(void *cookie, int row, hrp = NULL; if (!CHAR_IN_FONT(uc, font)) - return; + return; #ifdef RASOPS_CLIPPING if ((unsigned)row >= (unsigned)ri->ri_rows) { @@ -467,14 +466,10 @@ rasops8_putchar12(void *cookie, int row, if (uc == ' ') { while (height--) { - uint32_t c = stamp[0]; - - rp[0] = rp[1] = rp[2] = c; + rp[0] = rp[1] = rp[2] = stamp[0]; DELTA(rp, ri->ri_stride, uint32_t *); if (ri->ri_hwbits) { -hrp[0] = c; -hrp[1] = c; -hrp[2] = c; +hrp[0] = hrp[1] = hrp[2] = stamp[0]; DELTA(hrp, ri->ri_stride, uint32_t *); } } @@ -505,9 +500,7 @@ rasops8_putchar12(void *cookie, int row, rp[0] = rp[1] = rp[2] = stamp[15]; if (ri->ri_hwbits) { DELTA(hrp, -(ri->ri_stride << 1), uint32_t *); - hrp[0] = stamp[15]; - hrp[1] = stamp[15]; - hrp[2] = stamp[15]; + hrp[0] = hrp[1] = hrp[2] = stamp[15]; } } @@ -558,7 +551,6 @@ rasops8_putchar16(void *cookie, int row, if (ri->ri_hwbits) hrp = (uint32_t *)(ri->ri_hwbits + row*ri->ri_yscale + col*ri->ri_xscale); - height = font->fontheight; if (uc == ' ') { @@ -566,10 +558,7 @@ rasops8_putchar16(void *cookie, int row, rp[0] = rp[1] = rp[2] = rp[3] = stamp[0]; DELTA(rp, ri->ri_stride, uint32_t *); if (ri->ri_hwbits) { -hrp[0] = stamp[0]; -hrp[1] = stamp[0]; -hrp[2] = stamp[0]; -hrp[3] = stamp[0]; +hrp[0] = hrp[1] = hrp[2] = hrp[3] = stamp[0]; DELTA(hrp, ri->ri_stride, uint32_t *); } } @@ -602,10 +591,7 @@ rasops8_putchar16(void *cookie, int row, rp[0] = rp[1] = rp[2] = rp[3] = stamp[15]; if (ri->ri_hwbits) { DELTA(hrp, -(ri->ri_stride << 1), uint32_t *); - hrp[0] = stamp[15]; - hrp[1] = stamp[15]; - hrp[2] = stamp[15]; - hrp[3] = stamp[15]; + hrp[0] = hrp[1] = hrp[2] = hrp[3] = stamp[15]; } }
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Jul 25 01:07:33 UTC 2019 Modified Files: src/sys/dev/rasops: rasops8.c Log Message: Cosmetic changes. No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/dev/rasops/rasops8.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net/npf
Module Name:src Committed By: rmind Date: Thu Jul 25 01:00:28 UTC 2019 Modified Files: src/sys/net/npf: npf_portmap.c Log Message: npf_portmap_flush: remove invalid assert (this routine can be callied via the npf_destroy() path where the constraint is not applicable). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/net/npf/npf_portmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/npf/npf_portmap.c diff -u src/sys/net/npf/npf_portmap.c:1.2 src/sys/net/npf/npf_portmap.c:1.3 --- src/sys/net/npf/npf_portmap.c:1.2 Tue Jul 23 08:25:52 2019 +++ src/sys/net/npf/npf_portmap.c Thu Jul 25 01:00:28 2019 @@ -35,7 +35,7 @@ #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: npf_portmap.c,v 1.2 2019/07/23 08:25:52 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_portmap.c,v 1.3 2019/07/25 01:00:28 rmind Exp $"); #include #include @@ -461,8 +461,6 @@ npf_portmap_flush(npf_t *npf) npf_portmap_t *pm = npf->portmap; bitmap_t *bm; - KASSERT(npf_config_locked_p(npf)); - while ((bm = LIST_FIRST(&pm->bitmap_list)) != NULL) { for (unsigned i = 0; i < PORTMAP_L0_WORDS; i++) { uintptr_t bm1 = bm->bits0[i];
CVS commit: src/sys/net/npf
Module Name:src Committed By: rmind Date: Thu Jul 25 01:00:28 UTC 2019 Modified Files: src/sys/net/npf: npf_portmap.c Log Message: npf_portmap_flush: remove invalid assert (this routine can be callied via the npf_destroy() path where the constraint is not applicable). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/net/npf/npf_portmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Jul 25 00:59:04 UTC 2019 Modified Files: src/sys/dev/rasops: rasops8.c Log Message: Fix screen corruption with 16-width font on 8-bpp display. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/rasops/rasops8.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Jul 25 00:59:04 UTC 2019 Modified Files: src/sys/dev/rasops: rasops8.c Log Message: Fix screen corruption with 16-width font on 8-bpp display. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/rasops/rasops8.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/rasops/rasops8.c diff -u src/sys/dev/rasops/rasops8.c:1.37 src/sys/dev/rasops/rasops8.c:1.38 --- src/sys/dev/rasops/rasops8.c:1.37 Wed Jul 24 18:33:49 2019 +++ src/sys/dev/rasops/rasops8.c Thu Jul 25 00:59:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops8.c,v 1.37 2019/07/24 18:33:49 rin Exp $ */ +/* $NetBSD: rasops8.c,v 1.38 2019/07/25 00:59:04 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.37 2019/07/24 18:33:49 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.38 2019/07/25 00:59:04 rin Exp $"); #include "opt_rasops.h" @@ -564,11 +564,13 @@ rasops8_putchar16(void *cookie, int row, if (uc == ' ') { while (height--) { rp[0] = rp[1] = rp[2] = rp[3] = stamp[0]; + DELTA(rp, ri->ri_stride, uint32_t *); if (ri->ri_hwbits) { hrp[0] = stamp[0]; hrp[1] = stamp[0]; hrp[2] = stamp[0]; hrp[3] = stamp[0]; +DELTA(hrp, ri->ri_stride, uint32_t *); } } } else {
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Jul 25 00:55:13 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: For kUBSan, avoid undefined behaviors even if harmless. No functional changes intended. Requested by uwe. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.86 src/sys/dev/rasops/rasops.c:1.87 --- src/sys/dev/rasops/rasops.c:1.86 Wed Jul 24 19:33:35 2019 +++ src/sys/dev/rasops/rasops.c Thu Jul 25 00:55:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.86 2019/07/24 19:33:35 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.87 2019/07/25 00:55:13 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.86 2019/07/24 19:33:35 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.87 2019/07/25 00:55:13 rin Exp $"); #include "opt_rasops.h" #include "rasops_glue.h" @@ -1062,8 +1062,8 @@ rasops_do_cursor(struct rasops_info *ri) rp = (uint8_t *)((uintptr_t)rp & ~3); hrp = (uint8_t *)((uintptr_t)hrp & ~3); - msk1 = be32toh(0xU >> (32 - (8 * slop1))); - msk2 = be32toh(0xU << (32 - (8 * slop2))); + msk1 = !slop1 ? 0 : be32toh(0xU >> (32 - (8 * slop1))); + msk2 = !slop2 ? 0 : be32toh(0xU << (32 - (8 * slop2))); while (height--) { dp = rp;
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Thu Jul 25 00:55:13 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: For kUBSan, avoid undefined behaviors even if harmless. No functional changes intended. Requested by uwe. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/npf/npfctl
Module Name:src Committed By: rmind Date: Thu Jul 25 00:48:55 UTC 2019 Modified Files: src/usr.sbin/npf/npfctl: npf_build.c npfctl.c Log Message: npfctl: fix the bpf.jit parameter handling. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/usr.sbin/npf/npfctl/npf_build.c cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/npf/npfctl/npfctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/npf/npfctl/npf_build.c diff -u src/usr.sbin/npf/npfctl/npf_build.c:1.49 src/usr.sbin/npf/npfctl/npf_build.c:1.50 --- src/usr.sbin/npf/npfctl/npf_build.c:1.49 Tue Jul 23 00:52:02 2019 +++ src/usr.sbin/npf/npfctl/npf_build.c Thu Jul 25 00:48:55 2019 @@ -32,7 +32,7 @@ */ #include -__RCSID("$NetBSD: npf_build.c,v 1.49 2019/07/23 00:52:02 rmind Exp $"); +__RCSID("$NetBSD: npf_build.c,v 1.50 2019/07/25 00:48:55 rmind Exp $"); #include #define __FAVOR_BSD @@ -969,6 +969,7 @@ npfctl_setparam(const char *name, int va { if (strcmp(name, "bpf.jit") == 0) { npfctl_bpfjit(val != 0); + return; } if (npf_param_set(npf_conf, name, val) != 0) { yyerror("invalid parameter `%s` or its value", name); Index: src/usr.sbin/npf/npfctl/npfctl.c diff -u src/usr.sbin/npf/npfctl/npfctl.c:1.59 src/usr.sbin/npf/npfctl/npfctl.c:1.60 --- src/usr.sbin/npf/npfctl/npfctl.c:1.59 Tue Jul 23 00:52:02 2019 +++ src/usr.sbin/npf/npfctl/npfctl.c Thu Jul 25 00:48:55 2019 @@ -28,7 +28,7 @@ */ #include -__RCSID("$NetBSD: npfctl.c,v 1.59 2019/07/23 00:52:02 rmind Exp $"); +__RCSID("$NetBSD: npfctl.c,v 1.60 2019/07/25 00:48:55 rmind Exp $"); #include #include @@ -231,7 +231,7 @@ npfctl_print_error(const npf_error_t *ne const char *srcfile = ne->source_file; if (ne->error_msg) { - warnx("%s", ne->error_msg); + errx(EXIT_FAILURE, "%s", ne->error_msg); } if (srcfile) { warnx("source %s line %d", srcfile, ne->source_line);
CVS commit: src/usr.sbin/npf/npfctl
Module Name:src Committed By: rmind Date: Thu Jul 25 00:48:55 UTC 2019 Modified Files: src/usr.sbin/npf/npfctl: npf_build.c npfctl.c Log Message: npfctl: fix the bpf.jit parameter handling. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/usr.sbin/npf/npfctl/npf_build.c cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/npf/npfctl/npfctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/pci
Module Name:src Committed By: jmcneill Date: Thu Jul 25 00:42:43 UTC 2019 Modified Files: src/sys/arch/arm/pci: pci_msi_machdep.c Log Message: Support pci_intr_release for INTx interrupts To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/pci/pci_msi_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/pci
Module Name:src Committed By: jmcneill Date: Thu Jul 25 00:42:43 UTC 2019 Modified Files: src/sys/arch/arm/pci: pci_msi_machdep.c Log Message: Support pci_intr_release for INTx interrupts To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/pci/pci_msi_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/arm/pci/pci_msi_machdep.c diff -u src/sys/arch/arm/pci/pci_msi_machdep.c:1.5 src/sys/arch/arm/pci/pci_msi_machdep.c:1.6 --- src/sys/arch/arm/pci/pci_msi_machdep.c:1.5 Sat Dec 1 20:38:45 2018 +++ src/sys/arch/arm/pci/pci_msi_machdep.c Thu Jul 25 00:42:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_msi_machdep.c,v 1.5 2018/12/01 20:38:45 skrll Exp $ */ +/* $NetBSD: pci_msi_machdep.c,v 1.6 2019/07/25 00:42:43 jmcneill Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_msi_machdep.c,v 1.5 2018/12/01 20:38:45 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_msi_machdep.c,v 1.6 2019/07/25 00:42:43 jmcneill Exp $"); #include #include @@ -237,14 +237,16 @@ pci_intr_alloc(const struct pci_attach_a void pci_intr_release(pci_chipset_tag_t pc, pci_intr_handle_t *pih, int count) { - struct arm_pci_msi *msi; + struct arm_pci_msi *msi = NULL; if (pih == NULL || count == 0) return; - msi = arm_pci_msi_find_frame(pih[0]); - KASSERT(msi != NULL); - msi->msi_intr_release(msi, pih, count); + if ((pih[0] & (ARM_PCI_INTR_MSIX|ARM_PCI_INTR_MSI)) != 0) { + msi = arm_pci_msi_find_frame(pih[0]); + KASSERT(msi != NULL); + msi->msi_intr_release(msi, pih, count); + } kmem_free(pih, sizeof(*pih) * count); }
CVS commit: src/sys
Module Name:src Committed By: jmcneill Date: Thu Jul 25 00:30:45 UTC 2019 Modified Files: src/sys/arch/arm/nvidia: tegra_hdaudio.c src/sys/arch/evbarm/conf: GENERIC GENERIC64 src/sys/dev/hdaudio: files.hdaudio hdaudiovar.h Log Message: Replace the HDAUDIO_32BIT_ACCESS option with a runtime option. Set it for tegra_hdaudio, but not for the pci attachment. Add hdaudio@pci to GENERIC64 To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/nvidia/tegra_hdaudio.c cvs rdiff -u -r1.44 -r1.45 src/sys/arch/evbarm/conf/GENERIC cvs rdiff -u -r1.102 -r1.103 src/sys/arch/evbarm/conf/GENERIC64 cvs rdiff -u -r1.4 -r1.5 src/sys/dev/hdaudio/files.hdaudio cvs rdiff -u -r1.7 -r1.8 src/sys/dev/hdaudio/hdaudiovar.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/nvidia/tegra_hdaudio.c diff -u src/sys/arch/arm/nvidia/tegra_hdaudio.c:1.10 src/sys/arch/arm/nvidia/tegra_hdaudio.c:1.11 --- src/sys/arch/arm/nvidia/tegra_hdaudio.c:1.10 Mon Jul 16 23:11:47 2018 +++ src/sys/arch/arm/nvidia/tegra_hdaudio.c Thu Jul 25 00:30:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_hdaudio.c,v 1.10 2018/07/16 23:11:47 christos Exp $ */ +/* $NetBSD: tegra_hdaudio.c,v 1.11 2019/07/25 00:30:45 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tegra_hdaudio.c,v 1.10 2018/07/16 23:11:47 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_hdaudio.c,v 1.11 2019/07/25 00:30:45 jmcneill Exp $"); #include #include @@ -156,6 +156,7 @@ tegra_hdaudio_attach(device_t parent, de size - TEGRA_HDAUDIO_OFFSET, &sc->sc.sc_memh); sc->sc.sc_memvalid = true; sc->sc.sc_dmat = faa->faa_dmat; + sc->sc.sc_flags = HDAUDIO_FLAG_32BIT; aprint_naive("\n"); aprint_normal(": HDA\n"); Index: src/sys/arch/evbarm/conf/GENERIC diff -u src/sys/arch/evbarm/conf/GENERIC:1.44 src/sys/arch/evbarm/conf/GENERIC:1.45 --- src/sys/arch/evbarm/conf/GENERIC:1.44 Tue Jul 23 12:32:40 2019 +++ src/sys/arch/evbarm/conf/GENERIC Thu Jul 25 00:30:45 2019 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC,v 1.44 2019/07/23 12:32:40 jmcneill Exp $ +# $NetBSD: GENERIC,v 1.45 2019/07/25 00:30:45 jmcneill Exp $ # # GENERIC ARM (aarch32) kernel # @@ -507,7 +507,6 @@ h3codec* at fdt? # Allwinner H3 audio hdaudio* at fdt? # Intel HDA hdafg* at hdaudiobus? options HDAUDIOVERBOSE -options HDAUDIO_32BIT_ACCESS options HDAUDIO_ENABLE_HDMI options HDAUDIO_ENABLE_DISPLAYPORT sun8icodec* at fdt? # Audio codec (sun8i) Index: src/sys/arch/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.102 src/sys/arch/evbarm/conf/GENERIC64:1.103 --- src/sys/arch/evbarm/conf/GENERIC64:1.102 Tue Jul 16 09:47:41 2019 +++ src/sys/arch/evbarm/conf/GENERIC64 Thu Jul 25 00:30:45 2019 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.102 2019/07/16 09:47:41 jmcneill Exp $ +# $NetBSD: GENERIC64,v 1.103 2019/07/25 00:30:45 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -403,9 +403,9 @@ spi* at spibus? # Audio support hdaudio* at fdt? # Intel HDA +hdaudio* at pci? dev ? function ? hdafg* at hdaudiobus? options HDAUDIOVERBOSE -options HDAUDIO_32BIT_ACCESS options HDAUDIO_ENABLE_HDMI options HDAUDIO_ENABLE_DISPLAYPORT ausoc* at fdt? # Simple SoC audio card Index: src/sys/dev/hdaudio/files.hdaudio diff -u src/sys/dev/hdaudio/files.hdaudio:1.4 src/sys/dev/hdaudio/files.hdaudio:1.5 --- src/sys/dev/hdaudio/files.hdaudio:1.4 Wed May 8 13:40:18 2019 +++ src/sys/dev/hdaudio/files.hdaudio Thu Jul 25 00:30:45 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.hdaudio,v 1.4 2019/05/08 13:40:18 isaki Exp $ +# $NetBSD: files.hdaudio,v 1.5 2019/07/25 00:30:45 jmcneill Exp $ # # Intel High Definition Audio (Revision 1.0) @@ -7,7 +7,6 @@ defflag HDAUDIOVERBOSE defflag opt_hdaudio.h HDAUDIO_ENABLE_HDMI defflag opt_hdaudio.h HDAUDIO_ENABLE_DISPLAYPORT defflag opt_hdaudio.h HDAUDIO_DEBUG -defflag opt_hdaudio.h HDAUDIO_32BIT_ACCESS defflag opt_hdaudio.h HDAFG_DEBUG defflag opt_hdaudio.h HDAFG_HDMI_DEBUG Index: src/sys/dev/hdaudio/hdaudiovar.h diff -u src/sys/dev/hdaudio/hdaudiovar.h:1.7 src/sys/dev/hdaudio/hdaudiovar.h:1.8 --- src/sys/dev/hdaudio/hdaudiovar.h:1.7 Wed May 8 13:40:18 2019 +++ src/sys/dev/hdaudio/hdaudiovar.h Thu Jul 25 00:30:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudiovar.h,v 1.7 2019/05/08 13:40:18 isaki Exp $ */ +/* $NetBSD: hdaudiovar.h,v 1.8 2019/07/25 00:30:45 jmcneill Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -145,6 +145,9 @@ struct hdaudio_softc { bus_size_t sc_memsize; bool sc_memvalid; + uint32_t sc_flags; +#define HDAUDIO_FLAG_32BIT __BIT(0) + uint32_t sc_subsystem; kmutex_t sc_corb_mtx; @@ -184,58 +187,64 @@ void hdaudio_stream_reset(struct hdaudio int hdaudio_stream_tag(struct hdaudio_stream *); uint16_t hdaudio_stream_param(struct hdaudio_stream *, const audio_para
CVS commit: src/sys
Module Name:src Committed By: jmcneill Date: Thu Jul 25 00:30:45 UTC 2019 Modified Files: src/sys/arch/arm/nvidia: tegra_hdaudio.c src/sys/arch/evbarm/conf: GENERIC GENERIC64 src/sys/dev/hdaudio: files.hdaudio hdaudiovar.h Log Message: Replace the HDAUDIO_32BIT_ACCESS option with a runtime option. Set it for tegra_hdaudio, but not for the pci attachment. Add hdaudio@pci to GENERIC64 To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/nvidia/tegra_hdaudio.c cvs rdiff -u -r1.44 -r1.45 src/sys/arch/evbarm/conf/GENERIC cvs rdiff -u -r1.102 -r1.103 src/sys/arch/evbarm/conf/GENERIC64 cvs rdiff -u -r1.4 -r1.5 src/sys/dev/hdaudio/files.hdaudio cvs rdiff -u -r1.7 -r1.8 src/sys/dev/hdaudio/hdaudiovar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rmind Date: Thu Jul 25 00:02:56 UTC 2019 Modified Files: src/distrib/sets/lists/man: mi src/usr.sbin/npf: Makefile Log Message: Install the npf-params(7) man page. To generate a diff of this commit: cvs rdiff -u -r1.1648 -r1.1649 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/npf/Makefile 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/man/mi diff -u src/distrib/sets/lists/man/mi:1.1648 src/distrib/sets/lists/man/mi:1.1649 --- src/distrib/sets/lists/man/mi:1.1648 Wed Jun 12 09:03:32 2019 +++ src/distrib/sets/lists/man/mi Thu Jul 25 00:02:56 2019 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1648 2019/06/12 09:03:32 mrg Exp $ +# $NetBSD: mi,v 1.1649 2019/07/25 00:02:56 rmind Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2317,6 +2317,7 @@ ./usr/share/man/cat7/msafer.0 man-obsolete obsolete ./usr/share/man/cat7/nls.0 man-reference-catman .cat ./usr/share/man/cat7/npf.0 man-npf-catman .cat,npf +./usr/share/man/cat7/npf-params.0 man-npf-catman .cat,npf ./usr/share/man/cat7/orders.0 man-reference-catman .cat ./usr/share/man/cat7/packages.0 man-obsolete obsolete ./usr/share/man/cat7/pcap-filter.0 man-netutil-catman .cat @@ -5383,6 +5384,7 @@ ./usr/share/man/html7/module.html man-reference-htmlman html ./usr/share/man/html7/nls.html man-reference-htmlman html ./usr/share/man/html7/npf.html man-npf-htmlman html,npf +./usr/share/man/html7/npf-params.html man-npf-htmlman html,npf ./usr/share/man/html7/orders.html man-reference-htmlman html ./usr/share/man/html7/pcap-filter.html man-netutil-htmlman html ./usr/share/man/html7/pcap-linktype.html man-netutil-htmlman html @@ -8424,6 +8426,7 @@ ./usr/share/man/man7/msafer.7 man-obsolete obsolete ./usr/share/man/man7/nls.7 man-reference-man .man ./usr/share/man/man7/npf.7 man-npf-man .man,npf +./usr/share/man/man7/npf-params.7 man-npf-man .man,npf ./usr/share/man/man7/orders.7 man-reference-man .man ./usr/share/man/man7/packages.7 man-obsolete obsolete ./usr/share/man/man7/pcap-filter.7 man-netutil-man .man Index: src/usr.sbin/npf/Makefile diff -u src/usr.sbin/npf/Makefile:1.6 src/usr.sbin/npf/Makefile:1.7 --- src/usr.sbin/npf/Makefile:1.6 Sat Jan 7 17:27:02 2017 +++ src/usr.sbin/npf/Makefile Thu Jul 25 00:02:55 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2017/01/07 17:27:02 christos Exp $ +# $NetBSD: Makefile,v 1.7 2019/07/25 00:02:55 rmind Exp $ .include @@ -8,7 +8,7 @@ SUBDIR= npfctl npfd SUBDIR+= npftest .endif -MAN= npf.7 +MAN= npf.7 npf-params.7 .include .include
CVS commit: src
Module Name:src Committed By: rmind Date: Thu Jul 25 00:02:56 UTC 2019 Modified Files: src/distrib/sets/lists/man: mi src/usr.sbin/npf: Makefile Log Message: Install the npf-params(7) man page. To generate a diff of this commit: cvs rdiff -u -r1.1648 -r1.1649 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/npf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/modules/npf
Module Name:src Committed By: rmind Date: Wed Jul 24 23:49:08 UTC 2019 Modified Files: src/sys/modules/npf: Makefile Log Message: Update the NPF kernel module Makefile. Missed in the previous commit. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/modules/npf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/npf/Makefile diff -u src/sys/modules/npf/Makefile:1.23 src/sys/modules/npf/Makefile:1.24 --- src/sys/modules/npf/Makefile:1.23 Sun Feb 17 04:05:55 2019 +++ src/sys/modules/npf/Makefile Wed Jul 24 23:49:08 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2019/02/17 04:05:55 rin Exp $ +# $NetBSD: Makefile,v 1.24 2019/07/24 23:49:08 rmind Exp $ # # Public Domain. # @@ -11,9 +11,11 @@ KMOD= npf IOCONF= npf.ioconf SRCS= npf.c npf_alg.c npf_conf.c npf_ctl.c npf_handler.c SRCS+= npf_bpf.c npf_if.c npf_inet.c npf_mbuf.c npf_nat.c -SRCS+= npf_ruleset.c npf_conn.c npf_conndb.c npf_rproc.c +SRCS+= npf_params.c npf_ruleset.c npf_rproc.c +SRCS+= npf_conn.c npf_conndb.c npf_connkey.c npf_portmap.c SRCS+= npf_state.c npf_state_tcp.c npf_tableset.c -SRCS+= lpm.c npf_sendpkt.c npf_worker.c npf_ifaddr.c npf_os.c +SRCS+= lpm.c npf_sendpkt.c npf_worker.c npf_os.c npf_ifaddr.c + SRCS+= nvlist.c nvpair.c nv_kern_netbsd.c dnvlist.c CPPFLAGS+= -DINET6
CVS commit: src/sys/modules/npf
Module Name:src Committed By: rmind Date: Wed Jul 24 23:49:08 UTC 2019 Modified Files: src/sys/modules/npf: Makefile Log Message: Update the NPF kernel module Makefile. Missed in the previous commit. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/modules/npf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch
Module Name:src Committed By: tnn Date: Wed Jul 24 23:13:46 UTC 2019 Modified Files: src/sys/arch/amd64/conf: ALL src/sys/arch/i386/conf: ALL Log Message: add ssdfb(4) to ALL To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.468 -r1.469 src/sys/arch/i386/conf/ALL 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/amd64/conf/ALL diff -u src/sys/arch/amd64/conf/ALL:1.119 src/sys/arch/amd64/conf/ALL:1.120 --- src/sys/arch/amd64/conf/ALL:1.119 Tue May 7 22:00:10 2019 +++ src/sys/arch/amd64/conf/ALL Wed Jul 24 23:13:46 2019 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.119 2019/05/07 22:00:10 mrg Exp $ +# $NetBSD: ALL,v 1.120 2019/07/24 23:13:46 tnn Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.119 $" +#ident "ALL-$Revision: 1.120 $" maxusers 64 # estimated number of users @@ -724,6 +724,9 @@ ihidev* at iic? ims* at ihidev? reportid ? wsmouse* at ims? mux 0 +# I2C Displays +ssdfb* at iic? + # I2O devices iop* at pci? dev ? function ? # I/O processor iopsp* at iop? tid ? # SCSI/FC-AL ports Index: src/sys/arch/i386/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.468 src/sys/arch/i386/conf/ALL:1.469 --- src/sys/arch/i386/conf/ALL:1.468 Tue May 7 22:00:10 2019 +++ src/sys/arch/i386/conf/ALL Wed Jul 24 23:13:46 2019 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.468 2019/05/07 22:00:10 mrg Exp $ +# $NetBSD: ALL,v 1.469 2019/07/24 23:13:46 tnn Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.468 $" +#ident "ALL-$Revision: 1.469 $" maxusers 64 # estimated number of users @@ -786,6 +786,9 @@ ihidev* at iic? ims* at ihidev? reportid ? wsmouse* at ims? mux 0 +# I2C Displays +ssdfb* at iic? + # I2O devices iop* at pci? dev ? function ? # I/O processor iopsp* at iop? tid ? # SCSI/FC-AL ports
CVS commit: src/sys/arch
Module Name:src Committed By: tnn Date: Wed Jul 24 23:13:46 UTC 2019 Modified Files: src/sys/arch/amd64/conf: ALL src/sys/arch/i386/conf: ALL Log Message: add ssdfb(4) to ALL To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.468 -r1.469 src/sys/arch/i386/conf/ALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/dev
Dear Ryo, On 2019-07-09, Ryo ONODERA wrote: > Module Name: src > Committed By: ryoon > Date: Tue Jul 9 12:52:51 UTC 2019 > > Modified Files: > src/sys/dev/hid: hidms.c hidms.h > src/sys/dev/i2c: ims.c > > Log Message: > Add tpcalib, touch panel calibration to ims(4) > > Suggested by ryo@ at Japan NetBSD Users' Group BOF 2019-07-06. > > > To generate a diff of this commit: > cvs rdiff -u -r1.2 -r1.3 src/sys/dev/hid/hidms.c > cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hid/hidms.h > cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/ims.c > > Please note that diffs are not public domain; they are subject to the > copyright notices on the relevant files. I think this change has the side effect that ums(4) devices which report absolute coordinates seem to stop "moving" because tcpalib_init is never called for these devices. Is the patch below okay? Or, should hidms call tcpalib_init? (I tested the patch with an ACECAD digimemo.) -- Kind regards, Yorick Hardy Index: sys/dev/usb/ums.c === RCS file: /cvsroot/src/sys/dev/usb/ums.c,v retrieving revision 1.93 diff -u -r1.93 ums.c --- sys/dev/usb/ums.c 5 May 2019 03:17:54 - 1.93 +++ sys/dev/usb/ums.c 24 Jul 2019 21:29:35 - @@ -192,6 +192,7 @@ } } + tpcalib_init(&sc->sc_ms.sc_tpcalib); hidms_attach(self, &sc->sc_ms, &ums_accessops); }
CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd
Module Name:src Committed By: roy Date: Wed Jul 24 21:19:05 UTC 2019 Modified Files: src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile Log Message: Temporarily turn on IPV4LL for SMALL builds to work around a compile issue. This will be fixed in the next import. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/external/bsd/dhcpcd/sbin/dhcpcd/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/dhcpcd/sbin/dhcpcd/Makefile diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.45 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.46 --- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.45 Thu Feb 7 21:38:53 2019 +++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Wed Jul 24 21:19:05 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.45 2019/02/07 21:38:53 roy Exp $ +# $NetBSD: Makefile,v 1.46 2019/07/24 21:19:05 roy Exp $ # WARNS?= 6 @@ -32,10 +32,10 @@ SRCS+= auth.c .if (${USE_INET} != "no") CPPFLAGS+= -DARP -DINET SRCS+= arp.c bpf.c dhcp.c ipv4.c -.if !defined(SMALLPROG) +#.if !defined(SMALLPROG) CPPFLAGS+= -DIPV4LL -DARPING SRCS+= ipv4ll.c -.endif +#.endif .endif .if (${USE_INET6} != "no")
CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd
Module Name:src Committed By: roy Date: Wed Jul 24 21:19:05 UTC 2019 Modified Files: src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile Log Message: Temporarily turn on IPV4LL for SMALL builds to work around a compile issue. This will be fixed in the next import. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: jmcneill Date: Wed Jul 24 19:40:56 UTC 2019 Modified Files: src/sys/dev/wscons: wsdisplay.c Log Message: Call cn_halt for old console in wsdisplay_preattach too To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/sys/dev/wscons/wsdisplay.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/wscons/wsdisplay.c diff -u src/sys/dev/wscons/wsdisplay.c:1.156 src/sys/dev/wscons/wsdisplay.c:1.157 --- src/sys/dev/wscons/wsdisplay.c:1.156 Tue Jul 23 17:39:36 2019 +++ src/sys/dev/wscons/wsdisplay.c Wed Jul 24 19:40:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay.c,v 1.156 2019/07/23 17:39:36 rin Exp $ */ +/* $NetBSD: wsdisplay.c,v 1.157 2019/07/24 19:40:55 jmcneill Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.156 2019/07/23 17:39:36 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.157 2019/07/24 19:40:55 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_wsdisplay_compat.h" @@ -974,8 +974,11 @@ wsdisplay_preattach(const struct wsscree ccol, crow, defattr); - if (cn_tab != &wsdisplay_cons) + if (cn_tab != &wsdisplay_cons) { + if (cn_tab != NULL && cn_tab->cn_halt != NULL) + cn_tab->cn_halt(cn_tab->cn_dev); wsdisplay_ocn = cn_tab; + } cn_tab = &wsdisplay_cons; wsdisplay_console_initted = 1; }
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: jmcneill Date: Wed Jul 24 19:40:56 UTC 2019 Modified Files: src/sys/dev/wscons: wsdisplay.c Log Message: Call cn_halt for old console in wsdisplay_preattach too To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/sys/dev/wscons/wsdisplay.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/acpi
Module Name:src Committed By: jmcneill Date: Wed Jul 24 19:37:52 UTC 2019 Modified Files: src/sys/arch/arm/acpi: acpi_platform.c Log Message: Add early fb console support To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/acpi/acpi_platform.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/acpi/acpi_platform.c diff -u src/sys/arch/arm/acpi/acpi_platform.c:1.14 src/sys/arch/arm/acpi/acpi_platform.c:1.15 --- src/sys/arch/arm/acpi/acpi_platform.c:1.14 Sat Jun 22 19:47:27 2019 +++ src/sys/arch/arm/acpi/acpi_platform.c Wed Jul 24 19:37:52 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_platform.c,v 1.14 2019/06/22 19:47:27 jmcneill Exp $ */ +/* $NetBSD: acpi_platform.c,v 1.15 2019/07/24 19:37:52 jmcneill Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -31,11 +31,13 @@ #include "com.h" #include "plcom.h" +#include "wsdisplay.h" +#include "genfb.h" #include "opt_efi.h" #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.14 2019/06/22 19:47:27 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.15 2019/07/24 19:37:52 jmcneill Exp $"); #include #include @@ -71,6 +73,14 @@ __KERNEL_RCSID(0, "$NetBSD: acpi_platfor #include #endif +#if NWSDISPLAY > 0 +#include +#include +#include +#include +#include +#endif + #ifdef EFI_RUNTIME #include #endif @@ -124,6 +134,107 @@ acpi_platform_bootstrap(void) acpi_coherent_dma_tag._nranges = __arraycount(acpi_coherent_ranges); } +#if NWSDISPLAY > 0 && NGENFB > 0 +static struct wsscreen_descr acpi_platform_stdscreen = { + .name = "std", + .ncols = 0, + .nrows = 0, + .textops = NULL, + .fontwidth = 0, + .fontheight = 0, + .capabilities = 0, + .modecookie = NULL +}; + +static struct vcons_screen acpi_platform_screen; + +static int +acpi_platform_find_simplefb(void) +{ + static const char * simplefb_compatible[] = { "simple-framebuffer", NULL }; + int chosen_phandle, child; + + chosen_phandle = OF_finddevice("/chosen"); + if (chosen_phandle == -1) + return -1; + + for (child = OF_child(chosen_phandle); child; child = OF_peer(child)) { + if (!fdtbus_status_okay(child)) + continue; + if (!of_match_compatible(child, simplefb_compatible)) + continue; + + return child; + } + + return -1; +} + +static void +acpi_platform_wsdisplay_preattach(void) +{ + struct rasops_info *ri = &acpi_platform_screen.scr_ri; + bus_space_tag_t bst = &arm_generic_bs_tag; + bus_space_handle_t bsh; + uint32_t width, height, stride; + const char *format; + bus_addr_t addr; + bus_size_t size; + uint16_t depth; + long defattr; + + memset(&acpi_platform_screen, 0, sizeof(acpi_platform_screen)); + + const int phandle = acpi_platform_find_simplefb(); + if (phandle == -1) + return; + + if (fdtbus_get_reg(phandle, 0, &addr, &size) != 0 || size == 0) + return; + + if (of_getprop_uint32(phandle, "width", &width) != 0 || + of_getprop_uint32(phandle, "height", &height) != 0 || + of_getprop_uint32(phandle, "stride", &stride) != 0 || + (format = fdtbus_get_string(phandle, "format")) == NULL) + return; + + if (strcmp(format, "a8b8g8r8") == 0 || + strcmp(format, "x8r8g8b8") == 0) { + depth = 32; + } else if (strcmp(format, "r5g6b5") == 0) { + depth = 16; + } else { + return; + } + + if (bus_space_map(bst, addr, size, + BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE, &bsh) != 0) + return; + + wsfont_init(); + + ri->ri_width = width; + ri->ri_height = height; + ri->ri_depth = depth; + ri->ri_stride = stride; + ri->ri_bits = bus_space_vaddr(bst, bsh); + ri->ri_flg = RI_CENTER | RI_FULLCLEAR | RI_CLEAR; + rasops_init(ri, ri->ri_height / 8, ri->ri_width / 8); + ri->ri_caps = WSSCREEN_WSCOLORS; + rasops_reconfig(ri, ri->ri_height / ri->ri_font->fontheight, + ri->ri_width / ri->ri_font->fontwidth); + + acpi_platform_stdscreen.nrows = ri->ri_rows; + acpi_platform_stdscreen.ncols = ri->ri_cols; + acpi_platform_stdscreen.textops = &ri->ri_ops; + acpi_platform_stdscreen.capabilities = ri->ri_caps; + + ri->ri_ops.allocattr(ri, 0, 0, 0, &defattr); + + wsdisplay_preattach(&acpi_platform_stdscreen, ri, 0, 0, defattr); +} +#endif + static void acpi_platform_startup(void) { @@ -203,6 +314,13 @@ acpi_platform_startup(void) } /* + * Setup framebuffer console, if present. + */ +#if NWSDISPLAY > 0 && NGENFB > 0 + acpi_platform_wsdisplay_preattach(); +#endif + + /* * Initialize PSCI 0.2+ if implemented */ if (ACPI_SUCCESS(acpi_table_find(ACPI_SIG_FADT, (void **)&fadt))) {
CVS commit: src/sys/arch/arm/acpi
Module Name:src Committed By: jmcneill Date: Wed Jul 24 19:37:52 UTC 2019 Modified Files: src/sys/arch/arm/acpi: acpi_platform.c Log Message: Add early fb console support To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/acpi/acpi_platform.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 19:33:35 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Oops, revert unintentional changes. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.85 src/sys/dev/rasops/rasops.c:1.86 --- src/sys/dev/rasops/rasops.c:1.85 Wed Jul 24 19:31:12 2019 +++ src/sys/dev/rasops/rasops.c Wed Jul 24 19:33:35 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.85 2019/07/24 19:31:12 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.86 2019/07/24 19:33:35 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.85 2019/07/24 19:31:12 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.86 2019/07/24 19:33:35 rin Exp $"); #include "opt_rasops.h" #include "rasops_glue.h" @@ -134,28 +134,6 @@ const uint8_t rasops_isgray[16] = { 0, 0, 0, 1 }; -#ifdef GENFB_MAC68K -static const uint8_t apple_devcmap[16] = { - 0xff, /* black 0x00, 0x00, 0x00 */ - 0x6b, /* red 0x99, 0x00, 0x00 */ - 0xc5, /* green 0x00, 0x99, 0x00 */ - 0x59, /* yellow 0x99, 0x99, 0x00 */ - 0xd4, /* blue 0x00, 0x00, 0x99 */ - 0x68, /* magenta 0x99, 0x00, 0x99 */ - 0xc2, /* cyan 0x00, 0x99, 0x99 */ - 0x2b, /* white 0xcc, 0xcc, 0xcc */ - - 0x56, /* black 0x99, 0x99, 0x99 */ - 0x23, /* red 0xff, 0x00, 0x00 */ - 0xb9, /* green 0x00, 0xff, 0x00 */ - 0x05, /* yellow 0xff, 0xff, 0x00 */ - 0xd2, /* blue 0x00, 0x00, 0xff */ - 0x1e, /* magenta 0xff, 0x00, 0xff */ - 0xb4, /* cyan 0x00, 0xff, 0xff */ - 0x00, /* white 0xff, 0xff, 0xff */ -}; -#endif - /* Generic functions */ static void rasops_copyrows(void *, int, int, int); static int rasops_mapchar(void *, int, u_int *); @@ -866,15 +844,9 @@ rasops_init_devcmap(struct rasops_info * case 8: if ((ri->ri_flg & RI_8BIT_IS_RGB) == 0) { - for (i = 0; i < 16; i++) { -#ifdef GENFB_MAC68K -c = apple_devcmap[i]; -#else -c = i; -#endif + for (i = 0; i < 16; i++) ri->ri_devcmap[i] = -c | (c<<8) | (c<<16) | (c<<24); - } +i | (i<<8) | (i<<16) | (i<<24); return; } }
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 19:33:35 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Oops, revert unintentional changes. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 19:31:12 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Well, masks do not have to be updated every time in loop. Calculate them in advance even if it may be bogus. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 19:31:12 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Well, masks do not have to be updated every time in loop. Calculate them in advance even if it may be bogus. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.84 src/sys/dev/rasops/rasops.c:1.85 --- src/sys/dev/rasops/rasops.c:1.84 Wed Jul 24 18:49:37 2019 +++ src/sys/dev/rasops/rasops.c Wed Jul 24 19:31:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.84 2019/07/24 18:49:37 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.85 2019/07/24 19:31:12 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.84 2019/07/24 18:49:37 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.85 2019/07/24 19:31:12 rin Exp $"); #include "opt_rasops.h" #include "rasops_glue.h" @@ -134,6 +134,28 @@ const uint8_t rasops_isgray[16] = { 0, 0, 0, 1 }; +#ifdef GENFB_MAC68K +static const uint8_t apple_devcmap[16] = { + 0xff, /* black 0x00, 0x00, 0x00 */ + 0x6b, /* red 0x99, 0x00, 0x00 */ + 0xc5, /* green 0x00, 0x99, 0x00 */ + 0x59, /* yellow 0x99, 0x99, 0x00 */ + 0xd4, /* blue 0x00, 0x00, 0x99 */ + 0x68, /* magenta 0x99, 0x00, 0x99 */ + 0xc2, /* cyan 0x00, 0x99, 0x99 */ + 0x2b, /* white 0xcc, 0xcc, 0xcc */ + + 0x56, /* black 0x99, 0x99, 0x99 */ + 0x23, /* red 0xff, 0x00, 0x00 */ + 0xb9, /* green 0x00, 0xff, 0x00 */ + 0x05, /* yellow 0xff, 0xff, 0x00 */ + 0xd2, /* blue 0x00, 0x00, 0xff */ + 0x1e, /* magenta 0xff, 0x00, 0xff */ + 0xb4, /* cyan 0x00, 0xff, 0xff */ + 0x00, /* white 0xff, 0xff, 0xff */ +}; +#endif + /* Generic functions */ static void rasops_copyrows(void *, int, int, int); static int rasops_mapchar(void *, int, u_int *); @@ -844,9 +866,15 @@ rasops_init_devcmap(struct rasops_info * case 8: if ((ri->ri_flg & RI_8BIT_IS_RGB) == 0) { - for (i = 0; i < 16; i++) + for (i = 0; i < 16; i++) { +#ifdef GENFB_MAC68K +c = apple_devcmap[i]; +#else +c = i; +#endif ri->ri_devcmap[i] = -i | (i<<8) | (i<<16) | (i<<24); +c | (c<<8) | (c<<16) | (c<<24); + } return; } } @@ -995,7 +1023,7 @@ static void rasops_do_cursor(struct rasops_info *ri) { int full, height, cnt, slop1, slop2, row, col; - uint32_t tmp32, msk; + uint32_t tmp32, msk1, msk2; uint8_t tmp8; uint8_t *dp, *rp, *hrp, *hp; @@ -1062,6 +1090,9 @@ rasops_do_cursor(struct rasops_info *ri) rp = (uint8_t *)((uintptr_t)rp & ~3); hrp = (uint8_t *)((uintptr_t)hrp & ~3); + msk1 = be32toh(0xU >> (32 - (8 * slop1))); + msk2 = be32toh(0xU << (32 - (8 * slop2))); + while (height--) { dp = rp; rp += ri->ri_stride; @@ -1071,8 +1102,7 @@ rasops_do_cursor(struct rasops_info *ri) } if (slop1) { - msk = be32toh(0xU >> (32 - (8 * slop1))); - tmp32 = *(uint32_t *)dp ^ msk; + tmp32 = *(uint32_t *)dp ^ msk1; *(uint32_t *)dp = tmp32; dp += 4; if (ri->ri_hwbits) { @@ -1092,8 +1122,7 @@ rasops_do_cursor(struct rasops_info *ri) } if (slop2) { - msk = be32toh(0xU << (32 - (8 * slop2))); - tmp32 = *(uint32_t *)dp ^ msk; + tmp32 = *(uint32_t *)dp ^ msk2; *(uint32_t *)dp = tmp32; if (ri->ri_hwbits) *(uint32_t *)hp = tmp32;
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 18:49:37 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Simplify logic and tiny clean-up. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 18:49:37 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Simplify logic and tiny clean-up. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.83 src/sys/dev/rasops/rasops.c:1.84 --- src/sys/dev/rasops/rasops.c:1.83 Wed Jul 24 18:40:01 2019 +++ src/sys/dev/rasops/rasops.c Wed Jul 24 18:49:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.83 2019/07/24 18:40:01 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.84 2019/07/24 18:49:37 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.83 2019/07/24 18:40:01 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.84 2019/07/24 18:49:37 rin Exp $"); #include "opt_rasops.h" #include "rasops_glue.h" @@ -994,7 +994,9 @@ rasops_eraserows(void *cookie, int row, static void rasops_do_cursor(struct rasops_info *ri) { - int full1, height, cnt, slop1, slop2, row, col; + int full, height, cnt, slop1, slop2, row, col; + uint32_t tmp32, msk; + uint8_t tmp8; uint8_t *dp, *rp, *hrp, *hp; hrp = hp = NULL; @@ -1034,7 +1036,7 @@ rasops_do_cursor(struct rasops_info *ri) */ if (ri->ri_xscale == 1) { while (height--) { - uint8_t tmp8 = ~*rp; + tmp8 = ~*rp; *rp = tmp8; rp += ri->ri_stride; @@ -1051,74 +1053,50 @@ rasops_do_cursor(struct rasops_info *ri) * For ri_xscale = 2, 3, 4, ...: * * Note that siop1 <= ri_xscale even for ri_xscale = 2, - * since rp % 3 = 0 or 2. + * since rp % 3 = 0 or 2 (ri_stride % 4 = 0). */ slop1 = (4 - ((uintptr_t)rp & 3)) & 3; slop2 = (ri->ri_xscale - slop1) & 3; - full1 = (ri->ri_xscale - slop1 - slop2) >> 2; + full = (ri->ri_xscale - slop1 - slop2) >> 2; - if ((slop1 | slop2) == 0) { - uint32_t tmp32; - /* A common case */ - while (height--) { - dp = rp; - rp += ri->ri_stride; - if (ri->ri_hwbits) { -hp = hrp; -hrp += ri->ri_stride; - } + rp = (uint8_t *)((uintptr_t)rp & ~3); + hrp = (uint8_t *)((uintptr_t)hrp & ~3); - for (cnt = full1; cnt; cnt--) { -tmp32 = *(uint32_t *)dp ^ ~0; -*(uint32_t *)dp = tmp32; -dp += 4; -if (ri->ri_hwbits) { - *(uint32_t *)hp = tmp32; - hp += 4; -} - } + while (height--) { + dp = rp; + rp += ri->ri_stride; + if (ri->ri_hwbits) { + hp = hrp; + hrp += ri->ri_stride; } - } else { - uint32_t tmp32, msk1, msk2; - while (height--) { - dp = (uint8_t *)((uintptr_t)rp & ~3); - rp += ri->ri_stride; + if (slop1) { + msk = be32toh(0xU >> (32 - (8 * slop1))); + tmp32 = *(uint32_t *)dp ^ msk; + *(uint32_t *)dp = tmp32; + dp += 4; if (ri->ri_hwbits) { -hp = (uint8_t *)((uintptr_t)hrp & ~3); -hrp += ri->ri_stride; - } - - if (slop1) { -msk1 = -be32toh(0x >> (32 - (8 * slop1))); -tmp32 = *(uint32_t *)dp ^ msk1; -*(uint32_t *)dp = tmp32; -dp += 4; -if (ri->ri_hwbits) { - *(uint32_t *)hp = tmp32; - hp += 4; -} +*(uint32_t *)hp = tmp32; +hp += 4; } + } - for (cnt = full1; cnt; cnt--) { -tmp32 = *(uint32_t *)dp ^ ~0; -*(uint32_t *)dp = tmp32; -dp += 4; -if (ri->ri_hwbits) { - *(uint32_t *)hp = tmp32; - hp += 4; -} + for (cnt = full; cnt; cnt--) { + tmp32 = ~*(uint32_t *)dp; + *(uint32_t *)dp = tmp32; + dp += 4; + if (ri->ri_hwbits) { +*(uint32_t *)hp = tmp32; +hp += 4; } + } - if (slop2) { -msk2 = -be32toh(0x << (32 - (8 * slop2))); -tmp32 = *(uint32_t *)dp ^ msk2; -*(uint32_t *)dp = tmp32; -if (ri->ri_hwbits) - *(uint32_t *)hp = tmp32; - } + if (slop2) { + msk = be32toh(0xU << (32 - (8 * slop2))); + tmp32 = *(uint32_t *)dp ^ msk; + *(uint32_t *)dp = tmp32; + if (ri->ri_hwbits) +*(uint32_t *)hp = tmp32; } } }
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 18:40:01 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Avoid shift-count overflow to fix strange cursor behaviors on amd64 when font width is odd. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/dev/rasops/rasops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 18:40:01 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c Log Message: Avoid shift-count overflow to fix strange cursor behaviors on amd64 when font width is odd. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/dev/rasops/rasops.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.82 src/sys/dev/rasops/rasops.c:1.83 --- src/sys/dev/rasops/rasops.c:1.82 Wed Jul 24 18:33:49 2019 +++ src/sys/dev/rasops/rasops.c Wed Jul 24 18:40:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.82 2019/07/24 18:33:49 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.83 2019/07/24 18:40:01 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.82 2019/07/24 18:33:49 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.83 2019/07/24 18:40:01 rin Exp $"); #include "opt_rasops.h" #include "rasops_glue.h" @@ -1081,9 +1081,6 @@ rasops_do_cursor(struct rasops_info *ri) } else { uint32_t tmp32, msk1, msk2; - msk1 = be32toh(0x >> (32 - (8 * slop1))); - msk2 = be32toh(0x << (32 - (8 * slop2))); - while (height--) { dp = (uint8_t *)((uintptr_t)rp & ~3); rp += ri->ri_stride; @@ -1092,7 +1089,9 @@ rasops_do_cursor(struct rasops_info *ri) hrp += ri->ri_stride; } - if (msk1 != 0) { + if (slop1) { +msk1 = +be32toh(0x >> (32 - (8 * slop1))); tmp32 = *(uint32_t *)dp ^ msk1; *(uint32_t *)dp = tmp32; dp += 4; @@ -1112,7 +,9 @@ rasops_do_cursor(struct rasops_info *ri) } } - if (msk2 != 0) { + if (slop2) { +msk2 = +be32toh(0x << (32 - (8 * slop2))); tmp32 = *(uint32_t *)dp ^ msk2; *(uint32_t *)dp = tmp32; if (ri->ri_hwbits)
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 18:33:49 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c rasops.h rasops1.c rasops15.c rasops2.c rasops24.c rasops32.c rasops4.c rasops8.c Log Message: Use unsigned integers for binary data storage. No functional changes intended. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/rasops/rasops.h cvs rdiff -u -r1.25 -r1.26 src/sys/dev/rasops/rasops1.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/rasops/rasops32.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/rasops/rasops4.c cvs rdiff -u -r1.36 -r1.37 src/sys/dev/rasops/rasops8.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.81 src/sys/dev/rasops/rasops.c:1.82 --- src/sys/dev/rasops/rasops.c:1.81 Wed Jul 24 18:03:30 2019 +++ src/sys/dev/rasops/rasops.c Wed Jul 24 18:33:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.81 2019/07/24 18:03:30 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.82 2019/07/24 18:33:49 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.81 2019/07/24 18:03:30 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.82 2019/07/24 18:33:49 rin Exp $"); #include "opt_rasops.h" #include "rasops_glue.h" @@ -613,7 +613,7 @@ rasops_allocattr_mono(void *cookie, int static void rasops_copyrows(void *cookie, int src, int dst, int num) { - int32_t *sp, *dp, *hp, *srp, *drp, *hrp; + uint32_t *sp, *dp, *hp, *srp, *drp, *hrp; struct rasops_info *ri; int n8, n1, cnt, delta; @@ -649,19 +649,19 @@ rasops_copyrows(void *cookie, int src, i n1 = (ri->ri_emustride >> 2) & 7; if (dst < src) { - srp = (int32_t *)(ri->ri_bits + src * ri->ri_yscale); - drp = (int32_t *)(ri->ri_bits + dst * ri->ri_yscale); + srp = (uint32_t *)(ri->ri_bits + src * ri->ri_yscale); + drp = (uint32_t *)(ri->ri_bits + dst * ri->ri_yscale); if (ri->ri_hwbits) - hrp = (int32_t *)(ri->ri_hwbits + dst * + hrp = (uint32_t *)(ri->ri_hwbits + dst * ri->ri_yscale); delta = ri->ri_stride; } else { src = ri->ri_font->fontheight * src + num - 1; dst = ri->ri_font->fontheight * dst + num - 1; - srp = (int32_t *)(ri->ri_bits + src * ri->ri_stride); - drp = (int32_t *)(ri->ri_bits + dst * ri->ri_stride); + srp = (uint32_t *)(ri->ri_bits + src * ri->ri_stride); + drp = (uint32_t *)(ri->ri_bits + dst * ri->ri_stride); if (ri->ri_hwbits) - hrp = (int32_t *)(ri->ri_hwbits + dst * + hrp = (uint32_t *)(ri->ri_hwbits + dst * ri->ri_stride); delta = -ri->ri_stride; @@ -673,10 +673,10 @@ rasops_copyrows(void *cookie, int src, i if (ri->ri_hwbits) hp = hrp; - DELTA(drp, delta, int32_t *); - DELTA(srp, delta, int32_t *); + DELTA(drp, delta, uint32_t *); + DELTA(srp, delta, uint32_t *); if (ri->ri_hwbits) - DELTA(hrp, delta, int32_t *); + DELTA(hrp, delta, uint32_t *); for (cnt = n8; cnt; cnt--) { dp[0] = sp[0]; @@ -914,7 +914,7 @@ rasops_eraserows(void *cookie, int row, { struct rasops_info *ri; int np, nw, cnt, delta; - int32_t *dp, *hp, clr; + uint32_t *dp, *hp, clr; int i; ri = (struct rasops_info *)cookie; @@ -945,17 +945,17 @@ rasops_eraserows(void *cookie, int row, np = ri->ri_stride >> 5; nw = (ri->ri_stride >> 2) & 7; num = ri->ri_height; - dp = (int32_t *)ri->ri_origbits; + dp = (uint32_t *)ri->ri_origbits; if (ri->ri_hwbits) - hp = (int32_t *)ri->ri_hworigbits; + hp = (uint32_t *)ri->ri_hworigbits; delta = 0; } else { np = ri->ri_emustride >> 5; nw = (ri->ri_emustride >> 2) & 7; num *= ri->ri_font->fontheight; - dp = (int32_t *)(ri->ri_bits + row * ri->ri_yscale); + dp = (uint32_t *)(ri->ri_bits + row * ri->ri_yscale); if (ri->ri_hwbits) - hp = (int32_t *)(ri->ri_hwbits + row * + hp = (uint32_t *)(ri->ri_hwbits + row * ri->ri_yscale); delta = ri->ri_delta; } @@ -973,17 +973,17 @@ rasops_eraserows(void *cookie, int row, } for (cnt = nw; cnt; cnt--) { - *(int32_t *)dp = clr; - DELTA(dp, 4, int32_t *); + *(uint32_t *)dp = clr; + DELTA(dp, 4, uint32_t *); if (ri->ri_hwbits) { -*(int32_t *)hp = clr; -DELTA(hp, 4, int32_t *); +*(uint32_t *)hp = clr; +DELTA(hp, 4, uint32_t *); } } - DELTA(dp, delta, int32_t *); + DELTA(dp, delta, uint32_t *); if (ri->ri_hwbits) - DELTA(hp, delta, int32_t *); + DELTA(hp, delta, uint32_t *); } } @@ -1069,11 +1069,11 @@ rasops_do_cursor(struct rasops_info *ri) } for (cnt = full1; cnt; cnt--) { -tmp32 = *(int32_t *)dp ^ ~0; -*(int32_t *)dp = tmp32; +tmp32
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 18:33:49 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c rasops.h rasops1.c rasops15.c rasops2.c rasops24.c rasops32.c rasops4.c rasops8.c Log Message: Use unsigned integers for binary data storage. No functional changes intended. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.34 -r1.35 src/sys/dev/rasops/rasops.h cvs rdiff -u -r1.25 -r1.26 src/sys/dev/rasops/rasops1.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/rasops/rasops32.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/rasops/rasops4.c cvs rdiff -u -r1.36 -r1.37 src/sys/dev/rasops/rasops8.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 18:24:42 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.h Log Message: Adjust white space. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/dev/rasops/rasops.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/rasops/rasops.h diff -u src/sys/dev/rasops/rasops.h:1.33 src/sys/dev/rasops/rasops.h:1.34 --- src/sys/dev/rasops/rasops.h:1.33 Wed Jul 24 18:03:30 2019 +++ src/sys/dev/rasops/rasops.h Wed Jul 24 18:24:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.h,v 1.33 2019/07/24 18:03:30 rin Exp $ */ +/* $NetBSD: rasops.h,v 1.34 2019/07/24 18:24:42 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -119,8 +119,8 @@ struct rasops_info { int ri_fontscale; /* fontheight * fontstride */ int ri_xscale; /* fontwidth * pelbytes */ int ri_yscale; /* fontheight * stride */ - uint8_t *ri_origbits; /* where screen bits actually start */ - uint8_t *ri_hworigbits; /* where hw bits actually start */ + uint8_t *ri_origbits; /* where screen bits actually start */ + uint8_t *ri_hworigbits; /* where hw bits actually start */ int ri_xorigin; /* where ri_bits begins (x) */ int ri_yorigin; /* where ri_bits begins (y) */ int32_t ri_devcmap[16]; /* color -> framebuffer data */
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 18:24:42 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.h Log Message: Adjust white space. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/dev/rasops/rasops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 18:03:30 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c rasops.h rasops1.c rasops15.c rasops2.c rasops24.c rasops32.c rasops4.c rasops8.c Log Message: Style: - u_char --> uint8_t - u_int*_t --> uint*_t No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/rasops/rasops.h \ src/sys/dev/rasops/rasops32.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/rasops/rasops1.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/rasops/rasops4.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/rasops/rasops8.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/rasops/rasops.c diff -u src/sys/dev/rasops/rasops.c:1.80 src/sys/dev/rasops/rasops.c:1.81 --- src/sys/dev/rasops/rasops.c:1.80 Sun Jul 21 16:19:45 2019 +++ src/sys/dev/rasops/rasops.c Wed Jul 24 18:03:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.80 2019/07/21 16:19:45 rin Exp $ */ +/* $NetBSD: rasops.c,v 1.81 2019/07/24 18:03:30 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.80 2019/07/21 16:19:45 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.81 2019/07/24 18:03:30 rin Exp $"); #include "opt_rasops.h" #include "rasops_glue.h" @@ -68,7 +68,7 @@ struct rasops_matchdata { }; /* ANSI colormap (R,G,B). Upper 8 are high-intensity */ -const u_char rasops_cmap[256*3] = { +const uint8_t rasops_cmap[256*3] = { 0x00, 0x00, 0x00, /* black */ 0x7f, 0x00, 0x00, /* red */ 0x00, 0x7f, 0x00, /* green */ @@ -127,7 +127,7 @@ const u_char rasops_cmap[256*3] = { }; /* True if color is gray */ -const u_char rasops_isgray[16] = { +const uint8_t rasops_isgray[16] = { 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, @@ -724,7 +724,7 @@ void rasops_copycols(void *cookie, int row, int src, int dst, int num) { struct rasops_info *ri; - u_char *sp, *dp, *hp; + uint8_t *sp, *dp, *hp; int height; ri = (struct rasops_info *)cookie; @@ -823,7 +823,7 @@ rasops_cursor(void *cookie, int on, int static void rasops_init_devcmap(struct rasops_info *ri) { - const u_char *p; + const uint8_t *p; int i, c; switch (ri->ri_depth) { @@ -995,7 +995,7 @@ static void rasops_do_cursor(struct rasops_info *ri) { int full1, height, cnt, slop1, slop2, row, col; - u_char *dp, *rp, *hrp, *hp; + uint8_t *dp, *rp, *hrp, *hp; hrp = hp = NULL; @@ -1085,10 +1085,10 @@ rasops_do_cursor(struct rasops_info *ri) msk2 = be32toh(0x << (32 - (8 * slop2))); while (height--) { - dp = (u_char *)((uintptr_t)rp & ~3); + dp = (uint8_t *)((uintptr_t)rp & ~3); rp += ri->ri_stride; if (ri->ri_hwbits) { -hp = (u_char *)((uintptr_t)hrp & ~3); +hp = (uint8_t *)((uintptr_t)hrp & ~3); hrp += ri->ri_stride; } @@ -1214,10 +1214,10 @@ rasops_erasecols(void *cookie, int row, } for (cnt = num; cnt; cnt--) { - *(u_char *)dp = clr; + *(uint8_t *)dp = clr; DELTA(dp, 1, int32_t *); if (ri->ri_hwbits) { - *(u_char *)hp = clr; + *(uint8_t *)hp = clr; DELTA(hp, 1, int32_t *); } } @@ -1243,10 +1243,10 @@ rasops_erasecols(void *cookie, int row, /* Align span to 4 bytes */ if (slop1 & 1) { - *(u_char *)dp = clr; + *(uint8_t *)dp = clr; DELTA(dp, 1, int32_t *); if (ri->ri_hwbits) { -*(u_char *)hp = clr; +*(uint8_t *)hp = clr; DELTA(hp, 1, int32_t *); } } @@ -1281,10 +1281,10 @@ rasops_erasecols(void *cookie, int row, /* Write unaligned trailing slop */ if (slop2 & 1) { - *(u_char *)dp = clr; + *(uint8_t *)dp = clr; DELTA(dp, 1, int32_t *); if (ri->ri_hwbits) { -*(u_char *)hp = clr; +*(uint8_t *)hp = clr; DELTA(hp, 1, int32_t *); } } @@ -1346,7 +1346,7 @@ static void rasops_copychar(void *cookie, int srcrow, int dstrow, int srccol, int dstcol) { struct rasops_info *ri; - u_char *sp, *dp; + uint8_t *sp, *dp; int height; int r_srcrow, r_dstrow, r_srccol, r_dstcol; @@ -1375,7 +1375,7 @@ static void rasops_putchar_rotated_cw(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; - u_char *rp; + uint8_t *rp; int height; ri = (struct rasops_info *)cookie; @@ -1473,7 +1473,7 @@ static void rasops_copychar_ccw(void *cookie, int srcrow, int dstrow, int srccol, int dstcol) { struct rasops_info *ri; - u_char *sp, *dp; + uint8_t *sp, *dp; int height; int r_srcrow, r_dstrow, r_srccol, r_dstcol; @@ -1502,7 +1502,7 @@ static void rasops_putchar_rotated_ccw(void *cookie, int row, int col, u_int uc, long attr) { struct rasops_info *ri; - u_char *r
CVS commit: src/sys/dev/rasops
Module Name:src Committed By: rin Date: Wed Jul 24 18:03:30 UTC 2019 Modified Files: src/sys/dev/rasops: rasops.c rasops.h rasops1.c rasops15.c rasops2.c rasops24.c rasops32.c rasops4.c rasops8.c Log Message: Style: - u_char --> uint8_t - u_int*_t --> uint*_t No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/rasops/rasops.h \ src/sys/dev/rasops/rasops32.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/rasops/rasops1.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/rasops/rasops15.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/rasops/rasops2.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/rasops/rasops24.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/rasops/rasops4.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/rasops/rasops8.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common
Module Name:src Committed By: hannken Date: Wed Jul 24 16:57:45 UTC 2019 Modified Files: src/external/cddl/osnet/dist/lib/libdtrace/common: dt_open.c Log Message: Handle automatic module loading on device open more like FreeBSD does. Where FreeBSD uses a module "dtraceall" that depends on all dtrace modules we now load the basic set "dtrace sdt fbt syscall" on open. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 \ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common
Module Name:src Committed By: hannken Date: Wed Jul 24 16:57:45 UTC 2019 Modified Files: src/external/cddl/osnet/dist/lib/libdtrace/common: dt_open.c Log Message: Handle automatic module loading on device open more like FreeBSD does. Where FreeBSD uses a module "dtraceall" that depends on all dtrace modules we now load the basic set "dtrace sdt fbt syscall" on open. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 \ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.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/cddl/osnet/dist/lib/libdtrace/common/dt_open.c diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c:1.15 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c:1.16 --- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c:1.15 Sun Jul 21 15:38:06 2019 +++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c Wed Jul 24 16:57:45 2019 @@ -1140,19 +1140,36 @@ dt_vopen(int version, int flags, int *er */ dt_provmod_open(&provmod, &df); -#ifdef __NetBSD__ +#if defined(__NetBSD__) modctl_load_t cmdargs; + const char * const mod_list[] = { + "dtrace", + "dtrace_sdt", + "dtrace_fbt", + "dtrace_syscall" + }; + + dtfd = -1; + err = 0; + for (i = 0; i < __arraycount(mod_list); i++) { + cmdargs.ml_filename = mod_list[i]; + cmdargs.ml_flags = MODCTL_NO_PROP; + cmdargs.ml_props = NULL; + cmdargs.ml_propslen = 0; - cmdargs.ml_filename = "dtrace"; - cmdargs.ml_flags = MODCTL_NO_PROP; - cmdargs.ml_props = NULL; - cmdargs.ml_propslen = 0; - - (void)modctl(MODCTL_LOAD, &cmdargs); + if (modctl(MODCTL_LOAD, &cmdargs) < 0 && errno != EEXIST) { + err = errno; + break; + } + } + if (err == 0) { + dtfd = open("/dev/dtrace/dtrace", O_RDWR); + err = errno; /* save errno from opening dtfd */ + } #endif +#if defined(__FreeBSD__) dtfd = open("/dev/dtrace/dtrace", O_RDWR); err = errno; /* save errno from opening dtfd */ -#if defined(__FreeBSD__) /* * Automatically load the 'dtraceall' module if we couldn't open the * char device.
CVS commit: src/external/cddl/osnet/sys/sys
Module Name:src Committed By: hannken Date: Wed Jul 24 16:54:37 UTC 2019 Removed Files: src/external/cddl/osnet/sys/sys: int_limits.h int_types.h pcpu.h sema.h sig.h thread.h types32.h va_list.h zfs_prop.h Log Message: Remove unneeded includes. To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/external/cddl/osnet/sys/sys/int_limits.h \ src/external/cddl/osnet/sys/sys/int_types.h \ src/external/cddl/osnet/sys/sys/types32.h \ src/external/cddl/osnet/sys/sys/va_list.h \ src/external/cddl/osnet/sys/sys/zfs_prop.h cvs rdiff -u -r1.4 -r0 src/external/cddl/osnet/sys/sys/pcpu.h cvs rdiff -u -r1.3 -r0 src/external/cddl/osnet/sys/sys/sema.h \ src/external/cddl/osnet/sys/sys/sig.h cvs rdiff -u -r1.2 -r0 src/external/cddl/osnet/sys/sys/thread.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/sys/sys
Module Name:src Committed By: hannken Date: Wed Jul 24 16:54:37 UTC 2019 Removed Files: src/external/cddl/osnet/sys/sys: int_limits.h int_types.h pcpu.h sema.h sig.h thread.h types32.h va_list.h zfs_prop.h Log Message: Remove unneeded includes. To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/external/cddl/osnet/sys/sys/int_limits.h \ src/external/cddl/osnet/sys/sys/int_types.h \ src/external/cddl/osnet/sys/sys/types32.h \ src/external/cddl/osnet/sys/sys/va_list.h \ src/external/cddl/osnet/sys/sys/zfs_prop.h cvs rdiff -u -r1.4 -r0 src/external/cddl/osnet/sys/sys/pcpu.h cvs rdiff -u -r1.3 -r0 src/external/cddl/osnet/sys/sys/sema.h \ src/external/cddl/osnet/sys/sys/sig.h cvs rdiff -u -r1.2 -r0 src/external/cddl/osnet/sys/sys/thread.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: bouyer Date: Wed Jul 24 16:36:48 UTC 2019 Modified Files: src/sys/arch/amd64/amd64: machdep.c process_machdep.c Log Message: Remove XENPV-specific %ss/%cs handling, it doens't seem to be needed with newer hypervisors (tested with 4.6 and 4.11) To generate a diff of this commit: cvs rdiff -u -r1.334 -r1.335 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.42 -r1.43 src/sys/arch/amd64/amd64/process_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/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.334 src/sys/arch/amd64/amd64/machdep.c:1.335 --- src/sys/arch/amd64/amd64/machdep.c:1.334 Thu Jun 27 02:00:30 2019 +++ src/sys/arch/amd64/amd64/machdep.c Wed Jul 24 16:36:47 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.334 2019/06/27 02:00:30 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.335 2019/07/24 16:36:47 bouyer Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -110,7 +110,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.334 2019/06/27 02:00:30 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.335 2019/07/24 16:36:47 bouyer Exp $"); #include "opt_modular.h" #include "opt_user_ldt.h" @@ -2064,15 +2064,6 @@ cpu_setmcontext(struct lwp *l, const mco tf->tf_rsp = gr[_REG_RSP]; tf->tf_ss = LSEL(LUDATA_SEL, SEL_UPL); -#ifdef XENPV - /* - * Xen has its own way of dealing with %cs and %ss, - * reset them to proper values. - */ - tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL); - tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL); -#endif - l->l_md.md_flags |= MDL_IRET; } Index: src/sys/arch/amd64/amd64/process_machdep.c diff -u src/sys/arch/amd64/amd64/process_machdep.c:1.42 src/sys/arch/amd64/amd64/process_machdep.c:1.43 --- src/sys/arch/amd64/amd64/process_machdep.c:1.42 Sat Jul 20 18:25:11 2019 +++ src/sys/arch/amd64/amd64/process_machdep.c Wed Jul 24 16:36:47 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: process_machdep.c,v 1.42 2019/07/20 18:25:11 christos Exp $ */ +/* $NetBSD: process_machdep.c,v 1.43 2019/07/24 16:36:47 bouyer Exp $ */ /* * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.42 2019/07/20 18:25:11 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.43 2019/07/24 16:36:47 bouyer Exp $"); #include "opt_xen.h" #include @@ -225,12 +225,6 @@ process_write_regs(struct lwp *l, const tf->tf_rflags = regs[_REG_RFLAGS]; tf->tf_rsp = regs[_REG_RSP]; -#ifdef XENPV - /* see comment in cpu_setmcontext */ - tf->tf_ss = GSEL(GUDATA_SEL, SEL_UPL); - tf->tf_cs = GSEL(GUCODE_SEL, SEL_UPL); -#endif - return 0; }
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: bouyer Date: Wed Jul 24 16:36:48 UTC 2019 Modified Files: src/sys/arch/amd64/amd64: machdep.c process_machdep.c Log Message: Remove XENPV-specific %ss/%cs handling, it doens't seem to be needed with newer hypervisors (tested with 4.6 and 4.11) To generate a diff of this commit: cvs rdiff -u -r1.334 -r1.335 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.42 -r1.43 src/sys/arch/amd64/amd64/process_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src
Module Name:xsrc Committed By: macallan Date: Wed Jul 24 16:07:59 UTC 2019 Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14.h cg14_accel.c cg14_render.c Log Message: avoid stalling the CPU by letting the SX instruction FIFO drain every couple of memory instructions. No more missed IPIs when building stuff in an xterm so far... To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h cvs rdiff -u -r1.14 -r1.15 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c cvs rdiff -u -r1.12 -r1.13 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.13 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.14 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.13 Thu Dec 7 19:23:22 2017 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h Wed Jul 24 16:07:59 2019 @@ -31,6 +31,7 @@ #include "gcstruct.h" #include "xf86sbusBus.h" #include "exa.h" +#include /* Various offsets in virtual (ie. mmap()) spaces Linux and Solaris support. */ #define CG14_REGS_VOFF 0x /* registers */ @@ -100,7 +101,8 @@ typedef struct { uint32_t fillcolour; int op; Bool source_is_solid, no_source_pixmap; - int xdir, ydir; + int xdir, ydir; + int queuecount; ExaDriverPtr pExa; } Cg14Rec, *Cg14Ptr; @@ -123,7 +125,14 @@ read_sx_reg(Cg14Ptr p, int reg) static inline void write_sx_io(Cg14Ptr p, int reg, uint32_t val) { + if (p->queuecount > 6) { + /* let the queue drain to avoid stalling the CPU */ + do { } while + ((read_sx_reg(p, SX_CONTROL_STATUS) & SX_MT) == 0); + p->queuecount = 0; + } *(volatile uint32_t *)(p->sxio + (reg & ~7)) = val; + p->queuecount++; } Bool CG14SetupCursor(ScreenPtr); Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.14 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.15 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.14 Fri Mar 1 02:22:27 2019 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c Wed Jul 24 16:07:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cg14_accel.c,v 1.14 2019/03/01 02:22:27 macallan Exp $ */ +/* $NetBSD: cg14_accel.c,v 1.15 2019/07/24 16:07:59 macallan Exp $ */ /* * Copyright (c) 2013 Michael Lorenz * All rights reserved. @@ -41,7 +41,6 @@ #include "compiler.h" #include "cg14.h" -#include /*#define SX_DEBUG*/ @@ -1121,6 +1120,7 @@ CG14InitAccel(ScreenPtr pScreen) pExa->UploadToScreen = CG14UploadToScreen; pExa->DownloadFromScreen = CG14DownloadFromScreen; + p->queuecount = 0; /* do some hardware init */ write_sx_reg(p, SX_PLANEMASK, 0x); p->last_mask = 0x; Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c:1.12 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c:1.13 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c:1.12 Fri Dec 8 22:49:37 2017 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c Wed Jul 24 16:07:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cg14_render.c,v 1.12 2017/12/08 22:49:37 macallan Exp $ */ +/* $NetBSD: cg14_render.c,v 1.13 2019/07/24 16:07:59 macallan Exp $ */ /* * Copyright (c) 2013 Michael Lorenz * All rights reserved. @@ -41,7 +41,6 @@ #include "compiler.h" #include "cg14.h" -#include /*#define SX_SINGLE*/ /*#define SX_RENDER_DEBUG*/
CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src
Module Name:xsrc Committed By: macallan Date: Wed Jul 24 16:07:59 UTC 2019 Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14.h cg14_accel.c cg14_render.c Log Message: avoid stalling the CPU by letting the SX instruction FIFO drain every couple of memory instructions. No more missed IPIs when building stuff in an xterm so far... To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h cvs rdiff -u -r1.14 -r1.15 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c cvs rdiff -u -r1.12 -r1.13 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_render.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: msaitoh Date: Wed Jul 24 15:55:08 UTC 2019 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_reg.h intel_atomic.c Log Message: Use unsigned. Found by KUBSan. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/intel_atomic.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/external/bsd/drm2/dist/drm/i915/i915_reg.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.6 src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.7 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.6 Wed Jul 24 14:57:09 2019 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h Wed Jul 24 15:55:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: i915_reg.h,v 1.6 2019/07/24 14:57:09 msaitoh Exp $ */ +/* $NetBSD: i915_reg.h,v 1.7 2019/07/24 15:55:07 msaitoh Exp $ */ /* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. * All Rights Reserved. @@ -150,7 +150,7 @@ #define GEN8_RING_PDP_LDW(ring, n) ((ring)->mmio_base+0x270 + (n) * 8) #define GEN8_R_PWR_CLK_STATE 0x20C8 -#define GEN8_RPCS_ENABLE (1 << 31) +#define GEN8_RPCS_ENABLE (1UL << 31) #define GEN8_RPCS_S_CNT_ENABLE (1 << 18) #define GEN8_RPCS_S_CNT_SHIFT 15 #define GEN8_RPCS_S_CNT_MASK (0x7 << GEN8_RPCS_S_CNT_SHIFT) @@ -640,7 +640,7 @@ enum skl_disp_power_wells { }; #define SKL_POWER_WELL_STATE(pw) (1 << ((pw) * 2)) -#define SKL_POWER_WELL_REQ(pw) (1 << (((pw) * 2) + 1)) +#define SKL_POWER_WELL_REQ(pw) (1U << (((pw) * 2) + 1)) #define PUNIT_REG_PWRGT_CTRL 0x60 #define PUNIT_REG_PWRGT_STATUS 0x61 @@ -7428,7 +7428,7 @@ enum skl_disp_power_wells { /* LCPLL_CTL */ #define LCPLL1_CTL 0x46010 #define LCPLL2_CTL 0x46014 -#define LCPLL_PLL_ENABLE (1<<31) +#define LCPLL_PLL_ENABLE (1UL << 31) /* DPLL control1 */ #define DPLL_CTRL1 0x6C058 Index: src/sys/external/bsd/drm2/dist/drm/i915/intel_atomic.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_atomic.c:1.2 src/sys/external/bsd/drm2/dist/drm/i915/intel_atomic.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_atomic.c:1.2 Mon Aug 27 04:58:24 2018 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_atomic.c Wed Jul 24 15:55:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_atomic.c,v 1.2 2018/08/27 04:58:24 riastradh Exp $ */ +/* $NetBSD: intel_atomic.c,v 1.3 2019/07/24 15:55:07 msaitoh Exp $ */ /* * Copyright © 2015 Intel Corporation @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_atomic.c,v 1.2 2018/08/27 04:58:24 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_atomic.c,v 1.3 2019/07/24 15:55:07 msaitoh Exp $"); #include #include @@ -175,7 +175,7 @@ int intel_atomic_setup_scalers(struct dr int idx; /* skip if scaler not required */ - if (!(scaler_state->scaler_users & (1 << i))) + if (!(scaler_state->scaler_users & (1U << i))) continue; if (i == SKL_CRTC_INDEX) {
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: msaitoh Date: Wed Jul 24 15:55:08 UTC 2019 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_reg.h intel_atomic.c Log Message: Use unsigned. Found by KUBSan. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/intel_atomic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Wed Jul 24 15:06:21 UTC 2019 Modified Files: src/external/bsd/dhcpcd/dist/src: logerr.c Log Message: Fix SMALL build. To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/dhcpcd/dist/src/logerr.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/logerr.c diff -u src/external/bsd/dhcpcd/dist/src/logerr.c:1.1.1.4 src/external/bsd/dhcpcd/dist/src/logerr.c:1.2 --- src/external/bsd/dhcpcd/dist/src/logerr.c:1.1.1.4 Wed Jul 24 09:54:55 2019 +++ src/external/bsd/dhcpcd/dist/src/logerr.c Wed Jul 24 15:06:21 2019 @@ -209,6 +209,7 @@ vlogmessage(int pri, const char *fmt, va #ifdef SMALL vsyslog(pri, fmt, args); + return len; #else if (ctx->log_file == NULL) { vsyslog(pri, fmt, args);
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Wed Jul 24 15:06:21 UTC 2019 Modified Files: src/external/bsd/dhcpcd/dist/src: logerr.c Log Message: Fix SMALL build. To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/dhcpcd/dist/src/logerr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: msaitoh Date: Wed Jul 24 14:57:09 UTC 2019 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_drv.h i915_reg.h intel_pm.c intel_uncore.c Log Message: Use unsigned. Found by KUBSan. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/drm2/dist/drm/i915/intel_uncore.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: msaitoh Date: Wed Jul 24 14:57:09 UTC 2019 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_drv.h i915_reg.h intel_pm.c intel_uncore.c Log Message: Use unsigned. Found by KUBSan. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/drm2/dist/drm/i915/intel_uncore.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/external/bsd/drm2/dist/drm/i915/i915_drv.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h:1.28 src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h:1.29 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h:1.28 Thu Sep 13 08:25:55 2018 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h Wed Jul 24 14:57:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: i915_drv.h,v 1.28 2018/09/13 08:25:55 mrg Exp $ */ +/* $NetBSD: i915_drv.h,v 1.29 2019/07/24 14:57:09 msaitoh Exp $ */ /* i915_drv.h -- Private header for the I915 driver -*- linux-c -*- */ @@ -1424,7 +1424,7 @@ struct i915_gpu_error { atomic_t reset_counter; #define I915_RESET_IN_PROGRESS_FLAG 1 -#define I915_WEDGED (1 << 31) +#define I915_WEDGED (1UL << 31) /** * Waitqueue to signal when the reset has completed. Used by clients Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.5 src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.6 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h:1.5 Thu Sep 13 08:25:55 2018 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_reg.h Wed Jul 24 14:57:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: i915_reg.h,v 1.5 2018/09/13 08:25:55 mrg Exp $ */ +/* $NetBSD: i915_reg.h,v 1.6 2019/07/24 14:57:09 msaitoh Exp $ */ /* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. * All Rights Reserved. @@ -184,7 +184,7 @@ #define GAB_CTL_CONT_AFTER_PAGEFAULT (1<<8) #define GEN6_STOLEN_RESERVED 0x1082C0 -#define GEN6_STOLEN_RESERVED_ADDR_MASK (0xFFF << 20) +#define GEN6_STOLEN_RESERVED_ADDR_MASK (0xFFFUL << 20) #define GEN7_STOLEN_RESERVED_ADDR_MASK (0x3FFF << 18) #define GEN6_STOLEN_RESERVED_SIZE_MASK (3 << 4) #define GEN6_STOLEN_RESERVED_1M (0 << 4) @@ -1660,7 +1660,7 @@ enum skl_disp_power_wells { #define GEN8_FAULT_TLB_DATA1 0x04b14 #define FPGA_DBG 0x42300 -#define FPGA_DBG_RM_NOCLAIM (1<<31) +#define FPGA_DBG_RM_NOCLAIM (1UL << 31) #define DERRMR 0x44050 /* Note that HBLANK events are reserved on bdw+ */ @@ -1721,7 +1721,7 @@ enum skl_disp_power_wells { #define GFX_MODE 0x02520 #define GFX_MODE_GEN7 0x0229c #define RING_MODE_GEN7(ring) ((ring)->mmio_base+0x29c) -#define GFX_RUN_LIST_ENABLE (1<<15) +#define GFX_RUN_LIST_ENABLE (1U << 15) #define GFX_INTERRUPT_STEERING (1<<14) #define GFX_TLB_INVALIDATE_EXPLICIT (1<<13) #define GFX_SURFACE_FAULT_ENABLE (1<<12) @@ -2065,7 +2065,7 @@ enum skl_disp_power_wells { /* Framebuffer compression for GM45+ */ #define DPFC_CB_BASE 0x3200 #define DPFC_CONTROL 0x3208 -#define DPFC_CTL_EN (1<<31) +#define DPFC_CTL_EN (1UL << 31) #define DPFC_CTL_PLANE(plane) ((plane)<<30) #define IVB_DPFC_CTL_PLANE(plane) ((plane)<<29) #define DPFC_CTL_FENCE_EN (1<<29) @@ -2175,7 +2175,7 @@ enum skl_disp_power_wells { #define GMBUS_PIN_3_BXT 3 #define GMBUS_NUM_PINS 7 /* including 0 */ #define GMBUS1 (dev_priv->gpio_mmio_base + 0x5104) /* command/status */ -#define GMBUS_SW_CLR_INT (1<<31) +#define GMBUS_SW_CLR_INT (1UL << 31) #define GMBUS_SW_RDY (1<<30) #define GMBUS_ENT (1<<29) /* enable timeout */ #define GMBUS_CYCLE_NONE (0<<25) @@ -3507,7 +3507,7 @@ enum skl_disp_power_wells { /* Panel power sequencing */ #define PP_STATUS 0x61200 -#define PP_ON (1 << 31) +#define PP_ON (1UL << 31) /* * Indicates that all dependencies of the panel are on: * @@ -4279,7 +4279,7 @@ enum skl_disp_power_wells { #define DPD_AUX_CH_DATA4 0x64320 #define DPD_AUX_CH_DATA5 0x64324 -#define DP_AUX_CH_CTL_SEND_BUSY (1 << 31) +#define DP_AUX_CH_CTL_SEND_BUSY (1UL << 31) #define DP_AUX_CH_CTL_DONE (1 << 30) #define DP_AUX_CH_CTL_INTERRUPT (1 << 29) #define DP_AUX_CH_CTL_TIME_OUT_ERROR (1 << 28) @@ -4366,7 +4366,7 @@ enum skl_disp_power_wells { #define DSL_LINEMASK_GEN2 0x0fff #define DSL_LINEMASK_GEN3 0x1fff #define _PIPEACONF 0x70008 -#define PIPECONF_ENABLE (1<<31) +#define PIPECONF_ENABLE (1UL << 31) #define PIPECONF_DISABLE 0 #define PIPECONF_DOUBLE_WIDE (1<<30) #define I965_PIPECONF_ACTIVE (1<<30) @@ -4794,7 +4794,7 @@ enum skl_disp_power_wells { /* define the Watermark register on Ironlake */ #define WM0_PIPEA_ILK 0x45
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Wed Jul 24 14:35:02 UTC 2019 Modified Files: src/usr.sbin/sysinst: disks.c Log Message: Whenever offering "current system" as target, also offer the last disk we found (not one less - oops). To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/disks.c diff -u src/usr.sbin/sysinst/disks.c:1.42 src/usr.sbin/sysinst/disks.c:1.43 --- src/usr.sbin/sysinst/disks.c:1.42 Wed Jul 24 02:38:29 2019 +++ src/usr.sbin/sysinst/disks.c Wed Jul 24 14:35:02 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disks.c,v 1.42 2019/07/24 02:38:29 msaitoh Exp $ */ +/* $NetBSD: disks.c,v 1.43 2019/07/24 14:35:02 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -825,7 +825,7 @@ find_disks(const char *doingwhat, bool a dsk_menu[i].opt_action = set_menu_select; i++; } - for (; i < numdisks; i++) { + for (; i < numdisks+allow_cur_system; i++) { dsk_menu[i].opt_name = disks[i-allow_cur_system].dd_descr; dsk_menu[i].opt_flags = OPT_EXIT;
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Wed Jul 24 14:35:02 UTC 2019 Modified Files: src/usr.sbin/sysinst: disks.c Log Message: Whenever offering "current system" as target, also offer the last disk we found (not one less - oops). To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/sysinst/disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/libnv/dist
Module Name:src Committed By: martin Date: Wed Jul 24 14:25:56 UTC 2019 Modified Files: src/sys/external/bsd/libnv/dist: nv_impl.h nvpair.c Log Message: Adapt for userland compilation To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/libnv/dist/nv_impl.h cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/libnv/dist/nvpair.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/external/bsd/libnv/dist/nv_impl.h diff -u src/sys/external/bsd/libnv/dist/nv_impl.h:1.6 src/sys/external/bsd/libnv/dist/nv_impl.h:1.7 --- src/sys/external/bsd/libnv/dist/nv_impl.h:1.6 Tue Feb 12 12:49:23 2019 +++ src/sys/external/bsd/libnv/dist/nv_impl.h Wed Jul 24 14:25:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nv_impl.h,v 1.6 2019/02/12 12:49:23 rmind Exp $ */ +/* $NetBSD: nv_impl.h,v 1.7 2019/07/24 14:25:56 martin Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -72,6 +72,11 @@ extern void *nv_calloc(size_t, size_t); extern void nv_free(void *); extern char *nv_strdup(const char *); # endif +#ifdef __NetBSD__ +# define nv_kmem_free(B,L) kmem_free(B,L) +#else +# define nv_kmem_free(B,L) nv_free(B) +#endif # define nv_vasprintf(ptr, ...) vasprintf(ptr, M_NVLIST, __VA_ARGS__) #elif defined(_STANDALONE) extern void *nv_malloc(size_t); @@ -86,6 +91,7 @@ extern char *nv_strdup(const char *); # define nv_realloc(buf, size) realloc((buf), (size)) # define nv_free(buf) free((buf)) # define nv_vasprintf(ptr, ...) vasprintf(ptr, __VA_ARGS__) +# define nv_kmem_free(B,L) nv_free(B) void *nv_calloc(size_t, size_t); char *nv_strdup(const char *); Index: src/sys/external/bsd/libnv/dist/nvpair.c diff -u src/sys/external/bsd/libnv/dist/nvpair.c:1.10 src/sys/external/bsd/libnv/dist/nvpair.c:1.11 --- src/sys/external/bsd/libnv/dist/nvpair.c:1.10 Wed Jul 24 12:13:13 2019 +++ src/sys/external/bsd/libnv/dist/nvpair.c Wed Jul 24 14:25:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvpair.c,v 1.10 2019/07/24 12:13:13 sevan Exp $ */ +/* $NetBSD: nvpair.c,v 1.11 2019/07/24 14:25:56 martin Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -36,7 +36,7 @@ #ifdef __FreeBSD__ __FBSDID("$FreeBSD: head/sys/contrib/libnv/nvpair.c 335382 2018-06-19 18:43:02Z lwhsu $"); #else -__RCSID("$NetBSD: nvpair.c,v 1.10 2019/07/24 12:13:13 sevan Exp $"); +__RCSID("$NetBSD: nvpair.c,v 1.11 2019/07/24 14:25:56 martin Exp $"); #endif #include @@ -1217,7 +1217,7 @@ nvpair_create_stringv(const char *name, if (len < 0) return (NULL); nvp = nvpair_create_string(name, str); - kmem_free(str, len+1); + nv_kmem_free(str, len+1); return (nvp); } #endif
CVS commit: src/sys/external/bsd/libnv/dist
Module Name:src Committed By: martin Date: Wed Jul 24 14:25:56 UTC 2019 Modified Files: src/sys/external/bsd/libnv/dist: nv_impl.h nvpair.c Log Message: Adapt for userland compilation To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/libnv/dist/nv_impl.h cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/libnv/dist/nvpair.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: joerg Date: Wed Jul 24 14:07:17 UTC 2019 Modified Files: src/distrib/sets/lists/comp: mi src/external/bsd/libarchive: Makefile prepare-import.sh src/external/bsd/libarchive/include: config_netbsd.h src/external/bsd/libarchive/lib/libarchive: Makefile Log Message: Update build glue and configuration for libarchive 3.4.0. To generate a diff of this commit: cvs rdiff -u -r1.2277 -r1.2278 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.1 -r1.2 src/external/bsd/libarchive/Makefile cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libarchive/prepare-import.sh cvs rdiff -u -r1.9 -r1.10 src/external/bsd/libarchive/include/config_netbsd.h cvs rdiff -u -r1.9 -r1.10 src/external/bsd/libarchive/lib/libarchive/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: joerg Date: Wed Jul 24 14:07:17 UTC 2019 Modified Files: src/distrib/sets/lists/comp: mi src/external/bsd/libarchive: Makefile prepare-import.sh src/external/bsd/libarchive/include: config_netbsd.h src/external/bsd/libarchive/lib/libarchive: Makefile Log Message: Update build glue and configuration for libarchive 3.4.0. To generate a diff of this commit: cvs rdiff -u -r1.2277 -r1.2278 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.1 -r1.2 src/external/bsd/libarchive/Makefile cvs rdiff -u -r1.3 -r1.4 src/external/bsd/libarchive/prepare-import.sh cvs rdiff -u -r1.9 -r1.10 src/external/bsd/libarchive/include/config_netbsd.h cvs rdiff -u -r1.9 -r1.10 src/external/bsd/libarchive/lib/libarchive/Makefile 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/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2277 src/distrib/sets/lists/comp/mi:1.2278 --- src/distrib/sets/lists/comp/mi:1.2277 Mon Jun 10 10:28:41 2019 +++ src/distrib/sets/lists/comp/mi Wed Jul 24 14:07:16 2019 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2277 2019/06/10 10:28:41 mrg Exp $ +# $NetBSD: mi,v 1.2278 2019/07/24 14:07:16 joerg Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -5557,6 +5557,7 @@ ./usr/share/man/cat3/archive_entry_linkresolver_free.0 comp-c-catman .cat ./usr/share/man/cat3/archive_entry_linkresolver_new.0 comp-c-catman .cat ./usr/share/man/cat3/archive_entry_linkresolver_set_strategy.0 comp-c-catman .cat +./usr/share/man/cat3/archive_entry_misc.0 comp-c-catman .cat ./usr/share/man/cat3/archive_entry_mode.0 comp-c-catman .cat ./usr/share/man/cat3/archive_entry_mtime.0 comp-c-catman .cat ./usr/share/man/cat3/archive_entry_mtime_is_set.0 comp-c-catman .cat @@ -13613,6 +13614,7 @@ ./usr/share/man/html3/archive_entry_linkresolver_free.html comp-c-htmlman html ./usr/share/man/html3/archive_entry_linkresolver_new.html comp-c-htmlman html ./usr/share/man/html3/archive_entry_linkresolver_set_strategy.html comp-c-htmlman html +./usr/share/man/html3/archive_entry_misc.html comp-c-htmlman html ./usr/share/man/html3/archive_entry_mode.html comp-c-htmlman html ./usr/share/man/html3/archive_entry_mtime.html comp-c-htmlman html ./usr/share/man/html3/archive_entry_mtime_is_set.html comp-c-htmlman html @@ -21506,6 +21508,7 @@ ./usr/share/man/man3/archive_entry_linkresolver_free.3 comp-c-man .man ./usr/share/man/man3/archive_entry_linkresolver_new.3 comp-c-man .man ./usr/share/man/man3/archive_entry_linkresolver_set_strategy.3 comp-c-man .man +./usr/share/man/man3/archive_entry_misc.3 comp-c-man .man ./usr/share/man/man3/archive_entry_mode.3 comp-c-man .man ./usr/share/man/man3/archive_entry_mtime.3 comp-c-man .man ./usr/share/man/man3/archive_entry_mtime_is_set.3 comp-c-man .man Index: src/external/bsd/libarchive/Makefile diff -u src/external/bsd/libarchive/Makefile:1.1 src/external/bsd/libarchive/Makefile:1.2 --- src/external/bsd/libarchive/Makefile:1.1 Fri Sep 19 22:01:25 2008 +++ src/external/bsd/libarchive/Makefile Wed Jul 24 14:07:17 2019 @@ -1,5 +1,15 @@ -# $NetBSD: Makefile,v 1.1 2008/09/19 22:01:25 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2019/07/24 14:07:17 joerg Exp $ SUBDIR= lib .WAIT bin +CONFIG_DIR:= ${.PARSEDIR}/dist + +run-configure: + [ ! -d tmp ] || rm -r tmp + mkdir -p tmp + cd tmp && CONFIG_SITE= ${CONFIG_DIR}/configure --without-xml2 --host=${MACHINE_GNU_ARCH}--netbsd \ + CC=${CC:Q} CFLAGS=${CFLAGS:N-Werror:Q} CPPFLAGS=${CPPFLAGS:Q} LDFLAGS=${LDFLAGS:Q} + rm -r tmp + +.include .include Index: src/external/bsd/libarchive/prepare-import.sh diff -u src/external/bsd/libarchive/prepare-import.sh:1.3 src/external/bsd/libarchive/prepare-import.sh:1.4 --- src/external/bsd/libarchive/prepare-import.sh:1.3 Thu Apr 20 13:11:04 2017 +++ src/external/bsd/libarchive/prepare-import.sh Wed Jul 24 14:07:17 2019 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: prepare-import.sh,v 1.3 2017/04/20 13:11:04 joerg Exp $ +# $NetBSD: prepare-import.sh,v 1.4 2019/07/24 14:07:17 joerg Exp $ # # Extract the new tarball and rename the libarchive-X.Y.Z directory # to dist. Run this script and check for additional files and @@ -7,13 +7,6 @@ set -e -mkdir tmp -cd tmp -../dist/configure --without-xml2 --without-expat -mv config.h ../include/config_netbsd.h -cd .. -rm -rf tmp - cd dist rm -rf build contrib doc examples test_utils autom4te.cache Index: src/external/bsd/libarchive/include/config_netbsd.h diff -u src/external/bsd/libarchive/include/config_netbsd.h:1.9 src/external/bsd/libarchive/include/config_netbsd.h:1.10 --- src/external/bsd/libarchive/include/config_netbsd.h:1.9 Sun May 21 22:32:55 2017 +++ src/external/bsd/libarchive/include/config_netbsd.h Wed Jul 24 14:07:17 2019 @@ -152,13 +152,13 @@ /* #undef ARCHIVE_XATTR_LINUX */ /* Version
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: joerg Date: Wed Jul 24 14:05:45 UTC 2019 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read_support_format_mtree.c Log Message: Avoid ctype warning due to missing cast. To generate a diff of this commit: cvs rdiff -u -r1.1.1.5 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_mtree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: joerg Date: Wed Jul 24 14:05:45 UTC 2019 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive_read_support_format_mtree.c Log Message: Avoid ctype warning due to missing cast. To generate a diff of this commit: cvs rdiff -u -r1.1.1.5 -r1.2 \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_mtree.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/libarchive/dist/libarchive/archive_read_support_format_mtree.c diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_mtree.c:1.1.1.5 src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_mtree.c:1.2 --- src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_mtree.c:1.1.1.5 Wed Jul 24 13:50:23 2019 +++ src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_mtree.c Wed Jul 24 14:05:45 2019 @@ -1051,7 +1051,7 @@ read_mtree(struct archive_read *a, struc continue; /* Non-printable characters are not allowed */ for (s = p;s < p + len - 1; s++) { - if (!isprint(*s)) { + if (!isprint((unsigned char)*s)) { r = ARCHIVE_FATAL; break; }
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: joerg Date: Wed Jul 24 14:03:57 UTC 2019 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive.h archive_openssl_hmac_private.h archive_pack_dev.c archive_pack_dev.h archive_read_disk_entry_from_file.c archive_read_support_format_iso9660.c archive_write.3 archive_write_set_format_ar.c archive_write_set_format_shar.c archive_write_set_format_ustar.c Log Message: Merge changes from libarchive 3.4.0. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/libarchive/dist/libarchive/archive.h \ src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ar.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ustar.c cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libarchive/dist/libarchive/archive_pack_dev.c \ src/external/bsd/libarchive/dist/libarchive/archive_pack_dev.h cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/libarchive/dist/libarchive/archive_write.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/libarchive/dist/libarchive
Module Name:src Committed By: joerg Date: Wed Jul 24 14:03:57 UTC 2019 Modified Files: src/external/bsd/libarchive/dist/libarchive: archive.h archive_openssl_hmac_private.h archive_pack_dev.c archive_pack_dev.h archive_read_disk_entry_from_file.c archive_read_support_format_iso9660.c archive_write.3 archive_write_set_format_ar.c archive_write_set_format_shar.c archive_write_set_format_ustar.c Log Message: Merge changes from libarchive 3.4.0. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/libarchive/dist/libarchive/archive.h \ src/external/bsd/libarchive/dist/libarchive/archive_openssl_hmac_private.h \ src/external/bsd/libarchive/dist/libarchive/archive_read_support_format_iso9660.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ar.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_shar.c \ src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_ustar.c cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libarchive/dist/libarchive/archive_pack_dev.c \ src/external/bsd/libarchive/dist/libarchive/archive_pack_dev.h cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/libarchive/dist/libarchive/archive_write.3 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/libarchive/dist/libarchive/archive.h diff -u src/external/bsd/libarchive/dist/libarchive/archive.h:1.3 src/external/bsd/libarchive/dist/libarchive/archive.h:1.4 --- src/external/bsd/libarchive/dist/libarchive/archive.h:1.3 Thu Apr 20 13:01:40 2017 +++ src/external/bsd/libarchive/dist/libarchive/archive.h Wed Jul 24 14:03:57 2019 @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3003002 +#define ARCHIVE_VERSION_NUMBER 3004000 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(vo /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.3.2dev" +#define ARCHIVE_VERSION_ONLY_STRING "3.4.0" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); @@ -177,6 +177,7 @@ __LA_DECL const char * archive_zlib_ver __LA_DECL const char * archive_liblzma_version(void); __LA_DECL const char * archive_bzlib_version(void); __LA_DECL const char * archive_liblz4_version(void); +__LA_DECL const char * archive_libzstd_version(void); /* Declare our basic types. */ struct archive; @@ -276,6 +277,7 @@ typedef const char *archive_passphrase_c #define ARCHIVE_FILTER_LZOP 11 #define ARCHIVE_FILTER_GRZIP 12 #define ARCHIVE_FILTER_LZ4 13 +#define ARCHIVE_FILTER_ZSTD 14 #if ARCHIVE_VERSION_NUMBER < 400 #define ARCHIVE_COMPRESSION_NONE ARCHIVE_FILTER_NONE @@ -338,6 +340,7 @@ typedef const char *archive_passphrase_c #define ARCHIVE_FORMAT_RAR 0xD #define ARCHIVE_FORMAT_7ZIP 0xE #define ARCHIVE_FORMAT_WARC 0xF +#define ARCHIVE_FORMAT_RAR_V5 0x10 /* * Codes returned by archive_read_format_capabilities(). @@ -433,6 +436,7 @@ __LA_DECL int archive_read_support_filte __LA_DECL int archive_read_support_filter_rpm(struct archive *); __LA_DECL int archive_read_support_filter_uu(struct archive *); __LA_DECL int archive_read_support_filter_xz(struct archive *); +__LA_DECL int archive_read_support_filter_zstd(struct archive *); __LA_DECL int archive_read_support_format_7zip(struct archive *); __LA_DECL int archive_read_support_format_all(struct archive *); @@ -446,6 +450,7 @@ __LA_DECL int archive_read_support_forma __LA_DECL int archive_read_support_format_lha(struct archive *); __LA_DECL int archive_read_support_format_mtree(struct archive *); __LA_DECL int archive_read_support_format_rar(struct archive *); +__LA_DECL int archive_read_support_format_rar5(struct archive *); __LA_DECL int archive_read_support_format_raw(struct archive *); __LA_DECL int archive_read_support_format_tar(struct archive *); __LA_DECL int archive_read_support_format_warc(struct archive *); @@ -778,6 +783,7 @@ __LA_DECL int archive_write_add_filter_p const char *cmd); __LA_DECL int archive_write_add_filter_uuencode(struct archive *); __LA_DECL int archive_write_add_filter_xz(struct archive *); +__LA_DECL int archive_write_add_filter_zstd(struct archive *); /* A convenience function to set the format based on the code or name. */ @@ -1089,6 +1095,8 @@ __LA_DECL int archive_match_excluded(str */ __LA_DECL int archive_match_path_excluded(struct archive *, struct archive_entry *); +/* Control recursive inclusion of
CVS import: src/external/bsd/libarchive/dist
Module Name:src Committed By: joerg Date: Wed Jul 24 13:50:45 UTC 2019 Update of /cvsroot/src/external/bsd/libarchive/dist In directory ivanova.netbsd.org:/tmp/cvs-serv21805 Log Message: Import libarchive 3.4.0 Status: Vendor Tag: KIENTZLE Release Tags: libarchive-3-4-0 U src/external/bsd/libarchive/dist/COPYING U src/external/bsd/libarchive/dist/NEWS U src/external/bsd/libarchive/dist/README.md U src/external/bsd/libarchive/dist/cpio/cpio_windows.h U src/external/bsd/libarchive/dist/cpio/cpio.c U src/external/bsd/libarchive/dist/cpio/cpio_platform.h U src/external/bsd/libarchive/dist/cpio/bsdcpio.1 U src/external/bsd/libarchive/dist/cpio/cmdline.c U src/external/bsd/libarchive/dist/cpio/cpio.h U src/external/bsd/libarchive/dist/cpio/cpio_windows.c U src/external/bsd/libarchive/dist/cpio/test/test_option_b64encode.c U src/external/bsd/libarchive/dist/cpio/test/test_cmdline.c U src/external/bsd/libarchive/dist/cpio/test/test_basic.c U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.bin.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_help.c U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.lzo.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_d.c U src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c N src/external/bsd/libarchive/dist/cpio/test/test_option_zstd.c U src/external/bsd/libarchive/dist/cpio/test/test_option_f.c U src/external/bsd/libarchive/dist/cpio/test/test_option_uuencode.c U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_lzma.c U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.newc.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_lzo.c U src/external/bsd/libarchive/dist/cpio/test/test_option_lz4.c U src/external/bsd/libarchive/dist/cpio/test/test_option_t.c U src/external/bsd/libarchive/dist/cpio/test/test_option_a.c U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.bin.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.lrz.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_grzip.c U src/external/bsd/libarchive/dist/cpio/test/test_option_0.c U src/external/bsd/libarchive/dist/cpio/test/test_option_u.c U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_gz.c U src/external/bsd/libarchive/dist/cpio/test/test_option_C_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_lrzip.c U src/external/bsd/libarchive/dist/cpio/test/test_option_c.c U src/external/bsd/libarchive/dist/cpio/test/test_option_J_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_l.c U src/external/bsd/libarchive/dist/cpio/test/test_option_z.c U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_bz2.c U src/external/bsd/libarchive/dist/cpio/test/test_0.c U src/external/bsd/libarchive/dist/cpio/test/test_option_B_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.gz.uu U src/external/bsd/libarchive/dist/cpio/test/test.h U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.bz2.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_lz4.c U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_xz.c U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.ustar.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_Z_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_owner_parse.c U src/external/bsd/libarchive/dist/cpio/test/test_option_version.c U src/external/bsd/libarchive/dist/cpio/test/test_option_xz.c U src/external/bsd/libarchive/dist/cpio/test/test_option_m.c U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.xz.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.lzma.uu U src/external/bsd/libarchive/dist/cpio/test/test_missing_file.c U src/external/bsd/libarchive/dist/cpio/test/test_option_lzop.c N src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.zst.uu U src/external/bsd/libarchive/dist/cpio/test/test_passthrough_reverse.c U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.lz.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.grz.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.lz4.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_t.stdout.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_lrz.c U src/external/bsd/libarchive/dist/cpio/test/test_option_passphrase.zip.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_y.c U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_Z.c U src/external/bsd/libarchive/dist/cpio/test/test_option_f.cpio.uu U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat.c U src/external/bsd/libarchive/dist/cpio/test/test_passthrough_dotdot.c N src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_zstd.c U src/external/bsd/libarchive/dist/cpio/test/test_option_lzma.c U src/external/bsd/libarchive/dist/cpio/test/test_option_passphrase.c U src/ext
CVS import: src/external/bsd/libarchive/dist
Module Name:src Committed By: joerg Date: Wed Jul 24 13:50:45 UTC 2019 Update of /cvsroot/src/external/bsd/libarchive/dist In directory ivanova.netbsd.org:/tmp/cvs-serv21805 Log Message: Import libarchive 3.4.0 Status: Vendor Tag: KIENTZLE Release Tags: libarchive-3-4-0 U src/external/bsd/libarchive/dist/COPYING U src/external/bsd/libarchive/dist/NEWS U src/external/bsd/libarchive/dist/README.md U src/external/bsd/libarchive/dist/cpio/cpio_windows.h U src/external/bsd/libarchive/dist/cpio/cpio.c U src/external/bsd/libarchive/dist/cpio/cpio_platform.h U src/external/bsd/libarchive/dist/cpio/bsdcpio.1 U src/external/bsd/libarchive/dist/cpio/cmdline.c U src/external/bsd/libarchive/dist/cpio/cpio.h U src/external/bsd/libarchive/dist/cpio/cpio_windows.c U src/external/bsd/libarchive/dist/cpio/test/test_option_b64encode.c U src/external/bsd/libarchive/dist/cpio/test/test_cmdline.c U src/external/bsd/libarchive/dist/cpio/test/test_basic.c U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.bin.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_help.c U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.lzo.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_d.c U src/external/bsd/libarchive/dist/cpio/test/test_format_newc.c N src/external/bsd/libarchive/dist/cpio/test/test_option_zstd.c U src/external/bsd/libarchive/dist/cpio/test/test_option_f.c U src/external/bsd/libarchive/dist/cpio/test/test_option_uuencode.c U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_lzma.c U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.newc.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_lzo.c U src/external/bsd/libarchive/dist/cpio/test/test_option_lz4.c U src/external/bsd/libarchive/dist/cpio/test/test_option_t.c U src/external/bsd/libarchive/dist/cpio/test/test_option_a.c U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.bin.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.lrz.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_grzip.c U src/external/bsd/libarchive/dist/cpio/test/test_option_0.c U src/external/bsd/libarchive/dist/cpio/test/test_option_u.c U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_gz.c U src/external/bsd/libarchive/dist/cpio/test/test_option_C_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_lrzip.c U src/external/bsd/libarchive/dist/cpio/test/test_option_c.c U src/external/bsd/libarchive/dist/cpio/test/test_option_J_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_option_l.c U src/external/bsd/libarchive/dist/cpio/test/test_option_z.c U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_bz2.c U src/external/bsd/libarchive/dist/cpio/test/test_0.c U src/external/bsd/libarchive/dist/cpio/test/test_option_B_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.gz.uu U src/external/bsd/libarchive/dist/cpio/test/test.h U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.bz2.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_lz4.c U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_xz.c U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat_ref.ustar.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_Z_upper.c U src/external/bsd/libarchive/dist/cpio/test/test_owner_parse.c U src/external/bsd/libarchive/dist/cpio/test/test_option_version.c U src/external/bsd/libarchive/dist/cpio/test/test_option_xz.c U src/external/bsd/libarchive/dist/cpio/test/test_option_m.c U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.xz.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.lzma.uu U src/external/bsd/libarchive/dist/cpio/test/test_missing_file.c U src/external/bsd/libarchive/dist/cpio/test/test_option_lzop.c N src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.zst.uu U src/external/bsd/libarchive/dist/cpio/test/test_passthrough_reverse.c U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.lz.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.grz.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract.cpio.lz4.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_t.stdout.uu U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_lrz.c U src/external/bsd/libarchive/dist/cpio/test/test_option_passphrase.zip.uu U src/external/bsd/libarchive/dist/cpio/test/test_option_y.c U src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_Z.c U src/external/bsd/libarchive/dist/cpio/test/test_option_f.cpio.uu U src/external/bsd/libarchive/dist/cpio/test/test_gcpio_compat.c U src/external/bsd/libarchive/dist/cpio/test/test_passthrough_dotdot.c N src/external/bsd/libarchive/dist/cpio/test/test_extract_cpio_zstd.c U src/external/bsd/libarchive/dist/cpio/test/test_option_lzma.c U src/external/bsd/libarchive/dist/cpio/test/test_option_passphrase.c U src/ext
CVS commit: src/sys/arch
Module Name:src Committed By: hkenken Date: Wed Jul 24 13:12:34 UTC 2019 Added Files: src/sys/arch/arm/imx: imx6_gpcreg.h src/sys/arch/arm/imx/fdt: files.imx6 if_enet_imx.c imx6_ahcisata.c imx6_clk.c imx6_com.c imx6_gpc.c imx6_gpio.c imx6_iomux.c imx6_pcie.c imx6_platform.c imx6_platform.h imx6_sdhc.c imx6_usb.c imx6_usbphy.c src/sys/arch/evbarm/conf: IMX files.imx mk.imx std.imx Log Message: Add support for device tree. + CCM (clk) + COM (uart) + GPIO + IOMUX (pin control) + PCIe + SDHC + USB Host + USB phy To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/imx/imx6_gpcreg.h cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/imx/fdt/files.imx6 \ src/sys/arch/arm/imx/fdt/if_enet_imx.c \ src/sys/arch/arm/imx/fdt/imx6_ahcisata.c \ src/sys/arch/arm/imx/fdt/imx6_clk.c src/sys/arch/arm/imx/fdt/imx6_com.c \ src/sys/arch/arm/imx/fdt/imx6_gpc.c src/sys/arch/arm/imx/fdt/imx6_gpio.c \ src/sys/arch/arm/imx/fdt/imx6_iomux.c \ src/sys/arch/arm/imx/fdt/imx6_pcie.c \ src/sys/arch/arm/imx/fdt/imx6_platform.c \ src/sys/arch/arm/imx/fdt/imx6_platform.h \ src/sys/arch/arm/imx/fdt/imx6_sdhc.c src/sys/arch/arm/imx/fdt/imx6_usb.c \ src/sys/arch/arm/imx/fdt/imx6_usbphy.c cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/IMX \ src/sys/arch/evbarm/conf/files.imx src/sys/arch/evbarm/conf/mk.imx \ src/sys/arch/evbarm/conf/std.imx Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch
Module Name:src Committed By: hkenken Date: Wed Jul 24 13:12:34 UTC 2019 Added Files: src/sys/arch/arm/imx: imx6_gpcreg.h src/sys/arch/arm/imx/fdt: files.imx6 if_enet_imx.c imx6_ahcisata.c imx6_clk.c imx6_com.c imx6_gpc.c imx6_gpio.c imx6_iomux.c imx6_pcie.c imx6_platform.c imx6_platform.h imx6_sdhc.c imx6_usb.c imx6_usbphy.c src/sys/arch/evbarm/conf: IMX files.imx mk.imx std.imx Log Message: Add support for device tree. + CCM (clk) + COM (uart) + GPIO + IOMUX (pin control) + PCIe + SDHC + USB Host + USB phy To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/imx/imx6_gpcreg.h cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/imx/fdt/files.imx6 \ src/sys/arch/arm/imx/fdt/if_enet_imx.c \ src/sys/arch/arm/imx/fdt/imx6_ahcisata.c \ src/sys/arch/arm/imx/fdt/imx6_clk.c src/sys/arch/arm/imx/fdt/imx6_com.c \ src/sys/arch/arm/imx/fdt/imx6_gpc.c src/sys/arch/arm/imx/fdt/imx6_gpio.c \ src/sys/arch/arm/imx/fdt/imx6_iomux.c \ src/sys/arch/arm/imx/fdt/imx6_pcie.c \ src/sys/arch/arm/imx/fdt/imx6_platform.c \ src/sys/arch/arm/imx/fdt/imx6_platform.h \ src/sys/arch/arm/imx/fdt/imx6_sdhc.c src/sys/arch/arm/imx/fdt/imx6_usb.c \ src/sys/arch/arm/imx/fdt/imx6_usbphy.c cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/IMX \ src/sys/arch/evbarm/conf/files.imx src/sys/arch/evbarm/conf/mk.imx \ src/sys/arch/evbarm/conf/std.imx Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/arm/imx/imx6_gpcreg.h diff -u /dev/null src/sys/arch/arm/imx/imx6_gpcreg.h:1.1 --- /dev/null Wed Jul 24 13:12:34 2019 +++ src/sys/arch/arm/imx/imx6_gpcreg.h Wed Jul 24 13:12:33 2019 @@ -0,0 +1,41 @@ +/* $NetBSD: imx6_gpcreg.h,v 1.1 2019/07/24 13:12:33 hkenken Exp $ */ +/*- + * Copyright (c) 2019 Genetec Corporation. All rights reserved. + * Written by Hashimoto Kenichi for Genetec Corporation. + * + * 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. + */ +#ifndef _ARM_IMX_IMX6_GPCREG_H_ +#define _ARM_IMX_IMX6_GPCREG_H_ + +#define GPC_CNTR 0x +#define GPC_PGR 0x0004 +#define GPC_IMR1 0x0008 +#define GPC_IMR2 0x000C +#define GPC_IMR3 0x0010 +#define GPC_IMR4 0x0014 +#define GPC_ISR1 0x0018 +#define GPC_ISR2 0x001C +#define GPC_ISR3 0x0020 +#define GPC_ISR4 0x0024 + +#endif /* _ARM_IMX_IMX6_GPCREG_H_ */ Index: src/sys/arch/arm/imx/fdt/files.imx6 diff -u /dev/null src/sys/arch/arm/imx/fdt/files.imx6:1.1 --- /dev/null Wed Jul 24 13:12:34 2019 +++ src/sys/arch/arm/imx/fdt/files.imx6 Wed Jul 24 13:12:33 2019 @@ -0,0 +1,80 @@ +# $NetBSD: files.imx6,v 1.1 2019/07/24 13:12:33 hkenken Exp $ +# +# Configuration info for the Freescale i.MX6 +# + +file arch/arm/arm32/arm32_boot.c +file arch/arm/arm32/arm32_kvminit.c +file arch/arm/arm32/arm32_reboot.c +file arch/arm/arm32/irq_dispatch.S +file arch/arm/arm32/armv7_generic_space.c +file arch/arm/arm/arm_generic_dma.c +file arch/arm/arm/bus_space_a4x.S + +file arch/arm/imx/fdt/imx6_platform.c soc_imx + +# SOC parameters +defflag opt_soc.h SOC_IMX +defflag opt_soc.h SOC_IMX6QDL: SOC_IMX + +# Clock +device imxccm : clk +attach imxccm at fdt +file arch/arm/imx/imx6_ccm.c imxccm +file arch/arm/imx/fdt/imx6_clk.c imxccm + +# GPC +device imxgpc +attach imxgpc at fdt +file arch/arm/imx/fdt/imx6_gpc.c imxgpc + +# IOMUX +device imxiomux +attach imxiomux at fdt +file arch/arm/imx/fdt/imx6_iomux.c imxiomux + +# GPIO controller +device imxgpio: gpiobus +attach imxgpio at fdt +file arch/arm/imx/imxgpio.c imxgpio +file arch/arm/imx/fdt/imx6_gpio.c imxgpio + +# UART +device imxuart { } : bus_space_generic +attach imxuart at fdt with imx6_com +file arch/arm/imx/i
CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: hkenken Date: Wed Jul 24 12:35:26 UTC 2019 Modified Files: src/sys/arch/arm/imx: imxclock.c Log Message: No functional change. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/imx/imxclock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: hkenken Date: Wed Jul 24 12:35:26 UTC 2019 Modified Files: src/sys/arch/arm/imx: imxclock.c Log Message: No functional change. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/imx/imxclock.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/imx/imxclock.c diff -u src/sys/arch/arm/imx/imxclock.c:1.7 src/sys/arch/arm/imx/imxclock.c:1.8 --- src/sys/arch/arm/imx/imxclock.c:1.7 Fri Jul 25 07:49:56 2014 +++ src/sys/arch/arm/imx/imxclock.c Wed Jul 24 12:35:26 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imxclock.c,v 1.7 2014/07/25 07:49:56 hkenken Exp $ */ +/* $NetBSD: imxclock.c,v 1.8 2019/07/24 12:35:26 hkenken Exp $ */ /* * Copyright (c) 2009, 2010 Genetec corp. All rights reserved. * Written by Hashimoto Kenichi for Genetec corp. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imxclock.c,v 1.7 2014/07/25 07:49:56 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imxclock.c,v 1.8 2019/07/24 12:35:26 hkenken Exp $"); #include "opt_imx.h" @@ -111,7 +111,7 @@ cpu_initclocks(void) bus_space_write_4(imxclock->sc_iot, imxclock->sc_ioh, EPIT_EPITCR, reg); - epit1_sc->sc_ih = intr_establish(imxclock->sc_intr, IPL_CLOCK, + imxclock->sc_ih = intr_establish(imxclock->sc_intr, IPL_CLOCK, IST_LEVEL, imxclock_intr, NULL); }
CVS commit: src/sys/arch
Module Name:src Committed By: hkenken Date: Wed Jul 24 12:33:19 UTC 2019 Modified Files: src/sys/arch/arm/imx: files.imx51 files.imx6 files.imx7 imx51_gpio.c imx51var.h imx6_gpio.c imx6_pcie.c imx6_usdhc.c imx7_gpio.c imx7_usdhc.c imxgpio.c imxgpiovar.h src/sys/arch/evbarm/conf: ARMADILLO-IOT-G3 CUBOX-I HUMMINGBOARD IMX6UL-STARTER KOBO NETWALKER NITROGEN6X mk.nitrogen6 std.nitrogen6 src/sys/arch/evbarm/imx7: imx7_ioconfig.c src/sys/arch/evbarm/kobo: kobo_machdep.c src/sys/arch/evbarm/netwalker: netwalker_lcd.c netwalker_machdep.c netwalker_spi.c netwalker_usb.c src/sys/arch/evbarm/nitrogen6: nitrogen6_iomux.c Added Files: src/sys/arch/arm/imx: imxpcie.c imxpciereg.h imxpcievar.h Log Message: Modified i.MX GPIO control module and PCIe module. + Add imxpcie.c imx PCIe common driver To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/imx/files.imx51 cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/imx/files.imx6 cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/imx/files.imx7 \ src/sys/arch/arm/imx/imx51var.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/imx/imx51_gpio.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/imx6_gpio.c \ src/sys/arch/arm/imx/imx7_usdhc.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/imx/imx6_pcie.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/imx/imx6_usdhc.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/imx7_gpio.c \ src/sys/arch/arm/imx/imxgpiovar.h cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/imx/imxgpio.c cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/imx/imxpcie.c \ src/sys/arch/arm/imx/imxpciereg.h src/sys/arch/arm/imx/imxpcievar.h cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3 cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/conf/CUBOX-I cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/HUMMINGBOARD cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/IMX6UL-STARTER cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/conf/KOBO cvs rdiff -u -r1.37 -r1.38 src/sys/arch/evbarm/conf/NETWALKER cvs rdiff -u -r1.22 -r1.23 src/sys/arch/evbarm/conf/NITROGEN6X cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/mk.nitrogen6 cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/std.nitrogen6 cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/imx7/imx7_ioconfig.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/kobo/kobo_machdep.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/netwalker/netwalker_lcd.c \ src/sys/arch/evbarm/netwalker/netwalker_usb.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbarm/netwalker/netwalker_machdep.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/netwalker/netwalker_spi.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/nitrogen6/nitrogen6_iomux.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch
Module Name:src Committed By: hkenken Date: Wed Jul 24 12:33:19 UTC 2019 Modified Files: src/sys/arch/arm/imx: files.imx51 files.imx6 files.imx7 imx51_gpio.c imx51var.h imx6_gpio.c imx6_pcie.c imx6_usdhc.c imx7_gpio.c imx7_usdhc.c imxgpio.c imxgpiovar.h src/sys/arch/evbarm/conf: ARMADILLO-IOT-G3 CUBOX-I HUMMINGBOARD IMX6UL-STARTER KOBO NETWALKER NITROGEN6X mk.nitrogen6 std.nitrogen6 src/sys/arch/evbarm/imx7: imx7_ioconfig.c src/sys/arch/evbarm/kobo: kobo_machdep.c src/sys/arch/evbarm/netwalker: netwalker_lcd.c netwalker_machdep.c netwalker_spi.c netwalker_usb.c src/sys/arch/evbarm/nitrogen6: nitrogen6_iomux.c Added Files: src/sys/arch/arm/imx: imxpcie.c imxpciereg.h imxpcievar.h Log Message: Modified i.MX GPIO control module and PCIe module. + Add imxpcie.c imx PCIe common driver To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/imx/files.imx51 cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/imx/files.imx6 cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/imx/files.imx7 \ src/sys/arch/arm/imx/imx51var.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/imx/imx51_gpio.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/imx6_gpio.c \ src/sys/arch/arm/imx/imx7_usdhc.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/imx/imx6_pcie.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/imx/imx6_usdhc.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/imx7_gpio.c \ src/sys/arch/arm/imx/imxgpiovar.h cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/imx/imxgpio.c cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/imx/imxpcie.c \ src/sys/arch/arm/imx/imxpciereg.h src/sys/arch/arm/imx/imxpcievar.h cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3 cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/conf/CUBOX-I cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/HUMMINGBOARD cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/IMX6UL-STARTER cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/conf/KOBO cvs rdiff -u -r1.37 -r1.38 src/sys/arch/evbarm/conf/NETWALKER cvs rdiff -u -r1.22 -r1.23 src/sys/arch/evbarm/conf/NITROGEN6X cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/mk.nitrogen6 cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/std.nitrogen6 cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/imx7/imx7_ioconfig.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/kobo/kobo_machdep.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/netwalker/netwalker_lcd.c \ src/sys/arch/evbarm/netwalker/netwalker_usb.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbarm/netwalker/netwalker_machdep.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/netwalker/netwalker_spi.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/nitrogen6/nitrogen6_iomux.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/imx/files.imx51 diff -u src/sys/arch/arm/imx/files.imx51:1.18 src/sys/arch/arm/imx/files.imx51:1.19 --- src/sys/arch/arm/imx/files.imx51:1.18 Sat Mar 17 18:34:09 2018 +++ src/sys/arch/arm/imx/files.imx51 Wed Jul 24 12:33:18 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.imx51,v 1.18 2018/03/17 18:34:09 ryo Exp $ +# $NetBSD: files.imx51,v 1.19 2019/07/24 12:33:18 hkenken Exp $ # # Configuration info for the Freescale i.MX5x # @@ -62,9 +62,8 @@ file arch/arm/imx/imxwdog.c imxwdog # iMX GPIO device imxgpio: gpiobus attach imxgpio at axi -file arch/arm/imx/imxgpio.c imxgpio needs-flag +file arch/arm/imx/imxgpio.c imxgpio file arch/arm/imx/imx51_gpio.c imxgpio -defflag opt_imxgpio.h IMX_GPIO_INTR_SPLIT # iMX IOMUX device imxiomux : bus_space_generic Index: src/sys/arch/arm/imx/files.imx6 diff -u src/sys/arch/arm/imx/files.imx6:1.16 src/sys/arch/arm/imx/files.imx6:1.17 --- src/sys/arch/arm/imx/files.imx6:1.16 Wed Jul 24 11:58:00 2019 +++ src/sys/arch/arm/imx/files.imx6 Wed Jul 24 12:33:18 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.imx6,v 1.16 2019/07/24 11:58:00 hkenken Exp $ +# $NetBSD: files.imx6,v 1.17 2019/07/24 12:33:18 hkenken Exp $ # # Configuration info for the Freescale i.MX6 # @@ -28,8 +28,9 @@ file arch/arm/imx/imx6_axi.c axi # iMX6 PCIe device imxpcie: pcibus -attach imxpcie at axi -file arch/arm/imx/imx6_pcie.c imxpcie +attach imxpcie at axi with imx6_pcie +file arch/arm/imx/imxpcie.c imxpcie +file arch/arm/imx/imx6_pcie.c imx6_pcie # iMX6 Clock Control Module device imxccm : clk @@ -62,9 +63,8 @@ file arch/arm/imx/imxwdog.c imxwdog # iMX GPIO device imxgpio: gpiobus attach imxgpio at axi -file arch/arm/imx/imxgpio.c imxgpio needs-flag +file arch/arm/imx/imxgpio.c imxgpio file arch/arm/imx/imx6_gpio.c imxgpio -defflag opt_imxgpio.hIMX_GPIO_INTR_SPLIT # iMX6 IOMUX device imxiomux Index: src/sys/arch/arm/imx/files.imx7 diff -u src/sys/arch/arm/imx/files.imx7:1.6 src/sys/arch/arm/imx/files.imx7:1.7 --- src/sys/arch/arm/imx/files.imx7:1.6 Sat Mar 17 18:34:09 2018 +++ src/sys/arch/arm/imx/files.
CVS commit: src/sys/external/bsd/libnv/dist
Module Name:src Committed By: sevan Date: Wed Jul 24 12:13:13 UTC 2019 Modified Files: src/sys/external/bsd/libnv/dist: nvpair.c Log Message: off by 1 To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/libnv/dist/nvpair.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/external/bsd/libnv/dist/nvpair.c diff -u src/sys/external/bsd/libnv/dist/nvpair.c:1.9 src/sys/external/bsd/libnv/dist/nvpair.c:1.10 --- src/sys/external/bsd/libnv/dist/nvpair.c:1.9 Wed Jul 24 11:34:55 2019 +++ src/sys/external/bsd/libnv/dist/nvpair.c Wed Jul 24 12:13:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvpair.c,v 1.9 2019/07/24 11:34:55 sevan Exp $ */ +/* $NetBSD: nvpair.c,v 1.10 2019/07/24 12:13:13 sevan Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -36,7 +36,7 @@ #ifdef __FreeBSD__ __FBSDID("$FreeBSD: head/sys/contrib/libnv/nvpair.c 335382 2018-06-19 18:43:02Z lwhsu $"); #else -__RCSID("$NetBSD: nvpair.c,v 1.9 2019/07/24 11:34:55 sevan Exp $"); +__RCSID("$NetBSD: nvpair.c,v 1.10 2019/07/24 12:13:13 sevan Exp $"); #endif #include @@ -1217,7 +1217,7 @@ nvpair_create_stringv(const char *name, if (len < 0) return (NULL); nvp = nvpair_create_string(name, str); - kmem_free(str, len); + kmem_free(str, len+1); return (nvp); } #endif
CVS commit: src/sys/external/bsd/libnv/dist
Module Name:src Committed By: sevan Date: Wed Jul 24 12:13:13 UTC 2019 Modified Files: src/sys/external/bsd/libnv/dist: nvpair.c Log Message: off by 1 To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/libnv/dist/nvpair.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: hkenken Date: Wed Jul 24 11:58:00 UTC 2019 Modified Files: src/sys/arch/arm/imx: files.imx6 imx6_board.c imx6_ccm.c imx6_ccmreg.h imx6_ccmvar.h imx6_reg.h Added Files: src/sys/arch/arm/imx: imx6_clk.c Log Message: Modified imx6 Clock Controller Module (CCM). + Add imx6_get_clock_by_id(). To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/imx/files.imx6 cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/imx/imx6_board.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/imx/imx6_ccm.c \ src/sys/arch/arm/imx/imx6_ccmreg.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/imx/imx6_ccmvar.h cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/imx/imx6_clk.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/imx/imx6_reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: hkenken Date: Wed Jul 24 11:58:00 UTC 2019 Modified Files: src/sys/arch/arm/imx: files.imx6 imx6_board.c imx6_ccm.c imx6_ccmreg.h imx6_ccmvar.h imx6_reg.h Added Files: src/sys/arch/arm/imx: imx6_clk.c Log Message: Modified imx6 Clock Controller Module (CCM). + Add imx6_get_clock_by_id(). To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/imx/files.imx6 cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/imx/imx6_board.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/imx/imx6_ccm.c \ src/sys/arch/arm/imx/imx6_ccmreg.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/imx/imx6_ccmvar.h cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/imx/imx6_clk.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/imx/imx6_reg.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/imx/files.imx6 diff -u src/sys/arch/arm/imx/files.imx6:1.15 src/sys/arch/arm/imx/files.imx6:1.16 --- src/sys/arch/arm/imx/files.imx6:1.15 Thu Jun 20 08:16:19 2019 +++ src/sys/arch/arm/imx/files.imx6 Wed Jul 24 11:58:00 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.imx6,v 1.15 2019/06/20 08:16:19 hkenken Exp $ +# $NetBSD: files.imx6,v 1.16 2019/07/24 11:58:00 hkenken Exp $ # # Configuration info for the Freescale i.MX6 # @@ -34,8 +34,8 @@ file arch/arm/imx/imx6_pcie.c imxpcie # iMX6 Clock Control Module device imxccm : clk attach imxccm at axi -file arch/arm/imx/imx6_ccm.c imxccm needs-flag -defflag opt_imx6clk.hIMXCCMDEBUG +file arch/arm/imx/imx6_ccm.c imxccm needs-flag +file arch/arm/imx/imx6_clk.c imxccm defparam opt_imx6clk.hIMX6_OSC_FREQ defparam opt_imx6clk.hIMX6_CKIL_FREQ defparam opt_imx6clk.hIMX6_CKIH_FREQ Index: src/sys/arch/arm/imx/imx6_board.c diff -u src/sys/arch/arm/imx/imx6_board.c:1.12 src/sys/arch/arm/imx/imx6_board.c:1.13 --- src/sys/arch/arm/imx/imx6_board.c:1.12 Thu Oct 18 09:01:52 2018 +++ src/sys/arch/arm/imx/imx6_board.c Wed Jul 24 11:58:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_board.c,v 1.12 2018/10/18 09:01:52 skrll Exp $ */ +/* $NetBSD: imx6_board.c,v 1.13 2019/07/24 11:58:00 hkenken Exp $ */ /* * Copyright (c) 2012 Genetec Corporation. All rights reserved. @@ -27,12 +27,14 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: imx6_board.c,v 1.12 2018/10/18 09:01:52 skrll Exp $"); +__KERNEL_RCSID(1, "$NetBSD: imx6_board.c,v 1.13 2019/07/24 11:58:00 hkenken Exp $"); #include "arml2cc.h" #include "opt_cputypes.h" #include "opt_imx.h" +#define _INTR_PRIVATE + #include #include #include @@ -189,7 +191,7 @@ imx6_armrootclk(void) uint32_t v; v = bus_space_read_4(imx6_ioreg_bst, imx6_ioreg_bsh, - AIPS1_CCM_ANALOG_BASE + CCM_ANALOG_PLL_ARM); + AIPS1_CCM_BASE + CCM_ANALOG_BASE + CCM_ANALOG_PLL_ARM); clk = IMX6_OSC_FREQ * (v & CCM_ANALOG_PLL_ARM_DIV_SELECT) / 2; v = bus_space_read_4(imx6_ioreg_bst, imx6_ioreg_bsh, AIPS1_CCM_BASE + CCM_CACRR); Index: src/sys/arch/arm/imx/imx6_ccm.c diff -u src/sys/arch/arm/imx/imx6_ccm.c:1.10 src/sys/arch/arm/imx/imx6_ccm.c:1.11 --- src/sys/arch/arm/imx/imx6_ccm.c:1.10 Thu Jun 20 08:16:19 2019 +++ src/sys/arch/arm/imx/imx6_ccm.c Wed Jul 24 11:58:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_ccm.c,v 1.10 2019/06/20 08:16:19 hkenken Exp $ */ +/* $NetBSD: imx6_ccm.c,v 1.11 2019/07/24 11:58:00 hkenken Exp $ */ /* * Copyright (c) 2010-2012, 2014 Genetec Corporation. All rights reserved. @@ -30,10 +30,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imx6_ccm.c,v 1.10 2019/06/20 08:16:19 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_ccm.c,v 1.11 2019/07/24 11:58:00 hkenken Exp $"); #include "opt_imx.h" -#include "opt_imx6clk.h" #include "opt_cputypes.h" #include "locators.h" @@ -48,9 +47,6 @@ __KERNEL_RCSID(0, "$NetBSD: imx6_ccm.c,v #include #include -#ifdef CPU_CORTEXA9 -#include -#endif #include #include @@ -60,15 +56,6 @@ __KERNEL_RCSID(0, "$NetBSD: imx6_ccm.c,v #include -struct imxccm_softc { - device_t sc_dev; - bus_space_tag_t sc_iot; - bus_space_handle_t sc_ioh; - bus_space_handle_t sc_ioh_analog; - - struct clk_domain sc_clkdom; -}; - /* Clock Parents Tables */ static const char *step_p[] = { "osc", @@ -369,6 +356,275 @@ static const char *lvds_p[] = { "sata_ref_100m" }; +/* DT clock ID to clock name mappings */ +static struct imx_clock_id { + u_int id; + const char *name; +} imx6_clock_ids[] = { + { IMX6CLK_DUMMY, "dummy" }, + { IMX6CLK_CKIL, "ckil" }, + { IMX6CLK_CKIH, "ckih" }, + { IMX6CLK_OSC, "osc" }, + { IMX6CLK_PLL2_PFD0_352M, "pll2_pfd0_352m" }, + { IMX6CLK_PLL2_PFD1_594M, "pll2_pfd1_594m" }, + { IMX6CLK_PLL2_PFD2_396M, "pll2_pfd2_396m" }, + { IMX6CLK_PLL3_PFD0_720M, "pll3_pfd0_720m" }, + { IMX6CLK_PLL3_PFD1_540M, "pll3_pfd1_540m" }, + { IMX6CLK_PLL3_PFD2_508M, "pll3_pfd2_508m" }, + { IMX6CLK_PLL3_PFD3_454M, "pll3_pfd3_454m" }, + { IMX6CLK_PLL2_198M, "pll2_198m" }, + { IMX6CLK_PLL3_120M, "pll3_120
Re: CVS commit: src
Thanks for the comments. I've moved it back. Thomas
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: jmcneill Date: Wed Jul 24 11:40:37 UTC 2019 Modified Files: src/sys/stand/efiboot: efifdt.c efifdt.h exec.c version Log Message: Add support for simple framebuffers when booting in ACPI mode. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/stand/efiboot/efifdt.c cvs rdiff -u -r1.5 -r1.6 src/sys/stand/efiboot/efifdt.h cvs rdiff -u -r1.10 -r1.11 src/sys/stand/efiboot/exec.c \ src/sys/stand/efiboot/version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/stand/efiboot/efifdt.c diff -u src/sys/stand/efiboot/efifdt.c:1.15 src/sys/stand/efiboot/efifdt.c:1.16 --- src/sys/stand/efiboot/efifdt.c:1.15 Sun Apr 21 22:30:41 2019 +++ src/sys/stand/efiboot/efifdt.c Wed Jul 24 11:40:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: efifdt.c,v 1.15 2019/04/21 22:30:41 thorpej Exp $ */ +/* $NetBSD: efifdt.c,v 1.16 2019/07/24 11:40:36 jmcneill Exp $ */ /*- * Copyright (c) 2019 Jason R. Thorpe @@ -185,7 +185,7 @@ efi_fdt_memory_map(void) EFI_MEMORY_DESCRIPTOR *md, *memmap; UINT32 descver; UINT64 phys_start, phys_size; - int n, memory; + int n, memory, chosen; memory = fdt_path_offset(fdt_data, FDT_MEMORY_NODE_PATH); if (memory < 0) @@ -193,6 +193,12 @@ efi_fdt_memory_map(void) if (memory < 0) panic("FDT: Failed to create " FDT_MEMORY_NODE_PATH " node"); + chosen = fdt_path_offset(fdt_data, FDT_CHOSEN_NODE_PATH); + if (chosen < 0) + chosen = fdt_add_subnode(fdt_data, fdt_path_offset(fdt_data, "/"), FDT_CHOSEN_NODE_NAME); + if (chosen < 0) + panic("FDT: Failed to create " FDT_CHOSEN_NODE_PATH " node"); + fdt_delprop(fdt_data, memory, "reg"); const int address_cells = fdt_address_cells(fdt_data, fdt_path_offset(fdt_data, "/")); @@ -202,6 +208,12 @@ efi_fdt_memory_map(void) for (n = 0, md = memmap; n < nentries; n++, md = NextMemoryDescriptor(md, descsize)) { if ((md->Attribute & EFI_MEMORY_RUNTIME) != 0) continue; + + fdt_appendprop_u32(fdt_data, chosen, "netbsd,uefi-memory-map", md->Type); + fdt_appendprop_u64(fdt_data, chosen, "netbsd,uefi-memory-map", md->PhysicalStart); + fdt_appendprop_u64(fdt_data, chosen, "netbsd,uefi-memory-map", md->NumberOfPages); + fdt_appendprop_u64(fdt_data, chosen, "netbsd,uefi-memory-map", md->Attribute); + if ((md->Attribute & EFI_MEMORY_WB) == 0) continue; if (!FDT_MEMORY_USABLE(md)) @@ -239,6 +251,70 @@ efi_fdt_memory_map(void) } void +efi_fdt_gop(void) +{ + EFI_STATUS status; + EFI_GRAPHICS_OUTPUT_PROTOCOL *gop; + EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *mode; + EFI_HANDLE *gop_handle; + UINTN ngop_handle, n; + char buf[48]; + int fb; + + status = LibLocateHandle(ByProtocol, &GraphicsOutputProtocol, NULL, &ngop_handle, &gop_handle); + if (EFI_ERROR(status) || ngop_handle == 0) + return; + + for (n = 0; n < ngop_handle; n++) { + status = uefi_call_wrapper(BS->HandleProtocol, 3, gop_handle[n], &GraphicsOutputProtocol, (void **)&gop); + if (EFI_ERROR(status)) + continue; + + mode = gop->Mode; + if (mode == NULL) + continue; + +#ifdef EFIBOOT_DEBUG + printf("GOP: FB @ 0x%lx size 0x%lx\n", mode->FrameBufferBase, mode->FrameBufferSize); + printf("GOP: Version %d\n", mode->Info->Version); + printf("GOP: HRes %d VRes %d\n", mode->Info->HorizontalResolution, mode->Info->VerticalResolution); + printf("GOP: PixelFormat %d\n", mode->Info->PixelFormat); + printf("GOP: PixelBitmask R 0x%x G 0x%x B 0x%x Res 0x%x\n", + mode->Info->PixelInformation.RedMask, + mode->Info->PixelInformation.GreenMask, + mode->Info->PixelInformation.BlueMask, + mode->Info->PixelInformation.ReservedMask); + printf("GOP: Pixels per scanline %d\n", mode->Info->PixelsPerScanLine); +#endif + + if (mode->Info->PixelFormat == PixelBltOnly) { + printf("GOP: PixelBltOnly pixel format not supported\n"); + continue; + } + + snprintf(buf, sizeof(buf), "framebuffer@%lx", mode->FrameBufferBase); + fb = fdt_add_subnode(fdt_data, fdt_path_offset(fdt_data, "/chosen"), buf); + if (fb < 0) + panic("FDT: Failed to create framebuffer node"); + + fdt_appendprop_string(fdt_data, fb, "compatible", "simple-framebuffer"); + fdt_appendprop_string(fdt_data, fb, "status", "okay"); + fdt_appendprop_u64(fdt_data, fb, "reg", mode->FrameBufferBase); + fdt_appendprop_u64(fdt_data, fb, "reg", mode->FrameBufferSize); + fdt_appendprop_u32(fdt_data, fb, "width", mode->Info->HorizontalResolution); + fdt_appendprop_u32(fdt_data, fb, "height", mode->Info->VerticalResolution); + fdt_appendprop_u32(fdt_data, fb, "stride", mode->Info->PixelsPerScanLine * 4); /* XXX */ + fdt_appendprop_string(fdt_data, fb, "format", "a8b8g8r8"); + + snprintf(buf, sizeof(buf), "/chosen/framebuffer@%lx", mode->FrameBufferBase); + fdt_setprop_string(fdt_data, fdt_path_offset(fdt_data, FDT_CHOSEN_NODE_PATH), + "stdout-path", buf); + + return; + } +} + +void efi_fdt_bootargs(const char *bootargs) { struct efi_block_
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: jmcneill Date: Wed Jul 24 11:40:37 UTC 2019 Modified Files: src/sys/stand/efiboot: efifdt.c efifdt.h exec.c version Log Message: Add support for simple framebuffers when booting in ACPI mode. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/stand/efiboot/efifdt.c cvs rdiff -u -r1.5 -r1.6 src/sys/stand/efiboot/efifdt.h cvs rdiff -u -r1.10 -r1.11 src/sys/stand/efiboot/exec.c \ src/sys/stand/efiboot/version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/libnv/dist
Module Name:src Committed By: sevan Date: Wed Jul 24 11:34:55 UTC 2019 Modified Files: src/sys/external/bsd/libnv/dist: nvpair.c Log Message: need sys/kmem.h for kmem_free() To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/libnv/dist/nvpair.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/external/bsd/libnv/dist/nvpair.c diff -u src/sys/external/bsd/libnv/dist/nvpair.c:1.8 src/sys/external/bsd/libnv/dist/nvpair.c:1.9 --- src/sys/external/bsd/libnv/dist/nvpair.c:1.8 Wed Jul 24 11:12:30 2019 +++ src/sys/external/bsd/libnv/dist/nvpair.c Wed Jul 24 11:34:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvpair.c,v 1.8 2019/07/24 11:12:30 martin Exp $ */ +/* $NetBSD: nvpair.c,v 1.9 2019/07/24 11:34:55 sevan Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -36,7 +36,7 @@ #ifdef __FreeBSD__ __FBSDID("$FreeBSD: head/sys/contrib/libnv/nvpair.c 335382 2018-06-19 18:43:02Z lwhsu $"); #else -__RCSID("$NetBSD: nvpair.c,v 1.8 2019/07/24 11:12:30 martin Exp $"); +__RCSID("$NetBSD: nvpair.c,v 1.9 2019/07/24 11:34:55 sevan Exp $"); #endif #include @@ -49,6 +49,7 @@ __RCSID("$NetBSD: nvpair.c,v 1.8 2019/07 #include #include #include +#include #ifdef __FreeBSD__ #include
CVS commit: src/sys/external/bsd/libnv/dist
Module Name:src Committed By: sevan Date: Wed Jul 24 11:34:55 UTC 2019 Modified Files: src/sys/external/bsd/libnv/dist: nvpair.c Log Message: need sys/kmem.h for kmem_free() To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/libnv/dist/nvpair.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch
Module Name:src Committed By: hkenken Date: Wed Jul 24 11:20:55 UTC 2019 Modified Files: src/sys/arch/arm/imx: imx23_usb.c imx51_usb.c imx6_reg.h imx6_usb.c imx6_usbreg.h imx7_usb.c imx7_usbreg.h imxusb.c imxusbvar.h src/sys/arch/evbarm/kobo: kobo_usb.c src/sys/arch/evbarm/netwalker: netwalker_usb.c src/sys/arch/evbarm/nitrogen6: nitrogen6_usb.c Log Message: i.MX USB host code re-arrangement. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/imx23_usb.c \ src/sys/arch/arm/imx/imx6_usbreg.h src/sys/arch/arm/imx/imx7_usbreg.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/imx/imx51_usb.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/imx/imx6_reg.h cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/imx/imx6_usb.c \ src/sys/arch/arm/imx/imxusbvar.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/imx/imx7_usb.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/imx/imxusb.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/kobo/kobo_usb.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/netwalker/netwalker_usb.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/nitrogen6/nitrogen6_usb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.