CVS commit: src/tests/dev/audio

2020-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 12 07:02:21 UTC 2020

Modified Files:
src/tests/dev/audio: audiotest.c

Log Message:
Add sentinel to the testtable[] array.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/dev/audio/audiotest.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/dev/audio/audiotest.c
diff -u src/tests/dev/audio/audiotest.c:1.1 src/tests/dev/audio/audiotest.c:1.2
--- src/tests/dev/audio/audiotest.c:1.1	Tue Feb 11 07:03:16 2020
+++ src/tests/dev/audio/audiotest.c	Wed Feb 12 07:02:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: audiotest.c,v 1.1 2020/02/11 07:03:16 isaki Exp $	*/
+/*	$NetBSD: audiotest.c,v 1.2 2020/02/12 07:02:21 martin Exp $	*/
 
 /*
  * Copyright (C) 2019 Tetsuya Isaki. All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: audiotest.c,v 1.1 2020/02/11 07:03:16 isaki Exp $");
+__RCSID("$NetBSD: audiotest.c,v 1.2 2020/02/12 07:02:21 martin Exp $");
 
 #include 
 #include 
@@ -6431,4 +6431,5 @@ struct testentry testtable[] = {
 	ENT(audioctl_rw_RDWR),
 	ENT(audioctl_poll),
 	ENT(audioctl_kqueue),
+	{.name = NULL},
 };



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

2020-02-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 12 07:02:08 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: vectors.S

Log Message:
Adjust comments


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/aarch64/aarch64/vectors.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/aarch64/aarch64/vectors.S
diff -u src/sys/arch/aarch64/aarch64/vectors.S:1.10 src/sys/arch/aarch64/aarch64/vectors.S:1.11
--- src/sys/arch/aarch64/aarch64/vectors.S:1.10	Wed Feb 12 01:09:17 2020
+++ src/sys/arch/aarch64/aarch64/vectors.S	Wed Feb 12 07:02:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vectors.S,v 1.10 2020/02/12 01:09:17 riastradh Exp $	*/
+/*	$NetBSD: vectors.S,v 1.11 2020/02/12 07:02:08 skrll Exp $	*/
 
 #include 
 #include "assym.h"
@@ -23,7 +23,8 @@
 	.align 7	/* aligned 0x80 */
 
 	.if \el == 1
-	sub	sp, sp, #TRAP_FRAMESIZE	/* need to allocate stack on el1 */
+	/* need to allocate stack on el1 */
+	sub	sp, sp, #TRAP_FRAMESIZE
 	.endif
 
 	stp	x0, x1, [sp, #TF_X0]
@@ -47,7 +48,8 @@
 	.if \el == 0
 	mrs	x20, sp_el0
 	.else
-	add	x20, sp, #TRAP_FRAMESIZE	/* sp is already adjusted */
+	/* sp was already adjusted, so adjust x20 back */
+	add	x20, sp, #TRAP_FRAMESIZE
 	.endif
 	mrs	x21, elr_el1
 



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

2020-02-11 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Feb 12 06:57:35 UTC 2020

Added Files:
src/sys/arch/evbarm/stand/board: ixp425_mem.c nslu2.c
src/sys/arch/evbarm/stand/gzboot/NSLU2_dram_0x01d0: Makefile
ldscript

Log Message:
Add gzboot support for NSLU2.  This is a work-in-progress.  This configuration
follows the existing NSLU2 RedBoot default bootstrap procedure.  (Other
configurations are possible, but not yet implemented.)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/stand/board/ixp425_mem.c \
src/sys/arch/evbarm/stand/board/nslu2.c
cvs rdiff -u -r0 -r1.1 \
src/sys/arch/evbarm/stand/gzboot/NSLU2_dram_0x01d0/Makefile \
src/sys/arch/evbarm/stand/gzboot/NSLU2_dram_0x01d0/ldscript

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

Added files:

Index: src/sys/arch/evbarm/stand/board/ixp425_mem.c
diff -u /dev/null src/sys/arch/evbarm/stand/board/ixp425_mem.c:1.1
--- /dev/null	Wed Feb 12 06:57:35 2020
+++ src/sys/arch/evbarm/stand/board/ixp425_mem.c	Wed Feb 12 06:57:35 2020
@@ -0,0 +1,95 @@
+/*	$NetBSD: ixp425_mem.c,v 1.1 2020/02/12 06:57:35 thorpej Exp $	*/
+
+/*
+ * Copyright (c) 2003 Wasabi Systems, Inc.
+ * All rights reserved.
+ *
+ * Written by Steve C. Woodford for Wasabi Systems, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ *	This product includes software developed for the NetBSD Project by
+ *	Wasabi Systems, Inc.
+ * 4. The name of Wasabi Systems, Inc. may not be used to endorse
+ *or promote products derived from this software without specific prior
+ *written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC
+ * 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.
+ */
+
+/*
+ * This file provides the mem_init() function for boards using the
+ * Intel IXP425 Network Processor.
+ */
+
+#include 
+#include 
+
+#include 
+
+#include "board.h"
+
+#define	MCU_REG_READ(x)	(*(volatile uint32_t *)(IXP425_MCU_HWBASE + (x)))
+
+static const uint32_t sdram_64bit[] = {
+	0x0080,	/* 8M:  One 2M x 32 chip */
+	0x0100,	/* 16M: Two 2M x 32 chips */
+	0x0100,	/* 16M: One 4M x 32 chip */
+	0x0200,	/* 32M: Two 4M x 32 chips */
+	0, 0, 0, 0
+};
+
+static const uint32_t sdram_other[] = {
+	0x0200,	/*  32M: Two   8M x 16 chips */
+	0x0400,	/*  64M: Four  8M x 16 chips */
+	0x0400,	/*  64M: Two  16M x 16 chips */
+	0x0800,	/* 128M: Four 16M x 16 chips */
+	0x0800,	/* 128M: Two  32M x 16 chips */
+	0x1000,	/* 256M: Four 32M x 16 chips */
+	0, 0
+};
+
+void
+mem_init(void)
+{
+	uint32_t sdr_config;
+	uint32_t start, size, heap;
+
+	sdr_config = MCU_REG_READ(MCU_SDR_CONFIG);
+
+	start = 0x;		/* fixed SDRAM base address */
+
+	if (sdr_config & MCU_SDR_CONFIG_64MBIT)
+		size = sdram_64bit[MCU_SDR_CONFIG_MCONF(sdr_config)];
+	else
+		size = sdram_other[MCU_SDR_CONFIG_MCONF(sdr_config)];
+	
+	if (size == 0) {
+		printf("** SDR_CONFIG returns unknown value, using 32M\n");
+		size = 32 * 1024 * 1024;
+	}
+
+	heap = (start + size) - BOARD_HEAP_SIZE;
+
+	printf(">> RAM 0x%x - 0x%x, heap at 0x%x\n",
+	start, (start + size) - 1, heap);
+	setheap((void *)heap, (void *)(start + size - 1));
+}
Index: src/sys/arch/evbarm/stand/board/nslu2.c
diff -u /dev/null src/sys/arch/evbarm/stand/board/nslu2.c:1.1
--- /dev/null	Wed Feb 12 06:57:35 2020
+++ src/sys/arch/evbarm/stand/board/nslu2.c	Wed Feb 12 06:57:35 2020
@@ -0,0 +1,59 @@
+/*	$NetBSD: nslu2.c,v 1.1 2020/02/12 06:57:35 thorpej Exp $	*/
+
+/*
+ * Copyright (c) 2002 Wasabi Systems, Inc.
+ * All rights reserved.
+ *
+ * Written by Jason R. Thorpe for Wasabi Systems, Inc.
+ *
+ * Redistribution and use 

CVS commit: src/sys/dev/pci

2020-02-11 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Feb 12 06:41:44 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Remove wrong KASSERTs because mutex_owned for a spin lock doesn't check
that a lock is held in the current context.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/if_ixl.c

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

Modified files:

Index: src/sys/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.41 src/sys/dev/pci/if_ixl.c:1.42
--- src/sys/dev/pci/if_ixl.c:1.41	Wed Feb 12 06:37:21 2020
+++ src/sys/dev/pci/if_ixl.c	Wed Feb 12 06:41:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.41 2020/02/12 06:37:21 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.42 2020/02/12 06:41:44 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -3399,9 +3399,6 @@ ixl_handle_queue_common(struct ixl_softc
 	int txmore, rxmore;
 	int rv;
 
-	KASSERT(!mutex_owned(>txr_lock));
-	KASSERT(!mutex_owned(>rxr_lock));
-
 	mutex_enter(>txr_lock);
 	txevcnt->ev_count++;
 	txmore = ixl_txeof(sc, txr, txlimit);



CVS commit: src/sys/dev/pci

2020-02-11 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Feb 12 06:37:21 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c if_ixlvar.h

Log Message:
Use Set RSS key command and Set LUT command to enable RSS on X722


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/pci/if_ixl.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/if_ixlvar.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/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.40 src/sys/dev/pci/if_ixl.c:1.41
--- src/sys/dev/pci/if_ixl.c:1.40	Wed Feb 12 06:26:02 2020
+++ src/sys/dev/pci/if_ixl.c	Wed Feb 12 06:37:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.40 2020/02/12 06:26:02 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.41 2020/02/12 06:37:21 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -656,7 +656,7 @@ struct ixl_softc {
 	uint8_t			 sc_pf_id;
 	uint16_t		 sc_uplink_seid;	/* le */
 	uint16_t		 sc_downlink_seid;	/* le */
-	uint16_t		 sc_vsi_number;		/* le */
+	uint16_t		 sc_vsi_number;
 	uint16_t		 sc_vsi_stat_counter_idx;
 	uint16_t		 sc_seid;
 	unsigned int		 sc_base_queue;
@@ -673,6 +673,7 @@ struct ixl_softc {
 #define IXL_SC_AQ_FLAG_RXCTL	__BIT(0)
 #define IXL_SC_AQ_FLAG_NVMLOCK	__BIT(1)
 #define IXL_SC_AQ_FLAG_NVMREAD	__BIT(2)
+#define IXL_SC_AQ_FLAG_RSS	__BIT(3)
 
 	kmutex_t		 sc_atq_lock;
 	kcondvar_t		 sc_atq_cv;
@@ -3966,6 +3967,7 @@ ixl_get_version(struct ixl_softc *sc)
 		SET(sc->sc_aq_flags, IXL_SC_AQ_FLAG_NVMLOCK |
 		IXL_SC_AQ_FLAG_NVMREAD);
 		SET(sc->sc_aq_flags, IXL_SC_AQ_FLAG_RXCTL);
+		SET(sc->sc_aq_flags, IXL_SC_AQ_FLAG_RSS);
 	}
 
 #define IXL_API_VER(maj, min)	(((uint32_t)(maj) << 16) | (min))
@@ -4515,7 +4517,7 @@ ixl_get_vsi(struct ixl_softc *sc)
 	}
 
 	reply = (struct ixl_aq_vsi_reply *)iaq.iaq_param;
-	sc->sc_vsi_number = reply->vsi_number;
+	sc->sc_vsi_number = le16toh(reply->vsi_number);
 	data = IXL_DMA_KVA(vsi);
 	sc->sc_vsi_stat_counter_idx = le16toh(data->stat_counter_idx);
 
@@ -4624,21 +4626,148 @@ ixl_get_default_rss_key(uint32_t *buf, s
 	memcpy(buf, rss_seed, cplen);
 }
 
-static void
-ixl_set_rss_key(struct ixl_softc *sc)
+static int
+ixl_set_rss_key(struct ixl_softc *sc, uint8_t *key, size_t keylen)
+{
+	struct ixl_dmamem *idm;
+	struct ixl_atq iatq;
+	struct ixl_aq_desc *iaq;
+	struct ixl_aq_rss_key_param *param;
+	struct ixl_aq_rss_key_data *data;
+	size_t len, datalen, stdlen, extlen;
+	uint16_t vsi_id;
+	int rv;
+
+	memset(, 0, sizeof(iatq));
+	iaq = _desc;
+	idm = >sc_aqbuf;
+
+	datalen = sizeof(*data);
+
+	/*XXX The buf size has to be less than the size of the register */
+	datalen = MIN(IXL_RSS_KEY_SIZE_REG * sizeof(uint32_t), datalen);
+
+	iaq->iaq_flags = htole16(IXL_AQ_BUF | IXL_AQ_RD |
+	(datalen > I40E_AQ_LARGE_BUF ? IXL_AQ_LB : 0));
+	iaq->iaq_opcode = htole16(IXL_AQ_OP_RSS_SET_KEY);
+	iaq->iaq_datalen = htole16(datalen);
+
+	param = (struct ixl_aq_rss_key_param *)iaq->iaq_param;
+	vsi_id = (sc->sc_vsi_number << IXL_AQ_RSSKEY_VSI_ID_SHIFT) |
+	IXL_AQ_RSSKEY_VSI_VALID;
+	param->vsi_id = htole16(vsi_id);
+
+	memset(IXL_DMA_KVA(idm), 0, IXL_DMA_LEN(idm));
+	data = IXL_DMA_KVA(idm);
+
+	len = MIN(keylen, datalen);
+	stdlen = MIN(sizeof(data->standard_rss_key), len);
+	memcpy(data->standard_rss_key, key, stdlen);
+	len = (len > stdlen) ? (len - stdlen) : 0;
+
+	extlen = MIN(sizeof(data->extended_hash_key), len);
+	extlen = (stdlen < keylen) ? 0 : keylen - stdlen;
+	memcpy(data->extended_hash_key, key + stdlen, extlen);
+
+	ixl_aq_dva(iaq, IXL_DMA_DVA(idm));
+
+	bus_dmamap_sync(sc->sc_dmat, IXL_DMA_MAP(idm), 0,
+	IXL_DMA_LEN(idm), BUS_DMASYNC_PREWRITE);
+
+	rv = ixl_atq_exec(sc, );
+
+	bus_dmamap_sync(sc->sc_dmat, IXL_DMA_MAP(idm), 0,
+	IXL_DMA_LEN(idm), BUS_DMASYNC_POSTWRITE);
+
+	if (rv != 0) {
+		return ETIMEDOUT;
+	}
+
+	if (iaq->iaq_retval != htole16(IXL_AQ_RC_OK)) {
+		return EIO;
+	}
+
+	return 0;
+}
+
+static int
+ixl_set_rss_lut(struct ixl_softc *sc, uint8_t *lut, size_t lutlen)
+{
+	struct ixl_dmamem *idm;
+	struct ixl_atq iatq;
+	struct ixl_aq_desc *iaq;
+	struct ixl_aq_rss_lut_param *param;
+	uint16_t vsi_id;
+	uint8_t *data;
+	size_t dmalen;
+	int rv;
+
+	memset(, 0, sizeof(iatq));
+	iaq = _desc;
+	idm = >sc_aqbuf;
+
+	dmalen = MIN(lutlen, IXL_DMA_LEN(idm));
+
+	iaq->iaq_flags = htole16(IXL_AQ_BUF | IXL_AQ_RD |
+	(dmalen > I40E_AQ_LARGE_BUF ? IXL_AQ_LB : 0));
+	iaq->iaq_opcode = htole16(IXL_AQ_OP_RSS_SET_LUT);
+	iaq->iaq_datalen = htole16(dmalen);
+
+	memset(IXL_DMA_KVA(idm), 0, IXL_DMA_LEN(idm));
+	data = IXL_DMA_KVA(idm);
+	memcpy(data, lut, dmalen);
+	ixl_aq_dva(iaq, IXL_DMA_DVA(idm));
+
+	param = (struct ixl_aq_rss_lut_param *)iaq->iaq_param;
+	vsi_id = (sc->sc_vsi_number << IXL_AQ_RSSLUT_VSI_ID_SHIFT) |
+	IXL_AQ_RSSLUT_VSI_VALID;
+	param->vsi_id = htole16(vsi_id);
+	param->flags = htole16(IXL_AQ_RSSLUT_TABLE_TYPE_PF <<
+	IXL_AQ_RSSLUT_TABLE_TYPE_SHIFT);
+
+	

CVS commit: src/sys/modules/cyclic

2020-02-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 12 06:36:19 UTC 2020

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

Log Message:
cyclic.kmod needs -Wno-sign-compare for aarch64 CPU_INFO_FOREACH.

Provisional workaround; feel free to fix.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/modules/cyclic/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/cyclic/Makefile
diff -u src/sys/modules/cyclic/Makefile:1.4 src/sys/modules/cyclic/Makefile:1.5
--- src/sys/modules/cyclic/Makefile:1.4	Tue Dec  3 22:10:56 2019
+++ src/sys/modules/cyclic/Makefile	Wed Feb 12 06:36:19 2020
@@ -25,6 +25,6 @@ CPPFLAGS+=	-I${OSNETDIR}/sys \
 		-I${OSNETDIR}/dev/cyclic/${ARCH} \
 		-I${OSNETDIR}/dist/uts/common
 
-CPPFLAGS+=	-Wno-unknown-pragmas -Wno-cast-qual
+CPPFLAGS+=	-Wno-unknown-pragmas -Wno-cast-qual -Wno-sign-compare
 
 .include 



CVS commit: src/sys/dev/pci

2020-02-11 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Feb 12 06:26:02 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
xl(4) should use the aq command to access RX control registers
if the device is X722 or others whose API version is upper than 1.5


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/if_ixl.c

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

Modified files:

Index: src/sys/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.39 src/sys/dev/pci/if_ixl.c:1.40
--- src/sys/dev/pci/if_ixl.c:1.39	Wed Feb 12 06:21:44 2020
+++ src/sys/dev/pci/if_ixl.c	Wed Feb 12 06:26:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.39 2020/02/12 06:21:44 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.40 2020/02/12 06:26:02 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -3965,13 +3965,12 @@ ixl_get_version(struct ixl_softc *sc)
 	if (sc->sc_mac_type == I40E_MAC_X722) {
 		SET(sc->sc_aq_flags, IXL_SC_AQ_FLAG_NVMLOCK |
 		IXL_SC_AQ_FLAG_NVMREAD);
+		SET(sc->sc_aq_flags, IXL_SC_AQ_FLAG_RXCTL);
 	}
 
 #define IXL_API_VER(maj, min)	(((uint32_t)(maj) << 16) | (min))
 	if (IXL_API_VER(api_maj_ver, api_min_ver) >= IXL_API_VER(1, 5)) {
-		if (sc->sc_mac_type == I40E_MAC_X722) {
-			SET(sc->sc_aq_flags, IXL_SC_AQ_FLAG_RXCTL);
-		}
+		SET(sc->sc_aq_flags, IXL_SC_AQ_FLAG_RXCTL);
 		SET(sc->sc_aq_flags, IXL_SC_AQ_FLAG_NVMLOCK);
 	}
 #undef IXL_API_VER



CVS commit: src/sys/dev/pci

2020-02-11 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Feb 12 06:21:44 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Fix a wrong comment in ixl(4)


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/if_ixl.c

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

Modified files:

Index: src/sys/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.38 src/sys/dev/pci/if_ixl.c:1.39
--- src/sys/dev/pci/if_ixl.c:1.38	Wed Feb 12 06:20:13 2020
+++ src/sys/dev/pci/if_ixl.c	Wed Feb 12 06:21:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.38 2020/02/12 06:20:13 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.39 2020/02/12 06:21:44 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -4348,7 +4348,7 @@ ixl_get_phy_info(struct ixl_softc *sc)
 
 	if (ixl_dmamem_alloc(sc, , IXL_AQ_BUFLEN, 0) != 0) {
 		aprint_error_dev(sc->sc_dev,
-		"unable to allocate switch config buffer\n");
+		"unable to allocate phy abilities buffer\n");
 		return -1;
 	}
 



CVS commit: src/sys/dev/pci

2020-02-11 Thread Shoichi YAMAGUCHI
Module Name:src
Committed By:   yamaguchi
Date:   Wed Feb 12 06:20:13 UTC 2020

Modified Files:
src/sys/dev/pci: if_ixl.c

Log Message:
Change the command sequence and timing to prevent EIO
in "Get PHY Abilities" command

The error has been appeared on X722 attaching an SFP module
without link up.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/pci/if_ixl.c

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

Modified files:

Index: src/sys/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.37 src/sys/dev/pci/if_ixl.c:1.38
--- src/sys/dev/pci/if_ixl.c:1.37	Fri Feb  7 09:38:29 2020
+++ src/sys/dev/pci/if_ixl.c	Wed Feb 12 06:20:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ixl.c,v 1.37 2020/02/07 09:38:29 yamaguchi Exp $	*/
+/*	$NetBSD: if_ixl.c,v 1.38 2020/02/12 06:20:13 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -1280,11 +1280,6 @@ ixl_attach(device_t parent, device_t sel
 		goto free_hmc;
 	}
 
-	if (ixl_get_phy_info(sc) != 0) {
-		/* error printed by ixl_get_phy_info */
-		goto free_hmc;
-	}
-
 	rv = ixl_get_link_status_poll(sc, NULL);
 	if (rv != 0) {
 		aprint_error_dev(self, "GET LINK STATUS %s\n",
@@ -1292,6 +1287,16 @@ ixl_attach(device_t parent, device_t sel
 		goto free_hmc;
 	}
 
+	/*
+	 * The FW often returns EIO in "Get PHY Abilities" command
+	 * if there is no delay
+	 */
+	DELAY(500);
+	if (ixl_get_phy_info(sc) != 0) {
+		/* error printed by ixl_get_phy_info */
+		goto free_hmc;
+	}
+
 	if (ixl_dmamem_alloc(sc, >sc_scratch,
 	sizeof(struct ixl_aq_vsi_data), 8) != 0) {
 		aprint_error_dev(self, "unable to allocate scratch buffer\n");



CVS commit: src/external/cddl/osnet/dev/dtrace/aarch64

2020-02-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 12 06:05:23 UTC 2020

Modified Files:
src/external/cddl/osnet/dev/dtrace/aarch64: dtrace_subr.c

Log Message:
Change the address ranges that aarch64 considers toxic for dtrace.

`Toxic' means dtrace forbids D scripts from even attempting to read
or write at them.

Previously we considered [0, VM_MIN_KERNEL_ADDRESS) toxic, but
VM_MIN_KERNEL_ADDRESS is only the minimum address of the kernel map;
the direct-mapped region lies below it, and with PMAP_MAP_POOLPAGE we
allocate virtual pages for pool backing directly from physical pages
through the direct-mapped region.  Also, this did not consider I/O
mappings to be toxic, which they probably should be.

Instead, treat:

[0, AARCH64_KSEG_START)
and
[VM_KERNEL_IO_ADDRESS, 0xfff...ff)

as toxic.  (The upper bound for 0xfff...ff ought to be inclusive, not
exclusive, but I think we'll need another mechanism for expressing
that to dtrace!)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c

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

Modified files:

Index: src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c
diff -u src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c:1.2 src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c:1.3
--- src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c:1.2	Wed Feb 12 01:09:38 2020
+++ src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c	Wed Feb 12 06:05:23 2020
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dtrace_subr.c,v 1.2 2020/02/12 01:09:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dtrace_subr.c,v 1.3 2020/02/12 06:05:23 riastradh Exp $");
 
 #include 
 #include 
@@ -128,7 +128,8 @@ void
 dtrace_toxic_ranges(void (*func)(uintptr_t base, uintptr_t limit))
 {
 
-	(*func)(0, (uintptr_t)VM_MIN_KERNEL_ADDRESS);
+	(*func)(0, (uintptr_t)AARCH64_KSEG_START);
+	(*func)((uintptr_t)VM_KERNEL_IO_ADDRESS, ~(uintptr_t)0);
 }
 
 static void



CVS commit: src/external/cddl/osnet/dev/fbt/aarch64

2020-02-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 12 06:05:31 UTC 2020

Modified Files:
src/external/cddl/osnet/dev/fbt/aarch64: fbt_isa.c

Log Message:
Switch from db_write_bytes to using direct-mapping.

This way there's no dependency on ddb.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c

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

Modified files:

Index: src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c
diff -u src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.5 src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.6
--- src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.5	Wed Feb 12 01:10:25 2020
+++ src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c	Wed Feb 12 06:05:31 2020
@@ -37,7 +37,9 @@
 #include 
 #include 
 
-#include 
+#include 
+
+#include 
 
 #include 
 
@@ -92,9 +94,14 @@ fbt_invop(uintptr_t addr, struct trapfra
 void
 fbt_patch_tracepoint(fbt_probe_t *fbt, fbt_patchval_t val)
 {
+	paddr_t pa;
+	vaddr_t va;
 
-	db_write_bytes((db_addr_t)fbt->fbtp_patchpoint, sizeof(val),
-	(const void *));
+	if (!pmap_extract(pmap_kernel(), (vaddr_t)fbt->fbtp_patchpoint, ))
+		return;
+	if (!mm_md_direct_mapped_phys(pa, ))
+		return;
+	*(fbt_patchval_t *)va = val;
 	cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, sizeof(val));
 }
 



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

2020-02-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 12 06:05:46 UTC 2020

Modified Files:
src/sys/arch/aarch64/include: cpu.h

Log Message:
Define the MULTIPROCESSOR cpu_number() for modules too.

Modules should work whether the main kernel is multiprocessor or not.
In particular, dtrace should not think cpu_number() is 0 while
cpu_index(curcpu()) and curcpu()->ci_index are nonzero, leading to
rather spectacularly bogus results...


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/aarch64/include/cpu.h

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

Modified files:

Index: src/sys/arch/aarch64/include/cpu.h
diff -u src/sys/arch/aarch64/include/cpu.h:1.19 src/sys/arch/aarch64/include/cpu.h:1.20
--- src/sys/arch/aarch64/include/cpu.h:1.19	Wed Jan 15 08:34:04 2020
+++ src/sys/arch/aarch64/include/cpu.h	Wed Feb 12 06:05:46 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.19 2020/01/15 08:34:04 mrg Exp $ */
+/* $NetBSD: cpu.h,v 1.20 2020/02/12 06:05:46 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -134,7 +134,7 @@ extern uint64_t cpu_mpidr[];		/* MULTIPR
 bool cpu_hatched_p(u_int);		/* MULTIPROCESSOR */
 
 #define CPU_INFO_ITERATOR	cpuid_t
-#ifdef MULTIPROCESSOR
+#if defined(MULTIPROCESSOR) || defined(_MODULE)
 #define cpu_number()		(curcpu()->ci_index)
 #define CPU_IS_PRIMARY(ci)	((ci)->ci_index == 0)
 #define CPU_INFO_FOREACH(cii, ci)	\



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

2020-02-11 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Feb 12 05:44:26 UTC 2020

Modified Files:
src/sys/arch/arm/xscale: ixp425reg.h

Log Message:
Correct the location of SDRAM in the comment describing the IXP425
memory map.  SDRAM is located at 0x and has aliases at 0x1000,
0x2000, and 0x3000.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/xscale/ixp425reg.h

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

Modified files:

Index: src/sys/arch/arm/xscale/ixp425reg.h
diff -u src/sys/arch/arm/xscale/ixp425reg.h:1.22 src/sys/arch/arm/xscale/ixp425reg.h:1.23
--- src/sys/arch/arm/xscale/ixp425reg.h:1.22	Mon Nov 12 18:00:38 2012
+++ src/sys/arch/arm/xscale/ixp425reg.h	Wed Feb 12 05:44:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ixp425reg.h,v 1.22 2012/11/12 18:00:38 skrll Exp $ */
+/*	$NetBSD: ixp425reg.h,v 1.23 2020/02/12 05:44:26 thorpej Exp $ */
 /*
  * Copyright (c) 2003
  *	Ichiro FUKUHARA .
@@ -54,8 +54,14 @@
  * 4800  ---
  *
  * 4000  ---
- *   SDRAM
+ *   SDRAM (alias)
+ * 3000  ---
+ *   SDRAM (alias)
+ * 2000  ---
+ *   SDRAM (alias)
  * 1000  ---
+ *   SDRAM
+ *   ---
  */   
 
 /*



CVS commit: src/external/bsd/ppp/dist/pppd

2020-02-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 12 01:51:52 UTC 2020

Modified Files:
src/external/bsd/ppp/dist/pppd: eap.c

Log Message:
pppd: Fix bounds check in EAP code

Given that we have just checked vallen < len, it can never be the case
that vallen >= len + sizeof(rhostname).  This fixes the check so we
actually avoid overflowing the rhostname array.

Reported-by: Ilja Van Sprundel 
Signed-off-by: Paul Mackerras 

From:
https://github.com/paulusmack/ppp/commit/8d7970b8f3db727fe798b65f3377fe6787575426


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ppp/dist/pppd/eap.c

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

Modified files:

Index: src/external/bsd/ppp/dist/pppd/eap.c
diff -u src/external/bsd/ppp/dist/pppd/eap.c:1.4 src/external/bsd/ppp/dist/pppd/eap.c:1.5
--- src/external/bsd/ppp/dist/pppd/eap.c:1.4	Sat Oct 25 17:11:37 2014
+++ src/external/bsd/ppp/dist/pppd/eap.c	Tue Feb 11 20:51:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: eap.c,v 1.4 2014/10/25 21:11:37 christos Exp $	*/
+/*	$NetBSD: eap.c,v 1.5 2020/02/12 01:51:52 christos Exp $	*/
 /*
  * eap.c - Extensible Authentication Protocol for PPP (RFC 2284)
  *
@@ -49,7 +49,7 @@
 #define RCSID	"Id: eap.c,v 1.4 2004/11/09 22:39:25 paulus Exp "
 static const char rcsid[] = RCSID;
 #else
-__RCSID("$NetBSD: eap.c,v 1.4 2014/10/25 21:11:37 christos Exp $");
+__RCSID("$NetBSD: eap.c,v 1.5 2020/02/12 01:51:52 christos Exp $");
 #endif
 
 /*
@@ -1433,7 +1433,7 @@ int len;
 		}
 
 		/* Not so likely to happen. */
-		if (vallen >= len + sizeof (rhostname)) {
+		if (len - vallen >= sizeof (rhostname)) {
 			dbglog("EAP: trimming really long peer name down");
 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
 			rhostname[sizeof (rhostname) - 1] = '\0';
@@ -1859,7 +1859,7 @@ int len;
 		}
 
 		/* Not so likely to happen. */
-		if (vallen >= len + sizeof (rhostname)) {
+		if (len - vallen >= sizeof (rhostname)) {
 			dbglog("EAP: trimming really long peer name down");
 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
 			rhostname[sizeof (rhostname) - 1] = '\0';



CVS commit: src/sys/net/npf

2020-02-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 12 01:34:55 UTC 2020

Modified Files:
src/sys/net/npf: npf_ruleset.c

Log Message:
PR/54950: Lloyd Parkes: Avoid NULL deref.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/net/npf/npf_ruleset.c

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

Modified files:

Index: src/sys/net/npf/npf_ruleset.c
diff -u src/sys/net/npf/npf_ruleset.c:1.49 src/sys/net/npf/npf_ruleset.c:1.50
--- src/sys/net/npf/npf_ruleset.c:1.49	Sun Sep 29 13:00:29 2019
+++ src/sys/net/npf/npf_ruleset.c	Tue Feb 11 20:34:55 2020
@@ -33,7 +33,7 @@
 
 #ifdef _KERNEL
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npf_ruleset.c,v 1.49 2019/09/29 17:00:29 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_ruleset.c,v 1.50 2020/02/12 01:34:55 christos Exp $");
 
 #include 
 #include 
@@ -153,6 +153,9 @@ npf_ruleset_create(size_t slots)
 void
 npf_ruleset_destroy(npf_ruleset_t *rlset)
 {
+	if (rlset == NULL)
+		return;
+
 	size_t len = offsetof(npf_ruleset_t, rs_rules[rlset->rs_slots]);
 	npf_rule_t *rl;
 



CVS commit: src/external/cddl/osnet/dev/fbt/aarch64

2020-02-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 12 01:10:25 UTC 2020

Modified Files:
src/external/cddl/osnet/dev/fbt/aarch64: fbt_isa.c

Log Message:
Count the number of artificial frames in aarch64 fbt probe correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c

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

Modified files:

Index: src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c
diff -u src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.4 src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.5
--- src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.4	Wed Feb 12 01:09:48 2020
+++ src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c	Wed Feb 12 01:10:25 2020
@@ -52,6 +52,17 @@
 #define	FBT_ENTRY	"entry"
 #define	FBT_RETURN	"return"
 
+/*
+ * How many artificial frames appear between dtrace_probe and the
+ * interrupted function call?
+ *
+ *	fbt_invop
+ *	dtrace_invop
+ *	dtrace_invop_start
+ *	el1_trap_exit
+ */
+#define	FBT_AFRAMES	4
+
 int
 fbt_invop(uintptr_t addr, struct trapframe *frame, uintptr_t r0)
 {
@@ -152,7 +163,7 @@ fbt_provide_module_cb(const char *name, 
 #endif
 	fbt->fbtp_name = name;
 	fbt->fbtp_id = dtrace_probe_create(fbt_id, modname,
-	name, FBT_ENTRY, 3, fbt);
+	name, FBT_ENTRY, FBT_AFRAMES, fbt);
 	fbt->fbtp_patchpoint = instr;
 #ifdef __FreeBSD__
 	fbt->fbtp_ctl = lf;
@@ -206,7 +217,7 @@ again:
 	fbt->fbtp_name = name;
 	if (retfbt == NULL) {
 		fbt->fbtp_id = dtrace_probe_create(fbt_id, modname,
-		name, FBT_RETURN, 3, fbt);
+		name, FBT_RETURN, FBT_AFRAMES, fbt);
 	} else {
 		retfbt->fbtp_next = fbt;
 		fbt->fbtp_id = retfbt->fbtp_id;



CVS commit: src/external/cddl/osnet/dev/fbt/aarch64

2020-02-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 12 01:09:48 UTC 2020

Modified Files:
src/external/cddl/osnet/dev/fbt/aarch64: fbt_isa.c

Log Message:
Tidy up a bit: don't set things we won't use; assert nonzeroness.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c

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

Modified files:

Index: src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c
diff -u src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.3 src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.4
--- src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.3	Wed Feb 12 01:09:39 2020
+++ src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c	Wed Feb 12 01:09:48 2020
@@ -70,6 +70,7 @@ fbt_invop(uintptr_t addr, struct trapfra
 			frame->tf_regs.r_reg[3], frame->tf_regs.r_reg[4]);
 
 			cpu->cpu_dtrace_caller = 0;
+			KASSERT(fbt->fbtp_savedval != 0);
 			return (fbt->fbtp_savedval);
 		}
 	}
@@ -142,6 +143,7 @@ fbt_provide_module_cb(const char *name, 
 
 	if (instr >= limit)
 		return (0);
+	KASSERT(*instr != 0);
 
 #ifdef __FreeBSD__
 	fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO);
@@ -161,7 +163,6 @@ fbt_provide_module_cb(const char *name, 
 #endif
 	fbt->fbtp_savedval = *instr;
 	fbt->fbtp_patchval = FBT_PATCHVAL;
-	fbt->fbtp_rval = DTRACE_INVOP_PUSHM;
 	fbt->fbtp_symindx = symindx;
 
 	fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)];
@@ -192,6 +193,7 @@ again:
 
 	if (instr >= limit)
 		return (0);
+	KASSERT(*instr != 0);
 
 	/*
 	 * We have a winner!
@@ -219,13 +221,10 @@ again:
 #ifdef __NetBSD__
 	fbt->fbtp_ctl = mod;
 #endif
-	fbt->fbtp_symindx = symindx;
-	if ((*instr & B_MASK) == B_INSTR)
-		fbt->fbtp_rval = DTRACE_INVOP_B;
-	else
-		fbt->fbtp_rval = DTRACE_INVOP_RET;
 	fbt->fbtp_savedval = *instr;
 	fbt->fbtp_patchval = FBT_PATCHVAL;
+	fbt->fbtp_symindx = symindx;
+
 	fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)];
 	fbt_probetab[FBT_ADDR2NDX(instr)] = fbt;
 



CVS commit: src/external/cddl/osnet/dev

2020-02-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 12 01:09:39 UTC 2020

Modified Files:
src/external/cddl/osnet/dev/dtrace/aarch64: dtrace_subr.c
src/external/cddl/osnet/dev/fbt/aarch64: fbt_isa.c

Log Message:
Tidy up a bit.  No functional change intended.

aarch64 fbt_invop doesn't actually use the argument, but it would
make more sense for it to be the return value and/or first argument
register.  Certainly it's not `eax'!


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c

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

Modified files:

Index: src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c
diff -u src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c:1.1 src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c:1.2
--- src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c:1.1	Tue Dec  3 22:10:56 2019
+++ src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c	Wed Feb 12 01:09:38 2020
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dtrace_subr.c,v 1.1 2019/12/03 22:10:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dtrace_subr.c,v 1.2 2020/02/12 01:09:38 riastradh Exp $");
 
 #include 
 #include 
@@ -69,13 +69,13 @@ typedef struct dtrace_invop_hdlr {
 dtrace_invop_hdlr_t *dtrace_invop_hdlr;
 
 int
-dtrace_invop(uintptr_t addr, struct trapframe *frame, uintptr_t eax)
+dtrace_invop(uintptr_t addr, struct trapframe *frame, uintptr_t r0)
 {
 	dtrace_invop_hdlr_t *hdlr;
 	int rval;
 
 	for (hdlr = dtrace_invop_hdlr; hdlr != NULL; hdlr = hdlr->dtih_next)
-		if ((rval = hdlr->dtih_func(addr, frame, eax)) != 0)
+		if ((rval = hdlr->dtih_func(addr, frame, r0)) != 0)
 			return (rval);
 
 	return (0);
@@ -263,7 +263,7 @@ dtrace_invop_start(struct trapframe *fra
 	int tmp;
 	int i;
 
-	invop = dtrace_invop(frame->tf_pc, frame, frame->tf_pc);
+	invop = dtrace_invop(frame->tf_pc, frame, frame->tf_regs.r_reg[0]);
 
 	tmp = (invop & LDP_STP_MASK);
 	if (tmp == STP_64 || tmp == LDP_64) {

Index: src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c
diff -u src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.2 src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.3
--- src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.2	Wed Feb 12 01:09:27 2020
+++ src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c	Wed Feb 12 01:09:39 2020
@@ -53,7 +53,7 @@
 #define	FBT_RETURN	"return"
 
 int
-fbt_invop(uintptr_t addr, struct trapframe *frame, uintptr_t rval)
+fbt_invop(uintptr_t addr, struct trapframe *frame, uintptr_t r0)
 {
 	solaris_cpu_t *cpu;
 	fbt_probe_t *fbt;



CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common

2020-02-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 12 01:10:08 UTC 2020

Modified Files:
src/external/cddl/osnet/dist/lib/libdtrace/common: dt_impl.h
dt_module.c dt_open.c

Log Message:
Use /dev/ksyms, not /netbsd, for the running kernel's symbols.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_impl.h
cvs rdiff -u -r1.17 -r1.18 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c
cvs rdiff -u -r1.16 -r1.17 \
src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c

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

Modified files:

Index: src/external/cddl/osnet/dist/lib/libdtrace/common/dt_impl.h
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_impl.h:1.8 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_impl.h:1.9
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_impl.h:1.8	Mon May 28 21:05:05 2018
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_impl.h	Wed Feb 12 01:10:08 2020
@@ -750,8 +750,6 @@ extern int yylex(void);
 #endif
 
 #ifdef __NetBSD__
-extern const char *dt_bootfile(char *, size_t);
-
 #define longlong_t long long
 #define u_longlong_t unsigned long long
 #define __DECONST(a, b) __UNCONST(b)

Index: src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.17 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.18
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.17	Sat Jun  2 01:19:46 2018
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c	Wed Feb 12 01:10:08 2020
@@ -43,6 +43,7 @@
 #endif
 #ifdef __NetBSD__
 #include 
+#include 
 #endif
 
 #include 
@@ -1185,9 +1186,7 @@ dt_module_update(dtrace_hdl_t *dtp, stru
 	bool ismod;
 
 	if (strcmp("netbsd", name) == 0) {
-		/* want the kernel, but it is not absolute */
-		dt_bootfile(machine, sizeof(machine));
-		snprintf(fname, sizeof(fname), "/%s", machine);
+		strlcpy(fname, _PATH_KSYMS, sizeof fname);
 		ismod = false;
 	} else {
 

Index: src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c:1.16 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c:1.17
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c:1.16	Wed Jul 24 16:57:45 2019
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c	Wed Feb 12 01:10:08 2020
@@ -1025,24 +1025,15 @@ dt_get_sysinfo(int cmd, char *buf, size_
 }
 #endif
 
-#ifndef illumos
-# ifdef __FreeBSD__
-#  define DEFKERNEL	"kernel"
-#  define BOOTFILE	"kern.bootfile"
-# endif
-# ifdef __NetBSD__
-#  define DEFKERNEL	"netbsd"
-#  define BOOTFILE	"machdep.booted_kernel"
-# endif
-
-const char *
+#ifdef __FreeBSD__
+static const char *
 dt_bootfile(char *bootfile, size_t len)
 {
 	char *p;
 	size_t olen = len;
 
-	if (sysctlbyname(BOOTFILE, bootfile, , NULL, 0) != 0)
-		strlcpy(bootfile, DEFKERNEL, olen);
+	if (sysctlbyname("kern.bootfile", bootfile, , NULL, 0) != 0)
+		strlcpy(bootfile, "kernel", olen);
 
 	if ((p = strrchr(bootfile, '/')) != NULL)
 		p++;
@@ -1050,9 +1041,6 @@ dt_bootfile(char *bootfile, size_t len)
 		p = bootfile;
 	return p;
 }
-
-# undef DEFKERNEL
-# undef BOOTFILE
 #endif
 
 static dtrace_hdl_t *



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

2020-02-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 12 01:09:17 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: vectors.S

Log Message:
Create a buffer space of 512 bytes before the trapframe.

dtrace fbt needs enough space to emulate an

stp x29, x30, [sp,#-FRAMESIZE]!

instruction in a function prologue.  In the aarch64 instruction
encoding, FRAMESIZE can be as large as 512 bytes, so reserve this
much space when KDTRACE_HOOKS is enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/vectors.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/aarch64/aarch64/vectors.S
diff -u src/sys/arch/aarch64/aarch64/vectors.S:1.9 src/sys/arch/aarch64/aarch64/vectors.S:1.10
--- src/sys/arch/aarch64/aarch64/vectors.S:1.9	Fri Oct 12 01:28:57 2018
+++ src/sys/arch/aarch64/aarch64/vectors.S	Wed Feb 12 01:09:17 2020
@@ -1,8 +1,20 @@
-/*	$NetBSD: vectors.S,v 1.9 2018/10/12 01:28:57 ryo Exp $	*/
+/*	$NetBSD: vectors.S,v 1.10 2020/02/12 01:09:17 riastradh Exp $	*/
 
 #include 
 #include "assym.h"
 #include "opt_ddb.h"
+#include "opt_dtrace.h"
+
+#ifdef KDTRACE_HOOKS
+/*
+ * dtrace needs to emulate  stp x29,x30,[sp,#-FRAMESIZE]!   where
+ * FRAMESIZE can be as large as 512, so create a 512-byte buffer
+ * between the interrupted code's frame and our struct trapframe.
+ */
+#define	TRAP_FRAMESIZE	(TF_SIZE + 512)
+#else
+#define	TRAP_FRAMESIZE	TF_SIZE
+#endif
 
 	/*
 	 * vector_entry macro must be small enough to fit 0x80 bytes!
@@ -11,7 +23,7 @@
 	.align 7	/* aligned 0x80 */
 
 	.if \el == 1
-	sub	sp, sp, #TF_SIZE	/* need to allocate stack on el1 */
+	sub	sp, sp, #TRAP_FRAMESIZE	/* need to allocate stack on el1 */
 	.endif
 
 	stp	x0, x1, [sp, #TF_X0]
@@ -35,7 +47,7 @@
 	.if \el == 0
 	mrs	x20, sp_el0
 	.else
-	add	x20, sp, #TF_SIZE	/* sp is already adjusted */
+	add	x20, sp, #TRAP_FRAMESIZE	/* sp is already adjusted */
 	.endif
 	mrs	x21, elr_el1
 



CVS commit: src/external/cddl/osnet/dev/fbt/aarch64

2020-02-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 12 01:09:27 UTC 2020

Modified Files:
src/external/cddl/osnet/dev/fbt/aarch64: fbt_isa.c

Log Message:
Use db_write_bytes to overwrite kernel text.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c

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

Modified files:

Index: src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c
diff -u src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.1 src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.2
--- src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c:1.1	Tue Dec  3 22:10:56 2019
+++ src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c	Wed Feb 12 01:09:27 2020
@@ -36,6 +36,9 @@
 #include 
 #include 
 #include 
+
+#include 
+
 #include 
 
 #include 
@@ -78,8 +81,9 @@ void
 fbt_patch_tracepoint(fbt_probe_t *fbt, fbt_patchval_t val)
 {
 
-	*fbt->fbtp_patchpoint = val;
-	cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, 4);
+	db_write_bytes((db_addr_t)fbt->fbtp_patchpoint, sizeof(val),
+	(const void *));
+	cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, sizeof(val));
 }
 
 #if defined(__FreeBSD__)



CVS commit: src/external/cddl/osnet/dev/dtrace/aarch64

2020-02-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 12 01:10:16 UTC 2020

Modified Files:
src/external/cddl/osnet/dev/dtrace/aarch64: dtrace_isa.c

Log Message:
Teach dtrace about el1_trap_exit frames on aarch64.

Implement dtrace_getarg and dtrace_getreg while here.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_isa.c

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

Modified files:

Index: src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_isa.c
diff -u src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_isa.c:1.1 src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_isa.c:1.2
--- src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_isa.c:1.1	Tue Dec  3 22:10:56 2019
+++ src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_isa.c	Wed Feb 12 01:10:16 2020
@@ -89,52 +89,60 @@ void
 dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes,
 uint32_t *intrpc)
 {
-	struct unwind_state state;
-	int scp_offset;
-	register_t sp, fp;
-	int depth;
-
-	depth = 0;
-
-	if (intrpc != 0) {
-		pcstack[depth++] = (pc_t) intrpc;
+	extern const char el1_trap_exit[];
+	const register_t *fp;
+	int i = 0;
+
+	if (intrpc) {
+		if (i < pcstack_limit)
+			pcstack[i++] = (pc_t)intrpc;
 	}
 
-	aframes++;
-
-	__asm __volatile("mov %0, sp" : "=" (sp));
-
-	state.fp = (uint64_t)__builtin_frame_address(0);
-	state.sp = sp;
-	state.pc = (uint64_t)dtrace_getpcstack;
-
-	while (depth < pcstack_limit) {
-		if (!INKERNEL(state.pc) || !INKERNEL(state.fp))
-			break;
-
-		fp = state.fp;
-		state.sp = fp + 0x10;
-		/* FP to previous frame (X29) */
-		state.fp = *(register_t *)(fp);
-		/* LR (X30) */
-		state.pc = *(register_t *)(fp + 8) - 4;
-
-		/*
-		 * NB: Unlike some other architectures, we don't need to
-		 * explicitly insert cpu_dtrace_caller as it appears in the
-		 * normal kernel stack trace rather than a special trap frame.
-		 */
-		if (aframes > 0) {
+	/*
+	 * fp[0] = x29 (saved frame pointer)
+	 * fp[1] = x30 (saved link register == return address)
+	 */
+	fp = __builtin_frame_address(0);
+	while (i < pcstack_limit && INKERNEL(fp[0]) && INKERNEL(fp[1])) {
+		/* Skip the specified number of artificial frames.  */
+		if (aframes > 0)
 			aframes--;
+		else
+			pcstack[i++] = fp[1];
+
+		/* Check whether this frame is handling a trap.  */
+		if (fp[1] == (register_t)el1_trap_exit) {
+			/*
+			 * Trap from kernel.  The trapframe is the
+			 * saved frame pointer of the call to the trap
+			 * handler whose return address is
+			 * el1_trap_exit.  The frame pointer of the
+			 * interrupted code is in x29 stashed in the
+			 * trapframe, alongside its pc.
+			 */
+			const struct trapframe *tf = (const void *)fp[0];
+			/* x29 = frame pointer */
+			fp = (const void *)tf->tf_regs.r_reg[29];
+			if (INKERNEL(tf->tf_pc)) {
+if (i >= pcstack_limit)
+	break;
+if (aframes > 0)
+	aframes--;
+else
+	pcstack[i++] = tf->tf_pc;
+			}
 		} else {
-			pcstack[depth++] = state.pc;
+			/*
+			 * Not a trap.  Keep going with fp[0] as the
+			 * parent frame pointer.
+			 */
+			fp = (const void *)fp[0];
 		}
-
 	}
 
-	for (; depth < pcstack_limit; depth++) {
-		pcstack[depth] = 0;
-	}
+	/* Zero the rest of the return address stack.  (Paranoia?)  */
+	while (i < pcstack_limit)
+		pcstack[i++] = 0;
 }
 
 static int
@@ -282,48 +290,78 @@ dtrace_getufpstack(uint64_t *pcstack, ui
 uint64_t
 dtrace_getarg(int arg, int aframes)
 {
+	extern const char el1_trap_exit[];
+	const register_t *fp;
+	const struct trapframe *tf = NULL;
+	int i = 0;
 
-	printf("IMPLEMENT ME: %s\n", __func__);
+	/*
+	 * The first arguments are passed in x0,...,x7.  The rest are
+	 * on the stack, too much trouble to figure out.
+	 *
+	 * XXX Shouldn't we ask ctf or dwarf or something to figure
+	 * this stuff out for us?
+	 */
+	KASSERT(arg >= 0);
+	if (arg >= 8)
+		return 0;
+
+	fp = __builtin_frame_address(0);
+	while (i < 1000 && INKERNEL(fp[0]) && INKERNEL(fp[1])) {
+		if (aframes > 0)
+			aframes--;
+		else
+			i++;
+		if (fp[1] == (register_t)el1_trap_exit) {
+			tf = (const void *)fp[0];
+			break;
+		} else {
+			fp = (const void *)fp[0];
+		}
+	}
 
-	return (0);
+	/* If we didn't find a trap frame, give up.  */
+	if (tf == NULL)
+		return 0;
+
+	/* Arg0, arg1, ..., arg7 are in registers x0, x1, ..., x7.  */
+	return tf->tf_regs.r_reg[arg];
 }
 
 int
 dtrace_getstackdepth(int aframes)
 {
-	struct unwind_state state;
-	int scp_offset;
-	register_t sp;
-	int depth;
-	int done;
-
-	depth = 1;
-	done = 0;
-
-	__asm __volatile("mov %0, sp" : "=" (sp));
-
-	state.fp = (uint64_t)__builtin_frame_address(0);
-	state.sp = sp;
-	state.pc = (uint64_t)dtrace_getstackdepth;
-
-	do {
-		done = unwind_frame();
-		if (!INKERNEL(state.pc) || !INKERNEL(state.fp))
-			break;
-		depth++;
-	} while (!done);
+	extern const char el1_trap_exit[];
+	const register_t *fp;
+	int i = 0;
+
+	fp = __builtin_frame_address(0);

CVS commit: src/external/mpl/dhcp/bin/server

2020-02-11 Thread Santhosh Raju
Module Name:src
Committed By:   fox
Date:   Wed Feb 12 00:41:50 UTC 2020

Modified Files:
src/external/mpl/dhcp/bin/server: Makefile

Log Message:
external/mpl/dhcp: Fix build failure under LLVM.

-Wno-error= flag now only applies to gcc 8 and not to LLVM based builds.

Reviewed by: kamil@


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/dhcp/bin/server/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/mpl/dhcp/bin/server/Makefile
diff -u src/external/mpl/dhcp/bin/server/Makefile:1.3 src/external/mpl/dhcp/bin/server/Makefile:1.4
--- src/external/mpl/dhcp/bin/server/Makefile:1.3	Sun Feb  9 07:59:44 2020
+++ src/external/mpl/dhcp/bin/server/Makefile	Wed Feb 12 00:41:50 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2020/02/09 07:59:44 fox Exp $
+# $NetBSD: Makefile,v 1.4 2020/02/12 00:41:50 fox Exp $
 
 .include 
 
@@ -19,7 +19,7 @@ FILES=	dhcpd.conf
 COPTS.ddns.c +=-Wno-stringop-overflow
 .endif
 
-COPTS.mdb6.c +=		-Wno-error=format-overflow
+COPTS.mdb6.c +=		${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
 COPTS.omapi.c +=	-Wno-stack-protector
 
 .include 



CVS commit: src/external/gpl3/gcc/usr.bin

2020-02-11 Thread Santhosh Raju
Module Name:src
Committed By:   fox
Date:   Wed Feb 12 00:36:38 UTC 2020

Modified Files:
src/external/gpl3/gcc/usr.bin/cc1: Makefile
src/external/gpl3/gcc/usr.bin/cc1obj: Makefile

Log Message:
external/gpl3/gcc: Fix build failure under LLVM.

-Wno-error= flag now only applies to gcc 8 and not to LLVM based builds.

Reviewed by: kamil@


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/usr.bin/cc1/Makefile
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/usr.bin/cc1obj/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/usr.bin/cc1/Makefile
diff -u src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.15 src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.16
--- src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.15	Sun Feb  9 08:04:40 2020
+++ src/external/gpl3/gcc/usr.bin/cc1/Makefile	Wed Feb 12 00:36:37 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2020/02/09 08:04:40 fox Exp $
+#	$NetBSD: Makefile,v 1.16 2020/02/12 00:36:37 fox Exp $
 
 PROG=		cc1
 SRCS=		${G_C_OBJS:S,c-family/,,:S,c/,,:Nlibcpp.a:.o=.c} main.c ${PROG}-checksum.c
@@ -32,7 +32,7 @@ COPTS.c-ada-spec.c=	-Wno-stack-protector
 COPTS.c-attribs.c=	-Wno-stack-protector
 COPTS.c-aux-info.c=	-Wno-stack-protector
 COPTS.c-common.c=	-Wno-stack-protector
-COPTS.c-cppbuiltin.c=	-Wno-stack-protector -Wno-error=format-overflow
+COPTS.c-cppbuiltin.c=	-Wno-stack-protector
 COPTS.c-decl.c=		-Wno-stack-protector
 COPTS.c-format.c=	-Wno-stack-protector
 COPTS.c-format.h=	-Wno-stack-protector
@@ -40,7 +40,10 @@ COPTS.c-lex.c=		-Wno-stack-protector
 COPTS.c-opts.c=		-Wno-stack-protector
 COPTS.c-ppoutput.c=	-Wno-stack-protector
 COPTS.c-pragma.c=	-Wno-stack-protector
-COPTS.c-typeck.c=	-Wno-stack-protector -Wno-error=format-overflow
+COPTS.c-typeck.c=	-Wno-stack-protector
+
+COPTS.c-cppbuiltin.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
+COPTS.c-typeck.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
 
 CPPFLAGS.default-c.c+=	-I${BACKENDOBJ}
 

Index: src/external/gpl3/gcc/usr.bin/cc1obj/Makefile
diff -u src/external/gpl3/gcc/usr.bin/cc1obj/Makefile:1.13 src/external/gpl3/gcc/usr.bin/cc1obj/Makefile:1.14
--- src/external/gpl3/gcc/usr.bin/cc1obj/Makefile:1.13	Sun Feb  9 08:04:40 2020
+++ src/external/gpl3/gcc/usr.bin/cc1obj/Makefile	Wed Feb 12 00:36:37 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2020/02/09 08:04:40 fox Exp $
+#	$NetBSD: Makefile,v 1.14 2020/02/12 00:36:37 fox Exp $
 
 MYOBJS=		${G_OBJC_OBJS} ${G_C_AND_OBJC_OBJS} 
 PROG=		cc1obj
@@ -35,17 +35,20 @@ COPTS.c-ada-spec.c+=			-Wno-stack-protec
 COPTS.c-attribs.c+=			-Wno-stack-protector
 COPTS.c-aux-info.c+=			-Wno-stack-protector
 COPTS.c-common.c+=			-Wno-stack-protector
-COPTS.c-cppbuiltin.c+=			-Wno-stack-protector -Wno-error=format-overflow
+COPTS.c-cppbuiltin.c+=			-Wno-stack-protector
 COPTS.c-decl.c+=			-Wno-stack-protector
 COPTS.c-format.c+=			-Wno-stack-protector
 COPTS.c-lex.c+=-Wno-stack-protector
 COPTS.c-ppoutput.c+=			-Wno-stack-protector
 COPTS.c-pragma.c+=			-Wno-stack-protector
-COPTS.c-typeck.c+=			-Wno-stack-protector -Wno-error=format-overflow
+COPTS.c-typeck.c+=			-Wno-stack-protector
 COPTS.objc-act.c+=			-Wno-stack-protector
 COPTS.objc-gnu-runtime-abi-01.c+=	-Wno-stack-protector
 COPTS.objc-next-runtime-abi-01.c+=	-Wno-stack-protector
 
+COPTS.c-cppbuiltin.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
+COPTS.c-typeck.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
+
 .if ${MACHINE_ARCH} == "vax"
 COPTS.c-decl.c+=-O0
 COPTS.c-typeck.c+=-O0



CVS commit: src/external/bsd/ipf/bin

2020-02-11 Thread Santhosh Raju
Module Name:src
Committed By:   fox
Date:   Wed Feb 12 00:30:48 UTC 2020

Modified Files:
src/external/bsd/ipf/bin/ipmon: Makefile
src/external/bsd/ipf/bin/ipsend: Makefile

Log Message:
external/bsd/ipf: Fix build failure under LLVM.

-Wno-error= flag now only applies to gcc 8 and not to LLVM based builds.

Reviewed by: kamil@


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ipf/bin/ipmon/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ipf/bin/ipsend/Makefile

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

Modified files:

Index: src/external/bsd/ipf/bin/ipmon/Makefile
diff -u src/external/bsd/ipf/bin/ipmon/Makefile:1.2 src/external/bsd/ipf/bin/ipmon/Makefile:1.3
--- src/external/bsd/ipf/bin/ipmon/Makefile:1.2	Sun Feb  9 07:47:50 2020
+++ src/external/bsd/ipf/bin/ipmon/Makefile	Wed Feb 12 00:30:48 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2020/02/09 07:47:50 fox Exp $
+#	$NetBSD: Makefile,v 1.3 2020/02/12 00:30:48 fox Exp $
 
 PROG=		ipmon
 SRCS=		ipmon.c ipmon_y.c ipmon_l.c
@@ -11,7 +11,7 @@ DPSRCS+=	ipmon_l.h ipmon_y.h
 CLEANFILES+=	ipmon_y.c ipmon_y.h
 CLEANFILES+=	ipmon_l.c ipmon_l.h
 
-COPTS.ipmon.c+=	-Wno-error=format-overflow
+COPTS.ipmon.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
 
 ipmon_y.c: ipmon_y.y
 	${_MKTARGET_CREATE}

Index: src/external/bsd/ipf/bin/ipsend/Makefile
diff -u src/external/bsd/ipf/bin/ipsend/Makefile:1.4 src/external/bsd/ipf/bin/ipsend/Makefile:1.5
--- src/external/bsd/ipf/bin/ipsend/Makefile:1.4	Sun Feb  9 07:51:20 2020
+++ src/external/bsd/ipf/bin/ipsend/Makefile	Wed Feb 12 00:30:48 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2020/02/09 07:51:20 fox Exp $
+#	$NetBSD: Makefile,v 1.5 2020/02/12 00:30:48 fox Exp $
 
 .include 
 .include "../Makefile.inc"
@@ -25,7 +25,7 @@ DPSRCS+=	iplang_y.h
 .PATH:		${UDIST}/ipsend \
 		${UDIST}/iplang
 
-COPTS.ipsopt.c+=	-Wno-error=maybe-uninitialized
+COPTS.ipsopt.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=maybe-uninitialized :}
 
 iplang_y.c: iplang_y.y
 	${_MKTARGET_CREATE}



CVS commit: src/sys/dev/scsipi

2020-02-11 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Wed Feb 12 00:19:07 UTC 2020

Modified Files:
src/sys/dev/scsipi: atapi_wdc.c

Log Message:
the number of possible ATAPI devices on an ATA bus is not always 2,
it is however many devices the underlying ATA bus can have (eg. 1 for SATA),
so initialize the scsipi chan_ntargets from the ATA ch_ndrives.
this fixes a memory read overrun detected by KASAN.
discussed with mlelstv@ and jdolecek@


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/dev/scsipi/atapi_wdc.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/scsipi/atapi_wdc.c
diff -u src/sys/dev/scsipi/atapi_wdc.c:1.134 src/sys/dev/scsipi/atapi_wdc.c:1.135
--- src/sys/dev/scsipi/atapi_wdc.c:1.134	Sun Nov 10 21:16:37 2019
+++ src/sys/dev/scsipi/atapi_wdc.c	Wed Feb 12 00:19:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: atapi_wdc.c,v 1.134 2019/11/10 21:16:37 chs Exp $	*/
+/*	$NetBSD: atapi_wdc.c,v 1.135 2020/02/12 00:19:07 chs Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.134 2019/11/10 21:16:37 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.135 2020/02/12 00:19:07 chs Exp $");
 
 #ifndef ATADEBUG
 #define ATADEBUG
@@ -138,7 +138,7 @@ wdc_atapibus_attach(struct atabus_softc 
 	chan->chan_flags = SCSIPI_CHAN_OPENINGS;
 	chan->chan_openings = 1;
 	chan->chan_max_periph = 1;
-	chan->chan_ntargets = 2;
+	chan->chan_ntargets = chp->ch_ndrives;
 	chan->chan_nluns = 1;
 
 	chp->atapibus = config_found_ia(ata_sc->sc_dev, "atapi", chan,



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

2020-02-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb 11 15:11:28 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: cpuswitch.S

Log Message:
G/C


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/arm/arm32/cpuswitch.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/arm32/cpuswitch.S
diff -u src/sys/arch/arm/arm32/cpuswitch.S:1.97 src/sys/arch/arm/arm32/cpuswitch.S:1.98
--- src/sys/arch/arm/arm32/cpuswitch.S:1.97	Wed Jan  8 20:59:18 2020
+++ src/sys/arch/arm/arm32/cpuswitch.S	Tue Feb 11 15:11:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuswitch.S,v 1.97 2020/01/08 20:59:18 skrll Exp $	*/
+/*	$NetBSD: cpuswitch.S,v 1.98 2020/02/11 15:11:27 skrll Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -78,7 +78,6 @@
  */
 
 #include "opt_armfpe.h"
-#include "opt_arm32_pmap.h"
 #include "opt_multiprocessor.h"
 #include "opt_cpuoptions.h"
 #include "opt_lockdebug.h"
@@ -87,7 +86,7 @@
 #include 
 #include 
 
-	RCSID("$NetBSD: cpuswitch.S,v 1.97 2020/01/08 20:59:18 skrll Exp $")
+	RCSID("$NetBSD: cpuswitch.S,v 1.98 2020/02/11 15:11:27 skrll Exp $")
 
 /* LINTSTUB: include  */
 



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

2020-02-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb 11 15:09:14 UTC 2020

Modified Files:
src/sys/arch/arm/at91: at91emac.c

Log Message:
More 


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/at91/at91emac.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/at91/at91emac.c
diff -u src/sys/arch/arm/at91/at91emac.c:1.30 src/sys/arch/arm/at91/at91emac.c:1.31
--- src/sys/arch/arm/at91/at91emac.c:1.30	Tue Feb  4 07:35:34 2020
+++ src/sys/arch/arm/at91/at91emac.c	Tue Feb 11 15:09:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: at91emac.c,v 1.30 2020/02/04 07:35:34 skrll Exp $	*/
+/*	$NetBSD: at91emac.c,v 1.31 2020/02/11 15:09:14 skrll Exp $	*/
 
 /*
  * Copyright (c) 2007 Embedtronics Oy
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.30 2020/02/04 07:35:34 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.31 2020/02/11 15:09:14 skrll Exp $");
 
 #include 
 #include 
@@ -246,13 +246,13 @@ emac_intr(void *arg)
 		EMAC_WRITE(ETH_RSR, ETH_RSR_BNA);	// clear BNA bit
 		EMAC_WRITE(ETH_CTL, ctl |  ETH_CTL_RE);	// re-enable receiver
 		if_statinc(ifp, if_ierrors);
-		ifp->if_ipackets++;
+		if_statinc(ifp, if_ipackets);
 		DPRINTFN(1,("%s: out of receive buffers\n", __FUNCTION__));
 	}
 	if (isr & ETH_ISR_ROVR) {
 		EMAC_WRITE(ETH_RSR, ETH_RSR_OVR);	// clear interrupt
 		if_statinc(ifp, if_ierrors);
-		ifp->if_ipackets++;
+		if_statinc(ifp, if_ipackets);
 		DPRINTFN(1,("%s: receive overrun\n", __FUNCTION__));
 	}
 



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

2020-02-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Feb 11 13:31:23 UTC 2020

Modified Files:
src/sys/arch/arm/include/arm32: types.h

Log Message:
G/C


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/include/arm32/types.h

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

Modified files:

Index: src/sys/arch/arm/include/arm32/types.h
diff -u src/sys/arch/arm/include/arm32/types.h:1.12 src/sys/arch/arm/include/arm32/types.h:1.13
--- src/sys/arch/arm/include/arm32/types.h:1.12	Wed Jan 24 09:04:45 2018
+++ src/sys/arch/arm/include/arm32/types.h	Tue Feb 11 13:31:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.12 2018/01/24 09:04:45 skrll Exp $	*/
+/*	$NetBSD: types.h,v 1.13 2020/02/11 13:31:23 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -38,13 +38,6 @@
 #ifndef _ARM_ARM32_TYPES_H_
 #define	_ARM_ARM32_TYPES_H_
 
-#ifdef _KERNEL
-
-#ifdef _KERNEL_OPT
-#include "opt_arm32_pmap.h"
-#endif
-#endif
-
 #include 		/* pull in generic ARM definitions */
 
 #define	__HAVE_CPU_LWP_SETPRIVATE



CVS commit: [netbsd-8] src/sys/arch/i386/stand/efiboot

2020-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 11 11:38:33 UTC 2020

Modified Files:
src/sys/arch/i386/stand/efiboot [netbsd-8]: eficons.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1502):

sys/arch/i386/stand/efiboot/eficons.c: revision 1.9

Use 1024x768 as the default GOP mode. It is the only option available for
Hyper-V Gen.2 VMs and it seems to be the de facto standard and part of
WHQL requirements.


To generate a diff of this commit:
cvs rdiff -u -r1.4.2.4 -r1.4.2.5 src/sys/arch/i386/stand/efiboot/eficons.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/i386/stand/efiboot/eficons.c
diff -u src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.4 src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.5
--- src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.4	Mon Feb 10 16:47:29 2020
+++ src/sys/arch/i386/stand/efiboot/eficons.c	Tue Feb 11 11:38:33 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: eficons.c,v 1.4.2.4 2020/02/10 16:47:29 martin Exp $	*/
+/*	$NetBSD: eficons.c,v 1.4.2.5 2020/02/11 11:38:33 martin Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -35,7 +35,7 @@
 #include "vbe.h"
 
 #ifndef DEFAULT_GOP_MODE
-#define DEFAULT_GOP_MODE	"800x600"
+#define DEFAULT_GOP_MODE	"1024x768"
 #endif
 
 extern struct x86_boot_params boot_params;



CVS commit: [netbsd-9] src/doc

2020-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 11 11:38:05 UTC 2020

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

Log Message:
Ticket #696


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.176 -r1.1.2.177 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.176 src/doc/CHANGES-9.0:1.1.2.177
--- src/doc/CHANGES-9.0:1.1.2.176	Tue Feb 11 08:43:28 2020
+++ src/doc/CHANGES-9.0	Tue Feb 11 11:38:05 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.176 2020/02/11 08:43:28 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.177 2020/02/11 11:38:05 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -8789,5 +8789,8 @@ sys/dev/ic/elinkxl.c1.137
 	interrupt.
 	[msaitoh, ticket #695]
 
+sys/arch/i386/stand/efiboot/eficons.c		1.9
 
+	Use 1024x768 as the default GOP mode.
+	[jmcneill, ticket #696]
 



CVS commit: [netbsd-8] src/doc

2020-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 11 11:40:09 UTC 2020

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2

Log Message:
Ticket #1502


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.95 -r1.1.2.96 src/doc/CHANGES-8.2

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

Modified files:

Index: src/doc/CHANGES-8.2
diff -u src/doc/CHANGES-8.2:1.1.2.95 src/doc/CHANGES-8.2:1.1.2.96
--- src/doc/CHANGES-8.2:1.1.2.95	Tue Feb 11 08:44:57 2020
+++ src/doc/CHANGES-8.2	Tue Feb 11 11:40:09 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.95 2020/02/11 08:44:57 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.96 2020/02/11 11:40:09 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -2026,3 +2026,8 @@ sys/dev/ic/elinkxl.c1.137
 	interrupt.
 	[msaitoh, ticket #1501]
 
+sys/arch/i386/stand/efiboot/eficons.c		1.9
+
+	Use 1024x768 as the default GOP mode.
+	[jmcneill, ticket #1502]
+



CVS commit: [netbsd-9] src/sys/arch/i386/stand/efiboot

2020-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 11 11:36:34 UTC 2020

Modified Files:
src/sys/arch/i386/stand/efiboot [netbsd-9]: eficons.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #696):

sys/arch/i386/stand/efiboot/eficons.c: revision 1.9

Use 1024x768 as the default GOP mode. It is the only option available for
Hyper-V Gen.2 VMs and it seems to be the de facto standard and part of
WHQL requirements.


To generate a diff of this commit:
cvs rdiff -u -r1.6.6.2 -r1.6.6.3 src/sys/arch/i386/stand/efiboot/eficons.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/i386/stand/efiboot/eficons.c
diff -u src/sys/arch/i386/stand/efiboot/eficons.c:1.6.6.2 src/sys/arch/i386/stand/efiboot/eficons.c:1.6.6.3
--- src/sys/arch/i386/stand/efiboot/eficons.c:1.6.6.2	Mon Feb 10 18:57:06 2020
+++ src/sys/arch/i386/stand/efiboot/eficons.c	Tue Feb 11 11:36:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: eficons.c,v 1.6.6.2 2020/02/10 18:57:06 martin Exp $	*/
+/*	$NetBSD: eficons.c,v 1.6.6.3 2020/02/11 11:36:34 martin Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -35,7 +35,7 @@
 #include "vbe.h"
 
 #ifndef DEFAULT_GOP_MODE
-#define DEFAULT_GOP_MODE	"800x600"
+#define DEFAULT_GOP_MODE	"1024x768"
 #endif
 
 extern struct x86_boot_params boot_params;



CVS commit: src/distrib/sets

2020-02-11 Thread Yuuki Enomoto
Module Name:src
Committed By:   uki
Date:   Tue Feb 11 11:36:53 UTC 2020

Modified Files:
src/distrib/sets: comments deps regpkgset
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/modules: ad.aarch64 ad.arm ad.m68k ad.mips
ad.powerpc ad.sh3 md.alpha md.amd64 md.hppa md.i386 md.ia64
md.sparc md.sparc64 md.vax mi

Log Message:
PR misc/46937: add modules package, from Lloyd Parkes.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/distrib/sets/comments
cvs rdiff -u -r1.18 -r1.19 src/distrib/sets/deps
cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/regpkgset
cvs rdiff -u -r1.1228 -r1.1229 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/modules/ad.aarch64
cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/modules/ad.arm
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/modules/ad.m68k
cvs rdiff -u -r1.13 -r1.14 src/distrib/sets/lists/modules/ad.mips
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/modules/ad.powerpc \
src/distrib/sets/lists/modules/ad.sh3 \
src/distrib/sets/lists/modules/md.vax
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/modules/md.alpha \
src/distrib/sets/lists/modules/md.ia64 \
src/distrib/sets/lists/modules/md.sparc
cvs rdiff -u -r1.83 -r1.84 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/modules/md.hppa
cvs rdiff -u -r1.84 -r1.85 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/modules/md.sparc64
cvs rdiff -u -r1.131 -r1.132 src/distrib/sets/lists/modules/mi

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/comments
diff -u src/distrib/sets/comments:1.23 src/distrib/sets/comments:1.24
--- src/distrib/sets/comments:1.23	Thu Jun 27 15:47:10 2019
+++ src/distrib/sets/comments	Tue Feb 11 11:36:52 2020
@@ -140,7 +140,7 @@ base-sysutil-examples example configurat
 base-sysutil-root root file system support for system utilities
 base-sysutil-share shared data files for system utilities
 base-sysutil_locale-share shared locale support for system utilities
-base-termcap-share shared files for terminal capability database
+base-terminfo-share shared files for terminal capability database
 base-texinfo-bin the GNU texinfo software
 base-texinfo-share shared data files for the GNU texinfo software
 base-texinfo_locale-cs Czech language support for the GNU texinfo software

Index: src/distrib/sets/deps
diff -u src/distrib/sets/deps:1.18 src/distrib/sets/deps:1.19
--- src/distrib/sets/deps:1.18	Wed Apr 24 10:26:08 2019
+++ src/distrib/sets/deps	Tue Feb 11 11:36:52 2020
@@ -31,7 +31,7 @@ base-games-usr base-sys-usr
 base-gnats-bin base-sys-usr
 base-gnats-share base-sys-share
 base-groff-font base-sys-share
-base-groff-share base-termcap-share
+base-groff-share base-terminfo-share
 base-hesiod-bin base-sys-usr
 base-htmldoc-share base-sys-share
 base-i18n-root base-sys-usr
@@ -83,7 +83,7 @@ base-locale-zh base-locale-share
 base-lpr-bin base-lpr-usr
 base-lpr-root base-sys-root
 base-lpr-usr base-sys-usr
-base-magic-share base-termcap-share
+base-magic-share base-terminfo-share
 base-mail-bin base-sys-usr
 base-mail-root base-sys-root
 base-mailwrapper-bin base-sys-usr
@@ -112,7 +112,7 @@ base-postfix-usr base-sys-usr
 base-ppp-bin base-sys-usr
 base-psd-share base-sys-share
 base-rcs-bin base-sys-usr
-base-reference-share base-termcap-share
+base-reference-share base-terminfo-share
 base-rescue-root base-sys-root
 base-router-bin base-sys-usr
 base-router-examples base-sys-share
@@ -140,7 +140,7 @@ base-sysutil-bin base-sys-usr
 base-sysutil-examples base-sys-share
 base-sysutil-root base-sys-usr
 base-sysutil-share base-sys-share
-base-termcap-share base-sys-share
+base-terminfo-share base-sys-share
 base-texinfo-bin base-sys-usr
 base-texinfo-share base-sys-share
 base-texinfo_locale-cs base-locale-cs
@@ -190,7 +190,7 @@ comp-c-man base-man-share
 comp-c-piclib base-sys-usr
 comp-c-proflib base-sys-usr
 comp-c-root base-sys-root
-comp-c-share base-termcap-share
+comp-c-share base-terminfo-share
 comp-c-shlib base-sys-usr
 comp-c_locale-be base-locale-share
 comp-c_locale-ca base-locale-ca
@@ -273,7 +273,7 @@ comp-util-bin base-sys-usr
 comp-util-catman base-man-share
 comp-util-man base-man-share
 comp-util-sbin base-sys-usr
-comp-util-share base-termcap-share
+comp-util-share base-terminfo-share
 comp-util-share base-util-share
 etc-amd-rc base-sys-root
 etc-audio-rc base-sys-root
@@ -493,4 +493,4 @@ text-groff-man base-man-share
 text-groff-share base-groff-share
 text-sys-root base-sys-root
 text-texinfo-bin base-sys-usr
-text-texinfo-share base-termcap-share
+text-texinfo-share base-terminfo-share

Index: src/distrib/sets/regpkgset
diff -u src/distrib/sets/regpkgset:1.14 src/distrib/sets/regpkgset:1.15
--- src/distrib/sets/regpkgset:1.14	Thu Feb  6 12:36:38 2020
+++ src/distrib/sets/regpkgset	

CVS commit: src/sys/arch/i386/stand/efiboot

2020-02-11 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Feb 11 11:01:10 UTC 2020

Modified Files:
src/sys/arch/i386/stand/efiboot: eficons.c

Log Message:
Use 1024x768 as the default GOP mode. It is the only option available for
Hyper-V Gen.2 VMs and it seems to be the de facto standard and part of
WHQL requirements.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/i386/stand/efiboot/eficons.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/i386/stand/efiboot/eficons.c
diff -u src/sys/arch/i386/stand/efiboot/eficons.c:1.8 src/sys/arch/i386/stand/efiboot/eficons.c:1.9
--- src/sys/arch/i386/stand/efiboot/eficons.c:1.8	Sat Feb  8 14:35:47 2020
+++ src/sys/arch/i386/stand/efiboot/eficons.c	Tue Feb 11 11:01:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: eficons.c,v 1.8 2020/02/08 14:35:47 jmcneill Exp $	*/
+/*	$NetBSD: eficons.c,v 1.9 2020/02/11 11:01:10 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -35,7 +35,7 @@
 #include "vbe.h"
 
 #ifndef DEFAULT_GOP_MODE
-#define DEFAULT_GOP_MODE	"800x600"
+#define DEFAULT_GOP_MODE	"1024x768"
 #endif
 
 extern struct x86_boot_params boot_params;



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

2020-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 11 09:32:07 UTC 2020

Modified Files:
src/distrib/sets/lists/debug: mi

Log Message:
Add new test programs


To generate a diff of this commit:
cvs rdiff -u -r1.293 -r1.294 src/distrib/sets/lists/debug/mi

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/mi
diff -u src/distrib/sets/lists/debug/mi:1.293 src/distrib/sets/lists/debug/mi:1.294
--- src/distrib/sets/lists/debug/mi:1.293	Sun Feb  2 21:49:44 2020
+++ src/distrib/sets/lists/debug/mi	Tue Feb 11 09:32:07 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.293 2020/02/02 21:49:44 kamil Exp $
+# $NetBSD: mi,v 1.294 2020/02/11 09:32:07 martin Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -1620,6 +1620,7 @@
 ./usr/libdata/debug/usr/tests/crypto/opencrypto/h_sha1hmac.debug	tests-crypto-debug	debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/crypto/opencrypto/h_sha2hmac.debug	tests-crypto-debug	debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/crypto/opencrypto/h_xcbcmac.debug		tests-crypto-debug	debug,atf,compattestfile
+./usr/libdata/debug/usr/tests/dev/audio/audiotest.debug			tests-fs-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/dev/audio/h_pad.debug			tests-fs-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/dev/cgd/h_img2cgd/h_img2cgd.debug			tests-obsolete	obsolete,compattestfile
 ./usr/libdata/debug/usr/tests/dev/cgd/t_cgd_3des.debug			tests-fs-debug		atf,compattestfile,debug,rump
@@ -1706,6 +1707,7 @@
 ./usr/libdata/debug/usr/tests/kernel/arch/i386/t_ptrace_wait6.debug	tests-obsolete		obsolete,compattestfile
 ./usr/libdata/debug/usr/tests/kernel/arch/i386/t_ptrace_waitid.debug	tests-obsolete		obsolete,compattestfile
 ./usr/libdata/debug/usr/tests/kernel/arch/i386/t_ptrace_waitpid.debug	tests-obsolete		obsolete,compattestfile
+./usr/libdata/debug/usr/tests/kernel/h_fpufork.debug			tests-kernel-tests	debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/kernel/h_fexecve.debug			tests-kernel-tests	debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/kernel/h_getprocpath.debug		tests-kernel-tests	debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/kernel/h_ps_strings1.debug		tests-kernel-tests	debug,atf,compattestfile



CVS commit: [netbsd-8] src/doc

2020-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 11 08:44:57 UTC 2020

Modified Files:
src/doc [netbsd-8]: CHANGES-8.2

Log Message:
Tickets #1500 and #1501


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.94 -r1.1.2.95 src/doc/CHANGES-8.2

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

Modified files:

Index: src/doc/CHANGES-8.2
diff -u src/doc/CHANGES-8.2:1.1.2.94 src/doc/CHANGES-8.2:1.1.2.95
--- src/doc/CHANGES-8.2:1.1.2.94	Mon Feb 10 16:51:59 2020
+++ src/doc/CHANGES-8.2	Tue Feb 11 08:44:57 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.94 2020/02/10 16:51:59 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.95 2020/02/11 08:44:57 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -2015,3 +2015,14 @@ sys/arch/i386/stand/efiboot/efiboot.c		1
 	as this may cause an undesired display mode switch.
 	[nonaka, ticket #1499]
 
+sys/dev/ld.c	1.108
+
+	Reject open when attach didn't complete successfully.
+	[mlelstv, ticket #1500]
+
+sys/dev/ic/elinkxl.c1.137
+
+	PR 54920: restore an register read for RX_FRAMES_OK ro ACK the
+	interrupt.
+	[msaitoh, ticket #1501]
+



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

2020-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 11 08:44:11 UTC 2020

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

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1501):

sys/dev/ic/elinkxl.c: revision 1.137

  Restore an register read for RX_FRAMES_OK which was removed in rev. 1.133.

All statistics registers should be read to ACK the interrupt. Fixes PR#54920.
XXX pullup-[89]


To generate a diff of this commit:
cvs rdiff -u -r1.121.6.2 -r1.121.6.3 src/sys/dev/ic/elinkxl.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/elinkxl.c
diff -u src/sys/dev/ic/elinkxl.c:1.121.6.2 src/sys/dev/ic/elinkxl.c:1.121.6.3
--- src/sys/dev/ic/elinkxl.c:1.121.6.2	Wed Nov  6 10:04:46 2019
+++ src/sys/dev/ic/elinkxl.c	Tue Feb 11 08:44:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: elinkxl.c,v 1.121.6.2 2019/11/06 10:04:46 martin Exp $	*/
+/*	$NetBSD: elinkxl.c,v 1.121.6.3 2020/02/11 08:44:11 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.121.6.2 2019/11/06 10:04:46 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.121.6.3 2020/02/11 08:44:11 martin Exp $");
 
 #include 
 #include 
@@ -1510,6 +1510,7 @@ ex_getstats(struct ex_softc *sc)
 	(void)bus_space_read_1(iot, ioh, TX_AFTER_1_COLLISION);
 	(void)bus_space_read_1(iot, ioh, TX_NO_SQE);
 	(void)bus_space_read_1(iot, ioh, TX_CD_LOST);
+	(void)bus_space_read_1(iot, ioh, RX_FRAMES_OK);
 	GO_WINDOW(4);
 	(void)bus_space_read_1(iot, ioh, ELINK_W4_BADSSD);
 	GO_WINDOW(1);



CVS commit: [netbsd-9] src/doc

2020-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 11 08:43:28 UTC 2020

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

Log Message:
Tickets #694 and #695


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.175 -r1.1.2.176 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.175 src/doc/CHANGES-9.0:1.1.2.176
--- src/doc/CHANGES-9.0:1.1.2.175	Mon Feb 10 21:40:19 2020
+++ src/doc/CHANGES-9.0	Tue Feb 11 08:43:28 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.175 2020/02/10 21:40:19 bouyer Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.176 2020/02/11 08:43:28 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -8778,3 +8778,16 @@ usr.sbin/sysinst/upgrade.c			1.15, 1.16
 	Miscelaneous minor cleanup and message reformatting.
 	[martin, ticket #693]
 
+sys/dev/ld.c	1.108
+
+	Reject open when attach didn't complete successfully.
+	[mlelstv, ticket #694]
+
+sys/dev/ic/elinkxl.c1.137
+
+	PR 54920: restore an register read for RX_FRAMES_OK ro ACK the
+	interrupt.
+	[msaitoh, ticket #695]
+
+
+



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

2020-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 11 08:41:28 UTC 2020

Modified Files:
src/sys/dev/ic [netbsd-9]: elinkxl.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #695):

sys/dev/ic/elinkxl.c: revision 1.137

  Restore an register read for RX_FRAMES_OK which was removed in rev. 1.133.

All statistics registers should be read to ACK the interrupt. Fixes PR#54920.
XXX pullup-[89]


To generate a diff of this commit:
cvs rdiff -u -r1.131.2.1 -r1.131.2.2 src/sys/dev/ic/elinkxl.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/elinkxl.c
diff -u src/sys/dev/ic/elinkxl.c:1.131.2.1 src/sys/dev/ic/elinkxl.c:1.131.2.2
--- src/sys/dev/ic/elinkxl.c:1.131.2.1	Wed Nov  6 09:59:38 2019
+++ src/sys/dev/ic/elinkxl.c	Tue Feb 11 08:41:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: elinkxl.c,v 1.131.2.1 2019/11/06 09:59:38 martin Exp $	*/
+/*	$NetBSD: elinkxl.c,v 1.131.2.2 2020/02/11 08:41:27 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.131.2.1 2019/11/06 09:59:38 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.131.2.2 2020/02/11 08:41:27 martin Exp $");
 
 #include 
 #include 
@@ -1514,6 +1514,7 @@ ex_getstats(struct ex_softc *sc)
 	(void)bus_space_read_1(iot, ioh, TX_AFTER_1_COLLISION);
 	(void)bus_space_read_1(iot, ioh, TX_NO_SQE);
 	(void)bus_space_read_1(iot, ioh, TX_CD_LOST);
+	(void)bus_space_read_1(iot, ioh, RX_FRAMES_OK);
 	GO_WINDOW(4);
 	(void)bus_space_read_1(iot, ioh, ELINK_W4_BADSSD);
 	GO_WINDOW(1);



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

2020-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 11 08:39:01 UTC 2020

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

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

sys/dev/ld.c: revision 1.108

Reject open when attach didn't complete successfully.


To generate a diff of this commit:
cvs rdiff -u -r1.101.2.2 -r1.101.2.3 src/sys/dev/ld.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/ld.c
diff -u src/sys/dev/ld.c:1.101.2.2 src/sys/dev/ld.c:1.101.2.3
--- src/sys/dev/ld.c:1.101.2.2	Tue Dec  4 12:00:41 2018
+++ src/sys/dev/ld.c	Tue Feb 11 08:39:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld.c,v 1.101.2.2 2018/12/04 12:00:41 martin Exp $	*/
+/*	$NetBSD: ld.c,v 1.101.2.3 2020/02/11 08:39:01 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.101.2.2 2018/12/04 12:00:41 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.101.2.3 2020/02/11 08:39:01 martin Exp $");
 
 #include 
 #include 
@@ -290,6 +290,10 @@ ldopen(dev_t dev, int flags, int fmt, st
 	unit = DISKUNIT(dev);
 	if ((sc = device_lookup_private(_cd, unit)) == NULL)
 		return (ENXIO);
+
+	if ((sc->sc_flags & LDF_ENABLED) == 0)
+		return (ENODEV);
+
 	dksc = >sc_dksc;
 
 	return dk_open(dksc, dev, flags, fmt, l);



CVS commit: [netbsd-9] src/sys/dev

2020-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 11 08:37:34 UTC 2020

Modified Files:
src/sys/dev [netbsd-9]: ld.c

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

sys/dev/ld.c: revision 1.108

Reject open when attach didn't complete successfully.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.106.4.1 src/sys/dev/ld.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/ld.c
diff -u src/sys/dev/ld.c:1.106 src/sys/dev/ld.c:1.106.4.1
--- src/sys/dev/ld.c:1.106	Tue Mar 19 07:01:14 2019
+++ src/sys/dev/ld.c	Tue Feb 11 08:37:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld.c,v 1.106 2019/03/19 07:01:14 mlelstv Exp $	*/
+/*	$NetBSD: ld.c,v 1.106.4.1 2020/02/11 08:37:34 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.106 2019/03/19 07:01:14 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.106.4.1 2020/02/11 08:37:34 martin Exp $");
 
 #include 
 #include 
@@ -290,6 +290,10 @@ ldopen(dev_t dev, int flags, int fmt, st
 	unit = DISKUNIT(dev);
 	if ((sc = device_lookup_private(_cd, unit)) == NULL)
 		return (ENXIO);
+
+	if ((sc->sc_flags & LDF_ENABLED) == 0)
+		return (ENODEV);
+
 	dksc = >sc_dksc;
 
 	return dk_open(dksc, dev, flags, fmt, l);