PERFORCE change 114801 for review

Paolo Pisati piso at FreeBSD.org
Wed Feb 21 13:57:16 UTC 2007


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

Change 114801 by piso at piso_newluxor on 2007/02/21 13:56:59

	IFC at 114800

Affected files ...

.. //depot/projects/soc2005/libalias/UPDATING#16 integrate
.. //depot/projects/soc2005/libalias/bin/expr/expr.y#2 integrate
.. //depot/projects/soc2005/libalias/gnu/usr.bin/gdb/libgdb/fbsd-threads.c#2 integrate
.. //depot/projects/soc2005/libalias/lib/libelf/libelf_allocate.c#2 integrate
.. //depot/projects/soc2005/libalias/lib/libwrap/Makefile#2 integrate
.. //depot/projects/soc2005/libalias/release/doc/en_US.ISO8859-1/hardware/Makefile#4 integrate
.. //depot/projects/soc2005/libalias/sbin/mdconfig/mdconfig.8#2 integrate
.. //depot/projects/soc2005/libalias/sbin/mdconfig/mdconfig.c#2 integrate
.. //depot/projects/soc2005/libalias/share/dict/web2a#2 integrate
.. //depot/projects/soc2005/libalias/sys/amd64/amd64/pmap.c#8 integrate
.. //depot/projects/soc2005/libalias/sys/arm/arm/elf_trampoline.c#6 integrate
.. //depot/projects/soc2005/libalias/sys/arm/arm/locore.S#2 integrate
.. //depot/projects/soc2005/libalias/sys/arm/conf/EP80219#4 integrate
.. //depot/projects/soc2005/libalias/sys/arm/conf/IQ31244#3 integrate
.. //depot/projects/soc2005/libalias/sys/arm/conf/SIMICS#3 integrate
.. //depot/projects/soc2005/libalias/sys/cam/scsi/scsi_da.c#9 integrate
.. //depot/projects/soc2005/libalias/sys/conf/options.arm#7 integrate
.. //depot/projects/soc2005/libalias/sys/dev/aic7xxx/aic79xx.seq#2 integrate
.. //depot/projects/soc2005/libalias/sys/dev/iwi/if_iwi.c#8 integrate
.. //depot/projects/soc2005/libalias/sys/dev/iwi/if_iwireg.h#3 integrate
.. //depot/projects/soc2005/libalias/sys/dev/iwi/if_iwivar.h#3 integrate
.. //depot/projects/soc2005/libalias/sys/dev/syscons/fire/fire_saver.c#2 integrate
.. //depot/projects/soc2005/libalias/sys/dev/syscons/logo/logo_saver.c#2 integrate
.. //depot/projects/soc2005/libalias/sys/dev/syscons/rain/rain_saver.c#2 integrate
.. //depot/projects/soc2005/libalias/sys/dev/syscons/warp/warp_saver.c#2 integrate
.. //depot/projects/soc2005/libalias/sys/dev/usb/umass.c#6 integrate
.. //depot/projects/soc2005/libalias/sys/dev/vge/if_vge.c#5 integrate
.. //depot/projects/soc2005/libalias/sys/fs/ntfs/ntfs_vfsops.c#4 integrate
.. //depot/projects/soc2005/libalias/sys/fs/procfs/procfs_ioctl.c#4 integrate
.. //depot/projects/soc2005/libalias/sys/geom/geom_disk.c#3 integrate
.. //depot/projects/soc2005/libalias/sys/i386/i386/db_trace.c#5 integrate
.. //depot/projects/soc2005/libalias/sys/ia64/ia64/pmap.c#7 integrate
.. //depot/projects/soc2005/libalias/sys/kern/kern_jail.c#5 integrate
.. //depot/projects/soc2005/libalias/sys/kern/kern_resource.c#8 integrate
.. //depot/projects/soc2005/libalias/sys/kern/subr_witness.c#6 integrate
.. //depot/projects/soc2005/libalias/sys/kern/sysv_ipc.c#4 integrate
.. //depot/projects/soc2005/libalias/sys/kern/sysv_msg.c#6 integrate
.. //depot/projects/soc2005/libalias/sys/kern/sysv_shm.c#4 integrate
.. //depot/projects/soc2005/libalias/sys/kern/uipc_usrreq.c#8 integrate
.. //depot/projects/soc2005/libalias/sys/kern/vfs_syscalls.c#11 integrate
.. //depot/projects/soc2005/libalias/sys/net/if_ppp.c#6 integrate
.. //depot/projects/soc2005/libalias/sys/netatalk/at_control.c#3 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/ip_fw2.c#46 edit
.. //depot/projects/soc2005/libalias/sys/netinet/tcp_input.c#9 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/udp.h#2 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/udp_usrreq.c#9 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/udp_var.h#2 integrate
.. //depot/projects/soc2005/libalias/sys/netinet6/udp6_usrreq.c#6 integrate
.. //depot/projects/soc2005/libalias/sys/security/audit/audit_arg.c#7 integrate
.. //depot/projects/soc2005/libalias/sys/security/mac_bsdextended/mac_bsdextended.c#5 integrate
.. //depot/projects/soc2005/libalias/sys/security/mac_seeotheruids/mac_seeotheruids.c#5 integrate
.. //depot/projects/soc2005/libalias/sys/sys/priv.h#2 integrate
.. //depot/projects/soc2005/libalias/sys/ufs/ffs/ffs_vnops.c#5 integrate
.. //depot/projects/soc2005/libalias/sys/ufs/ufs/ufs_quota.c#6 integrate
.. //depot/projects/soc2005/libalias/usr.bin/tar/tree.c#3 integrate
.. //depot/projects/soc2005/libalias/usr.sbin/sysinstall/install.cfg#2 integrate
.. //depot/projects/soc2005/libalias/usr.sbin/sysinstall/sysinstall.8#2 integrate

Differences ...

==== //depot/projects/soc2005/libalias/UPDATING#16 (text+ko) ====

@@ -21,6 +21,19 @@
 	developers choose to disable these features on build machines
 	to maximize performance.
 
+20070218:
+	The following build error may appear when upgrading from an old
+	-current (usr.sbin/bsnmpd/modules/snmp_bridge, depend stage):
+		line 31: '(' expected at begin of node
+		context: " TruthValue ENUM (
+		*** Error code 1
+	If so, run "make install" in usr.sbin/bsnmpd/gensnmptree.  (It
+	should probably be a build tool).  In the same module, you may
+	also get the error:
+		...snmp_bridge/bridge_sys.c:39:27:
+		net/bridgestp.h: No such file or directory
+	If so, run "cp src/sys/net/bridgestp.h /usr/include/net".
+
 20070214:
 	The output of netstat -r has changed. Without -n, we now only
 	print a "network name" without the prefix length if the network
@@ -730,4 +743,4 @@
 Contact Warner Losh if you have any questions about your use of
 this document.
 
-$FreeBSD: src/UPDATING,v 1.473 2007/02/14 14:17:01 bms Exp $
+$FreeBSD: src/UPDATING,v 1.474 2007/02/19 22:49:43 njl Exp $

==== //depot/projects/soc2005/libalias/bin/expr/expr.y#2 (text+ko) ====

@@ -5,7 +5,7 @@
  *
  * Largely rewritten by J.T. Conklin (jtc at wimsey.com)
  *
- * $FreeBSD: src/bin/expr/expr.y,v 1.24 2005/01/10 08:39:22 imp Exp $
+ * $FreeBSD: src/bin/expr/expr.y,v 1.25 2007/02/18 19:48:58 ceri Exp $
  */
 
 #include <sys/types.h>
@@ -539,7 +539,7 @@
 	/* special case: first operand is 0, no overflow possible */
 	if (a == 0)
 		return 0;
-	/* cerify that result of division matches second operand */
+	/* verify that result of division matches second operand */
 	if (r / a != b)
 		return 1;
 	return 0;
@@ -637,7 +637,7 @@
 	int eval;
 	struct val *v;
 
-	/* coerce to both arguments to strings */
+	/* coerce both arguments to strings */
 	to_string(a);
 	to_string(b);
 

==== //depot/projects/soc2005/libalias/gnu/usr.bin/gdb/libgdb/fbsd-threads.c#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/gnu/usr.bin/gdb/libgdb/fbsd-threads.c,v 1.15 2006/02/07 02:29:55 davidxu Exp $ */
+/* $FreeBSD: src/gnu/usr.bin/gdb/libgdb/fbsd-threads.c,v 1.16 2007/02/20 18:10:13 emaste Exp $ */
 /* FreeBSD libthread_db assisted debugging support.
    Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
 
@@ -961,18 +961,21 @@
       err = td_thr_getgregs_p (&th, gregset);
       if (err != TD_OK)
         error ("%s: td_thr_getgregs %s", __func__, thread_db_err_str (err));
-      err = td_thr_getfpregs_p (&th, &fpregset);
+#ifdef PT_GETXMMREGS
+      err = td_thr_getxmmregs_p (&th, xmmregs);
       if (err != TD_OK)
-        error ("%s: td_thr_getfpgregs %s", __func__, thread_db_err_str (err));
+        {
+#endif
+          err = td_thr_getfpregs_p (&th, &fpregset);
+          if (err != TD_OK)
+            error ("%s: td_thr_getfpgregs %s", __func__, thread_db_err_str (err));
+#ifdef PT_GETXMMREGS
+        }
+#endif
       supply_register (regno, old_value);
     }
 
   fill_gregset (gregset, regno);
-  fill_fpregset (&fpregset, regno);
-#ifdef PT_GETXMMREGS
-  i387_fill_fxsave (xmmregs, regno);
-#endif
-
   err = td_thr_setgregs_p (&th, gregset);
   if (err != TD_OK)
     error ("Cannot store general-purpose registers for thread %d: Thread ID=%d, %s",
@@ -980,11 +983,13 @@
            thread_db_err_str (err));
 
 #ifdef PT_GETXMMREGS
+  i387_fill_fxsave (xmmregs, regno);
   err = td_thr_setxmmregs_p (&th, xmmregs);
   if (err == TD_OK)
     return;
 #endif
 
+  fill_fpregset (&fpregset, regno);
   err = td_thr_setfpregs_p (&th, &fpregset);
   if (err != TD_OK)
     error ("Cannot store floating-point registers for thread %d: Thread ID=%d, %s",

==== //depot/projects/soc2005/libalias/lib/libelf/libelf_allocate.c#2 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libelf/libelf_allocate.c,v 1.1 2006/11/11 17:16:33 jkoshy Exp $");
+__FBSDID("$FreeBSD: src/lib/libelf/libelf_allocate.c,v 1.2 2007/02/21 08:14:22 dumbbell Exp $");
 
 #include <sys/errno.h>
 
@@ -191,7 +191,7 @@
 		d = _libelf_release_data(d);
 	}
 
-	STAILQ_FOREACH_SAFE(d, &s->s_data, d_next, td) {
+	STAILQ_FOREACH_SAFE(d, &s->s_rawdata, d_next, td) {
 		assert((d->d_flags & LIBELF_F_MALLOCED) == 0);
 		STAILQ_REMOVE(&s->s_rawdata, d, _Elf_Data, d_next);
 		d = _libelf_release_data(d);

==== //depot/projects/soc2005/libalias/lib/libwrap/Makefile#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/lib/libwrap/Makefile,v 1.18 2006/03/17 18:54:28 ru Exp $
+# $FreeBSD: src/lib/libwrap/Makefile,v 1.19 2007/02/20 23:12:04 n_hibma Exp $
 #
 
 .include <bsd.own.mk>
@@ -9,8 +9,10 @@
 INCS=	tcpd.h
 MAN=	hosts_access.3
 MAN+=	hosts_access.5 hosts_options.5
-MLINKS=	hosts_access.3 hosts_ctl.3 hosts_access.3 request_init.3 \
-	hosts_access.3 request_set.3
+MLINKS=	hosts_access.3 hosts_ctl.3 \
+	hosts_access.3 request_init.3 \
+	hosts_access.3 request_set.3 \
+	hosts_access.3 hosts.allow.5 \
 
 .PATH:	${.CURDIR}/../../contrib/tcp_wrappers
 

==== //depot/projects/soc2005/libalias/release/doc/en_US.ISO8859-1/hardware/Makefile#4 (text+ko) ====

@@ -1,11 +1,11 @@
-# $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/Makefile,v 1.9 2007/02/16 02:20:09 bmah Exp $
+# $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/Makefile,v 1.10 2007/02/19 02:46:12 bmah Exp $
 
 RELN_ROOT?= ${.CURDIR}/../..
 
 .ifdef NO_LANGCODE_IN_DESTDIR
-DESTDIR?=	${DOCDIR}/relnotes
+DESTDIR?=	${DOCDIR}/hardware
 .else
-DESTDIR?=	${DOCDIR}/en_US.ISO8859-1/relnotes
+DESTDIR?=	${DOCDIR}/en_US.ISO8859-1/hardware
 .endif
 
 DOC?= article

==== //depot/projects/soc2005/libalias/sbin/mdconfig/mdconfig.8#2 (text+ko) ====

@@ -39,7 +39,7 @@
 .\"     @(#)vnconfig.8	8.1 (Berkeley) 6/5/93
 .\" from: src/usr.sbin/vnconfig/vnconfig.8,v 1.19 2000/12/27 15:30:29
 .\"
-.\" $FreeBSD: src/sbin/mdconfig/mdconfig.8,v 1.33 2005/01/22 20:02:01 pjd Exp $
+.\" $FreeBSD: src/sbin/mdconfig/mdconfig.8,v 1.36 2007/02/20 22:04:23 n_hibma Exp $
 .\"
 .Dd November 6, 2004
 .Dt MDCONFIG 8
@@ -101,7 +101,11 @@
 Swap space is used to back this memory disk.
 .El
 .It Fl f Ar file
-Filename to use for the vnode type memory disk.
+Filename to use for the vnode type memory disk. Options
+.Fl a
+and
+.Fl t Ar vnode
+are implied if not specified.
 .It Fl l
 List configured devices.
 If given with
@@ -118,7 +122,11 @@
 or
 .Cm t
 which
-denotes byte, kilobyte, megabyte, gigabyte and terabyte respectively.
+denotes byte, kilobyte, megabyte, gigabyte and terabyte respectively. Options
+.Fl a
+and
+.Fl t Ar swap
+are implied if not specified.
 .It Fl S Ar sectorsize
 Sectorsize to use for malloc backed device.
 .It Fl x Ar sectors/track
@@ -195,10 +203,14 @@
 chmod 1777 /tmp
 .Ed
 .Pp
-To create a 5MB file-backed disk:
+To create a 5MB file-backed disk (
+.Fl -a
+and
+.Fl -t Ar vnode
+are implied):
 .Bd -literal -offset indent
 dd if=/dev/zero of=somebackingfile bs=1k count=5k
-mdconfig -a -t vnode -f somebackingfile -u 0
+mdconfig -f somebackingfile -u 0
 bsdlabel -w md0 auto
 newfs md0c
 mount /dev/md0c /mnt

==== //depot/projects/soc2005/libalias/sbin/mdconfig/mdconfig.c#2 (text+ko) ====

@@ -6,7 +6,7 @@
  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
  * ----------------------------------------------------------------------------
  *
- * $FreeBSD: src/sbin/mdconfig/mdconfig.c,v 1.51 2006/03/27 05:33:35 jasone Exp $
+ * $FreeBSD: src/sbin/mdconfig/mdconfig.c,v 1.54 2007/02/20 22:04:23 n_hibma Exp $
  *
  */
 #include <sys/param.h>
@@ -130,14 +130,18 @@
 			cmdline=2;
 			break;
 		case 'f':
-			if (cmdline != 1 && cmdline != 2)
-				usage();
+			if (cmdline == 0) {
+				action = ATTACH;
+				cmdline = 1;
+			}
 			if (cmdline == 1) {
 				/* Imply ``-t vnode'' */
 				mdio.md_type = MD_VNODE;
 				mdio.md_options = MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
 				cmdline = 2;
 			}
+ 			if (cmdline != 2)
+ 				usage();
 			if (realpath(optarg, mdio.md_file) == NULL) {
 				err(1, "could not find full path for %s",
 				    optarg);
@@ -190,6 +194,17 @@
 			mdio.md_sectorsize = strtoul(optarg, &p, 0);
 			break;
 		case 's':
+			if (cmdline == 0) {
+				/* Imply ``-a'' */
+				action = ATTACH;
+				cmdline = 1;
+			}
+			if (cmdline == 1) {
+				/* Imply ``-t swap'' */
+				mdio.md_type = MD_SWAP;
+				mdio.md_options = MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
+				cmdline = 2;
+			}
 			if (cmdline != 2)
 				usage();
 			mdio.md_mediasize = (off_t)strtoumax(optarg, &p, 0);

==== //depot/projects/soc2005/libalias/share/dict/web2a#2 (text+ko) ====

@@ -59704,7 +59704,7 @@
 stock buckle
 stock card
 stock cattle
-stock cerificate
+stock certificate
 stock change
 stock company
 stock dividend

==== //depot/projects/soc2005/libalias/sys/amd64/amd64/pmap.c#8 (text+ko) ====

@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.578 2007/02/18 06:33:01 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.579 2007/02/19 10:55:16 kib Exp $");
 
 /*
  *	Manages physical address maps.
@@ -1542,9 +1542,15 @@
 		while ((*pmap_pde(kernel_pmap, kernel_vm_end) & PG_V) != 0) {
 			kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);
 			nkpt++;
+			if (kernel_vm_end - 1 >= kernel_map->max_offset) {
+				kernel_vm_end = kernel_map->max_offset;
+				break;                       
+			}
 		}
 	}
 	addr = roundup2(addr, PAGE_SIZE * NPTEPG);
+	if (addr - 1 >= kernel_map->max_offset)
+		addr = kernel_map->max_offset;
 	while (kernel_vm_end < addr) {
 		pde = pmap_pde(kernel_pmap, kernel_vm_end);
 		if (pde == NULL) {
@@ -1562,6 +1568,10 @@
 		}
 		if ((*pde & PG_V) != 0) {
 			kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);
+			if (kernel_vm_end - 1 >= kernel_map->max_offset) {
+				kernel_vm_end = kernel_map->max_offset;
+				break;                       
+			}
 			continue;
 		}
 
@@ -1581,6 +1591,10 @@
 		*pmap_pde(kernel_pmap, kernel_vm_end) = newpdir;
 
 		kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1);
+		if (kernel_vm_end - 1 >= kernel_map->max_offset) {
+			kernel_vm_end = kernel_map->max_offset;
+			break;                       
+		}
 	}
 }
 

==== //depot/projects/soc2005/libalias/sys/arm/arm/elf_trampoline.c#6 (text+ko) ====

@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/elf_trampoline.c,v 1.16 2006/11/01 12:41:43 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/elf_trampoline.c,v 1.17 2007/02/19 00:57:27 cognet Exp $");
 #include <machine/asm.h>
 #include <sys/param.h>
 #include <sys/elf32.h>
@@ -103,7 +103,7 @@
     	char *d = dst;
 
 	while (len) {
-		if (len >= 4 && !((vm_offset_t)d & 3) &&
+		if (0 && len >= 4 && !((vm_offset_t)d & 3) &&
 		    !((vm_offset_t)s & 3)) {
 			*(uint32_t *)d = *(uint32_t *)s;
 			s += 4;
@@ -143,6 +143,37 @@
 	int physaddr = KERNPHYSADDR;
 	int tmp1;
 	unsigned int sp = ((unsigned int)&_end & ~3) + 4;
+#if defined(FLASHADDR) && defined(LOADERRAMADDR)
+	unsigned int pc;
+
+	__asm __volatile("adr %0, _start\n"
+	    : "=r" (pc));
+	if ((FLASHADDR > LOADERRAMADDR && pc >= FLASHADDR) ||
+	    (FLASHADDR < LOADERRAMADDR && pc < LOADERRAMADDR)) {
+		/*
+		 * We're running from flash, so just copy the whole thing
+		 * from flash to memory.
+		 * This is far from optimal, we could do the relocation or
+		 * the unzipping directly from flash to memory to avoid this
+		 * needless copy, but it would require to know the flash
+		 * physical address.
+		 */
+		unsigned int target_addr;
+		unsigned int tmp_sp;
+
+		target_addr = (unsigned int)&_start - PHYSADDR + LOADERRAMADDR;
+		tmp_sp = target_addr + 0x100000 +
+		    (unsigned int)&_end - (unsigned int)&_start;
+		memcpy((char *)target_addr, (char *)pc,
+		    (unsigned int)&_end - (unsigned int)&_start);
+		/* Temporary set the sp and jump to the new location. */
+		__asm __volatile(
+		    "mov sp, %1\n"
+		    "mov pc, %0\n"
+		    : : "r" (target_addr), "r" (tmp_sp));
+		
+	}
+#endif
 #ifdef KZIP
 	sp += KERNSIZE + 0x100;
 	sp &= ~(L1_TABLE_SIZE - 1);

==== //depot/projects/soc2005/libalias/sys/arm/arm/locore.S#2 (text+ko) ====

@@ -37,7 +37,7 @@
 #include <machine/asm.h>
 #include <machine/armreg.h>
 #include <machine/pte.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.14 2006/06/21 23:47:25 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.15 2007/02/19 00:57:27 cognet Exp $");
 
 /* What size should this really be ? It is only used by initarm() */
 #define INIT_ARM_STACK_SIZE	2048
@@ -66,47 +66,53 @@
 ENTRY_NP(btext)
 
 ASENTRY_NP(_start)
-
-
-	/* Check if we are running on RAM, if not move ourself to RAM */
-#if 0
-	cmp	pc, #PHYSADDR
-	bhi	start_inram /* XXX: This is wrong */
+#if defined (FLASHADDR) && defined(LOADERRAMADDR)
+	/* Check if we're running from flash. */
+	ldr	r7, =FLASHADDR
+	/* 
+	 * If we're running with MMU disabled, test against the
+	 * physical address instead.
+	 */
+	mrc     p15, 0, r2, c1, c0, 0
+	ands	r2, r2, #CPU_CONTROL_MMU_ENABLE
+	ldreq	r8, =PHYSADDR
+	ldrne	r8, =LOADERRAMADDR
+	cmp	r7, r8
+	bls 	flash_lower
+	cmp	r7, pc
+	bhi	from_ram
+	b	do_copy
+	
+flash_lower:
+	cmp	r8, pc
+	bls	from_ram
+do_copy:
+	ldr	r9, =KERNBASE
+	adr	r1, _start 
+	ldr	r0, Lreal_start
+	ldr	r2, Lend
+	sub	r2, r2, r0
+	sub	r0, r0, r9
+	add	r0, r0, r8
+	mov	r4, r0
+	/* Make sure _arm_memcpy is NULL */
+	ldr	r3, .L_arm_memcpy
+	ldr	r3, [r3]
+	mov	r5, #0
+	str	r5, [r3]
+	bl	memcpy
+	ldr	r0, Lram_offset
+	add	pc, r4, r0
+Lram_offset:	.word from_ram-_C_LABEL(_start)
+from_ram:
+	nop
 #endif
-	b	start_inram /*
-			     * XXX: this is even more wrong, but RedBoot
-			     * use 0x00000000-0x100000000 as virtual
-			     * addresses for the RAM.
-			     */
-
-	/* move me to RAM
-	 * XXX: we can use memcpy if it is PIC
-	 */
-	ldr r1, Lcopy_size
-	adr r0, _C_LABEL(_start)
-	add r1, r1, #3
-	mov r1, r1, LSR #2
-	mov r2, #PHYSADDR
-	add r2, r2, #0x00200000
-	mov r4, r2
-
-5:	ldr r3,[r0],#4
-	str r3,[r2],#4
-	subs r1,r1,#1
-	bhi 5b
-
-	/* Jump to RAM */
-	ldr r0, Lstart_off
-	add pc, r4, r0
-
-Lcopy_size:	.word _edata-_C_LABEL(_start)
-Lstart_off:	.word start_inram-_C_LABEL(_start)
-start_inram:
 	adr	r7, Lunmapped
 	bic     r7, r7, #0xff000000
 	orr     r7, r7, #PHYSADDR
 			
 
+disable_mmu:
 	/* Disable MMU for a while */
 	mrc     p15, 0, r2, c1, c0, 0
 	bic	r2, r2, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\
@@ -120,7 +126,6 @@
 	nop
 	mov	pc, r7
 Lunmapped:
-
 #ifdef STARTUP_PAGETABLE_ADDR
 	/* build page table from scratch */
 	ldr	r0, Lstartup_pagetable
@@ -191,6 +196,10 @@
 	.word	KERNVIRTADDR
 Lphysaddr:
 	.word	KERNPHYSADDR
+Lreal_start:
+	.word	_start
+Lend:	
+	.word	_edata
 Lstartup_pagetable:
 	.word	STARTUP_PAGETABLE_ADDR
 mmu_init_table:
@@ -207,6 +216,11 @@
 	.word	_end
 	.word	svcstk + INIT_ARM_STACK_SIZE
 
+#if defined(FLASHADDR) && defined(LOADERRAMADDR)
+.L_arm_memcpy:
+        .word   _C_LABEL(_arm_memcpy)
+#endif
+
 .Lvirt_done:
 	.word	virt_done
 .Lmainreturned:

==== //depot/projects/soc2005/libalias/sys/arm/conf/EP80219#4 (text+ko) ====

@@ -1,4 +1,4 @@
-# -*- makefile-bsdmake -*- GENERIC -- Generic kernel configuration file for FreeBSD/arm
+# EP80219 -- Custom kernel configuration file for FreeBSD/arm on the EP80219
 #
 # For more information on this file, please read the handbook section on
 # Kernel Configuration Files:
@@ -15,7 +15,7 @@
 # If you are in doubt as to the purpose or necessity of a line, check first 
 # in NOTES.
 #
-# $FreeBSD: src/sys/arm/conf/EP80219,v 1.4 2007/02/07 18:55:29 marcel Exp $
+# $FreeBSD: src/sys/arm/conf/EP80219,v 1.5 2007/02/19 00:37:25 cognet Exp $
 
 machine	arm
 ident		EP80219

==== //depot/projects/soc2005/libalias/sys/arm/conf/IQ31244#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# GENERIC -- Generic kernel configuration file for FreeBSD/arm
+# IQ31244 -- Custom kernel configuration file for FreeBSD/arm on the IQ31244
 #
 # For more information on this file, please read the handbook section on
 # Kernel Configuration Files:
@@ -15,7 +15,7 @@
 # If you are in doubt as to the purpose or necessity of a line, check first 
 # in NOTES.
 #
-# $FreeBSD: src/sys/arm/conf/IQ31244,v 1.17 2006/10/26 22:11:35 jb Exp $
+# $FreeBSD: src/sys/arm/conf/IQ31244,v 1.19 2007/02/19 01:03:08 cognet Exp $
 
 machine		arm
 ident		IQ31244
@@ -23,6 +23,8 @@
 options 	PHYSADDR=0xa0000000
 options		KERNPHYSADDR=0xa0200000	
 options		KERNVIRTADDR=0xc0200000		# Used in ldscript.arm
+options		FLASHADDR=0xf0000000
+options		LOADERRAMADDR=0x00000000
 
 options STARTUP_PAGETABLE_ADDR=0xa0000000
 include		"../xscale/i80321/std.iq31244"

==== //depot/projects/soc2005/libalias/sys/arm/conf/SIMICS#3 (text+ko) ====

@@ -1,4 +1,4 @@
-# GENERIC -- Generic kernel configuration file for FreeBSD/arm
+# SIMICS -- Custom kernel configuration file for FreeBSD/arm on Simics SA1110
 #
 # For more information on this file, please read the handbook section on
 # Kernel Configuration Files:
@@ -15,7 +15,7 @@
 # If you are in doubt as to the purpose or necessity of a line, check first 
 # in NOTES.
 #
-# $FreeBSD: src/sys/arm/conf/SIMICS,v 1.12 2006/10/26 22:11:35 jb Exp $
+# $FreeBSD: src/sys/arm/conf/SIMICS,v 1.13 2007/02/19 00:37:25 cognet Exp $
 
 machine		arm
 ident		SIMICS

==== //depot/projects/soc2005/libalias/sys/cam/scsi/scsi_da.c#9 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.202 2007/01/23 17:29:31 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.203 2007/02/21 07:45:01 n_hibma Exp $");
 
 #include <sys/param.h>
 
@@ -1820,11 +1820,15 @@
 	uint32_t block_len;
 	uint64_t maxsector;
 	int error;
+	u_int32_t sense_flags;
 
 	softc = (struct da_softc *)periph->softc;
 	block_len = 0;
 	maxsector = 0;
 	error = 0;
+	sense_flags = SF_RETRY_UA;
+	if (softc->flags & DA_FLAG_PACK_REMOVABLE)
+		sense_flags |= SF_NO_PRINT;
 
 	/* Do a read capacity */
 	rcap = (struct scsi_read_capacity_data *)malloc(sizeof(*rcaplong),
@@ -1843,7 +1847,7 @@
 
 	error = cam_periph_runccb(ccb, daerror,
 				  /*cam_flags*/CAM_RETRY_SELTO,
-				  /*sense_flags*/SF_RETRY_UA,
+				  sense_flags,
 				  softc->disk->d_devstat);
 
 	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
@@ -1878,7 +1882,7 @@
 
 	error = cam_periph_runccb(ccb, daerror,
 				  /*cam_flags*/CAM_RETRY_SELTO,
-				  /*sense_flags*/SF_RETRY_UA,
+				  sense_flags,
 				  softc->disk->d_devstat);
 
 	if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)

==== //depot/projects/soc2005/libalias/sys/conf/options.arm#7 (text+ko) ====

@@ -1,4 +1,4 @@
-#$FreeBSD: src/sys/conf/options.arm,v 1.15 2007/01/05 02:08:35 ticso Exp $
+#$FreeBSD: src/sys/conf/options.arm,v 1.16 2007/02/19 01:03:07 cognet Exp $
 ARM9_CACHE_WRITE_THROUGH	opt_global.h
 ARM_CACHE_LOCK_ENABLE	opt_global.h
 ARMFPE			opt_global.h
@@ -11,8 +11,10 @@
 CPU_XSCALE_80321	opt_global.h
 CPU_XSCALE_80219	opt_global.h
 CPU_XSCALE_IXP425	opt_global.h
+FLASHADDR		opt_global.h
 KERNPHYSADDR		opt_global.h
 KERNVIRTADDR		opt_global.h
+LOADERRAMADDR		opt_global.h
 PHYSADDR		opt_global.h
 SKYEYE_WORKAROUNDS	opt_global.h
 STARTUP_PAGETABLE_ADDR	opt_global.h

==== //depot/projects/soc2005/libalias/sys/dev/aic7xxx/aic79xx.seq#2 (text+ko) ====

@@ -37,7 +37,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.seq,v 1.18 2005/01/06 01:42:26 imp Exp $
+ * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.seq,v 1.19 2007/02/18 19:48:59 ceri Exp $
  */
 
 VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#119 $"
@@ -2139,7 +2139,7 @@
 END_CRITICAL;
 pkt_status_check_overrun:
 	/*
-	 * Status PKT overruns are uncerimoniously recovered with a
+	 * Status PKT overruns are unceremoniously recovered with a
 	 * bus reset.  If we've overrun, let the host know so that
 	 * recovery can be performed.
 	 *

==== //depot/projects/soc2005/libalias/sys/dev/iwi/if_iwi.c#8 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.46 2007/02/15 17:21:31 luigi Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.48 2007/02/20 17:32:30 luigi Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -157,6 +157,7 @@
 static int	iwi_reset(struct iwi_softc *);
 static int	iwi_load_ucode(struct iwi_softc *, const struct iwi_fw *);
 static int	iwi_load_firmware(struct iwi_softc *, const struct iwi_fw *);
+static void	iwi_release_fw_dma(struct iwi_softc *sc);
 static int	iwi_config(struct iwi_softc *);
 static int	iwi_get_firmware(struct iwi_softc *);
 static void	iwi_put_firmware(struct iwi_softc *);
@@ -331,34 +332,17 @@
 		goto fail;
 	}
 
-	error = iwi_alloc_tx_ring(sc, &sc->txq[0], IWI_TX_RING_COUNT,
-	    IWI_CSR_TX1_RIDX, IWI_CSR_TX1_WIDX);
-	if (error != 0) {
-		device_printf(dev, "could not allocate Tx ring 1\n");
-		goto fail;
+	for (i = 0; i < 4; i++) {
+		error = iwi_alloc_tx_ring(sc, &sc->txq[i], IWI_TX_RING_COUNT,
+		    IWI_CSR_TX1_RIDX + i * 4,
+		    IWI_CSR_TX1_WIDX + i * 4);
+		if (error != 0) {
+			device_printf(dev, "could not allocate Tx ring %d\n",
+				i+i);
+			goto fail;
+		}
 	}
 
-	error = iwi_alloc_tx_ring(sc, &sc->txq[1], IWI_TX_RING_COUNT,
-	    IWI_CSR_TX2_RIDX, IWI_CSR_TX2_WIDX);
-	if (error != 0) {
-		device_printf(dev, "could not allocate Tx ring 2\n");
-		goto fail;
-	}
-
-	error = iwi_alloc_tx_ring(sc, &sc->txq[2], IWI_TX_RING_COUNT,
-	    IWI_CSR_TX3_RIDX, IWI_CSR_TX3_WIDX);
-	if (error != 0) {
-		device_printf(dev, "could not allocate Tx ring 3\n");
-		goto fail;
-	}
-
-	error = iwi_alloc_tx_ring(sc, &sc->txq[3], IWI_TX_RING_COUNT,
-	    IWI_CSR_TX4_RIDX, IWI_CSR_TX4_WIDX);
-	if (error != 0) {
-		device_printf(dev, "could not allocate Tx ring 4\n");
-		goto fail;
-	}
-
 	if (iwi_alloc_rx_ring(sc, &sc->rxq, IWI_RX_RING_COUNT) != 0) {
 		device_printf(dev, "could not allocate Rx ring\n");
 		goto fail;
@@ -496,6 +480,7 @@
 		ieee80211_ifdetach(ic);
 	}
 	iwi_put_firmware(sc);
+	iwi_release_fw_dma(sc);
 
 	iwi_free_cmd_ring(sc, &sc->cmdq);
 	iwi_free_tx_ring(sc, &sc->txq[0]);
@@ -970,6 +955,7 @@
 	struct ifnet *ifp = ic->ic_ifp;
 	struct iwi_softc *sc = ifp->if_softc;
 
+	IWI_LOCK_CHECK(sc);
 	DPRINTF(("%s: %s -> %s flags 0x%x\n", __func__,
 		ieee80211_state_name[ic->ic_state],
 		ieee80211_state_name[nstate], sc->flags));
@@ -1216,6 +1202,7 @@
 {
 	struct ieee80211com *ic = &sc->sc_ic;
 
+	IWI_LOCK_CHECK(sc);
 	ic->ic_curchan = &ic->ic_channels[chan];
 	sc->curchan = chan;
 
@@ -1709,6 +1696,8 @@
 {
 	struct iwi_cmd_desc *desc;
 
+	IWI_LOCK_CHECK(sc);
+
 	if (sc->flags & IWI_FLAG_BUSY) {
 		device_printf(sc->sc_dev, "%s: cmd %d not sent, busy\n",
 			__func__, type);
@@ -1771,6 +1760,7 @@
 	int error, nsegs, hdrlen, i;
 	int ismcast, flags, xflags, staid;
 
+	IWI_LOCK_CHECK(sc);
 	wh = mtod(m0, const struct ieee80211_frame *);
 	/* NB: only data frames use this path */
 	hdrlen = ieee80211_hdrsize(wh);
@@ -2064,6 +2054,13 @@
 
 	IWI_LOCK(sc);
 
+	/*
+	 * wait until pending iwi_cmd() are completed, to avoid races
+	 * that could cause problems.
+	 */
+	while (sc->flags & IWI_FLAG_BUSY)
+		msleep(sc, &sc->sc_mtx, 0, "iwiioctl", hz);
+
 	switch (cmd) {
 	case SIOCSIFFLAGS:
 		if (ifp->if_flags & IFF_UP) {
@@ -2080,7 +2077,6 @@
 				 */
 				sc->sc_rfkill_timer = 0;
 			}
-			iwi_put_firmware(sc);
 		}
 		break;
 
@@ -2107,6 +2103,8 @@
 	uint32_t tmp;
 	int ntries;
 
+	IWI_LOCK_CHECK(sc);
+
 	/* disable interrupts */
 	CSR_WRITE_4(sc, IWI_CSR_INTR_MASK, 0);
 
@@ -2223,6 +2221,7 @@
  * This is necessary because we re-init the device sometimes
  * from a context where we cannot read from the filesystem
  * (e.g. from the taskqueue thread when rfkill is re-enabled).
+ * XXX return 0 on success, 1 on error.
  *
  * NB: the order of get'ing and put'ing images here is
  * intentional to support handling firmware images bundled
@@ -2306,33 +2305,38 @@
 		/*
 		 * Check and setup combined image.
 		 */
-		if (fp->datasize < sizeof(hdr)) {
+		if (fp->datasize < sizeof(struct iwi_firmware_hdr)) {
 			device_printf(sc->sc_dev, "image '%s' too small\n",
 			    fp->name);
 			goto bad;
 		}
 		hdr = (const struct iwi_firmware_hdr *)fp->data;
-		if (fp->datasize < sizeof(*hdr) + hdr->bsize + hdr->usize + hdr->fsize) {
+		if (fp->datasize < sizeof(*hdr) + le32toh(hdr->bsize) + le32toh(hdr->usize)
+				+ le32toh(hdr->fsize)) {
 			device_printf(sc->sc_dev, "image '%s' too small (2)\n",
 			    fp->name);
 			goto bad;
 		}
 		sc->fw_boot.data = ((const char *) fp->data) + sizeof(*hdr);
-		sc->fw_boot.size = hdr->bsize;
+		sc->fw_boot.size = le32toh(hdr->bsize);
 		sc->fw_boot.name = fp->name;
 		sc->fw_uc.data = sc->fw_boot.data + sc->fw_boot.size;
-		sc->fw_uc.size = hdr->usize;
+		sc->fw_uc.size = le32toh(hdr->usize);
 		sc->fw_uc.name = fp->name;
 		sc->fw_fw.data = sc->fw_uc.data + sc->fw_uc.size;
-		sc->fw_fw.size = hdr->fsize;
+		sc->fw_fw.size = le32toh(hdr->fsize);
 		sc->fw_fw.name = fp->name;
 	}
+#if 0
+	device_printf(sc->sc_dev, "boot %d ucode %d fw %d bytes\n",
+		sc->fw_boot.size, sc->fw_uc.size, sc->fw_fw.size);
+#endif
 
 	sc->fw_mode = ic->ic_opmode;
-	return 1;
+	return 0;
 bad:
 	iwi_put_firmware(sc);
-	return 0;
+	return 1;
 }
 
 static void
@@ -2367,6 +2371,7 @@
 	size_t size = fw->size;
 	int i, ntries, error;
 
+	IWI_LOCK_CHECK(sc);
 	error = 0;
 	CSR_WRITE_4(sc, IWI_CSR_RST, CSR_READ_4(sc, IWI_CSR_RST) |
 	    IWI_RST_STOP_MASTER);
@@ -2439,6 +2444,7 @@
 	uint32_t sentinel, ctl, src, dst, sum, len, mlen, tmp;
 	int ntries, error;
 
+	IWI_LOCK_CHECK(sc);
 	/* copy firmware image to DMA memory */
 	memcpy(sc->fw_virtaddr, fw->data, fw->size);
 
@@ -2498,12 +2504,13 @@
 			break;
 		DELAY(100);
 	}
+	/* sync dma, just in case */
+	bus_dmamap_sync(sc->fw_dmat, sc->fw_map, BUS_DMASYNC_POSTWRITE);
 	if (ntries == 400) {
 		device_printf(sc->sc_dev,
 		    "timeout processing command blocks for %s firmware\n",
 		    fw->name);
-		error = EIO;
-		goto fail5;
+		return EIO;
 	}
 
 	/* we're done with command blocks processing */
@@ -2524,7 +2531,6 @@
 		    "initialization to complete\n", fw->name);
 	}
 
-fail5:
 	return error;
 }
 
@@ -2580,6 +2586,7 @@
 	struct iwi_txpower power;
 	uint32_t data;
 	int error, i;
+	IWI_LOCK_CHECK(sc);
 
 	IEEE80211_ADDR_COPY(ic->ic_myaddr, IF_LLADDR(ifp));
 	DPRINTF(("Setting MAC address to %6D\n", ic->ic_myaddr, ":"));
@@ -2707,6 +2714,8 @@
 	struct iwi_scan_ext scan;
 	int i, ix, start, scan_type, error;
 
+	IWI_LOCK_CHECK(sc);
+
 	memset(&scan, 0, sizeof scan);
 
 	/* XXX different dwell times for different scan types */
@@ -2908,7 +2917,8 @@
 	struct iwi_rateset rs;
 	uint16_t capinfo;
 	int error;
-
+ 

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


More information about the p4-projects mailing list