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

2012-01-22 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Sun Jan 22 08:58:14 UTC 2012

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

Log Message:
Fix build break:  put back accidentally deleted tp.html.


To generate a diff of this commit:
cvs rdiff -u -r1.1372 -r1.1373 src/distrib/sets/lists/man/mi

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

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1372 src/distrib/sets/lists/man/mi:1.1373
--- src/distrib/sets/lists/man/mi:1.1372	Sun Jan 22 06:44:30 2012
+++ src/distrib/sets/lists/man/mi	Sun Jan 22 08:58:13 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1372 2012/01/22 06:44:30 christos Exp $
+# $NetBSD: mi,v 1.1373 2012/01/22 08:58:13 jnemeth Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -4439,6 +4439,7 @@
 ./usr/share/man/html4/tlp.html			man-sys-htmlman		html
 ./usr/share/man/html4/tlphy.html		man-sys-htmlman		html
 ./usr/share/man/html4/tm121temp.html		man-sys-htmlman		html
+./usr/share/man/html4/tp.html			man-sys-htmlman		html
 ./usr/share/man/html4/tpm.html			man-sys-htmlman		html
 ./usr/share/man/html4/tprof.html		man-sys-htmlman		html
 ./usr/share/man/html4/tqphy.html		man-sys-htmlman		html



CVS commit: src/sys/sys

2012-01-22 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Sun Jan 22 09:11:58 UTC 2012

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

Log Message:
fix comment (SRUN-LSRUN, SONPROC-LSONPROC)


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/sys/lwp.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/lwp.h
diff -u src/sys/sys/lwp.h:1.158 src/sys/sys/lwp.h:1.159
--- src/sys/sys/lwp.h:1.158	Mon Nov 21 04:36:05 2011
+++ src/sys/sys/lwp.h	Sun Jan 22 09:11:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.158 2011/11/21 04:36:05 christos Exp $	*/
+/*	$NetBSD: lwp.h,v 1.159 2012/01/22 09:11:58 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@@ -268,8 +268,8 @@ extern lwp_t		lwp0;		/* LWP for proc0. *
 /*
  * Status values.
  *
- * A note about SRUN and SONPROC: SRUN indicates that a process is
- * runnable but *not* yet running, i.e. is on a run queue.  SONPROC
+ * A note about LSRUN and LSONPROC: LSRUN indicates that a process is
+ * runnable but *not* yet running, i.e. is on a run queue.  LSONPROC
  * indicates that the process is actually executing on a CPU, i.e.
  * it is no longer on a run queue.
  */



CVS commit: src/usr.bin/error

2012-01-22 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Jan 22 09:25:27 UTC 2012

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

Log Message:
Fix the csh(1) example (make ... | error ..., not make ... | error ...),
and add a sh(1) example (make ... 21 | error ...).


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/error/error.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/error/error.1
diff -u src/usr.bin/error/error.1:1.17 src/usr.bin/error/error.1:1.18
--- src/usr.bin/error/error.1:1.17	Fri May 20 07:08:24 2011
+++ src/usr.bin/error/error.1	Sun Jan 22 09:25:26 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: error.1,v 1.17 2011/05/20 07:08:24 wiz Exp $
+.\	$NetBSD: error.1,v 1.18 2012/01/22 09:25:26 apb Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)error.1	8.1 (Berkeley) 6/6/93
 .\
-.Dd May 19, 2011
+.Dd January 22, 2012
 .Dt ERROR 1
 .Os
 .Sh NAME
@@ -134,12 +134,20 @@ Some language processors put error messa
 others put their messages on the standard output.
 Hence, both error sources should be piped together into
 .Nm .
+.Pp
 For example, when using the
+.Xr sh 1
+syntax
+.Pp
+.Dl make \-s lint 2\*[Gt]\*[Am]1 \| error \-q \-v
+.Pp
+or the
 .Xr csh 1
-syntax,
+syntax
 .Pp
-.Dl make \-s lint \| error \-q \-v
+.Dl make \-s lint \|\*[Am] error \-q \-v
 .Pp
+.Nm
 will analyze all the error messages produced
 by whatever programs
 .Xr make 1



CVS commit: src/sys/arch/sparc64/sparc64

2012-01-22 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sun Jan 22 10:32:35 UTC 2012

Modified Files:
src/sys/arch/sparc64/sparc64: autoconf.c

Log Message:
pmu's i2c devices are under the i2c node, so find it out before
calling of_enter_i2c_devs().


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/arch/sparc64/sparc64/autoconf.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/sparc64/sparc64/autoconf.c
diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.183 src/sys/arch/sparc64/sparc64/autoconf.c:1.184
--- src/sys/arch/sparc64/sparc64/autoconf.c:1.183	Sat Jul  9 15:03:35 2011
+++ src/sys/arch/sparc64/sparc64/autoconf.c	Sun Jan 22 10:32:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.183 2011/07/09 15:03:35 mrg Exp $ */
+/*	$NetBSD: autoconf.c,v 1.184 2012/01/22 10:32:35 nakayama Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.183 2011/07/09 15:03:35 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.184 2012/01/22 10:32:35 nakayama Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -1040,9 +1040,30 @@ noether:
 			prop_dictionary_t props = device_properties(busdev);
 			prop_object_t cfg = prop_dictionary_get(props,
 i2c-child-devices);
-			if (!cfg)
+			if (!cfg) {
+int node;
+const char *name;
+
+/*
+ * pmu's i2c devices are under the i2c node,
+ * so find it out.
+ */
+name = prom_getpropstring(busnode, name);
+if (strcmp(name, pmu) == 0) {
+	for (node = OF_child(busnode);
+	 node != 0; node = OF_peer(node)) {
+		name = prom_getpropstring(node,
+		name);
+		if (strcmp(name, i2c) == 0) {
+			busnode = node;
+			break;
+		}
+	}
+}
+
 of_enter_i2c_devs(props, busnode,
 sizeof(cell_t));
+			}
 		}
 	}
 



CVS commit: src/sys/dev/i2c

2012-01-22 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sun Jan 22 10:36:52 UTC 2012

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

Log Message:
Add dimm found on Sun US-IIe based machines (eg. Netra X1, Blade 100).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/spdmem_i2c.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/spdmem_i2c.c
diff -u src/sys/dev/i2c/spdmem_i2c.c:1.3 src/sys/dev/i2c/spdmem_i2c.c:1.4
--- src/sys/dev/i2c/spdmem_i2c.c:1.3	Sun Oct  2 19:03:56 2011
+++ src/sys/dev/i2c/spdmem_i2c.c	Sun Jan 22 10:36:52 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem_i2c.c,v 1.3 2011/10/02 19:03:56 jmcneill Exp $ */
+/* $NetBSD: spdmem_i2c.c,v 1.4 2012/01/22 10:36:52 nakayama Exp $ */
 
 /*
  * Copyright (c) 2007 Nicolas Joly
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: spdmem_i2c.c,v 1.3 2011/10/02 19:03:56 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: spdmem_i2c.c,v 1.4 2012/01/22 10:36:52 nakayama Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -77,7 +77,8 @@ spdmem_i2c_match(device_t parent, cfdata
 
 	if (ia-ia_name) {
 		/* add other names as we find more firmware variations */
-		if (strcmp(ia-ia_name, dimm-spd))
+		if (strcmp(ia-ia_name, dimm-spd) 
+		strcmp(ia-ia_name, dimm))
 			return 0;
 	}
 



CVS commit: src/share/man/man4

2012-01-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jan 22 11:26:48 UTC 2012

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

Log Message:
Fix xrefs, remove trailing whitespace, use actual Dd date,
add RCS Id.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/tpm.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/tpm.4
diff -u src/share/man/man4/tpm.4:1.1 src/share/man/man4/tpm.4:1.2
--- src/share/man/man4/tpm.4:1.1	Sun Jan 22 06:44:31 2012
+++ src/share/man/man4/tpm.4	Sun Jan 22 11:26:48 2012
@@ -1,4 +1,4 @@
-.\	$OpenBSD:$
+.\	$NetBSD: tpm.4,v 1.2 2012/01/22 11:26:48 wiz Exp $
 .\
 .\ Copyright (c) 2010 Hans-Jörg Höxer, hans-joerg.hoe...@genua.de
 .\
@@ -14,7 +14,7 @@
 .\ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\
-.Dd $Mdocdate:$
+.Dd January 22, 2012
 .Dt TPM 4
 .Os
 .Sh NAME
@@ -27,7 +27,7 @@
 The
 .Nm
 driver provides support for various trusted platfrom modules (TPM) that can
-store cryptographic keys. 
+store cryptographic keys.
 .Pp
 Supported modules:
 .Pp
@@ -52,13 +52,12 @@ The driver can be configured to use an I
 interrupt vector using the keyword
 .Em irq
 in the kernel configuration file or using
-.Xr config 8 .
+.Xr config 1 .
 If not IRQ is specified, the driver uses polling.
 This is the default configuration.
 .Sh SEE ALSO
-.Xr intro 4 ,
-.Xr files.conf 5,
-.Xr config 8
+.Xr config 1 ,
+.Xr intro 4
 .Sh AUTHORS
 .An -nosplit
 The



CVS commit: src/share/man/man4

2012-01-22 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Jan 22 12:48:44 UTC 2012

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

Log Message:
Added upgt(4) at Wireless network interfaces.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/share/man/man4/usb.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/usb.4
diff -u src/share/man/man4/usb.4:1.93 src/share/man/man4/usb.4:1.94
--- src/share/man/man4/usb.4:1.93	Tue Sep 20 18:58:40 2011
+++ src/share/man/man4/usb.4	Sun Jan 22 12:48:44 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: usb.4,v 1.93 2011/09/20 18:58:40 jym Exp $
+.\ $NetBSD: usb.4,v 1.94 2012/01/22 12:48:44 nonaka Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -148,6 +148,8 @@ Ralink Technology USB IEEE 802.11b/g wir
 Ralink Technology USB IEEE 802.11a/b/g wireless network device
 .It Xr ubt 4
 USB Bluetooth dongles
+.It Xr upgt 4
+Conexant/Intersil PrismGT SoftMAC USB
 .It Xr zyd 4
 ZyDAS ZD1211/ZD1211B USB IEEE 802.11b/g wireless network device
 .El



CVS commit: src/share/man/man4

2012-01-22 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Jan 22 12:54:26 UTC 2012

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

Log Message:
fix upgt(4) entry.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/share/man/man4/usb.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/usb.4
diff -u src/share/man/man4/usb.4:1.94 src/share/man/man4/usb.4:1.95
--- src/share/man/man4/usb.4:1.94	Sun Jan 22 12:48:44 2012
+++ src/share/man/man4/usb.4	Sun Jan 22 12:54:26 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: usb.4,v 1.94 2012/01/22 12:48:44 nonaka Exp $
+.\ $NetBSD: usb.4,v 1.95 2012/01/22 12:54:26 nonaka Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -149,7 +149,7 @@ Ralink Technology USB IEEE 802.11a/b/g w
 .It Xr ubt 4
 USB Bluetooth dongles
 .It Xr upgt 4
-Conexant/Intersil PrismGT SoftMAC USB
+Conexant/Intersil PrismGT SoftMAC USB 802.11b/g wireless network device
 .It Xr zyd 4
 ZyDAS ZD1211/ZD1211B USB IEEE 802.11b/g wireless network device
 .El



CVS commit: src/sys/arch/sandpoint/stand/altboot

2012-01-22 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sun Jan 22 13:08:17 UTC 2012

Modified Files:
src/sys/arch/sandpoint/stand/altboot: dsk.c globals.h main.c pciide.c
siisata.c version

Log Message:
Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sandpoint/stand/altboot/dsk.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sandpoint/stand/altboot/globals.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sandpoint/stand/altboot/main.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sandpoint/stand/altboot/pciide.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sandpoint/stand/altboot/siisata.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sandpoint/stand/altboot/version

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

Modified files:

Index: src/sys/arch/sandpoint/stand/altboot/dsk.c
diff -u src/sys/arch/sandpoint/stand/altboot/dsk.c:1.12 src/sys/arch/sandpoint/stand/altboot/dsk.c:1.13
--- src/sys/arch/sandpoint/stand/altboot/dsk.c:1.12	Thu Jan 19 07:38:05 2012
+++ src/sys/arch/sandpoint/stand/altboot/dsk.c	Sun Jan 22 13:08:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: dsk.c,v 1.12 2012/01/19 07:38:05 nisimura Exp $ */
+/* $NetBSD: dsk.c,v 1.13 2012/01/22 13:08:16 phx Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -179,34 +179,46 @@ int
 perform_atareset(struct dkdev_ata *l, int n)
 {
 	struct dvata_chan *chan = l-chan[n];
+//	int retries;
 
-	CSR_WRITE_1(chan-ctl, ATA_DREQ);
-	delay(10);
-	CSR_WRITE_1(chan-ctl, ATA_SRST|ATA_DREQ);
-	delay(10);
-	CSR_WRITE_1(chan-ctl, ATA_DREQ);
+//	for (retries = 0; retries  10; retries++) {
+		CSR_WRITE_1(chan-ctl, ATA_DREQ);
+		delay(10);
+		CSR_WRITE_1(chan-ctl, ATA_SRST|ATA_DREQ);
+		delay(10);
+		CSR_WRITE_1(chan-ctl, ATA_DREQ);
+//		if (spinwait_unbusy(l, n, 1000/*250*/, NULL) != 0)
+//			return 1;
+//		delay(1000 * 1000);
+//	}
+	return spinwait_unbusy(l, n, 1000/*250*/, NULL);
+}
+
+/* clear idle and standby timers to spin up the drive */
+void
+wakeup_drive(struct dkdev_ata *l, int n)
+{
+	struct dvata_chan *chan = l-chan[n];
 
-	return spinwait_unbusy(l, n, 250, NULL);
+	CSR_WRITE_1(chan-cmd + _NSECT, 0);
+	CSR_WRITE_1(chan-cmd + _CMD, ATA_CMD_IDLE);
+	(void)CSR_READ_1(chan-alt);
+	delay(10 * 1000);
+	CSR_WRITE_1(chan-cmd + _NSECT, 0);
+	CSR_WRITE_1(chan-cmd + _CMD, ATA_CMD_STANDBY);
+	(void)CSR_READ_1(chan-alt);
+	delay(10 * 1000);
 }
 
 int
-satapresense(struct dkdev_ata *l, int n)
+atachkpwr(struct dkdev_ata *l, int n)
 {
-#define VND_CH(n) (((n02)8)+((n01)7))
-#define VND_SC(n) (0x100+VND_CH(n))
-#define VND_SS(n) (0x104+VND_CH(n))
-
-	uint32_t sc = l-bar[5] + VND_SC(n);
-	uint32_t ss = l-bar[5] + VND_SS(n);
-	unsigned val;
-
-	val = (00  4) | (03  8);	/* any speed, no pwrmgt */
-	CSR_WRITE_4(sc, val | 01);	/* perform init */
-	delay(50 * 1000);
-	CSR_WRITE_4(sc, val);
-	delay(50 * 1000);	
-	val = CSR_READ_4(ss);		/* has completed */
-	return ((val  03) == 03);	/* active drive found */
+	struct dvata_chan *chan = l-chan[n];
+
+	CSR_WRITE_1(chan-cmd + _CMD, ATA_CMD_CHKPWR);
+	(void)CSR_READ_1(chan-alt);
+	delay(10 * 1000);
+	return CSR_READ_1(chan-cmd + _NSECT);
 }
 
 static int

Index: src/sys/arch/sandpoint/stand/altboot/globals.h
diff -u src/sys/arch/sandpoint/stand/altboot/globals.h:1.15 src/sys/arch/sandpoint/stand/altboot/globals.h:1.16
--- src/sys/arch/sandpoint/stand/altboot/globals.h:1.15	Sat Jan  7 19:57:49 2012
+++ src/sys/arch/sandpoint/stand/altboot/globals.h	Sun Jan 22 13:08:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: globals.h,v 1.15 2012/01/07 19:57:49 phx Exp $ */
+/* $NetBSD: globals.h,v 1.16 2012/01/22 13:08:16 phx Exp $ */
 
 #ifdef DEBUG
 #define	DPRINTF(x)	printf x
@@ -42,6 +42,7 @@ extern uint32_t cpuclock, busclock;
 
 /* board specific support code */
 struct brdprop *brd_lookup(int);
+int get_drive_config(int);
 int tstchar(void);
 #ifdef DEBUG
 void sat_write(char *, int);
@@ -177,16 +178,23 @@ DSK_DECL(siisata);
 #define ATA_STS_DRDY		0x40
 #define ATA_STS_ERR 		0x01
 /* command */
+#define ATA_CMD_CHKPWR		0xe5
 #define ATA_CMD_IDENT		0xec
+#define ATA_CMD_IDLE		0xe3
 #define ATA_CMD_READ		0x20
 #define ATA_CMD_READ_EXT	0x24
 #define ATA_CMD_SETF		0xef
+#define ATA_CMD_STANDBY		0xe2
 /* device */
 #define ATA_DEV_LBA		0xe0
 #define ATA_DEV_OBS		0x90
 /* control */
 #define ATA_DREQ		0x08
 #define ATA_SRST		0x04
+/* power state */
+#define ATA_PWR_ACTIVE		0xff
+#define ATA_PWR_IDLE		0x80
+#define ATA_PWR_STANDBY		0x00
 
 #define ATA_XFER		0x03
 #define XFER_PIO4		0x0c
@@ -229,4 +237,5 @@ struct disk {
 
 int spinwait_unbusy(struct dkdev_ata *, int, int, const char **);
 int perform_atareset(struct dkdev_ata *, int);
-int satapresense(struct dkdev_ata *, int);
+void wakeup_drive(struct dkdev_ata *, int);
+int atachkpwr(struct dkdev_ata *, int);

Index: 

CVS commit: src/sys/arch/sandpoint/stand/altboot

2012-01-22 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sun Jan 22 13:16:54 UTC 2012

Modified Files:
src/sys/arch/sandpoint/stand/altboot: dsk.c

Log Message:
Cleanup in perform_atareset().


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sandpoint/stand/altboot/dsk.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/sandpoint/stand/altboot/dsk.c
diff -u src/sys/arch/sandpoint/stand/altboot/dsk.c:1.13 src/sys/arch/sandpoint/stand/altboot/dsk.c:1.14
--- src/sys/arch/sandpoint/stand/altboot/dsk.c:1.13	Sun Jan 22 13:08:16 2012
+++ src/sys/arch/sandpoint/stand/altboot/dsk.c	Sun Jan 22 13:16:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: dsk.c,v 1.13 2012/01/22 13:08:16 phx Exp $ */
+/* $NetBSD: dsk.c,v 1.14 2012/01/22 13:16:54 phx Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -179,19 +179,14 @@ int
 perform_atareset(struct dkdev_ata *l, int n)
 {
 	struct dvata_chan *chan = l-chan[n];
-//	int retries;
 
-//	for (retries = 0; retries  10; retries++) {
-		CSR_WRITE_1(chan-ctl, ATA_DREQ);
-		delay(10);
-		CSR_WRITE_1(chan-ctl, ATA_SRST|ATA_DREQ);
-		delay(10);
-		CSR_WRITE_1(chan-ctl, ATA_DREQ);
-//		if (spinwait_unbusy(l, n, 1000/*250*/, NULL) != 0)
-//			return 1;
-//		delay(1000 * 1000);
-//	}
-	return spinwait_unbusy(l, n, 1000/*250*/, NULL);
+	CSR_WRITE_1(chan-ctl, ATA_DREQ);
+	delay(10);
+	CSR_WRITE_1(chan-ctl, ATA_SRST|ATA_DREQ);
+	delay(10);
+	CSR_WRITE_1(chan-ctl, ATA_DREQ);
+
+	return spinwait_unbusy(l, n, 1000, NULL);
 }
 
 /* clear idle and standby timers to spin up the drive */



CVS commit: src/sys/dev/acpi

2012-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 22 13:53:24 UTC 2012

Removed Files:
src/sys/dev/acpi: itpm_acpi.c

Log Message:
remove aborted work in progress


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/dev/acpi/itpm_acpi.c

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



CVS commit: src/sys/dev

2012-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 22 13:53:48 UTC 2012

Modified Files:
src/sys/dev: DEVNAMES

Log Message:
add tpm


To generate a diff of this commit:
cvs rdiff -u -r1.270 -r1.271 src/sys/dev/DEVNAMES

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/DEVNAMES
diff -u src/sys/dev/DEVNAMES:1.270 src/sys/dev/DEVNAMES:1.271
--- src/sys/dev/DEVNAMES:1.270	Wed Aug 31 06:01:18 2011
+++ src/sys/dev/DEVNAMES	Sun Jan 22 08:53:48 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: DEVNAMES,v 1.270 2011/08/31 10:01:18 mbalmer Exp $
+#	$NetBSD: DEVNAMES,v 1.271 2012/01/22 13:53:48 christos Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -1294,6 +1294,7 @@ tpcalib			hpcarm		Attribute
 tpcalib			hpcmips		Attribute
 tpcalib			hpcsh		Attribute
 tpcic			sparc
+tpm			MI
 tqphy			MI
 tr			MI
 tr_isa			MI		Attribute



CVS commit: src/share/man/man4

2012-01-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jan 22 14:15:43 UTC 2012

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

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/share/man/man4/usb.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/usb.4
diff -u src/share/man/man4/usb.4:1.95 src/share/man/man4/usb.4:1.96
--- src/share/man/man4/usb.4:1.95	Sun Jan 22 12:54:26 2012
+++ src/share/man/man4/usb.4	Sun Jan 22 14:15:43 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: usb.4,v 1.95 2012/01/22 12:54:26 nonaka Exp $
+.\ $NetBSD: usb.4,v 1.96 2012/01/22 14:15:43 wiz Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd March 25, 2008
+.Dd January 22, 2012
 .Dt USB 4
 .Os
 .Sh NAME



CVS commit: src/share/man/man8/man8.sandpoint

2012-01-22 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sun Jan 22 15:37:23 UTC 2012

Modified Files:
src/share/man/man8/man8.sandpoint: altboot.8

Log Message:
New option ide:.
Describe how to use altboot with a crippled U-Boot/PPCBoot firmware.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man8/man8.sandpoint/altboot.8

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/man8/man8.sandpoint/altboot.8
diff -u src/share/man/man8/man8.sandpoint/altboot.8:1.5 src/share/man/man8/man8.sandpoint/altboot.8:1.6
--- src/share/man/man8/man8.sandpoint/altboot.8:1.5	Mon Jan  2 18:02:00 2012
+++ src/share/man/man8/man8.sandpoint/altboot.8	Sun Jan 22 15:37:23 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: altboot.8,v 1.5 2012/01/02 18:02:00 wiz Exp $
+.\ $NetBSD: altboot.8,v 1.6 2012/01/22 15:37:23 phx Exp $
 .\
 .\ Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd January 1, 2012
+.Dd January 22, 2012
 .Dt ALTBOOT 8 sandpoint
 .Os
 .Sh NAME
@@ -37,9 +37,7 @@
 kernel from disk or network
 .Sh DESCRIPTION
 .Nm
-is a
-.Nx
-program which works on top of a
+is a standalone program which works on top of a
 .Tn NAS
 product's bootloader.
 It is capable of loading a
@@ -91,8 +89,32 @@ is stored while 0x0100' is the RAM a
 .Pp
 The invocation syntax is:
 .Pp
-.Dl = go 100 Ar opt1 Ar opt2 ... Ar bootname
+.Dl = go 100 Ar ide:N Ar opt1 Ar opt2 ... Ar bootname
+.Bl -tag -width xx
+.It Va ide:N
+where
+.Ar N
+is a string of digits, which defines the number of connected drives on each
+PATA channel. This option is useful to avoid the delays, when
+.Nm
+is trying to detect a non-existing drive. Examples:
 .Bl -tag -width xx
+.It ide: Ns Ar 10
+A single master drive on the first channel. Nothing on the second channel.
+.It ide: Ns Ar 22
+A master and slave drive on both channels of the first controller.
+.It ide: Ns Ar 
+A master drive on each channel. The first two digits belong to the first
+controller, the last two to the second controller.
+.El
+.Pp
+Unspecified digits will be read as
+.Ar 0 Ns .
+The
+.Ar ide
+option has only a meaning for PATA disks. Omitting it makes it default to
+.Ar ide:10 Ns .
+.Pp
 .It Va optN
 multi, auto, ask, single, ddb, userconf, norm, quiet, verb,
 silent, debug
@@ -101,7 +123,7 @@ Omitting optN makes
 .Nm
 default to multi-user mode boot.
 .Pp
-N.B., the maximum number of the go command argument varies
+N.B., the maximum number of allowed go command arguments varies
 and depends on the
 .Tn U-Boot/PPCBoot
 buildtime configuration.
@@ -117,7 +139,7 @@ One of the following:
 .Dl mem: Ns Ar address
 .Dl net:
 .Pp
-The last one is a synonym of
+The last one is a synonym for
 .Dq nfs .
 .It nfs: Ns Va filename
 issue a
@@ -125,7 +147,7 @@ issue a
 request to determine the
 .Tn IP
 address and download
-.Em filename
+.Ar filename
 from the
 .Tn NFS
 server.
@@ -140,7 +162,7 @@ issue a
 request to determine
 .Tn IP
 address and download
-.Em filename
+.Ar filename
 from the
 .Tn TFTP
 server.
@@ -154,15 +176,15 @@ load the
 .Tn ELF
 .Nx
 kernel
-.Em filename
+.Ar filename
 from an
 .Tn FFSv2
 or
 .Tn FFSv1
 filesystem.
-.Em N
+.Ar N
 is a number to distinguish the target drive.
-.Em p
+.Ar p
 is a partition specifier.
 When omitted, partition
 .Sq a
@@ -184,7 +206,7 @@ boots the
 .Nx
 kernel from any address in memory.
 The
-.Em address
+.Ar address
 argument has to be specified as a hexadecimal number and denotes the
 start address of the
 .Tn ELF
@@ -205,9 +227,41 @@ is necessary to enter the script correct
 = setenv bootdelay 5
 = saveenv
 .Ed
+.Pp
+When
+.Tn U-Boot/PPCBoot
+is lacking important commands like
+.Tn cp
+or
+.Tn go Ns ,
+or is unable to save the enviroment, then there is still the option to
+replace the
+.Tn Linux
+kernel module by
+.Pa altboot.img
+and save it to the same address in flash ROM. In this case you have only
+two options left to pass arguments:
+.Pp
+.Bl -bullet -compact
+.It
+Enter the interactive command line mode, after
+.Nm
+has started. This requires a serial console.
+.It
+Write a fixed command line into flash, replacing the
+.Tn Linux
+initrd image. The command line is a normal
+.Tn ASCII
+file, started by the identifier
+.Em altboot:
+and terminated by any control character between 0 and 31. Example:
+.Dl altboot:silent ide: wd0:netbsd
+.El
 .Sh SEE ALSO
 .Xr dhcpd 8 ,
-.Xr diskless 8
+.Xr diskless 8 ,
+.Xr nfsd 8 ,
+.Xr tftpd 8
 .Sh HISTORY
 The
 .Nx Ns Tn /sandpoint



CVS commit: src/sys/dev/ic

2012-01-22 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Jan 22 16:09:08 UTC 2012

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

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/ic/mvsata.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/mvsata.c
diff -u src/sys/dev/ic/mvsata.c:1.13 src/sys/dev/ic/mvsata.c:1.14
--- src/sys/dev/ic/mvsata.c:1.13	Sat Jan 21 18:33:17 2012
+++ src/sys/dev/ic/mvsata.c	Sun Jan 22 16:09:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsata.c,v 1.13 2012/01/21 18:33:17 jakllsch Exp $	*/
+/*	$NetBSD: mvsata.c,v 1.14 2012/01/22 16:09:08 jakllsch Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mvsata.c,v 1.13 2012/01/21 18:33:17 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: mvsata.c,v 1.14 2012/01/22 16:09:08 jakllsch Exp $);
 
 #include opt_mvsata.h
 
@@ -2277,7 +2277,7 @@ mvsata_atapi_phase_complete(struct ata_x
 
 static void
 mvsata_atapi_done(struct ata_channel *chp, struct ata_xfer *xfer)
-{
+{
 	struct atac_softc *atac = chp-ch_atac;
 	struct scsipi_xfer *sc_xfer = xfer-c_cmd;
 	int drive = xfer-c_drive;



CVS commit: src/sys/dev/ic

2012-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 22 16:35:39 UTC 2012

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

Log Message:
as jared noted, this is not mpsafe.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/tpm.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/tpm.c
diff -u src/sys/dev/ic/tpm.c:1.1 src/sys/dev/ic/tpm.c:1.2
--- src/sys/dev/ic/tpm.c:1.1	Sun Jan 22 01:44:28 2012
+++ src/sys/dev/ic/tpm.c	Sun Jan 22 11:35:39 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: tpm.c,v 1.1 2012/01/22 06:44:28 christos Exp $	*/
+/*	$NetBSD: tpm.c,v 1.2 2012/01/22 16:35:39 christos Exp $	*/
 /*
  * Copyright (c) 2008, 2009 Michael Shalayeff
  * Copyright (c) 2009, 2010 Hans-Jörg Höxer
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tpm.c,v 1.1 2012/01/22 06:44:28 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: tpm.c,v 1.2 2012/01/22 16:35:39 christos Exp $);
 
 /* #define	TPM_DEBUG */
 
@@ -76,7 +76,7 @@ extern struct cfdriver	tpm_cd;
  
 const struct cdevsw tpm_cdevsw = {
 	tpmopen, tpmclose, tpmread, tpmwrite, tpmioctl,
-	nostop, notty, nopoll, nommap, nokqfilter, D_OTHER | D_MPSAFE,
+	nostop, notty, nopoll, nommap, nokqfilter, D_OTHER,
 }; 
 
 /* Probe TPM using TIS 1.2 interface. */



CVS commit: src/share/man/man8/man8.sandpoint

2012-01-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jan 22 16:41:42 UTC 2012

Modified Files:
src/share/man/man8/man8.sandpoint: altboot.8

Log Message:
New sentence, new line. Avoid unnecessary macros.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man8/man8.sandpoint/altboot.8

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/man8/man8.sandpoint/altboot.8
diff -u src/share/man/man8/man8.sandpoint/altboot.8:1.6 src/share/man/man8/man8.sandpoint/altboot.8:1.7
--- src/share/man/man8/man8.sandpoint/altboot.8:1.6	Sun Jan 22 15:37:23 2012
+++ src/share/man/man8/man8.sandpoint/altboot.8	Sun Jan 22 16:41:42 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: altboot.8,v 1.6 2012/01/22 15:37:23 phx Exp $
+.\ $NetBSD: altboot.8,v 1.7 2012/01/22 16:41:42 wiz Exp $
 .\
 .\ Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -95,25 +95,30 @@ The invocation syntax is:
 where
 .Ar N
 is a string of digits, which defines the number of connected drives on each
-PATA channel. This option is useful to avoid the delays, when
+PATA channel.
+This option is useful to avoid the delays, when
 .Nm
-is trying to detect a non-existing drive. Examples:
+is trying to detect a non-existing drive.
+Examples:
 .Bl -tag -width xx
 .It ide: Ns Ar 10
-A single master drive on the first channel. Nothing on the second channel.
+A single master drive on the first channel.
+Nothing on the second channel.
 .It ide: Ns Ar 22
 A master and slave drive on both channels of the first controller.
 .It ide: Ns Ar 
-A master drive on each channel. The first two digits belong to the first
+A master drive on each channel.
+The first two digits belong to the first
 controller, the last two to the second controller.
 .El
 .Pp
 Unspecified digits will be read as
-.Ar 0 Ns .
+.Ar 0 .
 The
 .Ar ide
-option has only a meaning for PATA disks. Omitting it makes it default to
-.Ar ide:10 Ns .
+option has only a meaning for PATA disks.
+Omitting it makes it default to
+.Ar ide:10 .
 .Pp
 .It Va optN
 multi, auto, ask, single, ddb, userconf, norm, quiet, verb,
@@ -134,8 +139,8 @@ One of the following:
 .Dl nfs:
 .Dl tftp: Ns Ar filename
 .Dl tftp:
-.Dl wd Ns Ar Np Ns : Ns Ar filename
-.Dl wd Ns Ar Np Ns :
+.Dl wd Ns Ar Np : Ns Ar filename
+.Dl wd Ns Ar Np :
 .Dl mem: Ns Ar address
 .Dl net:
 .Pp
@@ -233,28 +238,31 @@ When
 is lacking important commands like
 .Tn cp
 or
-.Tn go Ns ,
+.Tn go ,
 or is unable to save the enviroment, then there is still the option to
 replace the
 .Tn Linux
 kernel module by
 .Pa altboot.img
-and save it to the same address in flash ROM. In this case you have only
-two options left to pass arguments:
+and save it to the same address in flash ROM.
+In this case you have only two options left to pass arguments:
 .Pp
 .Bl -bullet -compact
 .It
 Enter the interactive command line mode, after
 .Nm
-has started. This requires a serial console.
+has started.
+This requires a serial console.
 .It
 Write a fixed command line into flash, replacing the
 .Tn Linux
-initrd image. The command line is a normal
+initrd image.
+The command line is a normal
 .Tn ASCII
 file, started by the identifier
 .Em altboot:
-and terminated by any control character between 0 and 31. Example:
+and terminated by any control character between 0 and 31.
+Example:
 .Dl altboot:silent ide: wd0:netbsd
 .El
 .Sh SEE ALSO



CVS commit: src/distrib/common/bootimage

2012-01-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 22 16:50:00 UTC 2012

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage Makefile.installimage
Makefile.liveimage

Log Message:
Fix checks for RELEASEDIR (and IMGBASE) variables to perform it
only on live_image or install_image targets.  PR toolchain/45864


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/common/bootimage/Makefile.bootimage \
src/distrib/common/bootimage/Makefile.installimage \
src/distrib/common/bootimage/Makefile.liveimage

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

Modified files:

Index: src/distrib/common/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.1 src/distrib/common/bootimage/Makefile.bootimage:1.2
--- src/distrib/common/bootimage/Makefile.bootimage:1.1	Sun Jan 22 03:53:30 2012
+++ src/distrib/common/bootimage/Makefile.bootimage	Sun Jan 22 16:50:00 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
+#	$NetBSD: Makefile.bootimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -123,11 +123,6 @@
 	@echo Error: IMGBASE is not set
 	@false
 .endif
-.if empty(RELEASEDIR)
-.BEGIN:
-	@echo Error: RELEASEDIR is not set
-	@false
-.endif
 
 # should be defined elsewhere? 
 CAT?=		cat
Index: src/distrib/common/bootimage/Makefile.installimage
diff -u src/distrib/common/bootimage/Makefile.installimage:1.1 src/distrib/common/bootimage/Makefile.installimage:1.2
--- src/distrib/common/bootimage/Makefile.installimage:1.1	Sun Jan 22 03:53:30 2012
+++ src/distrib/common/bootimage/Makefile.installimage	Sun Jan 22 16:50:00 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.installimage,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
+#	$NetBSD: Makefile.installimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
 #
 # Common Makefile to create a bootable installation image for USB flash etc.
 #
@@ -11,15 +11,14 @@
 # See Makefile.bootimage for other variables.
 #
 
-.if empty(INSTIMGBASE)
-.BEGIN:
+.if !target(check_INSTIMGBASE)
+check_INSTIMGBASE: .PHONY .NOTMAIN
+.if !defined(INSTIMGBASE)
 	@echo Error: INSTIMGBASE is not set
 	@false
+.else
+	@true
 .endif
-.if empty(RELEASEDIR)
-.BEGIN:
-	@echo Error: RELEASEDIR is not set
-	@false
 .endif
 
 SWAPMB=		0			# no swap
@@ -54,7 +53,7 @@ INSTIMG_RELEASEDIR?=	${RELEASEMACHINEDIR
 # should be defined elsewhere? 
 MKDIR?=		mkdir -p
 
-install_image: ${IMGBASE}.img.gz
+install_image: check_INSTIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz
 	${MKDIR} ${INSTIMG_RELEASEDIR}
 	${RELEASE_INSTALL} ${IMGBASE}.img.gz ${INSTIMG_RELEASEDIR}
 	# note ${MAKESUM} will be calculated in src/etc/Makefile
Index: src/distrib/common/bootimage/Makefile.liveimage
diff -u src/distrib/common/bootimage/Makefile.liveimage:1.1 src/distrib/common/bootimage/Makefile.liveimage:1.2
--- src/distrib/common/bootimage/Makefile.liveimage:1.1	Sun Jan 22 03:53:30 2012
+++ src/distrib/common/bootimage/Makefile.liveimage	Sun Jan 22 16:50:00 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.liveimage,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
+#	$NetBSD: Makefile.liveimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
 #
 # Common Makefile to create a bootable FS image for USB flash or emulators
 #
@@ -11,15 +11,14 @@
 # See Makefile.bootimage for other variables.
 #
 
-.if empty(LIVEIMGBASE)
-.BEGIN:
+.if !target(check_LIVEIMGBASE)
+check_LIVEIMGBASE: .PHONY .NOTMAIN
+.if !defined(LIVEIMGBASE)
 	@echo Error: LIVEIMGBASE is not set
 	@false
+.else
+	@true
 .endif
-.if empty(RELEASEDIR)
-.BEGIN:
-	@echo Error: RELEASEDIR is not set
-	@false
 .endif
 
 IMGBASE=	${LIVEIMGBASE}
@@ -34,7 +33,7 @@ LIVEIMG_RELEASEDIR?=	${RELEASEMACHINEDIR
 # should be defined elsewhere? 
 MKDIR?=		mkdir -p
 
-live_image: ${IMGBASE}.img.gz
+live_image: check_LIVEIMGBASE check_RELEASEDIR ${IMGBASE}.img.gz
 	${MKDIR} ${LIVEIMG_RELEASEDIR}
 	${RELEASE_INSTALL} ${IMGBASE}.img.gz ${LIVEIMG_RELEASEDIR}
 	# note ${MAKESUM} will be calculated in src/etc/Makefile



CVS commit: src/distrib/common/bootimage

2012-01-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 22 16:56:22 UTC 2012

Modified Files:
src/distrib/common/bootimage: Makefile.bootimage

Log Message:
Appease warnings `expr 0 \* 1024 \* 1024 / 512 returned non-zero status.'

SWAPMB could be zero (in install-image case) and
expr(1) returns exit status 1 in that case.  Umm.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/common/bootimage/Makefile.bootimage

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

Modified files:

Index: src/distrib/common/bootimage/Makefile.bootimage
diff -u src/distrib/common/bootimage/Makefile.bootimage:1.2 src/distrib/common/bootimage/Makefile.bootimage:1.3
--- src/distrib/common/bootimage/Makefile.bootimage:1.2	Sun Jan 22 16:50:00 2012
+++ src/distrib/common/bootimage/Makefile.bootimage	Sun Jan 22 16:56:22 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootimage,v 1.2 2012/01/22 16:50:00 tsutsui Exp $
+#	$NetBSD: Makefile.bootimage,v 1.3 2012/01/22 16:56:22 tsutsui Exp $
 #
 # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui.  All rights reserved.
 #
@@ -146,8 +146,9 @@ INSTALLBOOT_AFTER_DISKLABEL?=	no
 IMAGEMB?=	2048		# 2048MB
 SWAPMB?=	128		# 128MB
 
+# XXX: SWAPMB could be zero and expr(1) returns exit status 1 in that case
 IMAGESECTORS!=	expr ${IMAGEMB} \* 1024 \* 1024 / 512
-SWAPSECTORS!=	expr ${SWAPMB} \* 1024 \* 1024 / 512
+SWAPSECTORS!=	expr ${SWAPMB} \* 1024 \* 1024 / 512 || true
 
 .if ${USE_MBR} == no
 LABELSECTORS?=	0
@@ -176,7 +177,7 @@ SWAPOFFSET!=	expr ${LABELSECTORS} + ${FS
 
 # parameters for sunlabel
 FSCYLINDERS!=	expr ${FSSECTORS} / \( ${HEADS} \* ${SECTORS} \)
-SWAPCYLINDERS!=	expr ${SWAPSECTORS} / \( ${HEADS} \* ${SECTORS} \)
+SWAPCYLINDERS!=	expr ${SWAPSECTORS} / \( ${HEADS} \* ${SECTORS} \) || true
 
 
 #



CVS commit: src/sys/arch/usermode/usermode

2012-01-22 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sun Jan 22 17:51:39 UTC 2012

Modified Files:
src/sys/arch/usermode/usermode: trap.c

Log Message:
Fix compilation issue for target amd64.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/usermode/usermode/trap.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/usermode/usermode/trap.c
diff -u src/sys/arch/usermode/usermode/trap.c:1.61 src/sys/arch/usermode/usermode/trap.c:1.62
--- src/sys/arch/usermode/usermode/trap.c:1.61	Sat Jan 21 22:09:57 2012
+++ src/sys/arch/usermode/usermode/trap.c	Sun Jan 22 17:51:39 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.61 2012/01/21 22:09:57 reinoud Exp $ */
+/* $NetBSD: trap.c,v 1.62 2012/01/22 17:51:39 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk rein...@netbsd.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.61 2012/01/21 22:09:57 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.62 2012/01/22 17:51:39 reinoud Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -305,7 +305,7 @@ handle_signal(int sig, siginfo_t *info, 
 	struct lwp *l;
 	struct pcb *pcb;
 	vaddr_t va, sp, pc, fp;
-	int from_userland;
+	long from_userland;
 
 	if (sig == SIGBUS || sig == SIGSEGV || sig == SIGILL) {
 		if (info-si_code == SI_NOINFO)



CVS commit: src/sys/arch

2012-01-22 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Sun Jan 22 18:16:35 UTC 2012

Modified Files:
src/sys/arch/x86/x86: pmap.c
src/sys/arch/xen/x86: xen_pmap.c

Log Message:
Do not clobber pmap_kernel()'s pdir unnecessarily while syncing per-cpu pdirs


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/xen/x86/xen_pmap.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/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.153 src/sys/arch/x86/x86/pmap.c:1.154
--- src/sys/arch/x86/x86/pmap.c:1.153	Mon Jan  9 12:58:49 2012
+++ src/sys/arch/x86/x86/pmap.c	Sun Jan 22 18:16:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.153 2012/01/09 12:58:49 cherry Exp $	*/
+/*	$NetBSD: pmap.c,v 1.154 2012/01/22 18:16:35 cherry Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.153 2012/01/09 12:58:49 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.154 2012/01/22 18:16:35 cherry Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -1883,7 +1883,6 @@ pmap_free_ptp(struct pmap *pmap, struct 
 		 * on any cpu, clear it before freeing
 		 */
 		if (level == PTP_LEVELS - 1) {
-			pmap_pte_set(pmap_kernel()-pm_pdir[index], 0);
 			/*
 			 * Update the per-cpu PD on all cpus the current
 			 * pmap is active on 
@@ -1987,9 +1986,6 @@ pmap_get_ptp(struct pmap *pmap, vaddr_t 
 		 * if pmap is curmap and modifying top level (PGD)
 		 */
 		if(i == PTP_LEVELS  pmap != pmap_kernel()) {
-		pmap_pte_set(pmap_kernel()-pm_pdir[index],
-		(pd_entry_t) (pmap_pa2pte(pa)
-		| PG_u | PG_RW | PG_V));
 			/*
 			 * Update the per-cpu PD on all cpus the current
 			 * pmap is active on 

Index: src/sys/arch/xen/x86/xen_pmap.c
diff -u src/sys/arch/xen/x86/xen_pmap.c:1.14 src/sys/arch/xen/x86/xen_pmap.c:1.15
--- src/sys/arch/xen/x86/xen_pmap.c:1.14	Thu Jan 19 22:04:05 2012
+++ src/sys/arch/xen/x86/xen_pmap.c	Sun Jan 22 18:16:34 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: xen_pmap.c,v 1.14 2012/01/19 22:04:05 bouyer Exp $	*/
+/*	$NetBSD: xen_pmap.c,v 1.15 2012/01/22 18:16:34 cherry Exp $	*/
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -102,7 +102,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xen_pmap.c,v 1.14 2012/01/19 22:04:05 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: xen_pmap.c,v 1.15 2012/01/22 18:16:34 cherry Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -555,16 +555,19 @@ pmap_unmap_recursive_entries(void)
 
 extern struct cpu_info	* (*xpq_cpu)(void);
 static __inline void
-pmap_kpm_setpte(struct cpu_info *ci, int index)
+pmap_kpm_setpte(struct cpu_info *ci, struct pmap *pmap, int index)
 {
+	if (pmap == pmap_kernel()) {
+		KASSERT(index = PDIR_SLOT_KERN);
+	}
 #ifdef PAE
-		xpq_queue_pte_update(
-			xpmap_ptetomach(ci-ci_kpm_pdir[l2tol2(index)]),
-			pmap_kernel()-pm_pdir[index]);
+	xpq_queue_pte_update(
+		xpmap_ptetomach(ci-ci_kpm_pdir[l2tol2(index)]),
+		pmap-pm_pdir[index]);
 #elif defined(__x86_64__)
-		xpq_queue_pte_update(
-			xpmap_ptetomach(ci-ci_kpm_pdir[index]),
-			pmap_kernel()-pm_pdir[index]);
+	xpq_queue_pte_update(
+		xpmap_ptetomach(ci-ci_kpm_pdir[index]),
+		pmap-pm_pdir[index]);
 #endif /* PAE */
 }
 
@@ -580,27 +583,20 @@ pmap_kpm_sync_xcall(void *arg1, void *ar
 	
 	struct cpu_info *ci = xpq_cpu();
 
-	if (pmap == pmap_kernel()) {
-		KASSERT(index = PDIR_SLOT_KERN);
-		pmap_kpm_setpte(ci, index);
-		pmap_pte_flush();
-		return;
-	}
-
 #ifdef PAE
-	KASSERTMSG(false, %s not allowed for PAE user pmaps, __func__);
-	return;
-#else /* __x86_64__ */
-	
-	if (ci-ci_pmap != pmap) {
-		/* pmap changed. Nothing to do. */
+	KASSERTMSG(pmap == pmap_kernel(), %s not allowed for PAE user pmaps, __func__);
+#endif /* PAE */
+
+	if (__predict_true(pmap != pmap_kernel()) 
+	pmap != ci-ci_pmap) {
+		/* User pmap changed. Nothing to do. */
 		return;
 	}
-	
-	pmap_pte_set(ci-ci_kpm_pdir[index],
-	pmap-pm_pdir[index]);
+
+	/* Update per-cpu kpm */
+	pmap_kpm_setpte(ci, pmap, index);
 	pmap_pte_flush();
-#endif /* PAE || __x86_64__ */
+	return;
 }
 
 /*
@@ -626,7 +622,7 @@ xen_kpm_sync(struct pmap *pmap, int inde
 			}
 			if (pmap == pmap_kernel() ||
 			ci-ci_cpumask  pmap-pm_cpus) {
-pmap_kpm_setpte(ci, index);
+pmap_kpm_setpte(ci, pmap, index);
 			}
 		}
 		pmap_pte_flush();



CVS commit: xsrc/external/mit/xf86-video-tdfx/dist/src

2012-01-22 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Sun Jan 22 18:26:42 UTC 2012

Modified Files:
xsrc/external/mit/xf86-video-tdfx/dist/src: tdfx_driver.c

Log Message:
don't mess with BARs if only one card is present
now this works again on macppc
While there, move USE_INT10 and USE_PCIVGAIO to the reachover Makefile.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c
diff -u xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c:1.1.1.4 xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c:1.2
--- xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c:1.1.1.4	Sat Aug 22 00:10:18 2009
+++ xsrc/external/mit/xf86-video-tdfx/dist/src/tdfx_driver.c	Sun Jan 22 18:26:42 2012
@@ -6,9 +6,6 @@
 #include inttypes.h
 #endif
 
-#define USE_INT10 1
-#define USE_PCIVGAIO 1
-
 /**
 
 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -658,23 +655,28 @@ TDFXInitChips(ScrnInfoPtr pScrn)
 xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3,
 		   TDFXInitChips: cfgbits = 0x%08lx\n, cfgbits);
 
-for (i = 0; i  pTDFX-numChips; i++) {
+if (pTDFX-numChips == 1) {
+  /*
+   * XXX
+   * Do not fudge BARs with only one chip present.
+   * Now this works again on NetBSD/macppc.
+   */
+  pTDFX-MMIOAddr[0] = mem0base  0xff00;
+  pTDFX-LinearAddr[0] = mem1base  0xff00;
+} else {
+  for (i = 0; i  pTDFX-numChips; i++) {
 	PCI_WRITE_LONG(initbits | BIT(10), CFG_INIT_ENABLE, i);
-
-#if 0
-	v=pciReadWord(pTDFX-PciTag[i], CFG_PCI_COMMAND);
-	if (!i)
-	pciWriteWord(pTDFX-PciTag[i], CFG_PCI_COMMAND, v | 0x3);
-	else
-	pciWriteWord(pTDFX-PciTag[i], CFG_PCI_COMMAND, v | 0x2);
-#endif
-
+	
+	#if 0
+		v=pciReadWord(pTDFX-PciTag[i], CFG_PCI_COMMAND);
+		if (!i)
+		pciWriteWord(pTDFX-PciTag[i], CFG_PCI_COMMAND, v | 0x3);
+		else
+		pciWriteWord(pTDFX-PciTag[i], CFG_PCI_COMMAND, v | 0x2);
+	#endif
+	
 	pTDFX-MMIOAddr[i] = mem0base + (i * mem0size);
 
-	xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3,
-		   TDFXInitChips: MMIOAddr[%d] = 0x%08lx\n,
-		   i, pTDFX-MMIOAddr[i]);
-
 	PCI_WRITE_LONG(pTDFX-MMIOAddr[i], CFG_MEM0BASE, i);
 
 	pTDFX-MMIOAddr[i] = 0xFF00;
@@ -682,14 +684,18 @@ TDFXInitChips(ScrnInfoPtr pScrn)
 
 	PCI_WRITE_LONG(pTDFX-LinearAddr[i], CFG_MEM1BASE, i);
 
-	xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3,
-		   TDFXInitChips: LinearAddr[%d] = 0x%08lx\n,
-		   i, pTDFX-LinearAddr[i]);
 	pTDFX-LinearAddr[i] = 0xFF00;
 
 	PCI_WRITE_LONG(cfgbits, CFG_PCI_DECODE, i);
 	PCI_WRITE_LONG(initbits, CFG_INIT_ENABLE, i);
+  }
 }
+xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3,
+		   TDFXInitChips: MMIOAddr[%d] = 0x%08lx\n,
+		   0, pTDFX-MMIOAddr[0]);
+xf86DrvMsgVerb(pScrn-scrnIndex, X_INFO, 3,
+		   TDFXInitChips: LinearAddr[%d] = 0x%08lx\n,
+		   0, pTDFX-LinearAddr[0]);
 }
 
 void
@@ -2214,7 +2220,8 @@ TDFXScreenInit(int scrnIndex, ScreenPtr 
 
   if (!pTDFX-usePIO) TDFXSetMMIOAccess(pTDFX);
 
-#if USE_PCIVGAIO
+#ifndef USE_PCIVGAIO
+  /* access VGA registers through the IO BAR, not legacy decoding */
   hwp-PIOOffset = pTDFX-PIOBase[0] - 0x300;
 #endif
   vgaHWGetIOBase(hwp);



CVS commit: src/external/mit/xorg/server/drivers/xf86-video-tdfx

2012-01-22 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sun Jan 22 18:27:28 UTC 2012

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-tdfx: Makefile

Log Message:
set USE_INT10 and USE_PCIVGAIO on i386 and amd64 only


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/mit/xorg/server/drivers/xf86-video-tdfx/Makefile

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

Modified files:

Index: src/external/mit/xorg/server/drivers/xf86-video-tdfx/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-tdfx/Makefile:1.8 src/external/mit/xorg/server/drivers/xf86-video-tdfx/Makefile:1.9
--- src/external/mit/xorg/server/drivers/xf86-video-tdfx/Makefile:1.8	Thu Aug 11 23:15:41 2011
+++ src/external/mit/xorg/server/drivers/xf86-video-tdfx/Makefile	Sun Jan 22 18:27:28 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2011/08/11 23:15:41 joerg Exp $
+#	$NetBSD: Makefile,v 1.9 2012/01/22 18:27:28 macallan Exp $
 
 DRIVER=		xf86-video-tdfx
 DRIVER_NAME=	tdfx_drv
@@ -8,6 +8,12 @@ SRCS+=		tdfx_io.c tdfx_priv.c tdfx_sli.c
 SRCS+=		tdfx_dri.c
 MAN=		tdfx.4
 
+.if ${MACHINE_ARCH} == i386 || \
+${MACHINE_ARCH} == x86_64
+CPPFLAGS+=	-DUSE_INT10
+CPPFLAGS+=	-DUSE_PCIVGAIO
+.endif
+
 CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}/X11
 CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}/X11/dri
 CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}/libdrm



CVS commit: src

2012-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 22 18:36:19 UTC 2012

Modified Files:
src/bin/csh: csh.c
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/include: stdio.h
src/lib/libc: shlib_version
src/lib/libc/compat: Makefile Makefile.inc
src/lib/libc/stdio: fgetpos.c findfp.c fmemopen.c fopen.c freopen.c
fseek.3 fseeko.c fsetpos.c ftell.c ftello.c funopen.3 funopen.c
local.h stdio.c
src/tests/fs/nfs/nfsservice: mountd.c
Added Files:
src/lib/libc/compat/include: stdio.h
src/lib/libc/compat/stdio: Makefile.inc compat_fgetpos.c
compat_fsetpos.c

Log Message:
From tsutsui@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/bin/csh/csh.c
cvs rdiff -u -r1.77 -r1.78 src/distrib/sets/lists/base/ad.mips64eb
cvs rdiff -u -r1.76 -r1.77 src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.149 -r1.150 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.142 -r1.143 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.611 -r1.612 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.64 -r1.65 src/distrib/sets/lists/comp/ad.mips64eb \
src/distrib/sets/lists/comp/ad.mips64el
cvs rdiff -u -r1.150 -r1.151 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.133 -r1.134 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.204 -r1.205 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.79 -r1.80 src/include/stdio.h
cvs rdiff -u -r1.225 -r1.226 src/lib/libc/shlib_version
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/compat/Makefile
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/compat/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/compat/include/stdio.h
cvs rdiff -u -r0 -r1.1 src/lib/libc/compat/stdio/Makefile.inc \
src/lib/libc/compat/stdio/compat_fgetpos.c \
src/lib/libc/compat/stdio/compat_fsetpos.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/stdio/fgetpos.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libc/stdio/findfp.c \
src/lib/libc/stdio/fseek.3
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/stdio/fmemopen.c
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdio/fopen.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/stdio/freopen.c \
src/lib/libc/stdio/funopen.3 src/lib/libc/stdio/stdio.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/stdio/fseeko.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/stdio/fsetpos.c \
src/lib/libc/stdio/funopen.c
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/stdio/ftell.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/stdio/ftello.c
cvs rdiff -u -r1.30 -r1.31 src/lib/libc/stdio/local.h
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/nfs/nfsservice/mountd.c

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

Modified files:

Index: src/bin/csh/csh.c
diff -u src/bin/csh/csh.c:1.42 src/bin/csh/csh.c:1.43
--- src/bin/csh/csh.c:1.42	Mon Aug 29 10:51:17 2011
+++ src/bin/csh/csh.c	Sun Jan 22 13:36:14 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: csh.c,v 1.42 2011/08/29 14:51:17 joerg Exp $ */
+/* $NetBSD: csh.c,v 1.43 2012/01/22 18:36:14 christos Exp $ */
 
 /*-
  * Copyright (c) 1980, 1991, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)csh.c	8.2 (Berkeley) 10/12/93;
 #else
-__RCSID($NetBSD: csh.c,v 1.42 2011/08/29 14:51:17 joerg Exp $);
+__RCSID($NetBSD: csh.c,v 1.43 2012/01/22 18:36:14 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -94,7 +94,7 @@ int reenter = 0;
 extern char **environ;
 
 static int readf(void *, char *, int);
-static fpos_t seekf(void *, fpos_t, int);
+static off_t seekf(void *, off_t, int);
 static int writef(void *, const char *, int);
 static int closef(void *);
 static int srccat(Char *, Char *);
@@ -1245,8 +1245,8 @@ writef(void *oreo, const char *buf, int 
 return write(DESC(oreo), buf, siz);
 }
 
-static fpos_t
-seekf(void *oreo, fpos_t off, int whence)
+static off_t
+seekf(void *oreo, off_t off, int whence)
 {
 return lseek(DESC(oreo), off, whence);
 }

Index: src/distrib/sets/lists/base/ad.mips64eb
diff -u src/distrib/sets/lists/base/ad.mips64eb:1.77 src/distrib/sets/lists/base/ad.mips64eb:1.78
--- src/distrib/sets/lists/base/ad.mips64eb:1.77	Mon Jan  9 10:24:37 2012
+++ src/distrib/sets/lists/base/ad.mips64eb	Sun Jan 22 13:36:14 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.77 2012/01/09 15:24:37 dholland Exp $
+# $NetBSD: ad.mips64eb,v 1.78 2012/01/22 18:36:14 christos Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -66,7 +66,7 @@
 

CVS commit: src/sys/dev/pci

2012-01-22 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Sun Jan 22 19:00:45 UTC 2012

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

Log Message:
clear the screen when returning from X


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pci/voodoofb.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/voodoofb.c
diff -u src/sys/dev/pci/voodoofb.c:1.34 src/sys/dev/pci/voodoofb.c:1.35
--- src/sys/dev/pci/voodoofb.c:1.34	Thu Jan 19 18:35:27 2012
+++ src/sys/dev/pci/voodoofb.c	Sun Jan 22 19:00:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: voodoofb.c,v 1.34 2012/01/19 18:35:27 macallan Exp $	*/
+/*	$NetBSD: voodoofb.c,v 1.35 2012/01/22 19:00:45 macallan Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: voodoofb.c,v 1.34 2012/01/19 18:35:27 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: voodoofb.c,v 1.35 2012/01/22 19:00:45 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1110,6 +1110,7 @@ voodoofb_ioctl(void *v, void *vs, u_long
 	   sc-sc_cmap_green[i],
 	   sc-sc_cmap_blue[i]);
 }
+voodoofb_clearscreen(sc);
 vcons_redraw_screen(ms);
 			} else {
 voodoofb_drm_unmap(sc);



CVS commit: src/lib/libc/stdio

2012-01-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jan 22 19:13:42 UTC 2012

Modified Files:
src/lib/libc/stdio: fseek.3

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/lib/libc/stdio/fseek.3

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

Modified files:

Index: src/lib/libc/stdio/fseek.3
diff -u src/lib/libc/stdio/fseek.3:1.26 src/lib/libc/stdio/fseek.3:1.27
--- src/lib/libc/stdio/fseek.3:1.26	Sun Jan 22 18:36:17 2012
+++ src/lib/libc/stdio/fseek.3	Sun Jan 22 19:13:42 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: fseek.3,v 1.26 2012/01/22 18:36:17 christos Exp $
+.\	$NetBSD: fseek.3,v 1.27 2012/01/22 19:13:42 wiz Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -132,7 +132,7 @@ In this implementations, an
 object is a complex object that represents both the position and the parse
 state of the stream making these routines are the only way to portably
 reposition a text stream.
-The 
+The
 .Ar pos
 argument of
 .Fn fsetpos



CVS commit: src/lib/libc/stdio

2012-01-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jan 22 19:13:48 UTC 2012

Modified Files:
src/lib/libc/stdio: funopen.3

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/stdio/funopen.3

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

Modified files:

Index: src/lib/libc/stdio/funopen.3
diff -u src/lib/libc/stdio/funopen.3:1.17 src/lib/libc/stdio/funopen.3:1.18
--- src/lib/libc/stdio/funopen.3:1.17	Sun Jan 22 18:36:17 2012
+++ src/lib/libc/stdio/funopen.3	Sun Jan 22 19:13:48 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: funopen.3,v 1.17 2012/01/22 18:36:17 christos Exp $
+.\	$NetBSD: funopen.3,v 1.18 2012/01/22 19:13:48 wiz Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -31,7 +31,7 @@
 .\
 .\ @(#)funopen.3	8.1 (Berkeley) 6/9/93
 .\
-.Dd September 9, 2011
+.Dd January 22, 2012
 .Dt FUNOPEN 3
 .Os
 .Sh NAME



CVS commit: src/external/gpl3/gdb/lib/libgdb/arch

2012-01-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 22 20:38:59 UTC 2012

Modified Files:
src/external/gpl3/gdb/lib/libgdb/arch/alpha: init.c
src/external/gpl3/gdb/lib/libgdb/arch/arm: init.c
src/external/gpl3/gdb/lib/libgdb/arch/armeb: init.c
src/external/gpl3/gdb/lib/libgdb/arch/hppa: init.c
src/external/gpl3/gdb/lib/libgdb/arch/i386: init.c
src/external/gpl3/gdb/lib/libgdb/arch/m68000: init.c
src/external/gpl3/gdb/lib/libgdb/arch/m68k: init.c
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb: init.c
src/external/gpl3/gdb/lib/libgdb/arch/mips64el: init.c
src/external/gpl3/gdb/lib/libgdb/arch/mipseb: init.c
src/external/gpl3/gdb/lib/libgdb/arch/mipsel: init.c
src/external/gpl3/gdb/lib/libgdb/arch/powerpc: init.c
src/external/gpl3/gdb/lib/libgdb/arch/powerpc64: init.c
src/external/gpl3/gdb/lib/libgdb/arch/sh3eb: init.c
src/external/gpl3/gdb/lib/libgdb/arch/sh3el: init.c
src/external/gpl3/gdb/lib/libgdb/arch/sparc: init.c
src/external/gpl3/gdb/lib/libgdb/arch/sparc64: init.c
src/external/gpl3/gdb/lib/libgdb/arch/vax: init.c

Log Message:
More cheating wrt mknative


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libgdb/arch/alpha/init.c
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/lib/libgdb/arch/arm/init.c
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libgdb/arch/armeb/init.c
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libgdb/arch/hppa/init.c
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libgdb/arch/i386/init.c
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libgdb/arch/m68000/init.c
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libgdb/arch/m68k/init.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64eb/init.c
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/lib/libgdb/arch/mips64el/init.c
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/lib/libgdb/arch/mipseb/init.c
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/lib/libgdb/arch/mipsel/init.c
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libgdb/arch/powerpc/init.c
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/lib/libgdb/arch/powerpc64/init.c
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libgdb/arch/sh3eb/init.c
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libgdb/arch/sh3el/init.c
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libgdb/arch/sparc/init.c
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libgdb/arch/sparc64/init.c
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gdb/lib/libgdb/arch/vax/init.c

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

Modified files:

Index: src/external/gpl3/gdb/lib/libgdb/arch/alpha/init.c
diff -u src/external/gpl3/gdb/lib/libgdb/arch/alpha/init.c:1.1 src/external/gpl3/gdb/lib/libgdb/arch/alpha/init.c:1.2
--- src/external/gpl3/gdb/lib/libgdb/arch/alpha/init.c:1.1	Mon Oct 10 22:18:01 2011
+++ src/external/gpl3/gdb/lib/libgdb/arch/alpha/init.c	Sun Jan 22 20:38:56 2012
@@ -126,6 +126,7 @@ extern initialize_file_ftype _initialize
 extern initialize_file_ftype _initialize_tui_stack;
 extern initialize_file_ftype _initialize_tui_win;
 extern initialize_file_ftype _initialize_python;
+extern initialize_file_ftype _initialize_nbsd_thread;
 void
 initialize_all_files (void)
 {
@@ -249,4 +250,5 @@ initialize_all_files (void)
   _initialize_tui_stack ();
   _initialize_tui_win ();
   _initialize_python ();
+  _initialize_nbsd_thread();
 }

Index: src/external/gpl3/gdb/lib/libgdb/arch/arm/init.c
diff -u src/external/gpl3/gdb/lib/libgdb/arch/arm/init.c:1.2 src/external/gpl3/gdb/lib/libgdb/arch/arm/init.c:1.3
--- src/external/gpl3/gdb/lib/libgdb/arch/arm/init.c:1.2	Mon Oct 10 23:14:49 2011
+++ src/external/gpl3/gdb/lib/libgdb/arch/arm/init.c	Sun Jan 22 20:38:56 2012
@@ -126,6 +126,7 @@ extern initialize_file_ftype _initialize
 extern initialize_file_ftype _initialize_tui_stack;
 extern initialize_file_ftype _initialize_tui_win;
 extern initialize_file_ftype _initialize_python;
+extern initialize_file_ftype _initialize_nbsd_thread;
 void
 initialize_all_files (void)
 {
@@ -249,4 +250,5 @@ initialize_all_files (void)
   _initialize_tui_stack ();
   _initialize_tui_win ();
   _initialize_python ();
+  _initialize_nbsd_thread();
 }

Index: src/external/gpl3/gdb/lib/libgdb/arch/armeb/init.c
diff -u src/external/gpl3/gdb/lib/libgdb/arch/armeb/init.c:1.1 src/external/gpl3/gdb/lib/libgdb/arch/armeb/init.c:1.2
--- src/external/gpl3/gdb/lib/libgdb/arch/armeb/init.c:1.1	Sun Oct 30 00:14:19 2011
+++ src/external/gpl3/gdb/lib/libgdb/arch/armeb/init.c	Sun Jan 22 20:38:57 2012
@@ -126,6 +126,7 @@ extern initialize_file_ftype _initialize
 extern initialize_file_ftype _initialize_tui_stack;
 extern initialize_file_ftype _initialize_tui_win;
 extern initialize_file_ftype _initialize_python;
+extern initialize_file_ftype 

CVS commit: src/sys/dev/ic

2012-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jan 22 20:41:25 UTC 2012

Modified Files:
src/sys/dev/ic: tpm.c tpmreg.h tpmvar.h

Log Message:
cosmetic fixes


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/tpm.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/tpmreg.h src/sys/dev/ic/tpmvar.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/ic/tpm.c
diff -u src/sys/dev/ic/tpm.c:1.2 src/sys/dev/ic/tpm.c:1.3
--- src/sys/dev/ic/tpm.c:1.2	Sun Jan 22 11:35:39 2012
+++ src/sys/dev/ic/tpm.c	Sun Jan 22 15:41:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: tpm.c,v 1.2 2012/01/22 16:35:39 christos Exp $	*/
+/*	$NetBSD: tpm.c,v 1.3 2012/01/22 20:41:25 christos Exp $	*/
 /*
  * Copyright (c) 2008, 2009 Michael Shalayeff
  * Copyright (c) 2009, 2010 Hans-Jörg Höxer
@@ -18,9 +18,12 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tpm.c,v 1.2 2012/01/22 16:35:39 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: tpm.c,v 1.3 2012/01/22 20:41:25 christos Exp $);
 
-/* #define	TPM_DEBUG */
+#if 0
+#define	TPM_DEBUG 
+#define aprint_debug_dev aprint_error_dev
+#endif
 
 #include sys/param.h
 #include sys/systm.h
@@ -93,12 +96,12 @@ tpm_tis12_probe(bus_space_tag_t bt, bus_
 #ifdef TPM_DEBUG
 	char buf[128];
 	snprintb(buf, sizeof(buf), TPM_CAPBITS, r);
-	printf(tpm: caps=%s\n, buf);
+	printf(%s: caps=%s\n, __func__, buf);
 #endif
 	if ((r  TPM_CAPSREQ) != TPM_CAPSREQ ||
 	!(r  (TPM_INTF_INT_EDGE_RISING | TPM_INTF_INT_LEVEL_LOW))) {
 #ifdef TPM_DEBUG
-		printf(tpm: caps too low (caps=%s)\n, buf);
+		printf(%s: caps too low (caps=%s)\n, __func__, buf);
 #endif
 		return 0;
 	}
@@ -162,7 +165,7 @@ tpm_tis12_init(struct tpm_softc *sc, int
 #ifdef TPM_DEBUG
 	char cbuf[128];
 	snprintb(cbuf, sizeof(cbuf), TPM_CAPBITS, r);
-	aprint_debug_dev(sc-sc_dev,  caps=%s , cbuf);
+	aprint_debug_dev(sc-sc_dev, %s: caps=%s , __func__, cbuf);
 #endif
 	if ((r  TPM_CAPSREQ) != TPM_CAPSREQ ||
 	!(r  (TPM_INTF_INT_EDGE_RISING | TPM_INTF_INT_LEVEL_LOW))) {
@@ -225,8 +228,8 @@ tpm_request_locality(struct tpm_softc *s
 		rv = tsleep(sc-sc_init, PRIBIO | PCATCH, tpm_locality, 1);
 		if (rv   rv != EWOULDBLOCK) {
 #ifdef TPM_DEBUG
-			aprint_debug_dev(sc-sc_dev,
-			tpm_request_locality: interrupted %d\n, rv);
+			aprint_debug_dev(sc-sc_dev, %s: interrupted %d\n,
+			__func__, rv);
 #endif
 			return rv;
 		}
@@ -236,9 +239,8 @@ tpm_request_locality(struct tpm_softc *s
 	(TPM_ACCESS_VALID | TPM_ACCESS_ACTIVE_LOCALITY)) {
 #ifdef TPM_DEBUG
 		char buf[128];
-		snprintb(buf, sizeof(buf), TPM_CAPBITS, r);
-		aprint_debug_dev(sc-sc_dev,
-		tpm_request_locality: access %s\n, buf);
+		snprintb(buf, sizeof(buf), TPM_ACCESS_BITS, r);
+		aprint_debug_dev(sc-sc_dev, %s: access %s\n, __func__, buf);
 #endif
 		return EBUSY;
 	}
@@ -264,7 +266,7 @@ tpm_getburst(struct tpm_softc *sc)
 		burst |= bus_space_read_1(sc-sc_bt, sc-sc_bh, TPM_STS + 2)
 		 8;
 #ifdef TPM_DEBUG
-		aprint_debug_dev(sc-sc_dev, tpm_getburst: read %d\n, burst);
+		aprint_debug_dev(sc-sc_dev, %s: read %d\n, __func__, burst);
 #endif
 		if (burst)
 			return burst;
@@ -281,12 +283,7 @@ tpm_getburst(struct tpm_softc *sc)
 uint8_t
 tpm_status(struct tpm_softc *sc)
 {
-	uint8_t status;
-
-	status = bus_space_read_1(sc-sc_bt, sc-sc_bh, TPM_STS) 
-	TPM_STS_MASK;
-
-	return status;
+	return bus_space_read_1(sc-sc_bt, sc-sc_bh, TPM_STS)  TPM_STS_MASK;
 }
 
 int
@@ -305,7 +302,7 @@ bool
 tpm_suspend(device_t dev, const pmf_qual_t *qual)
 {
 	struct tpm_softc *sc = device_private(dev);
-	uint8_t command[] = {
+	static const uint8_t command[] = {
 	0, 193,		/* TPM_TAG_RQU_COMMAND */
 	0, 0, 0, 10,	/* Length in bytes */
 	0, 0, 0, 156	/* TPM_ORD_SaveStates */
@@ -314,10 +311,10 @@ tpm_suspend(device_t dev, const pmf_qual
 	/*
 	 * Power down:  We have to issue the SaveStates command.
 	 */
-	sc-sc_write(sc, command, sizeof(command));
-	sc-sc_read(sc, command, sizeof(command), NULL, TPM_HDRSIZE);
+	(*sc-sc_write)(sc, command, sizeof(command));
+	(*sc-sc_read)(sc, command, sizeof(command), NULL, TPM_HDRSIZE);
 #ifdef TPM_DEBUG
-	aprint_debug_dev(sc-sc_dev, tpm_suspend: power down\n);
+	aprint_debug_dev(sc-sc_dev, %s: power down\n, __func__);
 #endif
 	return 0;
 }
@@ -331,7 +328,7 @@ tpm_resume(device_t dev, const pmf_qual_
 {
 #ifdef TPM_DEBUG
 	struct tpm_softc *sc = device_private(dev);
-	aprint_debug_dev(sc-sc_dev, tpm_resume: resume\n);
+	aprint_debug_dev(sc-sc_dev, %s: resume\n, __func__);
 #endif
 	return 0;
 }
@@ -351,7 +348,7 @@ tpm_waitfor_poll(struct tpm_softc *sc, u
 		if (rv  rv != EWOULDBLOCK) {
 #ifdef TPM_DEBUG
 			aprint_debug_dev(sc-sc_dev,
-			tpm_waitfor_poll: interrupted %d\n, rv);
+			%s: interrupted %d\n, __func__, rv);
 #endif
 			return rv;
 		}
@@ -397,7 +394,7 @@ tpm_waitfor_int(struct tpm_softc *sc, ui
 	to = tpm_tmotohz(tmo);
 #ifdef TPM_DEBUG
 	aprint_debug_dev(sc-sc_dev,
-	

CVS commit: src/external/gpl3/gdb/dist/gdb

2012-01-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jan 22 22:04:48 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: hppanbsd-nat.c

Log Message:
Provide {supply,fill}_{g,fp}regset


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c:1.2 src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c:1.3
--- src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c:1.2	Sun Jan 22 20:27:28 2012
+++ src/external/gpl3/gdb/dist/gdb/hppanbsd-nat.c	Sun Jan 22 22:04:48 2012
@@ -30,6 +30,16 @@
 
 #include nbsd-nat.h
 
+#ifndef HAVE_GREGSET_T
+typedef struct reg gregset_t;
+#endif
+
+#ifndef HAVE_FPREGSET_T
+typedef struct fpreg fpregset_t;
+#endif
+
+#include gregset.h
+
 static int
 hppanbsd_gregset_supplies_p (int regnum)
 {
@@ -138,7 +148,7 @@ hppanbsd_collect_gregset (const struct r
in FPREGS.  */
 
 static void
-hppanbsd_collect_fpregset (struct regcache *regcache,
+hppanbsd_collect_fpregset (const struct regcache *regcache,
 			  void *fpregs, int regnum)
 {
   char *regs = fpregs;
@@ -224,6 +234,44 @@ hppanbsd_store_registers (struct target_
 }
 }
 
+void
+supply_gregset (struct regcache *regcache, const gregset_t *gregsetp)
+{
+  hppanbsd_supply_gregset (regcache, gregsetp);
+}
+
+/* Fill register REGNUM (if it is a general-purpose register) in
+   *GREGSETP with the value in GDB's register cache.  If REGNUM is -1,
+   do this for all registers.  */
+
+void
+fill_gregset (const struct regcache *regcache,
+  gregset_t *gregsetp, int regnum)
+{
+  hppanbsd_collect_gregset (regcache, gregsetp, regnum);
+}
+
+/* Transfering floating-point registers between GDB, inferiors and cores.  */
+
+/* Fill GDB's register cache with the floating-point and SSE register
+   values in *FPREGSETP.  */
+
+void
+supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
+{
+  hppanbsd_supply_fpregset (regcache, fpregsetp);
+}
+
+/* Fill register REGNUM (if it is a floating-point or SSE register) in
+   *FPREGSETP with the value in GDB's register cache.  If REGNUM is
+   -1, do this for all registers.  */
+
+void
+fill_fpregset (const struct regcache *regcache,
+   fpregset_t *fpregsetp, int regnum)
+{
+  hppanbsd_collect_fpregset (regcache, fpregsetp, regnum);
+}
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 void _initialize_hppanbsd_nat (void);



CVS commit: src/share/man/man4

2012-01-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jan 23 00:02:42 UTC 2012

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

Log Message:
Improve wording.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/share/man/man4/ipsec.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/ipsec.4
diff -u src/share/man/man4/ipsec.4:1.36 src/share/man/man4/ipsec.4:1.37
--- src/share/man/man4/ipsec.4:1.36	Tue Jan 17 08:20:58 2012
+++ src/share/man/man4/ipsec.4	Mon Jan 23 00:02:42 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: ipsec.4,v 1.36 2012/01/17 08:20:58 wiz Exp $
+.\	$NetBSD: ipsec.4,v 1.37 2012/01/23 00:02:42 wiz Exp $
 .\	$KAME: ipsec.4,v 1.17 2001/06/27 15:25:10 itojun Exp $
 .\
 .\ Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -299,7 +299,8 @@ routines from looking into IP payload.
 The IPsec support is subject to change as the IPsec protocols develop.
 .Pp
 There is no single standard for policy engine API,
-so the policy engine API described herein is just for KAME implementation.
+so the policy engine API described herein is just for the version
+introduced by KAME.
 .Pp
 AH and tunnel mode encapsulation may not work as you might expect.
 If you configure inbound



CVS commit: src/share/man/man4

2012-01-22 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jan 23 00:03:08 UTC 2012

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

Log Message:
Remove a fixed bug and an inappropriate sentence. Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/man/man4/fast_ipsec.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/fast_ipsec.4
diff -u src/share/man/man4/fast_ipsec.4:1.11 src/share/man/man4/fast_ipsec.4:1.12
--- src/share/man/man4/fast_ipsec.4:1.11	Mon Jan  9 16:17:37 2012
+++ src/share/man/man4/fast_ipsec.4	Mon Jan 23 00:03:08 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: fast_ipsec.4,v 1.11 2012/01/09 16:17:37 drochner Exp $
+.\	$NetBSD: fast_ipsec.4,v 1.12 2012/01/23 00:03:08 wiz Exp $
 .\	$FreeBSD: fast_ipsec.4,v 1.2 2003/03/03 11:51:30 ru Exp $
 .\
 .\ Copyright (c) 2004
@@ -28,7 +28,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\ THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd January 9, 2012
+.Dd January 23, 2012
 .Dt FAST_IPSEC 4
 .Os
 .Sh NAME
@@ -61,7 +61,6 @@ Fast IPsec
 implementation is intended to be compatible with the
 .Tn KAME IPsec
 implementation.
-This documentation concentrates on differences from that software.
 The user should refer to
 .Xr ipsec 4
 for basic information on setting up and using these protocols.
@@ -113,11 +112,6 @@ Support for IPSEC_NAT_T
 described in RFCs 3947 and 3948) has been added in
 .Nx 5.0 .
 .Sh BUGS
-There still are some issues in the IPv6 support.
-In particular
-.Tn FAST_IPSEC
-does not protect packets with IPv6 extension headers.
-.Pp
 Certain legacy authentication algorithms are not supported because of
 issues with the
 .Xr opencrypto 9



CVS commit: src/external/ibm-public/postfix/man/man5

2012-01-22 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Jan 23 01:28:57 UTC 2012

Modified Files:
src/external/ibm-public/postfix/man/man5: Makefile

Log Message:
Reflect reality, the LDAP man page is installed


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/ibm-public/postfix/man/man5/Makefile

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

Modified files:

Index: src/external/ibm-public/postfix/man/man5/Makefile
diff -u src/external/ibm-public/postfix/man/man5/Makefile:1.1 src/external/ibm-public/postfix/man/man5/Makefile:1.2
--- src/external/ibm-public/postfix/man/man5/Makefile:1.1	Tue Jun 23 15:02:52 2009
+++ src/external/ibm-public/postfix/man/man5/Makefile	Mon Jan 23 01:28:56 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2009/06/23 15:02:52 tron Exp $
+#	$NetBSD: Makefile,v 1.2 2012/01/23 01:28:56 joerg Exp $
 
 .include bsd.own.mk
 
@@ -15,6 +15,6 @@ MLINKS=	header_checks.5 body_checks.5
 
 # XXX notyet:
 # The base install does include support for these:
-# ldap_table.5 mysql_table.5 pgsql_table.5
+# mysql_table.5 pgsql_table.5
 
 .include bsd.man.mk



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

2012-01-22 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Mon Jan 23 01:58:55 UTC 2012

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

Log Message:
Restructured, based on macppc and ofppc.
Added some new options and pseudo-devices.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/sandpoint/conf/GENERIC

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

Modified files:

Index: src/sys/arch/sandpoint/conf/GENERIC
diff -u src/sys/arch/sandpoint/conf/GENERIC:1.66 src/sys/arch/sandpoint/conf/GENERIC:1.67
--- src/sys/arch/sandpoint/conf/GENERIC:1.66	Sat Jan 14 19:39:25 2012
+++ src/sys/arch/sandpoint/conf/GENERIC	Mon Jan 23 01:58:54 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.66 2012/01/14 19:39:25 phx Exp $
+# $NetBSD: GENERIC,v 1.67 2012/01/23 01:58:54 phx Exp $
 #
 # machine description file for GENERIC NAS
 # 
@@ -22,33 +22,46 @@ include 	arch/sandpoint/conf/std.sandpo
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.66 $
+#ident 		GENERIC-$Revision: 1.67 $
 
 maxusers	32
 
 #options 	ALTIVEC		# Include AltiVec support
 
-#options 	IPKDBUSERHACK	# Allow access to mapped memory via kgdb
-#options 	DEBUG_BY_TOOLS	# Allow debugging from toolsnet
-# HMAC key to be used for debugging sessions
-#options 	IPKDBKEY=\HMAC pass phrase text\
-#options 	IPKDBSECURE	# Allow debugging even when securelevel  0
-#makeoptions	DEBUG=-g
+# Standard system options
+#options 	INSECURE	# disable kernel security levels
 
-#options 	MODULAR			# module(7) support
+options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
+options 	KTRACE
 
-#options 	DEBUG
-#options 	DIAGNOSTIC
-options 	TRAP_PANICWAIT
+#options 	SYSVMSG		# System V message queues
+#options 	SYSVSEM		# System V semaphores
+#options 	SYSVSHM		# System V shared memory
+#options 	P1003_1B_SEMAPHORE # p1003.1b semaphore support
+
+#options 	MODULAR		# module(7) support
+#options 	USERCONF	# userconf(4) support
+
+#options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
+options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
+
+# Enable experimental buffer queue strategy for better responsiveness under
+# high disk I/O load. Use it with caution - it's not proven to be stable yet.
+#options 	BUFQ_READPRIO
+#options 	BUFQ_PRIOCSCAN
+
+# Diagnostic/debugging support options
+#options 	DIAGNOSTIC	# cheap kernel consistency checks
+#options 	DEBUG		# expensive debugging checks/support
 options 	DDB
 #options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
-options 	KTRACE
+#options 	TRAP_PANICWAIT
 #options 	PMAPCHECK
 #options 	PMAPDEBUG
 #options 	SYMTAB_SPACE=30
-#options 	USERCONF	# userconf(4) support
-#options 	PIPE_SOCKETPAIR		# smaller, but slower pipe(2)
-options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
+options 	MSGBUFSIZE=65536
+
+#makeoptions	DEBUG=-g
 
 # Compatibility options
 options 	COMPAT_NOMID	# NetBSD 0.8, 386BSD, and BSDI
@@ -66,13 +79,18 @@ options 	COMPAT_40	# NetBSD 4.0
 options 	COMPAT_50	# NetBSD 5.0 compatibility.
 options 	COMPAT_43	# 4.3BSD, 386BSD, and BSDI
 #options 	COMPAT_386BSD_MBRPART	# recognize old partition ID
+#options 	COMPAT_LINUX	# binary compatibility with Linux
 #options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
-
-options 	COMPAT_LINUX	# binary compatibility with Linux
 options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
 
-options 	MSGBUFSIZE=65536
+# Wedge support
+#options 	DKWEDGE_AUTODISCOVER	# Automatically add dk(4) instances
+#options 	DKWEDGE_METHOD_GPT	# Supports GPT partitions as wedges
+# The following two options can break /etc/fstab, so handle with care
+#options 	DKWEDGE_METHOD_BSDLABEL	# Support disklabel entries as wedges
+#options 	DKWEDGE_METHOD_MBR	# Support MBR partitions as wedges
 
+# File systems
 file-system 	FFS		# UFS
 file-system 	EXT2FS		# second extended file system (linux)
 #file-system 	LFS		# log-structured file system
@@ -102,6 +120,9 @@ options 	NFSSERVER	# Network File System
 #options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 #options 	EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
 
+#options 	NFS_BOOT_DHCP
+options 	NFS_BOOT_BOOTPARAM,NFS_BOOT_BOOTP
+
 # Networking options
 #options 	GATEWAY		# packet forwarding
 options 	INET		# IP + ICMP + TCP + UDP
@@ -138,41 +159,21 @@ options 	INET6		# IPV6
 #options 	ALTQ_RIO	# RED with IN/OUT
 #options 	ALTQ_WFQ	# Weighted Fair Queueing
 
-options 	NFS_BOOT_BOOTPARAM,NFS_BOOT_BOOTP
+# These options enable verbose messages for several subsystems.
+# Warning, these may compile large string tables into the kernel!
+#options 	PCIVERBOSE	# verbose PCI device autoconfig messages
+#options 	MIIVERBOSE	# verbose PHY autoconfig messages
+#options 	PCI_CONFIG_DUMP	# verbosely dump PCI config space
+#options 	SCSIVERBOSE	# human readable SCSI error messages
+#options 	USBVERBOSE	# verbose USB device autoconfig messages
 
+# 

CVS commit: src/common/lib/libutil

2012-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 23 02:34:01 UTC 2012

Modified Files:
src/common/lib/libutil: snprintb.c

Log Message:
In the new format F did not print a separator as required.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libutil/snprintb.c

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

Modified files:

Index: src/common/lib/libutil/snprintb.c
diff -u src/common/lib/libutil/snprintb.c:1.5 src/common/lib/libutil/snprintb.c:1.6
--- src/common/lib/libutil/snprintb.c:1.5	Tue May 12 22:50:31 2009
+++ src/common/lib/libutil/snprintb.c	Sun Jan 22 21:34:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: snprintb.c,v 1.5 2009/05/13 02:50:31 pgoyette Exp $	*/
+/*	$NetBSD: snprintb.c,v 1.6 2012/01/23 02:34:01 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 
 #  include sys/cdefs.h
 #  if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: snprintb.c,v 1.5 2009/05/13 02:50:31 pgoyette Exp $);
+__RCSID($NetBSD: snprintb.c,v 1.6 2012/01/23 02:34:01 christos Exp $);
 #  endif
 
 #  include sys/types.h
@@ -51,7 +51,7 @@ __RCSID($NetBSD: snprintb.c,v 1.5 2009/
 #  include errno.h
 # else
 #  include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: snprintb.c,v 1.5 2009/05/13 02:50:31 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: snprintb.c,v 1.6 2012/01/23 02:34:01 christos Exp $);
 #  include sys/param.h
 #  include sys/inttypes.h
 #  include sys/systm.h
@@ -209,9 +209,9 @@ snprintb_m(char *buf, size_t buflen, con
 f_len = *bitfmt++;	/* field length */
 field = (val  bit) 
 	(((uint64_t)1  f_len) - 1);
+PUTSEP;
 if (ch == 'F')	/* just extract */
 	break;
-PUTSEP;
 if (restart == 0) {
 	sep = ',';
 	PUTS(bitfmt);



CVS commit: [yamt-pagecache] src/sys/uvm

2012-01-22 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Mon Jan 23 03:21:18 UTC 2012

Modified Files:
src/sys/uvm [yamt-pagecache]: uvm_anon.c

Log Message:
fix swapoff locking


To generate a diff of this commit:
cvs rdiff -u -r1.62.2.2 -r1.62.2.3 src/sys/uvm/uvm_anon.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_anon.c
diff -u src/sys/uvm/uvm_anon.c:1.62.2.2 src/sys/uvm/uvm_anon.c:1.62.2.3
--- src/sys/uvm/uvm_anon.c:1.62.2.2	Mon Dec 26 16:03:10 2011
+++ src/sys/uvm/uvm_anon.c	Mon Jan 23 03:21:18 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_anon.c,v 1.62.2.2 2011/12/26 16:03:10 yamt Exp $	*/
+/*	$NetBSD: uvm_anon.c,v 1.62.2.3 2012/01/23 03:21:18 yamt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_anon.c,v 1.62.2.2 2011/12/26 16:03:10 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_anon.c,v 1.62.2.3 2012/01/23 03:21:18 yamt Exp $);
 
 #include opt_uvmhist.h
 
@@ -348,10 +348,7 @@ uvm_anon_pagein(struct vm_amap *amap, st
 		wakeup(pg);
 	}
 
-	mutex_exit(anon-an_lock);
-	if (uobj) {
-		mutex_exit(uobj-vmobjlock);
-	}
+	amap_unlock(amap);
 	return false;
 }
 



CVS commit: src/common/lib/libutil

2012-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 23 03:22:41 UTC 2012

Modified Files:
src/common/lib/libutil: snprintb.c

Log Message:
also handle the separator after the F field.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/common/lib/libutil/snprintb.c

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

Modified files:

Index: src/common/lib/libutil/snprintb.c
diff -u src/common/lib/libutil/snprintb.c:1.6 src/common/lib/libutil/snprintb.c:1.7
--- src/common/lib/libutil/snprintb.c:1.6	Sun Jan 22 21:34:01 2012
+++ src/common/lib/libutil/snprintb.c	Sun Jan 22 22:22:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: snprintb.c,v 1.6 2012/01/23 02:34:01 christos Exp $	*/
+/*	$NetBSD: snprintb.c,v 1.7 2012/01/23 03:22:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 
 #  include sys/cdefs.h
 #  if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: snprintb.c,v 1.6 2012/01/23 02:34:01 christos Exp $);
+__RCSID($NetBSD: snprintb.c,v 1.7 2012/01/23 03:22:41 christos Exp $);
 #  endif
 
 #  include sys/types.h
@@ -51,7 +51,7 @@ __RCSID($NetBSD: snprintb.c,v 1.6 2012/
 #  include errno.h
 # else
 #  include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: snprintb.c,v 1.6 2012/01/23 02:34:01 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: snprintb.c,v 1.7 2012/01/23 03:22:41 christos Exp $);
 #  include sys/param.h
 #  include sys/inttypes.h
 #  include sys/systm.h
@@ -137,7 +137,7 @@ snprintb_m(char *buf, size_t buflen, con
 			STORE('');	\
 		} else {		\
 			/* Remember separator location */		\
-			if ( l_max  0  sep != '') {			\
+			if (l_max  0  sep != '') {			\
 s_len = l_len;\
 s_bp  = bp;\
 s_fmt = cur_fmt;			\
@@ -210,13 +210,12 @@ snprintb_m(char *buf, size_t buflen, con
 field = (val  bit) 
 	(((uint64_t)1  f_len) - 1);
 PUTSEP;
+if (restart == 0)
+	sep = ',';
 if (ch == 'F')	/* just extract */
 	break;
 if (restart == 0) {
-	sep = ',';
 	PUTS(bitfmt);
-}
-if (restart == 0) {
 	PUTCHR('=');
 }
 if (restart == 0) {



CVS commit: src/sys/dev/ic

2012-01-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 23 04:12:26 UTC 2012

Modified Files:
src/sys/dev/ic: tpm.c tpmreg.h

Log Message:
reduce the polling interval to 2 seconds, and try harder to get interrupts
working.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/tpm.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/tpmreg.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/ic/tpm.c
diff -u src/sys/dev/ic/tpm.c:1.3 src/sys/dev/ic/tpm.c:1.4
--- src/sys/dev/ic/tpm.c:1.3	Sun Jan 22 15:41:25 2012
+++ src/sys/dev/ic/tpm.c	Sun Jan 22 23:12:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: tpm.c,v 1.3 2012/01/22 20:41:25 christos Exp $	*/
+/*	$NetBSD: tpm.c,v 1.4 2012/01/23 04:12:26 christos Exp $	*/
 /*
  * Copyright (c) 2008, 2009 Michael Shalayeff
  * Copyright (c) 2009, 2010 Hans-Jörg Höxer
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tpm.c,v 1.3 2012/01/22 20:41:25 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: tpm.c,v 1.4 2012/01/23 04:12:26 christos Exp $);
 
 #if 0
 #define	TPM_DEBUG 
@@ -132,24 +132,40 @@ tpm_tis12_irqinit(struct tpm_softc *sc, 
 	}
 
 	/* Ack and disable all interrupts. */
+	r = bus_space_read_4(sc-sc_bt, sc-sc_bh, TPM_INTERRUPT_ENABLE);
 	bus_space_write_4(sc-sc_bt, sc-sc_bh, TPM_INTERRUPT_ENABLE,
-	bus_space_read_4(sc-sc_bt, sc-sc_bh, TPM_INTERRUPT_ENABLE) 
-	~TPM_GLOBAL_INT_ENABLE);
+	r  ~TPM_GLOBAL_INT_ENABLE);
 	bus_space_write_4(sc-sc_bt, sc-sc_bh, TPM_INT_STATUS,
 	bus_space_read_4(sc-sc_bt, sc-sc_bh, TPM_INT_STATUS));
+#ifdef TPM_DEBUG
+	char buf[128];
+	snprintb(buf, sizeof(buf), TPM_INTERRUPT_ENABLE_BITS, r);
+	aprint_debug_dev(sc-sc_dev, %s: before ien %s\n, __func__, buf);
+#endif
 
 	/* Program interrupt vector. */
 	bus_space_write_1(sc-sc_bt, sc-sc_bh, TPM_INT_VECTOR, irq);
 	sc-sc_vector = irq;
 
 	/* Program interrupt type. */
+	r = ~(TPM_INT_EDGE_RISING|TPM_INT_EDGE_FALLING|TPM_INT_LEVEL_HIGH|
+	TPM_INT_LEVEL_LOW);
+	r |= TPM_GLOBAL_INT_ENABLE|TPM_CMD_READY_INT|TPM_LOCALITY_CHANGE_INT|
+	TPM_STS_VALID_INT|TPM_DATA_AVAIL_INT;
 	if (sc-sc_capabilities  TPM_INTF_INT_EDGE_RISING)
-		r = TPM_INT_EDGE_RISING;
+		r |= TPM_INT_EDGE_RISING;
+	else if (sc-sc_capabilities  TPM_INTF_INT_EDGE_FALLING)
+		r |= TPM_INT_EDGE_FALLING;
 	else if (sc-sc_capabilities  TPM_INTF_INT_LEVEL_HIGH)
-		r = TPM_INT_LEVEL_HIGH;
+		r |= TPM_INT_LEVEL_HIGH;
 	else
-		r = TPM_INT_LEVEL_LOW;
+		r |= TPM_INT_LEVEL_LOW;
+
 	bus_space_write_4(sc-sc_bt, sc-sc_bh, TPM_INTERRUPT_ENABLE, r);
+#ifdef TPM_DEBUG
+	snprintb(buf, sizeof(buf), TPM_INTERRUPT_ENABLE_BITS, r);
+	aprint_debug_dev(sc-sc_dev, %s: after ien %s\n, __func__, buf);
+#endif
 
 	return 0;
 }

Index: src/sys/dev/ic/tpmreg.h
diff -u src/sys/dev/ic/tpmreg.h:1.2 src/sys/dev/ic/tpmreg.h:1.3
--- src/sys/dev/ic/tpmreg.h:1.2	Sun Jan 22 15:41:25 2012
+++ src/sys/dev/ic/tpmreg.h	Sun Jan 22 23:12:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: tpmreg.h,v 1.2 2012/01/22 20:41:25 christos Exp $	*/
+/*	$NetBSD: tpmreg.h,v 1.3 2012/01/23 04:12:26 christos Exp $	*/
 
 /*
  * Copyright (c) 2008, 2009 Michael Shalayeff
@@ -46,7 +46,9 @@
 #define	TPM_STS_VALID_INT	0x0002	/* int on TPM_STS_VALID is set */
 #define	TPM_DATA_AVAIL_INT	0x0001	/* int on TPM_STS_DATA_AVAIL is set */
 #define	TPM_INTERRUPT_ENABLE_BITS \
-\020\040ENA\010RDY\03LOCH\02STSV\01DRDY
+\177\020b\0DRDY\0b\1STSVALID\0b\2LOCCHG\0 \
+F\3\2:\0HIGH\0:\1LOW\0:\2RISE\0:\3FALL\0 \
+b\7IRDY\0b\x1fGIENABLE\0
 
 #define	TPM_INT_VECTOR		0x000c	/* 8 bit reg for 4 bit irq vector */
 #define	TPM_INT_STATUS		0x0010	/* bits are  0x87 from TPM_INTERRUPT_ENABLE */
@@ -84,7 +86,7 @@
 
 #define	TPM_ACCESS_TMO	2000		/* 2sec */
 #define	TPM_READY_TMO	2000		/* 2sec */
-#define	TPM_READ_TMO	12		/* 2 minutes */
+#define	TPM_READ_TMO	2000		/* 2sec */
 #define TPM_BURST_TMO	2000		/* 2sec */
 
 #define	TPM_LEGACY_BUSY	0x01



CVS commit: src/external/gpl3/gdb/dist/gdb

2012-01-22 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jan 23 06:17:59 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb: i386nbsd-nat.c

Log Message:
Provide {supply,fill}_{g,fp}regset


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/i386nbsd-nat.c

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/i386nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/i386nbsd-nat.c:1.2 src/external/gpl3/gdb/dist/gdb/i386nbsd-nat.c:1.3
--- src/external/gpl3/gdb/dist/gdb/i386nbsd-nat.c:1.2	Sun Sep 25 16:30:24 2011
+++ src/external/gpl3/gdb/dist/gdb/i386nbsd-nat.c	Mon Jan 23 06:17:58 2012
@@ -24,17 +24,29 @@
 #include target.h
 
 #include i386-tdep.h
+#include i387-tdep.h
 #include i386bsd-nat.h
 
 /* Support for debugging kernel virtual memory images.  */
 
 #include sys/types.h
+#include machine/reg.h
 #include machine/frame.h
 #include machine/pcb.h
 
 #include nbsd-nat.h
 #include bsd-kvm.h
 
+#ifndef HAVE_GREGSET_T
+typedef struct reg gregset_t;
+#endif
+
+#ifndef HAVE_FPREGSET_T
+typedef struct fpreg fpregset_t;
+#endif
+
+#include gregset.h 
+
 static int
 i386nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
 {
@@ -97,6 +109,45 @@ i386nbsd_supply_pcb (struct regcache *re
   return 1;
 }
 
+void
+supply_gregset (struct regcache *regcache, const gregset_t *gregsetp)
+{
+  i386bsd_supply_gregset (regcache, gregsetp);
+}
+
+/* Fill register REGNUM (if it is a general-purpose register) in
+   *GREGSETP with the value in GDB's register cache.  If REGNUM is -1,
+   do this for all registers.  */
+
+void
+fill_gregset (const struct regcache *regcache,
+  gregset_t *gregsetp, int regnum)
+{
+  i386bsd_collect_gregset (regcache, gregsetp, regnum);
+}
+
+/* Transfering floating-point registers between GDB, inferiors and cores.  */
+   
+/* Fill GDB's register cache with the floating-point and SSE register
+   values in *FPREGSETP.  */
+
+void
+supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
+{  
+  i387_supply_fsave (regcache, -1, fpregsetp);
+}
+   
+/* Fill register REGNUM (if it is a floating-point or SSE register) in
+   *FPREGSETP with the value in GDB's register cache.  If REGNUM is
+   -1, do this for all registers.  */
+
+void
+fill_fpregset (const struct regcache *regcache,
+   fpregset_t *fpregsetp, int regnum)
+{
+  i387_collect_fsave (regcache, regnum, fpregsetp);
+}
+
 
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 void _initialize_i386nbsd_nat (void);