CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: martin Date: Tue Feb 25 08:39:39 UTC 2014 Modified Files: src/sys/arch/arm/imx: imx23_icoll.c Log Message: Add missing include of arm/cpufunc.h. Pointed out by Tero Koskinen. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/imx23_icoll.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/imx/imx23_icoll.c diff -u src/sys/arch/arm/imx/imx23_icoll.c:1.2 src/sys/arch/arm/imx/imx23_icoll.c:1.3 --- src/sys/arch/arm/imx/imx23_icoll.c:1.2 Sun Dec 16 19:40:00 2012 +++ src/sys/arch/arm/imx/imx23_icoll.c Tue Feb 25 08:39:39 2014 @@ -1,4 +1,4 @@ -/* $Id: imx23_icoll.c,v 1.2 2012/12/16 19:40:00 jkunz Exp $ */ +/* $Id: imx23_icoll.c,v 1.3 2014/02/25 08:39:39 martin Exp $ */ /* * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -36,6 +36,8 @@ #include sys/errno.h #include sys/systm.h +#include arm/cpufunc.h + #define _INTR_PRIVATE #include arm/pic/picvar.h
CVS commit: othersrc/external/bsd/transit
Module Name:othersrc Committed By: agc Date: Tue Feb 25 08:54:43 UTC 2014 Modified Files: othersrc/external/bsd/transit/bin: Makefile othersrc/external/bsd/transit/dist: main.c transit.c Added Files: othersrc/external/bsd/transit/bin: 13.expected 14.expected 15.expected Log Message: Add the ability to convert back to JSON in transit(1) - so, if desired, JSON could be transported safely via the transit protocol. Small fix for dictionary parsing. Add more tests. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/transit/bin/13.expected \ othersrc/external/bsd/transit/bin/14.expected \ othersrc/external/bsd/transit/bin/15.expected cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/transit/bin/Makefile cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/transit/dist/main.c \ othersrc/external/bsd/transit/dist/transit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/transit/bin/Makefile diff -u othersrc/external/bsd/transit/bin/Makefile:1.2 othersrc/external/bsd/transit/bin/Makefile:1.3 --- othersrc/external/bsd/transit/bin/Makefile:1.2 Mon Feb 24 21:05:18 2014 +++ othersrc/external/bsd/transit/bin/Makefile Tue Feb 25 08:54:43 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2014/02/24 21:05:18 agc Exp $ +# $NetBSD: Makefile,v 1.3 2014/02/25 08:54:43 agc Exp $ .include bsd.own.mk @@ -78,13 +78,18 @@ t: ${PROG} env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -d 12.enc 12.out diff 12.expected 12.out rm -f 12.enc 12.out - @echo 12. json structured data - env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -j '{field1:[potatoes,tomatoes,anykindoftoes,[1,2,3,4,sublist,{field1.1:11,field1.2:twotwo}]],field2:[quayle,bush,shrub,reagan,[3,nothing],[4,4,4,4,4,5,6]]}' 12.enc - env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -d 12.enc 12.out - diff 12.expected 12.out - rm -f 12.enc 12.out @echo 13. json structured data - env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -j '{field1:[potatoes\\,tomatoes,anykindoftoes,[1,2,3,4,sublist,{field1.1:11,field1.2:twotwo}]],field2:[quayle,bush,shrub,reagan,[3,nothing],[4,4,4,4,4,5,6]]}' 13.enc + env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -j '{field1:[potatoes,tomatoes,anykindoftoes,[1,2,3,4,sublist,{field1.1:11,field1.2:twotwo}]],field2:[quayle,bush,shrub,reagan,[3,nothing],[4,4,4,4,4,5,6]]}' 13.enc env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -d 13.enc 13.out diff 13.expected 13.out rm -f 13.enc 13.out + @echo 14. json structured data + env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -j '{field1:[potatoes\\,tomatoes,anykindoftoes,[1,2,3,4,sublist,{field1.1:11,field1.2:twotwo}]],field2:[quayle,bush,shrub,reagan,[3,nothing],[4,4,4,4,4,5,6]]}' 14.enc + env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -d 14.enc 14.out + diff 14.expected 14.out + rm -f 14.enc 14.out + @echo 15. json structured data as output + env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -j '{field1:[potatoes\\,tomatoes,anykindoftoes,[1,2,3,4,sublist,{field1.1:11,field1.2:twotwo}]],field2:[quayle,bush,shrub,reagan,[3,nothing],[4,4,4,4,4,5,6]]}' 15.enc + env LD_LIBRARY_PATH=${LIB_TRANSIT_DIR} ./${PROG} -d -j 15.enc 15.out + diff 15.expected 15.out + rm -f 15.enc 15.out Index: othersrc/external/bsd/transit/dist/main.c diff -u othersrc/external/bsd/transit/dist/main.c:1.2 othersrc/external/bsd/transit/dist/main.c:1.3 --- othersrc/external/bsd/transit/dist/main.c:1.2 Mon Feb 24 21:05:18 2014 +++ othersrc/external/bsd/transit/dist/main.c Tue Feb 25 08:54:43 2014 @@ -172,6 +172,55 @@ walk(transit_t *t, FILE *fp, int recursi return 1; } +static int +output_json(transit_t *t, uint64_t a, FILE *fp) +{ + transit_atom_t *atom; + uint64_t *v; + unsigned i; + + atom = transit_atom(t, a); + switch(transit_atom_type(atom)) { + case TRANSIT_NUMBER: + fprintf(fp, % PRIu64, transit_atom_size(atom)); + return 1; + case TRANSIT_STRING: + fputc('', fp); + fwrite(transit_atom_ptr(atom), 1, transit_atom_size(atom), fp); + fputc('', fp); + return 1; + case TRANSIT_LIST: + fprintf(fp, [); + v = transit_atom_ptr(atom); + for (i = 0 ; i transit_atom_size(atom) ; i++) { + output_json(t, v[i], fp); + if (i transit_atom_size(atom) - 2) { +fprintf(fp, ,); + } + } + fprintf(fp, ]); + return 1; + case TRANSIT_DICT: + fprintf(fp, {); + v = transit_atom_ptr(atom); + for (i = 0 ; i transit_atom_size(atom) - 1 ; i += 2) { + output_json(t, v[i], fp); + fprintf(fp, :); + output_json(t, v[i + 1], fp); + if (i transit_atom_size(atom) - 3) { +fprintf(fp, ,); + } + } + fprintf(fp, }); + return 1; + case TRANSIT_END: + return 1; + default: + fprintf(stderr, unrecognised atom: %d\n, transit_atom_type(atom)); + return t-c; + } +} + int main(int argc, char **argv) @@ -208,19 +257,23 @@ main(int argc, char **argv) } } if (decoding) { + in = NULL; if (optind == argc) {
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Tue Feb 25 08:54:57 UTC 2014 Modified Files: src/sys/arch/arm/include: cpuconf.h Log Message: Default ARM11 to ARM_MMU_V6N To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/include/cpuconf.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/include/cpuconf.h diff -u src/sys/arch/arm/include/cpuconf.h:1.21 src/sys/arch/arm/include/cpuconf.h:1.22 --- src/sys/arch/arm/include/cpuconf.h:1.21 Sun May 19 15:51:10 2013 +++ src/sys/arch/arm/include/cpuconf.h Tue Feb 25 08:54:57 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuconf.h,v 1.21 2013/05/19 15:51:10 rkujawa Exp $ */ +/* $NetBSD: cpuconf.h,v 1.22 2014/02/25 08:54:57 matt Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -213,19 +213,14 @@ #endif #if !defined(_KERNEL_OPT) || \ - defined(CPU_ARM11MPCORE) defined(ARM11MPCORE_COMPAT_MMU) || \ - defined(CPU_ARM1136) || \ - defined(CPU_ARM1176) || \ - defined(CPU_ARM11) \ - !defined(CPU_CORTEX) \ - !defined(CPU_ARM11MPCORE) !defined(CPU_PJ4B) + defined(CPU_ARM11) defined(ARM11_COMPAT_MMU) #define ARM_MMU_V6C 1 #else #define ARM_MMU_V6C 0 #endif #if !defined(_KERNEL_OPT) || \ - defined(CPU_ARM11MPCORE) !defined(ARM11MPCORE_COMPAT_MMU) + defined(CPU_ARM11) !defined(ARM11_COMPAT_MMU) #define ARM_MMU_V6N 1 #else #define ARM_MMU_V6N 0 @@ -241,6 +236,19 @@ #define ARM_MMU_V7 0 #endif +/* + * Can we use the ASID support in armv6+ MMUs? + */ +#if !defined(_LOCORE) 0 +#define ARM_MMU_EXTENDED ((ARM_MMU_MEMC + ARM_MMU_GENERIC \ + + ARM_MMU_SA1 + ARM_MMU_XSCALE \ + + ARM_MMU_V6C) == 0 \ + (ARM_MMU_V6N + ARM_MMU_V7) 0) +#if ARM_MMU_EXTENDED == 0 +#undef ARM_MMU_EXTENDED +#endif +#endif + #define ARM_NMMUS (ARM_MMU_MEMC + ARM_MMU_GENERIC + \ ARM_MMU_SA1 + ARM_MMU_XSCALE + \ ARM_MMU_V6N + ARM_MMU_V6C + ARM_MMU_V7)
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Tue Feb 25 09:54:33 UTC 2014 Modified Files: src/sys/arch/arm/arm32: fault.c Log Message: ARMv6+ supplied a write bit in the FSR so use instead of reading the instruction. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/arch/arm/arm32/fault.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/arm32/fault.c diff -u src/sys/arch/arm/arm32/fault.c:1.93 src/sys/arch/arm/arm32/fault.c:1.94 --- src/sys/arch/arm/arm32/fault.c:1.93 Wed Jan 29 18:45:21 2014 +++ src/sys/arch/arm/arm32/fault.c Tue Feb 25 09:54:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fault.c,v 1.93 2014/01/29 18:45:21 matt Exp $ */ +/* $NetBSD: fault.c,v 1.94 2014/02/25 09:54:33 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ #include opt_kgdb.h #include sys/types.h -__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.93 2014/01/29 18:45:21 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.94 2014/02/25 09:54:33 matt Exp $); #include sys/param.h #include sys/systm.h @@ -258,8 +258,10 @@ data_abort_handler(trapframe_t *tf) /* Get the current lwp structure */ - UVMHIST_LOG(maphist, (pc=0x%x, l=0x%x, far=0x%x, fsr=0x%x), - tf-tf_pc, l, far, fsr); + UVMHIST_LOG(maphist, (l=%#x, far=%#x, fsr=%#x, + l, far, fsr, 0); + UVMHIST_LOG(maphist, tf=%#x, pc=%#x), + tf, tf-tf_pc, 0, 0); /* Data abort came from user mode? */ bool user = (TRAP_USERMODE(tf) != 0); @@ -400,20 +402,21 @@ data_abort_handler(trapframe_t *tf) } /* - * We need to know whether the page should be mapped - * as R or R/W. The MMU does not give us the info as - * to whether the fault was caused by a read or a write. + * We need to know whether the page should be mapped as R or R/W. + * Before ARMv6, the MMU did not give us the info as to whether the + * fault was caused by a read or a write. * - * However, we know that a permission fault can only be - * the result of a write to a read-only location, so - * we can deal with those quickly. + * However, we know that a permission fault can only be the result of + * a write to a read-only location, so we can deal with those quickly. * - * Otherwise we need to disassemble the instruction - * responsible to determine if it was a write. + * Otherwise we need to disassemble the instruction responsible to + * determine if it was a write. */ - if (IS_PERMISSION_FAULT(fsr)) + if (CPU_IS_ARMV6_P() || CPU_IS_ARMV7_P()) { + ftype = (fsr FAULT_WRITE) ? VM_PROT_WRITE : VM_PROT_READ; + } else if (IS_PERMISSION_FAULT(fsr)) { ftype = VM_PROT_WRITE; - else { + } else { #ifdef THUMB_CODE /* Fast track the ARM case. */ if (__predict_false(tf-tf_spsr PSR_T_bit)) {
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: martin Date: Tue Feb 25 12:13:19 UTC 2014 Modified Files: src/lib/libc/stdlib: jemalloc.c Log Message: Powerpc seems to expect minimum 8 byte alignment from malloc as well. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/lib/libc/stdlib/jemalloc.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/stdlib/jemalloc.c diff -u src/lib/libc/stdlib/jemalloc.c:1.31 src/lib/libc/stdlib/jemalloc.c:1.32 --- src/lib/libc/stdlib/jemalloc.c:1.31 Mon Feb 17 08:50:50 2014 +++ src/lib/libc/stdlib/jemalloc.c Tue Feb 25 12:13:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: jemalloc.c,v 1.31 2014/02/17 08:50:50 martin Exp $ */ +/* $NetBSD: jemalloc.c,v 1.32 2014/02/25 12:13:19 martin Exp $ */ /*- * Copyright (C) 2006,2007 Jason Evans jas...@freebsd.org. @@ -118,7 +118,7 @@ #include sys/cdefs.h /* __FBSDID($FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $); */ -__RCSID($NetBSD: jemalloc.c,v 1.31 2014/02/17 08:50:50 martin Exp $); +__RCSID($NetBSD: jemalloc.c,v 1.32 2014/02/25 12:13:19 martin Exp $); #ifdef __FreeBSD__ #include libc_private.h @@ -263,6 +263,7 @@ __strerror_r(int e, char *s, size_t l) # define QUANTUM_2POW_MIN 4 # define SIZEOF_PTR_2POW 2 # define USE_BRK +# define TINY_MIN_2POW 3 #endif #if defined(__sparc__) !defined(__sparc64__) # define QUANTUM_2POW_MIN 4
CVS commit: src/external/mit/xorg/lib/xkeyboard-config/rules
Module Name:src Committed By: tsutsui Date: Tue Feb 25 13:07:29 UTC 2014 Modified Files: src/external/mit/xorg/lib/xkeyboard-config/rules: base base.lst evdev evdev.lst Log Message: Update generated files which were missed on xkeyboard-config 2.9 import. http://mail-index.NetBSD.org/source-changes/2013/05/31/msg044255.html http://mail-index.NetBSD.org/source-changes/2013/05/31/msg044256.html http://mail-index.NetBSD.org/source-changes/2013/05/31/msg044258.html XXX: should be regenerated during build but no perl and intltools in tools To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/mit/xorg/lib/xkeyboard-config/rules/base \ src/external/mit/xorg/lib/xkeyboard-config/rules/base.lst \ src/external/mit/xorg/lib/xkeyboard-config/rules/evdev \ src/external/mit/xorg/lib/xkeyboard-config/rules/evdev.lst Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/xkeyboard-config/rules/base diff -u src/external/mit/xorg/lib/xkeyboard-config/rules/base:1.5 src/external/mit/xorg/lib/xkeyboard-config/rules/base:1.6 --- src/external/mit/xorg/lib/xkeyboard-config/rules/base:1.5 Mon Sep 26 15:19:45 2011 +++ src/external/mit/xorg/lib/xkeyboard-config/rules/base Tue Feb 25 13:07:29 2014 @@ -106,10 +106,22 @@ ! $thinkpads = thinkpad thinkpad60 thinkpadz60 -! $sun_t6_custom = ara be br ca ch cz de dk \ - ee es fi fr gb gr it kr \ - lt lv nl no pl pt ro ru \ - se sk tr tw ua +! $sun = sun_type6_jp sun_type6_usb sun_type6_euro_usb \ + sun_type6_jp_usb sun_type6_unix_usb sun_type7_jp_usb \ + sun_type7_usb sun_type7_euro_usb sun_type7_unix_usb + +! $sun_jp = sun_type6_jp sun_type6_jp_usb sun_type7_jp_usb + +// Sun Type_6_7 keyboards with custom layouts +! $sun_custom = ara be br ca ch cz de dk \ +ee es fi fr gb gr it jp \ +kr lt lv nl no pl pt ro \ +ru se sk tr tw ua us + +! $sun_var = sun_type6 sun_type6_suncompat sun_type6_de sun_type6_fr \ + sun_type7 sun_type7_suncompat suncompat + +! $sun_compat = sun_type6 sun_type6_suncompat sun_type7_suncompat suncompat ! $htcdreamlayouts = us it de @@ -119,10 +131,8 @@ amiga = amiga(de) ataritt = ataritt(de) empty = empty - sun4 = sun(type4_euro) - sun5 = sun(type5_euro) - sun6 = sun(type6_usb) - sun6euro = sun(type6tuv_usb) + $sun_jp = sun(type6_jp_usb) + $sun = sun(type6_usb) pc98 = xfree98(pc98) $applealu = macintosh(alukbd) macintosh_hhk = macintosh(hhk) @@ -173,6 +183,15 @@ hhk = hhk(basic) kinesis = kinesis(model100) $nokiamodels = nokia(%m) + sun_type6_jp = sun(type6jp) + sun_type6_usb = sun(type6) + sun_type6_euro_usb= sun(type6tuv) + sun_type6_jp_usb = sun(type6jp) + sun_type6_unix_usb= sun(type6unix) + sun_type7_jp_usb = sun(type6jp) + sun_type7_usb = sun(type7) + sun_type7_euro_usb= sun(type7tuv) + sun_type7_unix_usb= sun(type7unix) * = pc(pc104) ! model layout variant = symbols @@ -229,6 +248,7 @@ classmate us alt-intl = pc+us(classmate-alt-intl) classmate us altgr-intl = pc+us(classmate-altgr-intl) nokiarx51 cz qwerty = nokia_vndr/rx-51(cz_qwerty) + * $sun_custom $sun_var = pc+sun_vndr/%l%(v) ! model layout= symbols * ar = pc+ara @@ -247,7 +267,6 @@ * lo = pc+la * kan = pc+in(kan) * mi = pc+mao - * ml = pc+in(mal) * ogham = pc+ie(ogam) * ori = pc+ie(ori) * sapmi = pc+no(smi) @@ -314,18 +333,7 @@ classmate us = pc+%l(classmate) empty * = empty(basic) * empty = empty(basic) - sun4 $nonlatin = latin+sun_vndr/us(type4)+%l%(v):2 - sun4 * = latin+sun_vndr/us(type4)+%l%(v) - sun5 $nonlatin = latin+sun_vndr/us(type5)+%l%(v):2 - sun5 * = latin+sun_vndr/us(type5)+%l%(v) - sun6 us = pc+sun_vndr/us(type6) - sun6 en_US = pc+sun_vndr/us(type6)+iso9995-3(basic) - sun6 $sun_t6_custom = pc+sun_vndr/us(type6)+sun_vndr/%l%(v) - sun6 * = pc+sun_vndr/us(type6)+%l%(v) - sun6euro us = pc+sun_vndr/us(type6) - sun6euro en_US = pc+sun_vndr/us(type6)+iso9995-3(basic) - sun6euro $sun_t6_custom = pc+sun_vndr/us(type6)+sun_vndr/%l%(v) - sun6euro * = pc+sun_vndr/us(type6)+%l%(v) + $sun $sun_custom = pc+sun_vndr/%l%(v) pc98 nec_vndr/jp = nec_vndr/jp(pc98) macintosh_old us = macintosh_vndr/us(oldmac) macintosh_old en_US = macintosh_vndr/us(oldmac) @@ -344,6 +352,8 @@ nokiasu8w * = nokia_vndr/su-8w(%l) olpc $olpclayouts = olpc+%l%(m) olpc * = olpc+%l%(v) + olpcm $olpclayouts = olpc+%l%(m) + olpcm * = olpc+%l%(v) $thinkpads br = pc+br(thinkpad) sl-c3x00 * = pc+sharp_vndr/sl-c3x00(basic) ws003sh *
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Tue Feb 25 13:14:31 UTC 2014 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv15469 Log Message: Import dhcpcd-6.3.0 with the following changes: * IAID must be inside an interface block. * Detect IPv6 address flags on Linux. * Check that we have ctrl_interface defined in wpa_supplicant.conf and pass this parameter to wpa_cli(8). If not set, warn about not interacting with wpa_supplicant(8). * Skip Virtual Interface Masters. Currently this only applies to FreeBSD VAP masters as dhcpcd should only work on wlandev created clones. * Fix handling of ARP failures, thanks to Sebastian Huber. * Implement RFC 1321 MD5 Message-Digest if not provided in libc. * Implement RFC 2104 HMAC Keyed Hashing. * Implement RFC 3118 Authentication for DHCP Messages and RFC 3315 Authentication options. * Add nodhcp and nodhcp6 directives. Thanks to Sebastian Huber for the initial patch and testing. * Implement support for RFC 3203, FORCERENEW message. * Implement Force Renew Nonce Capability option, RFC6704 * Support RECONFIGURE DHCPv6 messages. * Add support for DHCP auto configuration, RFC 2563. * Add support for the following RFCs + DHCP SLP Directory Agent, RFC2610 + DHCP Name Service Search, RFC2937 + DHCP PANA Authentication Agent, RFC5192 + DHCP Lost Server, RFC5223 + DHCP CAPWAP, RFC5417 + DHCP Mobility Services, RFC5678 + DHCP SIP UA, RFC6011 + DHCP ANDSF, RFC6153 + DHCP RDNSS Selection for MIF Nodes, RFC6731 + DHCP TFTP Server Address, RFC5859 + DHCP PXELINUX, RFC5071 + DHCP Access Network Domain Name, RFC5986 + DHCP Virtual Subnet Selection, RFC6607 + DHCP Relay Agent Remote-ID, RFC4649 + DHCP Relay Agent Subscriber-ID, RFC4580 + DHCPv6 Relay-ID, RFC5460 + DHCPv6 LIS Discovery, RFC5986 + DHCPv6 SIP UA, RFC6011 + DHCPv6 Network Boot, RFC5970 + DHCPv6 Home Info Discovery in MIPv6, RFC6610 + DHCPv6 RDNSS Selection for MIF Nodes, RFC6731 + DHCPv6 Kerberos, RFC6784 + DHCPv6 Relay-Triggered Reconfiguration, RFC6977 + DHCPv6 SOL_MAX_RT, RFC7083 * Open UDP sockets for *.*.*.*:bootpc and $ip_address:bootpc to avoid kernel ICMP unreachable messages * Moved global variables into context variables so dhcpcd is entirely thread safe. dhcpcd doens't use threads, but it can now be used in a pure threads (ie no process) environment. * Remove DEBUG_MEMORY guard and always free memory and resources. Remove all atexit(3) and exit(3) calls, instead exiting via the eloop. * Replace get_line with sscanf where applicable. * Remove custom set_cloexec and set_nonblock functions. Instead pass O_CLOEXEC or SOCK_CLOEXEC to open, socket, etc. * Don't use PATH_MAX - we already know the maximum length from the initial directory and IF_NAMESIZE. * Add a USE_SIGNALS define. If we're not using signals then we also create a control socket in the non MASTER case. We then use this to communicate instead of signals. * Fix arping moving to the next test if we find the IP address but do not have a profile for it. Thanks to David McGurty for the analysis. * Respect initial commandline arguments when rebooting via a signal. Status: Vendor Tag: roy Release Tags: dhcpcd-6-3-0 U src/external/bsd/dhcpcd/dist/common.c U src/external/bsd/dhcpcd/dist/control.c U src/external/bsd/dhcpcd/dist/dhcpcd.c U src/external/bsd/dhcpcd/dist/duid.c U src/external/bsd/dhcpcd/dist/eloop.c C src/external/bsd/dhcpcd/dist/if-options.c U src/external/bsd/dhcpcd/dist/if-pref.c C src/external/bsd/dhcpcd/dist/net.c C src/external/bsd/dhcpcd/dist/script.c U src/external/bsd/dhcpcd/dist/dhcp-common.c U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c U src/external/bsd/dhcpcd/dist/bpf.c C src/external/bsd/dhcpcd/dist/if-bsd.c U src/external/bsd/dhcpcd/dist/platform-bsd.c U src/external/bsd/dhcpcd/dist/arp.c C src/external/bsd/dhcpcd/dist/dhcp.c U src/external/bsd/dhcpcd/dist/ipv4.c U src/external/bsd/dhcpcd/dist/ipv4ll.c U src/external/bsd/dhcpcd/dist/ipv6.c C src/external/bsd/dhcpcd/dist/ipv6nd.c U src/external/bsd/dhcpcd/dist/dhcp6.c N src/external/bsd/dhcpcd/dist/auth.c U src/external/bsd/dhcpcd/dist/dhcpcd.conf U src/external/bsd/dhcpcd/dist/dhcpcd-definitions.conf U src/external/bsd/dhcpcd/dist/arp.h U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h.in U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in C src/external/bsd/dhcpcd/dist/dhcpcd.8.in C src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in N src/external/bsd/dhcpcd/dist/auth.h U src/external/bsd/dhcpcd/dist/bpf-filter.h U src/external/bsd/dhcpcd/dist/common.h U src/external/bsd/dhcpcd/dist/config.h U src/external/bsd/dhcpcd/dist/control.h U src/external/bsd/dhcpcd/dist/defs.h U src/external/bsd/dhcpcd/dist/dev.h U src/external/bsd/dhcpcd/dist/dhcp-common.h U src/external/bsd/dhcpcd/dist/dhcp.h U src/external/bsd/dhcpcd/dist/dhcp6.h U
CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd
Module Name:src Committed By: roy Date: Tue Feb 25 13:16:04 UTC 2014 Modified Files: src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile Log Message: Build new auth modules. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.19 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.20 --- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.19 Fri Jan 17 18:36:25 2014 +++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Tue Feb 25 13:16:04 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2014/01/17 18:36:25 roy Exp $ +# $NetBSD: Makefile,v 1.20 2014/02/25 13:16:04 roy Exp $ # PROG= dhcpcd @@ -9,6 +9,9 @@ SRCS+= bpf.c if-bsd.c platform-bsd.c .include bsd.own.mk +SRCS+= auth.c hmac_md5.c +CPPFLAGS+= -DHAVE_MD5_H + CPPFLAGS+= -DINET SRCS+= arp.c dhcp.c ipv4.c ipv4ll.c @@ -20,7 +23,7 @@ SRCS+= ipv6.c ipv6nd.c dhcp6.c DIST= ${NETBSDSRCDIR}/external/bsd/dhcpcd/dist CPPFLAGS+= -I${DIST} -.PATH: ${DIST} ${LIBC_NET} +.PATH: ${DIST} ${DIST}/crypt ${LIBC_NET} SCRIPTS= dhcpcd-run-hooks SCRIPTSDIR_dhcpcd-run-hooks= /libexec
CVS commit: src/doc
Module Name:src Committed By: roy Date: Tue Feb 25 13:22:14 UTC 2014 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-6.3.0 To generate a diff of this commit: cvs rdiff -u -r1.1096 -r1.1097 src/doc/3RDPARTY cvs rdiff -u -r1.1890 -r1.1891 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1096 src/doc/3RDPARTY:1.1097 --- src/doc/3RDPARTY:1.1096 Sat Feb 22 23:32:26 2014 +++ src/doc/3RDPARTY Tue Feb 25 13:22:14 2014 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1096 2014/02/22 23:32:26 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.1097 2014/02/25 13:22:14 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -302,8 +302,8 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 6.2.0 -Current Vers: 6.2.0 +Version: 6.3.0 +Current Vers: 6.3.0 Maintainer: roy Archive Site: ftp://roy.marples.name/pub/dhcpcd/ Home Page: http://roy.marples.name/projects/dhcpcd/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1890 src/doc/CHANGES:1.1891 --- src/doc/CHANGES:1.1890 Wed Feb 19 13:30:45 2014 +++ src/doc/CHANGES Tue Feb 25 13:22:14 2014 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1890 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1891 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -354,3 +354,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0: sqlite3: Import 3.8.3.1 [christos 20140216] luna68k: Make sysinst to create a boot UFS partition and install the native bootloader during installation. [tsutsui 20140219] + dhcpcd(8): Import dhcpcd-6.3.0 [roy 20140225]
CVS commit: src/distrib/sets/lists/modules
Module Name:src Committed By: martin Date: Tue Feb 25 14:05:35 UTC 2014 Modified Files: src/distrib/sets/lists/modules: md.evbppc Log Message: Fix obvious copypasto To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/distrib/sets/lists/modules/md.evbppc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/modules/md.evbppc diff -u src/distrib/sets/lists/modules/md.evbppc:1.41 src/distrib/sets/lists/modules/md.evbppc:1.42 --- src/distrib/sets/lists/modules/md.evbppc:1.41 Wed Jan 1 16:27:10 2014 +++ src/distrib/sets/lists/modules/md.evbppc Tue Feb 25 14:05:35 2014 @@ -1,4 +1,4 @@ -# $NetBSD: md.evbppc,v 1.41 2014/01/01 16:27:10 pgoyette Exp $ +# $NetBSD: md.evbppc,v 1.42 2014/02/25 14:05:35 martin Exp $ ./stand/powerpc-4xx base-kernel-modules kmod,compatmodules ./stand/powerpc-4xx/@OSRELEASE@ base-kernel-modules kmod,compatmodules ./stand/powerpc-4xx/@OSRELEASE@/modules base-kernel-modules kmod,compatmodules @@ -425,8 +425,8 @@ ./stand/powerpc-booke/@OSRELEASE@/modules/secmodel_overlay/secmodel_overlay.kmod base-kernel-modules kmod,compatmodules ./stand/powerpc-booke/@OSRELEASE@/modules/securelevel base-kernel-modules kmod,compatmodules ./stand/powerpc-booke/@OSRELEASE@/modules/securelevel/securelevel.kmod base-kernel-modules kmod,compatmodules -./stand/powerpc-booke/@OSRELEASE@/modules/skipjack base-kernel-modules kmod,solaris -./stand/powerpc-booke/@OSRELEASE@/modules/skipjack/skipjack.kmod base-kernel-modules kmod,solaris +./stand/powerpc-booke/@OSRELEASE@/modules/skipjack base-kernel-modules kmod,compatmodules +./stand/powerpc-booke/@OSRELEASE@/modules/skipjack/skipjack.kmod base-kernel-modules kmod,compatmodules ./stand/powerpc-booke/@OSRELEASE@/modules/smbfsbase-kernel-modules kmod,compatmodules ./stand/powerpc-booke/@OSRELEASE@/modules/smbfs/smbfs.kmod base-kernel-modules kmod,compatmodules ./stand/powerpc-booke/@OSRELEASE@/modules/solaris base-kernel-modules kmod,solaris
CVS commit: src/sys/arch/powerpc/ibm4xx/dev
Module Name:src Committed By: martin Date: Tue Feb 25 14:09:13 UTC 2014 Modified Files: src/sys/arch/powerpc/ibm4xx/dev: ecc_plb.c Log Message: Remove unused variable To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/ibm4xx/dev/ecc_plb.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/powerpc/ibm4xx/dev/ecc_plb.c diff -u src/sys/arch/powerpc/ibm4xx/dev/ecc_plb.c:1.14 src/sys/arch/powerpc/ibm4xx/dev/ecc_plb.c:1.15 --- src/sys/arch/powerpc/ibm4xx/dev/ecc_plb.c:1.14 Sat Jun 18 06:41:42 2011 +++ src/sys/arch/powerpc/ibm4xx/dev/ecc_plb.c Tue Feb 25 14:09:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ecc_plb.c,v 1.14 2011/06/18 06:41:42 matt Exp $ */ +/* $NetBSD: ecc_plb.c,v 1.15 2014/02/25 14:09:13 martin Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ecc_plb.c,v 1.14 2011/06/18 06:41:42 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ecc_plb.c,v 1.15 2014/02/25 14:09:13 martin Exp $); #include locators.h @@ -138,7 +138,7 @@ ecc_plb_intr(void *arg) { struct ecc_plb_softc *sc = arg; u_int32_t esr, ear; - int ce, ue; + int ue; u_quad_t tb; u_long tmp, msr, dat; @@ -174,7 +174,6 @@ ecc_plb_intr(void *arg) if ((tb - sc-sc_ecc_tb) sc-sc_ecc_iv) return(1); - ce = (esr SDRAM0_ECCESR_CE) != 0x00; ue = (esr SDRAM0_ECCESR_UE) != 0x00; printf(ECC: Error CNT=%d ESR=%x EAR=%x %s BKNE=%d%d%d%d
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Tue Feb 25 14:10:09 UTC 2014 Modified Files: src/external/bsd/dhcpcd/dist: dhcpcd.c Log Message: Build with FORTIFY_SOURCE To generate a diff of this commit: cvs rdiff -u -r1.1.1.41 -r1.2 src/external/bsd/dhcpcd/dist/dhcpcd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/dhcpcd.c diff -u src/external/bsd/dhcpcd/dist/dhcpcd.c:1.1.1.41 src/external/bsd/dhcpcd/dist/dhcpcd.c:1.2 --- src/external/bsd/dhcpcd/dist/dhcpcd.c:1.1.1.41 Tue Feb 25 13:14:28 2014 +++ src/external/bsd/dhcpcd/dist/dhcpcd.c Tue Feb 25 14:10:09 2014 @@ -1,5 +1,5 @@ #include sys/cdefs.h - __RCSID($NetBSD: dhcpcd.c,v 1.1.1.41 2014/02/25 13:14:28 roy Exp $); + __RCSID($NetBSD: dhcpcd.c,v 1.2 2014/02/25 14:10:09 roy Exp $); /* * dhcpcd - DHCP client daemon @@ -760,7 +760,7 @@ handle_hwaddr(struct dhcpcd_ctx *ctx, co const uint8_t *hwaddr, size_t hwlen) { struct interface *ifp; - char buf[hwlen * 3]; + char buf[sizeof(ifp-hwaddr) * 3]; ifp = find_interface(ctx, ifname); if (ifp == NULL)
CVS commit: src/sys/arch/powerpc/fpu
Module Name:src Committed By: martin Date: Tue Feb 25 14:16:25 UTC 2014 Modified Files: src/sys/arch/powerpc/fpu: fpu_sqrt.c Log Message: Mark a temporary as __USEd To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/fpu/fpu_sqrt.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/powerpc/fpu/fpu_sqrt.c diff -u src/sys/arch/powerpc/fpu/fpu_sqrt.c:1.4 src/sys/arch/powerpc/fpu/fpu_sqrt.c:1.5 --- src/sys/arch/powerpc/fpu/fpu_sqrt.c:1.4 Sun Dec 11 12:18:42 2005 +++ src/sys/arch/powerpc/fpu/fpu_sqrt.c Tue Feb 25 14:16:25 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_sqrt.c,v 1.4 2005/12/11 12:18:42 christos Exp $ */ +/* $NetBSD: fpu_sqrt.c,v 1.5 2014/02/25 14:16:25 martin Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fpu_sqrt.c,v 1.4 2005/12/11 12:18:42 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: fpu_sqrt.c,v 1.5 2014/02/25 14:16:25 martin Exp $); #include sys/types.h #if defined(DIAGNOSTIC)||defined(DEBUG) @@ -381,7 +381,7 @@ fpu_sqrt(struct fpemu *fe) bit = 1 31; EVEN_DOUBLE; t3 = bit; - FPU_SUBS(d3, x3, t3); + FPU_SUBS(d3, x3, t3); __USE(d3); FPU_SUBCS(d2, x2, t2); FPU_SUBCS(d1, x1, t1); FPU_SUBC(d0, x0, t0);
CVS commit: src/sys/uvm
Module Name:src Committed By: martin Date: Tue Feb 25 14:22:59 UTC 2014 Modified Files: src/sys/uvm: uvm_kmguard.c Log Message: Mark a variable used only in diagnostics To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/uvm/uvm_kmguard.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/uvm/uvm_kmguard.c diff -u src/sys/uvm/uvm_kmguard.c:1.10 src/sys/uvm/uvm_kmguard.c:1.11 --- src/sys/uvm/uvm_kmguard.c:1.10 Mon Feb 20 19:14:23 2012 +++ src/sys/uvm/uvm_kmguard.c Tue Feb 25 14:22:59 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_kmguard.c,v 1.10 2012/02/20 19:14:23 bouyer Exp $ */ +/* $NetBSD: uvm_kmguard.c,v 1.11 2014/02/25 14:22:59 martin Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_kmguard.c,v 1.10 2012/02/20 19:14:23 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_kmguard.c,v 1.11 2014/02/25 14:22:59 martin Exp $); #include sys/param.h #include sys/systm.h @@ -157,7 +157,7 @@ uvm_kmguard_free(struct uvm_kmguard *kg, { vaddr_t va; u_int rotor; - void **c; + void **c __diagused; if (len MAXSIZE) { return false;
CVS commit: src/sys/arch/evbppc/ev64260
Module Name:src Committed By: martin Date: Tue Feb 25 14:33:32 UTC 2014 Modified Files: src/sys/arch/evbppc/ev64260: machdep.c Log Message: Remove an unused variable To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/evbppc/ev64260/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/evbppc/ev64260/machdep.c diff -u src/sys/arch/evbppc/ev64260/machdep.c:1.30 src/sys/arch/evbppc/ev64260/machdep.c:1.31 --- src/sys/arch/evbppc/ev64260/machdep.c:1.30 Fri Mar 1 18:25:39 2013 +++ src/sys/arch/evbppc/ev64260/machdep.c Tue Feb 25 14:33:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.30 2013/03/01 18:25:39 joerg Exp $ */ +/* $NetBSD: machdep.c,v 1.31 2014/02/25 14:33:32 martin Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.30 2013/03/01 18:25:39 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.31 2014/02/25 14:33:32 martin Exp $); #include opt_marvell.h #include opt_modular.h @@ -397,10 +397,10 @@ gt_bus_space_init(void) { const struct gt_decode_info *di; uint32_t datal, datah; - int error, bs, i; + int bs, i; bs = 0; - error = bus_space_init(ev64260_gt_bs_tag, gt, + bus_space_init(ev64260_gt_bs_tag, gt, ex_storage[bs], sizeof(ex_storage[bs])); bs++; @@ -418,7 +418,7 @@ gt_bus_space_init(void) memt-pbs_limit = GT_HighAddr_GET(datah) + 1 - memt-pbs_offset; - error = bus_space_init(memt, obio2, + bus_space_init(memt, obio2, ex_storage[bs], sizeof(ex_storage[bs])); bs++; } @@ -438,7 +438,7 @@ gt_bus_space_init(void) ev64260_pci0_mem_bs_tag.pbs_base = GT_LowAddr_GET(datal); ev64260_pci0_mem_bs_tag.pbs_limit = GT_HighAddr_GET(datah) + 1; - error = bus_space_init(ev64260_pci0_mem_bs_tag, pci0-mem, + bus_space_init(ev64260_pci0_mem_bs_tag, pci0-mem, ex_storage[bs], sizeof(ex_storage[bs])); bs++; @@ -472,7 +472,7 @@ gt_bus_space_init(void) ev64260_pci0_io_bs_tag.pbs_limit = GT_HighAddr_GET(datah) + 1 - ev64260_pci0_io_bs_tag.pbs_offset; - error = bus_space_init(ev64260_pci0_io_bs_tag, pci0-ioport, + bus_space_init(ev64260_pci0_io_bs_tag, pci0-ioport, ex_storage[bs], sizeof(ex_storage[bs])); bs++; @@ -491,7 +491,7 @@ gt_bus_space_init(void) ev64260_pci1_mem_bs_tag.pbs_base = GT_LowAddr_GET(datal); ev64260_pci1_mem_bs_tag.pbs_limit = GT_HighAddr_GET(datah) + 1; - error = bus_space_init(ev64260_pci1_mem_bs_tag, pci1-mem, + bus_space_init(ev64260_pci1_mem_bs_tag, pci1-mem, ex_storage[bs], sizeof(ex_storage[bs])); bs++; @@ -525,7 +525,7 @@ gt_bus_space_init(void) ev64260_pci1_io_bs_tag.pbs_limit = GT_HighAddr_GET(datah) + 1 - ev64260_pci1_io_bs_tag.pbs_offset; - error = bus_space_init(ev64260_pci1_io_bs_tag, pci1-ioport, + bus_space_init(ev64260_pci1_io_bs_tag, pci1-ioport, ex_storage[bs], sizeof(ex_storage[bs])); bs++; }
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: martin Date: Tue Feb 25 15:20:29 UTC 2014 Modified Files: src/sys/uvm/pmap: pmap.c Log Message: Mark a potentially unused variable To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/uvm/pmap/pmap.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/uvm/pmap/pmap.c diff -u src/sys/uvm/pmap/pmap.c:1.3 src/sys/uvm/pmap/pmap.c:1.4 --- src/sys/uvm/pmap/pmap.c:1.3 Mon Jul 22 03:40:36 2013 +++ src/sys/uvm/pmap/pmap.c Tue Feb 25 15:20:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.3 2013/07/22 03:40:36 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.4 2014/02/25 15:20:29 martin Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.3 2013/07/22 03:40:36 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.4 2014/02/25 15:20:29 martin Exp $); /* * Manages physical address maps. @@ -1479,7 +1479,7 @@ pmap_enter_pv(pmap_t pmap, vaddr_t va, s struct vm_page_md * const mdpg = VM_PAGE_TO_MD(pg); pv_entry_t pv, npv, apv; int16_t gen; - bool first = false; + bool first __unused = false; UVMHIST_FUNC(__func__); UVMHIST_CALLED(pmaphist); UVMHIST_LOG(pmaphist,
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: dsl Date: Tue Feb 25 17:56:03 UTC 2014 Modified Files: src/sys/arch/x86/x86: identcpu.c Log Message: Fix a 'stupido' that stopped (amongst other things) the cpu brand string being read. The most obvious side effect the anita tests failed to detect they were running under qemu - so reported failures under qemu for things that qemu doesn't support. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/x86/x86/identcpu.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/x86/x86/identcpu.c diff -u src/sys/arch/x86/x86/identcpu.c:1.42 src/sys/arch/x86/x86/identcpu.c:1.43 --- src/sys/arch/x86/x86/identcpu.c:1.42 Sun Feb 23 22:38:40 2014 +++ src/sys/arch/x86/x86/identcpu.c Tue Feb 25 17:56:03 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.42 2014/02/23 22:38:40 dsl Exp $ */ +/* $NetBSD: identcpu.c,v 1.43 2014/02/25 17:56:03 dsl Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: identcpu.c,v 1.42 2014/02/23 22:38:40 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: identcpu.c,v 1.43 2014/02/25 17:56:03 dsl Exp $); #include opt_xen.h @@ -833,7 +833,7 @@ cpu_probe(struct cpu_info *ci) * match with those generated by modern intel cpus. */ x86_cpuid(0x8000, descs); - if (descs[0] == 0x8000) + if (descs[0] = 0x8000) ci-ci_max_ext_cpuid = descs[0]; else ci-ci_max_ext_cpuid = 0;
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Tue Feb 25 19:20:09 UTC 2014 Modified Files: src/sys/arch/arm/include: elf_machdep.h Log Message: Fix thinko. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/include/elf_machdep.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/include/elf_machdep.h diff -u src/sys/arch/arm/include/elf_machdep.h:1.16 src/sys/arch/arm/include/elf_machdep.h:1.17 --- src/sys/arch/arm/include/elf_machdep.h:1.16 Mon Feb 24 23:54:09 2014 +++ src/sys/arch/arm/include/elf_machdep.h Tue Feb 25 19:20:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.16 2014/02/24 23:54:09 matt Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.17 2014/02/25 19:20:09 matt Exp $ */ #ifndef _ARM_ELF_MACHDEP_H_ #define _ARM_ELF_MACHDEP_H_ @@ -147,7 +147,7 @@ #ifdef _KERNEL #ifdef ELFSIZE #define ELF_MD_PROBE_FUNC ELFNAME2(arm_netbsd,probe) -#define ELF_MD_COREDUMP_FUNC ELFNAME2(arm_netbsd,coredump_setup) +#define ELF_MD_COREDUMP_SETUP ELFNAME2(arm_netbsd,coredump_setup) #endif struct exec_package;
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: skrll Date: Tue Feb 25 19:37:31 UTC 2014 Modified Files: src/sys/arch/evbarm/conf: std.rpi Log Message: Define ARM11_COMPAT_MMU (for now) to keep inline with cpuconf.h changes To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/std.rpi 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/std.rpi diff -u src/sys/arch/evbarm/conf/std.rpi:1.12 src/sys/arch/evbarm/conf/std.rpi:1.13 --- src/sys/arch/evbarm/conf/std.rpi:1.12 Fri Nov 1 18:41:06 2013 +++ src/sys/arch/evbarm/conf/std.rpi Tue Feb 25 19:37:30 2014 @@ -1,4 +1,4 @@ -# $NetBSD: std.rpi,v 1.12 2013/11/01 18:41:06 skrll Exp $ +# $NetBSD: std.rpi,v 1.13 2014/02/25 19:37:30 skrll Exp $ # # standard NetBSD/evbarm for Raspberry Pi options @@ -9,6 +9,7 @@ include arch/evbarm/conf/std.evbarm include arch/evbarm/conf/files.rpi options MODULAR +options ARM11_COMPAT_MMU options __HAVE_CPU_COUNTER options __HAVE_FAST_SOFTINTS # should be in types.h options __HAVE_CPU_UAREA_ALLOC_IDLELWP
CVS commit: src/sys/dev/spi
Module Name:src Committed By: rkujawa Date: Tue Feb 25 20:09:37 UTC 2014 Modified Files: src/sys/dev/spi: files.spi Added Files: src/sys/dev/spi: mcp48x1.c Log Message: Add preliminary driver for Microchip MCP48x1 family of DACs. Needs more testing and an appropriate API for such (non-audio) DACs. For now one can set the output value using sysctl node. Also sysmon(4) will conveniently report the voltage on Vout pin of the DAC. Note that this is not an actual measured voltage, but merely calculated using equation from datasheet. Real voltage might be different and depend on analog circuitry attached to the DAC. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/spi/files.spi cvs rdiff -u -r0 -r1.1 src/sys/dev/spi/mcp48x1.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/dev/spi/files.spi diff -u src/sys/dev/spi/files.spi:1.2 src/sys/dev/spi/files.spi:1.3 --- src/sys/dev/spi/files.spi:1.2 Sat Oct 7 07:21:13 2006 +++ src/sys/dev/spi/files.spi Tue Feb 25 20:09:37 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.spi,v 1.2 2006/10/07 07:21:13 gdamore Exp $ +# $NetBSD: files.spi,v 1.3 2014/02/25 20:09:37 rkujawa Exp $ define spibus { } @@ -25,3 +25,9 @@ file dev/spi/m25p.c m25p device tmp121temp: sysmon_envsys attach tmp121temp at spi file dev/spi/tmp121.c tmp121temp + +# MCP48x1 DAC +device mcp48x1dac +attach mcp48x1dac at spi +file dev/spi/mcp48x1.c mcp48x1dac + Added files: Index: src/sys/dev/spi/mcp48x1.c diff -u /dev/null src/sys/dev/spi/mcp48x1.c:1.1 --- /dev/null Tue Feb 25 20:09:37 2014 +++ src/sys/dev/spi/mcp48x1.c Tue Feb 25 20:09:37 2014 @@ -0,0 +1,320 @@ +/* $NetBSD: mcp48x1.c,v 1.1 2014/02/25 20:09:37 rkujawa Exp $ */ + +/*- + * Copyright (c) 2014 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Radoslaw Kujawa. + * + * 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. + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: mcp48x1.c,v 1.1 2014/02/25 20:09:37 rkujawa Exp $); + +/* + * Driver for Microchip MCP4801/MCP4811/MCP4821 DAC. + * + * XXX: needs more testing. + */ + +#include sys/param.h +#include sys/systm.h +#include sys/device.h +#include sys/kernel.h +#include sys/types.h +#include sys/sysctl.h + +#include dev/sysmon/sysmonvar.h + +#include dev/spi/spivar.h + +#define MCP48X1DAC_DEBUG 0 + +#define MCP48X1DAC_WRITE __BIT(15) /* active low */ +#define MCP48X1DAC_GAIN __BIT(13) /* active low */ +#define MCP48X1DAC_SHDN __BIT(12) /* active low */ +#define MCP48X1DAC_DATA __BITS(11,0) /* data */ + +struct mcp48x1dac_model { + const char *name; + uint8_t resolution; + uint8_t shift; /* data left shift during write */ +}; + +struct mcp48x1dac_softc { + device_t sc_dev; + struct spi_handle *sc_sh; + + struct mcp48x1dac_model *sc_dm; /* struct describing DAC model */ + + uint16_t sc_dac_data; + bool sc_dac_gain; + bool sc_dac_shutdown; + + struct sysmon_envsys *sc_sme; + envsys_data_t sc_sm_vo; /* envsys sensor (Vo) */ +}; + +static int mcp48x1dac_match(device_t, cfdata_t, void *); +static void mcp48x1dac_attach(device_t, device_t, void *); + +static bool mcp48x1dac_envsys_attach(struct mcp48x1dac_softc *sc); +static void mcp48x1dac_envsys_refresh(struct sysmon_envsys *, + envsys_data_t *); + +static void mcp48x1dac_write(struct mcp48x1dac_softc *); +static uint16_t mcp48x1dac_regval_to_mv(struct mcp48x1dac_softc *); + +static void mcp48x1dac_setup_sysctl(struct mcp48x1dac_softc *sc); +static int sysctl_mcp48x1dac_data(SYSCTLFN_ARGS); +static int
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Tue Feb 25 20:15:24 UTC 2014 Modified Files: src/doc: CHANGES Log Message: Note the new mcp48x1dac driver. To generate a diff of this commit: cvs rdiff -u -r1.1891 -r1.1892 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1891 src/doc/CHANGES:1.1892 --- src/doc/CHANGES:1.1891 Tue Feb 25 13:22:14 2014 +++ src/doc/CHANGES Tue Feb 25 20:15:24 2014 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1891 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1892 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -355,3 +355,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0: luna68k: Make sysinst to create a boot UFS partition and install the native bootloader during installation. [tsutsui 20140219] dhcpcd(8): Import dhcpcd-6.3.0 [roy 20140225] + mcp48x1dac: Add preliminary support for Microchip MCP48x1 family of + Digital-to-Analog converters. [rkujawa 20140225]
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Tue Feb 25 20:16:29 UTC 2014 Modified Files: src/doc: CHANGES Log Message: s/mcp48x1dac/mcp48x1dac(4)/ To generate a diff of this commit: cvs rdiff -u -r1.1892 -r1.1893 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1892 src/doc/CHANGES:1.1893 --- src/doc/CHANGES:1.1892 Tue Feb 25 20:15:24 2014 +++ src/doc/CHANGES Tue Feb 25 20:16:29 2014 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1892 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1893 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -355,5 +355,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0: luna68k: Make sysinst to create a boot UFS partition and install the native bootloader during installation. [tsutsui 20140219] dhcpcd(8): Import dhcpcd-6.3.0 [roy 20140225] - mcp48x1dac: Add preliminary support for Microchip MCP48x1 family of + mcp48x1dac(4): Add preliminary support for Microchip MCP48x1 family of Digital-to-Analog converters. [rkujawa 20140225]
CVS commit: othersrc/external/bsd/transit/dist
Module Name:othersrc Committed By: agc Date: Tue Feb 25 20:19:35 UTC 2014 Modified Files: othersrc/external/bsd/transit/dist: main.c Log Message: add comments To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/transit/dist/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/transit/dist/main.c diff -u othersrc/external/bsd/transit/dist/main.c:1.3 othersrc/external/bsd/transit/dist/main.c:1.4 --- othersrc/external/bsd/transit/dist/main.c:1.3 Tue Feb 25 08:54:43 2014 +++ othersrc/external/bsd/transit/dist/main.c Tue Feb 25 20:19:35 2014 @@ -37,7 +37,7 @@ #define PROGRAM_AUTHOR tran...@agc.ac #define PROGRAM_VERSION 20140223 - +/* process all data in a stream */ static char * dostream(FILE *fp, size_t *size) { @@ -51,6 +51,7 @@ dostream(FILE *fp, size_t *size) return s; } +/* open a file and process the stream */ static char * dofile(const char *f, size_t *size) { @@ -66,6 +67,7 @@ dofile(const char *f, size_t *size) return s; } +/* recursive walk function */ static int recwalk1(transit_t *t, unsigned *from, FILE *fp, unsigned indent, const char *term) { @@ -103,6 +105,7 @@ recwalk1(transit_t *t, unsigned *from, F } } +/* print indent */ static inline void doindent(FILE *fp, unsigned in) { @@ -113,6 +116,7 @@ doindent(FILE *fp, unsigned in) } } +/* array-based walk function */ static int arrwalk1(transit_t *t, uint64_t a, FILE *fp, unsigned indent, const char *term) { @@ -157,6 +161,7 @@ arrwalk1(transit_t *t, uint64_t a, FILE } } +/* walk function */ static int walk(transit_t *t, FILE *fp, int recursive) { @@ -172,6 +177,7 @@ walk(transit_t *t, FILE *fp, int recursi return 1; } +/* output JSON */ static int output_json(transit_t *t, uint64_t a, FILE *fp) { @@ -219,6 +225,7 @@ output_json(transit_t *t, uint64_t a, FI fprintf(stderr, unrecognised atom: %d\n, transit_atom_type(atom)); return t-c; } + fprintf(fp, \n); } @@ -241,7 +248,8 @@ main(int argc, char **argv) while ((i = getopt(argc, argv, Vdjr)) != -1) { switch(i) { case 'V': - printf(%s by %s, version %s\n, PROGRAM_NAME, PROGRAM_AUTHOR, PROGRAM_VERSION); + printf(%s by %s, version %s\n, +PROGRAM_NAME, PROGRAM_AUTHOR, PROGRAM_VERSION); exit(EXIT_SUCCESS); case 'd': decoding = 1;
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Tue Feb 25 20:58:18 UTC 2014 Modified Files: src/lib/librumpuser: rumpuser_port.h Log Message: emulate printflike properly to avoid fatal error on clang To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/lib/librumpuser/rumpuser_port.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser_port.h diff -u src/lib/librumpuser/rumpuser_port.h:1.28 src/lib/librumpuser/rumpuser_port.h:1.29 --- src/lib/librumpuser/rumpuser_port.h:1.28 Thu Jan 16 16:03:33 2014 +++ src/lib/librumpuser/rumpuser_port.h Tue Feb 25 20:58:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_port.h,v 1.28 2014/01/16 16:03:33 pooka Exp $ */ +/* $NetBSD: rumpuser_port.h,v 1.29 2014/02/25 20:58:18 pooka Exp $ */ /* * Portability header for non-NetBSD platforms. @@ -161,8 +161,12 @@ posix_memalign(void **ptr, size_t align, #endif #ifndef __printflike +#ifdef __GNUC__ +#define __printflike(a,b) __attribute__((__format__ (__printf__,a,b))) +#else #define __printflike(a,b) #endif +#endif #ifndef __noinline #ifdef __GNUC__
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Tue Feb 25 21:29:12 UTC 2014 Modified Files: src/sys/arch/arm/arm: core_machdep.c Log Message: Default to EXEC_ELF32 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/arm/core_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/arm/arm/core_machdep.c diff -u src/sys/arch/arm/arm/core_machdep.c:1.6 src/sys/arch/arm/arm/core_machdep.c:1.7 --- src/sys/arch/arm/arm/core_machdep.c:1.6 Tue Feb 25 00:26:43 2014 +++ src/sys/arch/arm/arm/core_machdep.c Tue Feb 25 21:29:12 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: core_machdep.c,v 1.6 2014/02/25 00:26:43 matt Exp $ */ +/* $NetBSD: core_machdep.c,v 1.7 2014/02/25 21:29:12 matt Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -37,10 +37,14 @@ #include sys/param.h -__KERNEL_RCSID(0, $NetBSD: core_machdep.c,v 1.6 2014/02/25 00:26:43 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: core_machdep.c,v 1.7 2014/02/25 21:29:12 matt Exp $); +#ifdef _KERNEL_OPT #include opt_execfmt.h #include opt_compat_netbsd32.h +#else +#define EXEC_ELF32 1 +#endif #include sys/core.h #include sys/exec.h
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: dsl Date: Tue Feb 25 22:11:11 UTC 2014 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Add the XCR bits for snazzy upcoming features. Define a mask for the fpu releated ones - only these wll be enabled. The memory bound ones will need saving on every context switch. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/arch/x86/include/specialreg.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/x86/include/specialreg.h diff -u src/sys/arch/x86/include/specialreg.h:1.77 src/sys/arch/x86/include/specialreg.h:1.78 --- src/sys/arch/x86/include/specialreg.h:1.77 Sat Jan 4 21:09:39 2014 +++ src/sys/arch/x86/include/specialreg.h Tue Feb 25 22:11:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.77 2014/01/04 21:09:39 msaitoh Exp $ */ +/* $NetBSD: specialreg.h,v 1.78 2014/02/25 22:11:11 dsl Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -93,10 +93,28 @@ */ #define XCR0_X87 0x0001 /* x87 FPU/MMX state */ #define XCR0_SSE 0x0002 /* SSE state */ -#define XCR0_AVX 0x0004 /* AVX state (ymmn registers) */ +#define XCR0_YMM_Hi128 0x0004 /* AVX-256 (ymmn registers) */ +#define XCR0_BNDREGS 0x0008 /* Memory protection ext bounds */ +#define XCR0_BNDCSR 0x0010 /* Memory protection ext state */ +#define XCR0_Opmask 0x0020 /* AVX-512 Opmask */ +#define XCR0_ZMM_Hi256 0x0040 /* AVX-512 upper 256 bits low regs */ +#define XCR0_Hi16_ZMM 0x0080 /* AVX-512 512 bits upper registers */ + +/* + * Known fpu bits - only these get enabled + * I think the XCR0_BNDREGS and XCR0_BNDCSR would need saving on + * every context switch. + * The save are is sized for all the fields below (max 2680 bytes). + */ +#define XCR0_FPU (XCR0_X87 | XCR0_SSE | XCR0_YMM_Hi128 | \ + XCR0_Opmask | XCR0_ZMM_Hi256 | XCR0_Hi16_ZMM) + +#define XCR0_BND (XCR0_BNDREGS | XCR0_BNDCSR) #define XCR0_FLAGS1 \20 \ - \1 x87 \2 SSE \3 AVX \4 B03 + \1 x87 \2 SSE \3 AVX \ + \4 BNDREGS \5 BNDCSR \ + \6 Opmask \7 ZMM_Hi256 \10 Hi16_ZMM /*
CVS commit: src/sys/arch
Module Name:src Committed By: dsl Date: Tue Feb 25 22:16:52 UTC 2014 Modified Files: src/sys/arch/i386/i386: cpufunc.S src/sys/arch/x86/include: cpu_extended_state.h cpufunc.h fpu.h src/sys/arch/x86/x86: cpu.c fpu.c vm_machdep.c Log Message: Add support for saving the AVX-256 ymm registers during FPU context switches. Add support for the forthcoming AVX-512 registers. Code compiled with -mavx seems to work, but I've not tested context switches with live ymm registers. There is a small cost on fork/exec (a larger area is copied/zerod), but I don't think the ymm registers are read/written unless they have been used. The code use XSAVE on all cpus, I'm not brave enough to enable XSAVEOPT. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/i386/i386/cpufunc.S cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/include/cpu_extended_state.h cvs rdiff -u -r1.17 -r1.18 src/sys/arch/x86/include/cpufunc.h cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/fpu.h cvs rdiff -u -r1.109 -r1.110 src/sys/arch/x86/x86/cpu.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/x86/fpu.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/x86/x86/vm_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/i386/i386/cpufunc.S diff -u src/sys/arch/i386/i386/cpufunc.S:1.18 src/sys/arch/i386/i386/cpufunc.S:1.19 --- src/sys/arch/i386/i386/cpufunc.S:1.18 Wed Feb 12 23:24:09 2014 +++ src/sys/arch/i386/i386/cpufunc.S Tue Feb 25 22:16:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.S,v 1.18 2014/02/12 23:24:09 dsl Exp $ */ +/* $NetBSD: cpufunc.S,v 1.19 2014/02/25 22:16:52 dsl Exp $ */ /*- * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include sys/errno.h #include machine/asm.h -__KERNEL_RCSID(0, $NetBSD: cpufunc.S,v 1.18 2014/02/12 23:24:09 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: cpufunc.S,v 1.19 2014/02/25 22:16:52 dsl Exp $); #include opt_xen.h @@ -160,6 +160,24 @@ ENTRY(rdmsr_safe) movl %eax, PCB_ONFAULT(%ecx) ret +END(rdmsr_safe) + +/* uint64_t rdxcr(uint32_t) */ +ENTRY(rdxcr) + movl 4(%esp), %ecx /* extended control reg number */ + xgetbv /* Read to %edx:%eax */ + ret +END(rdxcr) + +/* void wrxcr(uint32_t, uint64_t) */ +ENTRY(wrxcr) + movl 4(%esp), %ecx /* extended control reg number */ + movl 8(%esp), %eax /* feature mask bits */ + movl 12(%esp), %edx + xsetbv + ret +END(wrxcr) + /* * MSR operations fault handler @@ -389,15 +407,41 @@ ENTRY(fxrstor) ret END(fxrstor) +ENTRY(xsave) + movl 4(%esp), %ecx + movl 8(%esp), %eax /* feature mask bits */ + movl 12(%esp), %edx + xsave (%ecx) + ret +END(xsave) + +ENTRY(xsaveopt) + movl 4(%esp), %ecx + movl 8(%esp), %eax /* feature mask bits */ + movl 12(%esp), %edx + xsaveopt (%ecx) + ret +END(xsaveopt) + +ENTRY(xrstor) + movl 4(%esp), %ecx + movl 8(%esp), %eax /* feature mask bits */ + movl 12(%esp), %edx + xrstor (%eax) + ret +END(xrstor) + ENTRY(x86_stmxcsr) movl 4(%esp), %eax stmxcsr (%eax) ret +END(x86_stmxcsr) ENTRY(x86_ldmxcsr) movl 4(%esp), %eax ldmxcsr (%eax) ret +END(x86_ldmxcsr) ENTRY(fldummy) ffree %st(7) Index: src/sys/arch/x86/include/cpu_extended_state.h diff -u src/sys/arch/x86/include/cpu_extended_state.h:1.8 src/sys/arch/x86/include/cpu_extended_state.h:1.9 --- src/sys/arch/x86/include/cpu_extended_state.h:1.8 Tue Feb 18 18:39:10 2014 +++ src/sys/arch/x86/include/cpu_extended_state.h Tue Feb 25 22:16:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_extended_state.h,v 1.8 2014/02/18 18:39:10 dsl Exp $ */ +/* $NetBSD: cpu_extended_state.h,v 1.9 2014/02/25 22:16:52 dsl Exp $ */ #ifndef _X86_CPU_EXTENDED_STATE_H_ #define _X86_CPU_EXTENDED_STATE_H_ @@ -122,19 +122,13 @@ struct fxsave_os { uint16_t fxo_dflt_cw; /* Control word for signal handlers */ }; -union savefpu { - struct save87 sv_87; - struct fxsave sv_xmm; - struct fxsave_os sv_os; -}; - /* - * For XSAVE a 64byte header follows the above. + * For XSAVE a 64byte header follows the fxsave data. * Currently it only contains one field of which only 3 bits are defined. * Some other parts must be zero - zero it all. * * The xsh_xstate_bv bits match those of XCR0: - * XCR0_X870x0001 x87 FPU/MMX state (always set) + * XCR0_X870x0001 x87 FPU/MMX state * XCR0_SSE0x0002 SSE state * XCR0_AVX0x0004 AVX state (ymmn registers) * @@ -143,11 +137,12 @@ union savefpu { */ struct xsave_header { + uint64_t xsh_fxsave[64]; /* to align in the union */ uint64_t xsh_xstate_bv; /* bitmap of saved sub structures */ uint64_t xsh_rsrvd[2]; /* must be zero */ uint64_t xsh_reserved[5];/* best if zero */ }; -__CTASSERT(sizeof (struct xsave_header) == 64); +__CTASSERT(sizeof (struct xsave_header) == 512 + 64); /* * The ymm save area actually follows the xsave_header. @@ -157,6 +152,20 @@ struct xsave_ymm { };
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Tue Feb 25 22:18:09 UTC 2014 Modified Files: src/sys/arch/arm/arm32: fault.c Log Message: Only use FSR_WRITE on armv7 for now. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/arch/arm/arm32/fault.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/arm32/fault.c diff -u src/sys/arch/arm/arm32/fault.c:1.94 src/sys/arch/arm/arm32/fault.c:1.95 --- src/sys/arch/arm/arm32/fault.c:1.94 Tue Feb 25 09:54:33 2014 +++ src/sys/arch/arm/arm32/fault.c Tue Feb 25 22:18:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fault.c,v 1.94 2014/02/25 09:54:33 matt Exp $ */ +/* $NetBSD: fault.c,v 1.95 2014/02/25 22:18:09 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ #include opt_kgdb.h #include sys/types.h -__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.94 2014/02/25 09:54:33 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.95 2014/02/25 22:18:09 matt Exp $); #include sys/param.h #include sys/systm.h @@ -412,10 +412,11 @@ data_abort_handler(trapframe_t *tf) * Otherwise we need to disassemble the instruction responsible to * determine if it was a write. */ - if (CPU_IS_ARMV6_P() || CPU_IS_ARMV7_P()) { + if (/* CPU_IS_ARMV6_P() || */ CPU_IS_ARMV7_P()) { ftype = (fsr FAULT_WRITE) ? VM_PROT_WRITE : VM_PROT_READ; } else if (IS_PERMISSION_FAULT(fsr)) { ftype = VM_PROT_WRITE; + // KASSERTMSG(fsr FAULT_WRITE, fsr %#x, fsr); } else { #ifdef THUMB_CODE /* Fast track the ARM case. */ @@ -435,6 +436,7 @@ data_abort_handler(trapframe_t *tf) ftype = VM_PROT_WRITE; else ftype = VM_PROT_READ; + // KASSERTMSG(ftype == (fsr FAULT_WRITE) ? VM_PROT_WRITE : VM_PROT_READ, fsr %#x insn %#x, fsr, insn); } else #endif @@ -450,6 +452,7 @@ data_abort_handler(trapframe_t *tf) ftype = VM_PROT_READ | VM_PROT_WRITE; else ftype = VM_PROT_READ; + // KASSERTMSG(ftype == (fsr FAULT_WRITE) ? VM_PROT_WRITE : VM_PROT_READ, fsr %#x insn %#x, fsr, insn); } }
CVS commit: src/sys/rump/librump/rumpnet
Module Name:src Committed By: pooka Date: Tue Feb 25 22:40:53 UTC 2014 Modified Files: src/sys/rump/librump/rumpnet: netisr.c Log Message: Schedule only those netisr's that have registered handlers. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/rump/librump/rumpnet/netisr.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/rump/librump/rumpnet/netisr.c diff -u src/sys/rump/librump/rumpnet/netisr.c:1.7 src/sys/rump/librump/rumpnet/netisr.c:1.8 --- src/sys/rump/librump/rumpnet/netisr.c:1.7 Fri Feb 14 01:43:13 2014 +++ src/sys/rump/librump/rumpnet/netisr.c Tue Feb 25 22:40:53 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: netisr.c,v 1.7 2014/02/14 01:43:13 pooka Exp $ */ +/* $NetBSD: netisr.c,v 1.8 2014/02/25 22:40:53 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netisr.c,v 1.7 2014/02/14 01:43:13 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: netisr.c,v 1.8 2014/02/25 22:40:53 pooka Exp $); #include sys/param.h #include sys/intr.h @@ -42,7 +42,14 @@ void schednetisr(int isr) { - softint_schedule(netisrs[isr]); + /* + * Do not schedule a softint that is not registered. + * This might cause the inq to fill, but the one calling us + * should start dropping packets once the inq is full, + * so no big harm done. + */ + if (__predict_true(netisrs[isr])) + softint_schedule(netisrs[isr]); } void
CVS commit: src/sys/net
Module Name:src Committed By: pooka Date: Tue Feb 25 22:42:06 UTC 2014 Modified Files: src/sys/net: if_ethersubr.c Log Message: If the in6 domain was not attached, do not attempt to process IPv6 packets. To generate a diff of this commit: cvs rdiff -u -r1.195 -r1.196 src/sys/net/if_ethersubr.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/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.195 src/sys/net/if_ethersubr.c:1.196 --- src/sys/net/if_ethersubr.c:1.195 Sat Jun 29 21:06:58 2013 +++ src/sys/net/if_ethersubr.c Tue Feb 25 22:42:06 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.195 2013/06/29 21:06:58 rmind Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.196 2014/02/25 22:42:06 pooka Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_ethersubr.c,v 1.195 2013/06/29 21:06:58 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: if_ethersubr.c,v 1.196 2014/02/25 22:42:06 pooka Exp $); #include opt_inet.h #include opt_atalk.h @@ -852,6 +852,10 @@ ether_input(struct ifnet *ifp, struct mb #endif #ifdef INET6 case ETHERTYPE_IPV6: + if (__predict_false(!in6_present)) { +m_freem(m); +return; + } #ifdef GATEWAY if (ip6flow_fastforward(m)) return;
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Tue Feb 25 23:15:43 UTC 2014 Modified Files: src/sys/kern: kern_rndq.c Log Message: Fix bits/bytes mixup in rnd_getmore. Remove some needless casts and fix format directives while here. Bit/byte mixup noticed by pooka. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/kern/kern_rndq.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/kern/kern_rndq.c diff -u src/sys/kern/kern_rndq.c:1.21 src/sys/kern/kern_rndq.c:1.22 --- src/sys/kern/kern_rndq.c:1.21 Thu Aug 29 01:04:49 2013 +++ src/sys/kern/kern_rndq.c Tue Feb 25 23:15:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_rndq.c,v 1.21 2013/08/29 01:04:49 tls Exp $ */ +/* $NetBSD: kern_rndq.c,v 1.22 2014/02/25 23:15:43 riastradh Exp $ */ /*- * Copyright (c) 1997-2013 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.21 2013/08/29 01:04:49 tls Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.22 2014/02/25 23:15:43 riastradh Exp $); #include sys/param.h #include sys/ioctl.h @@ -241,10 +241,10 @@ rnd_getmore(size_t byteswanted) if (rs-flags RND_FLAG_HASCB) { KASSERT(rs-get != NULL); KASSERT(rs-getarg != NULL); - rs-get((size_t)byteswanted, rs-getarg); + rs-get(byteswanted, rs-getarg); #ifdef RND_VERBOSE - printf(rnd: asking source %s for %d bytes\n, - rs-name, (int)byteswanted); + printf(rnd: asking source %s for %zu bytes\n, + rs-name, byteswanted); #endif } } @@ -868,14 +868,14 @@ rnd_process_events(void) mutex_spin_enter(rndpool_mtx); pool_entropy = rndpool_get_entropy_count(rnd_pool); - if (pool_entropy RND_ENTROPY_THRESHOLD * 8) { + if (pool_entropy RND_ENTROPY_THRESHOLD * NBBY) { wake++; } else { rnd_empty = 1; - rnd_getmore((RND_POOLBITS - pool_entropy) / 8); + rnd_getmore(howmany((RND_POOLBITS - pool_entropy), NBBY)); #ifdef RND_VERBOSE - printf(rnd: empty, asking for %d bits\n, - (int)((RND_POOLBITS - pool_entropy) / 8)); + printf(rnd: empty, asking for %zu bytes\n, + howmany((RND_POOLBITS - pool_entropy), NBBY)); #endif } @@ -1032,8 +1032,8 @@ rnd_extract_data_locked(void *p, u_int32 } #endif entropy_count = rndpool_get_entropy_count(rnd_pool); - if (entropy_count (RND_ENTROPY_THRESHOLD * 2 + len) * 8) { - rnd_getmore(RND_POOLBITS - entropy_count * 8); + if (entropy_count (RND_ENTROPY_THRESHOLD * 2 + len) * NBBY) { + rnd_getmore(howmany((RND_POOLBITS - entropy_count), NBBY)); } return rndpool_extract_data(rnd_pool, p, len, flags); }
CVS commit: src/sys/arch/evbarm/cubie
Module Name:src Committed By: matt Date: Wed Feb 26 00:20:59 UTC 2014 Modified Files: src/sys/arch/evbarm/cubie: cubie_machdep.c Log Message: Deal with cubietruck GPIO differences. Use its 2GB of RAM to distinguish it. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/cubie/cubie_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/cubie/cubie_machdep.c diff -u src/sys/arch/evbarm/cubie/cubie_machdep.c:1.11 src/sys/arch/evbarm/cubie/cubie_machdep.c:1.12 --- src/sys/arch/evbarm/cubie/cubie_machdep.c:1.11 Wed Feb 26 00:12:21 2014 +++ src/sys/arch/evbarm/cubie/cubie_machdep.c Wed Feb 26 00:20:59 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cubie_machdep.c,v 1.11 2014/02/26 00:12:21 jmcneill Exp $ */ +/* $NetBSD: cubie_machdep.c,v 1.12 2014/02/26 00:20:59 matt Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cubie_machdep.c,v 1.11 2014/02/26 00:12:21 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: cubie_machdep.c,v 1.12 2014/02/26 00:20:59 matt Exp $); #include opt_machdep.h #include opt_ddb.h @@ -191,6 +191,7 @@ static char bootargs[MAX_BOOT_STRING]; char *boot_args = NULL; char *boot_file = NULL; +bool cubietruck_p; /* * uboot_args are filled in by cubie_start.S and must be in .data * and not .bbs since .bss is cleared after uboot_args are filled in. @@ -202,6 +203,10 @@ uintptr_t uboot_args[4] = { 0 }; extern char KERNEL_BASE_phys[]; /* physical start of kernel */ extern char _end[]; /* physical end of kernel */ +#ifdef MULTIPROCESSOR +extern uintptr_t cortex_mpfault[4]; +#endif + #if NAWIN_FB 0 #if NCOM 0 int use_fb_console = false; @@ -307,6 +312,11 @@ initarm(void *arg) #ifdef VERBOSE_INIT_ARM printf(\nuboot arg = %#PRIxPTR, %#PRIxPTR, %#PRIxPTR, %#PRIxPTR\n, uboot_args[0], uboot_args[1], uboot_args[2], uboot_args[3]); +#ifdef MULTIPROCESSOR + printf(mpfault = %#PRIxPTR, %#PRIxPTR, %#PRIxPTR, %#PRIxPTR\n, + cortex_mpfault[0], cortex_mpfault[1], cortex_mpfault[2], + cortex_mpfault[3]); +#endif #endif #ifdef KGDB @@ -339,6 +349,9 @@ initarm(void *arg) */ psize_t ram_size = awin_memprobe(); + /* the cubietruck has 2GB whereas the cubieboards only has 1GB */ + cubietruck_p = (ram_size == 0x8000); + /* * If MEMSIZE specified less than what we really have, limit ourselves * to that. @@ -350,6 +363,11 @@ initarm(void *arg) KASSERTMSG(ram_size 0, RAM size unknown and MEMSIZE undefined); #endif + /* + * Configure DMA tags + */ + awin_dma_bootstrap(ram_size); + /* Fake bootconfig structure for the benefit of pmap.c. */ bootconfig.dramblocks = 1; bootconfig.dram[0].address = AWIN_SDRAM_PBASE; @@ -412,7 +430,7 @@ initarm(void *arg) #define CONSPEED 115200 #endif #ifndef CONMODE -#define CONMODE ((TTYDEF_CFLAG ~(CSIZE | CSTOPB | PARENB)) | CS8) /* 8N1 */ +#define CONMODE ((TTYDEF_CFLAG ~(CSIZE | CSTOPB | PARENB | HUPCL)) | CS8) /* 8N1 */ #endif __CTASSERT(AWIN_CORE_PBASE + AWIN_UART0_OFFSET = CONADDR); @@ -529,7 +547,11 @@ cubie_device_register(device_t self, voi #endif if (device_is_a(self, awinio)) { - prop_dictionary_set_bool(dict, no-awge, true); + if (cubietruck_p) { + prop_dictionary_set_bool(dict, no-awe, true); + } else { + prop_dictionary_set_bool(dict, no-awge, true); + } return; } @@ -537,16 +559,25 @@ cubie_device_register(device_t self, voi /* * These are GPIOs being used for various functions. */ - prop_dictionary_set_cstring(dict, satapwren, PB8); - prop_dictionary_set_cstring(dict, usb0drv, PB9); + prop_dictionary_set_cstring(dict, satapwren, + (cubietruck_p ? PH12 : PB8)); + prop_dictionary_set_cstring(dict, usb0drv, + (cubietruck_p ? PH17 : PB2)); prop_dictionary_set_cstring(dict, usb2drv, PH3); - prop_dictionary_set_cstring(dict, usb0iddet, PH4); - prop_dictionary_set_cstring(dict, usb0vbusdet, PH5); + prop_dictionary_set_cstring(dict, usb0iddet, + (cubietruck_p ? PH19 : PH4)); + prop_dictionary_set_cstring(dict, usb0vbusdet, + (cubietruck_p ? PH22 : PH5)); prop_dictionary_set_cstring(dict, usb1drv, PH6); - prop_dictionary_set_cstring(dict, hdd5ven, PH17); - prop_dictionary_set_cstring(dict, emacpwren, PH19); prop_dictionary_set_cstring(dict, status-led1, PH21); prop_dictionary_set_cstring(dict, status-led2, PH20); + if (cubietruck_p) { + prop_dictionary_set_cstring(dict, status-led3, PH11); + prop_dictionary_set_cstring(dict, status-led4, PH7); + } else { + prop_dictionary_set_cstring(dict, hdd5ven, PH17); + prop_dictionary_set_cstring(dict, emacpwren, PH19); + } /* * These pins have no connections. @@ -563,7 +594,7 @@ cubie_device_register(device_t self, voi } if (device_is_a(self, ahcisata)) { - /* PIO PB8 output */ + /* PIO PB8 / PIO PH12
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: matt Date: Wed Feb 26 00:19:01 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_board.c awin_io.c awin_var.h Log Message: Include latent support for coherent dma though for now it seems that isn't possible. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/allwinner/awin_board.c \ src/sys/arch/arm/allwinner/awin_var.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/allwinner/awin_io.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/allwinner/awin_board.c diff -u src/sys/arch/arm/allwinner/awin_board.c:1.8 src/sys/arch/arm/allwinner/awin_board.c:1.9 --- src/sys/arch/arm/allwinner/awin_board.c:1.8 Mon Feb 24 16:50:49 2014 +++ src/sys/arch/arm/allwinner/awin_board.c Wed Feb 26 00:19:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: awin_board.c,v 1.8 2014/02/24 16:50:49 matt Exp $ */ +/* $NetBSD: awin_board.c,v 1.9 2014/02/26 00:19:01 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -34,7 +34,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: awin_board.c,v 1.8 2014/02/24 16:50:49 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: awin_board.c,v 1.9 2014/02/26 00:19:01 matt Exp $); #include sys/param.h #include sys/bus.h @@ -63,6 +63,23 @@ struct arm32_bus_dma_tag awin_dma_tag = _BUS_DMATAG_FUNCS, }; +struct arm32_dma_range awin_coherent_dma_ranges[] = { + [0] = { + .dr_sysbase = AWIN_SDRAM_PBASE, + .dr_busbase = AWIN_SDRAM_PBASE, + .dr_flags = _BUS_DMAMAP_COHERENT, + }, +}; + + +struct arm32_bus_dma_tag awin_coherent_dma_tag = { + ._ranges = awin_coherent_dma_ranges, + ._nranges = __arraycount(awin_coherent_dma_ranges), + _BUS_DMAMAP_FUNCS, + _BUS_DMAMEM_FUNCS, + _BUS_DMATAG_FUNCS, +}; + #ifdef AWIN_CONSOLE_EARLY #include dev/ic/ns16550reg.h #include dev/ic/comreg.h @@ -181,6 +198,14 @@ awin_bootstrap(vaddr_t iobase, vaddr_t u #endif } +#if 0 +void +awin_dma_bootstrap(psize_t psize) +{ + awin_coherent_dma_ranges[0].dr_len = psize; +} +#endif + #ifdef MULTIPROCESSOR void awin_cpu_hatch(struct cpu_info *ci) Index: src/sys/arch/arm/allwinner/awin_var.h diff -u src/sys/arch/arm/allwinner/awin_var.h:1.8 src/sys/arch/arm/allwinner/awin_var.h:1.9 --- src/sys/arch/arm/allwinner/awin_var.h:1.8 Tue Feb 25 00:08:29 2014 +++ src/sys/arch/arm/allwinner/awin_var.h Wed Feb 26 00:19:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: awin_var.h,v 1.8 2014/02/25 00:08:29 jmcneill Exp $ */ +/* $NetBSD: awin_var.h,v 1.9 2014/02/26 00:19:01 matt Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. * All rights reserved. @@ -58,6 +58,7 @@ struct awinio_attach_args { bus_space_handle_t aio_core_bsh; bus_space_handle_t aio_ccm_bsh; bus_dma_tag_t aio_dmat; + bus_dma_tag_t aio_coherent_dmat; }; struct awin_gpio_pinset { @@ -75,9 +76,11 @@ extern struct bus_space awin_bs_tag; extern struct bus_space awin_a4x_bs_tag; extern bus_space_handle_t awin_core_bsh; extern struct arm32_bus_dma_tag awin_dma_tag; +extern struct arm32_bus_dma_tag awin_coherent_dma_tag; psize_t awin_memprobe(void); void awin_bootstrap(vaddr_t, vaddr_t); +void awin_dma_bootstrap(psize_t); void awin_pll6_enable(void); void awin_cpu_hatch(struct cpu_info *); Index: src/sys/arch/arm/allwinner/awin_io.c diff -u src/sys/arch/arm/allwinner/awin_io.c:1.7 src/sys/arch/arm/allwinner/awin_io.c:1.8 --- src/sys/arch/arm/allwinner/awin_io.c:1.7 Tue Feb 25 00:08:29 2014 +++ src/sys/arch/arm/allwinner/awin_io.c Wed Feb 26 00:19:01 2014 @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: awin_io.c,v 1.7 2014/02/25 00:08:29 jmcneill Exp $); +__KERNEL_RCSID(1, $NetBSD: awin_io.c,v 1.8 2014/02/26 00:19:01 matt Exp $); #include sys/param.h #include sys/bus.h @@ -56,6 +56,7 @@ static struct awinio_softc { bus_space_handle_t sc_bsh; bus_space_handle_t sc_ccm_bsh; bus_dma_tag_t sc_dmat; + bus_dma_tag_t sc_coherent_dmat; } awinio_sc; CFATTACH_DECL_NEW(awin_io, 0, @@ -152,6 +153,7 @@ awinio_attach(device_t parent, device_t sc-sc_a4x_bst = awin_a4x_bs_tag; sc-sc_bsh = awin_core_bsh; sc-sc_dmat = awin_dma_tag; + sc-sc_coherent_dmat = awin_coherent_dma_tag; bus_space_subregion(sc-sc_bst, sc-sc_bsh, AWIN_CCM_OFFSET, 0x1000, sc-sc_ccm_bsh); @@ -188,6 +190,7 @@ awinio_attach(device_t parent, device_t .aio_core_bsh = sc-sc_bsh, .aio_ccm_bsh = sc-sc_ccm_bsh, .aio_dmat = sc-sc_dmat, + .aio_coherent_dmat = sc-sc_coherent_dmat, }; cfdata_t cf = config_search_ia(awinio_find, sc-sc_dev, awinio, aio);
CVS commit: src/sys/arch/evbarm/cubie
Module Name:src Committed By: jmcneill Date: Wed Feb 26 00:12:21 UTC 2014 Modified Files: src/sys/arch/evbarm/cubie: cubie_machdep.c Log Message: sdhc - awinmmc To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/cubie/cubie_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/cubie/cubie_machdep.c diff -u src/sys/arch/evbarm/cubie/cubie_machdep.c:1.10 src/sys/arch/evbarm/cubie/cubie_machdep.c:1.11 --- src/sys/arch/evbarm/cubie/cubie_machdep.c:1.10 Thu Jan 30 00:08:46 2014 +++ src/sys/arch/evbarm/cubie/cubie_machdep.c Wed Feb 26 00:12:21 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cubie_machdep.c,v 1.10 2014/01/30 00:08:46 matt Exp $ */ +/* $NetBSD: cubie_machdep.c,v 1.11 2014/02/26 00:12:21 jmcneill Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cubie_machdep.c,v 1.10 2014/01/30 00:08:46 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cubie_machdep.c,v 1.11 2014/02/26 00:12:21 jmcneill Exp $); #include opt_machdep.h #include opt_ddb.h @@ -136,7 +136,6 @@ __KERNEL_RCSID(0, $NetBSD: cubie_machde #include opt_allwinner.h #include com.h -#include sdhc.h #include ukbd.h #include sys/param.h @@ -569,11 +568,7 @@ cubie_device_register(device_t self, voi return; } - if (device_is_a(self, sdhc)) { -#if 0 - prop_dictionary_set_uint32(dict, clkmask, 0); - prop_dictionary_set_bool(dict, 8bit, true); -#endif + if (device_is_a(self, awinmmc)) { return; }
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: matt Date: Wed Feb 26 00:29:23 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_gige.c Log Message: Make this compile To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/allwinner/awin_gige.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/allwinner/awin_gige.c diff -u src/sys/arch/arm/allwinner/awin_gige.c:1.3 src/sys/arch/arm/allwinner/awin_gige.c:1.4 --- src/sys/arch/arm/allwinner/awin_gige.c:1.3 Thu Feb 20 21:48:38 2014 +++ src/sys/arch/arm/allwinner/awin_gige.c Wed Feb 26 00:29:23 2014 @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: awin_gige.c,v 1.3 2014/02/20 21:48:38 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: awin_gige.c,v 1.4 2014/02/26 00:29:23 matt Exp $); #include sys/param.h #include sys/bus.h @@ -73,7 +73,7 @@ awin_gige_match(device_t parent, cfdata_ KASSERT(cf-cf_loc[AWINIOCF_PORT] == AWINIOCF_PORT_DEFAULT || cf-cf_loc[AWINIOCF_PORT] == loc-loc_port); - if (!awin_gpio_pinset_available(awin_gige_pinset)) + if (!awin_gpio_pinset_available(awin_gige_gpio_pinset)) return 0; return 1; @@ -88,7 +88,7 @@ awin_gige_attach(device_t parent, device sc-sc_dev = self; - awin_gpio_pinset_acquire(awin_gige_pinset); + awin_gpio_pinset_acquire(awin_gige_gpio_pinset); sc-sc_bst = aio-aio_core_bst; sc-sc_dmat = aio-aio_dmat;
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: matt Date: Wed Feb 26 00:30:57 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_board.c Log Message: Didn't want to comment out awin_dma_bootstrap To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/allwinner/awin_board.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/allwinner/awin_board.c diff -u src/sys/arch/arm/allwinner/awin_board.c:1.9 src/sys/arch/arm/allwinner/awin_board.c:1.10 --- src/sys/arch/arm/allwinner/awin_board.c:1.9 Wed Feb 26 00:19:01 2014 +++ src/sys/arch/arm/allwinner/awin_board.c Wed Feb 26 00:30:56 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: awin_board.c,v 1.9 2014/02/26 00:19:01 matt Exp $ */ +/* $NetBSD: awin_board.c,v 1.10 2014/02/26 00:30:56 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -34,7 +34,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: awin_board.c,v 1.9 2014/02/26 00:19:01 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: awin_board.c,v 1.10 2014/02/26 00:30:56 matt Exp $); #include sys/param.h #include sys/bus.h @@ -198,13 +198,11 @@ awin_bootstrap(vaddr_t iobase, vaddr_t u #endif } -#if 0 void awin_dma_bootstrap(psize_t psize) { awin_coherent_dma_ranges[0].dr_len = psize; } -#endif #ifdef MULTIPROCESSOR void
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: matt Date: Wed Feb 26 00:32:21 UTC 2014 Modified Files: src/sys/arch/evbarm/conf: CUBIEBOARD Log Message: Add awge bump symtab space. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/conf/CUBIEBOARD 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/CUBIEBOARD diff -u src/sys/arch/evbarm/conf/CUBIEBOARD:1.9 src/sys/arch/evbarm/conf/CUBIEBOARD:1.10 --- src/sys/arch/evbarm/conf/CUBIEBOARD:1.9 Tue Feb 25 00:09:00 2014 +++ src/sys/arch/evbarm/conf/CUBIEBOARD Wed Feb 26 00:32:21 2014 @@ -1,5 +1,5 @@ # -# $NetBSD: CUBIEBOARD,v 1.9 2014/02/25 00:09:00 jmcneill Exp $ +# $NetBSD: CUBIEBOARD,v 1.10 2014/02/26 00:32:21 matt Exp $ # # CUBIEBOARD -- Allwinner A10/A20 Eval Board Kernel # @@ -139,7 +139,7 @@ options DDB_ONPANIC=1 options DDB_HISTORY_SIZE=100 # Enable history editing in DDB #options KGDB makeoptions DEBUG=-g # compile full symbol table -options SYMTAB_SPACE=80 +options SYMTAB_SPACE=82 ## USB Debugging options options USB_DEBUG @@ -263,8 +263,10 @@ ahcisata* at awinio0 atabus* at ata? wd* at atabus? drive ? -# 10/100/1000 Ethernet (A10/A20) +# 10/100 Ethernet (A10/A20) awe0 at awinio0 port ? +# 10/100/1000 Ethernet (A10/A20) +awge0 at awinio0 port ? include dev/usb/usbdevices.config
CVS commit: src/sys/arch/evbarm/cubie
Module Name:src Committed By: jmcneill Date: Wed Feb 26 00:39:50 UTC 2014 Modified Files: src/sys/arch/evbarm/cubie: cubie_machdep.c Log Message: hook up MMC0 to status-led2 To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/cubie/cubie_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/cubie/cubie_machdep.c diff -u src/sys/arch/evbarm/cubie/cubie_machdep.c:1.12 src/sys/arch/evbarm/cubie/cubie_machdep.c:1.13 --- src/sys/arch/evbarm/cubie/cubie_machdep.c:1.12 Wed Feb 26 00:20:59 2014 +++ src/sys/arch/evbarm/cubie/cubie_machdep.c Wed Feb 26 00:39:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cubie_machdep.c,v 1.12 2014/02/26 00:20:59 matt Exp $ */ +/* $NetBSD: cubie_machdep.c,v 1.13 2014/02/26 00:39:50 jmcneill Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cubie_machdep.c,v 1.12 2014/02/26 00:20:59 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cubie_machdep.c,v 1.13 2014/02/26 00:39:50 jmcneill Exp $); #include opt_machdep.h #include opt_ddb.h @@ -600,6 +600,11 @@ cubie_device_register(device_t self, voi } if (device_is_a(self, awinmmc)) { + struct awinio_attach_args * const aio = aux; + if (aio-aio_loc.loc_port == 0) { + prop_dictionary_set_cstring(dict, + led-gpio, status-led2); + } return; }
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: jmcneill Date: Wed Feb 26 00:39:30 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_mmc.c Log Message: blink status LED during data transfers To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/allwinner/awin_mmc.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/allwinner/awin_mmc.c diff -u src/sys/arch/arm/allwinner/awin_mmc.c:1.1 src/sys/arch/arm/allwinner/awin_mmc.c:1.2 --- src/sys/arch/arm/allwinner/awin_mmc.c:1.1 Tue Feb 25 00:08:29 2014 +++ src/sys/arch/arm/allwinner/awin_mmc.c Wed Feb 26 00:39:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: awin_mmc.c,v 1.1 2014/02/25 00:08:29 jmcneill Exp $ */ +/* $NetBSD: awin_mmc.c,v 1.2 2014/02/26 00:39:30 jmcneill Exp $ */ /*- * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca @@ -29,7 +29,7 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: awin_mmc.c,v 1.1 2014/02/25 00:08:29 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: awin_mmc.c,v 1.2 2014/02/26 00:39:30 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -93,6 +93,8 @@ struct awin_mmc_softc { struct awin_gpio_pindata sc_gpio_detect; /* card detect */ bool sc_has_gpio_wp; struct awin_gpio_pindata sc_gpio_wp; /* write protect */ + bool sc_has_gpio_led; + struct awin_gpio_pindata sc_gpio_led; /* LED */ }; CFATTACH_DECL_NEW(awin_mmc, sizeof(struct awin_mmc_softc), @@ -189,6 +191,14 @@ awin_mmc_attach(device_t parent, device_ sc-sc_has_gpio_wp = true; } } + if (prop_dictionary_get_cstring_nocopy(cfg, led-gpio, pin_name)) { + if (!awin_gpio_pin_reserve(pin_name, sc-sc_gpio_led)) { + aprint_error_dev(self, + failed to reserve GPIO \%s\\n, pin_name); + } else { + sc-sc_has_gpio_led = true; + } + } awin_mmc_host_reset(sc); awin_mmc_bus_width(sc, 1); @@ -208,6 +218,14 @@ awin_mmc_attach(device_t parent, device_ sc-sc_sdmmc_dev = config_found(self, saa, NULL); } +static void +awin_mmc_led(struct awin_mmc_softc *sc, int on) +{ + if (!sc-sc_has_gpio_led) + return; + awin_gpio_pindata_write(sc-sc_gpio_led, on); +} + static int awin_mmc_host_reset(sdmmc_chipset_handle_t sch) { @@ -448,7 +466,9 @@ awin_mmc_exec_command(sdmmc_chipset_hand MMC_WRITE(sc, AWIN_MMC_CMD, cmdval | cmd-c_opcode); cmd-c_resid = cmd-c_datalen; cmd-c_buf = cmd-c_data; + awin_mmc_led(sc, 0); cmd-c_error = awin_mmc_xfer_data(sc, cmd); + awin_mmc_led(sc, 1); if (cmd-c_error) { aprint_error_dev(sc-sc_dev, xfer data timeout\n);
CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Wed Feb 26 00:59:27 UTC 2014 Modified Files: src/sys/arch/arm/include [matt-nb5-mips64]: elf_machdep.h Log Message: Use right name To generate a diff of this commit: cvs rdiff -u -r1.7.78.2 -r1.7.78.3 src/sys/arch/arm/include/elf_machdep.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/include/elf_machdep.h diff -u src/sys/arch/arm/include/elf_machdep.h:1.7.78.2 src/sys/arch/arm/include/elf_machdep.h:1.7.78.3 --- src/sys/arch/arm/include/elf_machdep.h:1.7.78.2 Tue Feb 25 00:05:49 2014 +++ src/sys/arch/arm/include/elf_machdep.h Wed Feb 26 00:59:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.7.78.2 2014/02/25 00:05:49 matt Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.7.78.3 2014/02/26 00:59:27 matt Exp $ */ #ifndef _ARM_ELF_MACHDEP_H_ #define _ARM_ELF_MACHDEP_H_ @@ -146,7 +146,7 @@ #ifdef _KERNEL #ifdef ELFSIZE -#define ELF_MD_COREDUMP_FUNC ELFNAME2(arm_netbsd,coredump_setup) +#define ELF_MD_COREDUMP_SETUP ELFNAME2(arm_netbsd,coredump_setup) #endif struct exec_package;
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: matt Date: Wed Feb 26 01:03:03 UTC 2014 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Add PMAP_PTE flag. (map page so it can be used as a PDE or PTE page) To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/sys/arch/arm/include/arm32/pmap.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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.122 src/sys/arch/arm/include/arm32/pmap.h:1.123 --- src/sys/arch/arm/include/arm32/pmap.h:1.122 Sun Aug 18 05:01:47 2013 +++ src/sys/arch/arm/include/arm32/pmap.h Wed Feb 26 01:03:03 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.122 2013/08/18 05:01:47 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.123 2014/02/26 01:03:03 matt Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -294,6 +294,8 @@ u_int arm32_mmap_flags(paddr_t); #define ARM32_MMAP_CACHEABLE 0x2000 #define pmap_mmap_flags(ppn) arm32_mmap_flags(ppn) +#define PMAP_PTE 0x1000 /* kenter_pa */ + /* * Functions that we need to export */
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Wed Feb 26 01:05:52 UTC 2014 Modified Files: src/sys/arch/arm/arm32: bus_dma.c Log Message: Use kmem instead of malloc. Fix various corner cases with bounce buffers. Use PMAP_NOCACHE instead of manipulating PTEs directly. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sys/arch/arm/arm32/bus_dma.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/arm32/bus_dma.c diff -u src/sys/arch/arm/arm32/bus_dma.c:1.80 src/sys/arch/arm/arm32/bus_dma.c:1.81 --- src/sys/arch/arm/arm32/bus_dma.c:1.80 Mon Feb 18 16:03:25 2013 +++ src/sys/arch/arm/arm32/bus_dma.c Wed Feb 26 01:05:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.80 2013/02/18 16:03:25 matt Exp $ */ +/* $NetBSD: bus_dma.c,v 1.81 2014/02/26 01:05:52 matt Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -32,8 +32,10 @@ #define _ARM32_BUS_DMA_PRIVATE +#include opt_arm_bus_space.h + #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.80 2013/02/18 16:03:25 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.81 2014/02/26 01:05:52 matt Exp $); #include sys/param.h #include sys/systm.h @@ -43,7 +45,7 @@ __KERNEL_RCSID(0, $NetBSD: bus_dma.c,v #include sys/reboot.h #include sys/conf.h #include sys/file.h -#include sys/malloc.h +#include sys/kmem.h #include sys/mbuf.h #include sys/vnode.h #include sys/device.h @@ -64,6 +66,8 @@ static struct evcnt bus_dma_loads = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, loads); static struct evcnt bus_dma_bounced_loads = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, bounced loads); +static struct evcnt bus_dma_coherent_loads = + EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, coherent loads); static struct evcnt bus_dma_read_bounces = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, read bounces); static struct evcnt bus_dma_write_bounces = @@ -97,6 +101,7 @@ EVCNT_ATTACH_STATIC(bus_dma_creates); EVCNT_ATTACH_STATIC(bus_dma_bounced_creates); EVCNT_ATTACH_STATIC(bus_dma_loads); EVCNT_ATTACH_STATIC(bus_dma_bounced_loads); +EVCNT_ATTACH_STATIC(bus_dma_coherent_loads); EVCNT_ATTACH_STATIC(bus_dma_read_bounces); EVCNT_ATTACH_STATIC(bus_dma_write_bounces); EVCNT_ATTACH_STATIC(bus_dma_unloads); @@ -315,7 +320,6 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ { struct arm32_bus_dmamap *map; void *mapstore; - size_t mapsize; #ifdef DEBUG_DMA printf(dmamap_create: t=%p size=%lx nseg=%x msegsz=%lx boundary=%lx flags=%x\n, @@ -334,10 +338,10 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ * The bus_dmamap_t includes one bus_dma_segment_t, hence * the (nsegments - 1). */ - mapsize = sizeof(struct arm32_bus_dmamap) + + const size_t mapsize = sizeof(struct arm32_bus_dmamap) + (sizeof(bus_dma_segment_t) * (nsegments - 1)); - const int mallocflags = M_ZERO|(flags BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK; - if ((mapstore = malloc(mapsize, M_DMAMAP, mallocflags)) == NULL) + const int zallocflags = (flags BUS_DMA_NOWAIT) ? KM_NOSLEEP : KM_SLEEP; + if ((mapstore = kmem_intr_zalloc(mapsize, zallocflags)) == NULL) return (ENOMEM); map = (struct arm32_bus_dmamap *)mapstore; @@ -360,7 +364,6 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ struct arm32_bus_dma_cookie *cookie; int cookieflags; void *cookiestore; - size_t cookiesize; int error; cookieflags = 0; @@ -379,13 +382,13 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ return 0; } - cookiesize = sizeof(struct arm32_bus_dma_cookie) + + const size_t cookiesize = sizeof(struct arm32_bus_dma_cookie) + (sizeof(bus_dma_segment_t) * map-_dm_segcnt); /* * Allocate our cookie. */ - if ((cookiestore = malloc(cookiesize, M_DMAMAP, mallocflags)) == NULL) { + if ((cookiestore = kmem_intr_zalloc(cookiesize, zallocflags)) == NULL) { error = ENOMEM; goto out; } @@ -426,13 +429,16 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus * Free any bounce pages this map might hold. */ if (cookie != NULL) { + const size_t cookiesize = sizeof(struct arm32_bus_dma_cookie) + + (sizeof(bus_dma_segment_t) * map-_dm_segcnt); + if (cookie-id_flags _BUS_DMA_IS_BOUNCING) STAT_INCR(bounced_unloads); map-dm_nsegs = 0; if (cookie-id_flags _BUS_DMA_HAS_BOUNCE) _bus_dma_free_bouncebuf(t, map); STAT_INCR(bounced_destroys); - free(cookie, M_DMAMAP); + kmem_intr_free(cookie, cookiesize); } else #endif STAT_INCR(destroys); @@ -440,7 +446,9 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus if (map-dm_nsegs 0) STAT_INCR(unloads); - free(map, M_DMAMAP); + const size_t mapsize = sizeof(struct arm32_bus_dmamap) + + (sizeof(bus_dma_segment_t) * (map-_dm_segcnt - 1)); + kmem_intr_free(map, mapsize); } /* @@ -501,6 +509,11 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm map-_dm_vmspace = vm; map-_dm_origbuf = buf; map-_dm_buftype = _BUS_DMA_BUFTYPE_LINEAR; + if
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Wed Feb 26 01:41:40 UTC 2014 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Add support for PMAP_PTE to pmap_kenter_pa To generate a diff of this commit: cvs rdiff -u -r1.264 -r1.265 src/sys/arch/arm/arm32/pmap.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/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.264 src/sys/arch/arm/arm32/pmap.c:1.265 --- src/sys/arch/arm/arm32/pmap.c:1.264 Thu Sep 12 14:45:18 2013 +++ src/sys/arch/arm/arm32/pmap.c Wed Feb 26 01:41:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.264 2013/09/12 14:45:18 kiyohara Exp $ */ +/* $NetBSD: pmap.c,v 1.265 2014/02/26 01:41:40 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -209,7 +209,7 @@ #include arm/locore.h #include arm/arm32/katelib.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.264 2013/09/12 14:45:18 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.265 2014/02/26 01:41:40 matt Exp $); #ifdef PMAP_DEBUG @@ -3371,7 +3371,10 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v } const pt_entry_t npte = L2_S_PROTO | pa | L2_S_PROT(PTE_KERNEL, prot) - | ((flags PMAP_NOCACHE) ? 0 : pte_l2_s_cache_mode); + | ((flags PMAP_NOCACHE) + ? 0 + : ((flags PMAP_PTE) + ? pte_l2_s_cache_mode_pt : pte_l2_s_cache_mode)); l2pte_set(ptep, npte, opte); PTE_SYNC(ptep); @@ -4887,7 +4890,7 @@ pmap_grow_map(vaddr_t va, pt_entry_t cac */ KASSERT(SLIST_EMPTY(md-pvh_list)); pmap_kenter_pa(va, pa, - VM_PROT_READ|VM_PROT_WRITE, PMAP_KMPAGE); + VM_PROT_READ|VM_PROT_WRITE, PMAP_KMPAGE|PMAP_PTE); #endif } @@ -5552,12 +,10 @@ void pmap_postinit(void) { extern paddr_t physical_start, physical_end; - struct l2_bucket *l2b; struct l1_ttable *l1; struct pglist plist; struct vm_page *m; pd_entry_t *pl1pt; - pt_entry_t *ptep, pte; vaddr_t va, eva; u_int loop, needed; int error; @@ -5591,20 +5592,7 @@ pmap_postinit(void) paddr_t pa = VM_PAGE_TO_PHYS(m); pmap_kenter_pa(va, pa, - VM_PROT_READ|VM_PROT_WRITE, PMAP_KMPAGE); - - /* - * Make sure the L1 descriptor table is mapped - * with the cache-mode set to write-through. - */ - l2b = pmap_get_l2_bucket(pmap_kernel(), va); - KDASSERT(l2b != NULL); - ptep = l2b-l2b_kva[l2pte_index(va)]; - pte = *ptep; - pte = (pte ~L2_S_CACHE_MASK) | pte_l2_s_cache_mode_pt; - *ptep = pte; - PTE_SYNC(ptep); - cpu_tlb_flushD_SE(va); + VM_PROT_READ|VM_PROT_WRITE, PMAP_KMPAGE|PMAP_PTE); va += PAGE_SIZE; m = TAILQ_NEXT(m, pageq.queue);
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: matt Date: Wed Feb 26 01:45:33 UTC 2014 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Replace 1000 with PAGE_SIZE To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/arch/arm/include/arm32/pmap.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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.123 src/sys/arch/arm/include/arm32/pmap.h:1.124 --- src/sys/arch/arm/include/arm32/pmap.h:1.123 Wed Feb 26 01:03:03 2014 +++ src/sys/arch/arm/include/arm32/pmap.h Wed Feb 26 01:45:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.123 2014/02/26 01:03:03 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.124 2014/02/26 01:45:33 matt Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -80,6 +80,30 @@ #include uvm/uvm_object.h #endif +#ifdef ARM_MMU_EXTENDED +#define PMAP_TLB_MAX 1 +#define PMAP_TLB_HWPAGEWALKER 1 +#define PMAP_TLB_NUM_PIDS 256 +#define cpu_set_tlb_info(ci, ti)((void)((ci)-ci_tlb_info = (ti))) +#if PMAP_TLB_MAX 1 +#define cpu_tlb_info(ci) ((ci)-ci_tlb_info) +#else +#define cpu_tlb_info(ci) (pmap_tlb0_info) +#endif +#define pmap_md_tlb_asid_max() (PMAP_TLB_NUM_PIDS - 1) +#include uvm/pmap/tlb.h +#include uvm/pmap/pmap_tlb.h + +/* + * If we have an EXTENDED MMU and the address space is split evenly between + * user and kernel, we can use the TTBR0/TTBR1 to have separate L1 tables for + * user and kernel address spaces. + */ +#if KERNEL_BASE != 0x8000 +#error ARMv6 or later systems must have a KERNEL_BASE of 0x800 +#endif +#endif /* ARM_MMU_EXTENDED */ + /* * a pmap describes a processes' 4GB virtual address space. this * virtual address space can be broken up into 4096 1MB regions which @@ -111,6 +135,8 @@ * space per l2_dtable. Most processes will, therefore, require only two or * three of these to map their whole working set. */ +#define L2_BUCKET_XLOG2 (L1_S_SHIFT) +#define L2_BUCKET_XSIZE (1 L2_BUCKET_XLOG2) #define L2_BUCKET_LOG2 4 #define L2_BUCKET_SIZE (1 L2_BUCKET_LOG2) @@ -119,7 +145,7 @@ * of l2_dtable structures required to track all possible page descriptors * mappable by an L1 translation table is given by the following constants: */ -#define L2_LOG2 ((32 - L1_S_SHIFT) - L2_BUCKET_LOG2) +#define L2_LOG2 (32 - (L2_BUCKET_XLOG2 + L2_BUCKET_LOG2)) #define L2_SIZE (1 L2_LOG2) /* @@ -134,6 +160,7 @@ #ifndef _LOCORE +#ifndef PMAP_MMU_EXTENDED struct l1_ttable; struct l2_dtable; @@ -165,6 +192,7 @@ union pmap_cache_state { * Assigned to cs_all to force cacheops to work for a particular pmap */ #define PMAP_CACHE_STATE_ALL 0xu +#endif /* !ARM_MMU_EXTENDED */ /* * This structure is used by machine-dependent code to describe @@ -182,21 +210,38 @@ struct pmap_devmap { * The pmap structure itself */ struct pmap { - uint8_t pm_domain; - bool pm_remove_all; - bool pm_activated; - struct l1_ttable *pm_l1; -#ifndef ARM_HAS_VBAR - pd_entry_t *pm_pl1vec; -#endif - pd_entry_t pm_l1vec; - union pmap_cache_state pm_cstate; struct uvm_object pm_obj; kmutex_t pm_obj_lock; #define pm_lock pm_obj.vmobjlock +#ifndef ARM_HAS_VBAR + pd_entry_t *pm_pl1vec; + pd_entry_t pm_l1vec; +#endif struct l2_dtable *pm_l2[L2_SIZE]; struct pmap_statistics pm_stats; LIST_ENTRY(pmap) pm_list; +#ifdef ARM_MMU_EXTENDED + pd_entry_t *pm_l1; + paddr_t pm_l1_pa; + bool pm_remove_all; +#ifdef MULTIPROCESSOR + kcpuset_t *pm_onproc; + kcpuset_t *pm_active; + struct pmap_asid_info pm_pai[2]; +#else + struct pmap_asid_info pm_pai[1]; +#endif +#else + struct l1_ttable *pm_l1; + union pmap_cache_state pm_cstate; + uint8_t pm_domain; + bool pm_activated; + bool pm_remove_all; +#endif +}; + +struct pmap_kernel { + struct pmap kernel_pmap; }; /* @@ -306,6 +351,7 @@ bool pmap_extract(pmap_t, vaddr_t, paddr #define PMAP_NEED_PROCWR #define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */ #define PMAP_ENABLE_PMAP_KMPAGE /* enable the PMAP_KMPAGE flag */ +#define PMAP_PTE 0x0100 /* Use PTE cache settings */ #if (ARM_MMU_V6 + ARM_MMU_V7) 0 #define PMAP_PREFER(hint, vap, sz, td) pmap_prefer((hint), (vap), (td)) @@ -324,6 +370,7 @@ void pmap_bootstrap(vaddr_t, vaddr_t); void pmap_do_remove(pmap_t, vaddr_t, vaddr_t, int); int pmap_fault_fixup(pmap_t, vaddr_t, vm_prot_t, int); +int pmap_prefetchabt_fixup(void *); bool pmap_get_pde_pte(pmap_t, vaddr_t, pd_entry_t **, pt_entry_t **); bool pmap_get_pde(pmap_t, vaddr_t, pd_entry_t **); struct pcb; @@ -371,6 +418,8 @@ vtopte(vaddr_t va) pd_entry_t *pdep; pt_entry_t *ptep; + KASSERT(trunc_page(va) == va); + if (pmap_get_pde_pte(pmap_kernel(), va, pdep, ptep) == false) return (NULL); return (ptep); @@ -437,32 +486,63 @@ pmap_ptesync(pt_entry_t *ptep, size_t cn #endif } -#define PTE_SYNC(ptep)
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Wed Feb 26 01:51:11 UTC 2014 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: l2pte_valid - l2pte_valid_p To generate a diff of this commit: cvs rdiff -u -r1.265 -r1.266 src/sys/arch/arm/arm32/pmap.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/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.265 src/sys/arch/arm/arm32/pmap.c:1.266 --- src/sys/arch/arm/arm32/pmap.c:1.265 Wed Feb 26 01:41:40 2014 +++ src/sys/arch/arm/arm32/pmap.c Wed Feb 26 01:51:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.265 2014/02/26 01:41:40 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.266 2014/02/26 01:51:11 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -209,7 +209,7 @@ #include arm/locore.h #include arm/arm32/katelib.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.265 2014/02/26 01:41:40 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.266 2014/02/26 01:51:11 matt Exp $); #ifdef PMAP_DEBUG @@ -1788,7 +1788,7 @@ pmap_vac_me_user(struct vm_page_md *md, pt_entry_t npte = opte ~L2_S_CACHE_MASK; if ((va != pv-pv_va || pm != pv-pv_pmap) - l2pte_valid(npte)) { + l2pte_valid_p(npte)) { #ifdef PMAP_CACHE_VIVT pmap_cache_wbinv_page(pv-pv_pmap, pv-pv_va, true, pv-pv_flags); @@ -1823,7 +1823,7 @@ pmap_vac_me_user(struct vm_page_md *md, pt_entry_t npte = (opte ~L2_S_CACHE_MASK) | pte_l2_s_cache_mode; - if (l2pte_valid(opte)) { + if (l2pte_valid_p(opte)) { pmap_tlb_flush_SE(pv-pv_pmap, pv-pv_va, pv-pv_flags); } @@ -2115,7 +2115,7 @@ pmap_vac_me_harder(struct vm_page_md *md if (opte == npte) /* only update is there's a change */ continue; - if (l2pte_valid(npte)) { + if (l2pte_valid_p(npte)) { pmap_tlb_flush_SE(pv-pv_pmap, pv-pv_va, pv-pv_flags); } @@ -2269,7 +2269,7 @@ pmap_clearbit(struct vm_page_md *md, pad if (maskbits PVF_REF) { if ((pv-pv_flags PVF_NC) == 0 (maskbits (PVF_WRITE|PVF_MOD)) == 0 - l2pte_valid(npte)) { + l2pte_valid_p(npte)) { #ifdef PMAP_CACHE_VIVT /* * Check npte here; we may have already @@ -2934,7 +2934,7 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ * initially) then make sure to frob * the cache. */ -if (!(oflags PVF_NC) l2pte_valid(opte)) { +if (!(oflags PVF_NC) l2pte_valid_p(opte)) { pmap_cache_wbinv_page(pm, va, true, oflags); } @@ -2992,7 +2992,7 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ oflags = pv-pv_flags; #ifdef PMAP_CACHE_VIVT - if (!(oflags PVF_NC) l2pte_valid(opte)) { + if (!(oflags PVF_NC) l2pte_valid_p(opte)) { pmap_cache_wbinv_page(pm, va, true, oflags); } #endif @@ -3032,7 +3032,7 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ * We only need to frob the cache/tlb if this pmap * is current */ - if (!vector_page_p l2pte_valid(npte)) { + if (!vector_page_p l2pte_valid_p(npte)) { /* * This mapping is likely to be accessed as * soon as we return to userland. Fix up the @@ -3186,7 +3186,7 @@ pmap_remove(pmap_t pm, vaddr_t sva, vadd } mappings++; - if (!l2pte_valid(opte)) { + if (!l2pte_valid_p(opte)) { /* * Ref/Mod emulation is still active for this * mapping, therefore it is has not yet been @@ -3361,7 +3361,7 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v pv = pmap_kremove_pg(opg, va); } #endif - if (l2pte_valid(opte)) { + if (l2pte_valid_p(opte)) { #ifdef PMAP_CACHE_VIVT cpu_dcache_wbinv_range(va, PAGE_SIZE); #endif @@ -3487,7 +3487,7 @@ pmap_kremove(vaddr_t va, vsize_t len) #endif } } - if (l2pte_valid(opte)) { + if (l2pte_valid_p(opte)) { #ifdef PMAP_CACHE_VIVT cpu_dcache_wbinv_range(va, PAGE_SIZE); #endif @@ -3617,7 +3617,7 @@ pmap_protect(pmap_t pm, vaddr_t sva, vad while (sva next_bucket) { pte = *ptep; - if (l2pte_valid(pte) != 0 l2pte_writable_p(pte)) { + if (l2pte_valid_p(pte) != 0 l2pte_writable_p(pte)) { struct vm_page *pg; u_int f; @@ -3701,7 +3701,7 @@ pmap_icache_sync_range(pmap_t pm, vaddr_ for (ptep = l2b-l2b_kva[l2pte_index(sva)]; sva next_bucket; sva += page_size, ptep++, page_size = PAGE_SIZE) { - if (l2pte_valid(*ptep)) { + if (l2pte_valid_p(*ptep)) { cpu_icache_sync_range(sva, min(page_size, eva - sva)); } @@ -3987,7 +3987,7 @@ pmap_fault_fixup(pmap_t pm, vaddr_t va, if (rv == 0 curcpu()-ci_arm_cputype == CPU_ID_SA110 curcpu()-ci_arm_cpurev 3) { /* Always current pmap */ - if (l2pte_valid(pte)) { + if (l2pte_valid_p(pte)) { extern int kernel_debug; if (kernel_debug 1) { struct proc *p = curlwp-l_proc;
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: matt Date: Wed Feb 26 01:51:51 UTC 2014 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Remove duplicate PMAP_PTE To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/sys/arch/arm/include/arm32/pmap.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/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.124 src/sys/arch/arm/include/arm32/pmap.h:1.125 --- src/sys/arch/arm/include/arm32/pmap.h:1.124 Wed Feb 26 01:45:33 2014 +++ src/sys/arch/arm/include/arm32/pmap.h Wed Feb 26 01:51:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.124 2014/02/26 01:45:33 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.125 2014/02/26 01:51:51 matt Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -351,7 +351,6 @@ bool pmap_extract(pmap_t, vaddr_t, paddr #define PMAP_NEED_PROCWR #define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */ #define PMAP_ENABLE_PMAP_KMPAGE /* enable the PMAP_KMPAGE flag */ -#define PMAP_PTE 0x0100 /* Use PTE cache settings */ #if (ARM_MMU_V6 + ARM_MMU_V7) 0 #define PMAP_PREFER(hint, vap, sz, td) pmap_prefer((hint), (vap), (td))
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: matt Date: Wed Feb 26 01:53:23 UTC 2014 Modified Files: src/sys/arch/arm/include/arm32: pte.h Log Message: Add XN bit L2 large pages. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/include/arm32/pte.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/include/arm32/pte.h diff -u src/sys/arch/arm/include/arm32/pte.h:1.14 src/sys/arch/arm/include/arm32/pte.h:1.15 --- src/sys/arch/arm/include/arm32/pte.h:1.14 Sat Feb 22 20:46:35 2014 +++ src/sys/arch/arm/include/arm32/pte.h Wed Feb 26 01:53:23 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.14 2014/02/22 20:46:35 matt Exp $ */ +/* $NetBSD: pte.h,v 1.15 2014/02/26 01:53:23 matt Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -227,6 +227,7 @@ typedef uint32_t pt_entry_t; /* L2 table #define L2_XS_nG 0x0800 /* ARMv6 Not-Global */ #define L2_V6_L_TEX L2_XS_L_TEX #define L2_V6_XS_TEX L2_XS_T_TEX +#define L2_XS_L_XN 0x8000 /* ARMv6 eXecute Never */ /* @@ -239,7 +240,7 @@ typedef uint32_t pt_entry_t; /* L2 table * Access Permissions for L1 and L2 of ARMv6 with XP=1 and ARMv7 */ #define AP_R 0x01 /* readable */ -#define AP_RO 0x20 /* read-only */ +#define AP_RO 0x20 /* read-only (L2_XS_APX 4) */ /* * Short-hand for common AP_* constants.
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Wed Feb 26 01:54:10 UTC 2014 Modified Files: src/sys/arch/arm/include: cpu_counter.h Log Message: ci_cpu_id - ci_arm_cpuid To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/include/cpu_counter.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/include/cpu_counter.h diff -u src/sys/arch/arm/include/cpu_counter.h:1.2 src/sys/arch/arm/include/cpu_counter.h:1.3 --- src/sys/arch/arm/include/cpu_counter.h:1.2 Wed Aug 29 18:45:40 2012 +++ src/sys/arch/arm/include/cpu_counter.h Wed Feb 26 01:54:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_counter.h,v 1.2 2012/08/29 18:45:40 matt Exp $ */ +/* $NetBSD: cpu_counter.h,v 1.3 2014/02/26 01:54:10 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ static __inline uint32_t cpu_counter32(void) { #if defined(CPU_CORTEX) defined(CPU_ARM11) - const bool cortex_p = CPU_ID_CORTEX_P(curcpu()-ci_cpu_id); + const bool cortex_p = CPU_ID_CORTEX_P(curcpu()-ci_arm_cpuid); #elif defined(CPU_CORTEX) const bool cortex_p = true; #elif defined(CPU_ARM11)
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Wed Feb 26 01:54:35 UTC 2014 Modified Files: src/sys/arch/arm/include: locore.h Log Message: Add arm_cpu_max To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/include/locore.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/include/locore.h diff -u src/sys/arch/arm/include/locore.h:1.12 src/sys/arch/arm/include/locore.h:1.13 --- src/sys/arch/arm/include/locore.h:1.12 Sat Feb 1 01:19:50 2014 +++ src/sys/arch/arm/include/locore.h Wed Feb 26 01:54:35 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.h,v 1.12 2014/02/01 01:19:50 joerg Exp $ */ +/* $NetBSD: locore.h,v 1.13 2014/02/26 01:54:35 matt Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -153,6 +153,8 @@ extern int cpu_do_powersave; extern int cpu_fpu_present; extern int cpu_hwdiv_present; +extern u_int arm_cpu_max; + #if !defined(CPU_ARMV7) #define CPU_IS_ARMV7_P() false #elif defined(CPU_ARMV6) || defined(CPU_PRE_ARMV6)
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: matt Date: Wed Feb 26 01:55:02 UTC 2014 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: Use PAGE_SIZE instead of 1000 To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/include/arm32/vmparam.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/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.30 src/sys/arch/arm/include/arm32/vmparam.h:1.31 --- src/sys/arch/arm/include/arm32/vmparam.h:1.30 Fri Feb 21 22:05:58 2014 +++ src/sys/arch/arm/include/arm32/vmparam.h Wed Feb 26 01:55:02 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.30 2014/02/21 22:05:58 skrll Exp $ */ +/* $NetBSD: vmparam.h,v 1.31 2014/02/26 01:55:02 matt Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -77,12 +77,12 @@ /* * Mach derived constants */ -#define VM_MIN_ADDRESS ((vaddr_t) 0x1000) -#define VM_MAXUSER_ADDRESS ((vaddr_t) KERNEL_BASE - 0x1000) +#define VM_MIN_ADDRESS ((vaddr_t) PAGE_SIZE) +#define VM_MAXUSER_ADDRESS ((vaddr_t) KERNEL_BASE - PAGE_SIZE) #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS #define VM_MIN_KERNEL_ADDRESS ((vaddr_t) KERNEL_BASE) -#define VM_MAX_KERNEL_ADDRESS ((vaddr_t) 0xefff) +#define VM_MAX_KERNEL_ADDRESS ((vaddr_t) -(PAGE_SIZE+1)) #ifndef __ASSEMBLER__ /* XXX max. amount of KVM to be used by buffers. */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: matt Date: Wed Feb 26 01:56:51 UTC 2014 Modified Files: src/sys/arch/arm/include/arm32: frame.h Log Message: Remove KERNEL_LOCK/KERNEL_UNLOCK To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/arm/include/arm32/frame.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/include/arm32/frame.h diff -u src/sys/arch/arm/include/arm32/frame.h:1.38 src/sys/arch/arm/include/arm32/frame.h:1.39 --- src/sys/arch/arm/include/arm32/frame.h:1.38 Fri Dec 20 07:01:06 2013 +++ src/sys/arch/arm/include/arm32/frame.h Wed Feb 26 01:56:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.38 2013/12/20 07:01:06 matt Exp $ */ +/* $NetBSD: frame.h,v 1.39 2014/02/26 01:56:51 matt Exp $ */ /* * Copyright (c) 1994-1997 Mark Brinicombe. @@ -133,22 +133,6 @@ void validate_trapframe(trapframe_t *, i #define DO_PENDING_SOFTINTS /* nothing */ #endif -#ifdef MULTIPROCESSOR -#define KERNEL_LOCK \ - mov r0, #1 ;\ - mov r1, #0 ;\ - bl _C_LABEL(_kernel_lock) - -#define KERNEL_UNLOCK \ - mov r0, #1 ;\ - mov r1, #0 ;\ - mov r2, #0 ;\ - bl _C_LABEL(_kernel_unlock) -#else -#define KERNEL_LOCK /* nothing */ -#define KERNEL_UNLOCK /* nothing */ -#endif - #ifdef _ARM_ARCH_6 #define GET_CPSR(rb) /* nothing */ #define CPSID_I(ra,rb) cpsid i @@ -201,7 +185,7 @@ void validate_trapframe(trapframe_t *, i ldr r1, [r4, #CI_CTRL] /* Fetch control register */ ;\ mov r0, #-1 ;\ BL_CF_CONTROL(r2) /* Enable alignment faults */ ;\ -1: KERNEL_LOCK +1: /* done */ /* * This macro must be invoked just before PULLFRAMEFROMSVCANDEXIT or @@ -236,7 +220,7 @@ void validate_trapframe(trapframe_t *, i bl _C_LABEL(ast) /* ast(frame) */ ;\ CPSID_I(r0, r5) /* Disable interrupts */ ;\ b 1b /* Back around again */ ;\ -3: KERNEL_UNLOCK +3: /* done */ #else /* !EXEC_AOUT */ @@ -244,8 +228,8 @@ void validate_trapframe(trapframe_t *, i #define ENABLE_ALIGNMENT_FAULTS \ and r7, r0, #(PSR_MODE) /* Test for USR32 mode */ ;\ - GET_CURCPU(r4) /* r4 = cpuinfo */ ;\ - KERNEL_LOCK + GET_CURCPU(r4) /* r4 = cpuinfo */ + #define DO_AST_AND_RESTORE_ALIGNMENT_FAULTS\ DO_PENDING_SOFTINTS ;\ @@ -263,7 +247,7 @@ void validate_trapframe(trapframe_t *, i bl _C_LABEL(ast) /* ast(frame) */ ;\ CPSID_I(r0, r5) /* Disable interrupts */ ;\ b 1b ;\ -2: KERNEL_UNLOCK /* unlock the kernel */ +2: /* done */ #endif /* EXEC_AOUT */ #ifndef _ARM_ARCH_6
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Wed Feb 26 01:57:49 UTC 2014 Modified Files: src/sys/arch/arm/include: cpu.h Log Message: Move some static/global variables to here. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/arch/arm/include/cpu.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/include/cpu.h diff -u src/sys/arch/arm/include/cpu.h:1.81 src/sys/arch/arm/include/cpu.h:1.82 --- src/sys/arch/arm/include/cpu.h:1.81 Wed Nov 6 02:02:00 2013 +++ src/sys/arch/arm/include/cpu.h Wed Feb 26 01:57:48 2014 @@ -155,12 +155,17 @@ struct cpu_info { lwp_t *ci_softlwps[SOFTINT_COUNT]; volatile uint32_t ci_softints; lwp_t *ci_curlwp; /* current lwp */ + lwp_t *ci_lastlwp; /* last lwp */ struct evcnt ci_arm700bugcount; int32_t ci_mtx_count; int ci_mtx_oldspl; register_t ci_undefsave[3]; uint32_t ci_vfp_id; uint64_t ci_lastintr; + struct pmap_tlb_info *ci_tlb_info; + struct pmap *ci_pmap_lastuser; + struct pmap *ci_pmap_cur; + tlb_asid_t ci_pmap_asid_cur; struct evcnt ci_abt_evs[16]; #if defined(MP_CPU_INFO_MEMBERS) MP_CPU_INFO_MEMBERS @@ -207,9 +212,9 @@ curcpu(void) #define CPU_INFO_ITERATOR int #if defined(MULTIPROCESSOR) extern struct cpu_info *cpu_info[]; -#define cpu_number() (curcpu()-ci_cpuid) +#define cpu_number() (curcpu()-ci_index) void cpu_boot_secondary_processors(void); -#define CPU_IS_PRIMARY(ci) ((ci)-ci_cpuid == 0) +#define CPU_IS_PRIMARY(ci) ((ci)-ci_index == 0) #define CPU_INFO_FOREACH(cii, ci) \ cii = 0, ci = cpu_info[0]; cii ncpu (ci = cpu_info[cii]) != NULL; cii++ #else
CVS commit: src/sys/arch/arm/allwinner
Module Name:src Committed By: jmcneill Date: Wed Feb 26 02:01:02 UTC 2014 Modified Files: src/sys/arch/arm/allwinner: awin_mmc.c Log Message: implement card detect To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/allwinner/awin_mmc.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/allwinner/awin_mmc.c diff -u src/sys/arch/arm/allwinner/awin_mmc.c:1.2 src/sys/arch/arm/allwinner/awin_mmc.c:1.3 --- src/sys/arch/arm/allwinner/awin_mmc.c:1.2 Wed Feb 26 00:39:30 2014 +++ src/sys/arch/arm/allwinner/awin_mmc.c Wed Feb 26 02:01:02 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: awin_mmc.c,v 1.2 2014/02/26 00:39:30 jmcneill Exp $ */ +/* $NetBSD: awin_mmc.c,v 1.3 2014/02/26 02:01:02 jmcneill Exp $ */ /*- * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca @@ -29,7 +29,7 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: awin_mmc.c,v 1.2 2014/02/26 00:39:30 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: awin_mmc.c,v 1.3 2014/02/26 02:01:02 jmcneill Exp $); #include sys/param.h #include sys/bus.h @@ -84,6 +84,7 @@ struct awin_mmc_softc { int sc_mmc_number; int sc_mmc_width; + int sc_mmc_present; device_t sc_sdmmc_dev; unsigned int sc_pll5_freq; @@ -214,6 +215,9 @@ awin_mmc_attach(device_t parent, device_ SMC_CAPS_SD_HIGHSPEED| SMC_CAPS_MMC_HIGHSPEED| SMC_CAPS_AUTO_STOP; + if (sc-sc_has_gpio_detect) { + saa.saa_caps |= SMC_CAPS_POLL_CARD_DET; + } sc-sc_sdmmc_dev = config_found(self, saa, NULL); } @@ -261,7 +265,16 @@ awin_mmc_card_detect(sdmmc_chipset_handl if (sc-sc_has_gpio_detect == false) { return 1; /* no card detect pin, assume present */ } else { - return awin_gpio_pindata_read(sc-sc_gpio_detect); + int v = 0, i; + for (i = 0; i 5; i++) { + v += awin_gpio_pindata_read(sc-sc_gpio_detect); + delay(1000); + } + if (v == 5) + sc-sc_mmc_present = 0; + else if (v == 0) + sc-sc_mmc_present = 1; + return sc-sc_mmc_present; } }
CVS commit: src/sys/arch/evbarm/cubie
Module Name:src Committed By: jmcneill Date: Wed Feb 26 02:01:29 UTC 2014 Modified Files: src/sys/arch/evbarm/cubie: cubie_machdep.c Log Message: hook up mmc card detect gpio To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/cubie/cubie_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/cubie/cubie_machdep.c diff -u src/sys/arch/evbarm/cubie/cubie_machdep.c:1.13 src/sys/arch/evbarm/cubie/cubie_machdep.c:1.14 --- src/sys/arch/evbarm/cubie/cubie_machdep.c:1.13 Wed Feb 26 00:39:50 2014 +++ src/sys/arch/evbarm/cubie/cubie_machdep.c Wed Feb 26 02:01:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cubie_machdep.c,v 1.13 2014/02/26 00:39:50 jmcneill Exp $ */ +/* $NetBSD: cubie_machdep.c,v 1.14 2014/02/26 02:01:29 jmcneill Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cubie_machdep.c,v 1.13 2014/02/26 00:39:50 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: cubie_machdep.c,v 1.14 2014/02/26 02:01:29 jmcneill Exp $); #include opt_machdep.h #include opt_ddb.h @@ -578,6 +578,7 @@ cubie_device_register(device_t self, voi prop_dictionary_set_cstring(dict, hdd5ven, PH17); prop_dictionary_set_cstring(dict, emacpwren, PH19); } + prop_dictionary_set_cstring(dict, mmc0detect, PH1); /* * These pins have no connections. @@ -603,6 +604,8 @@ cubie_device_register(device_t self, voi struct awinio_attach_args * const aio = aux; if (aio-aio_loc.loc_port == 0) { prop_dictionary_set_cstring(dict, + detect-gpio, mmc0detect); + prop_dictionary_set_cstring(dict, led-gpio, status-led2); } return;
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Wed Feb 26 02:03:00 UTC 2014 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Add more MMU registers To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/arch/arm/include/armreg.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/include/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.86 src/sys/arch/arm/include/armreg.h:1.87 --- src/sys/arch/arm/include/armreg.h:1.86 Mon Feb 24 16:45:06 2014 +++ src/sys/arch/arm/include/armreg.h Wed Feb 26 02:03:00 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.86 2014/02/24 16:45:06 matt Exp $ */ +/* $NetBSD: armreg.h,v 1.87 2014/02/26 02:03:00 matt Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -635,6 +635,22 @@ #define TTBCR_L_EPD0 __BIT(7) // Don't use TTBR0 #define TTBCR_L_T0SZ __BITS(2,0) // TTBR0 size offset +#define NRRR_ORn(n) __BITS(17+2*(n),16+2*(n)) // Outer Cacheable mappings +#define NRRR_IRn(n) __BITS(1+2*(n),0+2*(n)) // Inner Cacheable mappings +#define NRRR_NC 0 // non-cacheable +#define NRRR_WB_WA 1 // write-back write-allocate +#define NRRR_WT 2 // write-through +#define NRRR_WB 3 // write-back +#define PRRR_NOSn(n) __BITS(24+2*(n))// Memory region is Inner Shareable +#define PRRR_NS1 __BIT(19) // Normal Shareable S=1 is Shareable +#define PRRR_NS0 __BIT(18) // Normal Shareable S=0 is Shareable +#define PRRR_DS1 __BIT(17) // Device Shareable S=1 is Shareable +#define PRRR_DS0 __BIT(16) // Device Shareable S=0 is Shareable +#define PRRR_TRn(n) __BITS(1+2*(n),0+2*(n)) +#define PRRR_TR_STRONG 0 // Strongly Ordered +#define PRRR_TR_DEVICE 1 // Device +#define PRRR_TR_NORMAL 2 // Normal Memory + /* Defines for ARM Generic Timer */ #define ARM_CNTCTL_ENABLE __BIT(0) // Timer Enabled #define ARM_CNTCTL_IMASK __BIT(1) // Mask Interrupt @@ -803,6 +819,11 @@ ARMREG_WRITE_INLINE(pmccntr, p15,0,%0,c ARMREG_READ_INLINE(pmuserenr, p15,0,%0,c9,c14,0) /* PMC User Enable */ ARMREG_WRITE_INLINE(pmuserenr, p15,0,%0,c9,c14,0) /* PMC User Enable */ ARMREG_READ_INLINE(l2ctrl, p15,1,%0,c9,c0,2) /* A7/A15 L2 Control Register */ +/* cp10 c10 registers */ +ARMREG_READ_INLINE(prrr, p15,0,%0,c10,c2,0) /* Primary Region Remap Register */ +ARMREG_WRITE_INLINE(prrr, p15,0,%0,c10,c2,0) /* Primary Region Remap Register */ +ARMREG_READ_INLINE(nrrr, p15,0,%0,c10,c2,1) /* Normal Region Remap Register */ +ARMREG_WRITE_INLINE(nrrr, p15,0,%0,c10,c2,1) /* Normal Region Remap Register */ /* cp15 c13 registers */ ARMREG_READ_INLINE(contextidr, p15,0,%0,c13,c0,1) /* Context ID Register */ ARMREG_WRITE_INLINE(contextidr, p15,0,%0,c13,c0,1) /* Context ID Register */
CVS commit: src/lib/librumpclient
Module Name:src Committed By: pooka Date: Wed Feb 26 02:03:40 UTC 2014 Modified Files: src/lib/librumpclient: rumpclient.c Log Message: Use MAP_ANON|MAP_PRIVATE for anonymous memory mapping, e.g. Linux gets upset if just MAP_ANON. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/lib/librumpclient/rumpclient.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/librumpclient/rumpclient.c diff -u src/lib/librumpclient/rumpclient.c:1.56 src/lib/librumpclient/rumpclient.c:1.57 --- src/lib/librumpclient/rumpclient.c:1.56 Thu Feb 20 00:42:27 2014 +++ src/lib/librumpclient/rumpclient.c Wed Feb 26 02:03:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpclient.c,v 1.56 2014/02/20 00:42:27 pooka Exp $ */ +/* $NetBSD: rumpclient.c,v 1.57 2014/02/26 02:03:40 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -48,7 +48,7 @@ #define USE_KQUEUE #endif -__RCSID($NetBSD: rumpclient.c,v 1.56 2014/02/20 00:42:27 pooka Exp $); +__RCSID($NetBSD: rumpclient.c,v 1.57 2014/02/26 02:03:40 pooka Exp $); #include sys/param.h #include sys/mman.h @@ -618,7 +618,7 @@ handlereq(struct spclient *spc) /*LINTED*/ maplen = *(size_t *)spc-spc_buf; mapaddr = mmap(NULL, maplen, PROT_READ|PROT_WRITE, - MAP_ANON, -1, 0); + MAP_ANON|MAP_PRIVATE, -1, 0); if (mapaddr == MAP_FAILED) mapaddr = NULL; DPRINTF((rump_sp handlereq: anonmmap: %p\n, mapaddr));
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Wed Feb 26 02:07:58 UTC 2014 Modified Files: src/sys/arch/arm/arm32: cpuswitch.S genassym.cf pmap.c Log Message: Move pmap_recent_user to ci-ci_pmap_lastuser and pmap_previous_active_lwp to ci-ci_lastlwp. Fix some comments. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/arch/arm/arm32/cpuswitch.S cvs rdiff -u -r1.66 -r1.67 src/sys/arch/arm/arm32/genassym.cf cvs rdiff -u -r1.266 -r1.267 src/sys/arch/arm/arm32/pmap.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/arm32/cpuswitch.S diff -u src/sys/arch/arm/arm32/cpuswitch.S:1.81 src/sys/arch/arm/arm32/cpuswitch.S:1.82 --- src/sys/arch/arm/arm32/cpuswitch.S:1.81 Thu Dec 26 18:49:23 2013 +++ src/sys/arch/arm/arm32/cpuswitch.S Wed Feb 26 02:07:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuswitch.S,v 1.81 2013/12/26 18:49:23 joerg Exp $ */ +/* $NetBSD: cpuswitch.S,v 1.82 2014/02/26 02:07:58 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -87,7 +87,7 @@ #include arm/asm.h #include arm/locore.h - RCSID($NetBSD: cpuswitch.S,v 1.81 2013/12/26 18:49:23 joerg Exp $) + RCSID($NetBSD: cpuswitch.S,v 1.82 2014/02/26 02:07:58 matt Exp $) /* LINTSTUB: include sys/param.h */ @@ -116,8 +116,6 @@ #endif .text -.Lpmap_previous_active_lwp: - .word _C_LABEL(pmap_previous_active_lwp) /* * struct lwp * @@ -177,7 +175,7 @@ ENTRY(cpu_switchto) IRQenable #endif - /* rem: r3 = curlwp */ + /* rem: r3 = curcpu() */ /* rem: r4 = old lwp */ /* rem: r6 = new lwp */ /* rem: r7 = new pcb */ @@ -192,7 +190,7 @@ ENTRY(cpu_switchto) teq r4, #0 beq .Ldo_switch - /* rem: r3 = curlwp */ + /* rem: r3 = curcpu() */ /* rem: r4 = old lwp */ /* rem: r6 = new lwp */ /* rem: r7 = new pcb */ @@ -225,7 +223,7 @@ ENTRY(cpu_switchto) * them for the new process. */ - /* rem: r3 = curlwp */ + /* rem: r3 = curcpu() */ /* rem: r4 = old lwp */ /* rem: r5 = old pcb */ /* rem: r6 = new lwp */ @@ -235,7 +233,7 @@ ENTRY(cpu_switchto) /* Restore saved context */ .Ldo_switch: - /* rem: r3 = curlwp */ + /* rem: r3 = curcpu() */ /* rem: r4 = old lwp */ /* rem: r6 = new lwp */ /* rem: r7 = new pcb */ @@ -281,8 +279,7 @@ ENTRY(cpu_switchto) #endif /* Record the old lwp for pmap_activate()'s benefit */ - ldr r1, .Lpmap_previous_active_lwp /* XXXSMP */ - str r4, [r1] + str r4, [r3, #CI_LASTLWP] /* rem: r4 = old lwp */ /* rem: r5 = new lwp's proc */ Index: src/sys/arch/arm/arm32/genassym.cf diff -u src/sys/arch/arm/arm32/genassym.cf:1.66 src/sys/arch/arm/arm32/genassym.cf:1.67 --- src/sys/arch/arm/arm32/genassym.cf:1.66 Sat Nov 9 17:28:58 2013 +++ src/sys/arch/arm/arm32/genassym.cf Wed Feb 26 02:07:58 2014 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.66 2013/11/09 17:28:58 jmcneill Exp $ +# $NetBSD: genassym.cf,v 1.67 2014/02/26 02:07:58 matt Exp $ # Copyright (c) 1982, 1990 The Regents of the University of California. # All rights reserved. @@ -213,6 +213,7 @@ define CI_CC_NSOFT offsetof(struct cpu_ ifdef FPU_VFP define CI_VFP_ID offsetof(struct cpu_info, ci_vfp_id) endif +define CI_LASTLWP offsetof(struct cpu_info, ci_lastlwp) define VFP_FPEXC_EN VFP_FPEXC_EN Index: src/sys/arch/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.266 src/sys/arch/arm/arm32/pmap.c:1.267 --- src/sys/arch/arm/arm32/pmap.c:1.266 Wed Feb 26 01:51:11 2014 +++ src/sys/arch/arm/arm32/pmap.c Wed Feb 26 02:07:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.266 2014/02/26 01:51:11 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.267 2014/02/26 02:07:58 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -209,7 +209,7 @@ #include arm/locore.h #include arm/arm32/katelib.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.266 2014/02/26 01:51:11 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.267 2014/02/26 02:07:58 matt Exp $); #ifdef PMAP_DEBUG @@ -259,18 +259,6 @@ int arm_poolpage_vmfreelist = VM_FREEL #endif /* - * Which pmap is currently 'live' in the cache - * - * XXXSCW: Fix for SMP ... - */ -static pmap_t pmap_recent_user; - -/* - * Pointer to last active lwp, or NULL if it exited. - */ -struct lwp *pmap_previous_active_lwp; - -/* * Pool and cache that pmap structures are allocated from. * We use a cache to avoid clearing the pm_l2[] array (1KB) * in pmap_create(). @@ -826,8 +814,9 @@ static inline bool pmap_is_cached(pmap_t pm) { - if (pm == pmap_kernel() || pmap_recent_user == NULL || - pmap_recent_user == pm) + struct cpu_info * const ci = curcpu(); + if (pm == pmap_kernel() || ci-ci_pmap_lastuser == NULL || + ci-ci_pmap_lastuser == pm) return (true); return false; @@ -4134,6 +4123,7 @@ pmap_unwire(pmap_t pm, vaddr_t va) void pmap_activate(struct lwp *l) { + struct cpu_info * const ci = curcpu(); extern int block_userspace_access; pmap_t opm, npm, rpm; uint32_t odacr, ndacr; @@ -4155,8 +4145,8 @@
CVS commit: src/sys/rump/net/lib/libnpf
Module Name:src Committed By: pooka Date: Wed Feb 26 02:39:29 UTC 2014 Modified Files: src/sys/rump/net/lib/libnpf: component.c Log Message: Run constructor as part of network faction bootstrap, not device (rumpdev no longer necessary) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/net/lib/libnpf/component.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/rump/net/lib/libnpf/component.c diff -u src/sys/rump/net/lib/libnpf/component.c:1.2 src/sys/rump/net/lib/libnpf/component.c:1.3 --- src/sys/rump/net/lib/libnpf/component.c:1.2 Sun Mar 10 21:01:19 2013 +++ src/sys/rump/net/lib/libnpf/component.c Wed Feb 26 02:39:29 2014 @@ -1,11 +1,11 @@ -/* $NetBSD: component.c,v 1.2 2013/03/10 21:01:19 christos Exp $ */ +/* $NetBSD: component.c,v 1.3 2014/02/26 02:39:29 pooka Exp $ */ /* * Public Domain. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: component.c,v 1.2 2013/03/10 21:01:19 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: component.c,v 1.3 2014/02/26 02:39:29 pooka Exp $); #include sys/param.h #include sys/conf.h @@ -17,7 +17,7 @@ __KERNEL_RCSID(0, $NetBSD: component.c, extern const struct cdevsw npf_cdevsw; -RUMP_COMPONENT(RUMP_COMPONENT_DEV) +RUMP_COMPONENT(RUMP_COMPONENT_NET) { devmajor_t bmajor = NODEVMAJOR, cmajor = NODEVMAJOR; int error;
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Wed Feb 26 02:51:02 UTC 2014 Modified Files: src/share/mk: bsd.lib.mk bsd.own.mk Log Message: define EXTERNAL_GCC_SUBDIR based upon HAVE_GCC, for GCC = 4.5, and use it in the one place (bsd.lib.mk) it's used in share/mk. To generate a diff of this commit: cvs rdiff -u -r1.345 -r1.346 src/share/mk/bsd.lib.mk cvs rdiff -u -r1.767 -r1.768 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.345 src/share/mk/bsd.lib.mk:1.346 --- src/share/mk/bsd.lib.mk:1.345 Tue Jan 14 11:31:01 2014 +++ src/share/mk/bsd.lib.mk Wed Feb 26 02:51:02 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.345 2014/01/14 11:31:01 apb Exp $ +# $NetBSD: bsd.lib.mk,v 1.346 2014/02/26 02:51:02 mrg Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include bsd.init.mk @@ -602,7 +602,7 @@ LIBDPLIBS+= c++ ${.CURDIR}/../../../ . elif defined(HAVE_GCC) ${HAVE_GCC} == 4 LIBDPLIBS+= stdc++ ${.CURDIR}/../../../../../gnu/lib/libstdc++-v3_4 . else -LIBDPLIBS+= stdc++ ${.CURDIR}/../../../../../external/gpl3/gcc/lib/libstdc++-v3 +LIBDPLIBS+= stdc++ ${.CURDIR}/../../../../../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3 . endif .else LIBCC:= ${CC} Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.767 src/share/mk/bsd.own.mk:1.768 --- src/share/mk/bsd.own.mk:1.767 Mon Feb 24 07:23:41 2014 +++ src/share/mk/bsd.own.mk Wed Feb 26 02:51:02 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.767 2014/02/24 07:23:41 skrll Exp $ +# $NetBSD: bsd.own.mk,v 1.768 2014/02/26 02:51:02 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -58,6 +58,18 @@ HAVE_GCC?=45 .endif .endif +# +# We import the old gcc as gcc.old when upgrading. EXTERNAL_GCC_SUBDIR is +# set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC. +# +.if ${HAVE_GCC} == 45 +EXTERNAL_GCC_SUBDIR= gcc.old +EXTERNAL_GCC_SUBDIR= gcc +.elif ${HAVE_GCC} == 48 +EXTERNAL_GCC_SUBDIR= gcc +.else +EXTERNAL_GCC_SUBDIR= /does/not/exist +.endif .if ${MACHINE_ARCH} == ia64 USE_COMPILERCRTSTUFF?= yes
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Wed Feb 26 03:09:42 UTC 2014 Modified Files: src/share/mk: bsd.own.mk Log Message: powerpc64 needs USE_COMPILERCRTSTUFF=yes To generate a diff of this commit: cvs rdiff -u -r1.768 -r1.769 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.768 src/share/mk/bsd.own.mk:1.769 --- src/share/mk/bsd.own.mk:1.768 Tue Feb 25 21:51:02 2014 +++ src/share/mk/bsd.own.mk Tue Feb 25 22:09:42 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.768 2014/02/26 02:51:02 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.769 2014/02/26 03:09:42 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -71,7 +71,7 @@ EXTERNAL_GCC_SUBDIR= gcc EXTERNAL_GCC_SUBDIR= /does/not/exist .endif -.if ${MACHINE_ARCH} == ia64 +.if ${MACHINE_ARCH} == ia64 || ${MACHINE_ARCH} == powerpc64 USE_COMPILERCRTSTUFF?= yes .else USE_COMPILERCRTSTUFF?= no
CVS commit: src/sys/arch/arm/omap
Module Name:src Committed By: ozaki-r Date: Wed Feb 26 03:58:33 UTC 2014 Modified Files: src/sys/arch/arm/omap: if_cpsw.c if_cpswreg.h Log Message: Make cpsw driver work without uboot support On some eval boards such as BeagleBone, the cpsw device is initialized rightly by the uboot of the boards so that the cpsw driver doesn't need to do some initializations but works fine. The patch adds initializations to make the driver work solely. It also adds support for 1000BaseT (RGMII) PHY that is equipped on some boards, e.g., CKB-3352. Reviewed by christos@ To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/omap/if_cpsw.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/if_cpswreg.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/omap/if_cpsw.c diff -u src/sys/arch/arm/omap/if_cpsw.c:1.4 src/sys/arch/arm/omap/if_cpsw.c:1.5 --- src/sys/arch/arm/omap/if_cpsw.c:1.4 Wed Dec 18 12:53:26 2013 +++ src/sys/arch/arm/omap/if_cpsw.c Wed Feb 26 03:58:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cpsw.c,v 1.4 2013/12/18 12:53:26 skrll Exp $ */ +/* $NetBSD: if_cpsw.c,v 1.5 2014/02/26 03:58:33 ozaki-r Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -53,7 +53,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: if_cpsw.c,v 1.4 2013/12/18 12:53:26 skrll Exp $); +__KERNEL_RCSID(1, $NetBSD: if_cpsw.c,v 1.5 2014/02/26 03:58:33 ozaki-r Exp $); #include sys/param.h #include sys/bus.h @@ -122,6 +122,7 @@ struct cpsw_softc { bus_addr_t sc_rxdescs_pa; struct ethercom sc_ec; struct mii_data sc_mii; + bool sc_phy_has_1000t; callout_t sc_tick_ch; void *sc_ih; struct cpsw_ring_data *sc_rdp; @@ -163,6 +164,11 @@ static int cpsw_rxintr(void *); static int cpsw_txintr(void *); static int cpsw_miscintr(void *); +/* ALE support */ +#define CPSW_MAX_ALE_ENTRIES 1024 + +static int cpsw_ale_update_addresses(struct cpsw_softc *, int purge); + CFATTACH_DECL_NEW(cpsw, sizeof(struct cpsw_softc), cpsw_match, cpsw_attach, NULL, NULL); @@ -318,6 +324,18 @@ cpsw_match(device_t parent, cfdata_t cf, return 0; } +static bool +cpsw_phy_has_1000t(struct cpsw_softc * const sc) +{ + struct ifmedia_entry *ifm; + + TAILQ_FOREACH(ifm, sc-sc_mii.mii_media.ifm_list, ifm_list) { + if (IFM_SUBTYPE(ifm-ifm_media) == IFM_1000_T) + return true; + } + return false; +} + static void cpsw_attach(device_t parent, device_t self, void *aux) { @@ -469,13 +487,28 @@ cpsw_attach(device_t parent, device_t se sc-sc_ec.ec_mii = sc-sc_mii; ifmedia_init(sc-sc_mii.mii_media, 0, ether_mediachange, ether_mediastatus); + + /* Initialize MDIO */ + cpsw_write_4(sc, MDIOCONTROL, MDIOCTL_ENABLE | MDIOCTL_FAULTENB | MDIOCTL_CLKDIV(0xff)); + /* Clear ALE */ + cpsw_write_4(sc, CPSW_ALE_CONTROL, ALECTL_CLEAR_TABLE); + mii_attach(self, sc-sc_mii, 0x, MII_PHY_ANY, 0, 0); if (LIST_FIRST(sc-sc_mii.mii_phys) == NULL) { aprint_error_dev(self, no PHY found!\n); + sc-sc_phy_has_1000t = false; ifmedia_add(sc-sc_mii.mii_media, IFM_ETHER|IFM_MANUAL, 0, NULL); ifmedia_set(sc-sc_mii.mii_media, IFM_ETHER|IFM_MANUAL); } else { + sc-sc_phy_has_1000t = cpsw_phy_has_1000t(sc); + if (sc-sc_phy_has_1000t) { + aprint_normal_dev(sc-sc_dev, 1000baseT PHY found. setting RGMII Mode\n); + /* Select the Interface RGMII Mode in the Control Module */ + sitara_cm_reg_write_4(CPSW_GMII_SEL, + GMIISEL_GMII2_SEL(RGMII_MODE) | GMIISEL_GMII1_SEL(RGMII_MODE)); + } + ifmedia_set(sc-sc_mii.mii_media, IFM_ETHER|IFM_AUTO); } @@ -791,6 +824,8 @@ cpsw_init(struct ifnet *ifp) /* Reset and init Sliver port 1 and 2 */ for (i = 0; i 2; i++) { + uint32_t macctl; + /* Reset */ cpsw_write_4(sc, CPSW_SL_SOFT_RESET(i), 1); while(cpsw_read_4(sc, CPSW_SL_SOFT_RESET(i)) 1); @@ -805,9 +840,12 @@ cpsw_init(struct ifnet *ifp) cpsw_write_4(sc, CPSW_PORT_P_SA_LO(i+1), sc-sc_enaddr[4] | (sc-sc_enaddr[5] 8)); - /* Set MACCONTROL for ports 0,1: FULLDUPLEX(1), GMII_EN(5), - IFCTL_A(15), IFCTL_B(16) FIXME */ - cpsw_write_4(sc, CPSW_SL_MACCONTROL(i), 1 | (15) | (115)); + /* Set MACCONTROL for ports 0,1 */ + macctl = SLMACCTL_FULLDUPLEX | SLMACCTL_GMII_EN | + SLMACCTL_IFCTL_A; + if (sc-sc_phy_has_1000t) + macctl |= SLMACCTL_GIG; + cpsw_write_4(sc, CPSW_SL_MACCONTROL(i), macctl); /* Set ALE port to forwarding(3) */ cpsw_write_4(sc, CPSW_ALE_PORTCTL(i+1), 3); @@ -820,6 +858,9 @@ cpsw_init(struct ifnet *ifp) /* Set ALE port to forwarding(3) */ cpsw_write_4(sc, CPSW_ALE_PORTCTL(0), 3); + /* Initialize addrs */ + cpsw_ale_update_addresses(sc, 1); + cpsw_write_4(sc, CPSW_SS_PTYPE, 0); cpsw_write_4(sc, CPSW_SS_STAT_PORT_EN, 7); @@ -1242,3 +1283,194 @@ cpsw_miscintr(void *arg) return 1; } + +/* + * + * ALE support routines. + * + */ + +static void +cpsw_ale_entry_init(uint32_t *ale_entry) +{ + ale_entry[0] = ale_entry[1] =
CVS commit: src/sys/dev/mii
Module Name:src Committed By: ozaki-r Date: Wed Feb 26 04:13:45 UTC 2014 Modified Files: src/sys/dev/mii: files.mii miidevs Added Files: src/sys/dev/mii: micphy.c Log Message: Add Micrel PHY (KSZ9021RN) The new driver micphy is almost same as ukphy except that micphy has a fixup for cpsw; a PHY with cpsw has to adjust RGMII signal timing. Reviewed by christos@ To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/dev/mii/files.mii cvs rdiff -u -r0 -r1.1 src/sys/dev/mii/micphy.c cvs rdiff -u -r1.117 -r1.118 src/sys/dev/mii/miidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/mii/files.mii diff -u src/sys/dev/mii/files.mii:1.48 src/sys/dev/mii/files.mii:1.49 --- src/sys/dev/mii/files.mii:1.48 Wed Jan 26 18:48:12 2011 +++ src/sys/dev/mii/files.mii Wed Feb 26 04:13:44 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.mii,v 1.48 2011/01/26 18:48:12 bouyer Exp $ +# $NetBSD: files.mii,v 1.49 2014/02/26 04:13:44 ozaki-r Exp $ defflag opt_mii.h MIIVERBOSE @@ -148,3 +148,7 @@ file dev/mii/etphy.cetphy device rdcphy: mii_phy attach rdcphy at mii file dev/mii/rdcphy.c rdcphy + +device micphy: mii_phy, ukphy_subr +attach micphy at mii +file dev/mii/micphy.c micphy Index: src/sys/dev/mii/miidevs diff -u src/sys/dev/mii/miidevs:1.117 src/sys/dev/mii/miidevs:1.118 --- src/sys/dev/mii/miidevs:1.117 Sat Dec 21 15:16:23 2013 +++ src/sys/dev/mii/miidevs Wed Feb 26 04:13:44 2014 @@ -1,4 +1,4 @@ -$NetBSD: miidevs,v 1.117 2013/12/21 15:16:23 kiyohara Exp $ +$NetBSD: miidevs,v 1.118 2014/02/26 04:13:44 ozaki-r Exp $ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -66,6 +66,7 @@ oui INTEL 0x00aa00 Intel oui JMICRON 0x00d831 JMicron oui LEVEL1 0x00207b Level 1 oui MARVELL 0x005043 Marvell Semiconductor +oui MICREL 0x0010a1 Micrel oui MYSON 0x00c0b4 Myson Technology oui NATSEMI 0x080017 National Semiconductor oui PMCSIERRA 0x00e004 PMC-Sierra @@ -260,6 +261,9 @@ model xxMARVELL E1116R 0x0024 Marvell 8 model xxMARVELL E1116R_29 0x0029 Marvell 88E1116R Gigabit PHY model xxMARVELL E1543 0x002a Marvell 88E1543 Alaska Quad Port Gb PHY +/* Micrel PHYs */ +model MICREL KSZ9021RNI 0x0021 Micrel KSZ9021RNI 10/100/1000 PHY + /* Myson Technology PHYs */ model xxMYSON MTD972 0x MTD972 10/100 media interface model MYSON MTD803 0x MTD803 3-in-1 media interface Added files: Index: src/sys/dev/mii/micphy.c diff -u /dev/null src/sys/dev/mii/micphy.c:1.1 --- /dev/null Wed Feb 26 04:13:45 2014 +++ src/sys/dev/mii/micphy.c Wed Feb 26 04:13:44 2014 @@ -0,0 +1,251 @@ +/* $NetBSD: micphy.c,v 1.1 2014/02/26 04:13:44 ozaki-r Exp $ */ + +/*- + * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, + * NASA Ames Research Center, and by Frank van der Linden. + * + * 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. + */ + +/* + * Copyright (c) 1997 Manuel Bouyer. 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
CVS commit: src/sys/dev/mii
Module Name:src Committed By: ozaki-r Date: Wed Feb 26 04:31:29 UTC 2014 Modified Files: src/sys/dev/mii: miidevs.h miidevs_data.h Log Message: Regen. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/sys/dev/mii/miidevs.h cvs rdiff -u -r1.108 -r1.109 src/sys/dev/mii/miidevs_data.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/dev/mii/miidevs.h diff -u src/sys/dev/mii/miidevs.h:1.120 src/sys/dev/mii/miidevs.h:1.121 --- src/sys/dev/mii/miidevs.h:1.120 Sat Dec 21 15:18:21 2013 +++ src/sys/dev/mii/miidevs.h Wed Feb 26 04:31:29 2014 @@ -1,10 +1,10 @@ -/* $NetBSD: miidevs.h,v 1.120 2013/12/21 15:18:21 kiyohara Exp $ */ +/* $NetBSD: miidevs.h,v 1.121 2014/02/26 04:31:29 ozaki-r Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: miidevs,v 1.117 2013/12/21 15:16:23 kiyohara Exp + * NetBSD: miidevs,v 1.118 2014/02/26 04:13:44 ozaki-r Exp */ /*- @@ -73,6 +73,7 @@ #define MII_OUI_JMICRON 0x00d831 /* JMicron */ #define MII_OUI_LEVEL1 0x00207b /* Level 1 */ #define MII_OUI_MARVELL 0x005043 /* Marvell Semiconductor */ +#define MII_OUI_MICREL 0x0010a1 /* Micrel */ #define MII_OUI_MYSON 0x00c0b4 /* Myson Technology */ #define MII_OUI_NATSEMI 0x080017 /* National Semiconductor */ #define MII_OUI_PMCSIERRA 0x00e004 /* PMC-Sierra */ @@ -381,6 +382,10 @@ #define MII_MODEL_xxMARVELL_E1543 0x002a #define MII_STR_xxMARVELL_E1543 Marvell 88E1543 Alaska Quad Port Gb PHY +/* Micrel PHYs */ +#define MII_MODEL_MICREL_KSZ9021RNI 0x0021 +#define MII_STR_MICREL_KSZ9021RNI Micrel KSZ9021RNI 10/100/1000 PHY + /* Myson Technology PHYs */ #define MII_MODEL_xxMYSON_MTD972 0x #define MII_STR_xxMYSON_MTD972 MTD972 10/100 media interface Index: src/sys/dev/mii/miidevs_data.h diff -u src/sys/dev/mii/miidevs_data.h:1.108 src/sys/dev/mii/miidevs_data.h:1.109 --- src/sys/dev/mii/miidevs_data.h:1.108 Sat Dec 21 15:18:21 2013 +++ src/sys/dev/mii/miidevs_data.h Wed Feb 26 04:31:29 2014 @@ -1,10 +1,10 @@ -/* $NetBSD: miidevs_data.h,v 1.108 2013/12/21 15:18:21 kiyohara Exp $ */ +/* $NetBSD: miidevs_data.h,v 1.109 2014/02/26 04:31:29 ozaki-r Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: miidevs,v 1.117 2013/12/21 15:16:23 kiyohara Exp + * NetBSD: miidevs,v 1.118 2014/02/26 04:13:44 ozaki-r Exp */ /*- @@ -151,6 +151,7 @@ struct mii_knowndev mii_knowndevs[] = { { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116R, MII_STR_xxMARVELL_E1116R }, { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116R_29, MII_STR_xxMARVELL_E1116R_29 }, { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1543, MII_STR_xxMARVELL_E1543 }, + { MII_OUI_MICREL, MII_MODEL_MICREL_KSZ9021RNI, MII_STR_MICREL_KSZ9021RNI }, { MII_OUI_xxMYSON, MII_MODEL_xxMYSON_MTD972, MII_STR_xxMYSON_MTD972 }, { MII_OUI_MYSON, MII_MODEL_MYSON_MTD803, MII_STR_MYSON_MTD803 }, { MII_OUI_xxNATSEMI, MII_MODEL_xxNATSEMI_DP83840, MII_STR_xxNATSEMI_DP83840 },
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Wed Feb 26 05:51:11 UTC 2014 Modified Files: src/share/mk: bsd.own.mk Log Message: put the new EXTERNAL_GCC_SUBDIR under MKGCC. To generate a diff of this commit: cvs rdiff -u -r1.769 -r1.770 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.769 src/share/mk/bsd.own.mk:1.770 --- src/share/mk/bsd.own.mk:1.769 Wed Feb 26 03:09:42 2014 +++ src/share/mk/bsd.own.mk Wed Feb 26 05:51:11 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.769 2014/02/26 03:09:42 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.770 2014/02/26 05:51:11 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -47,16 +47,19 @@ NEED_OWN_INSTALL_TARGET?= yes TOOLCHAIN_MISSING?= no # -# Platforms still using GCC 4.1 +# GCC Using platforms. # .if ${MKGCC:Uyes} != no + +# +# Platforms still using GCC 4.1 +# .if ${MACHINE_CPU} == vax HAVE_GCC?=4 .else # Otherwise, default to GCC4.5 HAVE_GCC?=45 .endif -.endif # # We import the old gcc as gcc.old when upgrading. EXTERNAL_GCC_SUBDIR is @@ -71,6 +74,8 @@ EXTERNAL_GCC_SUBDIR= gcc EXTERNAL_GCC_SUBDIR= /does/not/exist .endif +.endif + .if ${MACHINE_ARCH} == ia64 || ${MACHINE_ARCH} == powerpc64 USE_COMPILERCRTSTUFF?= yes .else
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Wed Feb 26 07:48:29 UTC 2014 Modified Files: src/sys/arch/arm/arm32: fault.c Log Message: Re-enable FSR_WRITE for armv6. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/arch/arm/arm32/fault.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/arm32/fault.c diff -u src/sys/arch/arm/arm32/fault.c:1.95 src/sys/arch/arm/arm32/fault.c:1.96 --- src/sys/arch/arm/arm32/fault.c:1.95 Tue Feb 25 22:18:09 2014 +++ src/sys/arch/arm/arm32/fault.c Wed Feb 26 07:48:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fault.c,v 1.95 2014/02/25 22:18:09 matt Exp $ */ +/* $NetBSD: fault.c,v 1.96 2014/02/26 07:48:29 skrll Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ #include opt_kgdb.h #include sys/types.h -__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.95 2014/02/25 22:18:09 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: fault.c,v 1.96 2014/02/26 07:48:29 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -412,11 +412,10 @@ data_abort_handler(trapframe_t *tf) * Otherwise we need to disassemble the instruction responsible to * determine if it was a write. */ - if (/* CPU_IS_ARMV6_P() || */ CPU_IS_ARMV7_P()) { + if (CPU_IS_ARMV6_P() || CPU_IS_ARMV7_P()) { ftype = (fsr FAULT_WRITE) ? VM_PROT_WRITE : VM_PROT_READ; } else if (IS_PERMISSION_FAULT(fsr)) { ftype = VM_PROT_WRITE; - // KASSERTMSG(fsr FAULT_WRITE, fsr %#x, fsr); } else { #ifdef THUMB_CODE /* Fast track the ARM case. */ @@ -436,7 +435,6 @@ data_abort_handler(trapframe_t *tf) ftype = VM_PROT_WRITE; else ftype = VM_PROT_READ; - // KASSERTMSG(ftype == (fsr FAULT_WRITE) ? VM_PROT_WRITE : VM_PROT_READ, fsr %#x insn %#x, fsr, insn); } else #endif @@ -452,7 +450,6 @@ data_abort_handler(trapframe_t *tf) ftype = VM_PROT_READ | VM_PROT_WRITE; else ftype = VM_PROT_READ; - // KASSERTMSG(ftype == (fsr FAULT_WRITE) ? VM_PROT_WRITE : VM_PROT_READ, fsr %#x insn %#x, fsr, insn); } }
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Wed Feb 26 07:57:09 UTC 2014 Modified Files: src/sys/arch/arm/arm32: bus_dma.c Log Message: Fix off by one in _bus_dma_{paddr_inrange,_to_paddr} when checking the dma range. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/arch/arm/arm32/bus_dma.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/arm32/bus_dma.c diff -u src/sys/arch/arm/arm32/bus_dma.c:1.81 src/sys/arch/arm/arm32/bus_dma.c:1.82 --- src/sys/arch/arm/arm32/bus_dma.c:1.81 Wed Feb 26 01:05:52 2014 +++ src/sys/arch/arm/arm32/bus_dma.c Wed Feb 26 07:57:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.81 2014/02/26 01:05:52 matt Exp $ */ +/* $NetBSD: bus_dma.c,v 1.82 2014/02/26 07:57:09 skrll Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include opt_arm_bus_space.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.81 2014/02/26 01:05:52 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.82 2014/02/26 07:57:09 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -139,7 +139,7 @@ _bus_dma_paddr_inrange(struct arm32_dma_ for (i = 0, dr = ranges; i nranges; i++, dr++) { if (curaddr = dr-dr_sysbase - round_page(curaddr) = (dr-dr_sysbase + dr-dr_len)) + curaddr (dr-dr_sysbase + dr-dr_len)) return (dr); } @@ -160,7 +160,7 @@ _bus_dma_busaddr_to_paddr(bus_dma_tag_t for (i = 0, dr = t-_ranges; i t-_nranges; i++, dr++) { if (dr-dr_busbase = curaddr - round_page(curaddr) = dr-dr_busbase + dr-dr_len) + curaddr dr-dr_busbase + dr-dr_len) return curaddr - dr-dr_busbase + dr-dr_sysbase; } panic(%s: curaddr %#lx not in range, __func__, curaddr);