PERFORCE change 103578 for review

Marcel Moolenaar marcel at FreeBSD.org
Thu Aug 10 15:53:15 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=103578

Change 103578 by marcel at marcel_nfs on 2006/08/10 15:52:18

	IFC @103573

Affected files ...

.. //depot/projects/gdb/lib/libc/stdlib/malloc.c#7 integrate
.. //depot/projects/gdb/lib/libdisk/write_ia64_disk.c#3 integrate
.. //depot/projects/gdb/sbin/geom/class/eli/geli.8#3 integrate
.. //depot/projects/gdb/sbin/ifconfig/ifieee80211.c#5 integrate
.. //depot/projects/gdb/share/examples/drivers/make_pseudo_driver.sh#3 integrate
.. //depot/projects/gdb/share/man/man4/acpi.4#13 integrate
.. //depot/projects/gdb/share/man/man4/ng_pppoe.4#6 integrate
.. //depot/projects/gdb/sys/Makefile#6 integrate
.. //depot/projects/gdb/sys/arm/at91/at91_st.c#2 integrate
.. //depot/projects/gdb/sys/boot/Makefile#6 integrate
.. //depot/projects/gdb/sys/boot/arm/Makefile#1 branch
.. //depot/projects/gdb/sys/dev/acpica/acpi_video.c#8 integrate
.. //depot/projects/gdb/sys/dev/em/if_em.c#11 integrate
.. //depot/projects/gdb/sys/geom/geom_gpt.c#7 integrate
.. //depot/projects/gdb/sys/i386/conf/XBOX#2 integrate
.. //depot/projects/gdb/sys/i386/i386/machdep.c#19 integrate
.. //depot/projects/gdb/sys/i386/isa/clock.c#15 integrate
.. //depot/projects/gdb/sys/kern/vfs_subr.c#23 integrate
.. //depot/projects/gdb/sys/net80211/ieee80211_input.c#6 integrate
.. //depot/projects/gdb/sys/net80211/ieee80211_ioctl.c#5 integrate
.. //depot/projects/gdb/sys/net80211/ieee80211_ioctl.h#4 integrate
.. //depot/projects/gdb/sys/net80211/ieee80211_output.c#5 integrate
.. //depot/projects/gdb/sys/netgraph/ng_pppoe.c#9 integrate
.. //depot/projects/gdb/sys/vm/vm_page.c#19 integrate
.. //depot/projects/gdb/usr.bin/hexdump/parse.c#3 integrate
.. //depot/projects/gdb/usr.bin/split/split.1#5 integrate
.. //depot/projects/gdb/usr.bin/split/split.c#5 integrate

Differences ...

==== //depot/projects/gdb/lib/libc/stdlib/malloc.c#7 (text+ko) ====

@@ -185,7 +185,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.132 2006/07/27 19:09:32 jasone Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.133 2006/08/09 19:01:27 marcel Exp $");
 
 #include "libc_private.h"
 #ifdef MALLOC_DEBUG
@@ -279,6 +279,7 @@
 #  define QUANTUM_2POW_MIN	4
 #  define SIZEOF_PTR		4
 #  define USE_BRK
+#  define NO_TLS
 #endif
 
 /* sizeof(int) == (1 << SIZEOF_INT_2POW). */

==== //depot/projects/gdb/lib/libdisk/write_ia64_disk.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libdisk/write_ia64_disk.c,v 1.15 2004/01/30 20:52:54 marcel Exp $");
+__FBSDID("$FreeBSD: src/lib/libdisk/write_ia64_disk.c,v 1.16 2006/08/09 20:19:15 marcel Exp $");
 
 #include <sys/types.h>
 #include <sys/disklabel.h>
@@ -123,6 +123,8 @@
 
 	error = 0;
 	nsects = disk->media_size / disk->sector_size;
+	nsects--;	/* The GPT starts at LBA 1 */
+
 	buffer = calloc(disk->sector_size, 1);
 	if (buffer == NULL)
 		return (ENOMEM);

==== //depot/projects/gdb/sbin/geom/class/eli/geli.8#3 (text+ko) ====

@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/sbin/geom/class/eli/geli.8,v 1.15 2006/08/09 18:35:31 maxim Exp $
+.\" $FreeBSD: src/sbin/geom/class/eli/geli.8,v 1.17 2006/08/10 01:13:38 maxim Exp $
 .\"
 .Dd August 9, 2006
 .Dt GELI 8
@@ -163,7 +163,7 @@
 passphrase before the root file system is mounted.
 .It
 The passphrase of the user is strengthened with:
-.Rs 
+.Rs
 .%A B. Kaliski
 .%T "PKCS #5: Password-Based Cryptography Specification, Version 2.0."
 .%R RFC
@@ -175,7 +175,7 @@
 and
 .Qq "company key" ) .
 .It
-It is fast - 
+It is fast -
 .Nm
 performs simple sector-to-sector encryption.
 .It
@@ -290,7 +290,7 @@
 subcommand.
 .It Fl r
 Attach read-only provider.
-It will not be opened for writting.
+It will not be opened for writing.
 .It Fl k Ar keyfile
 Specifies a file which contains part of the key.
 For more information see the description of the

==== //depot/projects/gdb/sbin/ifconfig/ifieee80211.c#5 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sbin/ifconfig/ifieee80211.c,v 1.39 2006/07/26 03:08:45 sam Exp $
+ * $FreeBSD: src/sbin/ifconfig/ifieee80211.c,v 1.40 2006/08/10 06:06:13 sam Exp $
  */
 
 /*-
@@ -974,19 +974,36 @@
 	list_scan(s);
 }
 
+static enum ieee80211_opmode get80211opmode(int s);
+
 static void
 list_stations(int s)
 {
-	uint8_t buf[24*1024];
+	union {
+		struct ieee80211req_sta_req req;
+		uint8_t buf[24*1024];
+	} u;
+	enum ieee80211_opmode opmode = get80211opmode(s);
 	struct ieee80211req ireq;
 	uint8_t *cp;
 	int len;
 
 	(void) memset(&ireq, 0, sizeof(ireq));
 	(void) strncpy(ireq.i_name, name, sizeof(ireq.i_name));
+	/* broadcast address =>'s get all stations */
+	(void) memset(u.req.is_u.macaddr, 0xff, IEEE80211_ADDR_LEN);
+	if (opmode == IEEE80211_M_STA) {
+		/*
+		 * Get information about the associated AP.
+		 */
+		ireq.i_type = IEEE80211_IOC_BSSID;
+		ireq.i_data = u.req.is_u.macaddr;
+		ireq.i_len = IEEE80211_ADDR_LEN;
+		(void) ioctl(s, SIOCG80211, &ireq);
+	}
 	ireq.i_type = IEEE80211_IOC_STA_INFO;
-	ireq.i_data = buf;
-	ireq.i_len = sizeof(buf);
+	ireq.i_data = &u;
+	ireq.i_len = sizeof(u);
 	if (ioctl(s, SIOCG80211, &ireq) < 0)
 		errx(1, "unable to get station information");
 	len = ireq.i_len;
@@ -1005,12 +1022,14 @@
 		, "CAPS"
 		, "FLAG"
 	);
-	cp = buf;
+	cp = (uint8_t *) u.req.info;
 	do {
 		struct ieee80211req_sta_info *si;
 		uint8_t *vp;
 
 		si = (struct ieee80211req_sta_info *) cp;
+		if (si->isi_len < sizeof(*si))
+			break;
 		vp = (u_int8_t *)(si+1);
 		printf("%s %4u %4d %3dM %4d %4d %6d %6d %-4.4s %-4.4s"
 			, ether_ntoa((const struct ether_addr*) si->isi_macaddr)

==== //depot/projects/gdb/share/examples/drivers/make_pseudo_driver.sh#3 (text+ko) ====

@@ -1,42 +1,123 @@
 #!/bin/sh
 # This writes a skeleton driver and puts it into the kernel tree for you
-#arg1 is lowercase "foo"
+#
+# arg1 is lowercase "foo"
+# arg2 path to the kernel sources, "/sys" if omitted
 #
 # Trust me, RUN THIS SCRIPT :)
 #
-# $FreeBSD: src/share/examples/drivers/make_pseudo_driver.sh,v 1.10 2005/03/09 12:29:07 stefanf Exp $
+# $FreeBSD: src/share/examples/drivers/make_pseudo_driver.sh,v 1.12 2006/08/09 21:23:42 rik Exp $
 #
 #-------cut here------------------
-cd /sys/i386/conf
 
 if [ "${1}X" = "X" ]
 then
 	echo "Hey , how about some help here.. give me a device name!"
 	exit 1
 fi
+if [ "X${2}" = "X" ]; then
+	TOP=`cd /sys; pwd -P`
+	echo "Using ${TOP} as the path to the kernel sources!"
+else
+	TOP=${2}
+fi
+
+for i in "" "conf" "i386" "i386/conf" "dev" "sys" "modules"
+do
+	if [ -d ${TOP}/${i} ]
+	then
+		continue
+	fi
+	echo "${TOP}/${i}: no such directory."
+	echo "Please, correct the error and try again."
+	exit 1
+done
 
 UPPER=`echo ${1} |tr "[:lower:]" "[:upper:]"`
-cat >files.${UPPER} <<DONE
-dev/${1}.c      optional ${1} device-driver
+
+if [ -d ${TOP}/modules/${1} ]; then
+	echo "There appears to already be a module called ${1}"
+	echo -n "Should it be overwritten? [Y]"
+	read VAL
+	if [ "-z" "$VAL" ]; then
+		VAL=YES
+	fi
+	case ${VAL} in
+	[yY]*)
+		echo "Cleaning up from prior runs"
+		rm -rf ${TOP}/dev/${1}
+		rm -rf ${TOP}/modules/${1}
+		rm ${TOP}/conf/files.${UPPER}
+		rm ${TOP}/i386/conf/${UPPER}
+		rm ${TOP}/sys/${1}io.h
+		;;
+	*)
+		exit 1
+		;;
+	esac
+fi
+
+echo "The following files will be created:"
+echo ${TOP}/modules/${1}
+echo ${TOP}/conf/files.${UPPER}
+echo ${TOP}/i386/conf/${UPPER}
+echo ${TOP}/dev/${1}
+echo ${TOP}/dev/${1}/${1}.c
+echo ${TOP}/sys/${1}io.h
+echo ${TOP}/modules/${1}
+echo ${TOP}/modules/${1}/Makefile
+
+mkdir ${TOP}/modules/${1}
+
+cat >${TOP}/conf/files.${UPPER} <<DONE
+dev/${1}.c      optional ${1}
 DONE
 
-cat >${UPPER} <<DONE
+cat >${TOP}/i386/conf/${UPPER} <<DONE
 # Configuration file for kernel type: ${UPPER}
-ident	${UPPER}
 # \$FreeBSD\$
-DONE
+
+files		"${TOP}/conf/files.${UPPER}"
+
+include		GENERIC
 
-grep -v GENERIC < GENERIC >>${UPPER}
+ident		${UPPER}
 
-cat >>${UPPER} <<DONE
 # trust me, you'll need this
-options	DDB
-device	${1}
+options		KDB
+options		DDB
+device		${1}
 DONE
 
-cat >../../dev/${1}.c <<DONE
+if [ ! -d ${TOP}/dev/${1} ]; then
+	mkdir -p ${TOP}/dev/${1}
+fi
+
+cat >${TOP}/dev/${1}/${1}.c <<DONE
 /*
- * Copyright ME
+ * Copyright (c) [year] [your name]
+ * 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 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 AUTHOR 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.
  *
  * ${1} driver
  */
@@ -47,15 +128,19 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>		/* SYSINIT stuff */
+#include <sys/uio.h>		/* SYSINIT stuff */
 #include <sys/conf.h>		/* cdevsw stuff */
-#include <sys/devfsext.h>	/* DEVFS definitions */
 #include <sys/malloc.h>		/* malloc region definitions */
 #include <sys/proc.h>
 #include <sys/${1}io.h>		/* ${1} IOCTL definitions */
 
 #include <machine/clock.h>	/* DELAY() */
 
-#include "${1}.h"		/* generated file.. defines N${UPPER} */
+#define N${UPPER}	3	/* defines number of instances */
+
+/* XXX These should be defined in terms of bus-space ops. */
+#define ${UPPER}_INB(port) inb(port)
+#define ${UPPER}_OUTB(port, val) (port, (val))
 
 /* Function prototypes (these should all be static) */
 static  d_open_t	${1}open;
@@ -68,20 +153,15 @@
 
 #define CDEV_MAJOR 20
 static struct cdevsw ${1}_cdevsw = {
-	${1}open,
-	${1}close,
-	${1}read,
-	${1}write,
-	${1}ioctl,
-	nullstop,
-	nullreset,
-	nodevtotty,
-	${1}poll,
-	${1}mmap,
-	NULL,
-	"${1}",
-	NULL,
-	-1
+	.d_version =	D_VERSION,
+	.d_open =	${1}open,
+	.d_close =	${1}close,
+	.d_read =	${1}read,
+	.d_write =	${1}write,
+	.d_ioctl =	${1}ioctl,
+	.d_poll =	${1}poll,
+	.d_mmap =	${1}mmap,
+	.d_name =	"${1}",
 };
 
 /*
@@ -94,9 +174,9 @@
  * One of these per allocated device
  */
 struct ${1}_softc {
-	struct isa_device *dev;
+	u_long	iobase;
 	char	buffer[BUFFERSIZE];
-	static void *devfs_token;
+  	struct cdev *dev;
 };
 
 typedef	struct ${1}_softc *sc_p;
@@ -129,7 +209,7 @@
 #endif 	/* DIAGNOSTIC */
 
 static int
-${1}ioctl (dev_t dev, int cmd, caddr_t data, int flag, struct thread *td)
+${1}ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
 {
 	int unit = UNIT(dev);
 	sc_p scp  = sca[unit];
@@ -139,7 +219,10 @@
 	switch (cmd) {
 	    case DHIOCRESET:
 		/*  whatever resets it */
-		outb(scp->dev->id_iobase, 0xff);
+		(void)scp; /* Delete this line after using scp. */
+#if 0
+		${UPPER}_OUTB(scp->iobase, 0xff);
+#endif
 		break;
 	    default:
 		return ENXIO;
@@ -152,13 +235,14 @@
  * This should get you started
  */
 static int
-${1}open(dev_t dev, int oflags, int devtype, struct thread *td)
+${1}open(struct cdev *dev, int oflags, int devtype, struct thread *td)
 {
 	int unit = UNIT(dev);
 	sc_p scp  = sca[unit];
 
 	CHECKUNIT(ENXIO);
 
+	(void)scp; /* Delete this line after using scp. */
 	/*
 	 * Do processing
 	 */
@@ -166,13 +250,14 @@
 }
 
 static int
-${1}close(dev_t dev, int fflag, int devtype, struct thread *td)
+${1}close(struct cdev *dev, int fflag, int devtype, struct thread *td)
 {
 	int unit = UNIT(dev);
 	sc_p scp  = sca[unit];
 
 	CHECKUNIT_DIAG(ENXIO);
 
+	(void)scp; /* Delete this line after using scp. */
 	/*
 	 * Do processing
 	 */
@@ -180,7 +265,7 @@
 }
 
 static int
-${1}read(dev_t dev, struct uio *uio, int ioflag)
+${1}read(struct cdev *dev, struct uio *uio, int ioflag)
 {
 	int unit = UNIT(dev);
 	sc_p scp  = sca[unit];
@@ -198,7 +283,7 @@
 }
 
 static int
-${1}write(dev_t dev, struct uio *uio, int ioflag)
+${1}write(struct cdev *dev, struct uio *uio, int ioflag)
 {
 	int unit = UNIT(dev);
 	sc_p scp  = sca[unit];
@@ -215,13 +300,14 @@
 }
 
 static int
-${1}mmap(dev_t dev, int offset, int nprot)
+${1}mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
 {
 	int unit = UNIT(dev);
 	sc_p scp  = sca[unit];
 
 	CHECKUNIT_DIAG(-1);
 
+	(void)scp; /* Delete this line after using scp. */
 	/*
 	 * Do processing
 	 */
@@ -236,13 +322,14 @@
 }
 
 static int
-${1}poll(dev_t dev, int which, struct thread *td)
+${1}poll(struct cdev *dev, int which, struct thread *td)
 {
 	int unit = UNIT(dev);
 	sc_p scp  = sca[unit];
 
 	CHECKUNIT_DIAG(ENXIO);
 
+	(void)scp; /* Delete this line after using scp. */
 	/*
 	 * Do processing
 	 */
@@ -256,12 +343,9 @@
 static void
 ${1}_drvinit(void *unused)
 {
-        dev_t dev;
 	int	unit;
 	sc_p scp  = sca[unit];
 
-	dev = makedev(CDEV_MAJOR, 0);
-	cdevsw_add(&dev, &${1}_cdevsw, NULL);
 	for (unit = 0; unit < N${UPPER}; unit++) {
 		/*
 		 * Allocate storage for this instance .
@@ -272,8 +356,8 @@
 			return;
 		}
 		sca[unit] = scp;
-    		scp->devfs_token = devfs_add_devswf(&${1}_cdevsw, unit, DV_CHR,
-	    		UID_ROOT, GID_KMEM, 0640, "${1}%d", unit);
+    		scp->dev = make_dev(&${1}_cdevsw, unit,
+			UID_ROOT, GID_KMEM, 0640, "${1}%d", unit);
 	}
 }
 
@@ -281,7 +365,7 @@
 		${1}_drvinit, NULL)
 DONE
 
-cat >../../sys/${1}io.h <<DONE
+cat >${TOP}/sys/${1}io.h <<DONE
 /*
  * Definitions needed to access the ${1} device (ioctls etc)
  * see mtio.h , ioctl.h as examples
@@ -301,18 +385,59 @@
 #endif
 DONE
 
-config ${UPPER}
-cd ../../compile/${UPPER}
-make depend
-make ${1}.o
-make
-exit
+if [ ! -d ${TOP}/modules/${1} ]; then
+	mkdir -p ${TOP}/modules/${1}
+fi
+
+cat >${TOP}/modules/${1}/Makefile <<DONE
+#	${UPPER} Loadable Kernel Module
+#
+# \$FreeBSD\$
+
+.PATH:  \${.CURDIR}/../../dev/${1}
+KMOD    = ${1}
+SRCS    = ${1}.c
+
+.include <bsd.kmod.mk>
+DONE
+
+echo -n "Do you want to build the '${1}' module? [Y]"
+read VAL
+if [ "-z" "$VAL" ]; then
+	VAL=YES
+fi
+case ${VAL} in
+[yY]*)
+	(cd ${TOP}/modules/${1}; make depend; make )
+	;;
+*)
+#	exit
+	;;
+esac
+
+echo ""
+echo -n "Do you want to build the '${UPPER}' kernel? [Y]"
+read VAL
+if [ "-z" "$VAL" ]; then
+	VAL=YES
+fi
+case ${VAL} in
+[yY]*)
+	(
+	 cd ${TOP}/i386/conf; \
+	 config ${UPPER}; \
+	 cd ${TOP}/i386/compile/${UPPER}; \
+	 make depend; \
+	 make; \
+	)
+	;;
+*)
+#	exit
+	;;
+esac
 
 #--------------end of script---------------
 #
-#you also need to add an entry into the cdevsw[]
-#array in conf.c, but it's too hard to do in a script..
-#
 #edit to your taste..
 #
 #

==== //depot/projects/gdb/share/man/man4/acpi.4#13 (text+ko) ====

@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.59 2006/08/07 07:28:47 yar Exp $
+.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.60 2006/08/10 06:32:16 njl Exp $
 .\"
 .Dd July 29, 2006
 .Dt ACPI 4
@@ -582,11 +582,6 @@
 This manual page was written by
 .An Michael Smith Aq msmith at FreeBSD.org .
 .Sh BUGS
-If the
-.Nm
-driver is loaded as a module when it is already linked as part of the
-kernel, odd things may happen.
-.Pp
 Many BIOS versions have serious bugs that may cause system instability,
 break suspend/resume, or prevent devices from operating properly due to
 IRQ routing problems.

==== //depot/projects/gdb/share/man/man4/ng_pppoe.4#6 (text+ko) ====

@@ -32,7 +32,7 @@
 .\"
 .\" Author: Archie Cobbs <archie at FreeBSD.org>
 .\"
-.\" $FreeBSD: src/share/man/man4/ng_pppoe.4,v 1.35 2006/08/09 09:56:57 glebius Exp $
+.\" $FreeBSD: src/share/man/man4/ng_pppoe.4,v 1.36 2006/08/10 11:07:11 glebius Exp $
 .\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $
 .\"
 .Dd August 9, 2006
@@ -236,8 +236,8 @@
 .Ed
 .It Dv NGM_PPPOE_SETENADDR
 Set the node Ethernet address for outgoing datagrams.
-This message is important when node failed to obtain Ethernet address
-from peer on
+This message is important when a node has failed to obtain an Ethernet
+address from its peer on the
 .Dv ethernet
 hook, or when user wants to override this address with another one.
 .Tn ASCII

==== //depot/projects/gdb/sys/Makefile#6 (text+ko) ====

@@ -1,13 +1,11 @@
-# $FreeBSD: src/sys/Makefile,v 1.37 2006/07/04 14:14:16 maxim Exp $
+# $FreeBSD: src/sys/Makefile,v 1.38 2006/08/10 06:29:43 imp Exp $
 
 .include <bsd.own.mk>
 
 # The boot loader
 .if ${MK_BOOT} != "no"
-.if ${MACHINE_ARCH} != "arm"
 SUBDIR=	boot
 .endif
-.endif
 
 # Directories to include in cscope name file and TAGS.
 CSCOPEDIRS=	coda compat conf contrib crypto ddb dev fs geom gnu i4b isa \

==== //depot/projects/gdb/sys/arm/at91/at91_st.c#2 (text) ====

@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/at91/at91_st.c,v 1.4 2006/07/14 22:31:12 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/at91/at91_st.c,v 1.5 2006/08/09 20:58:55 imp Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -34,6 +34,7 @@
 #include <sys/resource.h>
 #include <sys/rman.h>
 #include <sys/timetc.h>
+#include <sys/watchdog.h>
 
 #include <machine/bus.h>
 #include <machine/cpu.h>
@@ -48,7 +49,8 @@
 static struct at91st_softc {
 	bus_space_tag_t		sc_st;
 	bus_space_handle_t	sc_sh;
-	device_t		dev;
+	device_t		sc_dev;
+	eventhandler_tag	sc_wet;	/* watchdog event handler tag */
 } *timer_softc;
 
 #define RD4(off) \
@@ -56,6 +58,8 @@
 #define WR4(off, val) \
 	bus_space_write_4(timer_softc->sc_st, timer_softc->sc_sh, (off), (val))
 
+static void at91st_watchdog(void *, u_int, int *);
+
 static inline int
 st_crtr(void)
 {
@@ -97,7 +101,7 @@
 
 	timer_softc = device_get_softc(dev);
 	timer_softc->sc_st = sc->sc_st;
-	timer_softc->dev = dev;
+	timer_softc->sc_dev = dev;
 	if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_ST_BASE,
 	    AT91RM92_ST_SIZE, &timer_softc->sc_sh) != 0)
 		panic("couldn't subregion timer registers");
@@ -108,6 +112,13 @@
 	WR4(ST_RTMR, 1);
 	/* Disable all interrupts */
 	WR4(ST_IDR, 0xffffffff);
+	/* disable watchdog timer */
+	WR4(ST_WDMR, 0);
+
+	timer_softc->sc_wet = EVENTHANDLER_REGISTER(watchdog_list,
+	  at91st_watchdog, dev, 0);
+	device_printf(dev,
+	  "watchdog registered, timeout intervall max. 64 sec\n");
 	return (0);
 }
 
@@ -140,7 +151,34 @@
 #endif
 }
 
+/*
+ * t below is in a weird unit.  The watchdog is set to 2^t
+ * nanoseconds.  Since our watchdog timer can't really do that too
+ * well, we approximate it by assuming that the timeout interval for
+ * the lsb is 2^22 ns, which is 4.194ms.  This is an overestimation of
+ * the actual time (3.906ms), but close enough for watchdogging.
+ * These approximations, though a violation of the spec, improve the
+ * performance of the application which typically specifies things as
+ * WD_TO_32SEC.  In that last case, we'd wait 32s before the wdog
+ * reset.  The spec says we should wait closer to 34s, but given how
+ * it is likely to be used, and the extremely coarse nature time
+ * interval, I think this is the best solution.
+ */
 static void
+at91st_watchdog(void *argp, u_int cmd, int *error)
+{
+	uint32_t wdog;
+	int t;
+
+	wdog = 0;
+	t = cmd & WD_INTERVAL;
+	if (cmd != 0 && t >= 22 && t <= 37)
+		wdog = (1 << (t - 22)) | ST_WDMR_RSTEN;
+	WR4(ST_WDMR, wdog);
+	WR4(ST_CR, ST_CR_WDRST);
+}
+
+static void
 clock_intr(void *arg)
 {
 	struct trapframe *fp = arg;
@@ -161,7 +199,7 @@
 	struct resource *irq;
 	int rid = 0;
 	void *ih;
-	device_t dev = timer_softc->dev;
+	device_t dev = timer_softc->sc_dev;
 
 	if (32768 % hz) {
 		printf("Cannot get %d Hz clock; using 128Hz\n", hz);
@@ -229,4 +267,3 @@
 cpu_stopprofclock(void)
 {
 }
-

==== //depot/projects/gdb/sys/boot/Makefile#6 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/Makefile,v 1.29 2006/06/18 17:44:40 imp Exp $
+# $FreeBSD: src/sys/boot/Makefile,v 1.30 2006/08/10 06:29:43 imp Exp $
 
 .include <bsd.own.mk>
 
@@ -17,9 +17,7 @@
 SUBDIR+=		ofw
 .endif
 
-.if ${MACHINE_ARCH} != "arm"
 # Pick the machine-dependent subdir based on the target architecture.
 SUBDIR+=		${MACHINE:S/amd64/i386/}
-.endif
 
 .include <bsd.subdir.mk>

==== //depot/projects/gdb/sys/dev/acpica/acpi_video.c#8 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_video.c,v 1.12 2005/12/20 22:42:16 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_video.c,v 1.13 2006/08/10 13:18:02 bruno Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -109,16 +109,22 @@
 #define DOS_BRIGHTNESS_BY_BIOS	(1 << 2)
 
 /* _DOD and subdev's _ADR */
-#define DOD_DEVID_MASK		0xffff
+#define DOD_DEVID_MASK		0x0f00
+#define DOD_DEVID_MASK_FULL	0xffff
+#define DOD_DEVID_MASK_DISPIDX	0x000f
+#define DOD_DEVID_MASK_DISPPORT	0x00f0
 #define DOD_DEVID_MONITOR	0x0100
-#define DOD_DEVID_PANEL		0x0110
+#define DOD_DEVID_LCD		0x0110
 #define DOD_DEVID_TV		0x0200
+#define DOD_DEVID_EXT		0x0300
+#define DOD_DEVID_INTDFP	0x0400
 #define DOD_BIOS		(1 << 16)
 #define DOD_NONVGA		(1 << 17)
 #define DOD_HEAD_ID_SHIFT	18
 #define DOD_HEAD_ID_BITS	3
 #define DOD_HEAD_ID_MASK \
 		(((1 << DOD_HEAD_ID_BITS) - 1) << DOD_HEAD_ID_SHIFT)
+#define DOD_DEVID_SCHEME_STD	(1 << 31)
 
 /* _BCL related constants */
 #define BCL_FULLPOWER		0
@@ -160,8 +166,8 @@
 
 static struct sysctl_ctx_list	acpi_video_sysctl_ctx;
 static struct sysctl_oid	*acpi_video_sysctl_tree;
-static struct acpi_video_output_queue lcd_units, crt_units, tv_units,
-    other_units;
+static struct acpi_video_output_queue crt_units, tv_units,
+    ext_units, lcd_units, other_units;
 
 ACPI_SERIAL_DECL(video, "ACPI video");
 MALLOC_DEFINE(M_ACPIVIDEO, "acpivideo", "ACPI video extension");
@@ -175,9 +181,10 @@
 	switch (evt) {
 	case MOD_LOAD:
 		sysctl_ctx_init(&acpi_video_sysctl_ctx);
-		STAILQ_INIT(&lcd_units);
 		STAILQ_INIT(&crt_units);
 		STAILQ_INIT(&tv_units);
+		STAILQ_INIT(&ext_units);
+		STAILQ_INIT(&lcd_units);
 		STAILQ_INIT(&other_units);
 		break;
 	case MOD_UNLOAD:
@@ -404,27 +411,44 @@
 {
 	struct acpi_video_output *vn, *vo, *vp;
 	int n, x;
+	int display_index;
+	int display_port;
 	char name[8], env[32];
 	const char *type, *desc;
 	struct acpi_video_output_queue *voqh;
 
 	ACPI_SERIAL_ASSERT(video);
+	display_index = adr & DOD_DEVID_MASK_DISPIDX;
+	display_port = (adr & DOD_DEVID_MASK_DISPPORT) >> 4;
+
 	switch (adr & DOD_DEVID_MASK) {
 	case DOD_DEVID_MONITOR:
-		desc = "CRT monitor";
-		type = "crt";
-		voqh = &crt_units;
+		if ((adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD) {
+			/* DOD_DEVID_LCD is a common, backward compatible ID */
+			desc = "Internal/Integrated Digital Flat Panel";
+			type = "lcd";
+			voqh = &lcd_units;
+		} else {
+			desc = "VGA CRT or VESA Compatible Analog Monitor";
+			type = "crt";
+			voqh = &crt_units;
+		}
 		break;
-	case DOD_DEVID_PANEL:
-		desc = "LCD panel";
-		type = "lcd";
-		voqh = &lcd_units;
-		break;
 	case DOD_DEVID_TV:
-		desc = "TV";
+		desc = "TV/HDTV or Analog-Video Monitor";
 		type = "tv";
 		voqh = &tv_units;
 		break;
+	case DOD_DEVID_EXT:
+		desc = "External Digital Monitor";
+		type = "ext";
+		voqh = &ext_units;
+		break;
+	case DOD_DEVID_INTDFP:
+		desc = "Internal/Integrated Digital Flat Panel";
+		type = "lcd";
+		voqh = &lcd_units;
+		break;
 	default:
 		desc = "unknown output";
 		type = "out";
@@ -508,13 +532,16 @@
 		printf("%s: softc allocation failed\n", type);
 
 	if (bootverbose) {
-		printf("found %s(%x)", desc, adr & DOD_DEVID_MASK);
+		printf("found %s(%x)", desc, adr & DOD_DEVID_MASK_FULL);
+		printf(", idx#%x", adr & DOD_DEVID_MASK_DISPIDX);
+		printf(", port#%x", (adr & DOD_DEVID_MASK_DISPPORT) >> 4);
 		if (adr & DOD_BIOS)
 			printf(", detectable by BIOS");
 		if (adr & DOD_NONVGA)
-			printf(" (not a VGA output)");
+			printf(" (Non-VGA output device whose power "
+			    "is related to the VGA device)");
 		printf(", head #%d\n",
-		   (adr & DOD_HEAD_ID_MASK) >> DOD_HEAD_ID_SHIFT);
+			(adr & DOD_HEAD_ID_MASK) >> DOD_HEAD_ID_SHIFT);
 	}
 	return (vo);
 }
@@ -557,12 +584,15 @@
 	case DOD_DEVID_MONITOR:
 		voqh = &crt_units;
 		break;
-	case DOD_DEVID_PANEL:
-		voqh = &lcd_units;
-		break;
 	case DOD_DEVID_TV:
 		voqh = &tv_units;
 		break;
+	case DOD_DEVID_EXT:
+		voqh = &ext_units;
+		break;
+	case DOD_DEVID_INTDFP:
+		voqh = &lcd_units;
+		break;
 	default:
 		voqh = &other_units;
 	}
@@ -751,7 +781,7 @@
 
 	for (i = 0; i < argset->dod_pkg->Package.Count; i++) {
 		if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 &&
-		    (val & DOD_DEVID_MASK) == adr) {
+		    (val & DOD_DEVID_MASK_FULL) == adr) {
 			argset->callback(handle, val, argset->context);
 			argset->count++;
 		}

==== //depot/projects/gdb/sys/dev/em/if_em.c#11 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.125 2006/08/04 07:56:33 yar Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.126 2006/08/09 20:10:35 pdeuskar Exp $*/
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_device_polling.h"
@@ -2255,9 +2255,12 @@
 			    0, NULL);
 		ifmedia_add(&adapter->media, IFM_ETHER | IFM_100_TX | IFM_FDX,
 			    0, NULL);
-		ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_T | IFM_FDX,
-			    0, NULL);
-		ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_T, 0, NULL);
+		if (adapter->hw.phy_type != em_phy_ife) {
+			ifmedia_add(&adapter->media, 
+				IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL);
+			ifmedia_add(&adapter->media, 
+				IFM_ETHER | IFM_1000_T, 0, NULL);
+		}
 	}
 	ifmedia_add(&adapter->media, IFM_ETHER | IFM_AUTO, 0, NULL);
 	ifmedia_set(&adapter->media, IFM_ETHER | IFM_AUTO);

==== //depot/projects/gdb/sys/geom/geom_gpt.c#7 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/geom_gpt.c,v 1.40 2006/08/08 21:33:26 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/geom_gpt.c,v 1.41 2006/08/09 20:53:01 marcel Exp $");
 
 #include <sys/param.h>
 #include <sys/bio.h>
@@ -360,16 +360,17 @@
 {
 	char *buf;
 	uint8_t *typ;
-	int i, pmbr, vmbr;
+	uint64_t mediasize;
+	int i, pmbr, parts;
+	uint32_t dp_start, dp_size;
 	uint16_t magic;
-	uint32_t dp_start, dp_size;

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list