Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Oct 2006 04:55:29 GMT
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 108256 for review
Message-ID:  <200610220455.k9M4tT8G083974@repoman.freebsd.org>

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

Change 108256 by mjacob@newisp on 2006/10/22 04:54:58

	IFC

Affected files ...

.. //depot/projects/newisp/amd64/amd64/pmap.c#2 integrate
.. //depot/projects/newisp/amd64/conf/GENERIC.hints#2 integrate
.. //depot/projects/newisp/arm/arm/cpufunc.c#2 integrate
.. //depot/projects/newisp/arm/arm/elf_trampoline.c#2 integrate
.. //depot/projects/newisp/arm/arm/nexus_io.c#2 integrate
.. //depot/projects/newisp/arm/arm/trap.c#4 integrate
.. //depot/projects/newisp/arm/arm/undefined.c#2 integrate
.. //depot/projects/newisp/arm/sa11x0/sa11x0.c#2 integrate
.. //depot/projects/newisp/arm/sa11x0/sa11x0_io.c#2 integrate
.. //depot/projects/newisp/arm/sa11x0/sa11x0_irqhandler.c#2 integrate
.. //depot/projects/newisp/arm/sa11x0/sa11x0_ost.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/Makefile.inc#2 integrate
.. //depot/projects/newisp/boot/arm/at91/boot0spi/main.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/bootiic/env_vars.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/bootiic/loader_prompt.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/bootspi/Makefile#2 integrate
.. //depot/projects/newisp/boot/arm/at91/bootspi/arm_init.S#2 integrate
.. //depot/projects/newisp/boot/arm/at91/bootspi/ee.c#1 branch
.. //depot/projects/newisp/boot/arm/at91/bootspi/ee.h#1 branch
.. //depot/projects/newisp/boot/arm/at91/bootspi/env_vars.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/bootspi/loader_prompt.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/bootspi/main.c#2 integrate
.. //depot/projects/newisp/conf/NOTES#9 integrate
.. //depot/projects/newisp/crypto/sha2/sha2.c#3 integrate
.. //depot/projects/newisp/dev/bce/if_bce.c#6 integrate
.. //depot/projects/newisp/dev/bce/if_bcereg.h#3 integrate
.. //depot/projects/newisp/fs/ntfs/ntfs_vnops.c#2 integrate
.. //depot/projects/newisp/i386/i386/pmap.c#2 integrate
.. //depot/projects/newisp/ia64/ia64/pmap.c#2 integrate
.. //depot/projects/newisp/kern/kern_exec.c#3 integrate
.. //depot/projects/newisp/kern/kern_exit.c#3 integrate
.. //depot/projects/newisp/kern/kern_sig.c#4 integrate
.. //depot/projects/newisp/kern/uipc_syscalls.c#2 integrate
.. //depot/projects/newisp/kern/vfs_bio.c#3 integrate
.. //depot/projects/newisp/kern/vfs_cluster.c#3 integrate
.. //depot/projects/newisp/net/if_ppp.c#2 integrate
.. //depot/projects/newisp/vm/device_pager.c#2 integrate
.. //depot/projects/newisp/vm/phys_pager.c#2 integrate
.. //depot/projects/newisp/vm/vm_contig.c#4 integrate
.. //depot/projects/newisp/vm/vm_fault.c#2 integrate
.. //depot/projects/newisp/vm/vm_map.c#2 integrate
.. //depot/projects/newisp/vm/vm_object.c#2 integrate
.. //depot/projects/newisp/vm/vm_page.c#4 integrate
.. //depot/projects/newisp/vm/vm_page.h#4 integrate
.. //depot/projects/newisp/vm/vm_pageout.c#2 integrate

Differences ...

==== //depot/projects/newisp/amd64/amd64/pmap.c#2 (text+ko) ====

@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.571 2006/08/14 15:39:41 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.572 2006/10/22 04:18:01 alc Exp $");
 
 /*
  *	Manages physical address maps.
@@ -1665,7 +1665,7 @@
 	vm_page_t m;
 
 	TAILQ_FOREACH(m, &vpq->pl, pageq) {
-		if (m->hold_count || m->busy || (m->flags & PG_BUSY))
+		if (m->hold_count || m->busy)
 			continue;
 		TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) {
 			va = pv->pv_va;

==== //depot/projects/newisp/amd64/conf/GENERIC.hints#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/amd64/conf/GENERIC.hints,v 1.15 2004/07/22 22:28:34 imp Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC.hints,v 1.16 2006/10/21 12:52:46 ru Exp $
 hint.fdc.0.at="isa"
 hint.fdc.0.port="0x3F0"
 hint.fdc.0.irq="6"
@@ -11,7 +11,6 @@
 hint.atkbdc.0.port="0x060"
 hint.atkbd.0.at="atkbdc"
 hint.atkbd.0.irq="1"
-hint.atkbd.0.flags="0x1"
 hint.psm.0.at="atkbdc"
 hint.psm.0.irq="12"
 hint.vga.0.at="isa"

==== //depot/projects/newisp/arm/arm/cpufunc.c#2 (text+ko) ====

@@ -45,11 +45,8 @@
  * Created      : 30/01/97
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.11 2006/08/24 23:51:27 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.12 2006/10/21 04:25:00 kevlo Exp $");
 
-#include <sys/cdefs.h>
-
-#include <sys/types.h>
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/lock.h>

==== //depot/projects/newisp/arm/arm/elf_trampoline.c#2 (text+ko) ====

@@ -23,9 +23,8 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/elf_trampoline.c,v 1.13 2006/08/24 23:51:27 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/elf_trampoline.c,v 1.14 2006/10/21 04:25:00 kevlo Exp $");
 #include <machine/asm.h>
-#include <sys/types.h>
 #include <sys/elf32.h>
 #include <sys/param.h>
 #include <sys/inflate.h>

==== //depot/projects/newisp/arm/arm/nexus_io.c#2 (text+ko) ====

@@ -37,12 +37,11 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/nexus_io.c,v 1.5 2005/01/05 21:58:47 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/nexus_io.c,v 1.6 2006/10/21 04:25:00 kevlo Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/queue.h>
-#include <sys/types.h>
 #include <sys/bus.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>

==== //depot/projects/newisp/arm/arm/trap.c#4 (text+ko) ====

@@ -82,9 +82,7 @@
 #include "opt_ktrace.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.30 2006/10/21 00:46:56 cognet Exp $");
-
-#include <sys/types.h>
+__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.31 2006/10/21 04:25:00 kevlo Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>

==== //depot/projects/newisp/arm/arm/undefined.c#2 (text+ko) ====

@@ -48,7 +48,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/undefined.c,v 1.13 2006/04/09 20:16:47 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/undefined.c,v 1.14 2006/10/21 04:25:00 kevlo Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -58,7 +58,6 @@
 #include <sys/proc.h>
 #include <sys/syslog.h>
 #include <sys/vmmeter.h>
-#include <sys/types.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/signalvar.h>

==== //depot/projects/newisp/arm/sa11x0/sa11x0.c#2 (text+ko) ====

@@ -57,14 +57,13 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0.c,v 1.6 2006/04/20 04:12:02 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0.c,v 1.7 2006/10/21 04:25:00 kevlo Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/bus.h>
 #include <sys/kernel.h>
 #include <sys/reboot.h>
-#include <sys/types.h>
 #include <sys/malloc.h>
 #include <sys/bus.h>
 #include <sys/interrupt.h>

==== //depot/projects/newisp/arm/sa11x0/sa11x0_io.c#2 (text+ko) ====

@@ -41,11 +41,10 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0_io.c,v 1.8 2006/05/23 12:14:14 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0_io.c,v 1.9 2006/10/21 04:25:00 kevlo Exp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/queue.h>
-#include <sys/types.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
 

==== //depot/projects/newisp/arm/sa11x0/sa11x0_irqhandler.c#2 (text+ko) ====

@@ -76,14 +76,13 @@
 
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0_irqhandler.c,v 1.5 2005/09/25 21:06:50 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0_irqhandler.c,v 1.6 2006/10/21 04:25:00 kevlo Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
 #include <sys/systm.h>
 #include <sys/syslog.h>
 #include <sys/malloc.h>
-#include <sys/types.h>
 #include <sys/bus.h>
 #include <sys/interrupt.h>
 #include <sys/rman.h>

==== //depot/projects/newisp/arm/sa11x0/sa11x0_ost.c#2 (text+ko) ====

@@ -38,9 +38,8 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0_ost.c,v 1.4 2005/12/22 22:16:06 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/sa11x0/sa11x0_ost.c,v 1.5 2006/10/21 04:25:00 kevlo Exp $");
 
-#include <sys/types.h>
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>

==== //depot/projects/newisp/boot/arm/at91/Makefile.inc#2 (text) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/arm/at91/Makefile.inc,v 1.3 2006/08/10 18:22:56 imp Exp $
+# $FreeBSD: src/sys/boot/arm/at91/Makefile.inc,v 1.4 2006/10/21 22:51:20 imp Exp $
 
 .if !target(__at91_boot_Makefile.inc__)
 .PATH:	${.CURDIR}/../../../../libkern ${.CURDIR}/../../../../libkern/arm
@@ -44,10 +44,10 @@
 MK_TAG_LIST:=no
 .endif
 
-.if defined(WITHOUT_FPGA)
+.if defined(WITH_FPGA)
+MK_FPGA:=yes
+.else
 MK_FPGA:=no
-.else
-MK_FPGA:=yes
 .endif
 
 .endif

==== //depot/projects/newisp/boot/arm/at91/boot0spi/main.c#2 (text) ====

@@ -21,7 +21,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/boot/arm/at91/boot0spi/main.c,v 1.2 2006/08/16 23:18:07 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/boot0spi/main.c,v 1.3 2006/10/21 22:43:07 imp Exp $
  */
 
 #include "at91rm9200.h"
@@ -40,12 +40,12 @@
 	char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* Load to base + 2MB */
 
 	SPI_InitFlash();
-	printf("Waiting for data\r\n");
+	printf("Waiting for data\n");
 	while ((len = xmodem_rx(addr)) == -1)
 		continue;
-	printf("\r\nDownloaded %u bytes.\r\n", len);
-	p_memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * FLASH_PAGE_SIZE);
-	printf("Writing %u bytes to flash at %u\r\n", len, OFFSET);
+	printf("\nDownloaded %u bytes.\n", len);
+	memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * FLASH_PAGE_SIZE);
+	printf("Writing %u bytes to flash at %u\n", len, OFFSET);
 	for (i = 0; i < len; i+= FLASH_PAGE_SIZE) {
 		for (j = 0; j < 10; j++) {
 			off = i + OFFSET;
@@ -55,7 +55,7 @@
 				break;
 		}
 		if (j >= 10)
-			printf("Bad Readback at %u\r\n", i);
+			printf("Bad Readback at %u\n", i);
 	}
 	return (1);
 }

==== //depot/projects/newisp/boot/arm/at91/bootiic/env_vars.c#2 (text+ko) ====

@@ -17,7 +17,7 @@
  * only.
  * END_BLOCK
  *
- * $FreeBSD: src/sys/boot/arm/at91/bootiic/env_vars.c,v 1.1 2006/08/10 19:55:52 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/bootiic/env_vars.c,v 1.2 2006/10/21 22:43:39 imp Exp $
  *****************************************************************************/
 
 #include "env_vars.h"
@@ -93,7 +93,7 @@
 		if (size < 0) {
 			continue;
 		}
-		p_memcpy(cPtr, boot_commands[i], copySize);
+		memcpy(cPtr, boot_commands[i], copySize);
 		cPtr += copySize;
 		*cPtr++ = 0;
 	}

==== //depot/projects/newisp/boot/arm/at91/bootiic/loader_prompt.c#2 (text+ko) ====

@@ -19,7 +19,7 @@
  * only.
  * END_BLOCK
  *
- * $FreeBSD: src/sys/boot/arm/at91/bootiic/loader_prompt.c,v 1.2 2006/08/16 23:39:58 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/bootiic/loader_prompt.c,v 1.3 2006/10/21 22:43:39 imp Exp $
  *****************************************************************************/
 
 #include "at91rm9200_lowlevel.h"
@@ -93,7 +93,7 @@
 	int	i;
 
 	for (i = 0; CommandTable[i].command != COMMAND_FINAL_FLAG; ++i)
-		if (!p_strcmp(CommandTable[i].c_string, cPtr))
+		if (!strcmp(CommandTable[i].c_string, cPtr))
 			return (CommandTable[i].command);
 
 	return (COMMAND_INVALID);
@@ -188,7 +188,7 @@
 			to = (char *)p_ASCIIToHex(argv[1]);
 			from = (char *)p_ASCIIToHex(argv[2]);
 			size = p_ASCIIToHex(argv[3]);
-			p_memcpy(to, from, size);
+			memcpy(to, from, size);
 		}
 		break;
 	}
@@ -234,20 +234,20 @@
 
 	case COMMAND_HELP:
 		// dump command info
-		printf("Commands:\r\n"
-		"\tc\r\n"
-		"\td\r\n"
-		"\te\r\n"
-		"\tip\r\n"
-		"\tserver_ip\r\n"
-		"\tm\r\n"
-		"\ttftp\r\n"
-		"\ts\r\n"
+		printf("Commands:\n"
+		"\tc\n"
+		"\td\n"
+		"\te\n"
+		"\tip\n"
+		"\tserver_ip\n"
+		"\tm\n"
+		"\ttftp\n"
+		"\ts\n"
 #ifdef SUPPORT_TAG_LIST
-		"\tt\r\n"
+		"\tt\n"
 #endif
-		"\tw\r\n"
-		"\tx\r\n");
+		"\tw\n"
+		"\tx\n");
 		break;
 
 	case COMMAND_LOCAL_IP:
@@ -315,7 +315,7 @@
 		break;
 	}
 
-	printf("\r\n");
+	printf("\n");
 }
 
 
@@ -324,7 +324,7 @@
  * void ServicePrompt(char)
  *  This private function process each character checking for valid commands.
  * This function is only executed if the character is considered valid.
- * Each command is terminated with NULL (0) or '\r'.
+ * Each command is terminated with NULL (0) or ''.
  * .KB_C_FN_DEFINITION_END
  */
 static void
@@ -346,11 +346,11 @@
 		putchar(p_char);
 	}
 	if (!p_char) {
-		printf("\r\n");
+		printf("\n");
 		ParseCommand(inputBuffer);
 		p_memset(inputBuffer, 0, MAX_INPUT_SIZE);
 		buffCount = 0;
-		printf("\r\n>");
+		printf("\n>");
 	}
 }
 
@@ -379,7 +379,7 @@
 		inputFunction = getc;
 	}
 
-	printf("\r\n>");
+	printf("\n>");
 
 	while (1)
 		if ((ch = ((*inputFunction)(0))) > 0)

==== //depot/projects/newisp/boot/arm/at91/bootspi/Makefile#2 (text) ====

@@ -1,14 +1,14 @@
-#  $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.2 2006/08/16 23:39:58 imp Exp $
+#  $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.4 2006/10/21 22:51:21 imp Exp $
 
 P=bootspi
 FILES=${P}
-SRCS=arm_init.S main.c loader_prompt.c env_vars.c
+SRCS=arm_init.S main.c loader_prompt.c env_vars.c ee.c
 NO_MAN=
 LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg
 OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
 
 .include <bsd.prog.mk>
 
-.if ${MK_FPGA} != "no"
+.if ${MK_FPGA} == "yes"
 CFLAGS += -DTSC_FPGA
 .endif

==== //depot/projects/newisp/boot/arm/at91/bootspi/arm_init.S#2 (text+ko) ====

@@ -20,7 +20,7 @@
  * only.
  * END_BLOCK
  *
- * $FreeBSD: src/sys/boot/arm/at91/bootspi/arm_init.S,v 1.2 2006/08/17 00:14:32 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/bootspi/arm_init.S,v 1.3 2006/10/21 22:44:26 imp Exp $
  ******************************************************************************/
 
 	.equ	ARM_MODE_USER,	0x10
@@ -59,7 +59,11 @@
 dabtvec:
                 B           dabtvec         	@; Data Abort
 rsvdvec:
+#ifdef BOOT_IIC
+		.long	12 << 10		@; 12k from iic part
+#else
 		.long	((1056 << 17) | (13 << 13) | (12 * 2))
+#endif
 irqvec:
                 ldr         pc, [pc,#-0xF20]    @; IRQ : read the AIC
 fiqvec:
@@ -109,7 +113,7 @@
 	.string "e 0x10000000                           "
 	.string "                 "
 #else
-#if 0
+#if 1
 	.string "Bootloader for KB9202 Evaluation Board."
 	.string "m 42 53 44 0 0 1                       "
 	.string "ip 206 168 13 194                      "

==== //depot/projects/newisp/boot/arm/at91/bootspi/env_vars.c#2 (text+ko) ====

@@ -17,7 +17,7 @@
  * only.
  * END_BLOCK
  *
- * $FreeBSD: src/sys/boot/arm/at91/bootspi/env_vars.c,v 1.1 2006/08/16 23:39:58 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/bootspi/env_vars.c,v 1.2 2006/10/21 22:44:26 imp Exp $
  *****************************************************************************/
 
 #include "env_vars.h"
@@ -82,7 +82,7 @@
 	int	i;
 
 	for (i = 0; boot_commands[i][0]; i++)
-		printf("0x%x : %s[E]\r\n", i, boot_commands[i]);
+		printf("0x%x : %s[E]\n", i, boot_commands[i]);
 }
 
 
@@ -125,6 +125,6 @@
 	currentOffset = 0;
 
 	DumpBootCommands();
-	printf("Autoboot...\r\n");
+	printf("Autoboot...\n");
 	Bootloader(ReadCharFromEnvironment);
 }

==== //depot/projects/newisp/boot/arm/at91/bootspi/loader_prompt.c#2 (text+ko) ====

@@ -19,7 +19,7 @@
  * only.
  * END_BLOCK
  *
- * $FreeBSD: src/sys/boot/arm/at91/bootspi/loader_prompt.c,v 1.1 2006/08/16 23:39:58 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/bootspi/loader_prompt.c,v 1.3 2006/10/21 22:51:21 imp Exp $
  *****************************************************************************/
 
 #include "at91rm9200_lowlevel.h"
@@ -29,6 +29,7 @@
 #include "env_vars.h"
 #include "lib.h"
 #include "spi_flash.h"
+#include "ee.h"
 
 /******************************* GLOBALS *************************************/
 
@@ -65,6 +66,36 @@
 	{COMMAND_FINAL_FLAG, 0}
 };
 
+#ifdef TSC_FPGA
+#include "fpga.h"
+
+const struct fpga main_fpga = 
+{
+    AT91C_BASE_PIOB, AT91C_PIO_PB0,
+    AT91C_BASE_PIOC, AT91C_PIO_PC11,
+    AT91C_BASE_PIOB, AT91C_PIO_PB2,
+    AT91C_BASE_PIOC, AT91C_PIO_PC12
+};
+
+void
+fpga_load(void)
+{
+	int len, off, i, offset;
+	char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */
+
+	len = FPGA_LEN;
+	offset = FPGA_OFFSET;
+	for (i = 0; i < len; i+= FLASH_PAGE_SIZE) {
+		off = i + offset;
+		SPI_ReadFlash(off, addr + i, FLASH_PAGE_SIZE);
+	}
+	fpga_init(&main_fpga);
+	fpga_clear(&main_fpga);
+	fpga_write_bytes(&main_fpga, addr, len);
+	fpga_done(&main_fpga);
+}
+#endif
+
 /*
  * .KB_C_FN_DEFINITION_START
  * unsigned BuildIP(void)
@@ -93,7 +124,7 @@
 	int	i;
 
 	for (i = 0; CommandTable[i].command != COMMAND_FINAL_FLAG; ++i)
-		if (!p_strcmp(CommandTable[i].c_string, cPtr))
+		if (!strcmp(CommandTable[i].c_string, cPtr))
 			return (CommandTable[i].command);
 
 	return (COMMAND_INVALID);
@@ -150,7 +181,7 @@
 
 	while ((len = xmodem_rx(addr)) == -1)
 		continue;
-	printf("\r\nDownloaded %u bytes.\r\n", len);
+	printf("\nDownloaded %u bytes.\n", len);
 	WriteEEPROM(eeaddr, 0, addr, len);
 }
 #endif
@@ -163,7 +194,7 @@
 
 	while ((len = xmodem_rx(addr)) == -1)
 		continue;
-	printf("\r\nDownloaded %u bytes.\r\n", len);
+	printf("\nDownloaded %u bytes.\n", len);
 	for (i = 0; i < len; i+= FLASH_PAGE_SIZE) {
 		off = i + offset;
 		SPI_WriteFlash(off, addr + i, FLASH_PAGE_SIZE);
@@ -270,29 +301,38 @@
 		break;
 
 	case COMMAND_RESET:
-		printf("Reset\r\n");
+		printf("Reset\n");
 		reset();
 		while (1) continue;
 		break;
 
 	case COMMAND_REPLACE_KERNEL_VIA_XMODEM:
-		printf("Updating KERNEL image\r\n");
+		printf("Updating KERNEL image\n");
 		UpdateFlash(KERNEL_OFFSET);
 		break;
 	case COMMAND_REPLACE_FPGA_VIA_XMODEM:
-		printf("Updating FPGA image\r\n");
+		printf("Updating FPGA image\n");
 		UpdateFlash(FPGA_OFFSET);
 		break;
 	case COMMAND_REPLACE_FLASH_VIA_XMODEM: 
-		printf("Updating FLASH image\r\n");
+		printf("Updating FLASH image\n");
 		UpdateFlash(FLASH_OFFSET);
 		break;
 
+	case COMMAND_REPLACE_ID_EEPROM: 
+	{
+	    char buf[25];
+		printf("Testing Config EEPROM\n");
+		EEWrite(0, "This is a test", 15);
+		EERead(0, buf, 15);
+		printf("Found '%s'\n", buf);
+		break;
+	}
 	default:
 		break;
 	}
 
-	printf("\r\n");
+	printf("\n");
 }
 
 
@@ -301,7 +341,7 @@
  * void ServicePrompt(char)
  *  This private function process each character checking for valid commands.
  * This function is only executed if the character is considered valid.
- * Each command is terminated with NULL (0) or '\r'.
+ * Each command is terminated with NULL (0) or ''.
  * .KB_C_FN_DEFINITION_END
  */
 static void
@@ -323,11 +363,11 @@
 		putchar(p_char);
 	}
 	if (!p_char) {
-		printf("\r\n");
+		printf("\n");
 		ParseCommand(inputBuffer);
 		p_memset(inputBuffer, 0, MAX_INPUT_SIZE);
 		buffCount = 0;
-		printf("\r\n>");
+		printf("\n>");
 	}
 }
 
@@ -352,7 +392,7 @@
 	p_memset((void*)inputBuffer, 0, sizeof(inputBuffer));
 	buffCount = 0;
 
-	printf("\r\n>");
+	printf("\n>");
 
 	while (1)
 		if ((ch = ((*inputFunction)(0))) > 0)

==== //depot/projects/newisp/boot/arm/at91/bootspi/main.c#2 (text) ====

@@ -31,7 +31,7 @@
  * owners.  This software is not copyrighted and is intended for reference
  * only.
  *
- * $FreeBSD: src/sys/boot/arm/at91/bootspi/main.c,v 1.2 2006/08/16 23:39:58 imp Exp $
+ * $FreeBSD: src/sys/boot/arm/at91/bootspi/main.c,v 1.3 2006/10/21 22:44:26 imp Exp $
  */
 
 #include "env_vars.h"
@@ -41,12 +41,17 @@
 #include "emac.h"
 #include "lib.h"
 #include "spi_flash.h"
+#include "ee.h"
 
 int
 main(void)
 {
-	printf("\r\nBoot\r\n");
+	printf("\nBoot\n");
+	EEInit();
 	SPI_InitFlash();
+#ifdef TSC_FPGA
+	fpga_load();
+#endif
 	EMAC_Init();
 	LoadBootCommands();
 	if (getc(1) == -1) {

==== //depot/projects/newisp/conf/NOTES#9 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1391 2006/10/20 09:52:26 des Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1392 2006/10/21 04:13:20 scottl Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -1482,7 +1482,7 @@
 device		mlx		# Mylex DAC960
 device		amr		# AMI MegaRAID
 device		mfi		# LSI MegaRAID SAS
-options		MFI_DEBUG
+options 	MFI_DEBUG
 
 #
 # 3ware ATA RAID

==== //depot/projects/newisp/crypto/sha2/sha2.c#3 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/crypto/sha2/sha2.c,v 1.8 2006/08/26 21:48:00 kan Exp $");
+__FBSDID("$FreeBSD: src/sys/crypto/sha2/sha2.c,v 1.9 2006/10/22 02:19:33 kevlo Exp $");
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -750,7 +750,7 @@
 
 void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
 	sha2_word64	a, b, c, d, e, f, g, h, s0, s1;
-	sha2_word64	T1, T2 = 0, *W512 = (sha2_word64*)context->buffer;
+	sha2_word64	T1 = 0, T2 = 0, *W512 = (sha2_word64*)context->buffer;
 	int		j;
 
 	/* Initialize registers with the prev. intermediate value */

==== //depot/projects/newisp/dev/bce/if_bce.c#6 (text) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.16 2006/10/19 08:01:43 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.17 2006/10/21 07:54:39 scottl Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -4549,13 +4549,6 @@
 	chain_prod = TX_CHAIN_IDX(prod);
 	map = sc->tx_mbuf_map[chain_prod];
 
-	/*
-	 * XXX This should be handled higher up.
-	 */
-	if ((USABLE_TX_BD - sc->used_tx_bd - BCE_TX_SLACK_SPACE) <= 0) {
-		return (ENOBUFS);
-	}
-
 	/* Map the mbuf into our DMA address space. */
 	error = bus_dmamap_load_mbuf_sg(sc->tx_mbuf_tag, map, m0,
 	    segs, &nsegs, BUS_DMA_NOWAIT);
@@ -4596,6 +4589,16 @@
 		return (error);
 	}
 
+	/*
+	 * The chip seems to require that at least 16 descriptors be kept
+	 * empty at all times.  Make sure we honor that.
+	 * XXX Would it be faster to assume worst case scenario for nsegs
+	 * and do this calculation higher up?
+	 */
+	if (nsegs > (USABLE_TX_BD - sc->used_tx_bd - BCE_TX_SLACK_SPACE)) {
+		bus_dmamap_unload(sc->tx_mbuf_tag, map);
+		return (ENOBUFS);
+	}
 
 	/* prod points to an empty tx_bd at this point. */
 	prod_bseq  = sc->tx_prod_bseq;
@@ -4701,7 +4704,7 @@
 		__FUNCTION__, tx_prod, tx_chain_prod, sc->tx_prod_bseq);
 
 	/* Keep adding entries while there is space in the ring. */
-	while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) {
+	while (sc->tx_mbuf_ptr[tx_chain_prod] == NULL) {
 
 		/* Check for any frames to send. */
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);

==== //depot/projects/newisp/dev/bce/if_bcereg.h#3 (text) ====

@@ -26,7 +26,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/bce/if_bcereg.h,v 1.7 2006/10/15 23:42:56 scottl Exp $
+ * $FreeBSD: src/sys/dev/bce/if_bcereg.h,v 1.8 2006/10/21 20:41:08 scottl Exp $
  */
 
 #ifndef	_BCE_H_DEFINED
@@ -4613,7 +4613,12 @@
 #define BCE_BUS_SPACE_MAXADDR		0xFFFFFFFFFF
 #endif
 
+/* XXX UDP checksum offload seems to cause problems on transmit */
+#ifdef BCE_UDP_CSUM
 #define BCE_IF_HWASSIST	(CSUM_IP | CSUM_TCP | CSUM_UDP)
+#else
+#define BCE_IF_HWASSIST	(CSUM_TCP)
+#endif
 
 #if __FreeBSD_version < 700000
 #define BCE_IF_CAPABILITIES (IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | \

==== //depot/projects/newisp/fs/ntfs/ntfs_vnops.c#2 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/fs/ntfs/ntfs_vnops.c,v 1.57 2006/01/17 17:29:02 alfred Exp $
+ * $FreeBSD: src/sys/fs/ntfs/ntfs_vnops.c,v 1.58 2006/10/21 08:17:17 trhodes Exp $
  *
  */
 
@@ -187,7 +187,7 @@
 	vap->va_fsid = dev2udev(ip->i_dev);
 	vap->va_fileid = ip->i_number;
 	vap->va_mode = ip->i_mp->ntm_mode;
-	vap->va_nlink = ip->i_nlink;
+	vap->va_nlink = (ip->i_nlink || ip->i_flag & IN_LOADED ? ip->i_nlink : 1);
 	vap->va_uid = ip->i_mp->ntm_uid;
 	vap->va_gid = ip->i_mp->ntm_gid;
 	vap->va_rdev = 0;				/* XXX UNODEV ? */

==== //depot/projects/newisp/i386/i386/pmap.c#2 (text+ko) ====

@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.575 2006/08/14 15:39:41 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.576 2006/10/22 04:18:01 alc Exp $");
 
 /*
  *	Manages physical address maps.
@@ -1739,7 +1739,7 @@
 
 	sched_pin();
 	TAILQ_FOREACH(m, &vpq->pl, pageq) {
-		if (m->hold_count || m->busy || (m->flags & PG_BUSY))
+		if (m->hold_count || m->busy)
 			continue;
 		TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) {
 			va = pv->pv_va;

==== //depot/projects/newisp/ia64/ia64/pmap.c#2 (text+ko) ====

@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ia64/ia64/pmap.c,v 1.178 2006/08/01 19:06:05 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/ia64/ia64/pmap.c,v 1.179 2006/10/22 04:18:01 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -831,7 +831,7 @@
 	vpq = &vm_page_queues[PQ_INACTIVE];
 retry:
 	TAILQ_FOREACH(m, &vpq->pl, pageq) {
-		if (m->hold_count || m->busy || (m->flags & PG_BUSY))
+		if (m->hold_count || m->busy)
 			continue;
 		TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) {
 			va = pv->pv_va;

==== //depot/projects/newisp/kern/kern_exec.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_exec.c,v 1.295 2006/09/01 11:45:39 wsalamon Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_exec.c,v 1.296 2006/10/22 04:28:13 alc Exp $");
 
 #include "opt_hwpmc_hooks.h"
 #include "opt_ktrace.h"
@@ -827,7 +827,7 @@
 			if ((ma[i] = vm_page_lookup(object, i)) != NULL) {
 				if (ma[i]->valid)
 					break;
-				if ((ma[i]->flags & PG_BUSY) || ma[i]->busy)
+				if ((ma[i]->oflags & VPO_BUSY) || ma[i]->busy)
 					break;
 				vm_page_lock_queues();
 				vm_page_busy(ma[i]);

==== //depot/projects/newisp/kern/kern_exit.c#3 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_exit.c,v 1.290 2006/09/13 15:47:53 csjp Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_exit.c,v 1.291 2006/10/21 23:59:15 davidxu Exp $");
 
 #include "opt_compat.h"
 #include "opt_ktrace.h"
@@ -257,8 +257,6 @@
 		KASSERT(!timevalisset(&p->p_realtimer.it_value),
 		    ("realtime timer is still armed"));
 	}
-	sigqueue_flush(&p->p_sigqueue);
-	sigqueue_flush(&td->td_sigqueue);
 	PROC_UNLOCK(p);
 
 	/*
@@ -512,6 +510,14 @@
 	sx_xunlock(&proctree_lock);
 
 	/*
+	 * The state PRS_ZOMBIE prevents other proesses from sending
+	 * signal to the process, to avoid memory leak, we free memory
+	 * for signal queue at the time when the state is set.
+	 */
+	sigqueue_flush(&p->p_sigqueue);
+	sigqueue_flush(&td->td_sigqueue);
+
+	/*
 	 * We have to wait until after acquiring all locks before
 	 * changing p_state.  We need to avoid all possible context
 	 * switches (including ones from blocking on a mutex) while

==== //depot/projects/newisp/kern/kern_sig.c#4 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.333 2006/10/20 16:19:21 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.334 2006/10/22 00:09:41 davidxu Exp $");
 
 #include "opt_compat.h"
 #include "opt_ktrace.h"
@@ -276,8 +276,7 @@
 		SIGDELSET(sq->sq_kill, signo);
 	}
 
-	for (ksi = TAILQ_FIRST(&sq->sq_list); ksi != NULL; ksi = next) {
-		next = TAILQ_NEXT(ksi, ksi_link);
+	TAILQ_FOREACH_SAFE(ksi, &sq->sq_list, ksi_link, next) {
 		if (ksi->ksi_signo == signo) {
 			if (count == 0) {
 				TAILQ_REMOVE(&sq->sq_list, ksi, ksi_link);
@@ -428,8 +427,7 @@
 	p1 = src->sq_proc;
 	p2 = dst->sq_proc;
 	/* Move siginfo to target list */
-	for (ksi = TAILQ_FIRST(&src->sq_list); ksi != NULL; ksi = next) {
-		next = TAILQ_NEXT(ksi, ksi_link);
+	TAILQ_FOREACH_SAFE(ksi, &src->sq_list, ksi_link, next) {
 		if (SIGISMEMBER(set, ksi->ksi_signo)) {
 			TAILQ_REMOVE(&src->sq_list, ksi, ksi_link);
 			if (p1 != NULL)
@@ -475,8 +473,7 @@
 	KASSERT(sq->sq_flags & SQ_INIT, ("src sigqueue not inited"));
 
 	/* Remove siginfo queue */
-	for (ksi = TAILQ_FIRST(&sq->sq_list); ksi != NULL; ksi = next) {
-		next = TAILQ_NEXT(ksi, ksi_link);
+	TAILQ_FOREACH_SAFE(ksi, &sq->sq_list, ksi_link, next) {
 		if (SIGISMEMBER(*set, ksi->ksi_signo)) {
 			TAILQ_REMOVE(&sq->sq_list, ksi, ksi_link);
 			ksi->ksi_sigq = NULL;

==== //depot/projects/newisp/kern/uipc_syscalls.c#2 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.237 2006/08/09 17:43:26 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.238 2006/10/22 04:28:13 alc Exp $");
 
 #include "opt_compat.h"
 #include "opt_ktrace.h"
@@ -2100,7 +2100,7 @@
 			 * If not and it is not valid, then free it.
 			 */
 			if (pg->wire_count == 0 && pg->valid == 0 &&
-			    pg->busy == 0 && !(pg->flags & PG_BUSY) &&
+			    pg->busy == 0 && !(pg->oflags & VPO_BUSY) &&
 			    pg->hold_count == 0) {
 				vm_page_free(pg);
 			}


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



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