PERFORCE change 158295 for review

Marko Zec zec at FreeBSD.org
Wed Feb 25 13:45:21 PST 2009


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

Change 158295 by zec at zec_tpx32 on 2009/02/25 21:44:54

	IFC @ 158289
	
	... in hope for USB-related build breakages to disappear.

Affected files ...

.. //depot/projects/vimage/src/share/man/man4/usb2_core.4#2 integrate
.. //depot/projects/vimage/src/sys/amd64/amd64/mp_machdep.c#14 integrate
.. //depot/projects/vimage/src/sys/amd64/amd64/pmap.c#25 integrate
.. //depot/projects/vimage/src/sys/amd64/conf/NOTES#15 integrate
.. //depot/projects/vimage/src/sys/amd64/conf/USB2#3 delete
.. //depot/projects/vimage/src/sys/arm/mv/files.mv#5 integrate
.. //depot/projects/vimage/src/sys/arm/xscale/ixp425/files.ixp425#7 integrate
.. //depot/projects/vimage/src/sys/boot/i386/btx/btx/btx.S#5 integrate
.. //depot/projects/vimage/src/sys/compat/ndis/kern_ndis.c#9 integrate
.. //depot/projects/vimage/src/sys/compat/ndis/subr_hal.c#2 integrate
.. //depot/projects/vimage/src/sys/compat/ndis/subr_ndis.c#12 integrate
.. //depot/projects/vimage/src/sys/compat/ndis/subr_ntoskrnl.c#10 integrate
.. //depot/projects/vimage/src/sys/compat/ndis/subr_usbd.c#4 integrate
.. //depot/projects/vimage/src/sys/conf/NOTES#43 integrate
.. //depot/projects/vimage/src/sys/conf/files#57 integrate
.. //depot/projects/vimage/src/sys/contrib/altq/altq/altq_subr.c#15 integrate
.. //depot/projects/vimage/src/sys/dev/ata/chipsets/ata-jmicron.c#3 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ah.c#5 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ah.h#4 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ah_internal.h#6 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5210/ar5210.h#3 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c#3 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c#3 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5211/ar5211.h#3 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c#3 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c#4 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5212/ar2425.c#3 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5212/ar5212.h#4 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c#3 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c#5 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5212/ar5413.c#3 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5312/ar5312.h#4 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5416/ar2133.c#3 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5416/ar5416.h#3 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5416/ar5416.ini#2 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c#5 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5416/ar5416reg.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5416/ar9160.ini#2 integrate
.. //depot/projects/vimage/src/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/ath/if_ath.c#30 integrate
.. //depot/projects/vimage/src/sys/dev/ath/if_athvar.h#18 integrate
.. //depot/projects/vimage/src/sys/dev/drm/drmP.h#7 integrate
.. //depot/projects/vimage/src/sys/dev/drm/drm_drv.c#10 integrate
.. //depot/projects/vimage/src/sys/dev/drm/drm_irq.c#6 integrate
.. //depot/projects/vimage/src/sys/dev/drm/drm_lock.c#6 integrate
.. //depot/projects/vimage/src/sys/dev/drm/i915_dma.c#9 integrate
.. //depot/projects/vimage/src/sys/dev/drm/i915_drv.c#5 integrate
.. //depot/projects/vimage/src/sys/dev/drm/i915_drv.h#4 integrate
.. //depot/projects/vimage/src/sys/dev/drm/i915_irq.c#5 integrate
.. //depot/projects/vimage/src/sys/dev/drm/i915_reg.h#1 branch
.. //depot/projects/vimage/src/sys/dev/drm/radeon_irq.c#4 integrate
.. //depot/projects/vimage/src/sys/dev/mca/mca_bus.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/nsp/nsp.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/stg/tmc18c30.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/txp/3c990img.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/txp/if_txp.c#5 integrate
.. //depot/projects/vimage/src/sys/dev/txp/if_txpreg.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/bluetooth/ng_ubt.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/controller/at91dci.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/controller/at91dci.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/controller/atmegadci.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/controller/ehci.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/controller/musb_otg.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/controller/ohci.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/controller/uhci.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/controller/uss820dci.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/controller/uss820dci.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/controller/uss820dci_atmelarm.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/input/ums.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/input/usb_rdesc.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/net/if_aue.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/quirk/usb_quirk.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/serial/u3g.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/serial/ubser.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/serial/ufoma.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/serial/umct.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/serial/umodem.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/storage/umass.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/template/usb_template.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/template/usb_template_cdce.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/template/usb_template_msc.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/template/usb_template_mtp.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_controller.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_core.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_dev.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_device.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_device.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_generic.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_handle_request.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_hid.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_hid.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_hub.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_ioctl.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_request.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_request.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usb_transfer.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/usbdevs#42 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/if_rum.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/if_rumvar.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/if_ural.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/if_uralvar.h#2 integrate
.. //depot/projects/vimage/src/sys/i386/conf/NOTES#27 integrate
.. //depot/projects/vimage/src/sys/i386/conf/USB2#3 delete
.. //depot/projects/vimage/src/sys/i386/i386/mp_machdep.c#15 integrate
.. //depot/projects/vimage/src/sys/i386/i386/pmap.c#24 integrate
.. //depot/projects/vimage/src/sys/i386/i386/vm86.c#3 integrate
.. //depot/projects/vimage/src/sys/i386/isa/npx.c#7 integrate
.. //depot/projects/vimage/src/sys/legacy/dev/usb/usbdevs#2 delete
.. //depot/projects/vimage/src/sys/netinet/in_rmx.c#29 integrate
.. //depot/projects/vimage/src/sys/netinet/sctp_input.c#32 integrate
.. //depot/projects/vimage/src/sys/netinet/tcp_usrreq.c#32 integrate
.. //depot/projects/vimage/src/sys/netinet6/in6_rmx.c#30 integrate
.. //depot/projects/vimage/src/sys/netipsec/key.c#36 integrate
.. //depot/projects/vimage/src/sys/nfsclient/nfs_vnops.c#29 integrate
.. //depot/projects/vimage/src/sys/nfsserver/nfs_syscalls.c#14 integrate
.. //depot/projects/vimage/src/sys/security/mac/mac_process.c#9 integrate
.. //depot/projects/vimage/src/sys/vm/vm_fault.c#13 integrate
.. //depot/projects/vimage/src/sys/vm/vm_kern.c#12 integrate
.. //depot/projects/vimage/src/sys/vm/vm_map.c#14 integrate
.. //depot/projects/vimage/src/sys/vm/vm_map.h#7 integrate
.. //depot/projects/vimage/src/sys/vm/vm_mmap.c#17 integrate
.. //depot/projects/vimage/src/sys/vm/vm_pager.c#3 integrate
.. //depot/projects/vimage/src/sys/vm/vm_unix.c#3 integrate
.. //depot/projects/vimage/src/usr.bin/kdump/mkioctls#3 integrate

Differences ...

==== //depot/projects/vimage/src/share/man/man4/usb2_core.4#2 (text+ko) ====

@@ -1,4 +1,4 @@
-.\" $FreeBSD: src/share/man/man4/usb2_core.4,v 1.1 2008/11/04 02:31:03 alfred Exp $
+.\" $FreeBSD: src/share/man/man4/usb2_core.4,v 1.2 2009/02/24 03:40:09 thompsa Exp $
 .\"
 .\" Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
 .\"
@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd September 20, 2008
+.Dd February 17, 2009
 .Dt USB2_CORE 4
 .Os
 .
@@ -459,6 +459,11 @@
 This flag allows the received transfer length, "xfer->actlen" to be
 less than "xfer->sumlen" upon completion of a transfer.  This flag can
 be changed during operation.
+.It short_frames_ok
+This flag allows the reception of multiple short USB frames. This flag
+only has effect for BULK and INTERRUPT endpoints and if the number of
+frames received is greater than 1. This flag can be changed during
+operation.
 .It pipe_bof
 This flag causes a failing USB transfer to remain first in the PIPE
 queue except in the case of "xfer->error" equal to

==== //depot/projects/vimage/src/sys/amd64/amd64/mp_machdep.c#14 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.297 2009/02/03 09:01:45 jkoshy Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.298 2009/02/25 01:49:01 sobomax Exp $");
 
 #include "opt_cpu.h"
 #include "opt_kstack_pages.h"
@@ -151,6 +151,7 @@
 	int	cpu_present:1;
 	int	cpu_bsp:1;
 	int	cpu_disabled:1;
+	int	cpu_hyperthread:1;
 } static cpu_info[MAX_APIC_ID + 1];
 int cpu_apic_ids[MAXCPU];
 int apic_cpuids[MAX_APIC_ID + 1];
@@ -353,11 +354,6 @@
 	cpu_apic_ids[0] = boot_cpu_id;
 	apic_cpuids[boot_cpu_id] = 0;
 
-	assign_cpu_ids();
-
-	/* Start each Application Processor */
-	start_all_aps();
-
 	/* Setup the initial logical CPUs info. */
 	logical_cpus = logical_cpus_mask = 0;
 	if (cpu_feature & CPUID_HTT)
@@ -404,6 +400,11 @@
 			hyperthreading_cpus = logical_cpus;
 	}
 
+	assign_cpu_ids();
+
+	/* Start each Application Processor */
+	start_all_aps();
+
 	set_interrupt_apic_ids();
 }
 
@@ -415,18 +416,26 @@
 cpu_mp_announce(void)
 {
 	int i, x;
+	const char *hyperthread;
 
 	/* List CPUs */
 	printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id);
 	for (i = 1, x = 0; x <= MAX_APIC_ID; x++) {
 		if (!cpu_info[x].cpu_present || cpu_info[x].cpu_bsp)
 			continue;
+		if (cpu_info[x].cpu_hyperthread) {
+			hyperthread = "/HT";
+		} else {
+			hyperthread = "";
+		}
 		if (cpu_info[x].cpu_disabled)
-			printf("  cpu (AP): APIC ID: %2d (disabled)\n", x);
+			printf("  cpu (AP%s): APIC ID: %2d (disabled)\n",
+			    hyperthread, x);
 		else {
 			KASSERT(i < mp_ncpus,
 			    ("mp_ncpus and actual cpus are out of whack"));
-			printf(" cpu%d (AP): APIC ID: %2d\n", i++, x);
+			printf(" cpu%d (AP%s): APIC ID: %2d\n", i++,
+			    hyperthread, x);
 		}
 	}
 }
@@ -642,11 +651,28 @@
 {
 	u_int i;
 
+	TUNABLE_INT_FETCH("machdep.hyperthreading_allowed",
+	    &hyperthreading_allowed);
+
 	/* Check for explicitly disabled CPUs. */
 	for (i = 0; i <= MAX_APIC_ID; i++) {
 		if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp)
 			continue;
 
+		if (hyperthreading_cpus > 1 && i % hyperthreading_cpus != 0) {
+			cpu_info[i].cpu_hyperthread = 1;
+#if defined(SCHED_ULE)
+			/*
+			 * Don't use HT CPU if it has been disabled by a
+			 * tunable.
+			 */
+			if (hyperthreading_allowed == 0) {
+				cpu_info[i].cpu_disabled = 1;
+				continue;
+			}
+#endif
+		}
+
 		/* Don't use this CPU if it has been disabled by a tunable. */
 		if (resource_disabled("lapic", i)) {
 			cpu_info[i].cpu_disabled = 1;
@@ -1198,6 +1224,16 @@
 	if (error || !req->newptr)
 		return (error);
 
+#ifdef SCHED_ULE
+	/*
+	 * SCHED_ULE doesn't allow enabling/disabling HT cores at
+	 * tun time.
+	 */
+	if (allowed != hyperthreading_allowed)
+		return (ENOTSUP);
+	return (error);
+#endif
+
 	if (allowed)
 		hlt_cpus_mask &= ~hyperthreading_cpus_mask;
 	else
@@ -1242,8 +1278,6 @@
 		 * of hlt_logical_cpus.
 		 */
 		if (hyperthreading_cpus_mask) {
-			TUNABLE_INT_FETCH("machdep.hyperthreading_allowed",
-			    &hyperthreading_allowed);
 			SYSCTL_ADD_PROC(&logical_cpu_clist,
 			    SYSCTL_STATIC_CHILDREN(_machdep), OID_AUTO,
 			    "hyperthreading_allowed", CTLTYPE_INT|CTLFLAG_RW,

==== //depot/projects/vimage/src/sys/amd64/amd64/pmap.c#25 (text+ko) ====

@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.648 2009/02/23 06:00:24 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.649 2009/02/25 20:26:48 jkim Exp $");
 
 /*
  *	Manages physical address maps.
@@ -594,7 +594,6 @@
 	if (!(cpu_feature & CPUID_PAT))
 		panic("no PAT??");
 
-#ifdef PAT_WORKS
 	/*
 	 * Leave the indices 0-3 at the default of WB, WT, UC, and UC-.
 	 * Program 4 and 5 as WP and WC.
@@ -604,23 +603,6 @@
 	pat_msr &= ~(PAT_MASK(4) | PAT_MASK(5));
 	pat_msr |= PAT_VALUE(4, PAT_WRITE_PROTECTED) |
 	    PAT_VALUE(5, PAT_WRITE_COMBINING);
-#else
-	/*
-	 * Due to some Intel errata, we can only safely use the lower 4
-	 * PAT entries.  Thus, just replace PAT Index 2 with WC instead
-	 * of UC-.
-	 *
-	 *   Intel Pentium III Processor Specification Update
-	 * Errata E.27 (Upper Four PAT Entries Not Usable With Mode B
-	 * or Mode C Paging)
-	 *
-	 *   Intel Pentium IV  Processor Specification Update
-	 * Errata N46 (PAT Index MSB May Be Calculated Incorrectly)
-	 */
-	pat_msr = rdmsr(MSR_PAT);
-	pat_msr &= ~PAT_MASK(2);
-	pat_msr |= PAT_VALUE(2, PAT_WRITE_COMBINING);
-#endif
 	wrmsr(MSR_PAT, pat_msr);
 }
 
@@ -783,10 +765,9 @@
 			break;
 		}
 	}
-	
+
 	/* Map the caching mode to a PAT index. */
 	switch (mode) {
-#ifdef PAT_WORKS
 	case PAT_UNCACHEABLE:
 		pat_index = 3;
 		break;
@@ -805,25 +786,9 @@
 	case PAT_WRITE_PROTECTED:
 		pat_index = 4;
 		break;
-#else
-	case PAT_UNCACHED:
-	case PAT_UNCACHEABLE:
-	case PAT_WRITE_PROTECTED:
-		pat_index = 3;
-		break;
-	case PAT_WRITE_THROUGH:
-		pat_index = 1;
-		break;
-	case PAT_WRITE_BACK:
-		pat_index = 0;
-		break;
-	case PAT_WRITE_COMBINING:
-		pat_index = 2;
-		break;
-#endif
 	default:
 		panic("Unknown caching mode %d\n", mode);
-	}	
+	}
 
 	/* Map the 3-bit index value into the PAT, PCD, and PWT bits. */
 	cache_bits = 0;

==== //depot/projects/vimage/src/sys/amd64/conf/NOTES#15 (text+ko) ====

@@ -4,7 +4,7 @@
 # This file contains machine dependent kernel configuration notes.  For
 # machine independent notes, look in /sys/conf/NOTES.
 #
-# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.86 2009/02/07 00:01:10 wkoszek Exp $
+# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.87 2009/02/24 00:39:48 thompsa Exp $
 #
 
 #
@@ -509,5 +509,5 @@
 options 	VM_KMEM_SIZE_SCALE
 
 # Enable NDIS binary driver support
-options 	NDISAPI
-device		ndis
+#options 	NDISAPI
+#device		ndis

==== //depot/projects/vimage/src/sys/arm/mv/files.mv#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/arm/mv/files.mv,v 1.4 2009/02/16 21:42:41 marcel Exp $
+# $FreeBSD: src/sys/arm/mv/files.mv,v 1.5 2009/02/24 23:30:52 thompsa Exp $
 #
 # The Marvell CPU cores
 # - Compliant with V5TE architecture
@@ -32,5 +32,4 @@
 dev/uart/uart_bus_mbus.c	optional	uart
 dev/uart/uart_cpu_mv.c		optional	uart
 dev/uart/uart_dev_ns8250.c	optional	uart
-dev/usb/ehci_mbus.c		optional	ehci
-dev/usb2/controller/ehci2_mbus.c optional usb2_core usb2_controller usb2_controller_ehci
+dev/usb/controller/ehci_mbus.c	optional	ehci

==== //depot/projects/vimage/src/sys/arm/xscale/ixp425/files.ixp425#7 (text+ko) ====

@@ -1,4 +1,4 @@
-#$FreeBSD: src/sys/arm/xscale/ixp425/files.ixp425,v 1.8 2009/02/03 19:16:04 sam Exp $
+#$FreeBSD: src/sys/arm/xscale/ixp425/files.ixp425,v 1.9 2009/02/24 23:34:02 thompsa Exp $
 arm/arm/bus_space_generic.c		standard
 arm/arm/cpufunc_asm_xscale.S		standard
 arm/arm/irq_dispatch.S			standard
@@ -46,4 +46,5 @@
 #
 arm/xscale/ixp425/ixp425_qmgr.c		optional qmgr
 #
-dev/usb/ehci_ixp4xx.c			optional ehci
+dev/usb/controller/ehci_ixp4xx.c	optional ehci usb
+legacy/dev/usb/ehci_ixp4xx.c		optional ehci ousb

==== //depot/projects/vimage/src/sys/boot/i386/btx/btx/btx.S#5 (text+ko) ====

@@ -12,7 +12,7 @@
  * warranties of merchantability and fitness for a particular
  * purpose.
  *
- * $FreeBSD: src/sys/boot/i386/btx/btx/btx.S,v 1.47 2008/08/08 19:39:11 jhb Exp $
+ * $FreeBSD: src/sys/boot/i386/btx/btx/btx.S,v 1.48 2009/02/24 23:11:15 jhb Exp $
  */
 
 /*
@@ -36,6 +36,7 @@
 /*
  * Fields in %eflags.
  */
+		.set PSL_RESERVED_DEFAULT,0x00000002
 		.set PSL_T,0x00000100		# Trap flag
 		.set PSL_I,0x00000200		# Interrupt enable flag
 		.set PSL_VM,0x00020000		# Virtual 8086 mode flag
@@ -455,6 +456,18 @@
  * -0x3c %fs
  * -0x40 %ds
  * -0x44 %es
+ * -0x48 zero %eax (hardware int only)	
+ * -0x4c zero %ecx (hardware int only)
+ * -0x50 zero %edx (hardware int only)
+ * -0x54 zero %ebx (hardware int only)
+ * -0x58 zero %esp (hardware int only)
+ * -0x5c zero %ebp (hardware int only)
+ * -0x60 zero %esi (hardware int only)
+ * -0x64 zero %edi (hardware int only)
+ * -0x68 zero %gs (hardware int only)
+ * -0x6c zero %fs (hardware int only)
+ * -0x70 zero %ds (hardware int only)
+ * -0x74 zero %es (hardware int only)
  */
 int_hw: 	cld				# String ops inc
 		pusha				# Save gp regs
@@ -467,12 +480,15 @@
 		pushl %ds			#  address
 		popl %es			#  data
 		leal 0x44(%esp,1),%esi		# Base of frame
+		movl %esp,MEM_ESPR-0x04		# Save kernel stack pointer
 		movl -0x14(%esi),%eax		# Get Int no
 		cmpl $-1,%eax			# Hardware interrupt?
-		jne intusr.2			# Yes
+		jne intusr.1			# Yes
 /*
- * v86 calls save the btx_v86 pointer on the real mode stack and read the
- * address and flags from the btx_v86 structure.
+ * v86 calls save the btx_v86 pointer on the real mode stack and read
+ * the address and flags from the btx_v86 structure.  For interrupt
+ * handler invocations (VM86 INTx requests), disable interrupts,
+ * tracing, and alignment checking while the handler runs.
  */
 		movl $MEM_USR,%ebx		# User base
 		movl %ebx,%edx			#  address
@@ -482,35 +498,36 @@
 		movl %edx,MEM_ESPR-0x08		# Save btx_v86 ptr
 		movl V86_ADDR(%edx),%eax	# Get int no/address
 		movl V86_CTL(%edx),%edx		# Get control flags
+		movl -0x08(%esi),%ebx		# Save user flags in %ebx
+		testl $V86F_ADDR,%edx		# Segment:offset?
+		jnz intusr.4			# Yes
+		andl $~(PSL_I|PSL_T|PSL_AC),%ebx # Disable interrupts, tracing,
+						#  and alignment checking for
+						#  interrupt handler
 		jmp intusr.3			# Skip hardware interrupt
 /*
- * Hardware interrupts store a NULL btx_v86 pointer and use the address
- * (interrupt number) from the stack with empty flags.  Also, we clear
- * the segment registers for the interrupt handler.
+ * Hardware interrupts store a NULL btx_v86 pointer and use the
+ * address (interrupt number) from the stack with empty flags.  Also,
+ * push a dummy frame of zeros onto the stack for all the general
+ * purpose and segment registers and clear %eflags.  This gives the
+ * hardware interrupt handler a clean slate.
  */
-intusr.2:	xorl %edx,%edx			# Control flags
+intusr.1:	xorl %edx,%edx			# Control flags
 		movl %edx,MEM_ESPR-0x08		# NULL btx_v86 ptr
-		movl %edx,-0x38(%esi)		# Real mode %gs of 0
-		movl %edx,-0x3c(%esi)		# Real mode %fs of 0
-		movl %edx,-0x40(%esi)		# Real mode %ds of 0
-		movl %edx,-0x44(%esi)		# Real mode %es of 0
+		movl $12,%ecx			# Frame is 12 dwords
+intusr.2:	pushl $0x0			# Fill frame
+		loop intusr.2			#  with zeros
+		movl $PSL_RESERVED_DEFAULT,%ebx # Set clean %eflags
 /*
- * %eax now holds either the interrupt number or segment:offset of function.
- * %edx now holds the V86F_* flags.
- *
- * For interrupt handler invocations (either hardware interrupts or VM86
- * INTx requests) we also disable interrupts, tracing, and alignment checking
- * while the handler runs.
+ * Look up real mode IDT entry for hardware interrupts and VM86 INTx
+ * requests.
  */
-intusr.3:	movl -0x08(%esi),%ebx		# Save user flags in %ebx
-		testl $V86F_ADDR,%edx		# Segment:offset?
-		jnz intusr.4			# Yes
-		shll $0x2,%eax			# Scale
+intusr.3:	shll $0x2,%eax			# Scale
 		movl (%eax),%eax		# Load int vector
-		andl $~(PSL_I|PSL_T|PSL_AC),%ebx # Disable interrupts, tracing,
-						#  and alignment checking for
-						#  interrupt handler
 		jmp intusr.5			# Skip CALLF test
+/*
+ * Panic if V86F_CALLF isn't set with V86F_ADDR.
+ */
 intusr.4:	testl $V86F_CALLF,%edx		# Far call?
 		jnz intusr.5			# Ok
 		movl %edx,0x30(%esp,1)		# Place VM86 flags in int no
@@ -522,6 +539,11 @@
 		popl %gs
 		popal				# Restore gp regs
 		jmp ex_noc			# Panic
+/*
+ * %eax now holds the segment:offset of the function.
+ * %ebx now holds the %eflags to pass to real mode.
+ * %edx now holds the V86F_* flags.
+ */
 intusr.5:	movw %bx,MEM_ESPR-0x12		# Pass user flags to real mode
 						#  target
 /*
@@ -536,8 +558,7 @@
 		rep				#  from btx_v86
 		movsl				#  to kernel stack
 		popl %esi			# Restore
-intusr.6:	movl %esp,MEM_ESPR-0x04		# Save kernel stack pointer
-		movl -0x08(%esi),%ebx		# Copy user flags to real
+intusr.6:	movl -0x08(%esi),%ebx		# Copy user flags to real
 		movl %ebx,MEM_ESPR-0x0c		#  mode return trampoline
 		movl $rret_tramp,%ebx		# Set return trampoline
 		movl %ebx,MEM_ESPR-0x10		#  CS:IP
@@ -611,9 +632,16 @@
 		movb $SEL_TSS,%cl		# Set task
 		ltr %cx				#  register
 /*
- * Now we are back in protected mode.  Copy the registers off of the real
- * mode stack onto the kernel stack.  Also, initialize all the seg regs on
- * the kernel stack.
+ * Now we are back in protected mode.  The kernel stack frame set up
+ * before entering real mode is still intact. For hardware interrupts,
+ * leave the frame unchanged.
+ */
+		cmpl $0,MEM_ESPR-0x08		# Leave saved regs unchanged
+		jz rret_tramp.3			#  for hardware ints
+/*
+ * For V86 calls, copy the registers off of the real mode stack onto
+ * the kernel stack as we want their updated values.  Also, initialize
+ * the segment registers on the kernel stack.
  *
  * Note that the %esp in the kernel stack after this is garbage, but popa
  * ignores it, so we don't have to fix it up.
@@ -624,20 +652,17 @@
 		movl $8,%ecx			# Copy GP regs from
 		rep				#  real mode stack
 		movsl				#  to kernel stack
-		popl %esi			# Restore
 		movl $SEL_UDATA,%eax		# Selector for data seg regs
 		movl $4,%ecx			# Initialize %ds,
 		rep				#  %es, %fs, and
 		stosl				#  %gs
 /*
- * If this was a V86 call, copy the saved seg regs on the real mode stack
- * back over to the btx_v86 structure.  Also, conditionally update the saved
- * eflags on the kernel stack based on the flags from the user.
+ * For V86 calls, copy the saved seg regs on the real mode stack back
+ * over to the btx_v86 structure.  Also, conditionally update the
+ * saved eflags on the kernel stack based on the flags from the user.
  */
 		movl MEM_ESPR-0x08,%ecx		# Get btx_v86 ptr
-		jecxz rret_tramp.3		# Skip for hardware ints
 		leal V86_GS(%ecx),%edi		# %edi => btx_v86 seg regs
-		pushl %esi			# Save
 		leal MEM_ESPR-0x2c,%esi		# %esi => real mode seg regs
 		xchgl %ecx,%edx			# Save btx_v86 ptr
 		movl $4,%ecx			# Copy seg regs

==== //depot/projects/vimage/src/sys/compat/ndis/kern_ndis.c#9 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.101 2009/02/23 18:16:17 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.102 2009/02/24 18:09:31 rdivacky Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -258,10 +258,8 @@
 }
 
 static void
-ndis_resetdone_func(adapter, status, addressingreset)
-	ndis_handle		adapter;
-	ndis_status		status;
-	uint8_t			addressingreset;
+ndis_resetdone_func(ndis_handle adapter, ndis_status status,
+	uint8_t addressingreset)
 {
 	ndis_miniport_block	*block;
 	struct ndis_softc	*sc;

==== //depot/projects/vimage/src/sys/compat/ndis/subr_hal.c#2 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_hal.c,v 1.28 2006/05/16 14:37:57 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_hal.c,v 1.29 2009/02/24 18:09:31 rdivacky Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -142,18 +142,14 @@
 }
 
 static void
-WRITE_PORT_USHORT(port, val)
-	uint16_t		*port;
-	uint16_t		val;
+WRITE_PORT_USHORT(uint16_t *port, uint16_t val)
 {
 	bus_space_write_2(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
 	return;
 }
 
 static void
-WRITE_PORT_UCHAR(port, val)
-	uint8_t			*port;
-	uint8_t			val;
+WRITE_PORT_UCHAR(uint8_t *port, uint8_t val)
 {
 	bus_space_write_1(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
 	return;
@@ -378,9 +374,7 @@
 }
 
 void
-KfReleaseSpinLock(lock, newirql)
-	kspin_lock		*lock;
-	uint8_t			newirql;
+KfReleaseSpinLock(kspin_lock *lock, uint8_t newirql)
 {
 	KeReleaseSpinLockFromDpcLevel(lock);
 	KeLowerIrql(newirql);
@@ -407,8 +401,7 @@
 }
 
 uint8_t
-KfRaiseIrql(irql)
-	uint8_t			irql;
+KfRaiseIrql(uint8_t irql)
 {
 	uint8_t			oldirql;
 
@@ -428,8 +421,7 @@
 }
 
 void 
-KfLowerIrql(oldirql)
-	uint8_t			oldirql;
+KfLowerIrql(uint8_t oldirql)
 {
 	if (oldirql == DISPATCH_LEVEL)
 		return;
@@ -453,8 +445,7 @@
 }
 
 static void
-_KeLowerIrql(oldirql)
-	uint8_t			oldirql;
+_KeLowerIrql(uint8_t oldirql)
 {
 	KeLowerIrql(oldirql);
 	return;

==== //depot/projects/vimage/src/sys/compat/ndis/subr_ndis.c#12 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.116 2009/02/23 18:16:17 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.117 2009/02/24 18:09:31 rdivacky Exp $");
 
 /*
  * This file implements a translation layer between the BSD networking
@@ -905,10 +905,8 @@
 }
 
 static void
-NdisAcquireReadWriteLock(lock, writeacc, state)
-	ndis_rw_lock		*lock;
-	uint8_t			writeacc;
-	ndis_lock_state		*state;
+NdisAcquireReadWriteLock(ndis_rw_lock *lock, uint8_t writeacc,
+    ndis_lock_state *state)
 {
 	if (writeacc == TRUE) {
 		KeAcquireSpinLock(&lock->nrl_spinlock, &state->nls_oldirql);
@@ -1091,13 +1089,9 @@
 }
 
 static void
-NdisMStartBufferPhysicalMapping(adapter, buf, mapreg, writedev, addrarray, arraysize)
-	ndis_handle		adapter;
-	ndis_buffer		*buf;
-	uint32_t		mapreg;
-	uint8_t			writedev;
-	ndis_paddr_unit		*addrarray;
-	uint32_t		*arraysize;
+NdisMStartBufferPhysicalMapping(ndis_handle adapter, ndis_buffer *buf,
+    uint32_t mapreg, uint8_t writedev, ndis_paddr_unit *addrarray,
+    uint32_t *arraysize)
 {
 	ndis_miniport_block	*block;
 	struct ndis_softc	*sc;
@@ -1474,12 +1468,8 @@
 }
 
 static ndis_status
-NdisMAllocateMapRegisters(adapter, dmachannel, dmasize, physmapneeded, maxmap)
-	ndis_handle		adapter;
-	uint32_t		dmachannel;
-	uint8_t			dmasize;
-	uint32_t		physmapneeded;
-	uint32_t		maxmap;
+NdisMAllocateMapRegisters(ndis_handle adapter, uint32_t dmachannel,
+    uint8_t dmasize, uint32_t physmapneeded, uint32_t maxmap)
 {
 	struct ndis_softc	*sc;
 	ndis_miniport_block	*block;
@@ -1557,12 +1547,8 @@
  */
 
 static void
-NdisMAllocateSharedMemory(adapter, len, cached, vaddr, paddr)
-	ndis_handle		adapter;
-	uint32_t		len;
-	uint8_t			cached;
-	void			**vaddr;
-	ndis_physaddr		*paddr;
+NdisMAllocateSharedMemory(ndis_handle adapter, uint32_t len, uint8_t cached,
+    void **vaddr, ndis_physaddr *paddr)
 {
 	ndis_miniport_block	*block;
 	struct ndis_softc	*sc;
@@ -1680,11 +1666,8 @@
 }
 
 static ndis_status
-NdisMAllocateSharedMemoryAsync(adapter, len, cached, ctx)
-	ndis_handle		adapter;
-	uint32_t		len;
-	uint8_t			cached;
-	void			*ctx;
+NdisMAllocateSharedMemoryAsync(ndis_handle adapter, uint32_t len,
+    uint8_t cached, void *ctx)
 {
 	ndis_miniport_block	*block;
 	struct ndis_allocwork	*w;
@@ -1717,12 +1700,8 @@
 }
 
 static void
-NdisMFreeSharedMemory(adapter, len, cached, vaddr, paddr)
-	ndis_handle		adapter;
-	uint32_t		len;
-	uint8_t			cached;
-	void			*vaddr;
-	ndis_physaddr		paddr;
+NdisMFreeSharedMemory(ndis_handle adapter, uint32_t len, uint8_t cached,
+    void *vaddr, ndis_physaddr paddr)
 {
 	ndis_miniport_block	*block;
 	struct ndis_softc	*sc;
@@ -1829,10 +1808,8 @@
  */
 
 static ndis_status
-NdisMInitializeScatterGatherDma(adapter, is64, maxphysmap)
-	ndis_handle		adapter;
-	uint8_t			is64;
-	uint32_t		maxphysmap;
+NdisMInitializeScatterGatherDma(ndis_handle adapter, uint8_t is64,
+    uint32_t maxphysmap)
 {
 	struct ndis_softc	*sc;
 	ndis_miniport_block	*block;
@@ -2433,14 +2410,9 @@
 }
 
 static ndis_status
-NdisMRegisterInterrupt(intr, adapter, ivec, ilevel, reqisr, shared, imode)
-	ndis_miniport_interrupt	*intr;
-	ndis_handle		adapter;
-	uint32_t		ivec;
-	uint32_t		ilevel;
-	uint8_t			reqisr;
-	uint8_t			shared;
-	ndis_interrupt_mode	imode;
+NdisMRegisterInterrupt(ndis_miniport_interrupt *intr, ndis_handle adapter,
+    uint32_t ivec, uint32_t ilevel, uint8_t reqisr, uint8_t shared,
+    ndis_interrupt_mode imode)
 {
 	ndis_miniport_block	*block;
 	ndis_miniport_characteristics *ch;

==== //depot/projects/vimage/src/sys/compat/ndis/subr_ntoskrnl.c#10 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.97 2008/12/27 08:03:32 weongyo Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.98 2009/02/24 18:09:31 rdivacky Exp $");
 
 #include <sys/ctype.h>
 #include <sys/unistd.h>
@@ -446,10 +446,7 @@
 }
 
 static void *
-ntoskrnl_memchr(buf, ch, len)
-	void			*buf;
-	unsigned char		ch;
-	size_t			len;
+ntoskrnl_memchr(void *buf, unsigned char ch, size_t len)
 {
 	if (len != 0) {
 		unsigned char *p = buf;
@@ -520,10 +517,8 @@
 }
 
 static uint8_t 
-RtlEqualUnicodeString(str1, str2, caseinsensitive)
-	unicode_string		*str1;
-	unicode_string		*str2;
-	uint8_t			caseinsensitive;
+RtlEqualUnicodeString(unicode_string *str1, unicode_string *str2,
+	uint8_t caseinsensitive)
 {
 	int			i;
 
@@ -595,10 +590,7 @@
 }
 
 uint32_t
-RtlUnicodeStringToAnsiString(dest, src, allocate)
-	ansi_string		*dest;
-	unicode_string		*src;
-	uint8_t			allocate;
+RtlUnicodeStringToAnsiString(ansi_string *dest, unicode_string *src, uint8_t allocate)
 {
 	if (dest == NULL || src == NULL)
 		return(STATUS_INVALID_PARAMETER);
@@ -626,10 +618,8 @@
 }
 
 uint32_t
-RtlAnsiStringToUnicodeString(dest, src, allocate)
-	unicode_string		*dest;
-	ansi_string		*src;
-	uint8_t			allocate;
+RtlAnsiStringToUnicodeString(unicode_string *dest, ansi_string *src,
+	uint8_t allocate)
 {
 	if (dest == NULL || src == NULL)
 		return(STATUS_INVALID_PARAMETER);
@@ -727,14 +717,9 @@
 
 
 uint32_t
-IoCreateDevice(drv, devextlen, devname, devtype, devchars, exclusive, newdev)
-	driver_object		*drv;
-	uint32_t		devextlen;
-	unicode_string		*devname;
-	uint32_t		devtype;
-	uint32_t		devchars;
-	uint8_t			exclusive;
-	device_object		**newdev;
+IoCreateDevice(driver_object *drv, uint32_t devextlen, unicode_string *devname,
+	uint32_t devtype, uint32_t devchars, uint8_t exclusive,
+	device_object **newdev)
 {
 	device_object		*dev;
 
@@ -952,17 +937,9 @@
 }
 
 static irp *
-IoBuildDeviceIoControlRequest(iocode, dobj, ibuf, ilen, obuf, olen,
-    isinternal, event, status)
-	uint32_t		iocode;
-	device_object		*dobj;
-	void			*ibuf;
-	uint32_t		ilen;
-	void			*obuf;
-	uint32_t		olen;
-	uint8_t			isinternal;
-	nt_kevent		*event;
-	io_status_block		*status;
+IoBuildDeviceIoControlRequest(uint32_t iocode, device_object *dobj, void *ibuf,
+	uint32_t ilen, void *obuf, uint32_t olen, uint8_t isinternal,
+	nt_kevent *event, io_status_block *status)
 {
 	irp			*ip;
 	io_stack_location	*sl;
@@ -1048,9 +1025,7 @@
 }
 
 static irp *
-IoAllocateIrp(stsize, chargequota)
-	uint8_t			stsize;
-	uint8_t			chargequota;
+IoAllocateIrp(uint8_t stsize, uint8_t chargequota)
 {
 	irp			*i;
 
@@ -1064,9 +1039,7 @@
 }
 
 static irp *
-IoMakeAssociatedIrp(ip, stsize)
-	irp			*ip;
-	uint8_t			stsize;
+IoMakeAssociatedIrp(irp *ip, uint8_t stsize)
 {
 	irp			*associrp;
 
@@ -1093,10 +1066,7 @@
 }
 
 static void
-IoInitializeIrp(io, psize, ssize)
-	irp			*io;
-	uint16_t		psize;
-	uint8_t			ssize;
+IoInitializeIrp(irp *io, uint16_t psize, uint8_t ssize)
 {
 	bzero((char *)io, IoSizeOfIrp(ssize));
 	io->irp_size = psize;
@@ -1125,16 +1095,14 @@
 }
 
 void
-IoAcquireCancelSpinLock(irql)
-	uint8_t			*irql;
+IoAcquireCancelSpinLock(uint8_t *irql)
 {
 	KeAcquireSpinLock(&ntoskrnl_cancellock, irql);
 	return;
 }
 
 void
-IoReleaseCancelSpinLock(irql)
-	uint8_t			irql;
+IoReleaseCancelSpinLock(uint8_t irql)
 {
 	KeReleaseSpinLock(&ntoskrnl_cancellock, irql);
 	return;

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


More information about the p4-projects mailing list