CVS commit: src/sys/dev/pci

2018-11-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Nov 14 06:56:31 UTC 2018

Modified Files:
src/sys/dev/pci: files.pci

Log Message:
defflag XHCI_DISABLE_MSIX


To generate a diff of this commit:
cvs rdiff -u -r1.407 -r1.408 src/sys/dev/pci/files.pci

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/files.pci
diff -u src/sys/dev/pci/files.pci:1.407 src/sys/dev/pci/files.pci:1.408
--- src/sys/dev/pci/files.pci:1.407	Sat Sep 22 16:22:23 2018
+++ src/sys/dev/pci/files.pci	Wed Nov 14 06:56:30 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.pci,v 1.407 2018/09/22 16:22:23 maxv Exp $
+#	$NetBSD: files.pci,v 1.408 2018/11/14 06:56:30 skrll Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -634,6 +634,7 @@ file	dev/pci/usb_pci.c		ehci_pci | ehci_
 attach	xhci at pci with xhci_pci
 file	dev/pci/xhci_pci.c		xhci_pci
 defflag	opt_xhci_pci.h			XHCI_DISABLE_MSI
+defflag	opt_xhci_pci.h			XHCI_DISABLE_MSIX
 
 # OHCI IEEE 1394 controller
 attach	fwohci at pci with fwohci_pci



CVS commit: src/tests/net/if_vlan

2018-11-13 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Wed Nov 14 05:07:48 UTC 2018

Modified Files:
src/tests/net/if_vlan: t_vlan.sh

Log Message:
let ATF detect a bug fixed by if_vla.c:r1.132.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/net/if_vlan/t_vlan.sh

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

Modified files:

Index: src/tests/net/if_vlan/t_vlan.sh
diff -u src/tests/net/if_vlan/t_vlan.sh:1.11 src/tests/net/if_vlan/t_vlan.sh:1.12
--- src/tests/net/if_vlan/t_vlan.sh:1.11	Thu Jun 14 08:38:24 2018
+++ src/tests/net/if_vlan/t_vlan.sh	Wed Nov 14 05:07:48 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: t_vlan.sh,v 1.11 2018/06/14 08:38:24 yamaguchi Exp $
+#	$NetBSD: t_vlan.sh,v 1.12 2018/11/14 05:07:48 knakahara Exp $
 #
 # Copyright (c) 2016 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -449,6 +449,9 @@ vlan_configs_body_common()
 
 	atf_check -s exit:0 rump.ifconfig shmif0 create
 	atf_check -s exit:0 rump.ifconfig shmif1 create
+	# unset U/L bit to detect a bug fixed by if_vlan.c:r1.132
+	atf_check -s exit:0 rump.ifconfig shmif0 link b0:a0:75:00:01:00 active
+	atf_check -s exit:0 rump.ifconfig shmif1 link b0:a0:75:00:01:01 active
 	atf_check -s exit:0 rump.ifconfig vlan0 create
 
 	atf_check -s exit:0 rump.ifconfig vlan0 vlan 10 vlanif shmif0



CVS commit: src/sys/dev/pci

2018-11-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Nov 14 03:41:21 UTC 2018

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

Log Message:
- Add new wm_gmii_{hv,i82544}_{read,write}reg_locked() and use them in
  wm_gmii_{hv,i82544}_{read,write}reg(). *_locked() functions are not
  mii(4) API functions, so it's not required to keep the mii API. Change
  the PHY register type from int to uint16_t. It also change the usage of
  return value. It returns zero on success and non-zero on error.
- Check the return value of *_locked() function and treat it.
- Use *writereg_locked() function to reduce race condition in
  wm_init_lcd_from_nvm().
- Add comment.


To generate a diff of this commit:
cvs rdiff -u -r1.596 -r1.597 src/sys/dev/pci/if_wm.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_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.596 src/sys/dev/pci/if_wm.c:1.597
--- src/sys/dev/pci/if_wm.c:1.596	Sat Nov  3 21:39:10 2018
+++ src/sys/dev/pci/if_wm.c	Wed Nov 14 03:41:20 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.596 2018/11/03 21:39:10 christos Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.597 2018/11/14 03:41:20 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.596 2018/11/03 21:39:10 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.597 2018/11/14 03:41:20 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -463,6 +463,8 @@ struct wm_queue {
 struct wm_phyop {
 	int (*acquire)(struct wm_softc *);
 	void (*release)(struct wm_softc *);
+	int (*readreg_locked)(device_t, int, int, uint16_t *);
+	int (*writereg_locked)(device_t, int, int, uint16_t);
 	int reset_delay_us;
 };
 
@@ -716,7 +718,7 @@ static void	wm_get_auto_rd_done(struct w
 static void	wm_lan_init_done(struct wm_softc *);
 static void	wm_get_cfg_done(struct wm_softc *);
 static void	wm_phy_post_reset(struct wm_softc *);
-static void	wm_write_smbus_addr(struct wm_softc *);
+static int	wm_write_smbus_addr(struct wm_softc *);
 static void	wm_init_lcd_from_nvm(struct wm_softc *);
 static void	wm_initialize_hardware_bits(struct wm_softc *);
 static uint32_t	wm_rxpbs_adjust_82580(uint32_t);
@@ -819,16 +821,18 @@ static void	wm_gmii_i82543_writereg(devi
 static int	wm_gmii_mdic_readreg(device_t, int, int);
 static void	wm_gmii_mdic_writereg(device_t, int, int, int);
 static int	wm_gmii_i82544_readreg(device_t, int, int);
+static int	wm_gmii_i82544_readreg_locked(device_t, int, int, uint16_t *);
 static void	wm_gmii_i82544_writereg(device_t, int, int, int);
+static int	wm_gmii_i82544_writereg_locked(device_t, int, int, uint16_t);
 static int	wm_gmii_i80003_readreg(device_t, int, int);
 static void	wm_gmii_i80003_writereg(device_t, int, int, int);
 static int	wm_gmii_bm_readreg(device_t, int, int);
 static void	wm_gmii_bm_writereg(device_t, int, int, int);
 static void	wm_access_phy_wakeup_reg_bm(device_t, int, int16_t *, int);
 static int	wm_gmii_hv_readreg(device_t, int, int);
-static int	wm_gmii_hv_readreg_locked(device_t, int, int);
+static int	wm_gmii_hv_readreg_locked(device_t, int, int, uint16_t *);
 static void	wm_gmii_hv_writereg(device_t, int, int, int);
-static void	wm_gmii_hv_writereg_locked(device_t, int, int, int);
+static int	wm_gmii_hv_writereg_locked(device_t, int, int, uint16_t);
 static int	wm_gmii_82580_readreg(device_t, int, int);
 static void	wm_gmii_82580_writereg(device_t, int, int, int);
 static int	wm_gmii_gs40g_readreg(device_t, int, int);
@@ -948,7 +952,7 @@ static void	wm_smbustopci(struct wm_soft
 static void	wm_init_manageability(struct wm_softc *);
 static void	wm_release_manageability(struct wm_softc *);
 static void	wm_get_wakeup(struct wm_softc *);
-static void	wm_ulp_disable(struct wm_softc *);
+static int	wm_ulp_disable(struct wm_softc *);
 static void	wm_enable_phy_wakeup(struct wm_softc *);
 static void	wm_igp3_phy_powerdown_workaround_ich8lan(struct wm_softc *);
 static void	wm_enable_wakeup(struct wm_softc *);
@@ -3826,6 +3830,7 @@ wm_get_cfg_done(struct wm_softc *sc)
 		else
 			wm_get_auto_rd_done(sc);
 
+		/* Clear PHY Reset Asserted bit */
 		reg = CSR_READ(sc, WMREG_STATUS);
 		if ((reg & STATUS_PHYRA) != 0)
 			CSR_WRITE(sc, WMREG_STATUS, reg & ~STATUS_PHYRA);
@@ -3886,19 +3891,23 @@ wm_phy_post_reset(struct wm_softc *sc)
 }
 
 /* Only for PCH and newer */
-static void
+static int
 wm_write_smbus_addr(struct wm_softc *sc)
 {
 	uint32_t strap, freq;
-	uint32_t phy_data;
+	uint16_t phy_data;
+	int rv;
 
 	DPRINTF(WM_DEBUG_INIT, ("%s: %s called\n",
 		device_xname(sc->sc_dev), __func__));
+	KASSERT(CSR_READ(sc, WMREG_EXTCNFCTR) & EXTCNFCTR_MDIO_SW_OWNERSHIP);
 
 	strap = CSR_READ(sc, WMREG_STRAP);
 	freq = __SHIFTOUT(strap, STRAP_FREQ);
 
-	phy_data = wm_gmii_hv_readreg_locked(sc->sc_dev, 2, HV_SMB_ADDR);
+	rv = wm_gmii_hv_readreg_locked(sc->sc_dev, 2, HV_SMB_ADDR, &phy_d

CVS commit: src/tests/bin/sh

2018-11-13 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Nov 14 02:37:51 UTC 2018

Modified Files:
src/tests/bin/sh: t_syntax.sh

Log Message:
Add a test for the bug in PR bin/53712   ( " { } > out " core dump )
Tested with both fixed, and unfixed, versions of /bin/sh (and in
posix mode, where that is a syntax error).


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/bin/sh/t_syntax.sh

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

Modified files:

Index: src/tests/bin/sh/t_syntax.sh
diff -u src/tests/bin/sh/t_syntax.sh:1.9 src/tests/bin/sh/t_syntax.sh:1.10
--- src/tests/bin/sh/t_syntax.sh:1.9	Mon Aug 21 00:56:22 2017
+++ src/tests/bin/sh/t_syntax.sh	Wed Nov 14 02:37:51 2018
@@ -1,4 +1,4 @@
-# $NetBSD: t_syntax.sh,v 1.9 2017/08/21 00:56:22 kre Exp $
+# $NetBSD: t_syntax.sh,v 1.10 2018/11/14 02:37:51 kre Exp $
 #
 # Copyright (c) 2017 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1197,6 +1197,34 @@ z_PR_52426_body() {
 		'case break in (/);; (\/);; (/\|/\));; (\\//);; esac'
 }
 
+atf_test_case z_PR_53712
+z_PR_53712_head() {
+	atf_set "descr" "Check for avoiding the core dump from PR bin/53712"
+}
+z_PR_53712_body() {
+	atf_require_prog sysctl
+	atf_require_prog rm
+
+	# Don't want to have to deal with all the possible ways
+	# that the systcm might be configured to drop core files...
+	sysctl -w proc.$$.corename=core ||
+		atf_skip "Unable to set file name for core dump file"
+	rm -f core
+
+	${TEST_SH} -c '{ } > out'; S=$?
+	test -f core &&
+		atf_fail "PR bin/53712: ${TEST_SH} dumps core: status=$S"
+	test "$S" -lt 128 ||
+		atf_fail "PR bin/53712: ${TEST_SH} reported status $S (core?)"
+
+	# It doesn't matter here whether or not there was an error
+	# from the empty compound, or whether "out" was created
+	# just that no core dump appeared, and the shell did not
+	# exit because of a signal.
+
+	return 0
+}
+
 atf_init_test_cases() {
 	atf_add_test_case a_basic_tokenisation
 	atf_add_test_case b_comments
@@ -1219,4 +1247,5 @@ atf_init_test_cases() {
 
 	atf_add_test_case z_PR_48498
 	atf_add_test_case z_PR_52426
+	atf_add_test_case z_PR_53712
 }



CVS commit: src/usr.sbin/sysinst

2018-11-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov 14 02:30:00 UTC 2018

Modified Files:
src/usr.sbin/sysinst: defs.h disks.c

Log Message:
Slightly enhance previous: create two utility functions checking for
partitionability and boot code requirements, use a generic match helper
function for both and fully check the device name.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/sysinst/defs.h
cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/sysinst/disks.c

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

Modified files:

Index: src/usr.sbin/sysinst/defs.h
diff -u src/usr.sbin/sysinst/defs.h:1.24 src/usr.sbin/sysinst/defs.h:1.25
--- src/usr.sbin/sysinst/defs.h:1.24	Sun Nov 11 10:06:09 2018
+++ src/usr.sbin/sysinst/defs.h	Wed Nov 14 02:30:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.24 2018/11/11 10:06:09 martin Exp $	*/
+/*	$NetBSD: defs.h,v 1.25 2018/11/14 02:30:00 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -483,6 +483,8 @@ bool	get_default_cdrom(char *, size_t);
 int	find_disks(const char *);
 bool enumerate_disks(void *state,bool (*func)(void *state, const char *dev));
 bool is_cdrom_device(const char *dev, bool as_target);
+bool is_bootable_device(const char *dev);
+bool is_partitionable_device(const char *dev);
 
 struct menudesc;
 void	fmt_fspart(struct menudesc *, int, void *);

Index: src/usr.sbin/sysinst/disks.c
diff -u src/usr.sbin/sysinst/disks.c:1.26 src/usr.sbin/sysinst/disks.c:1.27
--- src/usr.sbin/sysinst/disks.c:1.26	Tue Nov 13 17:22:04 2018
+++ src/usr.sbin/sysinst/disks.c	Wed Nov 14 02:30:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.26 2018/11/13 17:22:04 bouyer Exp $ */
+/*	$NetBSD: disks.c,v 1.27 2018/11/14 02:30:00 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -546,6 +546,53 @@ is_cdrom_device(const char *dev, bool as
 	return false;
 }
 
+/* does this device match any entry in the driver list? */
+static bool
+dev_in_list(const char *dev, const char **list)
+{
+
+	for ( ; *list; list++) {
+
+		size_t len = strlen(*list);
+
+		/* start of name matches? */
+		if (strncmp(dev, *list, len) == 0) {
+			char *endp;
+			int e;
+
+			/* remainder of name is a decimal number? */
+			strtou(dev+len, &endp, 10, 0, INT_MAX, &e);
+			if (endp && *endp == 0 && e == 0)
+return true;
+		}
+	}
+
+	return false;
+}
+
+bool
+is_bootable_device(const char *dev)
+{
+	static const char *non_bootable_devs[] = {
+		"raid",	/* bootcode lives outside of raid */
+		"xbd",	/* xen virtual device, can not boot from that */
+		NULL
+	};
+
+	return !dev_in_list(dev, non_bootable_devs);
+}
+
+bool
+is_partitionable_device(const char *dev)
+{
+	static const char *non_partitionable_devs[] = {
+		"dk",	/* this is alreay a partioned slice */
+		NULL
+	};
+
+	return !dev_in_list(dev, non_partitionable_devs);
+}
+
 /*
  * Multi-purpose helper function:
  * iterate all known disks, invoke a callback for each.
@@ -604,27 +651,14 @@ get_disks_helper(void *arg, const char *
 	if (is_cdrom_device(dev, true))
 		return true;
 
+	memset(state->dd, 0, sizeof(*state->dd));
 	strlcpy(state->dd->dd_name, dev, sizeof state->dd->dd_name - 2);
-	state->dd->dd_no_mbr = false;
-	state->dd->dd_no_part = false;
+	state->dd->dd_no_mbr = !is_bootable_device(dev);
+	state->dd->dd_no_part = !is_partitionable_device(dev);
 
-	if (strncmp(dev, "dk", 2) == 0) {
-		char *endp;
-		int e;
-
-		/* if this device is dk, no partitioning is possible */
-		strtou(dev+2, &endp, 10, 0, INT_MAX, &e);
-		if (endp && *endp == 0 && e == 0)
-			state->dd->dd_no_part = true;
-	}
 	if (state->dd->dd_no_part && !state->with_non_partitionable)
 		return true;
 
-	if (strncmp(dev, "xbd", 3) == 0 || strncmp(dev, "raid", 4) == 0) {
-		/* if this device is xbd or raid, don't set up an MBR */
-		state->dd->dd_no_mbr = true;
-	}
-
 	if (!get_geom(state->dd->dd_name, &l)) {
 		if (errno == ENOENT)
 			return true;



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

2018-11-13 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Nov 13 22:25:29 UTC 2018

Modified Files:
src/sys/arch/arm/cortex: gic_reg.h gicv3.c

Log Message:
Update GICD_CTLR reg bit definitions to reflect the layout of the register
when either in non-secure state or for a system that only supports a single
state.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/cortex/gic_reg.h \
src/sys/arch/arm/cortex/gicv3.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/cortex/gic_reg.h
diff -u src/sys/arch/arm/cortex/gic_reg.h:1.8 src/sys/arch/arm/cortex/gic_reg.h:1.9
--- src/sys/arch/arm/cortex/gic_reg.h:1.8	Fri Nov  9 23:36:24 2018
+++ src/sys/arch/arm/cortex/gic_reg.h	Tue Nov 13 22:25:28 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic_reg.h,v 1.8 2018/11/09 23:36:24 jmcneill Exp $	*/
+/*	$NetBSD: gic_reg.h,v 1.9 2018/11/13 22:25:28 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -143,10 +143,8 @@
 #define	GICD_CTRL_RWP			__BIT(31)	// GICv3
 #define	GICD_CTRL_E1NWF			__BIT(7)	// GICv3
 #define	GICD_CTRL_DS			__BIT(6)	// GICv3
-#define	GICD_CTRL_ARE_NS		__BIT(5)	// GICv3
-#define	GICD_CTRL_ARE_S			__BIT(4)	// GICv3
-#define	GICD_CTRL_EnableGrp1S		__BIT(2)	// GICv3
-#define	GICD_CTRL_EnableGrp1NS		__BIT(1)	// GICv3
+#define	GICD_CTRL_ARE_NS		__BIT(4)	// GICv3
+#define	GICD_CTRL_EnableGrp1A		__BIT(1)	// GICv3
 #define	GICD_CTRL_Enable		__BIT(0)
 
 #define	GICD_TYPER_No1N			__BIT(25)	// GICv3
Index: src/sys/arch/arm/cortex/gicv3.c
diff -u src/sys/arch/arm/cortex/gicv3.c:1.8 src/sys/arch/arm/cortex/gicv3.c:1.9
--- src/sys/arch/arm/cortex/gicv3.c:1.8	Tue Nov 13 10:33:03 2018
+++ src/sys/arch/arm/cortex/gicv3.c	Tue Nov 13 22:25:28 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3.c,v 1.8 2018/11/13 10:33:03 jmcneill Exp $ */
+/* $NetBSD: gicv3.c,v 1.9 2018/11/13 22:25:28 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -31,7 +31,7 @@
 #define	_INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.8 2018/11/13 10:33:03 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.9 2018/11/13 22:25:28 jmcneill Exp $");
 
 #include 
 #include 
@@ -245,7 +245,7 @@ gicv3_dist_enable(struct gicv3_softc *sc
 		;
 
 	/* Enable Affinity routing and G1NS interrupts */
-	gicd_ctrl = GICD_CTRL_EnableGrp1NS | GICD_CTRL_Enable | GICD_CTRL_ARE_NS;
+	gicd_ctrl = GICD_CTRL_EnableGrp1A | GICD_CTRL_Enable | GICD_CTRL_ARE_NS;
 	gicd_write_4(sc, GICD_CTRL, gicd_ctrl);
 }
 



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

2018-11-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Nov 13 21:22:38 UTC 2018

Modified Files:
src/sys/arch/hppa/stand: Makefile.buildboot
src/sys/arch/hppa/stand/xxboot: Makefile

Log Message:
Apply -fno-delete-null-pointer-checks so PAGE0 is handled correctly

netinstall.lif works again


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/stand/Makefile.buildboot
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/stand/xxboot/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/arch/hppa/stand/Makefile.buildboot
diff -u src/sys/arch/hppa/stand/Makefile.buildboot:1.5 src/sys/arch/hppa/stand/Makefile.buildboot:1.6
--- src/sys/arch/hppa/stand/Makefile.buildboot:1.5	Tue Nov 13 21:20:11 2018
+++ src/sys/arch/hppa/stand/Makefile.buildboot	Tue Nov 13 21:22:37 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.buildboot,v 1.5 2018/11/13 21:20:11 skrll Exp $
+#	$NetBSD: Makefile.buildboot,v 1.6 2018/11/13 21:22:37 skrll Exp $
 
 NOPIE=yes
 NOSSP=yes
@@ -32,7 +32,7 @@ BINMODE=	444
 
 CPPFLAGS+=	-nostdinc -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. \
 		-I${.OBJDIR}
-CFLAGS+=	-Os -msoft-float -Wno-main
+CFLAGS+=	-Os -fno-delete-null-pointer-checks -msoft-float -Wno-main
 CFLAGS+=	-fno-builtin
 CFLAGS+=	-mdisable-fpregs -mfast-indirect-calls -mpa-risc-1-0
 

Index: src/sys/arch/hppa/stand/xxboot/Makefile
diff -u src/sys/arch/hppa/stand/xxboot/Makefile:1.2 src/sys/arch/hppa/stand/xxboot/Makefile:1.3
--- src/sys/arch/hppa/stand/xxboot/Makefile:1.2	Sun Feb 21 14:50:05 2016
+++ src/sys/arch/hppa/stand/xxboot/Makefile	Tue Nov 13 21:22:38 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2016/02/21 14:50:05 christos Exp $
+#	$NetBSD: Makefile,v 1.3 2018/11/13 21:22:38 skrll Exp $
 
 NODEBUG=yes
 PROG=	xxboot
@@ -15,7 +15,7 @@ CPPFLAGS+=	-D__daddr_t=int32_t
 # ANSI C feature prevents from being relocatable
 #CPPFLAGS+=	-traditional	# would be best
 CPPFLAGS+=	-Dconst=
-COPTS+=		-Os -funsigned-char -mdisable-fpregs -mpa-risc-1-0
+COPTS+=		-Os -fno-delete-null-pointer-checks -funsigned-char -mdisable-fpregs -mpa-risc-1-0
 
 .include 
 



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

2018-11-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Nov 13 21:20:11 UTC 2018

Modified Files:
src/sys/arch/hppa/stand: Makefile.buildboot

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/stand/Makefile.buildboot

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/hppa/stand/Makefile.buildboot
diff -u src/sys/arch/hppa/stand/Makefile.buildboot:1.4 src/sys/arch/hppa/stand/Makefile.buildboot:1.5
--- src/sys/arch/hppa/stand/Makefile.buildboot:1.4	Tue Aug 29 09:17:43 2017
+++ src/sys/arch/hppa/stand/Makefile.buildboot	Tue Nov 13 21:20:11 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.buildboot,v 1.4 2017/08/29 09:17:43 christos Exp $
+#	$NetBSD: Makefile.buildboot,v 1.5 2018/11/13 21:20:11 skrll Exp $
 
 NOPIE=yes
 NOSSP=yes
@@ -24,7 +24,7 @@ S=		${.CURDIR}/../../../..
 .PATH: ${.CURDIR}/../common
 
 SRCS=		${PROGSOURCE} ${COMMONSOURCE} ${DRIVERSOURCE}
-NOMAN=		
+NOMAN=
 STRIPFLAG=
 BINMODE=	444
 
@@ -44,7 +44,7 @@ CPPFLAGS+=		-DNO_NET
 
 COMMONSOURCE=		cons.c dev_hppa.c dk.c itecons.c \
 			machdep.c milli_tiny.S pdc.c time.c
-DRIVERSOURCE=		
+DRIVERSOURCE=
 
 ### find out what to use for libkern
 KERN_AS=	library



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

2018-11-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Nov 13 20:48:14 UTC 2018

Modified Files:
src/sys/arch/arm/arm32: arm32_kvminit.c

Log Message:
On second/third thoughts we can use the pages before the kernel
everywhere.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/arm/arm32/arm32_kvminit.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/arm32/arm32_kvminit.c
diff -u src/sys/arch/arm/arm32/arm32_kvminit.c:1.47 src/sys/arch/arm/arm32/arm32_kvminit.c:1.48
--- src/sys/arch/arm/arm32/arm32_kvminit.c:1.47	Sat Oct 20 06:35:34 2018
+++ src/sys/arch/arm/arm32/arm32_kvminit.c	Tue Nov 13 20:48:14 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_kvminit.c,v 1.47 2018/10/20 06:35:34 skrll Exp $	*/
+/*	$NetBSD: arm32_kvminit.c,v 1.48 2018/11/13 20:48:14 skrll Exp $	*/
 
 /*
  * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
@@ -127,7 +127,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.47 2018/10/20 06:35:34 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.48 2018/11/13 20:48:14 skrll Exp $");
 
 #include 
 #include 
@@ -261,7 +261,6 @@ arm32_bootmem_init(paddr_t memstart, psi
 	pv->pv_pa + pv->pv_size - 1, pv->pv_va);
 	pv++;
 
-#if !defined(__HAVE_GENERIC_START)
 	/*
 	 * Add a free block for any memory before the kernel.
 	 */
@@ -275,7 +274,6 @@ arm32_bootmem_init(paddr_t memstart, psi
 		pv->pv_pa + pv->pv_size - 1, pv->pv_va);
 		pv++;
 	}
-#endif
 
 	bmi->bmi_nfreeblocks = pv - bmi->bmi_freeblocks;
 



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

2018-11-13 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Nov 13 20:24:48 UTC 2018

Modified Files:
src/sys/arch/arm/pic: pic.c

Log Message:
Fix intrctl for pics with non-0 irqbase


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/arm/pic/pic.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/pic/pic.c
diff -u src/sys/arch/arm/pic/pic.c:1.46 src/sys/arch/arm/pic/pic.c:1.47
--- src/sys/arch/arm/pic/pic.c:1.46	Sun Nov 11 10:14:14 2018
+++ src/sys/arch/arm/pic/pic.c	Tue Nov 13 20:24:48 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic.c,v 1.46 2018/11/11 10:14:14 jmcneill Exp $	*/
+/*	$NetBSD: pic.c,v 1.47 2018/11/13 20:24:48 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +33,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.46 2018/11/11 10:14:14 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.47 2018/11/13 20:24:48 jmcneill Exp $");
 
 #include 
 #include 
@@ -916,7 +916,7 @@ intr_get_source(const char *intrid)
 		if (pic == NULL || pic->pic_irqbase < 0)
 			continue;
 		for (irq = 0; irq < pic->pic_maxsources; irq++) {
-			is = pic->pic_sources[irq - pic->pic_irqbase];
+			is = pic->pic_sources[irq];
 			if (is == NULL || is->is_source[0] == '\0')
 continue;
 
@@ -945,7 +945,7 @@ interrupt_construct_intrids(const kcpuse
 		struct pic_softc * const pic = pic_list[slot];
 		if (pic != NULL && pic->pic_irqbase >= 0) {
 			for (irq = 0; irq < pic->pic_maxsources; irq++) {
-is = pic->pic_sources[irq - pic->pic_irqbase];
+is = pic->pic_sources[irq];
 if (is && is->is_source[0] != '\0')
 	count++;
 			}
@@ -960,7 +960,7 @@ interrupt_construct_intrids(const kcpuse
 		if (pic == NULL || pic->pic_irqbase < 0)
 			continue;
 		for (irq = 0; irq < pic->pic_maxsources; irq++) {
-			is = pic->pic_sources[irq - pic->pic_irqbase];
+			is = pic->pic_sources[irq];
 			if (is == NULL || is->is_source[0] == '\0')
 continue;
 



CVS commit: src/sys/dev/pci

2018-11-13 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Nov 13 20:12:45 UTC 2018

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

Log Message:
use pci_intr_establish_xname()


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/if_re_pci.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_re_pci.c
diff -u src/sys/dev/pci/if_re_pci.c:1.48 src/sys/dev/pci/if_re_pci.c:1.49
--- src/sys/dev/pci/if_re_pci.c:1.48	Thu May 18 18:33:48 2017
+++ src/sys/dev/pci/if_re_pci.c	Tue Nov 13 20:12:45 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_re_pci.c,v 1.48 2017/05/18 18:33:48 jakllsch Exp $	*/
+/*	$NetBSD: if_re_pci.c,v 1.49 2018/11/13 20:12:45 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -46,7 +46,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_re_pci.c,v 1.48 2017/05/18 18:33:48 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_re_pci.c,v 1.49 2018/11/13 20:12:45 jdolecek Exp $");
 
 #include 
 
@@ -262,8 +262,8 @@ re_pci_attach(device_t parent, device_t 
 	}
 	intrstr = pci_intr_string(pc, psc->sc_pihp[0], intrbuf,
 	sizeof(intrbuf));
-	psc->sc_ih = pci_intr_establish(pc, psc->sc_pihp[0], IPL_NET,
-	re_intr, sc);
+	psc->sc_ih = pci_intr_establish_xname(pc, psc->sc_pihp[0], IPL_NET,
+	re_intr, sc, device_xname(sc->sc_dev));
 	if (psc->sc_ih == NULL) {
 		aprint_error_dev(self, "couldn't establish interrupt");
 		if (intrstr != NULL)



CVS commit: src/sys/dev/pci

2018-11-13 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Nov 13 19:39:04 UTC 2018

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

Log Message:
whitespace fix, NFC


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/pci/if_msk.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_msk.c
diff -u src/sys/dev/pci/if_msk.c:1.79 src/sys/dev/pci/if_msk.c:1.80
--- src/sys/dev/pci/if_msk.c:1.79	Sun Oct 21 00:51:12 2018
+++ src/sys/dev/pci/if_msk.c	Tue Nov 13 19:39:04 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.79 2018/10/21 00:51:12 jmcneill Exp $ */
+/* $NetBSD: if_msk.c,v 1.80 2018/11/13 19:39:04 jdolecek Exp $ */
 /*	$OpenBSD: if_msk.c,v 1.79 2009/10/15 17:54:56 deraadt Exp $	*/
 
 /*
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.79 2018/10/21 00:51:12 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.80 2018/11/13 19:39:04 jdolecek Exp $");
 
 #include 
 #include 
@@ -1436,8 +1436,8 @@ mskc_attach(device_t parent, device_t se
 	}
 
 	intrstr = pci_intr_string(pc, sc->sk_pihp[0], intrbuf, sizeof(intrbuf));
-	sc->sk_intrhand = pci_intr_establish_xname(pc, sc->sk_pihp[0], IPL_NET, msk_intr,
-	sc, device_xname(sc->sk_dev));
+	sc->sk_intrhand = pci_intr_establish_xname(pc, sc->sk_pihp[0], IPL_NET,
+	msk_intr, sc, device_xname(sc->sk_dev));
 	if (sc->sk_intrhand == NULL) {
 		aprint_error(": couldn't establish interrupt");
 		if (intrstr != NULL)



CVS commit: src/sys/dev/i2c

2018-11-13 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Nov 13 19:06:05 UTC 2018

Modified Files:
src/sys/dev/i2c: axppmic.c

Log Message:
Add AXP803 current and maximum battery capacity sensors


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/i2c/axppmic.c

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

Modified files:

Index: src/sys/dev/i2c/axppmic.c
diff -u src/sys/dev/i2c/axppmic.c:1.15 src/sys/dev/i2c/axppmic.c:1.16
--- src/sys/dev/i2c/axppmic.c:1.15	Tue Nov 13 18:27:32 2018
+++ src/sys/dev/i2c/axppmic.c	Tue Nov 13 19:06:05 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: axppmic.c,v 1.15 2018/11/13 18:27:32 jakllsch Exp $ */
+/* $NetBSD: axppmic.c,v 1.16 2018/11/13 19:06:05 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2014-2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 1.15 2018/11/13 18:27:32 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 1.16 2018/11/13 19:06:05 jakllsch Exp $");
 
 #include 
 #include 
@@ -83,6 +83,17 @@ __KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 
 #define	 AXP_BATT_CAP_VALID	__BIT(7)
 #define	 AXP_BATT_CAP_PERCENT	__BITS(6,0)
 
+#define	AXP_BATT_MAX_CAP_HI_REG	0xe0
+#define	 AXP_BATT_MAX_CAP_VALID	__BIT(7)
+#define	AXP_BATT_MAX_CAP_LO_REG	0xe1
+
+#define	AXP_BATT_COULOMB_HI_REG	0xe2
+#define	 AXP_BATT_COULOMB_VALID	__BIT(7)
+#define	AXP_BATT_COULOMB_LO_REG	0xe3
+
+#define	AXP_COULOMB_RAW(_hi, _lo)	\
+	(((u_int)(_hi & ~__BIT(7)) << 8) | (_lo))
+
 #define	AXP_BATT_CAP_WARN_REG	0xe6
 #define	 AXP_BATT_CAP_WARN_LV1	__BITS(7,4)
 #define	 AXP_BATT_CAP_WARN_LV2	__BITS(3,0)
@@ -229,6 +240,8 @@ enum axppmic_sensor {
 	AXP_SENSOR_BATT_CHARGE_CURRENT,
 	AXP_SENSOR_BATT_DISCHARGE_CURRENT,
 	AXP_SENSOR_BATT_CAPACITY_PERCENT,
+	AXP_SENSOR_BATT_MAXIMUM_CAPACITY,
+	AXP_SENSOR_BATT_CURRENT_CAPACITY,
 	AXP_NSENSORS
 };
 
@@ -274,6 +287,8 @@ static const struct axppmic_config axp80
 	.batsense_step = 1100,
 	.charge_step = 1000,
 	.discharge_step = 1000,
+	.maxcap_step = 1456,
+	.coulomb_step = 1456,
 	.poklirq = AXPPMIC_IRQ(5, __BIT(3)),
 	.acinirq = AXPPMIC_IRQ(1, __BITS(6,5)),
 	.vbusirq = AXPPMIC_IRQ(1, __BITS(3,2)),
@@ -495,6 +510,22 @@ axppmic_sensor_update(struct sysmon_envs
 			e->value_cur = AXP_ADC_RAW(hi, lo) * c->discharge_step;
 		}
 		break;
+	case AXP_SENSOR_BATT_MAXIMUM_CAPACITY:
+		if (battery_present &&
+		axppmic_read(sc->sc_i2c, sc->sc_addr, AXP_BATT_MAX_CAP_HI_REG, &hi, flags) == 0 &&
+		axppmic_read(sc->sc_i2c, sc->sc_addr, AXP_BATT_MAX_CAP_LO_REG, &lo, flags) == 0) {
+			e->state = (hi & AXP_BATT_MAX_CAP_VALID) ? ENVSYS_SVALID : ENVSYS_SINVALID;
+			e->value_cur = AXP_COULOMB_RAW(hi, lo) * c->maxcap_step;
+		}
+		break;
+	case AXP_SENSOR_BATT_CURRENT_CAPACITY:
+		if (battery_present &&
+		axppmic_read(sc->sc_i2c, sc->sc_addr, AXP_BATT_COULOMB_HI_REG, &hi, flags) == 0 &&
+		axppmic_read(sc->sc_i2c, sc->sc_addr, AXP_BATT_COULOMB_LO_REG, &lo, flags) == 0) {
+			e->state = (hi & AXP_BATT_COULOMB_VALID) ? ENVSYS_SVALID : ENVSYS_SINVALID;
+			e->value_cur = AXP_COULOMB_RAW(hi, lo) * c->coulomb_step;
+		}
+		break;
 	}
 }
 
@@ -653,6 +684,24 @@ axppmic_attach_battery(struct axppmic_so
 		strlcpy(e->desc, "battery percent", sizeof(e->desc));
 		sysmon_envsys_sensor_attach(sc->sc_sme, e);
 	}
+
+	if (c->maxcap_step) {
+		e = &sc->sc_sensor[AXP_SENSOR_BATT_MAXIMUM_CAPACITY];
+		e->private = AXP_SENSOR_BATT_MAXIMUM_CAPACITY;
+		e->units = ENVSYS_SAMPHOUR;
+		e->state = ENVSYS_SINVALID;
+		strlcpy(e->desc, "battery maximum capacity", sizeof(e->desc));
+		sysmon_envsys_sensor_attach(sc->sc_sme, e);
+	}
+
+	if (c->coulomb_step) {
+		e = &sc->sc_sensor[AXP_SENSOR_BATT_CURRENT_CAPACITY];
+		e->private = AXP_SENSOR_BATT_CURRENT_CAPACITY;
+		e->units = ENVSYS_SAMPHOUR;
+		e->state = ENVSYS_SINVALID;
+		strlcpy(e->desc, "battery current capacity", sizeof(e->desc));
+		sysmon_envsys_sensor_attach(sc->sc_sme, e);
+	}
 }
 
 static void



CVS commit: src/distrib/notes

2018-11-13 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Tue Nov 13 18:48:26 UTC 2018

Modified Files:
src/distrib/notes/common: main
src/distrib/notes/macppc: contents install prep.OPENFIRMWARE

Log Message:
Mention macppc 601 needs to use separate boot floppies, kernels, and specific 
kernel on CD


To generate a diff of this commit:
cvs rdiff -u -r1.549 -r1.550 src/distrib/notes/common/main
cvs rdiff -u -r1.14 -r1.15 src/distrib/notes/macppc/contents
cvs rdiff -u -r1.39 -r1.40 src/distrib/notes/macppc/install
cvs rdiff -u -r1.19 -r1.20 src/distrib/notes/macppc/prep.OPENFIRMWARE

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.549 src/distrib/notes/common/main:1.550
--- src/distrib/notes/common/main:1.549	Tue Aug  7 08:26:42 2018
+++ src/distrib/notes/common/main	Tue Nov 13 18:48:25 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: main,v 1.549 2018/08/07 08:26:42 martin Exp $
+.\"	$NetBSD: main,v 1.550 2018/11/13 18:48:25 scole Exp $
 .\"
 .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -381,6 +381,24 @@ kernel is called
 You may want to read the section below on
 .Sx Open Firmware boot syntax
 .\}
+.if \n[macppc] \{\
+.It
+.Pp
+PowerPC 601 machines need to use separate boot floppies 
+.Pa macppc/installation/floppy/boot601_1.fs
+and
+.Pa macppc/installation/floppy/boot602_2.fs ,
+a different kernel set
+.Pa kern-GENERIC_601.tgz ,
+and a different install kernel
+.Pa netbsd-INSTALL_601.gz .
+The same boot CD can be used but at the boot prompt you must specify
+the 601 kernel, i.e., replace
+.Ic netbsd.macppc
+with
+.Ic netbsd.601
+.
+.\}
 .if \n[sparc]:\n[sparc64] \{\
 .It
 You will need to get to the

Index: src/distrib/notes/macppc/contents
diff -u src/distrib/notes/macppc/contents:1.14 src/distrib/notes/macppc/contents:1.15
--- src/distrib/notes/macppc/contents:1.14	Sun Jun 24 09:38:47 2018
+++ src/distrib/notes/macppc/contents	Tue Nov 13 18:48:25 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: contents,v 1.14 2018/06/24 09:38:47 leot Exp $
+.\"	$NetBSD: contents,v 1.15 2018/11/13 18:48:25 scole Exp $
 .\"
 .\" Copyright (c) 1999-2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -91,6 +91,15 @@ kernel containing code only for Open Fir
 and 2.4 systems (i.e. those that have floppy drives).
 It has a RAM-disk installer.
 .
+.			It Pa netbsd-INSTALL_601.gz
+.
+A gzipped
+.Nx
+kernel containing code only for PowerPC 601 machines, Open Firmware
+1.0.5, 1.1.22, 2.0.x, and 2.4 systems (i.e. those that have floppy drives).
+It has a RAM-disk installer.
+.
+.
 .		tag) \" binary/kernel/
 .
 .		It Pa sets/
@@ -112,6 +121,13 @@ kernel.  The second image has the instal
 Only usable on models that ship with a floppy drive (pre-Open Firmware 3);
 see below.
 .
+.
+.		It Pa floppy/boot601_1.fs
+.		It Pa floppy/boot601_2.fs
+.
+Same as boot1.fs, boot2.fs, except for PowerPC 601 machines only.
+.
+.
 .		It Pa ofwboot.xcf
 .
 \*M bootloader; see below.

Index: src/distrib/notes/macppc/install
diff -u src/distrib/notes/macppc/install:1.39 src/distrib/notes/macppc/install:1.40
--- src/distrib/notes/macppc/install:1.39	Sat Oct  6 05:28:46 2012
+++ src/distrib/notes/macppc/install	Tue Nov 13 18:48:25 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: install,v 1.39 2012/10/06 05:28:46 jnemeth Exp $
+.\"	$NetBSD: install,v 1.40 2018/11/13 18:48:25 scole Exp $
 .
 .Ss2 Open Firmware boot syntax
 .
@@ -298,6 +298,15 @@ listing if it is present on the disk.  F
 .No 0 \*[Gt] Ic "boot cd:,\eOFWBOOT.XCF;1 NETBSD.MACPPC;1"
 .disp)
 .Note)
+.(Note
+PowerPC 601 machines need to specify the
+.Pa NETBSD.601
+kernel when booting from the install CD, and use the
+.Pa kern-GENERIC_601.tgz
+and
+.Pa netbsd-INSTALL_601.gz
+kernels.
+.Note)
 .Pp
 If the
 .Ic dir
@@ -335,6 +344,7 @@ usually sets their CD-ROM drives to SCSI
 .Pp
 .(disp
 .No 0 \*[Gt] Ic "boot cd:0 NETBSD.MACPPC"
+.No 0 \*[Gt] Ic "boot cd:0 NETBSD.601"
 .No 0 \*[Gt] Ic "boot scsi-int/sd@3:0 NETBSD.MACPPC"
 .No 0 \*[Gt] Ic "boot scsi/sd@3:0 NETBSD.MACPPC"
 .No 0 \*[Gt] Ic "boot ata/atapi-disk:0 NETBSD.MACPPC"

Index: src/distrib/notes/macppc/prep.OPENFIRMWARE
diff -u src/distrib/notes/macppc/prep.OPENFIRMWARE:1.19 src/distrib/notes/macppc/prep.OPENFIRMWARE:1.20
--- src/distrib/notes/macppc/prep.OPENFIRMWARE:1.19	Wed Jun  7 09:14:32 2017
+++ src/distrib/notes/macppc/prep.OPENFIRMWARE	Tue Nov 13 18:48:25 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: prep.OPENFIRMWARE,v 1.19 2017/06/07 09:14:32 he Exp $
+.\"	$NetBSD: prep.OPENFIRMWARE,v 1.20 2018/11/13 18:48:25 scole Exp $
 .if \*[OF_VERSION_3] \{\
 .
 .Ss2 Updating your BootROM
@@ -1257,7 +1257,11 @@ Use a tool to write the boot floppy imag
 .Pa installation/floppy/boot1.fs
 and
 .Pa installation/floppy/boot2.fs
-to two floppy disks.
+to two floppy disks.  PowerPC 601 machines should use
+.Pa installation/floppy/boot601_1.fs
+and
+.Pa installation/floppy/boot601_2

CVS commit: src/sys/dev/i2c

2018-11-13 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Nov 13 18:27:32 UTC 2018

Modified Files:
src/sys/dev/i2c: axppmic.c

Log Message:
Use semantically-correct "_lo" in AXP_ADC_RAW macro.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/i2c/axppmic.c

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

Modified files:

Index: src/sys/dev/i2c/axppmic.c
diff -u src/sys/dev/i2c/axppmic.c:1.14 src/sys/dev/i2c/axppmic.c:1.15
--- src/sys/dev/i2c/axppmic.c:1.14	Tue Jun 26 06:03:57 2018
+++ src/sys/dev/i2c/axppmic.c	Tue Nov 13 18:27:32 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: axppmic.c,v 1.14 2018/06/26 06:03:57 thorpej Exp $ */
+/* $NetBSD: axppmic.c,v 1.15 2018/11/13 18:27:32 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2014-2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 1.14 2018/06/26 06:03:57 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 1.15 2018/11/13 18:27:32 jakllsch Exp $");
 
 #include 
 #include 
@@ -74,7 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD: axppmic.c,v 
 #define	AXP_BATTDISCHG_LO_REG	0x7d
 
 #define	AXP_ADC_RAW(_hi, _lo)	\
-	(((u_int)(_hi) << 4) | ((lo) & 0xf))
+	(((u_int)(_hi) << 4) | ((_lo) & 0xf))
 
 #define	AXP_FUEL_GAUGE_CTRL_REG	0xb8
 #define	 AXP_FUEL_GAUGE_CTRL_EN	__BIT(7)



CVS commit: src/usr.sbin/sysinst

2018-11-13 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Nov 13 17:22:04 UTC 2018

Modified Files:
src/usr.sbin/sysinst: disks.c

Log Message:
Skip mbr for xbd and raid devices, as it was before Nov. 5 commits.
anita xen installs should work again.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/sysinst/disks.c

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

Modified files:

Index: src/usr.sbin/sysinst/disks.c
diff -u src/usr.sbin/sysinst/disks.c:1.25 src/usr.sbin/sysinst/disks.c:1.26
--- src/usr.sbin/sysinst/disks.c:1.25	Sun Nov 11 10:06:09 2018
+++ src/usr.sbin/sysinst/disks.c	Tue Nov 13 17:22:04 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.25 2018/11/11 10:06:09 martin Exp $ */
+/*	$NetBSD: disks.c,v 1.26 2018/11/13 17:22:04 bouyer Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -620,6 +620,11 @@ get_disks_helper(void *arg, const char *
 	if (state->dd->dd_no_part && !state->with_non_partitionable)
 		return true;
 
+	if (strncmp(dev, "xbd", 3) == 0 || strncmp(dev, "raid", 4) == 0) {
+		/* if this device is xbd or raid, don't set up an MBR */
+		state->dd->dd_no_mbr = true;
+	}
+
 	if (!get_geom(state->dd->dd_name, &l)) {
 		if (errno == ENOENT)
 			return true;



CVS commit: [netbsd-8] src/doc

2018-11-13 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Nov 13 16:57:45 UTC 2018

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

Log Message:
1093


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.55 -r1.1.2.56 src/doc/CHANGES-8.1

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.1
diff -u src/doc/CHANGES-8.1:1.1.2.55 src/doc/CHANGES-8.1:1.1.2.56
--- src/doc/CHANGES-8.1:1.1.2.55	Mon Nov 12 16:03:17 2018
+++ src/doc/CHANGES-8.1	Tue Nov 13 16:57:45 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.1,v 1.1.2.55 2018/11/12 16:03:17 martin Exp $
+# $NetBSD: CHANGES-8.1,v 1.1.2.56 2018/11/13 16:57:45 snj Exp $
 
 A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1
 release:
@@ -1691,3 +1691,8 @@ sys/dev/usb/usbdevs_data.h			(regen)
 	in those chips destroying USB descirptors.
 	[manu, ticket #1091]
 
+sys/compat/netbsd32/netbsd32_socket.c		1.48 via patch
+
+	Fix inverted logic, which leads to buffer overflow.
+	[maxv, ticket #1093]
+



CVS commit: [netbsd-8] src/sys/compat/netbsd32

2018-11-13 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Nov 13 16:55:22 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [netbsd-8]: netbsd32_socket.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1093):
sys/compat/netbsd32/netbsd32_socket.c: 1.48
Fix inverted logic, which leads to buffer overflow. Detected by kASan.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.44.8.1 src/sys/compat/netbsd32/netbsd32_socket.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/compat/netbsd32/netbsd32_socket.c
diff -u src/sys/compat/netbsd32/netbsd32_socket.c:1.44 src/sys/compat/netbsd32/netbsd32_socket.c:1.44.8.1
--- src/sys/compat/netbsd32/netbsd32_socket.c:1.44	Tue Sep 13 07:01:07 2016
+++ src/sys/compat/netbsd32/netbsd32_socket.c	Tue Nov 13 16:55:22 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_socket.c,v 1.44 2016/09/13 07:01:07 martin Exp $	*/
+/*	$NetBSD: netbsd32_socket.c,v 1.44.8.1 2018/11/13 16:55:22 snj Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.44 2016/09/13 07:01:07 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.44.8.1 2018/11/13 16:55:22 snj Exp $");
 
 #include 
 #include 
@@ -99,7 +99,7 @@ copyout32_msg_control_mbuf(struct lwp *l
 		}
 
 		ktrkuser("msgcontrol", cmsg, cmsg->cmsg_len);
-		error = copyout(&cmsg32, *q, MAX(i, sizeof(cmsg32)));
+		error = copyout(&cmsg32, *q, MIN(i, sizeof(cmsg32)));
 		if (error)
 			return (error);
 		if (i > CMSG32_LEN(0)) {



CVS commit: src/crypto/external/bsd/netpgp/dist/src

2018-11-13 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Nov 13 14:52:31 UTC 2018

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: keyring.c keyring.h misc.c
netpgp.c packet-parse.c packet.h
src/crypto/external/bsd/netpgp/dist/src/libmj: libmj.3 mj.c
src/crypto/external/bsd/netpgp/dist/src/netpgpkeys: netpgpkeys.c

Log Message:
Fix some error handling, json support, keyring handling.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 \
src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c
cvs rdiff -u -r1.34 -r1.35 \
src/crypto/external/bsd/netpgp/dist/src/lib/keyring.h
cvs rdiff -u -r1.41 -r1.42 src/crypto/external/bsd/netpgp/dist/src/lib/misc.c
cvs rdiff -u -r1.101 -r1.102 \
src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
cvs rdiff -u -r1.51 -r1.52 \
src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c
cvs rdiff -u -r1.30 -r1.31 \
src/crypto/external/bsd/netpgp/dist/src/lib/packet.h
cvs rdiff -u -r1.9 -r1.10 \
src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3
cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/netpgp/dist/src/libmj/mj.c
cvs rdiff -u -r1.26 -r1.27 \
src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.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/netpgp/dist/src/lib/keyring.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.55 src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.56
--- src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c:1.55	Mon Mar 27 21:19:12 2017
+++ src/crypto/external/bsd/netpgp/dist/src/lib/keyring.c	Tue Nov 13 14:52:30 2018
@@ -57,7 +57,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: keyring.c,v 1.55 2017/03/27 21:19:12 khorben Exp $");
+__RCSID("$NetBSD: keyring.c,v 1.56 2018/11/13 14:52:30 mlelstv Exp $");
 #endif
 
 #ifdef HAVE_FCNTL_H
@@ -456,10 +456,12 @@ copy_packet(pgp_subpacket_t *dst, const 
 	}
 	if ((dst->raw = calloc(1, src->length)) == NULL) {
 		(void) fprintf(stderr, "copy_packet: bad alloc\n");
+		dst->length = 0;
 	} else {
 		dst->length = src->length;
 		(void) memcpy(dst->raw, src->raw, src->length);
 	}
+	dst->tag = src->tag;
 	return dst;
 }
 
@@ -500,7 +502,6 @@ pgp_add_subpacket(pgp_key_t *keydata, co
 	EXPAND_ARRAY(keydata, packet);
 	/* initialise new entry in array */
 	subpktp = &keydata->packets[keydata->packetc++];
-	subpktp->length = 0;
 	subpktp->raw = NULL;
 	/* now copy it */
 	return copy_packet(subpktp, packet);
@@ -545,6 +546,7 @@ pgp_add_selfsigned_userid(pgp_key_t *key
 	/* add this packet to key */
 	sigpacket.length = pgp_mem_len(mem_sig);
 	sigpacket.raw = pgp_mem_data(mem_sig);
+	sigpacket.tag = PGP_PTAG_CT_SIGNATURE;
 
 	/* add userid to key */
 	(void) pgp_add_userid(key, userid);
@@ -596,13 +598,14 @@ cb_keyring_read(const pgp_packet_t *pkt,
 
 	cb = pgp_callback_arg(cbinfo);
 	keyring = cb->keyring;
+	key = keyring->keyc > 0 ? &keyring->keys[keyring->keyc - 1] : NULL;
+
 	switch (pkt->tag) {
 	case PGP_PARSER_PTAG:
 	case PGP_PTAG_CT_ENCRYPTED_SECRET_KEY:
 		/* we get these because we didn't prompt */
 		break;
 	case PGP_PTAG_CT_SIGNATURE_HEADER:
-		key = &keyring->keys[keyring->keyc - 1];
 		EXPAND_ARRAY(key, subsig);
 		key->subsigs[key->subsigc].uid = key->uidc - 1;
 		(void) memcpy(&key->subsigs[key->subsigc].sig, &pkt->u.sig,
@@ -610,7 +613,6 @@ cb_keyring_read(const pgp_packet_t *pkt,
 		key->subsigc += 1;
 		break;
 	case PGP_PTAG_CT_SIGNATURE:
-		key = &keyring->keys[keyring->keyc - 1];
 		EXPAND_ARRAY(key, subsig);
 		key->subsigs[key->subsigc].uid = key->uidc - 1;
 		(void) memcpy(&key->subsigs[key->subsigc].sig, &pkt->u.sig,
@@ -618,7 +620,6 @@ cb_keyring_read(const pgp_packet_t *pkt,
 		key->subsigc += 1;
 		break;
 	case PGP_PTAG_CT_TRUST:
-		key = &keyring->keys[keyring->keyc - 1];
 		key->subsigs[key->subsigc - 1].trustlevel = pkt->u.ss_trust.level;
 		key->subsigs[key->subsigc - 1].trustamount = pkt->u.ss_trust.amount;
 		break;
@@ -629,28 +630,23 @@ cb_keyring_read(const pgp_packet_t *pkt,
 		}
 		break;
 	case PGP_PTAG_SS_ISSUER_KEY_ID:
-		key = &keyring->keys[keyring->keyc - 1];
 		(void) memcpy(&key->subsigs[key->subsigc - 1].sig.info.signer_id,
 			  pkt->u.ss_issuer,
 			  sizeof(pkt->u.ss_issuer));
 		key->subsigs[key->subsigc - 1].sig.info.signer_id_set = 1;
 		break;
 	case PGP_PTAG_SS_CREATION_TIME:
-		key = &keyring->keys[keyring->keyc - 1];
 		key->subsigs[key->subsigc - 1].sig.info.birthtime = pkt->u.ss_time;
 		key->subsigs[key->subsigc - 1].sig.info.birthtime_set = 1;
 		break;
 	case PGP_PTAG_SS_EXPIRATION_TIME:
-		key = &keyring->keys[keyring->keyc - 1];
 		key->subsigs[key->subsigc - 1].sig.info.duration = pkt->u.ss_time;
 		key->subsigs[key->subsigc - 1].sig.info.duration_set = 1;
 		break;
 	case PGP_PTAG_SS_PRIMARY_USER_ID:
-		key =

CVS commit: src/sys/kern

2018-11-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Nov 13 11:06:19 UTC 2018

Modified Files:
src/sys/kern: kern_cpu.c

Log Message:
Fix/add KASSERTS to work with a system of MAXCPUS.  Add some comments to
explain things.

Discussed with rmind


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/kern/kern_cpu.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/kern/kern_cpu.c
diff -u src/sys/kern/kern_cpu.c:1.74 src/sys/kern/kern_cpu.c:1.75
--- src/sys/kern/kern_cpu.c:1.74	Wed Jul  4 07:25:47 2018
+++ src/sys/kern/kern_cpu.c	Tue Nov 13 11:06:19 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_cpu.c,v 1.74 2018/07/04 07:25:47 msaitoh Exp $	*/
+/*	$NetBSD: kern_cpu.c,v 1.75 2018/11/13 11:06:19 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2010, 2012 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_cpu.c,v 1.74 2018/07/04 07:25:47 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_cpu.c,v 1.75 2018/11/13 11:06:19 skrll Exp $");
 
 #include "opt_cpu_ucode.h"
 
@@ -309,7 +309,11 @@ cpu_lookup(u_int idx)
 {
 	struct cpu_info *ci;
 
-	KASSERT(idx < maxcpus);
+	/*
+	 * cpu_infos is a NULL terminated array of MAXCPUS + 1 entries,
+	 * so an index of MAXCPUS here is ok.  See mi_cpu_attach.
+	 */
+	KASSERT(idx <= maxcpus);
 
 	if (__predict_false(cpu_infos == NULL)) {
 		KASSERT(idx == 0);
@@ -318,6 +322,7 @@ cpu_lookup(u_int idx)
 
 	ci = cpu_infos[idx];
 	KASSERT(ci == NULL || cpu_index(ci) == idx);
+	KASSERTMSG(idx < maxcpus || ci == NULL, "idx %d ci %p", idx, ci);
 
 	return ci;
 }



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

2018-11-13 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Nov 13 11:01:54 UTC 2018

Modified Files:
src/sys/arch/i386/include: multiboot.h

Log Message:
Framebuffer definitions for multiboot protocol.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/i386/include/multiboot.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/i386/include/multiboot.h
diff -u src/sys/arch/i386/include/multiboot.h:1.9 src/sys/arch/i386/include/multiboot.h:1.10
--- src/sys/arch/i386/include/multiboot.h:1.9	Fri Apr 13 01:49:47 2018
+++ src/sys/arch/i386/include/multiboot.h	Tue Nov 13 11:01:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: multiboot.h,v 1.9 2018/04/13 01:49:47 khorben Exp $	*/
+/*	$NetBSD: multiboot.h,v 1.10 2018/11/13 11:01:54 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
@@ -86,6 +86,7 @@ extern struct multiboot_header *Multiboo
 #define MULTIBOOT_INFO_HAS_LOADER_NAME	0x0200
 #define MULTIBOOT_INFO_HAS_APM_TABLE	0x0400
 #define MULTIBOOT_INFO_HAS_VBE		0x0800
+#define MULTIBOOT_INFO_HAS_FRAMEBUFFER	0x1000
 
 #if !defined(_LOCORE)
 struct multiboot_info {
@@ -138,6 +139,32 @@ struct multiboot_info {
 	uint16_t	unused_mi_vbe_interface_seg;
 	uint16_t	unused_mi_vbe_interface_off;
 	uint16_t	unused_mi_vbe_interface_len;
+
+	/* Valid if mi_flags sets MULTIBOOT_INFO_HAS_FRAMEBUFFER. */
+	uint64_t	framebuffer_addr;
+	uint32_t	framebuffer_pitch;
+	uint32_t	framebuffer_width;
+	uint32_t	framebuffer_height;
+	uint8_t		framebuffer_bpp;
+#define MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED 	0
+#define MULTIBOOT_FRAMEBUFFER_TYPE_RGB 	1
+#define MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT 2
+	uint8_t framebuffer_type;
+	union {
+		struct {
+			uint32_t framebuffer_palette_addr;
+			uint16_t framebuffer_palette_num_colors;
+		};
+		struct {
+			uint8_t framebuffer_red_field_position;
+			uint8_t framebuffer_red_mask_size;
+			uint8_t framebuffer_green_field_position;
+			uint8_t framebuffer_green_mask_size;
+			uint8_t framebuffer_blue_field_position;
+			uint8_t framebuffer_blue_mask_size;
+		};
+	};
+
 };
 
 /* - */



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

2018-11-13 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Nov 13 11:00:55 UTC 2018

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

Log Message:
use generic usbdevices.config


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/evbarm/conf/BEAGLEBONE

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/BEAGLEBONE
diff -u src/sys/arch/evbarm/conf/BEAGLEBONE:1.45 src/sys/arch/evbarm/conf/BEAGLEBONE:1.46
--- src/sys/arch/evbarm/conf/BEAGLEBONE:1.45	Tue Oct 23 19:58:52 2018
+++ src/sys/arch/evbarm/conf/BEAGLEBONE	Tue Nov 13 11:00:55 2018
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: BEAGLEBONE,v 1.45 2018/10/23 19:58:52 jdolecek Exp $
+#	$NetBSD: BEAGLEBONE,v 1.46 2018/11/13 11:00:55 mlelstv Exp $
 #
 #	BEAGLEBONE -- TI AM335x board Kernel
 #
@@ -158,53 +158,13 @@ pseudo-device	wsfont
 tiotg* 	at mainbus? base 0x4740 size 0x5000 intrbase 17
 motg*	at tiotg? port ?
 usb*		at motg?
-uhub*		at usb?
-uhub*		at uhub? port ?
 
-uhidev*		at uhub?
+# USB device drivers
+include "dev/usb/usbdevices.config"
 
-# USB Keyboards
-ukbd*	at uhidev? reportid ?
-wskbd*	at ukbd? console ? mux 1
+# needed for umidi
+midi*  at midibus?
 
-# USB Mice
-ums*	at uhidev? reportid ?
-wsmouse* at ums? mux 0
-
-# USB generic touchscreen
-uts*	at uhidev? reportid ?
-wsmouse* at uts? mux 0
-
-# USB Modem
-umodem* at uhub? port ? configuration ?
-ucom*	at umodem?
-# Serial adapters
-ubsa*	at uhub? port ?		# Belkin serial adapter
-ucom*	at ubsa? portno ?
-
-uchcom* at uhub? port ? 	# WinChipHead CH341/CH340 serial adapter
-ucom*	at uchcom? portno ?
-
-uftdi*	at uhub? port ?		# FTDI FT8U100AX serial adapter
-ucom*	at uftdi? portno ?
-
-uipaq*	at uhub? port ?		# iPAQ PDAs
-ucom*	at uipaq? portno ?
-
-umct*	at uhub? port ?		# MCT USB-RS232 serial adapter
-ucom*	at umct? portno ?
-
-uplcom* at uhub? port ? 	# I/O DATA USB-RSAQ2 serial adapter
-ucom*	at uplcom? portno ?
-
-uslsa*	at uhub? port ?		# Silicon Labs USB-RS232 serial adapter
-ucom*	at uslsa? portno ?
-
-uvscom* at uhub? port ? 	# SUNTAC Slipper U VS-10U serial adapter
-ucom*	at uvscom? portno ?
-
-
-umass*		at uhub? port ? configuration ? interface ?
 # SCSI bus support
 scsibus*	at scsi?
 # SCSI devices



CVS commit: src/sys/dev/ic

2018-11-13 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Nov 13 10:51:49 UTC 2018

Modified Files:
src/sys/dev/ic: rtl8169.c

Log Message:
compute interrupt timer depending on bus clock.


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.155 src/sys/dev/ic/rtl8169.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/rtl8169.c
diff -u src/sys/dev/ic/rtl8169.c:1.154 src/sys/dev/ic/rtl8169.c:1.155
--- src/sys/dev/ic/rtl8169.c:1.154	Tue Jun 26 06:48:00 2018
+++ src/sys/dev/ic/rtl8169.c	Tue Nov 13 10:51:49 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl8169.c,v 1.154 2018/06/26 06:48:00 msaitoh Exp $	*/
+/*	$NetBSD: rtl8169.c,v 1.155 2018/11/13 10:51:49 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.154 2018/06/26 06:48:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.155 2018/11/13 10:51:49 mlelstv Exp $");
 /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
 
 /*
@@ -1934,19 +1934,50 @@ re_init(struct ifnet *ifp)
 	 * moderation, which dramatically improves TX frame rate.
 	 */
 
-	if ((sc->sc_quirk & RTKQ_8139CPLUS) != 0)
-		CSR_WRITE_4(sc, RTK_TIMERINT, 0x400);
-	else {
-		if ((sc->sc_quirk & RTKQ_IM_HW) == 0) {
-			if ((sc->sc_quirk & RTKQ_PCIE) != 0) {
-CSR_WRITE_4(sc, RTK_TIMERINT_8169, 15000);
-			} else {
-CSR_WRITE_4(sc, RTK_TIMERINT_8169, 0x800);
-			}
-		} else {
-			CSR_WRITE_4(sc, RTK_TIMERINT_8169, 0);
+	unsigned defer;		/* timer interval / ns */
+	unsigned period;	/* busclock period / ns */
+
+	/*
+	 * Maximum frame rate
+	 * 1500 byte PDU -> 81274 Hz
+	 *   46 byte PDU -> 1488096 Hz
+	 *
+	 * Deferring interrupts by up to 128us needs descriptors for
+	 * 1500 byte PDU -> 10.4 frames
+	 *   46 byte PDU -> 190.4 frames
+	 *
+	 */
+	defer = 128000;
+
+	if ((sc->sc_quirk & RTKQ_IM_HW) == 0) {
+		period = 1;
+		defer = 0;
+	} else if ((sc->sc_quirk & RTKQ_PCIE) != 0) {
+		period = 8;
+	} else {
+		switch (CSR_READ_4(sc, RTK_CFG2_BUSFREQ) & 0x7) {
+		case RTK_BUSFREQ_33MHZ:
+			period = 30;
+			break;
+		case RTK_BUSFREQ_66MHZ:
+			period = 15;
+			break;
+		default:
+			/* lowest possible clock */
+			period = 60;
+			break;
 		}
+	}
 
+	/* Timer Interrupt register address varies */
+	uint16_t re8139_reg;
+	if ((sc->sc_quirk & RTKQ_8139CPLUS) != 0)
+		re8139_reg = RTK_TIMERINT;
+	else
+		re8139_reg = RTK_TIMERINT_8169;
+	CSR_WRITE_4(sc, re8139_reg, defer / period);
+
+	if ((sc->sc_quirk & RTKQ_8139CPLUS) == 0) {
 		/*
 		 * For 8169 gigE NICs, set the max allowed RX packet
 		 * size so we can receive jumbo frames.



CVS commit: src/sys/dev/usb

2018-11-13 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Nov 13 10:35:32 UTC 2018

Modified Files:
src/sys/dev/usb: if_urtwn.c

Log Message:
Fix race in attachment.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/usb/if_urtwn.c

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

Modified files:

Index: src/sys/dev/usb/if_urtwn.c
diff -u src/sys/dev/usb/if_urtwn.c:1.64 src/sys/dev/usb/if_urtwn.c:1.65
--- src/sys/dev/usb/if_urtwn.c:1.64	Wed Sep 12 21:57:18 2018
+++ src/sys/dev/usb/if_urtwn.c	Tue Nov 13 10:35:32 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwn.c,v 1.64 2018/09/12 21:57:18 christos Exp $	*/
+/*	$NetBSD: if_urtwn.c,v 1.65 2018/11/13 10:35:32 mlelstv Exp $	*/
 /*	$OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $	*/
 
 /*-
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.64 2018/09/12 21:57:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.65 2018/11/13 10:35:32 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -484,7 +484,7 @@ urtwn_attach(device_t parent, device_t s
 	IFQ_SET_READY(&ifp->if_snd);
 	memcpy(ifp->if_xname, device_xname(sc->sc_dev), IFNAMSIZ);
 
-	if_attach(ifp);
+	if_initialize(ifp);
 	ieee80211_ifattach(ic);
 
 	/* override default methods */
@@ -509,6 +509,9 @@ urtwn_attach(device_t parent, device_t s
 	sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len);
 	sc->sc_txtap.wt_ihdr.it_present = htole32(URTWN_TX_RADIOTAP_PRESENT);
 
+	ifp->if_percpuq = if_percpuq_create(ifp);
+	if_register(ifp);
+
 	ieee80211_announce(ic);
 
 	usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev);



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

2018-11-13 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Nov 13 10:33:03 UTC 2018

Modified Files:
src/sys/arch/arm/cortex: gicv3.c

Log Message:
Save a few pages by only allocating LPI pending tables for "ncpu" instead of 
"MAXCPU" CPUs.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/cortex/gicv3.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/cortex/gicv3.c
diff -u src/sys/arch/arm/cortex/gicv3.c:1.7 src/sys/arch/arm/cortex/gicv3.c:1.8
--- src/sys/arch/arm/cortex/gicv3.c:1.7	Sat Nov 10 11:46:31 2018
+++ src/sys/arch/arm/cortex/gicv3.c	Tue Nov 13 10:33:03 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3.c,v 1.7 2018/11/10 11:46:31 jmcneill Exp $ */
+/* $NetBSD: gicv3.c,v 1.8 2018/11/13 10:33:03 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -31,7 +31,7 @@
 #define	_INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.7 2018/11/10 11:46:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.8 2018/11/13 10:33:03 jmcneill Exp $");
 
 #include 
 #include 
@@ -673,7 +673,7 @@ gicv3_lpi_init(struct gicv3_softc *sc)
 	 * Allocate LPI pending tables
 	 */
 	const bus_size_t lpipend_sz = (sc->sc_lpi.pic_maxsources + sc->sc_lpi.pic_irqbase) / NBBY;
-	for (int cpuindex = 0; cpuindex < MAXCPUS; cpuindex++) {
+	for (int cpuindex = 0; cpuindex < ncpu; cpuindex++) {
 		gicv3_dma_alloc(sc, &sc->sc_lpipend[cpuindex], lpipend_sz, 0x1);
 		KASSERT((sc->sc_lpipend[cpuindex].segs[0].ds_addr & ~GICR_PENDBASER_Physical_Address) == 0);
 	}



CVS commit: src/sys/dev/usb

2018-11-13 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Nov 13 10:30:57 UTC 2018

Modified Files:
src/sys/dev/usb: umass.c umass_scsipi.c umassvar.h

Log Message:
Handle abort paths gracefully on detach.


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/sys/dev/usb/umass.c
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/usb/umass_scsipi.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/usb/umassvar.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/usb/umass.c
diff -u src/sys/dev/usb/umass.c:1.165 src/sys/dev/usb/umass.c:1.166
--- src/sys/dev/usb/umass.c:1.165	Wed Oct 24 09:41:24 2018
+++ src/sys/dev/usb/umass.c	Tue Nov 13 10:30:57 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass.c,v 1.165 2018/10/24 09:41:24 martin Exp $	*/
+/*	$NetBSD: umass.c,v 1.166 2018/11/13 10:30:57 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.165 2018/10/24 09:41:24 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.166 2018/11/13 10:30:57 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -801,7 +801,9 @@ umass_detach(device_t self, int flags)
 
 	DPRINTFM(UDMASS_USB, "sc %#jx detached", (uintptr_t)sc, 0, 0, 0);
 
+	mutex_enter(&sc->sc_lock);
 	sc->sc_dying = true;
+	mutex_exit(&sc->sc_lock);
 
 	pmf_device_deregister(self);
 
@@ -1179,9 +1181,6 @@ umass_bbb_state(struct usbd_xfer *xfer, 
 		   "sc->sc_wire == 0x%02x wrong for umass_bbb_state\n",
 		   sc->sc_wire);
 
-	if (sc->sc_dying)
-		return;
-
 	/*
 	 * State handling for BBB transfers.
 	 *
@@ -1197,6 +1196,18 @@ umass_bbb_state(struct usbd_xfer *xfer, 
 	(uintptr_t)sc, (uintptr_t)xfer, sc->transfer_state,
 	sc->transfer_dir);
 
+	if (err == USBD_CANCELLED) {
+		DPRINTFM(UDMASS_BBB, "sc %#jx xfer %#jx cancelled",
+		(uintptr_t)sc, (uintptr_t)xfer, 0, 0);
+
+		sc->transfer_state = TSTATE_IDLE;
+		sc->transfer_cb(sc, sc->transfer_priv, 0, STATUS_TIMEOUT);
+		return;
+	}
+
+	if (sc->sc_dying)
+		return;
+
 	switch (sc->transfer_state) {
 
 	/* Bulk Transfer */
@@ -1635,6 +1646,14 @@ umass_cbi_state(struct usbd_xfer *xfer, 
 		   "sc->sc_wire == 0x%02x wrong for umass_cbi_state\n",
 		   sc->sc_wire);
 
+	if (err == USBD_CANCELLED) {
+		DPRINTFM(UDMASS_BBB, "sc %#jx xfer %#jx cancelled",
+			(uintptr_t)sc, (uintptr_t)xfer, 0, 0);
+		sc->transfer_state = TSTATE_IDLE;
+		sc->transfer_cb(sc, sc->transfer_priv, 0, STATUS_TIMEOUT);
+		return;
+	}
+
 	if (sc->sc_dying)
 		return;
 

Index: src/sys/dev/usb/umass_scsipi.c
diff -u src/sys/dev/usb/umass_scsipi.c:1.55 src/sys/dev/usb/umass_scsipi.c:1.56
--- src/sys/dev/usb/umass_scsipi.c:1.55	Sat Oct 28 00:37:12 2017
+++ src/sys/dev/usb/umass_scsipi.c	Tue Nov 13 10:30:57 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass_scsipi.c,v 1.55 2017/10/28 00:37:12 pgoyette Exp $	*/
+/*	$NetBSD: umass_scsipi.c,v 1.56 2018/11/13 10:30:57 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2001, 2003, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.55 2017/10/28 00:37:12 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.56 2018/11/13 10:30:57 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -136,12 +136,17 @@ umass_scsi_attach(struct umass_softc *sc
 	scbus->sc_channel.chan_id = scbus->sc_channel.chan_ntargets - 1;
 	DPRINTFM(UDMASS_USB, "sc %#jx: SCSI", (uintptr_t)sc, 0, 0, 0);
 
+	mutex_enter(&sc->sc_lock);
 	sc->sc_refcnt++;
+	mutex_exit(&sc->sc_lock);
 	scbus->base.sc_child =
 	config_found_ia(sc->sc_dev, "scsi", &scbus->sc_channel,
 		scsiprint);
+	mutex_enter(&sc->sc_lock);
 	if (--sc->sc_refcnt < 0)
-		usb_detach_wakeupold(sc->sc_dev);
+		usb_detach_broadcast(sc->sc_dev, &sc->sc_detach_cv);
+	mutex_exit(&sc->sc_lock);
+
 
 	return 0;
 }
@@ -164,12 +169,16 @@ umass_atapi_attach(struct umass_softc *s
 	scbus->sc_channel.chan_defquirks |= sc->sc_busquirks;
 	DPRINTFM(UDMASS_USB, "sc %#jxp: ATAPI", (uintptr_t)sc, 0, 0, 0);
 
+	mutex_enter(&sc->sc_lock);
 	sc->sc_refcnt++;
+	mutex_exit(&sc->sc_lock);
 	scbus->base.sc_child =
 	config_found_ia(sc->sc_dev, "atapi", &scbus->sc_channel,
 		atapiprint);
+	mutex_enter(&sc->sc_lock);
 	if (--sc->sc_refcnt < 0)
-		usb_detach_wakeupold(sc->sc_dev);
+		usb_detach_broadcast(sc->sc_dev, &sc->sc_detach_cv);
+	mutex_exit(&sc->sc_lock);
 
 	return 0;
 }
@@ -445,6 +454,10 @@ umass_scsipi_cb(struct umass_softc *sc, 
 		xs->error = XS_RESET;
 		break;
 
+	case STATUS_TIMEOUT:
+		xs->error = XS_TIMEOUT;
+		break;
+
 	default:
 		panic("%s: Unknown status %d in umass_scsipi_cb",
 			device_xname(sc->sc_dev), status);

Index: src/sys/dev/usb/umassvar.h
diff -u src/sys/dev/usb/umassvar.h:1.38 src/sys/dev/usb/umassvar.h:1.39
--- src/sys/dev/usb/umassvar.h:1.38	Sun Jul  3 07:27:37 2016
+++ src/sys/dev/usb/umassvar.h	Tue Nov 13 10:30:57 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: umassvar.h,v 1.

CVS commit: src/sys/uvm

2018-11-13 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Nov 13 10:31:01 UTC 2018

Modified Files:
src/sys/uvm: uvm_pglist.c

Log Message:
only warn once per call to uvm_pglistalloc_simple() if waiting.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/uvm/uvm_pglist.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/uvm/uvm_pglist.c
diff -u src/sys/uvm/uvm_pglist.c:1.71 src/sys/uvm/uvm_pglist.c:1.72
--- src/sys/uvm/uvm_pglist.c:1.71	Mon Sep  3 16:29:37 2018
+++ src/sys/uvm/uvm_pglist.c	Tue Nov 13 10:31:01 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pglist.c,v 1.71 2018/09/03 16:29:37 riastradh Exp $	*/
+/*	$NetBSD: uvm_pglist.c,v 1.72 2018/11/13 10:31:01 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.71 2018/09/03 16:29:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.72 2018/11/13 10:31:01 mrg Exp $");
 
 #include 
 #include 
@@ -453,6 +453,7 @@ uvm_pglistalloc_simple(int num, paddr_t 
 {
 	int fl, error;
 	uvm_physseg_t psi;
+	int count = 0;
 
 	/* Default to "lose". */
 	error = ENOMEM;
@@ -462,6 +463,7 @@ again:
 	 * Block all memory allocation and lock the free list.
 	 */
 	mutex_spin_enter(&uvm_fpageqlock);
+	count++;
 
 	/* Are there even any free pages? */
 	if (uvmexp.free <= (uvmexp.reserve_pagedaemon + uvmexp.reserve_kernel))
@@ -499,7 +501,8 @@ out:
 		if (waitok) {
 			/* XXX perhaps some time limitation? */
 #ifdef DEBUG
-			printf("pglistalloc waiting\n");
+			if (count == 1)
+printf("pglistalloc waiting\n");
 #endif
 			uvm_wait("pglalloc");
 			goto again;



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

2018-11-13 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Nov 13 10:30:35 UTC 2018

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

Log Message:
Physical end should be the end of the last range, not the first.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/aarch64/aarch64/aarch64_machdep.c

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/aarch64_machdep.c
diff -u src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.20 src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.21
--- src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.20	Sat Nov 10 18:29:08 2018
+++ src/sys/arch/aarch64/aarch64/aarch64_machdep.c	Tue Nov 13 10:30:35 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: aarch64_machdep.c,v 1.20 2018/11/10 18:29:08 ryo Exp $ */
+/* $NetBSD: aarch64_machdep.c,v 1.21 2018/11/13 10:30:35 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.20 2018/11/10 18:29:08 ryo Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.21 2018/11/13 10:30:35 jmcneill Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -247,7 +247,8 @@ initarm_common(vaddr_t kvm_base, vsize_t
 
 	/* XXX: arm/arm32/bus_dma.c refers physical_{start,end} */
 	physical_start = bootconfig.dram[0].address;
-	physical_end = physical_start + ptoa(bootconfig.dram[0].pages);
+	physical_end = bootconfig.dram[bootconfig.dramblocks - 1].address +
+		   ptoa(bootconfig.dram[bootconfig.dramblocks - 1].pages);
 
 	/*
 	 * msgbuf is allocated from the bottom of any one of memory blocks



CVS commit: src/lib

2018-11-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 13 09:24:37 UTC 2018

Modified Files:
src/lib: Makefile
src/lib/libnvmm: Makefile

Log Message:
Too much magic involved - revert previous.


To generate a diff of this commit:
cvs rdiff -u -r1.264 -r1.265 src/lib/Makefile
cvs rdiff -u -r1.4 -r1.5 src/lib/libnvmm/Makefile

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

Modified files:

Index: src/lib/Makefile
diff -u src/lib/Makefile:1.264 src/lib/Makefile:1.265
--- src/lib/Makefile:1.264	Tue Nov 13 09:00:08 2018
+++ src/lib/Makefile	Tue Nov 13 09:24:37 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.264 2018/11/13 09:00:08 martin Exp $
+#	$NetBSD: Makefile,v 1.265 2018/11/13 09:24:37 martin Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -23,7 +23,7 @@ SUBDIR+=	i18n_module
 SUBDIR+=	libarch \
 		libbluetooth libbsdmalloc libbz2 \
 		libcompat libcrypt \
-		libintl libipsec libkvm libm libnvmm \
+		libintl libipsec libkvm libm \
 		libossaudio libpci libposix libprop libpthread \
 		libpuffs libresolv librmt librpcsvc librt \
 		libtelnet libterminfo \
@@ -50,6 +50,10 @@ SUBDIR+=	librumpclient
 SUBDIR+=	libskey
 .endif
 
+.if ${MACHINE_ARCH} == "x86_64" && ${MLIBDIR:Unone} != "i386"
+SUBDIR+=	libnvmm
+.endif
+
 .if (${MKMDNS} != "no")
 SUBDIR+=	../external/apache2/mDNSResponder/lib
 .endif

Index: src/lib/libnvmm/Makefile
diff -u src/lib/libnvmm/Makefile:1.4 src/lib/libnvmm/Makefile:1.5
--- src/lib/libnvmm/Makefile:1.4	Tue Nov 13 09:14:14 2018
+++ src/lib/libnvmm/Makefile	Tue Nov 13 09:24:37 2018
@@ -1,9 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2018/11/13 09:14:14 martin Exp $
+# $NetBSD: Makefile,v 1.5 2018/11/13 09:24:37 martin Exp $
 
 .include 
 
-.if ${MACHINE_ARCH} == "x86_64" && ${MLIBDIR:Unone} != "i386"
-
 LIB=		nvmm
 MAN=		libnvmm.3
 
@@ -14,10 +12,4 @@ INCSDIR=	/usr/include
 
 WARNS=		5
 
-.else
-LIB=
-LIBDPLIBS=
-.endif
-
 .include 
-



CVS commit: src/lib/libnvmm

2018-11-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 13 09:14:14 UTC 2018

Modified Files:
src/lib/libnvmm: Makefile

Log Message:
Need some minimalistic support for additional things that ../Makefile
requires, even if we do nothing here


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

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/Makefile
diff -u src/lib/libnvmm/Makefile:1.3 src/lib/libnvmm/Makefile:1.4
--- src/lib/libnvmm/Makefile:1.3	Tue Nov 13 09:00:09 2018
+++ src/lib/libnvmm/Makefile	Tue Nov 13 09:14:14 2018
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.3 2018/11/13 09:00:09 martin Exp $
-
-.if ${MACHINE_ARCH} == "x86_64" && ${MLIBDIR:Unone} != "i386"
+# $NetBSD: Makefile,v 1.4 2018/11/13 09:14:14 martin Exp $
 
 .include 
 
+.if ${MACHINE_ARCH} == "x86_64" && ${MLIBDIR:Unone} != "i386"
+
 LIB=		nvmm
 MAN=		libnvmm.3
 
@@ -14,6 +14,10 @@ INCSDIR=	/usr/include
 
 WARNS=		5
 
+.else
+LIB=
+LIBDPLIBS=
+.endif
+
 .include 
 
-.endif



CVS commit: src/lib

2018-11-13 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Nov 13 09:00:09 UTC 2018

Modified Files:
src/lib: Makefile
src/lib/libnvmm: Makefile

Log Message:
Move conditionals for libnvmm to subdir makefile, requested boy mrg.


To generate a diff of this commit:
cvs rdiff -u -r1.263 -r1.264 src/lib/Makefile
cvs rdiff -u -r1.2 -r1.3 src/lib/libnvmm/Makefile

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

Modified files:

Index: src/lib/Makefile
diff -u src/lib/Makefile:1.263 src/lib/Makefile:1.264
--- src/lib/Makefile:1.263	Mon Nov 12 09:25:42 2018
+++ src/lib/Makefile	Tue Nov 13 09:00:08 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.263 2018/11/12 09:25:42 martin Exp $
+#	$NetBSD: Makefile,v 1.264 2018/11/13 09:00:08 martin Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -23,7 +23,7 @@ SUBDIR+=	i18n_module
 SUBDIR+=	libarch \
 		libbluetooth libbsdmalloc libbz2 \
 		libcompat libcrypt \
-		libintl libipsec libkvm libm \
+		libintl libipsec libkvm libm libnvmm \
 		libossaudio libpci libposix libprop libpthread \
 		libpuffs libresolv librmt librpcsvc librt \
 		libtelnet libterminfo \
@@ -50,10 +50,6 @@ SUBDIR+=	librumpclient
 SUBDIR+=	libskey
 .endif
 
-.if ${MACHINE_ARCH} == "x86_64" && ${MLIBDIR:Unone} != "i386"
-SUBDIR+=	libnvmm
-.endif
-
 .if (${MKMDNS} != "no")
 SUBDIR+=	../external/apache2/mDNSResponder/lib
 .endif

Index: src/lib/libnvmm/Makefile
diff -u src/lib/libnvmm/Makefile:1.2 src/lib/libnvmm/Makefile:1.3
--- src/lib/libnvmm/Makefile:1.2	Mon Nov 12 17:46:53 2018
+++ src/lib/libnvmm/Makefile	Tue Nov 13 09:00:09 2018
@@ -1,4 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2018/11/12 17:46:53 nakayama Exp $
+# $NetBSD: Makefile,v 1.3 2018/11/13 09:00:09 martin Exp $
+
+.if ${MACHINE_ARCH} == "x86_64" && ${MLIBDIR:Unone} != "i386"
 
 .include 
 
@@ -13,3 +15,5 @@ INCSDIR=	/usr/include
 WARNS=		5
 
 .include 
+
+.endif