svn commit: r215830 - in projects/binutils-2.17: bin/sh contrib/top etc/defaults etc/rc.d share/man/man4 share/man/man5 share/man/man9 share/misc share/mk sys/amd64/acpica sys/amd64/amd64 sys/amd64...

Dimitry Andric dim at FreeBSD.org
Thu Nov 25 18:36:45 UTC 2010


Author: dim
Date: Thu Nov 25 18:36:44 2010
New Revision: 215830
URL: http://svn.freebsd.org/changeset/base/215830

Log:
  Sync: merge r215709 through r215824 from ^/head.

Added:
  projects/binutils-2.17/sys/netinet/sctp_dtrace_declare.h
     - copied unchanged from r215824, head/sys/netinet/sctp_dtrace_declare.h
  projects/binutils-2.17/sys/netinet/sctp_dtrace_define.h
     - copied unchanged from r215824, head/sys/netinet/sctp_dtrace_define.h
Deleted:
  projects/binutils-2.17/usr.sbin/kernbb/
Modified:
  projects/binutils-2.17/bin/sh/arith_lex.l
  projects/binutils-2.17/bin/sh/cd.c
  projects/binutils-2.17/bin/sh/eval.c
  projects/binutils-2.17/bin/sh/expand.c
  projects/binutils-2.17/bin/sh/histedit.c
  projects/binutils-2.17/bin/sh/memalloc.c
  projects/binutils-2.17/bin/sh/memalloc.h
  projects/binutils-2.17/bin/sh/miscbltin.c
  projects/binutils-2.17/bin/sh/parser.c
  projects/binutils-2.17/etc/defaults/rc.conf
  projects/binutils-2.17/etc/rc.d/gptboot
  projects/binutils-2.17/etc/rc.d/mountcritlocal
  projects/binutils-2.17/share/man/man4/bge.4
  projects/binutils-2.17/share/man/man4/msk.4
  projects/binutils-2.17/share/man/man4/nge.4
  projects/binutils-2.17/share/man/man4/sk.4
  projects/binutils-2.17/share/man/man4/stge.4
  projects/binutils-2.17/share/man/man4/vge.4
  projects/binutils-2.17/share/man/man5/rc.conf.5
  projects/binutils-2.17/share/man/man9/vrele.9
  projects/binutils-2.17/share/misc/bsd-family-tree
  projects/binutils-2.17/sys/amd64/acpica/acpi_switch.S
  projects/binutils-2.17/sys/amd64/acpica/acpi_wakecode.S
  projects/binutils-2.17/sys/amd64/acpica/acpi_wakeup.c
  projects/binutils-2.17/sys/amd64/amd64/cpu_switch.S
  projects/binutils-2.17/sys/amd64/amd64/mp_machdep.c
  projects/binutils-2.17/sys/amd64/amd64/pmap.c
  projects/binutils-2.17/sys/amd64/include/specialreg.h
  projects/binutils-2.17/sys/boot/common/load_elf.c
  projects/binutils-2.17/sys/compat/freebsd32/freebsd32_misc.c
  projects/binutils-2.17/sys/compat/ia32/ia32_signal.h
  projects/binutils-2.17/sys/compat/ia32/ia32_util.h
  projects/binutils-2.17/sys/compat/ndis/ntoskrnl_var.h
  projects/binutils-2.17/sys/compat/ndis/subr_ndis.c
  projects/binutils-2.17/sys/compat/ndis/subr_ntoskrnl.c
  projects/binutils-2.17/sys/dev/ahci/ahci.c
  projects/binutils-2.17/sys/dev/cas/if_cas.c
  projects/binutils-2.17/sys/dev/e1000/e1000_api.c
  projects/binutils-2.17/sys/dev/e1000/e1000_hw.h
  projects/binutils-2.17/sys/dev/e1000/if_em.c
  projects/binutils-2.17/sys/dev/e1000/if_igb.c
  projects/binutils-2.17/sys/dev/e1000/if_igb.h
  projects/binutils-2.17/sys/dev/fxp/if_fxp.c
  projects/binutils-2.17/sys/dev/fxp/if_fxpvar.h
  projects/binutils-2.17/sys/dev/gem/if_gem.c
  projects/binutils-2.17/sys/dev/mii/bmtphy.c
  projects/binutils-2.17/sys/dev/mii/gentbi.c
  projects/binutils-2.17/sys/dev/mii/inphy.c
  projects/binutils-2.17/sys/dev/mii/mii.c
  projects/binutils-2.17/sys/dev/mii/miidevs
  projects/binutils-2.17/sys/dev/mii/nsgphy.c
  projects/binutils-2.17/sys/dev/mii/nsphyter.c
  projects/binutils-2.17/sys/dev/mii/ukphy.c
  projects/binutils-2.17/sys/dev/pci/pci.c
  projects/binutils-2.17/sys/dev/pci/pci_pci.c
  projects/binutils-2.17/sys/dev/usb/controller/usb_controller.c
  projects/binutils-2.17/sys/dev/usb/serial/u3g.c
  projects/binutils-2.17/sys/dev/usb/usb_bus.h
  projects/binutils-2.17/sys/dev/usb/usb_pf.c
  projects/binutils-2.17/sys/dev/usb/usb_pf.h
  projects/binutils-2.17/sys/dev/usb/usbdevs
  projects/binutils-2.17/sys/i386/i386/pmap.c
  projects/binutils-2.17/sys/i386/include/specialreg.h
  projects/binutils-2.17/sys/i386/include/xen/hypercall.h
  projects/binutils-2.17/sys/i386/isa/npx.c
  projects/binutils-2.17/sys/i386/pci/pci_bus.c
  projects/binutils-2.17/sys/i386/xen/pmap.c
  projects/binutils-2.17/sys/i386/xen/xen_machdep.c
  projects/binutils-2.17/sys/kern/kern_tc.c
  projects/binutils-2.17/sys/kern/subr_taskqueue.c
  projects/binutils-2.17/sys/kern/vfs_mount.c
  projects/binutils-2.17/sys/kern/vfs_subr.c
  projects/binutils-2.17/sys/net/bpf_buffer.c
  projects/binutils-2.17/sys/net/if_vlan.c
  projects/binutils-2.17/sys/netgraph/ng_pipe.c
  projects/binutils-2.17/sys/netinet/ip_carp.c
  projects/binutils-2.17/sys/netinet/sctp_cc_functions.c
  projects/binutils-2.17/sys/netinet/sctp_pcb.c
  projects/binutils-2.17/sys/netinet/sctp_uio.h
  projects/binutils-2.17/sys/sys/elf_common.h
  projects/binutils-2.17/sys/sys/sysctl.h
  projects/binutils-2.17/sys/vm/vm_object.c
  projects/binutils-2.17/sys/x86/x86/local_apic.c
  projects/binutils-2.17/tools/tools/sysbuild/sysbuild.sh
  projects/binutils-2.17/usr.bin/locate/locate/locate.h
  projects/binutils-2.17/usr.bin/netstat/inet.c
  projects/binutils-2.17/usr.sbin/iostat/iostat.8
  projects/binutils-2.17/usr.sbin/usbdump/usbdump.c
Directory Properties:
  projects/binutils-2.17/   (props changed)
  projects/binutils-2.17/cddl/contrib/opensolaris/   (props changed)
  projects/binutils-2.17/contrib/bind9/   (props changed)
  projects/binutils-2.17/contrib/binutils/   (props changed)
  projects/binutils-2.17/contrib/bzip2/   (props changed)
  projects/binutils-2.17/contrib/ee/   (props changed)
  projects/binutils-2.17/contrib/expat/   (props changed)
  projects/binutils-2.17/contrib/file/   (props changed)
  projects/binutils-2.17/contrib/gdb/   (props changed)
  projects/binutils-2.17/contrib/gdtoa/   (props changed)
  projects/binutils-2.17/contrib/gnu-sort/   (props changed)
  projects/binutils-2.17/contrib/groff/   (props changed)
  projects/binutils-2.17/contrib/less/   (props changed)
  projects/binutils-2.17/contrib/libpcap/   (props changed)
  projects/binutils-2.17/contrib/llvm/   (props changed)
  projects/binutils-2.17/contrib/llvm/tools/clang/   (props changed)
  projects/binutils-2.17/contrib/ncurses/   (props changed)
  projects/binutils-2.17/contrib/netcat/   (props changed)
  projects/binutils-2.17/contrib/ntp/   (props changed)
  projects/binutils-2.17/contrib/one-true-awk/   (props changed)
  projects/binutils-2.17/contrib/openbsm/   (props changed)
  projects/binutils-2.17/contrib/openpam/   (props changed)
  projects/binutils-2.17/contrib/pf/   (props changed)
  projects/binutils-2.17/contrib/sendmail/   (props changed)
  projects/binutils-2.17/contrib/tcpdump/   (props changed)
  projects/binutils-2.17/contrib/tcsh/   (props changed)
  projects/binutils-2.17/contrib/top/   (props changed)
  projects/binutils-2.17/contrib/top/install-sh   (props changed)
  projects/binutils-2.17/contrib/tzcode/stdtime/   (props changed)
  projects/binutils-2.17/contrib/tzcode/zic/   (props changed)
  projects/binutils-2.17/contrib/tzdata/   (props changed)
  projects/binutils-2.17/contrib/wpa/   (props changed)
  projects/binutils-2.17/contrib/xz/   (props changed)
  projects/binutils-2.17/crypto/openssh/   (props changed)
  projects/binutils-2.17/crypto/openssl/   (props changed)
  projects/binutils-2.17/lib/libc/   (props changed)
  projects/binutils-2.17/lib/libc/stdtime/   (props changed)
  projects/binutils-2.17/lib/libutil/   (props changed)
  projects/binutils-2.17/lib/libz/   (props changed)
  projects/binutils-2.17/sbin/   (props changed)
  projects/binutils-2.17/sbin/ipfw/   (props changed)
  projects/binutils-2.17/share/mk/bsd.arch.inc.mk   (props changed)
  projects/binutils-2.17/share/zoneinfo/   (props changed)
  projects/binutils-2.17/sys/   (props changed)
  projects/binutils-2.17/sys/amd64/include/xen/   (props changed)
  projects/binutils-2.17/sys/cddl/contrib/opensolaris/   (props changed)
  projects/binutils-2.17/sys/contrib/dev/acpica/   (props changed)
  projects/binutils-2.17/sys/contrib/pf/   (props changed)
  projects/binutils-2.17/sys/contrib/x86emu/   (props changed)
  projects/binutils-2.17/usr.bin/calendar/   (props changed)
  projects/binutils-2.17/usr.bin/csup/   (props changed)
  projects/binutils-2.17/usr.bin/procstat/   (props changed)
  projects/binutils-2.17/usr.sbin/zic/   (props changed)

Modified: projects/binutils-2.17/bin/sh/arith_lex.l
==============================================================================
--- projects/binutils-2.17/bin/sh/arith_lex.l	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/bin/sh/arith_lex.l	Thu Nov 25 18:36:44 2010	(r215830)
@@ -53,7 +53,15 @@ int yylex(void);
 
 #undef YY_INPUT
 #define YY_INPUT(buf,result,max) \
-	result = (*buf = *arith_buf++) ? 1 : YY_NULL;
+	do { \
+		result = strnlen(arith_buf, max); \
+		if (result == 0) \
+			result = YY_NULL; \
+		else { \
+			memcpy(buf, arith_buf, result); \
+			arith_buf += result; \
+		} \
+	} while (0);
 #define YY_NO_UNPUT
 #define YY_NO_INPUT
 %}

Modified: projects/binutils-2.17/bin/sh/cd.c
==============================================================================
--- projects/binutils-2.17/bin/sh/cd.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/bin/sh/cd.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -192,8 +192,7 @@ cdlogical(char *dest)
 			STPUTC('/', p);
 		first = 0;
 		component = q;
-		while (*q)
-			STPUTC(*q++, p);
+		STPUTS(q, p);
 		if (equal(component, ".."))
 			continue;
 		STACKSTRNUL(p);
@@ -219,10 +218,13 @@ cdphysical(char *dest)
 	char *p;
 
 	INTOFF;
-	if (chdir(dest) < 0 || (p = findcwd(NULL)) == NULL) {
+	if (chdir(dest) < 0) {
 		INTON;
 		return (-1);
 	}
+	p = findcwd(NULL);
+	if (p == NULL)
+		out2fmt_flush("cd: warning: failed to get name of current directory\n");
 	updatepwd(p);
 	INTON;
 	return (0);
@@ -270,10 +272,8 @@ findcwd(char *dir)
 	scopy(dir, cdcomppath);
 	STARTSTACKSTR(new);
 	if (*dir != '/') {
-		p = curdir;
-		while (*p)
-			STPUTC(*p++, new);
-		if (p[-1] == '/')
+		STPUTS(curdir, new);
+		if (STTOPC(new) == '/')
 			STUNPUTC(new);
 	}
 	while ((p = getcomponent()) != NULL) {
@@ -281,8 +281,7 @@ findcwd(char *dir)
 			while (new > stackblock() && (STUNPUTC(new), *new) != '/');
 		} else if (*p != '\0' && ! equal(p, ".")) {
 			STPUTC('/', new);
-			while (*p)
-				STPUTC(*p++, new);
+			STPUTS(p, new);
 		}
 	}
 	if (new == stackblock())
@@ -304,7 +303,7 @@ updatepwd(char *dir)
 	if (prevdir)
 		ckfree(prevdir);
 	prevdir = curdir;
-	curdir = savestr(dir);
+	curdir = dir ? savestr(dir) : NULL;
 	setvar("PWD", curdir, VEXPORT);
 	setvar("OLDPWD", prevdir, VEXPORT);
 }

Modified: projects/binutils-2.17/bin/sh/eval.c
==============================================================================
--- projects/binutils-2.17/bin/sh/eval.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/bin/sh/eval.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -135,8 +135,7 @@ evalcmd(int argc, char **argv)
                         STARTSTACKSTR(concat);
                         ap = argv + 2;
                         for (;;) {
-                                while (*p)
-                                        STPUTC(*p++, concat);
+                                STPUTS(p, concat);
                                 if ((p = *ap++) == NULL)
                                         break;
                                 STPUTC(' ', concat);

Modified: projects/binutils-2.17/bin/sh/expand.c
==============================================================================
--- projects/binutils-2.17/bin/sh/expand.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/bin/sh/expand.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -225,6 +225,7 @@ argstr(char *p, int flag)
 	if (*p == '~' && (flag & (EXP_TILDE | EXP_VARTILDE)))
 		p = exptilde(p, flag);
 	for (;;) {
+		CHECKSTRSPACE(2, expdest);
 		switch (c = *p++) {
 		case '\0':
 		case CTLENDVAR:
@@ -235,16 +236,16 @@ argstr(char *p, int flag)
 			if (p[0] == CTLVAR && p[2] == '@' && p[3] == '=')
 				break;
 			if ((flag & EXP_FULL) != 0)
-				STPUTC(c, expdest);
+				USTPUTC(c, expdest);
 			break;
 		case CTLQUOTEEND:
 			lit_quoted = 0;
 			break;
 		case CTLESC:
 			if (quotes)
-				STPUTC(c, expdest);
+				USTPUTC(c, expdest);
 			c = *p++;
-			STPUTC(c, expdest);
+			USTPUTC(c, expdest);
 			if (split_lit && !lit_quoted)
 				recordregion(expdest - stackblock() -
 				    (quotes ? 2 : 1),
@@ -267,7 +268,7 @@ argstr(char *p, int flag)
 			 * sort of a hack - expand tildes in variable
 			 * assignments (after the first '=' and after ':'s).
 			 */
-			STPUTC(c, expdest);
+			USTPUTC(c, expdest);
 			if (split_lit && !lit_quoted)
 				recordregion(expdest - stackblock() - 1,
 				    expdest - stackblock(), 0);
@@ -279,7 +280,7 @@ argstr(char *p, int flag)
 			}
 			break;
 		default:
-			STPUTC(c, expdest);
+			USTPUTC(c, expdest);
 			if (split_lit && !lit_quoted)
 				recordregion(expdest - stackblock() - 1,
 				    expdest - stackblock(), 0);
@@ -902,8 +903,7 @@ varvalue(char *name, int quoted, int sub
 			STPUTC(*p++, expdest); \
 		} \
 	} else \
-		while (*p) \
-			STPUTC(*p++, expdest); \
+		STPUTS(p, expdest); \
 	} while (0)
 
 
@@ -1573,8 +1573,7 @@ cvtnum(int num, char *buf)
 	if (neg)
 		*--p = '-';
 
-	while (*p)
-		STPUTC(*p++, buf);
+	STPUTS(p, buf);
 	return buf;
 }
 

Modified: projects/binutils-2.17/bin/sh/histedit.c
==============================================================================
--- projects/binutils-2.17/bin/sh/histedit.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/bin/sh/histedit.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -411,8 +411,7 @@ fc_replace(const char *s, char *p, char 
 	STARTSTACKSTR(dest);
 	while (*s) {
 		if (*s == *p && strncmp(s, p, plen) == 0) {
-			while (*r)
-				STPUTC(*r++, dest);
+			STPUTS(r, dest);
 			s += plen;
 			*p = '\0';	/* so no more matches */
 		} else

Modified: projects/binutils-2.17/bin/sh/memalloc.c
==============================================================================
--- projects/binutils-2.17/bin/sh/memalloc.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/bin/sh/memalloc.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -340,3 +340,20 @@ ungrabstackstr(char *s, char *p)
 	stacknxt = s;
 	sstrnleft = stacknleft - (p - s);
 }
+
+
+char *
+stputbin(const char *data, int len, char *p)
+{
+	int i;
+
+	for (i = 0; i < len; i++)
+		STPUTC(data[i], p);
+	return (p);
+}
+
+char *
+stputs(const char *data, char *p)
+{
+	return (stputbin(data, strlen(data), p));
+}

Modified: projects/binutils-2.17/bin/sh/memalloc.h
==============================================================================
--- projects/binutils-2.17/bin/sh/memalloc.h	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/bin/sh/memalloc.h	Thu Nov 25 18:36:44 2010	(r215830)
@@ -61,6 +61,8 @@ void grabstackblock(int);
 char *growstackstr(void);
 char *makestrspace(void);
 void ungrabstackstr(char *, char *);
+char *stputbin(const char *data, int len, char *p);
+char *stputs(const char *data, char *p);
 
 
 
@@ -82,3 +84,5 @@ void ungrabstackstr(char *, char *);
 #define STTOPC(p)	p[-1]
 #define STADJUST(amount, p)	(p += (amount), sstrnleft -= (amount))
 #define grabstackstr(p)	stalloc(stackblocksize() - sstrnleft)
+#define STPUTBIN(s, len, p)	p = stputbin((s), (len), p)
+#define STPUTS(s, p)	p = stputs((s), p)

Modified: projects/binutils-2.17/bin/sh/miscbltin.c
==============================================================================
--- projects/binutils-2.17/bin/sh/miscbltin.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/bin/sh/miscbltin.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -172,11 +172,12 @@ readcmd(int argc __unused, char **argv _
 		}
 		if (c == '\0')
 			continue;
+		CHECKSTRSPACE(1, p);
 		if (backslash) {
 			backslash = 0;
 			startword = 0;
 			if (c != '\n')
-				STPUTC(c, p);
+				USTPUTC(c, p);
 			continue;
 		}
 		if (!rflag && c == '\\') {
@@ -194,14 +195,14 @@ readcmd(int argc __unused, char **argv _
 			if (is_ifs == 1) {
 				/* Ignore leading IFS whitespace */
 				if (saveall)
-					STPUTC(c, p);
+					USTPUTC(c, p);
 				continue;
 			}
 			if (is_ifs == 2 && startword == 1) {
 				/* Only one non-whitespace IFS per word */
 				startword = 2;
 				if (saveall)
-					STPUTC(c, p);
+					USTPUTC(c, p);
 				continue;
 			}
 		}
@@ -212,7 +213,7 @@ readcmd(int argc __unused, char **argv _
 			if (saveall)
 				/* Not just a spare terminator */
 				saveall++;
-			STPUTC(c, p);
+			USTPUTC(c, p);
 			continue;
 		}
 
@@ -222,7 +223,7 @@ readcmd(int argc __unused, char **argv _
 		if (ap[1] == NULL) {
 			/* Last variable needs all IFS chars */
 			saveall++;
-			STPUTC(c, p);
+			USTPUTC(c, p);
 			continue;
 		}
 

Modified: projects/binutils-2.17/bin/sh/parser.c
==============================================================================
--- projects/binutils-2.17/bin/sh/parser.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/bin/sh/parser.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -1017,6 +1017,7 @@ parsebackq(char *out, struct nodelist **
 				setprompt(2);
 				needprompt = 0;
 			}
+			CHECKSTRSPACE(2, oout);
 			switch (c = pgetc()) {
 			case '`':
 				goto done;
@@ -1031,14 +1032,14 @@ parsebackq(char *out, struct nodelist **
 					/*
 					 * If eating a newline, avoid putting
 					 * the newline into the new character
-					 * stream (via the STPUTC after the
+					 * stream (via the USTPUTC after the
 					 * switch).
 					 */
 					continue;
 				}
                                 if (c != '\\' && c != '`' && c != '$'
                                     && (!dblquote || c != '"'))
-                                        STPUTC('\\', oout);
+                                        USTPUTC('\\', oout);
 				break;
 
 			case '\n':
@@ -1054,10 +1055,10 @@ parsebackq(char *out, struct nodelist **
 			default:
 				break;
 			}
-			STPUTC(c, oout);
+			USTPUTC(c, oout);
                 }
 done:
-                STPUTC('\0', oout);
+                USTPUTC('\0', oout);
                 olen = oout - stackblock();
 		INTOFF;
 		ostr = ckmalloc(olen);
@@ -1444,7 +1445,6 @@ parsesub: {
 	char *p;
 	static const char types[] = "}-+?=";
 	int bracketed_name = 0; /* used to handle ${[0-9]*} variables */
-	int i;
 	int linno;
 	int length;
 
@@ -1498,8 +1498,7 @@ parsesub: {
 					linno -= funclinno - 1;
 				snprintf(buf, sizeof(buf), "%d", linno);
 				STADJUST(-6, out);
-				for (i = 0; buf[i] != '\0'; i++)
-					STPUTC(buf[i], out);
+				STPUTS(buf, out);
 				flags |= VSLINENO;
 			}
 		} else if (is_digit(c)) {

Modified: projects/binutils-2.17/etc/defaults/rc.conf
==============================================================================
--- projects/binutils-2.17/etc/defaults/rc.conf	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/etc/defaults/rc.conf	Thu Nov 25 18:36:44 2010	(r215830)
@@ -58,6 +58,8 @@ rc_conf_files="/etc/rc.conf /etc/rc.conf
 # ZFS support
 zfs_enable="NO"		# Set to YES to automatically mount ZFS file systems
 
+gptboot_enable="YES"	# GPT boot success/failure reporting.
+
 # Experimental - test before enabling
 gbde_autoattach_all="NO" # YES automatically mounts gbde devices from fstab
 gbde_devices="NO" 	# Devices to automatically attach (list, or AUTO)

Modified: projects/binutils-2.17/etc/rc.d/gptboot
==============================================================================
--- projects/binutils-2.17/etc/rc.d/gptboot	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/etc/rc.d/gptboot	Thu Nov 25 18:36:44 2010	(r215830)
@@ -34,6 +34,7 @@
 . /etc/rc.subr
 
 name="gptboot"
+rcvar=`set_rcvar`
 start_cmd="gptboot_report"
 
 gptboot_report()

Modified: projects/binutils-2.17/etc/rc.d/mountcritlocal
==============================================================================
--- projects/binutils-2.17/etc/rc.d/mountcritlocal	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/etc/rc.d/mountcritlocal	Thu Nov 25 18:36:44 2010	(r215830)
@@ -5,13 +5,13 @@
 
 # PROVIDE: mountcritlocal
 # REQUIRE: root hostid_save mdconfig
-# KEYWORD: nojail
+# KEYWORD: nojail shutdown
 
 . /etc/rc.subr
 
 name="mountcritlocal"
 start_cmd="mountcritlocal_start"
-stop_cmd=":"
+stop_cmd=sync
 
 mountcritlocal_start()
 {

Modified: projects/binutils-2.17/share/man/man4/bge.4
==============================================================================
--- projects/binutils-2.17/share/man/man4/bge.4	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/share/man/man4/bge.4	Thu Nov 25 18:36:44 2010	(r215830)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 7, 2010
+.Dd November 23, 2010
 .Dt BGE 4
 .Os
 .Sh NAME
@@ -144,27 +144,6 @@ Force full duplex operation.
 Force half duplex operation.
 .El
 .Pp
-The
-.Nm
-driver also supports one special link option for 1000baseTX cards:
-.Bl -tag -width ".Cm link0"
-.It Cm link0
-With 1000baseTX cards, establishing a link between two ports requires
-that one port be configured as a master and the other a slave.
-With autonegotiation,
-the master/slave settings will be chosen automatically.
-However when manually selecting the link state, it is necessary to
-force one side of the link to be a master and the other a slave.
-The
-.Nm
-driver configures the ports as slaves by default.
-Setting the
-.Cm link0
-flag with
-.Xr ifconfig 8
-will set a port as a master instead.
-.El
-.Pp
 For more information on configuring this device, see
 .Xr ifconfig 8 .
 .Sh HARDWARE

Modified: projects/binutils-2.17/share/man/man4/msk.4
==============================================================================
--- projects/binutils-2.17/share/man/man4/msk.4	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/share/man/man4/msk.4	Thu Nov 25 18:36:44 2010	(r215830)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 30, 2010
+.Dd November 23, 2010
 .Dt MSK 4
 .Os
 .Sh NAME
@@ -125,27 +125,6 @@ Force full duplex operation.
 Force half duplex operation.
 .El
 .Pp
-The
-.Nm
-driver also supports one special link option for 1000baseTX cards:
-.Bl -tag -width ".Cm link0"
-.It Cm link0
-With 1000baseTX cards, establishing a link between two ports requires
-that one port is configured as master and the other one as slave.
-With autonegotiation,
-the master/slave settings will be chosen automatically.
-However when manually selecting the link state, it is necessary to
-force one side of the link to be a master and the other a slave.
-The
-.Nm
-driver configures the ports as slaves by default.
-Setting the
-.Cm link0
-flag with
-.Xr ifconfig 8
-will set a port as a master instead.
-.El
-.Pp
 For more information on configuring this device, see
 .Xr ifconfig 8 .
 .Sh HARDWARE

Modified: projects/binutils-2.17/share/man/man4/nge.4
==============================================================================
--- projects/binutils-2.17/share/man/man4/nge.4	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/share/man/man4/nge.4	Thu Nov 25 18:36:44 2010	(r215830)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 21, 2009
+.Dd November 23, 2010
 .Dt NGE 4
 .Os
 .Sh NAME
@@ -131,27 +131,6 @@ Force full duplex operation.
 Force half duplex operation.
 .El
 .Pp
-The
-.Nm
-driver also supports one special link option for 1000baseTX cards:
-.Bl -tag -width link0
-.It Cm link0
-With 1000baseTX cards, establishing a link between two ports requires
-that one port be configured as a master and the other a slave.
-With autonegotiation,
-the master/slave settings will be chosen automatically.
-However when manually selecting the link state, it is necessary to
-force one side of the link to be a master and the other a slave.
-The
-.Nm
-driver configures the ports as slaves by default.
-Setting the
-.Cm link0
-flag with
-.Xr ifconfig 8
-will set a port as a master instead.
-.El
-.Pp
 For more information on configuring this device, see
 .Xr ifconfig 8 .
 .Sh HARDWARE

Modified: projects/binutils-2.17/share/man/man4/sk.4
==============================================================================
--- projects/binutils-2.17/share/man/man4/sk.4	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/share/man/man4/sk.4	Thu Nov 25 18:36:44 2010	(r215830)
@@ -30,7 +30,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 23, 2009
+.Dd November 23, 2010
 .Dt SK 4
 .Os
 .Sh NAME
@@ -132,27 +132,6 @@ Force full duplex operation
 Force half duplex operation.
 .El
 .Pp
-The
-.Nm
-driver also supports one special link option for 1000baseTX cards:
-.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
-.It link0
-With 1000baseTX cards, establishing a link between two ports requires
-that one port is configured as master and the other one as slave.
-With autonegotiation,
-the master/slave settings will be chosen automatically.
-However when manually selecting the link state, it is necessary to
-force one side of the link to be a master and the other a slave.
-The
-.Nm
-driver configures the ports as slaves by default.
-Setting the
-.Ar link0
-flag with
-.Xr ifconfig 8
-will set a port as a master instead.
-.El
-.Pp
 For more information on configuring this device, see
 .Xr ifconfig 8 .
 .Sh HARDWARE

Modified: projects/binutils-2.17/share/man/man4/stge.4
==============================================================================
--- projects/binutils-2.17/share/man/man4/stge.4	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/share/man/man4/stge.4	Thu Nov 25 18:36:44 2010	(r215830)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 25, 2006
+.Dd November 23, 2010
 .Dt STGE 4
 .Os
 .Sh NAME
@@ -129,27 +129,6 @@ Force full duplex operation.
 Force half duplex operation.
 .El
 .Pp
-The
-.Nm
-driver also supports one special link option for 1000baseTX cards:
-.Bl -tag -width ".Cm link0"
-.It Cm link0
-With 1000baseTX cards, establishing a link between two ports requires
-that one port is configured as master and the other one as slave.
-With autonegotiation,
-the master/slave settings will be chosen automatically.
-However when manually selecting the link state, it is necessary to
-force one side of the link to be a master and the other a slave.
-The
-.Nm
-driver configures the ports as slaves by default.
-Setting the
-.Cm link0
-flag with
-.Xr ifconfig 8
-will set a port as a master instead.
-.El
-.Pp
 For more information on configuring this device, see
 .Xr ifconfig 8 .
 .Sh HARDWARE

Modified: projects/binutils-2.17/share/man/man4/vge.4
==============================================================================
--- projects/binutils-2.17/share/man/man4/vge.4	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/share/man/man4/vge.4	Thu Nov 25 18:36:44 2010	(r215830)
@@ -30,7 +30,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 18, 2009
+.Dd November 23, 2010
 .Dt VGE 4
 .Os
 .Sh NAME
@@ -137,27 +137,6 @@ Force full duplex operation.
 Force half duplex operation.
 .El
 .Pp
-The
-.Nm
-driver also supports one special link option for 1000baseTX cards:
-.Bl -tag -width ".Cm link0"
-.It Cm link0
-With 1000baseTX cards, establishing a link between two ports requires
-that one port be configured as a master and the other a slave.
-With autonegotiation,
-the master/slave settings will be chosen automatically.
-However when manually selecting the link state, it is necessary to
-force one side of the link to be a master and the other a slave.
-The
-.Nm
-driver configures the ports as slaves by default.
-Setting the
-.Cm link0
-flag with
-.Xr ifconfig 8
-will set a port as a master instead.
-.El
-.Pp
 For more information on configuring this device, see
 .Xr ifconfig 8 .
 .Sh HARDWARE

Modified: projects/binutils-2.17/share/man/man5/rc.conf.5
==============================================================================
--- projects/binutils-2.17/share/man/man5/rc.conf.5	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/share/man/man5/rc.conf.5	Thu Nov 25 18:36:44 2010	(r215830)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 13, 2010
+.Dd November 24, 2010
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -1575,6 +1575,17 @@ If set to
 .Pa /etc/rc.d/zfs
 will attempt to automatically mount ZFS file systems and initialize ZFS volumes
 (ZVOLs).
+.It Va gptboot_enable
+.Pq Vt bool
+If set to
+.Dq Li YES ,
+.Pa /etc/rc.d/gptboot
+will log if the system successfully (or not) booted from a GPT partition,
+which had the
+.Ar bootonce
+attribute set using
+.Xr gpart 8
+utility.
 .It Va gbde_autoattach_all
 .Pq Vt bool
 If set to

Modified: projects/binutils-2.17/share/man/man9/vrele.9
==============================================================================
--- projects/binutils-2.17/share/man/man9/vrele.9	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/share/man/man9/vrele.9	Thu Nov 25 18:36:44 2010	(r215830)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 17, 2010
+.Dd November 20, 2010
 .Dt VRELE 9
 .Os
 .Sh NAME
@@ -74,10 +74,6 @@ with less overhead.
 The
 .Fn vunref
 function takes a locked vnode as argument, and returns with the vnode locked.
-Nonetheless, the
-.Fn vunref
-might drop the vnode lock during the operation, so caller should not expect
-that non-doomed vnode is still non-doomed after the function returned.
 .Pp
 Any code in the system which signified its use of a vnode by usecount
 should call one of the listed function to decrement use counter.

Modified: projects/binutils-2.17/share/misc/bsd-family-tree
==============================================================================
--- projects/binutils-2.17/share/misc/bsd-family-tree	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/share/misc/bsd-family-tree	Thu Nov 25 18:36:44 2010	(r215830)
@@ -228,20 +228,20 @@ FreeBSD 5.2           |      |          
  |  FreeBSD 7.1       |      |                 |                       |
  |     |              |      |                 |                DragonFly 2.2.0
  |  FreeBSD 7.2       |   NetBSD 5.0       OpenBSD 4.5                 |
- |             \      |      |                 |                       |
- |              |     |      |                 |                DragonFly 2.4.0
- |              |     |      |             OpenBSD 4.6                 |
- |              |     |      |                 |                       |
- *--FreeBSD     |     |      |                 |                       |
- |    8.0       |     |      |                 |                       |
- |     |    FreeBSD   |      |                 |                       |
- |     |       7.3    |      |                 |                DragonFly 2.6.0
- |     |              |      |             OpenBSD 4.7                 |
- |  FreeBSD           |      |                 |                       |
- |    8.1             |      |                 |                       |
- |     |              |      |                 |                DragonFly 2.8.0
- |     |              |      |             OpenBSD 4.8                 |
- |     V              |      |                 |                       |
+ |             \      |      |    |            |                       |
+ |              |     |      |    |            |                DragonFly 2.4.0
+ |              |     |      |    |        OpenBSD 4.6                 |
+ |              |     |      |    |            |                       |
+ *--FreeBSD     |     |      |    |            |                       |
+ |    8.0       |     |      |    |            |                       |
+ |     |    FreeBSD   |      |    |            |                       |
+ |     |       7.3    |      |    |            |                DragonFly 2.6.0
+ |     |              |      |    |        OpenBSD 4.7                 |
+ |  FreeBSD           |      |    |            |                       |
+ |    8.1             |      |    |            |                       |
+ |     |              |      |    |            |                DragonFly 2.8.0
+ |     |              |      |    |        OpenBSD 4.8                 |
+ |     V              |      | NetBSD 5.1      |                       |
  |                    |      |                 |                       |
 FreeBSD 9 -current    |  NetBSD -current  OpenBSD -current             |
  |                    |      |                 |                       |
@@ -523,6 +523,7 @@ OpenBSD 4.7		2010-05-19 [OBD]
 FreeBSD 8.1		2010-07-24 [FBD]
 DragonFly 2.8.0		2010-10-30 [DFB]
 OpenBSD 4.8		2010-11-01 [OBD]
+NetBSD 5.1		2010-11-19 [NBD]
 
 Bibliography
 ------------------------

Modified: projects/binutils-2.17/sys/amd64/acpica/acpi_switch.S
==============================================================================
--- projects/binutils-2.17/sys/amd64/acpica/acpi_switch.S	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/amd64/acpica/acpi_switch.S	Thu Nov 25 18:36:44 2010	(r215830)
@@ -76,12 +76,6 @@ ENTRY(acpi_restorecpu)
 	movl	WAKEUP_CTX(efer), %eax
 	wrmsr
 
-	/* Restore PAT. */
-	movl	$MSR_PAT, %ecx
-	movl	WAKEUP_CTX(pat), %eax
-	movl	4 + WAKEUP_CTX(pat), %edx
-	wrmsr
-
 	/* Restore fast syscall stuff. */
 	movl	$MSR_STAR, %ecx
 	movl	WAKEUP_CTX(star), %eax

Modified: projects/binutils-2.17/sys/amd64/acpica/acpi_wakecode.S
==============================================================================
--- projects/binutils-2.17/sys/amd64/acpica/acpi_wakecode.S	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/amd64/acpica/acpi_wakecode.S	Thu Nov 25 18:36:44 2010	(r215830)
@@ -274,8 +274,6 @@ wakeup_gdt:
 	ALIGN_DATA
 wakeup_efer:
 	.quad	0
-wakeup_pat:
-	.quad	0
 wakeup_star:
 	.quad	0
 wakeup_lstar:

Modified: projects/binutils-2.17/sys/amd64/acpica/acpi_wakeup.c
==============================================================================
--- projects/binutils-2.17/sys/amd64/acpica/acpi_wakeup.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/amd64/acpica/acpi_wakeup.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -278,6 +278,7 @@ acpi_sleep_machdep(struct acpi_softc *sc
 		for (;;)
 			ia32_pause();
 	} else {
+		pmap_init_pat();
 		PCPU_SET(switchtime, 0);
 		PCPU_SET(switchticks, ticks);
 #ifdef SMP
@@ -372,7 +373,6 @@ acpi_install_wakeup_handler(struct acpi_
 	WAKECODE_FIXUP(wakeup_ctx, vm_offset_t,
 	    WAKECODE_VADDR(sc) + wakeup_ctx);
 	WAKECODE_FIXUP(wakeup_efer, uint64_t, rdmsr(MSR_EFER));
-	WAKECODE_FIXUP(wakeup_pat, uint64_t, rdmsr(MSR_PAT));
 	WAKECODE_FIXUP(wakeup_star, uint64_t, rdmsr(MSR_STAR));
 	WAKECODE_FIXUP(wakeup_lstar, uint64_t, rdmsr(MSR_LSTAR));
 	WAKECODE_FIXUP(wakeup_cstar, uint64_t, rdmsr(MSR_CSTAR));

Modified: projects/binutils-2.17/sys/amd64/amd64/cpu_switch.S
==============================================================================
--- projects/binutils-2.17/sys/amd64/amd64/cpu_switch.S	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/amd64/amd64/cpu_switch.S	Thu Nov 25 18:36:44 2010	(r215830)
@@ -276,7 +276,7 @@ load_dr:
 do_tss:	movq	%rdx,PCPU(TSSP)
 	movq	%rdx,%rcx
 	movq	PCPU(TSS),%rax
-	movw	%rcx,2(%rax)
+	movw	%cx,2(%rax)
 	shrq	$16,%rcx
 	movb	%cl,4(%rax)
 	shrq	$8,%rcx

Modified: projects/binutils-2.17/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- projects/binutils-2.17/sys/amd64/amd64/mp_machdep.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/amd64/amd64/mp_machdep.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -1410,6 +1410,7 @@ cpususpend_handler(void)
 		wbinvd();
 		atomic_set_int(&stopped_cpus, cpumask);
 	} else {
+		pmap_init_pat();
 		PCPU_SET(switchtime, 0);
 		PCPU_SET(switchticks, ticks);
 	}

Modified: projects/binutils-2.17/sys/amd64/amd64/pmap.c
==============================================================================
--- projects/binutils-2.17/sys/amd64/amd64/pmap.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/amd64/amd64/pmap.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -183,8 +183,7 @@ pt_entry_t pg_nx;
 SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters");
 
 static int pat_works = 1;
-TUNABLE_INT("vm.pmap.pat_works", &pat_works);
-SYSCTL_INT(_vm_pmap, OID_AUTO, pat_works, CTLFLAG_RDTUN, &pat_works, 1,
+SYSCTL_INT(_vm_pmap, OID_AUTO, pat_works, CTLFLAG_RD, &pat_works, 1,
     "Is page attribute table fully functional?");
 
 static int pg_ps_enabled = 1;

Modified: projects/binutils-2.17/sys/amd64/include/specialreg.h
==============================================================================
--- projects/binutils-2.17/sys/amd64/include/specialreg.h	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/amd64/include/specialreg.h	Thu Nov 25 18:36:44 2010	(r215830)
@@ -136,6 +136,15 @@
 #define	CPUID2_AESNI	0x02000000
 
 /*
+ * Important bits in the Thermal and Power Management flags
+ * CPUID.6 EAX and ECX.
+ */
+#define	CPUTPM1_SENSOR	0x00000001
+#define	CPUTPM1_TURBO	0x00000002
+#define	CPUTPM1_ARAT	0x00000004
+#define	CPUTPM2_EFFREQ	0x00000001
+
+/*
  * Important bits in the AMD extended cpuid flags
  */
 #define	AMDID_SYSCALL	0x00000800

Modified: projects/binutils-2.17/sys/boot/common/load_elf.c
==============================================================================
--- projects/binutils-2.17/sys/boot/common/load_elf.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/boot/common/load_elf.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -453,7 +453,8 @@ __elfN(loadimage)(struct preloaded_file 
 	}
 	result = archsw.arch_readin(ef->fd, lastaddr, shdr[i].sh_size);
 	if (result < 0 || (size_t)result != shdr[i].sh_size) {
-	    printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadimage: could not read symbols - skipped!");
+	    printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadimage: could not read symbols - skipped! (%ju != %ju)", (uintmax_t)result,
+		(uintmax_t)shdr[i].sh_size);
 	    lastaddr = ssym;
 	    ssym = 0;
 	    goto nosyms;

Modified: projects/binutils-2.17/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- projects/binutils-2.17/sys/compat/freebsd32/freebsd32_misc.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/compat/freebsd32/freebsd32_misc.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -2365,7 +2365,8 @@ freebsd32_nmount(struct thread *td,
 	 * Filter out MNT_ROOTFS.  We do not want clients of nmount() in
 	 * userspace to set this flag, but we must filter it out if we want
 	 * MNT_UPDATE on the root file system to work.
-	 * MNT_ROOTFS should only be set in the kernel in vfs_mountroot_try().
+	 * MNT_ROOTFS should only be set by the kernel when mounting its
+	 * root file system.
 	 */
 	uap->flags &= ~MNT_ROOTFS;
 

Modified: projects/binutils-2.17/sys/compat/ia32/ia32_signal.h
==============================================================================
--- projects/binutils-2.17/sys/compat/ia32/ia32_signal.h	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/compat/ia32/ia32_signal.h	Thu Nov 25 18:36:44 2010	(r215830)
@@ -29,6 +29,9 @@
  * $FreeBSD$
  */
 
+#ifndef	_COMPAT_IA32_IA32_SIGNAL_H
+#define	_COMPAT_IA32_IA32_SIGNAL_H
+
 struct ia32_mcontext {
 	u_int32_t	mc_onstack;		/* XXX - sigcontext compat. */
 	u_int32_t	mc_gs;			/* machine state (struct trapframe) */
@@ -188,3 +191,5 @@ extern int sz_freebsd4_ia32_sigcode;
 extern void ia32_sendsig(sig_t, struct ksiginfo *, sigset_t *);
 extern void ia32_setregs(struct thread *td, struct image_params *imgp,
     u_long stack);
+
+#endif

Modified: projects/binutils-2.17/sys/compat/ia32/ia32_util.h
==============================================================================
--- projects/binutils-2.17/sys/compat/ia32/ia32_util.h	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/compat/ia32/ia32_util.h	Thu Nov 25 18:36:44 2010	(r215830)
@@ -28,6 +28,9 @@
  * $FreeBSD$
  */
 
+#ifndef	_COMPAT_IA32_IA32_UTIL_H
+#define	_COMPAT_IA32_IA32_UTIL_H
+
 #include <vm/vm.h>
 #include <vm/vm_param.h>
 #include <vm/pmap.h>
@@ -51,3 +54,5 @@
 struct syscall_args;
 int ia32_fetch_syscall_args(struct thread *td, struct syscall_args *sa);
 void ia32_set_syscall_retval(struct thread *, int);
+
+#endif

Modified: projects/binutils-2.17/sys/compat/ndis/ntoskrnl_var.h
==============================================================================
--- projects/binutils-2.17/sys/compat/ndis/ntoskrnl_var.h	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/compat/ndis/ntoskrnl_var.h	Thu Nov 25 18:36:44 2010	(r215830)
@@ -1282,6 +1282,7 @@ typedef struct driver_object driver_obje
 #define	STATUS_PENDING			0x00000103
 #define	STATUS_FAILURE			0xC0000001
 #define	STATUS_NOT_IMPLEMENTED		0xC0000002
+#define	STATUS_ACCESS_VIOLATION		0xC0000005
 #define	STATUS_INVALID_PARAMETER	0xC000000D
 #define	STATUS_INVALID_DEVICE_REQUEST	0xC0000010
 #define	STATUS_MORE_PROCESSING_REQUIRED	0xC0000016

Modified: projects/binutils-2.17/sys/compat/ndis/subr_ndis.c
==============================================================================
--- projects/binutils-2.17/sys/compat/ndis/subr_ndis.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/compat/ndis/subr_ndis.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -254,6 +254,7 @@ static uint8_t
 	void *, void *);
 static void NdisGetCurrentSystemTime(uint64_t *);
 static void NdisGetSystemUpTime(uint32_t *);
+static uint32_t NdisGetVersion(void);
 static void NdisInitializeString(unicode_string *, char *);
 static void NdisInitAnsiString(ansi_string *, char *);
 static void NdisInitUnicodeString(unicode_string *, uint16_t *);
@@ -274,6 +275,7 @@ static void NdisMapFile(ndis_status *, v
 static void NdisUnmapFile(ndis_handle);
 static void NdisCloseFile(ndis_handle);
 static uint8_t NdisSystemProcessorCount(void);
+static void NdisGetCurrentProcessorCounts(uint32_t *, uint32_t *, uint32_t *);
 static void NdisMIndicateStatusComplete(ndis_handle);
 static void NdisMIndicateStatus(ndis_handle, ndis_status,
     void *, uint32_t);
@@ -2067,6 +2069,12 @@ NdisInterlockedDecrement(addend)
 	return (*addend);
 }
 
+static uint32_t
+NdisGetVersion(void)
+{
+	return (0x00050001);
+}
+
 static void
 NdisInitializeEvent(event)
 	ndis_event		*event;
@@ -2950,6 +2958,20 @@ NdisSystemProcessorCount()
 	return (mp_ncpus);
 }
 
+static void
+NdisGetCurrentProcessorCounts(idle_count, kernel_and_user, index)
+	uint32_t		*idle_count;
+	uint32_t		*kernel_and_user;
+	uint32_t		*index;
+{
+	struct pcpu		*pcpu;
+
+	pcpu = pcpu_find(curthread->td_oncpu);
+	*index = pcpu->pc_cpuid;
+	*idle_count = pcpu->pc_cp_time[CP_IDLE];
+	*kernel_and_user = pcpu->pc_cp_time[CP_INTR];
+}
+
 typedef void (*ndis_statusdone_handler)(ndis_handle);
 typedef void (*ndis_status_handler)(ndis_handle, ndis_status,
     void *, uint32_t);
@@ -3207,6 +3229,7 @@ image_patch_table ndis_functbl[] = {
 	IMPORT_SFUNC(NdisMIndicateStatusComplete, 1),
 	IMPORT_SFUNC(NdisMIndicateStatus, 4),
 	IMPORT_SFUNC(NdisSystemProcessorCount, 0),
+	IMPORT_SFUNC(NdisGetCurrentProcessorCounts, 3),
 	IMPORT_SFUNC(NdisUnchainBufferAtBack, 2),
 	IMPORT_SFUNC(NdisGetFirstBufferFromPacket, 5),
 	IMPORT_SFUNC(NdisGetFirstBufferFromPacketSafe, 6),
@@ -3224,6 +3247,7 @@ image_patch_table ndis_functbl[] = {
 	IMPORT_SFUNC(NdisFreeString, 1),
 	IMPORT_SFUNC(NdisGetCurrentSystemTime, 1),
 	IMPORT_SFUNC(NdisGetSystemUpTime, 1),
+	IMPORT_SFUNC(NdisGetVersion, 0),
 	IMPORT_SFUNC(NdisMSynchronizeWithInterrupt, 3),
 	IMPORT_SFUNC(NdisMAllocateSharedMemoryAsync, 4),
 	IMPORT_SFUNC(NdisInterlockedInsertHeadList, 3),

Modified: projects/binutils-2.17/sys/compat/ndis/subr_ntoskrnl.c
==============================================================================
--- projects/binutils-2.17/sys/compat/ndis/subr_ntoskrnl.c	Thu Nov 25 18:34:42 2010	(r215829)
+++ projects/binutils-2.17/sys/compat/ndis/subr_ntoskrnl.c	Thu Nov 25 18:36:44 2010	(r215830)
@@ -128,6 +128,7 @@ static kspin_lock ntoskrnl_intlock;
 
 static uint8_t RtlEqualUnicodeString(unicode_string *,
 	unicode_string *, uint8_t);
+static void RtlCopyString(ansi_string *, const ansi_string *);
 static void RtlCopyUnicodeString(unicode_string *,
 	unicode_string *);
 static irp *IoBuildSynchronousFsdRequest(uint32_t, device_object *,
@@ -180,7 +181,9 @@ static uint64_t _aullrem(uint64_t, uint6
 static uint64_t _aullshr(uint64_t, uint8_t);
 static uint64_t _aullshl(uint64_t, uint8_t);
 static slist_entry *ntoskrnl_pushsl(slist_header *, slist_entry *);
+static void InitializeSListHead(slist_header *);
 static slist_entry *ntoskrnl_popsl(slist_header *);
+static void ExFreePoolWithTag(void *, uint32_t);
 static void ExInitializePagedLookasideList(paged_lookaside_list *,
 	lookaside_alloc_func *, lookaside_free_func *,
 	uint32_t, size_t, uint32_t, uint16_t);
@@ -210,6 +213,10 @@ static void *MmMapLockedPagesSpecifyCach
 static void MmUnmapLockedPages(void *, mdl *);
 static device_t ntoskrnl_finddev(device_t, uint64_t, struct resource **);
 static void RtlZeroMemory(void *, size_t);
+static void RtlSecureZeroMemory(void *, size_t);
+static void RtlFillMemory(void *, size_t, uint8_t);
+static void RtlMoveMemory(void *, const void *, size_t);
+static ndis_status RtlCharToInteger(const char *, uint32_t, uint32_t *);
 static void RtlCopyMemory(void *, const void *, size_t);
 static size_t RtlCompareMemory(const void *, const void *, size_t);
 static ndis_status RtlUnicodeStringToInteger(unicode_string *,
@@ -538,6 +545,20 @@ RtlEqualUnicodeString(unicode_string *st
 }
 
 static void
+RtlCopyString(dst, src)
+	ansi_string		*dst;
+	const ansi_string	*src;
+{
+	if (src != NULL && src->as_buf != NULL && dst->as_buf != NULL) {
+		dst->as_len = min(src->as_len, dst->as_maxlen);
+		memcpy(dst->as_buf, src->as_buf, dst->as_len);
+		if (dst->as_len < dst->as_maxlen)
+			dst->as_buf[dst->as_len] = 0;
+	} else
+		dst->as_len = 0;
+}
+
+static void
 RtlCopyUnicodeString(dest, src)
 	unicode_string		*dest;
 	unicode_string		*src;
@@ -650,6 +671,14 @@ ExAllocatePoolWithTag(pooltype, len, tag
 	return (buf);
 }
 
+static void
+ExFreePoolWithTag(buf, tag)
+	void		*buf;
+	uint32_t	tag;
+{
+	ExFreePool(buf);
+}
+
 void
 ExFreePool(buf)
 	void			*buf;
@@ -2056,6 +2085,13 @@ ntoskrnl_pushsl(head, entry)
 	return (oldhead);
 }
 
+static void
+InitializeSListHead(head)
+	slist_header		*head;
+{
+	memset(head, 0, sizeof(*head));
+}
+
 static slist_entry *

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


More information about the svn-src-projects mailing list