CVS commit: src/sys/dev/pci

2013-05-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu May 30 05:50:06 UTC 2013

Modified Files:
src/sys/dev/pci: if_bge.c if_bgereg.h

Log Message:
 0x4B657654(BGE_SRAM_FW_MB_MAGIC) == ~0xB49A89AB(BGE_SRAM_FW_MB_RESET_MAGIC),
so the same code I added in rev. 1.223 exists in bge_poll_fw(), too. Remove it.

 And then, call bge_poll_fw() before writing BGE_MODE_CTL register like the
latest linux tg3 dirver.


To generate a diff of this commit:
cvs rdiff -u -r1.251 -r1.252 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/pci/if_bgereg.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_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.251 src/sys/dev/pci/if_bge.c:1.252
--- src/sys/dev/pci/if_bge.c:1.251	Wed May 29 08:24:06 2013
+++ src/sys/dev/pci/if_bge.c	Thu May 30 05:50:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.251 2013/05/29 08:24:06 msaitoh Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.252 2013/05/30 05:50:06 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.251 2013/05/29 08:24:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.252 2013/05/30 05:50:06 msaitoh Exp $");
 
 #include 
 #include 
@@ -4149,25 +4149,14 @@ bge_reset(struct bge_softc *sc)
 		BGE_SETBIT(sc, BGE_TLP_CONTROL_REG, BGE_TLP_DATA_FIFO_PROTECT);
 	}
 
+	/* 57XX step 17 */
+	/* Poll until the firmware initialization is complete */
+	bge_poll_fw(sc);
+
 	/* 5718 reset step 12, 57XX step 15 and 16 */
 	/* Fix up byte swapping */
 	CSR_WRITE_4(sc, BGE_MODE_CTL, BGE_DMA_SWAP_OPTIONS);
 
-	/* 5718 reset step 13, 57XX step 17 */
-	/*
-	 * Wait for the bootcode to complete initialization.
-	 * See BCM5718 programmer's guide's "step 13, Device reset Procedure,
-	 * Section 7". For 57XX, it's optional.
-	 */
-	if (BGE_IS_5717_PLUS(sc)) {
-		for (i = 0; i < 1000*1000; i++) {
-			val = bge_readmem_ind(sc, BGE_SRAM_FW_MB);
-			if (val == BGE_SRAM_FW_MB_RESET_MAGIC)
-break;
-			DELAY(10);
-		}
-	}
-
 	/* 57XX step 21 */
 	if (BGE_CHIPREV(sc->bge_chipid) == BGE_CHIPREV_5704_BX) {
 		pcireg_t msidata;
@@ -4190,10 +4179,6 @@ bge_reset(struct bge_softc *sc)
 
 	bge_ape_unlock(sc, BGE_APE_LOCK_GRC);
 
-	/* 57XX step 17 */
-	/* Poll until the firmware initialization is complete */
-	bge_poll_fw(sc);
-
 	/*
 	 * The 5704 in TBI mode apparently needs some special
 	 * adjustment to insure the SERDES drive level is set

Index: src/sys/dev/pci/if_bgereg.h
diff -u src/sys/dev/pci/if_bgereg.h:1.79 src/sys/dev/pci/if_bgereg.h:1.80
--- src/sys/dev/pci/if_bgereg.h:1.79	Tue May 28 05:55:40 2013
+++ src/sys/dev/pci/if_bgereg.h	Thu May 30 05:50:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bgereg.h,v 1.79 2013/05/28 05:55:40 msaitoh Exp $	*/
+/*	$NetBSD: if_bgereg.h,v 1.80 2013/05/30 05:50:06 msaitoh Exp $	*/
 /*
  * Copyright (c) 2001 Wind River Systems
  * Copyright (c) 1997, 1998, 1999, 2001
@@ -2191,8 +2191,7 @@
  * firmware mailbox at 0xB50 in order to prevent the PXE boot
  * code from running.
  */
-#define	BGE_SRAM_FW_MB_MAGIC	0x4B657654
-#define	BGE_SRAM_FW_MB_RESET_MAGIC	0xB49A89AB
+#define	BGE_SRAM_FW_MB_MAGIC	0x4B657654 /* == ~0xB49A89AB */
 
 typedef struct {
 	volatile u_int32_t	bge_addr_hi;



CVS commit: src/doc

2013-05-29 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Thu May 30 00:07:07 UTC 2013

Modified Files:
src/doc: CHANGES

Log Message:
Note Armada XP support.


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1823 src/doc/CHANGES:1.1824
--- src/doc/CHANGES:1.1823	Wed May  8 08:24:13 2013
+++ src/doc/CHANGES	Thu May 30 00:07:07 2013
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1823 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1824 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -242,3 +242,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	mcp980x(4): Add driver for Microchip MCP9800/1/2/3 I2C temperature
 		sensor. [rkujawa 20130507]
 	zoneinfo: Import tzdata2013c. [apb 20130508]
+	arm: Add support for Marvell Armada XP SoCs. From Marvell and Semihalf.
+		[rkujawa 20130530]



CVS commit: src/sys/arch

2013-05-29 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed May 29 23:50:35 UTC 2013

Modified Files:
src/sys/arch/arm/marvell: armadaxp.c
src/sys/arch/arm/pic: armadaxp_splfuncs.c
src/sys/arch/evbarm/armadaxp: armadaxp_machdep.c armadaxp_start.S
src/sys/arch/evbarm/conf: mk.armadaxp

Log Message:
Add CVS IDs where appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/marvell/armadaxp.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/pic/armadaxp_splfuncs.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c \
src/sys/arch/evbarm/armadaxp/armadaxp_start.S
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/mk.armadaxp

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/marvell/armadaxp.c
diff -u src/sys/arch/arm/marvell/armadaxp.c:1.1 src/sys/arch/arm/marvell/armadaxp.c:1.2
--- src/sys/arch/arm/marvell/armadaxp.c:1.1	Wed May 29 22:35:34 2013
+++ src/sys/arch/arm/marvell/armadaxp.c	Wed May 29 23:50:35 2013
@@ -1,3 +1,4 @@
+/*	$NetBSD: armadaxp.c,v 1.2 2013/05/29 23:50:35 rkujawa Exp $	*/
 /***
 Copyright (C) Marvell International Ltd. and its affiliates
 
@@ -36,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.1 2013/05/29 22:35:34 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.2 2013/05/29 23:50:35 rkujawa Exp $");
 
 #define _INTR_PRIVATE
 

Index: src/sys/arch/arm/pic/armadaxp_splfuncs.c
diff -u src/sys/arch/arm/pic/armadaxp_splfuncs.c:1.1 src/sys/arch/arm/pic/armadaxp_splfuncs.c:1.2
--- src/sys/arch/arm/pic/armadaxp_splfuncs.c:1.1	Wed May 29 22:35:34 2013
+++ src/sys/arch/arm/pic/armadaxp_splfuncs.c	Wed May 29 23:50:35 2013
@@ -1,3 +1,4 @@
+/*	$NetBSD: armadaxp_splfuncs.c,v 1.2 2013/05/29 23:50:35 rkujawa Exp $	*/
 /***
 Copyright (C) Marvell International Ltd. and its affiliates
 
@@ -36,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: armadaxp_splfuncs.c,v 1.1 2013/05/29 22:35:34 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: armadaxp_splfuncs.c,v 1.2 2013/05/29 23:50:35 rkujawa Exp $");
 
 #define _INTR_PRIVATE
 

Index: src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c
diff -u src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c:1.1 src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c:1.2
--- src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c:1.1	Wed May 29 19:55:56 2013
+++ src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c	Wed May 29 23:50:34 2013
@@ -1,3 +1,4 @@
+/*	$NetBSD: armadaxp_machdep.c,v 1.2 2013/05/29 23:50:34 rkujawa Exp $	*/
 /***
 Copyright (C) Marvell International Ltd. and its affiliates
 
@@ -36,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: armadaxp_machdep.c,v 1.1 2013/05/29 19:55:56 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: armadaxp_machdep.c,v 1.2 2013/05/29 23:50:34 rkujawa Exp $");
 
 #include "opt_machdep.h"
 #include "opt_mvsoc.h"
Index: src/sys/arch/evbarm/armadaxp/armadaxp_start.S
diff -u src/sys/arch/evbarm/armadaxp/armadaxp_start.S:1.1 src/sys/arch/evbarm/armadaxp/armadaxp_start.S:1.2
--- src/sys/arch/evbarm/armadaxp/armadaxp_start.S:1.1	Wed May 29 19:55:56 2013
+++ src/sys/arch/evbarm/armadaxp/armadaxp_start.S	Wed May 29 23:50:34 2013
@@ -1,3 +1,4 @@
+/*	$NetBSD: armadaxp_start.S,v 1.2 2013/05/29 23:50:34 rkujawa Exp $	*/
 /***
 Copyright (C) Marvell International Ltd. and its affiliates
 
@@ -41,7 +42,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
 #include 
 #include 
 
-RCSID("$NetBSD: armadaxp_start.S,v 1.1 2013/05/29 19:55:56 rkujawa Exp $")
+RCSID("$NetBSD: armadaxp_start.S,v 1.2 2013/05/29 23:50:34 rkujawa Exp $")
 
 #define	CPWAIT_BRANCH			 \
 	sub	pc, pc, #4

Index: src/sys/arch/evbarm/conf/mk.armadaxp
diff -u src/sys/arch/evbarm/conf/mk.armadaxp:1.1 src/sys/arch/evbarm/conf/mk.armadaxp:1.2
--- src/sys/arch/evbarm/conf/mk.armadaxp:1.1	Wed May 29 22:52:19 2013
+++ src/sys/arch/evbarm/conf/mk.armadaxp	Wed May 29 23:50:35 2013
@@ -1,5 +1,5 @@
 #
-#	$NetBSD:
+#	$NetBSD: mk.armadaxp,v 1.2 2013/05/29 23:50:35 rkujawa Exp $
 #
 
 SYSTEM_FIRST_OBJ=	armadaxp_start.o



CVS commit: src/sys/dev

2013-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 29 23:37:11 UTC 2013

Modified Files:
src/sys/dev: dksubr.c

Log Message:
eliminate sc_size and fix printf formats


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/dksubr.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/dksubr.c
diff -u src/sys/dev/dksubr.c:1.47 src/sys/dev/dksubr.c:1.48
--- src/sys/dev/dksubr.c:1.47	Wed May 29 19:25:55 2013
+++ src/sys/dev/dksubr.c	Wed May 29 19:37:10 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.47 2013/05/29 23:25:55 christos Exp $ */
+/* $NetBSD: dksubr.c,v 1.48 2013/05/29 23:37:10 christos Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.47 2013/05/29 23:25:55 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.48 2013/05/29 23:37:10 christos Exp $");
 
 #include 
 #include 
@@ -567,7 +567,7 @@ dk_getdefaultlabel(struct dk_intf *di, s
 	lp->d_flags = 0;
 
 	lp->d_partitions[RAW_PART].p_offset = 0;
-	lp->d_partitions[RAW_PART].p_size = dksc->sc_size;
+	lp->d_partitions[RAW_PART].p_size = dg->dg_secperunit;
 	lp->d_partitions[RAW_PART].p_fstype = FS_UNUSED;
 	lp->d_npartitions = RAW_PART + 1;
 
@@ -582,6 +582,7 @@ dk_getdisklabel(struct dk_intf *di, stru
 {
 	struct	 disklabel *lp = dksc->sc_dkdev.dk_label;
 	struct	 cpu_disklabel *clp = dksc->sc_dkdev.dk_cpulabel;
+	struct disk_geom *dg = &dksc->sc_dkdev.dk_geom;
 	struct	 partition *pp;
 	int	 i;
 	const char	*errstring;
@@ -601,17 +602,17 @@ dk_getdisklabel(struct dk_intf *di, stru
 		return;
 
 	/* Sanity check */
-	if (lp->d_secperunit != dksc->sc_size)
+	if (lp->d_secperunit != dg->dg_secperunit)
 		printf("WARNING: %s: total sector size in disklabel (%d) "
-		"!= the size of %s (%lu)\n", dksc->sc_xname,
-		lp->d_secperunit, di->di_dkname, (u_long)dksc->sc_size);
+		"!= the size of %s (%" PRId64 ")\n", dksc->sc_xname,
+		lp->d_secperunit, di->di_dkname, dg->dg_secperunit);
 
 	for (i=0; i < lp->d_npartitions; i++) {
 		pp = &lp->d_partitions[i];
-		if (pp->p_offset + pp->p_size > dksc->sc_size)
+		if (pp->p_offset + pp->p_size > dg->dg_secperunit)
 			printf("WARNING: %s: end of partition `%c' exceeds "
-			"the size of %s (%lu)\n", dksc->sc_xname,
-			'a' + i, di->di_dkname, (u_long)dksc->sc_size);
+			"the size of %s (%" PRId64 ")\n", dksc->sc_xname,
+			'a' + i, di->di_dkname, dg->dg_secperunit);
 	}
 }
 



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

2013-05-29 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed May 29 23:29:44 UTC 2013

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

Log Message:
Explicitely cast to unsigned. Avoid bugs caused by misintepreting the result as
signed.

riastradh@ suggested to change these macros into static inline functions.
But I'm still not convinced...

Obtained from Marvell, Semihalf.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/include/arm32/param.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/param.h
diff -u src/sys/arch/arm/include/arm32/param.h:1.19 src/sys/arch/arm/include/arm32/param.h:1.20
--- src/sys/arch/arm/include/arm32/param.h:1.19	Wed Mar 20 13:43:39 2013
+++ src/sys/arch/arm/include/arm32/param.h	Wed May 29 23:29:44 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.19 2013/03/20 13:43:39 skrll Exp $	*/
+/*	$NetBSD: param.h,v 1.20 2013/05/29 23:29:44 rkujawa Exp $	*/
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -89,8 +89,8 @@
 #define USPACE_SVC_STACK_TOP		(USPACE)
 #define USPACE_SVC_STACK_BOTTOM		(sizeof(struct pcb))
 
-#define arm_btop(x)			((x) >> PGSHIFT)
-#define arm_ptob(x)			((x) << PGSHIFT)
+#define arm_btop(x)			((unsigned)(x) >> PGSHIFT)
+#define arm_ptob(x)			((unsigned)(x) << PGSHIFT)
 #define arm_trunc_page(x)		((unsigned)(x) & ~PGOFSET)
 
 #ifdef _KERNEL



CVS commit: src/sys/dev

2013-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 29 23:25:55 UTC 2013

Modified Files:
src/sys/dev: dksubr.c dkvar.h

Log Message:
eliminate dk_geom


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/dksubr.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/dkvar.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/dksubr.c
diff -u src/sys/dev/dksubr.c:1.46 src/sys/dev/dksubr.c:1.47
--- src/sys/dev/dksubr.c:1.46	Tue May 28 20:47:48 2013
+++ src/sys/dev/dksubr.c	Wed May 29 19:25:55 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.46 2013/05/29 00:47:48 christos Exp $ */
+/* $NetBSD: dksubr.c,v 1.47 2013/05/29 23:25:55 christos Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.46 2013/05/29 00:47:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.47 2013/05/29 23:25:55 christos Exp $");
 
 #include 
 #include 
@@ -340,12 +340,12 @@ dk_ioctl(struct dk_intf *di, struct dk_s
 	switch (cmd) {
 #ifdef DIOCGSECTORSIZE
 	case DIOCGSECTORSIZE:
-		*(u_int *)data = dksc->sc_geom.pdg_secsize;
+		*(u_int *)data = dksc->sc_dkdev.dk_geom.dg_secsize;
 		return 0;
 	case DIOCGMEDIASIZE:
 		*(off_t *)data =
-		(off_t)dksc->sc_geom.pdg_secsize *
-		dksc->sc_geom.pdg_nsectors;
+		(off_t)dksc->sc_dkdev.dk_geom.dg_secsize *
+		dksc->sc_dkdev.dk_geom.dg_nsectors;
 		return 0;
 #endif
 
@@ -548,15 +548,15 @@ void
 dk_getdefaultlabel(struct dk_intf *di, struct dk_softc *dksc,
 		  struct disklabel *lp)
 {
-	struct dk_geom *pdg = &dksc->sc_geom;
+	struct disk_geom *dg = &dksc->sc_dkdev.dk_geom;
 
 	memset(lp, 0, sizeof(*lp));
 
-	lp->d_secperunit = dksc->sc_size;
-	lp->d_secsize = pdg->pdg_secsize;
-	lp->d_nsectors = pdg->pdg_nsectors;
-	lp->d_ntracks = pdg->pdg_ntracks;
-	lp->d_ncylinders = pdg->pdg_ncylinders;
+	lp->d_secperunit = dg->dg_secperunit;
+	lp->d_secsize = dg->dg_secsize;
+	lp->d_nsectors = dg->dg_nsectors;
+	lp->d_ntracks = dg->dg_ntracks;
+	lp->d_ncylinders = dg->dg_ncylinders;
 	lp->d_secpercyl = lp->d_ntracks * lp->d_nsectors;
 
 	strncpy(lp->d_typename, di->di_dkname, sizeof(lp->d_typename));
@@ -626,23 +626,6 @@ dk_makedisklabel(struct dk_intf *di, str
 	lp->d_checksum = dkcksum(lp);
 }
 
-void
-dk_set_geometry(struct dk_intf *di, struct dk_softc *dksc)
-{
-	struct disk_geom *dg = &dksc->sc_dkdev.dk_geom;
-
-	memset(dg, 0, sizeof(*dg));
-
-	dg->dg_secperunit = dksc->sc_size;
-	dg->dg_secsize = dksc->sc_geom.pdg_secsize;
-	dg->dg_nsectors = dksc->sc_geom.pdg_nsectors;
-	dg->dg_ntracks = dksc->sc_geom.pdg_ntracks;
-	dg->dg_ncylinders = dksc->sc_geom.pdg_ncylinders;
-
-	disk_set_info(dksc->sc_dev, &dksc->sc_dkdev, NULL);
-
-}
-
 /* This function is taken from ccd.c:1.76  --rcd */
 
 /*

Index: src/sys/dev/dkvar.h
diff -u src/sys/dev/dkvar.h:1.17 src/sys/dev/dkvar.h:1.18
--- src/sys/dev/dkvar.h:1.17	Tue May 28 20:47:48 2013
+++ src/sys/dev/dkvar.h	Wed May 29 19:25:55 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: dkvar.h,v 1.17 2013/05/29 00:47:48 christos Exp $ */
+/* $NetBSD: dkvar.h,v 1.18 2013/05/29 23:25:55 christos Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -32,14 +32,6 @@
 struct pathbuf; /* from namei.h */
 
 
-/* XXX: GC */
-struct dk_geom {
-	u_int32_t	pdg_secsize;
-	u_int32_t	pdg_nsectors;
-	u_int32_t	pdg_ntracks;
-	u_int32_t	pdg_ncylinders;
-};
-
 /* literally this is not a softc, but is intended to be included in
  * the pseudo-disk's softc and passed to calls in dksubr.c.  It
  * should include the common elements of the pseudo-disk's softc.
@@ -50,8 +42,6 @@ struct dk_geom {
 struct dk_softc {
 	device_t		 sc_dev;
 	u_int32_t		 sc_flags;	/* flags */
-	size_t			 sc_size;	/* size of disk */
-	struct dk_geom		 sc_geom;	/* geometry info */
 #define DK_XNAME_SIZE 8
 	char			 sc_xname[DK_XNAME_SIZE]; /* external name */
 	struct disk		 sc_dkdev;	/* generic disk info */
@@ -113,7 +103,5 @@ int	dk_dump(struct dk_intf *, struct dk_
 void	dk_getdisklabel(struct dk_intf *, struct dk_softc *, dev_t);
 void	dk_getdefaultlabel(struct dk_intf *, struct dk_softc *,
 			   struct disklabel *);
-/* XXX: GC use disk_set_info() */
-void	dk_set_geometry(struct dk_intf *, struct dk_softc *);
 
 int	dk_lookup(struct pathbuf *, struct lwp *, struct vnode **);



CVS commit: src/sys/dev

2013-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 29 23:25:39 UTC 2013

Modified Files:
src/sys/dev: cgd.c

Log Message:
eliminare dk_geom


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/cgd.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/cgd.c
diff -u src/sys/dev/cgd.c:1.79 src/sys/dev/cgd.c:1.80
--- src/sys/dev/cgd.c:1.79	Tue May 28 20:47:48 2013
+++ src/sys/dev/cgd.c	Wed May 29 19:25:39 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.79 2013/05/29 00:47:48 christos Exp $ */
+/* $NetBSD: cgd.c,v 1.80 2013/05/29 23:25:39 christos Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.79 2013/05/29 00:47:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.80 2013/05/29 23:25:39 christos Exp $");
 
 #include 
 #include 
@@ -610,6 +610,7 @@ cgd_ioctl_set(struct cgd_softc *cs, void
 	const char *cp;
 	struct pathbuf *pb;
 	char	 *inbuf;
+	struct dk_softc *dksc = &cs->sc_dksc;
 
 	cp = ci->ci_disk;
 
@@ -687,23 +688,23 @@ cgd_ioctl_set(struct cgd_softc *cs, void
 	}
 	free(inbuf, M_TEMP);
 
-	bufq_alloc(&cs->sc_dksc.sc_bufq, "fcfs", 0);
+	bufq_alloc(&dksc->sc_bufq, "fcfs", 0);
 
 	cs->sc_data = malloc(MAXPHYS, M_DEVBUF, M_WAITOK);
 	cs->sc_data_used = 0;
 
-	cs->sc_dksc.sc_flags |= DKF_INITED;
+	dksc->sc_flags |= DKF_INITED;
 
-	dk_set_geometry(di, &cs->sc_dksc);
+	disk_set_info(dksc->sc_dev, &dksc->sc_dkdev, NULL);
 
 	/* Attach the disk. */
-	disk_attach(&cs->sc_dksc.sc_dkdev);
+	disk_attach(&dksc->sc_dkdev);
 
 	/* Try and read the disklabel. */
-	dk_getdisklabel(di, &cs->sc_dksc, 0 /* XXX ? (cause of PR 41704) */);
+	dk_getdisklabel(di, dksc, 0 /* XXX ? (cause of PR 41704) */);
 
 	/* Discover wedges on this disk. */
-	dkwedge_discover(&cs->sc_dksc.sc_dkdev);
+	dkwedge_discover(&dksc->sc_dkdev);
 
 	return 0;
 
@@ -718,29 +719,27 @@ static int
 cgd_ioctl_clr(struct cgd_softc *cs, struct lwp *l)
 {
 	int	s;
-	struct	dk_softc *dksc;
-
-	dksc = &cs->sc_dksc;
+	struct	dk_softc *dksc = &cs->sc_dksc;
 
 	if ((dksc->sc_flags & DKF_INITED) == 0)
 		return ENXIO;
 
 	/* Delete all of our wedges. */
-	dkwedge_delall(&cs->sc_dksc.sc_dkdev);
+	dkwedge_delall(&dksc->sc_dkdev);
 
 	/* Kill off any queued buffers. */
 	s = splbio();
-	bufq_drain(cs->sc_dksc.sc_bufq);
+	bufq_drain(dksc->sc_bufq);
 	splx(s);
-	bufq_free(cs->sc_dksc.sc_bufq);
+	bufq_free(dksc->sc_bufq);
 
 	(void)vn_close(cs->sc_tvn, FREAD|FWRITE, l->l_cred);
 	cs->sc_cfuncs->cf_destroy(cs->sc_cdata.cf_priv);
 	free(cs->sc_tpath, M_DEVBUF);
 	free(cs->sc_data, M_DEVBUF);
 	cs->sc_data_used = 0;
-	cs->sc_dksc.sc_flags &= ~DKF_INITED;
-	disk_detach(&cs->sc_dksc.sc_dkdev);
+	dksc->sc_flags &= ~DKF_INITED;
+	disk_detach(&dksc->sc_dkdev);
 
 	return 0;
 }
@@ -751,6 +750,7 @@ cgd_ioctl_get(dev_t dev, void *data, str
 	struct cgd_softc *cs;
 	struct cgd_user *cgu;
 	int unit;
+	struct	dk_softc *dksc = &cs->sc_dksc;
 
 	unit = CGDUNIT(dev);
 	cgu = (struct cgd_user *)data;
@@ -765,7 +765,7 @@ cgd_ioctl_get(dev_t dev, void *data, str
 		return EINVAL;	/* XXX: should this be ENXIO? */
 
 	cs = device_lookup_private(&cgd_cd, unit);
-	if (cs == NULL || (cs->sc_dksc.sc_flags & DKF_INITED) == 0) {
+	if (cs == NULL || (dksc->sc_flags & DKF_INITED) == 0) {
 		cgu->cgu_dev = 0;
 		cgu->cgu_alg[0] = '\0';
 		cgu->cgu_blocksize = 0;
@@ -787,14 +787,14 @@ static int
 cgdinit(struct cgd_softc *cs, const char *cpath, struct vnode *vp,
 	struct lwp *l)
 {
-	struct	dk_geom *pdg;
+	struct	disk_geom *dg;
 	struct	vattr va;
 	int	ret;
 	char	*tmppath;
 	uint64_t psize;
 	unsigned secsize;
+	struct dk_softc *dksc = &cs->sc_dksc;
 
-	cs->sc_dksc.sc_size = 0;
 	cs->sc_tvn = vp;
 	cs->sc_tpath = NULL;
 
@@ -821,19 +821,20 @@ cgdinit(struct cgd_softc *cs, const char
 		goto bail;
 	}
 
-	cs->sc_dksc.sc_size = psize;
-
 	/*
 	 * XXX here we should probe the underlying device.  If we
 	 * are accessing a partition of type RAW_PART, then
 	 * we should populate our initial geometry with the
 	 * geometry that we discover from the device.
 	 */
-	pdg = &cs->sc_dksc.sc_geom;
-	pdg->pdg_secsize = DEV_BSIZE;
-	pdg->pdg_ntracks = 1;
-	pdg->pdg_nsectors = 1024 * (1024 / pdg->pdg_secsize);
-	pdg->pdg_ncylinders = cs->sc_dksc.sc_size / pdg->pdg_nsectors;
+	dg = &dksc->sc_dkdev.dk_geom;
+	memset(dg, 0, sizeof(*dg));
+	dg->dg_secperunit = psize;
+	// XXX: Inherit?
+	dg->dg_secsize = DEV_BSIZE;
+	dg->dg_ntracks = 1;
+	dg->dg_nsectors = 1024 * (1024 / dg->dg_secsize);
+	dg->dg_ncylinders = dg->dg_secperunit / dg->dg_nsectors;
 
 bail:
 	free(tmppath, M_TEMP);



CVS commit: src/sys/arch/xen/xen

2013-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 29 23:11:56 UTC 2013

Modified Files:
src/sys/arch/xen/xen: xbd_xenbus.c

Log Message:
get dir of dk_geom.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/xen/xen/xbd_xenbus.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/xen/xen/xbd_xenbus.c
diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.58 src/sys/arch/xen/xen/xbd_xenbus.c:1.59
--- src/sys/arch/xen/xen/xbd_xenbus.c:1.58	Tue May 28 20:47:48 2013
+++ src/sys/arch/xen/xen/xbd_xenbus.c	Wed May 29 19:11:56 2013
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbd_xenbus.c,v 1.58 2013/05/29 00:47:48 christos Exp $  */
+/*  $NetBSD: xbd_xenbus.c,v 1.59 2013/05/29 23:11:56 christos Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.58 2013/05/29 00:47:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.59 2013/05/29 23:11:56 christos Exp $");
 
 #include "opt_xen.h"
 
@@ -512,7 +512,7 @@ abort_transaction:
 static void xbd_backend_changed(void *arg, XenbusState new_state)
 {
 	struct xbd_xenbus_softc *sc = device_private((device_t)arg);
-	struct dk_geom *pdg;
+	struct disk_geom *dg;
 
 	char buf[9];
 	int s;
@@ -553,12 +553,15 @@ static void xbd_backend_changed(void *ar
 
 		sc->sc_xbdsize =
 		sc->sc_sectors * (uint64_t)sc->sc_secsize / DEV_BSIZE;
-		sc->sc_dksc.sc_size = sc->sc_xbdsize;
-		pdg = &sc->sc_dksc.sc_geom;
-		pdg->pdg_secsize = DEV_BSIZE;
-		pdg->pdg_ntracks = 1;
-		pdg->pdg_nsectors = 1024 * (1024 / pdg->pdg_secsize);
-		pdg->pdg_ncylinders = sc->sc_dksc.sc_size / pdg->pdg_nsectors;
+		dg = &sc->sc_dksc.sc_dkdev.dk_geom;
+		memset(dg, 0, sizeof(*dg));	
+
+		dg->dg_secperunit = sc->sc_xbdsize;
+		dg->dg_secsize = DEV_BSIZE;
+		dg->dg_ntracks = 1;
+		// XXX: Ok to hard-code DEV_BSIZE?
+		dg->dg_nsectors = 1024 * (1024 / dg->dg_secsize);
+		dg->dg_ncylinders = dg->dg_secperunit / dg->dg_nsectors;
 
 		bufq_alloc(&sc->sc_dksc.sc_bufq, "fcfs", 0);
 		sc->sc_dksc.sc_flags |= DKF_INITED;
@@ -571,19 +574,10 @@ static void xbd_backend_changed(void *ar
 		format_bytes(buf, sizeof(buf), sc->sc_sectors * sc->sc_secsize);
 		aprint_verbose_dev(sc->sc_dksc.sc_dev,
 "%s, %d bytes/sect x %" PRIu64 " sectors\n",
-buf, (int)pdg->pdg_secsize, sc->sc_xbdsize);
+buf, (int)dg->dg_secsize, sc->sc_xbdsize);
 		/* Discover wedges on this disk. */
 		dkwedge_discover(&sc->sc_dksc.sc_dkdev);
 
-		struct disk_geom *dg = &sc->sc_dksc.sc_dkdev.dk_geom;
-		memset(dg, 0, sizeof(*dg));	
-
-		dg->dg_secperunit = sc->sc_dksc.sc_size;
-		dg->dg_secsize = pdg->pdg_secsize;
-		dg->dg_nsectors = pdg->pdg_nsectors;
-		dg->dg_ntracks = pdg->pdg_ntracks;
-		dg->dg_ncylinders = pdg->pdg_ncylinders;
-
 		disk_set_info(sc->sc_dksc.sc_dev, &sc->sc_dksc.sc_dkdev, NULL);
 
 		/* the disk should be working now */



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

2013-05-29 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed May 29 22:52:19 UTC 2013

Added Files:
src/sys/arch/evbarm/conf: ARMADAXP files.armadaxp mk.armadaxp
std.armadaxp

Log Message:
Add build configuration for Armada XP.

Obtained from Marvell, Semihalf.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/ARMADAXP \
src/sys/arch/evbarm/conf/files.armadaxp \
src/sys/arch/evbarm/conf/mk.armadaxp \
src/sys/arch/evbarm/conf/std.armadaxp

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/conf/ARMADAXP
diff -u /dev/null src/sys/arch/evbarm/conf/ARMADAXP:1.1
--- /dev/null	Wed May 29 22:52:19 2013
+++ src/sys/arch/evbarm/conf/ARMADAXP	Wed May 29 22:52:19 2013
@@ -0,0 +1,307 @@
+#
+#	$NetBSD: ARMADAXP,v 1.1 2013/05/29 22:52:19 rkujawa Exp $
+#
+#	ARMADA XP DEV BOARD
+#
+
+include		"arch/evbarm/conf/std.armadaxp"
+
+# estimated number of users
+
+maxusers	32
+
+# Standard system options
+
+options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
+#options 	NTP		# NTP phase/frequency locked loop
+
+# CPU options
+options 	CPU_PJ4B
+
+# Architecture options
+options 	ARMADAXP
+options 	L2CACHE_ENABLE
+#options 	AURORA_IO_CACHE_COHERENCY
+options 	AURORA_L2_PT_WALK
+
+#options	VERBOSE_INIT_ARM
+
+# File systems
+file-system	FFS		# UFS
+#file-system	LFS		# log-structured file system
+file-system	MFS		# memory file system
+file-system	NFS		# Network file system
+#file-system	ADOSFS		# AmigaDOS-compatible file system
+#file-system	EXT2FS		# second extended file system (linux)
+#file-system	CD9660		# ISO 9660 + Rock Ridge file system
+file-system	MSDOSFS		# MS-DOS file system
+#file-system	FDESC		# /dev/fd
+#file-system	KERNFS		# /kern
+#file-system	NULLFS		# loopback file system
+#file-system	PROCFS		# /proc
+#file-system	UMAPFS		# NULLFS + uid and gid remapping
+#file-system	UNION		# union file system
+file-system	TMPFS		# memory file system
+file-system	PTYFS		# /dev/pts/N support
+file-system	PUFFS		# Pass-to-Userspace Framework File System
+
+# File system options
+#options 	QUOTA		# legacy UFS quotas
+#options 	QUOTA2		# new, in-filesystem UFS quotas
+#options 	FFS_EI		# FFS Endian Independent support
+#options 	NFSSERVER
+options 	WAPBL		# File system journaling support
+#options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
+
+# Networking options
+options 	GATEWAY		# packet forwarding
+options 	INET		# IP + ICMP + TCP + UDP
+options 	INET6		# IPV6
+options 	IPSEC		# IP security
+options 	IPSEC_ESP	# IP security (encryption part; define w/ IPSEC)
+options 	IPSEC_NAT_T	# IPsec NAT traversal (NAT-T)
+options 	IPSEC_DEBUG	# debug for IP security
+options 	MROUTING	# IP multicast routing
+options 	PIM		# Protocol Independent Multicast
+options 	ISO,TPIP	# OSI
+options 	EON		# OSI tunneling over IP
+options 	NETATALK	# AppleTalk networking
+options 	PFIL_HOOKS	# pfil(9) packet filter hooks
+options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
+options 	PPP_DEFLATE	# Deflate compression support for PPP
+options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
+options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG
+options 	NFS_BOOT_DHCP
+
+#options 	NFS_BOOT_BOOTP
+#options 	NFS_BOOT_DHCP
+#options 	NFS_BOOT_BOOTSTATIC
+#options 	NFS_BOOTSTATIC_MYIP="\"192.168.1.4\""
+#options 	NFS_BOOTSTATIC_GWIP="\"192.168.1.1\""
+#options 	NFS_BOOTSTATIC_MASK="\"255.255.255.0\""
+#options 	NFS_BOOTSTATIC_SERVADDR="\"192.168.1.1\""
+#options 	NFS_BOOTSTATIC_SERVER="\"192.168.1.1:/nfs/sdp2430\""
+
+#options 	NFS_BOOT_RWSIZE=1024
+
+# Compatibility options
+#options 	COMPAT_43	# 4.3BSD compatibility.
+options 	COMPAT_50	# NetBSD 5.0 compatibility.
+#options 	COMPAT_40	# NetBSD 4.0 compatibility.
+#options 	COMPAT_30	# NetBSD 3.0 compatibility.
+#options 	COMPAT_20	# NetBSD 2.0 compatibility.
+#options 	COMPAT_16	# NetBSD 1.6 compatibility.
+#options 	COMPAT_15	# NetBSD 1.5 compatibility.
+#options 	COMPAT_14	# NetBSD 1.4 compatibility.
+#options 	COMPAT_13	# NetBSD 1.3 compatibility.
+#options 	COMPAT_12	# NetBSD 1.2 compatibility.
+#options 	COMPAT_11	# NetBSD 1.1 compatibility.
+#options 	COMPAT_10	# NetBSD 1.0 compatibility.
+#options 	COMPAT_09	# NetBSD 0.9 compatibility.
+#options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
+options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
+
+# Shared memory options
+options 	SYSVMSG		# System V-like message queues
+options 	SYSVSEM		# System V-like semaphores
+#options 	SEMMNI=10	# number of semaphore identifiers
+#options 	SEMMNS=60	# number of semaphores in system
+#options 	SEMUME=10	# max number of undo entries per process
+#options 	SEMMNU=30	# number of undo structures in system
+options 	SYSVSHM		# System V-like memory sharing
+
+# Device options
+#options 	MEMORY_DISK_HOOKS		# boottime setup of ramdisk
+#options 	MEMORY_DISK_ROOT_SIZE=8192	# Size in blocks
+#opt

CVS commit: src/sys/arch/arm

2013-05-29 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed May 29 22:35:34 UTC 2013

Modified Files:
src/sys/arch/arm/marvell: files.marvell
src/sys/arch/arm/pic: files.pic
Added Files:
src/sys/arch/arm/marvell: armadaxp.c
src/sys/arch/arm/pic: armadaxp_splfuncs.c

Log Message:
Add support for Armada XP PIC.

Obtained from Marvell, Semihalf.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/marvell/armadaxp.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/marvell/files.marvell
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/pic/armadaxp_splfuncs.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/pic/files.pic

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/marvell/files.marvell
diff -u src/sys/arch/arm/marvell/files.marvell:1.7 src/sys/arch/arm/marvell/files.marvell:1.8
--- src/sys/arch/arm/marvell/files.marvell:1.7	Wed Aug  1 10:38:41 2012
+++ src/sys/arch/arm/marvell/files.marvell	Wed May 29 22:35:34 2013
@@ -1,4 +1,4 @@
-#   $NetBSD: files.marvell,v 1.7 2012/08/01 10:38:41 kiyohara Exp $
+#   $NetBSD: files.marvell,v 1.8 2013/05/29 22:35:34 rkujawa Exp $
 #
 # Configuration info for Marvell System on Chip support
 #
@@ -15,6 +15,7 @@ file	arch/arm/arm32/irq_dispatch.S
 
 defflag opt_mvsoc.hORION KIRKWOOD MV78XX0
 file	arch/arm/marvell/mvsoc_intr.c
+file	arch/arm/marvell/armadaxp.c		armadaxp
 file	arch/arm/marvell/orion.c		orion
 file	arch/arm/marvell/kirkwood.c		kirkwood
 #file	arch/arm/marvell/mv78xx0.c		mv78xx0

Index: src/sys/arch/arm/pic/files.pic
diff -u src/sys/arch/arm/pic/files.pic:1.4 src/sys/arch/arm/pic/files.pic:1.5
--- src/sys/arch/arm/pic/files.pic:1.4	Sat Sep  1 00:00:42 2012
+++ src/sys/arch/arm/pic/files.pic	Wed May 29 22:35:34 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.pic,v 1.4 2012/09/01 00:00:42 matt Exp $
+#	$NetBSD: files.pic,v 1.5 2013/05/29 22:35:34 rkujawa Exp $
 #
 # Configuration info for the common PIC code.
 #
@@ -7,5 +7,6 @@ define	pic_splfuncs
 defflag opt_arm_intr_impl.h		__HAVE_PIC_SET_PRIORITY
 defflag opt_arm_intr_impl.h		__HAVE_PIC_SOFTINT
 
-file	arch/arm/pic/pic.c		pic
-file	arch/arm/pic/pic_splfuncs.c	pic & pic_splfuncs
+file	arch/arm/pic/pic.c			pic
+file	arch/arm/pic/pic_splfuncs.c		pic & pic_splfuncs & !armadaxp
+file	arch/arm/pic/armadaxp_splfuncs.c	pic & pic_splfuncs & armadaxp

Added files:

Index: src/sys/arch/arm/marvell/armadaxp.c
diff -u /dev/null src/sys/arch/arm/marvell/armadaxp.c:1.1
--- /dev/null	Wed May 29 22:35:34 2013
+++ src/sys/arch/arm/marvell/armadaxp.c	Wed May 29 22:35:34 2013
@@ -0,0 +1,399 @@
+/***
+Copyright (C) Marvell International Ltd. and its affiliates
+
+Developed by Semihalf
+
+
+Marvell BSD License
+
+If you received this File from Marvell, you may opt to use, redistribute and/or
+modify this File under the following licensing terms.
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+*   Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+*   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.
+
+*   Neither the name of Marvell nor the names of its contributors may be
+used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+***/
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.1 2013/05/29 22:35:34 rkujawa Exp $");
+
+#define _INTR_PRIVATE
+
+#include "opt_mvsoc.h"
+
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#define EXTRACT_CPU_FREQ_FIELD(sar)	(((0x

CVS commit: src/sys/arch/sparc/dev

2013-05-29 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed May 29 22:26:39 UTC 2013

Modified Files:
src/sys/arch/sparc/dev: cgfourteen.c cgfourteenvar.h

Log Message:
allow userland to map SX registers and IO space


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/sparc/dev/cgfourteen.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sparc/dev/cgfourteenvar.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/sparc/dev/cgfourteen.c
diff -u src/sys/arch/sparc/dev/cgfourteen.c:1.72 src/sys/arch/sparc/dev/cgfourteen.c:1.73
--- src/sys/arch/sparc/dev/cgfourteen.c:1.72	Tue Feb 12 22:24:47 2013
+++ src/sys/arch/sparc/dev/cgfourteen.c	Wed May 29 22:26:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgfourteen.c,v 1.72 2013/02/12 22:24:47 macallan Exp $ */
+/*	$NetBSD: cgfourteen.c,v 1.73 2013/05/29 22:26:39 macallan Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -554,8 +554,26 @@ cgfourteenmmap(dev_t dev, off_t off, int
 		   off < CG14_R32_VOFF + (sc->sc_vramsize >> 2)) {
 		offset = sc->sc_fbaddr + CG14_FB_PR32;
 		off -= CG14_R32_VOFF;
+#if NSX > 0
+	} else if (sc->sc_sx == NULL) {
+		return -1;
+	} else if (off >= CG14_SXREG_VOFF &&
+		   off < (CG14_SXREG_VOFF + 0x400)) {
+		return (bus_space_mmap(sc->sc_sx->sc_tag, sc->sc_sx->sc_uregs,
+			0, prot, BUS_SPACE_MAP_LINEAR));
+	} else if (off >= CG14_SXIO_VOFF &&
+		   off < (CG14_SXIO_VOFF + 0x03ff)) {
+		return (bus_space_mmap(sc->sc_sx->sc_tag, 0x8LL,
+			sc->sc_fb_paddr, prot, BUS_SPACE_MAP_LINEAR));
+#endif
 	} else
 		return -1;
+	/*
+	 * for convenience we also map the SX ranges here:
+	 * - one page userland registers
+	 * - CG14-sized IO space at 0x8 ( not a typo, it's above 4GB )
+	 * bus_space_mmap() should accept 64bit bus_addr_t's by the look of it
+	 */
 	return (bus_space_mmap(sc->sc_bustag, offset, off, prot,
 		BUS_SPACE_MAP_LINEAR));
 }
@@ -1203,6 +1221,7 @@ cg14_rectfill(struct cgfourteen_softc *s
 	 * until we're 32bit aligned, then do the rest in 32bit
 	 * mode. Assumes that stride is always a multiple of 4. 
 	 */ 
+	/* TODO: use 32bit writes with byte mask instead */
 	pre = addr & 3;
 	if (pre != 0) pre = 4 - pre;
 	for (line = 0; line < he; line++) {
@@ -1241,6 +1260,7 @@ cg14_invert(struct cgfourteen_softc *sc,
 	 * until we're 32bit aligned, then do the rest in 32bit
 	 * mode. Assumes that stride is always a multiple of 4. 
 	 */ 
+	/* TODO: use 32bit writes with byte mask instead */
 	pre = addr & 3;
 	if (pre != 0) pre = 4 - pre;
 	for (line = 0; line < he; line++) {
@@ -1356,6 +1376,7 @@ cg14_bitblt(void *cookie, int xs, int ys
 		}
 	} else {
 		/* unaligned, have to use byte mode */
+		/* funnel shifter & byte mask trickery? */
 		for (line = 0; line < he; line++) {
 			sptr = saddr;
 			dptr = daddr;

Index: src/sys/arch/sparc/dev/cgfourteenvar.h
diff -u src/sys/arch/sparc/dev/cgfourteenvar.h:1.15 src/sys/arch/sparc/dev/cgfourteenvar.h:1.16
--- src/sys/arch/sparc/dev/cgfourteenvar.h:1.15	Wed Feb  6 04:10:54 2013
+++ src/sys/arch/sparc/dev/cgfourteenvar.h	Wed May 29 22:26:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgfourteenvar.h,v 1.15 2013/02/06 04:10:54 macallan Exp $ */
+/*	$NetBSD: cgfourteenvar.h,v 1.16 2013/05/29 22:26:39 macallan Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -120,6 +120,7 @@ struct cgfourteen_softc {
 #define CG14_CLUT1_VOFF		0x4000	/* Color Look Up Table */
 #define CG14_CLUT2_VOFF		0x5000	/* Color Look Up Table */
 #define CG14_CLUT3_VOFF		0x6000	/* Color Look Up Table */
+#define CG14_SXREG_VOFF		0x0001	/* SX userspace registers */
 #define CG14_DIRECT_VOFF	0x1000
 #define CG14_CTLREG_VOFF	0x2000
 #define CG14_CURSOR_VOFF	0x3000
@@ -132,3 +133,4 @@ struct cgfourteen_softc {
 #define CG14_B32_VOFF		0xa000
 #define CG14_G32_VOFF		0xb000
 #define CG14_R32_VOFF		0xc000
+#define CG14_SXIO_VOFF		0xd000



CVS commit: src/sys/arch/sparc/dev

2013-05-29 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed May 29 22:25:23 UTC 2013

Modified Files:
src/sys/arch/sparc/dev: sxreg.h

Log Message:
fix a typo


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sparc/dev/sxreg.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/sparc/dev/sxreg.h
diff -u src/sys/arch/sparc/dev/sxreg.h:1.3 src/sys/arch/sparc/dev/sxreg.h:1.4
--- src/sys/arch/sparc/dev/sxreg.h:1.3	Wed Feb  6 20:39:03 2013
+++ src/sys/arch/sparc/dev/sxreg.h	Wed May 29 22:25:23 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: sxreg.h,v 1.3 2013/02/06 20:39:03 macallan Exp $	*/
+/*	$NetBSD: sxreg.h,v 1.4 2013/05/29 22:25:23 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 
 /*
  * registers are repeated at 0x1000 with certain parts read only
- * ( like the PAGE_BOUND registers ) which userlanf has no business writing to
+ * ( like the PAGE_BOUND registers ) which userland has no business writing to
  */
 
 /* SX_CONTROL_STATUS */



CVS commit: src/doc

2013-05-29 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Wed May 29 21:26:44 UTC 2013

Modified Files:
src/doc: Makefile

Log Message:
Use TOOL_MANDOC_ASCII instead of TOOL_GROFF to format BUILDING.mdoc,
and use TOOL_SED to flatten backspace sequences.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/doc/Makefile

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

Modified files:

Index: src/doc/Makefile
diff -u src/doc/Makefile:1.1 src/doc/Makefile:1.2
--- src/doc/Makefile:1.1	Fri Sep  9 14:23:38 2011
+++ src/doc/Makefile	Wed May 29 21:26:44 2013
@@ -1,8 +1,9 @@
-#	$NetBSD: Makefile,v 1.1 2011/09/09 14:23:38 apb Exp $
+#	$NetBSD: Makefile,v 1.2 2013/05/29 21:26:44 apb Exp $
 
 .include 
 
 regen: .PHONY regen-BUILDING
 regen-BUILDING: .PHONY
-	${TOOL_GROFF} -mdoc -Tascii -P-bou ${.CURDIR}/BUILDING.mdoc \
+	${TOOL_MANDOC_ASCII} ${.CURDIR}/BUILDING.mdoc \
+		| ${TOOL_SED} -e "s,.$$(printf '\b'),,g" \
 		>${.CURDIR}/../BUILDING



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

2013-05-29 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed May 29 20:47:14 UTC 2013

Modified Files:
src/sys/arch/arm/marvell: mvsoc.c mvsoc_intr.c mvsoc_space.c mvsocreg.h
mvsocvar.h

Log Message:
Add support for mvsoc-based Armada XP peripherals.

Obtained from Marvell, Semihalf.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/marvell/mvsoc.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/marvell/mvsoc_intr.c \
src/sys/arch/arm/marvell/mvsoc_space.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/marvell/mvsocreg.h \
src/sys/arch/arm/marvell/mvsocvar.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/marvell/mvsoc.c
diff -u src/sys/arch/arm/marvell/mvsoc.c:1.10 src/sys/arch/arm/marvell/mvsoc.c:1.11
--- src/sys/arch/arm/marvell/mvsoc.c:1.10	Fri Oct 19 06:14:44 2012
+++ src/sys/arch/arm/marvell/mvsoc.c	Wed May 29 20:47:14 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsoc.c,v 1.10 2012/10/19 06:14:44 msaitoh Exp $	*/
+/*	$NetBSD: mvsoc.c,v 1.11 2013/05/29 20:47:14 rkujawa Exp $	*/
 /*
  * Copyright (c) 2007, 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mvsoc.c,v 1.10 2012/10/19 06:14:44 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsoc.c,v 1.11 2013/05/29 20:47:14 rkujawa Exp $");
 
 #include "opt_cputypes.h"
 #include "opt_mvsoc.h"
@@ -46,6 +46,11 @@ __KERNEL_RCSID(0, "$NetBSD: mvsoc.c,v 1.
 #include 
 #include 
 
+#if defined(ARMADAXP)
+#include 
+#include 
+#endif
+
 #include "locators.h"
 
 #ifdef MVSOC_CONSOLE_EARLY
@@ -64,6 +69,9 @@ uint32_t mvPclk, mvSysclk, mvTclk = 0;
 int nwindow = 0, nremap = 0;
 static vaddr_t regbase = 0x, dsc_base, pex_base;
 vaddr_t mlmb_base;
+#if defined(ARMADAXP)
+vaddr_t misc_base;
+#endif
 
 void (*mvsoc_intr_init)(void);
 
@@ -175,8 +183,38 @@ static struct {
 	{ KIRKWOOD_TAG_CRYPT,
 	  KIRKWOOD_ATTR_CRYPT,		KIRKWOOD_UNITID_CRYPT },
 #endif
+#if defined(ARMADAXP)
+	{ ARMADAXP_TAG_PEX00_MEM,
+	  ARMADAXP_ATTR_PEXx0_MEM,	ARMADAXP_UNITID_PEX0 },
+	{ ARMADAXP_TAG_PEX00_IO,
+	  ARMADAXP_ATTR_PEXx0_IO,	ARMADAXP_UNITID_PEX0 },
+	{ ARMADAXP_TAG_PEX01_MEM,
+	  ARMADAXP_ATTR_PEXx1_MEM,	ARMADAXP_UNITID_PEX0 },
+	{ ARMADAXP_TAG_PEX01_IO,
+	  ARMADAXP_ATTR_PEXx1_IO,	ARMADAXP_UNITID_PEX0 },
+	{ ARMADAXP_TAG_PEX02_MEM,
+	  ARMADAXP_ATTR_PEXx2_MEM,	ARMADAXP_UNITID_PEX0 },
+	{ ARMADAXP_TAG_PEX02_IO,
+	  ARMADAXP_ATTR_PEXx2_IO,	ARMADAXP_UNITID_PEX0 },
+	{ ARMADAXP_TAG_PEX03_MEM,
+	  ARMADAXP_ATTR_PEXx3_MEM,	ARMADAXP_UNITID_PEX0 },
+	{ ARMADAXP_TAG_PEX03_IO,
+	  ARMADAXP_ATTR_PEXx3_IO,	ARMADAXP_UNITID_PEX0 },
+	{ ARMADAXP_TAG_PEX2_MEM,
+	  ARMADAXP_ATTR_PEX2_MEM,	ARMADAXP_UNITID_PEX2 },
+	{ ARMADAXP_TAG_PEX2_IO,
+	  ARMADAXP_ATTR_PEX2_IO,	ARMADAXP_UNITID_PEX2 },
+	{ ARMADAXP_TAG_PEX3_MEM,
+	  ARMADAXP_ATTR_PEX3_MEM,	ARMADAXP_UNITID_PEX3 },
+	{ ARMADAXP_TAG_PEX3_IO,
+	  ARMADAXP_ATTR_PEX3_IO,	ARMADAXP_UNITID_PEX3 },
+#endif
 };
 
+#if defined(ARMADAXP)
+#undef ARMADAXP
+#define ARMADAXP(m)	MARVELL_ARMADAXP_ ## m
+#endif
 #if defined(ORION)
 #define ORION_1(m)	MARVELL_ORION_1_ ## m
 #define ORION_2(m)	MARVELL_ORION_2_ ## m
@@ -242,6 +280,15 @@ static struct {
 	{ MV78XX0(MV78100),	2, "MV78100",	"A1",  "Discovery Innovation" },
 	{ MV78XX0(MV78200),	1, "MV78200",	"A0",  "Discovery Innovation" },
 #endif
+
+#if defined(ARMADAXP)
+	{ ARMADAXP(MV78130),	1, "MV78130",	"A0",  "Armada XP" },
+	{ ARMADAXP(MV78160),	1, "MV78160",	"A0",  "Armada XP" },
+	{ ARMADAXP(MV78230),	1, "MV78260",	"A0",  "Armada XP" },
+	{ ARMADAXP(MV78260),	1, "MV78260",	"A0",  "Armada XP" },
+	{ ARMADAXP(MV78460),	1, "MV78460",	"A0",  "Armada XP" },
+	{ ARMADAXP(MV78460),	2, "MV78460",	"B0",  "Armada XP" },
+#endif
 };
 
 #define OFFSET_DEFAULT	MVA_OFFSET_DEFAULT
@@ -445,6 +492,83 @@ static const struct mvsoc_periph {
 { MV78XX0(MV78200),	"gttwsi",0,MVSOC_TWSI_BASE,	MV78XX0_IRQ_TWSI },
   :
 #endif
+
+#if defined(ARMADAXP)
+{ ARMADAXP(MV78130), "mvsoctmr",0,MVSOC_TMR_BASE,	ARMADAXP_IRQ_TIMER0 },
+{ ARMADAXP(MV78130), "com",	0, MVSOC_COM0_BASE,	ARMADAXP_IRQ_UART0INT },
+{ ARMADAXP(MV78130), "com",	1, MVSOC_COM1_BASE,	ARMADAXP_IRQ_UART1INT },
+{ ARMADAXP(MV78130), "com",	2, ARMADAXP_COM2_BASE,	ARMADAXP_IRQ_UART2INT },
+{ ARMADAXP(MV78130), "com",	3, ARMADAXP_COM3_BASE,	ARMADAXP_IRQ_UART3INT },
+{ ARMADAXP(MV78130), "mvsocrtc",0, ARMADAXP_RTC_BASE, ARMADAXP_IRQ_RTCINT },
+{ ARMADAXP(MV78130), "ehci", 0, ARMADAXP_USB0_BASE,	ARMADAXP_IRQ_USB0INT },
+{ ARMADAXP(MV78130), "ehci", 1, ARMADAXP_USB1_BASE,	ARMADAXP_IRQ_USB1INT },
+{ ARMADAXP(MV78130), "mvpex", 0, ARMADAXP_PEX00_BASE, ARMADAXP_IRQ_PEX00},
+{ ARMADAXP(MV78130), "mvpex", 1, ARMADAXP_PEX01_BASE, ARMADAXP_IRQ_PEX01},
+{ ARMADAXP(MV78130), "mvpex", 2, ARMADAXP_PEX02_BASE, ARMADAXP_IRQ_PEX02},
+{ ARMADAXP(MV78130), "mvpex", 3, ARMADAXP_PEX03_BASE, ARMADAXP_IRQ_PEX03},
+
+{ ARMADAXP(MV78160), "

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

2013-05-29 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed May 29 19:55:56 UTC 2013

Added Files:
src/sys/arch/evbarm/armadaxp: armadaxp_machdep.c armadaxp_start.S

Log Message:
Import cleaned up MD parts of Armada XP port.

Compared to what was posted to port-arm, the main difference is that now it uses
arm32_kvminit, arm32_boot, arm32_reboot as advised by nick@.

Obtained from Marvell, Semihalf.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c \
src/sys/arch/evbarm/armadaxp/armadaxp_start.S

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/armadaxp/armadaxp_machdep.c
diff -u /dev/null src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c:1.1
--- /dev/null	Wed May 29 19:55:56 2013
+++ src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c	Wed May 29 19:55:56 2013
@@ -0,0 +1,588 @@
+/***
+Copyright (C) Marvell International Ltd. and its affiliates
+
+Developed by Semihalf
+
+
+Marvell BSD License
+
+If you received this File from Marvell, you may opt to use, redistribute and/or
+modify this File under the following licensing terms.
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+*   Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+*   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.
+
+*   Neither the name of Marvell nor the names of its contributors may be
+used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+***/
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: armadaxp_machdep.c,v 1.1 2013/05/29 19:55:56 rkujawa Exp $");
+
+#include "opt_machdep.h"
+#include "opt_mvsoc.h"
+#include "opt_evbarm_boardtype.h"
+#include "opt_com.h"
+#include "opt_ddb.h"
+#include "opt_kgdb.h"
+#include "opt_pci.h"
+#include "opt_ipkdb.h"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#ifdef KGDB
+#include 
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include "mvpex.h"
+#include "com.h"
+#if NCOM > 0
+#include 
+#include 
+#endif
+
+/*
+ * Address to call from cpu_reset() to reset the machine.
+ * This is machine architecture dependent as it varies depending
+ * on where the ROM appears when you turn the MMU off.
+ */
+
+
+/* Define various stack sizes in pages */
+#define IRQ_STACK_SIZE	1
+#define ABT_STACK_SIZE	1
+#ifdef IPKDB
+#define UND_STACK_SIZE	2
+#else
+#define UND_STACK_SIZE	1
+#endif
+
+BootConfig bootconfig;		/* Boot config storage */
+char *boot_args = NULL;
+char *boot_file = NULL;
+
+extern int KERNEL_BASE_phys[];
+
+/*extern char KERNEL_BASE_phys[];*/
+extern char etext[], __data_start[], _edata[], __bss_start[], __bss_end__[];
+extern char _end[];
+
+/*
+ * Put some bogus settings of the MEMSTART and MEMSIZE
+ * if they are not defined in kernel configuration file.
+ */
+#ifndef MEMSTART
+#define MEMSTART 0xUL
+#endif
+#ifndef MEMSIZE
+#define MEMSIZE 0x4000UL
+#endif
+
+#ifndef STARTUP_PAGETABLE_ADDR
+#define	STARTUP_PAGETABLE_ADDR 0xUL
+#endif
+
+/* Physical offset of the kernel from MEMSTART */
+#define KERNEL_OFFSET		(paddr_t)&KERNEL_BASE_phys
+/* Kernel base virtual address */
+#define	KERNEL_TEXT_BASE	(KERNEL_BASE + KERNEL_OFFSET)
+
+#define	KERNEL_VM_BASE		(KERNEL_BASE + 0x0100)
+#define KERNEL_VM_SIZE		0

CVS commit: src/sys/sys

2013-05-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May 29 19:02:30 UTC 2013

Modified Files:
src/sys/sys: cdefs.h

Log Message:
While visibility "protected" is nominaly supported by gcc 4.0 and 4.1
it does not actually work - the compiler does not emmit ".protected"
asm statements for used references to protected symbols, which then
causes the linker to fail and/or produce unloadable libraries.
This recently happened to port vax by the locale changes.

Backporting a fix (ASM_OUTPUT_EXTERNAL in gcc target config) is not
feasible.

So: define __dso_protected only starting with gcc 4.2.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/sys/cdefs.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/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.106 src/sys/sys/cdefs.h:1.107
--- src/sys/sys/cdefs.h:1.106	Tue Apr 30 14:45:15 2013
+++ src/sys/sys/cdefs.h	Wed May 29 19:02:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.106 2013/04/30 14:45:15 joerg Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.107 2013/05/29 19:02:30 martin Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -281,7 +281,6 @@
 #if __GNUC_PREREQ__(4, 0)
 #  define __dso_public	__attribute__((__visibility__("default")))
 #  define __dso_hidden	__attribute__((__visibility__("hidden")))
-#  define __dso_protected	__attribute__((__visibility__("protected")))
 #  define __BEGIN_PUBLIC_DECLS	\
 	_Pragma("GCC visibility push(default)") __BEGIN_EXTERN_C
 #  define __END_PUBLIC_DECLS	__END_EXTERN_C _Pragma("GCC visibility pop")
@@ -290,13 +289,17 @@
 #  define __END_HIDDEN_DECLS	__END_EXTERN_C _Pragma("GCC visibility pop")
 #else
 #  define __dso_public
-#  define __dso_protected
 #  define __dso_hidden
 #  define __BEGIN_PUBLIC_DECLS	__BEGIN_EXTERN_C
 #  define __END_PUBLIC_DECLS	__END_EXTERN_C
 #  define __BEGIN_HIDDEN_DECLS	__BEGIN_EXTERN_C
 #  define __END_HIDDEN_DECLS	__END_EXTERN_C
 #endif
+#if __GNUC_PREREQ__(4, 2)
+#  define __dso_protected	__attribute__((__visibility__("protected")))
+#else
+#  define __dso_protected
+#endif
 
 #define	__BEGIN_DECLS		__BEGIN_PUBLIC_DECLS
 #define	__END_DECLS		__END_PUBLIC_DECLS



CVS commit: src/sys/sys

2013-05-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May 29 15:22:19 UTC 2013

Modified Files:
src/sys/sys: disk.h

Log Message:
Add disk_set_info() prototype


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/sys/disk.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/sys/disk.h
diff -u src/sys/sys/disk.h:1.58 src/sys/sys/disk.h:1.59
--- src/sys/sys/disk.h:1.58	Wed May 29 15:11:11 2013
+++ src/sys/sys/disk.h	Wed May 29 15:22:19 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: disk.h,v 1.58 2013/05/29 15:11:11 martin Exp $	*/
+/*	$NetBSD: disk.h,v 1.59 2013/05/29 15:22:19 martin Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc.
@@ -524,6 +524,7 @@ bool	disk_isbusy(struct disk *);
 void	disk_blocksize(struct disk *, int);
 struct disk *disk_find(const char *);
 int	disk_ioctl(struct disk *, u_long, void *, int, struct lwp *);
+void	disk_set_info(device_t, struct disk *, const char *);
 
 void	dkwedge_init(void);
 int	dkwedge_add(struct dkwedge_info *);



CVS commit: src/sys/sys

2013-05-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May 29 15:11:11 UTC 2013

Modified Files:
src/sys/sys: disk.h

Log Message:
Add dk_geom to struct disk, from Christos.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/sys/disk.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/sys/disk.h
diff -u src/sys/sys/disk.h:1.57 src/sys/sys/disk.h:1.58
--- src/sys/sys/disk.h:1.57	Sun Jun 10 17:05:18 2012
+++ src/sys/sys/disk.h	Wed May 29 15:11:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: disk.h,v 1.57 2012/06/10 17:05:18 mlelstv Exp $	*/
+/*	$NetBSD: disk.h,v 1.58 2013/05/29 15:11:11 martin Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc.
@@ -421,6 +421,7 @@ struct disk {
 	TAILQ_ENTRY(disk) dk_link;	/* link in global disklist */
 	const char	*dk_name;	/* disk name */
 	prop_dictionary_t dk_info;	/* reference to disk-info dictionary */
+	struct disk_geom dk_geom;	/* cooked version of dk_info */
 	int		dk_bopenmask;	/* block devices open */
 	int		dk_copenmask;	/* character devices open */
 	int		dk_openmask;	/* composite (bopen|copen) */



CVS commit: src/usr.bin/tr

2013-05-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May 29 15:08:30 UTC 2013

Modified Files:
src/usr.bin/tr: tr.1

Log Message:
Expand "it's", and fix fix convention notation.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/tr/tr.1

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

Modified files:

Index: src/usr.bin/tr/tr.1
diff -u src/usr.bin/tr/tr.1:1.19 src/usr.bin/tr/tr.1:1.20
--- src/usr.bin/tr/tr.1:1.19	Wed May 29 15:04:37 2013
+++ src/usr.bin/tr/tr.1	Wed May 29 15:08:30 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tr.1,v 1.19 2013/05/29 15:04:37 wiz Exp $
+.\"	$NetBSD: tr.1,v 1.20 2013/05/29 15:08:30 wiz Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -234,7 +234,7 @@ sequence to the length of
 If
 .Ar n
 has a leading zero, it is interpreted as an octal value;
-otherwise, it's interpreted as a decimal value.
+otherwise, it is interpreted as a decimal value.
 .El
 .Sh EXIT STATUS
 .Ex -std
@@ -336,7 +336,7 @@ has less characters than
 is permitted by POSIX but is not required.
 Shell scripts attempting to be portable to other POSIX systems should use
 the
-.Dq [#*]
+.Dq [#*n]
 convention instead of relying on this behavior.
 .Sh BUGS
 .Nm



CVS commit: src/usr.bin/sed

2013-05-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May 29 15:05:43 UTC 2013

Modified Files:
src/usr.bin/sed: sed.1

Log Message:
- Reference tr(1) in `SEE ALSO' section;
- bump date.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/sed/sed.1

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

Modified files:

Index: src/usr.bin/sed/sed.1
diff -u src/usr.bin/sed/sed.1:1.31 src/usr.bin/sed/sed.1:1.32
--- src/usr.bin/sed/sed.1:1.31	Sun Mar 17 21:13:04 2013
+++ src/usr.bin/sed/sed.1	Wed May 29 15:05:43 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sed.1,v 1.31 2013/03/17 21:13:04 uwe Exp $
+.\"	$NetBSD: sed.1,v 1.32 2013/05/29 15:05:43 wiz Exp $
 .\"
 .\" Copyright (c) 1992, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	@(#)sed.1	8.2 (Berkeley) 12/30/93
 .\"
-.Dd March 17, 2013
+.Dd May 29, 2013
 .Dt SED 1
 .Os
 .Sh NAME
@@ -504,6 +504,7 @@ utility exits 0 on success and \*[Gt]0 i
 .Xr awk 1 ,
 .Xr ed 1 ,
 .Xr grep 1 ,
+.Xr tr 1 ,
 .Xr regex 3 ,
 .Xr re_format 7
 .Sh STANDARDS



CVS commit: src/usr.bin/tr

2013-05-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May 29 15:04:37 UTC 2013

Modified Files:
src/usr.bin/tr: tr.1

Log Message:
- Improve wording and punctuation;
- use `.Ex' macro for `EXIT STATUS' section;
- add `SEE ALSO' section, referencing (back) dd(1) and sed(1);
- bump date.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/tr/tr.1

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

Modified files:

Index: src/usr.bin/tr/tr.1
diff -u src/usr.bin/tr/tr.1:1.18 src/usr.bin/tr/tr.1:1.19
--- src/usr.bin/tr/tr.1:1.18	Thu Nov 12 00:43:53 2009
+++ src/usr.bin/tr/tr.1	Wed May 29 15:04:37 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tr.1,v 1.18 2009/11/12 00:43:53 joerg Exp $
+.\"	$NetBSD: tr.1,v 1.19 2013/05/29 15:04:37 wiz Exp $
 .\"
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" @(#)tr.1	8.1 (Berkeley) 6/6/93
 .\"
-.Dd March 23, 2004
+.Dd May 29, 2013
 .Dt TR 1
 .Os
 .Sh NAME
@@ -227,18 +227,17 @@ expression is only valid when it occurs 
 .Ar string2 .
 If
 .Ar n
-is omitted or is zero, it is interpreted as large enough to extend
+is omitted or is zero, it is interpreted as large enough to extend the
 .Ar string2
 sequence to the length of
 .Ar string1 .
 If
 .Ar n
-has a leading zero, it is interpreted as an octal value, otherwise,
-it's interpreted as a decimal value.
+has a leading zero, it is interpreted as an octal value;
+otherwise, it's interpreted as a decimal value.
 .El
 .Sh EXIT STATUS
-.Nm
-exits 0 on success, and \*[Gt]0 if an error occurs.
+.Ex -std
 .Sh EXAMPLES
 The following examples are shown as given to the shell:
 .Pp
@@ -319,6 +318,9 @@ and
 .Fl s
 options were ignored unless two strings were specified.
 This implementation will not permit illegal syntax.
+.Sh SEE ALSO
+.Xr dd 1 ,
+.Xr sed 1
 .Sh STANDARDS
 The
 .Nm



CVS commit: src/share/man/man4

2013-05-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May 29 15:03:09 UTC 2013

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

Log Message:
- Remove unneeded argument in non-first `.Nm' macro;
- remove superfluous `.Pp' macro (fixes mandoc(1) warning);
- capitalization and punctuation fix.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/share/man/man4/ep.4

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

Modified files:

Index: src/share/man/man4/ep.4
diff -u src/share/man/man4/ep.4:1.36 src/share/man/man4/ep.4:1.37
--- src/share/man/man4/ep.4:1.36	Mon May 18 09:45:54 2009
+++ src/share/man/man4/ep.4	Wed May 29 15:03:09 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ep.4,v 1.36 2009/05/18 09:45:54 wiz Exp $
+.\"	$NetBSD: ep.4,v 1.37 2013/05/29 15:03:09 wiz Exp $
 .\"
 .\" Copyright (c) 1997 Jonathan Stone
 .\" All rights reserved.
@@ -47,7 +47,7 @@
 .Cd "ep* at pcmcia? function ?"
 .Sh DESCRIPTION
 The
-.Nm ep
+.Nm
 device driver supports the 3Com EtherLink III family of Ethernet cards.
 .Pp
 The 3c515 is an ISA 10/100 card with DMA capability.
@@ -124,7 +124,6 @@ and
 for more information.
 .Sh HARDWARE
 Supported cards include:
-.Pp
 .Bl -tag -width xx -offset indent
 .It 3c509
 ISA 10Mbps card, in BNC and multiport variants
@@ -178,7 +177,7 @@ type sensed and saved when the configura
 .Sh DIAGNOSTICS
 .Bl -diag
 .It "ep0: reset (status: %x)"
-the driver has encountered a FIFO underrun or overrun.
+The driver has encountered a FIFO underrun or overrun.
 The driver will reset the card and the packet will be lost.
 This is not fatal.
 .It "ep0: eeprom failed to come ready"
@@ -188,7 +187,7 @@ This probably means the card is wedged.
 This means that someone has scribbled with pencil in the test area on the
 card.
 Erase the pencil mark and reboot.
-(This is not a joke).
+(This is not a joke.)
 .El
 .Sh SEE ALSO
 .Xr eisa 4 ,



CVS commit: src/libexec/getty

2013-05-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May 29 15:02:12 UTC 2013

Modified Files:
src/libexec/getty: getty.8

Log Message:
- Add the actual binary to `FILES' section;
- bump date.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/libexec/getty/getty.8

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

Modified files:

Index: src/libexec/getty/getty.8
diff -u src/libexec/getty/getty.8:1.17 src/libexec/getty/getty.8:1.18
--- src/libexec/getty/getty.8:1.17	Thu Aug  7 09:46:42 2003
+++ src/libexec/getty/getty.8	Wed May 29 15:02:12 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: getty.8,v 1.17 2003/08/07 09:46:42 agc Exp $
+.\"	$NetBSD: getty.8,v 1.18 2013/05/29 15:02:12 wiz Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" from: @(#)getty.8	8.1 (Berkeley) 6/4/93
 .\"
-.Dd December 12, 1998
+.Dd May 29, 2013
 .Dt GETTY 8
 .Os
 .Sh NAME
@@ -145,6 +145,7 @@ of processes that dial out on that tty.
 .Bl -tag -width /var/spool/lock/LCK..ttyXX -compact
 .It Pa /etc/gettytab
 .It Pa /etc/ttys
+.It Pa /usr/libexec/getty
 .It Pa /var/spool/lock/LCK..ttyXX
 .El
 .Sh DIAGNOSTICS



CVS commit: src/usr.bin/sort

2013-05-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May 29 15:00:35 UTC 2013

Modified Files:
src/usr.bin/sort: sort.1

Log Message:
- Remove redundant argument to non-first `.Nm' macro;
- reference `-u' at `-c', to make more clear that the former can
  be used with the latter;
- bump date.

>From Bug Hunting.

While here, use Aq.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/sort/sort.1

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

Modified files:

Index: src/usr.bin/sort/sort.1
diff -u src/usr.bin/sort/sort.1:1.33 src/usr.bin/sort/sort.1:1.34
--- src/usr.bin/sort/sort.1:1.33	Sun Jan 20 21:02:11 2013
+++ src/usr.bin/sort/sort.1	Wed May 29 15:00:35 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sort.1,v 1.33 2013/01/20 21:02:11 apb Exp $
+.\"	$NetBSD: sort.1,v 1.34 2013/05/29 15:00:35 wiz Exp $
 .\"
 .\" Copyright (c) 2000-2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -59,14 +59,14 @@
 .\"
 .\" @(#)sort.1	8.1 (Berkeley) 6/6/93
 .\"
-.Dd January 20, 2013
+.Dd May 29, 2013
 .Dt SORT 1
 .Os
 .Sh NAME
 .Nm sort
 .Nd sort or merge text files
 .Sh SYNOPSIS
-.Nm sort
+.Nm
 .Op Fl bcdfHilmnrSsu
 .Oo
 .Fl k
@@ -99,6 +99,8 @@ returns 0.
 .Nm
 .Fl c
 produces no output.
+See also
+.Fl u .
 .It Fl H
 Ignored for compatibility with earlier versions of
 .Nm .
@@ -220,7 +222,7 @@ considered part of a field when determin
 .Ar char
 is used as the record separator character.
 This should be used with discretion;
-.Fl R Ar \*[Lt]alphanumeric\*[Gt]
+.Fl R Aq Ar alphanumeric
 usually produces undesirable results.
 The default record separator is newline.
 .It Fl k Ar field1 Ns Op Li \&, Ns Ar field2



CVS commit: src/sbin

2013-05-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May 29 14:56:19 UTC 2013

Modified Files:
src/sbin/mount_efs: mount_efs.8
src/sbin/mount_ext2fs: mount_ext2fs.8

Log Message:
De-capitalize `.Nd' macro argument.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/mount_efs/mount_efs.8
cvs rdiff -u -r1.15 -r1.16 src/sbin/mount_ext2fs/mount_ext2fs.8

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

Modified files:

Index: src/sbin/mount_efs/mount_efs.8
diff -u src/sbin/mount_efs/mount_efs.8:1.3 src/sbin/mount_efs/mount_efs.8:1.4
--- src/sbin/mount_efs/mount_efs.8:1.3	Mon Jan  5 16:36:04 2009
+++ src/sbin/mount_efs/mount_efs.8	Wed May 29 14:56:19 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mount_efs.8,v 1.3 2009/01/05 16:36:04 pooka Exp $
+.\"	$NetBSD: mount_efs.8,v 1.4 2013/05/29 14:56:19 wiz Exp $
 .\"
 .\" Copyright (c) 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -33,7 +33,7 @@
 .Os
 .Sh NAME
 .Nm mount_efs
-.Nd Mount an SGI EFS file system
+.Nd mount an SGI EFS file system
 .Sh SYNOPSIS
 .Nm
 .Op Fl o Ar options

Index: src/sbin/mount_ext2fs/mount_ext2fs.8
diff -u src/sbin/mount_ext2fs/mount_ext2fs.8:1.15 src/sbin/mount_ext2fs/mount_ext2fs.8:1.16
--- src/sbin/mount_ext2fs/mount_ext2fs.8:1.15	Mon Feb 22 09:45:02 2010
+++ src/sbin/mount_ext2fs/mount_ext2fs.8	Wed May 29 14:56:19 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mount_ext2fs.8,v 1.15 2010/02/22 09:45:02 tsutsui Exp $
+.\"	$NetBSD: mount_ext2fs.8,v 1.16 2013/05/29 14:56:19 wiz Exp $
 .\"
 .\" Copyright (c) 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -33,7 +33,7 @@
 .Os
 .Sh NAME
 .Nm mount_ext2fs
-.Nd Mount an ext2 file system
+.Nd mount an ext2 file system
 .Sh SYNOPSIS
 .Nm
 .Op Fl o Ar options



CVS commit: src/share/man/man4

2013-05-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May 29 14:55:24 UTC 2013

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

Log Message:
Improve wording.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/share/man/man4/wapbl.4

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

Modified files:

Index: src/share/man/man4/wapbl.4
diff -u src/share/man/man4/wapbl.4:1.15 src/share/man/man4/wapbl.4:1.16
--- src/share/man/man4/wapbl.4:1.15	Mon Dec  3 12:28:07 2012
+++ src/share/man/man4/wapbl.4	Wed May 29 14:55:24 2013
@@ -1,4 +1,4 @@
-.\" $NetBSD: wapbl.4,v 1.15 2012/12/03 12:28:07 wiz Exp $
+.\" $NetBSD: wapbl.4,v 1.16 2013/05/29 14:55:24 wiz Exp $
 .\"
 .\" Copyright (c) 2008, 2009, 2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -153,8 +153,8 @@ was originally written by
 .An Darrin B. Jewell
 while at Wasabi Systems Inc.
 Wasabi Systems contributed the code to
-.Nx
-and was integrated by
+.Nx ,
+and it was integrated by
 .An Simon Burge ,
 .An Antti Kantee ,
 .An Andy Doran ,



CVS commit: othersrc/usr.bin/window

2013-05-29 Thread Thomas Klausner
Module Name:othersrc
Committed By:   wiz
Date:   Wed May 29 14:50:24 UTC 2013

Modified Files:
othersrc/usr.bin/window: window.1

Log Message:
- White space corrections;
- remove NetBSD OS specific notes regarding window(1) and tmux(1);
- extend `HISTORY' section, regarding window(1)'s removal from
  NetBSD;
- bump date.

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/usr.bin/window/window.1

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

Modified files:

Index: othersrc/usr.bin/window/window.1
diff -u othersrc/usr.bin/window/window.1:1.1.1.1 othersrc/usr.bin/window/window.1:1.2
--- othersrc/usr.bin/window/window.1:1.1.1.1	Thu Feb 16 04:06:56 2012
+++ othersrc/usr.bin/window/window.1	Wed May 29 14:50:24 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: window.1,v 1.1.1.1 2012/02/16 04:06:56 jmmv Exp $
+.\"	$NetBSD: window.1,v 1.2 2013/05/29 14:50:24 wiz Exp $
 .\"
 .\" Copyright (c) 1985, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	@(#)window.1	8.2 (Berkeley) 12/30/93
 .\"
-.Dd August 13, 2011
+.Dd May 29, 2013
 .Dt WINDOW 1
 .Os
 .Sh NAME
@@ -49,21 +49,6 @@ implements a window environment on
 .Tn ASCII
 terminals.
 .Pp
-Please note that
-.Nm
-is scheduled for removal on
-.Nx 7.0 .
-This is the last
-.Nx
-release that provides
-.Nm .
-Use
-.Xr tmux 1
-instead, or install the
-.Pa pkgsrc/misc/window
-package from
-.Xr pkgsrc 7 .
-.Pp
 A window is a rectangular portion of the physical terminal
 screen associated with a set of processes.
 Its size and position can be changed by the user at any time.
@@ -102,14 +87,14 @@ and create the two default
 windows instead.
 .It Fl e Ar escape-char
 Set the escape character to
-.Ar escape-char  .
+.Ar escape-char .
 .Ar Escape-char
 can be a single character, or in the form
 .Ic ^X
 where
 .Ar X
 is any character, meaning
-.No control\- Ns Ar X  .
+.No control\- Ns Ar X .
 .It Fl f
 Fast.
 Don't perform any startup action.
@@ -129,7 +114,7 @@ This one-character
 identifier, as well as a user definable label string, are displayed
 with the window on the top edge of its frame.
 A window can be designated to be in the
-.Ar foreground  ,
+.Ar foreground ,
 in which case it will always be
 on top of all normal, non-foreground windows, and can be covered
 only by other foreground windows.
@@ -169,7 +154,7 @@ entry tailored to this window is created
 and passed as environment (see
 .Xr environ 7 )
 variable
-.Ev TERMCAP  .
+.Ev TERMCAP .
 The termcap entry contains the window's size and
 characteristics as well as information from the physical terminal,
 such as the existence of underline, reverse video, and other display
@@ -224,7 +209,7 @@ to
 corresponding to the windows 1 to 9.
 .Ic ^X
 means
-.No control\- Ns Ar X  ,
+.No control\- Ns Ar X ,
 where
 .Ar X
 is any character.
@@ -638,7 +623,7 @@ as a statement, the parentheses surround
 the argument list may be omitted.
 Aliases return no value.
 .El
-.Ss  Builtin Functions
+.Ss Builtin Functions
 The arguments are listed by name in their natural order.
 Optional arguments are in square brackets
 .Sq Op ""
@@ -679,12 +664,12 @@ Close the windows specified in
 If
 .Aq Ar window\-list
 is the word
-.Ar all  ,
+.Ar all ,
 than all windows are closed.
 No value is returned.
 .It Ic cursormodes Ns Pq Bq Ar modes
 Set the window cursor to
-.Ar modes  .
+.Ar modes .
 .Ar Modes
 is the bitwise
 or of the mode bits defined as the variables
@@ -705,7 +690,7 @@ sets the window cursors to blinking
 reverse video.
 .It Ic default_nline Ns Pq Bq Ar nline
 Set the default buffer size to
-.Ar nline  .
+.Ar nline .
 Initially, it is
 48 lines.
 Returns the old default buffer size.
@@ -718,7 +703,7 @@ Returns
 the first string in the old shell setting.
 Default is no change.
 Initially, the default shell is taken from the environment variable
-.Ev SHELL  .
+.Ev SHELL .
 .It Ic default_smooth Ns Pq Bq Ar flag
 Set the default value of the
 .Ar smooth
@@ -727,12 +712,12 @@ to the command
 .Nm
 (see below).
 The argument is a boolean flag (one of
-.Ar on  ,
-.Ar off  ,
-.Ar yes  ,
-.Ar no  ,
-.Ar true  ,
-.Ar false  ,
+.Ar on ,
+.Ar off ,
+.Ar yes ,
+.Ar no ,
+.Ar true ,
+.Ar false ,
 or a number,
 as described above).
 Default is no change.
@@ -754,7 +739,7 @@ No value is returned.
 Default is the current window.
 .It Ic escape Ns Pq Bq Ar escapec
 Set the escape character to
-.Ar escape-char  .
+.Ar escape-char .
 Returns the old
 escape character as a one-character string.
 Default is no change.
@@ -781,7 +766,7 @@ is no change.
 Set the label of
 .Nm
 to
-.Ar label  .
+.Ar label .
 Returns the old
 label as a string.
 Default for
@@ -803,11 +788,11 @@ The previous current window is returned.
 Default is no change.
 .It Ic source Ns Pq Ar filename
 Read and execute the long commands in
-.Ar filename  .
+.Ar filename .
 Returns \-1 if the file cannot be read, 0

CVS commit: src/doc

2013-05-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed May 29 14:45:55 UTC 2013

Modified Files:
src/doc: BUILDING.mdoc

Log Message:
- Bump date (for r1.93);
- remove superfluous macros (fixes mandoc(1) warnings).

>From Bug Hunting.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/doc/BUILDING.mdoc

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

Modified files:

Index: src/doc/BUILDING.mdoc
diff -u src/doc/BUILDING.mdoc:1.93 src/doc/BUILDING.mdoc:1.94
--- src/doc/BUILDING.mdoc:1.93	Thu Nov  8 15:24:40 2012
+++ src/doc/BUILDING.mdoc	Wed May 29 14:45:55 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: BUILDING.mdoc,v 1.93 2012/11/08 15:24:40 dholland Exp $
+.\"	$NetBSD: BUILDING.mdoc,v 1.94 2013/05/29 14:45:55 wiz Exp $
 .\"
 .\" Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -33,7 +33,7 @@
 .\" Toolchain prefix for commands
 .ds toolprefix nb
 .
-.Dd September 19, 2012
+.Dd November 8, 2012
 .Dt BUILDING 8
 .Os NetBSD
 .
@@ -156,12 +156,11 @@ build tree is described in
 .Xr hier 7 ,
 and the release layout is described in
 .Xr release 7 .
-.Pp
 .
 .Sh CONFIGURATION
 .
 .Ss Environment variables
-..
+.
 Several environment variables control the behaviour of
 .Nx
 builds.



CVS commit: src/sys/netinet6

2013-05-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed May 29 12:07:58 UTC 2013

Modified Files:
src/sys/netinet6: in6.c

Log Message:
Generate RTM_NEWADDR when adding a pre-existing IPv6 address.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/netinet6/in6.c

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

Modified files:

Index: src/sys/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.162 src/sys/netinet6/in6.c:1.163
--- src/sys/netinet6/in6.c:1.162	Tue May 21 08:37:27 2013
+++ src/sys/netinet6/in6.c	Wed May 29 12:07:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.162 2013/05/21 08:37:27 roy Exp $	*/
+/*	$NetBSD: in6.c,v 1.163 2013/05/29 12:07:58 roy Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.162 2013/05/21 08:37:27 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.163 2013/05/29 12:07:58 roy Exp $");
 
 #include "opt_inet.h"
 #include "opt_pfil_hooks.h"
@@ -1802,6 +1802,9 @@ in6_ifinit(struct ifnet *ifp, struct in6
 		/* set the rtrequest function to create llinfo */
 		ia->ia_ifa.ifa_rtrequest = nd6_rtrequest;
 		in6_ifaddloop(&ia->ia_ifa);
+	} else {
+		/* Inform the routing socket of new flags/timings */
+		nd6_newaddrmsg(&ia->ia_ifa);
 	}
 
 	if (ifp->if_flags & IFF_MULTICAST)



CVS commit: src/sys

2013-05-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed May 29 09:26:02 UTC 2013

Modified Files:
src/sys/dev/ic: iavc.c
src/sys/netisdn: i4b_capi.h i4b_capi_llif.c

Log Message:
Fix signature of capi_ll_control.
>From Wolfgang Stukenbrock in PR kern/47863.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/iavc.c
cvs rdiff -u -r1.5 -r1.6 src/sys/netisdn/i4b_capi.h \
src/sys/netisdn/i4b_capi_llif.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/iavc.c
diff -u src/sys/dev/ic/iavc.c:1.9 src/sys/dev/ic/iavc.c:1.10
--- src/sys/dev/ic/iavc.c:1.9	Sat Oct 27 17:18:20 2012
+++ src/sys/dev/ic/iavc.c	Wed May 29 09:26:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: iavc.c,v 1.9 2012/10/27 17:18:20 chs Exp $	*/
+/*	$NetBSD: iavc.c,v 1.10 2013/05/29 09:26:02 martin Exp $	*/
 
 /*
  * Copyright (c) 2001-2003 Cubical Solutions Ltd. All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: iavc.c,v 1.9 2012/10/27 17:18:20 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iavc.c,v 1.10 2013/05/29 09:26:02 martin Exp $");
 
 #include 
 #include 
@@ -621,7 +621,7 @@ static int iavc_receive_init(iavc_softc_
 		cardtype, serial, nbch, vers, prot);
 	aprint_verbose_dev(sc->sc_dev, "%s\n", caps);
 
-capi_ll_control(&sc->sc_capi, CAPI_CTRL_PROFILE, (int) profile);
+capi_ll_control(&sc->sc_capi, CAPI_CTRL_PROFILE, (intptr_t) profile);
 
 } else {
 	printf("%s: no profile data in info response?\n", device_xname(sc->sc_dev));

Index: src/sys/netisdn/i4b_capi.h
diff -u src/sys/netisdn/i4b_capi.h:1.5 src/sys/netisdn/i4b_capi.h:1.6
--- src/sys/netisdn/i4b_capi.h:1.5	Mon Oct 16 13:03:03 2006
+++ src/sys/netisdn/i4b_capi.h	Wed May 29 09:26:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: i4b_capi.h,v 1.5 2006/10/16 13:03:03 pooka Exp $	*/
+/*	$NetBSD: i4b_capi.h,v 1.6 2013/05/29 09:26:02 martin Exp $	*/
 
 /*
  * Copyright (c) 2001-2003 Cubical Solutions Ltd. All rights reserved.
@@ -119,7 +119,7 @@ typedef struct capi_softc {
 #define I4BCAPI_APPLID 1
 
 extern int capi_ll_attach(capi_softc_t *, const char *, const char *);
-extern int capi_ll_control(capi_softc_t *, int op, int arg);
+extern int capi_ll_control(capi_softc_t *, int op, intptr_t arg);
 extern int capi_ll_detach(capi_softc_t *);
 
 #define CAPI_CTRL_READY 0 /* ctrl ready, value=TRUE/FALSE */
Index: src/sys/netisdn/i4b_capi_llif.c
diff -u src/sys/netisdn/i4b_capi_llif.c:1.5 src/sys/netisdn/i4b_capi_llif.c:1.6
--- src/sys/netisdn/i4b_capi_llif.c:1.5	Sat Apr 18 14:58:06 2009
+++ src/sys/netisdn/i4b_capi_llif.c	Wed May 29 09:26:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: i4b_capi_llif.c,v 1.5 2009/04/18 14:58:06 tsutsui Exp $	*/
+/*	$NetBSD: i4b_capi_llif.c,v 1.6 2013/05/29 09:26:02 martin Exp $	*/
 
 /*
  * Copyright (c) 2001 Cubical Solutions Ltd. All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: i4b_capi_llif.c,v 1.5 2009/04/18 14:58:06 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i4b_capi_llif.c,v 1.6 2013/05/29 09:26:02 martin Exp $");
 
 #include 
 #include 
@@ -57,7 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: i4b_capi_lli
 */
 
 int
-capi_ll_control(capi_softc_t *sc, int op, int arg)
+capi_ll_control(capi_softc_t *sc, int op, intptr_t arg)
 {
 switch (op) {
 case CAPI_CTRL_READY:



CVS commit: src/sys/dev/pci

2013-05-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed May 29 08:24:06 UTC 2013

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

Log Message:
 Use BGE_SETBIT() instead of CSR_WRITE_4() for the BGE_MISC_LOCAL_CTL register
to not to modify some GPIO bits.


To generate a diff of this commit:
cvs rdiff -u -r1.250 -r1.251 src/sys/dev/pci/if_bge.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_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.250 src/sys/dev/pci/if_bge.c:1.251
--- src/sys/dev/pci/if_bge.c:1.250	Tue May 28 17:03:34 2013
+++ src/sys/dev/pci/if_bge.c	Wed May 29 08:24:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.250 2013/05/28 17:03:34 msaitoh Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.251 2013/05/29 08:24:06 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.250 2013/05/28 17:03:34 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.251 2013/05/29 08:24:06 msaitoh Exp $");
 
 #include 
 #include 
@@ -2971,7 +2971,7 @@ bge_blockinit(struct bge_softc *sc)
 
 	/* 5718 step 45, 57XX step 79 */
 	/* Set misc. local control, enable interrupts on attentions */
-	CSR_WRITE_4(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_INTR_ONATTN);
+	BGE_SETBIT(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_INTR_ONATTN);
 	if (BGE_IS_5717_PLUS(sc)) {
 		CSR_READ_4(sc, BGE_MISC_LOCAL_CTL); /* Flush */
 		/* 5718 step 46 */