PERFORCE change 93305 for review

John Baldwin jhb at FreeBSD.org
Tue Mar 14 21:22:42 UTC 2006


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

Change 93305 by jhb at jhb_slimer on 2006/03/14 21:22:36

	IFC @93304.

Affected files ...

.. //depot/projects/smpng/sys/amd64/amd64/apic_vector.S#13 integrate
.. //depot/projects/smpng/sys/amd64/amd64/db_trace.c#17 integrate
.. //depot/projects/smpng/sys/amd64/amd64/io_apic.c#14 integrate
.. //depot/projects/smpng/sys/amd64/amd64/machdep.c#51 integrate
.. //depot/projects/smpng/sys/amd64/amd64/mp_machdep.c#34 integrate
.. //depot/projects/smpng/sys/amd64/amd64/pmap.c#52 integrate
.. //depot/projects/smpng/sys/amd64/amd64/trap.c#43 integrate
.. //depot/projects/smpng/sys/amd64/include/asmacros.h#6 integrate
.. //depot/projects/smpng/sys/amd64/include/bus.h#8 integrate
.. //depot/projects/smpng/sys/amd64/include/pmap.h#20 integrate
.. //depot/projects/smpng/sys/amd64/include/trap.h#3 integrate
.. //depot/projects/smpng/sys/amd64/linux32/linux32_machdep.c#10 integrate
.. //depot/projects/smpng/sys/amd64/pci/pci_bus.c#16 integrate
.. //depot/projects/smpng/sys/arm/arm/in_cksum.c#6 integrate
.. //depot/projects/smpng/sys/arm/include/in_cksum.h#4 integrate
.. //depot/projects/smpng/sys/boot/i386/libi386/Makefile#15 integrate
.. //depot/projects/smpng/sys/boot/i386/libi386/libi386.h#11 integrate
.. //depot/projects/smpng/sys/boot/i386/libi386/smbios.c#4 integrate
.. //depot/projects/smpng/sys/cam/scsi/scsi_da.c#65 integrate
.. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_misc.c#34 integrate
.. //depot/projects/smpng/sys/conf/files#169 integrate
.. //depot/projects/smpng/sys/contrib/pf/net/if_pflog.h#7 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-all.c#81 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-all.h#46 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-chipset.c#65 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-disk.c#57 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-pci.h#42 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-queue.c#33 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-raid.c#46 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-usb.c#1 branch
.. //depot/projects/smpng/sys/dev/ata/atapi-cd.c#61 integrate
.. //depot/projects/smpng/sys/dev/ata/atapi-fd.c#32 integrate
.. //depot/projects/smpng/sys/dev/ath/ath_rate/sample/sample.c#7 integrate
.. //depot/projects/smpng/sys/dev/cs/if_cs.c#17 integrate
.. //depot/projects/smpng/sys/dev/exca/exca.c#19 integrate
.. //depot/projects/smpng/sys/dev/hwpmc/hwpmc_logging.c#5 integrate
.. //depot/projects/smpng/sys/dev/hwpmc/hwpmc_mod.c#13 integrate
.. //depot/projects/smpng/sys/dev/ieee488/upd7210.c#7 integrate
.. //depot/projects/smpng/sys/dev/ipw/if_ipw.c#10 integrate
.. //depot/projects/smpng/sys/dev/ipw/if_ipwreg.h#2 integrate
.. //depot/projects/smpng/sys/dev/ipw/if_ipwvar.h#3 integrate
.. //depot/projects/smpng/sys/dev/iwi/if_iwi.c#15 integrate
.. //depot/projects/smpng/sys/dev/iwi/if_iwireg.h#7 integrate
.. //depot/projects/smpng/sys/dev/iwi/if_iwivar.h#6 integrate
.. //depot/projects/smpng/sys/fs/fifofs/fifo_vnops.c#39 integrate
.. //depot/projects/smpng/sys/fs/nullfs/null_vnops.c#27 integrate
.. //depot/projects/smpng/sys/geom/geom_io.c#41 integrate
.. //depot/projects/smpng/sys/geom/mirror/g_mirror.c#26 integrate
.. //depot/projects/smpng/sys/geom/mirror/g_mirror.h#11 integrate
.. //depot/projects/smpng/sys/geom/mirror/g_mirror_ctl.c#9 integrate
.. //depot/projects/smpng/sys/geom/raid3/g_raid3.c#23 integrate
.. //depot/projects/smpng/sys/geom/raid3/g_raid3.h#11 integrate
.. //depot/projects/smpng/sys/geom/raid3/g_raid3_ctl.c#10 integrate
.. //depot/projects/smpng/sys/gnu/fs/xfs/FreeBSD/support/kdb.c#2 integrate
.. //depot/projects/smpng/sys/i386/i386/machdep.c#104 integrate
.. //depot/projects/smpng/sys/i386/i386/mp_machdep.c#99 integrate
.. //depot/projects/smpng/sys/i386/i386/vm_machdep.c#76 integrate
.. //depot/projects/smpng/sys/isofs/cd9660/cd9660_rrip.c#10 integrate
.. //depot/projects/smpng/sys/kern/kern_environment.c#20 integrate
.. //depot/projects/smpng/sys/kern/kern_exec.c#95 integrate
.. //depot/projects/smpng/sys/kern/kern_exit.c#115 integrate
.. //depot/projects/smpng/sys/kern/kern_mbuf.c#17 integrate
.. //depot/projects/smpng/sys/kern/kern_resource.c#61 integrate
.. //depot/projects/smpng/sys/kern/kern_sig.c#120 integrate
.. //depot/projects/smpng/sys/kern/kern_tc.c#39 integrate
.. //depot/projects/smpng/sys/kern/kern_thread.c#88 integrate
.. //depot/projects/smpng/sys/kern/subr_prf.c#44 integrate
.. //depot/projects/smpng/sys/kern/uipc_mbuf.c#45 integrate
.. //depot/projects/smpng/sys/kern/vfs_mount.c#59 integrate
.. //depot/projects/smpng/sys/kern/vfs_subr.c#124 integrate
.. //depot/projects/smpng/sys/kern/vfs_vnops.c#67 integrate
.. //depot/projects/smpng/sys/modules/ata/atausb/Makefile#1 branch
.. //depot/projects/smpng/sys/modules/iwi/Makefile#4 integrate
.. //depot/projects/smpng/sys/modules/pf/Makefile#10 integrate
.. //depot/projects/smpng/sys/modules/pflog/Makefile#5 integrate
.. //depot/projects/smpng/sys/net/if_vlan.c#47 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_proto.c#19 integrate
.. //depot/projects/smpng/sys/nfsclient/nfs_vnops.c#57 integrate
.. //depot/projects/smpng/sys/nfsserver/nfs_serv.c#45 integrate
.. //depot/projects/smpng/sys/nfsserver/nfs_srvsock.c#26 integrate
.. //depot/projects/smpng/sys/pc98/pc98/machdep.c#11 integrate
.. //depot/projects/smpng/sys/sys/cdefs.h#33 integrate
.. //depot/projects/smpng/sys/sys/disk.h#13 integrate
.. //depot/projects/smpng/sys/sys/hash.h#1 branch
.. //depot/projects/smpng/sys/sys/mount.h#51 integrate
.. //depot/projects/smpng/sys/sys/proc.h#166 integrate
.. //depot/projects/smpng/sys/sys/vnode.h#72 integrate
.. //depot/projects/smpng/sys/ufs/ffs/ffs_extern.h#21 integrate
.. //depot/projects/smpng/sys/ufs/ffs/ffs_snapshot.c#56 integrate
.. //depot/projects/smpng/sys/ufs/ffs/ffs_softdep.c#53 integrate
.. //depot/projects/smpng/sys/ufs/ffs/ffs_vfsops.c#81 integrate
.. //depot/projects/smpng/sys/ufs/ufs/ufs_inode.c#23 integrate
.. //depot/projects/smpng/sys/ufs/ufs/ufs_lookup.c#24 integrate
.. //depot/projects/smpng/sys/ufs/ufs/ufs_quota.c#32 integrate
.. //depot/projects/smpng/sys/ufs/ufs/ufsmount.h#15 integrate
.. //depot/projects/smpng/sys/vm/swap_pager.c#61 integrate
.. //depot/projects/smpng/sys/vm/vm_contig.c#37 integrate
.. //depot/projects/smpng/sys/vm/vm_fault.c#56 integrate
.. //depot/projects/smpng/sys/vm/vm_map.c#78 integrate
.. //depot/projects/smpng/sys/vm/vm_page.c#73 integrate
.. //depot/projects/smpng/sys/vm/vm_pageq.c#17 integrate

Differences ...

==== //depot/projects/smpng/sys/amd64/amd64/apic_vector.S#13 (text+ko) ====

@@ -28,7 +28,7 @@
  * SUCH DAMAGE.
  *
  *	from: vector.s, 386BSD 0.1 unknown origin
- * $FreeBSD: src/sys/amd64/amd64/apic_vector.S,v 1.107 2005/12/14 21:47:01 jhb Exp $
+ * $FreeBSD: src/sys/amd64/amd64/apic_vector.S,v 1.108 2006/03/13 23:55:31 peter Exp $
  */
 
 /*
@@ -188,11 +188,7 @@
 	jmp	doreti
 
 /*
- * Executed by a CPU when it receives an Xcpustop IPI from another CPU,
- *
- *  - Signals its receipt.
- *  - Waits for permission to restart.
- *  - Signals its restart.
+ * Executed by a CPU when it receives an IPI_STOP from another CPU.
  */
 	.text
 	SUPERALIGN_TEXT

==== //depot/projects/smpng/sys/amd64/amd64/db_trace.c#17 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.73 2005/12/27 23:23:47 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.74 2006/03/13 23:56:44 peter Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -192,6 +192,7 @@
 #define	TRAP		1
 #define	INTERRUPT	2
 #define	SYSCALL		3
+#define	TRAP_INTERRUPT	5
 
 static void db_nextframe(struct amd64_frame **, db_addr_t *, struct thread *);
 static int db_numargs(struct amd64_frame *);
@@ -326,6 +327,12 @@
 			frame_type = INTERRUPT;
 		else if (strcmp(name, "Xfast_syscall") == 0)
 			frame_type = SYSCALL;
+		/* XXX: These are interrupts with trap frames. */
+		else if (strcmp(name, "Xtimerint") == 0 ||
+		    strcmp(name, "Xcpustop") == 0 ||
+		    strcmp(name, "Xrendezvous") == 0 ||
+		    strcmp(name, "Xipi_intr_bitmap_handler") == 0)
+			frame_type = TRAP_INTERRUPT;
 	}
 
 	/*
@@ -357,6 +364,7 @@
 			db_printf("--- syscall");
 			decode_syscall(tf->tf_rax, td);
 			break;
+		case TRAP_INTERRUPT:
 		case INTERRUPT:
 			db_printf("--- interrupt");
 			break;

==== //depot/projects/smpng/sys/amd64/amd64/io_apic.c#14 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.21 2006/02/28 22:24:54 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.22 2006/03/13 23:55:31 peter Exp $");
 
 #include "opt_atpic.h"
 #include "opt_isa.h"
@@ -73,6 +73,10 @@
  * IRQs behave as PCI IRQs by default.  We also assume that the pin for
  * IRQ 0 is actually an ExtINT pin.  The apic enumerators override the
  * configuration of individual pins as indicated by their tables.
+ *
+ * Documentation for the I/O APIC: "82093AA I/O Advanced Programmable
+ * Interrupt Controller (IOAPIC)", May 1996, Intel Corp.
+ * ftp://download.intel.com/design/chipsets/datashts/29056601.pdf
  */
 
 struct ioapic_intsrc {

==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#51 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.646 2006/02/03 02:49:14 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.648 2006/03/14 16:13:54 jhb Exp $");
 
 #include "opt_atalk.h"
 #include "opt_atpic.h"
@@ -247,8 +247,8 @@
 	struct sigacts *psp;
 	char *sp;
 	struct trapframe *regs;
+	int sig;
 	int oonstack;
-	int sig;
 
 	td = curthread;
 	p = td->td_proc;

==== //depot/projects/smpng/sys/amd64/amd64/mp_machdep.c#34 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.269 2006/02/28 22:24:54 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.270 2006/03/09 16:38:52 jhb Exp $");
 
 #include "opt_cpu.h"
 #include "opt_kstack_pages.h"
@@ -612,12 +612,12 @@
 			continue;
 		if (cpu_info[apic_id].cpu_bsp)
 			continue;
-#if 0
+
 		/* Don't let hyperthreads service interrupts. */
 		if (hyperthreading_cpus > 1 &&
 		    apic_id % hyperthreading_cpus != 0)
 			continue;
-#endif
+
 		intr_add_cpu(apic_id);
 	}
 }

==== //depot/projects/smpng/sys/amd64/amd64/pmap.c#52 (text+ko) ====

@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.536 2006/02/03 00:16:36 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.537 2006/03/13 08:13:37 ps Exp $");
 
 /*
  *	Manages physical address maps.
@@ -1360,7 +1360,7 @@
 	return sysctl_handle_long(oidp, &ksize, 0, req);
 }
 SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD, 
-    0, 0, kvm_size, "IU", "Size of KVM");
+    0, 0, kvm_size, "LU", "Size of KVM");
 
 static int
 kvm_free(SYSCTL_HANDLER_ARGS)
@@ -1370,7 +1370,7 @@
 	return sysctl_handle_long(oidp, &kfree, 0, req);
 }
 SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD, 
-    0, 0, kvm_free, "IU", "Amount of KVM free");
+    0, 0, kvm_free, "LU", "Amount of KVM free");
 
 /*
  * grow the number of kernel page table entries, if needed

==== //depot/projects/smpng/sys/amd64/amd64/trap.c#43 (text+ko) ====

@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.302 2006/02/08 08:09:15 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.303 2006/03/13 23:55:31 peter Exp $");
 
 /*
  * AMD64 Trap and System call handling
@@ -872,7 +872,6 @@
 	 */
 	if (orig_tf_rflags & PSL_T) {
 		frame.tf_rflags &= ~PSL_T;
-
 		ksiginfo_init_trap(&ksi);
 		ksi.ksi_signo = SIGTRAP;
 		ksi.ksi_code = TRAP_TRACE;

==== //depot/projects/smpng/sys/amd64/include/asmacros.h#6 (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/asmacros.h,v 1.29 2005/12/08 18:33:30 jhb Exp $
+ * $FreeBSD: src/sys/amd64/include/asmacros.h,v 1.30 2006/03/14 00:01:56 peter Exp $
  */
 
 #ifndef _MACHINE_ASMACROS_H_
@@ -130,7 +130,7 @@
 
 #ifdef LOCORE
 /*
- * Convenience macros for declaring interrupt entry points.
+ * Convenience macro for declaring interrupt entry points.
  */
 #define	IDTVEC(name)	ALIGN_TEXT; .globl __CONCAT(X,name); \
 			.type __CONCAT(X,name), at function; __CONCAT(X,name):

==== //depot/projects/smpng/sys/amd64/include/bus.h#8 (text+ko) ====

@@ -28,7 +28,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/amd64/include/bus.h,v 1.16 2005/05/29 04:42:15 nyan Exp $
+ * $FreeBSD: src/sys/amd64/include/bus.h,v 1.17 2006/03/14 00:01:56 peter Exp $
  */
 
 /*	$NetBSD: bus.h,v 1.12 1997/10/01 08:25:15 fvdl Exp $	*/
@@ -1004,6 +1004,17 @@
 #endif
 }
 
+#ifdef BUS_SPACE_NO_LEGACY
+#undef inb
+#undef outb
+#define inb(a) compiler_error
+#define inw(a) compiler_error
+#define inl(a) compiler_error
+#define outb(a, b) compiler_error
+#define outw(a, b) compiler_error
+#define outl(a, b) compiler_error
+#endif
+
 #include <machine/bus_dma.h>
 
 /*

==== //depot/projects/smpng/sys/amd64/include/pmap.h#20 (text+ko) ====

@@ -39,7 +39,7 @@
  *
  *	from: hp300: @(#)pmap.h	7.2 (Berkeley) 12/16/90
  *	from: @(#)pmap.h	7.4 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.128 2005/12/06 21:09:01 jhb Exp $
+ * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.129 2006/03/14 00:01:56 peter Exp $
  */
 
 #ifndef _MACHINE_PMAP_H_
@@ -176,7 +176,7 @@
  * the corresponding pde that in turn maps it.
  */
 pt_entry_t *vtopte(vm_offset_t);
-#define	vtophys(va)	pmap_kextract((vm_offset_t)(va))
+#define	vtophys(va)	pmap_kextract(((vm_offset_t) (va)))
 
 static __inline pt_entry_t
 pte_load(pt_entry_t *ptep)

==== //depot/projects/smpng/sys/amd64/include/trap.h#3 (text+ko) ====

@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)trap.h	5.4 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/amd64/include/trap.h,v 1.14 2004/04/05 21:25:51 imp Exp $
+ * $FreeBSD: src/sys/amd64/include/trap.h,v 1.15 2006/03/14 00:01:22 peter Exp $
  */
 
 #ifndef _MACHINE_TRAP_H_
@@ -72,16 +72,6 @@
 #define	    ILL_ALIGN_FAULT	T_ALIGNFLT
 #define	    ILL_FPOP_FAULT	T_FPOPFLT	/* coprocessor operand fault */
 
-/* portable macros for SIGFPE/ARITHTRAP */
-#define FPE_INTOVF	1	/* integer overflow */
-#define FPE_INTDIV	2	/* integer divide by zero */
-#define FPE_FLTDIV	3	/* floating point divide by zero */
-#define FPE_FLTOVF	4	/* floating point overflow */
-#define FPE_FLTUND	5	/* floating point underflow */
-#define FPE_FLTRES	6	/* floating point inexact result */
-#define FPE_FLTINV	7	/* invalid floating point operation */
-#define FPE_FLTSUB	8	/* subscript out of range */
-
 /* old FreeBSD macros, deprecated */
 #define	FPE_INTOVF_TRAP	0x1	/* integer overflow */
 #define	FPE_INTDIV_TRAP	0x2	/* integer divide by zero */

==== //depot/projects/smpng/sys/amd64/linux32/linux32_machdep.c#10 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.11 2006/02/06 22:06:53 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.12 2006/03/08 20:21:53 ups Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -130,7 +130,7 @@
 	    copystr(fname, args->fname, PATH_MAX, &length) :
 	    copyinstr(fname, args->fname, PATH_MAX, &length);
 	if (error != 0)
-		return (error);
+		goto err_exit;
 
 	/*
 	 * extract arguments first
@@ -139,16 +139,16 @@
 	for (;;) {
 		error = copyin(p32++, &arg, sizeof(arg));
 		if (error)
-			return (error);
+			goto err_exit;
 		if (arg == 0)
 			break;
 		argp = PTRIN(arg);
 		error = copyinstr(argp, args->endp, args->stringspace, &length);
 		if (error) {
 			if (error == ENAMETOOLONG)
-				return (E2BIG);
-			else
-				return (error);
+				error = E2BIG;
+			
+			goto err_exit;
 		}
 		args->stringspace -= length;
 		args->endp += length;
@@ -165,7 +165,7 @@
 		for (;;) {
 			error = copyin(p32++, &arg, sizeof(arg));
 			if (error)
-				return (error);
+				goto err_exit;
 			if (arg == 0)
 				break;
 			envp = PTRIN(arg);
@@ -173,9 +173,8 @@
 			    &length);
 			if (error) {
 				if (error == ENAMETOOLONG)
-					return (E2BIG);
-				else
-					return (error);
+					error = E2BIG;
+				goto err_exit;
 			}
 			args->stringspace -= length;
 			args->endp += length;
@@ -184,6 +183,12 @@
 	}
 
 	return (0);
+
+err_exit:
+	kmem_free_wakeup(exec_map, (vm_offset_t)args->buf,
+	    PATH_MAX + ARG_MAX + MAXSHELLCMDLEN);
+	args->buf = NULL;
+	return (error);
 }
 
 int

==== //depot/projects/smpng/sys/amd64/pci/pci_bus.c#16 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.116 2006/01/06 19:22:18 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.117 2006/03/13 23:58:40 peter Exp $");
 
 #include "opt_cpu.h"
 
@@ -326,10 +326,10 @@
 	{ 0, 0 }
 };
 
-static devclass_t pcib_devclass;
+static devclass_t hostb_devclass;
 
 DEFINE_CLASS_0(pcib, legacy_pcib_driver, legacy_pcib_methods, 1);
-DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, pcib_devclass, 0, 0);
+DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, hostb_devclass, 0, 0);
 
 
 /*

==== //depot/projects/smpng/sys/arm/arm/in_cksum.c#6 (text+ko) ====

@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
-__FBSDID("$FreeBSD: src/sys/arm/arm/in_cksum.c,v 1.5 2005/10/03 14:06:44 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/in_cksum.c,v 1.6 2006/03/09 23:33:59 cognet Exp $");
 
 #include <sys/param.h>
 #include <sys/mbuf.h>
@@ -130,3 +130,12 @@
 	REDUCE16;
 	return (~sum & 0xffff);
 }
+
+u_int in_cksum_hdr(const struct ip *ip)
+{
+	u_int64_t sum = do_cksum(ip, sizeof(struct ip));
+	union q_util q_util;
+    	union l_util l_util;
+	REDUCE16;
+	return (~sum & 0xffff);
+}			    

==== //depot/projects/smpng/sys/arm/include/in_cksum.h#4 (text+ko) ====

@@ -33,7 +33,7 @@
  *	from tahoe:	in_cksum.c	1.2	86/01/05
  *	from:		@(#)in_cksum.c	1.3 (Berkeley) 1/19/91
  *	from: Id: in_cksum.c,v 1.8 1995/12/03 18:35:19 bde Exp
- * $FreeBSD: src/sys/arm/include/in_cksum.h,v 1.3 2005/10/03 14:06:44 cognet Exp $
+ * $FreeBSD: src/sys/arm/include/in_cksum.h,v 1.4 2006/03/09 23:33:59 cognet Exp $
  */
 
 #ifndef _MACHINE_IN_CKSUM_H_
@@ -46,80 +46,7 @@
 u_short in_addword(u_short sum, u_short b);
 u_short in_cksum_skip(struct mbuf *m, int len, int skip);
 u_int do_cksum(const void *, int);
-static __inline u_int
-in_cksum_hdr(const struct ip *ip)
-{
-	u_int sum = 0;
-	u_int tmp1, tmp2, tmp3, tmp4;
-
-	if (((vm_offset_t)ip & 0x03) == 0)
-		__asm __volatile (
-		    "adds %0, %0, %1\n"
-		    "adcs %0, %0, %2\n"
-		    "adcs %0, %0, %3\n"
-		    "adcs %0, %0, %4\n"
-		    "adcs %0, %0, %5\n"
-		    "adc %0, %0, #0\n"
-		    : "+r" (sum)
-		    : "r" (((const u_int32_t *)ip)[0]),
-		    "r" (((const u_int32_t *)ip)[1]),
-		    "r" (((const u_int32_t *)ip)[2]),
-		    "r" (((const u_int32_t *)ip)[3]),
-		    "r" (((const u_int32_t *)ip)[4])
-		    );
-	else
-		__asm __volatile (
-		    "and %1, %5, #3\n"
-		    "cmp %1, #0x02\n"
-		    "ldrb %2, [%5], #0x01\n"
-		    "ldrgeb %3, [%5], #0x01\n"
-		    "movlt %3, #0\n"
-		    "ldrgtb %4, [%5], #0x01\n"
-		    "movle %4, #0x00\n"
-#ifdef __ARMEB__
-		    "orreq	%0, %3, %2, lsl #8\n"
-		    "orreq	%0, %0, %4, lsl #24\n"
-		    "orrne	%0, %0, %3, lsl #8\n"
-		    "orrne	%0, %0, %4, lsl #16\n"
-#else
-		    "orreq	%0, %2, %3, lsl #8\n"
-		    "orreq	%0, %0, %4, lsl #16\n"
-		    "orrne	%0, %3, %2, lsl #8\n"
-		    "orrne	%0, %0, %4, lsl #24\n"
-#endif
-		    "ldmia %5, {%2, %3, %4}\n"
-		    "adcs %0, %0, %2\n"
-		    "adcs %0, %0, %3\n"
-		    "adcs %0, %0, %4\n"
-		    "ldrb %2, [%5]\n"
-		    "cmp %1, #0x02\n"
-		    "ldrgeb %3, [%5, #0x01]\n"
-		    "movlt %3, #0x00\n"
-		    "ldrgtb %4, [%5, #0x02]\n"
-		    "movle %4, #0x00\n"
-		    "tst %5, #0x01\n"
-#ifdef __ARMEB__
-	    	    "orreq	%2, %3, %2, lsl #8\n"
-		    "orreq	%2, %2, %4, lsl #24\n"
-		    "orrne	%2, %2, %3, lsl #8\n"
-		    "orrne	%2, %2, %4, lsl #16\n"
-#else
-		    "orreq	%2, %2, %3, lsl #8\n"
-		    "orreq	%2, %2, %4, lsl #16\n"
-		    "orrne	%2, %3, %2, lsl #8\n"
-		    "orrne	%2, %2, %4, lsl #24\n"
-#endif
-		    "adds	%0, %0, %2\n"
-		    "adc %0, %0, #0\n"
-		    : "+r" (sum), "=r" (tmp1), "=r" (tmp2), "=r" (tmp3),
-		    "=r" (tmp4)
-		    : "r" (ip));
-		    
-	sum = (sum & 0xffff) + (sum >> 16);
-	if (sum > 0xffff)
-		sum -= 0xffff;
-	return (~sum & 0xffff);
-}
+u_int in_cksum_hdr(const struct ip *);
 
 static __inline u_short
 in_pseudo(u_int sum, u_int b, u_int c)

==== //depot/projects/smpng/sys/boot/i386/libi386/Makefile#15 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.39 2005/12/19 09:00:11 sobomax Exp $
+# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.41 2006/03/14 19:02:00 jkim Exp $
 #
 LIB=			i386
 INTERNALLIB=
@@ -21,6 +21,11 @@
 CFLAGS+= -DDISK_DEBUG
 .endif
 
+.if !defined(BOOT_HIDE_SERIAL_NUMBERS)
+# Export serial numbers, UUID, and asset tag from loader.
+CFLAGS+= -DSMBIOS_SERIAL_NUMBERS
+.endif
+
 # Include simple terminal emulation (cons25-compatible)
 CFLAGS+= -DTERM_EMU
 

==== //depot/projects/smpng/sys/boot/i386/libi386/libi386.h#11 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/boot/i386/libi386/libi386.h,v 1.23 2005/12/21 02:17:58 sobomax Exp $
+ * $FreeBSD: src/sys/boot/i386/libi386/libi386.h,v 1.24 2006/03/09 22:49:44 jkim Exp $
  */
 
 
@@ -100,9 +100,9 @@
 int biospci_write_config(uint32_t locator, int offset, int width, int val);
 int biospci_read_config(uint32_t locator, int offset, int width, uint32_t *val);
 
-void	biosacpi_detect();
+void	biosacpi_detect(void);
 
-void	smbios_detect();
+void	smbios_detect(void);
 
 void	gateA20(void);
 

==== //depot/projects/smpng/sys/boot/i386/libi386/smbios.c#4 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2005 Jung-uk Kim <jkim at FreeBSD.org>
+ * Copyright (c) 2005, 2006 Jung-uk Kim <jkim at FreeBSD.org>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,12 +25,13 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/smbios.c,v 1.3 2005/10/18 20:03:31 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/smbios.c,v 1.6 2006/03/14 19:02:00 jkim Exp $");
 
 #include <stand.h>
 #include <bootstrap.h>
 
 #include "btxv86.h"
+#include "libi386.h"
 
 /*
  * Detect SMBIOS and export information about the SMBIOS into the
@@ -54,21 +55,26 @@
 #define	SMBIOS_SIG		"_SM_"
 #define	SMBIOS_DMI_SIG		"_DMI_"
 
-static u_int8_t	smbios_enabled_sockets = 0;
-static u_int8_t	smbios_populated_sockets = 0;
+static uint8_t	smbios_enabled_sockets = 0;
+static uint8_t	smbios_populated_sockets = 0;
+
+static uint8_t	*smbios_parse_table(const uint8_t *dmi);
+static void	smbios_setenv(const char *name, const uint8_t *dmi,
+		    const int offset);
+static uint8_t	smbios_checksum(const caddr_t addr, const uint8_t len);
+static uint8_t	*smbios_sigsearch(const caddr_t addr, const uint32_t len);
 
-static u_int8_t	*smbios_parse_table(const u_int8_t *dmi);
-static void	smbios_setenv(const char *env, const u_int8_t *dmi,
+#ifdef SMBIOS_SERIAL_NUMBERS
+static void	smbios_setuuid(const char *name, const uint8_t *dmi,
 		    const int offset);
-static u_int8_t	smbios_checksum(const u_int8_t *addr, const u_int8_t len);
-static u_int8_t	*smbios_sigsearch(const caddr_t addr, const u_int32_t len);
+#endif
 
 void
 smbios_detect(void)
 {
-	u_int8_t	*smbios, *dmi, *addr;
-	u_int16_t	i, length, count;
-	u_int32_t	paddr;
+	uint8_t		*smbios, *dmi, *addr;
+	uint16_t	i, length, count;
+	uint32_t	paddr;
 	char		buf[4];
 
 	/* locate and validate the SMBIOS */
@@ -76,9 +82,9 @@
 	if (smbios == NULL)
 		return;
 
-	length = *(u_int16_t *)(smbios + 0x16);	/* Structure Table Length */
-	paddr = *(u_int32_t *)(smbios + 0x18);	/* Structure Table Address */
-	count = *(u_int16_t *)(smbios + 0x1c);	/* No of SMBIOS Structures */
+	length = *(uint16_t *)(smbios + 0x16);	/* Structure Table Length */
+	paddr = *(uint32_t *)(smbios + 0x18);	/* Structure Table Address */
+	count = *(uint16_t *)(smbios + 0x1c);	/* No of SMBIOS Structures */
 
 	for (dmi = addr = PTOV(paddr), i = 0;
 	     dmi - addr < length && i < count; i++)
@@ -89,10 +95,10 @@
 	setenv("smbios.socket.populated", buf, 1);
 }
 
-static u_int8_t *
-smbios_parse_table(const u_int8_t *dmi)
+static uint8_t *
+smbios_parse_table(const uint8_t *dmi)
 {
-	u_int8_t	*dp;
+	uint8_t		*dp;
 
 	switch(dmi[0]) {
 	case 0:		/* Type 0: BIOS */
@@ -105,17 +111,28 @@
 		smbios_setenv("smbios.system.maker", dmi, 0x04);
 		smbios_setenv("smbios.system.product", dmi, 0x05);
 		smbios_setenv("smbios.system.version", dmi, 0x06);
+#ifdef SMBIOS_SERIAL_NUMBERS
+		smbios_setenv("smbios.system.serial", dmi, 0x07);
+		smbios_setuuid("smbios.system.uuid", dmi, 0x08);
+#endif
 		break;
 
 	case 2:		/* Type 2: Base Board (or Module) */
 		smbios_setenv("smbios.planar.maker", dmi, 0x04);
 		smbios_setenv("smbios.planar.product", dmi, 0x05);
 		smbios_setenv("smbios.planar.version", dmi, 0x06);
+#ifdef SMBIOS_SERIAL_NUMBERS
+		smbios_setenv("smbios.planar.serial", dmi, 0x07);
+#endif
 		break;
 
 	case 3:		/* Type 3: System Enclosure or Chassis */
 		smbios_setenv("smbios.chassis.maker", dmi, 0x04);
 		smbios_setenv("smbios.chassis.version", dmi, 0x06);
+#ifdef SMBIOS_SERIAL_NUMBERS
+		smbios_setenv("smbios.chassis.serial", dmi, 0x07);
+		smbios_setenv("smbios.chassis.tag", dmi, 0x08);
+#endif
 		break;
 
 	case 4:		/* Type 4: Processor Information */
@@ -147,7 +164,7 @@
 	}
 	
 	/* find structure terminator */
-	dp = (u_int8_t *)(dmi + dmi[1]);
+	dp = __DECONST(uint8_t *, dmi + dmi[1]);
 	while (dp[0] != 0 || dp[1] != 0)
 		dp++;
 
@@ -155,42 +172,43 @@
 }
 
 static void
-smbios_setenv(const char *str, const u_int8_t *dmi, const int offset)
+smbios_setenv(const char *name, const uint8_t *dmi, const int offset)
 {
-	char		*cp;
+	char		*cp = __DECONST(char *, dmi + dmi[1]);
 	int		i;
 
 	/* skip undefined string */
 	if (dmi[offset] == 0)
 		return;
 
-	for (cp = (char *)(dmi + dmi[1]), i = 0; i < dmi[offset] - 1; i++)
+	for (i = 0; i < dmi[offset] - 1; i++)
 		cp += strlen(cp) + 1;
-	setenv(str, cp, 1);
+	setenv(name, cp, 1);
 }
 
-static u_int8_t
-smbios_checksum(const u_int8_t *addr, const u_int8_t len)
+static uint8_t
+smbios_checksum(const caddr_t addr, const uint8_t len)
 {
-	u_int8_t	sum;
+	const uint8_t	*cp = addr;
+	uint8_t		sum;
 	int		i;
 
 	for (sum = 0, i = 0; i < len; i++)
-		sum += addr[i];
+		sum += cp[i];
 
 	return(sum);
 }
 
-static u_int8_t *
-smbios_sigsearch(const caddr_t addr, const u_int32_t len)
+static uint8_t *
+smbios_sigsearch(const caddr_t addr, const uint32_t len)
 {
 	caddr_t		cp;
 
 	/* search on 16-byte boundaries */
-	for (cp = addr; cp - addr < len; cp += SMBIOS_STEP) {
+	for (cp = addr; cp < addr + len; cp += SMBIOS_STEP) {
 		/* compare signature, validate checksum */
 		if (!strncmp(cp, SMBIOS_SIG, 4)) {
-			if (smbios_checksum(cp, *(cp + 0x05)))
+			if (smbios_checksum(cp, *(uint8_t *)(cp + 0x05)))
 				continue;
 			if (strncmp(cp + 0x10, SMBIOS_DMI_SIG, 5))
 				continue;
@@ -203,3 +221,31 @@
 
 	return(NULL);
 }
+
+#ifdef SMBIOS_SERIAL_NUMBERS
+static void
+smbios_setuuid(const char *name, const uint8_t *dmi, const int offset)
+{
+	const uint8_t	*idp = dmi + offset;
+	int		i, f = 0, z = 0;
+	char		uuid[37];
+
+	for (i = 0; i < 16; i++) {
+		if (idp[i] == 0xff)
+			f++;
+		else if (idp[i] == 0x00)
+			z++;
+		else
+			break;
+	}
+	if (f != 16 && z != 16) {
+		sprintf(uuid, "%02X%02X%02X%02X-"
+		    "%02X%02X-%02X%02X-%02X%02X-"
+		    "%02X%02X%02X%02X%02X%02X",
+		    idp[0], idp[1], idp[2], idp[3],
+		    idp[4], idp[5], idp[6], idp[7], idp[8], idp[9],
+		    idp[10], idp[11], idp[12], idp[13], idp[14], idp[15]);
+		setenv(name, uuid, 1);
+	}
+}
+#endif

==== //depot/projects/smpng/sys/cam/scsi/scsi_da.c#65 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.186 2006/01/30 20:27:44 flz Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.187 2006/03/13 22:26:33 joerg Exp $");
 
 #include <sys/param.h>
 
@@ -421,6 +421,13 @@
 	},
 	{
 		/*
+		 * TOSHIBA TransMemory USB sticks
+		 */
+		{T_DIRECT, SIP_MEDIA_REMOVABLE, "TOSHIBA", "TransMemory",
+		"*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE
+	},
+	{
+		/*
 		 * PNY USB Flash keys
 		 * PR: usb/75578, usb/72344, usb/65436 
 		 */

==== //depot/projects/smpng/sys/compat/freebsd32/freebsd32_misc.c#34 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.52 2006/03/04 00:09:09 ps Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.53 2006/03/08 20:21:53 ups Exp $");
 
 #include "opt_compat.h"
 
@@ -260,7 +260,7 @@
 	    copystr(fname, args->fname, PATH_MAX, &length) :
 	    copyinstr(fname, args->fname, PATH_MAX, &length);
 	if (error != 0)
-		return (error);
+		goto err_exit;
 
 	/*
 	 * extract arguments first
@@ -269,16 +269,15 @@
 	for (;;) {
 		error = copyin(p32++, &arg, sizeof(arg));
 		if (error)
-			return (error);
+			goto err_exit;
 		if (arg == 0)
 			break;
 		argp = PTRIN(arg);
 		error = copyinstr(argp, args->endp, args->stringspace, &length);
 		if (error) {
 			if (error == ENAMETOOLONG)
-				return (E2BIG);
-			else
-				return (error);
+				error = E2BIG;
+			goto err_exit;
 		}
 		args->stringspace -= length;
 		args->endp += length;
@@ -295,7 +294,7 @@
 		for (;;) {
 			error = copyin(p32++, &arg, sizeof(arg));
 			if (error)
-				return (error);
+				goto err_exit;
 			if (arg == 0)
 				break;
 			envp = PTRIN(arg);
@@ -303,9 +302,8 @@
 			    &length);
 			if (error) {
 				if (error == ENAMETOOLONG)
-					return (E2BIG);
-				else
-					return (error);
+					error = E2BIG;
+				goto err_exit;
 			}
 			args->stringspace -= length;
 			args->endp += length;
@@ -314,6 +312,12 @@
 	}
 
 	return (0);
+
+err_exit:
+	kmem_free_wakeup(exec_map, (vm_offset_t)args->buf,
+	    PATH_MAX + ARG_MAX + MAXSHELLCMDLEN);
+	args->buf = NULL;
+	return (error);
 }
 
 int

==== //depot/projects/smpng/sys/conf/files#169 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1100 2006/03/05 22:52:16 yar Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1102 2006/03/13 06:38:22 ru Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -11,7 +11,7 @@
 	clean		"acpi_quirks.h"
 aicasm				optional ahc | ahd			   \
 	dependency	"$S/dev/aic7xxx/aicasm/*.[chyl]"		   \
-	compile-with	"CC=${CC} ${MAKE} -f $S/dev/aic7xxx/aicasm/Makefile MAKESRCPATH=$S/dev/aic7xxx/aicasm" \
+	compile-with	"CC='${CC}' ${MAKE} -f $S/dev/aic7xxx/aicasm/Makefile MAKESRCPATH=$S/dev/aic7xxx/aicasm" \
 	no-obj no-implicit-rule						   \
 	clean		"aicasm* y.tab.h"
 aic7xxx_seq.h			optional ahc				   \
@@ -52,7 +52,7 @@
 	no-implicit-rule local
 emu10k1-alsa%diked.h		optional snd_emu10k1 pci			   \
 	dependency	"$S/tools/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/emu10k1-alsa.h" \

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


More information about the p4-projects mailing list