svn commit: r221810 - in projects/largeSMP: . contrib/netcat contrib/top lib lib/libprocstat lib/libutil share/mk sys/amd64/amd64 sys/amd64/conf sys/dev/ahci sys/dev/ata sys/dev/ata/chipsets sys/de...

Attilio Rao attilio at FreeBSD.org
Thu May 12 14:01:41 UTC 2011


Author: attilio
Date: Thu May 12 14:01:40 2011
New Revision: 221810
URL: http://svn.freebsd.org/changeset/base/221810

Log:
  MFC

Added:
  projects/largeSMP/lib/libprocstat/
     - copied from r221809, head/lib/libprocstat/
  projects/largeSMP/lib/libutil/kinfo_getallproc.3
     - copied unchanged from r221809, head/lib/libutil/kinfo_getallproc.3
  projects/largeSMP/lib/libutil/kinfo_getallproc.c
     - copied unchanged from r221809, head/lib/libutil/kinfo_getallproc.c
  projects/largeSMP/lib/libutil/kinfo_getproc.3
     - copied unchanged from r221809, head/lib/libutil/kinfo_getproc.3
  projects/largeSMP/lib/libutil/kinfo_getproc.c
     - copied unchanged from r221809, head/lib/libutil/kinfo_getproc.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285an.h
     - copied unchanged from r221809, head/sys/dev/ath/ath_hal/ar9002/ar9285an.h
  projects/largeSMP/usr.bin/fstat/functions.h
     - copied unchanged from r221809, head/usr.bin/fstat/functions.h
  projects/largeSMP/usr.bin/fstat/fuser.1
     - copied unchanged from r221809, head/usr.bin/fstat/fuser.1
  projects/largeSMP/usr.bin/fstat/fuser.c
     - copied unchanged from r221809, head/usr.bin/fstat/fuser.c
  projects/largeSMP/usr.bin/fstat/main.c
     - copied unchanged from r221809, head/usr.bin/fstat/main.c
Deleted:
  projects/largeSMP/usr.bin/fstat/cd9660.c
  projects/largeSMP/usr.bin/fstat/fstat.h
  projects/largeSMP/usr.bin/fstat/msdosfs.c
  projects/largeSMP/usr.bin/fstat/zfs/
  projects/largeSMP/usr.bin/fstat/zfs.c
Modified:
  projects/largeSMP/Makefile.inc1
  projects/largeSMP/contrib/netcat/atomicio.c
  projects/largeSMP/contrib/netcat/nc.1
  projects/largeSMP/contrib/netcat/netcat.c
  projects/largeSMP/contrib/netcat/socks.c
  projects/largeSMP/lib/Makefile
  projects/largeSMP/lib/libutil/Makefile
  projects/largeSMP/lib/libutil/libutil.h
  projects/largeSMP/sys/amd64/amd64/machdep.c
  projects/largeSMP/sys/amd64/conf/GENERIC
  projects/largeSMP/sys/dev/ahci/ahci.c
  projects/largeSMP/sys/dev/ata/ata-pci.h
  projects/largeSMP/sys/dev/ata/chipsets/ata-intel.c
  projects/largeSMP/sys/dev/ath/ath_hal/ah_debug.h
  projects/largeSMP/sys/dev/ath/ath_hal/ah_internal.h
  projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_power.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
  projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_cal.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c
  projects/largeSMP/sys/dev/ichsmb/ichsmb_pci.c
  projects/largeSMP/sys/dev/ichwd/ichwd.c
  projects/largeSMP/sys/dev/ichwd/ichwd.h
  projects/largeSMP/sys/dev/mii/ip1000phy.c
  projects/largeSMP/sys/dev/sound/pci/hda/hdac.c
  projects/largeSMP/sys/dev/sound/pcm/dsp.c
  projects/largeSMP/sys/geom/geom_kern.c
  projects/largeSMP/sys/geom/part/g_part.c
  projects/largeSMP/sys/i386/conf/GENERIC
  projects/largeSMP/sys/kern/kern_descrip.c
  projects/largeSMP/sys/kern/kern_proc.c
  projects/largeSMP/sys/mips/conf/ADM5120
  projects/largeSMP/sys/mips/conf/ALCHEMY
  projects/largeSMP/sys/mips/conf/AR71XX
  projects/largeSMP/sys/mips/conf/AR91XX_BASE
  projects/largeSMP/sys/mips/conf/IDT
  projects/largeSMP/sys/mips/conf/MALTA
  projects/largeSMP/sys/mips/conf/MALTA64
  projects/largeSMP/sys/mips/conf/OCTEON1
  projects/largeSMP/sys/mips/conf/PB92
  projects/largeSMP/sys/mips/conf/QEMU
  projects/largeSMP/sys/mips/conf/RT305X
  projects/largeSMP/sys/mips/conf/SENTRY5
  projects/largeSMP/sys/mips/conf/XLR
  projects/largeSMP/sys/mips/conf/XLR64
  projects/largeSMP/sys/mips/conf/XLRN32
  projects/largeSMP/sys/mips/conf/std.SWARM
  projects/largeSMP/sys/net80211/ieee80211_alq.c
  projects/largeSMP/sys/sparc64/include/asmacros.h
  projects/largeSMP/sys/sys/user.h
  projects/largeSMP/usr.bin/fstat/Makefile
  projects/largeSMP/usr.bin/fstat/fstat.c
  projects/largeSMP/usr.bin/procstat/Makefile
  projects/largeSMP/usr.bin/procstat/procstat.c
  projects/largeSMP/usr.bin/procstat/procstat.h
  projects/largeSMP/usr.bin/procstat/procstat_args.c
  projects/largeSMP/usr.bin/procstat/procstat_basic.c
  projects/largeSMP/usr.bin/procstat/procstat_bin.c
  projects/largeSMP/usr.bin/procstat/procstat_cred.c
  projects/largeSMP/usr.bin/procstat/procstat_files.c
  projects/largeSMP/usr.bin/procstat/procstat_kstack.c
  projects/largeSMP/usr.bin/procstat/procstat_sigs.c
  projects/largeSMP/usr.bin/procstat/procstat_threads.c
  projects/largeSMP/usr.bin/procstat/procstat_vm.c
  projects/largeSMP/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  projects/largeSMP/   (props changed)
  projects/largeSMP/cddl/contrib/opensolaris/   (props changed)
  projects/largeSMP/contrib/bind9/   (props changed)
  projects/largeSMP/contrib/binutils/   (props changed)
  projects/largeSMP/contrib/bzip2/   (props changed)
  projects/largeSMP/contrib/dialog/   (props changed)
  projects/largeSMP/contrib/ee/   (props changed)
  projects/largeSMP/contrib/expat/   (props changed)
  projects/largeSMP/contrib/file/   (props changed)
  projects/largeSMP/contrib/gcc/   (props changed)
  projects/largeSMP/contrib/gdb/   (props changed)
  projects/largeSMP/contrib/gdtoa/   (props changed)
  projects/largeSMP/contrib/gnu-sort/   (props changed)
  projects/largeSMP/contrib/groff/   (props changed)
  projects/largeSMP/contrib/less/   (props changed)
  projects/largeSMP/contrib/libpcap/   (props changed)
  projects/largeSMP/contrib/libstdc++/   (props changed)
  projects/largeSMP/contrib/llvm/   (props changed)
  projects/largeSMP/contrib/llvm/tools/clang/   (props changed)
  projects/largeSMP/contrib/ncurses/   (props changed)
  projects/largeSMP/contrib/netcat/   (props changed)
  projects/largeSMP/contrib/ntp/   (props changed)
  projects/largeSMP/contrib/one-true-awk/   (props changed)
  projects/largeSMP/contrib/openbsm/   (props changed)
  projects/largeSMP/contrib/openpam/   (props changed)
  projects/largeSMP/contrib/pf/   (props changed)
  projects/largeSMP/contrib/sendmail/   (props changed)
  projects/largeSMP/contrib/tcpdump/   (props changed)
  projects/largeSMP/contrib/tcsh/   (props changed)
  projects/largeSMP/contrib/top/   (props changed)
  projects/largeSMP/contrib/top/install-sh   (props changed)
  projects/largeSMP/contrib/tzcode/stdtime/   (props changed)
  projects/largeSMP/contrib/tzcode/zic/   (props changed)
  projects/largeSMP/contrib/tzdata/   (props changed)
  projects/largeSMP/contrib/wpa/   (props changed)
  projects/largeSMP/contrib/xz/   (props changed)
  projects/largeSMP/crypto/openssh/   (props changed)
  projects/largeSMP/crypto/openssl/   (props changed)
  projects/largeSMP/gnu/lib/   (props changed)
  projects/largeSMP/gnu/usr.bin/binutils/   (props changed)
  projects/largeSMP/gnu/usr.bin/cc/cc_tools/   (props changed)
  projects/largeSMP/gnu/usr.bin/gdb/   (props changed)
  projects/largeSMP/lib/libc/   (props changed)
  projects/largeSMP/lib/libc/stdtime/   (props changed)
  projects/largeSMP/lib/libutil/   (props changed)
  projects/largeSMP/lib/libz/   (props changed)
  projects/largeSMP/sbin/   (props changed)
  projects/largeSMP/sbin/ipfw/   (props changed)
  projects/largeSMP/share/mk/bsd.arch.inc.mk   (props changed)
  projects/largeSMP/share/zoneinfo/   (props changed)
  projects/largeSMP/sys/   (props changed)
  projects/largeSMP/sys/amd64/include/xen/   (props changed)
  projects/largeSMP/sys/boot/   (props changed)
  projects/largeSMP/sys/boot/i386/efi/   (props changed)
  projects/largeSMP/sys/boot/ia64/efi/   (props changed)
  projects/largeSMP/sys/boot/ia64/ski/   (props changed)
  projects/largeSMP/sys/boot/powerpc/boot1.chrp/   (props changed)
  projects/largeSMP/sys/boot/powerpc/ofw/   (props changed)
  projects/largeSMP/sys/cddl/contrib/opensolaris/   (props changed)
  projects/largeSMP/sys/conf/   (props changed)
  projects/largeSMP/sys/contrib/dev/acpica/   (props changed)
  projects/largeSMP/sys/contrib/octeon-sdk/   (props changed)
  projects/largeSMP/sys/contrib/pf/   (props changed)
  projects/largeSMP/sys/contrib/x86emu/   (props changed)
  projects/largeSMP/usr.bin/calendar/   (props changed)
  projects/largeSMP/usr.bin/csup/   (props changed)
  projects/largeSMP/usr.bin/procstat/   (props changed)
  projects/largeSMP/usr.sbin/ndiscvt/   (props changed)
  projects/largeSMP/usr.sbin/zic/   (props changed)

Modified: projects/largeSMP/Makefile.inc1
==============================================================================
--- projects/largeSMP/Makefile.inc1	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/Makefile.inc1	Thu May 12 14:01:40 2011	(r221810)
@@ -246,9 +246,10 @@ TMAKE=		MAKEOBJDIRPREFIX=${OBJTREE} \
 		${BMAKEENV} ${MAKE} -f Makefile.inc1 \
 		TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
 		DESTDIR= \
+		BOOTSTRAPPING=${OSRELDATE} \
 		SSP_CFLAGS= \
-		BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \
-		-DNO_WARNS -DNO_CTF
+		-DNO_LINT \
+		-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF
 
 # cross-tools stage
 XMAKE=		TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
@@ -829,7 +830,7 @@ buildkernel:
 	@echo "--------------------------------------------------------------"
 	cd ${KRNLOBJDIR}/${_kernel}; \
 	    MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \
-	    ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS \
+	    ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \
 	    -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile
 # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case.
 .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules)
@@ -1024,7 +1025,9 @@ _clang_tblgen= \
 	usr.bin/clang/tblgen
 .endif
 
-.if ${MK_CDDL} != "no"
+.if ${MK_CDDL} != "no" && \
+    ${BOOTSTRAPPING} < 800038 && \
+    !(${BOOTSTRAPPING} >= 700112 && ${BOOTSTRAPPING} < 799999)
 _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
     lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
 .endif
@@ -1033,6 +1036,9 @@ _dtrace_tools= cddl/usr.bin/sgsmsg cddl/
 _dtc= gnu/usr.bin/dtc
 .endif
 
+#	Please document (add comment) why something is in 'bootstrap-tools'.
+#	Try to bound the building of the bootstrap-tool to just the
+#	FreeBSD versions that need the tool built at this stage of the build.
 bootstrap-tools:
 .for _tool in \
     ${_clang_tblgen} \

Modified: projects/largeSMP/contrib/netcat/atomicio.c
==============================================================================
--- projects/largeSMP/contrib/netcat/atomicio.c	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/contrib/netcat/atomicio.c	Thu May 12 14:01:40 2011	(r221810)
@@ -1,4 +1,4 @@
-/* $OpenBSD: atomicio.c,v 1.9 2007/09/07 14:50:44 tobias Exp $ */
+/* $OpenBSD: atomicio.c,v 1.10 2011/01/08 00:47:19 jeremy Exp $ */
 /*
  * Copyright (c) 2006 Damien Miller. All rights reserved.
  * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved.
@@ -53,7 +53,7 @@ atomicio(ssize_t (*f) (int, void *, size
 		case -1:
 			if (errno == EINTR)
 				continue;
-			if (errno == EAGAIN) {
+			if ((errno == EAGAIN) || (errno == ENOBUFS)) {
 				(void)poll(&pfd, 1, -1);
 				continue;
 			}

Modified: projects/largeSMP/contrib/netcat/nc.1
==============================================================================
--- projects/largeSMP/contrib/netcat/nc.1	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/contrib/netcat/nc.1	Thu May 12 14:01:40 2011	(r221810)
@@ -1,4 +1,4 @@
-.\"     $OpenBSD: nc.1,v 1.55 2010/07/25 07:51:39 guenther Exp $
+.\"     $OpenBSD: nc.1,v 1.57 2011/01/09 22:16:46 jeremy Exp $
 .\"
 .\" Copyright (c) 1996 David Sacerdote
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 25, 2010
+.Dd January 8, 2011
 .Dt NC 1
 .Os
 .Sh NAME
@@ -44,7 +44,7 @@
 .Op Fl O Ar length
 .Op Fl P Ar proxy_username
 .Op Fl p Ar source_port
-.Op Fl s Ar source_ip_address
+.Op Fl s Ar source
 .Op Fl T Ar ToS
 .Op Fl V Ar rtable
 .Op Fl w Ar timeout
@@ -53,7 +53,7 @@
 .Fl x Ar proxy_address Ns Oo : Ns
 .Ar port Oc
 .Xc Oc
-.Op Ar hostname
+.Op Ar destination
 .Op Ar port
 .Ek
 .Sh DESCRIPTION
@@ -61,8 +61,10 @@ The
 .Nm
 (or
 .Nm netcat )
-utility is used for just about anything under the sun involving TCP
-or UDP.
+utility is used for just about anything under the sun involving TCP,
+UDP, or
+.Ux Ns -domain
+sockets.
 It can open TCP connections, send UDP packets, listen on arbitrary
 TCP and UDP ports, do port scanning, and deal with both IPv4 and
 IPv6.
@@ -175,8 +177,12 @@ instead of sequentially within a range o
 assigns them.
 .It Fl S
 Enables the RFC 2385 TCP MD5 signature option.
-.It Fl s Ar source_ip_address
+.It Fl s Ar source
 Specifies the IP of the interface which is used to send the packets.
+For
+.Ux Ns -domain
+datagram sockets, specifies the local temporary socket file
+to create and use so that datagrams can be received.
 It is an error to use this option in conjunction with the
 .Fl l
 option.
@@ -201,6 +207,16 @@ Specifies to use
 sockets.
 .It Fl u
 Use UDP instead of the default option of TCP.
+For
+.Ux Ns -domain
+sockets, use a datagram socket instead of a stream socket.
+If a
+.Ux Ns -domain
+socket is used, a temporary receiving socket is created in
+.Pa /tmp
+unless the
+.Fl s
+flag is given.
 .It Fl V Ar rtable
 Set the routing table
 .Pq Dq FIB
@@ -244,7 +260,7 @@ If the protocol is not specified, SOCKS 
 Requests that
 .Nm
 should connect to
-.Ar hostname
+.Ar destination
 using a proxy at
 .Ar proxy_address
 and
@@ -262,16 +278,22 @@ It is an error to use this option in con
 option.
 .El
 .Pp
-.Ar hostname
+.Ar destination
 can be a numerical IP address or a symbolic hostname
 (unless the
 .Fl n
 option is given).
-In general, a hostname must be specified,
+In general, a destination must be specified,
 unless the
 .Fl l
 option is given
 (in which case the local host is used).
+For
+.Ux Ns -domain
+sockets, a destination is required and is the socket path to connect to
+(or listen on if the
+.Fl l
+option is given).
 .Pp
 .Ar port
 can be a single integer or a range of ports.
@@ -280,8 +302,7 @@ In general,
 a destination port must be specified,
 unless the
 .Fl U
-option is given
-(in which case a socket must be specified).
+option is given.
 .Sh CLIENT/SERVER MODEL
 It is quite simple to build a very basic client/server model using
 .Nm .
@@ -424,7 +445,7 @@ outgoing traffic only.
 .Pp
 Create and listen on a
 .Ux Ns -domain
-socket:
+stream socket:
 .Pp
 .Dl $ nc -lU /var/tmp/dsocket
 .Pp

Modified: projects/largeSMP/contrib/netcat/netcat.c
==============================================================================
--- projects/largeSMP/contrib/netcat/netcat.c	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/contrib/netcat/netcat.c	Thu May 12 14:01:40 2011	(r221810)
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.98 2010/07/03 04:44:51 guenther Exp $ */
+/* $OpenBSD: netcat.c,v 1.100 2011/01/09 22:16:46 jeremy Exp $ */
 /*
  * Copyright (c) 2001 Eric Jackson <ericj at monkey.org>
  *
@@ -70,6 +70,7 @@
 
 #define PORT_MAX	65535
 #define PORT_MAX_LEN	6
+#define UNIX_DG_TMP_SOCKET_SIZE	19
 
 /* Command Line Options */
 int	dflag;					/* detached, no stdin */
@@ -98,6 +99,7 @@ u_int	rtableid;
 int timeout = -1;
 int family = AF_UNSPEC;
 char *portlist[PORT_MAX+1];
+char *unix_dg_tmp_socket;
 
 void	atelnet(int, unsigned char *, unsigned int);
 void	build_ports(char *);
@@ -108,6 +110,7 @@ int	remote_connect(const char *, const c
 int	socks_connect(const char *, const char *, struct addrinfo,
 	    const char *, const char *, struct addrinfo, int, const char *);
 int	udptest(int);
+int	unix_bind(char *);
 int	unix_connect(char *);
 int	unix_listen(char *);
 void	set_common_sockopts(int);
@@ -134,6 +137,7 @@ main(int argc, char *argv[])
 	char *proxy;
 	const char *errstr, *proxyhost = "", *proxyport = NULL;
 	struct addrinfo proxyhints;
+	char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE];
 	struct option longopts[] = {
 		{ "no-tcpopt",	no_argument,	&FreeBSD_Oflag,	1 },
 		{ NULL,		0,		NULL,		0 }
@@ -288,8 +292,6 @@ main(int argc, char *argv[])
 
 	/* Cruft to make sure options are clean, and used properly. */
 	if (argv[0] && !argv[1] && family == AF_UNIX) {
-		if (uflag)
-			errx(1, "cannot use -u and -U");
 		host = argv[0];
 		uport = NULL;
 	} else if (argv[0] && !argv[1]) {
@@ -312,6 +314,19 @@ main(int argc, char *argv[])
 	if (!lflag && kflag)
 		errx(1, "must use -l with -k");
 
+	/* Get name of temporary socket for unix datagram client */
+	if ((family == AF_UNIX) && uflag && !lflag) {
+		if (sflag) {
+			unix_dg_tmp_socket = sflag;
+		} else {
+			strlcpy(unix_dg_tmp_socket_buf, "/tmp/nc.XXXXXXXXXX",
+				UNIX_DG_TMP_SOCKET_SIZE);
+			if (mktemp(unix_dg_tmp_socket_buf) == NULL)
+				err(1, "mktemp");
+			unix_dg_tmp_socket = unix_dg_tmp_socket_buf;
+		}
+	}
+
 	/* Initialize addrinfo structure. */
 	if (family != AF_UNIX) {
 		memset(&hints, 0, sizeof(struct addrinfo));
@@ -354,8 +369,12 @@ main(int argc, char *argv[])
 		int connfd;
 		ret = 0;
 
-		if (family == AF_UNIX)
-			s = unix_listen(host);
+		if (family == AF_UNIX) {
+			if (uflag)
+				s = unix_bind(host);
+			else
+				s = unix_listen(host);
+		}
 
 		/* Allow only one connection at a time, but stay alive. */
 		for (;;) {
@@ -384,17 +403,21 @@ main(int argc, char *argv[])
 				if (rv < 0)
 					err(1, "connect");
 
-				connfd = s;
+				readwrite(s);
 			} else {
 				len = sizeof(cliaddr);
 				connfd = accept(s, (struct sockaddr *)&cliaddr,
 				    &len);
+				readwrite(connfd);
+				close(connfd);
 			}
 
-			readwrite(connfd);
-			close(connfd);
 			if (family != AF_UNIX)
 				close(s);
+			else if (uflag) {
+				if (connect(s, NULL, 0) < 0)
+					err(1, "connect");
+			}
 
 			if (!kflag)
 				break;
@@ -408,6 +431,8 @@ main(int argc, char *argv[])
 		} else
 			ret = 1;
 
+		if (uflag)
+			unlink(unix_dg_tmp_socket);
 		exit(ret);
 
 	} else {
@@ -468,18 +493,19 @@ main(int argc, char *argv[])
 }
 
 /*
- * unix_connect()
- * Returns a socket connected to a local unix socket. Returns -1 on failure.
+ * unix_bind()
+ * Returns a unix socket bound to the given path
  */
 int
-unix_connect(char *path)
+unix_bind(char *path)
 {
 	struct sockaddr_un sun;
 	int s;
 
-	if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
+	/* Create unix domain socket. */
+	if ((s = socket(AF_UNIX, uflag ? SOCK_DGRAM : SOCK_STREAM,
+	     0)) < 0)
 		return (-1);
-	(void)fcntl(s, F_SETFD, 1);
 
 	memset(&sun, 0, sizeof(struct sockaddr_un));
 	sun.sun_family = AF_UNIX;
@@ -490,27 +516,32 @@ unix_connect(char *path)
 		errno = ENAMETOOLONG;
 		return (-1);
 	}
-	if (connect(s, (struct sockaddr *)&sun, SUN_LEN(&sun)) < 0) {
+
+	if (bind(s, (struct sockaddr *)&sun, SUN_LEN(&sun)) < 0) {
 		close(s);
 		return (-1);
 	}
 	return (s);
-
 }
 
 /*
- * unix_listen()
- * Create a unix domain socket, and listen on it.
+ * unix_connect()
+ * Returns a socket connected to a local unix socket. Returns -1 on failure.
  */
 int
-unix_listen(char *path)
+unix_connect(char *path)
 {
 	struct sockaddr_un sun;
 	int s;
 
-	/* Create unix domain socket. */
-	if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
-		return (-1);
+	if (uflag) {
+		if ((s = unix_bind(unix_dg_tmp_socket)) < 0)
+			return (-1);
+	} else {
+		if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
+			return (-1);
+	}
+	(void)fcntl(s, F_SETFD, 1);
 
 	memset(&sun, 0, sizeof(struct sockaddr_un));
 	sun.sun_family = AF_UNIX;
@@ -521,11 +552,24 @@ unix_listen(char *path)
 		errno = ENAMETOOLONG;
 		return (-1);
 	}
-
-	if (bind(s, (struct sockaddr *)&sun, SUN_LEN(&sun)) < 0) {
+	if (connect(s, (struct sockaddr *)&sun, SUN_LEN(&sun)) < 0) {
 		close(s);
 		return (-1);
 	}
+	return (s);
+
+}
+
+/*
+ * unix_listen()
+ * Create a unix domain socket, and listen on it.
+ */
+int
+unix_listen(char *path)
+{
+	int s;
+	if ((s = unix_bind(path)) < 0)
+		return (-1);
 
 	if (listen(s, 5) < 0) {
 		close(s);
@@ -989,9 +1033,9 @@ usage(int ret)
 #else
 	    "usage: nc [-46DdhklnrStUuvz] [-I length] [-i interval] [-O length]\n"
 #endif
-	    "\t  [-P proxy_username] [-p source_port] [-s source_ip_address] [-T ToS]\n"
+	    "\t  [-P proxy_username] [-p source_port] [-s source] [-T ToS]\n"
 	    "\t  [-V rtable] [-w timeout] [-X proxy_protocol]\n"
-	    "\t  [-x proxy_address[:port]] [hostname] [port]\n");
+	    "\t  [-x proxy_address[:port]] [destination] [port]\n");
 	if (ret)
 		exit(1);
 }

Modified: projects/largeSMP/contrib/netcat/socks.c
==============================================================================
--- projects/largeSMP/contrib/netcat/socks.c	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/contrib/netcat/socks.c	Thu May 12 14:01:40 2011	(r221810)
@@ -1,4 +1,4 @@
-/*	$OpenBSD: socks.c,v 1.18 2010/04/20 07:26:35 nicm Exp $	*/
+/*	$OpenBSD: socks.c,v 1.19 2011/02/12 15:54:18 okan Exp $	*/
 
 /*
  * Copyright (c) 1999 Niklas Hallqvist.  All rights reserved.
@@ -222,11 +222,25 @@ socks_connect(const char *host, const ch
 		if (cnt != wlen)
 			err(1, "write failed (%zu/%zu)", cnt, wlen);
 
-		cnt = atomicio(read, proxyfd, buf, 10);
-		if (cnt != 10)
-			err(1, "read failed (%zu/10)", cnt);
+		cnt = atomicio(read, proxyfd, buf, 4);
+		if (cnt != 4)
+			err(1, "read failed (%zu/4)", cnt);
 		if (buf[1] != 0)
 			errx(1, "connection failed, SOCKS error %d", buf[1]);
+		switch (buf[3]) {
+		case SOCKS_IPV4:
+			cnt = atomicio(read, proxyfd, buf + 4, 6);
+			if (cnt != 6)
+				err(1, "read failed (%zd/6)", cnt);
+			break;
+		case SOCKS_IPV6:
+			cnt = atomicio(read, proxyfd, buf + 4, 18);
+			if (cnt != 18)
+				err(1, "read failed (%zd/18)", cnt);
+			break;
+		default:
+			errx(1, "connection failed, unsupported address type");
+		}
 	} else if (socksv == 4) {
 		/* This will exit on lookup failure */
 		decode_addrport(host, port, (struct sockaddr *)&addr,

Modified: projects/largeSMP/lib/Makefile
==============================================================================
--- projects/largeSMP/lib/Makefile	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/lib/Makefile	Thu May 12 14:01:40 2011	(r221810)
@@ -92,6 +92,7 @@ SUBDIR=	${SUBDIR_ORDERED} \
 	${_libpkg} \
 	${_libpmc} \
 	${_libproc} \
+	libprocstat \
 	librt \
 	${_librtld_db} \
 	${_libsdp} \

Modified: projects/largeSMP/lib/libutil/Makefile
==============================================================================
--- projects/largeSMP/lib/libutil/Makefile	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/lib/libutil/Makefile	Thu May 12 14:01:40 2011	(r221810)
@@ -9,7 +9,8 @@ LIB=	util
 SHLIB_MAJOR= 9
 
 SRCS=	_secure_path.c auth.c expand_number.c flopen.c fparseln.c gr_util.c \
-	hexdump.c humanize_number.c kinfo_getfile.c kinfo_getvmmap.c kld.c \
+	hexdump.c humanize_number.c kinfo_getfile.c kinfo_getfile.c \
+	kinfo_getallproc.c kinfo_getproc.c kinfo_getvmmap.c kld.c \
 	login_auth.c login_cap.c \
 	login_class.c login_crypt.c login_ok.c login_times.c login_tty.c \
 	pidfile.c property.c pty.c pw_util.c quotafile.c realhostname.c \
@@ -29,7 +30,8 @@ MAN+=	kld.3 login_auth.3 login_tty.3 pty
 	_secure_path.3 uucplock.3 property.3 auth.3 realhostname.3 \
 	realhostname_sa.3 trimdomain.3 fparseln.3 humanize_number.3 \
 	pidfile.3 flopen.3 expand_number.3 hexdump.3 \
-	kinfo_getfile.3 kinfo_getvmmap.3 quotafile.3
+	kinfo_getfile.3 kinfo_getallproc.3 kinfo_getproc.3 \
+	kinfo_getvmmap.3 quotafile.3
 MAN+=	login.conf.5 auth.conf.5
 MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3
 MLINKS+= property.3 properties_read.3  property.3 properties_free.3

Copied: projects/largeSMP/lib/libutil/kinfo_getallproc.3 (from r221809, head/lib/libutil/kinfo_getallproc.3)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/largeSMP/lib/libutil/kinfo_getallproc.3	Thu May 12 14:01:40 2011	(r221810, copy of r221809, head/lib/libutil/kinfo_getallproc.3)
@@ -0,0 +1,74 @@
+.\"
+.\" Copyright (c) 2009 Ulf Lilleengen
+.\" 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 9, 2009
+.Os
+.Dt KINFO_GETALLPROC 3
+.Sh NAME
+.Nm kinfo_getallproc
+.Nd function for getting process information of all processes from kernel
+.Sh LIBRARY
+.Lb libutil
+.Sh SYNOPSIS
+.In sys/types.h
+.In libutil.h
+.Ft struct kinfo_proc *
+.Fn kinfo_getallproc "int *cntp"
+.Sh DESCRIPTION
+This function is used for obtaining process information of all processes from
+the kernel.
+.Pp
+The
+.Ar cntp
+field is a pointer containing the number of process structures returned.
+This function is a wrapper around
+.Xr sysctl 3
+with the
+.Dv KERN_PROC_PROC
+mib.
+While the kernel returns a packed structure, this function expands the
+data into a fixed record format.
+.Sh RETURN VALUES
+On success the
+.Fn kinfo_getallproc
+function returns a pointer to
+.Ar cntp
+.Vt struct kinfo_proc
+structures as defined by
+.In sys/user.h .
+The pointer was obtained by an internal call to
+.Xr malloc 3
+and must be freed by the caller with a call to
+.Xr free 3 .
+On failure the
+.Fn kinfo_getallproc
+function returns
+.Dv NULL .
+.Sh SEE ALSO
+.Xr free 3 ,
+.Xr malloc 3 ,
+.Xr sysctl 3

Copied: projects/largeSMP/lib/libutil/kinfo_getallproc.c (from r221809, head/lib/libutil/kinfo_getallproc.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/largeSMP/lib/libutil/kinfo_getallproc.c	Thu May 12 14:01:40 2011	(r221810, copy of r221809, head/lib/libutil/kinfo_getallproc.c)
@@ -0,0 +1,98 @@
+/*-
+ * Copyright (c) 2007 Robert N. M. Watson
+ * Copyright (c) 2009 Ulf Lilleengen
+ * 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/user.h>
+#include <sys/sysctl.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "libutil.h"
+
+
+/*
+ * Sort processes first by pid and then tid.
+ */
+static int
+kinfo_proc_compare(const void *a, const void *b)
+{
+	int i;
+
+	i = ((const struct kinfo_proc *)a)->ki_pid -
+	    ((const struct kinfo_proc *)b)->ki_pid;
+	if (i != 0)
+		return (i);
+	i = ((const struct kinfo_proc *)a)->ki_tid -
+	    ((const struct kinfo_proc *)b)->ki_tid;
+	return (i);
+}
+
+static void
+kinfo_proc_sort(struct kinfo_proc *kipp, int count)
+{
+
+	qsort(kipp, count, sizeof(*kipp), kinfo_proc_compare);
+}
+
+struct kinfo_proc *
+kinfo_getallproc(int *cntp)
+{
+	struct kinfo_proc *kipp;
+	size_t len;
+	int mib[3];
+
+	mib[0] = CTL_KERN;
+	mib[1] = KERN_PROC;
+	mib[2] = KERN_PROC_PROC;
+
+	len = 0;
+	if (sysctl(mib, 3, NULL, &len, NULL, 0) < 0)
+		return (NULL);
+
+	kipp = malloc(len);
+	if (kipp == NULL)
+		return (NULL);
+
+	if (sysctl(mib, 3, kipp, &len, NULL, 0) < 0)
+		goto bad;
+	if (len % sizeof(*kipp) != 0)
+		goto bad;
+	if (kipp->ki_structsize != sizeof(*kipp))
+		goto bad;
+	*cntp = len / sizeof(*kipp);
+	kinfo_proc_sort(kipp, len / sizeof(*kipp));
+	return (kipp);
+bad:
+	*cntp = 0;
+	free(kipp);
+	return (NULL);
+}

Copied: projects/largeSMP/lib/libutil/kinfo_getproc.3 (from r221809, head/lib/libutil/kinfo_getproc.3)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/largeSMP/lib/libutil/kinfo_getproc.3	Thu May 12 14:01:40 2011	(r221810, copy of r221809, head/lib/libutil/kinfo_getproc.3)
@@ -0,0 +1,73 @@
+.\"
+.\" Copyright (c) 2009 Ulf Lilleengen
+.\" 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 9, 2009
+.Os
+.Dt KINFO_GETPROC 3
+.Sh NAME
+.Nm kinfo_getproc
+.Nd function for getting process information from kernel
+.Sh LIBRARY
+.Lb libutil
+.Sh SYNOPSIS
+.In sys/types.h
+.In libutil.h
+.Ft struct kinfo_proc *
+.Fn kinfo_getproc "pid_t pid" "int *cntp"
+.Sh DESCRIPTION
+This function is used for obtaining process information from the kernel.
+.Pp
+The
+.Ar pid
+field contains the process identifier.
+This should be the a process that you have privilige to access.
+This function is a wrapper around
+.Xr sysctl 3
+with the
+.Dv KERN_PROC_PID
+mib.
+While the kernel returns a packed structure, this function expands the
+data into a fixed record format.
+.Sh RETURN VALUES
+On success the
+.Fn kinfo_getproc
+function returns a pointer to a
+.Vt struct kinfo_proc
+structure as defined by
+.In sys/user.h .
+The pointer was obtained by an internal call to
+.Xr malloc 3
+and must be freed by the caller with a call to
+.Xr free 3 .
+On failure the
+.Fn kinfo_getproc
+function returns
+.Dv NULL .
+.Sh SEE ALSO
+.Xr free 3 ,
+.Xr malloc 3 ,
+.Xr sysctl 3

Copied: projects/largeSMP/lib/libutil/kinfo_getproc.c (from r221809, head/lib/libutil/kinfo_getproc.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/largeSMP/lib/libutil/kinfo_getproc.c	Thu May 12 14:01:40 2011	(r221810, copy of r221809, head/lib/libutil/kinfo_getproc.c)
@@ -0,0 +1,71 @@
+/*-
+ * Copyright (c) 2009 Ulf Lilleengen
+ * 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/user.h>
+#include <sys/sysctl.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "libutil.h"
+
+struct kinfo_proc *
+kinfo_getproc(pid_t pid)
+{
+	struct kinfo_proc *kipp;
+	int mib[4];
+	size_t len;
+
+	len = 0;
+	mib[0] = CTL_KERN;
+	mib[1] = KERN_PROC;
+	mib[2] = KERN_PROC_PID;
+	mib[3] = pid;
+	if (sysctl(mib, 4, NULL, &len, NULL, 0) < 0)
+		return (NULL);
+
+	kipp = malloc(len);
+	if (kipp == NULL)
+		return (NULL);
+
+	if (sysctl(mib, 4, kipp, &len, NULL, 0) < 0)
+		goto bad;
+	if (len != sizeof(*kipp))
+		goto bad;
+	if (kipp->ki_structsize != sizeof(*kipp))
+		goto bad;
+	if (kipp->ki_pid != pid)
+		goto bad;
+	return (kipp);
+bad:
+	free(kipp);
+	return (NULL);
+}

Modified: projects/largeSMP/lib/libutil/libutil.h
==============================================================================
--- projects/largeSMP/lib/libutil/libutil.h	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/lib/libutil/libutil.h	Thu May 12 14:01:40 2011	(r221810)
@@ -88,6 +88,7 @@ struct termios;
 struct winsize;
 struct in_addr;
 struct kinfo_file;
+struct kinfo_proc;
 struct kinfo_vmentry;
 
 __BEGIN_DECLS
@@ -126,6 +127,10 @@ struct kinfo_file *
 	kinfo_getfile(pid_t _pid, int *_cntp);
 struct kinfo_vmentry *
 	kinfo_getvmmap(pid_t _pid, int *_cntp);
+struct kinfo_proc *
+	kinfo_getallproc(int *_cntp);
+struct kinfo_proc *
+	kinfo_getproc(pid_t _pid);
 
 #ifdef _STDIO_H_	/* avoid adding new includes */
 char   *fparseln(FILE *, size_t *, size_t *, const char[3], int);

Modified: projects/largeSMP/sys/amd64/amd64/machdep.c
==============================================================================
--- projects/largeSMP/sys/amd64/amd64/machdep.c	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/sys/amd64/amd64/machdep.c	Thu May 12 14:01:40 2011	(r221810)
@@ -1298,9 +1298,6 @@ add_smap_entry(struct bios_smap *smap, v
  * available physical memory in the system, then test this memory and
  * build the phys_avail array describing the actually-available memory.
  *
- * If we cannot accurately determine the physical memory map, then use
- * value from the 0xE801 call, and failing that, the RTC.
- *
  * Total memory size may be set by the kernel environment variable
  * hw.physmem or the compile-time define MAXMEM.
  *

Modified: projects/largeSMP/sys/amd64/conf/GENERIC
==============================================================================
--- projects/largeSMP/sys/amd64/conf/GENERIC	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/sys/amd64/conf/GENERIC	Thu May 12 14:01:40 2011	(r221810)
@@ -165,6 +165,7 @@ device		splash		# Splash screen and scre
 
 # syscons is the default console driver, resembling an SCO console
 device		sc
+options 	SC_PIXEL_MODE	# add support for the raster text mode
 
 device		agp		# support several AGP chipsets
 

Modified: projects/largeSMP/sys/dev/ahci/ahci.c
==============================================================================
--- projects/largeSMP/sys/dev/ahci/ahci.c	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/sys/dev/ahci/ahci.c	Thu May 12 14:01:40 2011	(r221810)
@@ -164,10 +164,18 @@ static struct {
 	{0x1c038086, 0x00, "Intel Cougar Point",	0},
 	{0x1c048086, 0x00, "Intel Cougar Point",	0},
 	{0x1c058086, 0x00, "Intel Cougar Point",	0},
-	{0x23238086, 0x00, "Intel DH89xxCC",	0},
 	{0x1d028086, 0x00, "Intel Patsburg",	0},
 	{0x1d048086, 0x00, "Intel Patsburg",	0},
 	{0x1d068086, 0x00, "Intel Patsburg",	0},
+	{0x1e028086, 0x00, "Intel Panther Point",	0},
+	{0x1e038086, 0x00, "Intel Panther Point",	0},
+	{0x1e048086, 0x00, "Intel Panther Point",	0},
+	{0x1e058086, 0x00, "Intel Panther Point",	0},
+	{0x1e068086, 0x00, "Intel Panther Point",	0},
+	{0x1e078086, 0x00, "Intel Panther Point",	0},
+	{0x1e0e8086, 0x00, "Intel Panther Point",	0},
+	{0x1e0f8086, 0x00, "Intel Panther Point",	0},
+	{0x23238086, 0x00, "Intel DH89xxCC",	0},
 	{0x2361197b, 0x00, "JMicron JMB361",	AHCI_Q_NOFORCE},
 	{0x2363197b, 0x00, "JMicron JMB363",	AHCI_Q_NOFORCE},
 	{0x2365197b, 0x00, "JMicron JMB365",	AHCI_Q_NOFORCE},

Modified: projects/largeSMP/sys/dev/ata/ata-pci.h
==============================================================================
--- projects/largeSMP/sys/dev/ata/ata-pci.h	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/sys/dev/ata/ata-pci.h	Thu May 12 14:01:40 2011	(r221810)
@@ -233,6 +233,19 @@ struct ata_pci_controller {
 #define ATA_PBG_R2		0x1d068086
 #define ATA_PBG_S2		0x1d088086
 
+#define ATA_PPT_S1		0x1e008086
+#define ATA_PPT_S2		0x1e018086
+#define ATA_PPT_AH1		0x1e028086
+#define ATA_PPT_AH2		0x1e038086
+#define ATA_PPT_R1		0x1e048086
+#define ATA_PPT_R2		0x1e058086
+#define ATA_PPT_R3		0x1e068086
+#define ATA_PPT_R4		0x1e078086
+#define ATA_PPT_S3		0x1e088086
+#define ATA_PPT_S4		0x1e098086
+#define ATA_PPT_R5		0x1e0e8086
+#define ATA_PPT_R6		0x1e0f8086
+
 #define ATA_I31244              0x32008086
 #define ATA_ISCH                0x811a8086
 #define ATA_DH89XXCC            0x23238086

Modified: projects/largeSMP/sys/dev/ata/chipsets/ata-intel.c
==============================================================================
--- projects/largeSMP/sys/dev/ata/chipsets/ata-intel.c	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/sys/dev/ata/chipsets/ata-intel.c	Thu May 12 14:01:40 2011	(r221810)
@@ -181,6 +181,18 @@ ata_intel_probe(device_t dev)
      { ATA_PBG_R1,       0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" },
      { ATA_PBG_R2,       0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" },
      { ATA_PBG_S2,       0, INTEL_6CH2, 0, ATA_SA300, "Patsburg" },
+     { ATA_PPT_S1,       0, INTEL_6CH,  0, ATA_SA300, "Panther Point" },
+     { ATA_PPT_S2,       0, INTEL_6CH,  0, ATA_SA300, "Panther Point" },
+     { ATA_PPT_AH1,      0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" },
+     { ATA_PPT_AH2,      0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" },
+     { ATA_PPT_R1,       0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" },
+     { ATA_PPT_R2,       0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" },
+     { ATA_PPT_R3,       0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" },
+     { ATA_PPT_R4,       0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" },
+     { ATA_PPT_S3,       0, INTEL_6CH2, 0, ATA_SA300, "Panther Point" },
+     { ATA_PPT_S4,       0, INTEL_6CH2, 0, ATA_SA300, "Panther Point" },
+     { ATA_PPT_R5,       0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" },
+     { ATA_PPT_R6,       0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" },
      { ATA_I31244,       0,          0, 2, ATA_SA150, "31244" },
      { ATA_ISCH,         0,          0, 1, ATA_UDMA5, "SCH" },
      { ATA_DH89XXCC,     0, INTEL_AHCI, 0, ATA_SA300, "DH89xxCC" },

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ah_debug.h
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ah_debug.h	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ah_debug.h	Thu May 12 14:01:40 2011	(r221810)
@@ -48,6 +48,7 @@ enum {
 	HAL_DEBUG_DFS		= 0x00200000,	/* DFS debugging */
 	HAL_DEBUG_HANG		= 0x00400000,	/* BB/MAC hang debugging */
 
+	HAL_DEBUG_UNMASKABLE	= 0xf0000000,	/* always printed */
 	HAL_DEBUG_ANY		= 0xffffffff
 };
 #endif /* _ATH_AH_DEBUG_H_ */

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ah_internal.h
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ah_internal.h	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ah_internal.h	Thu May 12 14:01:40 2011	(r221810)
@@ -517,7 +517,8 @@ extern	void ath_hal_free(void *);
 extern	int ath_hal_debug;
 #define	HALDEBUG(_ah, __m, ...) \
 	do {							\
-		if (ath_hal_debug & (__m)) {			\
+		if ((__m) == HAL_DEBUG_UNMASKABLE ||		\
+		    (ath_hal_debug & (__m))) {			\
 			DO_HALDEBUG((_ah), (__m), __VA_ARGS__);	\
 		}						\
 	} while(0);

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Thu May 12 14:01:40 2011	(r221810)
@@ -420,6 +420,12 @@ ar5416Detach(struct ath_hal *ah)
 	HALASSERT(ah != AH_NULL);
 	HALASSERT(ah->ah_magic == AR5416_MAGIC);
 
+	/* Make sure that chip is awake before writing to it */
+	if (! ar5416SetPowerMode(ah, HAL_PM_AWAKE, AH_TRUE))
+		HALDEBUG(ah, HAL_DEBUG_UNMASKABLE,
+		    "%s: failed to wake up chip\n",
+		    __func__);
+
 	ar5416AniDetach(ah);
 	ar5212RfDetach(ah);
 	ah->ah_disable(ah);

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c	Thu May 12 12:18:01 2011	(r221809)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c	Thu May 12 14:01:40 2011	(r221810)
@@ -241,7 +241,6 @@ ar5416InitCal(struct ath_hal *ah, const 
 {
 	struct ar5416PerCal *cal = &AH5416(ah)->ah_cal;
 	HAL_CHANNEL_INTERNAL *ichan;
-	int i;
 
 	ichan = ath_hal_checkchannel(ah, chan);
 	HALASSERT(ichan != AH_NULL);
@@ -263,33 +262,14 @@ ar5416InitCal(struct ath_hal *ah, const 
 	 * higher than normal value if DC offset and noise floor cal are
 	 * triggered at the same time.
 	 */
-	/* XXX this actually kicks off a NF calibration -adrian */
 	OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF);
-	/*
-	 * This sometimes takes a -lot- longer than it should.
-	 * Just give it a bit more time.
-	 */
-	for (i = 0; i < MAX_CAL_CHECK; i++) {
-		if (ar5212WaitNFCalComplete(ah, 10000))
-			break;
 
-		HALDEBUG(ah, HAL_DEBUG_ANY, "%s: initial NF calibration did "
-		    "not complete in time; noisy environment (pass %d)?\n", __func__, i);
-	}
-	
 	/*
-	 * Although periodic and NF calibrations shouldn't run concurrently,
-	 * this was causing the radio to not be usable on the active
-	 * channel if the channel was busy.
-	 *
-	 * Instead, now simply print a warning and continue. That way if users
-	 * report "weird crap", they should get this warning.
+	 * This may take a while to run; make sure subsequent
+	 * calibration routines check that this has completed
+	 * before reading the value and triggering a subsequent
+	 * calibration.
 	 */
-	if (i >= MAX_CAL_CHECK) {

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-projects mailing list