Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 2009 17:03:11 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 156093 for review
Message-ID:  <200901131703.n0DH3BxV058008@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=156093

Change 156093 by hselasky@hselasky_laptop001 on 2009/01/13 17:02:51

	
	IFC @ 156090

Affected files ...

.. //depot/projects/usb/src/sys/amd64/amd64/amd64_mem.c#4 integrate
.. //depot/projects/usb/src/sys/amd64/amd64/identcpu.c#12 integrate
.. //depot/projects/usb/src/sys/amd64/amd64/initcpu.c#5 integrate
.. //depot/projects/usb/src/sys/amd64/amd64/msi.c#6 integrate
.. //depot/projects/usb/src/sys/amd64/conf/GENERIC#19 integrate
.. //depot/projects/usb/src/sys/amd64/include/md_var.h#7 integrate
.. //depot/projects/usb/src/sys/amd64/include/specialreg.h#12 integrate
.. //depot/projects/usb/src/sys/boot/forth/support.4th#6 integrate
.. //depot/projects/usb/src/sys/boot/i386/libi386/bootinfo64.c#4 integrate
.. //depot/projects/usb/src/sys/cam/scsi/scsi_ch.c#5 integrate
.. //depot/projects/usb/src/sys/cam/scsi/scsi_pass.c#8 integrate
.. //depot/projects/usb/src/sys/cam/scsi/scsi_pt.c#5 integrate
.. //depot/projects/usb/src/sys/cam/scsi/scsi_sa.c#7 integrate
.. //depot/projects/usb/src/sys/cam/scsi/scsi_ses.c#7 integrate
.. //depot/projects/usb/src/sys/cam/scsi/scsi_sg.c#5 integrate
.. //depot/projects/usb/src/sys/conf/NOTES#25 integrate
.. //depot/projects/usb/src/sys/conf/files.amd64#14 integrate
.. //depot/projects/usb/src/sys/conf/files.powerpc#14 integrate
.. //depot/projects/usb/src/sys/conf/kern.pre.mk#13 integrate
.. //depot/projects/usb/src/sys/conf/options#17 integrate
.. //depot/projects/usb/src/sys/crypto/via/padlock.c#7 integrate
.. //depot/projects/usb/src/sys/crypto/via/padlock_hash.c#2 integrate
.. //depot/projects/usb/src/sys/dev/agp/agp_amd64.c#2 integrate
.. //depot/projects/usb/src/sys/dev/ata/ata-queue.c#9 integrate
.. //depot/projects/usb/src/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c#2 integrate
.. //depot/projects/usb/src/sys/dev/bce/if_bce.c#14 integrate
.. //depot/projects/usb/src/sys/dev/e1000/if_igb.c#5 integrate
.. //depot/projects/usb/src/sys/dev/if_ndis/if_ndis.c#15 integrate
.. //depot/projects/usb/src/sys/dev/md/md.c#9 integrate
.. //depot/projects/usb/src/sys/dev/sound/pci/hda/hdac.c#18 integrate
.. //depot/projects/usb/src/sys/dev/sound/pcm/dsp.c#8 integrate
.. //depot/projects/usb/src/sys/dev/sound/pcm/mixer.c#13 integrate
.. //depot/projects/usb/src/sys/dev/sound/pcm/sound.c#9 integrate
.. //depot/projects/usb/src/sys/dev/sound/pcm/sound.h#8 integrate
.. //depot/projects/usb/src/sys/dev/usb2/image/uscanner2.c#14 integrate
.. //depot/projects/usb/src/sys/dev/usb2/misc/ufm2.c#9 integrate
.. //depot/projects/usb/src/sys/dev/usb2/serial/ufoma2.c#18 integrate
.. //depot/projects/usb/src/sys/dev/usb2/storage/urio2.c#14 integrate
.. //depot/projects/usb/src/sys/fs/msdosfs/msdosfs_denode.c#7 integrate
.. //depot/projects/usb/src/sys/geom/geom_vfs.c#5 integrate
.. //depot/projects/usb/src/sys/i386/conf/GENERIC#19 integrate
.. //depot/projects/usb/src/sys/i386/i386/i686_mem.c#4 integrate
.. //depot/projects/usb/src/sys/i386/i386/identcpu.c#11 integrate
.. //depot/projects/usb/src/sys/i386/i386/initcpu.c#7 integrate
.. //depot/projects/usb/src/sys/i386/i386/msi.c#6 integrate
.. //depot/projects/usb/src/sys/kern/kern_timeout.c#9 integrate
.. //depot/projects/usb/src/sys/modules/Makefile#25 integrate
.. //depot/projects/usb/src/sys/net/if_loop.c#14 integrate
.. //depot/projects/usb/src/sys/net/route.h#8 integrate
.. //depot/projects/usb/src/sys/net/rtsock.c#15 integrate
.. //depot/projects/usb/src/sys/net80211/ieee80211_ioctl.c#14 integrate
.. //depot/projects/usb/src/sys/netinet/tcp_syncache.c#18 integrate
.. //depot/projects/usb/src/sys/netinet6/in6.c#14 integrate
.. //depot/projects/usb/src/sys/powerpc/booke/locore.S#5 integrate
.. //depot/projects/usb/src/sys/powerpc/booke/machdep.c#6 integrate
.. //depot/projects/usb/src/sys/powerpc/booke/pmap.c#6 integrate
.. //depot/projects/usb/src/sys/powerpc/booke/support.S#2 delete
.. //depot/projects/usb/src/sys/powerpc/booke/trap_subr.S#3 integrate
.. //depot/projects/usb/src/sys/powerpc/include/pcpu.h#7 integrate
.. //depot/projects/usb/src/sys/powerpc/include/pmap.h#5 integrate
.. //depot/projects/usb/src/sys/powerpc/include/pte.h#4 integrate
.. //depot/projects/usb/src/sys/powerpc/include/tlb.h#2 integrate
.. //depot/projects/usb/src/sys/powerpc/powermac/macgpio.c#3 integrate
.. //depot/projects/usb/src/sys/powerpc/powerpc/genassym.c#6 integrate
.. //depot/projects/usb/src/sys/sys/soundcard.h#4 integrate

Differences ...

==== //depot/projects/usb/src/sys/amd64/amd64/amd64_mem.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/amd64_mem.c,v 1.30 2008/11/26 19:25:13 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/amd64_mem.c,v 1.31 2009/01/12 19:17:35 jkim Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -678,9 +678,17 @@
 		return;
 	if ((cpu_id & 0xf00) != 0x600 && (cpu_id & 0xf00) != 0xf00)
 		return;
-	if (cpu_vendor_id != CPU_VENDOR_INTEL &&
-	    cpu_vendor_id != CPU_VENDOR_AMD)
+	switch (cpu_vendor_id) {
+	case CPU_VENDOR_INTEL:
+	case CPU_VENDOR_AMD:
+		break;
+	case CPU_VENDOR_CENTAUR:
+		if (cpu_exthigh >= 0x80000008)
+			break;
+		/* FALLTHROUGH */
+	default:
 		return;
+	}
 	mem_range_softc.mr_op = &amd64_mrops;
 }
 SYSINIT(amd64memdev, SI_SUB_DRIVERS, SI_ORDER_FIRST, amd64_mem_drvinit, NULL);

==== //depot/projects/usb/src/sys/amd64/amd64/identcpu.c#12 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.169 2009/01/05 21:51:49 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.170 2009/01/12 19:17:35 jkim Exp $");
 
 #include "opt_cpu.h"
 
@@ -72,6 +72,7 @@
 static u_int find_cpu_vendor_id(void);
 static void print_AMD_info(void);
 static void print_AMD_assoc(int i);
+static void print_via_padlock_info(void);
 
 int	cpu_class;
 char machine[] = "amd64";
@@ -132,24 +133,33 @@
 		}
 	}
 
-	if (cpu_vendor_id == CPU_VENDOR_INTEL) {
+	switch (cpu_vendor_id) {
+	case CPU_VENDOR_INTEL:
 		/* Please make up your mind folks! */
 		strcat(cpu_model, "EM64T");
-	} else if (cpu_vendor_id == CPU_VENDOR_AMD) {
+		break;
+	case CPU_VENDOR_AMD:
 		/*
 		 * Values taken from AMD Processor Recognition
 		 * http://www.amd.com/K6/k6docs/pdf/20734g.pdf
 		 * (also describes ``Features'' encodings.
 		 */
 		strcpy(cpu_model, "AMD ");
-		switch (cpu_id & 0xF00) {
-		case 0xf00:
+		if ((cpu_id & 0xf00) == 0xf00)
 			strcat(cpu_model, "AMD64 Processor");
-			break;
-		default:
+		else
+			strcat(cpu_model, "Unknown");
+		break;
+	case CPU_VENDOR_CENTAUR:
+		strcpy(cpu_model, "VIA ");
+		if ((cpu_id & 0xff0) == 0x6f0)
+			strcat(cpu_model, "Nano Processor");
+		else
 			strcat(cpu_model, "Unknown");
-			break;
-		}
+		break;
+	default:
+		strcat(cpu_model, "Unknown");
+		break;
 	}
 
 	/*
@@ -181,7 +191,8 @@
 		printf("  Id = 0x%x", cpu_id);
 
 	if (cpu_vendor_id == CPU_VENDOR_INTEL ||
-	    cpu_vendor_id == CPU_VENDOR_AMD) {
+	    cpu_vendor_id == CPU_VENDOR_AMD ||
+	    cpu_vendor_id == CPU_VENDOR_CENTAUR) {
 		printf("  Stepping = %u", cpu_id & 0xf);
 		if (cpu_high > 0) {
 			u_int cmp = 1, htt = 1;
@@ -353,6 +364,9 @@
 				);
 			}
 
+			if (cpu_vendor_id == CPU_VENDOR_CENTAUR)
+				print_via_padlock_info();
+
 			if ((cpu_feature & CPUID_HTT) &&
 			    cpu_vendor_id == CPU_VENDOR_AMD)
 				cpu_feature &= ~CPUID_HTT;
@@ -376,6 +390,11 @@
 				    AMD64_CPU_MODEL(cpu_id) >= 0x3))
 					tsc_is_invariant = 1;
 				break;
+			case CPU_VENDOR_CENTAUR:
+				if (AMD64_CPU_FAMILY(cpu_id) == 0x6 &&
+				    AMD64_CPU_MODEL(cpu_id) >= 0xf)
+					tsc_is_invariant = 1;
+				break;
 			}
 			if (tsc_is_invariant)
 				printf("\n  TSC: P-state invariant");
@@ -457,7 +476,7 @@
     EVENTHANDLER_PRI_ANY);
 
 /*
- * Final stage of CPU identification. -- Should I check TI?
+ * Final stage of CPU identification.
  */
 void
 identify_cpu(void)
@@ -479,7 +498,8 @@
 	cpu_feature2 = regs[2];
 
 	if (cpu_vendor_id == CPU_VENDOR_INTEL ||
-	    cpu_vendor_id == CPU_VENDOR_AMD) {
+	    cpu_vendor_id == CPU_VENDOR_AMD ||
+	    cpu_vendor_id == CPU_VENDOR_CENTAUR) {
 		do_cpuid(0x80000000, regs);
 		cpu_exthigh = regs[0];
 	}
@@ -600,3 +620,37 @@
 		print_AMD_l2_assoc((regs[2] >> 12) & 0x0f);	
 	}
 }
+
+static void
+print_via_padlock_info(void)
+{
+	u_int regs[4];
+
+	/* Check for supported models. */
+	switch (cpu_id & 0xff0) {
+	case 0x690:
+		if ((cpu_id & 0xf) < 3)
+			return;
+	case 0x6a0:
+	case 0x6d0:
+	case 0x6f0:
+		break;
+	default:
+		return;
+	}
+	
+	do_cpuid(0xc0000000, regs);
+	if (regs[0] >= 0xc0000001)
+		do_cpuid(0xc0000001, regs);
+	else
+		return;
+
+	printf("\n  VIA Padlock Features=0x%b", regs[3],
+	"\020"
+	"\003RNG"		/* RNG */
+	"\007AES"		/* ACE */
+	"\011AES-CTR"		/* ACE2 */
+	"\013SHA1,SHA256"	/* PHE */
+	"\015RSA"		/* PMM */
+	);
+}

==== //depot/projects/usb/src/sys/amd64/amd64/initcpu.c#5 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/initcpu.c,v 1.52 2008/11/26 19:25:13 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/initcpu.c,v 1.53 2009/01/12 19:17:35 jkim Exp $");
 
 #include "opt_cpu.h"
 
@@ -54,6 +54,8 @@
 u_int	amd_feature;		/* AMD feature flags */
 u_int	amd_feature2;		/* AMD feature flags */
 u_int	amd_pminfo;		/* AMD advanced power management info */
+u_int	via_feature_rng;	/* VIA RNG features */
+u_int	via_feature_xcrypt;	/* VIA ACE features */
 u_int	cpu_high;		/* Highest arg to CPUID */
 u_int	cpu_exthigh;		/* Highest arg to extended CPUID */
 u_int	cpu_id;			/* Stepping ID */
@@ -64,7 +66,76 @@
 u_int	cpu_fxsr;		/* SSE enabled */
 u_int	cpu_mxcsr_mask;		/* Valid bits in mxcsr */
 
+SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD,
+	&via_feature_rng, 0, "VIA C3/C7 RNG feature available in CPU");
+SYSCTL_UINT(_hw, OID_AUTO, via_feature_xcrypt, CTLFLAG_RD,
+	&via_feature_xcrypt, 0, "VIA C3/C7 xcrypt feature available in CPU");
+
 /*
+ * Initialize special VIA C3/C7 features
+ */
+static void
+init_via(void)
+{
+	u_int regs[4], val;
+	u_int64_t msreg;
+
+	do_cpuid(0xc0000000, regs);
+	val = regs[0];
+	if (val >= 0xc0000001) {
+		do_cpuid(0xc0000001, regs);
+		val = regs[3];
+	} else
+		val = 0;
+
+	/* Enable RNG if present and disabled */
+	if (val & VIA_CPUID_HAS_RNG) {
+		if (!(val & VIA_CPUID_DO_RNG)) {
+			msreg = rdmsr(0x110B);
+			msreg |= 0x40;
+			wrmsr(0x110B, msreg);
+		}
+		via_feature_rng = VIA_HAS_RNG;
+	}
+	/* Enable AES engine if present and disabled */
+	if (val & VIA_CPUID_HAS_ACE) {
+		if (!(val & VIA_CPUID_DO_ACE)) {
+			msreg = rdmsr(0x1107);
+			msreg |= (0x01 << 28);
+			wrmsr(0x1107, msreg);
+		}
+		via_feature_xcrypt |= VIA_HAS_AES;
+	}
+	/* Enable ACE2 engine if present and disabled */
+	if (val & VIA_CPUID_HAS_ACE2) {
+		if (!(val & VIA_CPUID_DO_ACE2)) {
+			msreg = rdmsr(0x1107);
+			msreg |= (0x01 << 28);
+			wrmsr(0x1107, msreg);
+		}
+		via_feature_xcrypt |= VIA_HAS_AESCTR;
+	}
+	/* Enable SHA engine if present and disabled */
+	if (val & VIA_CPUID_HAS_PHE) {
+		if (!(val & VIA_CPUID_DO_PHE)) {
+			msreg = rdmsr(0x1107);
+			msreg |= (0x01 << 28/**/);
+			wrmsr(0x1107, msreg);
+		}
+		via_feature_xcrypt |= VIA_HAS_SHA;
+	}
+	/* Enable MM engine if present and disabled */
+	if (val & VIA_CPUID_HAS_PMM) {
+		if (!(val & VIA_CPUID_DO_PMM)) {
+			msreg = rdmsr(0x1107);
+			msreg |= (0x01 << 28/**/);
+			wrmsr(0x1107, msreg);
+		}
+		via_feature_xcrypt |= VIA_HAS_MM;
+	}
+}
+
+/*
  * Initialize CPU control registers
  */
 void
@@ -81,4 +152,8 @@
 		wrmsr(MSR_EFER, msr);
 		pg_nx = PG_NX;
 	}
+	if (cpu_vendor_id == CPU_VENDOR_CENTAUR &&
+	    AMD64_CPU_FAMILY(cpu_id) == 0x6 &&
+	    AMD64_CPU_MODEL(cpu_id) >= 0xf)
+		init_via();
 }

==== //depot/projects/usb/src/sys/amd64/amd64/msi.c#6 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.8 2008/11/26 19:25:13 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.9 2009/01/12 19:17:35 jkim Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -51,6 +51,7 @@
 #include <machine/frame.h>
 #include <machine/intr_machdep.h>
 #include <machine/apicvar.h>
+#include <machine/specialreg.h>
 #include <dev/pci/pcivar.h>
 
 /* Fields in address for Intel MSI messages. */
@@ -212,9 +213,18 @@
 {
 
 	/* Check if we have a supported CPU. */
-	if (!(cpu_vendor_id == CPU_VENDOR_INTEL ||
-	    cpu_vendor_id == CPU_VENDOR_AMD))
+	switch (cpu_vendor_id) {
+	case CPU_VENDOR_INTEL:
+	case CPU_VENDOR_AMD:
+		break;
+	case CPU_VENDOR_CENTAUR:
+		if (AMD64_CPU_FAMILY(cpu_id) == 0x6 &&
+		    AMD64_CPU_MODEL(cpu_id) >= 0xf)
+			break;
+		/* FALLTHROUGH */
+	default:
 		return;
+	}
 
 	msi_enabled = 1;
 	intr_register_pic(&msi_pic);

==== //depot/projects/usb/src/sys/amd64/conf/GENERIC#19 (text+ko) ====

@@ -1,8 +1,8 @@
 #
 # GENERIC -- Generic kernel configuration file for FreeBSD/amd64
 #
-# For more information on this file, please read the handbook section on
-# Kernel Configuration Files:
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
 #
 #    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
 #
@@ -16,7 +16,7 @@
 # If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.512 2009/01/05 14:21:49 rwatson Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.513 2009/01/13 12:35:33 luigi Exp $
 
 cpu		HAMMER
 ident		GENERIC
@@ -24,6 +24,12 @@
 # To statically compile in device wiring instead of /boot/device.hints
 #hints		"GENERIC.hints"		# Default places to look for devices.
 
+# Use the following to compile in values accessible to the kernel
+# through getenv() (or kenv(1) in userland). The format of the file
+# is 'variable=value', see kenv(1)
+#
+# env          "GENERIC.env"
+
 makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols
 
 options 	SCHED_ULE		# ULE scheduler

==== //depot/projects/usb/src/sys/amd64/include/md_var.h#7 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/include/md_var.h,v 1.83 2008/11/26 19:25:13 jkim Exp $
+ * $FreeBSD: src/sys/amd64/include/md_var.h,v 1.84 2009/01/12 19:17:35 jkim Exp $
  */
 
 #ifndef _MACHINE_MD_VAR_H_
@@ -45,6 +45,8 @@
 extern	u_int	amd_feature;
 extern	u_int	amd_feature2;
 extern	u_int	amd_pminfo;
+extern	u_int	via_feature_rng;
+extern	u_int	via_feature_xcrypt;
 extern	u_int	cpu_fxsr;
 extern	u_int	cpu_high;
 extern	u_int	cpu_id;

==== //depot/projects/usb/src/sys/amd64/include/specialreg.h#12 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)specialreg.h	7.1 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.52 2009/01/05 21:51:49 jkim Exp $
+ * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.53 2009/01/12 19:17:35 jkim Exp $
  */
 
 #ifndef _MACHINE_SPECIALREG_H_
@@ -459,4 +459,40 @@
 #define	MSR_TOP_MEM2	0xc001001d	/* boundary for ram above 4G */
 #define	MSR_K8_UCODE_UPDATE	0xc0010020	/* update microcode */
 
+/* VIA ACE crypto featureset: for via_feature_rng */
+#define	VIA_HAS_RNG		1	/* cpu has RNG */
+
+/* VIA ACE crypto featureset: for via_feature_xcrypt */
+#define	VIA_HAS_AES		1	/* cpu has AES */
+#define	VIA_HAS_SHA		2	/* cpu has SHA1 & SHA256 */
+#define	VIA_HAS_MM		4	/* cpu has RSA instructions */
+#define	VIA_HAS_AESCTR		8	/* cpu has AES-CTR instructions */
+
+/* Centaur Extended Feature flags */
+#define	VIA_CPUID_HAS_RNG	0x000004
+#define	VIA_CPUID_DO_RNG	0x000008
+#define	VIA_CPUID_HAS_ACE	0x000040
+#define	VIA_CPUID_DO_ACE	0x000080
+#define	VIA_CPUID_HAS_ACE2	0x000100
+#define	VIA_CPUID_DO_ACE2	0x000200
+#define	VIA_CPUID_HAS_PHE	0x000400
+#define	VIA_CPUID_DO_PHE	0x000800
+#define	VIA_CPUID_HAS_PMM	0x001000
+#define	VIA_CPUID_DO_PMM	0x002000
+
+/* VIA ACE xcrypt-* instruction context control options */
+#define	VIA_CRYPT_CWLO_ROUND_M		0x0000000f
+#define	VIA_CRYPT_CWLO_ALG_M		0x00000070
+#define	VIA_CRYPT_CWLO_ALG_AES		0x00000000
+#define	VIA_CRYPT_CWLO_KEYGEN_M		0x00000080
+#define	VIA_CRYPT_CWLO_KEYGEN_HW	0x00000000
+#define	VIA_CRYPT_CWLO_KEYGEN_SW	0x00000080
+#define	VIA_CRYPT_CWLO_NORMAL		0x00000000
+#define	VIA_CRYPT_CWLO_INTERMEDIATE	0x00000100
+#define	VIA_CRYPT_CWLO_ENCRYPT		0x00000000
+#define	VIA_CRYPT_CWLO_DECRYPT		0x00000200
+#define	VIA_CRYPT_CWLO_KEY128		0x0000000a	/* 128bit, 10 rds */
+#define	VIA_CRYPT_CWLO_KEY192		0x0000040c	/* 192bit, 12 rds */
+#define	VIA_CRYPT_CWLO_KEY256		0x0000080e	/* 256bit, 15 rds */
+
 #endif /* !_MACHINE_SPECIALREG_H_ */

==== //depot/projects/usb/src/sys/boot/forth/support.4th#6 (text+ko) ====

@@ -22,7 +22,7 @@
 \ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 \ SUCH DAMAGE.
 \
-\ $FreeBSD: src/sys/boot/forth/support.4th,v 1.19 2009/01/05 20:09:54 luigi Exp $
+\ $FreeBSD: src/sys/boot/forth/support.4th,v 1.20 2009/01/13 12:28:14 luigi Exp $
 
 \ Loader.rc support functions:
 \
@@ -820,7 +820,7 @@
 \ Interface to loading conf files
 
 : load_conf  ( addr len -- )
-  ." ----- Trying conf " 2dup type cr
+  \ ." ----- Trying conf " 2dup type cr \ debugging
   0 to end_of_file?
   reset_line_reading
   O_RDONLY fopen fd !
@@ -912,7 +912,7 @@
 \ loader_conf_files processing support functions
 
 : get_conf_files ( -- addr len )  \ put addr/len on stack, reset var
-  ." -- starting on <" conf_files strtype ." >" cr
+  \ ." -- starting on <" conf_files strtype ." >" cr \ debugging
   conf_files strget 0 0 conf_files strset
 ;
 
@@ -939,8 +939,7 @@
     pos char+ to pos
   repeat
   addr len pos addr r@ + pos r> -
-  2dup
-  ." get_file_name has " type cr
+  \ 2dup ." get_file_name has " type cr \ debugging
 ;
 
 : get_next_file  ( addr len ptr -- addr len ptr' addr' len' | 0 )

==== //depot/projects/usb/src/sys/boot/i386/libi386/bootinfo64.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/bootinfo64.c,v 1.38 2008/10/07 14:05:42 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/bootinfo64.c,v 1.39 2009/01/12 16:28:19 jkim Exp $");
 
 #include <stand.h>
 #include <sys/param.h>
@@ -150,8 +150,9 @@
     cpu_vendor = (char *)vendor;
 
     /* Check for vendors that support AMD features. */
-    if (strncmp(cpu_vendor, "GenuineIntel", 12) != 0 &&
-	strncmp(cpu_vendor, "AuthenticAMD", 12) != 0)
+    if (strncmp(cpu_vendor, INTEL_VENDOR_ID, 12) != 0 &&
+	strncmp(cpu_vendor, AMD_VENDOR_ID, 12) != 0 &&
+	strncmp(cpu_vendor, CENTAUR_VENDOR_ID, 12) != 0)
 	return (0);
 
     /* Has to support AMD features. */

==== //depot/projects/usb/src/sys/cam/scsi/scsi_ch.c#5 (text+ko) ====

@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ch.c,v 1.46 2007/05/16 16:54:23 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ch.c,v 1.47 2009/01/10 17:22:49 trasz Exp $");
 
 #include <sys/param.h>
 #include <sys/queue.h>
@@ -262,9 +262,11 @@
 
 	softc = (struct ch_softc *)periph->softc;
 
+	xpt_print(periph->path, "removing device entry\n");
 	devstat_remove_entry(softc->device_stats);
+	cam_periph_unlock(periph);
 	destroy_dev(softc->dev);
-	xpt_print(periph->path, "removing device entry\n");
+	cam_periph_lock(periph);
 	free(softc, M_DEVBUF);
 }
 

==== //depot/projects/usb/src/sys/cam/scsi/scsi_pass.c#8 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_pass.c,v 1.50 2008/12/21 06:20:11 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_pass.c,v 1.51 2009/01/10 17:22:49 trasz Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -165,13 +165,12 @@
 
 	softc = (struct pass_softc *)periph->softc;
 
+	if (bootverbose)
+		xpt_print(periph->path, "removing device entry\n");
 	devstat_remove_entry(softc->device_stats);
-
+	cam_periph_unlock(periph);
 	destroy_dev(softc->dev);
-
-	if (bootverbose) {
-		xpt_print(periph->path, "removing device entry\n");
-	}
+	cam_periph_lock(periph);
 	free(softc, M_DEVBUF);
 }
 

==== //depot/projects/usb/src/sys/cam/scsi/scsi_pt.c#5 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_pt.c,v 1.47 2007/05/16 16:54:23 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_pt.c,v 1.48 2009/01/10 17:22:49 trasz Exp $");
 
 #include <sys/param.h>
 #include <sys/queue.h>
@@ -342,11 +342,11 @@
 
 	softc = (struct pt_softc *)periph->softc;
 
+	xpt_print(periph->path, "removing device entry\n");
 	devstat_remove_entry(softc->device_stats);
-
+	cam_periph_unlock(periph);
 	destroy_dev(softc->dev);
-
-	xpt_print(periph->path, "removing device entry\n");
+	cam_periph_lock(periph);
 	free(softc, M_DEVBUF);
 }
 

==== //depot/projects/usb/src/sys/cam/scsi/scsi_sa.c#7 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.114 2008/09/27 08:51:18 ed Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.115 2009/01/10 17:22:49 trasz Exp $");
 
 #include <sys/param.h>
 #include <sys/queue.h>
@@ -1377,17 +1377,16 @@
 
 	softc = (struct sa_softc *)periph->softc;
 
+	xpt_print(periph->path, "removing device entry\n");
 	devstat_remove_entry(softc->device_stats);
-
+	cam_periph_unlock(periph);
 	destroy_dev(softc->devs.ctl_dev);
-
 	for (i = 0; i < SA_NUM_MODES; i++) {
 		destroy_dev(softc->devs.mode_devs[i].r_dev);
 		destroy_dev(softc->devs.mode_devs[i].nr_dev);
 		destroy_dev(softc->devs.mode_devs[i].er_dev);
 	}
-
-	xpt_print(periph->path, "removing device entry\n");
+	cam_periph_lock(periph);
 	free(softc, M_SCSISA);
 }
 

==== //depot/projects/usb/src/sys/cam/scsi/scsi_ses.c#7 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ses.c,v 1.39 2008/09/27 08:51:18 ed Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ses.c,v 1.40 2009/01/10 17:22:49 trasz Exp $");
 
 #include <sys/param.h>
 #include <sys/queue.h>
@@ -227,9 +227,10 @@
 
 	softc = (struct ses_softc *)periph->softc;
 
+	xpt_print(periph->path, "removing device entry\n");
+	cam_periph_unlock(periph);
 	destroy_dev(softc->ses_dev);
-
-	xpt_print(periph->path, "removing device entry\n");
+	cam_periph_lock(periph);
 	free(softc, M_SCSISES);
 }
 

==== //depot/projects/usb/src/sys/cam/scsi/scsi_sg.c#5 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sg.c,v 1.11 2008/12/21 06:20:11 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sg.c,v 1.12 2009/01/10 17:22:49 trasz Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -200,11 +200,12 @@
 	struct sg_softc *softc;
 
 	softc = (struct sg_softc *)periph->softc;
+	if (bootverbose)
+		xpt_print(periph->path, "removing device entry\n");
 	devstat_remove_entry(softc->device_stats);
+	cam_periph_unlock(periph);
 	destroy_dev(softc->dev);
-	if (bootverbose) {
-		xpt_print(periph->path, "removing device entry\n");
-	}
+	cam_periph_lock(periph);
 	free(softc, M_DEVBUF);
 }
 

==== //depot/projects/usb/src/sys/conf/NOTES#25 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1520 2009/01/09 16:02:19 adrian Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1521 2009/01/11 11:36:00 maxim Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -635,11 +635,11 @@
 
 # IP optional behaviour.
 # IP_NONLOCALBIND disables the check that bind() usually makes that the
-# Address is one that is assigned to an interface on this machine.
+# address is one that is assigned to an interface on this machine.
 # It allows transparent proxies to pretend to be other machines.
 # How the packet GET to that machine is a problem solved elsewhere,
 # smart routers, ipfw fwd, etc.
-options        IP_NONLOCALBIND		#Allow impersonation for proxies.
+options        IP_NONLOCALBIND		# Allow impersonation for proxies.
 
 # netgraph(4). Enable the base netgraph code with the NETGRAPH option.
 # Individual node types can be enabled with the corresponding option

==== //depot/projects/usb/src/sys/conf/files.amd64#14 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.amd64,v 1.127 2009/01/01 13:26:53 ed Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.128 2009/01/12 19:23:46 jkim Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -128,6 +128,9 @@
 amd64/pci/pci_cfgreg.c		optional	pci
 crypto/blowfish/bf_enc.c	optional	crypto | ipsec 
 crypto/des/des_enc.c		optional	crypto | ipsec | netsmb
+crypto/via/padlock.c		optional	padlock
+crypto/via/padlock_cipher.c	optional	padlock
+crypto/via/padlock_hash.c	optional	padlock
 dev/acpica/acpi_if.m		standard
 dev/agp/agp_amd64.c			optional	agp
 dev/agp/agp_i810.c			optional	agp

==== //depot/projects/usb/src/sys/conf/files.powerpc#14 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.powerpc,v 1.88 2009/01/01 13:26:53 ed Exp $
+# $FreeBSD: src/sys/conf/files.powerpc,v 1.89 2009/01/13 15:41:58 raj Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -84,7 +84,6 @@
 powerpc/booke/locore.S		optional	e500 no-obj
 powerpc/booke/machdep.c		optional	e500
 powerpc/booke/pmap.c		optional	e500
-powerpc/booke/support.S		optional	e500
 powerpc/booke/swtch.S		optional	e500
 powerpc/booke/trap.c		optional	e500
 powerpc/booke/uio_machdep.c	optional	e500

==== //depot/projects/usb/src/sys/conf/kern.pre.mk#13 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.102 2008/12/01 16:53:01 sam Exp $
+# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.103 2009/01/12 16:54:41 gnn Exp $
 
 # Part of a unified Makefile for building kernels.  This part contains all
 # of the definitions that need to be before %BEFORE_DEPEND.
@@ -25,6 +25,7 @@
 .else
 . if defined(DEBUG)
 _MINUS_O=	-O
+CTFFLAGS+=	-g
 . else
 _MINUS_O=	-O2
 . endif

==== //depot/projects/usb/src/sys/conf/options#17 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.655 2009/01/09 16:02:19 adrian Exp $
+# $FreeBSD: src/sys/conf/options,v 1.656 2009/01/12 11:24:32 qingli Exp $
 #
 #        On the handling of kernel options
 #
@@ -411,6 +411,7 @@
 PPP_FILTER		opt_ppp.h
 RADIX_MPATH		opt_mpath.h
 ROUTETABLES		opt_route.h
+COMPAT_ROUTE_FLAGS	opt_route.h
 SLIP_IFF_OPTS		opt_slip.h
 TCPDEBUG
 TCP_OFFLOAD_DISABLE	opt_inet.h #Disable code to dispatch tcp offloading

==== //depot/projects/usb/src/sys/crypto/via/padlock.c#7 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.21 2008/11/17 19:00:36 philip Exp $");
+__FBSDID("$FreeBSD: src/sys/crypto/via/padlock.c,v 1.22 2009/01/12 19:23:46 jkim Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -35,7 +35,7 @@
 #include <sys/rwlock.h>
 #include <sys/malloc.h>
 #include <sys/libkern.h>
-#if defined(__i386__) && !defined(PC98)
+#if defined(__amd64__) || (defined(__i386__) && !defined(PC98))
 #include <machine/cpufunc.h>
 #include <machine/cputypes.h>
 #include <machine/md_var.h>
@@ -85,7 +85,7 @@
 {
 	char capp[256];
 
-#if defined(__i386__) && !defined(PC98)
+#if defined(__amd64__) || (defined(__i386__) && !defined(PC98))
 	/* If there is no AES support, we has nothing to do here. */
 	if (!(via_feature_xcrypt & VIA_HAS_AES)) {
 		device_printf(dev, "No ACE support.\n");

==== //depot/projects/usb/src/sys/crypto/via/padlock_hash.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/crypto/via/padlock_hash.c,v 1.2 2006/07/25 19:04:26 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/crypto/via/padlock_hash.c,v 1.3 2009/01/12 19:23:46 jkim Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -34,7 +34,7 @@
 #include <sys/malloc.h>
 #include <sys/libkern.h>
 #include <sys/endian.h>
-#if defined(__i386__) && !defined(PC98)
+#if defined(__amd64__) || (defined(__i386__) && !defined(PC98))
 #include <machine/cpufunc.h>
 #include <machine/cputypes.h>
 #include <machine/md_var.h>

==== //depot/projects/usb/src/sys/dev/agp/agp_amd64.c#2 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/agp/agp_amd64.c,v 1.16 2007/11/12 21:51:36 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/agp/agp_amd64.c,v 1.17 2009/01/12 16:07:03 jkim Exp $");
 
 #include "opt_bus.h"
 
@@ -167,14 +167,16 @@
 {
 	struct agp_amd64_softc *sc = device_get_softc(dev);
 	struct agp_gatt *gatt;
+	uint32_t devid;
 	int i, n, error;
 
-	for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++)
-		if (pci_cfgregread(0, i, 3, 0, 4) == 0x11031022) {
+	for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++) {
+		devid = pci_cfgregread(0, i, 3, 0, 4);
+		if (devid == 0x11031022 || devid == 0x12031022) {
 			sc->mctrl[n] = i;
 			n++;
 		}
-
+	}
 	if (n == 0)
 		return (ENXIO);
 

==== //depot/projects/usb/src/sys/dev/ata/ata-queue.c#9 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.75 2008/11/27 03:37:46 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.76 2009/01/12 17:18:58 obrien Exp $");
 
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -434,7 +434,8 @@
 		printf("\n");
 	}
 
-	if ((request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ?
+	if (!request->result &&
+	     (request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ?
 	     request->u.atapi.sense.key & ATA_SENSE_KEY_MASK : 
 	     request->error))
 	    request->result = EIO;

==== //depot/projects/usb/src/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c#2 (text+ko) ====

@@ -14,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: ar5212_rfgain.c,v 1.2 2008/11/19 21:23:01 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c,v 1.2 2009/01/13 05:50:22 sam Exp $
  */
 #include "opt_ah.h"
 
@@ -280,7 +280,8 @@
 	GAIN_VALUES *gv = &ahp->ah_gainValues;
 	uint32_t rddata, probeType;
 
-	if (!gv->active)
+	/* NB: beware of touching the BB when PHY is powered down */
+	if (!gv->active || !ahp->ah_phyPowerOn)
 		return HAL_RFGAIN_INACTIVE;
 
 	if (ahp->ah_rfgainState == HAL_RFGAIN_READ_REQUESTED) {

==== //depot/projects/usb/src/sys/dev/bce/if_bce.c#14 (text) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.47 2008/12/16 05:03:22 delphij Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.48 2009/01/13 07:12:32 delphij Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -106,6 +106,8 @@
 		"HP NC370T Multifunction Gigabit Server Adapter" },
 	{ BRCM_VENDORID, BRCM_DEVICEID_BCM5706,  HP_VENDORID, 0x3106,
 		"HP NC370i Multifunction Gigabit Server Adapter" },
+	{ BRCM_VENDORID, BRCM_DEVICEID_BCM5706,  HP_VENDORID, 0x3070,
+		"HP NC380T PCI Express Dual Port Multifunction Gigabit Server Adapter" },
 	{ BRCM_VENDORID, BRCM_DEVICEID_BCM5706,  PCI_ANY_ID,  PCI_ANY_ID,
 		"Broadcom NetXtreme II BCM5706 1000Base-T" },
 
@@ -116,18 +118,38 @@
 		"Broadcom NetXtreme II BCM5706 1000Base-SX" },
 
 	/* BCM5708C controllers and OEM boards. */
+	{ BRCM_VENDORID, BRCM_DEVICEID_BCM5708,  HP_VENDORID, 0x7037,
+		"HP NC373T PCI Express Multifunction Gigabit Server Adapter" },

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901131703.n0DH3BxV058008>