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

2013-01-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jan  9 04:52:47 UTC 2013

Modified Files:
src/sys/arch/arm/omap: omapfb.c

Log Message:
remove debug cruft


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/omap/omapfb.c

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

Modified files:

Index: src/sys/arch/arm/omap/omapfb.c
diff -u src/sys/arch/arm/omap/omapfb.c:1.8 src/sys/arch/arm/omap/omapfb.c:1.9
--- src/sys/arch/arm/omap/omapfb.c:1.8	Wed Jan  9 04:40:46 2013
+++ src/sys/arch/arm/omap/omapfb.c	Wed Jan  9 04:52:47 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: omapfb.c,v 1.8 2013/01/09 04:40:46 macallan Exp $	*/
+/*	$NetBSD: omapfb.c,v 1.9 2013/01/09 04:52:47 macallan Exp $	*/
 
 /*
  * Copyright (c) 2010 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omapfb.c,v 1.8 2013/01/09 04:40:46 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omapfb.c,v 1.9 2013/01/09 04:52:47 macallan Exp $");
 
 #include 
 #include 
@@ -657,7 +657,7 @@ omapfb_rectfill(struct omapfb_softc *sc,
 	CCR_SRC_AMODE_CONST_ADDR);
 	omapdma_write_ch_reg(0, OMAPDMAC_CDEI, 1);
 	omapdma_write_ch_reg(0, OMAPDMAC_CDFI, (sc->sc_stride - width_in_bytes) + 1);
-	omapdma_write_ch_reg(0, OMAPDMAC_COLOR, colour & ~0xe000);
+	omapdma_write_ch_reg(0, OMAPDMAC_COLOR, colour);
 	omapdma_write_ch_reg(0, OMAPDMAC_CCR,
 	CCR_CONST_FILL_ENABLE | CCR_DST_AMODE_DOUBLE_INDEX |
 	CCR_SRC_AMODE_CONST_ADDR | CCR_ENABLE);



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

2013-01-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jan  9 04:49:05 UTC 2013

Modified Files:
src/sys/arch/arm/omap: files.omap2

Log Message:
omapdma needs-flag now


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/omap/files.omap2

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

Modified files:

Index: src/sys/arch/arm/omap/files.omap2
diff -u src/sys/arch/arm/omap/files.omap2:1.23 src/sys/arch/arm/omap/files.omap2:1.24
--- src/sys/arch/arm/omap/files.omap2:1.23	Wed Jan  9 03:35:11 2013
+++ src/sys/arch/arm/omap/files.omap2	Wed Jan  9 04:49:05 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.omap2,v 1.23 2013/01/09 03:35:11 macallan Exp $
+#	$NetBSD: files.omap2,v 1.24 2013/01/09 04:49:05 macallan Exp $
 #
 # Configuration info for Texas Instruments OMAP2/OMAP3 CPU support
 # Based on xscale/files.pxa2x0
@@ -135,7 +135,7 @@ file	arch/arm/omap/if_cpsw.c			cpsw
 
 device 	omapdma
 attach 	omapdma at obio
-file	arch/arm/omap/omap3_sdma.c		omapdma
+file	arch/arm/omap/omap3_sdma.c		omapdma needs-flag
 
 # these bus space methods are not bus-specific ...
 #



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

2013-01-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jan  9 04:44:54 UTC 2013

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

Log Message:
add omapdma, also re-enable omapfb since it no longer unconditionally hogs
the console


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/evbarm/conf/BEAGLEBOARD

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/BEAGLEBOARD
diff -u src/sys/arch/evbarm/conf/BEAGLEBOARD:1.39 src/sys/arch/evbarm/conf/BEAGLEBOARD:1.40
--- src/sys/arch/evbarm/conf/BEAGLEBOARD:1.39	Tue Jan  1 13:05:46 2013
+++ src/sys/arch/evbarm/conf/BEAGLEBOARD	Wed Jan  9 04:44:54 2013
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: BEAGLEBOARD,v 1.39 2013/01/01 13:05:46 jmcneill Exp $
+#	$NetBSD: BEAGLEBOARD,v 1.40 2013/01/09 04:44:54 macallan Exp $
 #
 #	BEAGLEBOARD -- TI OMAP 3530 Eval Board Kernel
 #
@@ -251,8 +251,11 @@ options OMAP_MPU_TIMER_CLOCK_FREQ=12
 #omapwdt32k*	at obio2 addr 0x4903 size 2048	# WDT3
 omapwdt32k*	at obio1 addr 0x48314000 size 2048	# WDT2
 
+# onboard DMA
+omapdma0	at obio0 addr 0x48056000 size 0x1000
+
 # onboard video
-#omapfb* 	at obio0 addr 0x4805 size 0x1
+omapfb* 	at obio0 addr 0x4805 size 0x1
 
 # make sure the console display is always wsdisplay0
 #wsdisplay0	at wsemuldisplaydev? console 1



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

2013-01-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jan  9 04:40:47 UTC 2013

Modified Files:
src/sys/arch/arm/omap: omapfb.c

Log Message:
if omapdma is present, (ab)use channel 0 for basic graphics acceleration
idea from RISC OS


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/omap/omapfb.c

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

Modified files:

Index: src/sys/arch/arm/omap/omapfb.c
diff -u src/sys/arch/arm/omap/omapfb.c:1.7 src/sys/arch/arm/omap/omapfb.c:1.8
--- src/sys/arch/arm/omap/omapfb.c:1.7	Tue Jan  1 23:22:44 2013
+++ src/sys/arch/arm/omap/omapfb.c	Wed Jan  9 04:40:46 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: omapfb.c,v 1.7 2013/01/01 23:22:44 jmcneill Exp $	*/
+/*	$NetBSD: omapfb.c,v 1.8 2013/01/09 04:40:46 macallan Exp $	*/
 
 /*
  * Copyright (c) 2010 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omapfb.c,v 1.7 2013/01/01 23:22:44 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omapfb.c,v 1.8 2013/01/09 04:40:46 macallan Exp $");
 
 #include 
 #include 
@@ -49,6 +49,8 @@ __KERNEL_RCSID(0, "$NetBSD: omapfb.c,v 1
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -58,6 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: omapfb.c,v 1
 
 #include 
 
+#include "omapdma.h"
+
 struct omapfb_softc {
 	device_t sc_dev;
 
@@ -71,6 +75,7 @@ struct omapfb_softc {
 	int sc_width, sc_height, sc_depth, sc_stride;
 	int sc_locked;
 	void *sc_fbaddr, *sc_vramaddr;
+	bus_addr_t sc_fbhwaddr;
 	uint32_t *sc_clut;
 	struct vcons_screen sc_console_screen;
 	struct wsscreen_descr sc_defaultscreen_descr;
@@ -79,6 +84,7 @@ struct omapfb_softc {
 	struct vcons_data vd;
 	int sc_mode;
 	uint8_t sc_cmap_red[256], sc_cmap_green[256], sc_cmap_blue[256];
+	void (*sc_putchar)(void *, int, int, u_int, long);
 
 	uint8_t sc_edid_data[1024];
 	size_t sc_edid_size;
@@ -95,16 +101,15 @@ static int	omapfb_ioctl(void *, void *, 
 static paddr_t	omapfb_mmap(void *, void *, off_t, int);
 static void	omapfb_init_screen(void *, struct vcons_screen *, int, long *);
 
-static void	omapfb_init(struct omapfb_softc *);
-
 static int	omapfb_putcmap(struct omapfb_softc *, struct wsdisplay_cmap *);
 static int 	omapfb_getcmap(struct omapfb_softc *, struct wsdisplay_cmap *);
 static void	omapfb_restore_palette(struct omapfb_softc *);
 static void 	omapfb_putpalreg(struct omapfb_softc *, int, uint8_t,
 			uint8_t, uint8_t);
 
-#if 0
-static void	omapfb_flush_engine(struct omapfb_softc *);
+#if NOMAPDMA > 0
+static void	omapfb_init(struct omapfb_softc *);
+static void	omapfb_wait_idle(struct omapfb_softc *);
 static void	omapfb_rectfill(struct omapfb_softc *, int, int, int, int,
 			uint32_t);
 static void	omapfb_bitblt(struct omapfb_softc *, int, int, int, int, int,
@@ -116,7 +121,7 @@ static void	omapfb_copycols(void *, int,
 static void	omapfb_erasecols(void *, int, int, int, long);
 static void	omapfb_copyrows(void *, int, int, int);
 static void	omapfb_eraserows(void *, int, int, long);
-#endif
+#endif /* NOMAPDMA > 0 */
 
 struct wsdisplay_accessops omapfb_accessops = {
 	omapfb_ioctl,
@@ -215,7 +220,6 @@ omapfb_attach(device_t parent, device_t 
 	dict = device_properties(self);
 	prop_dictionary_get_bool(dict, "is_console", &is_console);
 	edid_data = prop_dictionary_get(dict, "EDID");
-	//is_console = 1;
 
 	if (edid_data != NULL) {
 		struct edid_info ei;
@@ -294,8 +298,9 @@ omapfb_attach(device_t parent, device_t 
 	reg = 0x8;
 	bus_space_write_4(sc->sc_iot, sc->sc_regh, OMAPFB_DISPC_CONFIG, reg);
 	
+	sc->sc_fbhwaddr = sc->sc_dmamem->ds_addr + 0x1000;
 	bus_space_write_4(sc->sc_iot, sc->sc_regh, OMAPFB_DISPC_GFX_BASE_0, 
-	sc->sc_dmamem->ds_addr + 0x1000);
+	sc->sc_fbhwaddr);
 	bus_space_write_4(sc->sc_iot, sc->sc_regh, OMAPFB_DISPC_GFX_TABLE_BASE, 
 	sc->sc_dmamem->ds_addr);
 	bus_space_write_4(sc->sc_iot, sc->sc_regh, OMAPFB_DISPC_GFX_POSITION, 
@@ -367,7 +372,9 @@ omapfb_attach(device_t parent, device_t 
 	sc->vd.init_screen = omapfb_init_screen;
 
 	/* init engine here */
+#if NOMAPDMA > 0
 	omapfb_init(sc);
+#endif
 
 	ri = &sc->sc_console_screen.scr_ri;
 
@@ -376,7 +383,7 @@ omapfb_attach(device_t parent, device_t 
 		&defattr);
 		sc->sc_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC;
 
-#if 0
+#if NOMAPDMA > 0
 		omapfb_rectfill(sc, 0, 0, sc->sc_width, sc->sc_height,
 		ri->ri_devcmap[(defattr >> 16) & 0xff]);
 #endif
@@ -401,7 +408,19 @@ omapfb_attach(device_t parent, device_t 
 	aa.accesscookie = &sc->vd;
 
 	config_found(sc->sc_dev, &aa, wsemuldisplaydevprint);
-	
+#ifdef OMAPFB_DEBUG
+#if NOMAPDMA > 0
+	omapfb_rectfill(sc, 100, 100, 100, 100, 0xe000);
+	omapfb_rectfill(sc, 100, 200, 100, 100, 0x01f8);
+	omapfb_rectfill(sc, 200, 100, 100, 100, 0x01f8);
+	omapfb_rectfill(sc, 200, 200, 100, 100, 0xe000);
+	omapfb_bitblt(sc, 100, 100, 400, 100, 200, 200, 0);
+	/* let's see if we can draw something */
+	printf("OMAPDMAC_CDAC: %08x\n",

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

2013-01-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jan  9 04:38:15 UTC 2013

Modified Files:
src/sys/arch/arm/omap: omap3_sdma.c omap3_sdmareg.h

Log Message:
do some more setup, while there fix a bunch of typos


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/omap3_sdma.c \
src/sys/arch/arm/omap/omap3_sdmareg.h

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

Modified files:

Index: src/sys/arch/arm/omap/omap3_sdma.c
diff -u src/sys/arch/arm/omap/omap3_sdma.c:1.1 src/sys/arch/arm/omap/omap3_sdma.c:1.2
--- src/sys/arch/arm/omap/omap3_sdma.c:1.1	Wed Jan  9 03:35:11 2013
+++ src/sys/arch/arm/omap/omap3_sdma.c	Wed Jan  9 04:38:14 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap3_sdma.c,v 1.1 2013/01/09 03:35:11 macallan Exp $	*/
+/*	$NetBSD: omap3_sdma.c,v 1.2 2013/01/09 04:38:14 macallan Exp $	*/
 
 /*
  * Copyright (c) 2012 Michael Lorenz
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap3_sdma.c,v 1.1 2013/01/09 03:35:11 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdma.c,v 1.2 2013/01/09 04:38:14 macallan Exp $");
 
 #include 
 #include 
@@ -109,6 +109,10 @@ omapdma_attach(device_t parent, device_t
 	OMAPDMA_IDLEMODE_SMART_STANDBY | OMAPDMA_SMART_IDLE | 
 	OMAPDMA_AUTOIDLE);
 
+	/* allow more FIFO space for large bursts used by omapfb */
+	bus_space_write_4(sc->sc_iot, sc->sc_regh, OMAPDMA_GCR, 
+		(1 << OMAPDMA_GCR_ARB_RATE_SHIFT) | 0x80);
+
 	omapdma_sc = sc;
 
 	/*
Index: src/sys/arch/arm/omap/omap3_sdmareg.h
diff -u src/sys/arch/arm/omap/omap3_sdmareg.h:1.1 src/sys/arch/arm/omap/omap3_sdmareg.h:1.2
--- src/sys/arch/arm/omap/omap3_sdmareg.h:1.1	Wed Jan  9 03:35:11 2013
+++ src/sys/arch/arm/omap/omap3_sdmareg.h	Wed Jan  9 04:38:14 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap3_sdmareg.h,v 1.1 2013/01/09 03:35:11 macallan Exp $ */
+/*	$NetBSD: omap3_sdmareg.h,v 1.2 2013/01/09 04:38:14 macallan Exp $ */
 
 /*
  * Copyright (c) 2012 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap3_sdmareg.h,v 1.1 2013/01/09 03:35:11 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdmareg.h,v 1.2 2013/01/09 04:38:14 macallan Exp $");
 
 #ifndef OMAPDMA_REG_H
 #define OMAPDMA_REG_H
@@ -74,6 +74,18 @@ __KERNEL_RCSID(0, "$NetBSD: omap3_sdmare
 #define OMAPDMA_CAPS_3		0x0070
 #define OMAPDMA_CAPS_4		0x0074
 #define OMAPDMA_GCR		0x0078
+	#define OMAPDMA_GCR_ARB_RATE_MASK	0x00ff
+	#define OMAPDMA_GCR_ARB_RATE_SHIFT	16
+	#define OMAPDMA_GCR_FIFO_BUDGET_NONE	0x
+	#define OMAPDMA_GCR_FIFO_BUDGET_75L	0x4000
+	#define OMAPDMA_GCR_FIFO_BUDGET_25L	0x8000
+	#define OMAPDMA_GCR_FIFO_BUDGET_50L	0xc000
+	#define OMAPDMA_GCR_HI_THREAD_NONE	0x
+	#define OMAPDMA_GCR_HI_THREAD_0		0x1000
+	#define OMAPDMA_GCR_HI_THREAD_01	0x2000
+	#define OMAPDMA_GCR_HI_THREAD_012	0x3000
+	#define OMAPDMA_GCR_MAX_FIFO_DEPTH_MASK	0x00ff
+
 
 /*
  * there are 32 channels, each occupies a 0x60 register space starting at
@@ -149,12 +161,12 @@ __KERNEL_RCSID(0, "$NetBSD: omap3_sdmare
 	#define CSDPI_DST_BURST_32		0x8000
 	#define CSDPI_DST_BURST_64		0xc000
 	#define CSDPI_DST_PACKED		0x2000
-	#define CSDPI_SCR_BURST_MASK		0x0180
-	#define CSDPI_SCR_BURST_SINGLE		0x
-	#define CSDPI_SCR_BURST_16		0x0080
-	#define CSDPI_SCR_BURST_32		0x0100
-	#define CSDPI_SCR_BURST_64		0x0180
-	#define CSDPI_SCR_PACKED		0x0040
+	#define CSDPI_SRC_BURST_MASK		0x0180
+	#define CSDPI_SRC_BURST_SINGLE		0x
+	#define CSDPI_SRC_BURST_16		0x0080
+	#define CSDPI_SRC_BURST_32		0x0100
+	#define CSDPI_SRC_BURST_64		0x0180
+	#define CSDPI_SRC_PACKED		0x0040
 	#define CSDPI_DATA_TYPE_MASK		0x0003
 	#define CSDPI_DATA_TYPE_8		0x
 	#define CSDPI_DATA_TYPE_16		0x0001



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

2013-01-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jan  9 03:35:11 UTC 2013

Modified Files:
src/sys/arch/arm/omap: files.omap2
Added Files:
src/sys/arch/arm/omap: omap3_sdma.c omap3_sdmareg.h omap3_sdmavar.h
Removed Files:
src/sys/arch/arm/omap: omapdma.c omapdmareg.h omapdmavar.h

Log Message:
omapdma* -> omap3_sdma*


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/omap/files.omap2
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/omap/omap3_sdma.c \
src/sys/arch/arm/omap/omap3_sdmareg.h \
src/sys/arch/arm/omap/omap3_sdmavar.h
cvs rdiff -u -r1.1 -r0 src/sys/arch/arm/omap/omapdma.c \
src/sys/arch/arm/omap/omapdmareg.h src/sys/arch/arm/omap/omapdmavar.h

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

Modified files:

Index: src/sys/arch/arm/omap/files.omap2
diff -u src/sys/arch/arm/omap/files.omap2:1.22 src/sys/arch/arm/omap/files.omap2:1.23
--- src/sys/arch/arm/omap/files.omap2:1.22	Thu Jan  3 21:13:26 2013
+++ src/sys/arch/arm/omap/files.omap2	Wed Jan  9 03:35:11 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.omap2,v 1.22 2013/01/03 21:13:26 jakllsch Exp $
+#	$NetBSD: files.omap2,v 1.23 2013/01/09 03:35:11 macallan Exp $
 #
 # Configuration info for Texas Instruments OMAP2/OMAP3 CPU support
 # Based on xscale/files.pxa2x0
@@ -133,6 +133,10 @@ device	cpsw: ether, ifnet, arp, mii, mii
 attach	cpsw at obio
 file	arch/arm/omap/if_cpsw.c			cpsw
 
+device 	omapdma
+attach 	omapdma at obio
+file	arch/arm/omap/omap3_sdma.c		omapdma
+
 # these bus space methods are not bus-specific ...
 #
 file	arch/arm/omap/omap_nobyteacc_space.c	emifs | gpmc

Added files:

Index: src/sys/arch/arm/omap/omap3_sdma.c
diff -u /dev/null src/sys/arch/arm/omap/omap3_sdma.c:1.1
--- /dev/null	Wed Jan  9 03:35:11 2013
+++ src/sys/arch/arm/omap/omap3_sdma.c	Wed Jan  9 03:35:11 2013
@@ -0,0 +1,157 @@
+/*	$NetBSD: omap3_sdma.c,v 1.1 2013/01/09 03:35:11 macallan Exp $	*/
+
+/*
+ * Copyright (c) 2012 Michael Lorenz
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * OMAP 3530 DMA controller
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdma.c,v 1.1 2013/01/09 03:35:11 macallan Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct omapdma_softc {
+	device_t sc_dev;
+
+	bus_space_tag_t sc_iot;
+	bus_space_handle_t sc_regh;
+};
+
+static int	omapdma_match(device_t, cfdata_t, void *);
+static void	omapdma_attach(device_t, device_t, void *);
+
+CFATTACH_DECL_NEW(omapdma, sizeof(struct omapdma_softc),
+omapdma_match, omapdma_attach, NULL, NULL);
+
+struct omapdma_softc *omapdma_sc = NULL;
+
+static int
+omapdma_match(device_t parent, cfdata_t match, void *aux)
+{
+	struct obio_attach_args *obio = aux;
+
+	if ((obio->obio_addr == -1) || (obio->obio_size == 0))
+		return 0;
+	return 1;
+}
+
+static void
+omapdma_attach(device_t parent, device_t self, void *aux)
+{
+	struct omapdma_softc	*sc = device_private(self);
+	struct obio_attach_args *obio = aux;
+	uint32_t reg;
+
+	sc->sc_iot = obio->obio_iot;
+	sc->sc_dev = self;
+	
+	printf(": OMAP DMA controller rev ");
+	if (bus_space_map(obio->obio_iot, obio->obio_addr, obio->obio_size, 0,
+	&sc->sc_regh)) {
+		aprint_error_dev(sc->sc_dev, ": couldn't map register space\n");
+		return;
+	}
+	reg = bus_space_read_4(sc->sc_iot, sc->sc_regh, OMAPDMA_REVISION);
+	printf("%d.%d\n", (reg >> 4) & 0xf, reg & 0xf);
+
+	/* disable & clear all interrupts etc. */
+	bus_space_write_4(sc->sc_iot, sc->sc_regh, OMAPDMA_IRQENABLE_L0, 0);
+	bus_space_write_4(sc->sc_iot, sc->sc_regh, OMAPDMA_IRQENABLE_L1, 0);
+	bus_space_write_4(sc->sc_iot

CVS commit: src/sys/dev/usb

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jan  9 02:05:12 UTC 2013

Modified Files:
src/sys/dev/usb: usbdevices.config

Log Message:
add scsibus at umass and sd at scsibus


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/usb/usbdevices.config

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

Modified files:

Index: src/sys/dev/usb/usbdevices.config
diff -u src/sys/dev/usb/usbdevices.config:1.17 src/sys/dev/usb/usbdevices.config:1.18
--- src/sys/dev/usb/usbdevices.config:1.17	Wed Nov 21 08:00:56 2012
+++ src/sys/dev/usb/usbdevices.config	Wed Jan  9 02:05:12 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: usbdevices.config,v 1.17 2012/11/21 08:00:56 skrll Exp $
+#	$NetBSD: usbdevices.config,v 1.18 2013/01/09 02:05:12 jmcneill Exp $
 #
 # This file contains all USB related configuration.
 # It is suitable for inclusion in a kernel config(5) file.
@@ -74,6 +74,8 @@ uhso*	at uhub? port ? configuration ?
 
 # USB Mass Storage
 umass*	at uhub? port ? configuration ? interface ?
+scsibus* at umass?
+sd*	at scsibus? target ? lun ?
 wd*	at umass?
 
 # USB audio



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

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jan  9 01:58:41 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_gpio_subr.c

Log Message:
aprint_verbose -> aprint_debug


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/broadcom/bcm2835_gpio_subr.c

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm2835_gpio_subr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_gpio_subr.c:1.1 src/sys/arch/arm/broadcom/bcm2835_gpio_subr.c:1.2
--- src/sys/arch/arm/broadcom/bcm2835_gpio_subr.c:1.1	Sat Jan  5 19:55:18 2013
+++ src/sys/arch/arm/broadcom/bcm2835_gpio_subr.c	Wed Jan  9 01:58:41 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_gpio_subr.c,v 1.1 2013/01/05 19:55:18 jakllsch Exp $	*/
+/*	$NetBSD: bcm2835_gpio_subr.c,v 1.2 2013/01/09 01:58:41 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_gpio_subr.c,v 1.1 2013/01/05 19:55:18 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_gpio_subr.c,v 1.2 2013/01/09 01:58:41 jmcneill Exp $");
 
 #include 
 #include 
@@ -60,7 +60,7 @@ bcm2835gpio_function_select(u_int pin, u
 		return;
 	}
 
-	aprint_verbose("bcm2835: changing FSEL%u to %#o\n", pin, func);
+	aprint_debug("bcm2835: changing FSEL%u to %#o\n", pin, func);
 
 	v &= ~(mask << shift);
 	v |=  (func << shift);



CVS commit: src/sys/dev/wsfb

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jan  9 01:58:00 UTC 2013

Modified Files:
src/sys/dev/wsfb: genfb.c

Log Message:
aprint_verbose -> aprint_debug


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/wsfb/genfb.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/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.48 src/sys/dev/wsfb/genfb.c:1.49
--- src/sys/dev/wsfb/genfb.c:1.48	Thu Apr 12 22:36:15 2012
+++ src/sys/dev/wsfb/genfb.c	Wed Jan  9 01:57:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb.c,v 1.48 2012/04/12 22:36:15 macallan Exp $ */
+/*	$NetBSD: genfb.c,v 1.49 2013/01/09 01:57:59 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.48 2012/04/12 22:36:15 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.49 2013/01/09 01:57:59 jmcneill Exp $");
 
 #include 
 #include 
@@ -61,7 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.
 #ifdef GENFB_DEBUG
 #define GPRINTF panic
 #else
-#define GPRINTF aprint_verbose
+#define GPRINTF aprint_debug
 #endif
 
 #define GENFB_BRIGHTNESS_STEP 15



CVS commit: src/sys/dev/usb

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jan  9 01:44:47 UTC 2013

Modified Files:
src/sys/dev/usb: usb.h

Log Message:
USTIR_DEBUG_IOCTLS doesnt compile, and depends on a missing member in struct 
irframe_methods, so remove it


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/usb/usb.h

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

Modified files:

Index: src/sys/dev/usb/usb.h
diff -u src/sys/dev/usb/usb.h:1.98 src/sys/dev/usb/usb.h:1.99
--- src/sys/dev/usb/usb.h:1.98	Mon Jan  7 15:14:17 2013
+++ src/sys/dev/usb/usb.h	Wed Jan  9 01:44:46 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.h,v 1.98 2013/01/07 15:14:17 christos Exp $	*/
+/*	$NetBSD: usb.h,v 1.99 2013/01/09 01:44:46 jmcneill Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $	*/
 
 /*
@@ -116,7 +116,6 @@ MALLOC_DECLARE(M_USBHC);
 #define USLSA_DEBUG 1
 #define USSCANNER_DEBUG 1
 #define USTIR_DEBUG 1
-#define USTIR_DEBUG_IOCTLS 1
 #define UTHUM_DEBUG 1
 #define UTOPPY_DEBUG 1
 #define UTS_DEBUG 1



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

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jan  9 01:39:45 UTC 2013

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

Log Message:
pull in RPI.local if it exists


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/conf/RPI

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/RPI
diff -u src/sys/arch/evbarm/conf/RPI:1.15 src/sys/arch/evbarm/conf/RPI:1.16
--- src/sys/arch/evbarm/conf/RPI:1.15	Wed Jan  9 00:28:54 2013
+++ src/sys/arch/evbarm/conf/RPI	Wed Jan  9 01:39:44 2013
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: RPI,v 1.15 2013/01/09 00:28:54 jmcneill Exp $
+#	$NetBSD: RPI,v 1.16 2013/01/09 01:39:44 jmcneill Exp $
 #
 #	RPi -- Raspberry Pi
 #
@@ -278,3 +278,6 @@ pseudo-device	wsfont
 # data mover pseudo-devices
 #pseudo-device	swdmover		# software dmover(9) back-end
 #pseudo-device	dmoverio		# /dev/dmover dmover(9) interface
+
+# local configuration
+cinclude "arch/evbarm/conf/RPI.local"



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

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jan  9 00:28:54 UTC 2013

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

Log Message:
add genfb, disabled for now


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/conf/RPI

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/RPI
diff -u src/sys/arch/evbarm/conf/RPI:1.14 src/sys/arch/evbarm/conf/RPI:1.15
--- src/sys/arch/evbarm/conf/RPI:1.14	Tue Jan  8 16:39:28 2013
+++ src/sys/arch/evbarm/conf/RPI	Wed Jan  9 00:28:54 2013
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: RPI,v 1.14 2013/01/08 16:39:28 jakllsch Exp $
+#	$NetBSD: RPI,v 1.15 2013/01/09 00:28:54 jmcneill Exp $
 #
 #	RPi -- Raspberry Pi
 #
@@ -186,6 +186,10 @@ vcmbox0 	at bcmmbox0
 # PL011 uart
 plcom0		at obio?
 
+# Framebuffer console
+#genfb0		at obio?
+#wsdisplay*	at genfb?
+
 # System timer
 bcmtmr0		at obio?
 
@@ -223,7 +227,7 @@ options 	WS_KERNEL_BG=WSCOL_BLACK
 options 	WSDISPLAY_COMPAT_USL		# wsconscfg VT handling
 options 	WSDISPLAY_COMPAT_RAWKBD		# can get raw scancodes
 options 	WSDISPLAY_DEFAULTSCREENS=4
-options		FONT_QVSS8x15
+#options 	FONT_QVSS8x15
 #options 	FONT_GALLANT12x22	# the console font
 
 # Pseudo-Devices



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

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jan  9 00:24:54 UTC 2013

Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
genfb support for rpi


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbarm/rpi/rpi_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.21 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.22
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.21	Tue Jan  8 16:49:43 2013
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Wed Jan  9 00:24:54 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_machdep.c,v 1.21 2013/01/08 16:49:43 skrll Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.22 2013/01/09 00:24:54 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,13 +30,15 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.21 2013/01/08 16:49:43 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.22 2013/01/09 00:24:54 jmcneill Exp $");
 
 #include "opt_evbarm_boardtype.h"
 
 #include "sdhc.h"
 #include "bcmspi.h"
 #include "bsciic.h"
+#include "plcom.h"
+#include "genfb.h"
 
 #include 
 #include 
@@ -67,12 +69,16 @@ __KERNEL_RCSID(0, "$NetBSD: rpi_machdep.
 
 #include 
 
-#include "plcom.h"
-#if (NPLCOM > 0)
+#if NPLCOM > 0
 #include 
 #include 
 #endif
 
+#if NGENFB > 0
+#include 
+#include 
+#endif
+
 #include "ksyms.h"
 
 extern int KERNEL_BASE_phys[];
@@ -94,6 +100,13 @@ static void rpi_device_register(device_t
 #define KERN_VTOPHYS(va) ((paddr_t)((vaddr_t)va + KERN_VTOPDIFF))
 #define KERN_PHYSTOV(pa) ((vaddr_t)((paddr_t)pa - KERN_VTOPDIFF))
 
+#ifndef RPI_FB_WIDTH
+#define RPI_FB_WIDTH	1280
+#endif
+#ifndef RPI_FB_HEIGHT
+#define RPI_FB_HEIGHT	720
+#endif
+
 #define	PLCONADDR 0x20201000
 
 #ifndef CONSDEVNAME
@@ -213,6 +226,118 @@ static struct {
 	}
 };
 
+#if NGENFB > 0
+static struct {
+	struct vcprop_buffer_hdr	vb_hdr;
+	struct vcprop_tag_edidblock	vbt_edid;
+	struct vcprop_tag end;
+} vb_edid __packed __aligned(16) =
+{
+	.vb_hdr = {
+		.vpb_len = sizeof(vb_edid),
+		.vpb_rcode = VCPROP_PROCESS_REQUEST,
+	},
+	.vbt_edid = {
+		.tag = {
+			.vpt_tag = VCPROPTAG_GET_EDID_BLOCK,
+			.vpt_len = VCPROPTAG_LEN(vb_edid.vbt_edid),
+			.vpt_rcode = VCPROPTAG_REQUEST,
+		},
+		.blockno = 0,
+	},
+	.end = {
+		.vpt_tag = VCPROPTAG_NULL
+	}
+};
+
+static struct {
+	struct vcprop_buffer_hdr	vb_hdr;
+	struct vcprop_tag_fbres		vbt_res;
+	struct vcprop_tag_fbres		vbt_vres;
+	struct vcprop_tag_fbdepth	vbt_depth;
+	struct vcprop_tag_fbpixelorder	vbt_pixelorder;
+	struct vcprop_tag_fbalpha	vbt_alpha;
+	struct vcprop_tag_allocbuf	vbt_allocbuf;
+	struct vcprop_tag_blankscreen	vbt_blank;
+	struct vcprop_tag_fbpitch	vbt_pitch;
+	struct vcprop_tag end;
+} vb_setfb __packed __aligned(16) =
+{
+	.vb_hdr = {
+		.vpb_len = sizeof(vb_setfb),
+		.vpb_rcode = VCPROP_PROCESS_REQUEST,
+	},
+	.vbt_res = {
+		.tag = {
+			.vpt_tag = VCPROPTAG_SET_FB_RES,
+			.vpt_len = VCPROPTAG_LEN(vb_setfb.vbt_res),
+			.vpt_rcode = VCPROPTAG_REQUEST,
+		},
+		.width = 0,
+		.height = 0,
+	},
+	.vbt_vres = {
+		.tag = {
+			.vpt_tag = VCPROPTAG_SET_FB_VRES,
+			.vpt_len = VCPROPTAG_LEN(vb_setfb.vbt_vres),
+			.vpt_rcode = VCPROPTAG_REQUEST,
+		},
+		.width = 0,
+		.height = 0,
+	},
+	.vbt_depth = {
+		.tag = {
+			.vpt_tag = VCPROPTAG_SET_FB_DEPTH,
+			.vpt_len = VCPROPTAG_LEN(vb_setfb.vbt_depth),
+			.vpt_rcode = VCPROPTAG_REQUEST,
+		},
+		.bpp = 32,
+	},
+	.vbt_pixelorder = {
+		.tag = {
+			.vpt_tag = VCPROPTAG_SET_FB_PIXEL_ORDER,
+			.vpt_len = VCPROPTAG_LEN(vb_setfb.vbt_pixelorder),
+			.vpt_rcode = VCPROPTAG_REQUEST,
+		},
+		.state = VCPROP_PIXEL_RGB,
+	},
+	.vbt_alpha = {
+		.tag = {
+			.vpt_tag = VCPROPTAG_SET_FB_ALPHA_MODE,
+			.vpt_len = VCPROPTAG_LEN(vb_setfb.vbt_alpha),
+			.vpt_rcode = VCPROPTAG_REQUEST,
+		},
+		.state = VCPROP_ALPHA_IGNORED,
+	},
+	.vbt_allocbuf = {
+		.tag = {
+			.vpt_tag = VCPROPTAG_ALLOCATE_BUFFER,
+			.vpt_len = VCPROPTAG_LEN(vb_setfb.vbt_allocbuf),
+			.vpt_rcode = VCPROPTAG_REQUEST,
+		},
+		.address = PAGE_SIZE,	/* alignment */
+	},
+	.vbt_blank = {
+		.tag = {
+			.vpt_tag = VCPROPTAG_BLANK_SCREEN,
+			.vpt_len = VCPROPTAG_LEN(vb_setfb.vbt_blank),
+			.vpt_rcode = VCPROPTAG_REQUEST,
+		},
+		.state = VCPROP_BLANK_OFF,
+	},
+	.vbt_pitch = {
+		.tag = {
+			.vpt_tag = VCPROPTAG_GET_FB_PITCH,
+			.vpt_len = VCPROPTAG_LEN(vb_setfb.vbt_pitch),
+			.vpt_rcode = VCPROPTAG_REQUEST,
+		},
+	},
+	.end = {
+		.vpt_tag = VCPROPTAG_NULL,
+	},
+};
+#endif
+
 static void
 rpi_bootparams(void)
 {
@@ -227,7 +352,6 @@ rpi_bootparams(void)
 #if (NPLCOM > 0)
 	(1 << VCPM_POWER_UART0) |
 #endif
-
 #if (NBSCIIC > 0)
 	(1 << VCPM_POWER_I2C0) | (1 << VCPM_POWER_I2C1) | 
 	/*  (1 << VCPM_POWER_I2C2) | */
@@ -244,9 +368,9 @@ rpi_bootparams(void)
 	/*
 	 * No need to invalid the cache as the memory has never been referenced
 	 * by the ARM.
-	 * 

CVS commit: src/common/lib/libc/arch/arm/string

2013-01-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jan  9 00:01:07 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strlen_arm.S

Log Message:
Use movw on armv7 to fill uppper halfword.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strlen_arm.S

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/libc/arch/arm/string/strlen_arm.S
diff -u src/common/lib/libc/arch/arm/string/strlen_arm.S:1.1 src/common/lib/libc/arch/arm/string/strlen_arm.S:1.2
--- src/common/lib/libc/arch/arm/string/strlen_arm.S:1.1	Tue Jan  8 13:17:45 2013
+++ src/common/lib/libc/arch/arm/string/strlen_arm.S	Wed Jan  9 00:01:07 2013
@@ -29,7 +29,7 @@
 
 #include 
 
-RCSID("$NetBSD: strlen_arm.S,v 1.1 2013/01/08 13:17:45 matt Exp $")
+RCSID("$NetBSD: strlen_arm.S,v 1.2 2013/01/09 00:01:07 matt Exp $")
 
 #ifdef __ARMEL__
 #define	BYTE0	0x00ff
@@ -55,13 +55,12 @@ ENTRY(strlen)
 	sub	r0, r0, ip		/* subtract start */
 	RET/* return */
 .Lpre_main_loop:
-#if defined(_ARM_ARCH_6)
 #if defined(_ARM_ARCH_7)
 	movw	r1, #0xfefe		/* magic constant; 254 in each byte */
-#else
+	movt	r1, #0xfefe		/* magic constant; 254 in each byte */
+#elif defined(_ARM_ARCH_6)
 	mov	r1, #0xfe		/* put 254 in low byte */
 	orr	r1, r1, r1, lsl #8	/* move to next byte */
-#endif
 	orr	r1, r1, r1, lsl #16	/* move to next halfword */
 #endif /* _ARM_ARCH_6 */
 .Lmain_loop:



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

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Jan  8 23:52:48 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: files.bcm2835
Added Files:
src/sys/arch/arm/broadcom: bcm2835_genfb.c

Log Message:
add genfb glue


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/broadcom/bcm2835_genfb.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/broadcom/files.bcm2835

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

Modified files:

Index: src/sys/arch/arm/broadcom/files.bcm2835
diff -u src/sys/arch/arm/broadcom/files.bcm2835:1.10 src/sys/arch/arm/broadcom/files.bcm2835:1.11
--- src/sys/arch/arm/broadcom/files.bcm2835:1.10	Tue Jan  8 16:24:23 2013
+++ src/sys/arch/arm/broadcom/files.bcm2835	Tue Jan  8 23:52:48 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.bcm2835,v 1.10 2013/01/08 16:24:23 skrll Exp $
+#	$NetBSD: files.bcm2835,v 1.11 2013/01/08 23:52:48 jmcneill Exp $
 #
 # Configuration info for Broadcom BCM2835 ARM Peripherals
 #
@@ -63,3 +63,7 @@ file	arch/arm/broadcom/bcm2835_spi.c		bc
 device	bsciic: i2cbus, bcm2835_gpio_subr
 attach	bsciic at obio
 file	arch/arm/broadcom/bcm2835_bsc.c		bsciic	needs-flag
+
+# Generic framebuffer console driver
+attach	genfb at obio with bcmgenfb: edid
+file	arch/arm/broadcom/bcm2835_genfb.c	bcmgenfb	needs-flag

Added files:

Index: src/sys/arch/arm/broadcom/bcm2835_genfb.c
diff -u /dev/null src/sys/arch/arm/broadcom/bcm2835_genfb.c:1.1
--- /dev/null	Tue Jan  8 23:52:48 2013
+++ src/sys/arch/arm/broadcom/bcm2835_genfb.c	Tue Jan  8 23:52:48 2013
@@ -0,0 +1,138 @@
+/* $NetBSD: bcm2835_genfb.c,v 1.1 2013/01/08 23:52:48 jmcneill Exp $ */
+
+/*-
+ * Copyright (c) 2013 Jared D. McNeill 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Generic framebuffer console driver
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_genfb.c,v 1.1 2013/01/08 23:52:48 jmcneill Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+struct bcmgenfb_softc {
+	struct genfb_softc	sc_gen;
+	bus_space_tag_t		sc_iot;
+	bus_space_handle_t	sc_ioh;
+};
+
+static int	bcmgenfb_match(device_t, cfdata_t, void *);
+static void	bcmgenfb_attach(device_t, device_t, void *);
+
+static int	bcmgenfb_ioctl(void *, void *, u_long, void *, int, lwp_t *);
+static paddr_t	bcmgenfb_mmap(void *, void *, off_t, int);
+
+CFATTACH_DECL_NEW(bcmgenfb, sizeof(struct bcmgenfb_softc),
+bcmgenfb_match, bcmgenfb_attach, NULL, NULL);
+
+static int
+bcmgenfb_match(device_t parent, cfdata_t match, void *aux)
+{
+	struct amba_attach_args *aaa = aux;
+
+	return !strcmp(aaa->aaa_name, "fb");
+}
+
+static void
+bcmgenfb_attach(device_t parent, device_t self, void *aux)
+{
+	struct bcmgenfb_softc *sc = device_private(self);
+	struct amba_attach_args *aaa = aux;
+	struct genfb_ops ops;
+	int error;
+
+	sc->sc_gen.sc_dev = self;
+	sc->sc_iot = aaa->aaa_iot;
+
+	genfb_init(&sc->sc_gen);
+
+	if (sc->sc_gen.sc_width == 0 ||
+	sc->sc_gen.sc_fbsize == 0) {
+		aprint_normal(": disabled\n");
+		return;
+	}
+
+	error = bus_space_map(sc->sc_iot, sc->sc_gen.sc_fboffset,
+	sc->sc_gen.sc_fbsize,
+	BUS_SPACE_MAP_LINEAR|BUS_SPACE_MAP_PREFETCHABLE, &sc->sc_ioh);
+	if (error) {
+		aprint_error_dev(self, "couldn't map framebuffer (%d)\n",
+		error);
+		return;
+	}
+	sc->sc_gen.sc_fbaddr = bus_space_vaddr(sc->sc_iot, sc->sc_ioh);
+
+	memset(&ops, 0, sizeof(ops));
+	ops.genfb_ioctl = bcmgenfb_ioctl;
+	ops.genfb_mmap = bcmgenfb_mmap;
+
+	aprint_naive("\n");
+	aprint_normal(": switching to framebuffer console\n");
+
+	genfb_attach(&sc->sc_gen, &ops);
+}
+
+static int
+bcmgenfb_i

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

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Jan  8 23:51:33 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_obio.c

Log Message:
add fb and dotg devices


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/broadcom/bcm2835_obio.c

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm2835_obio.c
diff -u src/sys/arch/arm/broadcom/bcm2835_obio.c:1.9 src/sys/arch/arm/broadcom/bcm2835_obio.c:1.10
--- src/sys/arch/arm/broadcom/bcm2835_obio.c:1.9	Sat Jan  5 20:31:23 2013
+++ src/sys/arch/arm/broadcom/bcm2835_obio.c	Tue Jan  8 23:51:33 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_obio.c,v 1.9 2013/01/05 20:31:23 jakllsch Exp $	*/
+/*	$NetBSD: bcm2835_obio.c,v 1.10 2013/01/08 23:51:33 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_obio.c,v 1.9 2013/01/05 20:31:23 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_obio.c,v 1.10 2013/01/08 23:51:33 jmcneill Exp $");
 
 #include "locators.h"
 #include "obio.h"
@@ -105,6 +105,13 @@ static const struct ambadev_locators bcm
 		.ad_intr = BCM2835_INT_UART0,
 	},
 	{
+		/* Framebuffer */
+		.ad_name = "fb",
+		.ad_addr = 0,
+		.ad_size = 0,
+		.ad_intr = -1,
+	},
+	{
 		/* eMMC interface */
 		.ad_name = "emmc",
 		.ad_addr = BCM2835_EMMC_BASE,
@@ -112,6 +119,13 @@ static const struct ambadev_locators bcm
 		.ad_intr = BCM2835_INT_EMMC,
 	},
 	{
+		/* DOTG interface */
+		.ad_name = "dotg",
+		.ad_addr = BCM2835_USB_BASE,
+		.ad_size = BCM2835_USB_SIZE,
+		.ad_intr = BCM2835_INT_USB,
+	},
+	{
 		.ad_name = "bcmspi",
 		.ad_addr = BCM2835_SPI0_BASE,
 		.ad_size = BCM2835_SPI0_SIZE,



CVS commit: src/sys/dev/wscons

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Jan  8 23:49:56 UTC 2013

Modified Files:
src/sys/dev/wscons: wsconsio.h

Log Message:
add WSDISPLAY_TYPE_VC4 and WSDISPLAYIO_BUS_SOC


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/wscons/wsconsio.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/wscons/wsconsio.h
diff -u src/sys/dev/wscons/wsconsio.h:1.104 src/sys/dev/wscons/wsconsio.h:1.105
--- src/sys/dev/wscons/wsconsio.h:1.104	Tue Apr 17 10:19:57 2012
+++ src/sys/dev/wscons/wsconsio.h	Tue Jan  8 23:49:56 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: wsconsio.h,v 1.104 2012/04/17 10:19:57 bsh Exp $ */
+/* $NetBSD: wsconsio.h,v 1.105 2013/01/08 23:49:56 jmcneill Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -329,6 +329,7 @@ struct wsmouse_repeat {
 #define WSDISPLAY_TYPE_VNC	53	/* Usermode vnc framebuffer */
 #define WSDISPLAY_TYPE_VALKYRIE	54	/* Apple onboard video 'valkyrie' */
 #define WSDISPLAY_TYPE_IMXIPU	55	/* i.MX ipu */
+#define WSDISPLAY_TYPE_VC4	56	/* Broadcom VideoCore 4 */
 
 /* Basic display information.  Not applicable to all display types. */
 struct wsdisplay_fbinfo {
@@ -555,6 +556,7 @@ struct wsdisplayio_bus_id {
 u_int bus_type;
 #define WSDISPLAYIO_BUS_PCI	0
 #define WSDISPLAYIO_BUS_SBUS	1
+#define WSDISPLAYIO_BUS_SOC	2
 union bus_data {
 struct bus_pci {
 uint32_t domain;



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

2013-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan  8 21:58:41 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: bcm2835reg.h

Log Message:
Fix BCM2835_USB_SIZE.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/broadcom/bcm2835reg.h

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm2835reg.h
diff -u src/sys/arch/arm/broadcom/bcm2835reg.h:1.6 src/sys/arch/arm/broadcom/bcm2835reg.h:1.7
--- src/sys/arch/arm/broadcom/bcm2835reg.h:1.6	Sat Jan  5 19:44:44 2013
+++ src/sys/arch/arm/broadcom/bcm2835reg.h	Tue Jan  8 21:58:40 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835reg.h,v 1.6 2013/01/05 19:44:44 jakllsch Exp $	*/
+/*	$NetBSD: bcm2835reg.h,v 1.7 2013/01/08 21:58:40 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
 #define	BCM2835_BSC_SIZE	0x1000
 #define	BCM2835_AUX_SIZE	0x1000
 #define	BCM2835_EMMC_SIZE	0x1000
-#define	BCM2835_USB_SIZE	0x1000
+#define	BCM2835_USB_SIZE	0x2
 #define	BCM2835_DMA15_SIZE	0x100
 
 #define BCM2835_IOPHYSTOVIRT(a) \



CVS commit: src/common/lib/libc/arch/arm/string

2013-01-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  8 20:15:00 UTC 2013

Added Files:
src/common/lib/libc/arch/arm/string: memset_naive.S

Log Message:
Add a simplier version of memset which is less than 1/2 the size of the
current one.  On a Cortex-A9, this is about 15%-30% faster than the current
libc version.  This is not a trivial implementation since that was an order
magnitude slower than the existing libc version.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/common/lib/libc/arch/arm/string/memset_naive.S

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

Added files:

Index: src/common/lib/libc/arch/arm/string/memset_naive.S
diff -u /dev/null src/common/lib/libc/arch/arm/string/memset_naive.S:1.1
--- /dev/null	Tue Jan  8 20:15:00 2013
+++ src/common/lib/libc/arch/arm/string/memset_naive.S	Tue Jan  8 20:15:00 2013
@@ -0,0 +1,86 @@
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+
+RCSID("$NetBSD: memset_naive.S,v 1.1 2013/01/08 20:15:00 matt Exp $")
+
+/*
+ * This isn't quite as simple/short as it could be but the truly trivial
+ * memset was an order of magnitude slower than this.
+ */
+
+ENTRY(memset)
+/* LINTSTUB: void *memset(void *, int, size_t) */
+	mov	ip, r0			/* need to preserve r0 */
+	cmp	r2, #10			/* 10 bytes or less? */
+	ble	.Lbyte_by_byte		/*yes, bytewise is faster */
+	ands	r3, r1, #0xff		/* we are dealing with bytes */
+	orrne	r3, r3, r3, lsl #8	/* move value into 2nd byte lane */
+	orrne	r3, r3, r3, lsl #16	/* move value into all byte lanes */
+	mov	r1, r2			/* move count */
+	ands	r2, ip, #7		/* are we dword aligned? */
+	beq	1f			/*   yes we are */
+	rsb	r2, r2, #8		/* how many bytes until aligned? */
+	sub	r1, r1, r2		/* subtract from count */
+	tst	ip, #1			/* halfword aligned? */
+	strneb	r3, [ip], #1		/*   nope, write a byte */
+	tst	ip, #2			/* word aligned? */
+	strneh	r3, [ip], #2		/*   nope, write a halfword */
+	tst	ip, #4			/* dword aligned? */
+	strne	r3, [ip], #4		/*   nope, write a word */
+	/*
+	 * At this point, we are dword aligned.
+	 */
+1:	mov	r2, r3			/* duplicate fill value */
+2:	subs	r1, r1, #16		/* can we write 16 bytes? */
+	stmgeia	ip!, {r2,r3}		/*   yes, write the first 8 of them */
+	stmgeia	ip!, {r2,r3}		/*   yes, write the second 8 of them */
+	bgt	2b			/* more left to fill */
+	RETc(eq)			/*   no, return */
+	/*
+	 * Our count went negative but the bits below 16 haven't changed.
+	 * So we are effectively testing modulo 16.
+	 */
+	tst	r1, #8			/* can we write at least 8 bytes? */
+	stmneia	ip!, {r2,r3}		/*   so do it */
+	tst	r1, #4			/* can we write at least 4 bytes? */
+	strne	r3, [ip], #4		/*   so do it */
+	tst	r1, #2			/* can we write at least 2 bytes? */
+	strneh	r3, [ip], #2		/*   so do it */
+	tst	r1, #1			/* can we write 1 bytes? */
+	strneb	r3, [ip], #1		/*   so do it */
+	RET/* return */
+
+.Lbyte_by_byte:
+	subs	r2, r2, #1		/* can we write a byte? */
+	RETc(lt)			/*   no, return */
+	strb	r3, [ip], #1		/* write a byte */
+	b	.Lbyte_by_byte		/* do next byte */
+END(memset)



CVS commit: src/lib/libc/iconv

2013-01-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jan  8 19:55:43 UTC 2013

Modified Files:
src/lib/libc/iconv: iconv.3

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/iconv/iconv.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/iconv/iconv.3
diff -u src/lib/libc/iconv/iconv.3:1.17 src/lib/libc/iconv/iconv.3:1.18
--- src/lib/libc/iconv/iconv.3:1.17	Tue Jan  8 19:19:24 2013
+++ src/lib/libc/iconv/iconv.3	Tue Jan  8 19:55:43 2013
@@ -1,4 +1,4 @@
-.\" $NetBSD: iconv.3,v 1.17 2013/01/08 19:19:24 dholland Exp $
+.\" $NetBSD: iconv.3,v 1.18 2013/01/08 19:55:43 wiz Exp $
 .\"
 .\" Copyright (c)2003 Citrus Project,
 .\" All rights reserved.
@@ -238,7 +238,7 @@ conform to
 Historically, the definition of
 .Ft iconv
 has not been consistent across operating systems.
-This is due to an unfortunate historical mistake, documented in 
+This is due to an unfortunate historical mistake, documented in
 .Lk https://www5.opengroup.org/sophocles2/show_mail.tpl?&source=L&listname=austin-group-l&id=7404 "this e-mail".
 The standards page for the header file
 .In iconv.h



CVS commit: src/sys/dev/sdmmc

2013-01-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Jan  8 19:36:39 UTC 2013

Modified Files:
src/sys/dev/sdmmc: sdhc.c

Log Message:
If the command protocol calls for a trailing busy signal,
wait (up to 10 seconds) for it to be released.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/sdmmc/sdhc.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/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.41 src/sys/dev/sdmmc/sdhc.c:1.42
--- src/sys/dev/sdmmc/sdhc.c:1.41	Mon Jan  7 02:56:24 2013
+++ src/sys/dev/sdmmc/sdhc.c	Tue Jan  8 19:36:38 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.41 2013/01/07 02:56:24 jakllsch Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.42 2013/01/08 19:36:38 jakllsch Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.41 2013/01/07 02:56:24 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.42 2013/01/08 19:36:38 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -1127,6 +1127,12 @@ sdhc_exec_command(sdmmc_chipset_handle_t
 	 */
 	if (cmd->c_error == 0 && cmd->c_data != NULL)
 		sdhc_transfer_data(hp, cmd);
+	else if (ISSET(cmd->c_flags, SCF_RSP_BSY)) {
+		if (!sdhc_wait_intr(hp, SDHC_TRANSFER_COMPLETE, hz * 10)) {
+			cmd->c_error = ETIMEDOUT;
+			goto out;
+		}
+	}
 
 out:
 	if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED)



CVS commit: src/lib/libc/iconv

2013-01-08 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Tue Jan  8 19:19:25 UTC 2013

Modified Files:
src/lib/libc/iconv: iconv.3

Log Message:
Rework the description of the const issue to improve the wording,
avoid saying "we", fix typos, etc.

XXX: groff and mandoc handle the URLs in here differently but both
XXX: mangle them, apparently because they're wider than one line.
XXX: Does anyone know how to fix this or do we need an URL shortener
XXX: on www.NetBSD.org?


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/iconv/iconv.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/iconv/iconv.3
diff -u src/lib/libc/iconv/iconv.3:1.16 src/lib/libc/iconv/iconv.3:1.17
--- src/lib/libc/iconv/iconv.3:1.16	Fri Jan  4 07:27:57 2013
+++ src/lib/libc/iconv/iconv.3	Tue Jan  8 19:19:24 2013
@@ -1,4 +1,4 @@
-.\" $NetBSD: iconv.3,v 1.16 2013/01/04 07:27:57 wiz Exp $
+.\" $NetBSD: iconv.3,v 1.17 2013/01/08 19:19:24 dholland Exp $
 .\"
 .\" Copyright (c)2003 Citrus Project,
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 3, 2013
+.Dd January 8, 2013
 .Dt ICONV 3
 .Os
 .\" --
@@ -235,24 +235,34 @@ and
 conform to
 .St -p1003.1-2001 .
 .Pp
-Unfortunately due a historical mistake (documented in 
-.Lk https://www5.opengroup.org/sophocles2/show_mail.tpl?&source=L&listname=austin-group-l&id=7404 ) ,
-where the unix header page had the
-second argument of
-.Fn iconv
-as
-.Ft char **
-and the manual page had the same as
-.Ft const char ** ,
-the definition of
+Historically, the definition of
 .Ft iconv
 has not been consistent across operating systems.
-Given the committee's decicion to follow the header definition, we had to make
-a decision between following the committee's change or keeping our existing
-definition which is arguably more correct like others have
-.Pq Lk http://www.gnu.org/savannah-checkouts/gnu/libiconv/documentation/libiconv-1.14/ .
-We chose to keep our definition and we believe that this is not a problem because
-most packages are aware of this issue and handle it anyway during configuration.
+This is due to an unfortunate historical mistake, documented in 
+.Lk https://www5.opengroup.org/sophocles2/show_mail.tpl?&source=L&listname=austin-group-l&id=7404 "this e-mail".
+The standards page for the header file
+.In iconv.h
+defined the second argument of
+.Fn iconv
+as
+.Ft char ** ,
+but the standards page for the
+.Fn iconv
+implementation defined it as
+.Ft const char ** .
+The standards committee later chose to change the function definition to
+follow the header file definition
+.Pq without const ,
+even though the version with const is arguably more correct.
+.Nx
+has always used the const form.
+It was decided to reject the committee's regression and become
+.Pq technically
+incompatible.
+GNU libiconv has taken the
+.Lk http://www.gnu.org/savannah-checkouts/gnu/libiconv/documentation/libiconv-1.14/ "same route".
+Most third party software affected by this issue already handles it
+during configuration.
 .\" --
 .Sh BUGS
 If



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

2013-01-08 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jan  8 19:03:16 UTC 2013

Modified Files:
src/sys/arch/arm/omap: omap2_obio.c omap2_reg.h
Added Files:
src/sys/arch/arm/omap: omapdma.c omapdmareg.h omapdmavar.h

Log Message:
add a simple driver for OMAP3's built-in DMA controller


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/omap/omap2_obio.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/omap/omap2_reg.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/omap/omapdma.c \
src/sys/arch/arm/omap/omapdmareg.h src/sys/arch/arm/omap/omapdmavar.h

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

Modified files:

Index: src/sys/arch/arm/omap/omap2_obio.c
diff -u src/sys/arch/arm/omap/omap2_obio.c:1.18 src/sys/arch/arm/omap/omap2_obio.c:1.19
--- src/sys/arch/arm/omap/omap2_obio.c:1.18	Mon Dec 24 06:28:55 2012
+++ src/sys/arch/arm/omap/omap2_obio.c	Tue Jan  8 19:03:16 2013
@@ -1,7 +1,7 @@
-/*	$Id: omap2_obio.c,v 1.18 2012/12/24 06:28:55 kiyohara Exp $	*/
+/*	$Id: omap2_obio.c,v 1.19 2013/01/08 19:03:16 macallan Exp $	*/
 
 /* adapted from: */
-/*	$NetBSD: omap2_obio.c,v 1.18 2012/12/24 06:28:55 kiyohara Exp $ */
+/*	$NetBSD: omap2_obio.c,v 1.19 2013/01/08 19:03:16 macallan Exp $ */
 
 
 /*
@@ -103,7 +103,7 @@
 
 #include "opt_omap.h"
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap2_obio.c,v 1.18 2012/12/24 06:28:55 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap2_obio.c,v 1.19 2013/01/08 19:03:16 macallan Exp $");
 
 #include "locators.h"
 #include "obio.h"
@@ -364,7 +364,7 @@ static const struct {
 	{ .name = "avic", .addr = INTC_BASE_3430, .required = true },
 #endif
 #if defined(OMAP_3530)
-	{ .name = "avic", .addr = INTC_BASE_3530, .required = true },
+	{ .name = "avic",.addr = INTC_BASE_3530, .required = true },
 #endif
 	{ .name = "gpio1", .addr = GPIO1_BASE, .required = false },
 	{ .name = "gpio2", .addr = GPIO2_BASE, .required = false },
@@ -385,6 +385,9 @@ static const struct {
 	{ .name = "omapicu", .addr = 0x4820, .required = true },
 	{ .name = "prcm", .addr = 0x44e0, .required = true },
 #endif
+#if defined(OMAP_3530)
+	{ .name = "omapdma", .addr = OMAP3530_SDMA_BASE, .required = true },
+#endif
 };
 
 static void

Index: src/sys/arch/arm/omap/omap2_reg.h
diff -u src/sys/arch/arm/omap/omap2_reg.h:1.15 src/sys/arch/arm/omap/omap2_reg.h:1.16
--- src/sys/arch/arm/omap/omap2_reg.h:1.15	Thu Dec 13 01:15:50 2012
+++ src/sys/arch/arm/omap/omap2_reg.h	Tue Jan  8 19:03:16 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_reg.h,v 1.15 2012/12/13 01:15:50 matt Exp $ */
+/* $NetBSD: omap2_reg.h,v 1.16 2013/01/08 19:03:16 macallan Exp $ */
 
 /*
  * Copyright (c) 2007 Microsoft
@@ -143,7 +143,8 @@
 #define	OMAP2_CM_ICLKEN1_CORE	0x210
 #define	OMAP2_CM_ICLKEN2_CORE	0x214
 #define	OMAP2_CM_CLKSEL2_CORE	0x244
-#define	OMAP2_CM_SIZE		(OMAP2_CM_CLKSEL2_CORE + 4)
+#define OMAP3_CM_IDLEST1_CORE	0xa20
+#define	OMAP2_CM_SIZE		(0x1000)
 
 /*
  * bit defines for OMAP2_CM_CLKSEL_MPU
@@ -729,4 +730,10 @@
 #define OMAP3530_SDRC_BASE		0x6d00
 #define OMAP3530_SDRC_SIZE		0x0001	/* 16KB */
 
+/*
+ * DMA
+ */
+#define OMAP3530_SDMA_BASE		0x48056000
+#define OMAP3530_SDMA_SIZE		0x1000	/* 4KB */
+	
 #endif	/* _ARM_OMAP_OMAP2_REG_H_ */

Added files:

Index: src/sys/arch/arm/omap/omapdma.c
diff -u /dev/null src/sys/arch/arm/omap/omapdma.c:1.1
--- /dev/null	Tue Jan  8 19:03:16 2013
+++ src/sys/arch/arm/omap/omapdma.c	Tue Jan  8 19:03:16 2013
@@ -0,0 +1,157 @@
+/*	$NetBSD: omapdma.c,v 1.1 2013/01/08 19:03:16 macallan Exp $	*/
+
+/*
+ * Copyright (c) 2012 Michael Lorenz
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * OMAP 3530 DMA controller
+ */
+
+#include 
+__KERNEL

CVS commit: src/common/lib/libc/arch/arm/string

2013-01-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jan  8 16:58:59 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strlen_naive.S

Log Message:
Add missing quote - fix build


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strlen_naive.S

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/libc/arch/arm/string/strlen_naive.S
diff -u src/common/lib/libc/arch/arm/string/strlen_naive.S:1.1 src/common/lib/libc/arch/arm/string/strlen_naive.S:1.2
--- src/common/lib/libc/arch/arm/string/strlen_naive.S:1.1	Tue Jan  8 13:14:54 2013
+++ src/common/lib/libc/arch/arm/string/strlen_naive.S	Tue Jan  8 16:58:59 2013
@@ -28,7 +28,7 @@
  */
 #include 
 
-RCSID("$NetBSD: strlen_naive.S,v 1.1 2013/01/08 13:14:54 matt Exp $)
+RCSID("$NetBSD: strlen_naive.S,v 1.2 2013/01/08 16:58:59 pgoyette Exp $")
 
 /* LINTSTUB: size_t strlen(const char *) */
 ENTRY(strlen)



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

2013-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan  8 16:49:43 UTC 2013

Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c
Added Files:
src/sys/arch/evbarm/rpi: vcpm.h

Log Message:
Use the VC power manager mailbox channel to power up the devices we have
support for.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/rpi/rpi_machdep.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/rpi/vcpm.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/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.20 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.21
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.20	Mon Jan  7 20:42:24 2013
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Tue Jan  8 16:49:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_machdep.c,v 1.20 2013/01/07 20:42:24 jmcneill Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.21 2013/01/08 16:49:43 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,10 +30,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.20 2013/01/07 20:42:24 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.21 2013/01/08 16:49:43 skrll Exp $");
 
 #include "opt_evbarm_boardtype.h"
 
+#include "sdhc.h"
+#include "bcmspi.h"
+#include "bsciic.h"
+
 #include 
 #include 
 #include 
@@ -58,6 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: rpi_machdep.
 #include 
 
 #include 
+#include 
 #include 
 
 #include 
@@ -215,6 +220,23 @@ rpi_bootparams(void)
 	bus_space_handle_t ioh = BCM2835_IOPHYSTOVIRT(BCM2835_ARMMBOX_BASE);
 	uint32_t res;
 
+	bcm2835_mbox_write(iot, ioh, BCMMBOX_CHANPM, (
+#if (NSDHC > 0)
+	(1 << VCPM_POWER_SDCARD) | 
+#endif
+#if (NPLCOM > 0)
+	(1 << VCPM_POWER_UART0) |
+#endif
+
+#if (NBSCIIC > 0)
+	(1 << VCPM_POWER_I2C0) | (1 << VCPM_POWER_I2C1) | 
+	/*  (1 << VCPM_POWER_I2C2) | */
+#endif
+#if (NBCMSPI > 0)
+	(1 << VCPM_POWER_SPI) | 
+#endif
+	0) << 4);
+
 	bcm2835_mbox_write(iot, ioh, BCMMBOX_CHANARM2VC, KERN_VTOPHYS(&vb));
 
 	bcm2835_mbox_read(iot, ioh, BCMMBOX_CHANARM2VC, &res);

Added files:

Index: src/sys/arch/evbarm/rpi/vcpm.h
diff -u /dev/null src/sys/arch/evbarm/rpi/vcpm.h:1.1
--- /dev/null	Tue Jan  8 16:49:43 2013
+++ src/sys/arch/evbarm/rpi/vcpm.h	Tue Jan  8 16:49:43 2013
@@ -0,0 +1,49 @@
+/*	$NetBSD: vcpm.h,v 1.1 2013/01/08 16:49:43 skrll Exp $	*/
+
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Nick Hudson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Power Manager Mailbox interface
+ */
+
+#ifndef	_EVBARM_RPI_VCPM_H_
+#define	_EVBARM_RPI_VCPM_H_
+
+#define	VCPM_POWER_SDCARD	0
+#define	VCPM_POWER_UART0	1
+#define	VCPM_POWER_UART1	2
+#define	VCPM_POWER_USB		3
+#define	VCPM_POWER_I2C0		4
+#define	VCPM_POWER_I2C1		5
+#define	VCPM_POWER_I2C2		6
+#define	VCPM_POWER_SPI		7
+#define	VCPM_POWER_CCP2TX	8
+
+#endif	/* _EVBARM_RPI_VCPM_H_ */



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

2013-01-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Jan  8 16:39:28 UTC 2013

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

Log Message:
Add bcmspi(4) and bsciic(4) and subordinate busses.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/conf/RPI

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/RPI
diff -u src/sys/arch/evbarm/conf/RPI:1.13 src/sys/arch/evbarm/conf/RPI:1.14
--- src/sys/arch/evbarm/conf/RPI:1.13	Mon Jan  7 20:20:22 2013
+++ src/sys/arch/evbarm/conf/RPI	Tue Jan  8 16:39:28 2013
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: RPI,v 1.13 2013/01/07 20:20:22 jmcneill Exp $
+#	$NetBSD: RPI,v 1.14 2013/01/08 16:39:28 jakllsch Exp $
 #
 #	RPi -- Raspberry Pi
 #
@@ -205,6 +205,14 @@ ld* at sdmmc?
 # USB device drivers, just as soon as we have something to attach them to
 #include "dev/usb/usbdevices.config"
 
+# Broadcom Serial Control (I2C)
+bsciic* at obio?
+iic* at i2cbus?
+
+# SPI controller
+bcmspi* at obio?
+spi* at spibus?
+
 # various options for wscons - we try to look as much like a standard
 # sun console as possible
 options 	WSEMUL_VT100		# sun terminal emulation



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

2013-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan  8 16:24:23 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: files.bcm2835

Log Message:
Sprinkle needs-flag


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/broadcom/files.bcm2835

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

Modified files:

Index: src/sys/arch/arm/broadcom/files.bcm2835
diff -u src/sys/arch/arm/broadcom/files.bcm2835:1.9 src/sys/arch/arm/broadcom/files.bcm2835:1.10
--- src/sys/arch/arm/broadcom/files.bcm2835:1.9	Mon Jan  7 20:15:32 2013
+++ src/sys/arch/arm/broadcom/files.bcm2835	Tue Jan  8 16:24:23 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.bcm2835,v 1.9 2013/01/07 20:15:32 jmcneill Exp $
+#	$NetBSD: files.bcm2835,v 1.10 2013/01/08 16:24:23 skrll Exp $
 #
 # Configuration info for Broadcom BCM2835 ARM Peripherals
 #
@@ -57,9 +57,9 @@ file	arch/arm/broadcom/bcm2835_gpio_subr
 # SPI controller (BCM2835_SPI0_BASE)
 device	bcmspi: spibus, bcm2835_gpio_subr
 attach	bcmspi at obio
-file	arch/arm/broadcom/bcm2835_spi.c		bcmspi
+file	arch/arm/broadcom/bcm2835_spi.c		bcmspi	needs-flag
 
 # BSC (I2C) controller (BCM2835_BSC[01]_BASE)
 device	bsciic: i2cbus, bcm2835_gpio_subr
 attach	bsciic at obio
-file	arch/arm/broadcom/bcm2835_bsc.c		bsciic
+file	arch/arm/broadcom/bcm2835_bsc.c		bsciic	needs-flag



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

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Jan  8 15:07:32 UTC 2013

Modified Files:
src/sys/arch/evbarm/rpi: vcprop.h

Log Message:
add vc fb alpha and screen blanking tags


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/rpi/vcprop.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/evbarm/rpi/vcprop.h
diff -u src/sys/arch/evbarm/rpi/vcprop.h:1.6 src/sys/arch/evbarm/rpi/vcprop.h:1.7
--- src/sys/arch/evbarm/rpi/vcprop.h:1.6	Tue Jan  8 13:02:54 2013
+++ src/sys/arch/evbarm/rpi/vcprop.h	Tue Jan  8 15:07:32 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vcprop.h,v 1.6 2013/01/08 13:02:54 jmcneill Exp $	*/
+/*	$NetBSD: vcprop.h,v 1.7 2013/01/08 15:07:32 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -71,12 +71,17 @@ struct vcprop_tag {
 #define	VCPROPTAG_GET_DMACHAN		0x00060001
 
 #define	VCPROPTAG_ALLOCATE_BUFFER	0x00040001
+#define	VCPROPTAG_BLANK_SCREEN		0x00040002
 #define	VCPROPTAG_GET_FB_RES		0x00040003
 #define	VCPROPTAG_SET_FB_RES		0x00048003
+#define	VCPROPTAG_GET_FB_VRES		0x00040004
+#define	VCPROPTAG_SET_FB_VRES		0x00048004
 #define	VCPROPTAG_GET_FB_DEPTH		0x00040005
 #define	VCPROPTAG_SET_FB_DEPTH		0x00048005
 #define	VCPROPTAG_GET_FB_PIXEL_ORDER	0x00040006
 #define	VCPROPTAG_SET_FB_PIXEL_ORDER	0x00048006
+#define	VCPROPTAG_GET_FB_ALPHA_MODE	0x00040007
+#define	VCPROPTAG_SET_FB_ALPHA_MODE	0x00048007
 #define	VCPROPTAG_GET_FB_PITCH		0x00040008
 
 #define	VCPROPTAG_GET_EDID_BLOCK	0x00030020
@@ -219,6 +224,14 @@ struct vcprop_tag_allocbuf {
 	uint32_t size;
 };
 
+#define VCPROP_BLANK_OFF	0
+#define VCPROP_BLANK_ON		1
+
+struct vcprop_tag_blankscreen {
+	struct vcprop_tag tag;
+	uint32_t state;
+};
+
 struct vcprop_tag_fbres {
 	struct vcprop_tag tag;
 	uint32_t width;
@@ -243,6 +256,15 @@ struct vcprop_tag_fbpitch {
 	uint32_t linebytes;
 };
 
+#define VCPROP_ALPHA_ENABLED	0
+#define VCPROP_ALPHA_REVERSED	1
+#define VCPROP_ALPHA_IGNORED	2
+
+struct vcprop_tag_fbalpha {
+	struct vcprop_tag tag;
+	uint32_t state;
+};
+
 struct vcprop_tag_edidblock {
 	struct vcprop_tag tag;
 	uint32_t blockno;



CVS commit: src/sys/rump

2013-01-08 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan  8 13:45:28 UTC 2013

Modified Files:
src/sys/rump: TODO

Log Message:
Update a bit.  yay, this file isn't completely append-only!


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/TODO

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/TODO
diff -u src/sys/rump/TODO:1.8 src/sys/rump/TODO:1.9
--- src/sys/rump/TODO:1.8	Tue Feb  1 15:26:46 2011
+++ src/sys/rump/TODO	Tue Jan  8 13:45:28 2013
@@ -1,22 +1,28 @@
-	$NetBSD: TODO,v 1.8 2011/02/01 15:26:46 pooka Exp $
+	$NetBSD: TODO,v 1.9 2013/01/08 13:45:28 pooka Exp $
 
-* fix the build structure to work better on non-NetBSD
-  = available in pkgsrc/misc/rump
-* figure out how to handle mount parameters in fs-independent
-  fashion (requires kernel changes)
-  = generic fs-mounting, GSoC 2009
 * integrate build framework with config(1) to stop the need to
   maintain a separate build infrastructure.  the remaining step
   is to rewrite the Makefiles to use  source file lists generated
   with config(1) (where possible)
   + this will also benefit kernel modules
+  + the patch to config(1) exists but is not in-tree.  remaining work is
+modifications to files.*
 * find a better solution for rumpdefs.h, the sed "solution"
   doesn't really scale nicely
-* make rumpuser interface fully portable
-  + get rid of all non-standard binary types
-  + limit use of ioctl
-* the .a semantics do not make sense for rump components.
+  + something toolchain-based?
+* make it possible for kernel components to define private hypercalls.
+  the implementation is trivial (just do it), but the build system makes
+  things very difficult (if you want to find out why, just try it).
+* the .a semantics do not make sense for rump kernel components.
   additionally, they cannot be loaded as modules since they are
   ar's instead of elf objects.  make the build produce and use elf
   objects instead of archives
 * cleanup remaining uses of __ in the kernel
+* rump_syscalls.c in librump should be compiled in the client
+  namespace, not the rump kernel namespace.  while technically trivial,
+  the build system makes this quite difficult.  one option for "cheating"
+  would be to put it into librumpuser which is always available for
+  local clients (per definition of local client).
+* add autoconf support to librumpuser to clean up the #ifdef acrobatics
+  and fix some of the issues that cannot be handled purely with static
+  ifdefs (autoconf to be used for non-native builds only)



CVS commit: src/common/lib/libc/arch/arm/string

2013-01-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  8 13:21:06 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/string: strcpy.S strlen.S

Log Message:
Depending on _STANDALONE include the "naive" version or the normal arm version.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strcpy.S
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strlen.S

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/libc/arch/arm/string/strcpy.S
diff -u src/common/lib/libc/arch/arm/string/strcpy.S:1.2 src/common/lib/libc/arch/arm/string/strcpy.S:1.3
--- src/common/lib/libc/arch/arm/string/strcpy.S:1.2	Wed Jan  2 15:38:03 2013
+++ src/common/lib/libc/arch/arm/string/strcpy.S	Tue Jan  8 13:21:05 2013
@@ -1,527 +1,7 @@
-/*-
- * Copyright (c) 2013 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Matt Thomas of 3am Software Foundry.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/* $NetBSD: strcpy.S,v 1.3 2013/01/08 13:21:05 matt Exp $ */
 
-#include 
-
-RCSID("$NetBSD: strcpy.S,v 1.2 2013/01/02 15:38:03 matt Exp $")
-
-#ifdef STRLCPY
-#ifdef _LIBC
-WEAK_ALIAS(strlcpy, _strlcpy)
-#endif
-#define	FUNCNAME	strlcpy
-#elif defined(STRNCPY)
-#define	FUNCNAME	strncpy
-#else
-#define	FUNCNAME	strcpy
-#endif
-
-#ifdef _LIBC
-#include "namespace.h"
-#endif
-
-#ifdef __ARMEL__
-#define	lslo	lsr		/* shift to lower address */
-#define	lshi	lsl		/* shift to higher address */
-#define	BYTE0	0x00ff
-#define	BYTE1	0xff00
-#define	BYTE2	0x00ff
-#define	BYTE3	0xff00
-#else
-#define	lslo	lsl		/* shift to lower address */
-#define	lshi	lsr		/* shift to higher address */
-#define	BYTE0	0xff00
-#define	BYTE1	0x00ff
-#define	BYTE2	0xff00
-#define	BYTE3	0x00ff
-#endif
-
-/*
- * On armv6 and later, to quickly determine if a word contains a NUL (0) byte,
- * we add 254 to each byte using the UQADD8 (unsigned saturating add 8)
- * instruction.  For every non-NUL byte, the result for that byte will become
- * 255.  For NUL, it will be 254.  When we complement the result of all 4 adds,
- * if the result is non-0 then we must have encountered a NUL.
- *
- * For earlier architecture, we just use tst on all 4 bytes.  There are other
- * algorithms to detect NULs but they take longer and use more instructions.
- */
-
-/*
- * char *strcpy(char *dst, const char *src);
- * char *strncpy(char *dst, const char *src, size_t len);
- * size_t strlcpy(char *dst, const char *src, size_t len);
- */
-
-	.text
-ENTRY(FUNCNAME)
-#if defined(STRLCPY)
-	cmp	r2, #1			/* is length 1 or less? */
-	bhi	1f			/*   no, do normal */
-	moveq	r3, #0			/*   = 1? load NUL */
-	streqb	r3, [r0]		/*   = 1? write NUL to dst */
-	mov	r0, r1			/* move src to r0 */
-	b	PLT_SYM(_C_LABEL(strlen)) /* and tailcall strlen */
-1:
-	sub	r2, r2, #1		/* leave one byte for NUL */
-#endif
-#if defined(STRNCPY)
-	cmp	r2, #0			/* 0 length? */
-	RETc(eq)			/*   yes, just return */
-#endif
-	push	{r4-r9}			/* save some registers */
-#ifdef _ARM_ARCH_6
-#ifdef _ARM_ARCH_7
-	movw	r7, #0xfefe		/* magic constant; 254 in each byte */
-#else
-	mov	r7, #0xfe		/* put 254 in low byte */
-	orr	r7, r7, r7, lsl #8	/* move to next byte */
-#endif
-	orr	r7, r7, r7, lsl #16	/* move to next halfword */
-#endif
-
-#if defined(STRLCPY)
-	add	r6, r1, #1		/* save for return (deal with NUL) */
-#else
-	mov	r6, r0			/* save for return */
-#endif
-
-.Ldst_align:
-	tst	r0, #3			/* check for dst alignment */
-	beq	.Ldst_aligned		/*   ok, proceed to next check */
-	ldr

CVS commit: src/common/lib/libc/arch/arm/string

2013-01-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  8 13:17:45 UTC 2013

Added Files:
src/common/lib/libc/arch/arm/string: strcpy_arm.S strlen_arm.S

Log Message:
Rename strlen.S and strcpy.S to strlen_arm.S and strcpy_arm.S


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/common/lib/libc/arch/arm/string/strcpy_arm.S \
src/common/lib/libc/arch/arm/string/strlen_arm.S

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

Added files:

Index: src/common/lib/libc/arch/arm/string/strcpy_arm.S
diff -u /dev/null src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.1
--- /dev/null	Tue Jan  8 13:17:45 2013
+++ src/common/lib/libc/arch/arm/string/strcpy_arm.S	Tue Jan  8 13:17:45 2013
@@ -0,0 +1,527 @@
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+
+RCSID("$NetBSD: strcpy_arm.S,v 1.1 2013/01/08 13:17:45 matt Exp $")
+
+#ifdef STRLCPY
+#ifdef _LIBC
+WEAK_ALIAS(strlcpy, _strlcpy)
+#endif
+#define	FUNCNAME	strlcpy
+#elif defined(STRNCPY)
+#define	FUNCNAME	strncpy
+#else
+#define	FUNCNAME	strcpy
+#endif
+
+#ifdef _LIBC
+#include "namespace.h"
+#endif
+
+#ifdef __ARMEL__
+#define	lslo	lsr		/* shift to lower address */
+#define	lshi	lsl		/* shift to higher address */
+#define	BYTE0	0x00ff
+#define	BYTE1	0xff00
+#define	BYTE2	0x00ff
+#define	BYTE3	0xff00
+#else
+#define	lslo	lsl		/* shift to lower address */
+#define	lshi	lsr		/* shift to higher address */
+#define	BYTE0	0xff00
+#define	BYTE1	0x00ff
+#define	BYTE2	0xff00
+#define	BYTE3	0x00ff
+#endif
+
+/*
+ * On armv6 and later, to quickly determine if a word contains a NUL (0) byte,
+ * we add 254 to each byte using the UQADD8 (unsigned saturating add 8)
+ * instruction.  For every non-NUL byte, the result for that byte will become
+ * 255.  For NUL, it will be 254.  When we complement the result of all 4 adds,
+ * if the result is non-0 then we must have encountered a NUL.
+ *
+ * For earlier architecture, we just use tst on all 4 bytes.  There are other
+ * algorithms to detect NULs but they take longer and use more instructions.
+ */
+
+/*
+ * char *strcpy(char *dst, const char *src);
+ * char *strncpy(char *dst, const char *src, size_t len);
+ * size_t strlcpy(char *dst, const char *src, size_t len);
+ */
+
+	.text
+ENTRY(FUNCNAME)
+#if defined(STRLCPY)
+	cmp	r2, #1			/* is length 1 or less? */
+	bhi	1f			/*   no, do normal */
+	moveq	r3, #0			/*   = 1? load NUL */
+	streqb	r3, [r0]		/*   = 1? write NUL to dst */
+	mov	r0, r1			/* move src to r0 */
+	b	PLT_SYM(_C_LABEL(strlen)) /* and tailcall strlen */
+1:
+	sub	r2, r2, #1		/* leave one byte for NUL */
+#endif
+#if defined(STRNCPY)
+	cmp	r2, #0			/* 0 length? */
+	RETc(eq)			/*   yes, just return */
+#endif
+	push	{r4-r9}			/* save some registers */
+#ifdef _ARM_ARCH_6
+#ifdef _ARM_ARCH_7
+	movw	r7, #0xfefe		/* magic constant; 254 in each byte */
+#else
+	mov	r7, #0xfe		/* put 254 in low byte */
+	orr	r7, r7, r7, lsl #8	/* move to next byte */
+#endif
+	orr	r7, r7, r7, lsl #16	/* move to next halfword */
+#endif
+
+#if defined(STRLCPY)
+	add	r6, r1, #1		/* save for return (deal with NUL) */
+#else
+	mov	r6, r0			/* save for return */
+#endif
+
+.Ldst_align:
+	tst	r0, #3			/* check for dst alignment */
+	beq	.Ldst_aligned		/*   ok, proceed to next check */
+	ldrb	r5, [r1], #1		/* load a byte */
+#if defined(STRNCPY)
+	subs	r2, r2, #1		/* subtract out from count */
+	bmi	.Ldst_full		/*   zero? the dst has no more

CVS commit: src/common/lib/libc/arch/arm/string

2013-01-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  8 13:14:54 UTC 2013

Added Files:
src/common/lib/libc/arch/arm/string: strcpy_naive.S strlen_naive.S

Log Message:
Add simple/small versions of the str* functions.  Suitable for libsa, etc.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/common/lib/libc/arch/arm/string/strcpy_naive.S \
src/common/lib/libc/arch/arm/string/strlen_naive.S

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

Added files:

Index: src/common/lib/libc/arch/arm/string/strcpy_naive.S
diff -u /dev/null src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.1
--- /dev/null	Tue Jan  8 13:14:54 2013
+++ src/common/lib/libc/arch/arm/string/strcpy_naive.S	Tue Jan  8 13:14:54 2013
@@ -0,0 +1,86 @@
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include 
+
+RCSID("$NetBSD: strcpy_naive.S,v 1.1 2013/01/08 13:14:54 matt Exp $")
+
+/*
+ * These are "naive" versions of the str*cpy routines designed to be simple
+ * and small.
+ */
+
+#if defined(STRLCPY)
+/* LINTSTUB: size_t strlcpy(char *, const char *, size_t) */
+ENTRY(strlcpy)
+	add	ip, r1, #1		/* save src pointer (+ NUL) */
+	subs	r2, r2, #1		/* make sure there's room for a NUL */
+	blt	3f			/*   no room, do the strlen */
+	add	r2, r2, r0		/* get end of dst */
+1:	cmp	r0, r2			/* room for another char? */
+	beq	2f			/*   no, write NUL and do the strlen */
+	ldrb	r3, [r1], #1		/* read a byte */
+	strb	r3, [r0], #1		/* write a byte */
+	teq	r3, #0			/* was it a NUL? */
+	bne	1b			/*   no, do next byte */
+	b	4f			/*   yes, end of string, so return */
+2:	mov	r3, #0			/* NUL */
+	strb	r3, [r0], #1		/* write to end of string */
+3:	ldrb	r3, [r1], #1		/* read a byte */
+	teq	r3, #0			/* was it a NUL? */
+	bne	3b			/*   no, get next byte */
+4:	sub	r0, r1, ip 		/* return length of src string */
+	RET
+END(strlcpy)
+#elif defined(STRNCPY)
+/* LINTSTUB: char * strncpy(char *, const char *, size_t) */
+ENTRY(strncpy)
+	mov	ip, r0			/* we want to preserve r0 */
+	add	r2, r2, r0		/* get end of dst buffer */
+1:	cmp	ip, r2			/* are at the end of dst already? */
+	RETc(eq)			/*   yes, just return. */
+	ldrb	r3, [r1], #1		/* read a byte */
+	strb	r3, [ip], #1		/* write a byte */
+	teq	r3, #0			/* was it a NUL? */
+	bne	1b			/*   no, try next byte */
+2:	cmp	ip, r2			/* are at the end of dst already? */
+	strltb	r3, [ip], #1		/*   no, write a NUL */
+	blt	2b			/*   until dst is filled */
+3:	RET/* return dst pointer */
+END(strncpy)
+#else
+/* LINTSTUB: char * strcpy(char *, const char *) */
+ENTRY(strcpy)
+	mov	ip, r0			/* we want to preserve r0 */
+1:	ldrb	r3, [r1], #1		/* read a byte */
+	strb	r3, [ip], #1		/* write a byte */
+	teq	r3, #0			/* was it a NUL? */
+	bne	1b			/*   no, try next byte */
+	RET/* return dst pointer */
+END(strcpy)
+#endif
Index: src/common/lib/libc/arch/arm/string/strlen_naive.S
diff -u /dev/null src/common/lib/libc/arch/arm/string/strlen_naive.S:1.1
--- /dev/null	Tue Jan  8 13:14:54 2013
+++ src/common/lib/libc/arch/arm/string/strlen_naive.S	Tue Jan  8 13:14:54 2013
@@ -0,0 +1,41 @@
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Red

CVS commit: src/sys/rump

2013-01-08 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jan  8 13:12:26 UTC 2013

Modified Files:
src/sys/rump: README.dirs

Log Message:
Update a bit.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/rump/README.dirs

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/README.dirs
diff -u src/sys/rump/README.dirs:1.11 src/sys/rump/README.dirs:1.12
--- src/sys/rump/README.dirs:1.11	Tue May 11 11:58:14 2010
+++ src/sys/rump/README.dirs	Tue Jan  8 13:12:26 2013
@@ -1,22 +1,21 @@
-	$NetBSD: README.dirs,v 1.11 2010/05/11 11:58:14 pooka Exp $
+	$NetBSD: README.dirs,v 1.12 2013/01/08 13:12:26 pooka Exp $
 
 
 The following is a quick rundown of the current directory structure.
 First, components in the kernel namespace, i.e. compiled with -D_KERNEL
 
-sys/rump/librump - kernel runtime emulation
+sys/rump/librump - rump kernel base and factions
   /rumpkern	- kernel core, e.g. syscall, interrupt and lock support
 
-  /rumpcrypto	- kernel cryptographic routines
   /rumpdev	- device support, e.g. autoconf subsystem
   /rumpnet	- networking support and sockets layer
   /rumpvfs	- file system support
 
 sys/rump/include
-  /machine - used for architectures where the rump ABI is not yet the
+  /machine - used for architectures where the rump kernel ABI is not yet the
 	 same as the kernel module ABI.  will eventually disappear
 	 completely
-  /rump- rump headers installed to userspace
+  /rump- kernel headers installed to userspace
 
 sys/rump/dev - device components, e.g. audio, raidframe, usb drivers
 
@@ -28,18 +27,30 @@ sys/rump/net - networking components
   /lib/libnetinet - TCP/IP
   /lib/libvirtif  - a virtual interface which uses host tap(4) to shovel
 		packets.  This is used by netinet and if_ethersubr.
+  /lib/libshmif   - a virtual interface which uses a memory mapped file
+		as an ethernet bus.  works completely unprivileged.
   /lib/libsockin  - implements PF_INET using host kernel sockets.  This is
 		mutually exclusive with net, netinet and virtif.
 
 
 
-The rest are out-of-kernel components (i.e. no -D_KERNEL)
-related to rump.
+The rest are out-of-kernel components (i.e. no -D_KERNEL).
 
 hypercall interface:
 src/lib/librumpuser
-  The "rumpuser" set of interfaces is used by rump to communicate
-  with the host.
+  The "rumpuser" hypercall interfaces are used by a rump kernel to
+  access host resources.
+
+remote client interface:
+src/lib/librumpclient
+  The rumpclient library provides remote access to rump kernel servers.
+
+system call hijacking:
+src/lib/librumphijack
+  The rumphijack library allows intercepting system calls and redirecting
+  them to a rump kernel server instead of the host kernel.  In other
+  words, it allows existing binaries to request indicated services from
+  a rump kernel instead of from the host kernel.
 
 Users:
 src/lib
@@ -47,11 +58,11 @@ src/lib
   /libukfs - user kernel file system, a library to access file system
 	 images (or devices) directly in userspace without going
 	 through a system call and puffs.  It provides a slightly
-	 higher interface than pure rump syscalls.
+	 higher interface than syscalls.
 
 src/usr.sbin/puffs
   rump_$fs - userspace file system daemons using the kernel fs code
 
 src/share/examples/rump
-  Various examples detailing use of rump in different scenarios.
+  Various examples detailing use of rump kernels in different scenarios.
   These are provided source-only.



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

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Jan  8 13:02:54 UTC 2013

Modified Files:
src/sys/arch/evbarm/rpi: vcprop.h

Log Message:
add a couple more fb prop tags


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/rpi/vcprop.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/evbarm/rpi/vcprop.h
diff -u src/sys/arch/evbarm/rpi/vcprop.h:1.5 src/sys/arch/evbarm/rpi/vcprop.h:1.6
--- src/sys/arch/evbarm/rpi/vcprop.h:1.5	Tue Jan  8 10:23:50 2013
+++ src/sys/arch/evbarm/rpi/vcprop.h	Tue Jan  8 13:02:54 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vcprop.h,v 1.5 2013/01/08 10:23:50 jmcneill Exp $	*/
+/*	$NetBSD: vcprop.h,v 1.6 2013/01/08 13:02:54 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -72,8 +72,11 @@ struct vcprop_tag {
 
 #define	VCPROPTAG_ALLOCATE_BUFFER	0x00040001
 #define	VCPROPTAG_GET_FB_RES		0x00040003
+#define	VCPROPTAG_SET_FB_RES		0x00048003
 #define	VCPROPTAG_GET_FB_DEPTH		0x00040005
+#define	VCPROPTAG_SET_FB_DEPTH		0x00048005
 #define	VCPROPTAG_GET_FB_PIXEL_ORDER	0x00040006
+#define	VCPROPTAG_SET_FB_PIXEL_ORDER	0x00048006
 #define	VCPROPTAG_GET_FB_PITCH		0x00040008
 
 #define	VCPROPTAG_GET_EDID_BLOCK	0x00030020



CVS commit: [ipsec-tools-0_8-branch] src/crypto/dist/ipsec-tools

2013-01-08 Thread Timo Teräs
Module Name:src
Committed By:   tteras
Date:   Tue Jan  8 12:44:22 UTC 2013

Modified Files:
src/crypto/dist/ipsec-tools [ipsec-tools-0_8-branch]: NEWS configure.ac

Log Message:
ipsec-tools-0.8.1


To generate a diff of this commit:
cvs rdiff -u -r1.4.6.1 -r1.4.6.2 src/crypto/dist/ipsec-tools/NEWS
cvs rdiff -u -r1.10.6.3 -r1.10.6.4 src/crypto/dist/ipsec-tools/configure.ac

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

Modified files:

Index: src/crypto/dist/ipsec-tools/NEWS
diff -u src/crypto/dist/ipsec-tools/NEWS:1.4.6.1 src/crypto/dist/ipsec-tools/NEWS:1.4.6.2
--- src/crypto/dist/ipsec-tools/NEWS:1.4.6.1	Fri Mar 18 13:20:27 2011
+++ src/crypto/dist/ipsec-tools/NEWS	Tue Jan  8 12:44:22 2013
@@ -1,5 +1,13 @@
 Version history:
 
+0.8.1	- 08 January 2013
+	o Improved X.509 subject name comparation (Götz Babin-Ebell)
+	o Relax DPD cookie check for Cisco IOS compatibility (Roman Antink)
+	o Allow simplified syntax for inherited remote blocks (Roman Antink)
+	o Never shring pfkey socket buffer (Marcelo Leitner)
+	o Privilege separation child process exit fix
+	o Multiple memory allocation and use-after-free fixes
+
 0.8	- 18 March 2011
 	o Fix authentication method ambiguity with kerberos and xauth
 	o RFC2253 compliant escaping of asn1dn identifiers (Cyrus Rahman)

Index: src/crypto/dist/ipsec-tools/configure.ac
diff -u src/crypto/dist/ipsec-tools/configure.ac:1.10.6.3 src/crypto/dist/ipsec-tools/configure.ac:1.10.6.4
--- src/crypto/dist/ipsec-tools/configure.ac:1.10.6.3	Tue Jan  8 12:43:07 2013
+++ src/crypto/dist/ipsec-tools/configure.ac	Tue Jan  8 12:44:22 2013
@@ -2,7 +2,7 @@ dnl -*- mode: m4 -*-
 dnl Id: configure.ac,v 1.77 2006/07/20 19:19:27 manubsd Exp
 
 AC_PREREQ(2.52)
-AC_INIT(ipsec-tools, 0.8.0)
+AC_INIT(ipsec-tools, 0.8.1)
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_HEADERS(config.h)
 



CVS commit: [ipsec-tools-0_8-branch] src/crypto/dist/ipsec-tools

2013-01-08 Thread Timo Teräs
Module Name:src
Committed By:   tteras
Date:   Tue Jan  8 12:43:07 UTC 2013

Modified Files:
src/crypto/dist/ipsec-tools [ipsec-tools-0_8-branch]: configure.ac

Log Message:
Fix errors from automake 1.13


To generate a diff of this commit:
cvs rdiff -u -r1.10.6.2 -r1.10.6.3 src/crypto/dist/ipsec-tools/configure.ac

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

Modified files:

Index: src/crypto/dist/ipsec-tools/configure.ac
diff -u src/crypto/dist/ipsec-tools/configure.ac:1.10.6.2 src/crypto/dist/ipsec-tools/configure.ac:1.10.6.3
--- src/crypto/dist/ipsec-tools/configure.ac:1.10.6.2	Mon Dec 24 08:48:08 2012
+++ src/crypto/dist/ipsec-tools/configure.ac	Tue Jan  8 12:43:07 2013
@@ -4,14 +4,13 @@ dnl Id: configure.ac,v 1.77 2006/07/20 1
 AC_PREREQ(2.52)
 AC_INIT(ipsec-tools, 0.8.0)
 AC_CONFIG_SRCDIR([configure.ac])
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
 
 AM_INIT_AUTOMAKE(dist-bzip2)
 
 AC_ENABLE_SHARED(no)
 
 AC_PROG_CC
-AM_PROG_CC_STDC
 AC_HEADER_STDC
 AC_PROG_LIBTOOL
 AC_PROG_YACC



CVS commit: src/crypto/dist/ipsec-tools

2013-01-08 Thread Timo Teräs
Module Name:src
Committed By:   tteras
Date:   Tue Jan  8 12:42:32 UTC 2013

Modified Files:
src/crypto/dist/ipsec-tools: configure.ac

Log Message:
Fix errors from automake 1.13


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/crypto/dist/ipsec-tools/configure.ac

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

Modified files:

Index: src/crypto/dist/ipsec-tools/configure.ac
diff -u src/crypto/dist/ipsec-tools/configure.ac:1.12 src/crypto/dist/ipsec-tools/configure.ac:1.13
--- src/crypto/dist/ipsec-tools/configure.ac:1.12	Mon Dec 24 08:46:27 2012
+++ src/crypto/dist/ipsec-tools/configure.ac	Tue Jan  8 12:42:31 2013
@@ -4,14 +4,13 @@ dnl Id: configure.ac,v 1.77 2006/07/20 1
 AC_PREREQ(2.52)
 AC_INIT(ipsec-tools, CVS)
 AC_CONFIG_SRCDIR([configure.ac])
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
 
 AM_INIT_AUTOMAKE(dist-bzip2)
 
 AC_ENABLE_SHARED(no)
 
 AC_PROG_CC
-AM_PROG_CC_STDC
 AC_HEADER_STDC
 AC_PROG_LIBTOOL
 AC_PROG_YACC



CVS commit: [ipsec-tools-0_8-branch] src/crypto/dist/ipsec-tools/src/include-glibc

2013-01-08 Thread Timo Teräs
Module Name:src
Committed By:   tteras
Date:   Tue Jan  8 12:38:54 UTC 2013

Modified Files:
src/crypto/dist/ipsec-tools/src/include-glibc [ipsec-tools-0_8-branch]:
Makefile.am

Log Message:
Don't derefence the directory symlink which we might be recreating.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.48.1 \
src/crypto/dist/ipsec-tools/src/include-glibc/Makefile.am

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/include-glibc/Makefile.am
diff -u src/crypto/dist/ipsec-tools/src/include-glibc/Makefile.am:1.1.1.1 src/crypto/dist/ipsec-tools/src/include-glibc/Makefile.am:1.1.1.1.48.1
--- src/crypto/dist/ipsec-tools/src/include-glibc/Makefile.am:1.1.1.1	Sat Feb 12 11:11:22 2005
+++ src/crypto/dist/ipsec-tools/src/include-glibc/Makefile.am	Tue Jan  8 12:38:54 2013
@@ -1,6 +1,6 @@
 
 .includes: ${top_builddir}/config.status
-	ln -sf $(KERNEL_INCLUDE)/linux
+	ln -snf $(KERNEL_INCLUDE)/linux
 	touch .includes
 
 all: .includes



CVS commit: src/crypto/dist/ipsec-tools/src/include-glibc

2013-01-08 Thread Timo Teräs
Module Name:src
Committed By:   tteras
Date:   Tue Jan  8 12:38:40 UTC 2013

Modified Files:
src/crypto/dist/ipsec-tools/src/include-glibc: Makefile.am

Log Message:
Don't derefence the directory symlink which we might be recreating.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/dist/ipsec-tools/src/include-glibc/Makefile.am

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

Modified files:

Index: src/crypto/dist/ipsec-tools/src/include-glibc/Makefile.am
diff -u src/crypto/dist/ipsec-tools/src/include-glibc/Makefile.am:1.1.1.1 src/crypto/dist/ipsec-tools/src/include-glibc/Makefile.am:1.2
--- src/crypto/dist/ipsec-tools/src/include-glibc/Makefile.am:1.1.1.1	Sat Feb 12 11:11:22 2005
+++ src/crypto/dist/ipsec-tools/src/include-glibc/Makefile.am	Tue Jan  8 12:38:40 2013
@@ -1,6 +1,6 @@
 
 .includes: ${top_builddir}/config.status
-	ln -sf $(KERNEL_INCLUDE)/linux
+	ln -snf $(KERNEL_INCLUDE)/linux
 	touch .includes
 
 all: .includes



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

2013-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan  8 12:15:42 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_intr.c bcm2835_mbox.c

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm2835_intr.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/broadcom/bcm2835_mbox.c

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm2835_intr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_intr.c:1.2 src/sys/arch/arm/broadcom/bcm2835_intr.c:1.3
--- src/sys/arch/arm/broadcom/bcm2835_intr.c:1.2	Sat Aug 18 22:28:23 2012
+++ src/sys/arch/arm/broadcom/bcm2835_intr.c	Tue Jan  8 12:15:42 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_intr.c,v 1.2 2012/08/18 22:28:23 jakllsch Exp $	*/
+/*	$NetBSD: bcm2835_intr.c,v 1.3 2013/01/08 12:15:42 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.2 2012/08/18 22:28:23 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.3 2013/01/08 12:15:42 skrll Exp $");
 
 #define _INTR_PRIVATE
 
@@ -78,10 +78,10 @@ struct bcm2835icu_softc {
 };
 
 struct bcm2835icu_softc *bcmicu_sc;
-	
+
 #define read_bcm2835reg(o)	\
 	bus_space_read_4(bcmicu_sc->sc_iot, bcmicu_sc->sc_ioh, (o))
-	
+
 #define write_bcm2835reg(o, v)	\
 	bus_space_write_4(bcmicu_sc->sc_iot, bcmicu_sc->sc_ioh, (o), (v))
 
@@ -89,7 +89,7 @@ struct bcm2835icu_softc *bcmicu_sc;
 #define bcm2835_barrier() \
 	bus_space_barrier(bcmicu_sc->sc_iot, bcmicu_sc->sc_ioh, 0, \
 	BCM2835_ARMICU_SIZE, BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE)
-	
+
 static const char * const bcm2835_sources[BCM2835_NIRQ] = {
 	"(unused  0)",	"(unused  1)",	"(unused  2)",	"timer3",
 	"(unused  4)",	"(unused  5)",	"(unused  6)",	"jpeg",
@@ -212,24 +212,24 @@ bcm2835_pic_find_pending_irqs(struct pic
 	if (armirq) {
 		ipl |= pic_mark_pending_sources(pic, BCM2835_INT_BASICBASE,
 		armirq);
-		
+
 	}
 
 	if (gpu0irq || (bpending & BCM2835_INTBIT_PENDING1)) {
 		uint32_t pending1;
-		
+
 		pending1 = read_bcm2835reg(BCM2835_INTC_IRQ1PENDING);
 		ipl |= pic_mark_pending_sources(pic, BCM2835_INT_GPU0BASE,
 		pending1);
 	}
 	if (gpu1irq || (bpending & BCM2835_INTBIT_PENDING2)) {
 		uint32_t pending2;
-		
+
 		pending2 = read_bcm2835reg(BCM2835_INTC_IRQ2PENDING);
 		ipl |= pic_mark_pending_sources(pic, BCM2835_INT_GPU1BASE,
 		pending2);
 	}
-		
+
 	return ipl;
 }
 

Index: src/sys/arch/arm/broadcom/bcm2835_mbox.c
diff -u src/sys/arch/arm/broadcom/bcm2835_mbox.c:1.4 src/sys/arch/arm/broadcom/bcm2835_mbox.c:1.5
--- src/sys/arch/arm/broadcom/bcm2835_mbox.c:1.4	Tue Jan  8 09:11:11 2013
+++ src/sys/arch/arm/broadcom/bcm2835_mbox.c	Tue Jan  8 12:15:42 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_mbox.c,v 1.4 2013/01/08 09:11:11 jmcneill Exp $	*/
+/*	$NetBSD: bcm2835_mbox.c,v 1.5 2013/01/08 12:15:42 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_mbox.c,v 1.4 2013/01/08 09:11:11 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_mbox.c,v 1.5 2013/01/08 12:15:42 skrll Exp $");
 
 #include 
 #include 
@@ -88,7 +88,7 @@ bcmmbox_attach(device_t parent, device_t
 
 	if (bcm2835mbox_sc == NULL)
 		bcm2835mbox_sc = sc;
-	
+
 	sc->sc_dev = self;
 	sc->sc_iot = aaa->aaa_iot;
 	sc->sc_dmat = aaa->aaa_dmat;
@@ -174,5 +174,6 @@ create_failed:
 	bus_dmamem_unmap(sc->sc_dmat, dma_buf, buflen);
 map_failed:
 	bus_dmamem_free(sc->sc_dmat, segs, nsegs);
+	
 	return error;
 }



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

2013-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan  8 12:13:59 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_tmr.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm2835_tmr.c

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm2835_tmr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.2 src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.3
--- src/sys/arch/arm/broadcom/bcm2835_tmr.c:1.2	Wed Nov 21 08:47:13 2012
+++ src/sys/arch/arm/broadcom/bcm2835_tmr.c	Tue Jan  8 12:13:58 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_tmr.c,v 1.2 2012/11/21 08:47:13 skrll Exp $	*/
+/*	$NetBSD: bcm2835_tmr.c,v 1.3 2013/01/08 12:13:58 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_tmr.c,v 1.2 2012/11/21 08:47:13 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_tmr.c,v 1.3 2013/01/08 12:13:58 skrll Exp $");
 
 #include 
 #include 
@@ -59,7 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: bcm2835_tmr.
 
 static const uint32_t counts_per_usec = (BCM2835_STIMER_HZ / 100);
 static uint32_t counts_per_hz = ~0;
-
+
 struct bcm2835tmr_softc {
 	device_t		sc_dev;
 
@@ -113,7 +113,7 @@ bcmtmr_attach(device_t parent, device_t 
 
 	if (bcm2835tmr_sc == NULL)
 		bcm2835tmr_sc = sc;
-	
+
 	sc->sc_dev = self;
 	sc->sc_iot = aaa->aaa_iot;
 
@@ -122,7 +122,7 @@ bcmtmr_attach(device_t parent, device_t 
 		aprint_error_dev(sc->sc_dev, "unable to map device\n");
 		return;
 	}
-	
+
 	bcm2835tmr_timecounter.tc_name = device_xname(self);
 }
 
@@ -132,7 +132,7 @@ cpu_initclocks(void)
 	struct bcm2835tmr_softc *sc = bcm2835tmr_sc;
 	void *clock_ih;
 	uint32_t stcl;
-	
+
 	KASSERT(sc != NULL);
 
 	bcm2835tmr_timecounter.tc_priv = sc;
@@ -179,7 +179,7 @@ delay(unsigned int n)
 			usecs += delta / counts_per_usec;
 			delta %= counts_per_usec;
 		}
-	}	
+	}
 
 }
 
@@ -194,7 +194,7 @@ clockhandler(void *arg)
 	struct bcm2835tmr_softc *sc = bcm2835tmr_sc;
 	struct clockframe *frame = arg;
 	uint32_t curr, status;
-	
+
 	status = bus_space_read_4(sc->sc_iot, sc->sc_ioh,
 	BCM2835_STIMER_CS);
 



CVS commit: src/doc

2013-01-08 Thread Takahiro Kambe
Module Name:src
Committed By:   taca
Date:   Tue Jan  8 11:16:29 UTC 2013

Modified Files:
src/doc: 3RDPARTY

Log Message:
Update root.cache to 2013010300.


To generate a diff of this commit:
cvs rdiff -u -r1.995 -r1.996 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.995 src/doc/3RDPARTY:1.996
--- src/doc/3RDPARTY:1.995	Thu Jan  3 23:15:05 2013
+++ src/doc/3RDPARTY	Tue Jan  8 11:16:29 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.995 2013/01/03 23:15:05 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.996 2013/01/08 11:16:29 taca Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1042,8 +1042,8 @@ Notes:
 Old versions are available from Purdue (ftp.cs.purdue.edu:/pub/RCS).
 
 Package:	root.cache
-Version:	2011060800 (Jun 8, 2011)
-Current Vers:	2011060800 (Jun 8, 2011)
+Version:	2013010300 (Jan 3, 2013)
+Current Vers:	2013010300 (Jan 3, 2013)
 Maintainer:	InterNIC
 Archive Site:	ftp://ftp.internic.net/domain/named.root
 Home Page:	ftp://ftp.internic.net/domain/named.root



CVS commit: src/etc/namedb

2013-01-08 Thread Takahiro Kambe
Module Name:src
Committed By:   taca
Date:   Tue Jan  8 11:15:49 UTC 2013

Modified Files:
src/etc/namedb: root.cache

Log Message:
D.ROOT-SERVERS.NET changes IPv4 address.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/etc/namedb/root.cache

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

Modified files:

Index: src/etc/namedb/root.cache
diff -u src/etc/namedb/root.cache:1.16 src/etc/namedb/root.cache:1.17
--- src/etc/namedb/root.cache:1.16	Mon Aug  1 10:04:27 2011
+++ src/etc/namedb/root.cache	Tue Jan  8 11:15:49 2013
@@ -1,4 +1,4 @@
-;	$NetBSD: root.cache,v 1.16 2011/08/01 10:04:27 taca Exp $
+;	$NetBSD: root.cache,v 1.17 2013/01/08 11:15:49 taca Exp $
 ;   This file holds the information on root name servers needed to
 ;   initialize cache of Internet domain name servers
 ;   (e.g. reference this file in the "cache  .  "
@@ -10,8 +10,8 @@
 ;   on server   FTP.INTERNIC.NET
 ;   -OR-RS.INTERNIC.NET
 ;
-;   last update:Jun 8, 2011
-;   related version of root zone:   2011060800
+;   last update:Jan 3, 2013
+;   related version of root zone:   2013010300
 ;
 ; formerly NS.INTERNIC.NET
 ;
@@ -32,7 +32,7 @@ C.ROOT-SERVERS.NET.  360  A 
 ; FORMERLY TERP.UMD.EDU
 ;
 .360  NSD.ROOT-SERVERS.NET.
-D.ROOT-SERVERS.NET.  360  A 128.8.10.90
+D.ROOT-SERVERS.NET.  360  A 199.7.91.13
 D.ROOT-SERVERS.NET.	 360    2001:500:2D::D
 ;
 ; FORMERLY NS.NASA.GOV



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

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Jan  8 10:23:51 UTC 2013

Modified Files:
src/sys/arch/evbarm/rpi: vcprop.h

Log Message:
add some framebuffer related vc tags


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/rpi/vcprop.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/evbarm/rpi/vcprop.h
diff -u src/sys/arch/evbarm/rpi/vcprop.h:1.4 src/sys/arch/evbarm/rpi/vcprop.h:1.5
--- src/sys/arch/evbarm/rpi/vcprop.h:1.4	Mon Jan  7 22:32:24 2013
+++ src/sys/arch/evbarm/rpi/vcprop.h	Tue Jan  8 10:23:50 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vcprop.h,v 1.4 2013/01/07 22:32:24 jmcneill Exp $	*/
+/*	$NetBSD: vcprop.h,v 1.5 2013/01/08 10:23:50 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -69,6 +69,16 @@ struct vcprop_tag {
 
 #define	VCPROPTAG_GET_CMDLINE		0x00050001
 #define	VCPROPTAG_GET_DMACHAN		0x00060001
+
+#define	VCPROPTAG_ALLOCATE_BUFFER	0x00040001
+#define	VCPROPTAG_GET_FB_RES		0x00040003
+#define	VCPROPTAG_GET_FB_DEPTH		0x00040005
+#define	VCPROPTAG_GET_FB_PIXEL_ORDER	0x00040006
+#define	VCPROPTAG_GET_FB_PITCH		0x00040008
+
+#define	VCPROPTAG_GET_EDID_BLOCK	0x00030020
+
+
 	uint32_t vpt_len;
 	uint32_t vpt_rcode;
 #define	VCPROPTAG_REQUEST	(0U << 31)
@@ -200,6 +210,43 @@ struct vcprop_tag_powerstate {
 	uint32_t state;
 };
 
+struct vcprop_tag_allocbuf {
+	struct vcprop_tag tag;
+	uint32_t address;	/* alignment for request */
+	uint32_t size;
+};
+
+struct vcprop_tag_fbres {
+	struct vcprop_tag tag;
+	uint32_t width;
+	uint32_t height;
+};
+
+struct vcprop_tag_fbdepth {
+	struct vcprop_tag tag;
+	uint32_t bpp;
+};
+
+#define VCPROP_PIXEL_BGR	0
+#define VCPROP_PIXEL_RGB	1
+
+struct vcprop_tag_fbpixelorder {
+	struct vcprop_tag tag;
+	uint32_t state;
+};
+
+struct vcprop_tag_fbpitch {
+	struct vcprop_tag tag;
+	uint32_t linebytes;
+};
+
+struct vcprop_tag_edidblock {
+	struct vcprop_tag tag;
+	uint32_t blockno;
+	uint32_t status;
+	uint8_t data[128];
+};
+
 struct vcprop_buffer_hdr {
 	uint32_t vpb_len;
 	uint32_t vpb_rcode;



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

2013-01-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Jan  8 09:11:11 UTC 2013

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_mbox.c

Log Message:
serialize bcmmbox_request


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/broadcom/bcm2835_mbox.c

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm2835_mbox.c
diff -u src/sys/arch/arm/broadcom/bcm2835_mbox.c:1.3 src/sys/arch/arm/broadcom/bcm2835_mbox.c:1.4
--- src/sys/arch/arm/broadcom/bcm2835_mbox.c:1.3	Mon Jan  7 20:15:32 2013
+++ src/sys/arch/arm/broadcom/bcm2835_mbox.c	Tue Jan  8 09:11:11 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_mbox.c,v 1.3 2013/01/07 20:15:32 jmcneill Exp $	*/
+/*	$NetBSD: bcm2835_mbox.c,v 1.4 2013/01/08 09:11:11 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_mbox.c,v 1.3 2013/01/07 20:15:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_mbox.c,v 1.4 2013/01/08 09:11:11 jmcneill Exp $");
 
 #include 
 #include 
@@ -38,6 +38,7 @@ __KERNEL_RCSID(0, "$NetBSD: bcm2835_mbox
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -51,6 +52,8 @@ struct bcm2835mbox_softc {
 	bus_space_tag_t sc_iot;
 	bus_space_handle_t sc_ioh;
 	bus_dma_tag_t sc_dmat;
+
+	kmutex_t sc_lock;
 };
 
 static struct bcm2835mbox_softc *bcm2835mbox_sc;
@@ -89,6 +92,7 @@ bcmmbox_attach(device_t parent, device_t
 	sc->sc_dev = self;
 	sc->sc_iot = aaa->aaa_iot;
 	sc->sc_dmat = aaa->aaa_dmat;
+	mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE);
 
 	if (bus_space_map(aaa->aaa_iot, aaa->aaa_addr, BCM2835_MBOX_SIZE, 0,
 	&sc->sc_ioh)) {
@@ -151,12 +155,16 @@ bcmmbox_request(uint8_t chan, void *buf,
 
 	memcpy(dma_buf, buf, buflen);
 
+	mutex_enter(&sc->sc_lock);
+
 	bus_dmamap_sync(sc->sc_dmat, map, 0, buflen, BUS_DMASYNC_PREWRITE);
 	bcmmbox_write(chan, map->dm_segs[0].ds_addr);
 	bus_dmamap_sync(sc->sc_dmat, map, 0, buflen, BUS_DMASYNC_POSTWRITE);
 	bus_dmamap_sync(sc->sc_dmat, map, 0, buflen, BUS_DMASYNC_PREREAD);
 	bcmmbox_read(chan, pres);
 
+	mutex_exit(&sc->sc_lock);
+
 	memcpy(buf, dma_buf, buflen);
 
 	bus_dmamap_unload(sc->sc_dmat, map);



CVS commit: src/sys/rump/include/machine

2013-01-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan  8 08:55:29 UTC 2013

Modified Files:
src/sys/rump/include/machine: intr.h

Log Message:
Provide splsoftserial.

GRRR RUMP


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/rump/include/machine/intr.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/rump/include/machine/intr.h
diff -u src/sys/rump/include/machine/intr.h:1.18 src/sys/rump/include/machine/intr.h:1.19
--- src/sys/rump/include/machine/intr.h:1.18	Mon Mar 21 16:41:08 2011
+++ src/sys/rump/include/machine/intr.h	Tue Jan  8 08:55:28 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.18 2011/03/21 16:41:08 pooka Exp $	*/
+/*	$NetBSD: intr.h,v 1.19 2013/01/08 08:55:28 skrll Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -47,6 +47,7 @@ makeiplcookie(ipl_t ipl)
 
 #define spllower(x) ((void)x)
 #define splraise(x) 0
+#define splsoftserial() 0
 #define splsoftnet() 0
 #define splsoftclock() 0
 #define splhigh() 0