Module Name:    src
Committed By:   kiyohara
Date:           Sat Jul 10 08:17:48 UTC 2010

Modified Files:
        src/sys/arch/evbarm/conf: GUMSTIX files.gumstix mk.gumstix std.gumstix
        src/sys/arch/evbarm/gumstix: gumstix_machdep.c gumstix_start.S
            gumstixreg.h gxio.c
Added Files:
        src/sys/arch/evbarm/conf: OVERO files.overo std.overo

Log Message:
Support Overo (Gumstix inc).
  + This commit supports basically.
  + Expansion boards not support yet.  And MicroSD, Wifi, Bluetooth too.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/evbarm/conf/GUMSTIX
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/OVERO \
    src/sys/arch/evbarm/conf/files.overo src/sys/arch/evbarm/conf/std.overo
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/conf/files.gumstix
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/mk.gumstix
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/conf/std.gumstix
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbarm/gumstix/gumstix_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/gumstix/gumstix_start.S
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/gumstix/gumstixreg.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/gumstix/gxio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/conf/GUMSTIX
diff -u src/sys/arch/evbarm/conf/GUMSTIX:1.50 src/sys/arch/evbarm/conf/GUMSTIX:1.51
--- src/sys/arch/evbarm/conf/GUMSTIX:1.50	Sat Jul 10 07:59:09 2010
+++ src/sys/arch/evbarm/conf/GUMSTIX	Sat Jul 10 08:17:48 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: GUMSTIX,v 1.50 2010/07/10 07:59:09 kiyohara Exp $
+#	$NetBSD: GUMSTIX,v 1.51 2010/07/10 08:17:48 kiyohara Exp $
 #
 #	GUMSTIX -- Gumstix. Inc. gumstix platforms kernel
 #
@@ -23,6 +23,7 @@
 options 	XSCALE_CACHE_READ_WRITE_ALLOCATE
 
 # Gumstix options
+options 	GUMSTIX
 # if not specfied 'busheader=' in args from u-boot, use GXIO_DEFAULT_EXPANSION.
 options 	GUMSTIX_NETBSD_ARGS_BUSHEADER
 options 	GUMSTIX_NETBSD_ARGS_CONSOLE	# dynamically configure console

Index: src/sys/arch/evbarm/conf/files.gumstix
diff -u src/sys/arch/evbarm/conf/files.gumstix:1.15 src/sys/arch/evbarm/conf/files.gumstix:1.16
--- src/sys/arch/evbarm/conf/files.gumstix:1.15	Sun Mar  7 09:18:51 2010
+++ src/sys/arch/evbarm/conf/files.gumstix	Sat Jul 10 08:17:48 2010
@@ -1,10 +1,11 @@
-#	$NetBSD: files.gumstix,v 1.15 2010/03/07 09:18:51 kiyohara Exp $
+#	$NetBSD: files.gumstix,v 1.16 2010/07/10 08:17:48 kiyohara Exp $
 #
 # Gumstix. Inc. Gumstix boards configuration info
 #
 
 file	arch/evbarm/gumstix/gumstix_machdep.c
-defflag opt_gumstix.h				GUMSTIX_NETBSD_ARGS_BUSHEADER
+defflag opt_gumstix.h				GUMSTIX
+						GUMSTIX_NETBSD_ARGS_BUSHEADER
 						GUMSTIX_NETBSD_ARGS_CONSOLE
 
 # CPU support and integrated peripherals

Index: src/sys/arch/evbarm/conf/mk.gumstix
diff -u src/sys/arch/evbarm/conf/mk.gumstix:1.1 src/sys/arch/evbarm/conf/mk.gumstix:1.2
--- src/sys/arch/evbarm/conf/mk.gumstix:1.1	Mon Oct 16 16:40:14 2006
+++ src/sys/arch/evbarm/conf/mk.gumstix	Sat Jul 10 08:17:48 2010
@@ -1,13 +1,50 @@
-#	$NetBSD: mk.gumstix,v 1.1 2006/10/16 16:40:14 kiyohara Exp $
+#	$NetBSD: mk.gumstix,v 1.2 2010/07/10 08:17:48 kiyohara Exp $
 
 SYSTEM_FIRST_OBJ=	gumstix_start.o
 SYSTEM_FIRST_SFILE=	${THISARM}/gumstix/gumstix_start.S
 
+_OSRELEASE!=            ${HOST_SH} $S/conf/osrelease.sh
+
+.if ${BOARDTYPE} == "gumstix"
 KERNEL_BASE_PHYS=0xa0200000
-KERNEL_BASE_VIRT=0xc0200000
+.elif ${BOARDTYPE} == "overo"
+KERNEL_BASE_PHYS=$(LOADADDRESS)
+.endif
+KERNEL_BASE_VIRT=$(LOADADDRESS)
+
+.if ${USETOOLS} == "yes"
+MKUBOOTIMAGE=		${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage
+.else
+MKUBOOTIMAGE=		mkubootimage
+.endif
+MKUBOOTIMAGEARGS=	-A arm -T kernel
+MKUBOOTIMAGEARGS+=	-a $(KERNEL_BASE_PHYS)
+MKUBOOTIMAGEARGS+=	-n "NetBSD/$(BOARDTYPE) ${_OSRELEASE}"
+MKUBOOTIMAGEARGS_NONE=	${MKUBOOTIMAGEARGS} -C none
+MKUBOOTIMAGEARGS_GZ=	${MKUBOOTIMAGEARGS} -C gz
 
+#
+# U-boot that operates with old basix/connex has some bugs.
+#
 SYSTEM_LD_TAIL_EXTRA+=; \
 	echo ${OBJCOPY} -S -O binary $@ $...@.bin; \
-	${OBJCOPY} -S -O binary $@ $...@.bin;
+	${OBJCOPY} -S -O binary $@ $...@.bin; \
+	echo gzip -c $...@.bin > $...@.bin.gz; \
+	gzip -c $...@.bin > $...@.bin.gz; \
+	echo ${MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $...@.bin.gz $...@.gz.ub; \
+	${MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $...@.bin.gz $...@.gz.ub
+.if ${BOARDTYPE} == "gumstix"
+	#
+	# These not have expanding buffer over 4Mbyte. (before version 1.1.5)
+	# And these cannot handle the endian of entry point. (1.1.4 and older)
+	#
+SYSTEM_LD_TAIL_EXTRA+=; \
+	echo ${MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $...@.bin $...@.ub; \
+	${MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $...@.bin $...@.ub; \
+	echo ${MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE:C/((-a (0x)*)([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2}))/\1 -e \3\7\6\5\4/W} $...@.bin $...@-old.ub; \
+	${MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE:C/((-a (0x)*)([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2}))/\1 -e \3\7\6\5\4/W} $...@.bin $...@-old.ub
+.endif
+SYSTEM_LD_TAIL_EXTRA+=; \
+	echo
 
 EXTRA_KERNELS+= ${KERNELS:@.kern...@${.kernel.}.bin@}

Index: src/sys/arch/evbarm/conf/std.gumstix
diff -u src/sys/arch/evbarm/conf/std.gumstix:1.5 src/sys/arch/evbarm/conf/std.gumstix:1.6
--- src/sys/arch/evbarm/conf/std.gumstix:1.5	Sun Jun 22 08:27:18 2008
+++ src/sys/arch/evbarm/conf/std.gumstix	Sat Jul 10 08:17:48 2010
@@ -1,14 +1,13 @@
-#	$NetBSD: std.gumstix,v 1.5 2008/06/22 08:27:18 kiyohara Exp $
+#	$NetBSD: std.gumstix,v 1.6 2010/07/10 08:17:48 kiyohara Exp $
 #
 # standard NetBSD/evbarm for GUMSTIX options
 
 machine	evbarm arm
-include 	"conf/std"	# MI standard options
+include 	"conf/std"		# MI standard options
 include		"arch/arm/conf/std.arm"	# arch standard options
 
 include 	"arch/evbarm/conf/files.gumstix"
 
-options 	GUMSTIX
 options 	EXEC_ELF32
 options 	EXEC_SCRIPT
 

Index: src/sys/arch/evbarm/gumstix/gumstix_machdep.c
diff -u src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.26 src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.27
--- src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.26	Sun Mar  7 09:29:26 2010
+++ src/sys/arch/evbarm/gumstix/gumstix_machdep.c	Sat Jul 10 08:17:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gumstix_machdep.c,v 1.26 2010/03/07 09:29:26 kiyohara Exp $ */
+/*	$NetBSD: gumstix_machdep.c,v 1.27 2010/07/10 08:17:48 kiyohara Exp $ */
 /*
  * Copyright (C) 2005, 2006, 2007  WIDE Project and SOUM Corporation.
  * All rights reserved.
@@ -137,6 +137,7 @@
  * boards using RedBoot firmware.
  */
 
+#include "opt_cputypes.h"
 #include "opt_gumstix.h"
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -158,6 +159,7 @@
 #include <sys/systm.h>
 #include <sys/termios.h>
 
+#include <machine/autoconf.h>
 #include <machine/bootconfig.h>
 #include <machine/bus.h>
 #include <machine/cpu.h>
@@ -165,6 +167,9 @@
 #include <machine/frame.h>
 
 #include <arm/arm32/machdep.h>
+#include <arm/omap/omap2_reg.h>
+#include <arm/omap/omap_var.h>
+#include <arm/omap/omap_com.h>
 #include <arm/undefined.h>
 #include <arm/xscale/pxa2x0reg.h>
 #include <arm/xscale/pxa2x0var.h>
@@ -255,7 +260,9 @@
 pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
 
 /* Prototypes */
+#if defined(GUMSTIX)
 static void	read_system_serial(void);
+#endif
 static void	process_kernel_args(int, char *[]);
 static void	process_kernel_args_liner(char *);
 #ifdef KGDB
@@ -270,7 +277,9 @@
 #include <dev/ic/comvar.h>
 #endif
 
+#if defined(CPU_XSCALE_PXA250) || defined(CPU_XSCALE_PXA270)
 #include "lcd.h"
+#endif
 
 #ifndef CONSPEED
 #define CONSPEED B115200	/* It's a setting of the default of u-boot */
@@ -335,7 +344,7 @@
 	/* Do a dump if requested. */
 	if ((howto & (RB_DUMP | RB_HALT)) == RB_DUMP)
 		dumpsys();
-	
+
 	/* Run any shutdown hooks */
 	doshutdownhooks();
 
@@ -358,12 +367,11 @@
 static inline pd_entry_t *
 read_ttb(void)
 {
-  long ttb;
+	long ttb;
 
-  __asm volatile("mrc	p15, 0, %0, c2, c0, 0" : "=r" (ttb));
+	__asm volatile("mrc	p15, 0, %0, c2, c0, 0" : "=r" (ttb));
 
-
-  return (pd_entry_t *)(ttb & ~((1<<14)-1));
+	return (pd_entry_t *)(ttb & ~((1<<14)-1));
 }
 
 /*
@@ -385,55 +393,73 @@
 #define	_S(s)	(((s) + L1_S_SIZE - 1) & ~(L1_S_SIZE-1))
 
 static const struct pmap_devmap gumstix_devmap[] = {
+#if defined(GUMSTIX)
 	{
 		GUMSTIX_GPIO_VBASE,
 		_A(PXA2X0_GPIO_BASE),
 		_S(PXA250_GPIO_SIZE),
-		VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE,
+		VM_PROT_READ | VM_PROT_WRITE,
+		PTE_NOCACHE,
 	},
 	{
 		GUMSTIX_CLKMAN_VBASE,
 		_A(PXA2X0_CLKMAN_BASE),
 		_S(PXA2X0_CLKMAN_SIZE),
-		VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE,
+		VM_PROT_READ | VM_PROT_WRITE,
+		PTE_NOCACHE,
 	},
 	{
 		GUMSTIX_INTCTL_VBASE,
 		_A(PXA2X0_INTCTL_BASE),
 		_S(PXA2X0_INTCTL_SIZE),
-		VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE,
+		VM_PROT_READ | VM_PROT_WRITE,
+		PTE_NOCACHE,
 	},
 	{
 		GUMSTIX_FFUART_VBASE,
 		_A(PXA2X0_FFUART_BASE),
 		_S(4 * COM_NPORTS),
-		VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE,
+		VM_PROT_READ | VM_PROT_WRITE,
+		PTE_NOCACHE,
 	},
 	{
 		GUMSTIX_STUART_VBASE,
 		_A(PXA2X0_STUART_BASE),
 		_S(4 * COM_NPORTS),
-		VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE,
+		VM_PROT_READ | VM_PROT_WRITE,
+		PTE_NOCACHE,
 	},
 	{
 		GUMSTIX_BTUART_VBASE,
 		_A(PXA2X0_BTUART_BASE),
 		_S(4 * COM_NPORTS),
-		VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE,
+		VM_PROT_READ | VM_PROT_WRITE,
+		PTE_NOCACHE,
 	},
 	{
 		GUMSTIX_HWUART_VBASE,
 		_A(PXA2X0_HWUART_BASE),
 		_S(4 * COM_NPORTS),
-		VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE,
+		VM_PROT_READ | VM_PROT_WRITE,
+		PTE_NOCACHE,
 	},
 	{
 		GUMSTIX_LCDC_VBASE,
 		_A(PXA2X0_LCDC_BASE),
 		_S(4 * COM_NPORTS),
-		VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE,
+		VM_PROT_READ | VM_PROT_WRITE,
+		PTE_NOCACHE,
+	},
+#elif defined(OVERO)
+	{
+		OVERO_L4_PERIPHERAL_VBASE,
+		_A(OMAP3530_L4_PERIPHERAL_BASE),
+		_S(OMAP3530_L4_PERIPHERAL_SIZE),
+		VM_PROT_READ | VM_PROT_WRITE,
+		PTE_NOCACHE
 	},
-	{0, 0, 0, 0, 0}
+#endif
+	{ 0, 0, 0, 0, 0 }
 };
 
 #undef	_A
@@ -456,7 +482,12 @@
 u_int
 initarm(void *arg)
 {
+#if defined(CPU_XSCALE_PXA250) || defined(CPU_XSCALE_PXA270)
+#ifdef DIAGNOSTIC
+	extern vsize_t xscale_minidata_clean_size; /* used in KASSERT */
+#endif
 	extern vaddr_t xscale_cache_clean_addr;
+#endif
 	extern uint32_t *u_boot_args[];
 	extern uint32_t ram_size;
 	enum { r0 = 0, r1 = 1, r2 = 2, r3 = 3 }; /* args from u-boot */
@@ -465,44 +496,55 @@
 	u_int l1pagetable;
 	paddr_t memstart;
 	psize_t memsize;
-#ifdef DIAGNOSTIC
-	extern vsize_t xscale_minidata_clean_size; /* used in KASSERT */
-#endif
-
-	/* map some peripheral registers at static I/O area */
-	pmap_devmap_bootstrap((vaddr_t)read_ttb(), gumstix_devmap);
-
-	/* start 32.768kHz OSC */
-	ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_OSCC, OSCC_OON);
-
-	/* Get ready for splfoo() */
-	pxa2x0_intr_bootstrap(GUMSTIX_INTCTL_VBASE);
-
-	/*
-	 * Heads up ... Setup the CPU / MMU / TLB functions
-	 */
-	if (set_cpufuncs())
-		panic("cpu not recognized!");
 
 	/*
 	 * U-Boot doesn't use the virtual memory.
 	 *
+	 * Gumstix (basix, connex, verdex, verdex-pro):
 	 * Physical Address Range     Description
 	 * -----------------------    ----------------------------------
 	 * 0x00000000 - 0x00ffffff    flash Memory   (16MB or 4MB)
 	 * 0x40000000 - 0x480fffff    Processor Registers
-	 * 0xa0000000 - 0xa3ffffff    SDRAM Bank 0 (64MB)
+	 * 0xa0000000 - 0xa3ffffff    SDRAM Bank 0 (64MB or 128MB)
+	 *
+	 * Overo:
+	 * Physical Address Range     Description
+	 * -----------------------    ----------------------------------
 	 */
 
-	cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT);
+	/*
+	 * Heads up ... Setup the CPU / MMU / TLB functions
+	 */
+	if (set_cpufuncs())
+		panic("cpu not recognized!");
+
+	/* map some peripheral registers at static I/O area */
+	pmap_devmap_bootstrap((vaddr_t)read_ttb(), gumstix_devmap);
+
+#if defined(CPU_XSCALE_PXA250) || defined(CPU_XSCALE_PXA270)
+	/* start 32.768kHz OSC */
+	ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_OSCC, OSCC_OON);
+
+	/* Get ready for splfoo() */
+	pxa2x0_intr_bootstrap(GUMSTIX_INTCTL_VBASE);
 
 	/* setup GPIO for {FF,ST,HW}UART. */
 	pxa2x0_gpio_bootstrap(GUMSTIX_GPIO_VBASE);
 
+	pxa2x0_clkman_bootstrap(GUMSTIX_CLKMAN_VBASE);
+#elif defined(CPU_CORTEXA8)
+	{
+		void cortexa8_pmc_ccnt_init(void);
+
+		cortexa8_pmc_ccnt_init();
+	}
+#endif
+
+	cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT);
+
 	/* configure GPIOs. */
 	gxio_config_pin();
 
-	pxa2x0_clkman_bootstrap(GUMSTIX_CLKMAN_VBASE);
 
 #ifndef GUMSTIX_NETBSD_ARGS_CONSOLE
 	consinit();
@@ -515,7 +557,11 @@
 	 * Examine the boot args string for options we need to know about
 	 * now.
 	 */
+#if defined(GUMSTIX)
 #define SDRAM_START	0xa0000000UL
+#elif defined(OVERO)
+#define SDRAM_START	0x80000000UL
+#endif
 	if (((uint32_t)u_boot_args[r0] & 0xf0000000) != SDRAM_START)
 		/* Maybe r0 is 'argc'.  We are booted by command 'go'. */
 		process_kernel_args((int)u_boot_args[r0],
@@ -531,10 +577,20 @@
 #endif
 
 	/* Talk to the user */
-	printf("\nNetBSD/evbarm (gumstix) booting ...\n");
+	printf("\nNetBSD/evbarm (%s) booting ...\n",
+#if defined(GUMSTIX)
+	    "gumstix"
+#elif defined(OVERO)
+	    "overo"
+#else
+	    "???"
+#endif
+	);
 
 	/* Read system serial */
+#if defined(GUMSTIX)
 	read_system_serial();
+#endif
 
 	memstart = SDRAM_START;
 	memsize = ram_size;
@@ -564,8 +620,13 @@
 	physical_start = bootconfig.dram[0].address;
 	physical_end = physical_start + memsize;
 
+#if defined(GUMSTIX)
 	physical_freestart = 0xa0009000UL;
 	physical_freeend = 0xa0200000UL;
+#elif defined(OVERO)
+	physical_freestart = 0x80009000UL;
+	physical_freeend = 0x80200000UL;
+#endif
 
 	physmem = (physical_end - physical_start) / PAGE_SIZE;
 
@@ -640,6 +701,9 @@
 	 * shared by all processes.
 	 */
 	alloc_pages(systempage.pv_pa, 1);
+#if defined(CPU_CORTEXA8)
+	systempage.pv_va = ARM_VECTORS_HIGH;
+#endif
 
 	/* Allocate stacks for all modes */
 	valloc_pages(irqstack, IRQ_STACK_SIZE);
@@ -648,7 +712,9 @@
 	valloc_pages(kernelstack, UPAGES);
 
 	/* Allocate enough pages for cleaning the Mini-Data cache. */
+#if defined(CPU_XSCALE_PXA250) || defined(CPU_XSCALE_PXA270)
 	KASSERT(xscale_minidata_clean_size <= PAGE_SIZE);
+#endif
 	valloc_pages(minidataclean, 1);
 
 #ifdef VERBOSE_INIT_ARM
@@ -685,8 +751,13 @@
 	l1pagetable = kernel_l1pt.pv_va;
 
 	/* Map the L2 pages tables in the L1 page table */
+#if defined(CPU_XSCALE_PXA250) || defined(CPU_XSCALE_PXA270)
 	pmap_link_l2pt(l1pagetable, 0x00000000,
 	    &kernel_pt_table[KERNEL_PT_SYS]);
+#elif defined(CPU_CORTEXA8)
+	pmap_link_l2pt(l1pagetable, ARM_VECTORS_HIGH & ~(0x00400000 - 1),
+	    &kernel_pt_table[KERNEL_PT_SYS]);
+#endif
 	for (loop = 0; loop < KERNEL_PT_KERNEL_NUM; loop++)
 		pmap_link_l2pt(l1pagetable, KERNEL_BASE + loop * 0x00400000,
 		    &kernel_pt_table[KERNEL_PT_KERNEL + loop]);
@@ -711,7 +782,7 @@
 
 		textsize = (textsize + PGOFSET) & ~PGOFSET;
 		totalsize = (totalsize + PGOFSET) & ~PGOFSET;
-		
+
 		logical = 0x00200000;	/* offset of kernel in RAM */
 
 		logical += pmap_map_chunk(l1pagetable, KERNEL_BASE + logical,
@@ -746,10 +817,13 @@
 	}
 
 	/* Map the Mini-Data cache clean area. */
+#if defined(GUMSTIX)
 	xscale_setup_minidata(l1pagetable, minidataclean.pv_va,
 	    minidataclean.pv_pa);
+#endif
 
 	/* Map the vector page. */
+#if defined(CPU_XSCALE_PXA250) || defined(CPU_XSCALE_PXA270)
 #if 1
 	/* MULTI-ICE requires that page 0 is NC/NB so that it can download the
 	 * cache-clean code there.  */
@@ -759,6 +833,10 @@
 	pmap_map_entry(l1pagetable, vector_page, systempage.pv_pa,
 	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 #endif
+#elif defined(CPU_CORTEXA8)
+	pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa,
+	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
+#endif
 
 	/*
 	 * map integrated peripherals at same address in l1pagetable
@@ -766,12 +844,14 @@
 	 */
 	pmap_devmap_bootstrap(l1pagetable, gumstix_devmap);
 
+#if defined(CPU_XSCALE_PXA250) || defined(CPU_XSCALE_PXA270)
 	/*
 	 * Give the XScale global cache clean code an appropriately
 	 * sized chunk of unmapped VA space starting at 0xff000000
 	 * (our device mappings end before this address).
 	 */
 	xscale_cache_clean_addr = 0xff000000U;
+#endif
 
 	/*
 	 * Now we have the real page tables in place so we can switch to them.
@@ -815,7 +895,11 @@
 	printf("bootstrap done.\n");
 #endif
 
+#if defined(CPU_XSCALE_PXA250) || defined(CPU_XSCALE_PXA270)
 	arm32_vector_init(ARM_VECTORS_LOW, ARM_VEC_ALL);
+#elif defined(CPU_CORTEXA8)
+	arm32_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
+#endif
 
 	/*
 	 * Pages were allocated during the secondary bootstrap for the
@@ -903,6 +987,7 @@
 	return(kernelstack.pv_va + USPACE_SVC_STACK_TOP);
 }
 
+#if defined(GUMSTIX)
 static void
 read_system_serial(void)
 {
@@ -946,6 +1031,7 @@
 		printf("%02x", system_serial[i]);
 	printf("\n");
 }
+#endif
 
 #ifdef GUMSTIX_NETBSD_ARGS_BUSHEADER
 static const char busheader_name[] = "busheader=";
@@ -996,7 +1082,6 @@
 static void
 process_kernel_args_liner(char *args)
 {
-	int i;
 	char *p = NULL;
 
 	boothowto = 0;
@@ -1005,9 +1090,9 @@
 #ifdef GUMSTIX_NETBSD_ARGS_BUSHEADER
 	p = strstr(bootargs, busheader_name);
 	if (p) {
+		int i = 0;
 		char expansion[256], c;
 
-		i = 0;
 		do {
 			c = *(p + strlen(busheader_name) + i);
 			if (c == ' ')
@@ -1018,15 +1103,14 @@
 		strcpy(p, p + i);
 	}
 #endif
-	if (p == NULL) {
+	if (p == NULL)
 		gxio_config_expansion(NULL);
-	}
 #ifdef GUMSTIX_NETBSD_ARGS_CONSOLE
 	p = strstr(bootargs, console_name);
 	if (p != NULL) {
+		int i = 0;
 		char c;
 
-		i = 0;
 		do {
 			c = *(p + strlen(console_name) + i);
 			if (c == ' ')
@@ -1067,7 +1151,6 @@
 consinit(void)
 {
 	static int consinit_called = 0;
-	int rv;
 
 	if (consinit_called != 0)
 		return;
@@ -1076,6 +1159,8 @@
 
 #if NCOM > 0
 
+#if defined(GUMSTIX)
+
 #ifdef FFUARTCONSOLE
 #ifdef KGDB
 	if (strcmp(kgdb_devname, "ffuart") == 0){
@@ -1086,6 +1171,8 @@
 	if (console[0] == '\0' || strcasecmp(console, "ffuart") == 0)
 #endif
 	{
+		int rv;
+
 		rv = comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_FFUART_BASE,
 		    comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode);
 		if (rv == 0) {
@@ -1105,6 +1192,8 @@
 	if (console[0] == '\0' || strcasecmp(console, "stuart") == 0)
 #endif
 	{
+		int rv;
+
 		rv = comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_STUART_BASE,
 		    comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode);
 		if (rv == 0) {
@@ -1124,6 +1213,8 @@
 	if (console[0] == '\0' || strcasecmp(console, "btuart") == 0)
 #endif
 	{
+		int rv;
+
 		rv = comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_BTUART_BASE,
 		    comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode);
 		if (rv == 0) {
@@ -1152,6 +1243,14 @@
 	}
 #endif /* HWUARTCONSOLE */
 
+#elif defined(OVERO)
+
+	if (comcnattach(&omap_a4x_bs_tag, 0x49020000, comcnspeed,
+	    OMAP_COM_FREQ, COM_TYPE_NORMAL, comcnmode) == 0)
+		return;
+
+#endif /* GUMSTIX or OVERO */
+
 #endif /* NCOM */
 
 #if NLCD > 0

Index: src/sys/arch/evbarm/gumstix/gumstix_start.S
diff -u src/sys/arch/evbarm/gumstix/gumstix_start.S:1.6 src/sys/arch/evbarm/gumstix/gumstix_start.S:1.7
--- src/sys/arch/evbarm/gumstix/gumstix_start.S:1.6	Sun Aug  9 07:10:13 2009
+++ src/sys/arch/evbarm/gumstix/gumstix_start.S	Sat Jul 10 08:17:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gumstix_start.S,v 1.6 2009/08/09 07:10:13 kiyohara Exp $ */
+/*	$NetBSD: gumstix_start.S,v 1.7 2010/07/10 08:17:48 kiyohara Exp $ */
 /*
  * Copyright (C) 2005, 2006 WIDE Project and SOUM Corporation.
  * All rights reserved.
@@ -59,27 +59,31 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "opt_cputypes.h"
+#include "opt_gumstix.h"
+
 #include <machine/asm.h>
+#include <machine/vmparam.h>
 #include <arm/armreg.h>
 #include <arm/arm32/pte.h>
 #include <arm/arm32/pmap.h>		/* for PMAP_DOMAIN_KERNEL */
 
-#ifndef SDRAM_START
-#define SDRAM_START	0xa0000000
-#endif
-
 /*
  * CPWAIT -- Canonical method to wait for CP15 update.
  * NOTE: Clobbers the specified temp reg.
  * copied from arm/arm/cpufunc_asm_xscale.S
  * XXX: better be in a common header file.
  */
-#define	CPWAIT_BRANCH							 \
+#if defined(CPU_XSCALE_PXA250) || defined(CPU_XSCALE_PXA270)
+#define	CPWAIT_BRANCH							  \
 	sub	pc, pc, #4
+#else
+#define	CPWAIT_BRANCH
+#endif
 
-#define	CPWAIT(tmp)							 \
-	mrc	p15, 0, tmp, c2, c0, 0	/* arbitrary read of CP15 */	;\
-	mov	tmp, tmp		/* wait for it to complete */	;\
+#define	CPWAIT(tmp)							  \
+	mrc	p15, 0, tmp, c2, c0, 0	/* arbitrary read of CP15 */	; \
+	mov	tmp, tmp		/* wait for it to complete */	; \
 	CPWAIT_BRANCH			/* branch to next insn */
 
 /*
@@ -91,11 +95,21 @@
 
 	.global	_C_LABEL(gumstix_start)
 _C_LABEL(gumstix_start):
-	/* gumstix's loader is u-boot.  it's running on RAM */
+	/*
+	 * gumstix's loader is U-boot.  it's running on RAM
+	 */
+
+	/* Our page table might be cached.  Disable D-cache beforehand. */
+	mrc	p15, 0, r4, c1, c0, 0
+	bic	r4, r4, #CPU_CONTROL_DC_ENABLE
+	mcr	p15, 0, r4, c1, c0, 0
+
 	/*
 	 *  Kernel is loaded in SDRAM (0xa0200000..), and is expected to run
-	 *  in VA 0xc0200000..
+	 *  in VA 0xc0200000.. (GUMSTIX)
+	 *  VA == PA if OVERO.
 	 */
+
 	/* save u-boot's args */
 	adr	r4, u_boot_args
 	nop
@@ -108,29 +122,48 @@
 
 	/* Calculate RAM size */
 	adr	r4, ram_size
+#if defined(GUMSTIX)
 	ldr	r0, [r4]
+
+	mrc	p15, 0, r1, c0, c0, 0
+	and	r1, r1, #CPU_ID_XSCALE_COREGEN_MASK
+	cmp	r1, #0x4000
+	bne	3f			/* goto 3f, if basix or connex */
 0:
+	/* check memory size, if verdex or verdex-pro */
 	add	r3, r4, r0
 	ldr	r1, [r3]
 	cmp	r0, r1
 	beq	2f
 1:
-	add	r0, r0, r0	/* r0 <<= 1 */
+	add	r0, r0, r0		/* r0 <<= 1 */
 	str	r0, [r4]
 	b	0b
 2:
-	mvn	r1, r1		/* r1 ^= 0xffffffff */
+	mvn	r1, r1			/* r1 ^= 0xffffffff */
 	str	r1, [r3]
 	ldr	r2, [r4]
 	cmp	r1, r2
 	beq	3f
-	str	r0, [r3]	/* restore */
+	str	r0, [r3]		/* restore */
 	b	1b
 3:
+#elif defined(OVERO)
+	mov	r1, #0x7f000000		/* mask */
+	orr	r1, r1, #0x00e00000	/* mask */
+	mov	r3, #0x6d000000		/* OMAP34xx SDRC */
+	add	r3, r3, #0x0080		/* CS0 MCFG */
+	ldr	r2, [r3]
+	and	r0, r1, r2, lsl #13
+	add	r3, r3, #0x0030		/* CS1 MCFG */
+	ldr	r2, [r3]
+	and	r2, r1, r2, lsl #13
+	add	r0, r0, r2
+#endif
 	str	r0, [r4]
 
-	/* build page table from scratch */
-	ldr	r0, Lstartup_pagetable		/* pagetable */
+	/* Build page table from scratch */
+	ldr	r0, Lstartup_pagetable	/* pagetable */
 	adr	r4, mmu_init_table
 	b	5f
 
@@ -145,18 +178,31 @@
 	cmp	r1, #0
 	bne	4b
 
-	mcr	p15, 0, r0, c2, c0, 0	/* Set TTB */
 	mcr	p15, 0, r0, c8, c7, 0	/* Flush TLB */
+	mcr	p15, 0, r0, c2, c0, 0	/* Set TTB */
 
-	/* Set the Domain Access register.  Very important! */
-        mov     r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT)
+	/*
+	 * Set the Domain Access register.  Very important!
+	 * startup_pagetable puts to domain 0 now.
+	 */
+#define KERNEL_DOMAIN(x)	((x) << (PMAP_DOMAIN_KERNEL << 1))
+	mov	r0, #(KERNEL_DOMAIN(DOMAIN_CLIENT) | DOMAIN_CLIENT)
 	mcr	p15, 0, r0, c3, c0, 0
 
-	/* Enable MMU */
+	/* Enable MMU and etc. */
 	mrc	p15, 0, r0, c1, c0, 0
+#if defined(CPU_XSCALE_PXA250) || defined(CPU_XSCALE_PXA270)
 	orr	r0, r0, #CPU_CONTROL_SYST_ENABLE
+#endif
+#if defined(CPU_CORTEXA8)
+	orr	r0, r0, #CPU_CONTROL_AFLT_ENABLE | CPU_CONTROL_DC_ENABLE
+	orr	r0, r0, #CPU_CONTROL_BPRD_ENABLE | CPU_CONTROL_IC_ENABLE
+#endif
 	orr	r0, r0, #CPU_CONTROL_MMU_ENABLE
 	mcr	p15, 0, r0, c1, c0, 0
+	/*
+	 * Ensure that the coprocessor has finished turning on the MMU.
+	 */
 	CPWAIT(r0)
 
 	/* Jump to kernel code in TRUE VA */
@@ -167,7 +213,11 @@
 	.word	start
 
 #ifndef STARTUP_PAGETABLE_ADDR
+#if defined(GUMSTIX)
 #define STARTUP_PAGETABLE_ADDR 0xa0000000	/* aligned 16kByte */
+#elif defined(OVERO)
+#define STARTUP_PAGETABLE_ADDR 0x80000000	/* aligned 16kByte */
+#endif
 #endif
 Lstartup_pagetable:
 	.word	STARTUP_PAGETABLE_ADDR
@@ -181,22 +231,33 @@
 	.word	0x04000000		/* 64Mbyte */
 
 
-#define MMU_INIT(va,pa,n_sec,attr) \
-	.word	n_sec					    ; \
-	.word	4 * ((va) >> L1_S_SHIFT)		    ; \
-	.word	(pa) | (attr)				    ;
+#define MMU_INIT(va, pa, n_sec, attr)	  \
+	.word	n_sec			; \
+	.word	4 * ((va) >> L1_S_SHIFT); \
+	.word	(pa) | (attr)		;
 
 mmu_init_table:
 	/* fill all table VA==PA */
 	MMU_INIT(0x00000000, 0x00000000,
-	    1 << (32 - L1_S_SHIFT), L1_TYPE_S | L1_S_AP(AP_KRW))
+	    1 << (32 - L1_S_SHIFT), L1_S_PROTO | L1_S_AP(AP_KRW))
+
+#if defined(GUMSTIX)
+#define SDRAM_START	0xa0000000
 
-	/* map SDRAM VA==PA, WT cacheable */
+	/* map SDRAM VA==PA, write-back cacheable (first 64M only)*/
 	MMU_INIT(SDRAM_START, SDRAM_START,
-	    64, L1_TYPE_S | L1_S_C | L1_S_AP(AP_KRW))
+	    64, L1_S_PROTO | L1_S_C | L1_S_AP(AP_KRW))
 
 	/* map VA 0xc0000000..0xc3ffffff to PA 0xa0000000..0xa3ffffff */
 	MMU_INIT(0xc0000000, SDRAM_START,
-	    64, L1_TYPE_S | L1_S_C | L1_S_AP(AP_KRW))
+	    64, L1_S_PROTO | L1_S_C | L1_S_AP(AP_KRW))
+
+#elif defined(OVERO)
+#define SDRAM_START	0x80000000
+
+	/* Map VA to PA, write-back cacheable (first 64M only) */
+	MMU_INIT(KERNEL_BASE, SDRAM_START,
+	    64, L1_S_PROTO | L1_S_B | L1_S_C | L1_S_AP(AP_KRW))
+#endif
 
-	.word	0			/* end of table */
+	MMU_INIT(0, 0, 0, 0)		/* end of table */

Index: src/sys/arch/evbarm/gumstix/gumstixreg.h
diff -u src/sys/arch/evbarm/gumstix/gumstixreg.h:1.4 src/sys/arch/evbarm/gumstix/gumstixreg.h:1.5
--- src/sys/arch/evbarm/gumstix/gumstixreg.h:1.4	Sun Aug  9 07:10:13 2009
+++ src/sys/arch/evbarm/gumstix/gumstixreg.h	Sat Jul 10 08:17:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gumstixreg.h,v 1.4 2009/08/09 07:10:13 kiyohara Exp $  */
+/*	$NetBSD: gumstixreg.h,v 1.5 2010/07/10 08:17:48 kiyohara Exp $  */
 /*
  * Copyright (C) 2005, 2006 WIDE Project and SOUM Corporation.
  * All rights reserved.
@@ -33,22 +33,21 @@
 #ifndef _EVBARM_GUMSTIXREG_H_
 #define _EVBARM_GUMSTIXREG_H_
 
-#include <arm/xscale/pxa2x0reg.h>
-
-
 /*
  * Logical mapping for onboard/integrated peripherals
  * that are used while bootstrapping.
  */
-#define GUMSTIX_IO_AREA_VBASE	0xfd000000
-#define GUMSTIX_INTCTL_VBASE	0xfd000000
-#define GUMSTIX_CLKMAN_VBASE	0xfd100000
-#define GUMSTIX_GPIO_VBASE	0xfd200000
-#define GUMSTIX_FFUART_VBASE	0xfd300000
-#define GUMSTIX_STUART_VBASE	0xfd400000
-#define GUMSTIX_BTUART_VBASE	0xfd500000
-#define GUMSTIX_HWUART_VBASE	0xfd600000
-#define GUMSTIX_LCDC_VBASE	0xfd700000
+#define GUMSTIX_IO_AREA_VBASE		0xfd000000
+#define GUMSTIX_INTCTL_VBASE		0xfd000000
+#define GUMSTIX_CLKMAN_VBASE		0xfd100000
+#define GUMSTIX_GPIO_VBASE		0xfd200000
+#define GUMSTIX_FFUART_VBASE		0xfd300000
+#define GUMSTIX_STUART_VBASE		0xfd400000
+#define GUMSTIX_BTUART_VBASE		0xfd500000
+#define GUMSTIX_HWUART_VBASE		0xfd600000
+#define GUMSTIX_LCDC_VBASE		0xfd700000
+
+#define OVERO_L4_PERIPHERAL_VBASE	0x90000000
 
 
 #define ioreg_read(a)		(*(volatile unsigned *)(a))

Index: src/sys/arch/evbarm/gumstix/gxio.c
diff -u src/sys/arch/evbarm/gumstix/gxio.c:1.14 src/sys/arch/evbarm/gumstix/gxio.c:1.15
--- src/sys/arch/evbarm/gumstix/gxio.c:1.14	Mon Mar 15 13:16:56 2010
+++ src/sys/arch/evbarm/gumstix/gxio.c	Sat Jul 10 08:17:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gxio.c,v 1.14 2010/03/15 13:16:56 kiyohara Exp $ */
+/*	$NetBSD: gxio.c,v 1.15 2010/07/10 08:17:48 kiyohara Exp $ */
 /*
  * Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation.
  * All rights reserved.
@@ -31,8 +31,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gxio.c,v 1.14 2010/03/15 13:16:56 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gxio.c,v 1.15 2010/07/10 08:17:48 kiyohara Exp $");
 
+#include "opt_cputypes.h"
+#include "opt_gumstix.h"
 #include "opt_gxio.h"
 
 #include <sys/param.h>
@@ -44,13 +46,19 @@
 
 #include <machine/bootconfig.h>
 
+#include <arm/omap/omap2_reg.h>
+#include <arm/omap/omap_var.h>
+#if defined(CPU_XSCALE_PXA270) || defined(CPU_XSCALE_PXA250)
 #include <arm/xscale/pxa2x0cpu.h>
+#endif
 #include <arm/xscale/pxa2x0reg.h>
 #include <arm/xscale/pxa2x0var.h>
 #include <arm/xscale/pxa2x0_gpio.h>
 #include <evbarm/gumstix/gumstixvar.h>
 
+#if !defined(OVERO)	/* XXXXX */
 #include "locators.h"
+#endif
 
 
 struct gxioconf {
@@ -58,14 +66,17 @@
 	void (*config)(void);
 };
 
+#if !defined(OVERO)	/* XXXXX */
 static int gxiomatch(device_t, cfdata_t, void *);
 static void gxioattach(device_t, device_t, void *);
 static int gxiosearch(device_t, cfdata_t, const int *, void *);
 static int gxioprint(void *, const char *);
+#endif
 
 void gxio_config_pin(void);
 void gxio_config_expansion(char *);
 static void gxio_config_gpio(const struct gxioconf *, char *);
+#if defined(CPU_XSCALE_PXA270) || defined(CPU_XSCALE_PXA250)
 static void basix_config(void);
 static void cfstix_config(void);
 static void etherstix_config(void);
@@ -78,9 +89,12 @@
 static void netmmc_config(void);
 static void wifistix_config(void);
 static void wifistix_cf_config(void);
+#endif
 
+#if !defined(OVERO)	/* XXXXX */
 CFATTACH_DECL_NEW(
     gxio, sizeof(struct gxio_softc), gxiomatch, gxioattach, NULL, NULL);
+#endif
 
 char busheader[MAX_BOOT_STRING];
 
@@ -147,6 +161,7 @@
 #endif
 
 static const struct gxioconf busheader_conf[] = {
+#if defined(CPU_XSCALE_PXA270) || defined(CPU_XSCALE_PXA250)
 	{ "basix",		basix_config },
 	{ "cfstix",		cfstix_config },
 	{ "etherstix",		etherstix_config },
@@ -161,6 +176,7 @@
 	{ "netpro-vx",		netwifimicrosd_config },
 	{ "wifistix-cf",	wifistix_cf_config },
 	{ "wifistix",		wifistix_config },
+#endif
 	{ NULL }
 };
 
@@ -168,6 +184,7 @@
 struct gxpcic_slot_irqs gxpcic_slot_irqs[2] = { { 0, -1, -1 }, { 0, -1, -1 } };
 
 
+#if !defined(OVERO)	/* XXXXX */
 /* ARGSUSED */
 static int
 gxiomatch(device_t parent, cfdata_t match, void *aux)
@@ -241,6 +258,7 @@
 		printf(" gpirq %d", gxa->gxa_gpirq);
 	return (UNCONF);
 }
+#endif
 
 
 /*
@@ -283,12 +301,14 @@
 #elif defined(CPU_XSCALE_PXA270)
 	pxa2x0_gpio_set_function(12, GPIO_OUT | GPIO_CLR);
 #endif
+#if !defined(OVERO)	/* XXXXX */
 	delay(100);
+#endif
 
 #if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250)
 	pxa2x0_gpio_config(
 	    (CPU_IS_PXA250) ? gumstix_gpioconf : verdex_gpioconf);
-#else
+#elif defined(CPU_XSCALE_PXA270) || defined(CPU_XSCALE_PXA250)
 #if defined(CPU_XSCALE_PXA270)
 	pxa2x0_gpio_config(verdex_gpioconf);
 #else
@@ -332,6 +352,7 @@
 }
 
 
+#if defined(CPU_XSCALE_PXA270) || defined(CPU_XSCALE_PXA250)
 static void
 basix_config(void)
 {
@@ -550,3 +571,4 @@
 	/* Power to Marvell 88W8385 */
 	pxa2x0_gpio_set_function(80, GPIO_OUT | GPIO_SET);
 }
+#endif

Added files:

Index: src/sys/arch/evbarm/conf/OVERO
diff -u /dev/null src/sys/arch/evbarm/conf/OVERO:1.1
--- /dev/null	Sat Jul 10 08:17:48 2010
+++ src/sys/arch/evbarm/conf/OVERO	Sat Jul 10 08:17:48 2010
@@ -0,0 +1,314 @@
+#
+#	$NetBSD: OVERO,v 1.1 2010/07/10 08:17:48 kiyohara Exp $
+#
+#	OVERO -- Gumstix. Inc. Overo platforms kernel
+#
+
+include	"arch/evbarm/conf/std.overo"
+
+#options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
+
+# estimated number of users
+
+maxusers	32
+
+# CPU options
+
+options 	CPU_CORTEXA8
+options 	OMAP_3530
+options 	PMAPCOUNTERS
+
+# Architecture options
+
+# Gumstix options
+options 	OVERO
+
+# Standard system options
+
+options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
+#options 	NTP		# NTP phase/frequency locked loop
+
+# File systems
+
+file-system	FFS		# UFS
+file-system 	EXT2FS		# second extended file system (linux)
+#file-system	LFS		# log-structured file system
+file-system	MFS		# memory file system
+file-system	NFS		# Network file system
+#file-system	NTFS		# Windows/NT file system (experimental)
+#file-system	CD9660		# ISO 9660 + Rock Ridge file system
+file-system	MSDOSFS		# MS-DOS file system
+file-system	FDESC		# /dev/fd
+file-system	KERNFS		# /kern
+#file-system	NULLFS		# loopback file system
+#file-system	OVERLAY		# overlay file system
+#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)
+#file-system	PROCFS		# /proc
+#file-system	UMAPFS		# NULLFS + uid and gid remapping
+file-system	UNION		# union file system
+#file-system	CODA		# Coda File System; also needs vcoda (below)
+#file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
+file-system	TMPFS		# memory file system
+file-system	PTYFS		# /dev/pts/N support
+#file-system	UDF		# experimental - OSTA UDF CD/DVD file-system
+#file-system	HFS		# experimental - Apple HFS+ (read-only)
+
+# File system options
+#options 	QUOTA		# UFS quotas
+#options 	FFS_EI		# FFS Endian Independant support
+options 	WAPBL		# File system journaling support - Experimental
+#options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
+#options 	NFSSERVER
+#options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
+#options 	EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
+				# immutable) behave as system flags.
+
+# Networking options
+
+#options 	GATEWAY		# packet forwarding
+options 	INET		# IP + ICMP + TCP + UDP
+options 	INET6		# IPV6
+#options 	IPSEC		# IP security
+#options 	IPSEC_ESP	# IP security (encryption part; define w/ IPSEC)
+#options 	IPSEC_NAT_T	# IPsec NAT traversal (NAT-T)
+#options 	IPSEC_DEBUG	# debug for IP security
+#options 	MROUTING	# IP multicast routing
+#options 	PIM		# Protocol Independent Multicast
+#options 	NS		# XNS
+#options 	NSIP		# XNS tunneling over IP
+#options 	ISO,TPIP	# OSI
+#options 	EON		# OSI tunneling over IP
+#options 	CCITT,LLC,HDLC	# X.25
+#options 	NETATALK	# AppleTalk networking
+#options 	PFIL_HOOKS	# pfil(9) packet filter hooks
+#options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
+#options 	PPP_DEFLATE	# Deflate compression support for PPP
+#options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
+#options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG
+
+options 	NFS_BOOT_BOOTP
+options 	NFS_BOOT_DHCP
+#options 	NFS_BOOT_BOOTPARAM
+
+# Compatibility options
+
+#options 	COMPAT_09	# NetBSD 0.9 compatibility.
+#options 	COMPAT_10	# NetBSD 1.0 compatibility.
+#options 	COMPAT_11	# NetBSD 1.1 compatibility.
+#options 	COMPAT_12	# NetBSD 1.2 compatibility.
+#options 	COMPAT_13	# NetBSD 1.3 compatibility.
+#options 	COMPAT_14	# NetBSD 1.4 compatibility.
+#options 	COMPAT_15	# NetBSD 1.5 compatibility.
+#options 	COMPAT_16	# NetBSD 1.6 compatibility.
+#options 	COMPAT_20	# NetBSD 2.0 compatibility.
+options 	COMPAT_30	# NetBSD 3.0 compatibility.
+options 	COMPAT_40	# NetBSD 4.0 compatibility.
+options 	COMPAT_50	# NetBSD 5.0 compatibility.
+#options 	COMPAT_43	# 4.3BSD compatibility.
+#options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
+
+options 	COMPAT_OSSAUDIO	# OSS (Voxware) audio driver compatibility
+options 	COMPAT_LINUX	# binary compatibility with Linux
+options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
+
+# Shared memory options
+
+#options 	SYSVMSG		# System V-like message queues
+#options 	SYSVSEM		# System V-like semaphores
+#options 	SEMMNI=10	# number of semaphore identifiers
+#options 	SEMMNS=60	# number of semaphores in system
+#options 	SEMUME=10	# max number of undo entries per process
+#options 	SEMMNU=30	# number of undo structures in system
+#options 	SYSVSHM		# System V-like memory sharing
+#options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
+
+# Device options
+
+#options 	MEMORY_DISK_HOOKS	# boottime setup of ramdisk
+#options 	MEMORY_DISK_IS_ROOT	# use memory disk as root
+#options 	MEMORY_DISK_DYNAMIC
+#options 	MEMORY_DISK_ROOT_SIZE=8192	# Size in blocks
+
+# Miscellaneous kernel options
+options 	KTRACE		# system call tracing, a la ktrace(1)
+options 	IRQSTATS	# manage IRQ statistics
+#options 	KMEMSTATS	# kernel memory statistics
+#options 	USBVERBOSE	# verbose USB device autoconfig messages
+options 	MIIVERBOSE	# Verbose MII autoconfuration messages
+#options 	DDB_KEYCODE=0x40
+#options 	USERCONF	# userconf(4) support
+#options	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
+#options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
+
+# Development and Debugging options
+
+#options 	PERFCTRS	# performance counters
+options 	DIAGNOSTIC	# internally consistency checks
+options 	DEBUG
+#options 	LOCKDEBUG
+#options 	PMAP_DEBUG	# Enable pmap_debug_level code
+#options 	IPKDB		# remote kernel debugging
+#options 	VERBOSE_INIT_ARM # verbose bootstraping messages
+options 	DDB		# in-kernel debugger
+options		DDB_ONPANIC=1
+options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
+#options 	KGDB
+makeoptions	DEBUG="-g"	# compile full symbol table
+options 	SYMTAB_SPACE=350000
+
+config		netbsd		root on ? type ?
+
+# The main bus device
+mainbus0	at root
+
+# The boot cpu
+cpu0		at mainbus?
+
+# L3 Interconnect
+L3i0		at mainbus?
+
+# OBIO
+obio0		at mainbus? base 0x48000000 size 0x1000000	# L4 CORE
+obio1		at mainbus? base 0x48300000 size 0x0040000	# L4 WAKEUP
+obio2		at mainbus? base 0x49000000 size 0x0100000	# L4 PERIPHERAL
+#obio3		at mainbus? base 0x54000000 size 0x0800000	# L4 EMUL
+
+# General Purpose Memory Controller
+gpmc0		at mainbus? base 0x6e000000
+omapnand0 at gpmc0 addr 0x30000000
+
+# Interrupt Controller
+omapicu0	at obio0 addr 0x48200000 size 0x1000 intrbase 0
+#omapgpio0	at obio1 addr 0x48310000 size 0x0400 intrbase 96  intr 29
+#omapgpio1	at obio2 addr 0x49050000 size 0x0400 intrbase 128 intr 30
+#omapgpio2	at obio2 addr 0x49052000 size 0x0400 intrbase 160 intr 31
+#omapgpio3	at obio2 addr 0x49054000 size 0x0400 intrbase 192 intr 32
+#omapgpio4	at obio2 addr 0x49056000 size 0x0400 intrbase 224 intr 33
+#omapgpio5	at obio2 addr 0x49058000 size 0x0400 intrbase 256 intr 34
+
+#gpio*		at omapgpio?
+
+# On-board 16550 UARTs
+com0		at obio2 addr 0x49020000 intr 74 mult 4	# UART3 (console)
+options         CONSADDR=0x49020000, CONSPEED=115200
+
+# Operating System Timer
+omapmputmr0	at obio2 addr 0x49032000 intr 38	# GP Timer 2
+# Statistics Timer
+omapmputmr1	at obio2 addr 0x49034000 intr 39	# GP Timer 3
+# Microtime Reference Timer
+omapmputmr2	at obio2 addr 0x49036000 intr 40	# GP Timer 4
+options OMAP_MPU_TIMER_CLOCK_FREQ=12000000
+
+# Watchdog timers
+#omapwdt32k*	at obio2 addr 0x49030000 size 2048	# WDT3
+#omapwdt32k*	at obio1 addr 0x4830c000 size 2048	# WDT1
+omapwdt32k*	at obio1 addr 0x48314000 size 2048	# WDT2
+
+# On-board USB
+#ehci*		at obio0 addr 0x48064800 size 0x0400 intr 77
+#ohci*		at obio0 addr 0x48064400 size 0x0400 intr 76
+#usb*		at ohci?
+#uhub*		at usb?
+##umass*		at uhub? port ? configuration ? interface ?
+##wd*		at umass?
+#axe*		at uhub? port ? configuration ? interface ?
+
+# Hardware clocking and power management
+
+options		HWCLOCK
+options		HWCLOCK_MACHINE="<arch/arm/omap/hwclock_omap1.h>"
+options		OMAP_CK_REF_SPEED=12000000
+
+# Pseudo-Devices
+
+# disk/mass storage pseudo-devices
+#pseudo-device	bio			# RAID control device driver
+#pseudo-device	ccd		4	# concatenated/striped disk devices
+pseudo-device	cgd		4	# cryptographic disk devices
+#pseudo-device	raid		8	# RAIDframe disk driver
+#options 	RAID_AUTOCONFIG		# auto-configuration of RAID components
+# Options to enable various other RAIDframe RAID types.
+#options 	RF_INCLUDE_EVENODD=1
+#options 	RF_INCLUDE_RAID5_RS=1
+#options 	RF_INCLUDE_PARITYLOGGING=1
+#options 	RF_INCLUDE_CHAINDECLUSTER=1
+#options 	RF_INCLUDE_INTERDECLUSTER=1
+#options 	RF_INCLUDE_PARITY_DECLUSTERING=1
+#options 	RF_INCLUDE_PARITY_DECLUSTERING_DS=1
+#pseudo-device	fss		4	# file system snapshot device
+
+#pseudo-device	md		1	# memory disk device (ramdisk)
+pseudo-device	vnd			# disk-like interface to files
+options 	VND_COMPRESSION		# compressed vnd(4)
+#pseudo-device	putter			# for puffs and pud
+
+# network pseudo-devices
+pseudo-device	bpfilter		# Berkeley packet filter
+#pseudo-device	carp			# Common Address Redundancy Protocol
+pseudo-device	ipfilter		# IP filter (firewall) and NAT
+pseudo-device	loop			# network loopback
+#pseudo-device	ppp			# Point-to-Point Protocol
+#pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)
+#pseudo-device	sl			# Serial Line IP
+#pseudo-device	strip			# Starmode Radio IP (Metricom)
+#pseudo-device	irframetty		# IrDA frame line discipline
+#pseudo-device	tap			# virtual Ethernet
+#pseudo-device	tun			# network tunneling over tty
+#pseudo-device	gre			# generic L3 over IP tunnel
+#pseudo-device	gif			# IPv[46] over IPv[46] tunnel (RFC 1933)
+#pseudo-device	faith			# IPv[46] TCP relay translation i/f
+#pseudo-device	stf			# 6to4 IPv6 over IPv4 encapsulation
+#pseudo-device	vlan			# IEEE 802.1q encapsulation
+#pseudo-device	bridge			# simple inter-network bridging
+#options 	BRIDGE_IPF		# bridge uses IP/IPv6 pfil hooks too
+#pseudo-device	agr			# IEEE 802.3ad link aggregation
+#pseudo-device	pf			# PF packet filter
+#pseudo-device	pflog			# PF log if
+
+# miscellaneous pseudo-devices
+pseudo-device	pty			# pseudo-terminals
+#pseudo-device	sequencer	1	# MIDI sequencer
+pseudo-device	rnd			# /dev/random and in-kernel generator
+options 	RND_COM
+pseudo-device	clockctl		# user control of clock subsystem
+pseudo-device	ksyms			# /dev/ksyms
+#pseudo-device	bcsp			# BlueCore Serial Protocol
+pseudo-device	btuart			# Bluetooth HCI UART (H4)
+					# connect CSR module
+
+# a pseudo device needed for Coda	# also needs CODA (above)
+#pseudo-device	vcoda		4	# coda minicache <-> venus comm.
+
+# a pseudo device needed for SMBFS
+#pseudo-device	nsmb			# experimental - SMB requester
+
+# wscons pseudo-devices
+pseudo-device	wsmux			# mouse & keyboard multiplexor
+#pseudo-device	wsfont
+
+# data mover pseudo-devices
+#pseudo-device	swdmover		# softare dmover(9) back-end
+#pseudo-device	dmoverio		# /dev/dmover dmover(9) interface
+
+# userland interface to drivers, including autoconf and properties retrieval
+pseudo-device	drvctl
+
+#options 	FILEASSOC		# fileassoc(9) - required for Veriexec
+
+# Veriexec
+#pseudo-device	veriexec
+#
+# Uncomment the fingerprint methods below that are desired. Note that
+# removing fingerprint methods will have almost no impact on the kernel
+# code size.
+#
+#options 	VERIFIED_EXEC_FP_RMD160
+#options 	VERIFIED_EXEC_FP_SHA256
+#options 	VERIFIED_EXEC_FP_SHA384
+#options 	VERIFIED_EXEC_FP_SHA512
+#options 	VERIFIED_EXEC_FP_SHA1
+#options 	VERIFIED_EXEC_FP_MD5
+
+#options 	PAX_MPROTECT=0		# PaX mprotect(2) restrictions
+#options 	PAX_ASLR=0		# PaX Address Space Layout Randomization
Index: src/sys/arch/evbarm/conf/files.overo
diff -u /dev/null src/sys/arch/evbarm/conf/files.overo:1.1
--- /dev/null	Sat Jul 10 08:17:48 2010
+++ src/sys/arch/evbarm/conf/files.overo	Sat Jul 10 08:17:48 2010
@@ -0,0 +1,21 @@
+#	$NetBSD: files.overo,v 1.1 2010/07/10 08:17:48 kiyohara Exp $
+#
+# Gumstix. Inc. Overo boards configuration info
+#
+
+file	arch/evbarm/gumstix/gumstix_machdep.c
+defflag opt_gumstix.h				OVERO 
+
+defparam opt_gxio.h				GXIO_DEFAULT_EXPANSION
+file	arch/evbarm/gumstix/gxio.c
+
+# CPU support and integrated peripherals
+include "arch/arm/omap/files.omap2"
+
+# NS16550 compatible serial ports
+attach com at obio with obiouart
+file	arch/arm/omap/obio_com.c		obiouart
+
+device omapnand { [addr = -1] }
+attach omapnand at gpmc
+file	arch/arm/omap/omap2_nand.c		omapnand
Index: src/sys/arch/evbarm/conf/std.overo
diff -u /dev/null src/sys/arch/evbarm/conf/std.overo:1.1
--- /dev/null	Sat Jul 10 08:17:48 2010
+++ src/sys/arch/evbarm/conf/std.overo	Sat Jul 10 08:17:48 2010
@@ -0,0 +1,27 @@
+#	$NetBSD: std.overo,v 1.1 2010/07/10 08:17:48 kiyohara Exp $
+#
+# standard NetBSD/evbarm for OVERO options
+
+machine	evbarm arm
+include		"conf/std"		# MI standard options
+include		"arch/arm/conf/std.arm"	# arch standard options
+
+include		"arch/evbarm/conf/files.overo"
+
+options 	EXEC_ELF32
+options 	EXEC_SCRIPT
+
+# To support easy transit to ../arch/arm/arm32
+options 	ARM32
+options 	CORTEX_PMC
+options 	__HAVE_FAST_SOFTINTS		# should be in types.h
+#options 	PROCESS_ID_IS_CURLWP
+
+options 	KERNEL_BASE_EXT=0x80000000
+makeoptions	LOADADDRESS="0x80200000"
+makeoptions	BOARDTYPE="overo"
+makeoptions	BOARDMKFRAG="${THISARM}/conf/mk.gumstix"
+makeoptions	CPPFLAGS+="-I$S/../../../include"
+
+options 	ARM_INTR_IMPL="<arch/arm/omap/omap2_intr.h>"
+options		ARM_GENERIC_TODR

Reply via email to