CVS commit: src/usr.bin/getaddrinfo
Module Name:src Committed By: riastradh Date: Mon Sep 30 06:19:22 UTC 2013 Added Files: src/usr.bin/getaddrinfo: Makefile getaddrinfo.1 getaddrinfo.c tables.awk Log Message: New utility getaddrinfo(1) to reflect getaddrinfo(3). Discussed on tech-userlevel back in April: https://mail-index.netbsd.org/tech-userlevel/2013/04/25/msg007719.html Not hooked into the build or sets yet. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/usr.bin/getaddrinfo/Makefile \ src/usr.bin/getaddrinfo/getaddrinfo.1 \ src/usr.bin/getaddrinfo/getaddrinfo.c src/usr.bin/getaddrinfo/tables.awk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/usr.bin/getaddrinfo/Makefile diff -u /dev/null src/usr.bin/getaddrinfo/Makefile:1.1 --- /dev/null Mon Sep 30 06:19:22 2013 +++ src/usr.bin/getaddrinfo/Makefile Mon Sep 30 06:19:22 2013 @@ -0,0 +1,20 @@ +# $NetBSD: Makefile,v 1.1 2013/09/30 06:19:22 riastradh Exp $ + +PROG= getaddrinfo + +DPADD+= ${LIBUTIL} +LDADD+= -lutil + +WARNS= 5 + +SYS_SOCKET_H?= ${NETBSDSRCDIR}/sys/sys/socket.h + +CPPFLAGS+= -I. +DPSRCS+= tables.h +CLEANFILES+= tables.h +tables.h: tables.awk ${SYS_SOCKET_H} + ${_MKTARGET_CREATE} + ${TOOL_AWK} -f ${.ALLSRC} ${.TARGET}.tmp \ + mv -f -- ${.TARGET}.tmp ${.TARGET} + +.include bsd.prog.mk Index: src/usr.bin/getaddrinfo/getaddrinfo.1 diff -u /dev/null src/usr.bin/getaddrinfo/getaddrinfo.1:1.1 --- /dev/null Mon Sep 30 06:19:22 2013 +++ src/usr.bin/getaddrinfo/getaddrinfo.1 Mon Sep 30 06:19:22 2013 @@ -0,0 +1,174 @@ +.\ $NetBSD: getaddrinfo.1,v 1.1 2013/09/30 06:19:22 riastradh Exp $ +.\ +.\ Copyright (c) 2013 The NetBSD Foundation, Inc. +.\ All rights reserved. +.\ +.\ This documentation is derived from text contributed to The NetBSD +.\ Foundation by Taylor R. Campbell. +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer. +.\ 2. Redistributions in binary form must reproduce the above copyright +.\notice, this list of conditions and the following disclaimer in the +.\documentation and/or other materials provided with the distribution. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\ POSSIBILITY OF SUCH DAMAGE. +.\ +.Dd April 25, 2013 +.Dt GETADDRINFO 1 +.Os +.Sh NAME +.Nm getaddrinfo +.Nd resolve names to socket addresses +.Sh SYNOPSIS +.Nm +.Op Fl cnNP +.Op Fl f Ar family +.Op Fl p Ar protocol +.Op Fl t Ar socktype +.Op Fl s Ar service +.Op Ar hostname +.Sh DESCRIPTION +The +.Nm +utility resolves host and service names to socket addresses as if with +the +.Xr getaddrinfo 3 +routine and formats them to standard output. +.Pp +The output is a sequence of lines of space-separated fields: +.Dl socket-type address-family protocol [af-specific data ...] +.Pp +For the internet family, the address-family-specific data are the +internet address and the port number. +.Pp +Although the +.Nm +utility may query the DNS to give answers, depending on the +system's +.Xr nsswitch.conf 5 +configuration, it is not intended to be a general-purpose utility to +query the DNS; use the +.Xr dig 1 +utility for that. +.Pp +The following options are available: +.Bl -tag -width Ds +.It Fl c +Look up a canonical name as if with the +.Dv AI_CANONNAME +flag to +.Xr getaddrinfo 3 +and print it on the first line before the socket addresses. +.It Fl f Ar family +Specify an address family. +Address families are named like the +.Dv AF_... +constants for address family numbers in the +.Aq Pa sys/socket.h +header file but without the +.Dv AF_ +prefix and lowercase. +For example, +.Dq inet +corresponds with +.Dv AF_INET . +.It Fl n +Treat the hostname as a numeric address and do not attempt name +resolution, as if with the +.Dv AI_NUMERICHOST +flag to +.Xr getaddrinfo 3 . +.It Fl N +Treat the service as numeric and do not attempt service name +resolution, as if with the +.Dv AI_NUMERICSERV +flag to +.Xr getaddrinfo 3 . +.It Fl s Ar service +Specify a service to look up. +If no service is specified, a
CVS import: src/sys/fs/nfs
Module Name:src Committed By: dholland Date: Mon Sep 30 07:19:57 UTC 2013 Update of /cvsroot/src/sys/fs/nfs In directory ivanova.netbsd.org:/tmp/cvs-serv17689 Log Message: Import FreeBSD's newnfs nfs client and server code. This contains nfsv4 as well as new implementations of nfsv3 and nfsv2. This import is from tonight's FreeBSD head and is unchanged from there except for automated munging of rcsids, rearranging of paths, and an autogenerated files.* file that might or might not be syntactically valid. (I will check in the script that does this shortly.) There is not the slightest chance this will configure yet, let alone compile or run. Status: Vendor Tag: FREEBSD Release Tags: FREEBSD-255947 N src/sys/fs/nfs/files.newnfs N src/sys/fs/nfs/client/nfs_clcomsubs.c N src/sys/fs/nfs/client/nfs_clsubs.c N src/sys/fs/nfs/client/nfs_clstate.c N src/sys/fs/nfs/client/nfs_clkrpc.c N src/sys/fs/nfs/client/nfs_clrpcops.c N src/sys/fs/nfs/client/nfs_clvnops.c N src/sys/fs/nfs/client/nfs_clnode.c N src/sys/fs/nfs/client/nfs_clvfsops.c N src/sys/fs/nfs/client/nfs_clport.c N src/sys/fs/nfs/client/nfs_clbio.c N src/sys/fs/nfs/client/nfs_clnfsiod.c N src/sys/fs/nfs/client/nfs.h N src/sys/fs/nfs/client/nfsnode.h N src/sys/fs/nfs/client/nfs_kdtrace.h N src/sys/fs/nfs/client/nlminfo.h N src/sys/fs/nfs/client/nfsmount.h N src/sys/fs/nfs/common/bootp_subr.c N src/sys/fs/nfs/common/krpc.h N src/sys/fs/nfs/common/krpc_subr.c N src/sys/fs/nfs/common/nfs_common.h N src/sys/fs/nfs/common/nfs_diskless.c N src/sys/fs/nfs/common/nfs_fha.c N src/sys/fs/nfs/common/nfs_fha.h N src/sys/fs/nfs/common/nfs_kdtrace.h N src/sys/fs/nfs/common/nfs_lock.c N src/sys/fs/nfs/common/nfs_lock.h N src/sys/fs/nfs/common/nfs_mountcommon.h N src/sys/fs/nfs/common/nfs_nfssvc.c N src/sys/fs/nfs/common/nfsdiskless.h N src/sys/fs/nfs/common/nfssvc.h N src/sys/fs/nfs/common/old_xdr_subs.h N src/sys/fs/nfs/common/oldnfsproto.h N src/sys/fs/nfs/common/nfs.h N src/sys/fs/nfs/common/nfs_commonacl.c N src/sys/fs/nfs/common/nfs_commonkrpc.c N src/sys/fs/nfs/common/nfs_commonport.c N src/sys/fs/nfs/common/nfs_commonsubs.c N src/sys/fs/nfs/common/nfs_var.h N src/sys/fs/nfs/common/nfscl.h N src/sys/fs/nfs/common/nfsclstate.h N src/sys/fs/nfs/common/nfsdport.h N src/sys/fs/nfs/common/nfskpiport.h N src/sys/fs/nfs/common/nfsm_subs.h N src/sys/fs/nfs/common/nfsport.h N src/sys/fs/nfs/common/nfsproto.h N src/sys/fs/nfs/common/nfsrvcache.h N src/sys/fs/nfs/common/nfsrvstate.h N src/sys/fs/nfs/common/nfsv4_errstr.h N src/sys/fs/nfs/common/rpcv2.h N src/sys/fs/nfs/common/xdr_subs.h N src/sys/fs/nfs/nlm/nlm_advlock.c N src/sys/fs/nfs/nlm/nlm_prot_clnt.c N src/sys/fs/nfs/nlm/nlm_prot_impl.c N src/sys/fs/nfs/nlm/nlm_prot_server.c N src/sys/fs/nfs/nlm/nlm_prot_svc.c N src/sys/fs/nfs/nlm/nlm_prot_xdr.c N src/sys/fs/nfs/nlm/sm_inter_xdr.c N src/sys/fs/nfs/nlm/nlm_prot.h N src/sys/fs/nfs/nlm/sm_inter.h N src/sys/fs/nfs/nlm/nlm.h N src/sys/fs/nfs/server/nfs_fha_new.c N src/sys/fs/nfs/server/nfs_nfsdsocket.c N src/sys/fs/nfs/server/nfs_nfsdsubs.c N src/sys/fs/nfs/server/nfs_nfsdstate.c N src/sys/fs/nfs/server/nfs_nfsdkrpc.c N src/sys/fs/nfs/server/nfs_nfsdserv.c N src/sys/fs/nfs/server/nfs_nfsdport.c N src/sys/fs/nfs/server/nfs_nfsdcache.c N src/sys/fs/nfs/server/nfs_fha_new.h No conflicts created by this import
CVS commit: src/sys/fs/nfs
Module Name:src Committed By: dholland Date: Mon Sep 30 07:23:37 UTC 2013 Added Files: src/sys/fs/nfs: nfs2netbsd.sh Log Message: The script for preparing an import of this nfs code. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/fs/nfs/nfs2netbsd.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/fs/nfs/nfs2netbsd.sh diff -u /dev/null src/sys/fs/nfs/nfs2netbsd.sh:1.1 --- /dev/null Mon Sep 30 07:23:37 2013 +++ src/sys/fs/nfs/nfs2netbsd.sh Mon Sep 30 07:23:37 2013 @@ -0,0 +1,267 @@ +#!/bin/sh +# nfs2netbsd - arrange bits of (FreeBSD's) newnfs code for importing +# usage: nfs2netbsd FREEBSDSYSDIR +# +# Caution: unlike most of the *2netbsd scripts in the tree, this copies +# from another dir (which should be the sys/ dir from a FreeBSD checkout) +# rather than operating on a tree already in the current directory. +# +# The current directory should be empty. +# +# $NetBSD: nfs2netbsd.sh,v 1.1 2013/09/30 07:23:37 dholland Exp $ + +FTOP=$1 + +if [ $# != 1 ]; then +echo $0: usage: $0 freebsdsysdir 12 +exit 1 +fi + +if [ ! -d $FTOP ]; then +echo $0: $FTOP: not found 12 +exit 1 +fi + + +# 1. Get the list of files. + +# Note that we don't (for now anyway) take rpc/* and xdr/*. + +FILES=$(egrep -w 'nfscl|nfsd' $FTOP/conf/files | awk '{ print $1 }' |\ + sed '/^rpc\//d;/^xdr\//d') + +DIRS=$(echo $FILES | sed 's,/[^/*]*$,,' | sort -u) + +MOREFILES=$(cd $FTOP find $DIRS -name '*.h' -print) + +FILES=$FILES $MOREFILES + + +# 2. Create the directories to copy into. + +ALLDIRS=$(echo $DIRS | awk -F/ ' +{ + path = sep = ; + for (i=1;i=NF;i++) { + path = path sep $i; + sep = /; + print path; + } +} +' | sort -u) + +for D in $ALLDIRS; do +echo MKDIR $D +mkdir $D || exit 1 +done + + +# 3. Copy the files. + +# In the course of copying, strip the dollar-signs from FreeBSD RCS +# tags and add a NetBSD tag. + +for F in $FILES; do +echo COPY$F +awk $FTOP/$F ' + function detag() { + gsub(\\$, , $0); + } + function commentout() { + $0 = /* $0 */; + } + BEGIN { + first = 1; + } + + # there are a handful of netbsd __RCSID()s in the input + /__RCSID(.*NetBSD:.*)/ { + detag(); + commentout(); + print; + first = 0; + next; + } + /__FBSDID(.*FreeBSD:.*)/ { + detag(); + commentout(); + print; + printf __RCSID(\%sNetBSD%s\);\n, $, $; + first = 0; + next; + } + /\$NetBSD.*\$/ { + detag(); + print; + first = 0; + next; + } + /\$FreeBSD.*\$/ { + orig = $0; + detag(); + print; + sub(FreeBSD:.*\\$, NetBSD$, orig); + print orig; + first = 0; + next; + } + first { + printf /*\t%sNetBSD%s\t*/\n, $, $; + print; + first = 0; + next; + } + { print; } +' name=$F $F +done + +# If you need to diff the files against the freebsd tree for some +# reason, e.g. because you needed to debug the awk script above, +# uncomment this for testing. +#exit 3 + + +# 4. Move the files around the way we want them. + +# Be sure to reflect changes in this section into section 5. + + +# If these fail, it means the script needs to be updated... +mv nfs/nfsproto.h nfs/oldnfsproto.h || exit 1 +mv nfs/xdr_subs.h nfs/old_xdr_subs.h || exit 1 + +# Make sure nothing in nfs/ and fs/nfs/ overlaps as we're going +# to merge those dirs. + +BAD=$( ( + (cd nfs ls) + (cd fs/nfs ls) +) | sort | uniq -d) +if [ x$BAD != x ]; then +echo $0: The following files exist in both nfs/ and fs/nfs/: 12 +echo $BAD 12 +echo $0: Please add logic to fix this before continuing. 12 +exit 1 +fi + +# Now rearrange the dirs. + +mkdir fs/nfs/common || exit 1 +mv nfs/*.[ch] fs/nfs/common/ || exit 1 +mv fs/nfs/*.[ch] fs/nfs/common/ || exit 1 +mv fs/nfsserver fs/nfs/server || exit 1 +mv fs/nfsclient fs/nfs/client || exit 1 +mv nlm fs/nfs/nlm || exit 1 + +rmdir nfs || exit 1 + + +# 5. Prepare a skeleton files.newnfs. + +# This helps make sure that freebsd changes in the file list +# propagate. + +echo 'GEN fs/nfs/files.newnfs' + +egrep -w 'nfscl|nfsd' $FTOP/conf/files |\ + sed '/^rpc\//d;/^xdr\//d' | sed ' +s,^fs/nfs/,fs/nfs/common/, +s,^fs/nfsclient/,fs/nfs/client/, +s,^fs/nfsserver/,fs/nfs/server/, +s,^nfs/,fs/nfs/common/, +s,^nlm/,fs/nfs/nlm/, +' | sort | awk ' +BEGIN { + # fbsd - nbsd translation table for files.* tokens + + # old nfs implementation + transtoken[nfsserver] = false; + transtoken[nfsclient] = false; + + # new nfs implementation + transtoken[nfscl] = new_nfsclient; + transtoken[nfsd] = new_nfsserver; + transtoken[nfslockd] =
CVS commit: src/sys/fs/nfs
Module Name:src Committed By: dholland Date: Mon Sep 30 07:31:34 UTC 2013 Added Files: src/sys/fs/nfs: README.newnfs Log Message: Explain what's here. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/fs/nfs/README.newnfs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/fs/nfs/README.newnfs diff -u /dev/null src/sys/fs/nfs/README.newnfs:1.1 --- /dev/null Mon Sep 30 07:31:34 2013 +++ src/sys/fs/nfs/README.newnfs Mon Sep 30 07:31:34 2013 @@ -0,0 +1,25 @@ +This is new nfs code (including nfsv4) imported from FreeBSD. It is +not even experimental yet - you don't want to be mucking with it. + +The nfs code (both nfs and nfsd) that NetBSD currently uses is in +sys/nfs. + + +The following things are here: + + client/ - nfs client code, from sys/fs/nfsclient in freebsd + server/ - nfsd server code, from sys/fs/nfsserver in freebsd + nlm/ - kernel-side nfs lock manager, from sys/nlm in freebsd + common/ - shared common code, from + * sys/fs/nfs in freebsd + * sys/nfs in freebsd + files.newnfs - config goo + nfs2netbsd.sh - script for preparing a cvs import from a freebsd tree + +The FreeBSD shared common code contained two (different) nfsproto.h +and xdr_subs.h files. This is how they've been imported: + + sys/fs/nfs/nfsproto.h - common/nfsproto.h + sys/fs/nfs/xdr_subs.h - common/xdr_subs.h + sys/nfs/nfsproto.h - common/oldnfsproto.h + sys/nfs/xdr_subs.h - common/old_xdr_subs.h
CVS commit: src/usr.bin/getaddrinfo
Module Name:src Committed By: wiz Date: Mon Sep 30 08:14:00 UTC 2013 Modified Files: src/usr.bin/getaddrinfo: getaddrinfo.1 Log Message: Sort. Use .Ex for EXIT STATUS section. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/getaddrinfo/getaddrinfo.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/getaddrinfo/getaddrinfo.1 diff -u src/usr.bin/getaddrinfo/getaddrinfo.1:1.1 src/usr.bin/getaddrinfo/getaddrinfo.1:1.2 --- src/usr.bin/getaddrinfo/getaddrinfo.1:1.1 Mon Sep 30 06:19:22 2013 +++ src/usr.bin/getaddrinfo/getaddrinfo.1 Mon Sep 30 08:13:59 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: getaddrinfo.1,v 1.1 2013/09/30 06:19:22 riastradh Exp $ +.\ $NetBSD: getaddrinfo.1,v 1.2 2013/09/30 08:13:59 wiz Exp $ .\ .\ Copyright (c) 2013 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd April 25, 2013 +.Dd September 30, 2013 .Dt GETADDRINFO 1 .Os .Sh NAME @@ -35,11 +35,11 @@ .Nd resolve names to socket addresses .Sh SYNOPSIS .Nm -.Op Fl cnNP +.Op Fl cNnP .Op Fl f Ar family .Op Fl p Ar protocol -.Op Fl t Ar socktype .Op Fl s Ar service +.Op Fl t Ar socktype .Op Ar hostname .Sh DESCRIPTION The @@ -86,25 +86,18 @@ For example, .Dq inet corresponds with .Dv AF_INET . -.It Fl n -Treat the hostname as a numeric address and do not attempt name -resolution, as if with the -.Dv AI_NUMERICHOST -flag to -.Xr getaddrinfo 3 . .It Fl N Treat the service as numeric and do not attempt service name resolution, as if with the .Dv AI_NUMERICSERV flag to .Xr getaddrinfo 3 . -.It Fl s Ar service -Specify a service to look up. -If no service is specified, a hostname must be specified. -.It Fl p Ar protocol -Specify a protocol. -Protocols may be numeric, or symbolic as listed in -.Xr protocols 5 . +.It Fl n +Treat the hostname as a numeric address and do not attempt name +resolution, as if with the +.Dv AI_NUMERICHOST +flag to +.Xr getaddrinfo 3 . .It Fl P Return socket addresses intended for use with .Xr bind 2 , @@ -117,6 +110,13 @@ By default, the socket addresses are int .Xr sendto 2 , or .Xr sendmsg 2 . +.It Fl p Ar protocol +Specify a protocol. +Protocols may be numeric, or symbolic as listed in +.Xr protocols 5 . +.It Fl s Ar service +Specify a service to look up. +If no service is specified, a hostname must be specified. .It Fl t Ar socktype Specify a socket type. Socket types are named like the @@ -131,10 +131,8 @@ For example, corresponds with .Dv SOCK_DGRAM . .El -.Pp -The -.Nm -utility exits 0 on success, and \*[Gt]0 if an error occurs. +.Sh EXIT STATUS +.Ex -std getaddrinfo .Sh EXAMPLES Look up .Dq www.NetBSD.org :
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Mon Sep 30 12:31:27 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: ffs.S Log Message: Appease new gas To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/ffs.S diff -u src/common/lib/libc/arch/arm/string/ffs.S:1.4 src/common/lib/libc/arch/arm/string/ffs.S:1.5 --- src/common/lib/libc/arch/arm/string/ffs.S:1.4 Mon Aug 19 02:55:19 2013 +++ src/common/lib/libc/arch/arm/string/ffs.S Mon Sep 30 12:31:27 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.S,v 1.4 2013/08/19 02:55:19 matt Exp $ */ +/* $NetBSD: ffs.S,v 1.5 2013/09/30 12:31:27 skrll Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert * All rights reserved. @@ -30,7 +30,7 @@ #include machine/asm.h -RCSID($NetBSD: ffs.S,v 1.4 2013/08/19 02:55:19 matt Exp $) +RCSID($NetBSD: ffs.S,v 1.5 2013/09/30 12:31:27 skrll Exp $) /* * ffs - find first set bit, this algorithm isolates the first set @@ -73,7 +73,7 @@ ARM_ENTRY(ffs) rsbne r0, r0, r0, lsl #16 /* r0 = X * 0x0450fbaf */ /* now lookup in table indexed on top 6 bits of r0 */ - ldrbne r0, [ r2, r0, lsr #26 ] + ldrbne r0, [r2, r0, lsr #26 ] RET .text;
CVS commit: src/external/lgpl3/gmp/dist/mpn/arm
Module Name:src Committed By: skrll Date: Mon Sep 30 12:30:51 UTC 2013 Modified Files: src/external/lgpl3/gmp/dist/mpn/arm: udiv.asm Log Message: Appease new gas. Already fixed upstream. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/lgpl3/gmp/dist/mpn/arm/udiv.asm Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/lgpl3/gmp/dist/mpn/arm/udiv.asm diff -u src/external/lgpl3/gmp/dist/mpn/arm/udiv.asm:1.1.1.1 src/external/lgpl3/gmp/dist/mpn/arm/udiv.asm:1.2 --- src/external/lgpl3/gmp/dist/mpn/arm/udiv.asm:1.1.1.1 Mon Jun 20 05:54:43 2011 +++ src/external/lgpl3/gmp/dist/mpn/arm/udiv.asm Mon Sep 30 12:30:51 2013 @@ -48,7 +48,7 @@ L(oop): divstep(n1,n0,d) teq r12, #0 bne L(oop) - str n1, [ rem_ptr ] C store remainder + str n1, [rem_ptr] C store remainder adc r0, n0, n0 C quotient: add last carry from divstep mov pc, lr @@ -87,7 +87,7 @@ L(oop2): addcs n0, n0, #1 C adjust quotient L(_even_divisor): - str n1, [ rem_ptr ] C store remainder + str n1, [rem_ptr] C store remainder mov r0, n0 C quotient ldmfd sp!, { r8, pc } EPILOGUE(mpn_udiv_qrnnd)
CVS commit: src/sys/arch/evbarm/marvell
Module Name:src Committed By: kiyohara Date: Mon Sep 30 12:54:59 UTC 2013 Modified Files: src/sys/arch/evbarm/marvell: marvell_start.S Log Message: Support ARMADAXP. + Add MVSOC_FIXUP_DEVID. + check mapped address for SoC registers. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/marvell/marvell_start.S 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/marvell/marvell_start.S diff -u src/sys/arch/evbarm/marvell/marvell_start.S:1.2 src/sys/arch/evbarm/marvell/marvell_start.S:1.3 --- src/sys/arch/evbarm/marvell/marvell_start.S:1.2 Mon Jan 31 06:28:04 2011 +++ src/sys/arch/evbarm/marvell/marvell_start.S Mon Sep 30 12:54:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: marvell_start.S,v 1.2 2011/01/31 06:28:04 matt Exp $ */ +/* $NetBSD: marvell_start.S,v 1.3 2013/09/30 12:54:59 kiyohara Exp $ */ /* * Copyright (C) 2005, 2006 WIDE Project and SOUM Corporation. * All rights reserved. @@ -60,16 +60,20 @@ */ #include opt_cputypes.h +#include opt_mvsoc.h #include machine/asm.h #include arm/armreg.h #include assym.h -RCSID($NetBSD: marvell_start.S,v 1.2 2011/01/31 06:28:04 matt Exp $) +RCSID($NetBSD: marvell_start.S,v 1.3 2013/09/30 12:54:59 kiyohara Exp $) #ifndef SDRAM_START #define SDRAM_START 0x #endif +#define SHEEVA 1 +#define PJ4B 2 + /* * CPWAIT -- Canonical method to wait for CP15 update. * NOTE: Clobbers the specified temp reg. @@ -99,24 +103,28 @@ _C_LABEL(marvell_start): * in VA 0xc020.. */ -#ifdef CPU_SHEEVA + /* Check cores */ mrc p15, 0, r4, c0, c0, 0 and r4, r4, #CPU_ID_CPU_MASK - adr r5, sheeva_cores_start - adr r6, sheeva_cores_end -1: + adr r5, cores_start + adr r6, cores_end +0: cmp r5, r6 - beq 2f - ldmia r5!, {r7} + beq 1f + ldmia r5!, {r7, r8} cmp r4, r7 - bne 1b + bne 0b + + cmp r8, #SHEEVA + bne 1f +sheeva_l2_disable: /* Make sure L2 is disabled */ - mrc p15, 1, r0, c15, c1, 0 @ Get Marvell Extra Features Register - bic r0, r0, #0x0040 @ disable L2 cache - mcr p15, 1, r0, c15, c1, 0 -2: -#endif + mrc p15, 1, r5, c15, c1, 0 @ Get Marvell Extra Features Register + bic r5, r5, #0x0040 @ disable L2 cache + mcr p15, 1, r5, c15, c1, 0 +1: + /* save u-boot's args */ adr r4, u_boot_args nop @@ -127,6 +135,38 @@ _C_LABEL(marvell_start): nop nop + /* Check SoC mapped address */ + mov r4, #0x1100 + orr r4, r4, #0x00ab /* Marvell Vendor ID (0x11ab) */ + adr r5, marvell_interregs_pbase_list_start + adr r6, marvell_interregs_pbase_list_end +0: + cmp r5, r6 + beq 1f + ldmia r5!, {r7} + add r8, r7, #0x4 + ldr r8, [r8] /* Read vend/prod reg from PCI config */ + bic r8, r8, #0xff00 + bic r8, r8, #0x00ff + cmp r4, r8 + bne 0b + adr r6, marvell_interregs_pbase + str r7, [r6] +#if defined(MVSOC_FIXUP_DEVID) MVSOC_FIXUP_DEVID 0 + /* + * Some SoC returns ugly DeviceID. Fixup it. + */ + adr r5, devid + ldr r5, [r5] + orr r8, r8, r5, lsl #16 + add r7, r7, #0x4 + str r8, [r7] + b 1f +devid: + .word MVSOC_FIXUP_DEVID +#endif +1: + /* build page table from scratch */ ldr r0, Lstartup_pagetable /* pagetable */ adr r4, mmu_init_table @@ -146,17 +186,24 @@ _C_LABEL(marvell_start): mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ mov r0, #0 + cmp r8, #PJ4B + mcreq p15, 0, r0, c13, c0, 1 /* Set ASID to 0 */ mcr p15, 0, r0, c7, c6, 0 /* Invalidate D cache */ mcr p15, 0, r0, c7, c10, 4 /* Drain write-buffer */ /* Ensure safe Translation Table. */ /* Set the Domain Access register. Very important! */ -mov r0, #((DOMAIN_CLIENT (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) + mov r0, #((DOMAIN_CLIENT (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) mcr p15, 0, r0, c3, c0, 0 /* Enable MMU */ mrc p15, 0, r0, c1, c0, 0 + cmp r8, #PJ4B + orreq r0, r0, #CPU_CONTROL_XP_ENABLE + biceq r0, r0, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE | CPU_CONTROL_WBUF_ENABLE) + biceq r0, r0, #(CPU_CONTROL_IC_ENABLE) + biceq r0, r0, #(CPU_CONTROL_BPRD_ENABLE) orr r0, r0, #CPU_CONTROL_SYST_ENABLE orr r0, r0, #CPU_CONTROL_MMU_ENABLE mcr p15, 0, r0, c1, c0, 0 @@ -179,12 +226,25 @@ Lstartup_pagetable: u_boot_args: .space 16 /* r0, r1, r2, r3 */ -#ifdef CPU_SHEEVA -sheeva_cores_start: - .word CPU_ID_MV88SV131 - .word CPU_ID_MV88FR571_VD /* Is it Sheeva? */ -sheeva_cores_end: -#endif +cores_start: + .word CPU_ID_MV88SV131, SHEEVA + .word CPU_ID_MV88FR571_VD, SHEEVA /* Is it Sheeva? */ + .word CPU_ID_MVOLD, SHEEVA /* Is it Sheeva? */ + .word CPU_ID_MV88SV581X_V6, PJ4B + .word CPU_ID_MV88SV581X_V7, PJ4B + .word CPU_ID_MV88SV584X_V7, PJ4B + .word CPU_ID_ARM_88SV581X_V6, PJ4B + .word CPU_ID_ARM_88SV581X_V7, PJ4B + .word 0, 0 +cores_end: + + .globl _C_LABEL(marvell_interregs_pbase) +marvell_interregs_pbase: + .word 0x +marvell_interregs_pbase_list_start: + .word 0xd000 + .word 0xf100
CVS commit: src/sys/arch/evbarm/marvell
Module Name:src Committed By: kiyohara Date: Mon Sep 30 12:57:53 UTC 2013 Modified Files: src/sys/arch/evbarm/marvell: marvell_machdep.c marvellreg.h marvellvar.h Log Message: Support ARMADA XP. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbarm/marvell/marvell_machdep.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/marvell/marvellreg.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/marvell/marvellvar.h 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/marvell/marvell_machdep.c diff -u src/sys/arch/evbarm/marvell/marvell_machdep.c:1.21 src/sys/arch/evbarm/marvell/marvell_machdep.c:1.22 --- src/sys/arch/evbarm/marvell/marvell_machdep.c:1.21 Wed Dec 12 00:03:11 2012 +++ src/sys/arch/evbarm/marvell/marvell_machdep.c Mon Sep 30 12:57:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: marvell_machdep.c,v 1.21 2012/12/12 00:03:11 matt Exp $ */ +/* $NetBSD: marvell_machdep.c,v 1.22 2013/09/30 12:57:53 kiyohara Exp $ */ /* * Copyright (c) 2007, 2008, 2010 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: marvell_machdep.c,v 1.21 2012/12/12 00:03:11 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: marvell_machdep.c,v 1.22 2013/09/30 12:57:53 kiyohara Exp $); #include opt_evbarm_boardtype.h #include opt_ddb.h @@ -65,6 +65,8 @@ __KERNEL_RCSID(0, $NetBSD: marvell_mach #include arm/marvell/mvsocvar.h #include arm/marvell/orionreg.h #include arm/marvell/kirkwoodreg.h +#include arm/marvell/mv78xx0reg.h +#include arm/marvell/armadaxpreg.h #include arm/marvell/mvsocgppvar.h #include evbarm/marvell/marvellreg.h @@ -173,10 +175,15 @@ read_ttb(void) #define _A(a) ((a) ~L1_S_OFFSET) #define _S(s) (((s) + L1_S_SIZE - 1) ~(L1_S_SIZE-1)) -static const struct pmap_devmap marvell_devmap[] = { +static struct pmap_devmap marvell_devmap[] = { { MARVELL_INTERREGS_VBASE, +#if (defined(ORION) || defined(KIRKWOOD) || defined(MV78XX0)) \ +defined(ARMADAXP) + _A(0x), +#else _A(MARVELL_INTERREGS_PBASE), +#endif _S(MARVELL_INTERREGS_SIZE), VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, @@ -185,9 +192,6 @@ static const struct pmap_devmap marvell_ { 0, 0, 0, 0, 0 } }; -#undef _A -#undef _S - extern uint32_t *u_boot_args[]; /* @@ -214,9 +218,50 @@ initarm(void *arg) mvsoc_bootstrap(MARVELL_INTERREGS_VBASE); +#if (defined(ORION) || defined(KIRKWOOD) || defined(MV78XX0)) \ +defined(ARMADAXP) + int i; + + for (i = 0; marvell_devmap[i].pd_size != 0; i++) + if (marvell_devmap[i].pd_va == MARVELL_INTERREGS_VBASE) { + marvell_devmap[i].pd_pa = _A(MARVELL_INTERREGS_PBASE); + break; + } +#endif + /* map some peripheral registers */ pmap_devmap_bootstrap((vaddr_t)read_ttb(), marvell_devmap); + /* + * Heads up ... Setup the CPU / MMU / TLB functions + */ + if (set_cpufuncs()) + panic(cpu not recognized!); + + /* + * U-Boot doesn't use the virtual memory. + * + * Physical Address Range Description + * ----- + * 0x - 0x0fffSDRAM Bank 0 (max 256MB) + * 0x1000 - 0x1fffSDRAM Bank 1 (max 256MB) + * 0x2000 - 0x2fffSDRAM Bank 2 (max 256MB) + * 0x3000 - 0x3fffSDRAM Bank 3 (max 256MB) + * 0xf100 - 0xf10fSoC Internal Registers + */ + + cpu_domains((DOMAIN_CLIENT (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT); + + consinit(); + + /* Talk to the user */ +#ifndef EVBARM_BOARDTYPE +#define EVBARM_BOARDTYPE Marvell +#endif +#define BDSTR(s) _BDSTR(s) +#define _BDSTR(s) #s + printf(\nNetBSD/evbarm ( BDSTR(EVBARM_BOARDTYPE) ) booting ...\n); + /* Get ready for splfoo() */ switch (mvsoc_model()) { #ifdef ORION @@ -262,8 +307,8 @@ initarm(void *arg) case MARVELL_MV78XX0_MV78200: mv78xx0_intr_bootstrap(); - memtag = MV78XX0_TAG_PEX_MEM; - iotag = MV78XX0_TAG_PEX_IO; + memtag = MV78XX0_TAG_PEX0_MEM; + iotag = MV78XX0_TAG_PEX0_IO; nwindow = MV78XX0_MLMB_NWINDOW; nremap = MV78XX0_MLMB_NREMAP; @@ -271,6 +316,37 @@ initarm(void *arg) break; #endif /* MV78XX0 */ +#ifdef ARMADAXP + case MARVELL_ARMADAXP_MV78130: + case MARVELL_ARMADAXP_MV78160: + case MARVELL_ARMADAXP_MV78230: + case MARVELL_ARMADAXP_MV78260: + case MARVELL_ARMADAXP_MV78460: + armadaxp_intr_bootstrap(MARVELL_INTERREGS_PBASE); + + memtag = ARMADAXP_TAG_PEX00_MEM; + iotag = ARMADAXP_TAG_PEX00_IO; + nwindow = ARMADAXP_MLMB_NWINDOW; + nremap = ARMADAXP_MLMB_NREMAP; + + armadaxp_getclks(); + +#ifdef L2CACHE_ENABLE + /* Initialize L2 Cache */ + { + extern int armadaxp_l2_init(bus_addr_t); + + (void)armadaxp_l2_init(MARVELL_INTERREGS_PBASE); + } +#endif + +#ifdef AURORA_IO_CACHE_COHERENCY + /* Initialize cache coherency */ + armadaxp_io_coherency_init(); +#endif + break; +#endif /* ARMADAXP */ + default: /* We
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Mon Sep 30 13:03:25 UTC 2013 Modified Files: src/sys/arch/arm/marvell: armadaxp.c Log Message: Change argument for some functions. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/marvell/armadaxp.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/arm/marvell/armadaxp.c diff -u src/sys/arch/arm/marvell/armadaxp.c:1.2 src/sys/arch/arm/marvell/armadaxp.c:1.3 --- src/sys/arch/arm/marvell/armadaxp.c:1.2 Wed May 29 23:50:35 2013 +++ src/sys/arch/arm/marvell/armadaxp.c Mon Sep 30 13:03:25 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: armadaxp.c,v 1.2 2013/05/29 23:50:35 rkujawa Exp $ */ +/* $NetBSD: armadaxp.c,v 1.3 2013/09/30 13:03:25 kiyohara Exp $ */ /*** Copyright (C) Marvell International Ltd. and its affiliates @@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI ***/ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: armadaxp.c,v 1.2 2013/05/29 23:50:35 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: armadaxp.c,v 1.3 2013/09/30 13:03:25 kiyohara Exp $); #define _INTR_PRIVATE @@ -57,9 +57,8 @@ __KERNEL_RCSID(0, $NetBSD: armadaxp.c,v #include arm/marvell/mvsocreg.h #include arm/marvell/mvsocvar.h -#include evbarm/armadaxp/armadaxpreg.h +#include arm/marvell/armadaxpreg.h -#include evbarm/marvell/marvellreg.h #include dev/marvell/marvellreg.h #define EXTRACT_CPU_FREQ_FIELD(sar) (((0x01 (sar 52)) 3) | \ @@ -95,7 +94,7 @@ static void armadaxp_pic_establish_irq(s void armadaxp_handle_irq(void *); void armadaxp_io_coherency_init(void); -int armadaxp_l2_init(void); +int armadaxp_l2_init(bus_addr_t); struct vco_freq_ratio { uint8_t vco_cpu; /* VCO to CLK0(CPU) clock ratio */ @@ -152,16 +151,16 @@ static struct pic_softc armadaxp_pic = { * ready to handle interrupts from devices. */ void -armadaxp_intr_bootstrap(void) +armadaxp_intr_bootstrap(bus_addr_t pbase) { int i; /* Map MPIC base and MPIC percpu base registers */ - if (bus_space_map(mvsoc_bs_tag, MARVELL_INTERREGS_PBASE + - ARMADAXP_MLMB_MPIC_BASE, 0x500, 0, mpic_handle) != 0) + if (bus_space_map(mvsoc_bs_tag, pbase + ARMADAXP_MLMB_MPIC_BASE, + 0x500, 0, mpic_handle) != 0) panic(%s: Could not map MPIC registers, __func__); - if (bus_space_map(mvsoc_bs_tag, MARVELL_INTERREGS_PBASE + - ARMADAXP_MLMB_MPIC_CPU_BASE, 0x800, 0, mpic_cpu_handle) != 0) + if (bus_space_map(mvsoc_bs_tag, pbase + ARMADAXP_MLMB_MPIC_CPU_BASE, + 0x800, 0, mpic_cpu_handle) != 0) panic(%s: Could not map MPIC percpu registers, __func__); /* Disable all interrupts */ @@ -317,14 +316,14 @@ armadaxp_getclks(void) */ int -armadaxp_l2_init(void) +armadaxp_l2_init(bus_addr_t pbase) { u_int32_t reg; int ret; /* Map L2 space */ - ret = bus_space_map(mvsoc_bs_tag, MARVELL_INTERREGS_PBASE + - ARMADAXP_L2_BASE, 0x1000, 0, l2_handle); + ret = bus_space_map(mvsoc_bs_tag, pbase + ARMADAXP_L2_BASE, + 0x1000, 0, l2_handle); if (ret) { printf(%s: Cannot map L2 register space, ret:%d\n, __func__, ret);
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Mon Sep 30 13:06:03 UTC 2013 Modified Files: src/sys/arch/arm/marvell: files.marvell Log Message: Add ARMADAXP into opt_mvsoc.h. And add mv78xx0.c. However not test long time. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/marvell/files.marvell 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/arm/marvell/files.marvell diff -u src/sys/arch/arm/marvell/files.marvell:1.9 src/sys/arch/arm/marvell/files.marvell:1.10 --- src/sys/arch/arm/marvell/files.marvell:1.9 Thu Aug 29 09:46:04 2013 +++ src/sys/arch/arm/marvell/files.marvell Mon Sep 30 13:06:03 2013 @@ -1,4 +1,4 @@ -# $NetBSD: files.marvell,v 1.9 2013/08/29 09:46:04 kiyohara Exp $ +# $NetBSD: files.marvell,v 1.10 2013/09/30 13:06:03 kiyohara Exp $ # # Configuration info for Marvell System on Chip support # @@ -13,12 +13,12 @@ file arch/arm/marvell/mvsoc_dma.c file arch/arm/arm32/irq_dispatch.S -defflag opt_mvsoc.hORION KIRKWOOD MV78XX0 +defflag opt_mvsoc.hORION KIRKWOOD MV78XX0 ARMADAXP file arch/arm/marvell/mvsoc_intr.c -file arch/arm/marvell/armadaxp.c armadaxp file arch/arm/marvell/orion.c orion file arch/arm/marvell/kirkwood.c kirkwood -#file arch/arm/marvell/mv78xx0.c mv78xx0 +file arch/arm/marvell/mv78xx0.c mv78xx0 +file arch/arm/marvell/armadaxp.c armadaxp # Integrated peripherals
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Mon Sep 30 13:07:51 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: ffs.S Log Message: More (stylistic) whitespace. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/ffs.S diff -u src/common/lib/libc/arch/arm/string/ffs.S:1.5 src/common/lib/libc/arch/arm/string/ffs.S:1.6 --- src/common/lib/libc/arch/arm/string/ffs.S:1.5 Mon Sep 30 12:31:27 2013 +++ src/common/lib/libc/arch/arm/string/ffs.S Mon Sep 30 13:07:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.S,v 1.5 2013/09/30 12:31:27 skrll Exp $ */ +/* $NetBSD: ffs.S,v 1.6 2013/09/30 13:07:51 skrll Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert * All rights reserved. @@ -30,7 +30,7 @@ #include machine/asm.h -RCSID($NetBSD: ffs.S,v 1.5 2013/09/30 12:31:27 skrll Exp $) +RCSID($NetBSD: ffs.S,v 1.6 2013/09/30 13:07:51 skrll Exp $) /* * ffs - find first set bit, this algorithm isolates the first set @@ -73,7 +73,7 @@ ARM_ENTRY(ffs) rsbne r0, r0, r0, lsl #16 /* r0 = X * 0x0450fbaf */ /* now lookup in table indexed on top 6 bits of r0 */ - ldrbne r0, [r2, r0, lsr #26 ] + ldrbne r0, [r2, r0, lsr #26] RET .text;
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Mon Sep 30 13:07:30 UTC 2013 Added Files: src/sys/arch/arm/marvell: mv78xx0.c Log Message: Add mv78xx0 support. However not test long time. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/marvell/mv78xx0.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/arm/marvell/mv78xx0.c diff -u /dev/null src/sys/arch/arm/marvell/mv78xx0.c:1.1 --- /dev/null Mon Sep 30 13:07:30 2013 +++ src/sys/arch/arm/marvell/mv78xx0.c Mon Sep 30 13:07:30 2013 @@ -0,0 +1,236 @@ +/* $NetBSD: mv78xx0.c,v 1.1 2013/09/30 13:07:30 kiyohara Exp $ */ +/* + * Copyright (c) 2010 KIYOHARA Takashi + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: mv78xx0.c,v 1.1 2013/09/30 13:07:30 kiyohara Exp $); + +#define _INTR_PRIVATE + +#include mvsocgpp.h + +#include sys/param.h +#include sys/bus.h +#include sys/cpu.h + +#include machine/intr.h + +#include arm/pic/picvar.h +#include arm/pic/picvar.h + +#include arm/marvell/mvsocreg.h +#include arm/marvell/mvsocvar.h +#include arm/marvell/mv78xx0reg.h + +#include dev/marvell/marvellreg.h + +#define MV78XX0_ICI_MICR(g) (MV78XX0_ICI_MICLR + ((g) 2)) +#define MV78XX0_ICI_IRQIMR(g) (MV78XX0_ICI_IRQIMLR + ((g) 2)) + +static void mv78xx0_intr_init(void); + +static void mv78xx0_pic_unblock_irqs(struct pic_softc *, size_t, uint32_t); +static void mv78xx0_pic_block_irqs(struct pic_softc *, size_t, uint32_t); +static void mv78xx0_pic_establish_irq(struct pic_softc *, struct intrsource *); +static void mv78xx0_pic_source_name(struct pic_softc *, int, char *, size_t); + +static int mv78xx0_find_pending_irqs(void); + +static const char * const sources[64] = { +ErrSum(0), SPI(1), TWSI0(2),TWSI1(3), +IDMA0(4),IDMA1(5),IDMA2(6),IDMA3(7), +Timer0(8), Timer1(9), Timer2(10), Timer3(11), +UART0(12), UART1(13), UART2(14), UART3(15), +USB0(16),USB1(17),USB2(18),Crypto(19), +Reserved(20),Reserved(21),XOR0(22),XOR1(23), +Reserved(24),Reserved(25),SATA(26),TDMI_INT(27), +Reserved(28),Reserved(29),Reserved(30),Reserved(31) + +PEX00INTA(32), PEX01INTA(33), PEX02INTA(34), PEX03INTA(35) +PEX10INTA(36), PEX11INTA(37), PEX12INTA(38), PEX13INTA(39) +GE00Sum(40), GE00Rx(41), GE00Tx(42), GE00Misc(43) +GE01Sum(44), GE01Rx(45), GE01Tx(46), GE01Misc(47) +GE10Sum(48), GE10Rx(49), GE10Tx(50), GE10Misc(51) +GE11Sum(52), GE11Rx(53), GE11Tx(54), GE11Misc(55) +GPIO0_7(56), GPIO8_15(57),GPIO16_23(58), GPIO24_31(59) +DB_INT(60), DB_OUT(61), Reserved(62),Reserved(63) +}; + +static struct pic_ops mv78xx0_picops = { + .pic_unblock_irqs = mv78xx0_pic_unblock_irqs, + .pic_block_irqs = mv78xx0_pic_block_irqs, + .pic_establish_irq = mv78xx0_pic_establish_irq, + .pic_source_name = mv78xx0_pic_source_name, +}; +static struct pic_softc mv78xx0_pic = { + .pic_ops = mv78xx0_picops, + .pic_maxsources = 64, + .pic_name = mv78xx0_pic, +}; + + +/* + * mv78xx0_intr_bootstrap: + * + * Initialize the rest of the interrupt subsystem, making it + * ready to handle interrupts from devices. + */ +void +mv78xx0_intr_bootstrap(void) +{ + extern void (*mvsoc_intr_init)(void); + + /* disable all interrupts */ + write_mlmbreg(MV78XX0_ICI_IRQIMER, 0); + write_mlmbreg(MV78XX0_ICI_IRQIMLR, 0); + write_mlmbreg(MV78XX0_ICI_IRQIMHR, 0); + + /* disable all bridge interrupts */ +
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Mon Sep 30 13:12:56 UTC 2013 Modified Files: src/sys/arch/arm/marvell: mvsocvar.h Log Message: Remove #ifdef ARMADAXP. It is OK !ARMADAXP. Change argument for armadaxp functions. Add some MV78xx0 definitions. Add mv78xx0 functions. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/marvell/mvsocvar.h 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/arm/marvell/mvsocvar.h diff -u src/sys/arch/arm/marvell/mvsocvar.h:1.4 src/sys/arch/arm/marvell/mvsocvar.h:1.5 --- src/sys/arch/arm/marvell/mvsocvar.h:1.4 Wed May 29 20:47:14 2013 +++ src/sys/arch/arm/marvell/mvsocvar.h Mon Sep 30 13:12:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsocvar.h,v 1.4 2013/05/29 20:47:14 rkujawa Exp $ */ +/* $NetBSD: mvsocvar.h,v 1.5 2013/09/30 13:12:56 kiyohara Exp $ */ /* * Copyright (c) 2007, 2010 KIYOHARA Takashi * All rights reserved. @@ -42,16 +42,15 @@ struct mvsoc_softc { typedef int (*mvsoc_irq_handler_t)(void *); extern uint32_t mvPclk, mvSysclk, mvTclk; +extern vaddr_t misc_base; extern vaddr_t mlmb_base; extern int nwindow, nremap; extern int gpp_npins, gpp_irqbase; extern struct bus_space mvsoc_bs_tag; extern struct arm32_bus_dma_tag mvsoc_bus_dma_tag; -#if defined(ARMADAXP) -extern vaddr_t misc_base; + #define read_miscreg(o) (*(volatile uint32_t *)(misc_base + (o))) #define write_miscreg(o, v) (*(volatile uint32_t *)(misc_base + (o)) = (v)) -#endif #define read_mlmbreg(o) (*(volatile uint32_t *)(mlmb_base + (o))) #define write_mlmbreg(o, v) (*(volatile uint32_t *)(mlmb_base + (o)) = (v)) @@ -88,6 +87,30 @@ enum mvsoc_tags { KIRKWOOD_TAG_BOOTROM, KIRKWOOD_TAG_CRYPT, + MV78XX0_TAG_DEVICE_CS0, + MV78XX0_TAG_DEVICE_CS1, + MV78XX0_TAG_DEVICE_CS2, + MV78XX0_TAG_DEVICE_CS3, + MV78XX0_TAG_DEVICE_BOOTCS, + MV78XX0_TAG_SPI, + MV78XX0_TAG_PEX0_MEM, + MV78XX0_TAG_PEX01_MEM, + MV78XX0_TAG_PEX02_MEM, + MV78XX0_TAG_PEX03_MEM, + MV78XX0_TAG_PEX0_IO, + MV78XX0_TAG_PEX01_IO, + MV78XX0_TAG_PEX02_IO, + MV78XX0_TAG_PEX03_IO, + MV78XX0_TAG_PEX1_MEM, + MV78XX0_TAG_PEX11_MEM, + MV78XX0_TAG_PEX12_MEM, + MV78XX0_TAG_PEX13_MEM, + MV78XX0_TAG_PEX1_IO, + MV78XX0_TAG_PEX11_IO, + MV78XX0_TAG_PEX12_IO, + MV78XX0_TAG_PEX13_IO, + MV78XX0_TAG_CRYPT, + ARMADAXP_TAG_PEX00_MEM, ARMADAXP_TAG_PEX00_IO, ARMADAXP_TAG_PEX01_MEM, @@ -103,13 +126,16 @@ enum mvsoc_tags { }; int mvsoc_target(int, uint32_t *, uint32_t *, uint32_t *, uint32_t *); -void armadaxp_getclks(void); -void armadaxp_intr_bootstrap(void); - void orion_intr_bootstrap(void); void orion_getclks(bus_addr_t); void kirkwood_intr_bootstrap(void); void kirkwood_getclks(bus_addr_t); +void mv78xx0_intr_bootstrap(void); +void mv78xx0_getclks(bus_addr_t); + +void armadaxp_intr_bootstrap(bus_addr_t); +void armadaxp_getclks(void); + #endif /* _MVSOCVAR_H_ */
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Mon Sep 30 13:15:46 UTC 2013 Modified Files: src/sys/arch/arm/marvell: mvsocreg.h Log Message: Remove #ifdef ARMADAXP. It is OK !ARMADAXP. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/marvell/mvsocreg.h 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/arm/marvell/mvsocreg.h diff -u src/sys/arch/arm/marvell/mvsocreg.h:1.4 src/sys/arch/arm/marvell/mvsocreg.h:1.5 --- src/sys/arch/arm/marvell/mvsocreg.h:1.4 Wed May 29 20:47:14 2013 +++ src/sys/arch/arm/marvell/mvsocreg.h Mon Sep 30 13:15:46 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsocreg.h,v 1.4 2013/05/29 20:47:14 rkujawa Exp $ */ +/* $NetBSD: mvsocreg.h,v 1.5 2013/09/30 13:15:46 kiyohara Exp $ */ /* * Copyright (c) 2007, 2008 KIYOHARA Takashi * All rights reserved. @@ -89,23 +89,15 @@ #define MVSOC_MLMB_BASE (UNITID2PHYS(MLMB)) /* 0x2 */ /* CPU Address Map Registers */ -#if defined(ARMADAXP) #define MVSOC_MLMB_WCR(w) ((w) 8 ? ((w) 4) + 0x0 :\ (((w) - 8) 3) + 0x90) -#else -#define MVSOC_MLMB_WCR(w) (((w) 4) + 0x0) -#endif #define MVSOC_MLMB_WCR_WINEN (1 0) #define MVSOC_MLMB_WCR_TARGET(t) (((t) 0xf) 4) #define MVSOC_MLMB_WCR_ATTR(a) (((a) 0xff) 8) #define MVSOC_MLMB_WCR_SIZE_MASK 0x #define MVSOC_MLMB_WCR_SIZE(s) (((s) - 1) MVSOC_MLMB_WCR_SIZE_MASK) -#if defined(ARMADAXP) #define MVSOC_MLMB_WBR(w) ((w) 8 ? ((w) 4) + 0x4 :\ (((w) - 8) 3) + 0x94) -#else -#define MVSOC_MLMB_WBR(w) (((w) 4) + 0x4) -#endif #define MVSOC_MLMB_WBR_BASE_MASK 0x #define MVSOC_MLMB_WRLR(w) (((w) 4) + 0x8) #define MVSOC_MLMB_WRLR_REMAP_MASK 0x @@ -158,8 +150,10 @@ #define MVSOC_MLMB_MLMBI_CPUWDTIMERINTREQ 3 #define MVSOC_MLMB_MLMBI_ACCESSERR 4 #define MVSOC_MLMB_MLMBI_BIT64ERR 5 +#define MVSOC_MLMB_MLMBI_CPUTIMER2INTREQ 6 +#define MVSOC_MLMB_MLMBI_CPUTIMER3INTREQ 7 -#define MVSOC_MLMB_MLMBI_NIRQ 6 +#define MVSOC_MLMB_MLMBI_NIRQ 8 /* * PCI-Express Interface Registers
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Mon Sep 30 13:19:28 UTC 2013 Modified Files: src/sys/arch/arm/marvell: mvsoc.c Log Message: Remove #ifdef ARMADAXP. It is OK !ARMADAXP. Add some ARMADAXP devices to peripheral list. And sort and reorder list. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/marvell/mvsoc.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/arm/marvell/mvsoc.c diff -u src/sys/arch/arm/marvell/mvsoc.c:1.12 src/sys/arch/arm/marvell/mvsoc.c:1.13 --- src/sys/arch/arm/marvell/mvsoc.c:1.12 Mon Jun 3 14:50:59 2013 +++ src/sys/arch/arm/marvell/mvsoc.c Mon Sep 30 13:19:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsoc.c,v 1.12 2013/06/03 14:50:59 rkujawa Exp $ */ +/* $NetBSD: mvsoc.c,v 1.13 2013/09/30 13:19:28 kiyohara Exp $ */ /* * Copyright (c) 2007, 2008 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mvsoc.c,v 1.12 2013/06/03 14:50:59 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: mvsoc.c,v 1.13 2013/09/30 13:19:28 kiyohara Exp $); #include opt_cputypes.h #include opt_mvsoc.h @@ -45,11 +45,10 @@ __KERNEL_RCSID(0, $NetBSD: mvsoc.c,v 1. #include arm/marvell/mvsocvar.h #include arm/marvell/orionreg.h #include arm/marvell/kirkwoodreg.h +#include arm/marvell/mv78xx0reg.h +#include arm/marvell/armadaxpreg.h -#if defined(ARMADAXP) -#include evbarm/armadaxp/armadaxpreg.h -#include evbarm/marvell/marvellreg.h -#endif +#include uvm/uvm.h #include locators.h @@ -68,10 +67,8 @@ static int mvsoc_search(device_t, cfdata uint32_t mvPclk, mvSysclk, mvTclk = 0; int nwindow = 0, nremap = 0; static vaddr_t regbase = 0x, dsc_base, pex_base; -vaddr_t mlmb_base; -#if defined(ARMADAXP) vaddr_t misc_base; -#endif +vaddr_t mlmb_base; void (*mvsoc_intr_init)(void); @@ -183,6 +180,56 @@ static struct { { KIRKWOOD_TAG_CRYPT, KIRKWOOD_ATTR_CRYPT, KIRKWOOD_UNITID_CRYPT }, #endif + +#if defined(MV78XX0) + { MV78XX0_TAG_DEVICE_CS0, + MV78XX0_ATTR_DEVICE_CS0, MVSOC_UNITID_DEVBUS }, + { MV78XX0_TAG_DEVICE_CS1, + MV78XX0_ATTR_DEVICE_CS1, MVSOC_UNITID_DEVBUS }, + { MV78XX0_TAG_DEVICE_CS2, + MV78XX0_ATTR_DEVICE_CS2, MVSOC_UNITID_DEVBUS }, + { MV78XX0_TAG_DEVICE_CS3, + MV78XX0_ATTR_DEVICE_CS3, MVSOC_UNITID_DEVBUS }, + { MV78XX0_TAG_DEVICE_BOOTCS, + MV78XX0_ATTR_BOOT_CS, MVSOC_UNITID_DEVBUS }, + { MV78XX0_TAG_SPI, + MV78XX0_ATTR_SPI, MVSOC_UNITID_DEVBUS }, + { MV78XX0_TAG_PEX0_MEM, + MV78XX0_ATTR_PEX_0_MEM, MVSOC_UNITID_PEX }, + { MV78XX0_TAG_PEX01_MEM, + MV78XX0_ATTR_PEX_1_MEM, MVSOC_UNITID_PEX }, + { MV78XX0_TAG_PEX02_MEM, + MV78XX0_ATTR_PEX_2_MEM, MVSOC_UNITID_PEX }, + { MV78XX0_TAG_PEX03_MEM, + MV78XX0_ATTR_PEX_3_MEM, MVSOC_UNITID_PEX }, + { MV78XX0_TAG_PEX0_IO, + MV78XX0_ATTR_PEX_0_IO, MVSOC_UNITID_PEX }, + { MV78XX0_TAG_PEX01_IO, + MV78XX0_ATTR_PEX_1_IO, MVSOC_UNITID_PEX }, + { MV78XX0_TAG_PEX02_IO, + MV78XX0_ATTR_PEX_2_IO, MVSOC_UNITID_PEX }, + { MV78XX0_TAG_PEX03_IO, + MV78XX0_ATTR_PEX_3_IO, MVSOC_UNITID_PEX }, + { MV78XX0_TAG_PEX1_MEM, + MV78XX0_ATTR_PEX_0_MEM, MV78XX0_UNITID_PEX1 }, + { MV78XX0_TAG_PEX11_MEM, + MV78XX0_ATTR_PEX_1_MEM, MV78XX0_UNITID_PEX1 }, + { MV78XX0_TAG_PEX12_MEM, + MV78XX0_ATTR_PEX_2_MEM, MV78XX0_UNITID_PEX1 }, + { MV78XX0_TAG_PEX13_MEM, + MV78XX0_ATTR_PEX_3_MEM, MV78XX0_UNITID_PEX1 }, + { MV78XX0_TAG_PEX1_IO, + MV78XX0_ATTR_PEX_0_IO, MV78XX0_UNITID_PEX1 }, + { MV78XX0_TAG_PEX11_IO, + MV78XX0_ATTR_PEX_1_IO, MV78XX0_UNITID_PEX1 }, + { MV78XX0_TAG_PEX12_IO, + MV78XX0_ATTR_PEX_2_IO, MV78XX0_UNITID_PEX1 }, + { MV78XX0_TAG_PEX13_IO, + MV78XX0_ATTR_PEX_3_IO, MV78XX0_UNITID_PEX1 }, + { MV78XX0_TAG_CRYPT, + MV78XX0_ATTR_CRYPT, MV78XX0_UNITID_CRYPT }, +#endif + #if defined(ARMADAXP) { ARMADAXP_TAG_PEX00_MEM, ARMADAXP_ATTR_PEXx0_MEM, ARMADAXP_UNITID_PEX0 }, @@ -302,7 +349,9 @@ static const struct mvsoc_periph { uint32_t clkpwr_bit; } mvsoc_periphs[] = { #if defined(ORION) -{ ORION_1(88F1181), mvsoctmr,0, MVSOC_TMR_BASE, IRQ_DEFAULT }, +#define ORION_IRQ_TMR (32 + MVSOC_MLMB_MLMBI_CPUTIMER0INTREQ) + +{ ORION_1(88F1181), mvsoctmr,0, MVSOC_TMR_BASE, ORION_IRQ_TMR }, { ORION_1(88F1181), mvsocgpp,0, MVSOC_GPP_BASE, ORION_IRQ_GPIO7_0 }, { ORION_1(88F1181), com, 0, MVSOC_COM0_BASE, ORION_IRQ_UART0 }, { ORION_1(88F1181), com, 1, MVSOC_COM1_BASE, ORION_IRQ_UART1 }, @@ -310,7 +359,7 @@ static const struct mvsoc_periph { { ORION_1(88F1181), mvpex, 0, MVSOC_PEX_BASE, ORION_IRQ_PEX0INT }, { ORION_1(88F1181), mvpex, 1, ORION_PEX1_BASE, ORION_IRQ_PEX1INT }, -{ ORION_1(88F5082), mvsoctmr,0, MVSOC_TMR_BASE, IRQ_DEFAULT }, +{ ORION_1(88F5082), mvsoctmr,0, MVSOC_TMR_BASE, ORION_IRQ_TMR }, { ORION_1(88F5082), mvsocgpp,0, MVSOC_GPP_BASE, ORION_IRQ_GPIO7_0 }, { ORION_1(88F5082), com, 0, MVSOC_COM0_BASE, ORION_IRQ_UART0 }, {
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Mon Sep 30 13:21:10 UTC 2013 Modified Files: src/sys/arch/arm/marvell: mv78xx0reg.h Log Message: Change some defines. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/marvell/mv78xx0reg.h 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/arm/marvell/mv78xx0reg.h diff -u src/sys/arch/arm/marvell/mv78xx0reg.h:1.1 src/sys/arch/arm/marvell/mv78xx0reg.h:1.2 --- src/sys/arch/arm/marvell/mv78xx0reg.h:1.1 Sun Oct 3 05:49:24 2010 +++ src/sys/arch/arm/marvell/mv78xx0reg.h Mon Sep 30 13:21:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mv78xx0reg.h,v 1.1 2010/10/03 05:49:24 kiyohara Exp $ */ +/* $NetBSD: mv78xx0reg.h,v 1.2 2013/09/30 13:21:10 kiyohara Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -39,13 +39,14 @@ #define MV78XX0_UNITID_DDR MVSOC_UNITID_DDR #define MV78XX0_UNITID_DEVBUS MVSOC_UNITID_DEVBUS -#define MV78XX0_UNITID_LMB MVSOC_UNITID_LMB +#define MV78XX0_UNITID_LMB MVSOC_UNITID_MLMB #define MV78XX0_UNITID_GBE23 0x3 /* Gigabit Ethernet registers */ #define MV78XX0_UNITID_PEX MVSOC_UNITID_PEX #define MV78XX0_UNITID_USB 0x5 /* USB registers */ #define MV78XX0_UNITID_IDMA 0x6 /* IDMA registers */ #define MV78XX0_UNITID_XOR 0x6 /* XOR registers */ #define MV78XX0_UNITID_GBE01 0x7 /* Gigabit Ethernet registers */ +#define MV78XX0_UNITID_PEX1 0x8 #define MV78XX0_UNITID_CRYPT 0x9 /* Cryptographic Engine reg */ #define MV78XX0_UNITID_SA 0x9 /* Security Accelelerator reg */ #define MV78XX0_UNITID_SATA 0xa /* SATA registers */ @@ -54,13 +55,9 @@ #define MV78XX0_ATTR_DEVICE_CS0 0x3e #define MV78XX0_ATTR_DEVICE_CS1 0x3d #define MV78XX0_ATTR_DEVICE_CS2 0x3b -#define MV78XX0_ATTR_DEVICE_CS2 0x37 +#define MV78XX0_ATTR_DEVICE_CS3 0x37 #define MV78XX0_ATTR_BOOT_CS 0x2f #define MV78XX0_ATTR_SPI 0x1f -#define MV78XX0_ATTR_PEX_IO 0xe0 /* PCIe x4 Port 0.0 */ -#define MV78XX0_ATTR_PEX_MEM 0xe8 -#define MV78XX0_ATTR_PEX1_IO 0xe0 /* PCIe x1 Port 1 */ -#define MV78XX0_ATTR_PEX1_MEM 0xe8 #define MV78XX0_ATTR_PEX_0_IO 0xe0 /* PCIe x1 Port 0.0 */ #define MV78XX0_ATTR_PEX_0_MEM 0xe8 #define MV78XX0_ATTR_PEX_1_IO 0xd0 /* PCIe x1 Port 0.1 */ @@ -69,6 +66,7 @@ #define MV78XX0_ATTR_PEX_2_MEM 0xb8 #define MV78XX0_ATTR_PEX_3_IO 0x70 /* PCIe x1 Port 0.3 */ #define MV78XX0_ATTR_PEX_3_MEM 0x78 +#define MV78XX0_ATTR_CRYPT 0x00/* 0:Bswap,1:No,2:BWswap,3:Wswap */ #define MV78XX0_IRQ_ERRSUM 0 /* Sum of Main Intr Err Cause */ #define MV78XX0_IRQ_SPI 1 /* SPI */ @@ -130,8 +128,7 @@ * Physical address of integrated peripherals */ -#undef UNITID2PHYS -#define UNITID2PHYS(uid) ((MV78XX0_UNITID_ ## uid) 16) +#define MV78XX0_UNITID2PHYS(uid) ((MV78XX0_UNITID_ ## uid) 16) /* * General Purpose Port Registers @@ -140,6 +137,11 @@ #define MV78XX0_GPP_SIZE 0x100 /* + * Two-Wire Serial Interface Registers + */ +#define MV78XX0_TWSI1_BASE (MVSOC_DEVBUS_BASE + 0x1100) + +/* * UART Interface Registers */ /* NS16550 compatible */ @@ -147,60 +149,84 @@ #define MV78XX0_COM3_BASE (MVSOC_DEVBUS_BASE + 0x2300) /* + * Reset Registers + */ +#define MV78XX0_SAMPLE_AT_RESET_LOW (MVSOC_DEVBUS_BASE + 0x0030) +#define MV78XX0_SAMPLE_AT_RESET_HIGH (MVSOC_DEVBUS_BASE + 0x0034) + + +/* * Mbus-L to Mbus Bridge Registers */ /* CPU Address Map Registers */ #define MV78XX0_MLMB_NWINDOW 14 #define MV78XX0_MLMB_NREMAP 8 -/* Main Interrupt Controller Registers */ -#define MV78XX0_MLMB_MICLR 0x200 /*Main Interrupt Cause Low reg*/ -#define MV78XX0_MLMB_MIRQIMLR 0x204 /* Main IRQ Interrupt Mask */ -#define MV78XX0_MLMB_MFIQIMLR 0x208 /* Main FIQ Interrupt Mask */ -#define MV78XX0_MLMB_EIMLR 0x20c /* Endpoint Interrupt Mask */ -#define MV78XX0_MLMB_MICHR 0x210 /* Main Intr Cause High reg */ -#define MV78XX0_MLMB_MIRQIMHR 0x214 /*Main IRQ Interrupt High Mask*/ -#define MV78XX0_MLMB_MFIQIMHR 0x218 /*Main FIQ Interrupt High Mask*/ -#define MV78XX0_MLMB_EIMHR 0x21c /*Endpoint Interrupt High Mask*/ +#define MV78XX0_ICI_BASE(cpu) ((cpu)-ci_cpuid 14) + +/* Interrupt Controller Interface Registers */ +#define MV78XX0_ICI_MIECR 0x200 /* Main Interrupt Error Cause */ +#define MV78XX0_ICI_MICLR 0x204 /* Main Interrupt Cause Low */ +#define MV78XX0_ICI_MICHR 0x208 /* Main Interrupt Cause High */ +#define MV78XX0_ICI_IRQIMER 0x20c /* IRQ Interrupt Mask Error */ +#define MV78XX0_ICI_IRQIMLR 0x210 /* IRQ Interrupt Mask Low */ +#define MV78XX0_ICI_IRQIMHR 0x214 /* IRQ Interrupt Mask High */ +#define MV78XX0_ICI_IRQSCR 0x218 /* IRQ Select Cause */ +#define MV78XX0_ICI_FIQIMER 0x21c /* FIQ Interrupt Mask Error */ +#define MV78XX0_ICI_FIQIMLR 0x220 /* FIQ Interrupt Mask Low */ +#define MV78XX0_ICI_FIQIMHR 0x224 /* FIQ Interrupt Mask High */ +#define MV78XX0_ICI_FIQSCR 0x228 /* FIQ Select Cause */ +#define
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Mon Sep 30 13:22:22 UTC 2013 Modified Files: src/sys/arch/arm/marvell: mvsoc_intr.c Log Message: Reorder include opt_mvsoc.h. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/marvell/mvsoc_intr.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/arm/marvell/mvsoc_intr.c diff -u src/sys/arch/arm/marvell/mvsoc_intr.c:1.6 src/sys/arch/arm/marvell/mvsoc_intr.c:1.7 --- src/sys/arch/arm/marvell/mvsoc_intr.c:1.6 Wed May 29 20:47:14 2013 +++ src/sys/arch/arm/marvell/mvsoc_intr.c Mon Sep 30 13:22:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsoc_intr.c,v 1.6 2013/05/29 20:47:14 rkujawa Exp $ */ +/* $NetBSD: mvsoc_intr.c,v 1.7 2013/09/30 13:22:22 kiyohara Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,9 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mvsoc_intr.c,v 1.6 2013/05/29 20:47:14 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: mvsoc_intr.c,v 1.7 2013/09/30 13:22:22 kiyohara Exp $); + +#include opt_mvsoc.h #define _INTR_PRIVATE @@ -40,8 +42,6 @@ __KERNEL_RCSID(0, $NetBSD: mvsoc_intr.c #include arm/marvell/mvsocreg.h #include arm/marvell/mvsocvar.h -#include opt_mvsoc.h - #if defined(ARMADAXP) extern void armadaxp_handle_irq(void *); #endif
CVS commit: src/sys/arch/evbarm/armadaxp
Module Name:src Committed By: kiyohara Date: Mon Sep 30 13:29:07 UTC 2013 Modified Files: src/sys/arch/evbarm/armadaxp: armadaxp_machdep.c Log Message: Call some armadaxp functions with MARVLL_INTERREG_PBASE. And include arm/marvell/armadaxpreg.h instead of evbarm/armadaxp. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/armadaxp/armadaxp_machdep.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/armadaxp/armadaxp_machdep.c diff -u src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c:1.2 src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c:1.3 --- src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c:1.2 Wed May 29 23:50:34 2013 +++ src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c Mon Sep 30 13:29:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: armadaxp_machdep.c,v 1.2 2013/05/29 23:50:34 rkujawa Exp $ */ +/* $NetBSD: armadaxp_machdep.c,v 1.3 2013/09/30 13:29:07 kiyohara Exp $ */ /*** Copyright (C) Marvell International Ltd. and its affiliates @@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI ***/ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: armadaxp_machdep.c,v 1.2 2013/05/29 23:50:34 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: armadaxp_machdep.c,v 1.3 2013/09/30 13:29:07 kiyohara Exp $); #include opt_machdep.h #include opt_mvsoc.h @@ -88,7 +88,7 @@ __KERNEL_RCSID(0, $NetBSD: armadaxp_mac #include arm/marvell/mvsocreg.h #include arm/marvell/mvsocvar.h -#include evbarm/armadaxp/armadaxpreg.h +#include arm/marvell/armadaxpreg.h #include evbarm/marvell/marvellreg.h #include evbarm/marvell/marvellvar.h @@ -150,7 +150,7 @@ extern char _end[]; #define KERNEL_VM_SIZE 0x1000 /* Prototypes */ -extern int armadaxp_l2_init(void); +extern int armadaxp_l2_init(bus_addr_t); extern void armadaxp_io_coherency_init(void); void consinit(void); @@ -352,11 +352,11 @@ initarm(void *arg) armadaxp_getclks(); /* Preconfigure interrupts */ - armadaxp_intr_bootstrap(); + armadaxp_intr_bootstrap(MARVELL_INTERREGS_PBASE); #ifdef L2CACHE_ENABLE /* Initialize L2 Cache */ - (void)armadaxp_l2_init(); + (void)armadaxp_l2_init(MARVELL_INTERREGS_PBASE); #endif #ifdef AURORA_IO_CACHE_COHERENCY
CVS commit: src/sys/arch
Module Name:src Committed By: kiyohara Date: Mon Sep 30 13:33:05 UTC 2013 Added Files: src/sys/arch/arm/marvell: armadaxpreg.h Removed Files: src/sys/arch/evbarm/armadaxp: armadaxpreg.h Log Message: Move armadaxpreg.h into arm/marvell. And add some defines and reorder. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/marvell/armadaxpreg.h cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/armadaxp/armadaxpreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/arm/marvell/armadaxpreg.h diff -u /dev/null src/sys/arch/arm/marvell/armadaxpreg.h:1.1 --- /dev/null Mon Sep 30 13:33:05 2013 +++ src/sys/arch/arm/marvell/armadaxpreg.h Mon Sep 30 13:33:05 2013 @@ -0,0 +1,301 @@ +/*** +Copyright (C) Marvell International Ltd. and its affiliates + +Developed by Semihalf + + +Marvell BSD License + +If you received this File from Marvell, you may opt to use, redistribute and/or +modify this File under the following licensing terms. +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +* Neither the name of Marvell nor the names of its contributors may be +used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +***/ + +#ifndef _ARMADAXPREG_H_ +#define _ARMADAXPREG_H_ + +#include arm/marvell/mvsocreg.h +#include evbarm/marvell/marvellvar.h + +#define ARMADAXP_UNITID_DDR MVSOC_UNITID_DDR +#define ARMADAXP_UNITID_DEVBUS MVSOC_UNITID_DEVBUS +#define ARMADAXP_UNITID_MBUS MVSOC_UNITID_MBUS +#define ARMADAXP_UNITID_MLMB MVSOC_UNITID_MLMB +#define ARMADAXP_UNITID_PEX MVSOC_UNITID_PEX +#define ARMADAXP_UNITID_USB 0x5 /* USB registers */ +#define ARMADAXP_UNITID_XORE0 0x6 /* Reserved? */ +#define ARMADAXP_UNITID_GBE0 0x7 +#define ARMADAXP_UNITID_GBE2 0x3 +#define ARMADAXP_UNITID_PEX0 MVSOC_UNITID_PEX +#define ARMADAXP_UNITID_PEX1 0x8 +#define ARMADAXP_UNITID_PEX2 MVSOC_UNITID_PEX +#define ARMADAXP_UNITID_PEX3 0x8 +#define ARMADAXP_UNITID_CRYPT 0x9 +#define ARMADAXP_UNITID_SATA 0xa +#define ARMADAXP_UNITID_BM 0xc +#define ARMADAXP_UNITID_PNC 0xc +#define ARMADAXP_UNITID_SDIO 0xd /* SDIO registers */ +#define ARMADAXP_UNITID_LCD 0xe /* Reserved? */ +#define ARMADAXP_UNITID_XORE1 0xf /* Reserved? */ + +#define ARMADAXP_ATTR_PEXx0_MEM 0xe8 +#define ARMADAXP_ATTR_PEXx0_IO 0xe0 +#define ARMADAXP_ATTR_PEXx1_MEM 0xd8 +#define ARMADAXP_ATTR_PEXx1_IO 0xd0 +#define ARMADAXP_ATTR_PEXx2_MEM 0xb8 +#define ARMADAXP_ATTR_PEXx2_IO 0xb0 +#define ARMADAXP_ATTR_PEXx3_MEM 0x78 +#define ARMADAXP_ATTR_PEXx3_IO 0x70 +#define ARMADAXP_ATTR_PEX2_MEM 0xf8 +#define ARMADAXP_ATTR_PEX2_IO 0xf0 +#define ARMADAXP_ATTR_PEX3_MEM 0xf8 +#define ARMADAXP_ATTR_PEX3_IO 0xf0 + + +#define ARMADAXP_IRQ_GBE0_TH_RXTX 8 /* GBE0_TH_RXTX_Int */ +#define ARMADAXP_IRQ_GBE1_TH_RXTX 10 /* GBE1_TH_RXTX_Int */ +#define ARMADAXP_IRQ_GBE2_TH_RXTX 12 /* GBE2_TH_RXTX_Int */ +#define ARMADAXP_IRQ_GBE3_TH_RXTX 14 /* GBE3_TH_RXTX_Int */ + +#define ARMADAXP_IRQ_LCD 29 +#define ARMADAXP_IRQ_SPI 30 +#define ARMADAXP_IRQ_TWSI0 31 +#define ARMADAXP_IRQ_TWSI1 32 +#define ARMADAXP_IRQ_IDMA0 33 /* IDMA Channel 0 */ +#define ARMADAXP_IRQ_IDMA1 34 /* IDMA Channel 1 */ +#define ARMADAXP_IRQ_IDMA2 35 /* IDMA Channel 2 */ +#define ARMADAXP_IRQ_IDMA3 36 /* IDMA Channel 3 */ +#define ARMADAXP_IRQ_TIMER0 37 +#define ARMADAXP_IRQ_TIMER1 38 +#define ARMADAXP_IRQ_TIMER2 39 +#define
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: kiyohara Date: Mon Sep 30 13:36:54 UTC 2013 Added Files: src/sys/arch/evbarm/conf: OPENBLOCKS_AX3 Log Message: Add configuration Plat'Home OpenBlocks AX3. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/conf/OPENBLOCKS_AX3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/evbarm/conf/OPENBLOCKS_AX3 diff -u /dev/null src/sys/arch/evbarm/conf/OPENBLOCKS_AX3:1.1 --- /dev/null Mon Sep 30 13:36:54 2013 +++ src/sys/arch/evbarm/conf/OPENBLOCKS_AX3 Mon Sep 30 13:36:54 2013 @@ -0,0 +1,342 @@ +# $NetBSD: OPENBLOCKS_AX3,v 1.1 2013/09/30 13:36:54 kiyohara Exp $ +# +# OPENBLOCKS_AX3 -- Plat'Home. OpenBlockS AX3 kernel +# + +include arch/evbarm/conf/std.marvell + +options INCLUDE_CONFIG_FILE # embed config file in kernel binary + +# estimated number of users + +maxusers 32 + +# Board Type +makeoptions BOARDTYPE=openblocks_ax3 +options EVBARM_BOARDTYPE=openblocks_ax3 + +# CPU options +options CPU_PJ4B +options L2CACHE_ENABLE +#options AURORA_IO_CACHE_COHERENCY +options AURORA_L2_PT_WALK +options ARM_HAS_VBAR +makeoptions CPUFLAGS=-march=armv7-a -msoft-float + +# Architecture options +options ARMADAXP + +options PIC_MAXSOURCES=128 + +# 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 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 PTYFS # /dev/pts/N support +#file-system PUFFS # Pass-to-Userspace Framework File System +#file-system UMAPFS # NULLFS + uid and gid remapping +file-system UNION # union file system +file-system TMPFS # Efficient memory file-system + +# 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_DEBUG # debug for IP security +options MROUTING # IP multicast routing +options PIM # Protocol Independent Multicast +options NETATALK # AppleTalk networking protocols +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 IPFILTER_LOG # ipmon(8) log support +options IPFILTER_LOOKUP # ippool(8) support +options IPFILTER_COMPAT # Compat for IP-Filter +options IPFILTER_DEFAULT_BLOCK # block all packets by default +#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_RWSIZE=1024 + +# 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_60 # NetBSD 6.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 + +# Device options + +#options MEMORY_DISK_HOOKS # boottime setup of ramdisk +#options MEMORY_DISK_IS_ROOT # use memory disk as root +#options
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: kiyohara Date: Mon Sep 30 13:38:16 UTC 2013 Modified Files: src/sys/arch/evbarm/conf: README.evbarm Log Message: Add Plat'Home OpenBlocks AX3. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/README.evbarm 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/README.evbarm diff -u src/sys/arch/evbarm/conf/README.evbarm:1.6 src/sys/arch/evbarm/conf/README.evbarm:1.7 --- src/sys/arch/evbarm/conf/README.evbarm:1.6 Sat Dec 29 14:35:01 2012 +++ src/sys/arch/evbarm/conf/README.evbarm Mon Sep 30 13:38:16 2013 @@ -1,4 +1,4 @@ -$NetBSD: README.evbarm,v 1.6 2012/12/29 14:35:01 kiyohara Exp $ +$NetBSD: README.evbarm,v 1.7 2013/09/30 13:38:16 kiyohara Exp $ config date boards --- @@ -36,6 +36,7 @@ NAPPI 2002/07/15 Netwise APlication Pla NETWALKER 2010/11/13 Sharp NetWalker NSLU2 2006/02/28 Linksys NSLU2 (a.k.a. Slug) OPENBLOCKS_A6 2012/08/01 Plat'Home. OpenBlockS A6 +OPENBLOCKS_AX3 2013/09/30 Plat'Home. OpenBlockS AX3 OPENRD 2012/08/10 open-rd.org Marvell Orion board OSK5912 2007/01/06 TI OMAP 5912 OSK board OVERO 2010/07/10 Gumstix Inc. Overo COMS boards
CVS commit: src/sys
Module Name:src Committed By: hannken Date: Mon Sep 30 15:24:14 UTC 2013 Modified Files: src/sys/kern: vfs_vnode.c src/sys/sys: vnode.h Log Message: Remove VI_INACTPEND. Last consumer was vcount() which got removed 2010-01-08. Reviewed by: David Holland dholl...@netbsd.org To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/kern/vfs_vnode.c cvs rdiff -u -r1.237 -r1.238 src/sys/sys/vnode.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_vnode.c diff -u src/sys/kern/vfs_vnode.c:1.20 src/sys/kern/vfs_vnode.c:1.21 --- src/sys/kern/vfs_vnode.c:1.20 Sat Sep 21 19:51:33 2013 +++ src/sys/kern/vfs_vnode.c Mon Sep 30 15:24:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_vnode.c,v 1.20 2013/09/21 19:51:33 dholland Exp $ */ +/* $NetBSD: vfs_vnode.c,v 1.21 2013/09/30 15:24:14 hannken Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -126,7 +126,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_vnode.c,v 1.20 2013/09/21 19:51:33 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_vnode.c,v 1.21 2013/09/30 15:24:14 hannken Exp $); #include sys/param.h #include sys/kernel.h @@ -744,9 +744,7 @@ retry: * clean it here. We donate it our last reference. */ KASSERT(mutex_owned(vp-v_interlock)); - KASSERT((vp-v_iflag VI_INACTPEND) == 0); vp-v_iflag = ~VI_INACTNOW; - vp-v_iflag |= VI_INACTPEND; mutex_enter(vrele_lock); TAILQ_INSERT_TAIL(vrele_list, vp, v_freelist); if (++vrele_pending (desiredvnodes 8)) @@ -894,8 +892,6 @@ vrele_thread(void *cookie) * and look for more work. */ mutex_enter(vp-v_interlock); - KASSERT((vp-v_iflag VI_INACTPEND) != 0); - vp-v_iflag = ~VI_INACTPEND; vrelel(vp, 0); } } Index: src/sys/sys/vnode.h diff -u src/sys/sys/vnode.h:1.237 src/sys/sys/vnode.h:1.238 --- src/sys/sys/vnode.h:1.237 Sun Nov 18 18:39:24 2012 +++ src/sys/sys/vnode.h Mon Sep 30 15:24:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vnode.h,v 1.237 2012/11/18 18:39:24 pooka Exp $ */ +/* $NetBSD: vnode.h,v 1.238 2013/09/30 15:24:14 hannken Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -122,7 +122,7 @@ TAILQ_HEAD(vnodelst, vnode); * lock. Field markings and the corresponding locks: * * : stable, reference to the vnode is required - * f vnode_free_list_lock, or vrele_lock if VI_INACTPEND + * f vnode_free_list_lock, or vrele_lock for vrele_list * i v_interlock * m mntvnode_lock * n namecache_lock @@ -205,7 +205,6 @@ typedef struct vnode vnode_t; #define VI_LAYER 0x0002 /* vnode is on a layer filesystem */ #define VI_LOCKSHARE 0x0004 /* v_interlock is shared */ #define VI_CLEAN 0x0008 /* has been reclaimed */ -#define VI_INACTPEND 0x0010 /* inactivation is pending */ #define VI_INACTREDO 0x0020 /* need to redo VOP_INACTIVE() */ #define VI_INACTNOW 0x0080 /* VOP_INACTIVE() in progress */ @@ -217,7 +216,7 @@ typedef struct vnode vnode_t; #define VNODE_FLAGBITS \ \20\1ROOT\2SYSTEM\3ISTTY\4MAPPED\5MPSAFE\6LOCKSWORK\11TEXT\12EXECMAP \ \13WRMAP\14WRMAPDIRTY\15XLOCK\17ONWORKLST\20MARKER \ -\22LAYER\24CLEAN\25INACTPEND\26INACTREDO \ +\22LAYER\24CLEAN\26INACTREDO \ \30INACTNOW\31DIROP #define VSIZENOTSET ((voff_t)-1)
CVS commit: src/external/gpl3/binutils/dist/gas
Module Name:src Committed By: skrll Date: Mon Sep 30 16:16:31 UTC 2013 Modified Files: src/external/gpl3/binutils/dist/gas: configure.tgt Added Files: src/external/gpl3/binutils/dist/gas/config: te-armnbsd.h Log Message: Even though the world is moving to earm provide a CPU_DEFAULT for arm targets. This stops the Warning: swp{b} use is obsoleted for ARMv8 and later messages and probably others. Discussed with matt@ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/binutils/dist/gas/configure.tgt cvs rdiff -u -r0 -r1.1 \ src/external/gpl3/binutils/dist/gas/config/te-armnbsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/dist/gas/configure.tgt diff -u src/external/gpl3/binutils/dist/gas/configure.tgt:1.5 src/external/gpl3/binutils/dist/gas/configure.tgt:1.6 --- src/external/gpl3/binutils/dist/gas/configure.tgt:1.5 Sun Sep 29 14:03:30 2013 +++ src/external/gpl3/binutils/dist/gas/configure.tgt Mon Sep 30 16:16:31 2013 @@ -126,8 +126,8 @@ case ${generic_target} in arm-*-uclinux*eabi*) fmt=elf em=armlinuxeabi ;; arm-*-uclinux*) fmt=elf em=linux ;; arm-*-nacl*)fmt=elf em=nacl ;; - arm-*-netbsdelf*) fmt=elf em=nbsd ;; - arm-*-*n*bsd*) fmt=aout em=nbsd ;; + arm-*-netbsdelf*) fmt=elf em=armnbsd ;; + arm-*-*n*bsd*) fmt=aout em=armnbsd ;; arm-*-nto*)fmt=elf ;; arm-epoc-pe)fmt=coff em=epoc-pe ;; arm-wince-pe | arm-*-wince | arm*-*-mingw32ce* | arm*-*-cegcc*) Added files: Index: src/external/gpl3/binutils/dist/gas/config/te-armnbsd.h diff -u /dev/null src/external/gpl3/binutils/dist/gas/config/te-armnbsd.h:1.1 --- /dev/null Mon Sep 30 16:16:31 2013 +++ src/external/gpl3/binutils/dist/gas/config/te-armnbsd.h Mon Sep 30 16:16:31 2013 @@ -0,0 +1,22 @@ +/* Copyright 2004, 2005, 2007, 2009 Free Software Foundation, Inc. + + This file is part of GAS, the GNU Assembler. + + GAS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3, + or (at your option) any later version. + + GAS is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See + the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include te-nbsd.h + +#define CPU_DEFAULT ARM_ARCH_V3
CVS commit: src/sys
Module Name:src Committed By: hannken Date: Mon Sep 30 18:58:00 UTC 2013 Modified Files: src/sys/fs/adosfs: advfsops.c src/sys/fs/cd9660: cd9660_vfsops.c src/sys/fs/filecorefs: filecore_vfsops.c src/sys/fs/msdosfs: msdosfs_vfsops.c src/sys/fs/nilfs: nilfs_vfsops.c src/sys/fs/ntfs: ntfs_vfsops.c src/sys/fs/udf: udf_vfsops.c src/sys/kern: vfs_bio.c vfs_mount.c vfs_subr.c vfs_trans.c src/sys/miscfs/specfs: spec_vnops.c specdev.h src/sys/sys: param.h wapbl.h src/sys/ufs/chfs: chfs_vfsops.c src/sys/ufs/ext2fs: ext2fs_vfsops.c src/sys/ufs/ffs: ffs_alloc.c ffs_snapshot.c ffs_vfsops.c src/sys/ufs/lfs: lfs_vfsops.c Log Message: Replace macro v_specmountpoint with two functions spec_node_getmountedfs() and spec_node_setmountedfs() to manage the file system mounted on a device. Assert the device is a block device. Welcome to 6.99.24 Discussed on tech-kern@ some time ago. Reviewed by: David Holland dholl...@netbsd.org To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/fs/adosfs/advfsops.c cvs rdiff -u -r1.78 -r1.79 src/sys/fs/cd9660/cd9660_vfsops.c cvs rdiff -u -r1.70 -r1.71 src/sys/fs/filecorefs/filecore_vfsops.c cvs rdiff -u -r1.101 -r1.102 src/sys/fs/msdosfs/msdosfs_vfsops.c cvs rdiff -u -r1.10 -r1.11 src/sys/fs/nilfs/nilfs_vfsops.c cvs rdiff -u -r1.87 -r1.88 src/sys/fs/ntfs/ntfs_vfsops.c cvs rdiff -u -r1.63 -r1.64 src/sys/fs/udf/udf_vfsops.c cvs rdiff -u -r1.246 -r1.247 src/sys/kern/vfs_bio.c cvs rdiff -u -r1.20 -r1.21 src/sys/kern/vfs_mount.c cvs rdiff -u -r1.437 -r1.438 src/sys/kern/vfs_subr.c cvs rdiff -u -r1.26 -r1.27 src/sys/kern/vfs_trans.c cvs rdiff -u -r1.140 -r1.141 src/sys/miscfs/specfs/spec_vnops.c cvs rdiff -u -r1.41 -r1.42 src/sys/miscfs/specfs/specdev.h cvs rdiff -u -r1.432 -r1.433 src/sys/sys/param.h cvs rdiff -u -r1.14 -r1.15 src/sys/sys/wapbl.h cvs rdiff -u -r1.7 -r1.8 src/sys/ufs/chfs/chfs_vfsops.c cvs rdiff -u -r1.172 -r1.173 src/sys/ufs/ext2fs/ext2fs_vfsops.c cvs rdiff -u -r1.139 -r1.140 src/sys/ufs/ffs/ffs_alloc.c cvs rdiff -u -r1.128 -r1.129 src/sys/ufs/ffs/ffs_snapshot.c cvs rdiff -u -r1.288 -r1.289 src/sys/ufs/ffs/ffs_vfsops.c cvs rdiff -u -r1.313 -r1.314 src/sys/ufs/lfs/lfs_vfsops.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/fs/adosfs/advfsops.c diff -u src/sys/fs/adosfs/advfsops.c:1.66 src/sys/fs/adosfs/advfsops.c:1.67 --- src/sys/fs/adosfs/advfsops.c:1.66 Thu Dec 20 08:03:41 2012 +++ src/sys/fs/adosfs/advfsops.c Mon Sep 30 18:57:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: advfsops.c,v 1.66 2012/12/20 08:03:41 hannken Exp $ */ +/* $NetBSD: advfsops.c,v 1.67 2013/09/30 18:57:59 hannken Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: advfsops.c,v 1.66 2012/12/20 08:03:41 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: advfsops.c,v 1.67 2013/09/30 18:57:59 hannken Exp $); #if defined(_KERNEL_OPT) #include opt_compat_netbsd.h @@ -319,7 +319,7 @@ adosfs_unmount(struct mount *mp, int mnt return (error); amp = VFSTOADOSFS(mp); if (amp-devvp-v_type != VBAD) - amp-devvp-v_specmountpoint = NULL; + spec_node_setmountedfs(amp-devvp, NULL); vn_lock(amp-devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_CLOSE(amp-devvp, FREAD, NOCRED); vput(amp-devvp); Index: src/sys/fs/cd9660/cd9660_vfsops.c diff -u src/sys/fs/cd9660/cd9660_vfsops.c:1.78 src/sys/fs/cd9660/cd9660_vfsops.c:1.79 --- src/sys/fs/cd9660/cd9660_vfsops.c:1.78 Sun Jun 23 07:28:36 2013 +++ src/sys/fs/cd9660/cd9660_vfsops.c Mon Sep 30 18:57:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_vfsops.c,v 1.78 2013/06/23 07:28:36 dholland Exp $ */ +/* $NetBSD: cd9660_vfsops.c,v 1.79 2013/09/30 18:57:59 hannken Exp $ */ /*- * Copyright (c) 1994 @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cd9660_vfsops.c,v 1.78 2013/06/23 07:28:36 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: cd9660_vfsops.c,v 1.79 2013/09/30 18:57:59 hannken Exp $); #if defined(_KERNEL_OPT) #include opt_compat_netbsd.h @@ -523,7 +523,7 @@ iso_mountfs(struct vnode *devvp, struct supbp = NULL; } - devvp-v_specmountpoint = mp; + spec_node_setmountedfs(devvp, mp); return 0; out: @@ -568,7 +568,7 @@ cd9660_unmount(struct mount *mp, int mnt isomp = VFSTOISOFS(mp); if (isomp-im_devvp-v_type != VBAD) - isomp-im_devvp-v_specmountpoint = NULL; + spec_node_setmountedfs(isomp-im_devvp, NULL); vn_lock(isomp-im_devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_CLOSE(isomp-im_devvp, FREAD, NOCRED); Index: src/sys/fs/filecorefs/filecore_vfsops.c diff -u src/sys/fs/filecorefs/filecore_vfsops.c:1.70 src/sys/fs/filecorefs/filecore_vfsops.c:1.71 --- src/sys/fs/filecorefs/filecore_vfsops.c:1.70 Thu Dec 20 08:03:42 2012 +++ src/sys/fs/filecorefs/filecore_vfsops.c Mon Sep 30 18:57:59 2013 @@ -1,4 +1,4 @@ -/*
CVS commit: src/lib/libc/quad
Module Name:src Committed By: mlelstv Date: Mon Sep 30 19:32:14 UTC 2013 Modified Files: src/lib/libc/quad: floatundidf_ieee754.c Log Message: Don't return 0x1.0p31 for every input value 2^N. There is also no need to special case the value 1. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/quad/floatundidf_ieee754.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/quad/floatundidf_ieee754.c diff -u src/lib/libc/quad/floatundidf_ieee754.c:1.1 src/lib/libc/quad/floatundidf_ieee754.c:1.2 --- src/lib/libc/quad/floatundidf_ieee754.c:1.1 Sat Aug 24 00:51:48 2013 +++ src/lib/libc/quad/floatundidf_ieee754.c Mon Sep 30 19:32:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: floatundidf_ieee754.c,v 1.1 2013/08/24 00:51:48 matt Exp $ */ +/* $NetBSD: floatundidf_ieee754.c,v 1.2 2013/09/30 19:32:14 mlelstv Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: floatundidf_ieee754.c,v 1.1 2013/08/24 00:51:48 matt Exp $); +__RCSID($NetBSD: floatundidf_ieee754.c,v 1.2 2013/09/30 19:32:14 mlelstv Exp $); #endif /* LIBC_SCCS and not lint */ #if defined(SOFTFLOAT) || defined(__ARM_EABI__) @@ -52,13 +52,9 @@ __floatundidf(u_quad_t x) if (x == 0) return 0.0; - if (x == 1) - return 1.0; u_int l = __builtin_clzll(x); x = (l + 1); /* clear implicit bit */ - if (x == 0) - return 0x1.0p31; x = 64 - (DBL_FRACHBITS + DBL_FRACLBITS); union uu u = { .uq = x }; ux.dblu_frach = u.ul[H];