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

2010-10-27 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Oct 27 10:33:23 UTC 2010

Modified Files:
src/sys/arch/bebox/include: bootinfo.h

Log Message:
Add macro BTINFO_ROOTDEVICE and struct btinfo_rootdevice.
And indent.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/bebox/include/bootinfo.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/bebox/include/bootinfo.h
diff -u src/sys/arch/bebox/include/bootinfo.h:1.5 src/sys/arch/bebox/include/bootinfo.h:1.6
--- src/sys/arch/bebox/include/bootinfo.h:1.5	Sat Mar 14 14:45:58 2009
+++ src/sys/arch/bebox/include/bootinfo.h	Wed Oct 27 10:33:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootinfo.h,v 1.5 2009/03/14 14:45:58 dsl Exp $	*/
+/*	$NetBSD: bootinfo.h,v 1.6 2010/10/27 10:33:23 kiyohara Exp $	*/
 
 /*
  * Copyright (c) 1997
@@ -34,9 +34,10 @@
 	int type;
 };
 
-#define BTINFO_MEMORY	0
-#define BTINFO_CONSOLE	1
-#define	BTINFO_CLOCK	2
+#define BTINFO_MEMORY		0
+#define BTINFO_CONSOLE		1
+#define BTINFO_CLOCK		2
+#define BTINFO_ROOTDEVICE	3
 
 struct btinfo_memory {
 	struct btinfo_common common;
@@ -55,6 +56,11 @@
 	int ticks_per_sec;
 };
 
+struct btinfo_rootdevice {
+	struct btinfo_common common;
+	char rootdevice[80];			/*  */
+};
+
 #ifdef _KERNEL
 void *lookup_bootinfo(int);
 #endif



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-27 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Oct 27 10:37:38 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: boot.c

Log Message:
Set root-device to bootinfo.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/bebox/stand/boot/boot.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/bebox/stand/boot/boot.c
diff -u src/sys/arch/bebox/stand/boot/boot.c:1.23 src/sys/arch/bebox/stand/boot/boot.c:1.24
--- src/sys/arch/bebox/stand/boot/boot.c:1.23	Thu Oct 14 06:58:22 2010
+++ src/sys/arch/bebox/stand/boot/boot.c	Wed Oct 27 10:37:38 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.23 2010/10/14 06:58:22 kiyohara Exp $	*/
+/*	$NetBSD: boot.c,v 1.24 2010/10/27 10:37:38 kiyohara Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -61,6 +61,7 @@
 struct btinfo_memory btinfo_memory;
 struct btinfo_console btinfo_console;
 struct btinfo_clock btinfo_clock;
+struct btinfo_rootdevice btinfo_rootdevice;
 
 extern char bootprog_name[], bootprog_rev[], bootprog_maker[], bootprog_date[];
 
@@ -73,7 +74,7 @@
 	int n = 0;
 	int addr, speed;
 	char *name, *cnname;
-	void *p, *bootinfo;
+	void *bootinfo;
 
 	if (whichCPU() == 1)
 		cpu1();
@@ -114,13 +115,6 @@
 	btinfo_clock.common.type = BTINFO_CLOCK;
 	btinfo_clock.ticks_per_sec = TICKS_PER_SEC;
 
-	p = bootinfo;
-	memcpy(p, (void *)btinfo_memory, sizeof (btinfo_memory));
-	p += sizeof (btinfo_memory);
-	memcpy(p, (void *)btinfo_console, sizeof (btinfo_console));
-	p += sizeof (btinfo_console);
-	memcpy(p, (void *)btinfo_clock, sizeof (btinfo_clock));
-
 	runCPU1((void *)start_CPU1);
 	wait_for(CPU1_alive);
 
@@ -156,9 +150,10 @@
 void
 exec_kernel(char *name, void *bootinfo)
 {
-	int howto = 0;
+	int howto = 0, i;
 	char c, *ptr;
 	u_long marks[MARK_MAX];
+	void *p;
 #ifdef DBMONITOR
 	int go_monitor;
 
@@ -209,6 +204,37 @@
 		}
 #endif /* DBMONITOR */
 
+		p = bootinfo;
+
+		/*
+		 * root device
+		 */
+		btinfo_rootdevice.common.next = sizeof (btinfo_rootdevice);
+		btinfo_rootdevice.common.type = BTINFO_ROOTDEVICE;
+		strncpy(btinfo_rootdevice.rootdevice, name,
+		sizeof (btinfo_rootdevice.rootdevice));
+		i = 0;
+		while (btinfo_rootdevice.rootdevice[i] != '\0') {
+			if (btinfo_rootdevice.rootdevice[i] == ':')
+break;
+			i++;
+		}
+		if (btinfo_rootdevice.rootdevice[i] == ':') {
+			/* It is NOT in-kernel. */
+
+			btinfo_rootdevice.rootdevice[i] = '\0';
+
+			memcpy(p, (void *)btinfo_rootdevice,
+			sizeof (btinfo_rootdevice));
+			p += sizeof (btinfo_rootdevice);
+		}
+
+		memcpy(p, (void *)btinfo_memory, sizeof (btinfo_memory));
+		p += sizeof (btinfo_memory);
+		memcpy(p, (void *)btinfo_console, sizeof (btinfo_console));
+		p += sizeof (btinfo_console);
+		memcpy(p, (void *)btinfo_clock, sizeof (btinfo_clock));
+
 		printf(start=0x%lx\n\n, marks[MARK_ENTRY]);
 		delay(1000);
 		__syncicache((void *)marks[MARK_ENTRY],



CVS commit: src/sys/arch/bebox/bebox

2010-10-27 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Oct 27 10:42:13 UTC 2010

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

Log Message:
Get and parse root-device.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/bebox/bebox/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/bebox/bebox/autoconf.c
diff -u src/sys/arch/bebox/bebox/autoconf.c:1.22 src/sys/arch/bebox/bebox/autoconf.c:1.23
--- src/sys/arch/bebox/bebox/autoconf.c:1.22	Wed Mar 18 10:22:26 2009
+++ src/sys/arch/bebox/bebox/autoconf.c	Wed Oct 27 10:42:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.22 2009/03/18 10:22:26 cegger Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.23 2010/10/27 10:42:12 kiyohara Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -37,18 +37,19 @@
 /*
  * Setup the system to run on the current machine.
  *
- * Configure() is called at boot time and initializes the vba 
+ * Configure() is called at boot time and initializes the vba
  * device tables and the memory controller monitoring.  Available
  * devices are determined (from possibilities mentioned in ioconf.c),
  * and the drivers are initialized.
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.22 2009/03/18 10:22:26 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.23 2010/10/27 10:42:12 kiyohara Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/buf.h
+#include sys/disk.h
 #include sys/disklabel.h
 #include sys/conf.h
 #include sys/reboot.h
@@ -61,13 +62,21 @@
 #include dev/pci/pcireg.h
 #include dev/pci/pcivar.h
 #endif
+#include dev/ata/atareg.h
+#include dev/ata/atavar.h
+#include dev/ata/wdvar.h
+#include dev/scsipi/sdvar.h
 
+#include machine/bootinfo.h
 #include machine/pte.h
 #include machine/intr.h
 
 void genppc_cpu_configure(void);
 static void findroot(void);
 
+static int bus, target, lun, drive;
+static const char *name = NULL;
+
 /*
  * Determine i/o configuration for a machine.
  */
@@ -76,16 +85,17 @@
 cpu_configure(void)
 {
 
+	findroot();
+
 	if (config_rootfound(mainbus, NULL) == NULL)
 		panic(configure: mainbus not configured);
-	
+
 	genppc_cpu_configure();
 }
 
 void
 cpu_rootconf(void)
 {
-	findroot();
 
 	aprint_normal(boot device: %s\n,
 	booted_device ? booted_device-dv_xname : unknown);
@@ -93,39 +103,82 @@
 	setroot(booted_device, booted_partition);
 }
 
-u_long	bootdev = 0;		/* should be dev_t, but not until 32 bits */
-
 /*
  * Attempt to find the device from which we were booted.
  * If we can do so, and not instructed not to do so,
  * change rootdev to correspond to the load device.
  */
-void
+static void
 findroot(void)
 {
-	int unit, part;
-	device_t dv;
-	const char *name;
-
-	if ((bootdev  B_MAGICMASK) != (u_long)B_DEVMAGIC)
-		return;
-	
-	name = devsw_blk2name((bootdev  B_TYPESHIFT)  B_TYPEMASK);
-	if (name == NULL)
-		return;
-	
-	part = (bootdev  B_PARTITIONSHIFT)  B_PARTITIONMASK;
-	unit = (bootdev  B_UNITSHIFT)  B_UNITMASK;
-
-	if ((dv = device_find_by_driver_unit(name, unit)) != NULL) {
-		booted_device = dv;
-		booted_partition = part;
-	}
+	struct btinfo_rootdevice *rdev;
+	int part;
+	char *p;
+
+	rdev = (struct btinfo_rootdevice *)lookup_bootinfo(BTINFO_ROOTDEVICE);
+	if (rdev == NULL)
+		return;
+	p = rdev-rootdevice;
+	if (strncmp(p, /dev/disk/, 10) != 0)
+		/* unknwon device... */
+		return;
+	p += 10;
+	if (strncmp(p, scsi/, 5) == 0) {
+		name = sd;
+		p += 5;
+
+		bus = 0;
+		while (isdigit(*p))
+			bus = bus * 10 + (*p++) - '0';
+		if (*p++ != '/')
+			return;
+		target = 0;
+		while (isdigit(*p))
+			target = target * 10 + (*p++) - '0';
+		if (*p++ != '/')
+			return;
+		lun = 0;
+		while (isdigit(*p))
+			lun = lun * 10 + (*p++) - '0';
+	} else if (strncmp(p, ide/, 4) == 0) {
+		name = wd;
+		p += 4;
+
+		bus = 0;
+		while (isdigit(*p))
+			bus = bus * 10 + (*p++) - '0';
+		if (*p++ != '/')
+			return;
+		if (strncmp(p, master/0, 8) == 0) {
+			drive = 0;
+			p += 8;
+		} else if (strncmp(p, slave/0, 7) == 0) {
+			drive = 1;
+			p += 7;
+		} else
+			return;
+	} else if (strcmp(p, floppy) == 0)
+		return;
+	else
+		/* unknwon disk... */
+		return;
+
+	if (*p != '_' || !isdigit(*(p + 1)))
+		return;
+	p++;
+	part = 0;
+	while (isdigit(*p))
+		part = part * 10 + (*p++) - '0';
+	if (p != '\0')
+		return;
+
+	booted_partition = part;
 }
 
 void
-device_register(struct device *dev, void *aux)
+device_register(device_t dev, void *aux)
 {
+	device_t bdev, cdev;
 
 #if NPCI  0
 	if (device_is_a(dev, genfb) 
@@ -149,13 +202,48 @@
 	device_is_a(device_parent(dev), pci)) {
 		prop_dictionary_t dict = device_properties(dev);
 		struct pci_attach_args *pa = aux;
-		int bus, device;
+		int pbus, device;
 
-		pci_decompose_tag(pa-pa_pc, pa-pa_tag, bus, device, NULL);
-		if (bus == 0  device == 12)
+		pci_decompose_tag(pa-pa_pc, pa-pa_tag, pbus, device, NULL);
+		if (pbus 

CVS commit: src/sys

2010-10-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Oct 27 14:08:09 UTC 2010

Modified Files:
src/sys/arch/hpcmips/conf: majors.hpcmips
src/sys/conf: majors

Log Message:
Reserve an MI major for coming flash(4).

hpcmips defines one in MD majors, but it's not listed in
etc/etc.hpcmips/MAKEDEV.conf, so I assume actual files are never
created in users' filesystems.

Prompted By:pooka


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hpcmips/conf/majors.hpcmips
cvs rdiff -u -r1.52 -r1.53 src/sys/conf/majors

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/hpcmips/conf/majors.hpcmips
diff -u src/sys/arch/hpcmips/conf/majors.hpcmips:1.29 src/sys/arch/hpcmips/conf/majors.hpcmips:1.30
--- src/sys/arch/hpcmips/conf/majors.hpcmips:1.29	Sat Mar  6 23:45:39 2010
+++ src/sys/arch/hpcmips/conf/majors.hpcmips	Wed Oct 27 14:08:08 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.hpcmips,v 1.29 2010/03/06 23:45:39 plunky Exp $
+#	$NetBSD: majors.hpcmips,v 1.30 2010/10/27 14:08:08 uebayasi Exp $
 #
 # Device majors for hpcmips
 #
@@ -57,7 +57,6 @@
 device-major	sequencer	char 53			sequencer
 device-major	pci		char 54			pci
 device-major	ksyms		char 55			ksyms
-device-major	flash		char 100		flash
 device-major	vr4181aiu	char 101		vr4181aiu
 device-major	wsfont		char 102		wsfont
 device-major	ses		char 103		ses

Index: src/sys/conf/majors
diff -u src/sys/conf/majors:1.52 src/sys/conf/majors:1.53
--- src/sys/conf/majors:1.52	Sun Aug 22 18:56:21 2010
+++ src/sys/conf/majors	Wed Oct 27 14:08:08 2010
@@ -1,4 +1,4 @@
-# $NetBSD: majors,v 1.52 2010/08/22 18:56:21 rmind Exp $
+# $NetBSD: majors,v 1.53 2010/10/27 14:08:08 uebayasi Exp $
 #
 # Device majors for Machine-Independent drivers.
 #
@@ -44,3 +44,4 @@
 device-major uhso  char 196		   uhso
 device-major rumpblk   char 197 block 197  rumpblk
 device-major npf   char 198		   npf
+device-major flash char 199 block 199  flash



CVS commit: [uebayasi-xip] src/sys

2010-10-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Oct 27 14:13:57 UTC 2010

Modified Files:
src/sys/arch/amd64/conf [uebayasi-xip]: majors.amd64
src/sys/arch/evbppc/conf [uebayasi-xip]: majors.evbppc
src/sys/arch/hpcmips/conf [uebayasi-xip]: majors.hpcmips
src/sys/arch/i386/conf [uebayasi-xip]: majors.i386
src/sys/conf [uebayasi-xip]: majors

Log Message:
Move flash(4)/xmd(4) majors to MI, as suggested by Chuck Silvers.


To generate a diff of this commit:
cvs rdiff -u -r1.21.6.1 -r1.21.6.2 src/sys/arch/amd64/conf/majors.amd64
cvs rdiff -u -r1.28.6.2 -r1.28.6.3 src/sys/arch/evbppc/conf/majors.evbppc
cvs rdiff -u -r1.27 -r1.27.6.1 src/sys/arch/hpcmips/conf/majors.hpcmips
cvs rdiff -u -r1.37.6.2 -r1.37.6.3 src/sys/arch/i386/conf/majors.i386
cvs rdiff -u -r1.47.2.3 -r1.47.2.4 src/sys/conf/majors

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/amd64/conf/majors.amd64
diff -u src/sys/arch/amd64/conf/majors.amd64:1.21.6.1 src/sys/arch/amd64/conf/majors.amd64:1.21.6.2
--- src/sys/arch/amd64/conf/majors.amd64:1.21.6.1	Fri Aug 27 09:41:52 2010
+++ src/sys/arch/amd64/conf/majors.amd64	Wed Oct 27 14:13:56 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.amd64,v 1.21.6.1 2010/08/27 09:41:52 uebayasi Exp $
+#	$NetBSD: majors.amd64,v 1.21.6.2 2010/10/27 14:13:56 uebayasi Exp $
 #
 # Device majors for amd64
 #
@@ -89,7 +89,6 @@
 device-major	dpt		char 96			dpt
 device-major	twe		char 97			twe
 device-major	nsmb		char 98			nsmb		
-device-major	xmd		char 99  block 21	xmd
 
 #
 # Device majors for Xen. These are assigned here so that:

Index: src/sys/arch/evbppc/conf/majors.evbppc
diff -u src/sys/arch/evbppc/conf/majors.evbppc:1.28.6.2 src/sys/arch/evbppc/conf/majors.evbppc:1.28.6.3
--- src/sys/arch/evbppc/conf/majors.evbppc:1.28.6.2	Thu Aug 19 12:36:58 2010
+++ src/sys/arch/evbppc/conf/majors.evbppc	Wed Oct 27 14:13:57 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.evbppc,v 1.28.6.2 2010/08/19 12:36:58 uebayasi Exp $
+#	$NetBSD: majors.evbppc,v 1.28.6.3 2010/10/27 14:13:57 uebayasi Exp $
 #
 # Device majors for evbppc
 # (When possible, make entries the same as macppc)
@@ -80,8 +80,6 @@
 
 device-major	nsmb		char 98			nsmb
 device-major 	xlcom 		char 99 		xlcom
-device-major 	flash 		char 100  block 15 	flash
-device-major	xmd		char 101  block 16	xmd
 
 # Majors up to 143 are reserved for machine-dependant drivers.
 # New machine-independent driver majors are assigned in 

Index: src/sys/arch/hpcmips/conf/majors.hpcmips
diff -u src/sys/arch/hpcmips/conf/majors.hpcmips:1.27 src/sys/arch/hpcmips/conf/majors.hpcmips:1.27.6.1
--- src/sys/arch/hpcmips/conf/majors.hpcmips:1.27	Wed Nov 12 12:36:01 2008
+++ src/sys/arch/hpcmips/conf/majors.hpcmips	Wed Oct 27 14:13:57 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.hpcmips,v 1.27 2008/11/12 12:36:01 ad Exp $
+#	$NetBSD: majors.hpcmips,v 1.27.6.1 2010/10/27 14:13:57 uebayasi Exp $
 #
 # Device majors for hpcmips
 #
@@ -57,7 +57,6 @@
 device-major	sequencer	char 53			sequencer
 device-major	pci		char 54			pci
 device-major	ksyms		char 55			ksyms
-device-major	flash		char 100		flash
 device-major	vr4181aiu	char 101		vr4181aiu
 device-major	wsfont		char 102		wsfont
 device-major	ses		char 103		ses

Index: src/sys/arch/i386/conf/majors.i386
diff -u src/sys/arch/i386/conf/majors.i386:1.37.6.2 src/sys/arch/i386/conf/majors.i386:1.37.6.3
--- src/sys/arch/i386/conf/majors.i386:1.37.6.2	Fri Aug 20 07:04:38 2010
+++ src/sys/arch/i386/conf/majors.i386	Wed Oct 27 14:13:57 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.i386,v 1.37.6.2 2010/08/20 07:04:38 uebayasi Exp $
+#	$NetBSD: majors.i386,v 1.37.6.3 2010/10/27 14:13:57 uebayasi Exp $
 #
 # Device majors for i386
 #
@@ -104,7 +104,6 @@
 device-major	rd		char 105 block 22	rd
 device-major	ct		char 106 block 23	ct
 device-major	mt		char 107 block 24	mt
-device-major	xmd		char 108 block 25	xmd
 
 #
 # Device majors for Xen. These are assigned here so that:

Index: src/sys/conf/majors
diff -u src/sys/conf/majors:1.47.2.3 src/sys/conf/majors:1.47.2.4
--- src/sys/conf/majors:1.47.2.3	Fri Oct 22 07:21:49 2010
+++ src/sys/conf/majors	Wed Oct 27 14:13:56 2010
@@ -1,4 +1,4 @@
-# $NetBSD: majors,v 1.47.2.3 2010/10/22 07:21:49 uebayasi Exp $
+# $NetBSD: majors,v 1.47.2.4 2010/10/27 14:13:56 uebayasi Exp $
 #
 # Device majors for Machine-Independent drivers.
 #
@@ -44,3 +44,5 @@
 device-major uhso  char 196		   uhso
 device-major rumpblk   char 197 block 197  rumpblk
 device-major npf   char 198		   npf
+device-major flash char 199	block 199  flash
+device-major xmd   char 200	block 200  xmd



CVS commit: src

2010-10-27 Thread Grégoire Sutre
Module Name:src
Committed By:   gsutre
Date:   Wed Oct 27 14:39:27 UTC 2010

Modified Files:
src/share/man/man4: acpi.4
src/sys/dev/acpi: acpi_debug.c

Log Message:
Make acpi(4) debug aware of ACPI_DISPLAY_COMPONENT.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/share/man/man4/acpi.4
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/acpi_debug.c

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/acpi.4
diff -u src/share/man/man4/acpi.4:1.60 src/share/man/man4/acpi.4:1.61
--- src/share/man/man4/acpi.4:1.60	Sun Oct 24 08:31:49 2010
+++ src/share/man/man4/acpi.4	Wed Oct 27 14:39:26 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: acpi.4,v 1.60 2010/10/24 08:31:49 jruoho Exp $
+.\ $NetBSD: acpi.4,v 1.61 2010/10/27 14:39:26 gsutre Exp $
 .\
 .\ Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -445,6 +445,7 @@
 .It Li ACPI_LID_COMPONENT Ta ACPI_LV_OPTIMIZATIONS
 .It Li ACPI_RESOURCE_COMPONENT Ta ACPI_LV_VERBOSITY2 *
 .It Li ACPI_TZ_COMPONENT Ta
+.It Li ACPI_DISPLAY_COMPONENT Ta
 .It Li ACPI_ALL_DRIVERS * Ta ACPI_LV_MUTEX
 .It Ta ACPI_LV_THREADS
 .It Ta ACPI_LV_IO

Index: src/sys/dev/acpi/acpi_debug.c
diff -u src/sys/dev/acpi/acpi_debug.c:1.3 src/sys/dev/acpi/acpi_debug.c:1.4
--- src/sys/dev/acpi/acpi_debug.c:1.3	Wed Jun 30 07:42:36 2010
+++ src/sys/dev/acpi/acpi_debug.c	Wed Oct 27 14:39:26 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_debug.c,v 1.3 2010/06/30 07:42:36 jruoho Exp $ */
+/* $NetBSD: acpi_debug.c,v 1.4 2010/10/27 14:39:26 gsutre Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_debug.c,v 1.3 2010/06/30 07:42:36 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_debug.c,v 1.4 2010/10/27 14:39:26 gsutre Exp $);
 
 #include sys/param.h
 #include sys/sysctl.h
@@ -183,6 +183,7 @@
 	ACPI_DEBUG_ADD(acpi_debug_layer_d, ACPI_LID_COMPONENT);
 	ACPI_DEBUG_ADD(acpi_debug_layer_d, ACPI_RESOURCE_COMPONENT);
 	ACPI_DEBUG_ADD(acpi_debug_layer_d, ACPI_TZ_COMPONENT);
+	ACPI_DEBUG_ADD(acpi_debug_layer_d, ACPI_DISPLAY_COMPONENT);
 	ACPI_DEBUG_ADD(acpi_debug_layer_d, ACPI_ALL_DRIVERS);
 
 	/*



CVS commit: src/distrib/notes/macppc

2010-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct 27 14:41:47 UTC 2010

Modified Files:
src/distrib/notes/macppc: prep.OPENFIRMWARE

Log Message:
Update rawrite32 url


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/notes/macppc/prep.OPENFIRMWARE

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

Modified files:

Index: src/distrib/notes/macppc/prep.OPENFIRMWARE
diff -u src/distrib/notes/macppc/prep.OPENFIRMWARE:1.13 src/distrib/notes/macppc/prep.OPENFIRMWARE:1.14
--- src/distrib/notes/macppc/prep.OPENFIRMWARE:1.13	Sat Apr 25 21:21:49 2009
+++ src/distrib/notes/macppc/prep.OPENFIRMWARE	Wed Oct 27 14:41:46 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: prep.OPENFIRMWARE,v 1.13 2009/04/25 21:21:49 snj Exp $
+.\	$NetBSD: prep.OPENFIRMWARE,v 1.14 2010/10/27 14:41:46 martin Exp $
 .if \*[OF_VERSION_3] \{\
 .
 .Ss2 Updating your BootROM
@@ -1268,7 +1268,7 @@
 distribution or
 .Ic rawrite32.exe
 from
-.Lk http://www.duskware.com/rawrite32/
+.Lk http://www.NetBSD.org/~martin/rawrite32/
 .Pp
 .It
 .Em From a MacOS 9 (or earlier) machine
@@ -1572,7 +1572,7 @@
 Get
 .Ic rawrite32.exe
 from
-.Lk http://www.duskware.com/rawrite32/
+.Lk http://www.NetBSD.org/~martin/rawrite32/
 .Pp
 Be certain you have selected the correct disk, as it will erase the
 contents.



CVS commit: src/distrib/notes/common

2010-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct 27 18:17:42 UTC 2010

Modified Files:
src/distrib/notes/common: main

Log Message:
Adapt to newer Rawrite32 version


To generate a diff of this commit:
cvs rdiff -u -r1.466 -r1.467 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.466 src/distrib/notes/common/main:1.467
--- src/distrib/notes/common/main:1.466	Wed Sep  8 19:21:13 2010
+++ src/distrib/notes/common/main	Wed Oct 27 18:17:42 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.466 2010/09/08 19:21:13 zoltan Exp $
+.\	$NetBSD: main,v 1.467 2010/10/27 18:17:42 martin Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -236,9 +236,9 @@
 .Ic rawrite.exe
 MS-DOS program
 or the
-.Ic Rawrite32.exe
-Windows32 program (inside
-.Pa rawrite32.zip )
+.Ic Rawrite32
+Windows32 program (installed by
+.Pa rawr32.exe )
 in the
 .Pa i386/installation/misc/
 directory may be of help.



CVS commit: src/usr.sbin/makefs

2010-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 27 18:51:35 UTC 2010

Modified Files:
src/usr.sbin/makefs: cd9660.c cd9660.h
src/usr.sbin/makefs/cd9660: cd9660_debug.c cd9660_eltorito.c

Log Message:
Handle  2GB images. Thanks to Greg Troxel for testing!


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/makefs/cd9660.c
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/makefs/cd9660.h
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/makefs/cd9660/cd9660_debug.c
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/makefs/cd9660/cd9660_eltorito.c

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

Modified files:

Index: src/usr.sbin/makefs/cd9660.c
diff -u src/usr.sbin/makefs/cd9660.c:1.26 src/usr.sbin/makefs/cd9660.c:1.27
--- src/usr.sbin/makefs/cd9660.c:1.26	Fri Jan 16 13:02:24 2009
+++ src/usr.sbin/makefs/cd9660.c	Wed Oct 27 14:51:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd9660.c,v 1.26 2009/01/16 18:02:24 pooka Exp $	*/
+/*	$NetBSD: cd9660.c,v 1.27 2010/10/27 18:51:34 christos Exp $	*/
 
 /*
  * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -103,7 +103,7 @@
 
 #include sys/cdefs.h
 #if defined(__RCSID)  !defined(__lint)
-__RCSID($NetBSD: cd9660.c,v 1.26 2009/01/16 18:02:24 pooka Exp $);
+__RCSID($NetBSD: cd9660.c,v 1.27 2010/10/27 18:51:34 christos Exp $);
 #endif  /* !__lint */
 
 #include string.h
@@ -158,7 +158,7 @@
 #endif
 static int cd9660_convert_filename(const char *, char *, int);
 static void cd9660_populate_dot_records(cd9660node *);
-static int cd9660_compute_offsets(cd9660node *, int);
+static int64_t cd9660_compute_offsets(cd9660node *, int64_t);
 #if 0
 static int cd9660_copy_stat_info(cd9660node *, cd9660node *, int);
 #endif
@@ -451,11 +451,11 @@
 cd9660_makefs(const char *image, const char *dir, fsnode *root,
 	  fsinfo_t *fsopts)
 {
-	int startoffset;
+	int64_t startoffset;
 	int numDirectories;
-	int pathTableSectors;
-	int firstAvailableSector;
-	int totalSpace;
+	uint64_t pathTableSectors;
+	int64_t firstAvailableSector;
+	int64_t totalSpace;
 	int error;
 	cd9660node *real_root;
 
@@ -563,7 +563,7 @@
 	diskStructure.primaryBigEndianTableSector + pathTableSectors;
 	if (diskStructure.verbose_level  0)
 		printf(cd9660_makefs: Path table conversion complete. 
-		   Each table is %i bytes, or %i sectors.\n,
+		   Each table is %i bytes, or % PRIu64  sectors.\n,
 		diskStructure.pathTableLength, pathTableSectors);
 
 	startoffset = diskStructure.sectorSize*diskStructure.dataFirstSector;
@@ -592,11 +592,12 @@
 	/* Debugging output */
 	if (diskStructure.verbose_level  0) {
 		printf(cd9660_makefs: Sectors 0-15 reserved\n);
-		printf(cd9660_makefs: Primary path tables starts in sector %i\n,
-			diskStructure.primaryLittleEndianTableSector);
-		printf(cd9660_makefs: File data starts in sector %i\n,
-			diskStructure.dataFirstSector);
-		printf(cd9660_makefs: Total sectors: %i\n,diskStructure.totalSectors);
+		printf(cd9660_makefs: Primary path tables starts in sector %
+		PRId64 \n, diskStructure.primaryLittleEndianTableSector);
+		printf(cd9660_makefs: File data starts in sector %
+		PRId64 \n, diskStructure.dataFirstSector);
+		printf(cd9660_makefs: Total sectors: %
+		PRId64 \n, diskStructure.totalSectors);
 	}
 
 	/*
@@ -1822,19 +1823,19 @@
  * @returns int The total size of files and directory entries (should be
  *  a multiple of sector size)
 */
-static int
-cd9660_compute_offsets(cd9660node *node, int startOffset)
+static int64_t
+cd9660_compute_offsets(cd9660node *node, int64_t startOffset)
 {
 	/*
 	 * This function needs to compute the size of directory records and
 	 * runs, file lengths, and set the appropriate variables both in
 	 * cd9660node and isoDirEntry
 	 */
-	int used_bytes = 0;
-	int current_sector_usage = 0;
+	int64_t used_bytes = 0;
+	int64_t current_sector_usage = 0;
 	cd9660node *child;
 	fsinode *inode;
-	int r;
+	int64_t r;
 
 	assert(node != NULL);
 

Index: src/usr.sbin/makefs/cd9660.h
diff -u src/usr.sbin/makefs/cd9660.h:1.14 src/usr.sbin/makefs/cd9660.h:1.15
--- src/usr.sbin/makefs/cd9660.h:1.14	Thu Oct 21 20:49:15 2010
+++ src/usr.sbin/makefs/cd9660.h	Wed Oct 27 14:51:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd9660.h,v 1.14 2010/10/22 00:49:15 christos Exp $	*/
+/*	$NetBSD: cd9660.h,v 1.15 2010/10/27 18:51:34 christos Exp $	*/
 
 /*
  * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -181,10 +181,7 @@
 	 */
 	int64_t fileDataLength;
 
-	/*
-	 * XXXfvdl sectors are int
-	 */
-	int fileSectorsUsed;
+	int64_t fileSectorsUsed;
 	int fileRecordSize;/*copy of a variable, int for quicker calculations*/
 
 	/* Old name, used for renaming - needs to be optimized but low priority */
@@ -196,21 +193,21 @@
 	/* For Rock Ridge */
 	struct _cd9660node *rr_real_parent, *rr_relocated;
 
-	int susp_entry_size;
-	int susp_dot_entry_size;
-	int susp_dot_dot_entry_size;
+	int64_t susp_entry_size;
+	

CVS commit: src/lib/libc/time

2010-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 27 19:16:04 UTC 2010

Modified Files:
src/lib/libc/time: ctime.3

Log Message:
markup improvements, document ctype_r, time_t is not a long integer


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/libc/time/ctime.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/time/ctime.3
diff -u src/lib/libc/time/ctime.3:1.32 src/lib/libc/time/ctime.3:1.33
--- src/lib/libc/time/ctime.3:1.32	Sat May 15 09:54:52 2010
+++ src/lib/libc/time/ctime.3	Wed Oct 27 15:16:04 2010
@@ -1,5 +1,5 @@
-.\	$NetBSD: ctime.3,v 1.32 2010/05/15 13:54:52 pgoyette Exp $
-.Dd February 2, 2010
+.\	$NetBSD: ctime.3,v 1.33 2010/10/27 19:16:04 christos Exp $
+.Dd October 27, 2010
 .Dt CTIME 3
 .Os
 .Sh NAME
@@ -41,7 +41,9 @@
 .Fn mktime struct tm *tm
 .Sh DESCRIPTION
 .Fn ctime
-converts a long integer, pointed to by
+converts a 
+.Tp time_t ,
+pointed to by
 .Fa clock ,
 representing the time in seconds since
 00:00:00 UTC, 1970-01-01,
@@ -56,7 +58,15 @@
 software that expects exactly 26 bytes of output will mistakenly output
 misleading values for out-of-range years.
 .Pp
-.Fn Localtime
+.Fn ctime_r
+is similar to
+.Fn ctime ,
+except it places the result of the convertion on the
+.Fa buf
+argument which should be 26 or more bytes long, instead of using a global
+static buffer.
+.Pp
+.Fn localtime
 and
 .Fn gmtime
 return pointers to
@@ -99,7 +109,8 @@
 .Pp
 .Fn asctime
 converts a time value contained in a
-``tm'' structure to a string,
+.Dq tm
+structure to a string,
 as shown in the above example,
 and returns a pointer to the string.
 .Pp



CVS commit: src/lib/libc/time

2010-10-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct 27 19:18:00 UTC 2010

Modified Files:
src/lib/libc/time: ctime.3

Log Message:
Fix a typo and remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libc/time/ctime.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/time/ctime.3
diff -u src/lib/libc/time/ctime.3:1.33 src/lib/libc/time/ctime.3:1.34
--- src/lib/libc/time/ctime.3:1.33	Wed Oct 27 19:16:04 2010
+++ src/lib/libc/time/ctime.3	Wed Oct 27 19:18:00 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: ctime.3,v 1.33 2010/10/27 19:16:04 christos Exp $
+.\	$NetBSD: ctime.3,v 1.34 2010/10/27 19:18:00 wiz Exp $
 .Dd October 27, 2010
 .Dt CTIME 3
 .Os
@@ -41,7 +41,7 @@
 .Fn mktime struct tm *tm
 .Sh DESCRIPTION
 .Fn ctime
-converts a 
+converts a
 .Tp time_t ,
 pointed to by
 .Fa clock ,
@@ -61,7 +61,7 @@
 .Fn ctime_r
 is similar to
 .Fn ctime ,
-except it places the result of the convertion on the
+except it places the result of the conversion on the
 .Fa buf
 argument which should be 26 or more bytes long, instead of using a global
 static buffer.



CVS commit: src/sys/rump/librump/rumpkern

2010-10-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Oct 27 20:34:50 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: rumpkern.ifspec
Removed Files:
src/sys/rump/librump/rumpkern: sysproxy_socket.c

Log Message:
Retire the old sysproxy nonsense (as part of doing it slightly better).

Introduce rump_pub_syscall() as the generic interface for making
system calls with already marshalled arguments.  So it's kinda like
syscall(2), except it also remembered to breathe instead of having
to figure out how to deal with 64bit values.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpkern/rumpkern.ifspec
cvs rdiff -u -r1.9 -r0 src/sys/rump/librump/rumpkern/sysproxy_socket.c

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

Modified files:

Index: src/sys/rump/librump/rumpkern/rumpkern.ifspec
diff -u src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.6 src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.7
--- src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.6	Wed Sep  1 19:13:38 2010
+++ src/sys/rump/librump/rumpkern/rumpkern.ifspec	Wed Oct 27 20:34:50 2010
@@ -1,4 +1,4 @@
-;	$NetBSD: rumpkern.ifspec,v 1.6 2010/09/01 19:13:38 pooka Exp $
+;	$NetBSD: rumpkern.ifspec,v 1.7 2010/10/27 20:34:50 pooka Exp $
 
 NAME|kern
 PUBHDR|include/rump/rumpkern_if_pub.h
@@ -32,6 +32,4 @@
 
 void		|allbetsareoff_setid	|pid_t, int
 
-int		|sysproxy_set			|rump_sysproxy_t, void *
-int		|sysproxy_socket_setup_client	|int
-int		|sysproxy_socket_setup_server	|int
+int		|syscall	|int, void *, register_t *



CVS commit: src/sys/rump

2010-10-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Oct 27 20:35:48 UTC 2010

Modified Files:
src/sys/rump/include/rump: rumpkern_if_pub.h
src/sys/rump/librump/rumpkern: rumpkern_if_priv.h
rumpkern_if_wrappers.c

Log Message:
regen:
- rump_sysproxy
+ rump_syscall


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/rump/include/rump/rumpkern_if_pub.h
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h \
src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.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/rump/include/rump/rumpkern_if_pub.h
diff -u src/sys/rump/include/rump/rumpkern_if_pub.h:1.9 src/sys/rump/include/rump/rumpkern_if_pub.h:1.10
--- src/sys/rump/include/rump/rumpkern_if_pub.h:1.9	Wed Sep  1 19:33:04 2010
+++ src/sys/rump/include/rump/rumpkern_if_pub.h	Wed Oct 27 20:35:47 2010
@@ -1,8 +1,8 @@
-/*	$NetBSD: rumpkern_if_pub.h,v 1.9 2010/09/01 19:33:04 pooka Exp $	*/
+/*	$NetBSD: rumpkern_if_pub.h,v 1.10 2010/10/27 20:35:47 pooka Exp $	*/
 
 /*
  * Automatically generated.  DO NOT EDIT.
- * from: NetBSD: rumpkern.ifspec,v 1.6 2010/09/01 19:13:38 pooka Exp 
+ * from: NetBSD: rumpkern.ifspec,v 1.7 2010/10/27 20:34:50 pooka Exp 
  * by:   NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp 
  */
 
@@ -23,6 +23,4 @@
 void rump_pub_lwproc_releaselwp(void);
 struct lwp * rump_pub_lwproc_curlwp(void);
 void rump_pub_allbetsareoff_setid(pid_t, int);
-int rump_pub_sysproxy_set(rump_sysproxy_t, void *);
-int rump_pub_sysproxy_socket_setup_client(int);
-int rump_pub_sysproxy_socket_setup_server(int);
+int rump_pub_syscall(int, void *, register_t *);

Index: src/sys/rump/librump/rumpkern/rumpkern_if_priv.h
diff -u src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.8 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.9
--- src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.8	Wed Sep  1 19:33:05 2010
+++ src/sys/rump/librump/rumpkern/rumpkern_if_priv.h	Wed Oct 27 20:35:47 2010
@@ -1,8 +1,8 @@
-/*	$NetBSD: rumpkern_if_priv.h,v 1.8 2010/09/01 19:33:05 pooka Exp $	*/
+/*	$NetBSD: rumpkern_if_priv.h,v 1.9 2010/10/27 20:35:47 pooka Exp $	*/
 
 /*
  * Automatically generated.  DO NOT EDIT.
- * from: NetBSD: rumpkern.ifspec,v 1.6 2010/09/01 19:13:38 pooka Exp 
+ * from: NetBSD: rumpkern.ifspec,v 1.7 2010/10/27 20:34:50 pooka Exp 
  * by:   NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp 
  */
 
@@ -23,6 +23,4 @@
 void rump_lwproc_releaselwp(void);
 struct lwp * rump_lwproc_curlwp(void);
 void rump_allbetsareoff_setid(pid_t, int);
-int rump_sysproxy_set(rump_sysproxy_t, void *);
-int rump_sysproxy_socket_setup_client(int);
-int rump_sysproxy_socket_setup_server(int);
+int rump_syscall(int, void *, register_t *);
Index: src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c
diff -u src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.8 src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.9
--- src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.8	Wed Sep  1 19:33:05 2010
+++ src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c	Wed Oct 27 20:35:47 2010
@@ -1,8 +1,8 @@
-/*	$NetBSD: rumpkern_if_wrappers.c,v 1.8 2010/09/01 19:33:05 pooka Exp $	*/
+/*	$NetBSD: rumpkern_if_wrappers.c,v 1.9 2010/10/27 20:35:47 pooka Exp $	*/
 
 /*
  * Automatically generated.  DO NOT EDIT.
- * from: NetBSD: rumpkern.ifspec,v 1.6 2010/09/01 19:13:38 pooka Exp 
+ * from: NetBSD: rumpkern.ifspec,v 1.7 2010/10/27 20:34:50 pooka Exp 
  * by:   NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp 
  */
 
@@ -213,36 +213,12 @@
 }
 
 int
-rump_pub_sysproxy_set(rump_sysproxy_t arg1, void *arg2)
+rump_pub_syscall(int arg1, void *arg2, register_t *arg3)
 {
 	int rv;
 
 	rump_schedule();
-	rv = rump_sysproxy_set(arg1, arg2);
-	rump_unschedule();
-
-	return rv;
-}
-
-int
-rump_pub_sysproxy_socket_setup_client(int arg1)
-{
-	int rv;
-
-	rump_schedule();
-	rv = rump_sysproxy_socket_setup_client(arg1);
-	rump_unschedule();
-
-	return rv;
-}
-
-int
-rump_pub_sysproxy_socket_setup_server(int arg1)
-{
-	int rv;
-
-	rump_schedule();
-	rv = rump_sysproxy_socket_setup_server(arg1);
+	rv = rump_syscall(arg1, arg2, arg3);
 	rump_unschedule();
 
 	return rv;



CVS commit: src/sys/rump/librump/rumpkern

2010-10-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Oct 27 20:37:11 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: Makefile.rumpkern

Log Message:
i build dead files.  ok, so let's not.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/rump/librump/rumpkern/Makefile.rumpkern

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

Modified files:

Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.97 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.98
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.97	Mon Sep  6 20:10:20 2010
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Wed Oct 27 20:37:11 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.97 2010/09/06 20:10:20 pooka Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.98 2010/10/27 20:37:11 pooka Exp $
 #
 
 .include ${RUMPTOP}/Makefile.rump
@@ -17,7 +17,7 @@
 # 
 SRCS=	rump.c rumpcopy.c emul.c intr.c lwproc.c klock.c	\
 	kobj_rename.c ltsleep.c memalloc.c scheduler.c		\
-	signals.c sleepq.c sysproxy_socket.c threads.c vm.c
+	signals.c sleepq.c threads.c vm.c
 SRCS+=	compat.c
 
 # Multiprocessor or uniprocessor locking.  TODO: select right



CVS commit: src

2010-10-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Oct 27 20:44:50 UTC 2010

Modified Files:
src/lib/librumpuser: Makefile
src/sys/rump/include/rump: rump.h rumpuser.h
src/sys/rump/librump/rumpkern: rump.c rump_private.h rumpcopy.c vm.c
Added Files:
src/lib/librumpuser: rumpuser_sp.c

Log Message:
Start rework of system call proxying over socket (sysproxy).
This incarnation is written in the user namespace as opposed to
the previous one which was done in kernel namespace.  Also, rump
does all the handshaking now instead of excepting an application
to come up with the user namespace socket.

There's still a lot to do, including making code a bit more
robust, actually running different clients in a different process
inside the kernel and splitting the client side library from librump.
I'm committing this now so that I don't lose it, plus it generally
works as long as you don't use it in unexcepted ways: i've tested
ifconfig(8), route(8), envstat(8) and sysctl(8).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librumpuser/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/librumpuser/rumpuser_sp.c
cvs rdiff -u -r1.45 -r1.46 src/sys/rump/include/rump/rump.h \
src/sys/rump/include/rump/rumpuser.h
cvs rdiff -u -r1.190 -r1.191 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.58 -r1.59 src/sys/rump/librump/rumpkern/rump_private.h
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/librump/rumpkern/rumpcopy.c
cvs rdiff -u -r1.97 -r1.98 src/sys/rump/librump/rumpkern/vm.c

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

Modified files:

Index: src/lib/librumpuser/Makefile
diff -u src/lib/librumpuser/Makefile:1.2 src/lib/librumpuser/Makefile:1.3
--- src/lib/librumpuser/Makefile:1.2	Fri Feb 26 18:54:20 2010
+++ src/lib/librumpuser/Makefile	Wed Oct 27 20:44:50 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2010/02/26 18:54:20 pooka Exp $
+#	$NetBSD: Makefile,v 1.3 2010/10/27 20:44:50 pooka Exp $
 #
 
 WARNS=		4
@@ -11,7 +11,7 @@
 
 SRCS=		rumpuser.c rumpuser_net.c
 SRCS+=		rumpuser_pth.c
-SRCS+=		rumpuser_dl.c
+SRCS+=		rumpuser_dl.c rumpuser_sp.c
 
 INCSDIR=	/usr/include/rump
 INCS=		rumpuser.h

Index: src/sys/rump/include/rump/rump.h
diff -u src/sys/rump/include/rump/rump.h:1.45 src/sys/rump/include/rump/rump.h:1.46
--- src/sys/rump/include/rump/rump.h:1.45	Mon Sep  6 18:43:28 2010
+++ src/sys/rump/include/rump/rump.h	Wed Oct 27 20:44:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.h,v 1.45 2010/09/06 18:43:28 pooka Exp $	*/
+/*	$NetBSD: rump.h,v 1.46 2010/10/27 20:44:50 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -64,7 +64,6 @@
 
 /* rumpkern */
 enum rump_uiorw { RUMPUIO_READ, RUMPUIO_WRITE };
-typedef int (*rump_sysproxy_t)(int, void *, uint8_t *, size_t, register_t *);
 
 enum rump_sigmodel {
 	RUMP_SIGMODEL_PANIC,
Index: src/sys/rump/include/rump/rumpuser.h
diff -u src/sys/rump/include/rump/rumpuser.h:1.45 src/sys/rump/include/rump/rumpuser.h:1.46
--- src/sys/rump/include/rump/rumpuser.h:1.45	Wed Jun  9 14:08:17 2010
+++ src/sys/rump/include/rump/rumpuser.h	Wed Oct 27 20:44:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser.h,v 1.45 2010/06/09 14:08:17 pooka Exp $	*/
+/*	$NetBSD: rumpuser.h,v 1.46 2010/10/27 20:44:50 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -202,4 +202,14 @@
 void rumpuser_dl_bootstrap(rump_modinit_fn, rump_symload_fn);
 void rumpuser_dl_component_init(int, rump_component_init_fn);
 
+/* syscall proxy routines */
+#define RUMP_SP_NONE	0
+#define RUMP_SP_CLIENT	1
+#define RUMP_SP_SERVER	2
+int	rumpuser_sp_init(int *);
+int	rumpuser_sp_copyin(const void *, void *, size_t);
+int	rumpuser_sp_copyout(const void *, void *, size_t);
+int	rumpuser_sp_syscall(int, const void *, size_t, register_t *);
+int	rumpuser_sp_anonmmap(size_t, void **);
+
 #endif /* _RUMP_RUMPUSER_H_ */

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.190 src/sys/rump/librump/rumpkern/rump.c:1.191
--- src/sys/rump/librump/rumpkern/rump.c:1.190	Wed Oct 27 15:50:03 2010
+++ src/sys/rump/librump/rumpkern/rump.c	Wed Oct 27 20:44:49 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.190 2010/10/27 15:50:03 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.191 2010/10/27 20:44:49 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.190 2010/10/27 15:50:03 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.191 2010/10/27 20:44:49 pooka Exp $);
 
 #include sys/systm.h
 #define ELFSIZE ARCH_ELFSIZE
@@ -101,6 +101,13 @@
 int rump_threads = 1;
 #endif
 
+/*
+ * System call proxying support.  These deserve another look later,
+ * but good enough for now.
+ */
+static struct vmspace sp_vmspace;
+static int rumpsp_type;
+
 static char rump_msgbuf[16*1024]; /* 16k should be enough for std rump needs */
 
 static void
@@ -200,6 

CVS commit: src/sys/rump/librump/test/sysproxy

2010-10-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Oct 27 20:46:55 UTC 2010

Removed Files:
src/sys/rump/librump/test/sysproxy/client: Makefile sysproxy_client.c
src/sys/rump/librump/test/sysproxy/serv: Makefile sysproxy_serv.c

Log Message:
remove obsolete tests


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/rump/librump/test/sysproxy/client/Makefile \
src/sys/rump/librump/test/sysproxy/client/sysproxy_client.c
cvs rdiff -u -r1.1 -r0 src/sys/rump/librump/test/sysproxy/serv/Makefile \
src/sys/rump/librump/test/sysproxy/serv/sysproxy_serv.c

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



CVS commit: src/etc/powerd/scripts

2010-10-27 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Oct 28 02:06:03 UTC 2010

Modified Files:
src/etc/powerd/scripts: lid_switch

Log Message:
adapt to how backlight control is supposed to work - just flip the switch and
we don't need to save the brightness level


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/etc/powerd/scripts/lid_switch

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

Modified files:

Index: src/etc/powerd/scripts/lid_switch
diff -u src/etc/powerd/scripts/lid_switch:1.7 src/etc/powerd/scripts/lid_switch:1.8
--- src/etc/powerd/scripts/lid_switch:1.7	Sun Sep 19 21:47:28 2010
+++ src/etc/powerd/scripts/lid_switch	Thu Oct 28 02:06:02 2010
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: lid_switch,v 1.7 2010/09/19 21:47:28 abs Exp $
+#	$NetBSD: lid_switch,v 1.8 2010/10/28 02:06:02 macallan Exp $
 #
 # Generic script for lid switch events.  We try to put the system to sleep.
 #
@@ -10,19 +10,16 @@
 
 case ${2} in
 pressed)
-	#if /etc/rc.d/apmd onestatus /dev/null ; then
+	#if /etc/rc.d/apmd status /dev/null ; then
 	#	/usr/sbin/apm -S
 	#else
 	#	/usr/sbin/apm -d -S
 	#fi
-	wsconsctl -d backlight /tmp/backlight
 	wsconsctl -d -w backlight=0 /dev/null
 	exit 0
 	;;
 released)
-	if [ -f /tmp/backlight ]; then
-		wsconsctl -d -w `cat /tmp/backlight`	
-	fi
+	wsconsctl -d -w backlight=1 /dev/null
 	exit 0
 	;;
 *)



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

2010-10-27 Thread Allen Briggs
Module Name:src
Committed By:   briggs
Date:   Thu Oct 28 02:10:27 UTC 2010

Modified Files:
src/sys/arch/evbarm/conf: ADI_BRH CP3100 IQ80310 IQ80321 TEAMASA_NPWR
TEAMASA_NPWR_FC

Log Message:
Bump SYMTAB_SPACE for a few configurations.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/evbarm/conf/ADI_BRH
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/CP3100
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/evbarm/conf/IQ80310
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/evbarm/conf/IQ80321
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/evbarm/conf/TEAMASA_NPWR
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/conf/TEAMASA_NPWR_FC

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

Modified files:

Index: src/sys/arch/evbarm/conf/ADI_BRH
diff -u src/sys/arch/evbarm/conf/ADI_BRH:1.49 src/sys/arch/evbarm/conf/ADI_BRH:1.50
--- src/sys/arch/evbarm/conf/ADI_BRH:1.49	Fri Apr 16 13:48:30 2010
+++ src/sys/arch/evbarm/conf/ADI_BRH	Thu Oct 28 02:10:27 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: ADI_BRH,v 1.49 2010/04/16 13:48:30 pooka Exp $
+#	$NetBSD: ADI_BRH,v 1.50 2010/10/28 02:10:27 briggs Exp $
 #
 #	ADI_BRH -- ADI Engineering Big Red Head i80200 Evaluation Board
 #
@@ -136,7 +136,7 @@
 options 	DDB		# in-kernel debugger
 options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
 #makeoptions	DEBUG=-g	# compile full symbol table
-options 	SYMTAB_SPACE=32
+options 	SYMTAB_SPACE=335000
 
 config		netbsd		root on ? type ?
 config		netbsd-fxp0	root on fxp0 type nfs

Index: src/sys/arch/evbarm/conf/CP3100
diff -u src/sys/arch/evbarm/conf/CP3100:1.17 src/sys/arch/evbarm/conf/CP3100:1.18
--- src/sys/arch/evbarm/conf/CP3100:1.17	Fri Apr 16 13:48:30 2010
+++ src/sys/arch/evbarm/conf/CP3100	Thu Oct 28 02:10:27 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: CP3100,v 1.17 2010/04/16 13:48:30 pooka Exp $
+#	$NetBSD: CP3100,v 1.18 2010/10/28 02:10:27 briggs Exp $
 #
 #	CP3100 -- Certance CP3100 Kernel
 #
@@ -141,7 +141,7 @@
 options 	DDB		# in-kernel debugger
 options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
 #makeoptions	DEBUG=-g	# compile full symbol table
-options 	SYMTAB_SPACE=36
+options 	SYMTAB_SPACE=37
 
 config		netbsd		root on ? type ?
 config		netbsd-wm0	root on wm0 type nfs

Index: src/sys/arch/evbarm/conf/IQ80310
diff -u src/sys/arch/evbarm/conf/IQ80310:1.67 src/sys/arch/evbarm/conf/IQ80310:1.68
--- src/sys/arch/evbarm/conf/IQ80310:1.67	Fri Apr 16 13:48:30 2010
+++ src/sys/arch/evbarm/conf/IQ80310	Thu Oct 28 02:10:27 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: IQ80310,v 1.67 2010/04/16 13:48:30 pooka Exp $
+#	$NetBSD: IQ80310,v 1.68 2010/10/28 02:10:27 briggs Exp $
 #
 #	IQ80310 -- Intel IQ80310 Evaluation Board Kernel
 #
@@ -136,7 +136,7 @@
 options 	DDB		# in-kernel debugger
 options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
 #makeoptions	DEBUG=-g	# compile full symbol table
-options 	SYMTAB_SPACE=32
+options 	SYMTAB_SPACE=335000
 
 config		netbsd		root on ? type ?
 config		netbsd-fxp0	root on fxp0 type nfs

Index: src/sys/arch/evbarm/conf/IQ80321
diff -u src/sys/arch/evbarm/conf/IQ80321:1.62 src/sys/arch/evbarm/conf/IQ80321:1.63
--- src/sys/arch/evbarm/conf/IQ80321:1.62	Fri Apr 16 13:48:30 2010
+++ src/sys/arch/evbarm/conf/IQ80321	Thu Oct 28 02:10:27 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: IQ80321,v 1.62 2010/04/16 13:48:30 pooka Exp $
+#	$NetBSD: IQ80321,v 1.63 2010/10/28 02:10:27 briggs Exp $
 #
 #	IQ80321 -- Intel IQ80321 Evaluation Board Kernel
 #
@@ -135,7 +135,7 @@
 options 	DDB		# in-kernel debugger
 options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
 #makeoptions	DEBUG=-g	# compile full symbol table
-options 	SYMTAB_SPACE=33
+options 	SYMTAB_SPACE=34
 
 config		netbsd		root on ? type ?
 config		netbsd-wm0	root on wm0 type nfs

Index: src/sys/arch/evbarm/conf/TEAMASA_NPWR
diff -u src/sys/arch/evbarm/conf/TEAMASA_NPWR:1.63 src/sys/arch/evbarm/conf/TEAMASA_NPWR:1.64
--- src/sys/arch/evbarm/conf/TEAMASA_NPWR:1.63	Fri Apr 16 13:48:30 2010
+++ src/sys/arch/evbarm/conf/TEAMASA_NPWR	Thu Oct 28 02:10:27 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: TEAMASA_NPWR,v 1.63 2010/04/16 13:48:30 pooka Exp $
+#	$NetBSD: TEAMASA_NPWR,v 1.64 2010/10/28 02:10:27 briggs Exp $
 #
 #	TEAMASA_NPWR -- Team ASA, Inc. Npwr -- XScale/IOP310-based
 #	server appliance.
@@ -142,7 +142,7 @@
 options 	DDB		# in-kernel debugger
 options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
 #makeoptions	DEBUG=-g	# compile full symbol table
-options 	SYMTAB_SPACE=32
+options 	SYMTAB_SPACE=335000
 
 config		netbsd		root on ? type ?
 config		netbsd-wm0	root on wm0 type nfs

Index: src/sys/arch/evbarm/conf/TEAMASA_NPWR_FC
diff -u src/sys/arch/evbarm/conf/TEAMASA_NPWR_FC:1.28 src/sys/arch/evbarm/conf/TEAMASA_NPWR_FC:1.29
--- src/sys/arch/evbarm/conf/TEAMASA_NPWR_FC:1.28	Fri Apr 16 13:48:30 2010
+++ src/sys/arch/evbarm/conf/TEAMASA_NPWR_FC	Thu Oct 28 02:10:27 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: TEAMASA_NPWR_FC,v 1.28 2010/04/16 

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

2010-10-27 Thread Allen Briggs
Module Name:src
Committed By:   briggs
Date:   Thu Oct 28 03:30:22 UTC 2010

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

Log Message:
Bump SYMTAB_SPACE.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/evbarm/conf/TWINTAIL

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

Modified files:

Index: src/sys/arch/evbarm/conf/TWINTAIL
diff -u src/sys/arch/evbarm/conf/TWINTAIL:1.36 src/sys/arch/evbarm/conf/TWINTAIL:1.37
--- src/sys/arch/evbarm/conf/TWINTAIL:1.36	Sat May  8 22:16:26 2010
+++ src/sys/arch/evbarm/conf/TWINTAIL	Thu Oct 28 03:30:22 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: TWINTAIL,v 1.36 2010/05/08 22:16:26 mrg Exp $
+#	$NetBSD: TWINTAIL,v 1.37 2010/10/28 03:30:22 briggs Exp $
 #
 #	TWINTAIL -- Genetec corp. G4255EB-X002 Evaluation Board Kernel
 #
@@ -140,7 +140,7 @@
 #options 	KGDB
 #options  	DEBUG_KGDB
 makeoptions	DEBUG=-g -O2	# compile full symbol table
-options 	SYMTAB_SPACE=35
+options 	SYMTAB_SPACE=37
 #options 	AUDIO_DEBUG=2
 
 config		netbsd		root on ? type ?



CVS commit: [uebayasi-xip] src/share/man/man4

2010-10-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Oct 28 03:27:55 UTC 2010

Modified Files:
src/share/man/man4 [uebayasi-xip]: xmd.4

Log Message:
Note that underlying char array must be physically contiguous.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/share/man/man4/xmd.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/xmd.4
diff -u src/share/man/man4/xmd.4:1.1.2.1 src/share/man/man4/xmd.4:1.1.2.2
--- src/share/man/man4/xmd.4:1.1.2.1	Thu Aug 19 12:36:59 2010
+++ src/share/man/man4/xmd.4	Thu Oct 28 03:27:55 2010
@@ -1,8 +1,8 @@
-.\ $NetBSD: xmd.4,v 1.1.2.1 2010/08/19 12:36:59 uebayasi Exp $
+.\ $NetBSD: xmd.4,v 1.1.2.2 2010/10/28 03:27:55 uebayasi Exp $
 .\
 .\ This file is in the public domain.
 .\
-.Dd August 19, 2010
+.Dd October 28, 2010
 .Dt XMD 4
 .Os
 .Sh NAME
@@ -28,3 +28,12 @@
 .Xr md 4 ,
 .Xr options 4 ,
 .Xr mdsetimage 8
+.Sh BUGS
+Due to the design of XIP, device pages in a physical segment must
+be contiguous.
+This leads to a restriction that the page array in the
+.Nm
+driver must be also contiguous.
+It is highly expectable that the
+.Nm
+kernel module will not work.



CVS commit: src/sys/dev/acpi

2010-10-27 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Oct 28 04:27:40 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi_cpu_pstate.c

Log Message:
Only override data from XPSS if the conventional _PSS did not contain the
required information. Problem found and diagnosed by jakllsch@; on some AMD
systems vendors fill _PSS correctly, but do not duplicate the data in XPSS.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/acpi/acpi_cpu_pstate.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/acpi/acpi_cpu_pstate.c
diff -u src/sys/dev/acpi/acpi_cpu_pstate.c:1.33 src/sys/dev/acpi/acpi_cpu_pstate.c:1.34
--- src/sys/dev/acpi/acpi_cpu_pstate.c:1.33	Sat Aug 21 13:12:15 2010
+++ src/sys/dev/acpi/acpi_cpu_pstate.c	Thu Oct 28 04:27:40 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_pstate.c,v 1.33 2010/08/21 13:12:15 jmcneill Exp $ */
+/* $NetBSD: acpi_cpu_pstate.c,v 1.34 2010/10/28 04:27:40 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.33 2010/08/21 13:12:15 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_cpu_pstate.c,v 1.34 2010/10/28 04:27:40 jruoho Exp $);
 
 #include sys/param.h
 #include sys/evcnt.h
@@ -75,12 +75,13 @@
 	}
 
 	/*
-	 * Check the availability of extended _PSS.
-	 * If present, this will override the data.
-	 * Note that XPSS can not be used on Intel
-	 * systems where _PDC or _OSC may be used.
+	 * Append additional information from the
+	 * extended _PSS, if available. Note that
+	 * XPSS can not be used on Intel systems
+	 * that use either _PDC or _OSC.
 	 */
 	if (sc-sc_cap == 0) {
+
 		rv = acpicpu_pstate_xpss(sc);
 
 		if (ACPI_SUCCESS(rv))
@@ -486,13 +487,11 @@
 static ACPI_STATUS
 acpicpu_pstate_xpss(struct acpicpu_softc *sc)
 {
-	static const size_t size = sizeof(struct acpicpu_pstate);
-	struct acpicpu_pstate *ps, *pstate = NULL;
+	struct acpicpu_pstate *ps;
 	ACPI_OBJECT *obj;
 	ACPI_BUFFER buf;
 	ACPI_STATUS rv;
-	uint32_t count, pstate_count;
-	uint32_t i, j;
+	uint32_t i = 0;
 
 	rv = acpi_eval_struct(sc-sc_node-ad_handle, XPSS, buf);
 
@@ -506,56 +505,17 @@
 		goto out;
 	}
 
-	pstate_count = count = obj-Package.Count;
-
-	if (count == 0) {
-		rv = AE_NOT_EXIST;
-		goto out;
-	}
-
-	if (count  ACPICPU_P_STATE_MAX) {
+	if (obj-Package.Count != sc-sc_pstate_count) {
 		rv = AE_LIMIT;
 		goto out;
 	}
 
-	pstate = kmem_zalloc(count * size, KM_SLEEP);
-
-	if (pstate == NULL) {
-		rv = AE_NO_MEMORY;
-		goto out;
-	}
-
-	for (count = i = 0; i  pstate_count; i++) {
-
-		ps = pstate[i];
-		rv = acpicpu_pstate_xpss_add(ps, obj-Package.Elements[i]);
-
-		if (ACPI_FAILURE(rv)) {
-			ps-ps_freq = 0;
-			continue;
-		}
-
-		for (j = 0; j  i; j++) {
+	while (i  sc-sc_pstate_count) {
 
-			if (ps-ps_freq = pstate[j].ps_freq) {
-ps-ps_freq = 0;
-break;
-			}
-		}
-
-		if (ps-ps_freq != 0)
-			count++;
-	}
+		ps = sc-sc_pstate[i];
+		acpicpu_pstate_xpss_add(ps, obj-Package.Elements[i]);
 
-	if (count  0) {
-		if (sc-sc_pstate != NULL)
-			kmem_free(sc-sc_pstate, sc-sc_pstate_count * size);
-		sc-sc_pstate = pstate;
-		sc-sc_pstate_count = pstate_count;
-		rv = AE_OK;
-	} else {
-		kmem_free(pstate, pstate_count * size);
-		rv = AE_NOT_EXIST;
+		i++;
 	}
 
 out:
@@ -597,18 +557,33 @@
 			return AE_LIMIT;
 	}
 
-	ps-ps_freq   = elm[0].Integer.Value;
-	ps-ps_power  = elm[1].Integer.Value;
-	ps-ps_latency= elm[2].Integer.Value;
-	ps-ps_latency_bm = elm[3].Integer.Value;
+	/*
+	 * Only overwrite the elements that were
+	 * not available from the conventional _PSS.
+	 */
+	if (ps-ps_freq == 0)
+		ps-ps_freq = elm[0].Integer.Value;
 
-	if (ps-ps_freq == 0 || ps-ps_freq  )
-		return AE_BAD_DECIMAL_CONSTANT;
+	if (ps-ps_power == 0)
+		ps-ps_power = elm[1].Integer.Value;
+
+	if (ps-ps_latency == 0)
+		ps-ps_latency = elm[2].Integer.Value;
+
+	if (ps-ps_latency_bm == 0)
+		ps-ps_latency_bm = elm[3].Integer.Value;
 
-	ps-ps_control = ACPI_GET64(elm[4].Buffer.Pointer);
-	ps-ps_status = ACPI_GET64(elm[5].Buffer.Pointer);
-	ps-ps_control_mask = ACPI_GET64(elm[6].Buffer.Pointer);
-	ps-ps_status_mask = ACPI_GET64(elm[7].Buffer.Pointer);
+	if (ps-ps_control == 0)
+		ps-ps_control = ACPI_GET64(elm[4].Buffer.Pointer);
+
+	if (ps-ps_status == 0)
+		ps-ps_status = ACPI_GET64(elm[5].Buffer.Pointer);
+
+	if (ps-ps_control_mask == 0)
+		ps-ps_control_mask = ACPI_GET64(elm[6].Buffer.Pointer);
+
+	if (ps-ps_status_mask == 0)
+		ps-ps_status_mask = ACPI_GET64(elm[7].Buffer.Pointer);
 
 	/*
 	 * The latency is often defined to be
@@ -619,6 +594,9 @@
 
 	ps-ps_flags |= ACPICPU_FLAG_P_XPSS;
 
+	if (ps-ps_freq  )
+		return AE_BAD_DECIMAL_CONSTANT;
+
 	return AE_OK;
 }
 



CVS commit: src/sys/dev/acpi

2010-10-27 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Oct 28 04:28:29 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi_cpu.c

Log Message:
Fix a comment typo.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/acpi/acpi_cpu.c

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

Modified files:

Index: src/sys/dev/acpi/acpi_cpu.c
diff -u src/sys/dev/acpi/acpi_cpu.c:1.22 src/sys/dev/acpi/acpi_cpu.c:1.23
--- src/sys/dev/acpi/acpi_cpu.c:1.22	Fri Aug 27 03:05:26 2010
+++ src/sys/dev/acpi/acpi_cpu.c	Thu Oct 28 04:28:29 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu.c,v 1.22 2010/08/27 03:05:26 jruoho Exp $ */
+/* $NetBSD: acpi_cpu.c,v 1.23 2010/10/28 04:28:29 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_cpu.c,v 1.22 2010/08/27 03:05:26 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_cpu.c,v 1.23 2010/10/28 04:28:29 jruoho Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -468,7 +468,7 @@
 	 * bits cleared, but this is specified to
 	 * vary on per-device basis. Assume that
 	 * everything rather than nothing will be
-	 * supported in thise case; we do not need
+	 * supported in this case; we do not need
 	 * the firmware to know the CPU features.
 	 */
 	*val = (ptr[1] != 0) ? ptr[1] : cap[1];



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

2010-10-27 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Oct 27 10:33:23 UTC 2010

Modified Files:
src/sys/arch/bebox/include: bootinfo.h

Log Message:
Add macro BTINFO_ROOTDEVICE and struct btinfo_rootdevice.
And indent.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/bebox/include/bootinfo.h

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



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-27 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Oct 27 10:37:38 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: boot.c

Log Message:
Set root-device to bootinfo.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/bebox/stand/boot/boot.c

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



CVS commit: src/sys/arch/bebox/bebox

2010-10-27 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Wed Oct 27 10:42:13 UTC 2010

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

Log Message:
Get and parse root-device.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/bebox/bebox/autoconf.c

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



CVS commit: src/sys

2010-10-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Oct 27 14:08:09 UTC 2010

Modified Files:
src/sys/arch/hpcmips/conf: majors.hpcmips
src/sys/conf: majors

Log Message:
Reserve an MI major for coming flash(4).

hpcmips defines one in MD majors, but it's not listed in
etc/etc.hpcmips/MAKEDEV.conf, so I assume actual files are never
created in users' filesystems.

Prompted By:pooka


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hpcmips/conf/majors.hpcmips
cvs rdiff -u -r1.52 -r1.53 src/sys/conf/majors

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



CVS commit: [uebayasi-xip] src/sys

2010-10-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Wed Oct 27 14:13:57 UTC 2010

Modified Files:
src/sys/arch/amd64/conf [uebayasi-xip]: majors.amd64
src/sys/arch/evbppc/conf [uebayasi-xip]: majors.evbppc
src/sys/arch/hpcmips/conf [uebayasi-xip]: majors.hpcmips
src/sys/arch/i386/conf [uebayasi-xip]: majors.i386
src/sys/conf [uebayasi-xip]: majors

Log Message:
Move flash(4)/xmd(4) majors to MI, as suggested by Chuck Silvers.


To generate a diff of this commit:
cvs rdiff -u -r1.21.6.1 -r1.21.6.2 src/sys/arch/amd64/conf/majors.amd64
cvs rdiff -u -r1.28.6.2 -r1.28.6.3 src/sys/arch/evbppc/conf/majors.evbppc
cvs rdiff -u -r1.27 -r1.27.6.1 src/sys/arch/hpcmips/conf/majors.hpcmips
cvs rdiff -u -r1.37.6.2 -r1.37.6.3 src/sys/arch/i386/conf/majors.i386
cvs rdiff -u -r1.47.2.3 -r1.47.2.4 src/sys/conf/majors

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



CVS commit: src

2010-10-27 Thread Grégoire Sutre
Module Name:src
Committed By:   gsutre
Date:   Wed Oct 27 14:39:27 UTC 2010

Modified Files:
src/share/man/man4: acpi.4
src/sys/dev/acpi: acpi_debug.c

Log Message:
Make acpi(4) debug aware of ACPI_DISPLAY_COMPONENT.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/share/man/man4/acpi.4
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/acpi_debug.c

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



CVS commit: src/distrib/notes/macppc

2010-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct 27 14:41:47 UTC 2010

Modified Files:
src/distrib/notes/macppc: prep.OPENFIRMWARE

Log Message:
Update rawrite32 url


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/notes/macppc/prep.OPENFIRMWARE

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



CVS commit: src/distrib/notes/common

2010-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct 27 18:17:42 UTC 2010

Modified Files:
src/distrib/notes/common: main

Log Message:
Adapt to newer Rawrite32 version


To generate a diff of this commit:
cvs rdiff -u -r1.466 -r1.467 src/distrib/notes/common/main

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



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

2010-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct 27 18:29:46 UTC 2010

Modified Files:
src/sys/arch/i386/stand/misc: Makefile
Added Files:
src/sys/arch/i386/stand/misc: rawr32.exe.uue
Removed Files:
src/sys/arch/i386/stand/misc: rawr32.zip.uue rawr32src.zip.uue

Log Message:
Update Rawrite32 to the latest version


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/i386/stand/misc/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/arch/i386/stand/misc/rawr32.exe.uue
cvs rdiff -u -r1.1 -r0 src/sys/arch/i386/stand/misc/rawr32.zip.uue \
src/sys/arch/i386/stand/misc/rawr32src.zip.uue

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



CVS commit: src/usr.sbin/makefs

2010-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 27 18:51:35 UTC 2010

Modified Files:
src/usr.sbin/makefs: cd9660.c cd9660.h
src/usr.sbin/makefs/cd9660: cd9660_debug.c cd9660_eltorito.c

Log Message:
Handle  2GB images. Thanks to Greg Troxel for testing!


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/makefs/cd9660.c
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/makefs/cd9660.h
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/makefs/cd9660/cd9660_debug.c
cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/makefs/cd9660/cd9660_eltorito.c

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



CVS commit: src/lib/libc/time

2010-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct 27 19:16:04 UTC 2010

Modified Files:
src/lib/libc/time: ctime.3

Log Message:
markup improvements, document ctype_r, time_t is not a long integer


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/libc/time/ctime.3

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



CVS commit: src/lib/libc/time

2010-10-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Oct 27 19:18:00 UTC 2010

Modified Files:
src/lib/libc/time: ctime.3

Log Message:
Fix a typo and remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libc/time/ctime.3

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



CVS commit: src/sys/rump/librump/rumpkern

2010-10-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Oct 27 20:34:50 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: rumpkern.ifspec
Removed Files:
src/sys/rump/librump/rumpkern: sysproxy_socket.c

Log Message:
Retire the old sysproxy nonsense (as part of doing it slightly better).

Introduce rump_pub_syscall() as the generic interface for making
system calls with already marshalled arguments.  So it's kinda like
syscall(2), except it also remembered to breathe instead of having
to figure out how to deal with 64bit values.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpkern/rumpkern.ifspec
cvs rdiff -u -r1.9 -r0 src/sys/rump/librump/rumpkern/sysproxy_socket.c

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



CVS commit: src/sys/rump

2010-10-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Oct 27 20:35:48 UTC 2010

Modified Files:
src/sys/rump/include/rump: rumpkern_if_pub.h
src/sys/rump/librump/rumpkern: rumpkern_if_priv.h
rumpkern_if_wrappers.c

Log Message:
regen:
- rump_sysproxy
+ rump_syscall


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/rump/include/rump/rumpkern_if_pub.h
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h \
src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c

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



CVS commit: src/sys/rump/librump/rumpkern

2010-10-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Oct 27 20:37:11 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: Makefile.rumpkern

Log Message:
i build dead files.  ok, so let's not.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/rump/librump/rumpkern/Makefile.rumpkern

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



CVS commit: src

2010-10-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Oct 27 20:44:50 UTC 2010

Modified Files:
src/lib/librumpuser: Makefile
src/sys/rump/include/rump: rump.h rumpuser.h
src/sys/rump/librump/rumpkern: rump.c rump_private.h rumpcopy.c vm.c
Added Files:
src/lib/librumpuser: rumpuser_sp.c

Log Message:
Start rework of system call proxying over socket (sysproxy).
This incarnation is written in the user namespace as opposed to
the previous one which was done in kernel namespace.  Also, rump
does all the handshaking now instead of excepting an application
to come up with the user namespace socket.

There's still a lot to do, including making code a bit more
robust, actually running different clients in a different process
inside the kernel and splitting the client side library from librump.
I'm committing this now so that I don't lose it, plus it generally
works as long as you don't use it in unexcepted ways: i've tested
ifconfig(8), route(8), envstat(8) and sysctl(8).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librumpuser/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/librumpuser/rumpuser_sp.c
cvs rdiff -u -r1.45 -r1.46 src/sys/rump/include/rump/rump.h \
src/sys/rump/include/rump/rumpuser.h
cvs rdiff -u -r1.190 -r1.191 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.58 -r1.59 src/sys/rump/librump/rumpkern/rump_private.h
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/librump/rumpkern/rumpcopy.c
cvs rdiff -u -r1.97 -r1.98 src/sys/rump/librump/rumpkern/vm.c

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



CVS commit: src/etc/powerd/scripts

2010-10-27 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Oct 28 02:06:03 UTC 2010

Modified Files:
src/etc/powerd/scripts: lid_switch

Log Message:
adapt to how backlight control is supposed to work - just flip the switch and
we don't need to save the brightness level


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/etc/powerd/scripts/lid_switch

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



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

2010-10-27 Thread Allen Briggs
Module Name:src
Committed By:   briggs
Date:   Thu Oct 28 02:10:27 UTC 2010

Modified Files:
src/sys/arch/evbarm/conf: ADI_BRH CP3100 IQ80310 IQ80321 TEAMASA_NPWR
TEAMASA_NPWR_FC

Log Message:
Bump SYMTAB_SPACE for a few configurations.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/evbarm/conf/ADI_BRH
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/CP3100
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/evbarm/conf/IQ80310
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/evbarm/conf/IQ80321
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/evbarm/conf/TEAMASA_NPWR
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/conf/TEAMASA_NPWR_FC

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



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

2010-10-27 Thread Allen Briggs
Module Name:src
Committed By:   briggs
Date:   Thu Oct 28 03:30:22 UTC 2010

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

Log Message:
Bump SYMTAB_SPACE.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/evbarm/conf/TWINTAIL

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



CVS commit: [uebayasi-xip] src/share/man/man4

2010-10-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Oct 28 03:27:55 UTC 2010

Modified Files:
src/share/man/man4 [uebayasi-xip]: xmd.4

Log Message:
Note that underlying char array must be physically contiguous.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/share/man/man4/xmd.4

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



CVS commit: src/sys/dev/acpi

2010-10-27 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Oct 28 04:27:40 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi_cpu_pstate.c

Log Message:
Only override data from XPSS if the conventional _PSS did not contain the
required information. Problem found and diagnosed by jakllsch@; on some AMD
systems vendors fill _PSS correctly, but do not duplicate the data in XPSS.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/acpi/acpi_cpu_pstate.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/acpi

2010-10-27 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu Oct 28 04:28:29 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi_cpu.c

Log Message:
Fix a comment typo.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/acpi/acpi_cpu.c

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