CVS commit: src/sys/dev/sdmmc

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:00:14 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdhc.c

Log Message:
Skip setting power when the voltage doesn't change.
Also increase some timeouts.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/sdmmc/sdhc.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/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.104 src/sys/dev/sdmmc/sdhc.c:1.105
--- src/sys/dev/sdmmc/sdhc.c:1.104	Wed Oct 23 05:20:52 2019
+++ src/sys/dev/sdmmc/sdhc.c	Mon Oct 28 06:00:14 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.104 2019/10/23 05:20:52 hkenken Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.105 2019/10/28 06:00:14 mlelstv Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.104 2019/10/23 05:20:52 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.105 2019/10/28 06:00:14 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -98,6 +98,8 @@ struct sdhc_host {
 	bus_dmamap_t		adma_map;
 	bus_dma_segment_t	adma_segs[1];
 	void			*adma2;
+
+	uint8_t			vdd;	/* last vdd setting */
 };
 
 #define HDEVNAME(hp)	(device_xname((hp)->sc->sc_dev))
@@ -156,10 +158,16 @@ hwrite2(struct sdhc_host *hp, bus_size_t
 	}
 }
 
+static void
+hwrite4(struct sdhc_host *hp, bus_size_t o, uint32_t val)
+{
+
+	bus_space_write_4(hp->iot, hp->ioh, o, val);
+}
+
 #define HWRITE1(hp, reg, val)		hwrite1(hp, reg, val)
 #define HWRITE2(hp, reg, val)		hwrite2(hp, reg, val)
-#define HWRITE4(hp, reg, val)		\
-	bus_space_write_4((hp)->iot, (hp)->ioh, (reg), (val))
+#define HWRITE4(hp, reg, val)		hwrite4(hp, reg, val)
 
 #define HCLR1(hp, reg, bits)		\
 	do if (bits) HWRITE1((hp), (reg), HREAD1((hp), (reg)) & ~(bits)); while (0)
@@ -788,6 +796,9 @@ sdhc_host_reset1(sdmmc_chipset_handle_t 
 		HWRITE2(hp, SDHC_NINTR_SIGNAL_EN, 0);
 	}
 
+	/* Let sdhc_bus_power restore power */
+	hp->vdd = 0;
+
 	/*
 	 * Reset the entire host controller and wait up to 100ms for
 	 * the controller to clear the reset bit.
@@ -902,6 +913,7 @@ sdhc_bus_power(sdmmc_chipset_handle_t sc
 	int error = 0;
 	const uint32_t pcmask =
 	~(SDHC_BUS_POWER | (SDHC_VOLTAGE_MASK << SDHC_VOLTAGE_SHIFT));
+	uint32_t reg;
 
 	mutex_enter(>intr_lock);
 
@@ -909,8 +921,10 @@ sdhc_bus_power(sdmmc_chipset_handle_t sc
 	 * Disable bus power before voltage change.
 	 */
 	if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_32BIT_ACCESS)
-	&& !ISSET(hp->sc->sc_flags, SDHC_FLAG_NO_PWR0))
+	&& !ISSET(hp->sc->sc_flags, SDHC_FLAG_NO_PWR0)) {
+		hp->vdd = 0;
 		HWRITE1(hp, SDHC_POWER_CTL, 0);
+	}
 
 	/* If power is disabled, reset the host and return now. */
 	if (ocr == 0) {
@@ -935,6 +949,12 @@ sdhc_bus_power(sdmmc_chipset_handle_t sc
 		goto out;
 	}
 
+	/*
+	 * Did voltage change ?
+	 */
+	if (vdd == hp->vdd)
+		goto out;
+
 	if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED)) {
 		/*
 		 * Enable bus power.  Wait at least 1 ms (or 74 clocks) plus
@@ -945,13 +965,14 @@ sdhc_bus_power(sdmmc_chipset_handle_t sc
 			HWRITE1(hp, SDHC_POWER_CTL,
 			(vdd << SDHC_VOLTAGE_SHIFT) | SDHC_BUS_POWER);
 		} else {
-			HWRITE1(hp, SDHC_POWER_CTL,
-			HREAD1(hp, SDHC_POWER_CTL) & pcmask);
+			reg = HREAD1(hp, SDHC_POWER_CTL) & pcmask;
+			HWRITE1(hp, SDHC_POWER_CTL, reg);
 			sdmmc_delay(1);
-			HWRITE1(hp, SDHC_POWER_CTL,
-			(vdd << SDHC_VOLTAGE_SHIFT));
+			reg |= (vdd << SDHC_VOLTAGE_SHIFT);
+			HWRITE1(hp, SDHC_POWER_CTL, reg);
 			sdmmc_delay(1);
-			HSET1(hp, SDHC_POWER_CTL, SDHC_BUS_POWER);
+			reg |= SDHC_BUS_POWER;
+			HWRITE1(hp, SDHC_POWER_CTL, reg);
 			sdmmc_delay(1);
 		}
 
@@ -966,6 +987,9 @@ sdhc_bus_power(sdmmc_chipset_handle_t sc
 		}
 	}
 
+	/* power successfully changed */
+	hp->vdd = vdd;
+
 out:
 	mutex_exit(>intr_lock);
 
@@ -1522,7 +1546,7 @@ sdhc_wait_state(struct sdhc_host *hp, ui
 	uint32_t state;
 	int timeout;
 
-	for (timeout = 1; timeout > 0; timeout--) {
+	for (timeout = 10; timeout > 0; timeout--) {
 		if (((state = HREAD4(hp, SDHC_PRESENT_STATE)) & mask) == value)
 			return 0;
 		sdmmc_delay(10);
@@ -1587,7 +1611,7 @@ sdhc_exec_command(sdmmc_chipset_handle_t
 	 * is marked done for any other reason.
 	 */
 	probing = (cmd->c_flags & SCF_TOUT_OK) != 0;
-	if (!sdhc_wait_intr(hp, SDHC_COMMAND_COMPLETE, SDHC_COMMAND_TIMEOUT, probing)) {
+	if (!sdhc_wait_intr(hp, SDHC_COMMAND_COMPLETE, SDHC_COMMAND_TIMEOUT*3, probing)) {
 		DPRINTF(1,("%s: timeout for command\n", __func__));
 		sdmmc_delay(50);
 		cmd->c_error = ETIMEDOUT;



CVS commit: src/sys/dev/sdmmc

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:20:01 UTC 2019

Modified Files:
src/sys/dev/sdmmc: if_bwfm_sdio.c sdmmc_io.c sdmmcvar.h

Log Message:
Simplyfy sdmmc_io_set_blocklen function signature by dropping the
extra softc pointer. Aligns with OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/sdmmc/if_bwfm_sdio.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/sdmmc/sdmmc_io.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/sdmmc/sdmmcvar.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/sdmmc

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:20:01 UTC 2019

Modified Files:
src/sys/dev/sdmmc: if_bwfm_sdio.c sdmmc_io.c sdmmcvar.h

Log Message:
Simplyfy sdmmc_io_set_blocklen function signature by dropping the
extra softc pointer. Aligns with OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/sdmmc/if_bwfm_sdio.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/sdmmc/sdmmc_io.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/sdmmc/sdmmcvar.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/sdmmc/if_bwfm_sdio.c
diff -u src/sys/dev/sdmmc/if_bwfm_sdio.c:1.7 src/sys/dev/sdmmc/if_bwfm_sdio.c:1.8
--- src/sys/dev/sdmmc/if_bwfm_sdio.c:1.7	Sun Oct 27 21:39:50 2019
+++ src/sys/dev/sdmmc/if_bwfm_sdio.c	Mon Oct 28 06:20:01 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bwfm_sdio.c,v 1.7 2019/10/27 21:39:50 bad Exp $ */
+/* $NetBSD: if_bwfm_sdio.c,v 1.8 2019/10/28 06:20:01 mlelstv Exp $ */
 /* $OpenBSD: if_bwfm_sdio.c,v 1.1 2017/10/11 17:19:50 patrick Exp $ */
 /*
  * Copyright (c) 2010-2016 Broadcom Corporation
@@ -293,8 +293,8 @@ bwfm_sdio_attach(device_t parent, device
 		sc->sc_sf[sf->number] = sf;
 	}
 
-	sdmmc_io_set_blocklen(sc->sc_sf[1]->sc, sc->sc_sf[1], 64);
-	sdmmc_io_set_blocklen(sc->sc_sf[2]->sc, sc->sc_sf[2], 512);
+	sdmmc_io_set_blocklen(sc->sc_sf[1], 64);
+	sdmmc_io_set_blocklen(sc->sc_sf[2], 512);
 
 	/* Enable Function 1. */
 	if (sdmmc_io_function_enable(sc->sc_sf[1]) != 0) {

Index: src/sys/dev/sdmmc/sdmmc_io.c
diff -u src/sys/dev/sdmmc/sdmmc_io.c:1.17 src/sys/dev/sdmmc/sdmmc_io.c:1.18
--- src/sys/dev/sdmmc/sdmmc_io.c:1.17	Mon Oct 28 06:16:46 2019
+++ src/sys/dev/sdmmc/sdmmc_io.c	Mon Oct 28 06:20:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc_io.c,v 1.17 2019/10/28 06:16:46 mlelstv Exp $	*/
+/*	$NetBSD: sdmmc_io.c,v 1.18 2019/10/28 06:20:01 mlelstv Exp $	*/
 /*	$OpenBSD: sdmmc_io.c,v 1.10 2007/09/17 01:33:33 krw Exp $	*/
 
 /*
@@ -20,7 +20,7 @@
 /* Routines for SD I/O cards. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_io.c,v 1.17 2019/10/28 06:16:46 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_io.c,v 1.18 2019/10/28 06:20:01 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -825,9 +825,10 @@ sdmmc_intr_task(void *arg)
 }
 
 int
-sdmmc_io_set_blocklen(struct sdmmc_softc *sc, struct sdmmc_function *sf,
+sdmmc_io_set_blocklen(struct sdmmc_function *sf,
  int blklen)
 {
+	struct sdmmc_softc *sc = sf->sc;
 	struct sdmmc_function *sf0 = sc->sc_fn0;
 	int error = EINVAL;
 

Index: src/sys/dev/sdmmc/sdmmcvar.h
diff -u src/sys/dev/sdmmc/sdmmcvar.h:1.33 src/sys/dev/sdmmc/sdmmcvar.h:1.34
--- src/sys/dev/sdmmc/sdmmcvar.h:1.33	Mon Oct 28 06:16:46 2019
+++ src/sys/dev/sdmmc/sdmmcvar.h	Mon Oct 28 06:20:01 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmcvar.h,v 1.33 2019/10/28 06:16:46 mlelstv Exp $	*/
+/*	$NetBSD: sdmmcvar.h,v 1.34 2019/10/28 06:20:01 mlelstv Exp $	*/
 /*	$OpenBSD: sdmmcvar.h,v 1.13 2009/01/09 10:55:22 jsg Exp $	*/
 
 /*
@@ -359,8 +359,7 @@ void	sdmmc_dump_data(const char *, void 
 int	sdmmc_io_enable(struct sdmmc_softc *);
 void	sdmmc_io_scan(struct sdmmc_softc *);
 int	sdmmc_io_init(struct sdmmc_softc *, struct sdmmc_function *);
-int	sdmmc_io_set_blocklen(struct sdmmc_softc *, struct sdmmc_function *,
-	int);
+int	sdmmc_io_set_blocklen(struct sdmmc_function *, int);
 uint8_t sdmmc_io_read_1(struct sdmmc_function *, int);
 uint16_t sdmmc_io_read_2(struct sdmmc_function *, int);
 uint32_t sdmmc_io_read_4(struct sdmmc_function *, int);



CVS commit: src/sys/dev

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:37:52 UTC 2019

Modified Files:
src/sys/dev/ic: bwfm.c bwfmreg.h bwfmvar.h
src/sys/dev/sdmmc: if_bwfm_sdio.c

Log Message:
More code from OpenBSD
no need to splnet() when enqueing packets
explicit structure padding
make internal functions static

also prepare for GPIO interrupts.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/ic/bwfm.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/bwfmreg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/bwfmvar.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/sdmmc/if_bwfm_sdio.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

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:37:52 UTC 2019

Modified Files:
src/sys/dev/ic: bwfm.c bwfmreg.h bwfmvar.h
src/sys/dev/sdmmc: if_bwfm_sdio.c

Log Message:
More code from OpenBSD
no need to splnet() when enqueing packets
explicit structure padding
make internal functions static

also prepare for GPIO interrupts.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/ic/bwfm.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/bwfmreg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/bwfmvar.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/sdmmc/if_bwfm_sdio.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/ic/bwfm.c
diff -u src/sys/dev/ic/bwfm.c:1.17 src/sys/dev/ic/bwfm.c:1.18
--- src/sys/dev/ic/bwfm.c:1.17	Thu Oct  3 14:42:20 2019
+++ src/sys/dev/ic/bwfm.c	Mon Oct 28 06:37:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: bwfm.c,v 1.17 2019/10/03 14:42:20 jmcneill Exp $ */
+/* $NetBSD: bwfm.c,v 1.18 2019/10/28 06:37:51 mlelstv Exp $ */
 /* $OpenBSD: bwfm.c,v 1.5 2017/10/16 22:27:16 patrick Exp $ */
 /*
  * Copyright (c) 2010-2016 Broadcom Corporation
@@ -345,6 +345,7 @@ bwfm_init(struct ifnet *ifp)
 	struct ieee80211com *ic = >sc_ic;
 	uint8_t evmask[BWFM_EVENT_MASK_LEN];
 	struct bwfm_join_pref_params join_pref[2];
+	int pm;
 
 	if (bwfm_fwvar_var_set_int(sc, "mpc", 1)) {
 		printf("%s: could not set mpc\n", DEVNAME(sc));
@@ -370,10 +371,31 @@ bwfm_init(struct ifnet *ifp)
 
 #define	ENABLE_EVENT(e)		evmask[(e) / 8] |= 1 << ((e) % 8)
 	/* Events used to drive the state machine */
-	ENABLE_EVENT(BWFM_E_ASSOC);
-	ENABLE_EVENT(BWFM_E_ESCAN_RESULT);
-	ENABLE_EVENT(BWFM_E_SET_SSID);
-	ENABLE_EVENT(BWFM_E_LINK);
+	switch (ic->ic_opmode) {
+	case IEEE80211_M_STA:
+		ENABLE_EVENT(BWFM_E_IF);
+		ENABLE_EVENT(BWFM_E_LINK);
+		ENABLE_EVENT(BWFM_E_AUTH);
+		ENABLE_EVENT(BWFM_E_ASSOC);
+		ENABLE_EVENT(BWFM_E_DEAUTH);
+		ENABLE_EVENT(BWFM_E_DISASSOC);
+		ENABLE_EVENT(BWFM_E_SET_SSID);
+		ENABLE_EVENT(BWFM_E_ESCAN_RESULT);
+		break;
+#ifndef IEEE80211_STA_ONLY
+	case IEEE80211_M_HOSTAP:
+		ENABLE_EVENT(BWFM_E_AUTH_IND);
+		ENABLE_EVENT(BWFM_E_ASSOC_IND);
+		ENABLE_EVENT(BWFM_E_REASSOC_IND);
+		ENABLE_EVENT(BWFM_E_DEAUTH_IND);
+		ENABLE_EVENT(BWFM_E_DISASSOC_IND);
+		ENABLE_EVENT(BWFM_E_ESCAN_RESULT);
+		ENABLE_EVENT(BWFM_E_ESCAN_RESULT);
+		break;
+#endif
+	default:
+		break;
+	}
 #undef	ENABLE_EVENT
 
 #ifdef BWFM_DEBUG
@@ -401,7 +423,16 @@ bwfm_init(struct ifnet *ifp)
 		return EIO;
 	}
 
-	if (bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_PM, 2)) {
+/*
+ * Use CAM (constantly awake) when we are running as AP
+ * otherwise use fast power saving.
+ */
+	pm = BWFM_PM_FAST_PS;
+#ifndef IEEE80211_STA_ONLY
+	if (ic->ic_opmode == IEEE80211_M_HOSTAP)
+		pm = BWFM_PM_CAM;
+#endif
+	if (bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_PM, pm)) {
 		printf("%s: could not set power\n", DEVNAME(sc));
 		return EIO;
 	}
@@ -448,15 +479,25 @@ bwfm_stop(struct ifnet *ifp, int disable
 {
 	struct bwfm_softc *sc = ifp->if_softc;
 	struct ieee80211com *ic = >sc_ic;
+	struct bwfm_join_params join;
 
 	sc->sc_tx_timer = 0;
 	ifp->if_timer = 0;
 	ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
 
+	memset(, 0, sizeof(join));
+	bwfm_fwvar_cmd_set_data(sc, BWFM_C_SET_SSID, , sizeof(join));
 	bwfm_fwvar_cmd_set_int(sc, BWFM_C_DOWN, 1);
 	bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_PM, 0);
+	bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_AP, 0);
+	bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_INFRA, 0);
+	bwfm_fwvar_cmd_set_int(sc, BWFM_C_UP, 1);
+	bwfm_fwvar_cmd_set_int(sc, BWFM_C_SET_PM, BWFM_PM_FAST_PS);
 
 	ieee80211_new_state(ic, IEEE80211_S_INIT, -1);
+
+	if (sc->sc_bus_ops->bs_stop)
+		sc->sc_bus_ops->bs_stop(sc);
 }
 
 void
@@ -606,7 +647,7 @@ bwfm_key_set_cb(struct bwfm_softc *sc, s
 	wsec_key.len = htole32(wk->wk_keylen);
 	memcpy(wsec_key.data, wk->wk_key, sizeof(wsec_key.data));
 	if (!ext_key)
-		wsec_key.flags = htole32(BWFM_PRIMARY_KEY);
+		wsec_key.flags = htole32(BWFM_WSEC_PRIMARY_KEY);
 
 	switch (wk->wk_cipher->ic_cipher) {
 	case IEEE80211_CIPHER_WEP:
@@ -670,7 +711,7 @@ bwfm_key_delete_cb(struct bwfm_softc *sc
 
 	memset(_key, 0, sizeof(wsec_key));
 	wsec_key.index = htole32(wk->wk_keyix);
-	wsec_key.flags = htole32(BWFM_PRIMARY_KEY);
+	wsec_key.flags = htole32(BWFM_WSEC_PRIMARY_KEY);
 
 	if (bwfm_fwvar_var_set_data(sc, "wsec_key", _key, sizeof(wsec_key)))
 		return;
@@ -1452,10 +1493,10 @@ bwfm_proto_bcdc_query_dcmd(struct bwfm_s
 {
 	struct bwfm_proto_bcdc_dcmd *dcmd;
 	size_t size = sizeof(dcmd->hdr) + *len;
-	static int reqid = 0;
+	int reqid;
 	int ret = 1;
 
-	reqid++;
+	reqid = sc->sc_bcdc_reqid++;
 
 	dcmd = kmem_zalloc(sizeof(*dcmd), KM_SLEEP);
 	if (*len > sizeof(dcmd->buf))
@@ -1512,10 +1553,9 @@ bwfm_proto_bcdc_set_dcmd(struct bwfm_sof
 {
 	struct bwfm_proto_bcdc_dcmd *dcmd;
 	size_t size = sizeof(dcmd->hdr) + len;
-	int reqid = 0;
-	int ret = 1;
+	int ret = 1, reqid;
 
-	reqid++;
+	

CVS commit: src

2019-10-28 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Oct 28 08:30:49 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm.3 nvmm.h
src/sys/dev/nvmm: nvmm.h
src/sys/dev/nvmm/x86: nvmm_x86.h nvmm_x86_svm.c nvmm_x86_vmx.c

Log Message:
A few changes:

 - Use smaller types in struct nvmm_capability.
 - Use smaller type for nvmm_io.port.
 - Switch exitstate to a compacted structure.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/libnvmm/libnvmm.3
cvs rdiff -u -r1.16 -r1.17 src/lib/libnvmm/nvmm.h
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/nvmm/nvmm.h
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/nvmm/x86/nvmm_x86.h
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libnvmm/libnvmm.3
diff -u src/lib/libnvmm/libnvmm.3:1.22 src/lib/libnvmm/libnvmm.3:1.23
--- src/lib/libnvmm/libnvmm.3:1.22	Sun Oct 27 10:28:55 2019
+++ src/lib/libnvmm/libnvmm.3	Mon Oct 28 08:30:49 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: libnvmm.3,v 1.22 2019/10/27 10:28:55 maxv Exp $
+.\"	$NetBSD: libnvmm.3,v 1.23 2019/10/28 08:30:49 maxv Exp $
 .\"
 .\" Copyright (c) 2018, 2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 27, 2019
+.Dd October 28, 2019
 .Dt LIBNVMM 3
 .Os
 .Sh NAME
@@ -502,7 +502,9 @@ struct nvmm_vcpu_exit {
 	union {
 		...
 	} u;
-	uint64_t exitstate[8];
+	struct {
+		...
+	} exitstate;
 };
 .Ed
 .Pp
@@ -611,7 +613,7 @@ This structure describes an I/O transact
 struct nvmm_io {
 	struct nvmm_machine *mach;
 	struct nvmm_vcpu *vcpu;
-	uint64_t port;
+	uint16_t port;
 	bool in;
 	size_t size;
 	uint8_t *data;

Index: src/lib/libnvmm/nvmm.h
diff -u src/lib/libnvmm/nvmm.h:1.16 src/lib/libnvmm/nvmm.h:1.17
--- src/lib/libnvmm/nvmm.h:1.16	Sun Oct 27 20:17:36 2019
+++ src/lib/libnvmm/nvmm.h	Mon Oct 28 08:30:49 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm.h,v 1.16 2019/10/27 20:17:36 maxv Exp $	*/
+/*	$NetBSD: nvmm.h,v 1.17 2019/10/28 08:30:49 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@ struct nvmm_vcpu {
 struct nvmm_io {
 	struct nvmm_machine *mach;
 	struct nvmm_vcpu *vcpu;
-	uint64_t port;
+	uint16_t port;
 	bool in;
 	size_t size;
 	uint8_t *data;

Index: src/sys/dev/nvmm/nvmm.h
diff -u src/sys/dev/nvmm/nvmm.h:1.11 src/sys/dev/nvmm/nvmm.h:1.12
--- src/sys/dev/nvmm/nvmm.h:1.11	Wed Oct 23 07:01:11 2019
+++ src/sys/dev/nvmm/nvmm.h	Mon Oct 28 08:30:49 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm.h,v 1.11 2019/10/23 07:01:11 maxv Exp $	*/
+/*	$NetBSD: nvmm.h,v 1.12 2019/10/28 08:30:49 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
@@ -51,10 +51,10 @@ typedef uint32_t	nvmm_cpuid_t;
 #define NVMM_KERN_VERSION		1
 
 struct nvmm_capability {
-	uint64_t version;
-	uint64_t state_size;
-	uint64_t max_machines;
-	uint64_t max_vcpus;
+	uint32_t version;
+	uint32_t state_size;
+	uint32_t max_machines;
+	uint32_t max_vcpus;
 	uint64_t max_ram;
 	struct nvmm_cap_md arch;
 };

Index: src/sys/dev/nvmm/x86/nvmm_x86.h
diff -u src/sys/dev/nvmm/x86/nvmm_x86.h:1.17 src/sys/dev/nvmm/x86/nvmm_x86.h:1.18
--- src/sys/dev/nvmm/x86/nvmm_x86.h:1.17	Sun Oct 27 10:28:55 2019
+++ src/sys/dev/nvmm/x86/nvmm_x86.h	Mon Oct 28 08:30:49 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_x86.h,v 1.17 2019/10/27 10:28:55 maxv Exp $	*/
+/*	$NetBSD: nvmm_x86.h,v 1.18 2019/10/28 08:30:49 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
@@ -102,7 +102,15 @@ struct nvmm_x86_exit {
 		struct nvmm_x86_exit_insn insn;
 		struct nvmm_x86_exit_invalid inv;
 	} u;
-	uint64_t exitstate[8];
+	struct {
+		uint64_t rflags;
+		uint64_t cr8;
+		uint64_t int_shadow:1;
+		uint64_t int_window_exiting:1;
+		uint64_t nmi_window_exiting:1;
+		uint64_t evt_pending:1;
+		uint64_t rsvd:60;
+	} exitstate;
 };
 
 #define NVMM_VCPU_EVENT_EXCP	0
@@ -128,7 +136,7 @@ struct nvmm_cap_md {
 	uint64_t xcr0_mask;
 	uint32_t mxcsr_mask;
 	uint32_t conf_cpuid_maxops;
-	uint64_t rsvd[4];
+	uint64_t rsvd[6];
 };
 
 #endif
@@ -236,14 +244,6 @@ struct nvmm_x64_state_intr {
 	uint64_t rsvd:60;
 };
 
-/* VM exit state indexes. */
-#define NVMM_X64_EXITSTATE_CR8			0
-#define NVMM_X64_EXITSTATE_RFLAGS		1
-#define NVMM_X64_EXITSTATE_INT_SHADOW		2
-#define NVMM_X64_EXITSTATE_INT_WINDOW_EXIT	3
-#define NVMM_X64_EXITSTATE_NMI_WINDOW_EXIT	4
-#define NVMM_X64_EXITSTATE_EVT_PENDING		5
-
 /* Flags. */
 #define NVMM_X64_STATE_SEGS	0x01
 #define NVMM_X64_STATE_GPRS	0x02

Index: src/sys/dev/nvmm/x86/nvmm_x86_svm.c
diff -u src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.52 src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.53
--- src/sys/dev/nvmm/x86/nvmm_x86_svm.c:1.52	Sun Oct 27 10:28:55 2019
+++ src/sys/dev/nvmm/x86/nvmm_x86_svm.c	Mon Oct 28 08:30:49 2019
@@ 

CVS commit: src

2019-10-28 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Oct 28 08:30:49 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm.3 nvmm.h
src/sys/dev/nvmm: nvmm.h
src/sys/dev/nvmm/x86: nvmm_x86.h nvmm_x86_svm.c nvmm_x86_vmx.c

Log Message:
A few changes:

 - Use smaller types in struct nvmm_capability.
 - Use smaller type for nvmm_io.port.
 - Switch exitstate to a compacted structure.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/libnvmm/libnvmm.3
cvs rdiff -u -r1.16 -r1.17 src/lib/libnvmm/nvmm.h
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/nvmm/nvmm.h
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/nvmm/x86/nvmm_x86.h
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/nvmm/x86/nvmm_x86_vmx.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/sdmmc

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:16:46 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmc.c sdmmc_io.c sdmmc_mem.c sdmmcvar.h

Log Message:
Add and use sdmmc_pause to avoid long-term busy waits.
Add sdio abort function.
Additional error messages.
Print parameters for SDIO devices.
Minor cosmetics.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/sdmmc/sdmmc.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/sdmmc/sdmmc_io.c
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/sdmmc/sdmmc_mem.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/sdmmc/sdmmcvar.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/sdmmc

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:16:46 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmc.c sdmmc_io.c sdmmc_mem.c sdmmcvar.h

Log Message:
Add and use sdmmc_pause to avoid long-term busy waits.
Add sdio abort function.
Additional error messages.
Print parameters for SDIO devices.
Minor cosmetics.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/sdmmc/sdmmc.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/sdmmc/sdmmc_io.c
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/sdmmc/sdmmc_mem.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/sdmmc/sdmmcvar.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/sdmmc/sdmmc.c
diff -u src/sys/dev/sdmmc/sdmmc.c:1.38 src/sys/dev/sdmmc/sdmmc.c:1.39
--- src/sys/dev/sdmmc/sdmmc.c:1.38	Wed Oct 23 05:20:52 2019
+++ src/sys/dev/sdmmc/sdmmc.c	Mon Oct 28 06:16:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc.c,v 1.38 2019/10/23 05:20:52 hkenken Exp $	*/
+/*	$NetBSD: sdmmc.c,v 1.39 2019/10/28 06:16:46 mlelstv Exp $	*/
 /*	$OpenBSD: sdmmc.c,v 1.18 2009/01/09 10:58:38 jsg Exp $	*/
 
 /*
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.38 2019/10/23 05:20:52 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.39 2019/10/28 06:16:46 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -568,7 +568,7 @@ sdmmc_enable(struct sdmmc_softc *sc)
 	}
 
 	/* XXX wait for card to power up */
-	sdmmc_delay(10);
+	sdmmc_pause(10, NULL);
 
 	if (!ISSET(sc->sc_caps, SMC_CAPS_SPI_MODE)) {
 		/* Initialize SD I/O card function(s). */
@@ -790,6 +790,17 @@ sdmmc_delay(u_int usecs)
 	delay(usecs);
 }
 
+void
+sdmmc_pause(u_int usecs, kmutex_t *lock)
+{
+	unsigned ticks = mstohz(usecs/1000);
+
+	if (cold || ticks < 1)
+		delay(usecs);
+	else
+		kpause("sdmmcdelay", false, ticks, lock);
+}
+
 int
 sdmmc_app_command(struct sdmmc_softc *sc, struct sdmmc_function *sf, struct sdmmc_command *cmd)
 {
@@ -910,7 +921,7 @@ sdmmc_set_relative_addr(struct sdmmc_sof
 	/* Don't lock */
 
 	if (ISSET(sc->sc_caps, SMC_CAPS_SPI_MODE)) {
-		aprint_error_dev(sc->sc_dev,
+		device_printf(sc->sc_dev,
 			"sdmmc_set_relative_addr: SMC_CAPS_SPI_MODE set");
 		return EIO;
 	}
@@ -943,7 +954,7 @@ sdmmc_select_card(struct sdmmc_softc *sc
 	/* Don't lock */
 
 	if (ISSET(sc->sc_caps, SMC_CAPS_SPI_MODE)) {
-		aprint_error_dev(sc->sc_dev,
+		device_printf(sc->sc_dev,
 			"sdmmc_select_card: SMC_CAPS_SPI_MODE set");
 		return EIO;
 	}
@@ -962,6 +973,11 @@ sdmmc_select_card(struct sdmmc_softc *sc
 	if (error == 0 || sf == NULL)
 		sc->sc_card = sf;
 
+	if (error) {
+		device_printf(sc->sc_dev,
+			"sdmmc_select_card: error %d", error);
+	}
+
 	return error;
 }
 

Index: src/sys/dev/sdmmc/sdmmc_io.c
diff -u src/sys/dev/sdmmc/sdmmc_io.c:1.16 src/sys/dev/sdmmc/sdmmc_io.c:1.17
--- src/sys/dev/sdmmc/sdmmc_io.c:1.16	Mon Sep  2 11:09:42 2019
+++ src/sys/dev/sdmmc/sdmmc_io.c	Mon Oct 28 06:16:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc_io.c,v 1.16 2019/09/02 11:09:42 jmcneill Exp $	*/
+/*	$NetBSD: sdmmc_io.c,v 1.17 2019/10/28 06:16:46 mlelstv Exp $	*/
 /*	$OpenBSD: sdmmc_io.c,v 1.10 2007/09/17 01:33:33 krw Exp $	*/
 
 /*
@@ -20,7 +20,7 @@
 /* Routines for SD I/O cards. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_io.c,v 1.16 2019/09/02 11:09:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_io.c,v 1.17 2019/10/28 06:16:46 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -230,7 +230,7 @@ sdmmc_io_init(struct sdmmc_softc *sc, st
 			sf->csd.tran_speed = 5;	/* 50MHz */
 
 			/* Wait 400KHz x 8 clock */
-			delay(1);
+			sdmmc_delay(20);
 		}
 		if (sc->sc_busclk > sf->csd.tran_speed)
 			sc->sc_busclk = sf->csd.tran_speed;
@@ -240,6 +240,15 @@ sdmmc_io_init(struct sdmmc_softc *sc, st
 		if (error)
 			aprint_error_dev(sc->sc_dev,
 			"can't change bus clock\n");
+
+		aprint_normal_dev(sc->sc_dev, "%u-bit width,", sf->width);
+		if ((sc->sc_busclk / 1000) != 0)
+			aprint_normal(" %u.%03u MHz\n",
+			sc->sc_busclk / 1000, sc->sc_busclk % 1000);
+		else
+			aprint_normal(" %u KHz\n", sc->sc_busclk % 1000);
+
+
 	} else {
 		reg = sdmmc_io_read_1(sf0, SD_IO_FBR(sf->number) + 0x000);
 		sf->interface = FBR_STD_FUNC_IF_CODE(reg);
@@ -357,7 +366,15 @@ sdmmc_io_rw_direct(struct sdmmc_softc *s
 	cmd.c_flags = SCF_CMD_AC | SCF_RSP_R5;
 
 	error = sdmmc_mmc_command(sc, );
-	*datap = SD_R5_DATA(cmd.c_resp);
+	if (error == 0)
+		*datap = SD_R5_DATA(cmd.c_resp);
+
+	if (error) {
+		device_printf(sc->sc_dev,
+		"direct I/O error %d, r=%d p=%p %s\n",
+		error, reg, datap,
+		ISSET(arg, SD_ARG_CMD53_WRITE) ? "write" : "read");
+	}
 
 	return error;
 }
@@ -404,6 +421,13 @@ sdmmc_io_rw_extended(struct sdmmc_softc 
 
 	error = sdmmc_mmc_command(sc, );
 
+	if (error) {
+		device_printf(sc->sc_dev,
+		"extended I/O error %d, r=%d p=%p l=%d %s\n",
+		error, reg, datap, datalen,
+		ISSET(arg, SD_ARG_CMD53_WRITE) 

CVS commit: src/sys/dev/sdmmc

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:00:14 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdhc.c

Log Message:
Skip setting power when the voltage doesn't change.
Also increase some timeouts.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/sdmmc/sdhc.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/sdmmc

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:26:19 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmc_ioreg.h

Log Message:
Missing commit for sdio abort function.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/sdmmc/sdmmc_ioreg.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/sdmmc/sdmmc_ioreg.h
diff -u src/sys/dev/sdmmc/sdmmc_ioreg.h:1.4 src/sys/dev/sdmmc/sdmmc_ioreg.h:1.5
--- src/sys/dev/sdmmc/sdmmc_ioreg.h:1.4	Sun Sep  1 05:45:42 2019
+++ src/sys/dev/sdmmc/sdmmc_ioreg.h	Mon Oct 28 06:26:19 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc_ioreg.h,v 1.4 2019/09/01 05:45:42 mlelstv Exp $	*/
+/*	$NetBSD: sdmmc_ioreg.h,v 1.5 2019/10/28 06:26:19 mlelstv Exp $	*/
 /*	$OpenBSD: sdmmc_ioreg.h,v 1.4 2007/06/02 01:48:37 uwe Exp $	*/
 
 /*
@@ -88,6 +88,7 @@
 #define SD_IO_CCCR_FN_INTPENDING	0x05
 #define SD_IO_CCCR_CTL			0x06
 #define  CCCR_CTL_RES			(1<<3)
+#define  CCCR_CTL_AS(x)			((x) & 0x7)
 #define SD_IO_CCCR_BUS_WIDTH		0x07
 #define  CCCR_BUS_WIDTH_4		(2<<0)
 #define  CCCR_BUS_WIDTH_1		(0<<0)



CVS commit: src/sys/dev/sdmmc

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:26:19 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmc_ioreg.h

Log Message:
Missing commit for sdio abort function.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/sdmmc/sdmmc_ioreg.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/sdmmc

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:31:39 UTC 2019

Modified Files:
src/sys/dev/sdmmc: ld_sdmmc.c sdmmc_cis.c sdmmc_mem.c sdmmcdevs

Log Message:
Whitespace police


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/sdmmc/ld_sdmmc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/sdmmc/sdmmc_cis.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/sdmmc/sdmmc_mem.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/sdmmc/sdmmcdevs

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/sdmmc/ld_sdmmc.c
diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.36 src/sys/dev/sdmmc/ld_sdmmc.c:1.37
--- src/sys/dev/sdmmc/ld_sdmmc.c:1.36	Tue Mar 19 07:08:43 2019
+++ src/sys/dev/sdmmc/ld_sdmmc.c	Mon Oct 28 06:31:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_sdmmc.c,v 1.36 2019/03/19 07:08:43 mlelstv Exp $	*/
+/*	$NetBSD: ld_sdmmc.c,v 1.37 2019/10/28 06:31:39 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.36 2019/03/19 07:08:43 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.37 2019/10/28 06:31:39 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -460,7 +460,7 @@ MODULE(MODULE_CLASS_DRIVER, ld_sdmmc, "l
  */
 #undef  CFDRIVER_DECL
 #define CFDRIVER_DECL(name, class, attr)
-#include "ioconf.c"
+#include "ioconf.c"
 #endif
 
 static int
@@ -474,13 +474,13 @@ ld_sdmmc_modcmd(modcmd_t cmd, void *opaq
 	static struct cfdriver * const no_cfdriver_vec[] = { NULL };
 #endif
 	int error = 0;
- 
+
 #ifdef _MODULE
 	switch (cmd) {
 	case MODULE_CMD_INIT:
 		error = config_init_component(no_cfdriver_vec,
 		cfattach_ioconf_ld_sdmmc, cfdata_ioconf_ld_sdmmc);
-	break;
+		break;
 	case MODULE_CMD_FINI:
 		error = config_fini_component(no_cfdriver_vec,
 		cfattach_ioconf_ld_sdmmc, cfdata_ioconf_ld_sdmmc);

Index: src/sys/dev/sdmmc/sdmmc_cis.c
diff -u src/sys/dev/sdmmc/sdmmc_cis.c:1.7 src/sys/dev/sdmmc/sdmmc_cis.c:1.8
--- src/sys/dev/sdmmc/sdmmc_cis.c:1.7	Tue Sep 24 04:56:54 2019
+++ src/sys/dev/sdmmc/sdmmc_cis.c	Mon Oct 28 06:31:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc_cis.c,v 1.7 2019/09/24 04:56:54 mlelstv Exp $	*/
+/*	$NetBSD: sdmmc_cis.c,v 1.8 2019/10/28 06:31:39 mlelstv Exp $	*/
 /*	$OpenBSD: sdmmc_cis.c,v 1.1 2006/06/01 21:53:41 uwe Exp $	*/
 
 /*
@@ -20,7 +20,7 @@
 /* Routines to decode the Card Information Structure of SD I/O cards */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_cis.c,v 1.7 2019/09/24 04:56:54 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_cis.c,v 1.8 2019/10/28 06:31:39 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -202,7 +202,7 @@ sdmmc_read_cis(struct sdmmc_function *sf
 		}
 
 #ifdef SDMMCCISDEBUG
-		{ 
+		{
 			int i;
 
 			/* print the tuple */
@@ -317,7 +317,7 @@ sdmmc_check_cis_quirks(struct sdmmc_func
 	if (sf->cis.manufacturer == SDMMC_VENDOR_SPECTEC &&
 	sf->cis.product == SDMMC_PRODUCT_SPECTEC_SDW820) {
 		/* This card lacks the VERS_1 tuple. */
-		static const char cis1_info[] = 
+		static const char cis1_info[] =
 		"Spectec\0SDIO WLAN Card\0SDW-820\0\0";
 
 		sf->cis.cis1_major = 0x01;

Index: src/sys/dev/sdmmc/sdmmc_mem.c
diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.69 src/sys/dev/sdmmc/sdmmc_mem.c:1.70
--- src/sys/dev/sdmmc/sdmmc_mem.c:1.69	Mon Oct 28 06:16:46 2019
+++ src/sys/dev/sdmmc/sdmmc_mem.c	Mon Oct 28 06:31:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc_mem.c,v 1.69 2019/10/28 06:16:46 mlelstv Exp $	*/
+/*	$NetBSD: sdmmc_mem.c,v 1.70 2019/10/28 06:31:39 mlelstv Exp $	*/
 /*	$OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $	*/
 
 /*
@@ -45,7 +45,7 @@
 /* Routines for SD/MMC memory cards. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.69 2019/10/28 06:16:46 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.70 2019/10/28 06:31:39 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -771,7 +771,7 @@ sdmmc_mem_execute_tuning(struct sdmmc_so
 			break;
 		case 208000:
 			timing = SDMMC_TIMING_UHS_SDR104;
-			break; 
+			break;
 		default:
 			return 0;
 		}

Index: src/sys/dev/sdmmc/sdmmcdevs
diff -u src/sys/dev/sdmmc/sdmmcdevs:1.6 src/sys/dev/sdmmc/sdmmcdevs:1.7
--- src/sys/dev/sdmmc/sdmmcdevs:1.6	Sat Aug 24 11:24:00 2019
+++ src/sys/dev/sdmmc/sdmmcdevs	Mon Oct 28 06:31:39 2019
@@ -1,4 +1,4 @@
-	$NetBSD: sdmmcdevs,v 1.6 2019/08/24 11:24:00 mlelstv Exp $
+	$NetBSD: sdmmcdevs,v 1.7 2019/10/28 06:31:39 mlelstv Exp $
 /*	$OpenBSD: sdmmcdevs,v 1.8 2007/05/11 17:16:16 mglocker Exp $	*/
 
 /*
@@ -40,13 +40,13 @@ vendor ABOCOM			0x13d1	AboCom Systems, I
 /* AboCom Systems, Inc. */
 product ABOCOM SDW11G		0xac02	SDW11G
 
-/* Atheros */ 
+/* Atheros */
 product ATHEROS AR6001_8	0x0108	AR6001
 product ATHEROS AR6001_9	0x0109	AR6001
 product ATHEROS AR6001_a	0x010a	AR6001
 product ATHEROS AR6001_b	0x010b	AR6001
 
-/* Broadcom */ 
+/* Broadcom */
 product BROADCOM BCM4324	0x4324	

CVS commit: src/sys/dev/sdmmc

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:31:39 UTC 2019

Modified Files:
src/sys/dev/sdmmc: ld_sdmmc.c sdmmc_cis.c sdmmc_mem.c sdmmcdevs

Log Message:
Whitespace police


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/sdmmc/ld_sdmmc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/sdmmc/sdmmc_cis.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/sdmmc/sdmmc_mem.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/sdmmc/sdmmcdevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sdmmc

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:32:11 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmcdevs.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/sdmmc/sdmmcdevs.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/sdmmc/sdmmcdevs.h
diff -u src/sys/dev/sdmmc/sdmmcdevs.h:1.6 src/sys/dev/sdmmc/sdmmcdevs.h:1.7
--- src/sys/dev/sdmmc/sdmmcdevs.h:1.6	Sat Aug 24 11:24:17 2019
+++ src/sys/dev/sdmmc/sdmmcdevs.h	Mon Oct 28 06:32:10 2019
@@ -1,10 +1,10 @@
-/*	$NetBSD: sdmmcdevs.h,v 1.6 2019/08/24 11:24:17 mlelstv Exp $	*/
+/*	$NetBSD: sdmmcdevs.h,v 1.7 2019/10/28 06:32:10 mlelstv Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *		NetBSD: sdmmcdevs,v 1.6 2019/08/24 11:24:00 mlelstv Exp 
+ *		NetBSD: sdmmcdevs,v 1.7 2019/10/28 06:31:39 mlelstv Exp 
  */
 /*	$OpenBSD: sdmmcdevs,v 1.8 2007/05/11 17:16:16 mglocker Exp $	*/
 
@@ -48,7 +48,7 @@
 #define	SDMMC_CIS_ABOCOM_SDW11G	{ NULL, NULL, NULL, NULL }
 #define	SDMMC_PRODUCT_ABOCOM_SDW11G	0xac02
 
-/* Atheros */ 
+/* Atheros */
 #define	SDMMC_CIS_ATHEROS_AR6001_8	{ NULL, NULL, NULL, NULL }
 #define	SDMMC_PRODUCT_ATHEROS_AR6001_8	0x0108
 #define	SDMMC_CIS_ATHEROS_AR6001_9	{ NULL, NULL, NULL, NULL }
@@ -58,7 +58,7 @@
 #define	SDMMC_CIS_ATHEROS_AR6001_b	{ NULL, NULL, NULL, NULL }
 #define	SDMMC_PRODUCT_ATHEROS_AR6001_b	0x010b
 
-/* Broadcom */ 
+/* Broadcom */
 #define	SDMMC_CIS_BROADCOM_BCM4324	{ NULL, NULL, NULL, NULL }
 #define	SDMMC_PRODUCT_BROADCOM_BCM4324	0x4324
 #define	SDMMC_CIS_BROADCOM_BCM4329	{ NULL, NULL, NULL, NULL }



CVS commit: src/sys/dev/sdmmc

2019-10-28 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Mon Oct 28 06:32:11 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdmmcdevs.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/sdmmc/sdmmcdevs.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/nvmm

2019-10-28 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Oct 28 09:00:08 UTC 2019

Modified Files:
src/sys/dev/nvmm: nvmm.c nvmm_ioctl.h

Log Message:
Add nram in struct nvmm_ctl_mach_info.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/nvmm/nvmm.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/nvmm/nvmm_ioctl.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/nvmm/nvmm.c
diff -u src/sys/dev/nvmm/nvmm.c:1.24 src/sys/dev/nvmm/nvmm.c:1.25
--- src/sys/dev/nvmm/nvmm.c:1.24	Sun Oct 27 20:17:36 2019
+++ src/sys/dev/nvmm/nvmm.c	Mon Oct 28 09:00:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm.c,v 1.24 2019/10/27 20:17:36 maxv Exp $	*/
+/*	$NetBSD: nvmm.c,v 1.25 2019/10/28 09:00:08 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.24 2019/10/27 20:17:36 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.25 2019/10/28 09:00:08 maxv Exp $");
 
 #include 
 #include 
@@ -915,6 +915,14 @@ nvmm_ctl_mach_info(struct nvmm_owner *ow
 		ctl.nvcpus++;
 		nvmm_vcpu_put(vcpu);
 	}
+
+	ctl.nram = 0;
+	for (i = 0; i < NVMM_MAX_HMAPPINGS; i++) {
+		if (!mach->hmap[i].present)
+			continue;
+		ctl.nram += mach->hmap[i].size;
+	}
+
 	ctl.pid = mach->owner->pid;
 	ctl.time = mach->time;
 

Index: src/sys/dev/nvmm/nvmm_ioctl.h
diff -u src/sys/dev/nvmm/nvmm_ioctl.h:1.8 src/sys/dev/nvmm/nvmm_ioctl.h:1.9
--- src/sys/dev/nvmm/nvmm_ioctl.h:1.8	Wed Oct 23 07:01:11 2019
+++ src/sys/dev/nvmm/nvmm_ioctl.h	Mon Oct 28 09:00:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_ioctl.h,v 1.8 2019/10/23 07:01:11 maxv Exp $	*/
+/*	$NetBSD: nvmm_ioctl.h,v 1.9 2019/10/28 09:00:08 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
@@ -122,7 +122,8 @@ struct nvmm_ioc_gpa_unmap {
 
 struct nvmm_ctl_mach_info {
 	nvmm_machid_t machid;
-	size_t nvcpus;
+	uint32_t nvcpus;
+	uint64_t nram;
 	pid_t pid;
 	time_t time;
 };



CVS commit: src/sys/dev/nvmm

2019-10-28 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Oct 28 09:00:08 UTC 2019

Modified Files:
src/sys/dev/nvmm: nvmm.c nvmm_ioctl.h

Log Message:
Add nram in struct nvmm_ctl_mach_info.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/nvmm/nvmm.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/nvmm/nvmm_ioctl.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/fdt

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 10:43:09 UTC 2019

Modified Files:
src/sys/dev/fdt: cpufreq_dt.c

Log Message:
Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/fdt/cpufreq_dt.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/fdt/cpufreq_dt.c
diff -u src/sys/dev/fdt/cpufreq_dt.c:1.10 src/sys/dev/fdt/cpufreq_dt.c:1.11
--- src/sys/dev/fdt/cpufreq_dt.c:1.10	Mon Oct  7 13:54:59 2019
+++ src/sys/dev/fdt/cpufreq_dt.c	Mon Oct 28 10:43:08 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufreq_dt.c,v 1.10 2019/10/07 13:54:59 martin Exp $ */
+/* $NetBSD: cpufreq_dt.c,v 1.11 2019/10/28 10:43:08 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpufreq_dt.c,v 1.10 2019/10/07 13:54:59 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufreq_dt.c,v 1.11 2019/10/28 10:43:08 jmcneill Exp $");
 
 #include 
 #include 
@@ -363,7 +363,7 @@ cpufreq_dt_parse_opp_v2(struct cpufreq_d
 	struct cpufreq_dt_table *table;
 	const u_int *opp_uv;
 	uint64_t opp_hz;
-	int opp_node, len, i;
+	int opp_node, len, i, index;
 
 	const int opp_table = fdtbus_get_phandle(phandle, "operating-points-v2");
 	if (opp_table < 0)
@@ -379,27 +379,33 @@ cpufreq_dt_parse_opp_v2(struct cpufreq_d
 	}
 
 	for (opp_node = OF_child(opp_table); opp_node; opp_node = OF_peer(opp_node)) {
-		if (fdtbus_status_okay(opp_node))
-			sc->sc_nopp++;
+		if (!fdtbus_status_okay(opp_node))
+			continue;
+		if (of_hasprop(opp_node, "opp-suspend"))
+			continue;
+		sc->sc_nopp++;
 	}
 
 	if (sc->sc_nopp == 0)
 		return EINVAL;
 
 	sc->sc_opp = kmem_zalloc(sizeof(*sc->sc_opp) * sc->sc_nopp, KM_SLEEP);
+	index = sc->sc_nopp - 1;
 	for (opp_node = OF_child(opp_table), i = 0; opp_node; opp_node = OF_peer(opp_node), i++) {
 		if (!fdtbus_status_okay(opp_node))
 			continue;
+		if (of_hasprop(opp_node, "opp-suspend"))
+			continue;
 		if (of_getprop_uint64(opp_node, "opp-hz", _hz) != 0)
 			return EINVAL;
 		opp_uv = fdtbus_get_prop(opp_node, "opp-microvolt", );
 		if (opp_uv == NULL || len < 1)
 			return EINVAL;
 		/* Table is in reverse order */
-		const int index = sc->sc_nopp - i - 1;
 		sc->sc_opp[index].freq_khz = (u_int)(opp_hz / 1000);
 		sc->sc_opp[index].voltage_uv = be32toh(opp_uv[0]);
 		of_getprop_uint32(opp_node, "clock-latency-ns", >sc_opp[index].latency_ns);
+		--index;
 	}
 
 	return 0;



CVS commit: src/sys/dev/fdt

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 10:43:09 UTC 2019

Modified Files:
src/sys/dev/fdt: cpufreq_dt.c

Log Message:
Skip nodes with an "opp-suspend" property and fix tables that have disabled
nodes in the middle.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/fdt/cpufreq_dt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src

2019-10-28 Thread Ryo ONODERA
Hi,

Thanks for your great work!

Could you add /dev/vio9p? creation rule to /dev/MAKEDEV?
I have no idea where is relevant in src/etc/MAKEDEV.tmpl.
My idea is as follows:

Index: etc/MAKEDEV.tmpl
===
RCS file: /cvsroot/src/etc/MAKEDEV.tmpl,v
retrieving revision 1.209
diff -u -r1.209 MAKEDEV.tmpl
--- etc/MAKEDEV.tmpl27 Oct 2019 07:08:15 -  1.209
+++ etc/MAKEDEV.tmpl28 Oct 2019 13:07:11 -
@@ -1762,6 +1762,11 @@
mkdev qemufwcfg$unit c %qemufwcfg_chr% $unit 660
;;
 
+vio9p[0-9]*)
+   unit=${i#vio9p}
+   mkdev vio9p$unit c %vio9p_chr% $unit 660
+   ;;
+
 nvram)
mkdev nvram c %nvram_chr% 0 644
;;


"Ryota Ozaki"  writes:

> Module Name:  src
> Committed By: ozaki-r
> Date: Mon Oct 28 02:56:41 UTC 2019
>
> Modified Files:
>   src/distrib/sets/lists/man: mi
>   src/share/man/man4: Makefile
>   src/sys/conf: majors
>   src/sys/dev/pci: files.virtio
>   src/sys/modules: Makefile
> Added Files:
>   src/share/man/man4: vio9p.4
>   src/sys/dev/pci: vio9p.c
>   src/sys/modules/vio9p: Makefile vio9p.ioconf
>
> Log Message:
> Implement a front-end driver of virtio-9p called vio9p
>
> In conjunction with mount_9p, it enables a NetBSD system running as a VM guest
> to mount an exported filesystem by the host via virtio-9p.  It exports a 9p
> end-point of virtio-9p via a character device file for mount_9p.
>
> Reviewed by yamaguchi@
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.1658 -r1.1659 src/distrib/sets/lists/man/mi
> cvs rdiff -u -r1.685 -r1.686 src/share/man/man4/Makefile
> cvs rdiff -u -r0 -r1.1 src/share/man/man4/vio9p.4
> cvs rdiff -u -r1.89 -r1.90 src/sys/conf/majors
> cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/files.virtio
> cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/vio9p.c
> cvs rdiff -u -r1.227 -r1.228 src/sys/modules/Makefile
> cvs rdiff -u -r0 -r1.1 src/sys/modules/vio9p/Makefile \
> src/sys/modules/vio9p/vio9p.ioconf
>
> 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.1658 
> src/distrib/sets/lists/man/mi:1.1659
> --- src/distrib/sets/lists/man/mi:1.1658  Fri Oct 25 17:39:56 2019
> +++ src/distrib/sets/lists/man/mi Mon Oct 28 02:56:40 2019
> @@ -1,4 +1,4 @@
> -# $NetBSD: mi,v 1.1658 2019/10/25 17:39:56 martin Exp $
> +# $NetBSD: mi,v 1.1659 2019/10/28 02:56:40 ozaki-r Exp $
>  #
>  # Note: don't delete entries from here - mark them as "obsolete" instead.
>  #
> @@ -1990,6 +1990,7 @@
>  ./usr/share/man/cat4/viapm.0 man-obsoleteobsolete
>  ./usr/share/man/cat4/video.0 man-sys-catman  .cat
>  ./usr/share/man/cat4/vinum.0 man-obsoleteobsolete
> +./usr/share/man/cat4/vio9p.0 man-sys-catman  .cat
>  ./usr/share/man/cat4/vioif.0 man-sys-catman  .cat
>  ./usr/share/man/cat4/viomb.0 man-sys-catman  .cat
>  ./usr/share/man/cat4/viornd.0man-sys-catman  
> .cat
> @@ -5085,6 +5086,7 @@
>  ./usr/share/man/html4/viaenv.htmlman-sys-htmlman html
>  ./usr/share/man/html4/viaide.htmlman-sys-htmlman html
>  ./usr/share/man/html4/video.html man-sys-htmlman html
> +./usr/share/man/html4/vio9p.html man-sys-htmlman html
>  ./usr/share/man/html4/vioif.html man-sys-htmlman html
>  ./usr/share/man/html4/viomb.html man-sys-htmlman html
>  ./usr/share/man/html4/viornd.htmlman-sys-htmlman html
> @@ -8112,6 +8114,7 @@
>  ./usr/share/man/man4/viapm.4 man-obsoleteobsolete
>  ./usr/share/man/man4/video.4 man-sys-man .man
>  ./usr/share/man/man4/vinum.4 man-obsoleteobsolete
> +./usr/share/man/man4/vio9p.4 man-sys-man .man
>  ./usr/share/man/man4/vioif.4 man-sys-man .man
>  ./usr/share/man/man4/viomb.4 man-sys-man .man
>  ./usr/share/man/man4/viornd.4man-sys-man 
> .man
>
> Index: src/share/man/man4/Makefile
> diff -u src/share/man/man4/Makefile:1.685 src/share/man/man4/Makefile:1.686
> --- src/share/man/man4/Makefile:1.685 Fri Oct 25 17:39:57 2019
> +++ src/share/man/man4/Makefile   Mon Oct 28 02:56:40 2019
> @@ -1,4 +1,4 @@
> -#$NetBSD: Makefile,v 1.685 2019/10/25 17:39:57 martin Exp $
> +#$NetBSD: Makefile,v 1.686 2019/10/28 02:56:40 ozaki-r Exp $
>  #@(#)Makefile8.1 (Berkeley) 6/18/93
>  
>  MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
> @@ -66,9 +66,9 @@ MAN=aac.4 ac97.4 acardide.4 aceride.4 a
>   trm.4 tsllux.4 tty.4 tun.4 tqphy.4 

CVS commit: src/share/man/man4

2019-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 28 13:38:03 UTC 2019

Modified Files:
src/share/man/man4: nct.4

Log Message:
Sort SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/nct.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2019-10-28 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Oct 28 13:04:19 UTC 2019

Modified Files:
src/distrib/sets/lists/base: md.amd64
src/distrib/sets/lists/man: mi
src/share/mk: bsd.hostprog.mk
src/usr.sbin: Makefile
Added Files:
src/usr.sbin/nvmmctl: Makefile nvmmctl.8 nvmmctl.c

Log Message:
Add nvmmctl, with two commands for now.


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.1659 -r1.1660 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.81 -r1.82 src/share/mk/bsd.hostprog.mk
cvs rdiff -u -r1.281 -r1.282 src/usr.sbin/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.sbin/nvmmctl/Makefile \
src/usr.sbin/nvmmctl/nvmmctl.8 src/usr.sbin/nvmmctl/nvmmctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2019-10-28 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Oct 28 13:04:19 UTC 2019

Modified Files:
src/distrib/sets/lists/base: md.amd64
src/distrib/sets/lists/man: mi
src/share/mk: bsd.hostprog.mk
src/usr.sbin: Makefile
Added Files:
src/usr.sbin/nvmmctl: Makefile nvmmctl.8 nvmmctl.c

Log Message:
Add nvmmctl, with two commands for now.


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.1659 -r1.1660 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.81 -r1.82 src/share/mk/bsd.hostprog.mk
cvs rdiff -u -r1.281 -r1.282 src/usr.sbin/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.sbin/nvmmctl/Makefile \
src/usr.sbin/nvmmctl/nvmmctl.8 src/usr.sbin/nvmmctl/nvmmctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/base/md.amd64
diff -u src/distrib/sets/lists/base/md.amd64:1.280 src/distrib/sets/lists/base/md.amd64:1.281
--- src/distrib/sets/lists/base/md.amd64:1.280	Mon Aug 26 04:49:45 2019
+++ src/distrib/sets/lists/base/md.amd64	Mon Oct 28 13:04:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.280 2019/08/26 04:49:45 kamil Exp $
+# $NetBSD: md.amd64,v 1.281 2019/10/28 13:04:18 maxv Exp $
 ./dev/lms0	base-obsolete		obsolete
 ./dev/mms0	base-obsolete		obsolete
 ./libexec/ld.elf_so-i386			base-sys-shlib		compat,pic
@@ -71,3 +71,4 @@
 ./usr/mdec/pxeboot_ia32_com0.bin		base-obsolete		obsolete
 ./usr/sbin/acpidumpbase-sysutil-bin
 ./usr/sbin/amldbbase-sysutil-bin
+./usr/sbin/nvmmctlbase-sysutil-bin

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1659 src/distrib/sets/lists/man/mi:1.1660
--- src/distrib/sets/lists/man/mi:1.1659	Mon Oct 28 02:56:40 2019
+++ src/distrib/sets/lists/man/mi	Mon Oct 28 13:04:18 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1659 2019/10/28 02:56:40 ozaki-r Exp $
+# $NetBSD: mi,v 1.1660 2019/10/28 13:04:18 maxv Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2873,6 +2873,7 @@
 ./usr/share/man/cat8/ntptime.0			man-ntp-catman		.cat
 ./usr/share/man/cat8/ntptrace.0			man-ntp-catman		.cat
 ./usr/share/man/cat8/nvmectl.0			man-sysutil-catman	.cat
+./usr/share/man/cat8/nvmmctl.0			man-sysutil-catman	.cat
 ./usr/share/man/cat8/ofctl.0			man-sysutil-catman	.cat
 ./usr/share/man/cat8/ofppc/MAKEDEV.0		man-obsolete		obsolete
 ./usr/share/man/cat8/ofppc/makedev.0		man-obsolete		obsolete
@@ -5823,6 +5824,7 @@
 ./usr/share/man/html8/ntptime.html		man-ntp-htmlman		html
 ./usr/share/man/html8/ntptrace.html		man-ntp-htmlman		html
 ./usr/share/man/html8/nvmectl.html		man-sysutil-htmlman	html
+./usr/share/man/html8/nvmmctl.html		man-sysutil-htmlman	html
 ./usr/share/man/html8/ofctl.html		man-sysutil-htmlman	html
 ./usr/share/man/html8/oqmgr.html		man-postfix-htmlman	postfix,html
 ./usr/share/man/html8/pac.html			man-sysutil-htmlman	html
@@ -8997,6 +8999,7 @@
 ./usr/share/man/man8/ntptime.8			man-ntp-man		.man
 ./usr/share/man/man8/ntptrace.8			man-ntp-man		.man
 ./usr/share/man/man8/nvmectl.8			man-sysutil-man		.man
+./usr/share/man/man8/nvmmctl.8			man-sysutil-man		.man
 ./usr/share/man/man8/ofctl.8			man-sysutil-man		.man
 ./usr/share/man/man8/ofppc/MAKEDEV.8		man-obsolete		obsolete
 ./usr/share/man/man8/ofppc/makedev.8		man-obsolete		obsolete

Index: src/share/mk/bsd.hostprog.mk
diff -u src/share/mk/bsd.hostprog.mk:1.81 src/share/mk/bsd.hostprog.mk:1.82
--- src/share/mk/bsd.hostprog.mk:1.81	Mon Jan 21 21:11:54 2019
+++ src/share/mk/bsd.hostprog.mk	Mon Oct 28 13:04:19 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.hostprog.mk,v 1.81 2019/01/21 21:11:54 christos Exp $
+#	$NetBSD: bsd.hostprog.mk,v 1.82 2019/10/28 13:04:19 maxv Exp $
 #	@(#)bsd.prog.mk	8.2 (Berkeley) 4/2/94
 
 .include 
@@ -39,6 +39,7 @@ LIBMAGIC?=	/usr/lib/libmagic.a
 LIBMENU?=	/usr/lib/libmenu.a
 LIBMP?=		/usr/lib/libmp.a
 LIBNTP?=	/usr/lib/libntp.a
+LIBNVMM?=	/usr/lib/libnvmm.a
 LIBOBJC?=	/usr/lib/libobjc.a
 LIBP2K?=	/usr/lib/libp2k.a
 LIBPANEL?=	/usr/lib/libpanel.a

Index: src/usr.sbin/Makefile
diff -u src/usr.sbin/Makefile:1.281 src/usr.sbin/Makefile:1.282
--- src/usr.sbin/Makefile:1.281	Tue Oct 15 18:33:23 2019
+++ src/usr.sbin/Makefile	Mon Oct 28 13:04:18 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.281 2019/10/15 18:33:23 christos Exp $
+#	$NetBSD: Makefile,v 1.282 2019/10/28 13:04:18 maxv Exp $
 #	from: @(#)Makefile	5.20 (Berkeley) 6/12/93
 
 .include 
@@ -54,6 +54,8 @@ SUBDIR+=mld6query route6d rtadvd tracero
 
 SUBDIR+= racoon racoonctl
 
+SUBDIR+= nvmmctl
+
 # NPF
 .if (${MKNPF} != "no")
 SUBDIR+=npf

Added files:

Index: src/usr.sbin/nvmmctl/Makefile
diff -u /dev/null src/usr.sbin/nvmmctl/Makefile:1.1
--- /dev/null	Mon Oct 28 13:04:19 2019
+++ src/usr.sbin/nvmmctl/Makefile	Mon Oct 28 13:04:18 2019
@@ -0,0 +1,16 @@
+#	$NetBSD: Makefile,v 1.1 2019/10/28 13:04:18 maxv Exp $
+
+.include 
+
+MAN=	nvmmctl.8
+
+.if (${MACHINE_ARCH} == "x86_64")

CVS commit: src/share/man/man4

2019-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 28 13:38:03 UTC 2019

Modified Files:
src/share/man/man4: nct.4

Log Message:
Sort SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/nct.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/nct.4
diff -u src/share/man/man4/nct.4:1.1 src/share/man/man4/nct.4:1.2
--- src/share/man/man4/nct.4:1.1	Fri Oct 25 17:39:57 2019
+++ src/share/man/man4/nct.4	Mon Oct 28 13:38:03 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: nct.4,v 1.1 2019/10/25 17:39:57 martin Exp $
+.\"	$NetBSD: nct.4,v 1.2 2019/10/28 13:38:03 wiz Exp $
 .\"
 .\" Copyright (c) 2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -60,8 +60,8 @@ driver will not take control of the corr
 At attach time, the driver logs which of the 17 GPIO lines are enabled.
 .Sh SEE ALSO
 .Xr gpio 4 ,
-.Xr gpioctl 8 ,
-.Xr isa 4
+.Xr isa 4 ,
+.Xr gpioctl 8
 .Sh HISTORY
 The
 .Nm



CVS commit: src/lib/libnvmm

2019-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 28 13:43:42 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm.3

Log Message:
Macro tidyness.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libnvmm/libnvmm.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libnvmm/libnvmm.3
diff -u src/lib/libnvmm/libnvmm.3:1.23 src/lib/libnvmm/libnvmm.3:1.24
--- src/lib/libnvmm/libnvmm.3:1.23	Mon Oct 28 08:30:49 2019
+++ src/lib/libnvmm/libnvmm.3	Mon Oct 28 13:43:42 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: libnvmm.3,v 1.23 2019/10/28 08:30:49 maxv Exp $
+.\"	$NetBSD: libnvmm.3,v 1.24 2019/10/28 13:43:42 wiz Exp $
 .\"
 .\" Copyright (c) 2018, 2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -344,7 +344,8 @@ Emulator software can configure several 
 Currently, no parameters are implemented.
 .Ss VCPU Configuration
 Emulator software can configure several parameters of a VCPU by using
-.Fn nvmm_vcpu_configure , which can take the following operations:
+.Fn nvmm_vcpu_configure ,
+which can take the following operations:
 .Bd -literal
 #define NVMM_VCPU_CONF_CALLBACKS	0
 	...



CVS commit: src/usr.sbin/puffs/mount_9p

2019-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 28 13:42:28 UTC 2019

Modified Files:
src/usr.sbin/puffs/mount_9p: mount_9p.8

Log Message:
Sort SEE ALSO. "file system" police.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/puffs/mount_9p/mount_9p.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/puffs/mount_9p/mount_9p.8
diff -u src/usr.sbin/puffs/mount_9p/mount_9p.8:1.11 src/usr.sbin/puffs/mount_9p/mount_9p.8:1.12
--- src/usr.sbin/puffs/mount_9p/mount_9p.8:1.11	Mon Oct 28 02:59:25 2019
+++ src/usr.sbin/puffs/mount_9p/mount_9p.8	Mon Oct 28 13:42:28 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mount_9p.8,v 1.11 2019/10/28 02:59:25 ozaki-r Exp $
+.\"	$NetBSD: mount_9p.8,v 1.12 2019/10/28 13:42:28 wiz Exp $
 .\"
 .\" Copyright (c) 2007 Antti Kantee.  All rights reserved.
 .\"
@@ -60,7 +60,7 @@ must be an absolute path.
 .Pp
 The
 .Fl c
-opiton enables to mount a filesystem exported by a VM host through
+opiton enables to mount a file system exported by a VM host through
 a character device file
 .Ar devfile
 backed by the
@@ -92,8 +92,8 @@ environments.
 .Sh SEE ALSO
 .Xr puffs 3 ,
 .Xr puffs 4 ,
-.Xr mount 8 ,
-.Xr vio9p 4
+.Xr vio9p 4 ,
+.Xr mount 8
 .Rs
 .%T RFC and standards documents relating the 9P protocol
 .%U http://ericvh.github.io/9p-rfc/



CVS commit: src/usr.sbin/nvmmctl

2019-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 28 13:44:42 UTC 2019

Modified Files:
src/usr.sbin/nvmmctl: nvmmctl.8

Log Message:
Sort SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/nvmmctl/nvmmctl.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/puffs/mount_9p

2019-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 28 13:42:28 UTC 2019

Modified Files:
src/usr.sbin/puffs/mount_9p: mount_9p.8

Log Message:
Sort SEE ALSO. "file system" police.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/puffs/mount_9p/mount_9p.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libnvmm

2019-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 28 13:43:42 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm.3

Log Message:
Macro tidyness.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libnvmm/libnvmm.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2019-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 28 13:43:10 UTC 2019

Modified Files:
src/share/man/man4: vio9p.4

Log Message:
"file system" police.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/vio9p.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2019-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 28 13:43:10 UTC 2019

Modified Files:
src/share/man/man4: vio9p.4

Log Message:
"file system" police.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/vio9p.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/vio9p.4
diff -u src/share/man/man4/vio9p.4:1.2 src/share/man/man4/vio9p.4:1.3
--- src/share/man/man4/vio9p.4:1.2	Mon Oct 28 13:41:31 2019
+++ src/share/man/man4/vio9p.4	Mon Oct 28 13:43:10 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: vio9p.4,v 1.2 2019/10/28 13:41:31 wiz Exp $
+.\" $NetBSD: vio9p.4,v 1.3 2019/10/28 13:43:10 wiz Exp $
 .\"
 .\" Copyright (c) 2019 Internet Initiative Japan, Inc.
 .\" All rights reserved.
@@ -39,12 +39,12 @@ the
 .Nm
 driver enables a
 .Nx
-system running as a VM guest to mount an exported filesystem
+system running as a VM guest to mount an exported file system
 by the host via virtio-9p.
 It exports a 9p end-point of virtio-9p via a character device file for
 .Xr mount_9p 8 .
 .Pp
-Each exported filesystem is assigned a character device and accesible via
+Each exported file system is assigned a character device and accesible via
 .Pa /dev/vio9p0 ,
 .Pa /dev/vio9p1
 and so on, respectively, in exporting order by the host.
@@ -53,7 +53,7 @@ and so on, respectively, in exporting or
 .It Pa /dev/vio9p?
 .El
 .Sh EXAMPLES
-The following command mounts the first exported filesystem by the host at
+The following command mounts the first exported file system by the host at
 .Pa /mnt/9p :
 .Bd -literal -offset indent
 # mount_9p -cu /dev/vio9p0 /mnt/9p



CVS commit: src/share/man/man4

2019-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 28 13:41:31 UTC 2019

Modified Files:
src/share/man/man4: vio9p.4

Log Message:
Use Nx. Improve wording. Sort SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/vio9p.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2019-10-28 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Oct 28 13:19:50 UTC 2019

Modified Files:
src/distrib/sets/lists/modules: mi
src/sys/modules: Makefile

Log Message:
Disable filemon.

It isn't suited for general use (that is, it poses security risks),
but the existence of the module means it is auto-loaded when /dev/filemon
is opened, which can be done by any user.

Thanks Ilja van Sprundel for the heads up.


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.228 -r1.229 src/sys/modules/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2019-10-28 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Oct 28 13:19:50 UTC 2019

Modified Files:
src/distrib/sets/lists/modules: mi
src/sys/modules: Makefile

Log Message:
Disable filemon.

It isn't suited for general use (that is, it poses security risks),
but the existence of the module means it is auto-loaded when /dev/filemon
is opened, which can be done by any user.

Thanks Ilja van Sprundel for the heads up.


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.228 -r1.229 src/sys/modules/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/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.126 src/distrib/sets/lists/modules/mi:1.127
--- src/distrib/sets/lists/modules/mi:1.126	Sun Sep 22 22:59:37 2019
+++ src/distrib/sets/lists/modules/mi	Mon Oct 28 13:19:50 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.126 2019/09/22 22:59:37 christos Exp $
+# $NetBSD: mi,v 1.127 2019/10/28 13:19:50 maya Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -168,8 +168,8 @@
 ./@MODULEDIR@/ffs/ffs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/filecorebase-kernel-modules	kmod
 ./@MODULEDIR@/filecore/filecore.kmod		base-kernel-modules	kmod
-./@MODULEDIR@/filemonbase-kernel-modules	kmod
-./@MODULEDIR@/filemon/filemon.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/filemonbase-obsolete		obsolete
+./@MODULEDIR@/filemon/filemon.kmod		base-obsolete		obsolete
 ./@MODULEDIR@/flashbase-kernel-modules	kmod
 ./@MODULEDIR@/flash/flash.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/fssbase-kernel-modules	kmod

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.228 src/sys/modules/Makefile:1.229
--- src/sys/modules/Makefile:1.228	Mon Oct 28 02:56:40 2019
+++ src/sys/modules/Makefile	Mon Oct 28 13:19:50 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.228 2019/10/28 02:56:40 ozaki-r Exp $
+#	$NetBSD: Makefile,v 1.229 2019/10/28 13:19:50 maya Exp $
 
 .include 
 
@@ -54,7 +54,7 @@ SUBDIR+=	exec_script
 SUBDIR+=	fdesc
 SUBDIR+=	ffs
 SUBDIR+=	filecore
-SUBDIR+=	filemon
+#SUBDIR+=	filemon
 SUBDIR+=	flash
 SUBDIR+=	fss
 SUBDIR+=	gpio



CVS commit: src/share/man/man4

2019-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 28 13:41:31 UTC 2019

Modified Files:
src/share/man/man4: vio9p.4

Log Message:
Use Nx. Improve wording. Sort SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/vio9p.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/vio9p.4
diff -u src/share/man/man4/vio9p.4:1.1 src/share/man/man4/vio9p.4:1.2
--- src/share/man/man4/vio9p.4:1.1	Mon Oct 28 02:56:40 2019
+++ src/share/man/man4/vio9p.4	Mon Oct 28 13:41:31 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: vio9p.4,v 1.1 2019/10/28 02:56:40 ozaki-r Exp $
+.\" $NetBSD: vio9p.4,v 1.2 2019/10/28 13:41:31 wiz Exp $
 .\"
 .\" Copyright (c) 2019 Internet Initiative Japan, Inc.
 .\" All rights reserved.
@@ -34,9 +34,12 @@
 .Cd "vio9p* at virtio?"
 .Sh DESCRIPTION
 In conjunction with
-.Xr mount_9p 8 , the
+.Xr mount_9p 8 ,
+the
 .Nm
-driver enables a NetBSD system running as a VM guest to mount an exported filesystem
+driver enables a
+.Nx
+system running as a VM guest to mount an exported filesystem
 by the host via virtio-9p.
 It exports a 9p end-point of virtio-9p via a character device file for
 .Xr mount_9p 8 .
@@ -44,20 +47,20 @@ It exports a 9p end-point of virtio-9p v
 Each exported filesystem is assigned a character device and accesible via
 .Pa /dev/vio9p0 ,
 .Pa /dev/vio9p1
-and so on, respectively in exporting order by the host.
+and so on, respectively, in exporting order by the host.
 .Sh FILES
 .Bl -tag -width XdevXvio9pX -compact
 .It Pa /dev/vio9p?
 .El
 .Sh EXAMPLES
-The following command mounts a first exported filesystem by the host at
+The following command mounts the first exported filesystem by the host at
 .Pa /mnt/9p :
 .Bd -literal -offset indent
 # mount_9p -cu /dev/vio9p0 /mnt/9p
 .Ed
 .Sh SEE ALSO
-.Xr mount_9p 8 ,
-.Xr virtio 4
+.Xr virtio 4 ,
+.Xr mount_9p 8
 .Sh HISTORY
 The
 .Nm



CVS commit: src/usr.sbin/nvmmctl

2019-10-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Oct 28 13:44:42 UTC 2019

Modified Files:
src/usr.sbin/nvmmctl: nvmmctl.8

Log Message:
Sort SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/nvmmctl/nvmmctl.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/nvmmctl/nvmmctl.8
diff -u src/usr.sbin/nvmmctl/nvmmctl.8:1.1 src/usr.sbin/nvmmctl/nvmmctl.8:1.2
--- src/usr.sbin/nvmmctl/nvmmctl.8:1.1	Mon Oct 28 13:04:18 2019
+++ src/usr.sbin/nvmmctl/nvmmctl.8	Mon Oct 28 13:44:42 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: nvmmctl.8,v 1.1 2019/10/28 13:04:18 maxv Exp $
+.\"	$NetBSD: nvmmctl.8,v 1.2 2019/10/28 13:44:42 wiz Exp $
 .\"
 .\" Copyright (c) 2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -54,8 +54,8 @@ Display the capabilities of the system.
 Display information on each virtual machine registered in the system.
 .El
 .Sh SEE ALSO
-.Xr nvmm 4 ,
-.Xr libnvmm 3
+.Xr libnvmm 3 ,
+.Xr nvmm 4
 .Sh AUTHORS
 The
 .Nm



CVS commit: src/lib/libnvmm

2019-10-28 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Oct 28 14:20:28 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm.3

Log Message:
should be fork(2), noticed by wiz


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libnvmm/libnvmm.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libnvmm/libnvmm.3
diff -u src/lib/libnvmm/libnvmm.3:1.24 src/lib/libnvmm/libnvmm.3:1.25
--- src/lib/libnvmm/libnvmm.3:1.24	Mon Oct 28 13:43:42 2019
+++ src/lib/libnvmm/libnvmm.3	Mon Oct 28 14:20:28 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: libnvmm.3,v 1.24 2019/10/28 13:43:42 wiz Exp $
+.\"	$NetBSD: libnvmm.3,v 1.25 2019/10/28 14:20:28 maxv Exp $
 .\"
 .\" Copyright (c) 2018, 2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -336,7 +336,7 @@ if they were not already destroyed by th
 .Fn nvmm_machine_destroy .
 .Pp
 Virtual machines are not inherited across
-.Xr fork 9
+.Xr fork 2
 operations.
 .Ss Machine Configuration
 Emulator software can configure several parameters of a virtual machine by using



CVS commit: src/lib/libnvmm

2019-10-28 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Oct 28 14:20:28 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm.3

Log Message:
should be fork(2), noticed by wiz


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libnvmm/libnvmm.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/modules

2019-10-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 28 16:03:55 UTC 2019

Modified Files:
src/sys/modules: Makefile
src/sys/modules/filemon: Makefile

Log Message:
Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 src/sys/modules/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/filemon/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/Makefile
diff -u src/sys/modules/Makefile:1.229 src/sys/modules/Makefile:1.230
--- src/sys/modules/Makefile:1.229	Mon Oct 28 13:19:50 2019
+++ src/sys/modules/Makefile	Mon Oct 28 16:03:55 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.229 2019/10/28 13:19:50 maya Exp $
+#	$NetBSD: Makefile,v 1.230 2019/10/28 16:03:55 pgoyette Exp $
 
 .include 
 
@@ -54,7 +54,7 @@ SUBDIR+=	exec_script
 SUBDIR+=	fdesc
 SUBDIR+=	ffs
 SUBDIR+=	filecore
-#SUBDIR+=	filemon
+SUBDIR+=	filemon
 SUBDIR+=	flash
 SUBDIR+=	fss
 SUBDIR+=	gpio

Index: src/sys/modules/filemon/Makefile
diff -u src/sys/modules/filemon/Makefile:1.3 src/sys/modules/filemon/Makefile:1.4
--- src/sys/modules/filemon/Makefile:1.3	Sun Oct 13 07:28:13 2019
+++ src/sys/modules/filemon/Makefile	Mon Oct 28 16:03:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2019/10/13 07:28:13 mrg Exp $
+# $NetBSD: Makefile,v 1.4 2019/10/28 16:03:55 pgoyette Exp $
 
 .include "../Makefile.inc"
 
@@ -11,4 +11,10 @@ NOMAN = no
 
 COPTS.filemon_wrapper.c+=	${GCC_NO_CAST_FUNCTION_TYPE}
 
+# Due to security concerns, we don't install the filemon module.  We
+# do, however, want to keep building it to prevent bit-rot.  Define
+# an empty install target for this.
+
+kmodinstall:
+
 .include 



CVS commit: src/sys/modules

2019-10-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 28 16:03:55 UTC 2019

Modified Files:
src/sys/modules: Makefile
src/sys/modules/filemon: Makefile

Log Message:
Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 src/sys/modules/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/filemon/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/zaurus/stand/zbsdmod

2019-10-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Oct 28 15:26:09 UTC 2019

Modified Files:
src/sys/arch/zaurus/stand/zbsdmod: compat_linux.h zbsdmod.c

Log Message:
Make sure to clear bss before jumping to a kernel copied from load buffer.

This will fix yet another boot failure issue
"screen white-out after loading a kernel"
 https://mail-index.netbsd.org/port-zaurus/2019/10/26/msg72.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.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/zaurus/stand/zbsdmod

2019-10-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Oct 28 15:26:09 UTC 2019

Modified Files:
src/sys/arch/zaurus/stand/zbsdmod: compat_linux.h zbsdmod.c

Log Message:
Make sure to clear bss before jumping to a kernel copied from load buffer.

This will fix yet another boot failure issue
"screen white-out after loading a kernel"
 https://mail-index.netbsd.org/port-zaurus/2019/10/26/msg72.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.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/zaurus/stand/zbsdmod/compat_linux.h
diff -u src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h:1.6 src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h:1.7
--- src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h:1.6	Sun Dec 11 14:05:39 2011
+++ src/sys/arch/zaurus/stand/zbsdmod/compat_linux.h	Mon Oct 28 15:26:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_linux.h,v 1.6 2011/12/11 14:05:39 nonaka Exp $	*/
+/*	$NetBSD: compat_linux.h,v 1.7 2019/10/28 15:26:09 tsutsui Exp $	*/
 /*	$OpenBSD: compat_linux.h,v 1.5 2006/01/15 17:58:27 deraadt Exp $	*/
 
 /*
@@ -64,6 +64,7 @@ extern	int register_chrdev(unsigned int,
 extern	int unregister_chrdev(unsigned int, const char *);
 extern	void printk(const char *, ...) __printflike(1, 2);
 extern	void *memcpy(void *, const void *, size_t);
+extern	void *memset(void *, int, size_t);
 
 /* procfs support */
 struct proc_dir_entry {

Index: src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c
diff -u src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.10 src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.11
--- src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c:1.10	Sat Oct 26 09:58:40 2019
+++ src/sys/arch/zaurus/stand/zbsdmod/zbsdmod.c	Mon Oct 28 15:26:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: zbsdmod.c,v 1.10 2019/10/26 09:58:40 tsutsui Exp $	*/
+/*	$NetBSD: zbsdmod.c,v 1.11 2019/10/28 15:26:09 tsutsui Exp $	*/
 /*	$OpenBSD: zbsdmod.c,v 1.7 2005/05/02 02:45:29 uwe Exp $	*/
 
 /*
@@ -262,6 +262,10 @@ elf32bsdboot(void)
 (((char *)elf) + phdr[i].p_offset)[sz];
 			}
 		}
+		if (IS_BSS(phdr[i])) {
+			memset((void *)(phdr[i].p_vaddr + phdr[i].p_filesz), 0,
+			phdr[i].p_memsz - phdr[i].p_filesz);
+		}
 	}
 
 	addr = (int *)(elf->e_entry);



CVS commit: src/distrib/sets/lists/debug

2019-10-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 28 15:42:08 UTC 2019

Modified Files:
src/distrib/sets/lists/debug: md.amd64

Log Message:
Add debug entry for newly introduced nvmmctl utility.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/distrib/sets/lists/debug/md.amd64

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/debug/md.amd64
diff -u src/distrib/sets/lists/debug/md.amd64:1.105 src/distrib/sets/lists/debug/md.amd64:1.106
--- src/distrib/sets/lists/debug/md.amd64:1.105	Tue Feb  5 13:00:03 2019
+++ src/distrib/sets/lists/debug/md.amd64	Mon Oct 28 15:42:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.105 2019/02/05 13:00:03 maxv Exp $
+# $NetBSD: md.amd64,v 1.106 2019/10/28 15:42:07 pgoyette Exp $
 ./usr/lib/i386/12.202++_g.a			comp-c-debuglib		debuglib,compat,12.202xx
 ./usr/lib/i386/libi386_g.a			comp-c-debuglib		debuglib,compat
 ./usr/lib/i386/libiberty_g.a			comp-obsolete		obsolete
@@ -18,6 +18,7 @@
 ./usr/libdata/debug/usr/libexec/ld.elf_so-i386.debug	comp-sys-debug		debug,compat
 ./usr/libdata/debug/usr/sbin/acpidump.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/amldb.debug	comp-sysutil-debug	debug
+./usr/libdata/debug/usr/sbin/nvmmctl.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait.debug	tests-obsolete	obsolete
 ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait3.debug	tests-obsolete	obsolete
 ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait4.debug	tests-obsolete	obsolete



CVS commit: src/distrib/sets/lists/debug

2019-10-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Oct 28 15:42:08 UTC 2019

Modified Files:
src/distrib/sets/lists/debug: md.amd64

Log Message:
Add debug entry for newly introduced nvmmctl utility.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/distrib/sets/lists/debug/md.amd64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/lib

2019-10-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Oct 28 16:25:05 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libasan: Makefile
src/external/gpl3/gcc/lib/liblsan: Makefile
src/external/gpl3/gcc/lib/libubsan: Makefile

Log Message:
vaxinate sanitizer_file.cc against the optimizer virus.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/external/gpl3/gcc/lib/libasan/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/lib/liblsan/Makefile
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/lib/libubsan/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/lib

2019-10-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Oct 28 16:25:05 UTC 2019

Modified Files:
src/external/gpl3/gcc/lib/libasan: Makefile
src/external/gpl3/gcc/lib/liblsan: Makefile
src/external/gpl3/gcc/lib/libubsan: Makefile

Log Message:
vaxinate sanitizer_file.cc against the optimizer virus.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/external/gpl3/gcc/lib/libasan/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/lib/liblsan/Makefile
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/lib/libubsan/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/gpl3/gcc/lib/libasan/Makefile
diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.30 src/external/gpl3/gcc/lib/libasan/Makefile:1.31
--- src/external/gpl3/gcc/lib/libasan/Makefile:1.30	Sun Oct 13 17:18:20 2019
+++ src/external/gpl3/gcc/lib/libasan/Makefile	Mon Oct 28 12:25:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2019/10/13 21:18:20 mrg Exp $
+# $NetBSD: Makefile,v 1.31 2019/10/28 16:25:05 christos Exp $
 
 UNSUPPORTED_COMPILER.clang=	# defined
 NOSANITIZER=	# defined
@@ -51,6 +51,7 @@ CPPFLAGS+=-DCAN_SANITIZE_UB=0
 .if ${MACHINE_ARCH} == "vax"
 COPTS.asan_allocator.cc += -O1
 COPTS.asan_report.cc += -O1
+COPTS.sanitizer_file.cc += -O1
 COPTS.ubsan_diag.cc += -O1
 COPTS.ubsan_init.cc += -O1
 .endif

Index: src/external/gpl3/gcc/lib/liblsan/Makefile
diff -u src/external/gpl3/gcc/lib/liblsan/Makefile:1.5 src/external/gpl3/gcc/lib/liblsan/Makefile:1.6
--- src/external/gpl3/gcc/lib/liblsan/Makefile:1.5	Tue Oct  1 22:54:34 2019
+++ src/external/gpl3/gcc/lib/liblsan/Makefile	Mon Oct 28 12:25:05 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2019/10/02 02:54:34 mrg Exp $
+# $NetBSD: Makefile,v 1.6 2019/10/28 16:25:05 christos Exp $
 
 .include 
 
@@ -18,6 +18,7 @@ LSAN_SRCS+= \
 
 .if ${MACHINE_ARCH} == "vax"
 COPTS.lsan_allocator.cc += -O1
+COPTS.sanitizer_file.cc += -O1
 .endif
 
 LIB=	lsan

Index: src/external/gpl3/gcc/lib/libubsan/Makefile
diff -u src/external/gpl3/gcc/lib/libubsan/Makefile:1.15 src/external/gpl3/gcc/lib/libubsan/Makefile:1.16
--- src/external/gpl3/gcc/lib/libubsan/Makefile:1.15	Sat Oct  5 20:15:22 2019
+++ src/external/gpl3/gcc/lib/libubsan/Makefile	Mon Oct 28 12:25:05 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2019/10/06 00:15:22 mrg Exp $
+#	$NetBSD: Makefile,v 1.16 2019/10/28 16:25:05 christos Exp $
 
 UNSUPPORTED_COMPILER.clang=	# defined
 LIBISCXX = yes
@@ -25,6 +25,10 @@ UBSAN_SRCS= \
 COPTS.${_s}.cc+=-frtti
 .endfor
 
+.if ${MACHINE_ARCH} == "vax"
+COPTS.sanitizer_file.cc += -O1
+.endif
+
 LIB=	ubsan
 SRCS+=	${UBSAN_SRCS}
 LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt



CVS commit: [netbsd-9] src

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 16:37:55 UTC 2019

Modified Files:
src/distrib/sets/lists/modules [netbsd-9]: mi
src/sys/modules/filemon [netbsd-9]: Makefile

Log Message:
Pull up following revision(s) (requested by maya in ticket #385):

distrib/sets/lists/modules/mi: revision 1.127
sys/modules/Makefile: revision 1.230
sys/modules/filemon/Makefile: revision 1.4 (manually adjusted)
sys/modules/Makefile: revision 1.229

Disable filemon.

It isn't suited for general use (that is, it poses security risks),
but the existence of the module means it is auto-loaded when /dev/filemon
is opened, which can be done by any user.

Thanks Ilja van Sprundel for the heads up.

 -

Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.122.2.1 -r1.122.2.2 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.2 -r1.2.22.1 src/sys/modules/filemon/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 16:37:55 UTC 2019

Modified Files:
src/distrib/sets/lists/modules [netbsd-9]: mi
src/sys/modules/filemon [netbsd-9]: Makefile

Log Message:
Pull up following revision(s) (requested by maya in ticket #385):

distrib/sets/lists/modules/mi: revision 1.127
sys/modules/Makefile: revision 1.230
sys/modules/filemon/Makefile: revision 1.4 (manually adjusted)
sys/modules/Makefile: revision 1.229

Disable filemon.

It isn't suited for general use (that is, it poses security risks),
but the existence of the module means it is auto-loaded when /dev/filemon
is opened, which can be done by any user.

Thanks Ilja van Sprundel for the heads up.

 -

Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.122.2.1 -r1.122.2.2 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.2 -r1.2.22.1 src/sys/modules/filemon/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/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.122.2.1 src/distrib/sets/lists/modules/mi:1.122.2.2
--- src/distrib/sets/lists/modules/mi:1.122.2.1	Sun Sep  1 13:00:37 2019
+++ src/distrib/sets/lists/modules/mi	Mon Oct 28 16:37:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.122.2.1 2019/09/01 13:00:37 martin Exp $
+# $NetBSD: mi,v 1.122.2.2 2019/10/28 16:37:55 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -166,8 +166,8 @@
 ./@MODULEDIR@/ffs/ffs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/filecorebase-kernel-modules	kmod
 ./@MODULEDIR@/filecore/filecore.kmod		base-kernel-modules	kmod
-./@MODULEDIR@/filemonbase-kernel-modules	kmod
-./@MODULEDIR@/filemon/filemon.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/filemonbase-obsolete		obsolete
+./@MODULEDIR@/filemon/filemon.kmod		base-obsolete		obsolete
 ./@MODULEDIR@/flashbase-kernel-modules	kmod
 ./@MODULEDIR@/flash/flash.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/fssbase-kernel-modules	kmod

Index: src/sys/modules/filemon/Makefile
diff -u src/sys/modules/filemon/Makefile:1.2 src/sys/modules/filemon/Makefile:1.2.22.1
--- src/sys/modules/filemon/Makefile:1.2	Thu Aug 20 11:05:01 2015
+++ src/sys/modules/filemon/Makefile	Mon Oct 28 16:37:55 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2015/08/20 11:05:01 christos Exp $
+# $NetBSD: Makefile,v 1.2.22.1 2019/10/28 16:37:55 martin Exp $
 
 .include "../Makefile.inc"
 
@@ -9,4 +9,10 @@ IOCONF=	filemon.ioconf
 SRCS = filemon.c filemon_wrapper.c
 NOMAN = no
 
+# Due to security concerns, we don't install the filemon module.  We
+# do, however, want to keep building it to prevent bit-rot.  Define
+# an empty install target for this.
+
+kmodinstall:
+
 .include 



CVS commit: [netbsd-9] src/doc

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 16:41:31 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Ticket #385


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.88 -r1.1.2.89 src/doc/CHANGES-9.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/doc

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 16:41:31 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Ticket #385


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.88 -r1.1.2.89 src/doc/CHANGES-9.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.88 src/doc/CHANGES-9.0:1.1.2.89
--- src/doc/CHANGES-9.0:1.1.2.88	Mon Oct 28 02:58:09 2019
+++ src/doc/CHANGES-9.0	Mon Oct 28 16:41:31 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.88 2019/10/28 02:58:09 msaitoh Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.89 2019/10/28 16:41:31 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -5306,3 +5306,12 @@ usr.sbin/sysinst/partitions.h			1.7
 	- In non-MBR specific files, #ifdef all tests for MBR for architectures
 	  that do not even compile in MBR support.
 	[martin, ticket #382]
+
+distrib/sets/lists/modules/mi			1.127
+sys/modules/Makefile1.229,1.230
+sys/modules/filemon/Makefile			1.4 (manually adjusted)
+
+	Do not install the filemon module.
+	[maya, ticket #385]
+
+



CVS commit: [netbsd-7] src

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:03:46 UTC 2019

Modified Files:
src/distrib/sets/lists/modules [netbsd-7]: mi
src/sys/modules/filemon [netbsd-7]: Makefile

Log Message:
Pull up following revision(s) (requested by maya in ticket #1710):

distrib/sets/lists/modules/mi: revision 1.127
sys/modules/Makefile: revision 1.230
sys/modules/filemon/Makefile: revision 1.4 (manually adjusted)
sys/modules/Makefile: revision 1.229

Disable filemon.

It isn't suited for general use (that is, it poses security risks),
but the existence of the module means it is auto-loaded when /dev/filemon
is opened, which can be done by any user.

Thanks Ilja van Sprundel for the heads up.

 -

Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.69.2.1 -r1.69.2.2 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.1 -r1.1.40.1 src/sys/modules/filemon/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/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.69.2.1 src/distrib/sets/lists/modules/mi:1.69.2.2
--- src/distrib/sets/lists/modules/mi:1.69.2.1	Sat Mar 21 17:11:35 2015
+++ src/distrib/sets/lists/modules/mi	Mon Oct 28 18:03:46 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.69.2.1 2015/03/21 17:11:35 snj Exp $
+# $NetBSD: mi,v 1.69.2.2 2019/10/28 18:03:46 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -76,8 +76,8 @@
 ./@MODULEDIR@/ffs/ffs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/filecorebase-kernel-modules	kmod
 ./@MODULEDIR@/filecore/filecore.kmod		base-kernel-modules	kmod
-./@MODULEDIR@/filemonbase-kernel-modules	kmod
-./@MODULEDIR@/filemon/filemon.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/filemonbase-obsolete		obsolete
+./@MODULEDIR@/filemon/filemon.kmod		base-obsolete		obsolete
 ./@MODULEDIR@/flashbase-kernel-modules	kmod
 ./@MODULEDIR@/flash/flash.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/fssbase-kernel-modules	kmod

Index: src/sys/modules/filemon/Makefile
diff -u src/sys/modules/filemon/Makefile:1.1 src/sys/modules/filemon/Makefile:1.1.40.1
--- src/sys/modules/filemon/Makefile:1.1	Thu Sep  9 00:10:16 2010
+++ src/sys/modules/filemon/Makefile	Mon Oct 28 18:03:46 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2010/09/09 00:10:16 sjg Exp $
+# $NetBSD: Makefile,v 1.1.40.1 2019/10/28 18:03:46 martin Exp $
 
 .include "../Makefile.inc"
 
@@ -8,4 +8,10 @@ KMOD = filemon
 SRCS = filemon.c filemon_wrapper.c
 NOMAN = no
 
+# Due to security concerns, we don't install the filemon module.  We
+# do, however, want to keep building it to prevent bit-rot.  Define
+# an empty install target for this.
+
+kmodinstall:
+
 .include 



CVS commit: [netbsd-7-1] src

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:05:08 UTC 2019

Modified Files:
src/distrib/sets/lists/modules [netbsd-7-1]: mi
src/sys/modules/filemon [netbsd-7-1]: Makefile

Log Message:
Pull up following revision(s) (requested by maya in ticket #1710):

distrib/sets/lists/modules/mi: revision 1.127
sys/modules/Makefile: revision 1.230
sys/modules/filemon/Makefile: revision 1.4 (manually adjusted)
sys/modules/Makefile: revision 1.229

Disable filemon.

It isn't suited for general use (that is, it poses security risks),
but the existence of the module means it is auto-loaded when /dev/filemon
is opened, which can be done by any user.

Thanks Ilja van Sprundel for the heads up.

 -

Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.69.2.1 -r1.69.2.1.6.1 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.1 -r1.1.48.1 src/sys/modules/filemon/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/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.69.2.1 src/distrib/sets/lists/modules/mi:1.69.2.1.6.1
--- src/distrib/sets/lists/modules/mi:1.69.2.1	Sat Mar 21 17:11:35 2015
+++ src/distrib/sets/lists/modules/mi	Mon Oct 28 18:05:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.69.2.1 2015/03/21 17:11:35 snj Exp $
+# $NetBSD: mi,v 1.69.2.1.6.1 2019/10/28 18:05:07 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -76,8 +76,8 @@
 ./@MODULEDIR@/ffs/ffs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/filecorebase-kernel-modules	kmod
 ./@MODULEDIR@/filecore/filecore.kmod		base-kernel-modules	kmod
-./@MODULEDIR@/filemonbase-kernel-modules	kmod
-./@MODULEDIR@/filemon/filemon.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/filemonbase-obsolete		obsolete
+./@MODULEDIR@/filemon/filemon.kmod		base-obsolete		obsolete
 ./@MODULEDIR@/flashbase-kernel-modules	kmod
 ./@MODULEDIR@/flash/flash.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/fssbase-kernel-modules	kmod

Index: src/sys/modules/filemon/Makefile
diff -u src/sys/modules/filemon/Makefile:1.1 src/sys/modules/filemon/Makefile:1.1.48.1
--- src/sys/modules/filemon/Makefile:1.1	Thu Sep  9 00:10:16 2010
+++ src/sys/modules/filemon/Makefile	Mon Oct 28 18:05:07 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2010/09/09 00:10:16 sjg Exp $
+# $NetBSD: Makefile,v 1.1.48.1 2019/10/28 18:05:07 martin Exp $
 
 .include "../Makefile.inc"
 
@@ -8,4 +8,10 @@ KMOD = filemon
 SRCS = filemon.c filemon_wrapper.c
 NOMAN = no
 
+# Due to security concerns, we don't install the filemon module.  We
+# do, however, want to keep building it to prevent bit-rot.  Define
+# an empty install target for this.
+
+kmodinstall:
+
 .include 



CVS commit: [netbsd-7-1] src

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:05:08 UTC 2019

Modified Files:
src/distrib/sets/lists/modules [netbsd-7-1]: mi
src/sys/modules/filemon [netbsd-7-1]: Makefile

Log Message:
Pull up following revision(s) (requested by maya in ticket #1710):

distrib/sets/lists/modules/mi: revision 1.127
sys/modules/Makefile: revision 1.230
sys/modules/filemon/Makefile: revision 1.4 (manually adjusted)
sys/modules/Makefile: revision 1.229

Disable filemon.

It isn't suited for general use (that is, it poses security risks),
but the existence of the module means it is auto-loaded when /dev/filemon
is opened, which can be done by any user.

Thanks Ilja van Sprundel for the heads up.

 -

Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.69.2.1 -r1.69.2.1.6.1 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.1 -r1.1.48.1 src/sys/modules/filemon/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-7-0] src/doc

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:06:42 UTC 2019

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.3

Log Message:
Ticket #1710


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.152 -r1.1.2.153 src/doc/CHANGES-7.0.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sdmmc

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:11:16 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdhc.c

Log Message:
Avoid warnings for tautological shifts as sole conditional.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/dev/sdmmc/sdhc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/lib/libc/misc

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:10:22 UTC 2019

Modified Files:
src/tests/lib/libc/misc: t_ubsan.c

Log Message:
Avoid warnings about tautological left shifts as conditional.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/misc/t_ubsan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/misc/t_ubsan.c
diff -u src/tests/lib/libc/misc/t_ubsan.c:1.5 src/tests/lib/libc/misc/t_ubsan.c:1.6
--- src/tests/lib/libc/misc/t_ubsan.c:1.5	Wed Feb 20 11:40:41 2019
+++ src/tests/lib/libc/misc/t_ubsan.c	Mon Oct 28 18:10:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ubsan.c,v 1.5 2019/02/20 11:40:41 kamil Exp $	*/
+/*	$NetBSD: t_ubsan.c,v 1.6 2019/10/28 18:10:22 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2018\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_ubsan.c,v 1.5 2019/02/20 11:40:41 kamil Exp $");
+__RCSID("$NetBSD: t_ubsan.c,v 1.6 2019/10/28 18:10:22 joerg Exp $");
 
 #include 
 #include 
@@ -602,7 +602,7 @@ test_shift_out_of_bounds_signednessbit(v
 {
 	volatile int32_t a = atoi("1");
 
-	raise((a << 31) ? SIGSEGV : SIGBUS);
+	raise((a << 31) != 0 ? SIGSEGV : SIGBUS);
 }
 
 UBSAN_TC_BODY(shift_out_of_bounds_signednessbit, tc)
@@ -626,7 +626,7 @@ test_shift_out_of_bounds_signedoverflow(
 	volatile int32_t b = atoi("30");
 	a <<= b;
 
-	raise((a << 10) ? SIGSEGV : SIGBUS);
+	raise((a << 10) != 0 ? SIGSEGV : SIGBUS);
 }
 
 UBSAN_TC_BODY(shift_out_of_bounds_signedoverflow, tc)
@@ -648,7 +648,7 @@ test_shift_out_of_bounds_negativeexponen
 	volatile int32_t a = atoi("1");
 	volatile int32_t b = atoi("-10");
 
-	raise((a << b) ? SIGSEGV : SIGBUS);
+	raise((a << b) != 0 ? SIGSEGV : SIGBUS);
 }
 
 UBSAN_TC_BODY(shift_out_of_bounds_negativeexponent, tc)
@@ -670,7 +670,7 @@ test_shift_out_of_bounds_toolargeexponen
 	volatile int32_t a = atoi("1");
 	volatile int32_t b = atoi("40");
 
-	raise((a << b) ? SIGSEGV : SIGBUS);
+	raise((a << b) != 0 ? SIGSEGV : SIGBUS);
 }
 
 UBSAN_TC_BODY(shift_out_of_bounds_toolargeexponent, tc)



CVS commit: src/lib/libnvmm

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:12:17 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm_x86.c

Log Message:
Annotate a covering switch as such to avoid warnings about missing
returns.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/libnvmm/libnvmm_x86.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libnvmm/libnvmm_x86.c
diff -u src/lib/libnvmm/libnvmm_x86.c:1.38 src/lib/libnvmm/libnvmm_x86.c:1.39
--- src/lib/libnvmm/libnvmm_x86.c:1.38	Sun Oct 27 08:30:05 2019
+++ src/lib/libnvmm/libnvmm_x86.c	Mon Oct 28 18:12:17 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: libnvmm_x86.c,v 1.38 2019/10/27 08:30:05 maxv Exp $	*/
+/*	$NetBSD: libnvmm_x86.c,v 1.39 2019/10/28 18:12:17 joerg Exp $	*/
 
 /*
  * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
@@ -2251,6 +2251,7 @@ get_disp_type(struct x86_instr *instr)
 	default:	/* llvm */
 		return DISP_NONE;
 	}
+	__unreachable();
 }
 
 static int



CVS commit: src/tests/lib/libc/misc

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:10:22 UTC 2019

Modified Files:
src/tests/lib/libc/misc: t_ubsan.c

Log Message:
Avoid warnings about tautological left shifts as conditional.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/misc/t_ubsan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:01:00 UTC 2019

Modified Files:
src/distrib/sets/lists/modules [netbsd-8]: mi
src/sys/modules/filemon [netbsd-8]: Makefile

Log Message:
Pull up following revision(s) (requested by maya in ticket #1418):

distrib/sets/lists/modules/mi: revision 1.127
sys/modules/Makefile: revision 1.230
sys/modules/filemon/Makefile: revision 1.4 (manually adjusted)
sys/modules/Makefile: revision 1.229

Disable filemon.

It isn't suited for general use (that is, it poses security risks),
but the existence of the module means it is auto-loaded when /dev/filemon
is opened, which can be done by any user.

Thanks Ilja van Sprundel for the heads up.

 -

Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.110.2.1 -r1.110.2.2 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.2 -r1.2.10.1 src/sys/modules/filemon/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/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.110.2.1 src/distrib/sets/lists/modules/mi:1.110.2.2
--- src/distrib/sets/lists/modules/mi:1.110.2.1	Thu Dec 21 19:14:41 2017
+++ src/distrib/sets/lists/modules/mi	Mon Oct 28 18:01:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.110.2.1 2017/12/21 19:14:41 snj Exp $
+# $NetBSD: mi,v 1.110.2.2 2019/10/28 18:01:00 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -118,8 +118,8 @@
 ./@MODULEDIR@/ffs/ffs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/filecorebase-kernel-modules	kmod
 ./@MODULEDIR@/filecore/filecore.kmod		base-kernel-modules	kmod
-./@MODULEDIR@/filemonbase-kernel-modules	kmod
-./@MODULEDIR@/filemon/filemon.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/filemonbase-obsolete		obsolete
+./@MODULEDIR@/filemon/filemon.kmod		base-obsolete		obsolete
 ./@MODULEDIR@/flashbase-kernel-modules	kmod
 ./@MODULEDIR@/flash/flash.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/fssbase-kernel-modules	kmod

Index: src/sys/modules/filemon/Makefile
diff -u src/sys/modules/filemon/Makefile:1.2 src/sys/modules/filemon/Makefile:1.2.10.1
--- src/sys/modules/filemon/Makefile:1.2	Thu Aug 20 11:05:01 2015
+++ src/sys/modules/filemon/Makefile	Mon Oct 28 18:01:00 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2015/08/20 11:05:01 christos Exp $
+# $NetBSD: Makefile,v 1.2.10.1 2019/10/28 18:01:00 martin Exp $
 
 .include "../Makefile.inc"
 
@@ -9,4 +9,10 @@ IOCONF=	filemon.ioconf
 SRCS = filemon.c filemon_wrapper.c
 NOMAN = no
 
+# Due to security concerns, we don't install the filemon module.  We
+# do, however, want to keep building it to prevent bit-rot.  Define
+# an empty install target for this.
+
+kmodinstall:
+
 .include 



CVS commit: [netbsd-8] src

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:01:00 UTC 2019

Modified Files:
src/distrib/sets/lists/modules [netbsd-8]: mi
src/sys/modules/filemon [netbsd-8]: Makefile

Log Message:
Pull up following revision(s) (requested by maya in ticket #1418):

distrib/sets/lists/modules/mi: revision 1.127
sys/modules/Makefile: revision 1.230
sys/modules/filemon/Makefile: revision 1.4 (manually adjusted)
sys/modules/Makefile: revision 1.229

Disable filemon.

It isn't suited for general use (that is, it poses security risks),
but the existence of the module means it is auto-loaded when /dev/filemon
is opened, which can be done by any user.

Thanks Ilja van Sprundel for the heads up.

 -

Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.110.2.1 -r1.110.2.2 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.2 -r1.2.10.1 src/sys/modules/filemon/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-7-0] src

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:06:13 UTC 2019

Modified Files:
src/distrib/sets/lists/modules [netbsd-7-0]: mi
src/sys/modules/filemon [netbsd-7-0]: Makefile

Log Message:
Pull up following revision(s) (requested by maya in ticket #1710):

distrib/sets/lists/modules/mi: revision 1.127
sys/modules/Makefile: revision 1.230
sys/modules/filemon/Makefile: revision 1.4 (manually adjusted)
sys/modules/Makefile: revision 1.229

Disable filemon.

It isn't suited for general use (that is, it poses security risks),
but the existence of the module means it is auto-loaded when /dev/filemon
is opened, which can be done by any user.

Thanks Ilja van Sprundel for the heads up.

 -

Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.69.2.1 -r1.69.2.1.2.1 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.1 -r1.1.44.1 src/sys/modules/filemon/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-7-0] src

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:06:13 UTC 2019

Modified Files:
src/distrib/sets/lists/modules [netbsd-7-0]: mi
src/sys/modules/filemon [netbsd-7-0]: Makefile

Log Message:
Pull up following revision(s) (requested by maya in ticket #1710):

distrib/sets/lists/modules/mi: revision 1.127
sys/modules/Makefile: revision 1.230
sys/modules/filemon/Makefile: revision 1.4 (manually adjusted)
sys/modules/Makefile: revision 1.229

Disable filemon.

It isn't suited for general use (that is, it poses security risks),
but the existence of the module means it is auto-loaded when /dev/filemon
is opened, which can be done by any user.

Thanks Ilja van Sprundel for the heads up.

 -

Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.69.2.1 -r1.69.2.1.2.1 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.1 -r1.1.44.1 src/sys/modules/filemon/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/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.69.2.1 src/distrib/sets/lists/modules/mi:1.69.2.1.2.1
--- src/distrib/sets/lists/modules/mi:1.69.2.1	Sat Mar 21 17:11:35 2015
+++ src/distrib/sets/lists/modules/mi	Mon Oct 28 18:06:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.69.2.1 2015/03/21 17:11:35 snj Exp $
+# $NetBSD: mi,v 1.69.2.1.2.1 2019/10/28 18:06:13 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -76,8 +76,8 @@
 ./@MODULEDIR@/ffs/ffs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/filecorebase-kernel-modules	kmod
 ./@MODULEDIR@/filecore/filecore.kmod		base-kernel-modules	kmod
-./@MODULEDIR@/filemonbase-kernel-modules	kmod
-./@MODULEDIR@/filemon/filemon.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/filemonbase-obsolete		obsolete
+./@MODULEDIR@/filemon/filemon.kmod		base-obsolete		obsolete
 ./@MODULEDIR@/flashbase-kernel-modules	kmod
 ./@MODULEDIR@/flash/flash.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/fssbase-kernel-modules	kmod

Index: src/sys/modules/filemon/Makefile
diff -u src/sys/modules/filemon/Makefile:1.1 src/sys/modules/filemon/Makefile:1.1.44.1
--- src/sys/modules/filemon/Makefile:1.1	Thu Sep  9 00:10:16 2010
+++ src/sys/modules/filemon/Makefile	Mon Oct 28 18:06:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2010/09/09 00:10:16 sjg Exp $
+# $NetBSD: Makefile,v 1.1.44.1 2019/10/28 18:06:13 martin Exp $
 
 .include "../Makefile.inc"
 
@@ -8,4 +8,10 @@ KMOD = filemon
 SRCS = filemon.c filemon_wrapper.c
 NOMAN = no
 
+# Due to security concerns, we don't install the filemon module.  We
+# do, however, want to keep building it to prevent bit-rot.  Define
+# an empty install target for this.
+
+kmodinstall:
+
 .include 



CVS commit: [netbsd-7-0] src/doc

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:06:42 UTC 2019

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.3

Log Message:
Ticket #1710


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.152 -r1.1.2.153 src/doc/CHANGES-7.0.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-7.0.3
diff -u src/doc/CHANGES-7.0.3:1.1.2.152 src/doc/CHANGES-7.0.3:1.1.2.153
--- src/doc/CHANGES-7.0.3:1.1.2.152	Sat Sep 28 07:52:18 2019
+++ src/doc/CHANGES-7.0.3	Mon Oct 28 18:06:42 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.3,v 1.1.2.152 2019/09/28 07:52:18 martin Exp $
+# $NetBSD: CHANGES-7.0.3,v 1.1.2.153 2019/10/28 18:06:42 martin Exp $
 
 A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3
 release:
@@ -5905,3 +5905,10 @@ sys/netbt/hci_event.c1.26
 	CVE-2019-9506.
 	[plunky, ticket #1709]
 
+distrib/sets/lists/modules/mi			1.127
+sys/modules/Makefile1.229,1.230
+sys/modules/filemon/Makefile			1.4 (manually adjusted)
+
+	Do not install the filemon module.
+	[maya, ticket #1710]
+



CVS commit: [netbsd-7-1] src/doc

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:05:34 UTC 2019

Modified Files:
src/doc [netbsd-7-1]: CHANGES-7.1.3

Log Message:
Ticket #1710


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.59 -r1.1.2.60 src/doc/CHANGES-7.1.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-7] src/doc

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:04:15 UTC 2019

Modified Files:
src/doc [netbsd-7]: CHANGES-7.3

Log Message:
Ticket #1710


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.63 -r1.1.2.64 src/doc/CHANGES-7.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-7] src/doc

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:04:15 UTC 2019

Modified Files:
src/doc [netbsd-7]: CHANGES-7.3

Log Message:
Ticket #1710


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.63 -r1.1.2.64 src/doc/CHANGES-7.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-7.3
diff -u src/doc/CHANGES-7.3:1.1.2.63 src/doc/CHANGES-7.3:1.1.2.64
--- src/doc/CHANGES-7.3:1.1.2.63	Sat Sep 28 07:50:46 2019
+++ src/doc/CHANGES-7.3	Mon Oct 28 18:04:15 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.3,v 1.1.2.63 2019/09/28 07:50:46 martin Exp $
+# $NetBSD: CHANGES-7.3,v 1.1.2.64 2019/10/28 18:04:15 martin Exp $
 
 A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3
 release:
@@ -692,3 +692,10 @@ sys/netbt/hci_event.c1.26
 	CVE-2019-9506.
 	[plunky, ticket #1709]
 
+distrib/sets/lists/modules/mi			1.127
+sys/modules/Makefile1.229,1.230
+sys/modules/filemon/Makefile			1.4 (manually adjusted)
+
+	Do not install the filemon module.
+	[maya, ticket #1710]
+



CVS commit: [netbsd-7-1] src/doc

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:05:34 UTC 2019

Modified Files:
src/doc [netbsd-7-1]: CHANGES-7.1.3

Log Message:
Ticket #1710


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.59 -r1.1.2.60 src/doc/CHANGES-7.1.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-7.1.3
diff -u src/doc/CHANGES-7.1.3:1.1.2.59 src/doc/CHANGES-7.1.3:1.1.2.60
--- src/doc/CHANGES-7.1.3:1.1.2.59	Sat Sep 28 07:51:31 2019
+++ src/doc/CHANGES-7.1.3	Mon Oct 28 18:05:34 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1.3,v 1.1.2.59 2019/09/28 07:51:31 martin Exp $
+# $NetBSD: CHANGES-7.1.3,v 1.1.2.60 2019/10/28 18:05:34 martin Exp $
 
 A complete list of changes from the NetBSD 7.1.2 release to the NetBSD 7.1.3
 release:
@@ -597,3 +597,10 @@ sys/netbt/hci_event.c1.26
 	CVE-2019-9506.
 	[plunky, ticket #1709]
 
+distrib/sets/lists/modules/mi			1.127
+sys/modules/Makefile1.229,1.230
+sys/modules/filemon/Makefile			1.4 (manually adjusted)
+
+	Do not install the filemon module.
+	[maya, ticket #1710]
+



CVS commit: [netbsd-7] src

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:03:46 UTC 2019

Modified Files:
src/distrib/sets/lists/modules [netbsd-7]: mi
src/sys/modules/filemon [netbsd-7]: Makefile

Log Message:
Pull up following revision(s) (requested by maya in ticket #1710):

distrib/sets/lists/modules/mi: revision 1.127
sys/modules/Makefile: revision 1.230
sys/modules/filemon/Makefile: revision 1.4 (manually adjusted)
sys/modules/Makefile: revision 1.229

Disable filemon.

It isn't suited for general use (that is, it poses security risks),
but the existence of the module means it is auto-loaded when /dev/filemon
is opened, which can be done by any user.

Thanks Ilja van Sprundel for the heads up.

 -

Continue to build the filemon module, but don't install it.  Hopefully
this will help us detect any additional bit-rot that might occur.

XXX It might be a good idea to modify the file permissions on /dev/filemon
XXX to prevent auto-loading of the driver module by non-privileged users.


To generate a diff of this commit:
cvs rdiff -u -r1.69.2.1 -r1.69.2.2 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.1 -r1.1.40.1 src/sys/modules/filemon/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/sets/lists/comp

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:08:44 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: ad.aarch64

Log Message:
Fix aarch64 set for !gcc build


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/distrib/sets/lists/comp/ad.aarch64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sdmmc

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:11:16 UTC 2019

Modified Files:
src/sys/dev/sdmmc: sdhc.c

Log Message:
Avoid warnings for tautological shifts as sole conditional.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/dev/sdmmc/sdhc.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/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.105 src/sys/dev/sdmmc/sdhc.c:1.106
--- src/sys/dev/sdmmc/sdhc.c:1.105	Mon Oct 28 06:00:14 2019
+++ src/sys/dev/sdmmc/sdhc.c	Mon Oct 28 18:11:15 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.105 2019/10/28 06:00:14 mlelstv Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.106 2019/10/28 18:11:15 joerg Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.105 2019/10/28 06:00:14 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.106 2019/10/28 18:11:15 joerg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -170,17 +170,17 @@ hwrite4(struct sdhc_host *hp, bus_size_t
 #define HWRITE4(hp, reg, val)		hwrite4(hp, reg, val)
 
 #define HCLR1(hp, reg, bits)		\
-	do if (bits) HWRITE1((hp), (reg), HREAD1((hp), (reg)) & ~(bits)); while (0)
+	do if ((bits) != 0) HWRITE1((hp), (reg), HREAD1((hp), (reg)) & ~(bits)); while (0)
 #define HCLR2(hp, reg, bits)		\
-	do if (bits) HWRITE2((hp), (reg), HREAD2((hp), (reg)) & ~(bits)); while (0)
+	do if ((bits) != 0) HWRITE2((hp), (reg), HREAD2((hp), (reg)) & ~(bits)); while (0)
 #define HCLR4(hp, reg, bits)		\
-	do if (bits) HWRITE4((hp), (reg), HREAD4((hp), (reg)) & ~(bits)); while (0)
+	do if ((bits) != 0) HWRITE4((hp), (reg), HREAD4((hp), (reg)) & ~(bits)); while (0)
 #define HSET1(hp, reg, bits)		\
-	do if (bits) HWRITE1((hp), (reg), HREAD1((hp), (reg)) | (bits)); while (0)
+	do if ((bits) != 0) HWRITE1((hp), (reg), HREAD1((hp), (reg)) | (bits)); while (0)
 #define HSET2(hp, reg, bits)		\
-	do if (bits) HWRITE2((hp), (reg), HREAD2((hp), (reg)) | (bits)); while (0)
+	do if ((bits) != 0) HWRITE2((hp), (reg), HREAD2((hp), (reg)) | (bits)); while (0)
 #define HSET4(hp, reg, bits)		\
-	do if (bits) HWRITE4((hp), (reg), HREAD4((hp), (reg)) | (bits)); while (0)
+	do if ((bits) != 0) HWRITE4((hp), (reg), HREAD4((hp), (reg)) | (bits)); while (0)
 
 static int	sdhc_host_reset(sdmmc_chipset_handle_t);
 static int	sdhc_host_reset1(sdmmc_chipset_handle_t);



CVS commit: src/distrib/sets/lists/comp

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:08:44 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: ad.aarch64

Log Message:
Fix aarch64 set for !gcc build


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/distrib/sets/lists/comp/ad.aarch64

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/ad.aarch64
diff -u src/distrib/sets/lists/comp/ad.aarch64:1.33 src/distrib/sets/lists/comp/ad.aarch64:1.34
--- src/distrib/sets/lists/comp/ad.aarch64:1.33	Thu Oct  3 00:59:50 2019
+++ src/distrib/sets/lists/comp/ad.aarch64	Mon Oct 28 18:08:44 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.33 2019/10/03 00:59:50 mrg Exp $
+# $NetBSD: ad.aarch64,v 1.34 2019/10/28 18:08:44 joerg Exp $
 ./usr/include/aarch64comp-c-include
 ./usr/include/aarch64/ansi.h			comp-c-include
 ./usr/include/aarch64/aout_machdep.h		comp-c-include
@@ -127,10 +127,10 @@
 ./usr/include/evbarm64comp-obsolete		obsolete
 ./usr/include/evbarm64/disklabel.h		comp-obsolete		obsolete
 ./usr/include/evbarm64/intr.h			comp-obsolete		obsolete
-./usr/include/g++/bits/aarch64			comp-c-include		compat
-./usr/include/g++/bits/aarch64/c++config.h	comp-c-include		libstdcxx,compat
-./usr/include/g++/bits/arm			comp-c-include		compat
-./usr/include/g++/bits/arm/c++config.h		comp-c-include		libstdcxx,compat
+./usr/include/g++/bits/aarch64			comp-c-include
+./usr/include/g++/bits/aarch64/c++config.h	comp-c-include		gcc,libstdcxx,compat
+./usr/include/g++/bits/arm			comp-c-include
+./usr/include/g++/bits/arm/c++config.h		comp-c-include		gcc,libstdcxx,compat
 ./usr/include/gcc-4.8/arm_neon.h		comp-c-include		gcc=48
 ./usr/include/gcc-4.8/mmintrin.h		comp-c-include		gcc=48
 ./usr/include/gcc-4.8/tgmath.h			comp-c-include		gcc=48



CVS commit: src/sys/arch/arm/arm

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:14:38 UTC 2019

Modified Files:
src/sys/arch/arm/arm: fusu.S

Log Message:
Add operand that GNU as considers optional, but LLVM doesn't.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/arm/fusu.S

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

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:14:38 UTC 2019

Modified Files:
src/sys/arch/arm/arm: fusu.S

Log Message:
Add operand that GNU as considers optional, but LLVM doesn't.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/arm/fusu.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm/fusu.S
diff -u src/sys/arch/arm/arm/fusu.S:1.7 src/sys/arch/arm/arm/fusu.S:1.8
--- src/sys/arch/arm/arm/fusu.S:1.7	Sun Apr  7 14:14:03 2019
+++ src/sys/arch/arm/arm/fusu.S	Mon Oct 28 18:14:38 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fusu.S,v 1.7 2019/04/07 14:14:03 thorpej Exp $	*/
+/*	$NetBSD: fusu.S,v 1.8 2019/10/28 18:14:38 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -127,7 +127,7 @@ STRONG_ALIAS(_ufetch_16,_ufetch_16_no_ld
 ENTRY(_ufetch_16_ldrht)
 	UFETCHSTORE_PROLOGUE
 
-	ldrht	r3, [r0]
+	ldrht	r3, [r0], #0
 	strh	r3, [r1]
 
 	UFETCHSTORE_EPILOGUE
@@ -186,7 +186,7 @@ STRONG_ALIAS(_ustore_16,_ustore_16_no_st
 ENTRY(_ustore_16_strht)
 	UFETCHSTORE_PROLOGUE
 
-	strht	r1, [r0]
+	strht	r1, [r0], #0
 
 	UFETCHSTORE_EPILOGUE
 	RETURN_SUCCESS



CVS commit: src/crypto/external/bsd/heimdal/dist/lib/base

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:12:54 UTC 2019

Modified Files:
src/crypto/external/bsd/heimdal/dist/lib/base: error.c

Log Message:
Merge 85acd57c8a288ce92f42bcf62737eebe385bce90 from Heimdal on Github:

Fix the numeric error value comparison performed by error_cmp().


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/heimdal/dist/lib/base/error.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/heimdal/dist/lib/base/error.c
diff -u src/crypto/external/bsd/heimdal/dist/lib/base/error.c:1.2 src/crypto/external/bsd/heimdal/dist/lib/base/error.c:1.3
--- src/crypto/external/bsd/heimdal/dist/lib/base/error.c:1.2	Sat Jan 28 21:31:45 2017
+++ src/crypto/external/bsd/heimdal/dist/lib/base/error.c	Mon Oct 28 18:12:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: error.c,v 1.2 2017/01/28 21:31:45 christos Exp $	*/
+/*	$NetBSD: error.c,v 1.3 2019/10/28 18:12:54 joerg Exp $	*/
 
 /*
  * Copyright (c) 2010 Kungliga Tekniska Högskolan
@@ -55,8 +55,8 @@ static int
 error_cmp(void *a, void *b)
 {
 struct heim_error *ap = a, *bp = b;
-if (ap->error_code == ap->error_code)
-	return ap->error_code - ap->error_code;
+if (ap->error_code == bp->error_code)
+	return 0;
 return heim_cmp(ap->msg, bp->msg);
 }
 



CVS commit: src/lib/libnvmm

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:12:17 UTC 2019

Modified Files:
src/lib/libnvmm: libnvmm_x86.c

Log Message:
Annotate a covering switch as such to avoid warnings about missing
returns.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/libnvmm/libnvmm_x86.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/macppc/stand/bootxx

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:13:40 UTC 2019

Modified Files:
src/sys/arch/macppc/stand/bootxx: bootxx.c

Log Message:
Mark local-only function as static to save space.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/macppc/stand/bootxx/bootxx.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/macppc/stand/bootxx/bootxx.c
diff -u src/sys/arch/macppc/stand/bootxx/bootxx.c:1.19 src/sys/arch/macppc/stand/bootxx/bootxx.c:1.20
--- src/sys/arch/macppc/stand/bootxx/bootxx.c:1.19	Mon Nov 12 20:00:46 2018
+++ src/sys/arch/macppc/stand/bootxx/bootxx.c	Mon Oct 28 18:13:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootxx.c,v 1.19 2018/11/12 20:00:46 scole Exp $	*/
+/*	$NetBSD: bootxx.c,v 1.20 2019/10/28 18:13:40 joerg Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -299,7 +299,7 @@ OF_write(int handle, const void *addr, i
 
 int stdout;
 
-void
+static void
 putstrn(const char *s, size_t n)
 {
 	OF_write(stdout, s, n);



CVS commit: src/sys/arch/macppc/stand/bootxx

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:13:40 UTC 2019

Modified Files:
src/sys/arch/macppc/stand/bootxx: bootxx.c

Log Message:
Mark local-only function as static to save space.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/macppc/stand/bootxx/bootxx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/crypto/external/bsd/heimdal/dist/lib/base

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:12:54 UTC 2019

Modified Files:
src/crypto/external/bsd/heimdal/dist/lib/base: error.c

Log Message:
Merge 85acd57c8a288ce92f42bcf62737eebe385bce90 from Heimdal on Github:

Fix the numeric error value comparison performed by error_cmp().


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/heimdal/dist/lib/base/error.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/aarch64/aarch64

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:15:26 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: db_disasm.c

Log Message:
Format string annotation for strdisasm_printf


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/aarch64/db_disasm.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/aarch64/aarch64/db_disasm.c
diff -u src/sys/arch/aarch64/aarch64/db_disasm.c:1.6 src/sys/arch/aarch64/aarch64/db_disasm.c:1.7
--- src/sys/arch/aarch64/aarch64/db_disasm.c:1.6	Sun Jan 27 02:08:36 2019
+++ src/sys/arch/aarch64/aarch64/db_disasm.c	Mon Oct 28 18:15:25 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: db_disasm.c,v 1.6 2019/01/27 02:08:36 pgoyette Exp $ */
+/* $NetBSD: db_disasm.c,v 1.7 2019/10/28 18:15:25 joerg Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.6 2019/01/27 02:08:36 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.7 2019/10/28 18:15:25 joerg Exp $");
 
 #include 
 #include 
@@ -75,7 +75,7 @@ strdisasm_readword(uintptr_t address)
 	return *(uint32_t *)address;
 }
 
-static void
+static void __printflike(1, 2)
 strdisasm_printf(const char *fmt, ...)
 {
 	va_list ap;



CVS commit: src/sys/arch/aarch64/aarch64

2019-10-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Oct 28 18:15:26 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: db_disasm.c

Log Message:
Format string annotation for strdisasm_printf


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/aarch64/db_disasm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/dev/ic

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:27:47 UTC 2019

Modified Files:
src/sys/dev/ic [netbsd-8]: ld_nvme.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #1417):

sys/dev/ic/ld_nvme.c: revision 1.23

Don't attach an ld device if the format descriptor is unsupported/unused.


To generate a diff of this commit:
cvs rdiff -u -r1.16.2.3 -r1.16.2.4 src/sys/dev/ic/ld_nvme.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/ic/ld_nvme.c
diff -u src/sys/dev/ic/ld_nvme.c:1.16.2.3 src/sys/dev/ic/ld_nvme.c:1.16.2.4
--- src/sys/dev/ic/ld_nvme.c:1.16.2.3	Thu Apr 19 15:37:56 2018
+++ src/sys/dev/ic/ld_nvme.c	Mon Oct 28 18:27:47 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_nvme.c,v 1.16.2.3 2018/04/19 15:37:56 martin Exp $	*/
+/*	$NetBSD: ld_nvme.c,v 1.16.2.4 2019/10/28 18:27:47 martin Exp $	*/
 
 /*-
  * Copyright (C) 2016 NONAKA Kimihiro 
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld_nvme.c,v 1.16.2.3 2018/04/19 15:37:56 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_nvme.c,v 1.16.2.4 2019/10/28 18:27:47 martin Exp $");
 
 #include 
 #include 
@@ -105,6 +105,19 @@ ld_nvme_attach(device_t parent, device_t
 	KASSERT(ns);
 	f = >ident->lbaf[NVME_ID_NS_FLBAS(ns->ident->flbas)];
 
+	/*
+	 * NVME1.0e 6.11 Identify command
+	 *
+	 * LBADS values smaller than 9 are not supported, a value
+	 * of zero means that the format is not used.
+	 */
+	if (f->lbads < 9) {
+		if (f->lbads > 0)
+			aprint_error_dev(self,
+			"unsupported logical data size %u\n", f->lbads);
+		return;
+	}
+
 	ld->sc_secsize = 1 << f->lbads;
 	ld->sc_secperunit = ns->ident->nsze;
 	ld->sc_maxxfer = naa->naa_maxphys;



CVS commit: [netbsd-8] src/sys/dev/ic

2019-10-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 28 18:27:47 UTC 2019

Modified Files:
src/sys/dev/ic [netbsd-8]: ld_nvme.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #1417):

sys/dev/ic/ld_nvme.c: revision 1.23

Don't attach an ld device if the format descriptor is unsupported/unused.


To generate a diff of this commit:
cvs rdiff -u -r1.16.2.3 -r1.16.2.4 src/sys/dev/ic/ld_nvme.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/etc/etc.evbarm

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 22:23:51 UTC 2019

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
Unhook BEAGLEBONE kernel from the build


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/etc/etc.evbarm/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.107 src/etc/etc.evbarm/Makefile.inc:1.108
--- src/etc/etc.evbarm/Makefile.inc:1.107	Sun Jun  2 17:13:15 2019
+++ src/etc/etc.evbarm/Makefile.inc	Mon Oct 28 22:23:51 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.107 2019/06/02 17:13:15 thorpej Exp $
+#	$NetBSD: Makefile.inc,v 1.108 2019/10/28 22:23:51 jmcneill Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -86,8 +86,6 @@ KERNEL_SETS.armv7+=		BEAGLEBOARD
 KERNEL_SETS.armv7hf+= 		BEAGLEBOARD
 EVBARM_BOARDS.armv7+=		BEAGLEBOARDXM
 EVBARM_BOARDS.armv7hf+= 	BEAGLEBOARDXM
-KERNEL_SETS.armv7+=		BEAGLEBONE
-KERNEL_SETS.armv7hf+=	 	BEAGLEBONE
 EVBARM_BOARDS.armv7+=		CUBOX
 EVBARM_BOARDS.armv7hf+= 	CUBOX
 EVBARM_BOARDS.armv7+=		CUBOX-I



CVS commit: src/sys/arch/evbarm/conf

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 22:24:56 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: README.evbarm
Removed Files:
src/sys/arch/evbarm/conf: BEAGLEBONE BEAGLEBONE_INSTALL

Log Message:
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r0 src/sys/arch/evbarm/conf/BEAGLEBONE
cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/conf/BEAGLEBONE_INSTALL
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbarm/conf/README.evbarm

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/evbarm/conf

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 22:24:56 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: README.evbarm
Removed Files:
src/sys/arch/evbarm/conf: BEAGLEBONE BEAGLEBONE_INSTALL

Log Message:
Remove BEAGLEBONE kernel config (AM335x SoC is supported by GENERIC now).


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r0 src/sys/arch/evbarm/conf/BEAGLEBONE
cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/conf/BEAGLEBONE_INSTALL
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbarm/conf/README.evbarm

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/conf/README.evbarm
diff -u src/sys/arch/evbarm/conf/README.evbarm:1.21 src/sys/arch/evbarm/conf/README.evbarm:1.22
--- src/sys/arch/evbarm/conf/README.evbarm:1.21	Sun Mar 31 13:04:54 2019
+++ src/sys/arch/evbarm/conf/README.evbarm	Mon Oct 28 22:24:56 2019
@@ -1,4 +1,4 @@
-$NetBSD: README.evbarm,v 1.21 2019/03/31 13:04:54 jmcneill Exp $
+$NetBSD: README.evbarm,v 1.22 2019/10/28 22:24:56 jmcneill Exp $
 
 config		date		boards
 ---
@@ -8,7 +8,6 @@ ARMADILLO9	2005/11/13	Atmark Techno Arma
 BCM5301X	2012/08/31	Broadcom BCM95301X evaluation/reference board
 BEAGLEBOARD	2008/10/22	TI OMAP3530 BeagleBoard
 BEAGLEBOARDXM	2008/08/20	TI DM37xx BeagleBoard-XM
-BEAGLEBONE	2012/08/20	TI AM335x BeagleBone
 CUBOX		2017/01/07	SolidRun Cubox
 CP3100		2006/11/08	Certance IOP321 CP-3100
 DEVKIT8000	2010/09/08	Embest OMAP3530 DevKit8000 eval Kit 



CVS commit: src/sys/arch/arm/ti

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 23:58:00 UTC 2019

Modified Files:
src/sys/arch/arm/ti: am3_prcm.c files.ti
Added Files:
src/sys/arch/arm/ti: ti_rng.c ti_rngreg.h

Log Message:
Add support for hardware RNG.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/ti/am3_prcm.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/ti/files.ti
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/ti/ti_rng.c \
src/sys/arch/arm/ti/ti_rngreg.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/fdt

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 21:14:58 UTC 2019

Modified Files:
src/sys/dev/fdt: cpufreq_dt.c fdtvar.h

Log Message:
Add support for platform specific opp table filters.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/fdt/cpufreq_dt.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/fdt/fdtvar.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/fdt/cpufreq_dt.c
diff -u src/sys/dev/fdt/cpufreq_dt.c:1.11 src/sys/dev/fdt/cpufreq_dt.c:1.12
--- src/sys/dev/fdt/cpufreq_dt.c:1.11	Mon Oct 28 10:43:08 2019
+++ src/sys/dev/fdt/cpufreq_dt.c	Mon Oct 28 21:14:58 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufreq_dt.c,v 1.11 2019/10/28 10:43:08 jmcneill Exp $ */
+/* $NetBSD: cpufreq_dt.c,v 1.12 2019/10/28 21:14:58 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpufreq_dt.c,v 1.11 2019/10/28 10:43:08 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufreq_dt.c,v 1.12 2019/10/28 21:14:58 jmcneill Exp $");
 
 #include 
 #include 
@@ -356,11 +356,46 @@ cpufreq_dt_parse_opp(struct cpufreq_dt_s
 	return 0;
 }
 
+static const struct fdt_opp_info *
+cpufreq_dt_lookup_opp_info(const int opp_table)
+{
+	__link_set_decl(fdt_opps, struct fdt_opp_info);
+	struct fdt_opp_info * const *opp;
+	const struct fdt_opp_info *best_opp = NULL;
+	int match, best_match = 0;
+
+	__link_set_foreach(opp, fdt_opps) {
+		const char * const compat[] = { (*opp)->opp_compat, NULL };
+		match = of_match_compatible(opp_table, compat);
+		if (match > best_match) {
+			best_match = match;
+			best_opp = *opp;
+		}
+	}
+
+	return best_opp;
+}
+
+static bool
+cpufreq_dt_node_supported(const struct fdt_opp_info *opp_info, const int opp_table, const int opp_node)
+{
+	if (!fdtbus_status_okay(opp_node))
+		return false;
+	if (of_hasprop(opp_node, "opp-suspend"))
+		return false;
+
+	if (opp_info != NULL)
+		return opp_info->opp_supported(opp_table, opp_node);
+
+	return true;
+}
+
 static int
 cpufreq_dt_parse_opp_v2(struct cpufreq_dt_softc *sc)
 {
 	const int phandle = sc->sc_phandle;
 	struct cpufreq_dt_table *table;
+	const struct fdt_opp_info *opp_info;
 	const u_int *opp_uv;
 	uint64_t opp_hz;
 	int opp_node, len, i, index;
@@ -378,10 +413,10 @@ cpufreq_dt_parse_opp_v2(struct cpufreq_d
 		TAILQ_INSERT_TAIL(_dt_tables, >sc_table, next);
 	}
 
+	opp_info = cpufreq_dt_lookup_opp_info(opp_table);
+
 	for (opp_node = OF_child(opp_table); opp_node; opp_node = OF_peer(opp_node)) {
-		if (!fdtbus_status_okay(opp_node))
-			continue;
-		if (of_hasprop(opp_node, "opp-suspend"))
+		if (!cpufreq_dt_node_supported(opp_info, opp_table, opp_node))
 			continue;
 		sc->sc_nopp++;
 	}
@@ -392,9 +427,7 @@ cpufreq_dt_parse_opp_v2(struct cpufreq_d
 	sc->sc_opp = kmem_zalloc(sizeof(*sc->sc_opp) * sc->sc_nopp, KM_SLEEP);
 	index = sc->sc_nopp - 1;
 	for (opp_node = OF_child(opp_table), i = 0; opp_node; opp_node = OF_peer(opp_node), i++) {
-		if (!fdtbus_status_okay(opp_node))
-			continue;
-		if (of_hasprop(opp_node, "opp-suspend"))
+		if (!cpufreq_dt_node_supported(opp_info, opp_table, opp_node))
 			continue;
 		if (of_getprop_uint64(opp_node, "opp-hz", _hz) != 0)
 			return EINVAL;

Index: src/sys/dev/fdt/fdtvar.h
diff -u src/sys/dev/fdt/fdtvar.h:1.54 src/sys/dev/fdt/fdtvar.h:1.55
--- src/sys/dev/fdt/fdtvar.h:1.54	Tue Oct  1 23:32:52 2019
+++ src/sys/dev/fdt/fdtvar.h	Mon Oct 28 21:14:58 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtvar.h,v 1.54 2019/10/01 23:32:52 jmcneill Exp $ */
+/* $NetBSD: fdtvar.h,v 1.55 2019/10/28 21:14:58 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -251,6 +251,21 @@ static const struct fdt_console_info __C
 };	\
 _FDT_CONSOLE_REGISTER(_name)
 
+struct fdt_opp_info {
+	const char *	opp_compat;
+	bool		(*opp_supported)(const int, const int);
+};
+
+#define	_FDT_OPP_REGISTER(name)		\
+	__link_set_add_rodata(fdt_opps, __CONCAT(name,_oppinfo));
+
+#define	FDT_OPP(_name, _compat, _suppfn)\
+static const struct fdt_opp_info __CONCAT(_name,_oppinfo) = {		\
+	.opp_compat = (_compat),	\
+	.opp_supported = (_suppfn)	\
+};	\
+_FDT_OPP_REGISTER(_name)
+
 TAILQ_HEAD(fdt_conslist, fdt_console_info);
 
 int		fdtbus_register_interrupt_controller(device_t, int,



CVS commit: src/sys/dev/fdt

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 21:13:48 UTC 2019

Modified Files:
src/sys/dev/fdt: syscon.c

Log Message:
enumerate devices under child "clocks" node


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/fdt/syscon.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/fdt

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 21:13:48 UTC 2019

Modified Files:
src/sys/dev/fdt: syscon.c

Log Message:
enumerate devices under child "clocks" node


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/fdt/syscon.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/fdt/syscon.c
diff -u src/sys/dev/fdt/syscon.c:1.3 src/sys/dev/fdt/syscon.c:1.4
--- src/sys/dev/fdt/syscon.c:1.3	Mon Feb 25 19:28:36 2019
+++ src/sys/dev/fdt/syscon.c	Mon Oct 28 21:13:48 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: syscon.c,v 1.3 2019/02/25 19:28:36 jmcneill Exp $ */
+/* $NetBSD: syscon.c,v 1.4 2019/10/28 21:13:48 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: syscon.c,v 1.3 2019/02/25 19:28:36 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscon.c,v 1.4 2019/10/28 21:13:48 jmcneill Exp $");
 
 #include 
 #include 
@@ -113,6 +113,7 @@ syscon_attach(device_t parent, device_t 
 	const int phandle = faa->faa_phandle;
 	bus_addr_t addr;
 	bus_size_t size;
+	int child;
 
 	if (fdtbus_get_reg(phandle, 0, , ) != 0) {
 		aprint_error(": couldn't get registers\n");
@@ -138,4 +139,8 @@ syscon_attach(device_t parent, device_t 
 	fdtbus_register_syscon(self, phandle, >sc_syscon);
 
 	fdt_add_bus(self, phandle, faa);
+
+	child = of_find_firstchild_byname(phandle, "clocks");
+	if (child > 0)
+		fdt_add_bus(self, child, faa);
 }



CVS commit: src/sys/dev/fdt

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 21:14:58 UTC 2019

Modified Files:
src/sys/dev/fdt: cpufreq_dt.c fdtvar.h

Log Message:
Add support for platform specific opp table filters.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/fdt/cpufreq_dt.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/fdt/fdtvar.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/ti

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 22:21:35 UTC 2019

Modified Files:
src/sys/arch/arm/ti: am3_prcm.c files.ti
Added Files:
src/sys/arch/arm/ti: ti_gpio.c

Log Message:
Add support for GPIO controller.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/ti/am3_prcm.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/ti/files.ti
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/ti/ti_gpio.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/ti

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 22:21:35 UTC 2019

Modified Files:
src/sys/arch/arm/ti: am3_prcm.c files.ti
Added Files:
src/sys/arch/arm/ti: ti_gpio.c

Log Message:
Add support for GPIO controller.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/ti/am3_prcm.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/ti/files.ti
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/ti/ti_gpio.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/ti/am3_prcm.c
diff -u src/sys/arch/arm/ti/am3_prcm.c:1.5 src/sys/arch/arm/ti/am3_prcm.c:1.6
--- src/sys/arch/arm/ti/am3_prcm.c:1.5	Mon Oct 28 21:16:10 2019
+++ src/sys/arch/arm/ti/am3_prcm.c	Mon Oct 28 22:21:35 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: am3_prcm.c,v 1.5 2019/10/28 21:16:10 jmcneill Exp $ */
+/* $NetBSD: am3_prcm.c,v 1.6 2019/10/28 22:21:35 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: am3_prcm.c,v 1.5 2019/10/28 21:16:10 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: am3_prcm.c,v 1.6 2019/10/28 22:21:35 jmcneill Exp $");
 
 #include 
 #include 
@@ -101,6 +101,11 @@ static struct ti_prcm_clk am3_prcm_clks[
 	AM3_PRCM_HWMOD_PER("i2c2", 0x48, "PERIPH_CLK"),
 	AM3_PRCM_HWMOD_PER("i2c3", 0x44, "PERIPH_CLK"),
 
+	AM3_PRCM_HWMOD_WKUP("gpio1", 0x8, "PERIPH_CLK"),
+	AM3_PRCM_HWMOD_PER("gpio2", 0xac, "PERIPH_CLK"),
+	AM3_PRCM_HWMOD_PER("gpio3", 0xb0, "PERIPH_CLK"),
+	AM3_PRCM_HWMOD_PER("gpio4", 0xb4, "PERIPH_CLK"),
+
 	AM3_PRCM_HWMOD_WKUP("timer0", 0x10, "FIXED_32K"),
 	AM3_PRCM_HWMOD_PER("timer2", 0x80, "PERIPH_CLK"),
 	AM3_PRCM_HWMOD_PER("timer3", 0x84, "PERIPH_CLK"),

Index: src/sys/arch/arm/ti/files.ti
diff -u src/sys/arch/arm/ti/files.ti:1.12 src/sys/arch/arm/ti/files.ti:1.13
--- src/sys/arch/arm/ti/files.ti:1.12	Mon Oct 28 21:16:47 2019
+++ src/sys/arch/arm/ti/files.ti	Mon Oct 28 22:21:35 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.ti,v 1.12 2019/10/28 21:16:47 jmcneill Exp $
+#	$NetBSD: files.ti,v 1.13 2019/10/28 22:21:35 jmcneill Exp $
 #
 
 file	arch/arm/ti/ti_platform.c	soc_ti
@@ -45,6 +45,11 @@ device	omaptimer
 attach  omaptimer at fdt
 file	arch/arm/ti/ti_omaptimer.c	omaptimer
 
+# GPIO
+device	tigpio: gpiobus
+attach	tigpio at fdt with ti_gpio
+file	arch/arm/ti/ti_gpio.c		ti_gpio
+
 # I2C
 device	tiiic: i2cbus, i2cexec
 attach	tiiic at fdt with ti_iic

Added files:

Index: src/sys/arch/arm/ti/ti_gpio.c
diff -u /dev/null src/sys/arch/arm/ti/ti_gpio.c:1.1
--- /dev/null	Mon Oct 28 22:21:35 2019
+++ src/sys/arch/arm/ti/ti_gpio.c	Mon Oct 28 22:21:35 2019
@@ -0,0 +1,302 @@
+/* $NetBSD: ti_gpio.c,v 1.1 2019/10/28 22:21:35 jmcneill Exp $ */
+
+/*-
+ * Copyright (c) 2019 Jared McNeill 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: ti_gpio.c,v 1.1 2019/10/28 22:21:35 jmcneill Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+
+#define	GPIO_OE0x134
+#define	GPIO_DATAIN			0x138
+#define	GPIO_CLEARDATAOUT		0x190
+#define	GPIO_SETDATAOUT			0x194
+
+static const char * const compatible[] = {
+	"ti,omap4-gpio",
+	NULL
+};
+
+struct ti_gpio_softc {
+	device_t sc_dev;
+	bus_space_tag_t sc_bst;
+	bus_space_handle_t sc_bsh;
+	kmutex_t sc_lock;
+
+	struct gpio_chipset_tag sc_gp;
+	gpio_pin_t sc_pins[32];
+	device_t sc_gpiodev;
+};
+
+struct ti_gpio_pin {
+	struct ti_gpio_softc *pin_sc;
+	u_int pin_nr;
+	int pin_flags;
+	bool pin_actlo;
+};
+
+#define RD4(sc, reg) 		\
+bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (reg))
+#define WR4(sc, reg, val) 	\
+

CVS commit: src/etc/etc.evbarm

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 22:23:51 UTC 2019

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
Unhook BEAGLEBONE kernel from the build


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/etc/etc.evbarm/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/evbarm/conf

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 22:21:54 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC

Log Message:
Add tigpio


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/evbarm/conf/GENERIC

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/evbarm/conf

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 22:21:54 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC

Log Message:
Add tigpio


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/evbarm/conf/GENERIC

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/conf/GENERIC
diff -u src/sys/arch/evbarm/conf/GENERIC:1.58 src/sys/arch/evbarm/conf/GENERIC:1.59
--- src/sys/arch/evbarm/conf/GENERIC:1.58	Mon Oct 28 21:17:25 2019
+++ src/sys/arch/evbarm/conf/GENERIC	Mon Oct 28 22:21:54 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC,v 1.58 2019/10/28 21:17:25 jmcneill Exp $
+#	$NetBSD: GENERIC,v 1.59 2019/10/28 22:21:54 jmcneill Exp $
 #
 #	GENERIC ARM (aarch32) kernel
 #
@@ -412,6 +412,7 @@ mesonpinctrl* 	at fdt? pass 2		# Amlogic
 plgpio* 	at fdt?			# ARM PrimeCell GPIO
 sunxigpio* 	at fdt? pass 3		# Allwinner GPIO
 tegragpio* 	at fdt? pass 2		# NVIDIA Tegra GPIO
+tigpio*		at fdt? pass 2		# TI GPIO
 gpio* 		at gpiobus?
 
 # MPIO / Pinmux



CVS commit: src/sys/arch/evbarm/conf

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 21:17:25 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC

Log Message:
Enable TI AM335x DVFS support


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/evbarm/conf/GENERIC

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/conf/GENERIC
diff -u src/sys/arch/evbarm/conf/GENERIC:1.57 src/sys/arch/evbarm/conf/GENERIC:1.58
--- src/sys/arch/evbarm/conf/GENERIC:1.57	Sun Oct 27 19:11:24 2019
+++ src/sys/arch/evbarm/conf/GENERIC	Mon Oct 28 21:17:25 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC,v 1.57 2019/10/27 19:11:24 jmcneill Exp $
+#	$NetBSD: GENERIC,v 1.58 2019/10/28 21:17:25 jmcneill Exp $
 #
 #	GENERIC ARM (aarch32) kernel
 #
@@ -317,6 +317,9 @@ sun9immcclk* 	at fdt? pass 2		# Allwinne
 sun9iusbclk* 	at fdt? pass 2		# Allwinner A80 USB HCI
 tegra124car* 	at fdt? pass 3		# NVIDIA Tegra CAR (T124)
 tegra210car* 	at fdt? pass 3		# NVIDIA Tegra CAR (T210)
+tidivclk*	at fdt? pass 1		# TI divider clock
+tidpllclk*	at fdt? pass 2		# TI DPLL clock
+timuxclk*	at fdt? pass 1		# TI mux clock
 
 fclock*		at fdt? pass 1
 ffclock*	at fdt? pass 1
@@ -512,6 +515,7 @@ tcakp* 		at iic?			# TI TCA8418 Keypad S
 tcagpio* 	at iic?
 titemp* 	at iic?
 tps65217pmic*	at iic?			# TI TPS65217 Power Management IC
+tps65217reg*	at tps65217pmic?
 wskbd* 		at tcakp? console ?
 
 # CAN bus



CVS commit: src/sys/arch/evbarm/conf

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 21:17:25 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC

Log Message:
Enable TI AM335x DVFS support


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/evbarm/conf/GENERIC

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 22:26:05 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
evbarm: Update TI AM335x SoC support to use FDT based configuration.


To generate a diff of this commit:
cvs rdiff -u -r1.2604 -r1.2605 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2019-10-28 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Oct 28 22:26:05 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
evbarm: Update TI AM335x SoC support to use FDT based configuration.


To generate a diff of this commit:
cvs rdiff -u -r1.2604 -r1.2605 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2604 src/doc/CHANGES:1.2605
--- src/doc/CHANGES:1.2604	Mon Oct 28 03:01:55 2019
+++ src/doc/CHANGES	Mon Oct 28 22:26:05 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2604 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2605 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -60,3 +60,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	vio9p(4): Add virtio-9p front-end driver. [ozaki-r 20191028]
 	mount_9p(8): Enable to mount a filesystem exported via virtio-9p.
 		[ozaki-r 20191028]
+	evbarm: Update TI AM335x SoC support to use FDT based configuration.
+		[jmcneill 20191028]



  1   2   >