Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add support for the ARM Integrator/CP from Sergio L?pez.
details: https://anonhg.NetBSD.org/src/rev/b5f8d5002423
branches: trunk
changeset: 785038:b5f8d5002423
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Feb 19 10:57:09 2013 +0000
description:
Add support for the ARM Integrator/CP from Sergio L?pez.
The code hasn't been tested on real hardware, but INTEGRATOR_CP config
is useful for QEMU which supports it.
diffstat:
etc/etc.evbarm/Makefile.inc | 6 +-
sys/arch/evbarm/conf/INTEGRATOR_CP | 184 +++++++++
sys/arch/evbarm/conf/files.integrator | 8 +-
sys/arch/evbarm/conf/mk.integrator_cp | 27 +
sys/arch/evbarm/conf/std.integrator_cp | 22 +
sys/arch/evbarm/conf/std.rpi | 11 +-
sys/arch/evbarm/ifpga/ifpga.c | 14 +-
sys/arch/evbarm/ifpga/ifpga_clock.c | 16 +-
sys/arch/evbarm/ifpga/ifpga_io.c | 101 ++++-
sys/arch/evbarm/ifpga/ifpgamem.h | 7 +-
sys/arch/evbarm/ifpga/ifpgareg.h | 7 +-
sys/arch/evbarm/ifpga/ifpgavar.h | 5 +-
sys/arch/evbarm/ifpga/plcom_ifpga.c | 8 +-
sys/arch/evbarm/ifpga/sm_ifpga.c | 105 +++++
sys/arch/evbarm/integrator/integrator_machdep.c | 473 ++---------------------
15 files changed, 536 insertions(+), 458 deletions(-)
diffs (truncated from 1344 to 300 lines):
diff -r 4cfb922f9141 -r b5f8d5002423 etc/etc.evbarm/Makefile.inc
--- a/etc/etc.evbarm/Makefile.inc Tue Feb 19 09:04:53 2013 +0000
+++ b/etc/etc.evbarm/Makefile.inc Tue Feb 19 10:57:09 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.44 2013/02/13 04:22:36 christos Exp $
+# $NetBSD: Makefile.inc,v 1.45 2013/02/19 10:57:11 skrll Exp $
#
# etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
#
@@ -12,8 +12,8 @@
.if ${MACHINE_ARCH} == "arm"
# Little endian platforms (armv4 or pre-armv5t)
EVBARM_BOARDS+= ADI_BRH CP3100 GEMINI GUMSTIX INTEGRATOR \
- IQ80310 IQ80321 MINI2440 MV2120 SMDK2410 \
- SMDK2800 TEAMASA_NPWR TS7200 TWINTAIL
+ INTEGRATOR_CP IQ80310 IQ80321 MINI2440 MV2120 \
+ SMDK2410 SMDK2800 TEAMASA_NPWR TS7200 TWINTAIL
.endif
diff -r 4cfb922f9141 -r b5f8d5002423 sys/arch/evbarm/conf/INTEGRATOR_CP
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbarm/conf/INTEGRATOR_CP Tue Feb 19 10:57:09 2013 +0000
@@ -0,0 +1,184 @@
+# $NetBSD: INTEGRATOR_CP,v 1.1 2013/02/19 10:57:09 skrll Exp $
+#
+# INTEGRATOR_CP -- ARM Integrator CP kernel
+#
+
+include "arch/evbarm/conf/std.integrator_cp"
+
+#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
+
+# estimated number of users
+
+maxusers 32
+
+# Standard system options
+
+options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
+options NTP # NTP phase/frequency locked loop
+
+# CPU options
+
+options CPU_ARM9 # Support the ARM9TDMI core
+options CPU_ARM10 # Support the ARM10 core
+options CPU_ARM11 # Support the ARM11 core
+options FPU_VFP
+options INTEGRATOR_CP
+
+# File systems
+
+file-system FFS # UFS
+#file-system LFS # log-structured file system
+file-system MFS # memory file system
+file-system NFS # Network file system
+#file-system ADOSFS # AmigaDOS-compatible file system
+#file-system EXT2FS # second extended file system (linux)
+#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 PROCFS # /proc
+#file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs)
+#file-system UMAPFS # NULLFS + uid and gid remapping
+#file-system UNION # union file system
+file-system PTYFS # /dev/pts/N support
+
+# File system options
+#options QUOTA # legacy UFS quotas
+#options QUOTA2 # new, in-filesystem UFS quotas
+#options FFS_EI # FFS Endian Independent support
+#options NFSSERVER
+options WAPBL # File system journaling support
+#options FFS_NO_SNAPSHOT # No FFS snapshot support
+
+# 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 ISO,TPIP # OSI
+#options EON # OSI tunneling over IP
+#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
+#options NFS_BOOT_BOOTSTATIC
+
+# Compatibility options
+
+#options COMPAT_43 # 4.3BSD compatibility.
+options COMPAT_60 # NetBSD 6.0 compatibility.
+options COMPAT_50 # NetBSD 5.0 compatibility.
+#options COMPAT_40 # NetBSD 4.0 compatibility.
+#options COMPAT_30 # NetBSD 3.0 compatibility.
+#options COMPAT_20 # NetBSD 2.0 compatibility.
+#options COMPAT_16 # NetBSD 1.6 compatibility.
+#options COMPAT_15 # NetBSD 1.5 compatibility.
+#options COMPAT_14 # NetBSD 1.4 compatibility.
+#options COMPAT_13 # NetBSD 1.3 compatibility.
+#options COMPAT_12 # NetBSD 1.2 compatibility.
+#options COMPAT_11 # NetBSD 1.1 compatibility.
+#options COMPAT_10 # NetBSD 1.0 compatibility.
+#options COMPAT_09 # NetBSD 0.9 compatibility.
+#options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended.
+options COMPAT_BSDPTY # /dev/[pt]ty?? ptys.
+
+# Shared memory options
+
+#options SYSVMSG # System V-like message queues
+#options SYSVSEM # System V-like semaphores
+#options SYSVSHM # System V-like memory sharing
+
+# Device options
+
+#options MEMORY_DISK_HOOKS # boottime setup of ramdisk
+#options MEMORY_DISK_ROOT_SIZE=4000 # Size in blocks
+#options MEMORY_DISK_IS_ROOT # use memory disk as root
+
+# Miscellaneous kernel options
+options KTRACE # system call tracing, a la ktrace(1)
+options IRQSTATS # manage IRQ statistics
+#options KMEMSTATS # kernel memory statistics
+options SCSIVERBOSE # Verbose SCSI errors
+options PCIVERBOSE # Verbose PCI descriptions
+options MIIVERBOSE # Verbose MII autoconfuration messages
+#options PCI_CONFIG_DUMP # verbosely dump PCI config space
+options PCI_NETBSD_CONFIGURE # Do not rely on BIOS/whatever to
+ # configure PCI devices
+options PCI_CONFIGURE_VERBOSE # Show PCI config information
+options DDB_KEYCODE=0x1d # Enter ddb on ^]
+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 ARM700BUGTRACK # track the ARM700 swi bug
+#options PORTMASTER # Enable PortMaster only options
+#options DIAGNOSTIC # internal consistency checks
+#options PMAP_DEBUG # Enable pmap_debug_level code
+options DDB # in-kernel debugger
+options DDB_HISTORY_SIZE=100 # Enable history editing in DDB
+#options UVMHIST
+#makeoptions DEBUG="-g" # compile full symbol table
+options SYMTAB_SPACE=500000
+options PLCONSOLE,PLCOMCNUNIT=0,PLCONSPEED=38400,PLCONMODE=0xB00
+
+config netbsd root on ? type ?
+config netbsd-sm0 root on sm0 type nfs
+
+# The main bus device
+mainbus0 at root
+
+# The boot CPU
+cpu0 at mainbus?
+
+# Core logic
+ifpga0 at mainbus?
+
+# PL010 uart
+plcom0 at ifpga? offset 0x06000000 irq 1
+plcom1 at ifpga? offset 0x07000000 irq 2
+#options PLCOM_DEBUG
+
+# PL030 real time clock
+plrtc0 at ifpga? offset 0x05000000
+
+# PCI bus via ifpga
+pci0 at ifpga? # PCI bus
+
+# PCI network interfaces
+sm0 at ifpga? offset 0xb8000000 irq 27
+
+# MII/PHY support
+ukphy* at mii? phy ? # generic unknown PHYs
+
+# Pseudo-Devices
+
+# disk/mass storage pseudo-devices
+#pseudo-device md # memory disk device (ramdisk)
+#pseudo-device vnd # disk-like interface to files
+#pseudo-device fss # file system snapshot device
+#pseudo-device putter # for puffs and pud
+
+# network pseudo-devices
+pseudo-device bpfilter # Berkeley packet filter
+#pseudo-device bridge # simple inter-network bridging
+pseudo-device loop # network loopback
+
+# miscellaneous pseudo-devices
+pseudo-device pty # pseudo-terminals
+pseudo-device clockctl # user control of clock subsystem
+pseudo-device ksyms # /dev/ksyms
diff -r 4cfb922f9141 -r b5f8d5002423 sys/arch/evbarm/conf/files.integrator
--- a/sys/arch/evbarm/conf/files.integrator Tue Feb 19 09:04:53 2013 +0000
+++ b/sys/arch/evbarm/conf/files.integrator Tue Feb 19 10:57:09 2013 +0000
@@ -1,9 +1,11 @@
-# $NetBSD: files.integrator,v 1.9 2012/07/13 06:09:18 skrll Exp $
+# $NetBSD: files.integrator,v 1.10 2013/02/19 10:57:09 skrll Exp $
#
# ARM, Ltd. Integrator evaluation board configuraiton info
#
file arch/arm/arm32/irq_dispatch.S
+file arch/arm/arm32/arm32_boot.c
+file arch/arm/arm32/arm32_kvminit.c
file arch/evbarm/integrator/integrator_machdep.c
file arch/evbarm/integrator/int_bus_dma.c
@@ -29,3 +31,7 @@
# Integrator PCI support
file arch/evbarm/integrator/pci_machdep.c pci
+
+# SMSC LAN91C111
+attach sm at ifpga with sm_ifpga
+file arch/evbarm/ifpga/sm_ifpga.c sm_ifpga
diff -r 4cfb922f9141 -r b5f8d5002423 sys/arch/evbarm/conf/mk.integrator_cp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbarm/conf/mk.integrator_cp Tue Feb 19 10:57:09 2013 +0000
@@ -0,0 +1,27 @@
+# $NetBSD: mk.integrator_cp,v 1.1 2013/02/19 10:57:09 skrll Exp $
+
+SYSTEM_FIRST_OBJ= intmmu.o
+SYSTEM_FIRST_SFILE= ${THISARM}/integrator/intmmu.S
+
+KERNEL_BASE_PHYS= 0x00100000
+KERNEL_BASE_VIRT= 0xc0100000
+LOADADDRESS= 0x00100000
+
+MKUBOOTIMAGEARGS= -A arm -T kernel
+MKUBOOTIMAGEARGS+= -a $(LOADADDRESS) -e $(LOADADDRESS)
+MKUBOOTIMAGEARGS+= -n "NetBSD/$(BOARDTYPE) ${_OSRELEASE}"
+MKUBOOTIMAGEARGS_NONE= ${MKUBOOTIMAGEARGS} -C none
+MKUBOOTIMAGEARGS_GZ= ${MKUBOOTIMAGEARGS} -C gz
+
+SYSTEM_LD_TAIL_EXTRA+=; \
+ echo ${OBJCOPY} -S -O binary $@ $@.bin; \
+ ${OBJCOPY} -S -O binary $@ $@.bin; \
+ echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@.bin $@.ub; \
+ ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@.bin $@.ub; \
+ echo ${TOOL_GZIP} -c $@.bin > $@.bin.gz; \
+ ${TOOL_GZIP} -c $@.bin > $@.bin.gz; \
+ echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@.bin.gz $@.gz.ub; \
+ ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@.bin.gz $@.gz.ub
+
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.srec@}
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin@}
diff -r 4cfb922f9141 -r b5f8d5002423 sys/arch/evbarm/conf/std.integrator_cp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/evbarm/conf/std.integrator_cp Tue Feb 19 10:57:09 2013 +0000
@@ -0,0 +1,22 @@
+# $NetBSD: std.integrator_cp,v 1.1 2013/02/19 10:57:10 skrll Exp $
+#
+# standard NetBSD/integrator options
+
+machine evbarm arm
+include "arch/evbarm/conf/std.evbarm"
+
+# Pull in Integrator config definitions.
+include "arch/evbarm/conf/files.integrator"
+
+options EXEC_AOUT
+
+options _ARM32_NEED_BUS_DMA_BOUNCE
+
+#options ARM32_NEW_VM_LAYOUT # Not yet ready for prime-time
+
+makeoptions BOARDTYPE="integrator"
+makeoptions BOARDMKFRAG="${THISARM}/conf/mk.integrator_cp"
+
+options ARM_INTR_IMPL="<arch/evbarm/ifpga/ifpga_intr.h>"
+
+options KERNEL_BASE_EXT=0xc0000000
diff -r 4cfb922f9141 -r b5f8d5002423 sys/arch/evbarm/conf/std.rpi
--- a/sys/arch/evbarm/conf/std.rpi Tue Feb 19 09:04:53 2013 +0000
+++ b/sys/arch/evbarm/conf/std.rpi Tue Feb 19 10:57:09 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: std.rpi,v 1.4 2012/12/19 15:51:51 skrll Exp $
+# $NetBSD: std.rpi,v 1.5 2013/02/19 10:57:10 skrll Exp $
#
# standard NetBSD/evbarm for Raspberry Pi options
@@ -8,13 +8,20 @@
# Pull in Raspberry Pi config definitions.
Home |
Main Index |
Thread Index |
Old Index