From owner-svn-src-projects@FreeBSD.ORG Sun Feb 22 18:52:52 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E097106564A; Sun, 22 Feb 2009 18:52:52 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F3EA38FC14; Sun, 22 Feb 2009 18:52:51 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1MIqps0003779; Sun, 22 Feb 2009 18:52:51 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1MIqpGW003778; Sun, 22 Feb 2009 18:52:51 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902221852.n1MIqpGW003778@svn.freebsd.org> From: Sam Leffler Date: Sun, 22 Feb 2009 18:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188926 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Feb 2009 18:52:52 -0000 Author: sam Date: Sun Feb 22 18:52:51 2009 New Revision: 188926 URL: http://svn.freebsd.org/changeset/base/188926 Log: merge r188924: display min/max dwell times in msecs in debug msgs Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) projects/vap7/sys/net80211/ieee80211_scan.c Modified: projects/vap7/sys/net80211/ieee80211_scan.c ============================================================================== --- projects/vap7/sys/net80211/ieee80211_scan.c Sun Feb 22 18:48:54 2009 (r188925) +++ projects/vap7/sys/net80211/ieee80211_scan.c Sun Feb 22 18:52:51 2009 (r188926) @@ -346,7 +346,8 @@ scan_dump(struct ieee80211_scan_state *s if_printf(vap->iv_ifp, "scan set "); ieee80211_scan_dump_channels(ss); - printf(" dwell min %lu max %lu\n", ss->ss_mindwell, ss->ss_maxdwell); + printf(" dwell min %lums max %lums\n", + ticks_to_msecs(ss->ss_mindwell), ticks_to_msecs(ss->ss_maxdwell)); } #endif /* IEEE80211_DEBUG */ @@ -919,7 +920,7 @@ again: maxdwell = ss->ss_maxdwell; IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: chan %3d%c -> %3d%c [%s, dwell min %lu max %lu]\n", + "%s: chan %3d%c -> %3d%c [%s, dwell min %lums max %lums]\n", __func__, ieee80211_chan2ieee(ic, ic->ic_curchan), channel_type(ic->ic_curchan), @@ -927,7 +928,7 @@ again: (ss->ss_flags & IEEE80211_SCAN_ACTIVE) && (chan->ic_flags & IEEE80211_CHAN_PASSIVE) == 0 ? "active" : "passive", - ss->ss_mindwell, maxdwell); + ticks_to_msecs(ss->ss_mindwell), ticks_to_msecs(maxdwell)); /* * Potentially change channel and phy mode. From owner-svn-src-projects@FreeBSD.ORG Sun Feb 22 18:53:57 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FB63106566B; Sun, 22 Feb 2009 18:53:57 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11A718FC12; Sun, 22 Feb 2009 18:53:57 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1MIruU8003846; Sun, 22 Feb 2009 18:53:56 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1MIruNS003845; Sun, 22 Feb 2009 18:53:56 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902221853.n1MIruNS003845@svn.freebsd.org> From: Sam Leffler Date: Sun, 22 Feb 2009 18:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188927 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Feb 2009 18:53:57 -0000 Author: sam Date: Sun Feb 22 18:53:56 2009 New Revision: 188927 URL: http://svn.freebsd.org/changeset/base/188927 Log: merge r188925: change tdma slave behaviour: if the channel is locked don't do bmiss handling Modified: projects/vap7/sys/ (props changed) projects/vap7/sys/contrib/pf/ (props changed) projects/vap7/sys/dev/ (props changed) projects/vap7/sys/dev/ath/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed) projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed) projects/vap7/sys/dev/cxgb/ (props changed) projects/vap7/sys/dev/usb2/ (props changed) projects/vap7/sys/i386/conf/USB2 (props changed) projects/vap7/sys/modules/usb2/ (props changed) projects/vap7/sys/net80211/ (props changed) projects/vap7/sys/net80211/ieee80211_tdma.c Modified: projects/vap7/sys/net80211/ieee80211_tdma.c ============================================================================== --- projects/vap7/sys/net80211/ieee80211_tdma.c Sun Feb 22 18:52:51 2009 (r188926) +++ projects/vap7/sys/net80211/ieee80211_tdma.c Sun Feb 22 18:53:56 2009 (r188927) @@ -240,11 +240,14 @@ tdma_newstate(struct ieee80211vap *vap, if (status == 0 && nstate == IEEE80211_S_RUN && ostate != IEEE80211_S_RUN && (vap->iv_flags_ext & IEEE80211_FEXT_SWBMISS) && - ts->tdma_slot != 0) { + ts->tdma_slot != 0 && + vap->iv_des_chan == IEEE80211_CHAN_ANYC) { /* * Start s/w beacon miss timer for slave devices w/o - * hardware support. The 2x is a fudge for our doing - * this in software. + * hardware support. Note we do this only if we're + * not locked to a channel (i.e. roam to follow the + * master). The 2x is a fudge for our doing this in + * software. */ vap->iv_swbmiss_period = IEEE80211_TU_TO_TICKS( 2 * vap->iv_bmissthreshold * ts->tdma_bintval * From owner-svn-src-projects@FreeBSD.ORG Tue Feb 24 08:15:45 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72309106564A; Tue, 24 Feb 2009 08:15:45 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6131C8FC0A; Tue, 24 Feb 2009 08:15:45 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1O8FjAG054973; Tue, 24 Feb 2009 08:15:45 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1O8FjSC054971; Tue, 24 Feb 2009 08:15:45 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <200902240815.n1O8FjSC054971@svn.freebsd.org> From: Peter Holm Date: Tue, 24 Feb 2009 08:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188990 - projects/stress2/misc X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Feb 2009 08:15:45 -0000 Author: pho Date: Tue Feb 24 08:15:44 2009 New Revision: 188990 URL: http://svn.freebsd.org/changeset/base/188990 Log: Tests of unmount of a device that is already gone Approved by: kib Added: projects/stress2/misc/backingstore2.sh (contents, props changed) projects/stress2/misc/backingstore3.sh (contents, props changed) Added: projects/stress2/misc/backingstore2.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/stress2/misc/backingstore2.sh Tue Feb 24 08:15:44 2009 (r188990) @@ -0,0 +1,73 @@ +#!/bin/sh + +# +# Copyright (c) 2009 Peter Holm +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. +# +# $FreeBSD$ +# + +# Test unmount of a device that is already gone + +# Leaves /mnt6 unmountable and leads to a "panic: 1 vncache entries remaining" +# during shut down. + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +D=$diskimage +export here=`pwd` + +m1=$mdstart +m2=$((m1 + 1)) +mount | grep "${mntpoint}" | grep -q md$m2 && umount ${mntpoint}$m2 +mdconfig -l | grep -q md$m2 && mdconfig -d -u $m2 +mount | grep "${mntpoint}" | grep -q md$m1 && umount ${mntpoint}$m1 +mdconfig -l | grep -q md$m1 && mdconfig -d -u $m1 + +dede $D$m1 100m 1 || exit 1 + +mdconfig -a -t vnode -f $D$m1 -u $m1 + +bsdlabel -w md$m1 auto +newfs md${m1}${part} > /dev/null 2>&1 +mount /dev/md${m1}${part} ${mntpoint}$m1 + + +truncate -s 500M ${mntpoint}$m1/diskimage +mdconfig -a -t vnode -f ${mntpoint}$m1/diskimage -u $m2 + +bsdlabel -w md$m2 auto +newfs md${m2}${part} > /dev/null 2>&1 +mount /dev/md${m2}${part} ${mntpoint}$m2 + +# Reversed umount sequence: +umount -f /dev/md${m1}${part} +umount -f /dev/md${m2}${part} + +mount | grep "${mntpoint}" | grep -q md$m2 && umount ${mntpoint}$m2 +mdconfig -l | grep -q md$m2 && mdconfig -d -u $m2 +mount | grep "${mntpoint}" | grep -q md$m1 && umount ${mntpoint}$m1 +mdconfig -l | grep -q md$m1 && mdconfig -d -u $m1 Added: projects/stress2/misc/backingstore3.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/stress2/misc/backingstore3.sh Tue Feb 24 08:15:44 2009 (r188990) @@ -0,0 +1,74 @@ +#!/bin/sh + +# +# Copyright (c) 2009 Peter Holm +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. +# +# $FreeBSD$ +# + +# Test unmount of a device that is already gone + +# Caused "panic: bundirty: buffer 0xdafaf2c4 still on queue 1" + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +D=$diskimage +export here=`pwd` + +m1=$mdstart +m2=$((m1 + 1)) +mount | grep "${mntpoint}" | grep -q md$m2 && umount ${mntpoint}$m2 +mdconfig -l | grep -q md$m2 && mdconfig -d -u $m2 +mount | grep "${mntpoint}" | grep -q md$m1 && umount ${mntpoint}$m1 +mdconfig -l | grep -q md$m1 && mdconfig -d -u $m1 + +dede $D$m1 25m 1 || exit 1 + +mdconfig -a -t vnode -f $D$m1 -u $m1 + +bsdlabel -w md$m1 auto +newfs md${m1}${part} > /dev/null 2>&1 +mount /dev/md${m1}${part} ${mntpoint}$m1 + + +truncate -s 500M ${mntpoint}$m1/diskimage +mdconfig -a -t vnode -f ${mntpoint}$m1/diskimage -u $m2 + +bsdlabel -w md$m2 auto +newfs md${m2}${part} > /dev/null 2>&1 +mount /dev/md${m2}${part} ${mntpoint}$m2 + +dd if=/dev/zero of=${mntpoint}$m2/file bs=1m > /dev/null 2>&1 + +# Reversed umount sequence: +umount -f /dev/md${m1}${part} +umount -f /dev/md${m2}${part} + +mount | grep "${mntpoint}" | grep -q md$m2 && umount ${mntpoint}$m2 +mdconfig -l | grep -q md$m2 && mdconfig -d -u $m2 +mount | grep "${mntpoint}" | grep -q md$m1 && umount ${mntpoint}$m1 +mdconfig -l | grep -q md$m1 && mdconfig -d -u $m1 From owner-svn-src-projects@FreeBSD.ORG Wed Feb 25 00:58:09 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 653C9106566C; Wed, 25 Feb 2009 00:58:09 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51A478FC1C; Wed, 25 Feb 2009 00:58:09 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1P0w9Hb080820; Wed, 25 Feb 2009 00:58:09 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1P0w8bg080802; Wed, 25 Feb 2009 00:58:08 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902250058.n1P0w8bg080802@svn.freebsd.org> From: Sam Leffler Date: Wed, 25 Feb 2009 00:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189021 - in projects/cambria/sys: arm/conf arm/xscale/ixp425 dev/uart X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Feb 2009 00:58:09 -0000 Author: sam Date: Wed Feb 25 00:58:08 2009 New Revision: 189021 URL: http://svn.freebsd.org/changeset/base/189021 Log: Checkpoint support for the optional GPS chip: o the Trimble part has a TL16C752B uart through which NMEA data comes; add it to the config+hints (rclk 1843200) o map the i/o region associated with the uart o rewrite the ixp bus memory resource allocation to handle two uarts with different bus tag requirements (need to completely rewrite this stuff to hide the A4 crap and/or overhaul uart to eliminate the need for the A4 hack) o add a rwdelay parameter/hack to uart to handle TL16C752B brain-damage: back-to-back read/writes must have a min 2usec delay between or data will be corrupted (again this would be better hidden behind bus space hacks but uart needs re-architecting); thanks to Chris Lang for the tip o force GPIO pin 3 irq to be output+edge-rising (yet another hack as we need to redesign how bus_setup_intr works so we can handle this stuff in one spot instead of in every driver) o add a ddb "show gpio" command to dump GPIO configuration o add a temporary ddb "show istat" command to dump uart stats+registers The GPS part seems to work but the host is hammered by interrupts on GPIO 3; still trying to figure out why. Sponsored by: Gateworks (2358 board w/ GPS chip) Modified: projects/cambria/sys/arm/conf/CAMBRIA projects/cambria/sys/arm/conf/CAMBRIA.hints projects/cambria/sys/arm/xscale/ixp425/ixp425.c projects/cambria/sys/arm/xscale/ixp425/uart_bus_ixp425.c projects/cambria/sys/dev/uart/uart.h projects/cambria/sys/dev/uart/uart_bus.h projects/cambria/sys/dev/uart/uart_bus_acpi.c projects/cambria/sys/dev/uart/uart_bus_ebus.c projects/cambria/sys/dev/uart/uart_bus_isa.c projects/cambria/sys/dev/uart/uart_bus_mbus.c projects/cambria/sys/dev/uart/uart_bus_ocp.c projects/cambria/sys/dev/uart/uart_bus_pccard.c projects/cambria/sys/dev/uart/uart_bus_pci.c projects/cambria/sys/dev/uart/uart_bus_puc.c projects/cambria/sys/dev/uart/uart_bus_scc.c projects/cambria/sys/dev/uart/uart_core.c projects/cambria/sys/dev/uart/uart_dev_ns8250.c projects/cambria/sys/dev/uart/uart_if.m Modified: projects/cambria/sys/arm/conf/CAMBRIA ============================================================================== --- projects/cambria/sys/arm/conf/CAMBRIA Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/arm/conf/CAMBRIA Wed Feb 25 00:58:08 2009 (r189021) @@ -41,7 +41,7 @@ options KDB options DDB #Enable the kernel debugger options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles +options WITNESS #Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed #options DIAGNOSTIC Modified: projects/cambria/sys/arm/conf/CAMBRIA.hints ============================================================================== --- projects/cambria/sys/arm/conf/CAMBRIA.hints Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/arm/conf/CAMBRIA.hints Wed Feb 25 00:58:08 2009 (r189021) @@ -14,17 +14,19 @@ hint.uart.0.ier_rxbits=0x5d # NB: need U # NB: no UART1 on ixp435 # optional GPS serial port -#hint.uart.1.at="ixp0" +hint.uart.1.at="ixp0" hint.uart.1.addr=0x53fc0000 hint.uart.1.irq=20 hint.uart.1.flags=0x10 hint.uart.1.rclk=1843200 +hint.uart.1.rwdelay=2 # optional RS485 serial port #hint.uart.2.at="ixp0" #hint.uart.2.addr=0x53f80000 #hint.uart.2.irq=21 #hint.uart.2.flags=0x10 #hint.uart.2.rclk=1843200 +#hint.uart.2.rwdelay=2 # NPE Hardware Queue Manager hint.ixpqmgr.0.at="ixp0" Modified: projects/cambria/sys/arm/xscale/ixp425/ixp425.c ============================================================================== --- projects/cambria/sys/arm/xscale/ixp425/ixp425.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/arm/xscale/ixp425/ixp425.c Wed Feb 25 00:58:08 2009 (r189021) @@ -36,6 +36,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_ddb.h" + #define _ARM32_BUS_DMA_PRIVATE #include #include @@ -95,20 +97,59 @@ bus_dma_get_range_nb(void) return (0); } -static __inline u_int32_t -ixp425_irq2gpio_bit(int irq) -{ +static const uint8_t int2gpio[32] __attribute__ ((aligned(32))) = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* INT#0 -> INT#5 */ + 0x00, 0x01, /* GPIO#0 -> GPIO#1 */ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* INT#8 -> INT#13 */ + 0xff, 0xff, 0xff, 0xff, 0xff, /* INT#14 -> INT#18 */ + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* GPIO#2 -> GPIO#7 */ + 0x08, 0x09, 0x0a, 0x0b, 0x0c, /* GPIO#8 -> GPIO#12 */ + 0xff, 0xff /* INT#30 -> INT#31 */ +}; + +#ifdef DDB +#include - static const uint8_t int2gpio[32] __attribute__ ((aligned(32))) = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* INT#0 -> INT#5 */ - 0x00, 0x01, /* GPIO#0 -> GPIO#1 */ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* INT#8 -> INT#13 */ - 0xff, 0xff, 0xff, 0xff, 0xff, /* INT#14 -> INT#18 */ - 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* GPIO#2 -> GPIO#7 */ - 0x08, 0x09, 0x0a, 0x0b, 0x0c, /* GPIO#8 -> GPIO#12 */ - 0xff, 0xff /* INT#30 -> INT#31 */ +DB_SHOW_COMMAND(gpio, db_show_gpio) +{ + static const char *itype[8] = { + [GPIO_TYPE_ACT_HIGH] = "act-high", + [GPIO_TYPE_ACT_LOW] = "act-low", + [GPIO_TYPE_EDG_RISING] = "edge-rising", + [GPIO_TYPE_EDG_FALLING] = "edge-falling", + [GPIO_TYPE_TRANSITIONAL]= "transitional", + [5] = "type-5", [6] = "type-6", [7] = "type-7" }; + uint32_t gpoutr = GPIO_CONF_READ_4(ixp425_softc, IXP425_GPIO_GPOUTR); + uint32_t gpoer = GPIO_CONF_READ_4(ixp425_softc, IXP425_GPIO_GPOER); + uint32_t gpinr = GPIO_CONF_READ_4(ixp425_softc, IXP425_GPIO_GPINR); + uint32_t gpit1r = GPIO_CONF_READ_4(ixp425_softc, IXP425_GPIO_GPIT1R); + uint32_t gpit2r = GPIO_CONF_READ_4(ixp425_softc, IXP425_GPIO_GPIT2R); + int i, j; + + db_printf("GPOUTR %08x GPOER %08x GPINR %08x GPISR %08x\n", + gpoutr, gpoer, gpinr, + GPIO_CONF_READ_4(ixp425_softc, IXP425_GPIO_GPISR)); + db_printf("GPIT1R %08x GPIT2R %08x GPCLKR %08x\n", + gpit1r, gpit2r, GPIO_CONF_READ_4(ixp425_softc, IXP425_GPIO_GPCLKR)); + for (i = 0; i < 16; i++) { + db_printf("[%2d] out %u in %u %-3s", i, + (gpoutr>>i)&1, (gpinr>>i)&1, (gpoer>>i)&1 ? "in" : "out"); + for (j = 0; j < 32; j++) + if (int2gpio[j] == i) { + db_printf(" irq %2u %s", j, itype[ + (((i & 8) ? gpit2r : gpit1r) >> (3*(i&7))) + & 7]); + break; + } + db_printf("\n"); + } +} +#endif +static __inline u_int32_t +ixp425_irq2gpio_bit(int irq) +{ return (1U << int2gpio[irq]); } @@ -205,7 +246,6 @@ ixp425_attach(device_t dev) { struct ixp425_softc *sc; -bootverbose = 1; /*XXX*/ device_printf(dev, "%b\n", ixp4xx_read_feature_bits(), EXP_FCTRL_BITS); sc = device_get_softc(dev); @@ -254,6 +294,27 @@ bootverbose = 1; /*XXX*/ if (bus_space_map(sc->sc_iot, IXP425_EXP_HWBASE, IXP425_EXP_SIZE, 0, &sc->sc_exp_ioh)) panic("%s: unable to map Expansion Bus registers", __func__); + if (cpu_is_ixp43x()) { + uint32_t cs3 = EXP_BUS_READ_4(sc, EXP_TIMING_CS3_OFFSET); + /* XXX force slowest possible timings and byte mode */ + EXP_BUS_WRITE_4(sc, EXP_TIMING_CS3_OFFSET, + cs3 | (EXP_T1|EXP_T2|EXP_T3|EXP_T4|EXP_T5) | EXP_BYTE_EN); + if (bootverbose) + device_printf(dev, + "EXP_TIMING_CS3_OFFSET 0x%x => 0x%x\n", + cs3, EXP_BUS_READ_4(sc, EXP_TIMING_CS3_OFFSET)); + + /* XXX force GPIO 3 for GPS uart */ + if (bootverbose) + device_printf(dev, "set gpio 3 edge-rising\n"); + GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, + GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER) | (1<<3)); + /* set interrupt type */ + GPIO_CONF_WRITE_4(sc, GPIO_TYPE_REG(3), + (GPIO_CONF_READ_4(sc, GPIO_TYPE_REG(3)) &~ + GPIO_TYPE(3, GPIO_TYPE_MASK)) | + GPIO_TYPE(3, GPIO_TYPE_EDG_RISING)); + } bus_generic_probe(dev); bus_generic_attach(dev); @@ -316,46 +377,83 @@ ixp425_read_ivar(device_t bus, device_t } /* - * NB: This table handles P->V translations for regions mapped - * through bus_alloc_resource. Anything done with bus_space_map - * is handled elsewhere and does not require an entry here. + * NB: This table handles P->V translations for regions setup with + * static mappings in initarm. This is used solely for calls to + * bus_alloc_resource_any; anything done with bus_space_map is + * handled elsewhere and does not require an entry here. * - * XXX getvbase is also used by uart_cpu_getdev (hence public) + * XXX this table is also used by uart_cpu_getdev via getvbase + * (hence the public api) */ -static const struct { +struct hwvtrans { uint32_t hwbase; uint32_t size; uint32_t vbase; -} hwvtrans[] = { - { IXP425_IO_HWBASE, IXP425_IO_SIZE, IXP425_IO_VBASE }, - { IXP425_PCI_HWBASE, IXP425_PCI_SIZE, IXP425_PCI_VBASE }, - { IXP425_PCI_MEM_HWBASE,IXP425_PCI_MEM_SIZE, IXP425_PCI_MEM_VBASE }, - { IXP425_EXP_BUS_CS0_HWBASE, IXP425_EXP_BUS_CS0_SIZE, - IXP425_EXP_BUS_CS0_VBASE }, - /* NB: needed only for uart_cpu_getdev */ - { IXP425_UART0_HWBASE, IXP425_REG_SIZE, IXP425_UART0_VBASE }, - { IXP425_UART1_HWBASE, IXP425_REG_SIZE, IXP425_UART1_VBASE }, - /* NB: need for ixp435 ehci controllers */ - { IXP435_USB1_HWBASE, IXP435_USB1_SIZE, IXP435_USB1_VBASE }, - { IXP435_USB2_HWBASE, IXP435_USB2_SIZE, IXP435_USB2_VBASE }, - /* NB: need for optional GPS on Cambria boards */ - { CAMBRIA_GPS_HWBASE, IXP425_REG_SIZE, CAMBRIA_GPS_VBASE }, - { CAMBRIA_RS485_HWBASE, IXP425_REG_SIZE, CAMBRIA_RS485_VBASE }, + int isa4x; /* XXX needs special bus space tag */ }; -int -getvbase(uint32_t hwbase, uint32_t size, uint32_t *vbase) +static const struct hwvtrans * +gethwvtrans(uint32_t hwbase, uint32_t size) { + static const struct hwvtrans hwvtrans[] = { +#if 0 + { .hwbase = IXP425_IO_HWBASE, + .size = IXP425_IO_SIZE, + .vbase = IXP425_IO_VBASE }, +#endif + /* NB: needed only for uart_cpu_getdev */ + { .hwbase = IXP425_UART0_HWBASE, + .size = IXP425_REG_SIZE, + .vbase = IXP425_UART0_VBASE, + .isa4x = 1 }, + { .hwbase = IXP425_UART1_HWBASE, + .size = IXP425_REG_SIZE, + .vbase = IXP425_UART1_VBASE, + .isa4x = 1 }, + { .hwbase = IXP425_PCI_HWBASE, + .size = IXP425_PCI_SIZE, + .vbase = IXP425_PCI_VBASE }, + { .hwbase = IXP425_PCI_MEM_HWBASE, + .size = IXP425_PCI_MEM_SIZE, + .vbase = IXP425_PCI_MEM_VBASE }, + { .hwbase = IXP425_EXP_BUS_CS0_HWBASE, + .size = IXP425_EXP_BUS_CS0_SIZE, + .vbase = IXP425_EXP_BUS_CS0_VBASE }, + /* NB: needed for ixp435 ehci controllers */ + { .hwbase = IXP435_USB1_HWBASE, + .size = IXP435_USB1_SIZE, + .vbase = IXP435_USB1_VBASE }, + { .hwbase = IXP435_USB2_HWBASE, + .size = IXP435_USB2_SIZE, + .vbase = IXP435_USB2_VBASE }, + { .hwbase = CAMBRIA_GPS_HWBASE, + .size = CAMBRIA_GPS_SIZE, + .vbase = CAMBRIA_GPS_VBASE }, + { .hwbase = CAMBRIA_RS485_HWBASE, + .size = CAMBRIA_RS485_SIZE, + .vbase = CAMBRIA_RS485_VBASE }, + }; int i; for (i = 0; i < sizeof hwvtrans / sizeof *hwvtrans; i++) { if (hwbase >= hwvtrans[i].hwbase && - hwbase + size <= hwvtrans[i].hwbase + hwvtrans[i].size) { - *vbase = hwbase - hwvtrans[i].hwbase + hwvtrans[i].vbase; - return (0); - } + hwbase + size <= hwvtrans[i].hwbase + hwvtrans[i].size) + return &hwvtrans[i]; } - return (ENOENT); + return NULL; +} + +/* XXX for uart_cpu_getdev */ +int +getvbase(uint32_t hwbase, uint32_t size, uint32_t *vbase) +{ + const struct hwvtrans *hw; + + hw = gethwvtrans(hwbase, size); + if (hw == NULL) + return (ENOENT); + *vbase = hwbase - hw->hwbase + hw->vbase; + return (0); } static struct resource * @@ -363,9 +461,10 @@ ixp425_alloc_resource(device_t dev, devi u_long start, u_long end, u_long count, u_int flags) { struct ixp425_softc *sc = device_get_softc(dev); + const struct hwvtrans *vtrans; struct rman *rmanp; struct resource *rv; - uint32_t vbase, addr; + uint32_t addr; int irq; switch (type) { @@ -385,11 +484,27 @@ ixp425_alloc_resource(device_t dev, devi /* override per hints */ if (BUS_READ_IVAR(dev, child, IXP425_IVAR_ADDR, &addr) == 0) { start = addr; - end = start + 0x1000; /* XXX */ - } - if (getvbase(start, end - start, &vbase) != 0) { + /* XXX use nominal window to check for mapping */ + vtrans = gethwvtrans(start, 0x1000); + if (vtrans != NULL) { + /* + * Assign the entire mapped region; this may + * not be correct but without more info from + * the caller we cannot tell. + */ + end = start + vtrans->size - + (start - vtrans->hwbase); + if (bootverbose) + device_printf(child, + "%s: assign 0x%lx:0x%lx%s\n", + __func__, start, end-start, + vtrans->isa4x ? " A4X" : ""); + } + } else + vtrans = gethwvtrans(start, end - start); + if (vtrans == NULL) { /* likely means above table needs to be updated */ - device_printf(dev, "%s: no mapping for 0x%lx:0x%lx\n", + device_printf(child, "%s: no mapping for 0x%lx:0x%lx\n", __func__, start, end-start); return NULL; } @@ -397,12 +512,11 @@ ixp425_alloc_resource(device_t dev, devi flags, child); if (rv != NULL) { rman_set_rid(rv, *rid); - if (strcmp(device_get_name(child), "uart") == 0 -&& device_get_unit(child) == 0) /* XXX */ + if (vtrans->isa4x) rman_set_bustag(rv, &ixp425_a4x_bs_tag); else rman_set_bustag(rv, sc->sc_iot); - rman_set_bushandle(rv, vbase); + rman_set_bushandle(rv, vtrans->vbase); } break; default: Modified: projects/cambria/sys/arm/xscale/ixp425/uart_bus_ixp425.c ============================================================================== --- projects/cambria/sys/arm/xscale/ixp425/uart_bus_ixp425.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/arm/xscale/ixp425/uart_bus_ixp425.c Wed Feb 25 00:58:08 2009 (r189021) @@ -68,13 +68,17 @@ static int uart_ixp425_probe(device_t dev) { struct uart_softc *sc; - u_int rclk; + int unit = device_get_unit(dev); + u_int rclk, rwdelay; sc = device_get_softc(dev); sc->sc_class = &uart_ns8250_class; - if (resource_int_value("uart", device_get_unit(dev), "rclk", &rclk)) + if (resource_int_value("uart", unit, "rclk", &rclk)) rclk = IXP425_UART_FREQ; + if (resource_int_value("uart", unit, "rwdelay", &rwdelay)) + rwdelay = 0; if (bootverbose) - device_printf(dev, "rclk %u\n", rclk); - return uart_bus_probe(dev, 0, rclk, 0, 0); + device_printf(dev, "rclk %u rwdelay %u\n", rclk, rwdelay); + + return uart_bus_probe(dev, 0, rclk, 0, 0, rwdelay); } Modified: projects/cambria/sys/dev/uart/uart.h ============================================================================== --- projects/cambria/sys/dev/uart/uart.h Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart.h Wed Feb 25 00:58:08 2009 (r189021) @@ -41,14 +41,26 @@ struct uart_bas { u_int chan; u_int rclk; u_int regshft; + u_int rw_delay; }; #define uart_regofs(bas, reg) ((reg) << (bas)->regshft) -#define uart_getreg(bas, reg) \ - bus_space_read_1((bas)->bst, (bas)->bsh, uart_regofs(bas, reg)) -#define uart_setreg(bas, reg, value) \ - bus_space_write_1((bas)->bst, (bas)->bsh, uart_regofs(bas, reg), value) +static __inline uint8_t +uart_getreg(struct uart_bas *bas, bus_size_t reg) +{ + if (bas->rw_delay) + DELAY(bas->rw_delay); + return bus_space_read_1(bas->bst, bas->bsh, uart_regofs(bas, reg)); +} + +static __inline void +uart_setreg(struct uart_bas *bas, bus_size_t reg, uint8_t v) +{ + if (bas->rw_delay) + DELAY(bas->rw_delay); + bus_space_write_1(bas->bst, bas->bsh, uart_regofs(bas, reg), v); +} /* * XXX we don't know the length of the bus space address range in use by Modified: projects/cambria/sys/dev/uart/uart_bus.h ============================================================================== --- projects/cambria/sys/dev/uart/uart_bus.h Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_bus.h Wed Feb 25 00:58:08 2009 (r189021) @@ -138,7 +138,8 @@ int uart_bus_attach(device_t dev); int uart_bus_detach(device_t dev); serdev_intr_t *uart_bus_ihand(device_t dev, int ipend); int uart_bus_ipend(device_t dev); -int uart_bus_probe(device_t dev, int regshft, int rclk, int rid, int chan); +int uart_bus_probe(device_t dev, int regshft, int rclk, int rid, int chan, + int rwdelay); int uart_bus_sysdev(device_t dev); int uart_tty_attach(struct uart_softc *); Modified: projects/cambria/sys/dev/uart/uart_bus_acpi.c ============================================================================== --- projects/cambria/sys/dev/uart/uart_bus_acpi.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_bus_acpi.c Wed Feb 25 00:58:08 2009 (r189021) @@ -73,7 +73,7 @@ uart_acpi_probe(device_t dev) if (!ISA_PNP_PROBE(parent, dev, acpi_ns8250_ids)) { sc->sc_class = &uart_ns8250_class; - return (uart_bus_probe(dev, 0, 0, 0, 0)); + return (uart_bus_probe(dev, 0, 0, 0, 0, 0)); } /* Add checks for non-ns8250 IDs here. */ Modified: projects/cambria/sys/dev/uart/uart_bus_ebus.c ============================================================================== --- projects/cambria/sys/dev/uart/uart_bus_ebus.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_bus_ebus.c Wed Feb 25 00:58:08 2009 (r189021) @@ -97,7 +97,7 @@ uart_ebus_probe(device_t dev) return (ENXIO); } sc->sc_class = &uart_ns8250_class; - return (uart_bus_probe(dev, 0, 0, 0, 0)); + return (uart_bus_probe(dev, 0, 0, 0, 0, 0)); } return (ENXIO); Modified: projects/cambria/sys/dev/uart/uart_bus_isa.c ============================================================================== --- projects/cambria/sys/dev/uart/uart_bus_isa.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_bus_isa.c Wed Feb 25 00:58:08 2009 (r189021) @@ -182,7 +182,7 @@ uart_isa_probe(device_t dev) #else sc->sc_class = &uart_ns8250_class; #endif - return (uart_bus_probe(dev, 0, 0, 0, 0)); + return (uart_bus_probe(dev, 0, 0, 0, 0, 0)); } DRIVER_MODULE(uart, isa, uart_isa_driver, uart_devclass, 0, 0); Modified: projects/cambria/sys/dev/uart/uart_bus_mbus.c ============================================================================== --- projects/cambria/sys/dev/uart/uart_bus_mbus.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_bus_mbus.c Wed Feb 25 00:58:08 2009 (r189021) @@ -73,7 +73,7 @@ uart_mbus_probe(device_t dev) sc = device_get_softc(dev); sc->sc_class = &uart_ns8250_class; - status = uart_bus_probe(dev, 2, get_tclk(), 0, 0); + status = uart_bus_probe(dev, 2, get_tclk(), 0, 0, 0); return(status); } Modified: projects/cambria/sys/dev/uart/uart_bus_ocp.c ============================================================================== --- projects/cambria/sys/dev/uart/uart_bus_ocp.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_bus_ocp.c Wed Feb 25 00:58:08 2009 (r189021) @@ -82,7 +82,7 @@ uart_ocp_probe(device_t dev) if (BUS_READ_IVAR(parent, dev, OCPBUS_IVAR_CLOCK, &clock)) clock = 0; - return (uart_bus_probe(dev, 0, clock, 0, 0)); + return (uart_bus_probe(dev, 0, clock, 0, 0, 0)); } DRIVER_MODULE(uart, ocpbus, uart_ocp_driver, uart_devclass, 0, 0); Modified: projects/cambria/sys/dev/uart/uart_bus_pccard.c ============================================================================== --- projects/cambria/sys/dev/uart/uart_bus_pccard.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_bus_pccard.c Wed Feb 25 00:58:08 2009 (r189021) @@ -91,7 +91,7 @@ uart_pccard_attach(device_t dev) sc = device_get_softc(dev); sc->sc_class = &uart_ns8250_class; - error = uart_bus_probe(dev, 0, 0, 0, 0); + error = uart_bus_probe(dev, 0, 0, 0, 0, 0); if (error > 0) return (error); return (uart_bus_attach(dev)); Modified: projects/cambria/sys/dev/uart/uart_bus_pci.c ============================================================================== --- projects/cambria/sys/dev/uart/uart_bus_pci.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_bus_pci.c Wed Feb 25 00:58:08 2009 (r189021) @@ -154,7 +154,7 @@ uart_pci_probe(device_t dev) match: if (id->desc) device_set_desc(dev, id->desc); - return (uart_bus_probe(dev, 0, id->rclk, id->rid, 0)); + return (uart_bus_probe(dev, 0, id->rclk, id->rid, 0, 0)); } DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, 0, 0); Modified: projects/cambria/sys/dev/uart/uart_bus_puc.c ============================================================================== --- projects/cambria/sys/dev/uart/uart_bus_puc.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_bus_puc.c Wed Feb 25 00:58:08 2009 (r189021) @@ -81,7 +81,7 @@ uart_puc_probe(device_t dev) if (BUS_READ_IVAR(parent, dev, PUC_IVAR_CLOCK, &rclk)) rclk = 0; - return (uart_bus_probe(dev, 0, rclk, 0, 0)); + return (uart_bus_probe(dev, 0, rclk, 0, 0, 0)); } DRIVER_MODULE(uart, puc, uart_puc_driver, uart_devclass, 0, 0); Modified: projects/cambria/sys/dev/uart/uart_bus_scc.c ============================================================================== --- projects/cambria/sys/dev/uart/uart_bus_scc.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_bus_scc.c Wed Feb 25 00:58:08 2009 (r189021) @@ -112,7 +112,7 @@ uart_scc_probe(device_t dev) BUS_READ_IVAR(parent, dev, SCC_IVAR_REGSHFT, &rs)) return (ENXIO); - return (uart_bus_probe(dev, rs, cl, 0, ch)); + return (uart_bus_probe(dev, rs, cl, 0, ch, 0)); } DRIVER_MODULE(uart, scc, uart_scc_driver, uart_devclass, 0, 0); Modified: projects/cambria/sys/dev/uart/uart_core.c ============================================================================== --- projects/cambria/sys/dev/uart/uart_core.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_core.c Wed Feb 25 00:58:08 2009 (r189021) @@ -319,7 +319,8 @@ uart_bus_sysdev(device_t dev) } int -uart_bus_probe(device_t dev, int regshft, int rclk, int rid, int chan) +uart_bus_probe(device_t dev, int regshft, int rclk, int rid, int chan, + int rwdelay) { struct uart_softc *sc; struct uart_devinfo *sysdev; @@ -379,6 +380,7 @@ uart_bus_probe(device_t dev, int regshft sc->sc_bas.chan = chan; sc->sc_bas.regshft = regshft; sc->sc_bas.rclk = (rclk == 0) ? sc->sc_class->uc_rclk : rclk; + sc->sc_bas.rw_delay = rwdelay; SLIST_FOREACH(sysdev, &uart_sysdevs, next) { if (chan == sysdev->bas.chan && Modified: projects/cambria/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- projects/cambria/sys/dev/uart/uart_dev_ns8250.c Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_dev_ns8250.c Wed Feb 25 00:58:08 2009 (r189021) @@ -385,6 +385,8 @@ struct uart_class uart_ns8250_class = { i = (i & s) ? (i & ~s) | d : i; \ } +static struct uart_softc *ns8250sc[4]; + static int ns8250_bus_attach(struct uart_softc *sc) { @@ -446,6 +448,8 @@ ns8250_bus_attach(struct uart_softc *sc) ns8250->ier |= ns8250->ier_rxbits; uart_setreg(bas, REG_IER, ns8250->ier); uart_barrier(bas); + +ns8250sc[device_get_unit(sc->sc_dev)] = sc; return (0); } @@ -580,17 +584,68 @@ ns8250_bus_ioctl(struct uart_softc *sc, return (error); } +static struct { + int count; + int nopend; + int rxrdy; + int overrun; + int ibreak; + int txidle; + int sigchg; +} istats[4]; + +#include "opt_ddb.h" +#ifdef DDB +#include +#include + +DB_SHOW_COMMAND(istats, db_show_istats) +{ + int i; + struct uart_softc *sc; + + for (i = 0; i < 4; i++) { + if (istats[i].count == 0) + continue; + db_printf("[%d] %u nopend %u rxrdy %u overrun %u break %u txidle %u sigchg %u\n", + i, istats[i].count, istats[i].nopend, + istats[i].rxrdy, istats[i].overrun, istats[i].ibreak, + istats[i].txidle, istats[i].sigchg); + db_printf(" "); + sc = ns8250sc[i]; + if (sc != NULL) { + struct uart_bas *bas = &sc->sc_bas; + uart_lock(sc->sc_hwmtx); + db_printf("ier %x iir %x lcr %x mcr %x lsr %x " + "msr %x efr %x\n", + uart_getreg(bas, REG_IER), + uart_getreg(bas, REG_IIR), + uart_getreg(bas, REG_LCR), + uart_getreg(bas, REG_MCR), + uart_getreg(bas, REG_LSR), + uart_getreg(bas, REG_MSR), + uart_getreg(bas, REG_EFR)); + uart_unlock(sc->sc_hwmtx); + } else + db_printf("\n"); + } +} +#endif + static int ns8250_bus_ipend(struct uart_softc *sc) { struct uart_bas *bas; int ipend; uint8_t iir, lsr; +int unit = device_get_unit(sc->sc_dev); bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); +istats[unit].count++; iir = uart_getreg(bas, REG_IIR); if (iir & IIR_NOPEND) { +istats[unit].nopend++; uart_unlock(sc->sc_hwmtx); return (0); } @@ -598,18 +653,27 @@ ns8250_bus_ipend(struct uart_softc *sc) if (iir & IIR_RXRDY) { lsr = uart_getreg(bas, REG_LSR); uart_unlock(sc->sc_hwmtx); - if (lsr & LSR_OE) + if (lsr & LSR_OE) { ipend |= SER_INT_OVERRUN; - if (lsr & LSR_BI) +istats[unit].overrun++; + } + if (lsr & LSR_BI) { ipend |= SER_INT_BREAK; - if (lsr & LSR_RXRDY) +istats[unit].ibreak++; + } + if (lsr & LSR_RXRDY) { ipend |= SER_INT_RXREADY; +istats[unit].rxrdy++; + } } else { uart_unlock(sc->sc_hwmtx); - if (iir & IIR_TXRDY) + if (iir & IIR_TXRDY) { ipend |= SER_INT_TXIDLE; - else +istats[unit].txidle++; + } else { ipend |= SER_INT_SIGCHG; +istats[unit].sigchg++; + } } return ((sc->sc_leaving) ? 0 : ipend); } @@ -646,7 +710,7 @@ ns8250_bus_probe(struct uart_softc *sc) mcr = MCR_IE; if (sc->sc_sysdev == NULL) { /* By using ns8250_init() we also set DTR and RTS. */ - ns8250_init(bas, 115200, 8, 1, UART_PARITY_NONE); + ns8250_init(bas, 4800, 8, 1, UART_PARITY_NONE); } else mcr |= MCR_DTR | MCR_RTS; @@ -778,12 +842,15 @@ ns8250_bus_probe(struct uart_softc *sc) return (0); } +#include + static int ns8250_bus_receive(struct uart_softc *sc) { struct uart_bas *bas; int xc; uint8_t lsr; +int nfe = 0, npe = 0, nrx = 0; bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); @@ -794,11 +861,16 @@ ns8250_bus_receive(struct uart_softc *sc break; } xc = uart_getreg(bas, REG_DATA); - if (lsr & LSR_FE) + if (lsr & LSR_FE) { xc |= UART_STAT_FRAMERR; - if (lsr & LSR_PE) + nfe++; + } + if (lsr & LSR_PE) { xc |= UART_STAT_PARERR; + npe++; + } uart_rx_put(sc, xc); + nrx++; lsr = uart_getreg(bas, REG_LSR); } /* Discard everything left in the Rx FIFO. */ @@ -808,6 +880,12 @@ ns8250_bus_receive(struct uart_softc *sc lsr = uart_getreg(bas, REG_LSR); } uart_unlock(sc->sc_hwmtx); +if (nfe || npe) device_printf(sc->sc_dev, "%s: nfe %d npe %d\n", __func__, nfe, npe); +if (nrx) { + device_printf(sc->sc_dev, "%s: nrx %d\n", __func__, nrx); + if (device_get_unit(sc->sc_dev) == 0) + kdb_enter("help", __func__); +} return (0); } Modified: projects/cambria/sys/dev/uart/uart_if.m ============================================================================== --- projects/cambria/sys/dev/uart/uart_if.m Tue Feb 24 23:34:02 2009 (r189020) +++ projects/cambria/sys/dev/uart/uart_if.m Wed Feb 25 00:58:08 2009 (r189021) @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include From owner-svn-src-projects@FreeBSD.ORG Fri Feb 27 21:00:25 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 906151065672; Fri, 27 Feb 2009 21:00:25 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CA3B8FC22; Fri, 27 Feb 2009 21:00:25 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1RL0PZw083011; Fri, 27 Feb 2009 21:00:25 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1RL0PHM083003; Fri, 27 Feb 2009 21:00:25 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902272100.n1RL0PHM083003@svn.freebsd.org> From: Sam Leffler Date: Fri, 27 Feb 2009 21:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189122 - in projects/vap7/tools/tools/nanobsd/gateworks: . Files Files/root Files/usr Files/usr/local Files/usr/local/bin cfg cfg/ssh X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2009 21:00:25 -0000 Author: sam Date: Fri Feb 27 21:00:24 2009 New Revision: 189122 URL: http://svn.freebsd.org/changeset/base/189122 Log: sample 2348 config Added: projects/vap7/tools/tools/nanobsd/gateworks/ projects/vap7/tools/tools/nanobsd/gateworks/Files/ projects/vap7/tools/tools/nanobsd/gateworks/Files/root/ projects/vap7/tools/tools/nanobsd/gateworks/Files/root/.profile projects/vap7/tools/tools/nanobsd/gateworks/Files/usr/ projects/vap7/tools/tools/nanobsd/gateworks/Files/usr/local/ projects/vap7/tools/tools/nanobsd/gateworks/Files/usr/local/bin/ projects/vap7/tools/tools/nanobsd/gateworks/G2348 projects/vap7/tools/tools/nanobsd/gateworks/avila projects/vap7/tools/tools/nanobsd/gateworks/cfg/ projects/vap7/tools/tools/nanobsd/gateworks/cfg/motd projects/vap7/tools/tools/nanobsd/gateworks/cfg/rc.conf (contents, props changed) projects/vap7/tools/tools/nanobsd/gateworks/cfg/ssh/ projects/vap7/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config projects/vap7/tools/tools/nanobsd/gateworks/cfg/ttys projects/vap7/tools/tools/nanobsd/gateworks/common Added: projects/vap7/tools/tools/nanobsd/gateworks/Files/root/.profile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/vap7/tools/tools/nanobsd/gateworks/Files/root/.profile Fri Feb 27 21:00:24 2009 (r189122) @@ -0,0 +1,15 @@ +# $FreeBSD: src/etc/root/dot.profile,v 1.21 2007/05/29 06:33:10 dougb Exp $ +# +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:~/bin +export PATH +HOME=/root; export HOME +TERM=${TERM:-cons25}; export TERM +PAGER=more; export PAGER + +#set -o vi +set -o emacs +if [ `id -u` = 0 ]; then + PS1="`hostname -s`# " +else + PS1="`hostname -s`% " +fi Added: projects/vap7/tools/tools/nanobsd/gateworks/G2348 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/vap7/tools/tools/nanobsd/gateworks/G2348 Fri Feb 27 21:00:24 2009 (r189122) @@ -0,0 +1,134 @@ +# +# Gateworks Avila IXP425 XScale board +# kernel configuration file for FreeBSD/arm +# +# $FreeBSD$ + +machine arm +ident G2348 + +options PHYSADDR=0x10000000 +options KERNPHYSADDR=0x10200000 +options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm +options FLASHADDR=0x50000000 +options LOADERRAMADDR=0x00000000 + +options STARTUP_PAGETABLE_ADDR=0x10000000 +include "../xscale/ixp425/std.avila" +options XSCALE_CACHE_READ_WRITE_ALLOCATE +#options ARM_USE_SMALL_ALLOC +hints "AVILA.hints" +makeoptions MODULES_OVERRIDE="ath_tx99" + +# NB: patched by boot2 to reflect boot/root partition +options ROOTDEVNAME=\"ufs:ad0s1\" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions CONF_CFLAGS=-mcpu=xscale + +options HZ=100 +#options DEVICE_POLLING + +# Debugging for use in -current +options KDB +options DDB #Enable the kernel debugger +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +options SCHED_4BSD #4BSD scheduler +options PREEMPTION + +options INET #InterNETworking +#options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +#options SOFTUPDATES #Enable FFS soft updates support +#options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options NFSCLIENT #Network Filesystem Client +#options NFSLOCKD #Network Lock Manager +options KTRACE #ktrace(1) support +#options SYSVSHM #SYSV-style shared memory +#options SYSVMSG #SYSV-style message queues +#options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +#options KBD_INSTALL_CDEV # install a CDEV entry in /dev +#options VERBOSE_SYSINIT + +device nexus +device mem +#device saarm + +device pci +device uart + +# I2C support +device iicbus +device iicbb +device iic +device ixpiic +device ds1672 # DS1672 on ipxiic +device ad7418 # AD7418 on ipxiic + +device ixpwdog # watchdog timer +device avila_led + +device cfi # flash support +options CFI_SUPPORT_STRATAFLASH + +device ata +device atadisk # ATA disk drives +device avila_ata # Gateworks CF/IDE support + +device npe # Network Processing Engine +device npe_fw +device firmware +device qmgr # Q Manager (required by npe) +device mii # NB: required by npe +device ether +device bpf + +device pty +device loop +device if_bridge + +device md +device random # Entropy device + +# Wireless NIC cards +device wlan # 802.11 support +options IEEE80211_DEBUG # enable debugging msgs +options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's +options IEEE80211_SUPPORT_TDMA +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support + +device ath # Atheros pci/cardbus NIC's +options ATH_SUPPORT_TDMA +options ATH_DEBUG # enable athdebug msgs +options ATH_DIAGAPI # enable api for athregs +#options ATH_TX99_DIAG # enable ath_tx99 hooks +device ath_rate_sample # SampleRate tx rate control for ath + +#device ath_hal # Atheros HAL +#options AH_SUPPORT_AR5416 +device ath_ar5212 +device ath_rf5413 # used by all high-power cards +options AH_DEBUG +options AH_ASSERT + +#device crypto +#device cryptodev +#device hifn # NB: Soekris minipci card known to work + +device usb +options USB_DEBUG +device ohci +device ehci +device ugen +device umass +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) Added: projects/vap7/tools/tools/nanobsd/gateworks/avila ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/vap7/tools/tools/nanobsd/gateworks/avila Fri Feb 27 21:00:24 2009 (r189122) @@ -0,0 +1,8 @@ +NANO_NAME="avila-vap7" +NANO_SRC=`pwd | sed 's/.tools.tools.nanobsd.*//'` +NANO_KERNEL="G2348" + +NANO_IMAGES=2 +FlashDevice Sandisk 512 + +. common Added: projects/vap7/tools/tools/nanobsd/gateworks/cfg/motd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/vap7/tools/tools/nanobsd/gateworks/cfg/motd Fri Feb 27 21:00:24 2009 (r189122) @@ -0,0 +1 @@ +FreeBSD 7.1-PRERELEASE (G2348) #1: Fri Sep 26 14:37:41 PDT 2008 Added: projects/vap7/tools/tools/nanobsd/gateworks/cfg/rc.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/vap7/tools/tools/nanobsd/gateworks/cfg/rc.conf Fri Feb 27 21:00:24 2009 (r189122) @@ -0,0 +1,24 @@ +#!/bin/sh + +hostname="avila" +#ifconfig_npe0="DHCP" +background_dhclient_npe0="YES" # Start dhcp client in the background. +#ifconfig_npe1="DHCP" +background_dhclient_npe1="YES" # Start dhcp client in the background. + +#wlans_ath0="wlan0" + +sshd_enable="YES" +nfs_client_enable="YES" + +sendmail_enable="NO" # Run the sendmail inbound daemon (YES/NO). +sendmail_submit_enable="NO" # Start a localhost-only MTA for mail submission +sendmail_outbound_enable="NO" # Dequeue stuck mail (YES/NO). +sendmail_msp_queue_enable="NO" # Dequeue stuck clientmqueue mail (YES/NO). + +dumpdev="NO" # Device to crashdump to (device name, AUTO, or NO). +background_fsck="NO" + +harvest_interrupt="NO" # Entropy device harvests interrupt randomness +harvest_ethernet="NO" # Entropy device harvests ethernet randomness +harvest_p_to_p="NO" # Entropy device harvests point-to-point randomness Added: projects/vap7/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/vap7/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config Fri Feb 27 21:00:24 2009 (r189122) @@ -0,0 +1,126 @@ +# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $ +# $FreeBSD: src/crypto/openssh/sshd_config,v 1.48 2008/08/01 02:48:36 des Exp $ + +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. + +# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options change a +# default value. + +# Note that some of FreeBSD's defaults differ from OpenBSD's, and +# FreeBSD has a few additional options. + +#VersionAddendum FreeBSD-20080801 + +#Port 22 +#Protocol 2 +#AddressFamily any +#ListenAddress 0.0.0.0 +#ListenAddress :: + +# Disable legacy (protocol version 1) support in the server for new +# installations. In future the default will change to require explicit +# activation of protocol 1 +Protocol 2 + +# HostKey for protocol version 1 +#HostKey /etc/ssh/ssh_host_key +# HostKeys for protocol version 2 +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_dsa_key + +# Lifetime and size of ephemeral version 1 server key +#KeyRegenerationInterval 1h +#ServerKeyBits 1024 + +# Logging +# obsoletes QuietMode and FascistLogging +#SyslogFacility AUTH +#LogLevel INFO + +# Authentication: + +#LoginGraceTime 2m +PermitRootLogin yes +#StrictModes yes +#MaxAuthTries 6 +#MaxSessions 10 + +#RSAAuthentication yes +#PubkeyAuthentication yes +#AuthorizedKeysFile .ssh/authorized_keys + +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#RhostsRSAAuthentication no +# similar for protocol version 2 +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# RhostsRSAAuthentication and HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes + +# Change to yes to enable built-in password authentication. +PasswordAuthentication yes +PermitEmptyPasswords yes + +# Change to no to disable PAM authentication +ChallengeResponseAuthentication no + +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no + +# GSSAPI options +#GSSAPIAuthentication no +#GSSAPICleanupCredentials yes + +# Set this to 'no' to disable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +#UsePAM yes + +#AllowAgentForwarding yes +#AllowTcpForwarding yes +#GatewayPorts no +#X11Forwarding yes +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PrintMotd yes +#PrintLastLog yes +#TCPKeepAlive yes +#UseLogin no +#UsePrivilegeSeparation yes +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#UseDNS yes +#PidFile /var/run/sshd.pid +#MaxStartups 10 +#PermitTunnel no +#ChrootDirectory none + +# no default banner path +#Banner none + +# override default of no subsystems +Subsystem sftp /usr/libexec/sftp-server + +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# ForceCommand cvs server Added: projects/vap7/tools/tools/nanobsd/gateworks/cfg/ttys ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/vap7/tools/tools/nanobsd/gateworks/cfg/ttys Fri Feb 27 21:00:24 2009 (r189122) @@ -0,0 +1,309 @@ +# +# $FreeBSD: head/etc/etc.arm/ttys 188535 2009-02-12 19:21:48Z ed $ +# @(#)ttys 5.1 (Berkeley) 4/17/89 +# +# This file specifies various information about terminals on the system. +# It is used by several different programs. Common entries for the +# various columns include: +# +# name The name of the terminal device. +# +# getty The program to start running on the terminal. Typically a +# getty program, as the name implies. Other common entries +# include none, when no getty is needed, and xdm, to start the +# X Window System. +# +# type The initial terminal type for this port. For hardwired +# terminal lines, this will contain the type of terminal used. +# For virtual consoles, the correct type is typically cons25, but +# vt220 will work better if you need interoperability with other +# systems like Solaris or GNU/Linux. +# Other common values include network for network connections on +# pseudo-terminals, dialup for incoming modem ports, and unknown +# when the terminal type cannot be predetermined. +# +# status Must be on or off. If on, init will run the getty program on +# the specified port. If the word "secure" appears, this tty +# allows root login. +# +# name getty type status comments +# +# If console is marked "insecure", then init will ask for the root password +# when going to single-user mode. +console none unknown off secure +# +ttyv0 "/usr/libexec/getty Pc" cons25 off secure +# Virtual terminals +ttyv1 "/usr/libexec/getty Pc" cons25 off secure +ttyv2 "/usr/libexec/getty Pc" cons25 off secure +ttyv3 "/usr/libexec/getty Pc" cons25 off secure +ttyv4 "/usr/libexec/getty Pc" cons25 off secure +ttyv5 "/usr/libexec/getty Pc" cons25 off secure +ttyv6 "/usr/libexec/getty Pc" cons25 off secure +ttyv7 "/usr/libexec/getty Pc" cons25 off secure +#ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure +# Serial terminals +# The 'dialup' keyword identifies dialin lines to login, fingerd etc. +ttyu0 "/usr/libexec/getty std.9600" vt100 on secure +ttyu1 "/usr/libexec/getty std.9600" dialup off secure +ttyu2 "/usr/libexec/getty std.9600" dialup off secure +ttyu3 "/usr/libexec/getty std.9600" dialup off secure +# Dumb console +dcons "/usr/libexec/getty std.9600" vt100 off secure +# Pseudo terminals +ttyp0 none network +ttyp1 none network +ttyp2 none network +ttyp3 none network +ttyp4 none network +ttyp5 none network +ttyp6 none network +ttyp7 none network +ttyp8 none network +ttyp9 none network +ttypa none network +ttypb none network +ttypc none network +ttypd none network +ttype none network +ttypf none network +ttypg none network +ttyph none network +ttypi none network +ttypj none network +ttypk none network +ttypl none network +ttypm none network +ttypn none network +ttypo none network +ttypp none network +ttypq none network +ttypr none network +ttyps none network +ttypt none network +ttypu none network +ttypv none network +ttyq0 none network +ttyq1 none network +ttyq2 none network +ttyq3 none network +ttyq4 none network +ttyq5 none network +ttyq6 none network +ttyq7 none network +ttyq8 none network +ttyq9 none network +ttyqa none network +ttyqb none network +ttyqc none network +ttyqd none network +ttyqe none network +ttyqf none network +ttyqg none network +ttyqh none network +ttyqi none network +ttyqj none network +ttyqk none network +ttyql none network +ttyqm none network +ttyqn none network +ttyqo none network +ttyqp none network +ttyqq none network +ttyqr none network +ttyqs none network +ttyqt none network +ttyqu none network +ttyqv none network +ttyr0 none network +ttyr1 none network +ttyr2 none network +ttyr3 none network +ttyr4 none network +ttyr5 none network +ttyr6 none network +ttyr7 none network +ttyr8 none network +ttyr9 none network +ttyra none network +ttyrb none network +ttyrc none network +ttyrd none network +ttyre none network +ttyrf none network +ttyrg none network +ttyrh none network +ttyri none network +ttyrj none network +ttyrk none network +ttyrl none network +ttyrm none network +ttyrn none network +ttyro none network +ttyrp none network +ttyrq none network +ttyrr none network +ttyrs none network +ttyrt none network +ttyru none network +ttyrv none network +ttys0 none network +ttys1 none network +ttys2 none network +ttys3 none network +ttys4 none network +ttys5 none network +ttys6 none network +ttys7 none network +ttys8 none network +ttys9 none network +ttysa none network +ttysb none network +ttysc none network +ttysd none network +ttyse none network +ttysf none network +ttysg none network +ttysh none network +ttysi none network +ttysj none network +ttysk none network +ttysl none network +ttysm none network +ttysn none network +ttyso none network +ttysp none network +ttysq none network +ttysr none network +ttyss none network +ttyst none network +ttysu none network +ttysv none network +ttyP0 none network +ttyP1 none network +ttyP2 none network +ttyP3 none network +ttyP4 none network +ttyP5 none network +ttyP6 none network +ttyP7 none network +ttyP8 none network +ttyP9 none network +ttyPa none network +ttyPb none network +ttyPc none network +ttyPd none network +ttyPe none network +ttyPf none network +ttyPg none network +ttyPh none network +ttyPi none network +ttyPj none network +ttyPk none network +ttyPl none network +ttyPm none network +ttyPn none network +ttyPo none network +ttyPp none network +ttyPq none network +ttyPr none network +ttyPs none network +ttyPt none network +ttyPu none network +ttyPv none network +ttyQ0 none network +ttyQ1 none network +ttyQ2 none network +ttyQ3 none network +ttyQ4 none network +ttyQ5 none network +ttyQ6 none network +ttyQ7 none network +ttyQ8 none network +ttyQ9 none network +ttyQa none network +ttyQb none network +ttyQc none network +ttyQd none network +ttyQe none network +ttyQf none network +ttyQg none network +ttyQh none network +ttyQi none network +ttyQj none network +ttyQk none network +ttyQl none network +ttyQm none network +ttyQn none network +ttyQo none network +ttyQp none network +ttyQq none network +ttyQr none network +ttyQs none network +ttyQt none network +ttyQu none network +ttyQv none network +ttyR0 none network +ttyR1 none network +ttyR2 none network +ttyR3 none network +ttyR4 none network +ttyR5 none network +ttyR6 none network +ttyR7 none network +ttyR8 none network +ttyR9 none network +ttyRa none network +ttyRb none network +ttyRc none network +ttyRd none network +ttyRe none network +ttyRf none network +ttyRg none network +ttyRh none network +ttyRi none network +ttyRj none network +ttyRk none network +ttyRl none network +ttyRm none network +ttyRn none network +ttyRo none network +ttyRp none network +ttyRq none network +ttyRr none network +ttyRs none network +ttyRt none network +ttyRu none network +ttyRv none network +ttyS0 none network +ttyS1 none network +ttyS2 none network +ttyS3 none network +ttyS4 none network +ttyS5 none network +ttyS6 none network +ttyS7 none network +ttyS8 none network +ttyS9 none network +ttySa none network +ttySb none network +ttySc none network +ttySd none network +ttySe none network +ttySf none network +ttySg none network +ttySh none network +ttySi none network +ttySj none network +ttySk none network +ttySl none network +ttySm none network +ttySn none network +ttySo none network +ttySp none network +ttySq none network +ttySr none network +ttySs none network +ttySt none network +ttySu none network +ttySv none network Added: projects/vap7/tools/tools/nanobsd/gateworks/common ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/vap7/tools/tools/nanobsd/gateworks/common Fri Feb 27 21:00:24 2009 (r189122) @@ -0,0 +1,344 @@ +NANO_CFGDIR=${NANO_SRC}/${NANO_TOOLS}/gateworks/cfg +test -d ${NANO_CFGDIR} || NANO_CFGDIR=/var/empty +NANO_PMAKE="make" # NB: disable -j 3 + +NANO_ARCH=arm +TARGET_CPUTYPE=xscale; export TARGET_CPUTYPE # XXX +TARGET_BIG_ENDIAN=true; export TARGET_BIG_ENDIAN # XXX + +NANO_CUSTOMIZE="cust_allow_ssh_root" + +clean_usr_local() +{ + LOCAL_DIR=${NANO_WORLDDIR}/usr/local + pprint 2 "Clean and create world directory (${LOCAL_DIR})" + if rm -rf ${LOCAL_DIR}/ > /dev/null 2>&1 ; then + true + else + chflags -R noschg ${LOCAL_DIR}/ + rm -rf ${LOCAL_DIR}/ + fi + for f in bin etc lib libdata libexec sbin share; do + mkdir -p ${LOCAL_DIR}/$f + done +} +NANO_CUSTOMIZE="$NANO_CUSTOMIZE clean_usr_local" + +cust_install_machine_files() +{ + echo "cd ${NANO_TOOLS}/gateworks/Files" + cd ${NANO_TOOLS}/gateworks/Files + find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} +} +NANO_CUSTOMIZE="$NANO_CUSTOMIZE cust_install_files cust_install_machine_files" + +buildenv() +{ + cd ${NANO_SRC} + env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF} \ + DESTDIR=${NANO_WORLDDIR} make buildenv +} + +net80211_tools() +{ + for f in wlanstats wlanwds wlanwatch; do + echo "(cd tools/tools/net80211/$f; make $1)"; + done | buildenv +} +net80211_clean_tools() +{ + net80211_tools "clean" +} +net80211_build_tools() +{ + net80211_tools "" +} +net80211_install_tools() +{ + net80211_tools "install" +} +NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_clean_tools" +NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_build_tools" +NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_install_tools" + +ath_clean_tools() +{ + echo "cd tools/tools/ath; make clean" | buildenv +} +ath_build_tools() +{ + echo "cd tools/tools/ath; make" | buildenv +} +ath_install_tools() +{ + echo "cd tools/tools/ath; make install" | buildenv +} +NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_clean_tools" +NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_build_tools" +NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_install_tools" + +NANO_MAKEFS="makefs -B big \ + -o bsize=4096,fsize=512,density=8192,optimization=space" +export NANO_MAKEFS + +# NB: leave c++ enabled so devd can be built +CONF_BUILD=" +WITHOUT_ACPI=true +WITHOUT_ATM=true +WITHOUT_AUDIT=true +WITHOUT_BIND_DNSSEC=true +WITHOUT_BIND_ETC=true +WITHOUT_BIND_LIBS_LWRES=true +WITHOUT_BLUETOOTH=true +WITHOUT_CALENDAR=true +WITHOUT_CDDL=true +WITHOUT_CVS=true +WITHOUT_DICT=true +WITHOUT_EXAMPLES=true +WITHOUT_FORTRAN=true +WITHOUT_GAMES=true +WITHOUT_GCOV=true +WITHOUT_GPIB=true +WITHOUT_HTML=true +WITHOUT_I4B=true +WITHOUT_INET6=true +WITHOUT_INFO=true +WITHOUT_IPFILTER=true +WITHOUT_IPX=true +WITHOUT_KERBEROS=true +WITHOUT_LIBKSE=true +WITHOUT_LOCALES=true +WITHOUT_LPR=true +WITHOUT_MAN=true +WITHOUT_NETCAT=true +WITHOUT_NIS=true +WITHOUT_NLS=true +WITHOUT_NS_CACHING=true +WITHOUT_OBJC=true +WITHOUT_PROFILE=true +WITHOUT_RCMDS=true +WITHOUT_RCS=true +WITHOUT_RESCUE=true +WITHOUT_SENDMAIL=true +WITHOUT_SHAREDOCS=true +WITHOUT_SSP=true +WITHOUT_SYSCONS=true +WITHOUT_TCSH=true +" +CONF_INSTALL="$CONF_BUILD +WITHOUT_TOOLCHAIN=true +WITHOUT_INSTALLLIB=true +" + +# NB: override to suppress install of kernel.symbols +install_kernel() +{ + pprint 2 "install kernel" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.ik" + + cd ${NANO_SRC} + env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ + INSTALL_NODEBUG=true \ + DESTDIR=${NANO_WORLDDIR} \ + __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ + > ${MAKEOBJDIRPREFIX}/_.ik 2>&1 +} + +# NB: override to force / on s1 instead of s1a +setup_nanobsd_etc() +{ + pprint 2 "configure nanobsd /etc" + + ( + cd ${NANO_WORLDDIR} + + # create diskless marker file + touch etc/diskless + + # Make root filesystem R/O by default + echo "root_rw_mount=NO" >> etc/defaults/rc.conf + + # save config file for scripts + echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf + + echo "/dev/${NANO_DRIVE}s1 / ufs ro 1 1" > etc/fstab + echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab + mkdir -p cfg + ) +} + +create_arm_diskimage() +{ + pprint 2 "build diskimage" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.di" + + ( + echo "NANO_MEDIASIZE: $NANO_MEDIASIZE" + echo "NANO_IMAGES: $NANO_IMAGES" + echo "NANO_SECTS: $NANO_SECTS" + echo "NANO_HEADS: $NANO_HEADS" + echo "NANO_CODESIZE: $NANO_CODESIZE" + echo "NANO_CONFSIZE: $NANO_CONFSIZE" + echo "NANO_DATASIZE: $NANO_DATASIZE" + + echo $NANO_MEDIASIZE $NANO_IMAGES \ + $NANO_SECTS $NANO_HEADS \ + $NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE | + awk ' + { + printf "# %s\n", $0 + + # size of cylinder in sectors + cs = $3 * $4 + + # number of full cylinders on media + cyl = int ($1 / cs) + + # output fdisk geometry spec, truncate cyls to 1023 + if (cyl <= 1023) + print "g c" cyl " h" $4 " s" $3 + else + print "g c" 1023 " h" $4 " s" $3 + + if ($7 > 0) { + # size of data partition in full cylinders + dsl = int (($7 + cs - 1) / cs) + } else { + dsl = 0; + } + + # size of config partition in full cylinders + csl = int (($6 + cs - 1) / cs) + + if ($5 == 0) { + # size of image partition(s) in full cylinders + isl = int ((cyl - dsl - csl) / $2) + } else { + isl = int (($5 + cs - 1) / cs) + } + + # First image partition start at second track + print "p 1 165 " $3, isl * cs - $3 + c = isl * cs; + + # Second image partition (if any) also starts offset one + # track to keep them identical. + if ($2 > 1) { + print "p 2 165 " $3 + c, isl * cs - $3 + c += isl * cs; + } + + # Config partition starts at cylinder boundary. + print "p 3 165 " c, csl * cs + c += csl * cs + + # Data partition (if any) starts at cylinder boundary. + if ($7 > 0) { + print "p 4 165 " c, dsl * cs + } else if ($7 < 0 && $1 > c) { + print "p 4 165 " c, $1 - c + } else if ($1 < c) { + print "Disk space overcommitted by", \ + c - $1, "sectors" > "/dev/stderr" + exit 2 + } + + # Force slice 1 to be marked active. This is necessary + # for booting the image from a USB device to work. + print "a 1" + } + ' > ${MAKEOBJDIRPREFIX}/_.fdisk + + IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} + BS=${NANO_SECTS}b + + if [ "${NANO_MD_BACKING}" = "swap" ] ; then + MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}` + else + echo ""; echo "Creating md backing file ${IMG} ..." + _c=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` + pprint 2 "dd if=/dev/zero of=${IMG} bs=${BS} count=${_c}" + dd if=/dev/zero of=${IMG} bs=${BS} count=${_c} + pprint 2 "mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} -y ${NANO_HEADS}" + MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}` + fi + + trap "mdconfig -d -u $MD" 1 2 15 EXIT + + echo ""; echo "Write partition table ..." + FDISK=${MAKEOBJDIRPREFIX}/_.fdisk + pprint 2 "fdisk -i -f ${FDISK} ${MD}" + fdisk -i -f ${FDISK} ${MD} + pprint 2 "fdisk ${MD}" + fdisk ${MD} + + # Create first image + IMG1=${NANO_DISKIMGDIR}/_.disk.image1 + echo ""; echo "Create first image ${IMG1} ..." + SIZE=`awk '/^p 1/ { print $5 "b" }' ${FDISK}` + pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${IMG1} ${NANO_WORLDDIR}" + ${NANO_MAKEFS} -s ${SIZE} ${IMG1} ${NANO_WORLDDIR} + pprint 2 "dd if=${IMG1} of=/dev/${MD}s1 bs=${BS}" + dd if=${IMG1} of=/dev/${MD}s1 bs=${BS} + + if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then + IMG2=${NANO_DISKIMGDIR}/_.disk.image2 + echo ""; echo "Create second image ${IMG2}..." + for f in ${NANO_WORLDDIR}/etc/fstab ${NANO_WORLDDIR}/conf/base/etc/fstab + do + sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/g" $f + done + + SIZE=`awk '/^p 2/ { print $5 "b" }' ${FDISK}` + pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${IMG2} ${NANO_WORLDDIR}" + ${NANO_MAKEFS} -s ${SIZE} ${IMG2} ${NANO_WORLDDIR} + pprint 2 "dd if=${IMG2} of=/dev/${MD}s2 bs=${BS}" + dd if=${IMG2} of=/dev/${MD}s2 bs=${BS} + fi + + # Create Config slice + CFG=${NANO_DISKIMGDIR}/_.disk.cfg + echo ""; echo "Creating config partition ${CFG}..." + SIZE=`awk '/^p 3/ { print $5 "b" }' ${FDISK}` + # XXX: fill from where ? + pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${CFG} ${NANO_CFGDIR}" + ${NANO_MAKEFS} -s ${SIZE} ${CFG} ${NANO_CFGDIR} + pprint 2 "dd if=${CFG} of=/dev/${MD}s3 bs=${BS}" + dd if=${CFG} of=/dev/${MD}s3 bs=${BS} + pprint 2 "rm ${CFG}" + rm ${CFG}; CFG= # NB: disable printing below + + # Create Data slice, if any. + if [ $NANO_DATASIZE -gt 0 ] ; then + DATA=${NANO_DISKIMGDIR}/_.disk.data + echo ""; echo "Creating data partition ${DATA}..." + SIZE=`awk '/^p 4/ { print $5 "b" }' ${FDISK}` + # XXX: fill from where ? + pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${DATA} /var/empty" + ${NANO_MAKEFS} -s ${SIZE} ${DATA} /var/empty + pprint 2 "dd if=${DATA} of=/dev/${MD}s4 bs=${BS}" + dd if=${DATA} of=/dev/${MD}s4 bs=${BS} + pprint 2 "rm ${DATA}" + rm ${DATA}; DATA= # NB: disable printing below + fi + + if [ "${NANO_MD_BACKING}" = "swap" ] ; then + echo "Writing out _.disk.full..." + dd if=/dev/${MD} of=${IMG} bs=${BS} + fi + + echo "" + echo "Completed images in:" + echo "" + echo "Full disk: ${IMG}" + echo "Primary partition: ${IMG1}" + test "${IMG2}" && echo "2ndary partition: ${IMG2}" + test "${CFG}" && echo "/cfg partition: ${CFG}" + test "${DATA}" && echo "/data partition: ${DATA}" + echo "" + echo "Use dd if= of=/dev/ bs=${BS} to transfer an" + echo "image to bootable media /dev/." + ) > ${MAKEOBJDIRPREFIX}/_.di 2>&1 +} From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:53:23 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2A4B10656BE; Sat, 28 Feb 2009 17:53:23 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F4238FC22; Sat, 28 Feb 2009 17:53:23 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHrN0d016630; Sat, 28 Feb 2009 17:53:23 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHrNVG016626; Sat, 28 Feb 2009 17:53:23 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281753.n1SHrNVG016626@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189174 - projects/jbuild/sys/dev/usb X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:53:24 -0000 Author: jb Date: Sat Feb 28 17:53:23 2009 New Revision: 189174 URL: http://svn.freebsd.org/changeset/base/189174 Log: MFC Replaced: projects/jbuild/sys/dev/usb/ - copied from r189173, head/sys/dev/usb/ projects/jbuild/sys/dev/usb/usb.h - copied unchanged from r189173, head/sys/dev/usb/usb.h projects/jbuild/sys/dev/usb/usb_if.m - copied unchanged from r189173, head/sys/dev/usb/usb_if.m projects/jbuild/sys/dev/usb/usbdevs - copied unchanged from r189173, head/sys/dev/usb/usbdevs projects/jbuild/sys/dev/usb/usbhid.h - copied unchanged from r189173, head/sys/dev/usb/usbhid.h Copied: projects/jbuild/sys/dev/usb/usb.h (from r189173, head/sys/dev/usb/usb.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/jbuild/sys/dev/usb/usb.h Sat Feb 28 17:53:23 2009 (r189174, copy of r189173, head/sys/dev/usb/usb.h) @@ -0,0 +1,643 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. + * Copyright (c) 1998 Lennart Augustsson. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. + */ + +/* + * This file contains standard definitions for the following USB + * protocol versions: + * + * USB v1.0 + * USB v1.1 + * USB v2.0 + * USB v3.0 + */ + +#ifndef _USB2_STANDARD_H_ +#define _USB2_STANDARD_H_ + +#include + +/* + * Minimum time a device needs to be powered down to go through a + * power cycle. These values are not in the USB specification. + */ +#define USB_POWER_DOWN_TIME 200 /* ms */ +#define USB_PORT_POWER_DOWN_TIME 100 /* ms */ + +/* Definition of software USB power modes */ +#define USB_POWER_MODE_OFF 0 /* turn off device */ +#define USB_POWER_MODE_ON 1 /* always on */ +#define USB_POWER_MODE_SAVE 2 /* automatic suspend and resume */ +#define USB_POWER_MODE_SUSPEND 3 /* force suspend */ +#define USB_POWER_MODE_RESUME 4 /* force resume */ + +#if 0 +/* These are the values from the USB specification. */ +#define USB_PORT_RESET_DELAY 10 /* ms */ +#define USB_PORT_ROOT_RESET_DELAY 50 /* ms */ +#define USB_PORT_RESET_RECOVERY 10 /* ms */ +#define USB_PORT_POWERUP_DELAY 100 /* ms */ +#define USB_PORT_RESUME_DELAY 20 /* ms */ +#define USB_SET_ADDRESS_SETTLE 2 /* ms */ +#define USB_RESUME_DELAY (20*5) /* ms */ +#define USB_RESUME_WAIT 10 /* ms */ +#define USB_RESUME_RECOVERY 10 /* ms */ +#define USB_EXTRA_POWER_UP_TIME 0 /* ms */ +#else +/* Allow for marginal and non-conforming devices. */ +#define USB_PORT_RESET_DELAY 50 /* ms */ +#define USB_PORT_ROOT_RESET_DELAY 250 /* ms */ +#define USB_PORT_RESET_RECOVERY 250 /* ms */ +#define USB_PORT_POWERUP_DELAY 300 /* ms */ +#define USB_PORT_RESUME_DELAY (20*2) /* ms */ +#define USB_SET_ADDRESS_SETTLE 10 /* ms */ +#define USB_RESUME_DELAY (50*5) /* ms */ +#define USB_RESUME_WAIT 50 /* ms */ +#define USB_RESUME_RECOVERY 50 /* ms */ +#define USB_EXTRA_POWER_UP_TIME 20 /* ms */ +#endif + +#define USB_MIN_POWER 100 /* mA */ +#define USB_MAX_POWER 500 /* mA */ + +#define USB_BUS_RESET_DELAY 100 /* ms */ + +/* + * USB record layout in memory: + * + * - USB config 0 + * - USB interfaces + * - USB alternative interfaces + * - USB pipes + * + * - USB config 1 + * - USB interfaces + * - USB alternative interfaces + * - USB pipes + */ + +/* Declaration of USB records */ + +struct usb2_device_request { + uByte bmRequestType; + uByte bRequest; + uWord wValue; + uWord wIndex; + uWord wLength; +} __packed; +typedef struct usb2_device_request usb_device_request_t; + +#define UT_WRITE 0x00 +#define UT_READ 0x80 +#define UT_STANDARD 0x00 +#define UT_CLASS 0x20 +#define UT_VENDOR 0x40 +#define UT_DEVICE 0x00 +#define UT_INTERFACE 0x01 +#define UT_ENDPOINT 0x02 +#define UT_OTHER 0x03 + +#define UT_READ_DEVICE (UT_READ | UT_STANDARD | UT_DEVICE) +#define UT_READ_INTERFACE (UT_READ | UT_STANDARD | UT_INTERFACE) +#define UT_READ_ENDPOINT (UT_READ | UT_STANDARD | UT_ENDPOINT) +#define UT_WRITE_DEVICE (UT_WRITE | UT_STANDARD | UT_DEVICE) +#define UT_WRITE_INTERFACE (UT_WRITE | UT_STANDARD | UT_INTERFACE) +#define UT_WRITE_ENDPOINT (UT_WRITE | UT_STANDARD | UT_ENDPOINT) +#define UT_READ_CLASS_DEVICE (UT_READ | UT_CLASS | UT_DEVICE) +#define UT_READ_CLASS_INTERFACE (UT_READ | UT_CLASS | UT_INTERFACE) +#define UT_READ_CLASS_OTHER (UT_READ | UT_CLASS | UT_OTHER) +#define UT_READ_CLASS_ENDPOINT (UT_READ | UT_CLASS | UT_ENDPOINT) +#define UT_WRITE_CLASS_DEVICE (UT_WRITE | UT_CLASS | UT_DEVICE) +#define UT_WRITE_CLASS_INTERFACE (UT_WRITE | UT_CLASS | UT_INTERFACE) +#define UT_WRITE_CLASS_OTHER (UT_WRITE | UT_CLASS | UT_OTHER) +#define UT_WRITE_CLASS_ENDPOINT (UT_WRITE | UT_CLASS | UT_ENDPOINT) +#define UT_READ_VENDOR_DEVICE (UT_READ | UT_VENDOR | UT_DEVICE) +#define UT_READ_VENDOR_INTERFACE (UT_READ | UT_VENDOR | UT_INTERFACE) +#define UT_READ_VENDOR_OTHER (UT_READ | UT_VENDOR | UT_OTHER) +#define UT_READ_VENDOR_ENDPOINT (UT_READ | UT_VENDOR | UT_ENDPOINT) +#define UT_WRITE_VENDOR_DEVICE (UT_WRITE | UT_VENDOR | UT_DEVICE) +#define UT_WRITE_VENDOR_INTERFACE (UT_WRITE | UT_VENDOR | UT_INTERFACE) +#define UT_WRITE_VENDOR_OTHER (UT_WRITE | UT_VENDOR | UT_OTHER) +#define UT_WRITE_VENDOR_ENDPOINT (UT_WRITE | UT_VENDOR | UT_ENDPOINT) + +/* Requests */ +#define UR_GET_STATUS 0x00 +#define UR_CLEAR_FEATURE 0x01 +#define UR_SET_FEATURE 0x03 +#define UR_SET_ADDRESS 0x05 +#define UR_GET_DESCRIPTOR 0x06 +#define UDESC_DEVICE 0x01 +#define UDESC_CONFIG 0x02 +#define UDESC_STRING 0x03 +#define USB_LANGUAGE_TABLE 0x00 /* language ID string index */ +#define UDESC_INTERFACE 0x04 +#define UDESC_ENDPOINT 0x05 +#define UDESC_DEVICE_QUALIFIER 0x06 +#define UDESC_OTHER_SPEED_CONFIGURATION 0x07 +#define UDESC_INTERFACE_POWER 0x08 +#define UDESC_OTG 0x09 +#define UDESC_DEBUG 0x0A +#define UDESC_IFACE_ASSOC 0x0B /* interface association */ +#define UDESC_BOS 0x0F /* binary object store */ +#define UDESC_DEVICE_CAPABILITY 0x10 +#define UDESC_CS_DEVICE 0x21 /* class specific */ +#define UDESC_CS_CONFIG 0x22 +#define UDESC_CS_STRING 0x23 +#define UDESC_CS_INTERFACE 0x24 +#define UDESC_CS_ENDPOINT 0x25 +#define UDESC_HUB 0x29 +#define UDESC_ENDPOINT_SS_COMP 0x30 /* super speed */ +#define UR_SET_DESCRIPTOR 0x07 +#define UR_GET_CONFIG 0x08 +#define UR_SET_CONFIG 0x09 +#define UR_GET_INTERFACE 0x0a +#define UR_SET_INTERFACE 0x0b +#define UR_SYNCH_FRAME 0x0c +#define UR_SET_SEL 0x30 +#define UR_ISOCH_DELAY 0x31 + +/* HUB specific request */ +#define UR_GET_BUS_STATE 0x02 +#define UR_CLEAR_TT_BUFFER 0x08 +#define UR_RESET_TT 0x09 +#define UR_GET_TT_STATE 0x0a +#define UR_STOP_TT 0x0b +#define UR_SET_HUB_DEPTH 0x0c +#define UR_GET_PORT_ERR_COUNT 0x0d + +/* Feature numbers */ +#define UF_ENDPOINT_HALT 0 +#define UF_DEVICE_REMOTE_WAKEUP 1 +#define UF_TEST_MODE 2 +#define UF_U1_ENABLE 0x30 +#define UF_U2_ENABLE 0x31 +#define UF_LTM_ENABLE 0x32 + +/* HUB specific features */ +#define UHF_C_HUB_LOCAL_POWER 0 +#define UHF_C_HUB_OVER_CURRENT 1 +#define UHF_PORT_CONNECTION 0 +#define UHF_PORT_ENABLE 1 +#define UHF_PORT_SUSPEND 2 +#define UHF_PORT_OVER_CURRENT 3 +#define UHF_PORT_RESET 4 +#define UHF_PORT_LINK_STATE 5 +#define UHF_PORT_POWER 8 +#define UHF_PORT_LOW_SPEED 9 +#define UHF_C_PORT_CONNECTION 16 +#define UHF_C_PORT_ENABLE 17 +#define UHF_C_PORT_SUSPEND 18 +#define UHF_C_PORT_OVER_CURRENT 19 +#define UHF_C_PORT_RESET 20 +#define UHF_PORT_TEST 21 +#define UHF_PORT_INDICATOR 22 + +/* SuperSpeed HUB specific features */ +#define UHF_PORT_U1_TIMEOUT 23 +#define UHF_PORT_U2_TIMEOUT 24 +#define UHF_C_PORT_LINK_STATE 25 +#define UHF_C_PORT_CONFIG_ERROR 26 +#define UHF_PORT_REMOTE_WAKE_MASK 27 +#define UHF_BH_PORT_RESET 28 +#define UHF_C_BH_PORT_RESET 29 +#define UHF_FORCE_LINKPM_ACCEPT 30 + +struct usb2_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; +} __packed; +typedef struct usb2_descriptor usb_descriptor_t; + +struct usb2_device_descriptor { + uByte bLength; + uByte bDescriptorType; + uWord bcdUSB; +#define UD_USB_2_0 0x0200 +#define UD_USB_3_0 0x0300 +#define UD_IS_USB2(d) ((d)->bcdUSB[1] == 0x02) +#define UD_IS_USB3(d) ((d)->bcdUSB[1] == 0x03) + uByte bDeviceClass; + uByte bDeviceSubClass; + uByte bDeviceProtocol; + uByte bMaxPacketSize; + /* The fields below are not part of the initial descriptor. */ + uWord idVendor; + uWord idProduct; + uWord bcdDevice; + uByte iManufacturer; + uByte iProduct; + uByte iSerialNumber; + uByte bNumConfigurations; +} __packed; +typedef struct usb2_device_descriptor usb_device_descriptor_t; + +/* Binary Device Object Store (BOS) */ +struct usb2_bos_descriptor { + uByte bLength; + uByte bDescriptorType; + uWord wTotalLength; + uByte bNumDeviceCaps; +} __packed; +typedef struct usb2_bos_descriptor usb_bos_descriptor_t; + +/* Binary Device Object Store Capability */ +struct usb2_bos_cap_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDevCapabilityType; +#define USB_DEVCAP_RESERVED 0x00 +#define USB_DEVCAP_WUSB 0x01 +#define USB_DEVCAP_USB2EXT 0x02 +#define USB_DEVCAP_SUPER_SPEED 0x03 +#define USB_DEVCAP_CONTAINER_ID 0x04 + /* data ... */ +} __packed; +typedef struct usb2_bos_cap_descriptor usb_bos_cap_descriptor_t; + +struct usb2_devcap_usb2ext_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDevCapabilityType; + uByte bmAttributes; +#define USB_V2EXT_LPM 0x02 +} __packed; +typedef struct usb2_devcap_usb2ext_descriptor usb_devcap_usb2ext_descriptor_t; + +struct usb2_devcap_ss_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDevCapabilityType; + uByte bmAttributes; + uWord wSpeedsSupported; + uByte bFunctionaltySupport; + uByte bU1DevExitLat; + uByte bU2DevExitLat; +} __packed; +typedef struct usb2_devcap_ss_descriptor usb_devcap_ss_descriptor_t; + +struct usb2_devcap_container_id_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDevCapabilityType; + uByte bReserved; + uByte ContainerID; +} __packed; +typedef struct usb2_devcap_container_id_descriptor + usb_devcap_container_id_descriptor_t; + +/* Device class codes */ +#define UDCLASS_IN_INTERFACE 0x00 +#define UDCLASS_COMM 0x02 +#define UDCLASS_HUB 0x09 +#define UDSUBCLASS_HUB 0x00 +#define UDPROTO_FSHUB 0x00 +#define UDPROTO_HSHUBSTT 0x01 +#define UDPROTO_HSHUBMTT 0x02 +#define UDCLASS_DIAGNOSTIC 0xdc +#define UDCLASS_WIRELESS 0xe0 +#define UDSUBCLASS_RF 0x01 +#define UDPROTO_BLUETOOTH 0x01 +#define UDCLASS_VENDOR 0xff + +struct usb2_config_descriptor { + uByte bLength; + uByte bDescriptorType; + uWord wTotalLength; + uByte bNumInterface; + uByte bConfigurationValue; +#define USB_UNCONFIG_NO 0 + uByte iConfiguration; + uByte bmAttributes; +#define UC_BUS_POWERED 0x80 +#define UC_SELF_POWERED 0x40 +#define UC_REMOTE_WAKEUP 0x20 + uByte bMaxPower; /* max current in 2 mA units */ +#define UC_POWER_FACTOR 2 +} __packed; +typedef struct usb2_config_descriptor usb_config_descriptor_t; + +struct usb2_interface_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bInterfaceNumber; + uByte bAlternateSetting; + uByte bNumEndpoints; + uByte bInterfaceClass; + uByte bInterfaceSubClass; + uByte bInterfaceProtocol; + uByte iInterface; +} __packed; +typedef struct usb2_interface_descriptor usb_interface_descriptor_t; + +struct usb2_interface_assoc_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bFirstInterface; + uByte bInterfaceCount; + uByte bFunctionClass; + uByte bFunctionSubClass; + uByte bFunctionProtocol; + uByte iFunction; +} __packed; +typedef struct usb2_interface_assoc_descriptor usb_interface_assoc_descriptor_t; + +/* Interface class codes */ +#define UICLASS_UNSPEC 0x00 +#define UICLASS_AUDIO 0x01 /* audio */ +#define UISUBCLASS_AUDIOCONTROL 1 +#define UISUBCLASS_AUDIOSTREAM 2 +#define UISUBCLASS_MIDISTREAM 3 + +#define UICLASS_CDC 0x02 /* communication */ +#define UISUBCLASS_DIRECT_LINE_CONTROL_MODEL 1 +#define UISUBCLASS_ABSTRACT_CONTROL_MODEL 2 +#define UISUBCLASS_TELEPHONE_CONTROL_MODEL 3 +#define UISUBCLASS_MULTICHANNEL_CONTROL_MODEL 4 +#define UISUBCLASS_CAPI_CONTROLMODEL 5 +#define UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL 6 +#define UISUBCLASS_ATM_NETWORKING_CONTROL_MODEL 7 +#define UISUBCLASS_WIRELESS_HANDSET_CM 8 +#define UISUBCLASS_DEVICE_MGMT 9 +#define UISUBCLASS_MOBILE_DIRECT_LINE_MODEL 10 +#define UISUBCLASS_OBEX 11 +#define UISUBCLASS_ETHERNET_EMULATION_MODEL 12 + +#define UIPROTO_CDC_AT 1 +#define UIPROTO_CDC_ETH_512X4 0x76 /* FreeBSD specific */ + +#define UICLASS_HID 0x03 +#define UISUBCLASS_BOOT 1 +#define UIPROTO_BOOT_KEYBOARD 1 +#define UIPROTO_MOUSE 2 + +#define UICLASS_PHYSICAL 0x05 +#define UICLASS_IMAGE 0x06 +#define UISUBCLASS_SIC 1 /* still image class */ +#define UICLASS_PRINTER 0x07 +#define UISUBCLASS_PRINTER 1 +#define UIPROTO_PRINTER_UNI 1 +#define UIPROTO_PRINTER_BI 2 +#define UIPROTO_PRINTER_1284 3 + +#define UICLASS_MASS 0x08 +#define UISUBCLASS_RBC 1 +#define UISUBCLASS_SFF8020I 2 +#define UISUBCLASS_QIC157 3 +#define UISUBCLASS_UFI 4 +#define UISUBCLASS_SFF8070I 5 +#define UISUBCLASS_SCSI 6 +#define UIPROTO_MASS_CBI_I 0 +#define UIPROTO_MASS_CBI 1 +#define UIPROTO_MASS_BBB_OLD 2 /* Not in the spec anymore */ +#define UIPROTO_MASS_BBB 80 /* 'P' for the Iomega Zip drive */ + +#define UICLASS_HUB 0x09 +#define UISUBCLASS_HUB 0 +#define UIPROTO_FSHUB 0 +#define UIPROTO_HSHUBSTT 0 /* Yes, same as previous */ +#define UIPROTO_HSHUBMTT 1 + +#define UICLASS_CDC_DATA 0x0a +#define UISUBCLASS_DATA 0 +#define UIPROTO_DATA_ISDNBRI 0x30 /* Physical iface */ +#define UIPROTO_DATA_HDLC 0x31 /* HDLC */ +#define UIPROTO_DATA_TRANSPARENT 0x32 /* Transparent */ +#define UIPROTO_DATA_Q921M 0x50 /* Management for Q921 */ +#define UIPROTO_DATA_Q921 0x51 /* Data for Q921 */ +#define UIPROTO_DATA_Q921TM 0x52 /* TEI multiplexer for Q921 */ +#define UIPROTO_DATA_V42BIS 0x90 /* Data compression */ +#define UIPROTO_DATA_Q931 0x91 /* Euro-ISDN */ +#define UIPROTO_DATA_V120 0x92 /* V.24 rate adaption */ +#define UIPROTO_DATA_CAPI 0x93 /* CAPI 2.0 commands */ +#define UIPROTO_DATA_HOST_BASED 0xfd /* Host based driver */ +#define UIPROTO_DATA_PUF 0xfe /* see Prot. Unit Func. Desc. */ +#define UIPROTO_DATA_VENDOR 0xff /* Vendor specific */ + +#define UICLASS_SMARTCARD 0x0b +#define UICLASS_FIRM_UPD 0x0c +#define UICLASS_SECURITY 0x0d +#define UICLASS_DIAGNOSTIC 0xdc +#define UICLASS_WIRELESS 0xe0 +#define UISUBCLASS_RF 0x01 +#define UIPROTO_BLUETOOTH 0x01 + +#define UICLASS_APPL_SPEC 0xfe +#define UISUBCLASS_FIRMWARE_DOWNLOAD 1 +#define UISUBCLASS_IRDA 2 +#define UIPROTO_IRDA 0 + +#define UICLASS_VENDOR 0xff +#define UISUBCLASS_XBOX360_CONTROLLER 0x5d +#define UIPROTO_XBOX360_GAMEPAD 0x01 + +struct usb2_endpoint_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bEndpointAddress; +#define UE_GET_DIR(a) ((a) & 0x80) +#define UE_SET_DIR(a,d) ((a) | (((d)&1) << 7)) +#define UE_DIR_IN 0x80 +#define UE_DIR_OUT 0x00 +#define UE_DIR_ANY 0xff /* for internal use only! */ +#define UE_ADDR 0x0f +#define UE_ADDR_ANY 0xff /* for internal use only! */ +#define UE_GET_ADDR(a) ((a) & UE_ADDR) + uByte bmAttributes; +#define UE_XFERTYPE 0x03 +#define UE_CONTROL 0x00 +#define UE_ISOCHRONOUS 0x01 +#define UE_BULK 0x02 +#define UE_INTERRUPT 0x03 +#define UE_BULK_INTR 0xfe /* for internal use only! */ +#define UE_TYPE_ANY 0xff /* for internal use only! */ +#define UE_GET_XFERTYPE(a) ((a) & UE_XFERTYPE) +#define UE_ISO_TYPE 0x0c +#define UE_ISO_ASYNC 0x04 +#define UE_ISO_ADAPT 0x08 +#define UE_ISO_SYNC 0x0c +#define UE_GET_ISO_TYPE(a) ((a) & UE_ISO_TYPE) + uWord wMaxPacketSize; +#define UE_ZERO_MPS 0xFFFF /* for internal use only */ + uByte bInterval; +} __packed; +typedef struct usb2_endpoint_descriptor usb_endpoint_descriptor_t; + +struct usb2_endpoint_ss_comp_descriptor { + uByte bLength; + uByte bDescriptorType; + uWord bMaxBurst; + uByte bmAttributes; + uWord wBytesPerInterval; +} __packed; +typedef struct usb2_endpoint_ss_comp_descriptor + usb_endpoint_ss_comp_descriptor_t; + +struct usb2_string_descriptor { + uByte bLength; + uByte bDescriptorType; + uWord bString[126]; + uByte bUnused; +} __packed; +typedef struct usb2_string_descriptor usb_string_descriptor_t; + +#define USB_MAKE_STRING_DESC(m,name) \ +struct name { \ + uByte bLength; \ + uByte bDescriptorType; \ + uByte bData[sizeof((uint8_t []){m})]; \ +} __packed; \ +static const struct name name = { \ + .bLength = sizeof(struct name), \ + .bDescriptorType = UDESC_STRING, \ + .bData = { m }, \ +} + +struct usb2_hub_descriptor { + uByte bDescLength; + uByte bDescriptorType; + uByte bNbrPorts; + uWord wHubCharacteristics; +#define UHD_PWR 0x0003 +#define UHD_PWR_GANGED 0x0000 +#define UHD_PWR_INDIVIDUAL 0x0001 +#define UHD_PWR_NO_SWITCH 0x0002 +#define UHD_COMPOUND 0x0004 +#define UHD_OC 0x0018 +#define UHD_OC_GLOBAL 0x0000 +#define UHD_OC_INDIVIDUAL 0x0008 +#define UHD_OC_NONE 0x0010 +#define UHD_TT_THINK 0x0060 +#define UHD_TT_THINK_8 0x0000 +#define UHD_TT_THINK_16 0x0020 +#define UHD_TT_THINK_24 0x0040 +#define UHD_TT_THINK_32 0x0060 +#define UHD_PORT_IND 0x0080 + uByte bPwrOn2PwrGood; /* delay in 2 ms units */ +#define UHD_PWRON_FACTOR 2 + uByte bHubContrCurrent; + uByte DeviceRemovable[32]; /* max 255 ports */ +#define UHD_NOT_REMOV(desc, i) \ + (((desc)->DeviceRemovable[(i)/8] >> ((i) % 8)) & 1) + uByte PortPowerCtrlMask[1]; /* deprecated */ +} __packed; +typedef struct usb2_hub_descriptor usb_hub_descriptor_t; + +struct usb2_hub_ss_descriptor { + uByte bDescLength; + uByte bDescriptorType; + uByte bNbrPorts; /* max 15 */ + uWord wHubCharacteristics; + uByte bPwrOn2PwrGood; /* delay in 2 ms units */ + uByte bHubContrCurrent; + uByte bHubHdrDecLat; + uWord wHubDelay; + uByte DeviceRemovable[2]; /* max 15 ports */ +} __packed; +typedef struct usb2_hub_ss_descriptor usb_hub_ss_descriptor_t; + +/* minimum HUB descriptor (8-ports maximum) */ +struct usb2_hub_descriptor_min { + uByte bDescLength; + uByte bDescriptorType; + uByte bNbrPorts; + uWord wHubCharacteristics; + uByte bPwrOn2PwrGood; + uByte bHubContrCurrent; + uByte DeviceRemovable[1]; + uByte PortPowerCtrlMask[1]; +} __packed; +typedef struct usb2_hub_descriptor_min usb_hub_descriptor_min_t; + +struct usb2_device_qualifier { + uByte bLength; + uByte bDescriptorType; + uWord bcdUSB; + uByte bDeviceClass; + uByte bDeviceSubClass; + uByte bDeviceProtocol; + uByte bMaxPacketSize0; + uByte bNumConfigurations; + uByte bReserved; +} __packed; +typedef struct usb2_device_qualifier usb_device_qualifier_t; + +struct usb2_otg_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bmAttributes; +#define UOTG_SRP 0x01 +#define UOTG_HNP 0x02 +} __packed; +typedef struct usb2_otg_descriptor usb_otg_descriptor_t; + +/* OTG feature selectors */ +#define UOTG_B_HNP_ENABLE 3 +#define UOTG_A_HNP_SUPPORT 4 +#define UOTG_A_ALT_HNP_SUPPORT 5 + +struct usb2_status { + uWord wStatus; +/* Device status flags */ +#define UDS_SELF_POWERED 0x0001 +#define UDS_REMOTE_WAKEUP 0x0002 +/* Endpoint status flags */ +#define UES_HALT 0x0001 +} __packed; +typedef struct usb2_status usb_status_t; + +struct usb2_hub_status { + uWord wHubStatus; +#define UHS_LOCAL_POWER 0x0001 +#define UHS_OVER_CURRENT 0x0002 + uWord wHubChange; +} __packed; +typedef struct usb2_hub_status usb_hub_status_t; + +struct usb2_port_status { + uWord wPortStatus; +#define UPS_CURRENT_CONNECT_STATUS 0x0001 +#define UPS_PORT_ENABLED 0x0002 +#define UPS_SUSPEND 0x0004 +#define UPS_OVERCURRENT_INDICATOR 0x0008 +#define UPS_RESET 0x0010 +#define UPS_PORT_POWER 0x0100 +#define UPS_LOW_SPEED 0x0200 +#define UPS_HIGH_SPEED 0x0400 +#define UPS_PORT_TEST 0x0800 +#define UPS_PORT_INDICATOR 0x1000 +#define UPS_PORT_MODE_DEVICE 0x8000 /* currently FreeBSD specific */ + uWord wPortChange; +#define UPS_C_CONNECT_STATUS 0x0001 +#define UPS_C_PORT_ENABLED 0x0002 +#define UPS_C_SUSPEND 0x0004 +#define UPS_C_OVERCURRENT_INDICATOR 0x0008 +#define UPS_C_PORT_RESET 0x0010 +} __packed; +typedef struct usb2_port_status usb_port_status_t; + +#endif /* _USB2_STANDARD_H_ */ Copied: projects/jbuild/sys/dev/usb/usb_if.m (from r189173, head/sys/dev/usb/usb_if.m) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/jbuild/sys/dev/usb/usb_if.m Sat Feb 28 17:53:23 2009 (r189174, copy of r189173, head/sys/dev/usb/usb_if.m) @@ -0,0 +1,52 @@ +#- +# Copyright (c) 2008 Hans Petter Selasky. 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, +# without modification, immediately at the beginning of the file. +# 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. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# $FreeBSD$ +# + +# USB interface description +# + +#include + +INTERFACE usb; + +# The device received a control request +# +# Return values: +# 0: Success +# ENOTTY: Transaction stalled +# Else: Use builtin request handler +# +METHOD int handle_request { + device_t dev; + const void *req; /* pointer to the device request */ + void **pptr; /* data pointer */ + uint16_t *plen; /* maximum transfer length */ + uint16_t offset; /* data offset */ + uint8_t is_complete; /* set if transfer is complete */ +}; + Copied: projects/jbuild/sys/dev/usb/usbdevs (from r189173, head/sys/dev/usb/usbdevs) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/jbuild/sys/dev/usb/usbdevs Sat Feb 28 17:53:23 2009 (r189174, copy of r189173, head/sys/dev/usb/usbdevs) @@ -0,0 +1,2528 @@ +$FreeBSD$ +/* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ + +/*- + * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Lennart Augustsson (lennart@augustsson.net) at + * Carlstedt Research & Technology. + * + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE 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. + */ + +/* + * List of known USB vendors + * + * USB.org publishes a VID list of USB-IF member companies at + * http://www.usb.org/developers/tools + * Note that it does not show companies that have obtained a Vendor ID + * without becoming full members. + * + * Please note that these IDs do not do anything. Adding an ID here and + * regenerating the usbdevs.h and usbdevs_data.h only makes a symbolic name + * available to the source code and does not change any functionality, nor + * does it make your device available to a specific driver. + * It will however make the descriptive string available if a device does not + * provide the string itself. + * + * After adding a vendor ID VNDR and a product ID PRDCT you will have the + * following extra defines: + * #define USB_VENDOR_VNDR 0x???? + * #define USB_PRODUCT_VNDR_PRDCT 0x???? + * + * You may have to add these defines to the respective probe routines to + * make the device recognised by the appropriate device driver. + */ + +vendor UNKNOWN1 0x0053 Unknown vendor +vendor UNKNOWN2 0x0105 Unknown vendor +vendor EGALAX2 0x0123 eGalax, Inc. +vendor HUMAX 0x02ad HUMAX +vendor LTS 0x0386 LTS +vendor BWCT 0x03da Bernd Walter Computer Technology +vendor AOX 0x03e8 AOX +vendor THESYS 0x03e9 Thesys +vendor DATABROADCAST 0x03ea Data Broadcasting +vendor ATMEL 0x03eb Atmel +vendor IWATSU 0x03ec Iwatsu America +vendor MITSUMI 0x03ee Mitsumi +vendor HP 0x03f0 Hewlett Packard +vendor GENOA 0x03f1 Genoa +vendor OAK 0x03f2 Oak +vendor ADAPTEC 0x03f3 Adaptec +vendor DIEBOLD 0x03f4 Diebold +vendor SIEMENSELECTRO 0x03f5 Siemens Electromechanical +vendor EPSONIMAGING 0x03f8 Epson Imaging +vendor KEYTRONIC 0x03f9 KeyTronic +vendor OPTI 0x03fb OPTi +vendor ELITEGROUP 0x03fc Elitegroup +vendor XILINX 0x03fd Xilinx +vendor FARALLON 0x03fe Farallon Communications +vendor NATIONAL 0x0400 National Semiconductor +vendor NATIONALREG 0x0401 National Registry +vendor ACERLABS 0x0402 Acer Labs +vendor FTDI 0x0403 Future Technology Devices +vendor NCR 0x0404 NCR +vendor SYNOPSYS2 0x0405 Synopsys +vendor FUJITSUICL 0x0406 Fujitsu-ICL +vendor FUJITSU2 0x0407 Fujitsu Personal Systems +vendor QUANTA 0x0408 Quanta +vendor NEC 0x0409 NEC +vendor KODAK 0x040a Eastman Kodak +vendor WELTREND 0x040b Weltrend +vendor VIA 0x040d VIA +vendor MCCI 0x040e MCCI +vendor MELCO 0x0411 Melco +vendor LEADTEK 0x0413 Leadtek +vendor WINBOND 0x0416 Winbond +vendor PHOENIX 0x041a Phoenix +vendor CREATIVE 0x041e Creative Labs +vendor NOKIA 0x0421 Nokia +vendor ADI 0x0422 ADI Systems +vendor CATC 0x0423 Computer Access Technology +vendor SMC2 0x0424 Standard Microsystems +vendor MOTOROLA_HK 0x0425 Motorola HK +vendor GRAVIS 0x0428 Advanced Gravis Computer +vendor CIRRUSLOGIC 0x0429 Cirrus Logic +vendor INNOVATIVE 0x042c Innovative Semiconductors +vendor MOLEX 0x042f Molex +vendor SUN 0x0430 Sun Microsystems +vendor UNISYS 0x0432 Unisys +vendor TAUGA 0x0436 Taugagreining HF +vendor AMD 0x0438 Advanced Micro Devices +vendor LEXMARK 0x043d Lexmark International +vendor LG 0x043e LG Electronics +vendor NANAO 0x0440 NANAO +vendor GATEWAY 0x0443 Gateway 2000 +vendor NMB 0x0446 NMB +vendor ALPS 0x044e Alps Electric +vendor THRUST 0x044f Thrustmaster +vendor TI 0x0451 Texas Instruments +vendor ANALOGDEVICES 0x0456 Analog Devices +vendor SIS 0x0457 Silicon Integrated Systems Corp. +vendor KYE 0x0458 KYE Systems +vendor DIAMOND2 0x045a Diamond (Supra) +vendor RENESAS 0x045b Renesas +vendor MICROSOFT 0x045e Microsoft +vendor PRIMAX 0x0461 Primax Electronics +vendor MGE 0x0463 MGE UPS Systems +vendor AMP 0x0464 AMP +vendor CHERRY 0x046a Cherry Mikroschalter +vendor MEGATRENDS 0x046b American Megatrends +vendor LOGITECH 0x046d Logitech +vendor BTC 0x046e Behavior Tech. Computer +vendor PHILIPS 0x0471 Philips +vendor SUN2 0x0472 Sun Microsystems (offical) +vendor SANYO 0x0474 Sanyo Electric +vendor SEAGATE 0x0477 Seagate +vendor CONNECTIX 0x0478 Connectix +vendor SEMTECH 0x047a Semtech +vendor KENSINGTON 0x047d Kensington +vendor LUCENT 0x047e Lucent +vendor PLANTRONICS 0x047f Plantronics +vendor KYOCERA 0x0482 Kyocera Wireless Corp. +vendor STMICRO 0x0483 STMicroelectronics +vendor FOXCONN 0x0489 Foxconn +vendor MEIZU 0x0492 Meizu Electronics +vendor YAMAHA 0x0499 YAMAHA +vendor COMPAQ 0x049f Compaq +vendor HITACHI 0x04a4 Hitachi +vendor ACERP 0x04a5 Acer Peripherals +vendor DAVICOM 0x04a6 Davicom +vendor VISIONEER 0x04a7 Visioneer +vendor CANON 0x04a9 Canon +vendor NIKON 0x04b0 Nikon +vendor PAN 0x04b1 Pan International +vendor IBM 0x04b3 IBM +vendor CYPRESS 0x04b4 Cypress Semiconductor +vendor ROHM 0x04b5 ROHM +vendor COMPAL 0x04b7 Compal +vendor EPSON 0x04b8 Seiko Epson +vendor RAINBOW 0x04b9 Rainbow Technologies +vendor IODATA 0x04bb I-O Data +vendor TDK 0x04bf TDK +vendor 3COMUSR 0x04c1 U.S. Robotics +vendor METHODE 0x04c2 Methode Electronics Far East +vendor MAXISWITCH 0x04c3 Maxi Switch +vendor LOCKHEEDMER 0x04c4 Lockheed Martin Energy Research +vendor FUJITSU 0x04c5 Fujitsu +vendor TOSHIBAAM 0x04c6 Toshiba America +vendor MICROMACRO 0x04c7 Micro Macro Technologies +vendor KONICA 0x04c8 Konica +vendor LITEON 0x04ca Lite-On Technology +vendor FUJIPHOTO 0x04cb Fuji Photo Film +vendor PHILIPSSEMI 0x04cc Philips Semiconductors +vendor TATUNG 0x04cd Tatung Co. Of America +vendor SCANLOGIC 0x04ce ScanLogic +vendor MYSON 0x04cf Myson Technology +vendor DIGI2 0x04d0 Digi +vendor ITTCANON 0x04d1 ITT Canon +vendor ALTEC 0x04d2 Altec Lansing +vendor LSI 0x04d4 LSI +vendor MENTORGRAPHICS 0x04d6 Mentor Graphics +vendor ITUNERNET 0x04d8 I-Tuner Networks +vendor HOLTEK 0x04d9 Holtek Semiconductor, Inc. +vendor PANASONIC 0x04da Panasonic (Matsushita) +vendor HUANHSIN 0x04dc Huan Hsin +vendor SHARP 0x04dd Sharp +vendor IIYAMA 0x04e1 Iiyama +vendor SHUTTLE 0x04e6 Shuttle Technology +vendor ELO 0x04e7 Elo TouchSystems +vendor SAMSUNG 0x04e8 Samsung Electronics +vendor NORTHSTAR 0x04eb Northstar +vendor TOKYOELECTRON 0x04ec Tokyo Electron +vendor ANNABOOKS 0x04ed Annabooks +vendor JVC 0x04f1 JVC +vendor CHICONY 0x04f2 Chicony Electronics +vendor ELAN 0x04f3 Elan +vendor NEWNEX 0x04f7 Newnex +vendor BROTHER 0x04f9 Brother Industries +vendor DALLAS 0x04fa Dallas Semiconductor +vendor AIPTEK2 0x04fc AIPTEK International +vendor PFU 0x04fe PFU +vendor FUJIKURA 0x0501 Fujikura/DDK +vendor ACER 0x0502 Acer +vendor 3COM 0x0506 3Com +vendor HOSIDEN 0x0507 Hosiden Corporation +vendor AZTECH 0x0509 Aztech Systems +vendor BELKIN 0x050d Belkin Components +vendor KAWATSU 0x050f Kawatsu Semiconductor +vendor FCI 0x0514 FCI +vendor LONGWELL 0x0516 Longwell +vendor COMPOSITE 0x0518 Composite +vendor STAR 0x0519 Star Micronics +vendor APC 0x051d American Power Conversion +vendor SCIATLANTA 0x051e Scientific Atlanta +vendor TSM 0x0520 TSM +vendor CONNECTEK 0x0522 Advanced Connectek USA +vendor NETCHIP 0x0525 NetChip Technology +vendor ALTRA 0x0527 ALTRA +vendor ATI 0x0528 ATI Technologies +vendor AKS 0x0529 Aladdin Knowledge Systems +vendor TEKOM 0x052b Tekom +vendor CANONDEV 0x052c Canon +vendor WACOMTECH 0x0531 Wacom +vendor INVENTEC 0x0537 Inventec +vendor SHYHSHIUN 0x0539 Shyh Shiun Terminals +vendor PREHWERKE 0x053a Preh Werke Gmbh & Co. KG +vendor SYNOPSYS 0x053f Synopsys +vendor UNIACCESS 0x0540 Universal Access +vendor VIEWSONIC 0x0543 ViewSonic +vendor XIRLINK 0x0545 Xirlink +vendor ANCHOR 0x0547 Anchor Chips +vendor SONY 0x054c Sony +vendor FUJIXEROX 0x0550 Fuji Xerox +vendor VISION 0x0553 VLSI Vision +vendor ASAHIKASEI 0x0556 Asahi Kasei Microsystems +vendor ATEN 0x0557 ATEN International +vendor SAMSUNG2 0x055d Samsung Electronics +vendor MUSTEK 0x055f Mustek Systems +vendor TELEX 0x0562 Telex Communications +vendor CHINON 0x0564 Chinon +vendor PERACOM 0x0565 Peracom Networks +vendor ALCOR2 0x0566 Alcor Micro +vendor XYRATEX 0x0567 Xyratex +vendor WACOM 0x056a WACOM +vendor ETEK 0x056c e-TEK Labs +vendor EIZO 0x056d EIZO +vendor ELECOM 0x056e Elecom +vendor CONEXANT 0x0572 Conexant +vendor HAUPPAUGE 0x0573 Hauppauge Computer Works +vendor BAFO 0x0576 BAFO/Quality Computer Accessories +vendor YEDATA 0x057b Y-E Data +vendor AVM 0x057c AVM +vendor QUICKSHOT 0x057f Quickshot +vendor ROLAND 0x0582 Roland +vendor ROCKFIRE 0x0583 Rockfire +vendor RATOC 0x0584 RATOC Systems +vendor ZYXEL 0x0586 ZyXEL Communication +vendor INFINEON 0x058b Infineon +vendor MICREL 0x058d Micrel +vendor ALCOR 0x058f Alcor Micro +vendor OMRON 0x0590 OMRON +vendor ZORAN 0x0595 Zoran Microelectronics +vendor NIIGATA 0x0598 Niigata +vendor IOMEGA 0x059b Iomega +vendor ATREND 0x059c A-Trend Technology +vendor AID 0x059d Advanced Input Devices +vendor LACIE 0x059f LaCie +vendor FUJIFILM 0x05a2 Fuji Film +vendor ARC 0x05a3 ARC +vendor ORTEK 0x05a4 Ortek +vendor BOSE 0x05a7 Bose +vendor OMNIVISION 0x05a9 OmniVision +vendor INSYSTEM 0x05ab In-System Design +vendor APPLE 0x05ac Apple Computer +vendor YCCABLE 0x05ad Y.C. Cable +vendor DIGITALPERSONA 0x05ba DigitalPersona +vendor 3G 0x05bc 3G Green Green Globe +vendor RAFI 0x05bd RAFI +vendor TYCO 0x05be Tyco +vendor KAWASAKI 0x05c1 Kawasaki +vendor DIGI 0x05c5 Digi International +vendor QUALCOMM2 0x05c6 Qualcomm +vendor QTRONIX 0x05c7 Qtronix +vendor FOXLINK 0x05c8 Foxlink +vendor RICOH 0x05ca Ricoh +vendor ELSA 0x05cc ELSA +vendor SCIWORX 0x05ce sci-worx *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:53:55 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8035F106564A; Sat, 28 Feb 2009 17:53:55 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54A8C8FC12; Sat, 28 Feb 2009 17:53:55 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHrt5u016688; Sat, 28 Feb 2009 17:53:55 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHrt1c016687; Sat, 28 Feb 2009 17:53:55 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281753.n1SHrt1c016687@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189175 - projects/jbuild/sys/dev/usb2 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:53:56 -0000 Author: jb Date: Sat Feb 28 17:53:55 2009 New Revision: 189175 URL: http://svn.freebsd.org/changeset/base/189175 Log: MFC Deleted: projects/jbuild/sys/dev/usb2/ From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:54:26 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F4731065674; Sat, 28 Feb 2009 17:54:26 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34FAE8FC17; Sat, 28 Feb 2009 17:54:26 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHsQgi016754; Sat, 28 Feb 2009 17:54:26 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHsQJt016750; Sat, 28 Feb 2009 17:54:26 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281754.n1SHsQJt016750@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189176 - in projects/jbuild/sys/dev/ath: . ath_hal ath_hal/ar5210 ath_hal/ar5211 ath_hal/ar5212 ath_hal/ar5312 ath_hal/ar5416 ath_rate/amrr ath_rate/onoe ath_rate/sample X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:54:27 -0000 Author: jb Date: Sat Feb 28 17:54:25 2009 New Revision: 189176 URL: http://svn.freebsd.org/changeset/base/189176 Log: MFC Modified: projects/jbuild/sys/dev/ath/ath_hal/ah.c projects/jbuild/sys/dev/ath/ath_hal/ah.h projects/jbuild/sys/dev/ath/ath_hal/ah_internal.h projects/jbuild/sys/dev/ath/ath_hal/ah_regdomain.c projects/jbuild/sys/dev/ath/ath_hal/ar5210/ar5210.h projects/jbuild/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c projects/jbuild/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c projects/jbuild/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c projects/jbuild/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c projects/jbuild/sys/dev/ath/ath_hal/ar5211/ar5211.h projects/jbuild/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c projects/jbuild/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c projects/jbuild/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c projects/jbuild/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar2316.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar2317.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar2413.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar2425.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar5111.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar5112.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar5212.h projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c projects/jbuild/sys/dev/ath/ath_hal/ar5212/ar5413.c projects/jbuild/sys/dev/ath/ath_hal/ar5312/ar5312.h projects/jbuild/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c projects/jbuild/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c projects/jbuild/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c projects/jbuild/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar2133.c projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar5416.h projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar5416.ini projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar5416reg.h projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar9160.ini projects/jbuild/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c projects/jbuild/sys/dev/ath/ath_rate/amrr/amrr.c projects/jbuild/sys/dev/ath/ath_rate/onoe/onoe.c projects/jbuild/sys/dev/ath/ath_rate/sample/sample.c projects/jbuild/sys/dev/ath/if_ath.c projects/jbuild/sys/dev/ath/if_ath_pci.c projects/jbuild/sys/dev/ath/if_athioctl.h projects/jbuild/sys/dev/ath/if_athvar.h Modified: projects/jbuild/sys/dev/ath/ath_hal/ah.c ============================================================================== --- projects/jbuild/sys/dev/ath/ath_hal/ah.c Sat Feb 28 17:53:55 2009 (r189175) +++ projects/jbuild/sys/dev/ath/ath_hal/ah.c Sat Feb 28 17:54:25 2009 (r189176) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any @@ -22,6 +22,8 @@ #include "ah_internal.h" #include "ah_devid.h" +#include "ar5416/ar5416reg.h" /* NB: includes ar5212reg.h */ + /* linker set of registered chips */ OS_SET_DECLARE(ah_chips, struct ath_hal_chip); @@ -78,6 +80,53 @@ ath_hal_attach(uint16_t devid, HAL_SOFTC return AH_NULL; } +const char * +ath_hal_mac_name(struct ath_hal *ah) +{ + switch (ah->ah_macVersion) { + case AR_SREV_VERSION_CRETE: + case AR_SREV_VERSION_MAUI_1: + return "5210"; + case AR_SREV_VERSION_MAUI_2: + case AR_SREV_VERSION_OAHU: + return "5211"; + case AR_SREV_VERSION_VENICE: + return "5212"; + case AR_SREV_VERSION_GRIFFIN: + return "2413"; + case AR_SREV_VERSION_CONDOR: + return "5424"; + case AR_SREV_VERSION_EAGLE: + return "5413"; + case AR_SREV_VERSION_COBRA: + return "2415"; + case AR_SREV_2425: + return "2425"; + case AR_SREV_2417: + return "2417"; + case AR_XSREV_VERSION_OWL_PCI: + return "5416"; + case AR_XSREV_VERSION_OWL_PCIE: + return "5418"; + case AR_XSREV_VERSION_SOWL: + return "9160"; + case AR_XSREV_VERSION_MERLIN: + return "9280"; + case AR_XSREV_VERSION_KITE: + return "9285"; + } + return "????"; +} + +/* + * Return the mask of available modes based on the hardware capabilities. + */ +u_int +ath_hal_getwirelessmodes(struct ath_hal*ah) +{ + return ath_hal_getWirelessModes(ah); +} + /* linker set of registered RF backends */ OS_SET_DECLARE(ah_rfs, struct ath_hal_rf); @@ -99,6 +148,48 @@ ath_hal_rfprobe(struct ath_hal *ah, HAL_ return AH_NULL; } +const char * +ath_hal_rf_name(struct ath_hal *ah) +{ + switch (ah->ah_analog5GhzRev & AR_RADIO_SREV_MAJOR) { + case 0: /* 5210 */ + return "5110"; /* NB: made up */ + case AR_RAD5111_SREV_MAJOR: + case AR_RAD5111_SREV_PROD: + return "5111"; + case AR_RAD2111_SREV_MAJOR: + return "2111"; + case AR_RAD5112_SREV_MAJOR: + case AR_RAD5112_SREV_2_0: + case AR_RAD5112_SREV_2_1: + return "5112"; + case AR_RAD2112_SREV_MAJOR: + case AR_RAD2112_SREV_2_0: + case AR_RAD2112_SREV_2_1: + return "2112"; + case AR_RAD2413_SREV_MAJOR: + return "2413"; + case AR_RAD5413_SREV_MAJOR: + return "5413"; + case AR_RAD2316_SREV_MAJOR: + return "2316"; + case AR_RAD2317_SREV_MAJOR: + return "2317"; + case AR_RAD5424_SREV_MAJOR: + return "5424"; + + case AR_RAD5133_SREV_MAJOR: + return "5133"; + case AR_RAD2133_SREV_MAJOR: + return "2133"; + case AR_RAD5122_SREV_MAJOR: + return "5122"; + case AR_RAD2122_SREV_MAJOR: + return "2122"; + } + return "????"; +} + /* * Poll the register looking for a specific value. */ @@ -152,14 +243,12 @@ ath_hal_computetxtime(struct ath_hal *ah kbps = rates->info[rateix].rateKbps; /* * index can be invalid duting dynamic Turbo transitions. + * XXX */ - if(kbps == 0) return 0; + if (kbps == 0) + return 0; switch (rates->info[rateix].phy) { - case IEEE80211_T_CCK: -#define CCK_SIFS_TIME 10 -#define CCK_PREAMBLE_BITS 144 -#define CCK_PLCP_BITS 48 phyTime = CCK_PREAMBLE_BITS + CCK_PLCP_BITS; if (shortPreamble && rates->info[rateix].shortPreamble) phyTime >>= 1; @@ -167,81 +256,47 @@ ath_hal_computetxtime(struct ath_hal *ah txTime = CCK_SIFS_TIME + phyTime + ((numBits * 1000)/kbps); break; -#undef CCK_SIFS_TIME -#undef CCK_PREAMBLE_BITS -#undef CCK_PLCP_BITS - case IEEE80211_T_OFDM: -#define OFDM_SIFS_TIME 16 -#define OFDM_PREAMBLE_TIME 20 -#define OFDM_PLCP_BITS 22 -#define OFDM_SYMBOL_TIME 4 - -#define OFDM_SIFS_TIME_HALF 32 -#define OFDM_PREAMBLE_TIME_HALF 40 -#define OFDM_PLCP_BITS_HALF 22 -#define OFDM_SYMBOL_TIME_HALF 8 - -#define OFDM_SIFS_TIME_QUARTER 64 -#define OFDM_PREAMBLE_TIME_QUARTER 80 -#define OFDM_PLCP_BITS_QUARTER 22 -#define OFDM_SYMBOL_TIME_QUARTER 16 - - if (AH_PRIVATE(ah)->ah_curchan && - IS_CHAN_QUARTER_RATE(AH_PRIVATE(ah)->ah_curchan)) { - bitsPerSymbol = (kbps * OFDM_SYMBOL_TIME_QUARTER) / 1000; - HALASSERT(bitsPerSymbol != 0); - - numBits = OFDM_PLCP_BITS + (frameLen << 3); - numSymbols = howmany(numBits, bitsPerSymbol); - txTime = OFDM_SIFS_TIME_QUARTER - + OFDM_PREAMBLE_TIME_QUARTER - + (numSymbols * OFDM_SYMBOL_TIME_QUARTER); - } else if (AH_PRIVATE(ah)->ah_curchan && - IS_CHAN_HALF_RATE(AH_PRIVATE(ah)->ah_curchan)) { - bitsPerSymbol = (kbps * OFDM_SYMBOL_TIME_HALF) / 1000; - HALASSERT(bitsPerSymbol != 0); - - numBits = OFDM_PLCP_BITS + (frameLen << 3); - numSymbols = howmany(numBits, bitsPerSymbol); - txTime = OFDM_SIFS_TIME_HALF + - OFDM_PREAMBLE_TIME_HALF - + (numSymbols * OFDM_SYMBOL_TIME_HALF); - } else { /* full rate channel */ - bitsPerSymbol = (kbps * OFDM_SYMBOL_TIME) / 1000; - HALASSERT(bitsPerSymbol != 0); - - numBits = OFDM_PLCP_BITS + (frameLen << 3); - numSymbols = howmany(numBits, bitsPerSymbol); - txTime = OFDM_SIFS_TIME + OFDM_PREAMBLE_TIME - + (numSymbols * OFDM_SYMBOL_TIME); - } + bitsPerSymbol = (kbps * OFDM_SYMBOL_TIME) / 1000; + HALASSERT(bitsPerSymbol != 0); + + numBits = OFDM_PLCP_BITS + (frameLen << 3); + numSymbols = howmany(numBits, bitsPerSymbol); + txTime = OFDM_SIFS_TIME + + OFDM_PREAMBLE_TIME + + (numSymbols * OFDM_SYMBOL_TIME); break; + case IEEE80211_T_OFDM_HALF: + bitsPerSymbol = (kbps * OFDM_HALF_SYMBOL_TIME) / 1000; + HALASSERT(bitsPerSymbol != 0); -#undef OFDM_SIFS_TIME -#undef OFDM_PREAMBLE_TIME -#undef OFDM_PLCP_BITS -#undef OFDM_SYMBOL_TIME + numBits = OFDM_HALF_PLCP_BITS + (frameLen << 3); + numSymbols = howmany(numBits, bitsPerSymbol); + txTime = OFDM_HALF_SIFS_TIME + + OFDM_HALF_PREAMBLE_TIME + + (numSymbols * OFDM_HALF_SYMBOL_TIME); + break; + case IEEE80211_T_OFDM_QUARTER: + bitsPerSymbol = (kbps * OFDM_QUARTER_SYMBOL_TIME) / 1000; + HALASSERT(bitsPerSymbol != 0); + numBits = OFDM_QUARTER_PLCP_BITS + (frameLen << 3); + numSymbols = howmany(numBits, bitsPerSymbol); + txTime = OFDM_QUARTER_SIFS_TIME + + OFDM_QUARTER_PREAMBLE_TIME + + (numSymbols * OFDM_QUARTER_SYMBOL_TIME); + break; case IEEE80211_T_TURBO: -#define TURBO_SIFS_TIME 8 -#define TURBO_PREAMBLE_TIME 14 -#define TURBO_PLCP_BITS 22 -#define TURBO_SYMBOL_TIME 4 /* we still save OFDM rates in kbps - so double them */ bitsPerSymbol = ((kbps << 1) * TURBO_SYMBOL_TIME) / 1000; HALASSERT(bitsPerSymbol != 0); - numBits = TURBO_PLCP_BITS + (frameLen << 3); - numSymbols = howmany(numBits, bitsPerSymbol); - txTime = TURBO_SIFS_TIME + TURBO_PREAMBLE_TIME - + (numSymbols * TURBO_SYMBOL_TIME); + numBits = TURBO_PLCP_BITS + (frameLen << 3); + numSymbols = howmany(numBits, bitsPerSymbol); + txTime = TURBO_SIFS_TIME + + TURBO_PREAMBLE_TIME + + (numSymbols * TURBO_SYMBOL_TIME); break; -#undef TURBO_SIFS_TIME -#undef TURBO_PREAMBLE_TIME -#undef TURBO_PLCP_BITS -#undef TURBO_SYMBOL_TIME - default: HALDEBUG(ah, HAL_DEBUG_PHYIO, "%s: unknown phy %u (rate ix %u)\n", @@ -252,71 +307,6 @@ ath_hal_computetxtime(struct ath_hal *ah return txTime; } -static __inline int -mapgsm(u_int freq, u_int flags) -{ - freq *= 10; - if (flags & CHANNEL_QUARTER) - freq += 5; - else if (flags & CHANNEL_HALF) - freq += 10; - else - freq += 20; - return (freq - 24220) / 5; -} - -static __inline int -mappsb(u_int freq, u_int flags) -{ - return ((freq * 10) + (((freq % 5) == 2) ? 5 : 0) - 49400) / 5; -} - -/* - * Convert GHz frequency to IEEE channel number. - */ -int -ath_hal_mhz2ieee(struct ath_hal *ah, u_int freq, u_int flags) -{ - if (flags & CHANNEL_2GHZ) { /* 2GHz band */ - if (freq == 2484) - return 14; - if (freq < 2484) { - if (ath_hal_isgsmsku(ah)) - return mapgsm(freq, flags); - return ((int)freq - 2407) / 5; - } else - return 15 + ((freq - 2512) / 20); - } else if (flags & CHANNEL_5GHZ) {/* 5Ghz band */ - if (ath_hal_ispublicsafetysku(ah) && - IS_CHAN_IN_PUBLIC_SAFETY_BAND(freq)) { - return mappsb(freq, flags); - } else if ((flags & CHANNEL_A) && (freq <= 5000)) { - return (freq - 4000) / 5; - } else { - return (freq - 5000) / 5; - } - } else { /* either, guess */ - if (freq == 2484) - return 14; - if (freq < 2484) { - if (ath_hal_isgsmsku(ah)) - return mapgsm(freq, flags); - return ((int)freq - 2407) / 5; - } - if (freq < 5000) { - if (ath_hal_ispublicsafetysku(ah) && - IS_CHAN_IN_PUBLIC_SAFETY_BAND(freq)) { - return mappsb(freq, flags); - } else if (freq > 4900) { - return (freq - 4000) / 5; - } else { - return 15 + ((freq - 2512) / 20); - } - } - return (freq - 5000) / 5; - } -} - typedef enum { WIRELESS_MODE_11a = 0, WIRELESS_MODE_TURBO = 1, @@ -328,15 +318,15 @@ typedef enum { } WIRELESS_MODE; static WIRELESS_MODE -ath_hal_chan2wmode(struct ath_hal *ah, const HAL_CHANNEL *chan) +ath_hal_chan2wmode(struct ath_hal *ah, const struct ieee80211_channel *chan) { - if (IS_CHAN_CCK(chan)) + if (IEEE80211_IS_CHAN_B(chan)) return WIRELESS_MODE_11b; - if (IS_CHAN_G(chan)) + if (IEEE80211_IS_CHAN_G(chan)) return WIRELESS_MODE_11g; - if (IS_CHAN_108G(chan)) + if (IEEE80211_IS_CHAN_108G(chan)) return WIRELESS_MODE_108g; - if (IS_CHAN_TURBO(chan)) + if (IEEE80211_IS_CHAN_TURBO(chan)) return WIRELESS_MODE_TURBO; return WIRELESS_MODE_11a; } @@ -350,18 +340,14 @@ static const uint8_t CLOCK_RATE[] = { 4 u_int ath_hal_mac_clks(struct ath_hal *ah, u_int usecs) { - const HAL_CHANNEL *c = (const HAL_CHANNEL *) AH_PRIVATE(ah)->ah_curchan; + const struct ieee80211_channel *c = AH_PRIVATE(ah)->ah_curchan; u_int clks; /* NB: ah_curchan may be null when called attach time */ if (c != AH_NULL) { clks = usecs * CLOCK_RATE[ath_hal_chan2wmode(ah, c)]; - if (IS_CHAN_HT40(c)) + if (IEEE80211_IS_CHAN_HT40(c)) clks <<= 1; - else if (IS_CHAN_HALF_RATE(c)) - clks >>= 1; - else if (IS_CHAN_QUARTER_RATE(c)) - clks >>= 2; } else clks = usecs * CLOCK_RATE[WIRELESS_MODE_11b]; return clks; @@ -370,18 +356,14 @@ ath_hal_mac_clks(struct ath_hal *ah, u_i u_int ath_hal_mac_usec(struct ath_hal *ah, u_int clks) { - const HAL_CHANNEL *c = (const HAL_CHANNEL *) AH_PRIVATE(ah)->ah_curchan; + const struct ieee80211_channel *c = AH_PRIVATE(ah)->ah_curchan; u_int usec; /* NB: ah_curchan may be null when called attach time */ if (c != AH_NULL) { usec = clks / CLOCK_RATE[ath_hal_chan2wmode(ah, c)]; - if (IS_CHAN_HT40(c)) + if (IEEE80211_IS_CHAN_HT40(c)) usec >>= 1; - else if (IS_CHAN_HALF_RATE(c)) - usec <<= 1; - else if (IS_CHAN_QUARTER_RATE(c)) - usec <<= 2; } else usec = clks / CLOCK_RATE[WIRELESS_MODE_11b]; return usec; @@ -505,11 +487,7 @@ ath_hal_getcapability(struct ath_hal *ah } return HAL_ENOTSUPP; case HAL_CAP_11D: -#ifdef AH_SUPPORT_11D return HAL_OK; -#else - return HAL_ENOTSUPP; -#endif case HAL_CAP_RXORN_FATAL: /* HAL_INT_RXORN treated as fatal */ return AH_PRIVATE(ah)->ah_rxornIsFatal ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_HT: @@ -597,6 +575,15 @@ ath_hal_getregdump(struct ath_hal *ah, c } return (char *) dp - (char *) dstbuf; } + +static void +ath_hal_setregs(struct ath_hal *ah, const HAL_REGWRITE *regs, int space) +{ + while (space >= sizeof(HAL_REGWRITE)) { + OS_REG_WRITE(ah, regs->addr, regs->value); + regs++, space -= sizeof(HAL_REGWRITE); + } +} HAL_BOOL ath_hal_getdiagstate(struct ath_hal *ah, int request, @@ -611,6 +598,10 @@ ath_hal_getdiagstate(struct ath_hal *ah, case HAL_DIAG_REGS: *resultsize = ath_hal_getregdump(ah, args, *result,*resultsize); return AH_TRUE; + case HAL_DIAG_SETREGS: + ath_hal_setregs(ah, args, argsize); + *resultsize = 0; + return AH_TRUE; case HAL_DIAG_FATALERR: *result = &AH_PRIVATE(ah)->ah_fatalState[0]; *resultsize = sizeof(AH_PRIVATE(ah)->ah_fatalState); @@ -764,7 +755,7 @@ static const int16_t NOISE_FLOOR[] = { - * implement the ah_getChanNoise method. */ int16_t -ath_hal_getChanNoise(struct ath_hal *ah, HAL_CHANNEL *chan) +ath_hal_getChanNoise(struct ath_hal *ah, const struct ieee80211_channel *chan) { HAL_CHANNEL_INTERNAL *ichan; @@ -772,7 +763,7 @@ ath_hal_getChanNoise(struct ath_hal *ah, if (ichan == AH_NULL) { HALDEBUG(ah, HAL_DEBUG_NFCAL, "%s: invalid channel %u/0x%x; no mapping\n", - __func__, chan->channel, chan->channelFlags); + __func__, chan->ic_freq, chan->ic_flags); return 0; } if (ichan->rawNoiseFloor == 0) { @@ -811,8 +802,8 @@ ath_hal_process_noisefloor(struct ath_ha c = &AH_PRIVATE(ah)->ah_channels[i]; if (c->rawNoiseFloor >= 0) continue; - mode = ath_hal_chan2wmode(ah, (HAL_CHANNEL *) c); - HALASSERT(mode < WIRELESS_MODE_MAX); + /* XXX can't identify proper mode */ + mode = IS_CHAN_5GHZ(c) ? WIRELESS_MODE_11a : WIRELESS_MODE_11g; nf = c->rawNoiseFloor + NOISE_FLOOR[mode] + ath_hal_getNfAdjust(ah, c); if (IS_CHAN_5GHZ(c)) { @@ -838,9 +829,8 @@ ath_hal_process_noisefloor(struct ath_ha /* Apply correction factor */ c->noiseFloorAdjust = ath_hal_getNfAdjust(ah, c) + (IS_CHAN_5GHZ(c) ? correct5 : correct2); - HALDEBUG(ah, HAL_DEBUG_NFCAL, "%u/0x%x raw nf %d adjust %d\n", - c->channel, c->channelFlags, c->rawNoiseFloor, - c->noiseFloorAdjust); + HALDEBUG(ah, HAL_DEBUG_NFCAL, "%u raw nf %d adjust %d\n", + c->channel, c->rawNoiseFloor, c->noiseFloorAdjust); } } Modified: projects/jbuild/sys/dev/ath/ath_hal/ah.h ============================================================================== --- projects/jbuild/sys/dev/ath/ath_hal/ah.h Sat Feb 28 17:53:55 2009 (r189175) +++ projects/jbuild/sys/dev/ath/ath_hal/ah.h Sat Feb 28 17:54:25 2009 (r189176) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah.h,v 1.15 2008/11/15 03:43:50 sam Exp $ + * $FreeBSD$ */ #ifndef _ATH_AH_H_ @@ -63,6 +63,8 @@ typedef enum { HAL_ENOTSUPP = 13, /* Hardware revision not supported */ HAL_ESELFTEST = 14, /* Hardware self-test failed */ HAL_EINPROGRESS = 15, /* Operation incomplete */ + HAL_EEBADREG = 16, /* EEPROM invalid regulatory contents */ + HAL_EEBADCC = 17, /* EEPROM invalid country code */ } HAL_STATUS; typedef enum { @@ -357,69 +359,29 @@ typedef enum { } HAL_INT; typedef enum { + HAL_GPIO_MUX_OUTPUT = 0, + HAL_GPIO_MUX_PCIE_ATTENTION_LED = 1, + HAL_GPIO_MUX_PCIE_POWER_LED = 2, + HAL_GPIO_MUX_TX_FRAME = 3, + HAL_GPIO_MUX_RX_CLEAR_EXTERNAL = 4, + HAL_GPIO_MUX_MAC_NETWORK_LED = 5, + HAL_GPIO_MUX_MAC_POWER_LED = 6 +} HAL_GPIO_MUX_TYPE; + +typedef enum { + HAL_GPIO_INTR_LOW = 0, + HAL_GPIO_INTR_HIGH = 1, + HAL_GPIO_INTR_DISABLE = 2 +} HAL_GPIO_INTR_TYPE; + +typedef enum { HAL_RFGAIN_INACTIVE = 0, HAL_RFGAIN_READ_REQUESTED = 1, HAL_RFGAIN_NEED_CHANGE = 2 } HAL_RFGAIN; -/* - * Channels are specified by frequency. - */ -typedef struct { - uint32_t channelFlags; /* see below */ - uint16_t channel; /* setting in Mhz */ - uint8_t privFlags; - int8_t maxRegTxPower; /* max regulatory tx power in dBm */ - int8_t maxTxPower; /* max true tx power in 0.5 dBm */ - int8_t minTxPower; /* min true tx power in 0.5 dBm */ -} HAL_CHANNEL; - -/* channelFlags */ -#define CHANNEL_CW_INT 0x00002 /* CW interference detected on channel */ -#define CHANNEL_TURBO 0x00010 /* Turbo Channel */ -#define CHANNEL_CCK 0x00020 /* CCK channel */ -#define CHANNEL_OFDM 0x00040 /* OFDM channel */ -#define CHANNEL_2GHZ 0x00080 /* 2 GHz spectrum channel */ -#define CHANNEL_5GHZ 0x00100 /* 5 GHz spectrum channel */ -#define CHANNEL_PASSIVE 0x00200 /* Only passive scan allowed in the channel */ -#define CHANNEL_DYN 0x00400 /* dynamic CCK-OFDM channel */ -#define CHANNEL_STURBO 0x02000 /* Static turbo, no 11a-only usage */ -#define CHANNEL_HALF 0x04000 /* Half rate channel */ -#define CHANNEL_QUARTER 0x08000 /* Quarter rate channel */ -#define CHANNEL_HT20 0x10000 /* 11n 20MHZ channel */ -#define CHANNEL_HT40PLUS 0x20000 /* 11n 40MHZ channel w/ ext chan above */ -#define CHANNEL_HT40MINUS 0x40000 /* 11n 40MHZ channel w/ ext chan below */ - -/* privFlags */ -#define CHANNEL_INTERFERENCE 0x01 /* Software use: channel interference - used for as AR as well as RADAR - interference detection */ -#define CHANNEL_DFS 0x02 /* DFS required on channel */ -#define CHANNEL_4MS_LIMIT 0x04 /* 4msec packet limit on this channel */ -#define CHANNEL_DFS_CLEAR 0x08 /* if channel has been checked for DFS */ - -#define CHANNEL_A (CHANNEL_5GHZ|CHANNEL_OFDM) -#define CHANNEL_B (CHANNEL_2GHZ|CHANNEL_CCK) -#define CHANNEL_PUREG (CHANNEL_2GHZ|CHANNEL_OFDM) -#ifdef notdef -#define CHANNEL_G (CHANNEL_2GHZ|CHANNEL_DYN) -#else -#define CHANNEL_G (CHANNEL_2GHZ|CHANNEL_OFDM) -#endif -#define CHANNEL_T (CHANNEL_5GHZ|CHANNEL_OFDM|CHANNEL_TURBO) -#define CHANNEL_ST (CHANNEL_T|CHANNEL_STURBO) -#define CHANNEL_108G (CHANNEL_2GHZ|CHANNEL_OFDM|CHANNEL_TURBO) -#define CHANNEL_108A CHANNEL_T -#define CHANNEL_G_HT20 (CHANNEL_G|CHANNEL_HT20) -#define CHANNEL_A_HT20 (CHANNEL_A|CHANNEL_HT20) -#define CHANNEL_G_HT40PLUS (CHANNEL_G|CHANNEL_HT40PLUS) -#define CHANNEL_G_HT40MINUS (CHANNEL_G|CHANNEL_HT40MINUS) -#define CHANNEL_A_HT40PLUS (CHANNEL_A|CHANNEL_HT40PLUS) -#define CHANNEL_A_HT40MINUS (CHANNEL_A|CHANNEL_HT40MINUS) -#define CHANNEL_ALL \ - (CHANNEL_OFDM | CHANNEL_CCK| CHANNEL_2GHZ | CHANNEL_5GHZ | \ - CHANNEL_TURBO | CHANNEL_HT20 | CHANNEL_HT40PLUS | CHANNEL_HT40MINUS) -#define CHANNEL_ALL_NOTURBO (CHANNEL_ALL &~ CHANNEL_TURBO) +typedef uint16_t HAL_CTRY_CODE; /* country code */ +typedef uint16_t HAL_REG_DOMAIN; /* regulatory domain code */ #define HAL_ANTENNA_MIN_MODE 0 #define HAL_ANTENNA_FIXED_A 1 @@ -434,14 +396,6 @@ typedef struct { uint32_t beacons; } HAL_MIB_STATS; -typedef uint16_t HAL_CTRY_CODE; /* country code */ -typedef uint16_t HAL_REG_DOMAIN; /* regulatory domain code */ - -enum { - CTRY_DEBUG = 0x1ff, /* debug country code */ - CTRY_DEFAULT = 0 /* default country code */ -}; - enum { HAL_MODE_11A = 0x001, /* 11a channels */ HAL_MODE_TURBO = 0x002, /* 11a turbo-only channels */ @@ -471,8 +425,8 @@ typedef struct { int rateCount; /* NB: for proper padding */ uint8_t rateCodeToIndex[144]; /* back mapping */ struct { - uint8_t valid; /* valid for rate control use */ - uint8_t phy; /* CCK/OFDM/XR */ + uint8_t valid; /* valid for rate control use */ + uint8_t phy; /* CCK/OFDM/XR */ uint32_t rateKbps; /* transfer rate in kbs */ uint8_t rateCode; /* rate for h/w descriptors */ uint8_t shortPreamble; /* mask for enabling short @@ -630,6 +584,7 @@ typedef struct { struct ath_desc; struct ath_tx_status; struct ath_rx_status; +struct ieee80211_channel; /* * Hardware Access Layer (HAL) API. @@ -665,16 +620,20 @@ struct ath_hal { /* Reset functions */ HAL_BOOL __ahdecl(*ah_reset)(struct ath_hal *, HAL_OPMODE, - HAL_CHANNEL *, HAL_BOOL bChannelChange, - HAL_STATUS *status); + struct ieee80211_channel *, + HAL_BOOL bChannelChange, HAL_STATUS *status); HAL_BOOL __ahdecl(*ah_phyDisable)(struct ath_hal *); HAL_BOOL __ahdecl(*ah_disable)(struct ath_hal *); + void __ahdecl(*ah_configPCIE)(struct ath_hal *, HAL_BOOL restore); + void __ahdecl(*ah_disablePCIE)(struct ath_hal *); void __ahdecl(*ah_setPCUConfig)(struct ath_hal *); - HAL_BOOL __ahdecl(*ah_perCalibration)(struct ath_hal*, HAL_CHANNEL *, - HAL_BOOL *); - HAL_BOOL __ahdecl(*ah_perCalibrationN)(struct ath_hal *, HAL_CHANNEL *, - u_int chainMask, HAL_BOOL longCal, HAL_BOOL *isCalDone); - HAL_BOOL __ahdecl(*ah_resetCalValid)(struct ath_hal *, HAL_CHANNEL *); + HAL_BOOL __ahdecl(*ah_perCalibration)(struct ath_hal*, + struct ieee80211_channel *, HAL_BOOL *); + HAL_BOOL __ahdecl(*ah_perCalibrationN)(struct ath_hal *, + struct ieee80211_channel *, u_int chainMask, + HAL_BOOL longCal, HAL_BOOL *isCalDone); + HAL_BOOL __ahdecl(*ah_resetCalValid)(struct ath_hal *, + const struct ieee80211_channel *); HAL_BOOL __ahdecl(*ah_setTxPowerLimit)(struct ath_hal *, uint32_t); /* Transmit functions */ @@ -735,7 +694,8 @@ struct ath_hal { struct ath_desc *next, uint64_t tsf, struct ath_rx_status *); void __ahdecl(*ah_rxMonitor)(struct ath_hal *, - const HAL_NODE_STATS *, HAL_CHANNEL *); + const HAL_NODE_STATS *, + const struct ieee80211_channel *); void __ahdecl(*ah_procMibEvent)(struct ath_hal *, const HAL_NODE_STATS *); @@ -758,7 +718,8 @@ struct ath_hal { void __ahdecl(*ah_setLedState)(struct ath_hal*, HAL_LED_STATE); void __ahdecl(*ah_writeAssocid)(struct ath_hal*, const uint8_t *bssid, uint16_t assocId); - HAL_BOOL __ahdecl(*ah_gpioCfgOutput)(struct ath_hal *, uint32_t gpio); + HAL_BOOL __ahdecl(*ah_gpioCfgOutput)(struct ath_hal *, + uint32_t gpio, HAL_GPIO_MUX_TYPE); HAL_BOOL __ahdecl(*ah_gpioCfgInput)(struct ath_hal *, uint32_t gpio); uint32_t __ahdecl(*ah_gpioGet)(struct ath_hal *, uint32_t gpio); HAL_BOOL __ahdecl(*ah_gpioSet)(struct ath_hal *, @@ -804,7 +765,8 @@ struct ath_hal { HAL_BOOL __ahdecl(*ah_setPowerMode)(struct ath_hal*, HAL_POWER_MODE mode, int setChip); HAL_POWER_MODE __ahdecl(*ah_getPowerMode)(struct ath_hal*); - int16_t __ahdecl(*ah_getChanNoise)(struct ath_hal *, HAL_CHANNEL *); + int16_t __ahdecl(*ah_getChanNoise)(struct ath_hal *, + const struct ieee80211_channel *); /* Beacon Management Functions */ void __ahdecl(*ah_setBeaconTimers)(struct ath_hal*, @@ -846,54 +808,68 @@ extern const char *__ahdecl ath_hal_prob extern struct ath_hal * __ahdecl ath_hal_attach(uint16_t devid, HAL_SOFTC, HAL_BUS_TAG, HAL_BUS_HANDLE, HAL_STATUS* status); +extern const char *ath_hal_mac_name(struct ath_hal *); +extern const char *ath_hal_rf_name(struct ath_hal *); + /* - * Return a list of channels available for use with the hardware. - * The list is based on what the hardware is capable of, the specified - * country code, the modeSelect mask, and whether or not outdoor - * channels are to be permitted. + * Regulatory interfaces. Drivers should use ath_hal_init_channels to + * request a set of channels for a particular country code and/or + * regulatory domain. If CTRY_DEFAULT and SKU_NONE are specified then + * this list is constructed according to the contents of the EEPROM. + * ath_hal_getchannels acts similarly but does not alter the operating + * state; this can be used to collect information for a particular + * regulatory configuration. Finally ath_hal_set_channels installs a + * channel list constructed outside the driver. The HAL will adopt the + * channel list and setup internal state according to the specified + * regulatory configuration (e.g. conformance test limits). * - * The channel list is returned in the supplied array. maxchans - * defines the maximum size of this array. nchans contains the actual - * number of channels returned. If a problem occurred or there were - * no channels that met the criteria then AH_FALSE is returned. - */ -extern HAL_BOOL __ahdecl ath_hal_init_channels(struct ath_hal *, - HAL_CHANNEL *chans, u_int maxchans, u_int *nchans, - uint8_t *regclassids, u_int maxregids, u_int *nregids, - HAL_CTRY_CODE cc, u_int modeSelect, - HAL_BOOL enableOutdoor, HAL_BOOL enableExtendedChannels); + * For all interfaces the channel list is returned in the supplied array. + * maxchans defines the maximum size of this array. nchans contains the + * actual number of channels returned. If a problem occurred then a + * status code != HAL_OK is returned. + */ +struct ieee80211_channel; /* - * Calibrate noise floor data following a channel scan or similar. - * This must be called prior retrieving noise floor data. + * Return a list of channels according to the specified regulatory. */ -extern void __ahdecl ath_hal_process_noisefloor(struct ath_hal *ah); +extern HAL_STATUS __ahdecl ath_hal_getchannels(struct ath_hal *, + struct ieee80211_channel *chans, u_int maxchans, int *nchans, + u_int modeSelect, HAL_CTRY_CODE cc, HAL_REG_DOMAIN regDmn, + HAL_BOOL enableExtendedChannels); /* - * Return bit mask of wireless modes supported by the hardware. + * Return a list of channels and install it as the current operating + * regulatory list. */ -extern u_int __ahdecl ath_hal_getwirelessmodes(struct ath_hal*, HAL_CTRY_CODE); +extern HAL_STATUS __ahdecl ath_hal_init_channels(struct ath_hal *, + struct ieee80211_channel *chans, u_int maxchans, int *nchans, + u_int modeSelect, HAL_CTRY_CODE cc, HAL_REG_DOMAIN rd, + HAL_BOOL enableExtendedChannels); /* - * Calculate the transmit duration of a frame. + * Install the list of channels as the current operating regulatory + * and setup related state according to the country code and sku. */ -extern uint16_t __ahdecl ath_hal_computetxtime(struct ath_hal *, - const HAL_RATE_TABLE *rates, uint32_t frameLen, - uint16_t rateix, HAL_BOOL shortPreamble); +extern HAL_STATUS __ahdecl ath_hal_set_channels(struct ath_hal *, + struct ieee80211_channel *chans, int nchans, + HAL_CTRY_CODE cc, HAL_REG_DOMAIN regDmn); /* - * Return if device is public safety. + * Calibrate noise floor data following a channel scan or similar. + * This must be called prior retrieving noise floor data. */ -extern HAL_BOOL __ahdecl ath_hal_ispublicsafetysku(struct ath_hal *); +extern void __ahdecl ath_hal_process_noisefloor(struct ath_hal *ah); /* - * Return if device is operating in 900 MHz band. + * Return bit mask of wireless modes supported by the hardware. */ -extern HAL_BOOL ath_hal_isgsmsku(struct ath_hal *); +extern u_int __ahdecl ath_hal_getwirelessmodes(struct ath_hal*); /* - * Convert between IEEE channel number and channel frequency - * using the specified channel flags; e.g. CHANNEL_2GHZ. + * Calculate the transmit duration of a frame. */ -extern int __ahdecl ath_hal_mhz2ieee(struct ath_hal *, u_int mhz, u_int flags); +extern uint16_t __ahdecl ath_hal_computetxtime(struct ath_hal *, + const HAL_RATE_TABLE *rates, uint32_t frameLen, + uint16_t rateix, HAL_BOOL shortPreamble); #endif /* _ATH_AH_H_ */ Modified: projects/jbuild/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- projects/jbuild/sys/dev/ath/ath_hal/ah_internal.h Sat Feb 28 17:53:55 2009 (r189175) +++ projects/jbuild/sys/dev/ath/ath_hal/ah_internal.h Sat Feb 28 17:54:25 2009 (r189176) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any @@ -27,6 +27,8 @@ #define AH_MIN(a,b) ((a)<(b)?(a):(b)) #define AH_MAX(a,b) ((a)>(b)?(a):(b)) +#include + #ifndef NBBY #define NBBY 8 /* number of bits/byte */ #endif @@ -47,6 +49,11 @@ typedef struct { uint16_t end; /* ending register or zero */ } HAL_REGRANGE; +typedef struct { + uint32_t addr; /* regiser address/offset */ + uint32_t value; /* value to write */ +} HAL_REGWRITE; + /* * Transmit power scale factor. * @@ -77,12 +84,12 @@ struct ath_hal_chip { }; #ifndef AH_CHIP #define AH_CHIP(_name, _probe, _attach) \ -static struct ath_hal_chip name##_chip = { \ +static struct ath_hal_chip _name##_chip = { \ .name = #_name, \ .probe = _probe, \ .attach = _attach \ }; \ -OS_DATA_SET(ah_chips, name##_chip) +OS_DATA_SET(ah_chips, _name##_chip) #endif /* @@ -108,32 +115,44 @@ OS_DATA_SET(ah_rfs, _name##_rf) struct ath_hal_rf *ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode); /* - * Internal form of a HAL_CHANNEL. Note that the structure - * must be defined such that you can cast references to a - * HAL_CHANNEL so don't shuffle the first two members. + * Maximum number of internal channels. Entries are per unique + * frequency so this might be need to be increased to handle all + * usage cases; typically no more than 32 are really needed but + * dynamically allocating the data structures is a bit painful + * right now. + */ +#ifndef AH_MAXCHAN +#define AH_MAXCHAN 96 +#endif + +/* + * Internal per-channel state. These are found + * using ic_devdata in the ieee80211_channel. */ typedef struct { - uint32_t channelFlags; - uint16_t channel; /* NB: must be first for casting */ + uint16_t channel; /* h/w frequency, NB: may be mapped */ uint8_t privFlags; - int8_t maxRegTxPower; - int8_t maxTxPower; - int8_t minTxPower; /* as above... */ - - HAL_BOOL bssSendHere; - uint8_t gainI; - HAL_BOOL iqCalValid; - uint8_t calValid; /* bitmask of cal types */ +#define CHANNEL_IQVALID 0x01 /* IQ calibration valid */ +#define CHANNEL_ANI_INIT 0x02 /* ANI state initialized */ +#define CHANNEL_ANI_SETUP 0x04 /* ANI state setup */ + uint8_t calValid; /* bitmask of cal types */ int8_t iCoff; int8_t qCoff; int16_t rawNoiseFloor; int16_t noiseFloorAdjust; - int8_t antennaMax; - uint32_t regDmnFlags; /* Flags for channel use in reg */ - uint32_t conformanceTestLimit; /* conformance test limit from reg domain */ - uint16_t mainSpur; /* cached spur value for this cahnnel */ + uint16_t mainSpur; /* cached spur value for this channel */ } HAL_CHANNEL_INTERNAL; +/* channel requires noise floor check */ +#define CHANNEL_NFCREQUIRED IEEE80211_CHAN_PRIV0 + +/* all full-width channels */ +#define IEEE80211_CHAN_ALLFULL \ + (IEEE80211_CHAN_ALL - (IEEE80211_CHAN_HALF | IEEE80211_CHAN_QUARTER)) +#define IEEE80211_CHAN_ALLTURBOFULL \ + (IEEE80211_CHAN_ALLTURBO - \ + (IEEE80211_CHAN_HALF | IEEE80211_CHAN_QUARTER)) + typedef struct { uint32_t halChanSpreadSupport : 1, halSleepAfterBeaconBroken : 1, @@ -189,6 +208,8 @@ typedef struct { uint8_t halNumAntCfg5GHz; } HAL_CAPABILITIES; +struct regDomain; + /* * The ``private area'' follows immediately after the ``public area'' * in the data structure returned by ath_hal_attach. Private data are @@ -221,14 +242,8 @@ struct ath_hal_private { uint16_t *data); HAL_BOOL (*ah_eepromWrite)(struct ath_hal *, u_int off, uint16_t data); - HAL_BOOL (*ah_gpioCfgOutput)(struct ath_hal *, uint32_t gpio); - HAL_BOOL (*ah_gpioCfgInput)(struct ath_hal *, uint32_t gpio); - uint32_t (*ah_gpioGet)(struct ath_hal *, uint32_t gpio); - HAL_BOOL (*ah_gpioSet)(struct ath_hal *, - uint32_t gpio, uint32_t val); - void (*ah_gpioSetIntr)(struct ath_hal*, u_int, uint32_t); HAL_BOOL (*ah_getChipPowerLimits)(struct ath_hal *, - HAL_CHANNEL *, uint32_t); + struct ieee80211_channel *); int16_t (*ah_getNfAdjust)(struct ath_hal *, const HAL_CHANNEL_INTERNAL*); void (*ah_getNoiseFloor)(struct ath_hal *, @@ -254,9 +269,10 @@ struct ath_hal_private { uint16_t ah_phyRev; /* PHY revision */ uint16_t ah_analog5GhzRev; /* 2GHz radio revision */ uint16_t ah_analog2GhzRev; /* 5GHz radio revision */ - + uint8_t ah_ispcie; /* PCIE, special treatment */ HAL_OPMODE ah_opmode; /* operating mode from reset */ + const struct ieee80211_channel *ah_curchan;/* operating channel */ HAL_CAPABILITIES ah_caps; /* device capabilities */ uint32_t ah_diagreg; /* user-specified AR_DIAG_SW */ int16_t ah_powerLimit; /* tx power cap */ @@ -267,14 +283,13 @@ struct ath_hal_private { /* * State for regulatory domain handling. */ - HAL_REG_DOMAIN ah_currentRD; /* Current regulatory domain */ - HAL_CTRY_CODE ah_countryCode; /* current country code */ - HAL_CHANNEL_INTERNAL ah_channels[256]; /* calculated channel list */ - u_int ah_nchan; /* valid channels in list */ - HAL_CHANNEL_INTERNAL *ah_curchan; /* current channel */ + HAL_REG_DOMAIN ah_currentRD; /* EEPROM regulatory domain */ + HAL_CHANNEL_INTERNAL ah_channels[AH_MAXCHAN]; /* private chan state */ + u_int ah_nchan; /* valid items in ah_channels */ + const struct regDomain *ah_rd2GHz; /* reg state for 2G band */ + const struct regDomain *ah_rd5GHz; /* reg state for 5G band */ uint8_t ah_coverageClass; /* coverage class */ - HAL_BOOL ah_regdomainUpdate; /* regdomain is updated? */ /* * RF Silent handling; setup according to the EEPROM. */ @@ -297,22 +312,26 @@ struct ath_hal_private { AH_PRIVATE(_ah)->ah_eepromRead(_ah, _off, _data) #define ath_hal_eepromWrite(_ah, _off, _data) \ AH_PRIVATE(_ah)->ah_eepromWrite(_ah, _off, _data) -#define ath_hal_gpioCfgOutput(_ah, _gpio) \ - AH_PRIVATE(_ah)->ah_gpioCfgOutput(_ah, _gpio) +#define ath_hal_gpioCfgOutput(_ah, _gpio, _type) \ + (_ah)->ah_gpioCfgOutput(_ah, _gpio, _type) #define ath_hal_gpioCfgInput(_ah, _gpio) \ - AH_PRIVATE(_ah)->ah_gpioCfgInput(_ah, _gpio) + (_ah)->ah_gpioCfgInput(_ah, _gpio) #define ath_hal_gpioGet(_ah, _gpio) \ - AH_PRIVATE(_ah)->ah_gpioGet(_ah, _gpio) + (_ah)->ah_gpioGet(_ah, _gpio) #define ath_hal_gpioSet(_ah, _gpio, _val) \ - AH_PRIVATE(_ah)->ah_gpioGet(_ah, _gpio, _val) + (_ah)->ah_gpioSet(_ah, _gpio, _val) #define ath_hal_gpioSetIntr(_ah, _gpio, _ilevel) \ - AH_PRIVATE(_ah)->ah_gpioSetIntr(_ah, _gpio, _ilevel) -#define ath_hal_getpowerlimits(_ah, _chans, _nchan) \ - AH_PRIVATE(_ah)->ah_getChipPowerLimits(_ah, _chans, _nchan) + (_ah)->ah_gpioSetIntr(_ah, _gpio, _ilevel) +#define ath_hal_getpowerlimits(_ah, _chan) \ + AH_PRIVATE(_ah)->ah_getChipPowerLimits(_ah, _chan) #define ath_hal_getNfAdjust(_ah, _c) \ AH_PRIVATE(_ah)->ah_getNfAdjust(_ah, _c) #define ath_hal_getNoiseFloor(_ah, _nfArray) \ AH_PRIVATE(_ah)->ah_getNoiseFloor(_ah, _nfArray) +#define ath_hal_configPCIE(_ah, _reset) \ + (_ah)->ah_configPCIE(_ah, _reset) +#define ath_hal_disablePCIE(_ah) \ + (_ah)->ah_disablePCIE(_ah) #define ath_hal_eepromDetach(_ah) \ AH_PRIVATE(_ah)->ah_eepromDetach(_ah) @@ -327,38 +346,22 @@ struct ath_hal_private { #define ath_hal_eepromDiag(_ah, _request, _a, _asize, _r, _rsize) \ AH_PRIVATE(_ah)->ah_eepromDiag(_ah, _request, _a, _asize, _r, _rsize) -#if !defined(_NET_IF_IEEE80211_H_) && !defined(_NET80211__IEEE80211_H_) +#ifndef _NET_IF_IEEE80211_H_ /* * Stuff that would naturally come from _ieee80211.h */ #define IEEE80211_ADDR_LEN 6 -#define IEEE80211_WEP_KEYLEN 5 /* 40bit */ #define IEEE80211_WEP_IVLEN 3 /* 24bit */ #define IEEE80211_WEP_KIDLEN 1 /* 1 octet */ #define IEEE80211_WEP_CRCLEN 4 /* CRC-32 */ #define IEEE80211_CRC_LEN 4 -#define IEEE80211_MTU 1500 #define IEEE80211_MAX_LEN (2300 + IEEE80211_CRC_LEN + \ (IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN)) - -enum { - IEEE80211_T_DS, /* direct sequence spread spectrum */ - IEEE80211_T_FH, /* frequency hopping */ - IEEE80211_T_OFDM, /* frequency division multiplexing */ - IEEE80211_T_TURBO, /* high rate DS */ - IEEE80211_T_HT, /* HT - full GI */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:54:49 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE3281065672; Sat, 28 Feb 2009 17:54:49 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CAB2F8FC16; Sat, 28 Feb 2009 17:54:49 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHsn2R016824; Sat, 28 Feb 2009 17:54:49 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHsndH016813; Sat, 28 Feb 2009 17:54:49 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281754.n1SHsndH016813@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189177 - in projects/jbuild/sys/dev/sound: macio pci pci/hda pcm usb X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:54:50 -0000 Author: jb Date: Sat Feb 28 17:54:49 2009 New Revision: 189177 URL: http://svn.freebsd.org/changeset/base/189177 Log: MFC Added: projects/jbuild/sys/dev/sound/macio/ - copied from r189173, head/sys/dev/sound/macio/ Replaced: projects/jbuild/sys/dev/sound/usb/uaudio.c - copied unchanged from r189173, head/sys/dev/sound/usb/uaudio.c projects/jbuild/sys/dev/sound/usb/uaudio.h - copied unchanged from r189173, head/sys/dev/sound/usb/uaudio.h projects/jbuild/sys/dev/sound/usb/uaudio_pcm.c - copied unchanged from r189173, head/sys/dev/sound/usb/uaudio_pcm.c projects/jbuild/sys/dev/sound/usb/uaudioreg.h - copied unchanged from r189173, head/sys/dev/sound/usb/uaudioreg.h Deleted: projects/jbuild/sys/dev/sound/pci/au88x0.c projects/jbuild/sys/dev/sound/pci/au88x0.h Modified: projects/jbuild/sys/dev/sound/pci/cmi.c projects/jbuild/sys/dev/sound/pci/ds1.c projects/jbuild/sys/dev/sound/pci/envy24.c projects/jbuild/sys/dev/sound/pci/envy24ht.c projects/jbuild/sys/dev/sound/pci/hda/hdac.c projects/jbuild/sys/dev/sound/pci/spicds.c projects/jbuild/sys/dev/sound/pcm/dsp.c projects/jbuild/sys/dev/sound/pcm/mixer.c projects/jbuild/sys/dev/sound/pcm/sound.c projects/jbuild/sys/dev/sound/pcm/sound.h Modified: projects/jbuild/sys/dev/sound/pci/cmi.c ============================================================================== --- projects/jbuild/sys/dev/sound/pci/cmi.c Sat Feb 28 17:54:25 2009 (r189176) +++ projects/jbuild/sys/dev/sound/pci/cmi.c Sat Feb 28 17:54:49 2009 (r189177) @@ -60,6 +60,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define CMI8338B_PCI_ID 0x010113f6 #define CMI8738_PCI_ID 0x011113f6 #define CMI8738B_PCI_ID 0x011213f6 +#define CMI120_USB_ID 0x01030d8c /* Buffer size max is 64k for permitted DMA boundaries */ #define CMI_DEFAULT_BUFSZ 16384 @@ -916,6 +917,9 @@ cmi_probe(device_t dev) case CMI8738B_PCI_ID: device_set_desc(dev, "CMedia CMI8738B"); return BUS_PROBE_DEFAULT; + case CMI120_USB_ID: + device_set_desc(dev, "CMedia CMI120"); + return BUS_PROBE_DEFAULT; default: return ENXIO; } Modified: projects/jbuild/sys/dev/sound/pci/ds1.c ============================================================================== --- projects/jbuild/sys/dev/sound/pci/ds1.c Sat Feb 28 17:54:25 2009 (r189176) +++ projects/jbuild/sys/dev/sound/pci/ds1.c Sat Feb 28 17:54:49 2009 (r189177) @@ -396,7 +396,7 @@ ds_initpbank(volatile struct pbank *pb, pb->Format |= b16? 0 : 0x80000000; pb->Format |= (stereo && (ch == 2 || ch == 4))? 0x00000001 : 0; pb->LoopDefault = 0; - pb->PgBase = base? base : 0; + pb->PgBase = base; pb->PgLoop = 0; pb->PgLoopEnd = len >> ss; pb->PgLoopFrac = 0; Modified: projects/jbuild/sys/dev/sound/pci/envy24.c ============================================================================== --- projects/jbuild/sys/dev/sound/pci/envy24.c Sat Feb 28 17:54:25 2009 (r189176) +++ projects/jbuild/sys/dev/sound/pci/envy24.c Sat Feb 28 17:54:49 2009 (r189177) @@ -20,7 +20,7 @@ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHERIN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ @@ -278,7 +278,7 @@ static struct cfg_info cfg_table[] = { "Envy24 audio (M Audio Delta Dio 2496)", 0x1412, 0xd631, 0x10, 0x80, 0xf0, 0x03, - 0xff, 0x00, 0x00, + 0x02, 0xc0, 0xfd, 0x10, 0x20, 0x40, 0x00, 0x00, 0x00, &delta_codec, @@ -301,6 +301,51 @@ static struct cfg_info cfg_table[] = { 0x00, &delta_codec, }, + { + "Envy24 audio (M Audio Delta 66)", + 0x1412, 0xd632, + 0x15, 0x80, 0xf0, 0x03, + 0x02, 0xc0, 0xfd, + 0x10, 0x20, 0x40, 0x00, 0x00, + 0x00, + &delta_codec, + }, + { + "Envy24 audio (M Audio Delta 44)", + 0x1412, 0xd633, + 0x15, 0x80, 0xf0, 0x00, + 0x02, 0xc0, 0xfd, + 0x10, 0x20, 0x40, 0x00, 0x00, + 0x00, + &delta_codec, + }, + { + "Envy24 audio (M Audio Delta 1010)", + 0x1412, 0xd630, + 0x1f, 0x80, 0xf0, 0x03, + 0x22, 0xd0, 0xdd, + 0x10, 0x20, 0x40, 0x00, 0x00, + 0x00, + &delta_codec, + }, + { + "Envy24 audio (M Audio Delta 1010LT)", + 0x1412, 0xd63b, + 0x1f, 0x80, 0x72, 0x03, + 0x04, 0x7e, 0xfb, + 0x08, 0x02, 0x70, 0x00, 0x00, + 0x00, + &delta_codec, + }, + { + "Envy24 audio (Terratec EWX 2496)", + 0x153b, 0x1130, + 0x10, 0x80, 0xf0, 0x03, + 0xc0, 0x3f, 0x3f, + 0x10, 0x20, 0x01, 0x01, 0x00, + 0x00, + &delta_codec, + }, { "Envy24 audio (Generic)", 0, 0, Modified: projects/jbuild/sys/dev/sound/pci/envy24ht.c ============================================================================== --- projects/jbuild/sys/dev/sound/pci/envy24ht.c Sat Feb 28 17:54:25 2009 (r189176) +++ projects/jbuild/sys/dev/sound/pci/envy24ht.c Sat Feb 28 17:54:49 2009 (r189177) @@ -323,7 +323,7 @@ static struct cfg_info cfg_table[] = { 0x153b, 0x1150, 0x10, 0x80, 0xf0, 0xc3, 0x7ffbc7, 0x7fffff, 0x438, - 0x20, 0x10, 0x400, 0x00, 0x00, + 0x10, 0x20, 0x400, 0x01, 0x00, 0, &spi_codec, }, @@ -349,7 +349,7 @@ static struct cfg_info cfg_table[] = { "Envy24HT audio (M-Audio Revolution 7.1)", 0x1412, 0x3630, 0x43, 0x80, 0xf8, 0xc1, - 0x3fff85, 0x72, 0x4000fa, + 0x3fff85, 0x400072, 0x4000fa, 0x08, 0x02, 0x20, 0x00, 0x04, 0, &spi_codec, @@ -358,7 +358,7 @@ static struct cfg_info cfg_table[] = { "Envy24GT audio (M-Audio Revolution 5.1)", 0x1412, 0x3631, 0x42, 0x80, 0xf8, 0xc1, - 0x3fff85, 0x72, 0x4000fa, + 0x3fff05, 0x4000f0, 0x4000fa, 0x08, 0x02, 0x10, 0x00, 0x03, 0, &spi_codec, @@ -391,6 +391,15 @@ static struct cfg_info cfg_table[] = { &spi_codec, }, { + "Envy24HT-S audio (Terrasoniq TS22PCI)", + 0x153b, 0x117b, + 0x10, 0x80, 0xf0, 0xc3, + 0x7ffbc7, 0x7fffff, 0x438, + 0x10, 0x20, 0x400, 0x01, 0x00, + 0, + &spi_codec, + }, + { "Envy24HT audio (Generic)", 0, 0, 0x0b, 0x80, 0xfc, 0xc3, Modified: projects/jbuild/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- projects/jbuild/sys/dev/sound/pci/hda/hdac.c Sat Feb 28 17:54:25 2009 (r189176) +++ projects/jbuild/sys/dev/sound/pci/hda/hdac.c Sat Feb 28 17:54:49 2009 (r189177) @@ -83,7 +83,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20081226_0122" +#define HDA_DRV_TEST_REV "20090226_0129" SND_DECLARE_FILE("$FreeBSD$"); @@ -109,12 +109,6 @@ SND_DECLARE_FILE("$FreeBSD$"); #define hdac_lockassert(sc) snd_mtxassert((sc)->lock) #define hdac_lockowned(sc) mtx_owned((sc)->lock) -#undef HDAC_MSI_ENABLED -#if __FreeBSD_version >= 700026 || \ - (__FreeBSD_version < 700000 && __FreeBSD_version >= 602106) -#define HDAC_MSI_ENABLED 1 -#endif - #define HDA_FLAG_MATCH(fl, v) (((fl) & (v)) == (v)) #define HDA_DEV_MATCH(fl, v) ((fl) == (v) || \ (fl) == 0xffffffff || \ @@ -149,6 +143,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) #define HDA_INTEL_82801J HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) +#define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56) #define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) @@ -178,6 +173,19 @@ SND_DECLARE_FILE("$FreeBSD$"); #define ATI_VENDORID 0x1002 #define HDA_ATI_SB450 HDA_MODEL_CONSTRUCT(ATI, 0x437b) #define HDA_ATI_SB600 HDA_MODEL_CONSTRUCT(ATI, 0x4383) +#define HDA_ATI_RS600 HDA_MODEL_CONSTRUCT(ATI, 0x793b) +#define HDA_ATI_RS690 HDA_MODEL_CONSTRUCT(ATI, 0x7919) +#define HDA_ATI_RS780 HDA_MODEL_CONSTRUCT(ATI, 0x960f) +#define HDA_ATI_R600 HDA_MODEL_CONSTRUCT(ATI, 0xaa00) +#define HDA_ATI_RV630 HDA_MODEL_CONSTRUCT(ATI, 0xaa08) +#define HDA_ATI_RV610 HDA_MODEL_CONSTRUCT(ATI, 0xaa10) +#define HDA_ATI_RV670 HDA_MODEL_CONSTRUCT(ATI, 0xaa18) +#define HDA_ATI_RV635 HDA_MODEL_CONSTRUCT(ATI, 0xaa20) +#define HDA_ATI_RV620 HDA_MODEL_CONSTRUCT(ATI, 0xaa28) +#define HDA_ATI_RV770 HDA_MODEL_CONSTRUCT(ATI, 0xaa30) +#define HDA_ATI_RV730 HDA_MODEL_CONSTRUCT(ATI, 0xaa38) +#define HDA_ATI_RV710 HDA_MODEL_CONSTRUCT(ATI, 0xaa40) +#define HDA_ATI_RV740 HDA_MODEL_CONSTRUCT(ATI, 0xaa48) #define HDA_ATI_ALL HDA_MODEL_CONSTRUCT(ATI, 0xffff) /* VIA */ @@ -459,40 +467,56 @@ static uint32_t hdac_fmt[] = { static struct pcmchan_caps hdac_caps = {48000, 48000, hdac_fmt, 0}; +#define HDAC_NO_MSI 1 + static const struct { uint32_t model; char *desc; + char flags; } hdac_devices[] = { - { HDA_INTEL_82801F, "Intel 82801F" }, - { HDA_INTEL_63XXESB, "Intel 631x/632xESB" }, - { HDA_INTEL_82801G, "Intel 82801G" }, - { HDA_INTEL_82801H, "Intel 82801H" }, - { HDA_INTEL_82801I, "Intel 82801I" }, - { HDA_INTEL_82801J, "Intel 82801J" }, - { HDA_INTEL_SCH, "Intel SCH" }, - { HDA_NVIDIA_MCP51, "NVidia MCP51" }, - { HDA_NVIDIA_MCP55, "NVidia MCP55" }, - { HDA_NVIDIA_MCP61_1, "NVidia MCP61" }, - { HDA_NVIDIA_MCP61_2, "NVidia MCP61" }, - { HDA_NVIDIA_MCP65_1, "NVidia MCP65" }, - { HDA_NVIDIA_MCP65_2, "NVidia MCP65" }, - { HDA_NVIDIA_MCP67_1, "NVidia MCP67" }, - { HDA_NVIDIA_MCP67_2, "NVidia MCP67" }, - { HDA_NVIDIA_MCP73_1, "NVidia MCP73" }, - { HDA_NVIDIA_MCP73_2, "NVidia MCP73" }, - { HDA_NVIDIA_MCP78_1, "NVidia MCP78" }, - { HDA_NVIDIA_MCP78_2, "NVidia MCP78" }, - { HDA_NVIDIA_MCP78_3, "NVidia MCP78" }, - { HDA_NVIDIA_MCP78_4, "NVidia MCP78" }, - { HDA_NVIDIA_MCP79_1, "NVidia MCP79" }, - { HDA_NVIDIA_MCP79_2, "NVidia MCP79" }, - { HDA_NVIDIA_MCP79_3, "NVidia MCP79" }, - { HDA_NVIDIA_MCP79_4, "NVidia MCP79" }, - { HDA_ATI_SB450, "ATI SB450" }, - { HDA_ATI_SB600, "ATI SB600" }, - { HDA_VIA_VT82XX, "VIA VT8251/8237A" }, - { HDA_SIS_966, "SiS 966" }, - { HDA_ULI_M5461, "ULI M5461" }, + { HDA_INTEL_82801F, "Intel 82801F", 0 }, + { HDA_INTEL_63XXESB, "Intel 631x/632xESB", 0 }, + { HDA_INTEL_82801G, "Intel 82801G", 0 }, + { HDA_INTEL_82801H, "Intel 82801H", 0 }, + { HDA_INTEL_82801I, "Intel 82801I", 0 }, + { HDA_INTEL_82801J, "Intel 82801J", 0 }, + { HDA_INTEL_PCH, "Intel PCH", 0 }, + { HDA_INTEL_SCH, "Intel SCH", 0 }, + { HDA_NVIDIA_MCP51, "NVidia MCP51", HDAC_NO_MSI }, + { HDA_NVIDIA_MCP55, "NVidia MCP55", 0 }, + { HDA_NVIDIA_MCP61_1, "NVidia MCP61", 0 }, + { HDA_NVIDIA_MCP61_2, "NVidia MCP61", 0 }, + { HDA_NVIDIA_MCP65_1, "NVidia MCP65", 0 }, + { HDA_NVIDIA_MCP65_2, "NVidia MCP65", 0 }, + { HDA_NVIDIA_MCP67_1, "NVidia MCP67", 0 }, + { HDA_NVIDIA_MCP67_2, "NVidia MCP67", 0 }, + { HDA_NVIDIA_MCP73_1, "NVidia MCP73", 0 }, + { HDA_NVIDIA_MCP73_2, "NVidia MCP73", 0 }, + { HDA_NVIDIA_MCP78_1, "NVidia MCP78", 0 }, + { HDA_NVIDIA_MCP78_2, "NVidia MCP78", 0 }, + { HDA_NVIDIA_MCP78_3, "NVidia MCP78", 0 }, + { HDA_NVIDIA_MCP78_4, "NVidia MCP78", 0 }, + { HDA_NVIDIA_MCP79_1, "NVidia MCP79", 0 }, + { HDA_NVIDIA_MCP79_2, "NVidia MCP79", 0 }, + { HDA_NVIDIA_MCP79_3, "NVidia MCP79", 0 }, + { HDA_NVIDIA_MCP79_4, "NVidia MCP79", 0 }, + { HDA_ATI_SB450, "ATI SB450", 0 }, + { HDA_ATI_SB600, "ATI SB600", 0 }, + { HDA_ATI_RS600, "ATI RS600", 0 }, + { HDA_ATI_RS690, "ATI RS690", 0 }, + { HDA_ATI_RS780, "ATI RS780", 0 }, + { HDA_ATI_R600, "ATI R600", 0 }, + { HDA_ATI_RV610, "ATI RV610", 0 }, + { HDA_ATI_RV620, "ATI RV620", 0 }, + { HDA_ATI_RV630, "ATI RV630", 0 }, + { HDA_ATI_RV635, "ATI RV635", 0 }, + { HDA_ATI_RV710, "ATI RV710", 0 }, + { HDA_ATI_RV730, "ATI RV730", 0 }, + { HDA_ATI_RV740, "ATI RV740", 0 }, + { HDA_ATI_RV770, "ATI RV770", 0 }, + { HDA_VIA_VT82XX, "VIA VT8251/8237A",0 }, + { HDA_SIS_966, "SiS 966", 0 }, + { HDA_ULI_M5461, "ULI M5461", 0 }, /* Unknown */ { HDA_INTEL_ALL, "Intel (Unknown)" }, { HDA_NVIDIA_ALL, "NVidia (Unknown)" }, @@ -671,6 +695,7 @@ static const struct { /* Silicon Image */ #define SII_VENDORID 0x1095 +#define HDA_CODEC_SII1390 HDA_CODEC_CONSTRUCT(SII, 0x1390) #define HDA_CODEC_SII1392 HDA_CODEC_CONSTRUCT(SII, 0x1392) #define HDA_CODEC_SIIXXXX HDA_CODEC_CONSTRUCT(SII, 0xffff) @@ -706,6 +731,22 @@ static const struct { #define HDA_CODEC_VT1708B_5 HDA_CODEC_CONSTRUCT(VIA, 0xe725) #define HDA_CODEC_VT1708B_6 HDA_CODEC_CONSTRUCT(VIA, 0xe726) #define HDA_CODEC_VT1708B_7 HDA_CODEC_CONSTRUCT(VIA, 0xe727) +#define HDA_CODEC_VT1708S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0397) +#define HDA_CODEC_VT1708S_1 HDA_CODEC_CONSTRUCT(VIA, 0x1397) +#define HDA_CODEC_VT1708S_2 HDA_CODEC_CONSTRUCT(VIA, 0x2397) +#define HDA_CODEC_VT1708S_3 HDA_CODEC_CONSTRUCT(VIA, 0x3397) +#define HDA_CODEC_VT1708S_4 HDA_CODEC_CONSTRUCT(VIA, 0x4397) +#define HDA_CODEC_VT1708S_5 HDA_CODEC_CONSTRUCT(VIA, 0x5397) +#define HDA_CODEC_VT1708S_6 HDA_CODEC_CONSTRUCT(VIA, 0x6397) +#define HDA_CODEC_VT1708S_7 HDA_CODEC_CONSTRUCT(VIA, 0x7397) +#define HDA_CODEC_VT1702_0 HDA_CODEC_CONSTRUCT(VIA, 0x0398) +#define HDA_CODEC_VT1702_1 HDA_CODEC_CONSTRUCT(VIA, 0x1398) +#define HDA_CODEC_VT1702_2 HDA_CODEC_CONSTRUCT(VIA, 0x2398) +#define HDA_CODEC_VT1702_3 HDA_CODEC_CONSTRUCT(VIA, 0x3398) +#define HDA_CODEC_VT1702_4 HDA_CODEC_CONSTRUCT(VIA, 0x4398) +#define HDA_CODEC_VT1702_5 HDA_CODEC_CONSTRUCT(VIA, 0x5398) +#define HDA_CODEC_VT1702_6 HDA_CODEC_CONSTRUCT(VIA, 0x6398) +#define HDA_CODEC_VT1702_7 HDA_CODEC_CONSTRUCT(VIA, 0x7398) #define HDA_CODEC_VTXXXX HDA_CODEC_CONSTRUCT(VIA, 0xffff) /* ATI */ @@ -716,9 +757,18 @@ static const struct { #define HDA_CODEC_ATIXXXX HDA_CODEC_CONSTRUCT(ATI, 0xffff) /* NVIDIA */ +#define HDA_CODEC_NVIDIAMCP78 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0002) +#define HDA_CODEC_NVIDIAMCP78_2 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0006) +#define HDA_CODEC_NVIDIAMCP7A HDA_CODEC_CONSTRUCT(NVIDIA, 0x0007) +#define HDA_CODEC_NVIDIAMCP67 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0067) +#define HDA_CODEC_NVIDIAMCP73 HDA_CODEC_CONSTRUCT(NVIDIA, 0x8001) #define HDA_CODEC_NVIDIAXXXX HDA_CODEC_CONSTRUCT(NVIDIA, 0xffff) /* INTEL */ +#define HDA_CODEC_INTELG45_1 HDA_CODEC_CONSTRUCT(INTEL, 0x2801) +#define HDA_CODEC_INTELG45_2 HDA_CODEC_CONSTRUCT(INTEL, 0x2802) +#define HDA_CODEC_INTELG45_3 HDA_CODEC_CONSTRUCT(INTEL, 0x2803) +#define HDA_CODEC_INTELG45_4 HDA_CODEC_CONSTRUCT(INTEL, 0x29fb) #define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff) /* Codecs */ @@ -833,10 +883,36 @@ static const struct { { HDA_CODEC_VT1708B_5, "VIA VT1708B_5" }, { HDA_CODEC_VT1708B_6, "VIA VT1708B_6" }, { HDA_CODEC_VT1708B_7, "VIA VT1708B_7" }, + { HDA_CODEC_VT1708S_0, "VIA VT1708S_0" }, + { HDA_CODEC_VT1708S_1, "VIA VT1708S_1" }, + { HDA_CODEC_VT1708S_2, "VIA VT1708S_2" }, + { HDA_CODEC_VT1708S_3, "VIA VT1708S_3" }, + { HDA_CODEC_VT1708S_4, "VIA VT1708S_4" }, + { HDA_CODEC_VT1708S_5, "VIA VT1708S_5" }, + { HDA_CODEC_VT1708S_6, "VIA VT1708S_6" }, + { HDA_CODEC_VT1708S_7, "VIA VT1708S_7" }, + { HDA_CODEC_VT1702_0, "VIA VT1702_0" }, + { HDA_CODEC_VT1702_1, "VIA VT1702_1" }, + { HDA_CODEC_VT1702_2, "VIA VT1702_2" }, + { HDA_CODEC_VT1702_3, "VIA VT1702_3" }, + { HDA_CODEC_VT1702_4, "VIA VT1702_4" }, + { HDA_CODEC_VT1702_5, "VIA VT1702_5" }, + { HDA_CODEC_VT1702_6, "VIA VT1702_6" }, + { HDA_CODEC_VT1702_7, "VIA VT1702_7" }, { HDA_CODEC_ATIRS600_1,"ATI RS600 HDMI" }, { HDA_CODEC_ATIRS600_2,"ATI RS600 HDMI" }, { HDA_CODEC_ATIRS690, "ATI RS690/780 HDMI" }, { HDA_CODEC_ATIR6XX, "ATI R6xx HDMI" }, + { HDA_CODEC_NVIDIAMCP67, "NVidia MCP67 HDMI" }, + { HDA_CODEC_NVIDIAMCP73, "NVidia MCP73 HDMI" }, + { HDA_CODEC_NVIDIAMCP78, "NVidia MCP78 HDMI" }, + { HDA_CODEC_NVIDIAMCP78_2, "NVidia MCP78 HDMI" }, + { HDA_CODEC_NVIDIAMCP7A, "NVidia MCP7A HDMI" }, + { HDA_CODEC_INTELG45_1, "Intel G45 HDMI" }, + { HDA_CODEC_INTELG45_2, "Intel G45 HDMI" }, + { HDA_CODEC_INTELG45_3, "Intel G45 HDMI" }, + { HDA_CODEC_INTELG45_4, "Intel G45 HDMI" }, + { HDA_CODEC_SII1390, "Silicon Image SiI1390 HDMI" }, { HDA_CODEC_SII1392, "Silicon Image SiI1392 HDMI" }, /* Unknown codec */ { HDA_CODEC_ALCXXXX, "Realtek (Unknown)" }, @@ -1671,13 +1747,11 @@ hdac_irq_alloc(struct hdac_softc *sc) irq = &sc->irq; irq->irq_rid = 0x0; -#ifdef HDAC_MSI_ENABLED if ((sc->flags & HDAC_F_MSI) && (result = pci_msi_count(sc->dev)) == 1 && pci_alloc_msi(sc->dev, &result) == 0) irq->irq_rid = 0x1; else -#endif sc->flags &= ~HDAC_F_MSI; irq->irq_res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, @@ -1720,10 +1794,8 @@ hdac_irq_free(struct hdac_softc *sc) if (irq->irq_res != NULL) bus_release_resource(sc->dev, SYS_RES_IRQ, irq->irq_rid, irq->irq_res); -#ifdef HDAC_MSI_ENABLED - if ((sc->flags & HDAC_F_MSI) && irq->irq_rid == 0x1) + if (irq->irq_rid == 0x1) pci_release_msi(sc->dev); -#endif irq->irq_handle = NULL; irq->irq_res = NULL; irq->irq_rid = 0x0; @@ -2443,9 +2515,10 @@ hdac_widget_pin_parse(struct hdac_widget { struct hdac_softc *sc = w->devinfo->codec->sc; uint32_t config, pincap; - const char *devstr, *connstr; + const char *devstr; nid_t cad = w->devinfo->codec->cad; nid_t nid = w->nid; + int conn, color; config = hdac_widget_pin_getconfig(w); w->wclass.pin.config = config; @@ -2467,13 +2540,19 @@ hdac_widget_pin_parse(struct hdac_widget devstr = HDA_DEVS[(config & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) >> HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT]; - connstr = HDA_CONNS[(config & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) >> - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT]; + conn = (config & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) >> + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT; + color = (config & HDA_CONFIG_DEFAULTCONF_COLOR_MASK) >> + HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT; strlcat(w->name, ": ", sizeof(w->name)); strlcat(w->name, devstr, sizeof(w->name)); strlcat(w->name, " (", sizeof(w->name)); - strlcat(w->name, connstr, sizeof(w->name)); + if (conn == 0 && color != 0 && color != 15) { + strlcat(w->name, HDA_COLORS[color], sizeof(w->name)); + strlcat(w->name, " ", sizeof(w->name)); + } + strlcat(w->name, HDA_CONNS[conn], sizeof(w->name)); strlcat(w->name, ")", sizeof(w->name)); } @@ -2499,8 +2578,15 @@ hdac_widget_getcaps(struct hdac_widget * Change beeper pin node type to beeper to help parser. */ *waspin = 0; switch (id) { + case HDA_CODEC_AD1882: + case HDA_CODEC_AD1883: + case HDA_CODEC_AD1984: + case HDA_CODEC_AD1984A: + case HDA_CODEC_AD1984B: + case HDA_CODEC_AD1987: case HDA_CODEC_AD1988: case HDA_CODEC_AD1988B: + case HDA_CODEC_AD1989B: beeper = 26; break; case HDA_CODEC_ALC260: @@ -3895,12 +3981,32 @@ hdac_attach(device_t dev) { struct hdac_softc *sc; int result; - int i; + int i, devid = -1; + uint32_t model; + uint16_t class, subclass; uint16_t vendor; uint8_t v; device_printf(dev, "HDA Driver Revision: %s\n", HDA_DRV_TEST_REV); + model = (uint32_t)pci_get_device(dev) << 16; + model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; + class = pci_get_class(dev); + subclass = pci_get_subclass(dev); + + for (i = 0; i < HDAC_DEVICES_LEN; i++) { + if (hdac_devices[i].model == model) { + devid = i; + break; + } + if (HDA_DEV_MATCH(hdac_devices[i].model, model) && + class == PCIC_MULTIMEDIA && + subclass == PCIS_MULTIMEDIA_HDA) { + devid = i; + break; + } + } + sc = device_get_softc(dev); sc->lock = snd_mtxcreate(device_get_nameunit(dev), HDAC_MTX_NAME); sc->dev = dev; @@ -3966,14 +4072,17 @@ hdac_attach(device_t dev) ); } -#ifdef HDAC_MSI_ENABLED - if (resource_int_value(device_get_name(dev), - device_get_unit(dev), "msi", &i) == 0 && i != 0 && - pci_msi_count(dev) == 1) - sc->flags |= HDAC_F_MSI; - else -#endif + if (devid >= 0 && (hdac_devices[devid].flags & HDAC_NO_MSI)) sc->flags &= ~HDAC_F_MSI; + else + sc->flags |= HDAC_F_MSI; + if (resource_int_value(device_get_name(dev), + device_get_unit(dev), "msi", &i) == 0) { + if (i == 0) + sc->flags &= ~HDAC_F_MSI; + else + sc->flags |= HDAC_F_MSI; + } #if defined(__i386__) || defined(__amd64__) sc->flags |= HDAC_F_DMA_NOCACHE; @@ -4567,6 +4676,33 @@ hdac_vendor_patch_parse(struct hdac_devi * nid: 26 = Line-in, leave it alone. */ break; + case HDA_CODEC_AD1983: + /* + * This codec has several possible usages, but none + * fit the parser best. Help parser to choose better. + */ + /* Disable direct unmixed playback to get pcm volume. */ + w = hdac_widget_get(devinfo, 5); + if (w != NULL) + w->connsenable[0] = 0; + w = hdac_widget_get(devinfo, 6); + if (w != NULL) + w->connsenable[0] = 0; + w = hdac_widget_get(devinfo, 11); + if (w != NULL) + w->connsenable[0] = 0; + /* Disable mic and line selectors. */ + w = hdac_widget_get(devinfo, 12); + if (w != NULL) + w->connsenable[1] = 0; + w = hdac_widget_get(devinfo, 13); + if (w != NULL) + w->connsenable[1] = 0; + /* Disable recording from mono playback mix. */ + w = hdac_widget_get(devinfo, 20); + if (w != NULL) + w->connsenable[3] = 0; + break; case HDA_CODEC_AD1986A: /* * This codec has overcomplicated input mixing. @@ -4861,7 +4997,7 @@ hdac_audio_trace_as_out(struct hdac_devi /* Find next pin */ for (i = seq; i < 16 && ases[as].pins[i] == 0; i++) ; - /* Check if there is no any left. If so - we succeded. */ + /* Check if there is no any left. If so - we succeeded. */ if (i == 16) return (1); @@ -4907,7 +5043,7 @@ hdac_audio_trace_as_out(struct hdac_devi hdac_audio_trace_dac(devinfo, as, i, ases[as].pins[i], hpredir, min, res, 0); ases[as].dacs[i] = res; - /* We succeded, so call next. */ + /* We succeeded, so call next. */ if (hdac_audio_trace_as_out(devinfo, as, i + 1)) return (1); /* If next failed, we should retry with next min */ @@ -5472,7 +5608,7 @@ hdac_audio_disable_crossas(struct hdac_d struct hdac_audio_ctl *ctl; int i, j; - /* Disable crossassociatement connections. */ + /* Disable crossassociatement and unwanted crosschannel connections. */ /* ... using selectors */ for (i = devinfo->startnode; i < devinfo->endnode; i++) { w = hdac_widget_get(devinfo, i); @@ -5490,7 +5626,10 @@ hdac_audio_disable_crossas(struct hdac_d cw = hdac_widget_get(devinfo, w->conns[j]); if (cw == NULL || w->enable == 0) continue; - if (w->bindas == cw->bindas || cw->bindas == -2) + if (cw->bindas == -2) + continue; + if (w->bindas == cw->bindas && + (w->bindseqmask & cw->bindseqmask) != 0) continue; w->connsenable[j] = 0; HDA_BOOTHVERBOSE( @@ -5509,7 +5648,8 @@ hdac_audio_disable_crossas(struct hdac_d if (ctl->widget->bindas == -2 || ctl->childwidget->bindas == -2) continue; - if (ctl->widget->bindas != ctl->childwidget->bindas) { + if (ctl->widget->bindas != ctl->childwidget->bindas || + (ctl->widget->bindseqmask & ctl->childwidget->bindseqmask) == 0) { ctl->forcemute = 1; ctl->muted = HDA_AMP_MUTE_ALL; ctl->left = 0; @@ -5878,7 +6018,7 @@ retry: if (res) { HDA_BOOTVERBOSE( device_printf(devinfo->codec->sc->dev, - "Association %d (%d) trace succeded\n", + "Association %d (%d) trace succeeded\n", j, as[j].index); ); } else { @@ -6025,6 +6165,29 @@ hdac_audio_prepare_pin_ctrl(struct hdac_ } static void +hdac_audio_ctl_commit(struct hdac_devinfo *devinfo) +{ + struct hdac_audio_ctl *ctl; + int i, z; + + i = 0; + while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) { + if (ctl->enable == 0 || ctl->ossmask != 0) { + /* Mute disabled and mixer controllable controls. + * Last will be initialized by mixer_init(). + * This expected to reduce click on startup. */ + hdac_audio_ctl_amp_set(ctl, HDA_AMP_MUTE_ALL, 0, 0); + continue; + } + /* Init fixed controls to 0dB amplification. */ + z = ctl->offset; + if (z > ctl->step) + z = ctl->step; + hdac_audio_ctl_amp_set(ctl, HDA_AMP_MUTE_NONE, z, z); + } +} + +static void hdac_audio_commit(struct hdac_devinfo *devinfo) { struct hdac_softc *sc = devinfo->codec->sc; @@ -6040,11 +6203,41 @@ hdac_audio_commit(struct hdac_devinfo *d hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, 0x7e7, 0), cad); + /* Commit controls. */ + hdac_audio_ctl_commit(devinfo); + + /* Commit selectors, pins and EAPD. */ + for (i = 0; i < devinfo->nodecnt; i++) { + w = &devinfo->widget[i]; + if (w == NULL) + continue; + if (w->selconn == -1) + w->selconn = 0; + if (w->nconns > 0) + hdac_widget_connection_select(w, w->selconn); + if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) { + hdac_command(sc, + HDA_CMD_SET_PIN_WIDGET_CTRL(cad, w->nid, + w->wclass.pin.ctrl), cad); + } + if (w->param.eapdbtl != HDAC_INVALID) { + uint32_t val; + + val = w->param.eapdbtl; + if (devinfo->function.audio.quirks & + HDA_QUIRK_EAPDINV) + val ^= HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD; + hdac_command(sc, + HDA_CMD_SET_EAPD_BTL_ENABLE(cad, w->nid, + val), cad); + } + } + + /* Commit GPIOs. */ gdata = 0; gmask = 0; gdir = 0; commitgpio = 0; - numgpio = HDA_PARAM_GPIO_COUNT_NUM_GPIO( devinfo->function.audio.gpio); @@ -6099,54 +6292,6 @@ hdac_audio_commit(struct hdac_devinfo *d HDA_CMD_SET_GPIO_DATA(cad, devinfo->nid, gdata), cad); } - - for (i = 0; i < devinfo->nodecnt; i++) { - w = &devinfo->widget[i]; - if (w == NULL) - continue; - if (w->selconn == -1) - w->selconn = 0; - if (w->nconns > 0) - hdac_widget_connection_select(w, w->selconn); - if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) { - hdac_command(sc, - HDA_CMD_SET_PIN_WIDGET_CTRL(cad, w->nid, - w->wclass.pin.ctrl), cad); - } - if (w->param.eapdbtl != HDAC_INVALID) { - uint32_t val; - - val = w->param.eapdbtl; - if (devinfo->function.audio.quirks & - HDA_QUIRK_EAPDINV) - val ^= HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD; - hdac_command(sc, - HDA_CMD_SET_EAPD_BTL_ENABLE(cad, w->nid, - val), cad); - - } - } -} - -static void -hdac_audio_ctl_commit(struct hdac_devinfo *devinfo) -{ - struct hdac_audio_ctl *ctl; - int i, z; - - i = 0; - while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) { - if (ctl->enable == 0) { - /* Mute disabled controls. */ - hdac_audio_ctl_amp_set(ctl, HDA_AMP_MUTE_ALL, 0, 0); - continue; - } - /* Init controls to 0dB amplification. */ - z = ctl->offset; - if (z > ctl->step) - z = ctl->step; - hdac_audio_ctl_amp_set(ctl, HDA_AMP_MUTE_NONE, z, z); - } } static void @@ -6977,7 +7122,7 @@ hdac_config_fetch(struct hdac_softc *sc, hdac_quirks_tab[k].key, len - inv) != 0) continue; if (len - inv != strlen(hdac_quirks_tab[k].key)) - break; + continue; HDA_BOOTVERBOSE( printf(" %s%s", (inv != 0) ? "no" : "", hdac_quirks_tab[k].key); @@ -7391,10 +7536,6 @@ hdac_attach2(void *arg) ); hdac_audio_commit(devinfo); HDA_BOOTHVERBOSE( - device_printf(sc->dev, "Ctls commit...\n"); - ); - hdac_audio_ctl_commit(devinfo); - HDA_BOOTHVERBOSE( device_printf(sc->dev, "HP switch init...\n"); ); hdac_hp_switch_init(devinfo); @@ -7644,10 +7785,6 @@ hdac_resume(device_t dev) ); hdac_audio_commit(devinfo); HDA_BOOTHVERBOSE( - device_printf(dev, "Ctls commit...\n"); - ); - hdac_audio_ctl_commit(devinfo); - HDA_BOOTHVERBOSE( device_printf(dev, "HP switch init...\n"); ); hdac_hp_switch_init(devinfo); Modified: projects/jbuild/sys/dev/sound/pci/spicds.c ============================================================================== --- projects/jbuild/sys/dev/sound/pci/spicds.c Sat Feb 28 17:54:25 2009 (r189176) +++ projects/jbuild/sys/dev/sound/pci/spicds.c Sat Feb 28 17:54:49 2009 (r189177) @@ -234,7 +234,7 @@ spicds_init(struct spicds_info *codec) if (codec->type == SPICDS_TYPE_AK4358) spicds_wrcd(codec, 0x00, 0x07); /* I2S, 24bit, power-up */ if (codec->type == SPICDS_TYPE_AK4381) - spicds_wrcd(codec, 0x00, 0x0f); /* I2S, 24bit, power-up */ + spicds_wrcd(codec, 0x00, 0x8f); /* I2S, 24bit, power-up */ if (codec->type == SPICDS_TYPE_AK4396) spicds_wrcd(codec, 0x00, 0x07); /* I2S, 24bit, power-up */ snd_mtxunlock(codec->lock); @@ -296,7 +296,8 @@ spicds_set(struct spicds_info *codec, in case SPICDS_TYPE_WM8770: right = right + 27; break; - case SPICDS_TYPE_AK4381 || SPICDS_TYPE_AK4396: + case SPICDS_TYPE_AK4381: + case SPICDS_TYPE_AK4396: right = right * 255 / 100; break; default: Modified: projects/jbuild/sys/dev/sound/pcm/dsp.c ============================================================================== --- projects/jbuild/sys/dev/sound/pcm/dsp.c Sat Feb 28 17:54:25 2009 (r189176) +++ projects/jbuild/sys/dev/sound/pcm/dsp.c Sat Feb 28 17:54:49 2009 (r189177) @@ -814,7 +814,12 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd case SNDCTL_SYSINFO: sound_oss_sysinfo((oss_sysinfo *)arg); break; + case SNDCTL_CARDINFO: + ret = sound_oss_card_info((oss_card_info *)arg); + break; case SNDCTL_AUDIOINFO: + case SNDCTL_AUDIOINFO_EX: + case SNDCTL_ENGINEINFO: ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg); break; case SNDCTL_MIXERINFO: @@ -1370,9 +1375,9 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd case SNDCTL_DSP_GETCAPS: pcm_lock(d); - *arg_i = DSP_CAP_REALTIME | DSP_CAP_MMAP | DSP_CAP_TRIGGER; + *arg_i = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER; if (rdch && wrch && !(dsp_get_flags(i_dev) & SD_F_SIMPLEX)) - *arg_i |= DSP_CAP_DUPLEX; + *arg_i |= PCM_CAP_DUPLEX; pcm_unlock(d); break; @@ -1770,18 +1775,6 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd break; #if 0 /** - * @note The SNDCTL_CARDINFO ioctl was omitted per 4Front developer - * documentation. "The usability of this call is very limited. It's - * provided only for completeness of the API. OSS API doesn't have - * any concept of card. Any information returned by this ioctl calld - * is reserved exclusively for the utility programs included in the - * OSS package. Applications should not try to use for this - * information in any ways." - */ - case SNDCTL_CARDINFO: - ret = EINVAL; - break; - /** * @note The S/PDIF interface ioctls, @c SNDCTL_DSP_READCTL and * @c SNDCTL_DSP_WRITECTL have been omitted at the suggestion of * 4Front Technologies. @@ -2282,13 +2275,14 @@ dsp_oss_audioinfo(struct cdev *i_dev, os /* * These flags stolen from SNDCTL_DSP_GETCAPS handler. * Note, however, that a single channel operates in - * only one direction, so DSP_CAP_DUPLEX is out. + * only one direction, so PCM_CAP_DUPLEX is out. */ /** * @todo @c SNDCTL_AUDIOINFO::caps - Make drivers keep * these in pcmchan::caps? */ - ai->caps = DSP_CAP_REALTIME | DSP_CAP_MMAP | DSP_CAP_TRIGGER; + ai->caps = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER | + ((ch->direction == PCMDIR_PLAY) ? PCM_CAP_OUTPUT : PCM_CAP_INPUT); /* * Collect formats supported @b natively by the @@ -2345,7 +2339,8 @@ dsp_oss_audioinfo(struct cdev *i_dev, os * @c real_device - OSSv4 docs: "Obsolete." */ ai->real_device = -1; - strlcpy(ai->devnode, devname, sizeof(ai->devnode)); + strlcpy(ai->devnode, "/dev/", sizeof(ai->devnode)); + strlcat(ai->devnode, devname, sizeof(ai->devnode)); ai->enabled = device_is_attached(d->dev) ? 1 : 0; /** * @note @@ -2369,6 +2364,9 @@ dsp_oss_audioinfo(struct cdev *i_dev, os for (i = 0; i < ai->nrates; i++) ai->rates[i] = rates[i]; + + ai->next_play_engine = 0; + ai->next_rec_engine = 0; CHN_UNLOCK(ch); } Modified: projects/jbuild/sys/dev/sound/pcm/mixer.c ============================================================================== --- projects/jbuild/sys/dev/sound/pcm/mixer.c Sat Feb 28 17:54:25 2009 (r189176) +++ projects/jbuild/sys/dev/sound/pcm/mixer.c Sat Feb 28 17:54:49 2009 (r189177) @@ -1022,6 +1022,27 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo int ret, *arg_i = (int *)arg; int v = -1, j = cmd & 0xff; + /* + * Certain ioctls may be made on any type of device (audio, mixer, + * and MIDI). Handle those special cases here. + */ + if (IOCGROUP(cmd) == 'X') { + switch (cmd) { + case SNDCTL_SYSINFO: + sound_oss_sysinfo((oss_sysinfo *)arg); + return (0); + case SNDCTL_CARDINFO: + return (sound_oss_card_info((oss_card_info *)arg)); + case SNDCTL_AUDIOINFO: + case SNDCTL_AUDIOINFO_EX: + case SNDCTL_ENGINEINFO: + return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg)); + case SNDCTL_MIXERINFO: + return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg)); + } + return (EINVAL); + } + m = i_dev->si_drv1; if (m == NULL) @@ -1033,11 +1054,6 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo return (EBADF); } - if (cmd == SNDCTL_MIXERINFO) { - snd_mtxunlock(m->lock); - return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg)); - } - if ((cmd & MIXER_WRITE(0)) == MIXER_WRITE(0)) { if (j == SOUND_MIXER_RECSRC) ret = mixer_setrecsrc(m, *arg_i); @@ -1074,16 +1090,6 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo ret = 0; switch (cmd) { - /** @todo Double check return values, error codes. */ - case SNDCTL_SYSINFO: - snd_mtxunlock(m->lock); - sound_oss_sysinfo((oss_sysinfo *)arg); - return (ret); - break; - case SNDCTL_AUDIOINFO: - snd_mtxunlock(m->lock); - return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg)); - break; case SNDCTL_DSP_GET_RECSRC_NAMES: bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo)); break; @@ -1097,7 +1103,7 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo *arg_i = SOUND_VERSION; break; default: - ret = ENXIO; + ret = EINVAL; break; } Modified: projects/jbuild/sys/dev/sound/pcm/sound.c ============================================================================== --- projects/jbuild/sys/dev/sound/pcm/sound.c Sat Feb 28 17:54:25 2009 (r189176) +++ projects/jbuild/sys/dev/sound/pcm/sound.c Sat Feb 28 17:54:49 2009 (r189177) @@ -1405,6 +1405,7 @@ sound_oss_sysinfo(oss_sysinfo *si) { static char si_product[] = "FreeBSD native OSS ABI"; static char si_version[] = __XSTRING(__FreeBSD_version); + static char si_license[] = "BSD"; static int intnbits = sizeof(int) * 8; /* Better suited as macro? Must pester a C guru. */ @@ -1417,6 +1418,7 @@ sound_oss_sysinfo(oss_sysinfo *si) strlcpy(si->product, si_product, sizeof(si->product)); strlcpy(si->version, si_version, sizeof(si->version)); si->versionnum = SOUND_VERSION; + strlcpy(si->license, si_license, sizeof(si->license)); /* * Iterate over PCM devices and their channels, gathering up data @@ -1454,6 +1456,7 @@ sound_oss_sysinfo(oss_sysinfo *si) pcm_unlock(d); } + si->numaudioengines = si->numaudios; si->numsynths = 0; /* OSSv4 docs: this field is obsolete */ /** @@ -1490,6 +1493,38 @@ sound_oss_sysinfo(oss_sysinfo *si) si->filler[i] = -1; } +int +sound_oss_card_info(oss_card_info *si) +{ + struct snddev_info *d; + int i, ncards; + + ncards = 0; + + for (i = 0; pcm_devclass != NULL && + i < devclass_get_maxunit(pcm_devclass); i++) { + d = devclass_get_softc(pcm_devclass, i); + if (!PCM_REGISTERED(d)) + continue; + + if (ncards++ != si->card) + continue; + + mtx_assert(d->lock, MA_NOTOWNED); + pcm_lock(d); + + strlcpy(si->shortname, device_get_nameunit(d->dev), + sizeof(si->shortname)); + strlcpy(si->longname, device_get_desc(d->dev), + sizeof(si->longname)); + strlcpy(si->hw_info, d->status, sizeof(si->hw_info)); + si->intr_count = si->ack_count = 0; + pcm_unlock(d); + return (0); + } + return (ENXIO); +} + /************************************************************************/ static int Modified: projects/jbuild/sys/dev/sound/pcm/sound.h ============================================================================== --- projects/jbuild/sys/dev/sound/pcm/sound.h Sat Feb 28 17:54:25 2009 (r189176) +++ projects/jbuild/sys/dev/sound/pcm/sound.h Sat Feb 28 17:54:49 2009 (r189177) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:54:59 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDBAF106566B; Sat, 28 Feb 2009 17:54:59 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9CA08FC13; Sat, 28 Feb 2009 17:54:59 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHsxVq016865; Sat, 28 Feb 2009 17:54:59 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHsxNN016861; Sat, 28 Feb 2009 17:54:59 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281754.n1SHsxNN016861@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189178 - in projects/jbuild/sys/dev/syscons: . teken X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:55:00 -0000 Author: jb Date: Sat Feb 28 17:54:59 2009 New Revision: 189178 URL: http://svn.freebsd.org/changeset/base/189178 Log: MFC Added: projects/jbuild/sys/dev/syscons/scterm-teken.c - copied unchanged from r189173, head/sys/dev/syscons/scterm-teken.c projects/jbuild/sys/dev/syscons/teken/ - copied from r189173, head/sys/dev/syscons/teken/ Deleted: projects/jbuild/sys/dev/syscons/scterm-dumb.c projects/jbuild/sys/dev/syscons/scterm-sc.c projects/jbuild/sys/dev/syscons/sctermvar.h Modified: projects/jbuild/sys/dev/syscons/scterm.c projects/jbuild/sys/dev/syscons/syscons.c projects/jbuild/sys/dev/syscons/syscons.h Copied: projects/jbuild/sys/dev/syscons/scterm-teken.c (from r189173, head/sys/dev/syscons/scterm-teken.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/jbuild/sys/dev/syscons/scterm-teken.c Sat Feb 28 17:54:59 2009 (r189178, copy of r189173, head/sys/dev/syscons/scterm-teken.c) @@ -0,0 +1,509 @@ +/*- + * Copyright (c) 1999 Kazutaka YOKOTA + * All rights reserved. + * + * Copyright (c) 2008-2009 Ed Schouten + * 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 as + * the first lines of this file unmodified. + * 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 AUTHORS ``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 AUTHORS 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 +__FBSDID("$FreeBSD$"); + +#include "opt_syscons.h" + +#include +#include +#include +#include +#include + +#if defined(__sparc64__) || defined(__powerpc__) +#include +#else +#include +#endif + +#include + +#include + +static void scteken_revattr(unsigned char, teken_attr_t *); +static unsigned int scteken_attr(const teken_attr_t *); + +static sc_term_init_t scteken_init; +static sc_term_term_t scteken_term; +static sc_term_puts_t scteken_puts; +static sc_term_ioctl_t scteken_ioctl; +static sc_term_default_attr_t scteken_default_attr; +static sc_term_clear_t scteken_clear; +static sc_term_input_t scteken_input; +static void scteken_nop(void); + +typedef struct { + teken_t ts_teken; + int ts_busy; +} teken_stat; + +static teken_stat reserved_teken_stat; + +static sc_term_sw_t sc_term_scteken = { + { NULL, NULL }, + "scteken", /* emulator name */ + "teken terminal", /* description */ + "*", /* matching renderer */ + sizeof(teken_stat), /* softc size */ + 0, + scteken_init, + scteken_term, + scteken_puts, + scteken_ioctl, + (sc_term_reset_t *)scteken_nop, + scteken_default_attr, + scteken_clear, + (sc_term_notify_t *)scteken_nop, + scteken_input, +}; + +SCTERM_MODULE(scteken, sc_term_scteken); + +static tf_bell_t scteken_bell; +static tf_cursor_t scteken_cursor; +static tf_putchar_t scteken_putchar; +static tf_fill_t scteken_fill; +static tf_copy_t scteken_copy; +static tf_param_t scteken_param; +static tf_respond_t scteken_respond; + +static const teken_funcs_t scteken_funcs = { + .tf_bell = scteken_bell, + .tf_cursor = scteken_cursor, + .tf_putchar = scteken_putchar, + .tf_fill = scteken_fill, + .tf_copy = scteken_copy, + .tf_param = scteken_param, + .tf_respond = scteken_respond, +}; + +static int +scteken_init(scr_stat *scp, void **softc, int code) +{ + teken_stat *ts; + teken_pos_t tp; + + if (*softc == NULL) { + if (reserved_teken_stat.ts_busy) + return (EINVAL); + *softc = &reserved_teken_stat; + } + ts = *softc; + + switch (code) { + case SC_TE_COLD_INIT: + ++sc_term_scteken.te_refcount; + ts->ts_busy = 1; + /* FALLTHROUGH */ + case SC_TE_WARM_INIT: + teken_init(&ts->ts_teken, &scteken_funcs, scp); + + tp.tp_row = scp->ysize; + tp.tp_col = scp->xsize; + teken_set_winsize(&ts->ts_teken, &tp); + + tp.tp_row = scp->cursor_pos / scp->xsize; + tp.tp_col = scp->cursor_pos % scp->xsize; + teken_set_cursor(&ts->ts_teken, &tp); + break; + } + + return (0); +} + +static int +scteken_term(scr_stat *scp, void **softc) +{ + + if (*softc == &reserved_teken_stat) { + *softc = NULL; + reserved_teken_stat.ts_busy = 0; + } + --sc_term_scteken.te_refcount; + + return (0); +} + +static void +scteken_puts(scr_stat *scp, u_char *buf, int len) +{ + teken_stat *ts = scp->ts; + + scp->sc->write_in_progress++; + teken_input(&ts->ts_teken, buf, len); + scp->sc->write_in_progress--; +} + +static int +scteken_ioctl(scr_stat *scp, struct tty *tp, u_long cmd, caddr_t data, + struct thread *td) +{ + teken_stat *ts = scp->ts; + vid_info_t *vi; + unsigned int attr; + + switch (cmd) { + case GIO_ATTR: /* get current attributes */ + *(int*)data = + scteken_attr(teken_get_curattr(&ts->ts_teken)); + return (0); + case CONS_GETINFO: /* get current (virtual) console info */ + vi = (vid_info_t *)data; + if (vi->size != sizeof(struct vid_info)) + return EINVAL; + + attr = scteken_attr(teken_get_defattr(&ts->ts_teken)); + vi->mv_norm.fore = attr & 0x0f; + vi->mv_norm.back = (attr >> 4) & 0x0f; + vi->mv_rev.fore = vi->mv_norm.back; + vi->mv_rev.back = vi->mv_norm.fore; + /* + * The other fields are filled by the upper routine. XXX + */ + return (ENOIOCTL); + } + + return (ENOIOCTL); +} + +static void +scteken_default_attr(scr_stat *scp, int color, int rev_color) +{ + teken_stat *ts = scp->ts; + teken_attr_t ta; + + scteken_revattr(color, &ta); + teken_set_defattr(&ts->ts_teken, &ta); +} + +static void +scteken_clear(scr_stat *scp) +{ + + sc_move_cursor(scp, 0, 0); + sc_vtb_clear(&scp->vtb, scp->sc->scr_map[0x20], SC_NORM_ATTR << 8); + mark_all(scp); +} + +static int +scteken_input(scr_stat *scp, int c, struct tty *tp) +{ + + return FALSE; +} + +static void +scteken_nop(void) +{ + +} + +/* + * libteken routines. + */ + +static const unsigned char fgcolors_normal[TC_NCOLORS] = { + FG_BLACK, FG_RED, FG_GREEN, FG_BROWN, + FG_BLUE, FG_MAGENTA, FG_CYAN, FG_LIGHTGREY, +}; + +static const unsigned char fgcolors_bold[TC_NCOLORS] = { + FG_DARKGREY, FG_LIGHTRED, FG_LIGHTGREEN, FG_YELLOW, + FG_LIGHTBLUE, FG_LIGHTMAGENTA, FG_LIGHTCYAN, FG_WHITE, +}; + +static const unsigned char bgcolors[TC_NCOLORS] = { + BG_BLACK, BG_RED, BG_GREEN, BG_BROWN, + BG_BLUE, BG_MAGENTA, BG_CYAN, BG_LIGHTGREY, +}; + +static void +scteken_revattr(unsigned char color, teken_attr_t *a) +{ + teken_color_t fg, bg; + + /* + * XXX: Reverse conversion of syscons to teken attributes. Not + * realiable. Maybe we should turn it into a 1:1 mapping one of + * these days? + */ + + a->ta_format = 0; + a->ta_fgcolor = TC_WHITE; + a->ta_bgcolor = TC_BLACK; + +#ifdef FG_BLINK + if (color & FG_BLINK) { + a->ta_format |= TF_BLINK; + color &= ~FG_BLINK; + } +#endif /* FG_BLINK */ + + for (fg = 0; fg < TC_NCOLORS; fg++) { + for (bg = 0; bg < TC_NCOLORS; bg++) { + if ((fgcolors_normal[fg] | bgcolors[bg]) == color) { + a->ta_fgcolor = fg; + a->ta_bgcolor = bg; + return; + } + + if ((fgcolors_bold[fg] | bgcolors[bg]) == color) { + a->ta_fgcolor = fg; + a->ta_bgcolor = bg; + a->ta_format |= TF_BOLD; + return; + } + } + } +} + +static unsigned int +scteken_attr(const teken_attr_t *a) +{ + unsigned int attr = 0; + + if (a->ta_format & TF_BOLD) + attr |= fgcolors_bold[a->ta_fgcolor]; + else + attr |= fgcolors_normal[a->ta_fgcolor]; + attr |= bgcolors[a->ta_bgcolor]; + +#ifdef FG_UNDERLINE + if (a->ta_format & TF_UNDERLINE) + attr |= FG_UNDERLINE; +#endif /* FG_UNDERLINE */ +#ifdef FG_BLINK + if (a->ta_format & TF_BLINK) + attr |= FG_BLINK; +#endif /* FG_BLINK */ + + return (attr); +} + +static void +scteken_bell(void *arg) +{ + scr_stat *scp = arg; + + sc_bell(scp, scp->bell_pitch, scp->bell_duration); +} + +static void +scteken_cursor(void *arg, const teken_pos_t *p) +{ + scr_stat *scp = arg; + + sc_move_cursor(scp, p->tp_col, p->tp_row); +} + +static void +scteken_putchar(void *arg, const teken_pos_t *tp, teken_char_t c, + const teken_attr_t *a) +{ + scr_stat *scp = arg; + u_char *map; + u_char ch; + vm_offset_t p; + int cursor, attr; + +#ifdef TEKEN_UTF8 + if (c >= 0x80) { + /* XXX: Don't display UTF-8 yet. */ + attr = (FG_YELLOW|BG_RED) << 8; + ch = '?'; + } else +#endif /* TEKEN_UTF8 */ + { + attr = scteken_attr(a) << 8; + ch = c; + } + + map = scp->sc->scr_map; + + cursor = tp->tp_row * scp->xsize + tp->tp_col; + p = sc_vtb_pointer(&scp->vtb, cursor); + sc_vtb_putchar(&scp->vtb, p, map[ch], attr); + + mark_for_update(scp, cursor); + /* + * XXX: Why do we need this? Only marking `cursor' should be + * enough. Without this line, we get artifacts. + */ + mark_for_update(scp, imin(cursor + 1, scp->xsize * scp->ysize - 1)); +} + +static void +scteken_fill(void *arg, const teken_rect_t *r, teken_char_t c, + const teken_attr_t *a) +{ + scr_stat *scp = arg; + u_char *map; + u_char ch; + unsigned int width; + int attr, row; + +#ifdef TEKEN_UTF8 + if (c >= 0x80) { + /* XXX: Don't display UTF-8 yet. */ + attr = (FG_YELLOW|BG_RED) << 8; + ch = '?'; + } else +#endif /* TEKEN_UTF8 */ + { + attr = scteken_attr(a) << 8; + ch = c; + } + + map = scp->sc->scr_map; + + if (r->tr_begin.tp_col == 0 && r->tr_end.tp_col == scp->xsize) { + /* Single contiguous region to fill. */ + sc_vtb_erase(&scp->vtb, r->tr_begin.tp_row * scp->xsize, + (r->tr_end.tp_row - r->tr_begin.tp_row) * scp->xsize, + map[ch], attr); + } else { + /* Fill display line by line. */ + width = r->tr_end.tp_col - r->tr_begin.tp_col; + + for (row = r->tr_begin.tp_row; row < r->tr_end.tp_row; row++) { + sc_vtb_erase(&scp->vtb, r->tr_begin.tp_row * + scp->xsize + r->tr_begin.tp_col, + width, map[ch], attr); + } + } + + /* Mark begin and end positions to be refreshed. */ + mark_for_update(scp, + r->tr_begin.tp_row * scp->xsize + r->tr_begin.tp_col); + mark_for_update(scp, + (r->tr_end.tp_row - 1) * scp->xsize + (r->tr_end.tp_col - 1)); + sc_remove_cutmarking(scp); +} + +static void +scteken_copy(void *arg, const teken_rect_t *r, const teken_pos_t *p) +{ + scr_stat *scp = arg; + unsigned int width; + int src, dst, end; + +#ifndef SC_NO_HISTORY + /* + * We count a line of input as history if we perform a copy of + * one whole line upward. In other words: if a line of text gets + * overwritten by a rectangle that's right below it. + */ + if (scp->history != NULL && + r->tr_begin.tp_col == 0 && r->tr_end.tp_col == scp->xsize && + r->tr_begin.tp_row == p->tp_row + 1) { + sc_hist_save_one_line(scp, p->tp_row); + } +#endif + + if (r->tr_begin.tp_col == 0 && r->tr_end.tp_col == scp->xsize) { + /* Single contiguous region to copy. */ + sc_vtb_move(&scp->vtb, r->tr_begin.tp_row * scp->xsize, + p->tp_row * scp->xsize, + (r->tr_end.tp_row - r->tr_begin.tp_row) * scp->xsize); + } else { + /* Copy line by line. */ + width = r->tr_end.tp_col - r->tr_begin.tp_col; + + if (p->tp_row < r->tr_begin.tp_row) { + /* Copy from top to bottom. */ + src = r->tr_begin.tp_row * scp->xsize + + r->tr_begin.tp_col; + end = r->tr_end.tp_row * scp->xsize + + r->tr_end.tp_col; + dst = p->tp_row * scp->xsize + p->tp_col; + + while (src < end) { + sc_vtb_move(&scp->vtb, src, dst, width); + + src += scp->xsize; + dst += scp->xsize; + } + } else { + /* Copy from bottom to top. */ + src = (r->tr_end.tp_row - 1) * scp->xsize + + r->tr_begin.tp_col; + end = r->tr_begin.tp_row * scp->xsize + + r->tr_begin.tp_col; + dst = (p->tp_row + r->tr_end.tp_row - + r->tr_begin.tp_row - 1) * scp->xsize + p->tp_col; + + while (src >= end) { + sc_vtb_move(&scp->vtb, src, dst, width); + + src -= scp->xsize; + dst -= scp->xsize; + } + } + } + + /* Mark begin and end positions to be refreshed. */ + mark_for_update(scp, + p->tp_row * scp->xsize + p->tp_col); + mark_for_update(scp, + (p->tp_row + r->tr_end.tp_row - r->tr_begin.tp_row - 1) * + scp->xsize + + (p->tp_col + r->tr_end.tp_col - r->tr_begin.tp_col - 1)); + sc_remove_cutmarking(scp); +} + +static void +scteken_param(void *arg, int cmd, int value) +{ + scr_stat *scp = arg; + + switch (cmd) { + case TP_SHOWCURSOR: + if (value) { + sc_change_cursor_shape(scp, + CONS_RESET_CURSOR|CONS_LOCAL_CURSOR, -1, -1); + } else { + sc_change_cursor_shape(scp, + CONS_HIDDEN_CURSOR|CONS_LOCAL_CURSOR, -1, -1); + } + break; + case TP_SWITCHVT: + sc_switch_scr(scp->sc, value); + break; + } +} + +static void +scteken_respond(void *arg, const void *buf, size_t len) +{ + scr_stat *scp = arg; + + sc_respond(scp, buf, len); +} Modified: projects/jbuild/sys/dev/syscons/scterm.c ============================================================================== --- projects/jbuild/sys/dev/syscons/scterm.c Sat Feb 28 17:54:49 2009 (r189177) +++ projects/jbuild/sys/dev/syscons/scterm.c Sat Feb 28 17:54:59 2009 (r189178) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include SET_DECLARE(scterm_set, sc_term_sw_t); Modified: projects/jbuild/sys/dev/syscons/syscons.c ============================================================================== --- projects/jbuild/sys/dev/syscons/syscons.c Sat Feb 28 17:54:49 2009 (r189177) +++ projects/jbuild/sys/dev/syscons/syscons.c Sat Feb 28 17:54:59 2009 (r189178) @@ -2741,6 +2741,16 @@ scinit(int unit, int flags) init_scp(sc, sc->first_vty, scp); sc_vtb_init(&scp->vtb, VTB_MEMORY, scp->xsize, scp->ysize, (void *)sc_buffer, FALSE); + + /* move cursors to the initial positions */ + if (col >= scp->xsize) + col = 0; + if (row >= scp->ysize) + row = scp->ysize - 1; + scp->xpos = col; + scp->ypos = row; + scp->cursor_pos = scp->cursor_oldpos = row*scp->xsize + col; + if (sc_init_emulator(scp, SC_DFLT_TERM)) sc_init_emulator(scp, "*"); (*scp->tsw->te_default_attr)(scp, @@ -2764,15 +2774,6 @@ scinit(int unit, int flags) sc_vtb_copy(&scp->scr, 0, &scp->vtb, 0, scp->xsize*scp->ysize); #endif - /* move cursors to the initial positions */ - if (col >= scp->xsize) - col = 0; - if (row >= scp->ysize) - row = scp->ysize - 1; - scp->xpos = col; - scp->ypos = row; - scp->cursor_pos = scp->cursor_oldpos = row*scp->xsize + col; - if (bios_value.cursor_end < scp->font_size) sc->dflt_curs_attr.base = scp->font_size - bios_value.cursor_end - 1; @@ -3569,7 +3570,7 @@ sc_show_font(scr_stat *scp, int page) #endif /* !SC_NO_FONT_LOADING */ void -sc_paste(scr_stat *scp, u_char *p, int count) +sc_paste(scr_stat *scp, const u_char *p, int count) { struct tty *tp; u_char *rmap; @@ -3584,6 +3585,22 @@ sc_paste(scr_stat *scp, u_char *p, int c } void +sc_respond(scr_stat *scp, const u_char *p, int count) +{ + struct tty *tp; + + tp = SC_DEV(scp->sc, scp->sc->cur_scp->index); + if (!tty_opened(tp)) + return; + for (; count > 0; --count) + ttydisc_rint(tp, *p++, 0); +#if 0 + /* XXX: we can't call ttydisc_rint_done() here! */ + ttydisc_rint_done(tp); +#endif +} + +void sc_bell(scr_stat *scp, int pitch, int duration) { if (cold || shutdown_in_progress || !enable_bell) Modified: projects/jbuild/sys/dev/syscons/syscons.h ============================================================================== --- projects/jbuild/sys/dev/syscons/syscons.h Sat Feb 28 17:54:49 2009 (r189177) +++ projects/jbuild/sys/dev/syscons/syscons.h Sat Feb 28 17:54:59 2009 (r189178) @@ -563,7 +563,8 @@ int sc_clean_up(scr_stat *scp); int sc_switch_scr(sc_softc_t *sc, u_int next_scr); void sc_alloc_scr_buffer(scr_stat *scp, int wait, int discard); int sc_init_emulator(scr_stat *scp, char *name); -void sc_paste(scr_stat *scp, u_char *p, int count); +void sc_paste(scr_stat *scp, const u_char *p, int count); +void sc_respond(scr_stat *scp, const u_char *p, int count); void sc_bell(scr_stat *scp, int pitch, int duration); /* schistory.c */ From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:55:32 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E823D10656D9; Sat, 28 Feb 2009 17:55:32 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D44DA8FC23; Sat, 28 Feb 2009 17:55:32 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHtW0Z016957; Sat, 28 Feb 2009 17:55:32 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHtWGf016946; Sat, 28 Feb 2009 17:55:32 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281755.n1SHtWGf016946@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:55:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189179 - in projects/jbuild/sys/dev/ata: . chipsets X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:55:33 -0000 Author: jb Date: Sat Feb 28 17:55:32 2009 New Revision: 189179 URL: http://svn.freebsd.org/changeset/base/189179 Log: MFC Added: projects/jbuild/sys/dev/ata/ata-raid-ddf.h - copied unchanged from r189173, head/sys/dev/ata/ata-raid-ddf.h Replaced: projects/jbuild/sys/dev/ata/ata-usb.c - copied unchanged from r189173, head/sys/dev/ata/ata-usb.c Modified: projects/jbuild/sys/dev/ata/ata-all.c projects/jbuild/sys/dev/ata/ata-all.h projects/jbuild/sys/dev/ata/ata-card.c projects/jbuild/sys/dev/ata/ata-cbus.c projects/jbuild/sys/dev/ata/ata-disk.c projects/jbuild/sys/dev/ata/ata-dma.c projects/jbuild/sys/dev/ata/ata-isa.c projects/jbuild/sys/dev/ata/ata-pci.c projects/jbuild/sys/dev/ata/ata-pci.h projects/jbuild/sys/dev/ata/ata-queue.c projects/jbuild/sys/dev/ata/ata-raid.c projects/jbuild/sys/dev/ata/ata-raid.h projects/jbuild/sys/dev/ata/ata-sata.c projects/jbuild/sys/dev/ata/atapi-cam.c projects/jbuild/sys/dev/ata/atapi-cd.c projects/jbuild/sys/dev/ata/atapi-fd.c projects/jbuild/sys/dev/ata/atapi-tape.c projects/jbuild/sys/dev/ata/chipsets/ata-acard.c projects/jbuild/sys/dev/ata/chipsets/ata-acerlabs.c projects/jbuild/sys/dev/ata/chipsets/ata-ahci.c projects/jbuild/sys/dev/ata/chipsets/ata-highpoint.c projects/jbuild/sys/dev/ata/chipsets/ata-intel.c projects/jbuild/sys/dev/ata/chipsets/ata-jmicron.c projects/jbuild/sys/dev/ata/chipsets/ata-marvell.c projects/jbuild/sys/dev/ata/chipsets/ata-netcell.c projects/jbuild/sys/dev/ata/chipsets/ata-nvidia.c projects/jbuild/sys/dev/ata/chipsets/ata-promise.c projects/jbuild/sys/dev/ata/chipsets/ata-serverworks.c projects/jbuild/sys/dev/ata/chipsets/ata-siliconimage.c projects/jbuild/sys/dev/ata/chipsets/ata-sis.c projects/jbuild/sys/dev/ata/chipsets/ata-via.c Modified: projects/jbuild/sys/dev/ata/ata-all.c ============================================================================== --- projects/jbuild/sys/dev/ata/ata-all.c Sat Feb 28 17:54:59 2009 (r189178) +++ projects/jbuild/sys/dev/ata/ata-all.c Sat Feb 28 17:55:32 2009 (r189179) @@ -61,7 +61,7 @@ static struct cdevsw ata_cdevsw = { /* prototypes */ static void ata_boot_attach(void); -static device_t ata_add_child(device_t, struct ata_device *, int); +static void ata_conn_event(void *, int); static void bswap(int8_t *, int); static void btrim(int8_t *, int); static void bpack(int8_t *, int8_t *, int); @@ -127,6 +127,7 @@ ata_attach(device_t dev) bzero(&ch->queue_mtx, sizeof(struct mtx)); mtx_init(&ch->queue_mtx, "ATA queue lock", NULL, MTX_DEF); TAILQ_INIT(&ch->ata_queue); + TASK_INIT(&ch->conntask, 0, ata_conn_event, dev); /* reset the controller HW, the channel and device(s) */ while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit) @@ -147,7 +148,7 @@ ata_attach(device_t dev) return ENXIO; } if ((error = bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, NULL, - (driver_intr_t *)ata_interrupt, ch, &ch->ih))) { + ata_interrupt, ch, &ch->ih))) { device_printf(dev, "unable to setup interrupt\n"); return error; } @@ -178,19 +179,33 @@ ata_detach(device_t dev) if (!device_get_children(dev, &children, &nchildren)) { for (i = 0; i < nchildren; i++) if (children[i]) - device_delete_child(dev, children[i]); + ata_delete_child(dev, children[i]); free(children, M_TEMP); } + taskqueue_drain(taskqueue_thread, &ch->conntask); /* release resources */ bus_teardown_intr(dev, ch->r_irq, ch->ih); bus_release_resource(dev, SYS_RES_IRQ, ATA_IRQ_RID, ch->r_irq); ch->r_irq = NULL; + + /* free DMA resources if DMA HW present*/ + if (ch->dma.free) + ch->dma.free(dev); + mtx_destroy(&ch->state_mtx); mtx_destroy(&ch->queue_mtx); return 0; } +static void +ata_conn_event(void *context, int dummy) +{ + device_t dev = (device_t)context; + + ata_reinit(dev); +} + int ata_reinit(device_t dev) { @@ -212,6 +227,11 @@ ata_reinit(device_t dev) /* catch eventual request in ch->running */ mtx_lock(&ch->state_mtx); + if (ch->state & ATA_STALL_QUEUE) { + /* Recursive reinits and reinits during detach prohobited. */ + mtx_unlock(&ch->state_mtx); + return (ENXIO); + } if ((request = ch->running)) callout_stop(&request->callout); ch->running = NULL; @@ -244,7 +264,7 @@ ata_reinit(device_t dev) ata_finish(request); request = NULL; } - device_delete_child(dev, children[i]); + ata_delete_child(dev, children[i]); } } free(children, M_TEMP); @@ -269,6 +289,9 @@ ata_reinit(device_t dev) mtx_unlock(&ch->state_mtx); ATA_LOCKING(dev, ATA_LF_UNLOCK); + /* Add new children. */ + ata_identify(dev); + if (bootverbose) device_printf(dev, "reinit done ..\n"); @@ -304,11 +327,10 @@ ata_suspend(device_t dev) int ata_resume(device_t dev) { - struct ata_channel *ch; int error; /* check for valid device */ - if (!dev || !(ch = device_get_softc(dev))) + if (!dev || !device_get_softc(dev)) return ENXIO; /* reinit the devices, we dont know what mode/state they are in */ @@ -319,7 +341,7 @@ ata_resume(device_t dev) return error; } -int +void ata_interrupt(void *data) { struct ata_channel *ch = (struct ata_channel *)data; @@ -354,11 +376,10 @@ ata_interrupt(void *data) mtx_unlock(&ch->state_mtx); ATA_LOCKING(ch->dev, ATA_LF_UNLOCK); ata_finish(request); - return 1; + return; } } while (0); mtx_unlock(&ch->state_mtx); - return 0; } /* @@ -382,30 +403,32 @@ ata_ioctl(struct cdev *dev, u_long cmd, case IOCATAREINIT: if (*value >= devclass_get_maxunit(ata_devclass) || - !(device = devclass_get_device(ata_devclass, *value))) + !(device = devclass_get_device(ata_devclass, *value)) || + !device_is_attached(device)) return ENXIO; error = ata_reinit(device); break; case IOCATAATTACH: if (*value >= devclass_get_maxunit(ata_devclass) || - !(device = devclass_get_device(ata_devclass, *value))) + !(device = devclass_get_device(ata_devclass, *value)) || + !device_is_attached(device)) return ENXIO; - /* XXX SOS should enable channel HW on controller */ - error = ata_attach(device); + error = DEVICE_ATTACH(device); break; case IOCATADETACH: if (*value >= devclass_get_maxunit(ata_devclass) || - !(device = devclass_get_device(ata_devclass, *value))) + !(device = devclass_get_device(ata_devclass, *value)) || + !device_is_attached(device)) return ENXIO; - error = ata_detach(device); - /* XXX SOS should disable channel HW on controller */ + error = DEVICE_DETACH(device); break; case IOCATADEVICES: if (devices->channel >= devclass_get_maxunit(ata_devclass) || - !(device = devclass_get_device(ata_devclass, devices->channel))) + !(device = devclass_get_device(ata_devclass, devices->channel)) || + !device_is_attached(device)) return ENXIO; bzero(devices->name[0], 32); bzero(&devices->params[0], sizeof(struct ata_params)); @@ -566,19 +589,44 @@ ata_boot_attach(void) /* * misc support functions */ -static device_t -ata_add_child(device_t parent, struct ata_device *atadev, int unit) +device_t +ata_add_child(device_t parent, int unit, int atapi) { + struct ata_device *atadev; device_t child; + int dev_unit = -1; - if ((child = device_add_child(parent, NULL, unit))) { +#ifdef ATA_STATIC_ID + if (!atapi) + dev_unit = (device_get_unit(parent) << 1) + unit; +#endif + if ((child = device_add_child(parent, NULL, dev_unit))) { + if (!(atadev = malloc(sizeof(struct ata_device), + M_ATA, M_NOWAIT | M_ZERO))) { + device_printf(parent, "out of memory\n"); + device_delete_child(parent, child); + return (NULL); + } device_set_softc(child, atadev); device_quiet(child); atadev->dev = child; + atadev->unit = unit; + atadev->type = atapi ? ATA_T_ATAPI : ATA_T_ATA; atadev->max_iosize = DEV_BSIZE; atadev->mode = ATA_PIO_MAX; } - return child; + return (child); +} + +int +ata_delete_child(device_t parent, device_t child) +{ + struct ata_device *atadev = device_get_softc(child); + int res; + + res = device_delete_child(parent, child); + free(atadev, M_ATA); + return (res); } int @@ -589,11 +637,11 @@ ata_getparam(struct ata_device *atadev, u_int8_t command = 0; int error = ENOMEM, retries = 2; - if (ch->devices & (ATA_ATA_MASTER << atadev->unit)) + if (atadev->type == ATA_T_ATA) command = ATA_ATA_IDENTIFY; - if (ch->devices & (ATA_ATAPI_MASTER << atadev->unit)) + else if (atadev->type == ATA_T_ATAPI) command = ATA_ATAPI_IDENTIFY; - if (!command) + else return ENXIO; while (retries-- > 0 && error) { @@ -603,7 +651,9 @@ ata_getparam(struct ata_device *atadev, request->timeout = 1; request->retries = 0; request->u.ata.command = command; - request->flags = (ATA_R_READ|ATA_R_AT_HEAD|ATA_R_DIRECT|ATA_R_QUIET); + request->flags = (ATA_R_READ|ATA_R_AT_HEAD|ATA_R_THREAD); + if (!bootverbose) + request->flags |= ATA_R_QUIET; request->data = (void *)&atadev->param; request->bytecount = sizeof(struct ata_params); request->donecount = 0; @@ -637,17 +687,18 @@ ata_getparam(struct ata_device *atadev, btrim(atacap->serial, sizeof(atacap->serial)); bpack(atacap->serial, atacap->serial, sizeof(atacap->serial)); - if (bootverbose) - printf("ata%d-%s: pio=%s wdma=%s udma=%s cable=%s wire\n", + if (init) { + char buffer[64]; + + if (bootverbose) { + printf("ata%d-%s: pio=%s wdma=%s udma=%s cable=%s wire\n", device_get_unit(ch->dev), ata_unit2str(atadev), ata_mode2str(ata_pmode(atacap)), ata_mode2str(ata_wmode(atacap)), ata_mode2str(ata_umode(atacap)), (atacap->hwres & ATA_CABLE_ID) ? "80":"40"); - - if (init) { - char buffer[64]; + } sprintf(buffer, "%.40s/%.8s", atacap->model, atacap->revision); device_set_desc_copy(atadev->dev, buffer); @@ -679,38 +730,36 @@ ata_identify(device_t dev) { struct ata_channel *ch = device_get_softc(dev); struct ata_device *atadev; - device_t child; - int i; + device_t *children; + int nchildren, i, n = ch->devices; if (bootverbose) - device_printf(dev, "identify ch->devices=%08x\n", ch->devices); - - for (i = 0; i < ATA_PM; ++i) { - if (ch->devices & (((ATA_ATA_MASTER | ATA_ATAPI_MASTER) << i))) { - int unit = -1; + device_printf(dev, "Identifying devices: %08x\n", ch->devices); - if (!(atadev = malloc(sizeof(struct ata_device), - M_ATA, M_NOWAIT | M_ZERO))) { - device_printf(dev, "out of memory\n"); - return ENOMEM; - } - atadev->unit = i; -#ifdef ATA_STATIC_ID - if (ch->devices & ((ATA_ATA_MASTER << i))) - unit = (device_get_unit(dev) << 1) + i; -#endif - if ((child = ata_add_child(dev, atadev, unit))) { - if (ata_getparam(atadev, 1)) { - device_delete_child(dev, child); - free(atadev, M_ATA); - } - } - else - free(atadev, M_ATA); + mtx_lock(&Giant); + /* Skip existing devices. */ + if (!device_get_children(dev, &children, &nchildren)) { + for (i = 0; i < nchildren; i++) { + if (children[i] && (atadev = device_get_softc(children[i]))) + n &= ~((ATA_ATA_MASTER | ATA_ATAPI_MASTER) << atadev->unit); } + free(children, M_TEMP); + } + if (bootverbose) + device_printf(dev, "New devices: %08x\n", n); + if (n == 0) { + mtx_unlock(&Giant); + return (0); } + /* Create new devices. */ + for (i = 0; i < ATA_PM; ++i) { + if (n & (((ATA_ATA_MASTER | ATA_ATAPI_MASTER) << i))) + ata_add_child(dev, i, n & (ATA_ATAPI_MASTER << i)); + } + bus_generic_probe(dev); bus_generic_attach(dev); + mtx_unlock(&Giant); return 0; } @@ -894,8 +943,7 @@ ata_atapi(device_t dev) struct ata_channel *ch = device_get_softc(device_get_parent(dev)); struct ata_device *atadev = device_get_softc(dev); - return ((atadev->unit == ATA_MASTER && ch->devices & ATA_ATAPI_MASTER) || - (atadev->unit == ATA_SLAVE && ch->devices & ATA_ATAPI_SLAVE)); + return (ch->devices & (ATA_ATAPI_MASTER << atadev->unit)); } int Modified: projects/jbuild/sys/dev/ata/ata-all.h ============================================================================== --- projects/jbuild/sys/dev/ata/ata-all.h Sat Feb 28 17:54:59 2009 (r189178) +++ projects/jbuild/sys/dev/ata/ata-all.h Sat Feb 28 17:55:32 2009 (r189179) @@ -212,7 +212,7 @@ #define ATA_AHCI_P_CMD_NOOP 0x00000000 #define ATA_AHCI_P_CMD_ACTIVE 0x10000000 #define ATA_AHCI_P_CMD_PARTIAL 0x20000000 -#define ATA_AHCI_P_CMD_SLUMPER 0x60000000 +#define ATA_AHCI_P_CMD_SLUMBER 0x60000000 #define ATA_AHCI_P_TFD 0x120 #define ATA_AHCI_P_SIG 0x124 @@ -367,7 +367,6 @@ struct ata_request { #define ATA_R_AT_HEAD 0x00000200 #define ATA_R_REQUEUE 0x00000400 #define ATA_R_THREAD 0x00000800 -#define ATA_R_DIRECT 0x00001000 #define ATA_R_DEBUG 0x10000000 #define ATA_R_DANGER1 0x20000000 @@ -411,6 +410,10 @@ struct ata_device { #define ATA_MASTER 0x00 #define ATA_SLAVE 0x01 #define ATA_PM 0x0f + int type; /* device type */ +#define ATA_T_ATA 0x00 +#define ATA_T_ATAPI 0x01 +#define ATA_T_ATAPI_CAM 0x02 struct ata_params param; /* ata param structure */ int mode; /* current transfermode */ @@ -423,6 +426,8 @@ struct ata_device { #define ATA_D_MEDIA_CHANGED 0x0002 #define ATA_D_ENC_PRESENT 0x0004 #define ATA_D_48BIT_ACTIVE 0x0008 +#define ATA_D_PROBED 0x0010 +#define ATA_D_VALID 0x0020 }; /* structure for holding DMA Physical Region Descriptors (PRD) entries */ @@ -500,6 +505,7 @@ struct ata_resource { struct ata_channel { device_t dev; /* device handle */ int unit; /* physical channel */ + int attached; /* channel is attached */ struct ata_resource r_io[ATA_MAX_RES];/* I/O resources */ struct resource *r_irq; /* interrupt of this channel */ void *ih; /* interrupt handle */ @@ -529,6 +535,7 @@ struct ata_channel { TAILQ_HEAD(, ata_request) ata_queue; /* head of ATA queue */ struct ata_request *freezepoint; /* composite freezepoint */ struct ata_request *running; /* currently running request */ + struct task conntask; /* PHY events handling task */ }; /* disk bay/enclosure related */ @@ -554,10 +561,12 @@ int ata_detach(device_t dev); int ata_reinit(device_t dev); int ata_suspend(device_t dev); int ata_resume(device_t dev); -int ata_interrupt(void *data); +void ata_interrupt(void *data); int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data); int ata_getparam(struct ata_device *atadev, int init); int ata_identify(device_t dev); +device_t ata_add_child(device_t, int, int); +int ata_delete_child(device_t , device_t); void ata_default_registers(device_t dev); void ata_modify_if_48bit(struct ata_request *request); void ata_udelay(int interval); Modified: projects/jbuild/sys/dev/ata/ata-card.c ============================================================================== --- projects/jbuild/sys/dev/ata/ata-card.c Sat Feb 28 17:54:59 2009 (r189178) +++ projects/jbuild/sys/dev/ata/ata-card.c Sat Feb 28 17:55:32 2009 (r189179) @@ -91,6 +91,10 @@ ata_pccard_attach(device_t dev) struct resource *io, *ctlio; int i, rid, err; + if (ch->attached) + return (0); + ch->attached = 1; + /* allocate the io range to get start and length */ rid = ATA_IOADDR_RID; if (!(io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, @@ -142,6 +146,10 @@ ata_pccard_detach(device_t dev) struct ata_channel *ch = device_get_softc(dev); int i; + if (!ch->attached) + return (0); + ch->attached = 0; + ata_detach(dev); if (ch->r_io[ATA_CONTROL].res != ch->r_io[ATA_DATA].res) bus_release_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, Modified: projects/jbuild/sys/dev/ata/ata-cbus.c ============================================================================== --- projects/jbuild/sys/dev/ata/ata-cbus.c Sat Feb 28 17:54:59 2009 (r189178) +++ projects/jbuild/sys/dev/ata/ata-cbus.c Sat Feb 28 17:55:32 2009 (r189179) @@ -106,7 +106,8 @@ static int ata_cbus_attach(device_t dev) { struct ata_cbus_controller *ctlr = device_get_softc(dev); - int rid; + device_t child; + int rid, unit; /* allocate resources */ rid = ATA_IOADDR_RID; @@ -159,12 +160,16 @@ ata_cbus_attach(device_t dev) ctlr->locked_bank = -1; ctlr->restart_bank = -1; - if (!device_add_child(dev, "ata", 0)) - return ENOMEM; - if (!device_add_child(dev, "ata", 1)) - return ENOMEM; + for (unit = 0; unit < 2; unit++) { + child = device_add_child(dev, "ata", unit); + if (child == NULL) + device_printf(dev, "failed to add ata child device\n"); + else + device_set_ivars(child, (void *)(intptr_t)unit); + } - return bus_generic_attach(dev); + bus_generic_attach(dev); + return (0); } static struct resource * @@ -259,19 +264,26 @@ DRIVER_MODULE(atacbus, isa, ata_cbus_dri static int ata_cbuschannel_probe(device_t dev) { + char buffer[32]; + + sprintf(buffer, "ATA channel %d", (int)(intptr_t)device_get_ivars(dev)); + device_set_desc_copy(dev, buffer); + + return ata_probe(dev); +} + +static int +ata_cbuschannel_attach(device_t dev) +{ struct ata_cbus_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ata_channel *ch = device_get_softc(dev); - device_t *children; - int count, i; + int i; - /* find channel number on this controller */ - device_get_children(device_get_parent(dev), &children, &count); - for (i = 0; i < count; i++) { - if (children[i] == dev) - ch->unit = i; - } - free(children, M_TEMP); + if (ch->attached) + return (0); + ch->attached = 1; + ch->unit = (intptr_t)device_get_ivars(dev); /* setup the resource vectors */ for (i = ATA_DATA; i <= ATA_COMMAND; i ++) { ch->r_io[i].res = ctlr->io; @@ -285,7 +297,20 @@ ata_cbuschannel_probe(device_t dev) /* initialize softc for this channel */ ch->flags |= ATA_USE_16BIT; ata_generic_hw(dev); - return ata_probe(dev); + + return ata_attach(dev); +} + +static int +ata_cbuschannel_detach(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + + if (!ch->attached) + return (0); + ch->attached = 0; + + return ata_detach(dev); } static int @@ -333,8 +358,8 @@ ata_cbuschannel_banking(device_t dev, in static device_method_t ata_cbuschannel_methods[] = { /* device interface */ DEVMETHOD(device_probe, ata_cbuschannel_probe), - DEVMETHOD(device_attach, ata_attach), - DEVMETHOD(device_detach, ata_detach), + DEVMETHOD(device_attach, ata_cbuschannel_attach), + DEVMETHOD(device_detach, ata_cbuschannel_detach), DEVMETHOD(device_suspend, ata_suspend), DEVMETHOD(device_resume, ata_resume), Modified: projects/jbuild/sys/dev/ata/ata-disk.c ============================================================================== --- projects/jbuild/sys/dev/ata/ata-disk.c Sat Feb 28 17:54:59 2009 (r189178) +++ projects/jbuild/sys/dev/ata/ata-disk.c Sat Feb 28 17:55:32 2009 (r189179) @@ -79,6 +79,18 @@ ad_probe(device_t dev) { struct ata_device *atadev = device_get_softc(dev); + if (atadev->type != ATA_T_ATA) + return (ENXIO); + + if (!(atadev->flags & ATA_D_PROBED)) { + atadev->flags |= ATA_D_PROBED; + if (ata_getparam(atadev, 1) == 0) + atadev->flags |= ATA_D_VALID; + } + + if (!(atadev->flags & ATA_D_VALID)) + return (ENXIO); + if (!(atadev->param.config & ATA_PROTO_ATAPI) || (atadev->param.config == ATA_CFA_MAGIC1) || (atadev->param.config == ATA_CFA_MAGIC2) || @@ -182,13 +194,14 @@ ad_detach(device_t dev) return 0; } -static void +static int ad_shutdown(device_t dev) { struct ata_device *atadev = device_get_softc(dev); if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE) ata_controlcmd(dev, ATA_FLUSHCACHE, 0, 0, 0); + return 0; } static int @@ -198,10 +211,9 @@ ad_reinit(device_t dev) struct ata_device *atadev = device_get_softc(dev); /* if detach pending, return error */ - if (((atadev->unit == ATA_MASTER) && !(ch->devices & ATA_ATA_MASTER)) || - ((atadev->unit == ATA_SLAVE) && !(ch->devices & ATA_ATA_SLAVE))) { + if (!(ch->devices & (ATA_ATA_MASTER << atadev->unit))) return 1; - } + ad_init(dev); return 0; } Modified: projects/jbuild/sys/dev/ata/ata-dma.c ============================================================================== --- projects/jbuild/sys/dev/ata/ata-dma.c Sat Feb 28 17:54:59 2009 (r189178) +++ projects/jbuild/sys/dev/ata/ata-dma.c Sat Feb 28 17:55:32 2009 (r189179) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include /* prototypes */ -static void ata_dmafini(device_t dev); static void ata_dmasetupc_cb(void *xsc, bus_dma_segment_t *segs, int nsegs, int error); static void ata_dmaalloc(device_t dev); static void ata_dmafree(device_t dev); Modified: projects/jbuild/sys/dev/ata/ata-isa.c ============================================================================== --- projects/jbuild/sys/dev/ata/ata-isa.c Sat Feb 28 17:54:59 2009 (r189178) +++ projects/jbuild/sys/dev/ata/ata-isa.c Sat Feb 28 17:55:32 2009 (r189179) @@ -60,15 +60,53 @@ static struct isa_pnp_id ata_ids[] = { static int ata_isa_probe(device_t dev) { - struct ata_channel *ch = device_get_softc(dev); struct resource *io = NULL, *ctlio = NULL; u_long tmp; - int i, rid; + int rid; /* check isapnp ids */ if (ISA_PNP_PROBE(device_get_parent(dev), dev, ata_ids) == ENXIO) return ENXIO; - + + /* allocate the io port range */ + rid = ATA_IOADDR_RID; + if (!(io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, + ATA_IOSIZE, RF_ACTIVE))) + return ENXIO; + + /* set the altport range */ + if (bus_get_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, &tmp, &tmp)) { + bus_set_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, + rman_get_start(io) + ATA_CTLOFFSET, ATA_CTLIOSIZE); + } + + /* allocate the altport range */ + rid = ATA_CTLADDR_RID; + if (!(ctlio = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, + ATA_CTLIOSIZE, RF_ACTIVE))) { + bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io); + return ENXIO; + } + + /* Release resources to reallocate on attach. */ + bus_release_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, ctlio); + bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io); + + return (ata_probe(dev)); +} + +static int +ata_isa_attach(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + struct resource *io = NULL, *ctlio = NULL; + u_long tmp; + int i, rid; + + if (ch->attached) + return (0); + ch->attached = 1; + /* allocate the io port range */ rid = ATA_IOADDR_RID; if (!(io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, @@ -103,13 +141,33 @@ ata_isa_probe(device_t dev) ch->unit = 0; ch->flags |= ATA_USE_16BIT; ata_generic_hw(dev); - return ata_probe(dev); + return ata_attach(dev); +} + +static int +ata_isa_detach(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + int error; + + if (!ch->attached) + return (0); + ch->attached = 0; + + error = ata_detach(dev); + + bus_release_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, + ch->r_io[ATA_CONTROL].res); + bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, + ch->r_io[ATA_IDX_ADDR].res); + return (error); } static device_method_t ata_isa_methods[] = { /* device interface */ DEVMETHOD(device_probe, ata_isa_probe), - DEVMETHOD(device_attach, ata_attach), + DEVMETHOD(device_attach, ata_isa_attach), + DEVMETHOD(device_detach, ata_isa_detach), DEVMETHOD(device_suspend, ata_suspend), DEVMETHOD(device_resume, ata_resume), Modified: projects/jbuild/sys/dev/ata/ata-pci.c ============================================================================== --- projects/jbuild/sys/dev/ata/ata-pci.c Sat Feb 28 17:54:59 2009 (r189178) +++ projects/jbuild/sys/dev/ata/ata-pci.c Sat Feb 28 17:55:32 2009 (r189179) @@ -88,6 +88,7 @@ int ata_pci_attach(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); + device_t child; u_int32_t cmd; int unit; @@ -97,8 +98,9 @@ ata_pci_attach(device_t dev) ctlr->channels = 2; else ctlr->channels = 1; - ctlr->allocate = ata_pci_allocate; - ctlr->dmainit = ata_pci_dmainit; + ctlr->ichannels = -1; + ctlr->ch_attach = ata_pci_ch_attach; + ctlr->ch_detach = ata_pci_ch_detach; ctlr->dev = dev; /* if needed try to enable busmastering */ @@ -121,11 +123,15 @@ ata_pci_attach(device_t dev) /* attach all channels on this controller */ for (unit = 0; unit < ctlr->channels; unit++) { - if ((unit == 0 || unit == 1) && ctlr->legacy) { - device_add_child(dev, "ata", unit); + if ((ctlr->ichannels & (1 << unit)) == 0) continue; - } - device_add_child(dev, "ata", devclass_find_free_unit(ata_devclass, 2)); + child = device_add_child(dev, "ata", + ((unit == 0 || unit == 1) && ctlr->legacy) ? + unit : devclass_find_free_unit(ata_devclass, 2)); + if (child == NULL) + device_printf(dev, "failed to add ata child device\n"); + else + device_set_ivars(child, (void *)(intptr_t)unit); } bus_generic_attach(dev); return 0; @@ -147,7 +153,9 @@ ata_pci_detach(device_t dev) if (ctlr->r_irq) { bus_teardown_intr(dev, ctlr->r_irq, ctlr->handle); - bus_release_resource(dev, SYS_RES_IRQ, ATA_IRQ_RID, ctlr->r_irq); + bus_release_resource(dev, SYS_RES_IRQ, ctlr->r_irq_rid, ctlr->r_irq); + if (ctlr->r_irq_rid != ATA_IRQ_RID) + pci_release_msi(dev); } if (ctlr->r_res2) bus_release_resource(dev, ctlr->r_type2, ctlr->r_rid2, ctlr->r_res2); @@ -336,7 +344,7 @@ ata_generic_chipinit(device_t dev) } int -ata_pci_allocate(device_t dev) +ata_pci_ch_attach(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ata_channel *ch = device_get_softc(dev); @@ -353,6 +361,8 @@ ata_pci_allocate(device_t dev) return ENXIO; } + ata_pci_dmainit(dev); + for (i = ATA_DATA; i <= ATA_COMMAND; i ++) { ch->r_io[i].res = io; ch->r_io[i].offset = i; @@ -373,6 +383,21 @@ ata_pci_allocate(device_t dev) } int +ata_pci_ch_detach(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + + ata_pci_dmafini(dev); + + bus_release_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, + ch->r_io[ATA_CONTROL].res); + bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, + ch->r_io[ATA_IDX_ADDR].res); + + return (0); +} + +int ata_pci_status(device_t dev) { struct ata_pci_controller *controller = @@ -468,6 +493,12 @@ ata_pci_dmainit(device_t dev) ch->dma.reset = ata_pci_dmareset; } +void +ata_pci_dmafini(device_t dev) +{ + + ata_dmafini(dev); +} static device_method_t ata_pci_methods[] = { /* device interface */ @@ -504,23 +535,9 @@ MODULE_DEPEND(atapci, ata, 1, 1, 1); static int ata_pcichannel_probe(device_t dev) { - struct ata_channel *ch = device_get_softc(dev); - device_t *children; - int count, i; char buffer[32]; - /* take care of green memory */ - bzero(ch, sizeof(struct ata_channel)); - - /* find channel number on this controller */ - device_get_children(device_get_parent(dev), &children, &count); - for (i = 0; i < count; i++) { - if (children[i] == dev) - ch->unit = i; - } - free(children, M_TEMP); - - sprintf(buffer, "ATA channel %d", ch->unit); + sprintf(buffer, "ATA channel %d", (int)(intptr_t)device_get_ivars(dev)); device_set_desc_copy(dev, buffer); return ata_probe(dev); @@ -530,12 +547,16 @@ static int ata_pcichannel_attach(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); + struct ata_channel *ch = device_get_softc(dev); int error; - if (ctlr->dmainit) - ctlr->dmainit(dev); + if (ch->attached) + return (0); + ch->attached = 1; + + ch->unit = (intptr_t)device_get_ivars(dev); - if ((error = ctlr->allocate(dev))) + if ((error = ctlr->ch_attach(dev))) return error; return ata_attach(dev); @@ -544,17 +565,21 @@ ata_pcichannel_attach(device_t dev) static int ata_pcichannel_detach(device_t dev) { + struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ata_channel *ch = device_get_softc(dev); int error; + if (!ch->attached) + return (0); + ch->attached = 0; + if ((error = ata_detach(dev))) return error; - ch->dma.free(dev); + if (ctlr->ch_detach) + return (ctlr->ch_detach(dev)); - /* XXX SOS free resources for io and ctlio ?? */ - - return 0; + return (0); } static int @@ -658,11 +683,19 @@ int ata_setup_interrupt(device_t dev, void *intr_func) { struct ata_pci_controller *ctlr = device_get_softc(dev); - int rid = ATA_IRQ_RID; + int i, msi = 0; if (!ctlr->legacy) { - if (!(ctlr->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, - RF_SHAREABLE | RF_ACTIVE))) { + if (resource_int_value(device_get_name(dev), + device_get_unit(dev), "msi", &i) == 0 && i != 0) + msi = 1; + if (msi && pci_msi_count(dev) > 0 && pci_alloc_msi(dev, &msi) == 0) { + ctlr->r_irq_rid = 0x1; + } else { + ctlr->r_irq_rid = ATA_IRQ_RID; + } + if (!(ctlr->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &ctlr->r_irq_rid, RF_SHAREABLE | RF_ACTIVE))) { device_printf(dev, "unable to map interrupt\n"); return ENXIO; } Modified: projects/jbuild/sys/dev/ata/ata-pci.h ============================================================================== --- projects/jbuild/sys/dev/ata/ata-pci.h Sat Feb 28 17:54:59 2009 (r189178) +++ projects/jbuild/sys/dev/ata/ata-pci.h Sat Feb 28 17:55:32 2009 (r189179) @@ -45,18 +45,20 @@ struct ata_pci_controller { int r_type2; int r_rid2; struct resource *r_res2; + int r_irq_rid; struct resource *r_irq; void *handle; struct ata_chip_id *chip; int legacy; int channels; + int ichannels; int (*chipinit)(device_t); int (*suspend)(device_t); int (*resume)(device_t); - int (*allocate)(device_t); + int (*ch_attach)(device_t); + int (*ch_detach)(device_t); int (*locking)(device_t, int); void (*reset)(device_t); - void (*dmainit)(device_t); void (*setmode)(device_t, int); struct { void (*function)(void *); @@ -64,15 +66,6 @@ struct ata_pci_controller { } interrupt[8]; /* XXX SOS max ch# for now */ }; -/* structure for SATA connection update hotplug/hotswap support */ -struct ata_connect_task { - struct task task; - device_t dev; - int action; -#define ATA_C_ATTACH 1 -#define ATA_C_DETACH 2 -}; - /* defines for known chipset PCI id's */ #define ATA_ACARD_ID 0x1191 #define ATA_ATP850 0x00021191 @@ -256,8 +249,32 @@ struct ata_connect_task { #define ATA_NFORCE_MCP61_S2 0x03f610de #define ATA_NFORCE_MCP61_S3 0x03f710de #define ATA_NFORCE_MCP65 0x044810de +#define ATA_NFORCE_MCP67_A0 0x055010de +#define ATA_NFORCE_MCP67_A1 0x055110de +#define ATA_NFORCE_MCP67_A2 0x055210de +#define ATA_NFORCE_MCP67_A3 0x055310de +#define ATA_NFORCE_MCP67_A4 0x055410de +#define ATA_NFORCE_MCP67_A5 0x055510de +#define ATA_NFORCE_MCP67_A6 0x055610de +#define ATA_NFORCE_MCP67_A7 0x055710de +#define ATA_NFORCE_MCP67_A8 0x055810de +#define ATA_NFORCE_MCP67_A9 0x055910de +#define ATA_NFORCE_MCP67_AA 0x055A10de +#define ATA_NFORCE_MCP67_AB 0x055B10de #define ATA_NFORCE_MCP67 0x056010de #define ATA_NFORCE_MCP73 0x056c10de +#define ATA_NFORCE_MCP73_A0 0x07f010de +#define ATA_NFORCE_MCP73_A1 0x07f110de +#define ATA_NFORCE_MCP73_A2 0x07f210de +#define ATA_NFORCE_MCP73_A3 0x07f310de +#define ATA_NFORCE_MCP73_A4 0x07f410de +#define ATA_NFORCE_MCP73_A5 0x07f510de +#define ATA_NFORCE_MCP73_A6 0x07f610de +#define ATA_NFORCE_MCP73_A7 0x07f710de +#define ATA_NFORCE_MCP73_A8 0x07f810de +#define ATA_NFORCE_MCP73_A9 0x07f910de +#define ATA_NFORCE_MCP73_AA 0x07fa10de +#define ATA_NFORCE_MCP73_AB 0x07fb10de #define ATA_NFORCE_MCP77 0x075910de #define ATA_PROMISE_ID 0x105a @@ -407,10 +424,12 @@ struct resource * ata_pci_alloc_resource int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep); int ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); -int ata_pci_allocate(device_t dev); +int ata_pci_ch_attach(device_t dev); +int ata_pci_ch_detach(device_t dev); int ata_pci_status(device_t dev); void ata_pci_hw(device_t dev); void ata_pci_dmainit(device_t dev); +void ata_pci_dmafini(device_t dev); char *ata_pcivendor2str(device_t dev); int ata_legacy(device_t); void ata_generic_intr(void *data); @@ -423,7 +442,6 @@ int ata_check_80pin(device_t dev, int mo int ata_mode2idx(int mode); /* global prototypes ata-sata.c */ -void ata_sata_phy_event(void *context, int dummy); void ata_sata_phy_check_events(device_t dev); int ata_sata_phy_reset(device_t dev); void ata_sata_setmode(device_t dev, int mode); @@ -432,14 +450,15 @@ void ata_pm_identify(device_t dev); /* global prototypes from chipsets/ata-*.c */ int ata_ahci_chipinit(device_t); -int ata_ahci_allocate(device_t dev); +int ata_ahci_ch_attach(device_t dev); +int ata_ahci_ch_detach(device_t dev); void ata_ahci_reset(device_t dev); -void ata_ahci_dmainit(device_t dev); int ata_marvell_edma_chipinit(device_t); int ata_sii_chipinit(device_t); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:56:11 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF131106568A; Sat, 28 Feb 2009 17:56:11 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4FAE8FC0A; Sat, 28 Feb 2009 17:56:11 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHuBeC017027; Sat, 28 Feb 2009 17:56:11 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHuBak017020; Sat, 28 Feb 2009 17:56:11 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281756.n1SHuBak017020@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:56:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189180 - projects/jbuild/sys/dev/drm X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:56:12 -0000 Author: jb Date: Sat Feb 28 17:56:11 2009 New Revision: 189180 URL: http://svn.freebsd.org/changeset/base/189180 Log: MFC Added: projects/jbuild/sys/dev/drm/i915_reg.h - copied unchanged from r189173, head/sys/dev/drm/i915_reg.h Modified: projects/jbuild/sys/dev/drm/drmP.h projects/jbuild/sys/dev/drm/drm_bufs.c projects/jbuild/sys/dev/drm/drm_drv.c projects/jbuild/sys/dev/drm/drm_irq.c projects/jbuild/sys/dev/drm/drm_lock.c projects/jbuild/sys/dev/drm/i915_dma.c projects/jbuild/sys/dev/drm/i915_drv.c projects/jbuild/sys/dev/drm/i915_drv.h projects/jbuild/sys/dev/drm/i915_irq.c projects/jbuild/sys/dev/drm/mach64_drv.c projects/jbuild/sys/dev/drm/mach64_drv.h projects/jbuild/sys/dev/drm/mach64_irq.c projects/jbuild/sys/dev/drm/mga_dma.c projects/jbuild/sys/dev/drm/mga_irq.c projects/jbuild/sys/dev/drm/r128_drv.c projects/jbuild/sys/dev/drm/r128_drv.h projects/jbuild/sys/dev/drm/r128_irq.c projects/jbuild/sys/dev/drm/radeon_cp.c projects/jbuild/sys/dev/drm/radeon_irq.c Modified: projects/jbuild/sys/dev/drm/drmP.h ============================================================================== --- projects/jbuild/sys/dev/drm/drmP.h Sat Feb 28 17:55:32 2009 (r189179) +++ projects/jbuild/sys/dev/drm/drmP.h Sat Feb 28 17:56:11 2009 (r189180) @@ -63,7 +63,6 @@ struct drm_file; #include #include #include -#include #include #include #include @@ -294,8 +293,8 @@ for ( ret = 0 ; !ret && !(condition) ; ) DRM_UNLOCK(); \ mtx_lock(&dev->irq_lock); \ if (!(condition)) \ - ret = -mtx_sleep(&(queue), &dev->irq_lock, \ - PZERO | PCATCH, "drmwtq", (timeout)); \ + ret = -mtx_sleep(&(queue), &dev->irq_lock, \ + PCATCH, "drmwtq", (timeout)); \ mtx_unlock(&dev->irq_lock); \ DRM_LOCK(); \ } @@ -320,6 +319,12 @@ typedef struct drm_pci_id_list char *name; } drm_pci_id_list_t; +struct drm_msi_blacklist_entry +{ + int vendor; + int device; +}; + #define DRM_AUTH 0x1 #define DRM_MASTER 0x2 #define DRM_ROOT_ONLY 0x4 @@ -628,7 +633,6 @@ struct drm_device { struct mtx irq_lock; /* protects irq condition checks */ struct mtx dev_lock; /* protects everything else */ DRM_SPINTYPE drw_lock; - DRM_SPINTYPE tsk_lock; /* Usage Counters */ int open_count; /* Outstanding files open */ @@ -657,6 +661,7 @@ struct drm_device { /* Context support */ int irq; /* Interrupt used by board */ int irq_enabled; /* True if the irq handler is enabled */ + int msi_enabled; /* MSI enabled */ int irqrid; /* Interrupt used by board */ struct resource *irqr; /* Resource for interrupt used by board */ void *irqh; /* Handle from bus_setup_intr */ @@ -695,9 +700,6 @@ struct drm_device { struct unrhdr *drw_unrhdr; /* RB tree of drawable infos */ RB_HEAD(drawable_tree, bsd_drm_drawable_info) drw_head; - - struct task locked_task; - void (*locked_task_call)(struct drm_device *dev); }; static __inline__ int drm_core_check_feature(struct drm_device *dev, @@ -792,6 +794,7 @@ void drm_handle_vblank(struct drm_device u32 drm_vblank_count(struct drm_device *dev, int crtc); int drm_vblank_get(struct drm_device *dev, int crtc); void drm_vblank_put(struct drm_device *dev, int crtc); +void drm_vblank_cleanup(struct drm_device *dev); int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq); int drm_vblank_init(struct drm_device *dev, int num_crtcs); void drm_vbl_send_signals(struct drm_device *dev, int crtc); @@ -899,8 +902,8 @@ int drm_addmap_ioctl(struct drm_device * struct drm_file *file_priv); int drm_rmmap_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); -int drm_addbufs_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); +int drm_addbufs(struct drm_device *dev, void *data, + struct drm_file *file_priv); int drm_infobufs(struct drm_device *dev, void *data, struct drm_file *file_priv); int drm_markbufs(struct drm_device *dev, void *data, @@ -918,8 +921,6 @@ int drm_control(struct drm_device *dev, struct drm_file *file_priv); int drm_wait_vblank(struct drm_device *dev, void *data, struct drm_file *file_priv); -void drm_locked_tasklet(struct drm_device *dev, - void (*tasklet)(struct drm_device *dev)); /* AGP/GART support (drm_agpsupport.c) */ int drm_agp_acquire_ioctl(struct drm_device *dev, void *data, Modified: projects/jbuild/sys/dev/drm/drm_bufs.c ============================================================================== --- projects/jbuild/sys/dev/drm/drm_bufs.c Sat Feb 28 17:55:32 2009 (r189179) +++ projects/jbuild/sys/dev/drm/drm_bufs.c Sat Feb 28 17:56:11 2009 (r189180) @@ -880,8 +880,7 @@ int drm_addbufs_pci(struct drm_device *d return ret; } -int drm_addbufs_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv) +int drm_addbufs(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_buf_desc *request = data; int err; Modified: projects/jbuild/sys/dev/drm/drm_drv.c ============================================================================== --- projects/jbuild/sys/dev/drm/drm_drv.c Sat Feb 28 17:55:32 2009 (r189179) +++ projects/jbuild/sys/dev/drm/drm_drv.c Sat Feb 28 17:56:11 2009 (r189180) @@ -82,7 +82,7 @@ static drm_ioctl_desc_t drm_ioctls[25 DRM_IOCTL_DEF(DRM_IOCTL_SET_SAREA_CTX, drm_setsareactx, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), DRM_IOCTL_DEF(DRM_IOCTL_GET_SAREA_CTX, drm_getsareactx, DRM_AUTH), - DRM_IOCTL_DEF(DRM_IOCTL_ADD_CTX, drm_addctx, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), + DRM_IOCTL_DEF(DRM_IOCTL_ADD_CTX, drm_addctx, DRM_AUTH|DRM_ROOT_ONLY), DRM_IOCTL_DEF(DRM_IOCTL_RM_CTX, drm_rmctx, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), DRM_IOCTL_DEF(DRM_IOCTL_MOD_CTX, drm_modctx, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), DRM_IOCTL_DEF(DRM_IOCTL_GET_CTX, drm_getctx, DRM_AUTH), @@ -95,10 +95,11 @@ static drm_ioctl_desc_t drm_ioctls[25 DRM_IOCTL_DEF(DRM_IOCTL_LOCK, drm_lock, DRM_AUTH), DRM_IOCTL_DEF(DRM_IOCTL_UNLOCK, drm_unlock, DRM_AUTH), + DRM_IOCTL_DEF(DRM_IOCTL_FINISH, drm_noop, DRM_AUTH), - DRM_IOCTL_DEF(DRM_IOCTL_ADD_BUFS, drm_addbufs_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), - DRM_IOCTL_DEF(DRM_IOCTL_MARK_BUFS, drm_markbufs, DRM_AUTH|DRM_MASTER), + DRM_IOCTL_DEF(DRM_IOCTL_ADD_BUFS, drm_addbufs, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), + DRM_IOCTL_DEF(DRM_IOCTL_MARK_BUFS, drm_markbufs, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), DRM_IOCTL_DEF(DRM_IOCTL_INFO_BUFS, drm_infobufs, DRM_AUTH), DRM_IOCTL_DEF(DRM_IOCTL_MAP_BUFS, drm_mapbufs, DRM_AUTH), DRM_IOCTL_DEF(DRM_IOCTL_FREE_BUFS, drm_freebufs, DRM_AUTH), @@ -117,7 +118,6 @@ static drm_ioctl_desc_t drm_ioctls[25 DRM_IOCTL_DEF(DRM_IOCTL_SG_ALLOC, drm_sg_alloc_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), DRM_IOCTL_DEF(DRM_IOCTL_SG_FREE, drm_sg_free, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), - DRM_IOCTL_DEF(DRM_IOCTL_WAIT_VBLANK, drm_wait_vblank, 0), DRM_IOCTL_DEF(DRM_IOCTL_MODESET_CTL, drm_modeset_ctl, 0), DRM_IOCTL_DEF(DRM_IOCTL_UPDATE_DRAW, drm_update_draw, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), @@ -131,9 +131,33 @@ static struct cdevsw drm_cdevsw = { .d_poll = drm_poll, .d_mmap = drm_mmap, .d_name = "drm", - .d_flags = D_TRACKCLOSE | D_NEEDGIANT + .d_flags = D_TRACKCLOSE }; +int drm_msi = 1; /* Enable by default. */ +TUNABLE_INT("hw.drm.msi", &drm_msi); + +static struct drm_msi_blacklist_entry drm_msi_blacklist[] = { + {0x8086, 0x2772}, /* Intel i945G */ \ + {0x8086, 0x27A2}, /* Intel i945GM */ \ + {0x8086, 0x27AE}, /* Intel i945GME */ \ + {0, 0} +}; + +static int drm_msi_is_blacklisted(int vendor, int device) +{ + int i = 0; + + for (i = 0; drm_msi_blacklist[i].vendor != 0; i++) { + if ((drm_msi_blacklist[i].vendor == vendor) && + (drm_msi_blacklist[i].device == device)) { + return 1; + } + } + + return 0; +} + int drm_probe(device_t dev, drm_pci_id_list_t *idlist) { drm_pci_id_list_t *id_entry; @@ -169,7 +193,7 @@ int drm_attach(device_t nbdev, drm_pci_i { struct drm_device *dev; drm_pci_id_list_t *id_entry; - int unit; + int unit, msicount; unit = device_get_unit(nbdev); dev = device_get_softc(nbdev); @@ -189,22 +213,67 @@ int drm_attach(device_t nbdev, drm_pci_i DRM_DEV_MODE, "dri/card%d", unit); +#if __FreeBSD_version >= 700053 + dev->pci_domain = pci_get_domain(dev->device); +#else + dev->pci_domain = 0; +#endif + dev->pci_bus = pci_get_bus(dev->device); + dev->pci_slot = pci_get_slot(dev->device); + dev->pci_func = pci_get_function(dev->device); + + dev->pci_vendor = pci_get_vendor(dev->device); + dev->pci_device = pci_get_device(dev->device); + + if (drm_msi && + !drm_msi_is_blacklisted(dev->pci_vendor, dev->pci_device)) { + msicount = pci_msi_count(dev->device); + DRM_DEBUG("MSI count = %d\n", msicount); + if (msicount > 1) + msicount = 1; + + if (pci_alloc_msi(dev->device, &msicount) == 0) { + DRM_INFO("MSI enabled %d message(s)\n", msicount); + dev->msi_enabled = 1; + dev->irqrid = 1; + } + } + + dev->irqr = bus_alloc_resource_any(dev->device, SYS_RES_IRQ, + &dev->irqrid, RF_SHAREABLE); + if (!dev->irqr) { + return ENOENT; + } + + dev->irq = (int) rman_get_start(dev->irqr); + mtx_init(&dev->dev_lock, "drmdev", NULL, MTX_DEF); mtx_init(&dev->irq_lock, "drmirq", NULL, MTX_DEF); mtx_init(&dev->vbl_lock, "drmvbl", NULL, MTX_DEF); mtx_init(&dev->drw_lock, "drmdrw", NULL, MTX_DEF); - mtx_init(&dev->tsk_lock, "drmtsk", NULL, MTX_DEF); - id_entry = drm_find_description(pci_get_vendor(dev->device), - pci_get_device(dev->device), idlist); + id_entry = drm_find_description(dev->pci_vendor, + dev->pci_device, idlist); dev->id_entry = id_entry; return drm_load(dev); } -int drm_detach(device_t dev) +int drm_detach(device_t nbdev) { - drm_unload(device_get_softc(dev)); + struct drm_device *dev; + + dev = device_get_softc(nbdev); + + drm_unload(dev); + + bus_release_resource(dev->device, SYS_RES_IRQ, dev->irqrid, dev->irqr); + + if (dev->msi_enabled) { + pci_release_msi(dev->device); + DRM_INFO("MSI released\n"); + } + return 0; } @@ -353,19 +422,6 @@ static int drm_load(struct drm_device *d DRM_DEBUG("\n"); - dev->irq = pci_get_irq(dev->device); -#if __FreeBSD_version >= 700053 - dev->pci_domain = pci_get_domain(dev->device); -#else - dev->pci_domain = 0; -#endif - dev->pci_bus = pci_get_bus(dev->device); - dev->pci_slot = pci_get_slot(dev->device); - dev->pci_func = pci_get_function(dev->device); - - dev->pci_vendor = pci_get_vendor(dev->device); - dev->pci_device = pci_get_device(dev->device); - TAILQ_INIT(&dev->maplist); drm_mem_init(); @@ -440,7 +496,6 @@ error: DRM_UNLOCK(); destroy_dev(dev->devnode); - mtx_destroy(&dev->tsk_lock); mtx_destroy(&dev->drw_lock); mtx_destroy(&dev->vbl_lock); mtx_destroy(&dev->irq_lock); @@ -468,6 +523,8 @@ static void drm_unload(struct drm_device DRM_DEBUG("mtrr_del = %d", retcode); } + drm_vblank_cleanup(dev); + DRM_LOCK(); drm_lastclose(dev); DRM_UNLOCK(); @@ -503,14 +560,12 @@ static void drm_unload(struct drm_device if (pci_disable_busmaster(dev->device)) DRM_ERROR("Request to disable bus-master failed.\n"); - mtx_destroy(&dev->tsk_lock); mtx_destroy(&dev->drw_lock); mtx_destroy(&dev->vbl_lock); mtx_destroy(&dev->irq_lock); mtx_destroy(&dev->dev_lock); } - int drm_version(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_version *version = data; @@ -658,9 +713,7 @@ int drm_ioctl(struct cdev *kdev, u_long int is_driver_ioctl = 0; struct drm_file *file_priv; - DRM_LOCK(); retcode = devfs_get_cdevpriv((void **)&file_priv); - DRM_UNLOCK(); if (retcode != 0) { DRM_ERROR("can't find authenticator\n"); return EINVAL; Modified: projects/jbuild/sys/dev/drm/drm_irq.c ============================================================================== --- projects/jbuild/sys/dev/drm/drm_irq.c Sat Feb 28 17:55:32 2009 (r189179) +++ projects/jbuild/sys/dev/drm/drm_irq.c Sat Feb 28 17:56:11 2009 (r189180) @@ -36,8 +36,6 @@ __FBSDID("$FreeBSD$"); #include "dev/drm/drmP.h" #include "dev/drm/drm.h" -static void drm_locked_task(void *context, int pending __unused); - int drm_irq_by_busid(struct drm_device *dev, void *data, struct drm_file *file_priv) { @@ -98,7 +96,7 @@ static void vblank_disable_fn(void *arg) } } -static void drm_vblank_cleanup(struct drm_device *dev) +void drm_vblank_cleanup(struct drm_device *dev) { unsigned long irqflags; @@ -174,13 +172,6 @@ int drm_irq_install(struct drm_device *d DRM_UNLOCK(); /* Install handler */ - dev->irqrid = 0; - dev->irqr = bus_alloc_resource_any(dev->device, SYS_RES_IRQ, - &dev->irqrid, RF_SHAREABLE); - if (!dev->irqr) { - retcode = ENOENT; - goto err; - } #if __FreeBSD_version >= 700031 retcode = bus_setup_intr(dev->device, dev->irqr, INTR_TYPE_TTY | INTR_MPSAFE, @@ -198,30 +189,21 @@ int drm_irq_install(struct drm_device *d dev->driver->irq_postinstall(dev); DRM_UNLOCK(); - TASK_INIT(&dev->locked_task, 0, drm_locked_task, dev); return 0; err: DRM_LOCK(); dev->irq_enabled = 0; - if (dev->irqrid != 0) { - bus_release_resource(dev->device, SYS_RES_IRQ, dev->irqrid, - dev->irqr); - dev->irqrid = 0; - } DRM_UNLOCK(); + return retcode; } int drm_irq_uninstall(struct drm_device *dev) { - int irqrid; - if (!dev->irq_enabled) return EINVAL; dev->irq_enabled = 0; - irqrid = dev->irqrid; - dev->irqrid = 0; DRM_DEBUG("irq=%d\n", dev->irq); @@ -229,11 +211,8 @@ int drm_irq_uninstall(struct drm_device DRM_UNLOCK(); bus_teardown_intr(dev->device, dev->irqr, dev->irqh); - bus_release_resource(dev->device, SYS_RES_IRQ, irqrid, dev->irqr); DRM_LOCK(); - drm_vblank_cleanup(dev); - return 0; } @@ -304,6 +283,7 @@ int drm_vblank_get(struct drm_device *de DRM_SPINLOCK_IRQSAVE(&dev->vbl_lock, irqflags); /* Going from 0->1 means we have to enable interrupts again */ atomic_add_acq_int(&dev->vblank[crtc].refcount, 1); + DRM_DEBUG("vblank refcount = %d\n", dev->vblank[crtc].refcount); if (dev->vblank[crtc].refcount == 1 && !dev->vblank[crtc].enabled) { ret = dev->driver->enable_vblank(dev, crtc); @@ -326,6 +306,7 @@ void drm_vblank_put(struct drm_device *d DRM_SPINLOCK_IRQSAVE(&dev->vbl_lock, irqflags); /* Last user schedules interrupt disable */ atomic_subtract_acq_int(&dev->vblank[crtc].refcount, 1); + DRM_DEBUG("vblank refcount = %d\n", dev->vblank[crtc].refcount); if (dev->vblank[crtc].refcount == 0) callout_reset(&dev->vblank_disable_timer, 5 * DRM_HZ, (timeout_t *)vblank_disable_fn, (void *)dev); @@ -388,8 +369,8 @@ out: int drm_wait_vblank(struct drm_device *dev, void *data, struct drm_file *file_priv) { union drm_wait_vblank *vblwait = data; + unsigned int flags, seq, crtc; int ret = 0; - int flags, seq, crtc; if (!dev->irq_enabled) return EINVAL; @@ -409,8 +390,10 @@ int drm_wait_vblank(struct drm_device *d return EINVAL; ret = drm_vblank_get(dev, crtc); - if (ret) + if (ret) { + DRM_ERROR("failed to acquire vblank counter, %d\n", ret); return ret; + } seq = drm_vblank_count(dev, crtc); switch (vblwait->request.type & _DRM_VBLANK_TYPES_MASK) { @@ -449,14 +432,20 @@ int drm_wait_vblank(struct drm_device *d #endif ret = EINVAL; } else { - DRM_LOCK(); - /* shared code returns -errno */ - - DRM_WAIT_ON(ret, dev->vblank[crtc].queue, 3 * DRM_HZ, - ((drm_vblank_count(dev, crtc) - - vblwait->request.sequence) <= (1 << 23))); - DRM_UNLOCK(); + DRM_DEBUG("waiting on vblank count %d, crtc %d\n", + vblwait->request.sequence, crtc); + for ( ret = 0 ; !ret && !((drm_vblank_count(dev, crtc) - + vblwait->request.sequence) <= (1 << 23)) ; ) { + mtx_lock(&dev->irq_lock); + if (!((drm_vblank_count(dev, crtc) - + vblwait->request.sequence) <= (1 << 23))) + ret = mtx_sleep(&dev->vblank[crtc].queue, + &dev->irq_lock, PCATCH, "vblwtq", + 3 * DRM_HZ); + mtx_unlock(&dev->irq_lock); + } + DRM_DEBUG("return = %d\n", ret); if (ret != EINTR) { struct timeval now; @@ -464,6 +453,10 @@ int drm_wait_vblank(struct drm_device *d vblwait->reply.tval_sec = now.tv_sec; vblwait->reply.tval_usec = now.tv_usec; vblwait->reply.sequence = drm_vblank_count(dev, crtc); + DRM_DEBUG("returning %d to client\n", + vblwait->reply.sequence); + } else { + DRM_DEBUG("vblank wait interrupted by signal\n"); } } @@ -507,46 +500,3 @@ void drm_handle_vblank(struct drm_device drm_vbl_send_signals(dev, crtc); } -static void drm_locked_task(void *context, int pending __unused) -{ - struct drm_device *dev = context; - - DRM_SPINLOCK(&dev->tsk_lock); - - DRM_LOCK(); /* XXX drm_lock_take() should do it's own locking */ - if (dev->locked_task_call == NULL || - drm_lock_take(&dev->lock, DRM_KERNEL_CONTEXT) == 0) { - DRM_UNLOCK(); - DRM_SPINUNLOCK(&dev->tsk_lock); - return; - } - - dev->lock.file_priv = NULL; /* kernel owned */ - dev->lock.lock_time = jiffies; - atomic_inc(&dev->counts[_DRM_STAT_LOCKS]); - - DRM_UNLOCK(); - - dev->locked_task_call(dev); - - drm_lock_free(&dev->lock, DRM_KERNEL_CONTEXT); - - dev->locked_task_call = NULL; - - DRM_SPINUNLOCK(&dev->tsk_lock); -} - -void -drm_locked_tasklet(struct drm_device *dev, - void (*tasklet)(struct drm_device *dev)) -{ - DRM_SPINLOCK(&dev->tsk_lock); - if (dev->locked_task_call != NULL) { - DRM_SPINUNLOCK(&dev->tsk_lock); - return; - } - - dev->locked_task_call = tasklet; - DRM_SPINUNLOCK(&dev->tsk_lock); - taskqueue_enqueue(taskqueue_swi, &dev->locked_task); -} Modified: projects/jbuild/sys/dev/drm/drm_lock.c ============================================================================== --- projects/jbuild/sys/dev/drm/drm_lock.c Sat Feb 28 17:55:32 2009 (r189179) +++ projects/jbuild/sys/dev/drm/drm_lock.c Sat Feb 28 17:56:11 2009 (r189180) @@ -115,13 +115,6 @@ int drm_unlock(struct drm_device *dev, v return EINVAL; } - DRM_SPINLOCK(&dev->tsk_lock); - if (dev->locked_task_call != NULL) { - dev->locked_task_call(dev); - dev->locked_task_call = NULL; - } - DRM_SPINUNLOCK(&dev->tsk_lock); - atomic_inc(&dev->counts[_DRM_STAT_UNLOCKS]); DRM_LOCK(); Modified: projects/jbuild/sys/dev/drm/i915_dma.c ============================================================================== --- projects/jbuild/sys/dev/drm/i915_dma.c Sat Feb 28 17:55:32 2009 (r189179) +++ projects/jbuild/sys/dev/drm/i915_dma.c Sat Feb 28 17:56:11 2009 (r189180) @@ -58,6 +58,9 @@ int i915_wait_ring(struct drm_device * d if (ring->space >= n) return 0; + if (dev_priv->sarea_priv) + dev_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT; + if (ring->head != last_head) i = 0; @@ -72,77 +75,53 @@ int i915_wait_ring(struct drm_device * d return -EBUSY; } -int i915_init_hardware_status(struct drm_device *dev) +/** + * Sets up the hardware status page for devices that need a physical address + * in the register. + */ +static int i915_init_phys_hws(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; - drm_dma_handle_t *dmah; /* Program Hardware Status Page */ -#ifdef __FreeBSD__ DRM_UNLOCK(); -#endif - dmah = drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE, 0xffffffff); -#ifdef __FreeBSD__ + dev_priv->status_page_dmah = + drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE, 0xffffffff); DRM_LOCK(); -#endif - if (!dmah) { + if (!dev_priv->status_page_dmah) { DRM_ERROR("Can not allocate hardware status page\n"); return -ENOMEM; } - - dev_priv->status_page_dmah = dmah; - dev_priv->hw_status_page = dmah->vaddr; - dev_priv->dma_status_page = dmah->busaddr; + dev_priv->hw_status_page = dev_priv->status_page_dmah->vaddr; + dev_priv->dma_status_page = dev_priv->status_page_dmah->busaddr; memset(dev_priv->hw_status_page, 0, PAGE_SIZE); - I915_WRITE(0x02080, dev_priv->dma_status_page); + I915_WRITE(HWS_PGA, dev_priv->dma_status_page); DRM_DEBUG("Enabled hardware status page\n"); return 0; } -void i915_free_hardware_status(struct drm_device *dev) +/** + * Frees the hardware status page, whether it's a physical address or a virtual + * address set up by the X Server. + */ +static void i915_free_hws(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; if (dev_priv->status_page_dmah) { drm_pci_free(dev, dev_priv->status_page_dmah); dev_priv->status_page_dmah = NULL; - /* Need to rewrite hardware status page */ - I915_WRITE(0x02080, 0x1ffff000); } if (dev_priv->status_gfx_addr) { dev_priv->status_gfx_addr = 0; drm_core_ioremapfree(&dev_priv->hws_map, dev); - I915_WRITE(0x02080, 0x1ffff000); } -} -#if I915_RING_VALIDATE -/** - * Validate the cached ring tail value - * - * If the X server writes to the ring and DRM doesn't - * reload the head and tail pointers, it will end up writing - * data to the wrong place in the ring, causing havoc. - */ -void i915_ring_validate(struct drm_device *dev, const char *func, int line) -{ - drm_i915_private_t *dev_priv = dev->dev_private; - drm_i915_ring_buffer_t *ring = &(dev_priv->ring); - u32 tail = I915_READ(PRB0_TAIL) & HEAD_ADDR; - u32 head = I915_READ(PRB0_HEAD) & HEAD_ADDR; - - if (tail != ring->tail) { - DRM_ERROR("%s:%d head sw %x, hw %x. tail sw %x hw %x\n", - func, line, - ring->head, head, ring->tail, tail); -#ifdef __linux__ - BUG_ON(1); -#endif - } + /* Need to rewrite hardware status page */ + I915_WRITE(HWS_PGA, 0x1ffff000); } -#endif void i915_kernel_lost_context(struct drm_device * dev) { @@ -154,6 +133,9 @@ void i915_kernel_lost_context(struct drm ring->space = ring->head - (ring->tail + 8); if (ring->space < 0) ring->space += ring->Size; + + if (ring->head == ring->tail && dev_priv->sarea_priv) + dev_priv->sarea_priv->perf_boxes |= I915_BOX_RING_EMPTY; } static int i915_dma_cleanup(struct drm_device * dev) @@ -168,86 +150,22 @@ static int i915_dma_cleanup(struct drm_d if (dev_priv->ring.virtual_start) { drm_core_ioremapfree(&dev_priv->ring.map, dev); - dev_priv->ring.virtual_start = 0; - dev_priv->ring.map.handle = 0; + dev_priv->ring.virtual_start = NULL; + dev_priv->ring.map.handle = NULL; dev_priv->ring.map.size = 0; } + /* Clear the HWS virtual address at teardown */ if (I915_NEED_GFX_HWS(dev)) - i915_free_hardware_status(dev); + i915_free_hws(dev); return 0; } -#if defined(I915_HAVE_BUFFER) -#define DRI2_SAREA_BLOCK_TYPE(b) ((b) >> 16) -#define DRI2_SAREA_BLOCK_SIZE(b) ((b) & 0xffff) -#define DRI2_SAREA_BLOCK_NEXT(p) \ - ((void *) ((unsigned char *) (p) + \ - DRI2_SAREA_BLOCK_SIZE(*(unsigned int *) p))) - -#define DRI2_SAREA_BLOCK_END 0x0000 -#define DRI2_SAREA_BLOCK_LOCK 0x0001 -#define DRI2_SAREA_BLOCK_EVENT_BUFFER 0x0002 - -static int -setup_dri2_sarea(struct drm_device * dev, - struct drm_file *file_priv, - drm_i915_init_t * init) +static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init) { drm_i915_private_t *dev_priv = dev->dev_private; - int ret; - unsigned int *p, *end, *next; - - mutex_lock(&dev->struct_mutex); - dev_priv->sarea_bo = - drm_lookup_buffer_object(file_priv, - init->sarea_handle, 1); - mutex_unlock(&dev->struct_mutex); - - if (!dev_priv->sarea_bo) { - DRM_ERROR("did not find sarea bo\n"); - return -EINVAL; - } - - ret = drm_bo_kmap(dev_priv->sarea_bo, 0, - dev_priv->sarea_bo->num_pages, - &dev_priv->sarea_kmap); - if (ret) { - DRM_ERROR("could not map sarea bo\n"); - return ret; - } - p = dev_priv->sarea_kmap.virtual; - end = (void *) p + (dev_priv->sarea_bo->num_pages << PAGE_SHIFT); - while (p < end && DRI2_SAREA_BLOCK_TYPE(*p) != DRI2_SAREA_BLOCK_END) { - switch (DRI2_SAREA_BLOCK_TYPE(*p)) { - case DRI2_SAREA_BLOCK_LOCK: - dev->lock.hw_lock = (void *) (p + 1); - dev->sigdata.lock = dev->lock.hw_lock; - break; - } - next = DRI2_SAREA_BLOCK_NEXT(p); - if (next <= p || end < next) { - DRM_ERROR("malformed dri2 sarea: next is %p should be within %p-%p\n", - next, p, end); - return -EINVAL; - } - p = next; - } - - return 0; -} -#endif - -static int i915_initialize(struct drm_device * dev, - struct drm_file *file_priv, - drm_i915_init_t * init) -{ - drm_i915_private_t *dev_priv = dev->dev_private; -#if defined(I915_HAVE_BUFFER) - int ret; -#endif dev_priv->sarea = drm_getsarea(dev); if (!dev_priv->sarea) { DRM_ERROR("can not find sarea!\n"); @@ -255,20 +173,17 @@ static int i915_initialize(struct drm_de return -EINVAL; } -#ifdef I915_HAVE_BUFFER - dev_priv->max_validate_buffers = I915_MAX_VALIDATE_BUFFERS; -#endif - - if (init->sarea_priv_offset) - dev_priv->sarea_priv = (drm_i915_sarea_t *) - ((u8 *) dev_priv->sarea->handle + - init->sarea_priv_offset); - else { - /* No sarea_priv for you! */ - dev_priv->sarea_priv = NULL; - } + dev_priv->sarea_priv = (drm_i915_sarea_t *) + ((u8 *) dev_priv->sarea->handle + init->sarea_priv_offset); if (init->ring_size != 0) { + if (dev_priv->ring.ring_obj != NULL) { + i915_dma_cleanup(dev); + DRM_ERROR("Client tried to initialize ringbuffer in " + "GEM mode\n"); + return -EINVAL; + } + dev_priv->ring.Size = init->ring_size; dev_priv->ring.tail_mask = dev_priv->ring.Size - 1; @@ -286,41 +201,20 @@ static int i915_initialize(struct drm_de " ring buffer\n"); return -ENOMEM; } - - dev_priv->ring.virtual_start = dev_priv->ring.map.handle; } - dev_priv->cpp = init->cpp; - - if (dev_priv->sarea_priv) - dev_priv->sarea_priv->pf_current_page = 0; + dev_priv->ring.virtual_start = dev_priv->ring.map.handle; - /* We are using separate values as placeholders for mechanisms for - * private backbuffer/depthbuffer usage. - */ + dev_priv->cpp = init->cpp; + dev_priv->back_offset = init->back_offset; + dev_priv->front_offset = init->front_offset; + dev_priv->current_page = 0; + dev_priv->sarea_priv->pf_current_page = dev_priv->current_page; /* Allow hardware batchbuffers unless told otherwise. */ dev_priv->allow_batchbuffer = 1; - /* Enable vblank on pipe A for older X servers - */ - dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A; - -#ifdef I915_HAVE_BUFFER - mutex_init(&dev_priv->cmdbuf_mutex); -#endif -#if defined(I915_HAVE_BUFFER) - if (init->func == I915_INIT_DMA2) { - ret = setup_dri2_sarea(dev, file_priv, init); - if (ret) { - i915_dma_cleanup(dev); - DRM_ERROR("could not set up dri2 sarea\n"); - return ret; - } - } -#endif - return 0; } @@ -349,9 +243,9 @@ static int i915_dma_resume(struct drm_de DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page); if (dev_priv->status_gfx_addr != 0) - I915_WRITE(0x02080, dev_priv->status_gfx_addr); + I915_WRITE(HWS_PGA, dev_priv->status_gfx_addr); else - I915_WRITE(0x02080, dev_priv->dma_status_page); + I915_WRITE(HWS_PGA, dev_priv->dma_status_page); DRM_DEBUG("Enabled hardware status page\n"); return 0; @@ -365,8 +259,7 @@ static int i915_dma_init(struct drm_devi switch (init->func) { case I915_INIT_DMA: - case I915_INIT_DMA2: - retcode = i915_initialize(dev, file_priv, init); + retcode = i915_initialize(dev, init); break; case I915_CLEANUP_DMA: retcode = i915_dma_cleanup(dev); @@ -541,55 +434,28 @@ int i915_emit_box(struct drm_device * de * emit. For now, do it in both places: */ -void i915_emit_breadcrumb(struct drm_device *dev) +static void i915_emit_breadcrumb(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; RING_LOCALS; - if (++dev_priv->counter > BREADCRUMB_MASK) { - dev_priv->counter = 1; - DRM_DEBUG("Breadcrumb counter wrapped around\n"); - } - + dev_priv->counter++; + if (dev_priv->counter > 0x7FFFFFFFUL) + dev_priv->counter = 0; if (dev_priv->sarea_priv) dev_priv->sarea_priv->last_enqueue = dev_priv->counter; BEGIN_LP_RING(4); OUT_RING(MI_STORE_DWORD_INDEX); - OUT_RING(5 << MI_STORE_DWORD_INDEX_SHIFT); + OUT_RING(I915_BREADCRUMB_INDEX << MI_STORE_DWORD_INDEX_SHIFT); OUT_RING(dev_priv->counter); OUT_RING(0); ADVANCE_LP_RING(); } - -int i915_emit_mi_flush(struct drm_device *dev, uint32_t flush) -{ - drm_i915_private_t *dev_priv = dev->dev_private; - uint32_t flush_cmd = MI_FLUSH; - RING_LOCALS; - - flush_cmd |= flush; - - i915_kernel_lost_context(dev); - - BEGIN_LP_RING(4); - OUT_RING(flush_cmd); - OUT_RING(0); - OUT_RING(0); - OUT_RING(0); - ADVANCE_LP_RING(); - - return 0; -} - - static int i915_dispatch_cmdbuffer(struct drm_device * dev, drm_i915_cmdbuffer_t * cmd) { -#ifdef I915_HAVE_FENCE - drm_i915_private_t *dev_priv = dev->dev_private; -#endif int nbox = cmd->num_cliprects; int i = 0, count, ret; @@ -616,15 +482,11 @@ static int i915_dispatch_cmdbuffer(struc } i915_emit_breadcrumb(dev); -#ifdef I915_HAVE_FENCE - if (unlikely((dev_priv->counter & 0xFF) == 0)) - drm_fence_flush_old(dev, 0, dev_priv->counter); -#endif return 0; } -int i915_dispatch_batchbuffer(struct drm_device * dev, - drm_i915_batchbuffer_t * batch) +static int i915_dispatch_batchbuffer(struct drm_device * dev, + drm_i915_batchbuffer_t * batch) { drm_i915_private_t *dev_priv = dev->dev_private; struct drm_clip_rect __user *boxes = batch->cliprects; @@ -649,14 +511,7 @@ int i915_dispatch_batchbuffer(struct drm return ret; } - if (IS_I830(dev) || IS_845G(dev)) { - BEGIN_LP_RING(4); - OUT_RING(MI_BATCH_BUFFER); - OUT_RING(batch->start | MI_BATCH_NON_SECURE); - OUT_RING(batch->start + batch->used - 4); - OUT_RING(0); - ADVANCE_LP_RING(); - } else { + if (!IS_I830(dev) && !IS_845G(dev)) { BEGIN_LP_RING(2); if (IS_I965G(dev)) { OUT_RING(MI_BATCH_BUFFER_START | (2 << 6) | MI_BATCH_NON_SECURE_I965); @@ -666,115 +521,90 @@ int i915_dispatch_batchbuffer(struct drm OUT_RING(batch->start | MI_BATCH_NON_SECURE); } ADVANCE_LP_RING(); + } else { + BEGIN_LP_RING(4); + OUT_RING(MI_BATCH_BUFFER); + OUT_RING(batch->start | MI_BATCH_NON_SECURE); + OUT_RING(batch->start + batch->used - 4); + OUT_RING(0); + ADVANCE_LP_RING(); } } i915_emit_breadcrumb(dev); -#ifdef I915_HAVE_FENCE - if (unlikely((dev_priv->counter & 0xFF) == 0)) - drm_fence_flush_old(dev, 0, dev_priv->counter); -#endif + return 0; } -static void i915_do_dispatch_flip(struct drm_device * dev, int plane, int sync) +static int i915_dispatch_flip(struct drm_device * dev) { drm_i915_private_t *dev_priv = dev->dev_private; - u32 num_pages, current_page, next_page, dspbase; - int shift = 2 * plane, x, y; RING_LOCALS; - /* Calculate display base offset */ - num_pages = dev_priv->sarea_priv->third_handle ? 3 : 2; - current_page = (dev_priv->sarea_priv->pf_current_page >> shift) & 0x3; - next_page = (current_page + 1) % num_pages; + if (!dev_priv->sarea_priv) + return -EINVAL; - switch (next_page) { - default: - case 0: - dspbase = dev_priv->sarea_priv->front_offset; - break; - case 1: - dspbase = dev_priv->sarea_priv->back_offset; - break; - case 2: - dspbase = dev_priv->sarea_priv->third_offset; - break; - } + DRM_DEBUG("%s: page=%d pfCurrentPage=%d\n", + __func__, + dev_priv->current_page, + dev_priv->sarea_priv->pf_current_page); + + i915_kernel_lost_context(dev); - if (plane == 0) { - x = dev_priv->sarea_priv->planeA_x; - y = dev_priv->sarea_priv->planeA_y; + BEGIN_LP_RING(2); + OUT_RING(MI_FLUSH | MI_READ_FLUSH); + OUT_RING(0); + ADVANCE_LP_RING(); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:56:26 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41A7C1065674; Sat, 28 Feb 2009 17:56:26 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2ED8C8FC1A; Sat, 28 Feb 2009 17:56:26 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHuQbT017072; Sat, 28 Feb 2009 17:56:26 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHuQQL017067; Sat, 28 Feb 2009 17:56:26 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281756.n1SHuQQL017067@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189181 - projects/jbuild/sys/dev/ppbus X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:56:26 -0000 Author: jb Date: Sat Feb 28 17:56:25 2009 New Revision: 189181 URL: http://svn.freebsd.org/changeset/base/189181 Log: MFC Modified: projects/jbuild/sys/dev/ppbus/if_plip.c projects/jbuild/sys/dev/ppbus/immio.c projects/jbuild/sys/dev/ppbus/lpbb.c projects/jbuild/sys/dev/ppbus/lpt.c projects/jbuild/sys/dev/ppbus/pcfclock.c projects/jbuild/sys/dev/ppbus/ppb_1284.c projects/jbuild/sys/dev/ppbus/ppb_base.c projects/jbuild/sys/dev/ppbus/ppb_msq.c projects/jbuild/sys/dev/ppbus/ppbconf.c projects/jbuild/sys/dev/ppbus/ppbconf.h projects/jbuild/sys/dev/ppbus/ppi.c projects/jbuild/sys/dev/ppbus/pps.c projects/jbuild/sys/dev/ppbus/vpo.c projects/jbuild/sys/dev/ppbus/vpoio.c Modified: projects/jbuild/sys/dev/ppbus/if_plip.c ============================================================================== --- projects/jbuild/sys/dev/ppbus/if_plip.c Sat Feb 28 17:56:11 2009 (r189180) +++ projects/jbuild/sys/dev/ppbus/if_plip.c Sat Feb 28 17:56:25 2009 (r189181) @@ -152,8 +152,12 @@ struct lp_data { int sc_iferrs; struct resource *res_irq; + void *sc_intr_cookie; }; +static struct mtx lp_tables_lock; +MTX_SYSINIT(lp_tables, &lp_tables_lock, "plip tables", MTX_DEF); + /* Tables for the lp# interface */ static u_char *txmith; #define txmitl (txmith + (1 * LPIPTBLSIZE)) @@ -170,13 +174,41 @@ static int lpinittables(void); static int lpioctl(struct ifnet *, u_long, caddr_t); static int lpoutput(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); +static void lpstop(struct lp_data *); static void lp_intr(void *); +static int lp_module_handler(module_t, int, void *); #define DEVTOSOFTC(dev) \ ((struct lp_data *)device_get_softc(dev)) static devclass_t lp_devclass; +static int +lp_module_handler(module_t mod, int what, void *arg) +{ + + switch (what) { + case MOD_UNLOAD: + mtx_lock(&lp_tables_lock); + if (txmith != NULL) { + free(txmith, M_DEVBUF); + txmith = NULL; + } + if (ctxmith != NULL) { + free(ctxmith, M_DEVBUF); + ctxmith = NULL; + } + mtx_unlock(&lp_tables_lock); + break; + case MOD_LOAD: + case MOD_QUIESCE: + break; + default: + return (EOPNOTSUPP); + } + return (0); +} + static void lp_identify(driver_t *driver, device_t parent) { @@ -201,7 +233,7 @@ lp_attach(device_t dev) { struct lp_data *lp = DEVTOSOFTC(dev); struct ifnet *ifp; - int rid = 0; + int error, rid = 0; lp->sc_dev = dev; @@ -224,8 +256,7 @@ lp_attach(device_t dev) ifp->if_softc = lp; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_mtu = LPMTU; - ifp->if_flags = IFF_SIMPLEX | IFF_POINTOPOINT | IFF_MULTICAST | - IFF_NEEDSGIANT; + ifp->if_flags = IFF_SIMPLEX | IFF_POINTOPOINT | IFF_MULTICAST; ifp->if_ioctl = lpioctl; ifp->if_output = lpoutput; ifp->if_hdrlen = 0; @@ -235,8 +266,39 @@ lp_attach(device_t dev) bpfattach(ifp, DLT_NULL, sizeof(u_int32_t)); + /* + * Attach our interrupt handler. It is only called while we + * own the ppbus. + */ + error = bus_setup_intr(dev, lp->res_irq, INTR_TYPE_NET | INTR_MPSAFE, + NULL, lp_intr, lp, &lp->sc_intr_cookie); + if (error) { + bpfdetach(ifp); + if_detach(ifp); + bus_release_resource(dev, SYS_RES_IRQ, 0, lp->res_irq); + device_printf(dev, "Unable to register interrupt handler\n"); + return (error); + } + return (0); } + +static int +lp_detach(device_t dev) +{ + struct lp_data *sc = device_get_softc(dev); + device_t ppbus = device_get_parent(dev); + + ppb_lock(ppbus); + lpstop(sc); + ppb_unlock(ppbus); + bpfdetach(sc->sc_ifp); + if_detach(sc->sc_ifp); + bus_teardown_intr(dev, sc->res_irq, sc->sc_intr_cookie); + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->res_irq); + return (0); +} + /* * Build the translation tables for the LPIP (BSD unix) protocol. * We don't want to calculate these nasties in our tight loop, so we @@ -247,17 +309,22 @@ lpinittables(void) { int i; + mtx_lock(&lp_tables_lock); if (txmith == NULL) txmith = malloc(4 * LPIPTBLSIZE, M_DEVBUF, M_NOWAIT); - if (txmith == NULL) + if (txmith == NULL) { + mtx_unlock(&lp_tables_lock); return (1); + } if (ctxmith == NULL) ctxmith = malloc(4 * LPIPTBLSIZE, M_DEVBUF, M_NOWAIT); - if (ctxmith == NULL) + if (ctxmith == NULL) { + mtx_unlock(&lp_tables_lock); return (1); + } for (i = 0; i < LPIPTBLSIZE; i++) { ctxmith[i] = (i & 0xF0) >> 4; @@ -272,10 +339,61 @@ lpinittables(void) trecvh[i] = ((~i) & 0x80) | ((i & 0x38) << 1); trecvl[i] = (((~i) & 0x80) >> 4) | ((i & 0x38) >> 3); } + mtx_unlock(&lp_tables_lock); return (0); } +static void +lpstop(struct lp_data *sc) +{ + device_t ppbus = device_get_parent(sc->sc_dev); + + ppb_assert_locked(ppbus); + ppb_wctr(ppbus, 0x00); + sc->sc_ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); + free(sc->sc_ifbuf, M_DEVBUF); + sc->sc_ifbuf = NULL; + + /* IFF_UP is not set, try to release the bus anyway */ + ppb_release_bus(ppbus, sc->sc_dev); +} + +static int +lpinit_locked(struct ifnet *ifp) +{ + struct lp_data *sc = ifp->if_softc; + device_t dev = sc->sc_dev; + device_t ppbus = device_get_parent(dev); + int error; + + ppb_assert_locked(ppbus); + error = ppb_request_bus(ppbus, dev, PPB_DONTWAIT); + if (error) + return (error); + + /* Now IFF_UP means that we own the bus */ + ppb_set_mode(ppbus, PPB_COMPATIBLE); + + if (lpinittables()) { + ppb_release_bus(ppbus, dev); + return (ENOBUFS); + } + + sc->sc_ifbuf = malloc(sc->sc_ifp->if_mtu + MLPIPHDRLEN, + M_DEVBUF, M_NOWAIT); + if (sc->sc_ifbuf == NULL) { + ppb_release_bus(ppbus, dev); + return (ENOBUFS); + } + + ppb_wctr(ppbus, IRQENABLE); + + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + return (0); +} + /* * Process an ioctl request. */ @@ -288,7 +406,6 @@ lpioctl(struct ifnet *ifp, u_long cmd, c struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; u_char *ptr; - void *ih; int error; switch (cmd) { @@ -301,67 +418,32 @@ lpioctl(struct ifnet *ifp, u_long cmd, c ifp->if_flags |= IFF_UP; /* FALLTHROUGH */ case SIOCSIFFLAGS: + error = 0; + ppb_lock(ppbus); if ((!(ifp->if_flags & IFF_UP)) && - (ifp->if_drv_flags & IFF_DRV_RUNNING)) { - - ppb_wctr(ppbus, 0x00); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - - /* IFF_UP is not set, try to release the bus anyway */ - ppb_release_bus(ppbus, dev); - break; - } - if (((ifp->if_flags & IFF_UP)) && - (!(ifp->if_drv_flags & IFF_DRV_RUNNING))) { - - /* XXX - * Should the request be interruptible? - */ - if ((error = ppb_request_bus(ppbus, dev, PPB_WAIT | - PPB_INTR))) - return (error); + (ifp->if_drv_flags & IFF_DRV_RUNNING)) + lpstop(sc); + else if (((ifp->if_flags & IFF_UP)) && + (!(ifp->if_drv_flags & IFF_DRV_RUNNING))) + error = lpinit_locked(ifp); + ppb_unlock(ppbus); + return (error); - /* Now IFF_UP means that we own the bus */ - ppb_set_mode(ppbus, PPB_COMPATIBLE); - - if (lpinittables()) { - ppb_release_bus(ppbus, dev); - return (ENOBUFS); - } - - sc->sc_ifbuf = malloc(sc->sc_ifp->if_mtu + MLPIPHDRLEN, - M_DEVBUF, M_WAITOK); - if (sc->sc_ifbuf == NULL) { - ppb_release_bus(ppbus, dev); + case SIOCSIFMTU: + ppb_lock(ppbus); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ptr = malloc(ifr->ifr_mtu + MLPIPHDRLEN, M_DEVBUF, + M_NOWAIT); + if (ptr == NULL) { + ppb_unlock(ppbus); return (ENOBUFS); } - - /* - * Attach our interrupt handler. It is - * detached later when the bus is released. - */ - if ((error = bus_setup_intr(dev, sc->res_irq, - INTR_TYPE_NET, NULL, lp_intr, dev, &ih))) { - ppb_release_bus(ppbus, dev); - return (error); - } - - ppb_wctr(ppbus, IRQENABLE); - ifp->if_drv_flags |= IFF_DRV_RUNNING; - } - break; - - case SIOCSIFMTU: - ptr = sc->sc_ifbuf; - sc->sc_ifbuf = malloc(ifr->ifr_mtu + MLPIPHDRLEN, M_DEVBUF, - M_NOWAIT); - if (sc->sc_ifbuf == NULL) { + if (sc->sc_ifbuf) + free(sc->sc_ifbuf, M_DEVBUF); sc->sc_ifbuf = ptr; - return (ENOBUFS); } - if (ptr) - free(ptr, M_DEVBUF); sc->sc_ifp->if_mtu = ifr->ifr_mtu; + ppb_unlock(ppbus); break; case SIOCGIFMTU: @@ -417,14 +499,14 @@ clpinbyte(int spin, device_t ppbus) { u_char c, cl; - while((ppb_rstr(ppbus) & CLPIP_SHAKE)) + while ((ppb_rstr(ppbus) & CLPIP_SHAKE)) if (!--spin) { return (-1); } cl = ppb_rstr(ppbus); ppb_wdtr(ppbus, 0x10); - while(!(ppb_rstr(ppbus) & CLPIP_SHAKE)) + while (!(ppb_rstr(ppbus) & CLPIP_SHAKE)) if (!--spin) { return (-1); } @@ -445,16 +527,14 @@ lptap(struct ifnet *ifp, struct mbuf *m) static void lp_intr(void *arg) { - device_t dev = (device_t)arg; - device_t ppbus = device_get_parent(dev); - struct lp_data *sc = DEVTOSOFTC(dev); - int len, s, j; + struct lp_data *sc = arg; + device_t ppbus = device_get_parent(sc->sc_dev); + int len, j; u_char *bp; u_char c, cl; struct mbuf *top; - s = splhigh(); - + ppb_assert_locked(ppbus); if (sc->sc_ifp->if_flags & IFF_LINK0) { /* Ack. the request */ @@ -500,13 +580,15 @@ lp_intr(void *arg) top = m_devget(sc->sc_ifbuf + CLPIPHDRLEN, len, 0, sc->sc_ifp, 0); if (top) { + ppb_unlock(ppbus); if (bpf_peers_present(sc->sc_ifp->if_bpf)) lptap(sc->sc_ifp, top); /* mbuf is free'd on failure. */ netisr_queue(NETISR_IP, top); + ppb_lock(ppbus); } - goto done; + return; } while ((ppb_rstr(ppbus) & LPIP_SHAKE)) { len = sc->sc_ifp->if_mtu + LPIPHDRLEN; @@ -517,7 +599,7 @@ lp_intr(void *arg) ppb_wdtr(ppbus, 8); j = LPMAXSPIN2; - while((ppb_rstr(ppbus) & LPIP_SHAKE)) + while ((ppb_rstr(ppbus) & LPIP_SHAKE)) if (!--j) goto err; @@ -550,14 +632,16 @@ lp_intr(void *arg) top = m_devget(sc->sc_ifbuf + LPIPHDRLEN, len, 0, sc->sc_ifp, 0); if (top) { + ppb_unlock(ppbus); if (bpf_peers_present(sc->sc_ifp->if_bpf)) lptap(sc->sc_ifp, top); /* mbuf is free'd on failure. */ netisr_queue(NETISR_IP, top); + ppb_lock(ppbus); } } - goto done; + return; err: ppb_wdtr(ppbus, 0); @@ -575,9 +659,6 @@ err: sc->sc_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; sc->sc_iferrs = 0; } - -done: - splx(s); } static __inline int @@ -602,7 +683,7 @@ lpoutput(struct ifnet *ifp, struct mbuf struct lp_data *sc = ifp->if_softc; device_t dev = sc->sc_dev; device_t ppbus = device_get_parent(dev); - int s, err; + int err; struct mbuf *mm; u_char *cp = "\0\0"; u_char chksum = 0; @@ -611,19 +692,18 @@ lpoutput(struct ifnet *ifp, struct mbuf /* We need a sensible value if we abort */ cp++; - ifp->if_drv_flags |= IFF_DRV_RUNNING; + ppb_lock(ppbus); + ifp->if_drv_flags |= IFF_DRV_OACTIVE; err = 1; /* assume we're aborting because of an error */ - s = splhigh(); - /* Suspend (on laptops) or receive-errors might have taken us offline */ ppb_wctr(ppbus, IRQENABLE); if (ifp->if_flags & IFF_LINK0) { if (!(ppb_rstr(ppbus) & CLPIP_SHAKE)) { lprintf("&"); - lp_intr(dev); + lp_intr(sc); } /* Alert other end to pending packet */ @@ -681,6 +761,7 @@ lpoutput(struct ifnet *ifp, struct mbuf err = 0; /* No errors */ nend: + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; if (err) { /* if we didn't timeout... */ ifp->if_oerrors++; lprintf("X"); @@ -695,15 +776,15 @@ lpoutput(struct ifnet *ifp, struct mbuf if (!(ppb_rstr(ppbus) & CLPIP_SHAKE)) { lprintf("^"); - lp_intr(dev); + lp_intr(sc); } - (void) splx(s); + ppb_unlock(ppbus); return (0); } if (ppb_rstr(ppbus) & LPIP_SHAKE) { lprintf("&"); - lp_intr(dev); + lp_intr(sc); } if (lpoutbyte(0x08, LPMAXSPIN1, ppbus)) @@ -726,6 +807,7 @@ end: --cp; ppb_wdtr(ppbus, txmitl[*cp] ^ 0x17); + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; if (err) { /* if we didn't timeout... */ ifp->if_oerrors++; lprintf("X"); @@ -740,10 +822,10 @@ end: if (ppb_rstr(ppbus) & LPIP_SHAKE) { lprintf("^"); - lp_intr(dev); + lp_intr(sc); } - (void) splx(s); + ppb_unlock(ppbus); return (0); } @@ -752,6 +834,7 @@ static device_method_t lp_methods[] = { DEVMETHOD(device_identify, lp_identify), DEVMETHOD(device_probe, lp_probe), DEVMETHOD(device_attach, lp_attach), + DEVMETHOD(device_detach, lp_detach), { 0, 0 } }; @@ -762,5 +845,5 @@ static driver_t lp_driver = { sizeof(struct lp_data), }; -DRIVER_MODULE(plip, ppbus, lp_driver, lp_devclass, 0, 0); +DRIVER_MODULE(plip, ppbus, lp_driver, lp_devclass, lp_module_handler, 0); MODULE_DEPEND(plip, ppbus, 1, 1, 1); Modified: projects/jbuild/sys/dev/ppbus/immio.c ============================================================================== --- projects/jbuild/sys/dev/ppbus/immio.c Sat Feb 28 17:56:11 2009 (r189180) +++ projects/jbuild/sys/dev/ppbus/immio.c Sat Feb 28 17:56:25 2009 (r189181) @@ -606,6 +606,7 @@ imm_attach(struct vpoio_data *vpo) /* * Initialize mode dependent in/out microsequences */ + ppb_lock(ppbus); if ((error = ppb_request_bus(ppbus, vpo->vpo_dev, PPB_WAIT))) goto error; @@ -632,6 +633,7 @@ imm_attach(struct vpoio_data *vpo) ppb_release_bus(ppbus, vpo->vpo_dev); error: + ppb_unlock(ppbus); return (error); } Modified: projects/jbuild/sys/dev/ppbus/lpbb.c ============================================================================== --- projects/jbuild/sys/dev/ppbus/lpbb.c Sat Feb 28 17:56:11 2009 (r189180) +++ projects/jbuild/sys/dev/ppbus/lpbb.c Sat Feb 28 17:56:25 2009 (r189181) @@ -103,16 +103,16 @@ lpbb_callback(device_t dev, int index, c case IIC_REQUEST_BUS: /* request the ppbus */ how = *(int *)data; - mtx_lock(&Giant); + ppb_lock(ppbus); error = ppb_request_bus(ppbus, dev, how); - mtx_unlock(&Giant); + ppb_unlock(ppbus); break; case IIC_RELEASE_BUS: /* release the ppbus */ - mtx_lock(&Giant); + ppb_lock(ppbus); error = ppb_release_bus(ppbus, dev); - mtx_unlock(&Giant); + ppb_unlock(ppbus); break; default: @@ -129,25 +129,38 @@ lpbb_callback(device_t dev, int index, c #define ALIM 0x20 #define I2CKEY 0x50 +/* Reset bus by setting SDA first and then SCL. */ +static void +lpbb_reset_bus(device_t dev) +{ + device_t ppbus = device_get_parent(dev); + + ppb_assert_locked(ppbus); + ppb_wdtr(ppbus, (u_char)~SDA_out); + ppb_wctr(ppbus, (u_char)(ppb_rctr(ppbus) | SCL_out)); +} + static int lpbb_getscl(device_t dev) { + device_t ppbus = device_get_parent(dev); int rval; - mtx_lock(&Giant); - rval = ((ppb_rstr(device_get_parent(dev)) & SCL_in) == SCL_in); - mtx_unlock(&Giant); + ppb_lock(ppbus); + rval = ((ppb_rstr(ppbus) & SCL_in) == SCL_in); + ppb_unlock(ppbus); return (rval); } static int lpbb_getsda(device_t dev) { + device_t ppbus = device_get_parent(dev); int rval; - mtx_lock(&Giant); - rval = ((ppb_rstr(device_get_parent(dev)) & SDA_in) == SDA_in); - mtx_unlock(&Giant); + ppb_lock(ppbus); + rval = ((ppb_rstr(ppbus) & SDA_in) == SDA_in); + ppb_unlock(ppbus); return (rval); } @@ -156,12 +169,12 @@ lpbb_setsda(device_t dev, char val) { device_t ppbus = device_get_parent(dev); - mtx_lock(&Giant); + ppb_lock(ppbus); if (val == 0) ppb_wdtr(ppbus, (u_char)SDA_out); else ppb_wdtr(ppbus, (u_char)~SDA_out); - mtx_unlock(&Giant); + ppb_unlock(ppbus); } static void @@ -169,12 +182,12 @@ lpbb_setscl(device_t dev, unsigned char { device_t ppbus = device_get_parent(dev); - mtx_lock(&Giant); + ppb_lock(ppbus); if (val == 0) ppb_wctr(ppbus, (u_char)(ppb_rctr(ppbus) & ~SCL_out)); else ppb_wctr(ppbus, (u_char)(ppb_rctr(ppbus) | SCL_out)); - mtx_unlock(&Giant); + ppb_unlock(ppbus); } static int @@ -182,23 +195,24 @@ lpbb_detect(device_t dev) { device_t ppbus = device_get_parent(dev); + ppb_lock(ppbus); if (ppb_request_bus(ppbus, dev, PPB_DONTWAIT)) { + ppb_unlock(ppbus); device_printf(dev, "can't allocate ppbus\n"); return (0); } - /* reset bus */ - lpbb_setsda(dev, 1); - lpbb_setscl(dev, 1); + lpbb_reset_bus(dev); if ((ppb_rstr(ppbus) & I2CKEY) || ((ppb_rstr(ppbus) & ALIM) != ALIM)) { - ppb_release_bus(ppbus, dev); + ppb_unlock(ppbus); return (0); } ppb_release_bus(ppbus, dev); + ppb_unlock(ppbus); return (1); } @@ -208,18 +222,17 @@ lpbb_reset(device_t dev, u_char speed, u { device_t ppbus = device_get_parent(dev); - mtx_lock(&Giant); + ppb_lock(ppbus); if (ppb_request_bus(ppbus, dev, PPB_DONTWAIT)) { + ppb_unlock(ppbus); device_printf(dev, "can't allocate ppbus\n"); return (0); } - /* reset bus */ - lpbb_setsda(dev, 1); - lpbb_setscl(dev, 1); + lpbb_reset_bus(dev); ppb_release_bus(ppbus, dev); - mtx_unlock(&Giant); + ppb_unlock(ppbus); return (IIC_ENOADDR); } Modified: projects/jbuild/sys/dev/ppbus/lpt.c ============================================================================== --- projects/jbuild/sys/dev/ppbus/lpt.c Sat Feb 28 17:56:11 2009 (r189180) +++ projects/jbuild/sys/dev/ppbus/lpt.c Sat Feb 28 17:56:25 2009 (r189181) @@ -105,9 +105,9 @@ static int volatile lptflag = 1; #define BUFSTATSIZE 32 struct lpt_data { - device_t dev; - struct cdev *cdev; - struct cdev *cdev_bypass; + device_t sc_dev; + struct cdev *sc_cdev; + struct cdev *sc_cdev_bypass; short sc_state; /* default case: negative prime, negative ack, handshake strobe, prime once */ @@ -130,9 +130,10 @@ struct lpt_data { #define LP_ENABLE_IRQ 0x04 /* enable IRQ on open */ #define LP_ENABLE_EXT 0x10 /* we shall use advanced mode when possible */ u_char sc_backoff ; /* time to call lptout() again */ + struct callout sc_timer; - struct resource *intr_resource; /* interrupt resource */ - void *intr_cookie; /* interrupt registration cookie */ + struct resource *sc_intr_resource; /* interrupt resource */ + void *sc_intr_cookie; /* interrupt cookie */ }; #define LPT_NAME "lpt" /* our official name */ @@ -144,8 +145,7 @@ static int lpt_detect(device_t dev); #define DEVTOSOFTC(dev) \ ((struct lpt_data *)device_get_softc(dev)) -static void lptintr(device_t dev); -static void lpt_intr(void *arg); /* without spls */ +static void lptintr(void *arg); static devclass_t lpt_devclass; @@ -183,7 +183,6 @@ static d_ioctl_t lptioctl; static struct cdevsw lpt_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, .d_open = lptopen, .d_close = lptclose, .d_read = lptread, @@ -199,13 +198,17 @@ lpt_request_ppbus(device_t dev, int how) struct lpt_data *sc = DEVTOSOFTC(dev); int error; + /* + * We might already have the bus for a write(2) after an interrupted + * write(2) call. + */ + ppb_assert_locked(ppbus); if (sc->sc_state & HAVEBUS) return (0); - /* we have the bus only if the request succeded */ - if ((error = ppb_request_bus(ppbus, dev, how)) == 0) + error = ppb_request_bus(ppbus, dev, how); + if (error == 0) sc->sc_state |= HAVEBUS; - return (error); } @@ -216,9 +219,12 @@ lpt_release_ppbus(device_t dev) struct lpt_data *sc = DEVTOSOFTC(dev); int error = 0; - if ((error = ppb_release_bus(ppbus, dev)) == 0) - sc->sc_state &= ~HAVEBUS; - + ppb_assert_locked(ppbus); + if (sc->sc_state & HAVEBUS) { + error = ppb_release_bus(ppbus, dev); + if (error == 0) + sc->sc_state &= ~HAVEBUS; + } return (error); } @@ -306,24 +312,25 @@ lpt_detect(device_t dev) status = 1; /* assume success */ + ppb_lock(ppbus); if ((error = lpt_request_ppbus(dev, PPB_DONTWAIT))) { - printf(LPT_NAME ": cannot alloc ppbus (%d)!\n", error); - status = 0; - goto end_probe; + ppb_unlock(ppbus); + device_printf(dev, "cannot alloc ppbus (%d)!\n", error); + return (0); } for (i = 0; i < 18 && status; i++) if (!lpt_port_test(ppbus, testbyte[i], 0xff)) { status = 0; - goto end_probe; + break; } -end_probe: /* write 0's to control and data ports */ ppb_wdtr(ppbus, 0); ppb_wctr(ppbus, 0); lpt_release_ppbus(dev); + ppb_unlock(ppbus); return (status); } @@ -363,21 +370,33 @@ lpt_attach(device_t dev) int error; sc->sc_primed = 0; /* not primed yet */ + ppb_init_callout(ppbus, &sc->sc_timer, 0); + ppb_lock(ppbus); if ((error = lpt_request_ppbus(dev, PPB_DONTWAIT))) { - printf(LPT_NAME ": cannot alloc ppbus (%d)!\n", error); + ppb_unlock(ppbus); + device_printf(dev, "cannot alloc ppbus (%d)!\n", error); return (0); } ppb_wctr(ppbus, LPC_NINIT); - - /* check if we can use interrupt, should be done by ppc stuff */ - lprintf(("oldirq %x\n", sc->sc_irq)); + lpt_release_ppbus(dev); + ppb_unlock(ppbus); /* declare our interrupt handler */ - sc->intr_resource = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + sc->sc_intr_resource = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE); - if (sc->intr_resource) { + if (sc->sc_intr_resource) { + error = bus_setup_intr(dev, sc->sc_intr_resource, + INTR_TYPE_TTY | INTR_MPSAFE, NULL, lptintr, sc, + &sc->sc_intr_cookie); + if (error) { + bus_release_resource(dev, SYS_RES_IRQ, rid, + sc->sc_intr_resource); + device_printf(dev, + "Unable to register interrupt handler\n"); + return (error); + } sc->sc_irq = LP_HAS_IRQ | LP_USE_IRQ | LP_ENABLE_IRQ; device_printf(dev, "Interrupt-driven port\n"); } else { @@ -386,17 +405,17 @@ lpt_attach(device_t dev) } lprintf(("irq %x\n", sc->sc_irq)); - lpt_release_ppbus(dev); - - sc->dev = dev; - sc->cdev = make_dev(&lpt_cdevsw, unit, + sc->sc_inbuf = malloc(BUFSIZE, M_DEVBUF, M_WAITOK); + sc->sc_statbuf = malloc(BUFSTATSIZE, M_DEVBUF, M_WAITOK); + sc->sc_dev = dev; + sc->sc_cdev = make_dev(&lpt_cdevsw, unit, UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d", unit); - sc->cdev->si_drv1 = sc; - sc->cdev->si_drv2 = 0; - sc->cdev_bypass = make_dev(&lpt_cdevsw, unit, + sc->sc_cdev->si_drv1 = sc; + sc->sc_cdev->si_drv2 = 0; + sc->sc_cdev_bypass = make_dev(&lpt_cdevsw, unit, UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d.ctl", unit); - sc->cdev_bypass->si_drv1 = sc; - sc->cdev_bypass->si_drv2 = (void *)LP_BYPASS; + sc->sc_cdev_bypass->si_drv1 = sc; + sc->sc_cdev_bypass->si_drv2 = (void *)LP_BYPASS; return (0); } @@ -404,15 +423,21 @@ static int lpt_detach(device_t dev) { struct lpt_data *sc = DEVTOSOFTC(dev); + device_t ppbus = device_get_parent(dev); - destroy_dev(sc->cdev); - destroy_dev(sc->cdev_bypass); + destroy_dev(sc->sc_cdev); + destroy_dev(sc->sc_cdev_bypass); + ppb_lock(ppbus); lpt_release_ppbus(dev); - if (sc->intr_resource != 0) { - BUS_TEARDOWN_INTR(device_get_parent(dev), dev, - sc->intr_resource, sc->intr_cookie); - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->intr_resource); + ppb_unlock(ppbus); + callout_drain(&sc->sc_timer); + if (sc->sc_intr_resource != NULL) { + bus_teardown_intr(dev, sc->sc_intr_resource, + sc->sc_intr_cookie); + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_intr_resource); } + free(sc->sc_inbuf, M_DEVBUF); + free(sc->sc_statbuf, M_DEVBUF); return (0); } @@ -420,18 +445,19 @@ lpt_detach(device_t dev) static void lptout(void *arg) { - device_t dev = (device_t)arg; - struct lpt_data *sc = DEVTOSOFTC(dev); -#ifdef LPT_DEBUG + struct lpt_data *sc = arg; + device_t dev = sc->sc_dev; +#if defined(INVARIANTS) || defined(LPT_DEBUG) device_t ppbus = device_get_parent(dev); #endif + ppb_assert_locked(ppbus); lprintf(("T %x ", ppb_rstr(ppbus))); if (sc->sc_state & OPEN) { sc->sc_backoff++; if (sc->sc_backoff > hz/LPTOUTMAX) sc->sc_backoff = sc->sc_backoff > hz/LPTOUTMAX; - timeout(lptout, (caddr_t)dev, sc->sc_backoff); + callout_reset(&sc->sc_timer, sc->sc_backoff, lptout, sc); } else sc->sc_state &= ~TOUT; @@ -442,7 +468,7 @@ lptout(void *arg) * Avoid possible hangs due to missed interrupts */ if (sc->sc_xfercnt) { - lptintr(dev); + lptintr(sc); } else { sc->sc_state &= ~OBUSY; wakeup(dev); @@ -458,17 +484,19 @@ lptout(void *arg) static int lptopen(struct cdev *dev, int flags, int fmt, struct thread *td) { - int s; int trys, err; struct lpt_data *sc = dev->si_drv1; - device_t lptdev = sc->dev; + device_t lptdev = sc->sc_dev; device_t ppbus = device_get_parent(lptdev); if (!sc) return (ENXIO); + ppb_lock(ppbus); if (sc->sc_state) { - lprintf((LPT_NAME ": still open %x\n", sc->sc_state)); + lprintf(("%s: still open %x\n", device_get_nameunit(lptdev), + sc->sc_state)); + ppb_unlock(ppbus); return(EBUSY); } else sc->sc_state |= LPTINIT; @@ -478,6 +506,7 @@ lptopen(struct cdev *dev, int flags, int /* Check for open with BYPASS flag set. */ if (sc->sc_flags & LP_BYPASS) { sc->sc_state = OPEN; + ppb_unlock(ppbus); return(0); } @@ -485,11 +514,12 @@ lptopen(struct cdev *dev, int flags, int if ((err = lpt_request_ppbus(lptdev, PPB_WAIT|PPB_INTR)) != 0) { /* give it a chance to try later */ sc->sc_state = 0; + ppb_unlock(ppbus); return (err); } - s = spltty(); - lprintf((LPT_NAME " flags 0x%x\n", sc->sc_flags)); + lprintf(("%s flags 0x%x\n", device_get_nameunit(lptdev), + sc->sc_flags)); /* set IRQ status according to ENABLE_IRQ flag */ @@ -514,21 +544,20 @@ lptopen(struct cdev *dev, int flags, int do { /* ran out of waiting for the printer */ if (trys++ >= LPINITRDY*4) { - splx(s); - sc->sc_state = 0; lprintf(("status %x\n", ppb_rstr(ppbus))); lpt_release_ppbus(lptdev); + sc->sc_state = 0; + ppb_unlock(ppbus); return (EBUSY); } /* wait 1/4 second, give up if we get a signal */ - if (tsleep(lptdev, LPPRI|PCATCH, "lptinit", hz/4) != - EWOULDBLOCK) { - sc->sc_state = 0; - splx(s); - + if (ppb_sleep(ppbus, lptdev, LPPRI | PCATCH, "lptinit", + hz / 4) != EWOULDBLOCK) { lpt_release_ppbus(lptdev); + sc->sc_state = 0; + ppb_unlock(ppbus); return (EBUSY); } @@ -547,23 +576,22 @@ lptopen(struct cdev *dev, int flags, int ppb_wctr(ppbus, sc->sc_control); - sc->sc_state = OPEN; - sc->sc_inbuf = malloc(BUFSIZE, M_DEVBUF, M_WAITOK); - sc->sc_statbuf = malloc(BUFSTATSIZE, M_DEVBUF, M_WAITOK); + sc->sc_state &= ~LPTINIT; + sc->sc_state |= OPEN; sc->sc_xfercnt = 0; - splx(s); - - /* release the ppbus */ - lpt_release_ppbus(lptdev); /* only use timeout if using interrupt */ lprintf(("irq %x\n", sc->sc_irq)); if (sc->sc_irq & LP_USE_IRQ) { sc->sc_state |= TOUT; - timeout(lptout, (caddr_t)lptdev, - (sc->sc_backoff = hz/LPTOUTINITIAL)); + sc->sc_backoff = hz / LPTOUTINITIAL; + callout_reset(&sc->sc_timer, sc->sc_backoff, lptout, sc); } + /* release the ppbus */ + lpt_release_ppbus(lptdev); + ppb_unlock(ppbus); + lprintf(("opened.\n")); return(0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:57:09 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61F271065679; Sat, 28 Feb 2009 17:57:09 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4730A8FC30; Sat, 28 Feb 2009 17:57:09 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHv9vK017145; Sat, 28 Feb 2009 17:57:09 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHv9dm017140; Sat, 28 Feb 2009 17:57:09 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281757.n1SHv9dm017140@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189182 - projects/jbuild/sys/dev/firewire X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:57:20 -0000 Author: jb Date: Sat Feb 28 17:57:08 2009 New Revision: 189182 URL: http://svn.freebsd.org/changeset/base/189182 Log: MFC Modified: projects/jbuild/sys/dev/firewire/firewire.c projects/jbuild/sys/dev/firewire/firewire.h projects/jbuild/sys/dev/firewire/fwohci.c projects/jbuild/sys/dev/firewire/fwohci_pci.c projects/jbuild/sys/dev/firewire/fwohcireg.h projects/jbuild/sys/dev/firewire/fwohcivar.h projects/jbuild/sys/dev/firewire/fwphyreg.h projects/jbuild/sys/dev/firewire/if_fwe.c projects/jbuild/sys/dev/firewire/if_fwip.c projects/jbuild/sys/dev/firewire/sbp.c Modified: projects/jbuild/sys/dev/firewire/firewire.c ============================================================================== --- projects/jbuild/sys/dev/firewire/firewire.c Sat Feb 28 17:56:25 2009 (r189181) +++ projects/jbuild/sys/dev/firewire/firewire.c Sat Feb 28 17:57:08 2009 (r189182) @@ -77,7 +77,7 @@ struct crom_src_buf { struct crom_chunk hw; }; -int firewire_debug=0, try_bmr=1, hold_count=3; +int firewire_debug=0, try_bmr=1, hold_count=0; SYSCTL_INT(_debug, OID_AUTO, firewire_debug, CTLFLAG_RW, &firewire_debug, 0, "FireWire driver debug flag"); SYSCTL_NODE(_hw, OID_AUTO, firewire, CTLFLAG_RD, 0, "FireWire Subsystem"); @@ -430,6 +430,31 @@ firewire_attach(device_t dev) fwdev_makedev(sc); + fc->crom_src_buf = (struct crom_src_buf *)malloc( + sizeof(struct crom_src_buf), + M_FW, M_NOWAIT | M_ZERO); + if (fc->crom_src_buf == NULL) { + device_printf(fc->dev, "%s: Malloc Failure crom src buff\n", __func__); + return ENOMEM; + } + fc->topology_map = (struct fw_topology_map *)malloc( + sizeof(struct fw_topology_map), + M_FW, M_NOWAIT | M_ZERO); + if (fc->topology_map == NULL) { + device_printf(fc->dev, "%s: Malloc Failure topology map\n", __func__); + free(fc->crom_src_buf, M_FW); + return ENOMEM; + } + fc->speed_map = (struct fw_speed_map *)malloc( + sizeof(struct fw_speed_map), + M_FW, M_NOWAIT | M_ZERO); + if (fc->speed_map == NULL) { + device_printf(fc->dev, "%s: Malloc Failure speed map\n", __func__); + free(fc->crom_src_buf, M_FW); + free(fc->topology_map, M_FW); + return ENOMEM; + } + mtx_init(&fc->wait_lock, "fwwait", NULL, MTX_DEF); mtx_init(&fc->tlabel_lock, "fwtlabel", NULL, MTX_DEF); CALLOUT_INIT(&fc->timeout_callout); @@ -451,7 +476,9 @@ firewire_attach(device_t dev) bus_generic_attach(dev); /* bus_reset */ + FW_GLOCK(fc); fw_busreset(fc, FWBUSNOTREADY); + FW_GUNLOCK(fc); fc->ibr(fc); return 0; @@ -642,11 +669,6 @@ fw_init_crom(struct firewire_comm *fc) { struct crom_src *src; - fc->crom_src_buf = (struct crom_src_buf *) - malloc(sizeof(struct crom_src_buf), M_FW, M_WAITOK | M_ZERO); - if (fc->crom_src_buf == NULL) - return; - src = &fc->crom_src_buf->src; bzero(src, sizeof(struct crom_src)); @@ -663,7 +685,7 @@ fw_init_crom(struct firewire_comm *fc) src->businfo.cyc_clk_acc = 100; src->businfo.max_rec = fc->maxrec; src->businfo.max_rom = MAXROM_4; - src->businfo.generation = 1; + src->businfo.generation = 0; src->businfo.link_spd = fc->speed; src->businfo.eui64.hi = fc->eui.hi; @@ -682,9 +704,6 @@ fw_reset_crom(struct firewire_comm *fc) struct crom_src *src; struct crom_chunk *root; - if (fc->crom_src_buf == NULL) - fw_init_crom(fc); - buf = fc->crom_src_buf; src = fc->crom_src; root = fc->crom_root; @@ -715,18 +734,18 @@ fw_busreset(struct firewire_comm *fc, ui struct firewire_dev_comm *fdc; struct crom_src *src; device_t *devlistp; - void *newrom; int i, devcnt; - switch(fc->status){ - case FWBUSMGRELECT: + FW_GLOCK_ASSERT(fc); + if (fc->status == FWBUSMGRELECT) callout_stop(&fc->bmr_callout); - break; - default: - break; - } + fc->status = new_status; fw_reset_csr(fc); + + if (fc->status == FWBUSNOTREADY) + fw_init_crom(fc); + fw_reset_crom(fc); if (device_get_children(fc->bdev, &devlistp, &devcnt) == 0) { @@ -739,19 +758,19 @@ fw_busreset(struct firewire_comm *fc, ui free(devlistp, M_TEMP); } - newrom = malloc(CROMSIZE, M_FW, M_NOWAIT | M_ZERO); src = &fc->crom_src_buf->src; - crom_load(src, (uint32_t *)newrom, CROMSIZE); - if (bcmp(newrom, fc->config_rom, CROMSIZE) != 0) { - /* bump generation and reload */ - src->businfo.generation ++; - /* generation must be between 0x2 and 0xF */ - if (src->businfo.generation < 2) - src->businfo.generation ++; - crom_load(src, (uint32_t *)newrom, CROMSIZE); - bcopy(newrom, (void *)fc->config_rom, CROMSIZE); - } - free(newrom, M_FW); + /* + * If the old config rom needs to be overwritten, + * bump the businfo.generation indicator to + * indicate that we need to be reprobed + */ + if (bcmp(src, fc->config_rom, CROMSIZE) != 0) { + /* generation is a 2 bit field */ + /* valid values are only from 0 - 3 */ + src->businfo.generation = 1; + bcopy(src, (void *)fc->config_rom, CROMSIZE); + } else + src->businfo.generation = 0; } /* Call once after reboot */ @@ -807,13 +826,7 @@ void fw_init(struct firewire_comm *fc) fc->ir[i]->maxq = FWMAXQUEUE; fc->it[i]->maxq = FWMAXQUEUE; } -/* Initialize csr registers */ - fc->topology_map = (struct fw_topology_map *)malloc( - sizeof(struct fw_topology_map), - M_FW, M_NOWAIT | M_ZERO); - fc->speed_map = (struct fw_speed_map *)malloc( - sizeof(struct fw_speed_map), - M_FW, M_NOWAIT | M_ZERO); + CSRARC(fc, TOPO_MAP) = 0x3f1 << 16; CSRARC(fc, TOPO_MAP + 4) = 1; CSRARC(fc, SPED_MAP) = 0x3f1 << 16; @@ -1244,12 +1257,11 @@ fw_phy_config(struct firewire_comm *fc, fp->mode.common.tcode |= FWTCODE_PHY; if (firewire_debug) - printf("send phy_config root_node=%d gap_count=%d\n", - root_node, gap_count); + device_printf(fc->bdev, "%s: root_node=%d gap_count=%d\n", + __func__, root_node, gap_count); fw_asyreq(fc, -1, xfer); } -#if 0 /* * Dump self ID. */ @@ -1258,14 +1270,30 @@ fw_print_sid(uint32_t sid) { union fw_self_id *s; s = (union fw_self_id *) &sid; - printf("node:%d link:%d gap:%d spd:%d del:%d con:%d pwr:%d" - " p0:%d p1:%d p2:%d i:%d m:%d\n", - s->p0.phy_id, s->p0.link_active, s->p0.gap_count, - s->p0.phy_speed, s->p0.phy_delay, s->p0.contender, - s->p0.power_class, s->p0.port0, s->p0.port1, - s->p0.port2, s->p0.initiated_reset, s->p0.more_packets); + if ( s->p0.sequel ) { + if ( s->p1.sequence_num == FW_SELF_ID_PAGE0 ) { + printf("node:%d p3:%d p4:%d p5:%d p6:%d p7:%d" + "p8:%d p9:%d p10:%d\n", + s->p1.phy_id, s->p1.port3, s->p1.port4, + s->p1.port5, s->p1.port6, s->p1.port7, + s->p1.port8, s->p1.port9, s->p1.port10); + } else if (s->p2.sequence_num == FW_SELF_ID_PAGE1 ){ + printf("node:%d p11:%d p12:%d p13:%d p14:%d p15:%d\n", + s->p2.phy_id, s->p2.port11, s->p2.port12, + s->p2.port13, s->p2.port14, s->p2.port15); + } else { + printf("node:%d Unknown Self ID Page number %d\n", + s->p1.phy_id, s->p1.sequence_num); + } + } else { + printf("node:%d link:%d gap:%d spd:%d con:%d pwr:%d" + " p0:%d p1:%d p2:%d i:%d m:%d\n", + s->p0.phy_id, s->p0.link_active, s->p0.gap_count, + s->p0.phy_speed, s->p0.contender, + s->p0.power_class, s->p0.port0, s->p0.port1, + s->p0.port2, s->p0.initiated_reset, s->p0.more_packets); + } } -#endif /* * To receive self ID. @@ -1289,7 +1317,8 @@ void fw_sidrcv(struct firewire_comm* fc, self_id = &fc->topology_map->self_id[0]; for(i = 0; i < fc->sid_cnt; i ++){ if (sid[1] != ~sid[0]) { - printf("fw_sidrcv: invalid self-id packet\n"); + device_printf(fc->bdev, "%s: ERROR invalid self-id packet\n", + __func__); sid += 2; continue; } @@ -1298,9 +1327,8 @@ void fw_sidrcv(struct firewire_comm* fc, if(self_id->p0.sequel == 0){ fc->topology_map->node_count ++; c_port = 0; -#if 0 - fw_print_sid(sid[0]); -#endif + if (firewire_debug) + fw_print_sid(sid[0]); node = self_id->p0.phy_id; if(fc->max_node < node){ fc->max_node = self_id->p0.phy_id; @@ -1335,7 +1363,6 @@ void fw_sidrcv(struct firewire_comm* fc, self_id++; fc->topology_map->self_id_count ++; } - device_printf(fc->bdev, "%d nodes", fc->max_node + 1); /* CRC */ fc->topology_map->crc = fw_crc16( (uint32_t *)&fc->topology_map->generation, @@ -1354,16 +1381,11 @@ void fw_sidrcv(struct firewire_comm* fc, bcopy(p, &CSRARC(fc, SPED_MAP + 8), (fc->speed_map->crc_len - 1)*4); fc->max_hop = fc->max_node - i_branch; - printf(", maxhop <= %d", fc->max_hop); - - if(fc->irm == -1 ){ - printf(", Not found IRM capable node"); - }else{ - printf(", cable IRM = %d", fc->irm); - if (fc->irm == fc->nodeid) - printf(" (me)"); - } - printf("\n"); + device_printf(fc->bdev, "%d nodes, maxhop <= %d %s irm(%d) %s\n", + fc->max_node + 1, fc->max_hop, + (fc->irm == -1) ? "Not IRM capable" : "cable IRM", + fc->irm, + (fc->irm == fc->nodeid) ? " (me) " : ""); if (try_bmr && (fc->irm != -1) && (CSRARC(fc, BUS_MGR_ID) == 0x3f)) { if (fc->irm == fc->nodeid) { @@ -1395,10 +1417,23 @@ fw_bus_probe(struct firewire_comm *fc) fc->status = FWBUSEXPLORE; /* Invalidate all devices, just after bus reset. */ + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "iterate and invalidate all nodes\n", + __func__); STAILQ_FOREACH(fwdev, &fc->devices, link) if (fwdev->status != FWDEVINVAL) { fwdev->status = FWDEVINVAL; fwdev->rcnt = 0; + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "Invalidate Dev ID: %08x%08x\n", + __func__, fwdev->eui.hi, fwdev->eui.lo); + } else { + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "Dev ID: %08x%08x already invalid\n", + __func__, fwdev->eui.hi, fwdev->eui.lo); } splx(s); @@ -1407,13 +1442,13 @@ fw_bus_probe(struct firewire_comm *fc) static int fw_explore_read_quads(struct fw_device *fwdev, int offset, - uint32_t *quad, int n) + uint32_t *quad, int length) { struct fw_xfer *xfer; uint32_t tmp; int i, error; - for (i = 0; i < n; i ++, offset += sizeof(uint32_t)) { + for (i = 0; i < length; i ++, offset += sizeof(uint32_t)) { xfer = fwmem_read_quad(fwdev, NULL, -1, 0xffff, 0xf0000000 | offset, (void *)&tmp, fw_xferwake); @@ -1490,7 +1525,8 @@ fw_explore_node(struct fw_device *dfwdev uint32_t *csr; struct csrhdr *hdr; struct bus_info *binfo; - int err, node, spd; + int err, node; + uint32_t speed_test = 0; fc = dfwdev->fc; csr = dfwdev->csrrom; @@ -1498,28 +1534,48 @@ fw_explore_node(struct fw_device *dfwdev /* First quad */ err = fw_explore_read_quads(dfwdev, CSRROMOFF, &csr[0], 1); - if (err) + if (err) { + device_printf(fc->bdev, "%s: node%d: explore_read_quads failure\n", + __func__, node); + dfwdev->status = FWDEVINVAL; return (-1); + } hdr = (struct csrhdr *)&csr[0]; if (hdr->info_len != 4) { if (firewire_debug) - printf("node%d: wrong bus info len(%d)\n", - node, hdr->info_len); + device_printf(fc->bdev, "%s: node%d: wrong bus info len(%d)\n", + __func__, node, hdr->info_len); + dfwdev->status = FWDEVINVAL; return (-1); } /* bus info */ err = fw_explore_read_quads(dfwdev, CSRROMOFF + 0x04, &csr[1], 4); - if (err) + if (err) { + device_printf(fc->bdev, "%s: node%d: error reading 0x04\n", + __func__, node); + dfwdev->status = FWDEVINVAL; return (-1); + } binfo = (struct bus_info *)&csr[1]; if (binfo->bus_name != CSR_BUS_NAME_IEEE1394) { - if (firewire_debug) - printf("node%d: invalid bus name 0x%08x\n", - node, binfo->bus_name); + device_printf(fc->bdev, "%s: node%d: invalid bus name 0x%08x\n", + __func__, node, binfo->bus_name); + dfwdev->status = FWDEVINVAL; return (-1); } - spd = fc->speed_map->speed[fc->nodeid][node]; + + if (firewire_debug) + device_printf(fc->bdev, "%s: node(%d) BUS INFO BLOCK:\n" + "irmc(%d) cmc(%d) isc(%d) bmc(%d) pmc(%d) " + "cyc_clk_acc(%d) max_rec(%d) max_rom(%d) " + "generation(%d) link_spd(%d)\n", + __func__, node, + binfo->irmc, binfo->cmc, binfo->isc, + binfo->bmc, binfo->pmc, binfo->cyc_clk_acc, + binfo->max_rec, binfo->max_rom, + binfo->generation, binfo->link_spd); + STAILQ_FOREACH(fwdev, &fc->devices, link) if (FW_EUI64_EQUAL(fwdev->eui, binfo->eui64)) break; @@ -1528,12 +1584,46 @@ fw_explore_node(struct fw_device *dfwdev fwdev = malloc(sizeof(struct fw_device), M_FW, M_NOWAIT | M_ZERO); if (fwdev == NULL) { - if (firewire_debug) - printf("node%d: no memory\n", node); + device_printf(fc->bdev, "%s: node%d: no memory\n", + __func__, node); return (-1); } fwdev->fc = fc; fwdev->eui = binfo->eui64; + /* + * Pre-1394a-2000 didn't have link_spd in + * the Bus Info block, so try and use the + * speed map value. + * 1394a-2000 compliant devices only use + * the Bus Info Block link spd value, so + * ignore the speed map alltogether. SWB + */ + if ( binfo->link_spd == FWSPD_S100 /* 0 */) { + device_printf(fc->bdev, "%s" + "Pre 1394a-2000 detected\n", + __func__); + fwdev->speed = fc->speed_map->speed[fc->nodeid][node]; + } else + fwdev->speed = binfo->link_spd; + /* + * Test this speed with a read to the CSRROM. + * If it fails, slow down the speed and retry. + */ + while (fwdev->speed > 0) { + err = fw_explore_read_quads(fwdev, CSRROMOFF, + &speed_test, 1); + if (err) + fwdev->speed--; + else + break; + + } + if (fwdev->speed != binfo->link_spd) + device_printf(fc->bdev, "%s: fwdev->speed(%s)" + " set lower than binfo->link_spd(%s)\n", + __func__, + linkspeed[fwdev->speed], + linkspeed[binfo->link_spd]); /* inesrt into sorted fwdev list */ pfwdev = NULL; STAILQ_FOREACH(tfwdev, &fc->devices, link) { @@ -1549,17 +1639,16 @@ fw_explore_node(struct fw_device *dfwdev STAILQ_INSERT_AFTER(&fc->devices, pfwdev, fwdev, link); device_printf(fc->bdev, "New %s device ID:%08x%08x\n", - linkspeed[spd], + linkspeed[fwdev->speed], fwdev->eui.hi, fwdev->eui.lo); } fwdev->dst = node; fwdev->status = FWDEVINIT; - fwdev->speed = spd; /* unchanged ? */ if (bcmp(&csr[0], &fwdev->csrrom[0], sizeof(uint32_t) * 5) == 0) { if (firewire_debug) - printf("node%d: crom unchanged\n", node); + device_printf(fc->dev, "node%d: crom unchanged\n", node); return (0); } @@ -1615,12 +1704,22 @@ fw_explore(struct firewire_comm *fc) for (node = 0; node <= fc->max_node; node ++) { /* We don't probe myself and linkdown nodes */ - if (node == fc->nodeid) + if (node == fc->nodeid) { + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "found myself node(%d) fc->nodeid(%d) fc->max_node(%d)\n", + __func__, node, fc->nodeid, fc->max_node); continue; + } else if (firewire_debug) { + device_printf(fc->bdev, "%s:" + "node(%d) fc->max_node(%d) found\n", + __func__, node, fc->max_node); + } fwsid = fw_find_self_id(fc, node); if (!fwsid || !fwsid->p0.link_active) { if (firewire_debug) - printf("node%d: link down\n", node); + device_printf(fc->bdev, "%s: node%d: link down\n", + __func__, node); continue; } nodes[todo++] = node; @@ -1635,8 +1734,8 @@ fw_explore(struct firewire_comm *fc) if (err) nodes[todo2++] = nodes[i]; if (firewire_debug) - printf("%s: node %d, err = %d\n", - __FUNCTION__, node, err); + device_printf(fc->bdev, "%s: node %d, err = %d\n", + __func__, node, err); } todo = todo2; } @@ -1686,11 +1785,18 @@ fw_attach_dev(struct firewire_comm *fc) fwdev->status = FWDEVATTACHED; } else if (fwdev->status == FWDEVINVAL) { fwdev->rcnt ++; + if (firewire_debug) + device_printf(fc->bdev, "%s:" + "fwdev->rcnt(%d), hold_count(%d)\n", + __func__, fwdev->rcnt, hold_count); if (fwdev->rcnt > hold_count) { /* * Remove devices which have not been seen * for a while. */ + device_printf(fc->bdev, "%s:" + "Removing missing device ID:%08x%08x\n", + __func__, fwdev->eui.hi, fwdev->eui.lo); STAILQ_REMOVE(&fc->devices, fwdev, fw_device, link); free(fwdev, M_FW); @@ -1699,16 +1805,16 @@ fw_attach_dev(struct firewire_comm *fc) } err = device_get_children(fc->bdev, &devlistp, &devcnt); - if( err != 0 ) - return; - for( i = 0 ; i < devcnt ; i++){ - if (device_get_state(devlistp[i]) >= DS_ATTACHED) { - fdc = device_get_softc(devlistp[i]); - if (fdc->post_explore != NULL) - fdc->post_explore(fdc); + if( err == 0 ) { + for( i = 0 ; i < devcnt ; i++){ + if (device_get_state(devlistp[i]) >= DS_ATTACHED) { + fdc = device_get_softc(devlistp[i]); + if (fdc->post_explore != NULL) + fdc->post_explore(fdc); + } } + free(devlistp, M_TEMP); } - free(devlistp, M_TEMP); return; } @@ -1788,8 +1894,9 @@ fw_rcv_copy(struct fw_rcv_buf *rb) for (i = 0; i < rb->nvec; i++, rb->vec++) { len = MIN(rb->vec->iov_len, plen); if (res < len) { - printf("rcv buffer(%d) is %d bytes short.\n", - rb->xfer->recv.pay_len, len - res); + device_printf(rb->fc->bdev, "%s:" + " rcv buffer(%d) is %d bytes short.\n", + __func__, rb->xfer->recv.pay_len, len - res); len = res; } bcopy(rb->vec->iov_base, p, len); @@ -1836,13 +1943,15 @@ fw_rcv(struct fw_rcv_buf *rb) rb->xfer = fw_tl2xfer(rb->fc, fp->mode.hdr.src, fp->mode.hdr.tlrt >> 2, fp->mode.hdr.tcode); if(rb->xfer == NULL) { - printf("fw_rcv: unknown response " - "%s(%x) src=0x%x tl=0x%x rt=%d data=0x%x\n", - tcode_str[tcode], tcode, - fp->mode.hdr.src, - fp->mode.hdr.tlrt >> 2, - fp->mode.hdr.tlrt & 3, - fp->mode.rresq.data); + device_printf(rb->fc->bdev, "%s: " + "unknown response " + "%s(%x) src=0x%x tl=0x%x rt=%d data=0x%x\n", + __func__, + tcode_str[tcode], tcode, + fp->mode.hdr.src, + fp->mode.hdr.tlrt >> 2, + fp->mode.hdr.tlrt & 3, + fp->mode.rresq.data); #if 0 printf("try ad-hoc work around!!\n"); rb->xfer = fw_tl2xfer(rb->fc, fp->mode.hdr.src, @@ -1874,7 +1983,8 @@ fw_rcv(struct fw_rcv_buf *rb) #endif break; default: - printf("unexpected flag 0x%02x\n", rb->xfer->flag); + device_printf(rb->fc->bdev, "%s: " + "unexpected flag 0x%02x\n", __func__, rb->xfer->flag); } return; case FWTCODE_WREQQ: @@ -1885,17 +1995,23 @@ fw_rcv(struct fw_rcv_buf *rb) bind = fw_bindlookup(rb->fc, fp->mode.rreqq.dest_hi, fp->mode.rreqq.dest_lo); if(bind == NULL){ - printf("Unknown service addr 0x%04x:0x%08x %s(%x)" + device_printf(rb->fc->bdev, "%s: " + "Unknown service addr 0x%04x:0x%08x %s(%x)" #if defined(__DragonFly__) || __FreeBSD_version < 500000 - " src=0x%x data=%lx\n", + " src=0x%x data=%lx\n", #else - " src=0x%x data=%x\n", + " src=0x%x data=%x\n", #endif - fp->mode.wreqq.dest_hi, fp->mode.wreqq.dest_lo, - tcode_str[tcode], tcode, - fp->mode.hdr.src, ntohl(fp->mode.wreqq.data)); + __func__, + fp->mode.wreqq.dest_hi, + fp->mode.wreqq.dest_lo, + tcode_str[tcode], tcode, + fp->mode.hdr.src, + ntohl(fp->mode.wreqq.data)); + if (rb->fc->status == FWBUSINIT) { - printf("fw_rcv: cannot respond(bus reset)!\n"); + device_printf(rb->fc->bdev, "%s: cannot respond(bus reset)!\n", + __func__); return; } rb->xfer = fw_xfer_alloc(M_FWXFER); @@ -1941,9 +2057,9 @@ fw_rcv(struct fw_rcv_buf *rb) len += rb->vec[i].iov_len; rb->xfer = STAILQ_FIRST(&bind->xferlist); if (rb->xfer == NULL) { -#if 1 - printf("Discard a packet for this bind.\n"); -#endif + device_printf(rb->fc->bdev, "%s: " + "Discard a packet for this bind.\n", + __func__); return; } STAILQ_REMOVE_HEAD(&bind->xferlist, link); @@ -1994,7 +2110,8 @@ fw_rcv(struct fw_rcv_buf *rb) } #endif default: - printf("fw_rcv: unknow tcode %d\n", tcode); + device_printf(rb->fc->bdev,"%s: unknown tcode %d\n", + __func__, tcode); break; } } @@ -2167,6 +2284,12 @@ fw_crc16(uint32_t *ptr, uint32_t len){ return((uint16_t) crc); } +/* + * Find the root node, if it is not + * Cycle Master Capable, then we should + * override this and become the Cycle + * Master + */ static int fw_bmr(struct firewire_comm *fc) { @@ -2191,13 +2314,13 @@ fw_bmr(struct firewire_comm *fc) } else cmstr = -1; - device_printf(fc->bdev, "bus manager %d ", CSRARC(fc, BUS_MGR_ID)); + device_printf(fc->bdev, "bus manager %d %s\n", + CSRARC(fc, BUS_MGR_ID), + (CSRARC(fc, BUS_MGR_ID) != fc->nodeid) ? "(me)" : ""); if(CSRARC(fc, BUS_MGR_ID) != fc->nodeid) { /* We are not the bus manager */ - printf("\n"); return(0); } - printf("(me)\n"); /* Optimize gapcount */ if(fc->max_hop <= MAX_GAPHOP ) Modified: projects/jbuild/sys/dev/firewire/firewire.h ============================================================================== --- projects/jbuild/sys/dev/firewire/firewire.h Sat Feb 28 17:56:25 2009 (r189181) +++ projects/jbuild/sys/dev/firewire/firewire.h Sat Feb 28 17:57:08 2009 (r189182) @@ -99,9 +99,16 @@ struct fw_reg_req_t { #define FWRCODE_ER_TYPE 6 #define FWRCODE_ER_ADDR 7 +/* + * Defined 1394a-2000 + * Table 5B-1 + */ #define FWSPD_S100 0 #define FWSPD_S200 1 #define FWSPD_S400 2 +#define FWSPD_S800 3 +#define FWSPD_S1600 4 +#define FWSPD_S3200 5 #define FWP_TL_VALID (1 << 7) @@ -277,10 +284,18 @@ struct fw_devlstreq { struct fw_devinfo dev[FW_MAX_DEVLST]; }; +/* + * Defined in IEEE 1394a-2000 + * 4.3.4.1 + */ #define FW_SELF_ID_PORT_CONNECTED_TO_CHILD 3 #define FW_SELF_ID_PORT_CONNECTED_TO_PARENT 2 #define FW_SELF_ID_PORT_NOT_CONNECTED 1 #define FW_SELF_ID_PORT_NOT_EXISTS 0 + +#define FW_SELF_ID_PAGE0 0 +#define FW_SELF_ID_PAGE1 1 + #if BYTE_ORDER == BIG_ENDIAN union fw_self_id { struct { @@ -290,7 +305,7 @@ union fw_self_id { link_active:1, gap_count:6, phy_speed:2, - phy_delay:2, + reserved:2, contender:1, power_class:3, port0:2, @@ -305,18 +320,32 @@ union fw_self_id { phy_id:6, sequel:1, sequence_num:3, - :2, - porta:2, - portb:2, - portc:2, - portd:2, - porte:2, - portf:2, - portg:2, - porth:2, - :1, + reserved2:2, + port3:2, + port4:2, + port5:2, + port6:2, + port7:2, + port8:2, + port9:2, + port10:2, + reserved1:1, more_packets:1; } p1; + struct { + uint32_t + id:2, + phy_id:6, + sequel:1, + sequence_num:3, + :2, + port11:2, + port12:2, + port13:2, + port14:2, + port15:2, + :8; + } p2; }; #else union fw_self_id { @@ -328,7 +357,7 @@ union fw_self_id { port0:2, power_class:3, contender:1, - phy_delay:2, + reserved:2, phy_speed:2, gap_count:6, link_active:1, @@ -339,20 +368,34 @@ union fw_self_id { struct { uint32_t more_packets:1, reserved1:1, - porth:2, - portg:2, - portf:2, - porte:2, - portd:2, - portc:2, - portb:2, - porta:2, + port10:2, + port9:2, + port8:2, + port7:2, + port6:2, + port5:2, + port4:2, + port3:2, reserved2:2, sequence_num:3, sequel:1, phy_id:6, id:2; } p1; + struct { + uint32_t + reserved3:8, + port15:2, + port14:2, + port13:2, + port12:2, + port11:2, + reserved4:2, + sequence_num:3, + sequel:1, + phy_id:6, + id:2; + } p2; }; #endif Modified: projects/jbuild/sys/dev/firewire/fwohci.c ============================================================================== --- projects/jbuild/sys/dev/firewire/fwohci.c Sat Feb 28 17:56:25 2009 (r189181) +++ projects/jbuild/sys/dev/firewire/fwohci.c Sat Feb 28 17:57:08 2009 (r189182) @@ -306,8 +306,8 @@ fwohci_set_bus_manager(struct firewire_c if((bm & 0x3f) == 0x3f) bm = node; if (firewire_debug) - device_printf(sc->fc.dev, - "fw_set_bus_manager: %d->%d (loop=%d)\n", bm, node, i); + device_printf(sc->fc.dev, "%s: %d->%d (loop=%d)\n", + __func__, bm, node, i); return(bm); } @@ -332,7 +332,7 @@ again: } if(i >= MAX_RETRY) { if (firewire_debug) - device_printf(sc->fc.dev, "phy read failed(1).\n"); + device_printf(sc->fc.dev, "%s: failed(1).\n", __func__); if (++retry < MAX_RETRY) { DELAY(100); goto again; @@ -343,15 +343,16 @@ again: if ((stat & OHCI_INT_REG_FAIL) != 0 || ((fun >> PHYDEV_REGADDR) & 0xf) != addr) { if (firewire_debug) - device_printf(sc->fc.dev, "phy read failed(2).\n"); + device_printf(sc->fc.dev, "%s: failed(2).\n", __func__); if (++retry < MAX_RETRY) { DELAY(100); goto again; } } - if (firewire_debug || retry >= MAX_RETRY) + if (firewire_debug > 1 || retry >= MAX_RETRY) device_printf(sc->fc.dev, - "fwphy_rddata: 0x%x loop=%d, retry=%d\n", addr, i, retry); + "%s:: 0x%x loop=%d, retry=%d\n", + __func__, addr, i, retry); #undef MAX_RETRY return((fun >> PHYDEV_RDDATA )& 0xff); } @@ -1003,7 +1004,7 @@ again: if (maxdesc < db_tr->dbcnt) { maxdesc = db_tr->dbcnt; if (firewire_debug) - device_printf(sc->fc.dev, "maxdesc: %d\n", maxdesc); + device_printf(sc->fc.dev, "%s: maxdesc %d\n", __func__, maxdesc); } /* last db */ LAST_DB(db_tr, db); @@ -1842,12 +1843,13 @@ fwohci_intr_core(struct fwohci_softc *sc struct firewire_comm *fc = (struct firewire_comm *)sc; uint32_t node_id, plen; + FW_GLOCK_ASSERT(fc); if ((stat & OHCI_INT_PHY_BUS_R) && (fc->status != FWBUSRESET)) { fc->status = FWBUSRESET; /* Disable bus reset interrupt until sid recv. */ OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); - device_printf(fc->dev, "BUS reset\n"); + device_printf(fc->dev, "%s: BUS reset\n", __func__); OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); @@ -1884,10 +1886,11 @@ fwohci_intr_core(struct fwohci_softc *sc plen = OREAD(sc, OHCI_SID_CNT); fc->nodeid = node_id & 0x3f; - device_printf(fc->dev, "node_id=0x%08x, gen=%d, ", - node_id, (plen >> 16) & 0xff); + device_printf(fc->dev, "%s: node_id=0x%08x, SelfID Count=%d, ", + __func__, fc->nodeid, (plen >> 16) & 0xff); if (!(node_id & OHCI_NODE_VALID)) { - printf("Bus reset failure\n"); + device_printf(fc->dev, "%s: Bus reset failure\n", + __func__); goto sidout; } @@ -1996,9 +1999,11 @@ fwohci_task_busreset(void *arg, int pend { struct fwohci_softc *sc = (struct fwohci_softc *)arg; + FW_GLOCK(&sc->fc); fw_busreset(&sc->fc, FWBUSRESET); OWRITE(sc, OHCI_CROMHDR, ntohl(sc->fc.config_rom[0])); OWRITE(sc, OHCI_BUS_OPT, ntohl(sc->fc.config_rom[2])); + FW_GUNLOCK(&sc->fc); } static void @@ -2010,6 +2015,10 @@ fwohci_task_sid(void *arg, int pending) int i, plen; + /* + * We really should have locking + * here. Not sure why it's not + */ plen = OREAD(sc, OHCI_SID_CNT); if (plen & OHCI_SID_ERR) { @@ -2029,14 +2038,13 @@ fwohci_task_sid(void *arg, int pending) } for (i = 0; i < plen / 4; i ++) buf[i] = FWOHCI_DMA_READ(sc->sid_buf[i+1]); -#if 1 /* XXX needed?? */ + /* pending all pre-bus_reset packets */ fwohci_txd(sc, &sc->atrq); fwohci_txd(sc, &sc->atrs); fwohci_arcv(sc, &sc->arrs, -1); fwohci_arcv(sc, &sc->arrq, -1); fw_drain_txq(fc); -#endif fw_sidrcv(fc, buf, plen); free(buf, M_FW); } @@ -2061,6 +2069,7 @@ fwohci_check_stat(struct fwohci_softc *s { uint32_t stat, irstat, itstat; + FW_GLOCK_ASSERT(&sc->fc); stat = OREAD(sc, FWOHCI_INTSTAT); if (stat == 0xffffffff) { device_printf(sc->fc.dev, @@ -2090,29 +2099,24 @@ fwohci_check_stat(struct fwohci_softc *s return (FILTER_HANDLED); } -int -fwohci_filt(void *arg) -{ - struct fwohci_softc *sc = (struct fwohci_softc *)arg; - - if (!(sc->intmask & OHCI_INT_EN)) { - /* polling mode */ - return (FILTER_STRAY); - } - return (fwohci_check_stat(sc)); -} - void fwohci_intr(void *arg) { - fwohci_filt(arg); + struct fwohci_softc *sc = (struct fwohci_softc *)arg; + + FW_GLOCK(&sc->fc); + fwohci_check_stat(sc); + FW_GUNLOCK(&sc->fc); } void fwohci_poll(struct firewire_comm *fc, int quick, int count) { struct fwohci_softc *sc = (struct fwohci_softc *)fc; + + FW_GLOCK(fc); fwohci_check_stat(sc); + FW_GUNLOCK(fc); } static void @@ -2466,6 +2470,7 @@ fwohci_ibr(struct firewire_comm *fc) device_printf(fc->dev, "Initiate bus reset\n"); sc = (struct fwohci_softc *)fc; + FW_GLOCK(fc); /* * Make sure our cached values from the config rom are * initialised. @@ -2486,6 +2491,7 @@ fwohci_ibr(struct firewire_comm *fc) fun |= FW_PHY_ISBR | FW_PHY_RHB; fun = fwphy_wrdata(sc, FW_PHY_ISBR_REG, fun); #endif + FW_GUNLOCK(fc); } void @@ -2973,7 +2979,7 @@ err: db_tr = STAILQ_NEXT(db_tr, link); resCount = FWOHCI_DMA_READ(db_tr->db[0].db.desc.res) & OHCI_COUNT_MASK; - } while (resCount == 0) + } printf(" done\n"); dbch->top = db_tr; dbch->buf_offset = dbch->xferq.psize - resCount; Modified: projects/jbuild/sys/dev/firewire/fwohci_pci.c ============================================================================== --- projects/jbuild/sys/dev/firewire/fwohci_pci.c Sat Feb 28 17:56:25 2009 (r189181) +++ projects/jbuild/sys/dev/firewire/fwohci_pci.c Sat Feb 28 17:57:08 2009 (r189182) @@ -334,14 +334,11 @@ fwohci_pci_attach(device_t self) return ENXIO; } - err = bus_setup_intr(self, sc->irq_res, - INTR_TYPE_NET | INTR_MPSAFE, -#if FWOHCI_INTFILT - fwohci_filt, NULL, sc, &sc->ih); -#else - NULL, (driver_intr_t *) fwohci_intr, sc, &sc->ih); -#endif + INTR_TYPE_NET | INTR_MPSAFE, + NULL, (driver_intr_t *) fwohci_intr, + sc, &sc->ih); + #if defined(__DragonFly__) || __FreeBSD_version < 500000 /* XXX splcam() should mask this irq for sbp.c*/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:57:24 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9D731065761; Sat, 28 Feb 2009 17:57:22 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E752F8FC08; Sat, 28 Feb 2009 17:57:21 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHvLBS017192; Sat, 28 Feb 2009 17:57:21 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHvLJC017185; Sat, 28 Feb 2009 17:57:21 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281757.n1SHvLJC017185@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189183 - projects/jbuild/sys/dev/ppc X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:57:26 -0000 Author: jb Date: Sat Feb 28 17:57:21 2009 New Revision: 189183 URL: http://svn.freebsd.org/changeset/base/189183 Log: MFC Modified: projects/jbuild/sys/dev/ppc/ppc.c projects/jbuild/sys/dev/ppc/ppc_acpi.c projects/jbuild/sys/dev/ppc/ppc_isa.c projects/jbuild/sys/dev/ppc/ppc_pci.c projects/jbuild/sys/dev/ppc/ppc_puc.c projects/jbuild/sys/dev/ppc/ppcreg.h projects/jbuild/sys/dev/ppc/ppcvar.h Modified: projects/jbuild/sys/dev/ppc/ppc.c ============================================================================== --- projects/jbuild/sys/dev/ppc/ppc.c Sat Feb 28 17:57:08 2009 (r189182) +++ projects/jbuild/sys/dev/ppc/ppc.c Sat Feb 28 17:57:21 2009 (r189183) @@ -34,9 +34,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include @@ -113,29 +115,30 @@ static char *ppc_epp_protocol[] = { " (E /* * ppc_ecp_sync() XXX */ -void +int ppc_ecp_sync(device_t dev) { int i, r; struct ppc_data *ppc = DEVTOSOFTC(dev); + PPC_ASSERT_LOCKED(ppc); if (!(ppc->ppc_avm & PPB_ECP) && !(ppc->ppc_dtm & PPB_ECP)) - return; + return 0; r = r_ecr(ppc); if ((r & 0xe0) != PPC_ECR_EPP) - return; + return 0; for (i = 0; i < 100; i++) { r = r_ecr(ppc); if (r & 0x1) - return; + return 0; DELAY(100); } device_printf(dev, "ECP sync failed as data still present in FIFO.\n"); - return; + return 0; } /* @@ -474,7 +477,7 @@ ppc_pc873xx_detect(struct ppc_data *ppc, /* First try to change the port address to that requested... */ - switch(ppc->ppc_base) { + switch (ppc->ppc_base) { case 0x378: val &= 0xfc; break; @@ -1320,6 +1323,7 @@ ppc_exec_microseq(device_t dev, struct p #define INCR_PC (mi ++) /* increment program counter */ + PPC_ASSERT_LOCKED(ppc); mi = *p_msq; for (;;) { switch (mi->opcode) { @@ -1388,8 +1392,11 @@ ppc_exec_microseq(device_t dev, struct p break; case MS_OP_ADELAY: - if (mi->arg[0].i) + if (mi->arg[0].i) { + PPC_UNLOCK(ppc); pause("ppbdelay", mi->arg[0].i * (hz/1000)); + PPC_LOCK(ppc); + } INCR_PC; break; @@ -1521,8 +1528,10 @@ ppcintr(void *arg) * XXX: If DMA is in progress should we just complete that w/o * doing this? */ - if (ppc->ppc_child_handlers > 0) { - intr_event_execute_handlers(curproc, ppc->ppc_intr_event); + PPC_LOCK(ppc); + if (ppc->ppc_intr_hook != NULL && + ppc->ppc_intr_hook(ppc->ppc_intr_arg) == 0) { + PPC_UNLOCK(ppc); return; } @@ -1536,6 +1545,7 @@ ppcintr(void *arg) /* don't use ecp mode with IRQENABLE set */ if (ctr & IRQENABLE) { + PPC_UNLOCK(ppc); return; } @@ -1550,6 +1560,7 @@ ppcintr(void *arg) ppc->ppc_irqstat &= ~PPC_IRQ_nFAULT; } else { /* shall be handled by underlying layers XXX */ + PPC_UNLOCK(ppc); return; } } @@ -1585,6 +1596,7 @@ ppcintr(void *arg) /* classic interrupt I/O */ ppc->ppc_irqstat &= ~PPC_IRQ_FIFO; } + PPC_UNLOCK(ppc); return; } @@ -1601,14 +1613,15 @@ ppc_write(device_t dev, char *buf, int l return (EINVAL); } -void +int ppc_reset_epp(device_t dev) { struct ppc_data *ppc = DEVTOSOFTC(dev); + PPC_ASSERT_LOCKED(ppc); ppc_reset_epp_timeout(ppc); - return; + return 0; } int @@ -1616,6 +1629,7 @@ ppc_setmode(device_t dev, int mode) { struct ppc_data *ppc = DEVTOSOFTC(dev); + PPC_ASSERT_LOCKED(ppc); switch (ppc->ppc_type) { case PPC_TYPE_SMCLIKE: return (ppc_smclike_setmode(ppc, mode)); @@ -1796,9 +1810,10 @@ int ppc_attach(device_t dev) { struct ppc_data *ppc = DEVTOSOFTC(dev); - device_t ppbus; int error; + mtx_init(&ppc->ppc_lock, device_get_nameunit(dev), "ppc", MTX_DEF); + device_printf(dev, "%s chipset (%s) in %s mode%s\n", ppc_models[ppc->ppc_model], ppc_avms[ppc->ppc_avm], ppc_modes[ppc->ppc_mode], (PPB_IS_EPP(ppc->ppc_mode)) ? @@ -1809,36 +1824,25 @@ ppc_attach(device_t dev) ppc->ppc_fifo, ppc->ppc_wthr, ppc->ppc_rthr); if (ppc->res_irq) { - /* - * Create an interrupt event to manage the handlers of - * child devices. - */ - error = intr_event_create(&ppc->ppc_intr_event, ppc, 0, -1, - NULL, NULL, NULL, NULL, "%s:", device_get_nameunit(dev)); - if (error) { - device_printf(dev, - "failed to create interrupt event: %d\n", error); - return (error); - } - /* default to the tty mask for registration */ /* XXX */ - error = bus_setup_intr(dev, ppc->res_irq, INTR_TYPE_TTY, - NULL, ppcintr, ppc, &ppc->intr_cookie); + error = bus_setup_intr(dev, ppc->res_irq, INTR_TYPE_TTY | + INTR_MPSAFE, NULL, ppcintr, ppc, &ppc->intr_cookie); if (error) { device_printf(dev, "failed to register interrupt handler: %d\n", error); + mtx_destroy(&ppc->ppc_lock); return (error); } } /* add ppbus as a child of this isa to parallel bridge */ - ppbus = device_add_child(dev, "ppbus", -1); + ppc->ppbus = device_add_child(dev, "ppbus", -1); /* * Probe the ppbus and attach devices found. */ - device_probe_and_attach(ppbus); + device_probe_and_attach(ppc->ppbus); return (0); } @@ -1876,6 +1880,8 @@ ppc_detach(device_t dev) ppc->res_drq); } + mtx_destroy(&ppc->ppc_lock); + return (0); } @@ -1884,6 +1890,7 @@ ppc_io(device_t ppcdev, int iop, u_char { struct ppc_data *ppc = DEVTOSOFTC(ppcdev); + PPC_ASSERT_LOCKED(ppc); switch (iop) { case PPB_OUTSB_EPP: bus_write_multi_1(ppc->res_ioport, PPC_EPP_DATA, addr, cnt); @@ -1953,8 +1960,38 @@ ppc_read_ivar(device_t bus, device_t dev switch (index) { case PPC_IVAR_EPP_PROTO: + PPC_ASSERT_LOCKED(ppc); *val = (u_long)ppc->ppc_epp; break; + case PPC_IVAR_LOCK: + *val = (uintptr_t)&ppc->ppc_lock; + break; + default: + return (ENOENT); + } + + return (0); +} + +int +ppc_write_ivar(device_t bus, device_t dev, int index, uintptr_t val) +{ + struct ppc_data *ppc = (struct ppc_data *)device_get_softc(bus); + + switch (index) { + case PPC_IVAR_INTR_HANDLER: + PPC_ASSERT_LOCKED(ppc); + if (dev != ppc->ppbus) + return (EINVAL); + if (val == 0) { + ppc->ppc_intr_hook = NULL; + break; + } + if (ppc->ppc_intr_hook != NULL) + return (EBUSY); + ppc->ppc_intr_hook = (void *)val; + ppc->ppc_intr_arg = device_get_softc(dev); + break; default: return (ENOENT); } @@ -2001,47 +2038,4 @@ ppc_release_resource(device_t bus, devic return (EINVAL); } -/* - * If a child wants to add a handler for our IRQ, add it to our interrupt - * event. Otherwise, fail the request. - */ -int -ppc_setup_intr(device_t bus, device_t child, struct resource *r, int flags, - driver_filter_t *filt, void (*ihand)(void *), void *arg, void **cookiep) -{ - struct ppc_data *ppc = DEVTOSOFTC(bus); - int error; - - if (r != ppc->res_irq) - return (EINVAL); - - /* We don't allow filters. */ - if (filt != NULL) - return (EINVAL); - - error = intr_event_add_handler(ppc->ppc_intr_event, - device_get_nameunit(child), NULL, ihand, arg, intr_priority(flags), - flags, cookiep); - if (error == 0) - ppc->ppc_child_handlers++; - return (error); -} - -int -ppc_teardown_intr(device_t bus, device_t child, struct resource *r, void *cookie) -{ - struct ppc_data *ppc = DEVTOSOFTC(bus); - int error; - - if (r != ppc->res_irq) - return (EINVAL); - - KASSERT(intr_handler_source(cookie) == ppc, - ("ppc_teardown_intr: source mismatch")); - error = intr_event_remove_handler(cookie); - if (error == 0) - ppc->ppc_child_handlers--; - return (error); -} - MODULE_DEPEND(ppc, ppbus, 1, 1, 1); Modified: projects/jbuild/sys/dev/ppc/ppc_acpi.c ============================================================================== --- projects/jbuild/sys/dev/ppc/ppc_acpi.c Sat Feb 28 17:57:08 2009 (r189182) +++ projects/jbuild/sys/dev/ppc/ppc_acpi.c Sat Feb 28 17:57:21 2009 (r189183) @@ -63,8 +63,7 @@ static device_method_t ppc_acpi_methods[ /* bus interface */ DEVMETHOD(bus_read_ivar, ppc_read_ivar), - DEVMETHOD(bus_setup_intr, ppc_setup_intr), - DEVMETHOD(bus_teardown_intr, ppc_teardown_intr), + DEVMETHOD(bus_write_ivar, ppc_write_ivar), DEVMETHOD(bus_alloc_resource, ppc_alloc_resource), DEVMETHOD(bus_release_resource, ppc_release_resource), Modified: projects/jbuild/sys/dev/ppc/ppc_isa.c ============================================================================== --- projects/jbuild/sys/dev/ppc/ppc_isa.c Sat Feb 28 17:57:08 2009 (r189182) +++ projects/jbuild/sys/dev/ppc/ppc_isa.c Sat Feb 28 17:57:21 2009 (r189183) @@ -32,7 +32,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include @@ -56,12 +58,11 @@ static device_method_t ppc_isa_methods[] /* device interface */ DEVMETHOD(device_probe, ppc_isa_probe), DEVMETHOD(device_attach, ppc_isa_attach), - DEVMETHOD(device_detach, ppc_attach), + DEVMETHOD(device_detach, ppc_detach), /* bus interface */ DEVMETHOD(bus_read_ivar, ppc_read_ivar), - DEVMETHOD(bus_setup_intr, ppc_setup_intr), - DEVMETHOD(bus_teardown_intr, ppc_teardown_intr), + DEVMETHOD(bus_write_ivar, ppc_write_ivar), DEVMETHOD(bus_alloc_resource, ppc_alloc_resource), DEVMETHOD(bus_release_resource, ppc_release_resource), @@ -143,6 +144,7 @@ ppc_isa_write(device_t dev, char *buf, i int s, error = 0; int spin; + PPC_ASSERT_LOCKED(ppc); if (!(ppc->ppc_avm & PPB_ECP)) return (EINVAL); if (ppc->ppc_dmachan == 0) @@ -215,7 +217,8 @@ ppc_isa_write(device_t dev, char *buf, i */ do { /* release CPU */ - error = tsleep(ppc, PPBPRI | PCATCH, "ppcdma", 0); + error = mtx_sleep(ppc, &ppc->ppc_lock, PPBPRI | PCATCH, + "ppcdma", 0); } while (error == EWOULDBLOCK); splx(s); @@ -244,7 +247,8 @@ ppc_isa_write(device_t dev, char *buf, i #ifdef PPC_DEBUG printf("Z"); #endif - error = tsleep(ppc, PPBPRI | PCATCH, "ppcfifo", hz/100); + error = mtx_sleep(ppc, &ppc->ppc_lock, PPBPRI | PCATCH, + "ppcfifo", hz / 100); if (error != EWOULDBLOCK) { #ifdef PPC_DEBUG printf("I"); Modified: projects/jbuild/sys/dev/ppc/ppc_pci.c ============================================================================== --- projects/jbuild/sys/dev/ppc/ppc_pci.c Sat Feb 28 17:57:08 2009 (r189182) +++ projects/jbuild/sys/dev/ppc/ppc_pci.c Sat Feb 28 17:57:21 2009 (r189183) @@ -53,8 +53,7 @@ static device_method_t ppc_pci_methods[] /* bus interface */ DEVMETHOD(bus_read_ivar, ppc_read_ivar), - DEVMETHOD(bus_setup_intr, ppc_setup_intr), - DEVMETHOD(bus_teardown_intr, ppc_teardown_intr), + DEVMETHOD(bus_write_ivar, ppc_write_ivar), DEVMETHOD(bus_alloc_resource, ppc_alloc_resource), DEVMETHOD(bus_release_resource, ppc_release_resource), @@ -85,6 +84,7 @@ struct pci_id { static struct pci_id pci_ids[] = { { 0x1020131f, "SIIG Cyber Parallel PCI (10x family)", 0x18 }, { 0x2020131f, "SIIG Cyber Parallel PCI (20x family)", 0x10 }, + { 0x05111407, "Lava SP BIDIR Parallel PCI", 0x10 }, { 0x80001407, "Lava Computers 2SP-PCI parallel port", 0x10 }, { 0x84031415, "Oxford Semiconductor OX12PCI840 Parallel port", 0x10 }, { 0x95131415, "Oxford Semiconductor OX16PCI954 Parallel port", 0x10 }, Modified: projects/jbuild/sys/dev/ppc/ppc_puc.c ============================================================================== --- projects/jbuild/sys/dev/ppc/ppc_puc.c Sat Feb 28 17:57:08 2009 (r189182) +++ projects/jbuild/sys/dev/ppc/ppc_puc.c Sat Feb 28 17:57:21 2009 (r189183) @@ -55,8 +55,7 @@ static device_method_t ppc_puc_methods[] /* bus interface */ DEVMETHOD(bus_read_ivar, ppc_read_ivar), - DEVMETHOD(bus_setup_intr, ppc_setup_intr), - DEVMETHOD(bus_teardown_intr, ppc_teardown_intr), + DEVMETHOD(bus_write_ivar, ppc_write_ivar), DEVMETHOD(bus_alloc_resource, ppc_alloc_resource), DEVMETHOD(bus_release_resource, ppc_release_resource), Modified: projects/jbuild/sys/dev/ppc/ppcreg.h ============================================================================== --- projects/jbuild/sys/dev/ppc/ppcreg.h Sat Feb 28 17:57:08 2009 (r189182) +++ projects/jbuild/sys/dev/ppc/ppcreg.h Sat Feb 28 17:57:21 2009 (r189183) @@ -29,6 +29,9 @@ #ifndef __PPCREG_H #define __PPCREG_H +#include +#include + /* * Parallel Port Chipset type. */ @@ -108,10 +111,16 @@ struct ppc_data { void *intr_cookie; - struct intr_event *ppc_intr_event; - int ppc_child_handlers; + ppc_intr_handler ppc_intr_hook; + void *ppc_intr_arg; + + struct mtx ppc_lock; }; +#define PPC_LOCK(data) mtx_lock(&(data)->ppc_lock) +#define PPC_UNLOCK(data) mtx_unlock(&(data)->ppc_lock) +#define PPC_ASSERT_LOCKED(data) mtx_assert(&(data)->ppc_lock, MA_OWNED) + /* * Parallel Port Chipset registers. */ Modified: projects/jbuild/sys/dev/ppc/ppcvar.h ============================================================================== --- projects/jbuild/sys/dev/ppc/ppcvar.h Sat Feb 28 17:57:08 2009 (r189182) +++ projects/jbuild/sys/dev/ppc/ppcvar.h Sat Feb 28 17:57:21 2009 (r189183) @@ -32,6 +32,7 @@ int ppc_probe(device_t dev, int rid); int ppc_attach(device_t dev); int ppc_detach(device_t dev); int ppc_read_ivar(device_t bus, device_t dev, int index, uintptr_t *val); +int ppc_write_ivar(device_t bus, device_t dev, int index, uintptr_t val); int ppc_read(device_t, char *, int, int); int ppc_write(device_t, char *, int, int); @@ -39,15 +40,12 @@ int ppc_write(device_t, char *, int, int u_char ppc_io(device_t, int, u_char *, int, u_char); int ppc_exec_microseq(device_t, struct ppb_microseq **); -int ppc_setup_intr(device_t, device_t, struct resource *, int, - driver_filter_t *filt, void (*)(void *), void *, void **); -int ppc_teardown_intr(device_t, device_t, struct resource *, void *); struct resource *ppc_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); int ppc_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); -void ppc_reset_epp(device_t); -void ppc_ecp_sync(device_t); +int ppc_reset_epp(device_t); +int ppc_ecp_sync(device_t); int ppc_setmode(device_t, int); extern devclass_t ppc_devclass; From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:57:46 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30BF0106568C; Sat, 28 Feb 2009 17:57:46 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E27D8FC19; Sat, 28 Feb 2009 17:57:46 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHvkku017254; Sat, 28 Feb 2009 17:57:46 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHvj46017248; Sat, 28 Feb 2009 17:57:45 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281757.n1SHvj46017248@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189184 - projects/jbuild/sys/dev/mpt X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:57:46 -0000 Author: jb Date: Sat Feb 28 17:57:45 2009 New Revision: 189184 URL: http://svn.freebsd.org/changeset/base/189184 Log: MFC Modified: projects/jbuild/sys/dev/mpt/mpt.c projects/jbuild/sys/dev/mpt/mpt.h projects/jbuild/sys/dev/mpt/mpt_cam.c projects/jbuild/sys/dev/mpt/mpt_raid.c projects/jbuild/sys/dev/mpt/mpt_user.c Modified: projects/jbuild/sys/dev/mpt/mpt.c ============================================================================== --- projects/jbuild/sys/dev/mpt/mpt.c Sat Feb 28 17:57:21 2009 (r189183) +++ projects/jbuild/sys/dev/mpt/mpt.c Sat Feb 28 17:57:45 2009 (r189184) @@ -1637,7 +1637,7 @@ mpt_read_extcfg_header(struct mpt_softc rslt->PageVersion = cfgp->Header.PageVersion; rslt->PageNumber = cfgp->Header.PageNumber; rslt->PageType = cfgp->Header.PageType; - rslt->ExtPageLength = cfgp->ExtPageLength; + rslt->ExtPageLength = le16toh(cfgp->ExtPageLength); rslt->ExtPageType = cfgp->ExtPageType; error = 0; break; @@ -1668,7 +1668,7 @@ mpt_read_extcfg_page(struct mpt_softc *m req = mpt_get_request(mpt, sleep_ok); if (req == NULL) { - mpt_prt(mpt, "mpt_read_cfg_page: Get request failed!\n"); + mpt_prt(mpt, "mpt_read_extcfg_page: Get request failed!\n"); return (-1); } @@ -2025,6 +2025,7 @@ mpt_read_config_info_ioc(struct mpt_soft mpt_raid_free_mem(mpt); return (EIO); } + mpt2host_config_page_ioc3(mpt->ioc_page3); mpt_raid_wakeup(mpt); return (0); } @@ -2760,6 +2761,7 @@ mpt_enable_ioc(struct mpt_softc *mpt, in void mpt2host_sge_simple_union(SGE_SIMPLE_UNION *sge) { + MPT_2_HOST32(sge, FlagsLength); MPT_2_HOST32(sge, u.Address64.Low); MPT_2_HOST32(sge, u.Address64.High); @@ -2768,6 +2770,7 @@ mpt2host_sge_simple_union(SGE_SIMPLE_UNI void mpt2host_iocfacts_reply(MSG_IOC_FACTS_REPLY *rp) { + MPT_2_HOST16(rp, MsgVersion); MPT_2_HOST16(rp, HeaderVersion); MPT_2_HOST32(rp, MsgContext); @@ -2794,6 +2797,7 @@ mpt2host_iocfacts_reply(MSG_IOC_FACTS_RE void mpt2host_portfacts_reply(MSG_PORT_FACTS_REPLY *pfp) { + MPT_2_HOST16(pfp, Reserved); MPT_2_HOST16(pfp, Reserved1); MPT_2_HOST32(pfp, MsgContext); @@ -2809,20 +2813,139 @@ mpt2host_portfacts_reply(MSG_PORT_FACTS_ MPT_2_HOST16(pfp, Reserved4); MPT_2_HOST32(pfp, Reserved5); } + void mpt2host_config_page_ioc2(CONFIG_PAGE_IOC_2 *ioc2) { int i; - ioc2->CapabilitiesFlags = htole32(ioc2->CapabilitiesFlags); + + MPT_2_HOST32(ioc2, CapabilitiesFlags); for (i = 0; i < MPI_IOC_PAGE_2_RAID_VOLUME_MAX; i++) { MPT_2_HOST16(ioc2, RaidVolume[i].Reserved3); } } void +mpt2host_config_page_ioc3(CONFIG_PAGE_IOC_3 *ioc3) +{ + + MPT_2_HOST16(ioc3, Reserved2); +} + +void +mpt2host_config_page_scsi_port_0(CONFIG_PAGE_SCSI_PORT_0 *sp0) +{ + + MPT_2_HOST32(sp0, Capabilities); + MPT_2_HOST32(sp0, PhysicalInterface); +} + +void +mpt2host_config_page_scsi_port_1(CONFIG_PAGE_SCSI_PORT_1 *sp1) +{ + + MPT_2_HOST32(sp1, Configuration); + MPT_2_HOST32(sp1, OnBusTimerValue); + MPT_2_HOST16(sp1, IDConfig); +} + +void +host2mpt_config_page_scsi_port_1(CONFIG_PAGE_SCSI_PORT_1 *sp1) +{ + + HOST_2_MPT32(sp1, Configuration); + HOST_2_MPT32(sp1, OnBusTimerValue); + HOST_2_MPT16(sp1, IDConfig); +} + +void +mpt2host_config_page_scsi_port_2(CONFIG_PAGE_SCSI_PORT_2 *sp2) +{ + int i; + + MPT_2_HOST32(sp2, PortFlags); + MPT_2_HOST32(sp2, PortSettings); + for (i = 0; i < sizeof(sp2->DeviceSettings) / + sizeof(*sp2->DeviceSettings); i++) { + MPT_2_HOST16(sp2, DeviceSettings[i].DeviceFlags); + } +} + +void +mpt2host_config_page_scsi_device_0(CONFIG_PAGE_SCSI_DEVICE_0 *sd0) +{ + + MPT_2_HOST32(sd0, NegotiatedParameters); + MPT_2_HOST32(sd0, Information); +} + +void +mpt2host_config_page_scsi_device_1(CONFIG_PAGE_SCSI_DEVICE_1 *sd1) +{ + + MPT_2_HOST32(sd1, RequestedParameters); + MPT_2_HOST32(sd1, Reserved); + MPT_2_HOST32(sd1, Configuration); +} + +void +host2mpt_config_page_scsi_device_1(CONFIG_PAGE_SCSI_DEVICE_1 *sd1) +{ + + HOST_2_MPT32(sd1, RequestedParameters); + HOST_2_MPT32(sd1, Reserved); + HOST_2_MPT32(sd1, Configuration); +} + +void +mpt2host_config_page_fc_port_0(CONFIG_PAGE_FC_PORT_0 *fp0) +{ + + MPT_2_HOST32(fp0, Flags); + MPT_2_HOST32(fp0, PortIdentifier); + MPT_2_HOST32(fp0, WWNN.Low); + MPT_2_HOST32(fp0, WWNN.High); + MPT_2_HOST32(fp0, WWPN.Low); + MPT_2_HOST32(fp0, WWPN.High); + MPT_2_HOST32(fp0, SupportedServiceClass); + MPT_2_HOST32(fp0, SupportedSpeeds); + MPT_2_HOST32(fp0, CurrentSpeed); + MPT_2_HOST32(fp0, MaxFrameSize); + MPT_2_HOST32(fp0, FabricWWNN.Low); + MPT_2_HOST32(fp0, FabricWWNN.High); + MPT_2_HOST32(fp0, FabricWWPN.Low); + MPT_2_HOST32(fp0, FabricWWPN.High); + MPT_2_HOST32(fp0, DiscoveredPortsCount); + MPT_2_HOST32(fp0, MaxInitiators); +} + +void +mpt2host_config_page_fc_port_1(CONFIG_PAGE_FC_PORT_1 *fp1) +{ + + MPT_2_HOST32(fp1, Flags); + MPT_2_HOST32(fp1, NoSEEPROMWWNN.Low); + MPT_2_HOST32(fp1, NoSEEPROMWWNN.High); + MPT_2_HOST32(fp1, NoSEEPROMWWPN.Low); + MPT_2_HOST32(fp1, NoSEEPROMWWPN.High); +} + +void +host2mpt_config_page_fc_port_1(CONFIG_PAGE_FC_PORT_1 *fp1) +{ + + HOST_2_MPT32(fp1, Flags); + HOST_2_MPT32(fp1, NoSEEPROMWWNN.Low); + HOST_2_MPT32(fp1, NoSEEPROMWWNN.High); + HOST_2_MPT32(fp1, NoSEEPROMWWPN.Low); + HOST_2_MPT32(fp1, NoSEEPROMWWPN.High); +} + +void mpt2host_config_page_raid_vol_0(CONFIG_PAGE_RAID_VOL_0 *volp) { int i; + MPT_2_HOST16(volp, VolumeStatus.Reserved); MPT_2_HOST16(volp, VolumeSettings.Settings); MPT_2_HOST32(volp, MaxLBA); @@ -2836,8 +2959,21 @@ mpt2host_config_page_raid_vol_0(CONFIG_P } void +mpt2host_config_page_raid_phys_disk_0(CONFIG_PAGE_RAID_PHYS_DISK_0 *rpd0) +{ + + MPT_2_HOST32(rpd0, Reserved1); + MPT_2_HOST16(rpd0, PhysDiskStatus.Reserved); + MPT_2_HOST32(rpd0, MaxLBA); + MPT_2_HOST16(rpd0, ErrorData.Reserved); + MPT_2_HOST16(rpd0, ErrorData.ErrorCount); + MPT_2_HOST16(rpd0, ErrorData.SmartCount); +} + +void mpt2host_mpi_raid_vol_indicator(MPI_RAID_VOL_INDICATOR *vi) { + MPT_2_HOST16(vi, TotalBlocks.High); MPT_2_HOST16(vi, TotalBlocks.Low); MPT_2_HOST16(vi, BlocksRemaining.High); Modified: projects/jbuild/sys/dev/mpt/mpt.h ============================================================================== --- projects/jbuild/sys/dev/mpt/mpt.h Sat Feb 28 17:57:21 2009 (r189183) +++ projects/jbuild/sys/dev/mpt/mpt.h Sat Feb 28 17:57:45 2009 (r189184) @@ -317,14 +317,39 @@ void mpt2host_sge_simple_union(SGE_SIMPL void mpt2host_iocfacts_reply(MSG_IOC_FACTS_REPLY *); void mpt2host_portfacts_reply(MSG_PORT_FACTS_REPLY *); void mpt2host_config_page_ioc2(CONFIG_PAGE_IOC_2 *); +void mpt2host_config_page_ioc3(CONFIG_PAGE_IOC_3 *); +void mpt2host_config_page_scsi_port_0(CONFIG_PAGE_SCSI_PORT_0 *); +void mpt2host_config_page_scsi_port_1(CONFIG_PAGE_SCSI_PORT_1 *); +void host2mpt_config_page_scsi_port_1(CONFIG_PAGE_SCSI_PORT_1 *); +void mpt2host_config_page_scsi_port_2(CONFIG_PAGE_SCSI_PORT_2 *); +void mpt2host_config_page_scsi_device_0(CONFIG_PAGE_SCSI_DEVICE_0 *); +void mpt2host_config_page_scsi_device_1(CONFIG_PAGE_SCSI_DEVICE_1 *); +void host2mpt_config_page_scsi_device_1(CONFIG_PAGE_SCSI_DEVICE_1 *); +void mpt2host_config_page_fc_port_0(CONFIG_PAGE_FC_PORT_0 *); +void mpt2host_config_page_fc_port_1(CONFIG_PAGE_FC_PORT_1 *); +void host2mpt_config_page_fc_port_1(CONFIG_PAGE_FC_PORT_1 *); void mpt2host_config_page_raid_vol_0(CONFIG_PAGE_RAID_VOL_0 *); +void mpt2host_config_page_raid_phys_disk_0(CONFIG_PAGE_RAID_PHYS_DISK_0 *); void mpt2host_mpi_raid_vol_indicator(MPI_RAID_VOL_INDICATOR *); #else #define mpt2host_sge_simple_union(x) do { ; } while (0) #define mpt2host_iocfacts_reply(x) do { ; } while (0) #define mpt2host_portfacts_reply(x) do { ; } while (0) #define mpt2host_config_page_ioc2(x) do { ; } while (0) +#define mpt2host_config_page_ioc3(x) do { ; } while (0) +#define mpt2host_config_page_scsi_port_0(x) do { ; } while (0) +#define mpt2host_config_page_scsi_port_1(x) do { ; } while (0) +#define host2mpt_config_page_scsi_port_1(x) do { ; } while (0) +#define mpt2host_config_page_scsi_port_2(x) do { ; } while (0) +#define mpt2host_config_page_scsi_device_0(x) do { ; } while (0) +#define mpt2host_config_page_scsi_device_1(x) do { ; } while (0) +#define host2mpt_config_page_scsi_device_1(x) do { ; } while (0) +#define mpt2host_config_page_fc_port_0(x) do { ; } while (0) +#define mpt2host_config_page_fc_port_1(x) do { ; } while (0) +#define host2mpt_config_page_fc_port_1(x) do { ; } while (0) #define mpt2host_config_page_raid_vol_0(x) do { ; } while (0) +#define mpt2host_config_page_raid_phys_disk_0(x) \ + do { ; } while (0) #define mpt2host_mpi_raid_vol_indicator(x) do { ; } while (0) #endif Modified: projects/jbuild/sys/dev/mpt/mpt_cam.c ============================================================================== --- projects/jbuild/sys/dev/mpt/mpt_cam.c Sat Feb 28 17:57:21 2009 (r189183) +++ projects/jbuild/sys/dev/mpt/mpt_cam.c Sat Feb 28 17:57:45 2009 (r189184) @@ -437,6 +437,7 @@ mpt_read_config_info_fc(struct mpt_softc mpt_prt(mpt, "failed to read FC Port Page 0\n"); return (-1); } + mpt2host_config_page_fc_port_0(&mpt->mpt_fcport_page0); mpt->mpt_fcport_speed = mpt->mpt_fcport_page0.CurrentSpeed; @@ -527,13 +528,14 @@ mpt_set_initial_config_fc(struct mpt_sof mpt_prt(mpt, "failed to read FC page 1\n"); return (mpt_fc_reset_link(mpt, 1)); } + mpt2host_config_page_fc_port_1(&fc); /* * Check our flags to make sure we support the role we want. */ doit = 0; role = 0; - fl = le32toh(fc.Flags);; + fl = fc.Flags; if (fl & MPI_FCPORTPAGE1_FLAGS_PROT_FCP_INIT) { role |= MPT_ROLE_INITIATOR; @@ -587,7 +589,8 @@ mpt_set_initial_config_fc(struct mpt_sof } if (doit) { - fc.Flags = htole32(fl); + fc.Flags = fl; + host2mpt_config_page_fc_port_1(&fc); r = mpt_write_cfg_page(mpt, MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM, 0, &fc.Header, sizeof(fc), FALSE, 5000); @@ -982,6 +985,7 @@ mpt_read_config_info_spi(struct mpt_soft if (rv) { mpt_prt(mpt, "failed to read SPI Port Page 0\n"); } else { + mpt2host_config_page_scsi_port_0(&mpt->mpt_port_page0); mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "SPI Port Page 0: Capabilities %x PhysicalInterface %x\n", mpt->mpt_port_page0.Capabilities, @@ -993,6 +997,7 @@ mpt_read_config_info_spi(struct mpt_soft if (rv) { mpt_prt(mpt, "failed to read SPI Port Page 1\n"); } else { + mpt2host_config_page_scsi_port_1(&mpt->mpt_port_page1); mpt_lprt(mpt, MPT_PRT_DEBUG, "SPI Port Page 1: Configuration %x OnBusTimerValue %x\n", mpt->mpt_port_page1.Configuration, @@ -1008,6 +1013,7 @@ mpt_read_config_info_spi(struct mpt_soft "Port Page 2: Flags %x Settings %x\n", mpt->mpt_port_page2.PortFlags, mpt->mpt_port_page2.PortSettings); + mpt2host_config_page_scsi_port_2(&mpt->mpt_port_page2); for (i = 0; i < 16; i++) { mpt_lprt(mpt, MPT_PRT_NEGOTIATION, " Port Page 2 Tgt %d: timo %x SF %x Flags %x\n", @@ -1026,6 +1032,7 @@ mpt_read_config_info_spi(struct mpt_soft "cannot read SPI Target %d Device Page 0\n", i); continue; } + mpt2host_config_page_scsi_device_0(&mpt->mpt_dev_page0[i]); mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "target %d page 0: Negotiated Params %x Information %x\n", i, mpt->mpt_dev_page0[i].NegotiatedParameters, @@ -1039,6 +1046,7 @@ mpt_read_config_info_spi(struct mpt_soft "cannot read SPI Target %d Device Page 1\n", i); continue; } + mpt2host_config_page_scsi_device_1(&mpt->mpt_dev_page1[i]); mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "target %d page 1: Requested Params %x Configuration %x\n", i, mpt->mpt_dev_page1[i].RequestedParameters, @@ -1068,6 +1076,7 @@ mpt_set_initial_config_spi(struct mpt_so "be %x\n", mpt->mpt_port_page1.Configuration, pp1val); tmp = mpt->mpt_port_page1; tmp.Configuration = pp1val; + host2mpt_config_page_scsi_port_1(&tmp); error = mpt_write_cur_cfg_page(mpt, 0, &tmp.Header, sizeof(tmp), FALSE, 5000); if (error) { @@ -1078,6 +1087,7 @@ mpt_set_initial_config_spi(struct mpt_so if (error) { return (-1); } + mpt2host_config_page_scsi_port_1(&tmp); if (tmp.Configuration != pp1val) { mpt_prt(mpt, "failed to reset SPI Port Page 1 Config value\n"); @@ -1432,7 +1442,8 @@ bad: memset(se, 0, sizeof (*se)); se->Address.Low = htole32(dm_segs->ds_addr & 0xffffffff); if (sizeof(bus_addr_t) > 4) { - se->Address.High = ((uint64_t) dm_segs->ds_addr) >> 32; + se->Address.High = + htole32(((uint64_t)dm_segs->ds_addr) >> 32); } MPI_pSGE_SET_LENGTH(se, dm_segs->ds_len); tf = flags; @@ -1507,9 +1518,9 @@ bad: chain_list_addr += cur_off; if (sizeof (bus_addr_t) > 4) { ce->Address.High = - htole32((uint32_t) ((uint64_t)chain_list_addr >> 32)); + htole32(((uint64_t)chain_list_addr) >> 32); } - ce->Address.Low = htole32((uint32_t) chain_list_addr); + ce->Address.Low = htole32(chain_list_addr & 0xffffffff); ce->Flags = MPI_SGE_FLAGS_CHAIN_ELEMENT | MPI_SGE_FLAGS_64_BIT_ADDRESSING; @@ -1536,6 +1547,7 @@ bad: ce->Length = (this_seg_lim - seg) * sizeof (SGE_SIMPLE64); } + ce->Length = htole16(ce->Length); /* * Fill in the chain list SGE elements with our segment data. @@ -1546,7 +1558,8 @@ bad: */ while (seg < this_seg_lim) { memset(se, 0, sizeof (*se)); - se->Address.Low = htole32(dm_segs->ds_addr); + se->Address.Low = htole32(dm_segs->ds_addr & + 0xffffffff); if (sizeof (bus_addr_t) > 4) { se->Address.High = htole32(((uint64_t)dm_segs->ds_addr) >> 32); @@ -1830,7 +1843,7 @@ bad: uint32_t tf; memset(se, 0,sizeof (*se)); - se->Address = dm_segs->ds_addr; + se->Address = htole32(dm_segs->ds_addr); @@ -1908,7 +1921,7 @@ bad: - ce->Address = chain_list_addr; + ce->Address = htole32(chain_list_addr); ce->Flags = MPI_SGE_FLAGS_CHAIN_ELEMENT; @@ -1935,6 +1948,7 @@ bad: ce->Length = (this_seg_lim - seg) * sizeof (SGE_SIMPLE32); } + ce->Length = htole16(ce->Length); /* * Fill in the chain list SGE elements with our segment data. @@ -1945,7 +1959,7 @@ bad: */ while (seg < this_seg_lim) { memset(se, 0, sizeof (*se)); - se->Address = dm_segs->ds_addr; + se->Address = htole32(dm_segs->ds_addr); @@ -2193,6 +2207,7 @@ mpt_start(struct cam_sim *sim, union ccb mpt_req->Control |= MPI_SCSIIO_CONTROL_NO_DISCONNECT; } } + mpt_req->Control = htole32(mpt_req->Control); /* Copy the scsi command block into place */ if ((ccb->ccb_h.flags & CAM_CDB_POINTER) != 0) { @@ -2317,7 +2332,7 @@ mpt_bus_reset(struct mpt_softc *mpt, tar error = mpt_wait_req(mpt, mpt->tmf_req, REQ_STATE_DONE, REQ_STATE_DONE, sleep_ok, 5000); - status = mpt->tmf_req->IOCStatus; + status = le16toh(mpt->tmf_req->IOCStatus); response = mpt->tmf_req->ResponseCode; mpt->tmf_req->state = REQ_STATE_FREE; @@ -2524,10 +2539,11 @@ mpt_cam_event(struct mpt_softc *mpt, req struct cam_sim *sim; struct cam_path *tmppath; struct ccb_relsim crs; - PTR_EVENT_DATA_QUEUE_FULL pqf = - (PTR_EVENT_DATA_QUEUE_FULL) msg->Data; + PTR_EVENT_DATA_QUEUE_FULL pqf; lun_id_t lun_id; + pqf = (PTR_EVENT_DATA_QUEUE_FULL)msg->Data; + pqf->CurrentDepth = le16toh(pqf->CurrentDepth); mpt_prt(mpt, "QUEUE FULL EVENT: Bus 0x%02x Target 0x%02x Depth " "%d\n", pqf->Bus, pqf->TargetID, pqf->CurrentDepth); if (mpt->phydisk_sim) { @@ -3086,9 +3102,10 @@ mpt_scsi_reply_frame_handler(struct mpt_ && (ccb->ccb_h.flags & (CAM_SENSE_PHYS | CAM_SENSE_PTR)) == 0) { ccb->ccb_h.status |= CAM_AUTOSNS_VALID; ccb->csio.sense_resid = - ccb->csio.sense_len - scsi_io_reply->SenseCount; + ccb->csio.sense_len - le32toh(scsi_io_reply->SenseCount); bcopy(req->sense_vbuf, &ccb->csio.sense_data, - min(ccb->csio.sense_len, scsi_io_reply->SenseCount)); + min(ccb->csio.sense_len, + le32toh(scsi_io_reply->SenseCount))); } if ((sstate & MPI_SCSI_STATE_QUEUE_TAG_REJECTED) != 0) { @@ -3776,6 +3793,8 @@ mpt_get_spi_settings(struct mpt_softc *m mpt_prt(mpt, "can't get tgt %d config page 0\n", tgt); return (rv); } + mpt2host_config_page_scsi_device_0(&tmp); + MPTLOCK_2_CAMLOCK(mpt); mpt_lprt(mpt, MPT_PRT_DEBUG, "mpt_get_spi_settings[%d]: current NP %x Info %x\n", tgt, @@ -3905,6 +3924,7 @@ mpt_update_spi_config(struct mpt_softc * "mpt_update_spi_config[%d].page1: Requested Params 0x%08x\n", tgt, mpt->mpt_dev_page1[tgt].RequestedParameters); tmp = mpt->mpt_dev_page1[tgt]; + host2mpt_config_page_scsi_device_1(&tmp); rv = mpt_write_cur_cfg_page(mpt, tgt, &tmp.Header, sizeof(tmp), FALSE, 5000); if (rv) { @@ -4156,7 +4176,7 @@ mpt_recover_commands(struct mpt_softc *m error = mpt_wait_req(mpt, mpt->tmf_req, REQ_STATE_DONE, REQ_STATE_DONE, TRUE, 500); - status = mpt->tmf_req->IOCStatus; + status = le16toh(mpt->tmf_req->IOCStatus); response = mpt->tmf_req->ResponseCode; mpt->tmf_req->state = REQ_STATE_FREE; Modified: projects/jbuild/sys/dev/mpt/mpt_raid.c ============================================================================== --- projects/jbuild/sys/dev/mpt/mpt_raid.c Sat Feb 28 17:57:21 2009 (r189183) +++ projects/jbuild/sys/dev/mpt/mpt_raid.c Sat Feb 28 17:57:45 2009 (r189184) @@ -564,7 +564,7 @@ mpt_raid_reply_frame_handler(struct mpt_ action_result = REQ_TO_RAID_ACTION_RESULT(req); memcpy(&action_result->action_data, &reply->ActionData, sizeof(action_result->action_data)); - action_result->action_status = reply->ActionStatus; + action_result->action_status = le16toh(reply->ActionStatus); return (TRUE); } @@ -583,7 +583,7 @@ mpt_issue_raid_req(struct mpt_softc *mpt rap = req->req_vbuf; memset(rap, 0, sizeof *rap); rap->Action = Action; - rap->ActionDataWord = ActionDataWord; + rap->ActionDataWord = htole32(ActionDataWord); rap->Function = MPI_FUNCTION_RAID_ACTION; rap->VolumeID = vol->config_page->VolumeID; rap->VolumeBus = vol->config_page->VolumeBus; @@ -592,12 +592,13 @@ mpt_issue_raid_req(struct mpt_softc *mpt else rap->PhysDiskNum = 0xFF; se = (SGE_SIMPLE32 *)&rap->ActionDataSGE; - se->Address = addr; + se->Address = htole32(addr); MPI_pSGE_SET_LENGTH(se, len); MPI_pSGE_SET_FLAGS(se, (MPI_SGE_FLAGS_SIMPLE_ELEMENT | MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER | MPI_SGE_FLAGS_END_OF_LIST | write ? MPI_SGE_FLAGS_HOST_TO_IOC : MPI_SGE_FLAGS_IOC_TO_HOST)); + se->FlagsLength = htole32(se->FlagsLength); rap->MsgContext = htole32(req->index | raid_handler_id); mpt_check_doorbell(mpt); @@ -1226,6 +1227,7 @@ mpt_refresh_raid_disk(struct mpt_softc * mpt_prt(mpt, "mpt_refresh_raid_disk: " "Failed to read RAID Disk Page(%d)\n", ioc_disk->PhysDiskNum); + mpt2host_config_page_raid_phys_disk_0(&mpt_disk->config_page); } static void @@ -1354,6 +1356,7 @@ mpt_refresh_raid_data(struct mpt_softc * "mpt_refresh_raid_data: Failed to read IOC Page 3\n"); return (-1); } + mpt2host_config_page_ioc3(mpt->ioc_page3); ioc_disk = mpt->ioc_page3->PhysDisk; ioc_last_disk = ioc_disk + mpt->ioc_page3->NumPhysDisks; @@ -1384,6 +1387,7 @@ mpt_refresh_raid_data(struct mpt_softc * "Failed to read IOC Page 2\n"); return (-1); } + mpt2host_config_page_ioc2(mpt->ioc_page2); ioc_vol = mpt->ioc_page2->RaidVolume; ioc_last_vol = ioc_vol + mpt->ioc_page2->NumActiveVolumes; Modified: projects/jbuild/sys/dev/mpt/mpt_user.c ============================================================================== --- projects/jbuild/sys/dev/mpt/mpt_user.c Sat Feb 28 17:57:21 2009 (r189183) +++ projects/jbuild/sys/dev/mpt/mpt_user.c Sat Feb 28 17:57:45 2009 (r189184) @@ -256,7 +256,7 @@ mpt_user_read_cfg_header(struct mpt_soft params.PageLength = 0; params.PageNumber = page_req->header.PageNumber; params.PageType = page_req->header.PageType; - params.PageAddress = page_req->page_address; + params.PageAddress = le32toh(page_req->page_address); error = mpt_issue_cfg_req(mpt, req, ¶ms, /*addr*/0, /*len*/0, TRUE, 5000); if (error != 0) { @@ -270,7 +270,7 @@ mpt_user_read_cfg_header(struct mpt_soft return (ETIMEDOUT); } - page_req->ioc_status = req->IOCStatus; + page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) { cfgp = req->req_vbuf; bcopy(&cfgp->Header, &page_req->header, @@ -301,15 +301,15 @@ mpt_user_read_cfg_page(struct mpt_softc params.PageLength = hdr->PageLength; params.PageNumber = hdr->PageNumber; params.PageType = hdr->PageType & MPI_CONFIG_PAGETYPE_MASK; - params.PageAddress = page_req->page_address; + params.PageAddress = le32toh(page_req->page_address); error = mpt_issue_cfg_req(mpt, req, ¶ms, mpt_page->paddr, - page_req->len, TRUE, 5000); + le32toh(page_req->len), TRUE, 5000); if (error != 0) { mpt_prt(mpt, "mpt_user_read_cfg_page timed out\n"); return (ETIMEDOUT); } - page_req->ioc_status = req->IOCStatus; + page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) bus_dmamap_sync(mpt_page->tag, mpt_page->map, BUS_DMASYNC_POSTREAD); @@ -337,7 +337,7 @@ mpt_user_read_extcfg_header(struct mpt_s params.PageLength = 0; params.PageNumber = ext_page_req->header.PageNumber; params.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; - params.PageAddress = ext_page_req->page_address; + params.PageAddress = le32toh(ext_page_req->page_address); params.ExtPageType = ext_page_req->header.ExtPageType; params.ExtPageLength = 0; error = mpt_issue_cfg_req(mpt, req, ¶ms, /*addr*/0, /*len*/0, @@ -353,7 +353,7 @@ mpt_user_read_extcfg_header(struct mpt_s return (ETIMEDOUT); } - ext_page_req->ioc_status = req->IOCStatus; + ext_page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) { cfgp = req->req_vbuf; ext_page_req->header.PageVersion = cfgp->Header.PageVersion; @@ -387,17 +387,17 @@ mpt_user_read_extcfg_page(struct mpt_sof params.PageLength = 0; params.PageNumber = hdr->PageNumber; params.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; - params.PageAddress = ext_page_req->page_address; + params.PageAddress = le32toh(ext_page_req->page_address); params.ExtPageType = hdr->ExtPageType; params.ExtPageLength = hdr->ExtPageLength; error = mpt_issue_cfg_req(mpt, req, ¶ms, mpt_page->paddr, - ext_page_req->len, TRUE, 5000); + le32toh(ext_page_req->len), TRUE, 5000); if (error != 0) { mpt_prt(mpt, "mpt_user_read_extcfg_page timed out\n"); return (ETIMEDOUT); } - ext_page_req->ioc_status = req->IOCStatus; + ext_page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) bus_dmamap_sync(mpt_page->tag, mpt_page->map, BUS_DMASYNC_POSTREAD); @@ -446,7 +446,7 @@ mpt_user_write_cfg_page(struct mpt_softc params.PageVersion = hdr->PageVersion; params.PageLength = hdr->PageLength; params.PageNumber = hdr->PageNumber; - params.PageAddress = page_req->page_address; + params.PageAddress = le32toh(page_req->page_address); #if 0 /* Restore stripped out attributes */ hdr->PageType |= hdr_attr; @@ -455,13 +455,13 @@ mpt_user_write_cfg_page(struct mpt_softc params.PageType = hdr->PageType; #endif error = mpt_issue_cfg_req(mpt, req, ¶ms, mpt_page->paddr, - page_req->len, TRUE, 5000); + le32toh(page_req->len), TRUE, 5000); if (error != 0) { mpt_prt(mpt, "mpt_write_cfg_page timed out\n"); return (ETIMEDOUT); } - page_req->ioc_status = req->IOCStatus; + page_req->ioc_status = htole16(req->IOCStatus); mpt_free_request(mpt, req); return (0); } @@ -536,14 +536,15 @@ mpt_user_raid_action(struct mpt_softc *m if (mpt_page->vaddr != NULL && raid_act->len != 0) { bus_dmamap_sync(mpt_page->tag, mpt_page->map, BUS_DMASYNC_PREWRITE); - se->Address = mpt_page->paddr; - MPI_pSGE_SET_LENGTH(se, raid_act->len); + se->Address = htole32(mpt_page->paddr); + MPI_pSGE_SET_LENGTH(se, le32toh(raid_act->len)); MPI_pSGE_SET_FLAGS(se, (MPI_SGE_FLAGS_SIMPLE_ELEMENT | MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER | MPI_SGE_FLAGS_END_OF_LIST | raid_act->write ? MPI_SGE_FLAGS_HOST_TO_IOC : MPI_SGE_FLAGS_IOC_TO_HOST)); } + se->FlagsLength = htole32(se->FlagsLength); rap->MsgContext = htole32(req->index | user_handler_id); mpt_check_doorbell(mpt); @@ -559,7 +560,7 @@ mpt_user_raid_action(struct mpt_softc *m return (error); } - raid_act->ioc_status = req->IOCStatus; + raid_act->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) != MPI_IOCSTATUS_SUCCESS) { mpt_free_request(mpt, req); return (0); From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:58:14 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF5241065672; Sat, 28 Feb 2009 17:58:14 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D5728FC0A; Sat, 28 Feb 2009 17:58:14 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHwEZj017303; Sat, 28 Feb 2009 17:58:14 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHwEt9017301; Sat, 28 Feb 2009 17:58:14 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281758.n1SHwEt9017301@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:58:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189185 - projects/jbuild/sys/dev/mxge X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:58:15 -0000 Author: jb Date: Sat Feb 28 17:58:14 2009 New Revision: 189185 URL: http://svn.freebsd.org/changeset/base/189185 Log: MFC Modified: projects/jbuild/sys/dev/mxge/eth_z8e.h projects/jbuild/sys/dev/mxge/ethp_z8e.h projects/jbuild/sys/dev/mxge/if_mxge.c projects/jbuild/sys/dev/mxge/if_mxge_var.h projects/jbuild/sys/dev/mxge/mxge_mcp.h projects/jbuild/sys/dev/mxge/rss_eth_z8e.h projects/jbuild/sys/dev/mxge/rss_ethp_z8e.h Modified: projects/jbuild/sys/dev/mxge/eth_z8e.h ============================================================================== --- projects/jbuild/sys/dev/mxge/eth_z8e.h Sat Feb 28 17:57:45 2009 (r189184) +++ projects/jbuild/sys/dev/mxge/eth_z8e.h Sat Feb 28 17:58:14 2009 (r189185) @@ -1,6 +1,6 @@ /******************************************************************************* -Copyright (c) 2006-2008, Myricom Inc. +Copyright (c) 2006-2009, Myricom Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -28,7074 +28,6951 @@ POSSIBILITY OF SUCH DAMAGE. $FreeBSD$ ***************************************************************************/ -static unsigned int eth_z8e_uncompressed_length = 369604; -static unsigned int eth_z8e_length = 113069; -static unsigned char eth_z8e[113069 + 1] = - "\x78\x9c\xec\xbd\x7f\x7c\x54\xd5\xb5\x37\xbc\x66\x32\xc0\x24\x0d" - "\x4c\xb4\x94\x8e\x88\x3a\x2a\xb6\xa3\xa2\x46\xc5\x16\x2d\x6a\x2c" - "\x70\x1b\xef\x8b\x12\x21\x68\x90\x1f\x09\x36\xf8\x44\x45\x18\x21" - "\xc0\x04\x43\x26\x0c\xd8\x06\xca\xaf\x6a\xb4\x28\x81\xa4\x15\x6f" - "\xb1\xc5\x8a\xb7\x78\x4b\x5b\x7e\x8c\x12\xef\xa5\x36\xc9\x44\xc1" - "\xe7\x06\x3f\xb4\x4e\x79\x22\x4d\x79\x82\x4e\xc9\x40\x62\x32\x33" - "\xfb\xfd\xae\xbd\xcf\x99\x9c\x99\x9c\x09\x72\xef\xfd\xbc\xef\x3f" - "\xcd\xe7\x73\x72\x66\xef\xbd\xf6\xda\x6b\xad\xbd\xf6\xda\x6b\xff" - "\x38\x7b\x13\xfd\x37\xfe\xac\x47\x03\xff\x9d\xec\xff\xf8\xfb\xc7" - "\xdf\x3f\xfe\xfe\xf1\xf7\x8f\xbf\x7f\xfc\xfd\xe3\xef\xff\x9f\xbf" - "\xb3\x56\x1b\xbd\xbb\x85\xa8\xdb\x6f\x77\x86\x2c\xb7\x4e\xfe\xc9" - "\x0b\x22\x8a\x68\x4b\x88\xec\x4e\x7e\x6b\x0f\x3d\x8f\x78\xeb\x16" - "\xb2\x5f\x93\x43\xd9\x93\xb6\x13\xd5\x8e\x12\x9d\x2f\xbc\x24\xc2" - "\x6b\x5e\x12\x9d\x93\x5f\x23\x6a\x1c\x4b\xf4\xc2\x28\x11\x01\x9e" - "\x39\x21\x5a\x5b\xc9\x78\xd6\x20\xcc\xe9\x6b\x47\x89\x30\xe2\xcb" - "\x11\x1f\xe1\xf8\xd5\xa3\x80\x6b\x24\x91\xff\x25\xd1\x63\xc0\x6b" - "\xe7\xfc\x8c\x73\xf2\xd5\x92\x9e\x9d\x29\x78\x18\xc7\xbe\x10\x3d" - "\xb7\x70\x10\x1c\xd9\x9c\x5f\xd2\x86\x3c\x5d\x7e\x72\x46\xac\x64" - "\x89\xf8\x03\x5f\x43\xde\x08\x78\x72\x73\xde\xcd\x48\x17\x7e\xca" - "\x60\xbc\xc1\x9e\x28\x35\x56\x12\x01\x96\x5c\x55\x64\x39\x45\x99" - "\x77\x03\xde\xb2\x46\xe5\x77\x21\xce\x2a\xe3\x80\x87\xe3\x38\x0d" - "\xf1\x63\x39\xdc\xed\xcf\xcc\x4f\xe0\x64\x59\x70\xba\x35\x60\x45" - "\xba\x05\xf9\x6c\xc8\xb7\xac\xb1\x81\x48\xe1\xca\xc9\x0c\x51\x66" - "\x9d\x96\xaf\x1a\xf9\xaa\x39\xdf\x61\xa4\x4f\xaa\x53\x3c\xce\xa8" - "\x23\x2b\xa7\xb3\x7c\x51\x8e\x15\x70\xbb\x74\xfc\x0a\x87\xf5\x7e" - "\x8d\x9f\xaf\x20\xad\x31\x39\xcd\xf6\xbc\x96\x96\x8d\xb4\x50\x72" - "\x1a\xf0\xa9\xb4\x4b\x90\x16\x4d\x93\x76\x69\xb7\x3f\xcb\x99\x9c" - "\x76\x30\x57\x4b\xfb\x3a\xd2\xc6\x27\xa7\x59\xf4\x7c\x4e\xa4\x15" - "\xe8\x69\xc6\x7a\x51\x1a\x66\xc3\x33\xc4\x4e\x34\x14\xcf\x30\xbb" - "\x5e\x57\x4b\x9d\x22\xee\xbb\x8c\x6c\x62\xfd\x7e\x7b\xdc\x2f\x28" - "\xe8\xed\x21\xd7\x68\xf2\x9d\xa4\xac\x00\xf0\xd2\xa6\x95\x64\xf7" - "\x79\x44\x4f\xd0\xdb\x49\x2d\xe1\x4e\xf2\x85\x45\x47\x30\x7a\x8e" - "\xaa\xce\x91\x3d\x18\x3d\x43\x55\xcf\x90\xb3\xb1\xf2\x53\x32\xd3" - "\x83\xb8\x55\x90\x6f\x0c\xe7\x6d\xa7\x96\xba\x76\xf2\xd5\x25\xe7" - "\xf5\x5d\x41\xce\x66\x84\xa1\x03\x8e\xf2\xad\x22\xde\xe8\x8a\x52" - "\x34\x6b\xbf\xbd\xf2\x35\xb2\xf9\xae\x26\x6b\x73\x69\x80\x5c\xdf" - "\x60\x5a\xbe\x52\xc3\xb4\xac\x7d\x92\xec\xaf\x3e\x1e\xb0\x8a\xf5" - "\x8d\xf6\x5f\xf5\xf6\x58\xd7\x9c\x26\xdb\x61\xe7\x64\x3a\xec\x3c" - "\x41\xc1\xad\x77\x53\x30\x12\xa5\x4d\x4f\x52\xf6\xe1\xc8\x44\x0a" - "\xae\x8d\x13\xe3\x0b\x2e\x9c\x88\xf7\x39\xc0\x74\x92\x6b\x09\xd1" - "\x29\xfa\x8a\xb7\x16\x78\x42\x0a\x27\x74\xe0\x2b\x6b\xdf\xf1\x10" - "\xb1\xcc\x38\x9c\x46\x9f\x73\x5e\x60\x5d\xb5\x4a\x1d\xea\xac\x1f" - "\x25\x3a\xae\xad\xa5\x91\x80\xcf\x41\xfe\xc6\x90\x75\xef\x3e\x4d" - "\x9f\x3b\x6e\xa9\xa5\x9c\xbd\x55\x61\x1b\xf4\xb0\xd3\xe1\x85\xfe" - "\xad\xa4\x21\x8e\x28\x59\xc0\xc3\xeb\xf5\x88\xbb\x76\xa4\xcc\xd3" - "\x13\xa2\xb7\xda\x38\x8f\xf8\xfa\xec\xbf\xc7\xbf\x3e\x3b\x1c\xff" - "\xc9\xec\xb3\xe2\x27\xb3\xbb\x62\x3f\x99\x1d\xf1\x55\x90\x3d\xf6" - "\xf5\xd9\xe7\x5a\x3c\x52\x56\x39\x2d\x1e\xc8\x2a\x46\xf6\x55\x67" - "\x28\x67\xde\x33\xa8\xa3\xe8\x9f\x68\xd5\x13\xe4\x8c\x67\xbe\x1b" - "\x08\x46\x3f\xa2\x79\x95\x24\xf0\xbb\xd5\x8c\xf6\xae\xac\xc6\x7c" - "\xa5\x5b\x76\xb4\xe5\x6c\x0f\x68\x95\xe5\x76\x65\x35\x69\xf1\x4c" - "\x4f\x76\x8d\x1e\x2f\xb2\x1a\x0b\x51\x1f\xbe\x11\xab\x2d\xb4\xa3" - "\x97\xe8\x96\x38\x59\x4e\x53\x76\x2d\x78\xc9\x31\xe2\x9f\x3e\xe5" - "\xe1\xbb\x29\xf7\xce\x9b\x72\x6f\xff\xf6\x84\xdb\xe9\x81\xfb\x26" - "\xdd\x4d\x05\x8f\x4c\xc7\xbf\x07\xef\xa6\xa2\x7f\xba\x1f\x3f\x26" - "\xdd\x7d\x6b\xee\xf7\x6e\x2a\x98\x74\xff\x94\x9b\x26\xd0\x43\x85" - "\xb7\xe5\xde\x76\x1b\xdd\x37\x65\xea\xad\xb9\xb9\xda\xfb\xd6\x5c" - "\x06\x7a\x74\xc2\x94\x19\x37\x15\x2c\x59\x5c\xbe\xf8\xa6\x07\xef" - "\x9f\x64\xb4\x6f\x39\xf1\xe5\x71\xda\x01\x1d\x17\x5d\xf9\xc4\xb2" - "\x0f\x54\x9d\x45\xfd\x0d\xff\x29\xe4\x1f\x56\xba\x9f\xbd\x07\xf4" - "\xdb\xba\xfd\xc3\xf3\x43\xd6\xb7\x9d\x4c\xbf\xeb\x1a\xae\xe3\x11" - "\x5b\xb9\x3d\xa3\x0e\x22\xcc\x5f\x46\xa5\x84\x59\xa8\xd7\x53\x3c" - "\x6b\x7f\x6e\x64\x69\x99\xb4\x3b\x88\x5f\x8b\xbc\x21\x8e\xdf\x84" - "\x70\xa3\x27\x8f\xc4\xab\xf9\x16\x9b\x4b\xda\x0e\x2e\x2f\xb7\x96" - "\x69\xc8\x6a\x2a\x12\x7d\x45\xa4\xc5\xb5\xc6\x39\xbc\xbe\x69\x96" - "\xf0\x21\x6e\xa5\x8c\xfb\x00\xe1\xa2\x6e\xd8\xb3\x6e\x51\x46\xf1" - "\xa5\x45\xac\x6f\x19\xa0\x65\x0a\x78\xe8\x90\xf0\x5d\x32\xff\x50" - "\xc4\x5d\x07\x7c\xb3\xf0\x3c\xaa\xe1\x84\x6d\xbb\x24\x8c\xfc\xb3" - "\xe3\xa2\x88\x44\xf6\x65\x76\xfc\x9e\x13\x58\xd9\x49\xa7\x3c\x64" - "\x0d\x21\x2d\xee\x2b\x23\x43\xf9\x11\xee\x0f\x50\x96\xad\xbb\xaf" - "\x8c\x42\x34\xbc\x47\xe2\x62\x9c\xfd\x30\xed\x5c\x26\x78\x0c\x43" - "\x4e\x6f\x77\xfb\x47\x80\xff\x7f\x33\xca\xa8\x86\xe1\xc1\x73\x07" - "\xf3\x01\x1c\x21\x2e\x03\x38\xad\x1a\x4e\x3d\x3f\xcb\xf9\xa0\x92" - "\xf3\x88\x3d\x29\x72\x6e\x43\xda\x61\xe8\x7d\x24\xc3\x2b\xd3\x5b" - "\xd1\xae\x6a\x39\x1d\xf9\xcb\x99\x46\x65\x8b\x65\x5a\x67\x72\x5e" - "\x87\xd3\x50\x47\x59\xaa\x8e\x1c\x39\x7a\x1d\x71\xfe\x48\xe6\x71" - "\x8f\x56\xfe\x11\xc0\x64\x20\x3d\x37\x05\xc7\x54\xa4\x35\x71\xbd" - "\x8d\xf0\x50\x06\xe7\xd9\x31\x4a\xb7\xff\x12\x5f\x49\x32\x7c\xce" - "\x18\xc0\x7f\xb0\x59\xe1\xfc\x04\x3a\x6d\x83\x2e\x75\x1e\xf6\x72" - "\x3f\xe7\xd8\x90\x2c\x1f\xc7\x2e\x96\x8b\x94\x87\x90\xf2\xd0\xf9" - "\xe9\x44\xde\x53\x80\xdf\x9f\x02\xdf\x06\x79\xcd\x92\xf5\xdf\x35" - "\x00\xfe\x33\xc0\x77\x26\xc3\xe7\x64\x4b\xfd\x51\x79\xf4\x7a\x2c" - "\xd7\xea\xd5\x92\x52\x26\xf3\x33\xbc\xdb\x9f\x93\xc2\xff\x25\xfb" - "\x80\xfb\xfc\x26\xd5\x46\x46\xa0\xde\x6f\x02\xde\x05\x23\xc2\xe4" - "\x40\xd8\x61\x08\xe7\xe0\xb9\x44\x74\xff\x3f\x71\xc4\xdd\x86\xb8" - "\xe7\xd0\x9e\xac\x08\xc7\x54\xf8\x92\xb7\x10\xb6\x80\x9e\x47\x05" - "\xeb\x59\x77\x3e\xeb\xd0\x78\xc4\xbf\xae\xa5\xff\x54\xc2\x03\x26" - "\xce\x7a\xd6\x95\xd0\xd9\x97\x99\x3e\xd6\x5b\x3d\x9f\x58\x21\xd3" - "\x26\x21\xed\x39\xbc\xef\xc7\xfb\x19\xbc\x1f\xc2\xfb\x01\xdf\x17" - "\xe4\xf4\xc5\x44\x87\x16\xbe\x13\xef\xe9\x78\x5f\x87\xf7\x0c\xbc" - "\x2f\xe1\x36\xc6\x3c\x87\x9f\x45\xfb\xc9\x92\x6d\x69\xa8\x51\x96" - "\xc6\xf6\x95\x88\x53\x70\x56\xa3\xfc\x40\x07\xb7\xdd\x02\xf0\xd9" - "\xc1\x65\x6a\xb8\x86\x98\xe0\xb2\x99\xe0\xb2\x18\x71\x85\x28\x67" - "\xbf\xcf\x2b\x04\xde\xbb\x46\x44\x38\x7c\x49\x03\xe4\x60\x43\x78" - "\x2d\xcb\x44\xd9\x90\x4b\x8e\x24\xd7\xed\xf0\x72\x96\x89\xae\x3b" - "\x5a\x59\x43\x8c\x65\x99\xd9\xea\x3e\xeb\xc8\x77\xd0\x0f\x5f\xda" - "\xe7\x73\x93\xa8\xd9\xef\xba\x89\xc8\x3a\xae\x9a\x32\x83\xd1\x63" - "\x34\x2d\x2a\x62\x78\xfa\xae\x27\xba\x24\x18\x6d\xa2\x6f\x12\x5d" - "\x1d\x8c\xd6\xa2\x2f\x28\xe7\xb4\x43\xd7\x92\xc5\x82\xb7\xef\x06" - "\xb2\x5a\x82\xd1\xf1\x88\xdf\x49\x63\xc9\x66\xf9\xa7\xe7\x44\x77" - "\x30\x3a\x19\xe1\x85\x54\x1c\xa3\x9c\xa9\x43\x84\x6f\x5a\x4c\x7c" - "\xf2\x4f\x43\xe2\x22\x18\x6d\x44\x7c\x29\x4d\x8b\x7d\x21\xa6\xc5" - "\xba\xf1\x7c\x8e\xe7\x13\x3c\x87\xf0\xf8\x84\x58\xb7\xdf\xd5\x87" - "\x3e\x02\x34\xe5\xf6\x89\xb2\x0c\xd0\x94\x8b\x3e\x43\x88\xac\xfd" - "\x79\xc1\xe8\x44\xe0\xb3\x12\x60\x72\xfb\xfa\x90\xb6\x7e\xff\xbd" - "\x12\x26\x6b\xff\x3d\x32\x5c\xb3\xbf\x40\xd8\xf7\xe7\xdd\x54\x4d" - "\xc3\x98\xfe\x38\x64\x16\x8c\xa2\x9f\x8e\x7e\x4a\xd3\x2a\xc2\x82" - "\x79\x18\xb1\x5a\xe0\xf7\x21\x01\xb9\x3a\xa6\x55\xf8\x44\x71\x94" - "\xec\x22\x93\x71\x77\x32\xde\x02\xe0\x7a\x40\xc3\xe5\x01\x6c\x98" - "\xe1\x18\x97\x8e\x87\x71\x30\xec\xb4\x18\xf4\x7d\xdd\x7e\x4f\xdf" - "\xba\xfd\x25\x78\xaa\xf1\xec\x41\xde\x77\xfb\x9e\x95\x72\x6c\xc5" - "\xef\x50\x0f\xea\x55\xca\x31\x46\xc3\x00\xdb\x8a\xfa\x98\xdc\x2d" - "\xe9\x3e\x40\x92\xee\xf5\xfb\x45\x8f\xa2\x3f\xae\xf1\x13\xe3\xf8" - "\x08\xea\x0d\x30\xae\x88\x4c\x3b\x70\x15\xf2\x15\xca\x7c\x35\x07" - "\x5c\xc2\x7e\x20\x37\x0e\x7d\x84\x3c\xab\x59\x96\x90\x6f\x35\xfb" - "\x49\x2c\x53\xb1\x0e\xe9\x99\x07\x72\xfb\xd6\x1d\xc8\x43\xfe\xe9" - "\x7d\x02\xb4\x64\x1d\x28\xe9\x51\x65\x16\x03\xcf\x9c\x6e\xc6\x69" - "\x3f\x50\x02\x5c\x9e\x2f\xfc\x2e\xc8\x42\xf4\x4c\x8b\xae\x8e\x16" - "\x57\x50\x86\x9b\xaa\x41\xef\x76\xf8\x63\x0b\x81\x6f\x2d\xa7\x7d" - "\x32\xad\x82\xbe\x8a\xb2\x0e\x01\x6f\x09\x97\x87\x32\x3c\xc0\xf9" - "\x34\x70\x95\x32\x4d\xbd\x7e\xca\x41\xb8\xba\x57\xd1\xd7\x10\xaf" - "\x39\x10\x88\xdb\x0f\xec\x31\xea\x8f\x92\x19\xeb\xcd\x1b\x1c\x97" - "\xa3\xeb\x4a\xac\xe6\xc0\x96\x1b\x89\x72\x1e\x8c\x88\x28\xeb\xcb" - "\x2d\xe4\xb1\xb4\x44\x9a\xa8\x38\x6a\xa7\x16\xcf\x5e\xba\x81\xd8" - "\x67\x8b\x50\x4b\xa4\x16\xe1\x8d\x78\x97\x53\x73\xe7\x4e\x62\x1a" - "\x1f\xf4\x44\x56\xc7\xec\x07\x73\x9a\x3b\x1f\x20\xe4\x3f\x04\x1a" - "\xe3\xf3\x3c\xb6\xea\x16\x4f\x84\xc3\xbe\xe6\x4e\xe8\x68\x4c\xc4" - "\xa2\x35\x07\xaa\xa3\xf6\x83\xae\x07\xcf\x89\xf0\x03\x9d\xd5\x43" - "\x10\xd7\xe7\xb0\x88\xa8\xc3\xeb\x13\xcd\x9d\x6b\x69\xde\x39\xb2" - "\x34\x97\xed\x95\xba\x3a\xcf\xe3\x21\x99\xff\x5c\xd4\x31\xb7\xb3" - "\x9a\xe6\x96\xd1\x08\xc0\x7f\xce\xba\x2b\x46\x54\x53\x53\x7b\x29" - "\x3d\x70\x26\x9a\xf1\xe0\xb9\x3e\xd1\x54\x52\x4b\xcd\x65\xb5\x2c" - "\x8f\x06\xf6\x99\x1e\x38\xd3\x25\x1e\x3c\xd7\x2d\x9a\xcb\xde\xa0" - "\xa6\x92\xbd\x34\xf5\xd3\x80\x23\xb6\xee\xc0\x96\x78\xe6\x81\x3d" - "\xf1\x75\x07\x02\xd1\x75\x07\xaa\x63\x99\x07\x73\xa2\x99\x07\x5d" - "\x62\xfd\xc1\x2d\x90\x5f\xa6\xac\x8b\xac\x83\x9b\xf0\xdb\x25\xeb" - "\xd7\x7e\xb0\x41\xd4\x1c\x0c\xf4\xad\x3b\xb8\x27\xe8\x9d\x48\x22" - "\xf3\x60\x03\xeb\xbc\x58\x77\x30\x00\xb8\x80\xd2\x91\x83\xad\xac" - "\x23\x80\x09\xe1\x09\xf7\xad\x3b\x84\xb6\x72\xa8\x00\x38\x2e\x51" - "\xf8\x0e\x4d\x63\xb8\xb8\xfd\x50\x41\xbc\xe6\x50\x89\xb0\x1f\xf2" - "\xc0\xb7\xb2\x3e\xf8\x4c\x0f\xe4\x07\xd9\x79\x21\x77\x3f\xda\x87" - "\x37\x86\x70\x8c\xe6\x3d\x43\xbe\xa0\xf7\x04\x7e\x9f\x20\x71\x70" - "\x0b\x3d\xf8\xcc\x21\xc1\x69\x0f\x3e\xe3\x13\x90\x8d\x23\x9e\x09" - "\x3c\xeb\x80\x27\x13\x78\xd6\x07\x2e\xed\x61\x9d\xaa\x09\xe4\x3c" - "\xf0\x9c\x08\x0b\x7b\xc0\x13\x1f\x4a\xb2\x6d\xc4\x0f\x0a\xa1\xda" - "\x47\x27\x74\x72\x74\x75\xb1\x97\x1a\xc4\xba\x40\x8e\xc8\x0c\x20" - "\xdf\xbb\xff\x0a\xbb\x95\x21\xa4\x8d\x79\x77\x4f\xdf\xba\x77\x5b" - "\xf1\x04\xfa\xdb\x14\xb7\xbd\x77\xf7\x7c\xd9\xf1\x43\xb7\x7f\x14" - "\xc6\x3f\xc7\xa4\xff\x84\xdf\xe8\xff\x3f\xda\xab\xfd\x3e\x11\xa2" - "\xfd\xd9\xd2\xa7\x84\x2d\xf3\x54\xd1\xd7\x4e\xd3\xd7\xb7\x80\x5f" - "\xc2\xef\x6c\xfc\xae\x9d\x76\xfd\x21\x11\xdf\x60\x9b\x80\x3a\xed" - "\x66\x5b\x23\xfc\xe3\xd9\xff\xc8\xeb\xee\x2e\xb3\x8b\x6e\x77\xb6" - "\xc8\x6a\x7e\x49\xf4\x39\xd9\xf7\x75\x20\x3c\x02\xb2\x1b\x8b\xf7" - "\xa5\xdb\xcf\xd3\x48\x3c\xce\xed\xfe\x78\x35\xdb\x52\xfc\xce\x15" - "\x2b\x9c\x59\x9b\x96\xd3\x38\x47\x84\xec\xf5\xfe\x78\x91\x63\x75" - "\x0e\xc1\xef\x1e\xc9\xbf\x85\x3f\x90\x5b\x7f\x9e\x6c\xec\x8f\xc7" - "\x87\xa3\x3c\xaf\x43\x88\xa5\x6e\xaa\x5f\x02\x7b\x83\xb1\x69\xbd" - "\x5f\xec\x89\x75\xbb\xad\x4c\xa7\x4e\x0b\xd3\x06\x3a\xaf\x00\x9d" - "\x3b\x67\x56\xe4\xd1\x7b\xf0\x11\xcc\x6c\x76\xb7\xff\xeb\x09\xfe" - "\xd3\xa4\xb7\xeb\x32\x31\x4f\x77\xda\x74\x39\xa5\x19\x7b\x8c\xe4" - "\xb6\x1c\x3b\x2f\xc2\x9b\x17\x11\xcb\xc2\xe9\x8b\x8a\xff\x03\x7b" - "\x5a\x5d\x15\xa3\x2b\xa6\x55\x5c\x25\x82\x61\x11\x08\x7a\xcf\xc8" - "\x71\x7f\x3d\x60\xaa\xa2\x22\xae\x8f\xbf\x6b\x5f\x82\xef\xb9\xae" - "\xd9\x2b\xd6\x35\x97\x77\x2d\x17\x51\xf8\x47\xed\x28\xd3\x1b\xa2" - "\x5b\xa3\xaa\x6e\x0e\x34\xc0\x7f\x68\xef\xb2\x37\x97\x03\xf7\x25" - "\x8c\xbb\xc5\x23\x02\xf1\xcc\xe6\x4a\xc0\x35\x84\xe8\x2f\xd9\xc6" - "\xb1\xff\x5a\xe0\x5c\x0b\x9c\x48\xdb\x1f\xa2\x2b\x06\xcc\x01\xa8" - "\x59\x0a\x42\xbd\xb8\xfa\x27\x37\x2c\x9a\xfa\xe8\x7f\x39\x78\xf2" - "\xcc\x93\x75\xbe\xd1\xf6\x5c\x5d\xf0\xf9\x7d\xab\x68\x0c\xea\xe1" - "\xf2\xd3\x74\xd9\xad\xe8\x87\x4f\x09\xbf\xf3\xc8\xab\x2b\x7b\x30" - "\x26\xbf\x6c\x62\x88\x76\xd5\xa6\x93\x9b\x60\xdb\x77\x5e\x74\x6c" - "\x5e\x9e\x90\xd9\x5f\xa6\x55\xc4\x05\xff\xe6\x36\x55\x8f\x78\x96" - "\x07\xf0\xac\xd5\x65\x91\x46\xfe\x36\x51\xd3\x5c\xa3\x7c\xea\xcb" - "\xda\x05\xc6\xc8\x81\x2b\xa3\xfc\xfb\x53\xe9\x33\xd4\x1c\xdc\xd3" - "\x05\x5b\xc1\xe3\x33\x8c\xef\x22\x18\x4f\xf7\x00\x67\x5b\x88\xae" - "\x0e\x69\xf3\x11\x91\x60\x74\x0a\xdb\x8d\x3d\xe9\xeb\x57\xc7\x3f" - "\xe6\x98\x86\x33\x20\xec\xc7\xf7\x56\x29\xba\x7b\xaa\x22\xa2\x83" - "\x71\xf3\xf8\xa7\x1d\x30\x3b\x50\x0f\xa2\xe6\xf8\xae\x4d\x1c\xb7" - "\xbc\x97\xe3\x3e\x82\x1e\x0b\x45\xd7\x98\x8f\x20\xb7\xaf\xc3\xc7" - "\x0d\x07\x56\xf6\xd2\xa9\x4a\xca\xe0\x71\x67\xb7\x7f\xf4\xc2\x10" - "\xdd\xd3\x20\xc7\x7e\x7e\xfa\x45\x97\x75\xe6\x4c\xc4\x55\x87\xe8" - "\xde\x46\x19\x67\xa5\xaf\x21\xbc\x25\x01\x03\x1c\x08\x37\x18\xf2" - "\xcc\xec\xb2\xde\xf0\x0b\xc4\xed\x4d\xc9\xd3\x98\x92\xe7\x98\x1e" - "\x06\x7d\x9d\xae\xe5\x92\xaf\x17\x91\xbf\x01\x4f\xb5\x56\x6e\x4f" - "\x32\x8e\xcb\xed\xc9\x38\x2e\x77\x0e\xa4\xf5\xf2\x71\x29\x79\x26" - "\xa6\xe4\x99\x3a\x90\xd6\xcb\x4b\x52\xf2\x78\x52\xf2\x54\xeb\x61" - "\x6d\x0e\x26\x17\x71\xb5\x29\x79\x76\xa6\xe4\xd9\x6b\x08\x7f\x15" - "\xe1\x04\xff\x5c\xd7\xf0\x07\x04\x8f\xab\xa1\xb7\xac\xc3\x0d\x6c" - "\x4f\x79\xce\x63\x69\x25\xdc\x8b\x75\x07\x1b\x00\x1f\xd1\xf1\xeb" - "\xba\x23\xe1\x95\xfe\x74\x28\xfd\x19\xe3\x4c\xc0\xc0\xc5\x6a\x74" - "\x45\x08\xb2\xec\xe0\xf9\xb2\x60\x64\x8a\x36\xde\x1c\x33\x87\x75" - "\x4a\x2f\xd3\x51\xa9\xf4\x86\xe7\x0e\xf4\x32\x43\xd0\x15\xee\xaf" - "\x0c\xfa\xd9\xce\x65\x69\x65\x54\xea\x65\x00\x77\x3b\xeb\x8f\x9c" - "\x2f\x01\x7e\x2d\xdf\x1e\x25\xf7\x31\x3b\x93\xe5\x31\x66\x6f\xb2" - "\x3c\xc6\x34\x1a\x65\xc8\x36\x22\x44\x97\xd7\xa4\xf3\x71\xe1\xef" - "\x78\xe0\x93\x5f\xe9\x8b\x8b\x93\xa7\xe8\x8a\x59\xd0\xfb\x0c\x7e" - "\x4b\x3f\xaa\x07\xfc\xda\x8f\x4e\x94\x3e\x54\xe5\x39\xf4\xb9\x12" - "\xf6\xab\x80\x6d\x07\xcc\xfd\x1a\xec\xfd\x6a\x4e\x4f\xbe\x87\xf1" - "\x1b\xfe\xd4\xd3\xb0\x45\x25\x61\x1f\xf7\xdb\xc7\x3d\x7a\x18\x63" - "\x12\x8c\x09\xaf\x70\x8a\x75\x47\x27\x9a\xd3\x82\x3e\x53\xd9\xd6" - "\x4e\x94\xf3\x75\xb6\x11\x90\xdf\x65\xb0\x33\x7f\xa9\x5a\x45\x5f" - "\x65\xfb\x20\x32\x9b\x6b\x95\xbc\xaf\xd8\x2d\xfc\xd5\x14\x44\x6f" - "\xe8\x59\x4e\x97\xc3\x9e\x6e\x38\x4d\x57\xbc\x53\x5c\xe9\x02\xad" - "\x18\xc7\x7e\x46\x24\xfb\x8e\xcc\xe6\x2d\xdc\x8f\xd6\x7f\xc6\x63" - "\xca\x2b\x42\xba\x6d\xc1\xef\xce\xc1\xec\x3c\xea\x2e\xac\xc6\x54" - "\x57\xce\xe2\x3a\x3a\x49\x57\x4e\x66\x7e\xd5\x5c\xe8\x95\x77\x88" - "\xf3\x62\x8e\x60\x5f\x1c\xbe\x46\x88\xae\xf4\xe0\x1d\x96\x8f\x9f" - "\x4a\xb4\x70\x08\x70\x63\xc5\xf9\x38\xc3\xa0\x0e\xae\x9c\x28\xfc" - "\x16\xb6\x71\xfb\xbb\xfd\x57\x96\x85\x68\x7c\x40\x8d\xab\xaf\x1c" - "\xcf\xb8\xd2\xd0\x10\xea\x9f\x67\xb9\xf2\x03\x57\x95\x85\xe9\x78" - "\x4d\xda\x24\xe0\xaa\xb7\xaa\xfe\x36\x0e\x5a\x77\xf8\xe3\x65\xe8" - "\x5b\xcb\xe2\xeb\xff\xb7\x57\xfe\xd6\xd2\x98\x8e\x38\xca\x37\xc5" - "\x9f\xb0\x51\x57\xad\xd2\xec\x5c\x6b\xdc\x7e\x30\xac\xd9\x67\x1e" - "\x17\x66\x9e\xa4\xab\x2a\x11\xc6\x58\xf3\x2a\xd7\xaf\xe2\x61\xeb" - "\x3b\xe5\x7a\x17\x71\x55\xa5\xc9\x93\x8f\xa7\x08\x4f\xa9\x16\xf6" - "\x48\x1e\xba\x4a\x31\x4e\xbb\xaa\x32\x9e\x09\xf9\xd4\xb0\xbc\xae" - "\x2a\x10\x5d\x63\xad\xfa\xef\xfa\xbf\xf3\xdc\xc0\x55\xd0\xff\x2b" - "\x2b\xd3\xd6\x47\x82\x56\xd7\x9d\x06\x5a\x43\x06\x5a\xed\x27\xc9" - "\x35\x41\xa3\xb5\x29\x99\x56\xd7\x04\x3c\xe8\xd2\x5c\x63\xf0\x8c" - "\xd3\xc2\x86\xe7\xaa\x30\xca\x47\x5d\x5c\xd1\xa3\xea\x84\xe3\x50" - "\x06\xcb\xe2\xef\x64\x8f\xf7\x15\x11\xcf\x8f\x72\x3c\xcb\x93\xe3" - "\xe3\xf0\x83\x10\xce\x41\x7a\x0e\xeb\xca\xe6\xb8\xd2\x05\x73\x9f" - "\xc2\x55\x94\xf0\xbd\xe0\x7b\xb2\xfe\x76\xd2\xd5\xa5\xd0\x71\xf0" - "\xf1\x9f\x5e\xd5\xd7\x5c\xbd\x80\xc3\x68\x5b\x7f\xc1\xef\x92\x66" - "\x48\xaf\x77\x7d\x53\x7e\x9f\x95\x86\xf5\x5a\x29\x2f\xba\xc9\x36" - "\x27\x9a\xd5\x58\x18\xec\xd8\x4b\x2d\xd1\x7f\x25\xd7\x93\x12\xc7" - "\xac\x60\x19\x6c\x55\x85\x88\xbd\xd9\xbb\x0b\xe3\xb9\xcf\x03\xe8" - "\x9b\xaf\x3a\x4d\x57\x4b\xfa\x7f\x74\x12\xdc\xcd\x93\xb8\x15\x3f" - "\xd9\xb6\x09\x9b\x1e\x87\x7d\x39\x25\x22\xf0\xe3\xb2\x36\xf6\xd2" - "\xb8\x57\x56\x52\x6e\x5d\x2f\x8d\xdd\xd1\x4b\x6e\xf1\x57\xb7\xb5" - "\x0e\xfe\xd9\xbc\x73\x39\x04\x1d\x2a\x1a\xe1\x21\xfb\x8e\x95\xf0" - "\xd3\xa2\x64\x89\x6d\x84\x9f\x16\x85\x9f\xf6\xb9\x9b\xdb\x52\xc2" - "\x4f\xeb\xeb\x63\x3f\xad\xb9\x87\x61\xd0\x06\x7b\x86\x97\x91\x25" - "\xbb\x84\x72\x40\x9f\xef\x33\x72\xbd\x9c\xdd\x0e\x1f\x11\x3c\x87" - "\x34\x7e\x21\xb3\xdd\x8e\x32\x1a\x26\x79\x45\xfb\x16\xeb\xfe\xd3" - "\x9b\x6e\xdd\x83\x6d\x6d\xe0\xca\x08\xcf\x47\x33\x0f\x6f\xf1\x5c" - "\xed\xde\xd1\x3d\xb6\xa5\x75\xa2\x87\xe3\xcb\xaf\x16\x3d\x88\xdf" - "\xca\x65\xef\x41\x7c\xb7\xff\xea\x40\xc8\xfa\xd6\x89\x8b\x99\x6f" - "\x67\x7f\x42\xae\x89\xc8\xbe\xe3\x1a\x4a\xe9\x7f\x60\x33\xae\x19" - "\xa9\xdb\xdb\xf2\xab\xc9\x59\xee\x12\x1d\x83\xcc\x49\x47\x74\x3f" - "\xef\xf0\x18\x99\xb7\x20\xe1\x77\xa8\xb5\x15\x52\x3e\xc3\x35\xb2" - "\x0d\xb3\x4f\xc0\x7d\x0c\xfb\xc1\x3c\x87\xaa\xe6\xbd\xae\x59\x6b" - "\xf0\x55\xb8\x8f\x89\xec\x5d\xd9\x63\xe3\xfc\xcc\xa7\x96\xbf\x34" - "\x9d\x3d\xe7\xb5\x1e\xf8\x22\x5b\x5b\xea\x88\x5a\xe0\xf2\x35\xd7" - "\xe5\xc1\x3f\xea\x95\xbe\xe8\x49\xba\x46\xce\x99\x07\x16\xf5\x12" - "\xff\x0e\x56\xde\x45\x41\xc0\x28\x7b\x7a\xed\xd8\x46\xaf\x9a\xff" - "\x6b\xf4\x9c\xe5\x75\x1f\x11\x58\xc2\x76\xe7\xda\x87\x0e\x57\x86" - "\x41\xd7\xb5\x63\xf4\x39\xe9\x10\x5d\x5b\xc0\xe5\x77\xd5\x1c\xdf" - "\xc2\xf3\x7b\x72\xce\x2e\x32\x81\x61\xf2\x42\x74\x4d\x62\x2d\x09" - "\x7e\x2c\xec\xde\x35\x3d\x83\xd0\x9a\xa3\xfa\xac\x6b\xbd\xc9\xfe" - "\xc5\x10\xf4\x73\xd7\x6e\x48\xee\xe7\xae\xad\x4b\xee\xe7\xae\xdd" - "\x9d\xec\x5f\x58\xe1\x5f\x5c\x1b\x48\xc9\xd3\x9a\x92\x27\x64\xc8" - "\xb3\x45\x2b\x27\x92\x9c\x67\xac\x2d\x39\xcf\xd8\x91\x86\x30\x78" - "\x1c\x3b\x56\xaf\x9f\x2e\xb9\x5e\x31\x76\xbc\x21\x6c\xad\x95\x6b" - "\x7a\x63\xf3\xf5\x38\xf4\xa3\x04\xff\x30\xc2\x3a\xa1\xe1\x2b\x4d" - "\xd1\x31\x86\xf7\xa6\xd0\x50\x93\x42\xc3\xd6\x84\x4f\x03\xfc\xa8" - "\xaf\x77\x4f\xd1\x75\x1e\xa9\x43\xec\xd3\x55\xd1\x34\x0e\x03\xd7" - "\x56\xc0\x43\x0e\x63\x8f\xa4\xe0\x6b\x4b\xc1\xd7\x61\x08\xe7\x20" - "\xdc\x63\xe0\x21\x27\xc3\x49\x16\xe8\x0b\xc6\x14\xd7\xe5\xe8\xf1" - "\xec\xdb\x82\xde\x0e\x9f\x5c\x2b\xca\xe3\x35\xa9\x4b\x4f\xd2\xd8" - "\x18\xfb\xc1\x0a\xe7\x75\x46\xff\x8f\x14\x5f\xd7\x15\x24\xd3\x71" - "\x5d\x49\x32\x1d\xd7\x79\x0c\x7c\x45\x1c\xab\xe9\x21\x47\x74\xfa" - "\x2c\xf6\x93\x79\xdd\x90\xfd\x55\xf8\x6d\x4e\x94\x99\xc3\xeb\x60" - "\xa7\xca\x29\x23\xe8\xed\x80\x1f\xd2\x1c\x49\xab\x4f\x59\xc7\x1b" - "\xb4\x75\x14\x17\xf0\xb7\xea\xfa\x88\xdf\x18\xff\x5e\x3b\x47\xda" - "\xe0\xf5\x47\x03\xc2\x57\xb4\x15\x72\x44\x5f\xfe\x8d\xf7\x54\x7f" - "\x72\x7c\x2f\xb7\x45\xf8\x4b\x1d\xb0\x33\xd9\x6a\xbe\xfa\x1b\x39" - "\x06\x7d\x8e\xb8\x56\xde\x2b\x4e\xd2\x37\x3e\x60\x3b\xc4\xfe\x1f" - "\xfb\xfc\x87\x23\x61\xf4\x0d\xa7\x89\x69\x46\x5a\xab\x96\x2f\xdf" - "\x90\x2f\xcc\x6d\x8a\xe1\x39\xed\x96\x28\xd9\x38\x0f\x70\x8c\x94" - "\xe3\x01\xe0\x3b\x8c\x36\x8a\x3c\x95\x7a\x1e\xc0\xca\x3c\x8e\x72" - "\xb2\xdd\x5c\x49\xb6\xc0\xca\x93\x12\xb7\x56\xdf\x1d\x1b\x21\x97" - "\x60\x65\x07\x7c\xc3\x36\x1e\x53\xdb\x02\x55\x27\x19\x4f\x6b\x46" - "\x0f\xd9\xbb\xd6\x1d\xc7\x98\xe1\x1b\xad\xb1\x75\xc7\xb7\xc6\x6b" - "\x8e\xef\x09\xd1\x75\x3d\xd0\x3f\x53\x9b\x65\xbe\x46\x48\x8e\xcd" - "\xfe\x78\x5b\xa0\xaa\x9d\x71\x46\xb9\xdf\x0d\x3a\xa3\xd4\x52\x17" - "\x45\x3f\x43\x39\x72\xad\x10\x63\xdb\x60\x03\x7c\x53\x8c\xdb\x8a" - "\xbd\x94\x07\x5f\xa3\x4d\x24\xf2\x45\x90\xef\x9b\xe3\x99\xd6\xb5" - "\x1c\x8f\xfc\xb0\x99\x61\xf6\x65\xd3\xf4\xeb\x0e\x86\x0b\x5c\xc3" - "\x7d\xfb\x37\x17\x2a\xdf\x86\xf2\xe1\xcb\xb4\x99\xae\x9f\x59\x29" - "\xd8\xed\xff\xe6\xae\x10\x4d\xca\xd7\x75\xed\xf0\x56\x59\xdf\x18" - "\x83\x7e\x13\xed\xff\x1b\xe1\x74\x3e\x84\xa6\x97\x1e\xc0\x0e\x03" - "\x6c\xe7\x60\xb0\x4c\xf7\x61\xf0\x2d\xd6\x37\x95\xbc\x5a\x95\x3b" - "\x44\xd3\x29\xf4\xe5\xee\xb1\x7a\xbe\x2f\xc3\x1f\xdb\x63\xb6\x09" - "\xe8\x17\x22\x6a\x2e\xfa\xfa\x97\x79\xed\x12\x78\x30\xfe\xfb\xe6" - "\x16\x8d\x87\xaf\x20\x8c\xfa\xff\x66\x8f\xbe\xee\xc5\x7d\xdf\x52" - "\x0f\xfa\x04\x67\x04\xba\xe1\xde\xaa\xa7\xc9\xf1\x05\xa7\x61\xfc" - "\x72\xd8\xd9\xce\x69\x7b\x13\x69\x9c\x8f\xe9\xf6\x46\x39\xbe\x49" - "\x8f\x57\x76\xcb\x7d\x22\x25\xdc\xa9\x87\xf1\x1b\xed\xff\x9b\x25" - "\xfa\x7a\x3d\x74\x8e\xe7\xeb\x2d\x27\xe9\xfa\x59\x3b\xa4\x3d\xbb" - "\xde\xa9\xa7\x33\x5d\xbe\x9f\x8a\x30\xcf\x3d\xc6\xb3\x9a\x4a\xa4" - "\x9d\x47\x9e\x37\xcf\xf6\x0c\xc1\xd8\xd2\x22\xfa\xca\x88\xe3\x18" - "\x0f\xf7\x6b\xd0\x77\xee\xdb\x3a\x81\x2b\xbb\x9e\xf5\x1a\xf5\xba" - "\x22\x4a\x63\x3c\xf7\xf0\x18\xe2\xfa\x22\xa9\xd3\x7e\xa9\x3f\x82" - "\xf1\xc1\x27\x90\xb8\x19\xdf\x26\xee\x33\xbb\x78\x0d\xec\x7a\xe6" - "\xbf\x29\xfd\x9c\xcd\xf5\xfb\x0c\xb2\x1c\x82\xf0\x91\x64\x5e\xaf" - "\x6f\x4b\x09\x77\xe8\x61\xc8\xab\x5a\xe9\xde\xf5\x27\x54\xda\x0d" - "\xb6\xc1\xca\x62\x7f\x01\x30\xee\xe4\xf2\x6e\x98\x90\x8c\xff\x86" - "\xfc\x94\x70\x91\x1e\xae\x95\xeb\x13\x37\x94\xe9\x65\xc8\x3a\x83" - "\x8e\xed\xac\x0a\x0f\xf9\x72\xfa\x73\xe3\x3b\x4a\x7f\x6e\xd8\x6d" - "\xa0\x61\x28\xc2\xfb\xfb\xeb\xf3\x86\x23\x3a\x7e\xfc\x3e\x66\x80" - "\x43\x1b\xb9\xa1\x3d\x55\x5f\x96\x7a\x59\xcf\x58\x67\x6e\x24\x93" - "\xb4\x1e\x2d\x6d\x8c\xb9\x9e\xdd\x38\xde\x10\x1f\x56\xbe\xc4\x8d" - "\x2f\xeb\x7d\x93\x5c\xdb\xf3\x15\x5a\xa4\x8f\xf3\x92\xd2\x0b\xe8" - "\x43\x44\xea\x85\xdc\xbb\x72\x63\x79\x2a\xde\xc0\xca\x68\x3f\x8e" - "\x7e\x9c\x93\xd5\x5a\xdc\x8d\x3b\xfb\x79\xbb\x11\xf6\xed\xfa\x9d" - "\xba\xde\x2a\x3f\xfa\x86\x86\x74\xfe\x06\xe0\x43\xc9\x32\xbb\x31" - "\xdc\x2f\xb3\x1b\xa3\xfd\x78\xc7\xd9\x0d\x70\xff\x81\xb0\xb3\x1f" - "\x6e\xdc\xd8\x0b\xe9\x87\xda\xef\x33\x6e\x6a\x72\x59\xe3\xe6\x18" - "\x70\x94\x19\xca\x2a\x37\xc0\xb5\x21\xbc\x36\x7d\xfd\x8c\x6b\x48" - "\x5f\x3f\xe3\xf6\x9b\xd7\xcf\xb8\x63\x86\x72\x43\x17\xd6\xed\x9b" - "\x6c\x06\x7a\xea\x11\x1e\x99\xac\xcb\x37\x8d\x4d\x09\x27\xea\x5f" - "\xa0\xfd\xee\x5c\x99\x37\x84\xe3\xe1\x2b\xe7\x28\x5d\xbf\xa9\xd0" - "\x98\xfe\x66\xaf\x4a\x67\x1a\x79\x0e\x44\xce\xfd\x29\xb8\xca\x54" - "\x38\x86\x31\xa4\xd7\xe9\xb4\xaf\x45\x38\xd5\xbf\x4f\xd8\x6d\xad" - "\x1f\x0a\xc6\xb9\x1f\xba\x69\xbf\x1a\x03\x37\x97\x08\xff\xa1\xa2" - "\x74\x7d\x0a\x70\xc3\xfe\xdd\xb4\x47\xcd\x01\x35\x97\x40\x8f\x7a" - "\x4f\xd1\xcd\x3f\xc6\xbb\x0f\xef\x65\xc9\x7d\xdb\xcd\x39\x18\x7b" - "\xcf\xa8\xf7\xa7\xf6\x79\x37\xbb\xe1\xbf\xf4\x3a\xa2\xd5\x45\x26" - "\x69\x93\x85\x3f\x63\xba\x49\x3c\xcf\x21\xf4\x86\xe8\xe6\x2d\x4c" - "\xa3\x21\xbe\x5c\xf8\x47\x14\x32\x7c\x88\xcb\x43\x1e\xf3\xf9\x81" - "\xe6\x92\xa5\x97\x91\x13\x74\x7e\x71\x8a\x6e\xb9\x7e\xa9\x53\x8e" - "\x83\x41\xf3\x2d\xab\x52\xca\x69\x4c\x43\xf3\x09\xd0\xfc\x45\x1a" - "\x9a\xa5\xdf\x2e\xac\xa0\x7b\x40\xff\x7e\xcb\x48\xd0\xfd\x85\x94" - "\x6b\x72\xfc\x38\xdf\xcb\xc4\xf4\xca\x3c\x33\x2a\xfb\xeb\x43\x4b" - "\x9f\xea\xd8\x4a\x05\x03\xcb\xba\xa5\x54\xf8\x87\xcd\x08\xd1\x2d" - "\x75\x7a\x7f\xa0\xc5\x57\x2a\x1a\x20\x0b\xab\x94\x45\x23\xe7\x4b" - "\x57\x8f\x7a\xdb\x63\x39\x74\xfb\x6f\x41\xff\x77\x73\x9d\xde\x67" - "\xa2\xbf\x0c\xb3\xac\xb4\xb4\x8e\x94\xb4\x9e\xfe\xb4\x5c\x5b\x52" - "\xda\xaa\x44\xfc\x18\x3d\xfe\x02\x75\x01\xf9\xe7\xbe\xc3\x79\x92" - "\x79\xcc\xcd\x37\xaf\x83\xdc\x12\xd4\x41\x9f\x79\x1d\xe4\x56\x9a" - "\xeb\x4d\x6e\xad\x78\x9e\xcc\x70\xed\x46\xbd\xf4\x71\xbd\x70\x3d" - "\x0c\x94\x7f\x6e\x93\x2e\xff\x0b\xf0\x10\x3b\x45\xb7\x2e\xeb\xd7" - "\xa7\x5b\xdf\x49\xc6\x73\xeb\x48\x73\x5e\x6e\x1d\x07\x5e\x62\xe6" - "\xbc\xdc\x9a\x6f\xce\xcb\xad\x68\x9b\x14\x1b\xa8\x4b\xb7\x7a\x11" - "\x6f\x06\xbf\x45\xf8\x4d\xf1\xef\x62\xdf\x21\x44\xb7\x9e\xe0\x39" - "\x21\x43\x7c\xa0\xbf\x2d\x81\x6e\xe4\xe1\xf9\xa2\x40\xd5\x6d\xc4" - "\xf4\x9c\x72\x91\x75\x30\x79\x80\xff\xcf\x4f\xd1\x6d\xab\xe3\x56" - "\xcb\x4e\x25\x8b\xdb\x6f\x4d\x2e\xf7\x36\x97\xb9\x2c\x6e\x9b\x00" - "\x59\x7c\x6e\x2e\x8b\xdb\x0a\xcd\x65\x71\xdb\x42\xf0\xfc\xf9\x40" - "\x59\xdc\xb6\x56\x97\x05\xc6\x93\x0e\xb1\xad\x58\xdc\xec\x21\x3b" - "\xf8\xcc\x71\xa0\x8e\x15\x5c\x27\xc3\xed\x76\xf4\xa8\xfa\x75\x2d" - "\x21\xfb\x67\x74\x5b\x9d\xdc\x47\xb2\x6d\xb6\x18\x11\xa6\x61\x0c" - "\x1f\xf4\x7e\x1e\x08\xa2\xa7\xe3\x31\x7d\x4a\x19\x1d\xe6\x6d\xf3" - "\x76\x96\xd3\xf3\x26\xf1\x4e\xb5\x1f\xe3\xf6\xa9\xc9\x6d\xf6\xf6" - "\xdc\x7e\x79\x43\x36\xc8\x63\xd8\x2f\x3b\xe8\x33\x78\x1d\x8c\xbf" - "\x5a\xc9\x7f\xfc\x90\x14\x3a\x1a\xcc\xe5\x7f\xfb\xbe\xf4\xf2\xbf" - "\xfd\x98\xb9\xfc\x6f\xe7\x39\x9a\xcf\x43\x34\xde\x95\x6c\x8f\xc7" - "\xdb\xfa\x79\xba\x9d\xf7\x9b\x38\x84\x7f\xe8\x57\x39\xfc\x65\x79" - "\xd3\x1f\xe0\xb7\xd4\xbf\x42\x90\xa9\xe5\xea\xff\x4a\xfe\x74\xcf" - "\x96\xd1\xe6\xeb\xa1\x18\x2b\x90\xeb\x4a\x1e\xe7\x8e\xff\x14\xba" - "\xd3\x86\xdf\xd6\x53\xf4\xad\x8d\x71\xbf\xb5\x52\x93\xed\x27\xa7" - "\xe8\x8e\xf9\x4a\xb6\xdf\x7a\x3a\x59\x1e\xe3\xa3\xe6\xb2\xbd\x63" - "\x24\x64\xfb\x89\xb9\x6c\xef\xc8\x4d\xdf\x6f\xdc\x31\x15\xfc\x7f" - "\x32\x50\xbf\xef\x28\x55\x79\x68\x0d\xe7\x51\xfb\x42\xef\xf8\x88" - "\x61\x94\x1e\xdf\x71\x80\xd3\x59\xe7\x0d\x79\xb6\x02\x57\x51\xbf" - "\xae\xdf\x51\xab\xe1\x30\xe2\xdd\xef\x08\x9b\xe9\xf4\x1d\x72\x5d" - "\xef\xe6\x88\x94\x4f\xd1\x0e\x2e\x73\x39\xd1\x67\xf4\xad\xeb\x19" - "\x8e\xe3\xaf\x75\x1a\x75\xfa\x5b\x36\x1d\x8e\x6d\x8c\x82\xbd\x23" - "\x2a\xb6\x95\x11\xc3\x25\xe3\xfe\x96\xc6\xff\xb0\x19\xf5\x1a\x3c" - "\xc3\xa5\xc0\x14\xaa\xb6\xf3\xad\xad\xc9\x6d\xe7\x5b\x0b\x93\xfb" - "\xbb\xf1\x3c\xde\x72\xc4\xfd\x16\xf8\xbc\xe3\xdb\x41\xc3\x97\xd6" - "\x97\x41\xda\x12\xea\xfb\xdb\x4f\xab\xfa\xfe\xf6\x43\x29\x74\x75" - "\x9a\xd7\xf7\xb7\x6d\xe9\xeb\xfb\xdb\x2e\xf3\xb6\xf4\xed\x09\x5c" - "\xd7\x21\xfa\xf6\xc2\xe4\xb6\xf4\xed\x82\xfe\xb6\xf4\xad\x4e\xd5" - "\x96\xe8\x92\x8b\x69\x0b\xf0\x15\xd2\xb6\x3d\xbd\x7d\x7d\x59\x99" - "\xa0\x3d\x30\x4d\xd2\xd7\xc1\x18\x7f\x02\xcb\xa8\xc5\x29\xf7\xbc" - "\xfb\x4e\xd1\x84\x0a\x9e\xc7\x55\xb2\xba\xf3\x8e\x64\xfe\x26\x38" - "\xcd\x65\x35\x21\x17\xb2\xf2\x99\xcb\x6a\xc2\x54\x73\x59\x4d\x28" - "\xe5\x3d\xbe\x03\xdb\xc5\x84\x4a\xb6\xfb\xa0\x91\xf7\x50\xb4\x7d" - "\x46\x13\x9a\xa5\xfd\xef\x2a\x16\xd0\x3b\x13\xfb\x3f\xa1\xdf\xfe" - "\x8f\xe6\x36\x31\x41\xfa\x53\xa2\x0b\xf6\x7f\x2b\x0d\xe3\xbe\xa0" - "\xbf\x0f\xc8\x35\xe9\x03\x26\x74\x9a\xf7\x01\x77\xda\xcc\xfb\x80" - "\x3b\xc7\x28\x3d\xbe\xb3\x20\x59\x8f\xef\x1c\xdf\x5f\xc7\x90\xd3" - "\xff\x4c\x1f\xb0\xf9\x14\xdd\x95\x89\x7e\xb8\x5a\xd5\xc7\x5d\xbf" - "\x4d\xa1\x65\x97\x79\x7d\xdc\x19\x40\x7d\x6c\x36\xaf\x8f\x3b\x4f" - "\x98\xd7\xc7\x9d\x3c\x7e\xda\x3c\xb0\x3e\xee\xca\xfe\x72\xfd\xf0" - "\x5d\xe3\x93\xfb\xe1\xbb\xc6\x7e\xf9\x7e\xf8\x2e\x8f\x79\x1d\xdc" - "\x55\x63\x5e\x07\x77\x35\xa8\x3a\xb8\xeb\x58\x72\x1d\xdc\xb5\xaf" - "\xbf\x0e\x20\x9b\xff\x7e\x1d\x94\xaa\xf5\xdd\xef\xdc\xd1\x25\xe7" - "\xcf\xbe\x33\x2e\x44\xdf\x89\xa8\xf5\x80\xef\x74\xa8\x39\x54\x59" - "\x4f\x6f\x02\xc6\x35\xd0\x16\x7f\x27\x5f\x8b\x7b\x64\x60\xbf\xf0" - "\x9d\x52\xd8\xc9\xce\xc6\x4a\xb9\xd6\xa3\xea\x09\xf2\xdd\x0c\x38" - "\x35\x17\xf0\x9d\xb5\x9c\x17\xf5\x28\xf8\xbb\x14\xb6\xad\x80\x8f" - "\x30\x9e\x46\x57\x2c\x45\x7e\xdf\xd9\x73\x31\xfd\x66\x3a\x5e\xd9" - "\x3f\x3c\x45\xf7\xcc\x67\x98\x38\xf3\xb5\x9c\xea\x4f\xd1\xc4\x8d" - "\x78\x43\xf7\xee\xb9\x2f\xb9\xcc\x89\x63\xcd\x75\x6f\xe2\x44\xd0" - "\x5c\x6f\xae\x7b\x13\x8b\xd2\xf7\x93\x13\xe5\x9e\x54\xe8\x58\x7d" - "\x5c\xf9\xf2\x97\xce\xab\x0c\xa5\xf8\xf2\x13\xb7\xea\x7d\x5b\x57" - "\x26\xea\x66\x39\xcb\xfd\xee\x9b\x34\xfa\xae\x4b\x81\x6d\x54\x65" - "\x59\x66\x98\x94\x15\x02\x8d\x6f\xa6\xa1\x31\x6a\xde\x3e\xee\x1e" - "\xa9\xd5\xe5\x9b\x22\x33\xb5\x8d\xdc\x0d\xff\xcf\x6c\x6c\x72\xb7" - "\x5e\xff\x45\x92\x86\xa4\xfa\xbd\xbb\x34\xb9\x7e\xa9\xa8\x1c\xe3" - "\x35\x13\xb8\x0d\x46\x38\xde\x8b\xc3\xb0\xac\x03\x26\xb0\xfb\x52" - "\x71\xa6\x81\x0b\x0d\xd0\x2d\xde\x9b\x61\xaa\x5b\xf7\x64\xab\xb6" - "\x76\xcf\xc2\xe4\xb6\x76\xcf\xd8\xfe\xb6\x36\xb1\x31\x25\x4f\x5e" - "\x72\x9f\x3e\x71\xac\xec\xd3\xa1\x53\xf8\xbd\x97\xeb\xed\x7f\xc0" - "\x36\x1e\x3a\x45\xf7\x6a\xfe\xf1\xbd\x29\xf3\x15\xf7\x04\xcc\x75" - "\xf3\x9e\x36\xf0\x7c\xc8\xbc\xde\xef\x89\x98\xd7\xfb\xbd\x6c\xff" - "\x0e\x69\xe3\xcb\x4b\x67\x54\xe6\x0d\x4b\x49\x1f\x67\x6e\xbb\xee" - "\x4d\x33\xff\x71\xef\x1c\x25\xcf\x7b\xb7\x24\xcb\xf3\x5e\xc3\xfc" - "\x07\xe8\xff\x9f\xe9\x3f\x82\xa7\x28\xef\x7e\x25\xa3\xfb\x6e\x4a" - "\xa1\xa3\xdd\x5c\x46\xf7\x46\x21\xa3\xa0\xb9\x8c\xf2\x9c\xe9\xdb" - "\x6f\x1e\xfa\x3f\x0a\x0e\xec\x3f\xf2\xa6\xfa\xb6\xcb\xf9\x11\xd9" - "\x0e\x67\x44\xe1\x7f\xfa\xf5\x74\xee\x37\xf2\x78\xfc\x27\x1c\x63" - "\xa8\x20\xb8\x35\xca\x7b\x90\x72\x18\xae\xb8\x32\x75\x9d\x24\x4f" - "\xf9\xba\x7e\x41\x0e\x6f\x02\xd6\xae\xc3\xa6\xe0\xe4\xfe\x4f\xe8" - "\x70\x6a\x5e\xa6\x3a\xc5\x96\xe4\xb5\x9b\xd7\x5b\x5e\x9a\xf6\x7f" - "\xdf\x48\x55\x6f\xf7\xa5\x8c\xfd\xee\x1b\x97\xac\xeb\x90\xeb\x45" - "\xd4\x1d\xaf\xa3\x98\xd6\xdf\x9a\xd9\x6d\x9e\x2a\xba\xf2\x34\xdd" - "\xf7\x37\x89\x1f\x61\xfe\x1e\xaa\x38\x4a\x56\xb1\xe6\x29\xe8\xb1" - "\x85\xea\xfd\xa2\x67\xb3\x55\xb4\x6e\xf6\x8b\xd6\x60\xf4\x2c\xfb" - "\x6c\x5f\x3d\x49\xf7\xfd\x56\xd1\x27\x7a\x94\x2c\xee\xdb\xc3\xb0" - "\xdd\xfe\xfb\x3a\xf4\xf9\xbe\x74\xe5\xf1\xfe\x6c\xc6\x3d\xf8\x1c" - "\xef\x77\x73\x21\x83\xb5\xfa\x5a\x2e\xc2\x79\xfd\xfb\x8b\xbe\x3b" - "\x15\x69\x5f\xea\xbb\x4e\xc0\x7a\x8d\x78\xd4\x37\x9d\xdf\xdd\xa0" - "\xef\x11\xc2\xef\xad\x17\xc0\xa5\xd3\x13\x48\xa1\xa7\x15\x7d\xff" - "\x5a\x0d\xc7\x89\xc1\x70\x70\x3d\x29\xfd\xe2\x7a\xfc\x6e\x64\xb0" - "\x79\xa2\x0c\x27\x15\xbc\x30\x40\xe7\x27\xb9\x59\xd6\x8c\x23\x5d" - "\x1b\x54\x7d\xea\xe4\xcb\x54\x1b\x9c\xf4\x45\x4a\xfe\x32\x35\x77" - "\xa8\xfa\xa8\x79\xd1\x54\x1d\x9d\x54\xe3\x88\x98\xe9\xe8\xa4\x06" - "\x5d\x47\xe1\xf3\x32\xde\xe3\x29\xe9\x01\xa5\xab\x93\x9d\xe8\x27" - "\x0d\xe3\x90\x49\x72\xfc\x20\x2e\x55\x6d\x31\x04\xb8\x94\x7c\x3d" - "\xc9\xba\x3c\xa9\x6c\xb0\x79\x58\x8d\xb7\xb7\x14\x6f\x53\x7e\x9c" - "\x8c\x6b\xf2\xe4\xc1\x79\x9b\x5c\x6a\xce\xdb\xe4\xca\x64\xde\xa6" - "\x3c\x93\x92\x2e\xfd\xfb\xae\x01\x7d\xf0\xe4\xbd\xba\x9f\xea\xba" - "\x86\xfd\xcf\x29\x43\xa4\xbf\x5a\x5f\x2c\xc6\xba\xcc\xfc\xd5\xc9" - "\xed\x09\x7f\x55\xc2\x4f\x56\xfb\x5e\xeb\xe1\xaf\x36\xa4\x8e\x1b" - "\xf2\xe8\x70\x34\xd5\x67\x9d\x32\xd6\x51\x67\x46\xff\x94\x89\x9a" - "\x8d\x7c\x7e\xa0\x8d\x9c\x52\xa4\xea\x65\xca\x9e\x64\x1b\x32\xc5" - "\x93\x5c\x2f\x93\xeb\x52\xf2\x6d\x49\xae\x97\xc9\x93\xff\xab\xfd" - "\x03\x0f\x12\x33\x32\x32\xac\x19\x16\xab\x25\x03\xc9\x60\x93\x86" - "\x65\xd8\x32\x86\xe0\x19\xaa\xbd\x87\x59\x33\xac\x36\x3c\x43\xb4" - "\xf7\xd0\x94\xf0\x30\xce\x8b\xc7\xa6\xbd\x87\xa4\x84\x87\x5e\x20" - "\x7d\x98\x56\xae\x5e\xbe\x2d\x25\x3c\xe4\x02\xe9\x43\xff\x9b\xf9" - "\x69\x40\x38\x79\x9f\xd4\xfd\x8b\x96\xcf\x5f\xf8\x44\xa9\x6b\xc5" - "\x92\x27\xca\x17\xb8\xe6\x7f\xff\xfb\x0b\x96\x2e\x75\x95\x2f\x76" - "\x7d\xf7\xbe\xe9\xb7\xdd\xe5\xca\xf5\x5e\xe7\x1d\xe7\x5a\x78\xf7" - "\x75\xa5\x59\xf4\xc0\x8a\x25\x9c\xf0\xc0\x8c\xfb\x8b\x5c\x05\xdf" - "\xbd\x2f\x39\x51\x47\xb3\x64\xc1\xfc\xd2\x41\xb1\x18\x6c\x5a\xde" - "\xba\x51\x44\x1b\x47\x49\xdb\xd6\xde\x8c\x51\x8e\x1a\xab\x3f\xb6" - "\xa0\x69\x27\x91\xe8\xf5\x89\xc0\x35\xbc\xe7\xe2\x7b\x6f\x33\x13" - "\x37\x35\x54\x93\xe7\x71\xfe\x8e\xe1\x7b\x1f\x88\x83\x61\x72\xfd" - "\x33\x59\x4f\xd2\xea\xcc\x46\x78\x9d\x1c\x0e\xb6\x47\xc9\xe5\x23" - "\x3b\xf2\x5f\x82\x34\x8b\xb8\x27\x8e\xb8\x88\xb6\xb7\xf2\x9f\xdf" - "\x93\x71\x07\xab\x75\x38\xc7\x29\xca\xaf\x10\x07\x85\x0c\x8b\x7b" - "\xb6\x68\x70\xf9\xf7\xc7\xfd\xdf\x93\x6b\xb2\x2f\x5f\x4a\xf6\x97" - "\x47\x89\x13\x75\xcf\x93\x6d\xc7\xf3\xbc\x0e\x96\x3f\x31\x64\xfd" - "\xd7\xdd\x6c\x5f\xd7\x21\x3e\x44\xab\xed\x5c\x36\xc3\xc6\xad\xdf" - "\xbb\x8d\xe1\x25\xec\xa5\x44\x9c\x0f\xf0\x0b\x93\xe1\xf3\xf3\xac" - "\x80\x9d\xf6\x29\x39\x7a\xb2\x1a\xf3\x83\x95\xd5\xe4\x88\x89\xbf" - "\xdf\x9c\x4f\x96\x16\x8c\x7e\x2a\xa2\x22\x1a\x58\x72\x9a\x69\x38" - "\xe0\xa8\x10\x7f\x0f\x46\x88\x1e\xe8\xf4\x89\x4d\x67\xc8\x86\x31" - "\xa8\x25\xb0\x84\xf7\x92\xe4\xef\xdc\xf1\x05\xd9\x20\x87\x31\xa7" - "\xe9\xfe\x63\x95\x0f\x88\x98\xef\x01\xb2\xbd\xef\xad\x26\xb1\xbe" - "\xf9\xa5\x4d\x1f\x92\xed\x97\xbd\xd5\xd6\x5e\xe1\xa4\xca\x72\x5e" - "\x9f\x10\xe4\x8b\x88\x1e\x5e\x6f\x6f\x2a\x89\x31\xcc\x0f\xba\x7d" - "\x4e\x6a\x29\x8f\xd0\xaa\x13\xa2\xa7\xe6\x43\xb2\xf3\x5c\x57\x73" - "\x67\x84\xbf\x2b\xb7\xaf\x7a\x80\x32\x4e\x15\x91\xb5\xb9\x6c\x2b" - "\x05\xe7\x44\xa8\xf2\x84\xe8\x68\x2a\xf9\x94\x5a\xca\xf6\x50\x71" - "\x1b\x59\x9b\xda\xff\x44\xf2\x5b\xe9\x4d\xb6\x82\xaa\x73\xe4\x5c" - "\xf5\x04\xc7\x9d\xa3\x95\xab\x68\xf8\xca\x8f\xc8\x11\xec\x68\x43" - "\x39\x67\xe8\xd1\x63\x64\x01\x3e\xeb\xb3\x7f\x22\xe7\xb3\xb3\x78" - "\xbf\x66\x1e\xd5\x55\x91\x53\xf8\xdc\xd9\xbd\x3e\x77\x4e\xaf\x70" - "\x5f\xda\xed\x73\x8f\x6c\xf1\x00\xbe\xfd\x00\x8d\x68\xa3\x91\x07" - "\x4f\xb7\x59\xb7\x9e\xa5\x31\xae\x07\x59\x07\xee\x6f\xad\x3b\x0b" - "\xf8\xf5\xc7\x5b\xe3\xc8\x6b\xcc\x13\xcd\x3c\xde\x11\x2c\xea\xa1" - "\x38\x70\x6d\xed\xa5\x31\x75\xbd\xe4\x8c\xaf\x3b\xde\xca\xb2\xe8" - "\x5b\xdf\x94\x0f\x3b\x38\xec\xcd\xc7\xf6\xd9\x82\x4d\x9d\xd4\x1c" - "\xe9\xa5\x16\xfa\x98\x82\xde\xbf\x06\x7e\xf9\xd8\xbe\x21\x71\x34" - "\x80\xc0\x4a\xde\xf7\xa2\xf4\xc6\xd7\xcc\xdf\xc8\x55\xd3\xe6\x2a" - "\xca\xf6\xac\xa4\x61\xa7\x11\xaf\xc6\xb9\x87\x0a\x82\xd1\xbf\x06" - "\x56\xca\xbd\x9a\xab\xed\x55\xcd\x94\xd1\x12\xd9\xca\xdf\x86\x5b" - "\x63\x23\x6c\x05\xc1\x48\x2b\x05\x3d\x9f\x04\xe2\xd9\xb6\x09\x1b" - "\xe2\x64\x7f\xe3\x7c\xab\x35\x68\x3b\x4f\xc1\xa2\x08\x1d\x42\xd9" - "\x62\x93\x6d\x0e\x6c\x56\x5e\x4b\xa4\x87\xbf\x79\xc9\x15\x5d\xce" - "\xac\xcd\x4b\x68\xdc\x8e\xb3\x34\x76\xfb\x59\x72\x8b\x6e\xb7\x95" - "\xf7\x5f\xce\x3d\x93\x43\xdb\xf1\xce\x6e\x87\xee\x9c\x55\xfb\x30" - "\xc5\x70\x6d\x1f\x66\x9f\x9b\xea\x7b\xfb\xf7\x61\xf6\x76\xf5\xef" - "\xc3\x64\x5d\xe2\xbd\x98\x68\x1b\x3d\xac\xd3\x1b\x16\x91\x6d\xcd" - "\x67\x44\xb7\x54\x5b\x79\xdf\xa8\x38\x89\xf4\xc3\xa5\x31\xf2\xfd" - "\x8d\x65\xff\xcf\x3d\xc9\x7b\x65\xf3\x31\x5e\x99\x06\x23\x30\x2d" - "\x07\xcf\x18\x3c\xe8\xd7\xa7\x8d\xc7\x03\x89\x4c\x83\xbf\x3e\x0d" - "\xf6\x79\x9a\x17\x4f\x0d\x9e\xad\x78\xd0\x32\xa7\xed\xc2\x03\x3b" - "\x3e\x0d\x63\xae\x69\xe8\x6f\xa7\x35\xe1\xc1\xb8\x6a\x1a\xb4\xb4" - "\x00\x76\xa4\x00\x78\x0a\x26\xe0\x29\xc4\x83\xfc\x05\xd5\x78\x90" - "\xb7\x00\x79\x0a\x90\xa7\xe0\x08\x9e\x56\x3c\xe8\x93\x0b\x90\xaf" - "\xa0\x93\xe8\x21\x90\xf3\x10\x2c\xf5\x43\x28\xff\x21\xf4\x23\x0f" - "\xa1\xbf\x78\x08\x54\x3e\x04\xfb\xff\x10\xca\x7c\x08\xf9\x1e\x42" - "\x9e\x87\x90\xe7\xa1\x0e\x3c\x61\x3c\xb0\xe9\xd3\x91\x6f\x3a\xc6" - "\x69\xd3\x5d\x78\x40\xf7\x74\xd0\x3d\x1d\x74\x4f\x07\xcd\xd3\xe1" - "\x37\x4f\x47\x99\xd3\x41\xe3\x74\xe4\x9b\x8e\x3c\xd3\x91\x67\x06" - "\x68\x9c\x01\x7e\x67\xc0\xa7\x9f\x81\x7c\x33\xe0\xc7\xce\x80\x1c" - "\x66\x80\xde\x19\x65\x78\x2a\xf1\x80\xde\x19\x7b\xf1\xa0\xcc\x19" - "\xa0\x71\x06\xf2\x15\x22\x4f\x21\xf2\x14\x82\xc6\xc2\x5c\x3c\xe0" - "\xb1\x10\xf9\x0a\x91\xaf\x10\x7c\x16\x62\xbc\x5a\x08\xd9\x14\x62" - "\xfc\x5d\x08\x1a\x67\x82\xae\x99\x80\x9b\x09\x9a\x66\x02\xef\x4c" - "\xc8\x70\x26\xf8\x99\x09\x98\x99\xa0\x6b\x26\x78\x9a\x09\xda\x66" - "\xa2\xff\x9d\x09\xda\x1e\x06\xfc\xc3\xc0\xfd\xf0\x64\x3c\x80\x7f" - "\x18\xf8\x1e\x06\xdc\xc3\x90\xd7\xc3\xc0\xf7\x08\xe8\x7e\x04\x34" - "\x3c\x02\x98\x47\x80\xf7\x11\x94\xff\x08\xca\x7f\x04\xe5\x3f\x82" - "\xf2\x1f\x01\xfc\x23\xc0\xfd\x08\xca\x7f\x04\xf0\x45\xc0\x57\x04" - "\xb8\x22\x94\x5f\x04\x7c\x45\x28\xbf\x08\xe5\x17\x01\xa6\x08\x78" - "\x8b\x50\x7e\x11\xca\x2f\x02\xfe\x22\xc8\xa7\x88\xf3\x80\xcf\x59" - "\x28\x67\x16\xe4\x32\x0b\xf8\x67\x15\xe0\x81\x3c\x67\x01\xff\x2c" - "\x58\xa6\x59\x28\x63\x16\x64\x33\x0b\x75\x32\x0b\x78\x66\x01\xcf" - "\x2c\xe0\x98\x85\xfc\xb3\xc0\xc3\xa3\xc8\xfb\x28\xf2\x3e\x0a\xba" - "\x1e\x2d\xc1\x83\xba\x7f\x14\xf5\xf0\x28\xe0\x1e\x85\x9e\xc0\x1a" - "\xd0\xa3\x28\xe7\x51\x86\x45\x59\xb3\x51\x7f\xb3\xc1\xd3\x6c\xf0" - "\x34\x1b\x79\x66\xa3\xde\x67\xa3\xac\xd9\xa0\x73\x36\xf2\xcc\x86" - "\xfc\x67\xb7\x13\xf1\xd0\x71\x0e\xf4\x6a\xce\x58\x3c\xa0\x6b\x0e" - "\x60\xe7\x80\xaf\x39\xa0\x6f\x0e\xca\x99\x83\xfa\x9e\x83\x3c\x73" - "\x40\xd3\x1c\xd0\x33\x07\x75\x36\x17\x79\xe6\x82\x96\xb9\xd0\x8b" - "\xb9\x80\x9b\x8b\x71\xfc\x5c\xe8\xd4\x5c\xc8\x61\x2e\x60\xe7\x82" - "\x8f\xb9\xe0\x63\x2e\xf2\xcc\x85\x2c\xe6\x42\x0e\x73\xc1\xc7\x5c" - "\xd0\x37\x0f\x79\xe7\xa1\xae\xe7\x41\x7e\xf3\xa0\x8f\xf3\x90\x7f" - "\x5e\x29\x1e\xe0\x98\x87\xb2\xe6\x81\xaf\x79\xc0\x33\x0f\x78\xe6" - "\x01\xc7\x3c\xe4\x9f\x07\x5a\xe7\x21\x6f\x31\xf2\x16\xa3\xdc\x62" - "\xd0\x58\x0c\xda\x8a\x51\x66\x31\xe0\x8a\x77\xe3\x81\x4e\x15\xa3" - "\x9c\x62\xc0\xc2\x8a\x52\x31\xe8\x2c\x86\x2c\x4a\x20\xb7\x12\xe4" - "\x29\x01\x6f\x25\x28\xab\x04\x32\x28\x41\x9e\x12\xc8\xa0\x04\xf5" - "\x59\x02\xb8\x92\x28\xd1\x7c\xb4\xd5\xf9\xa0\x6b\x3e\x60\xe7\x43" - "\x66\x0f\x72\x1c\x68\x9c\x8f\xb2\xe6\x23\xdf\x7c\x94\x37\x1f\x79" - "\xe7\x83\xb6\xf9\xa0\x6b\x3e\xe8\x9a\x8f\xfc\xf3\x51\xd6\x7c\xb4" - "\xb3\xf9\x68\xa3\x8f\x81\xbe\xc7\x50\xde\x83\x3d\x2f\xbc\x42\xc4" - "\xf6\xa3\x6e\x34\xd9\xf8\x7c\x10\x69\x4b\xb6\x95\xf1\x59\x21\x61" - "\xed\xb7\xa5\xff\xb7\x9b\xe3\x7b\xb4\x78\x2b\xc3\xf3\xf9\x22\x0c" - "\x2f\xe3\x2e\x97\x71\x61\x2d\xce\x32\x30\xce\x9d\x80\xe3\x77\xd7" - "\xb6\xb2\x0c\xc6\xa1\xe7\xd7\xc2\x61\x3d\x2f\x87\x43\xb0\x49\xea" - "\xcd\x61\x37\xf2\x4d\xb3\x69\xef\x1c\xf5\xce\xcf\x63\x1e\x7c\xa1" - "\x04\xed\x36\x94\xd5\xc1\x61\xfe\xad\x95\xc7\xe7\xa0\x84\x53\xe2" - "\x2c\x03\xe3\xdc\xf2\xbc\x94\x14\x38\xc5\x67\x89\xe8\xa8\x02\xef" - "\x08\xdb\xe2\xdb\x14\xfd\xba\x9c\xd2\xa4\x59\xd2\xa7\xb9\xc9\x58" - "\x86\xe4\xdb\x40\x33\xd3\x6b\x88\x0f\x1b\xe2\x8d\x72\x89\xc8\xf4" - "\x24\x3c\x52\x2e\x4d\xda\x3b\xa4\xbd\x03\x9a\x7c\xf4\xfa\x1c\xa2" - "\x95\xc5\x72\x1e\x92\x22\x1f\x63\x9c\x65\x60\x5c\x42\x3e\x46\x38" - "\x5d\x3e\x61\x8d\xcf\x21\x26\xf2\x31\x4b\xb3\xa4\x4f\x93\xf2\x49" - "\x94\x61\x90\x8f\x8c\x33\x91\x8f\x1e\x6f\x90\xcf\x43\x23\x35\xf9" - "\x18\xf0\xb0\x3c\x0a\x3a\xd5\xfb\x21\xd2\xc2\xa1\x64\xf9\xb8\x6d" - "\xfd\x65\xb9\x53\xf5\xc7\x18\x67\x19\x18\x67\x94\x8f\x3b\x55\x7f" - "\x34\x3e\xdd\x66\xfa\x63\x96\x66\x49\x9f\xa6\xcb\xc7\x9d\xaa\x3f" - "\x32\xce\x5c\x3e\xee\x14\xfd\x99\x3e\xbe\x5f\x3e\x6e\x83\xfe\x4c" - "\xcf\xd6\xde\x2e\xed\x4d\x9a\x7c\xf4\x76\x3f\x54\x2b\x8b\xdb\xf8" - "\xd0\x14\xf9\x18\xe3\x2c\x03\xe3\x12\xf2\x31\xc2\xe9\xf2\xe9\xd1" - "\xf4\x60\xa8\x89\x7c\xcc\xd2\x2c\xe9\xd3\xa4\x7c\x12\x65\x18\xe4" - "\x23\xe3\x4c\xe4\xa3\xc7\x1b\xe4\x33\xa3\x50\x93\x8f\x01\x0f\xcb" - "\x63\xc6\x38\xed\xad\x87\x5d\xba\xfd\x61\x5a\x0c\x76\x63\x68\xc2" - "\x6e\x84\x54\xfb\xd7\xed\x5c\x7c\x9b\x4c\x0b\xa7\xa4\x59\xd2\xa7" - "\xb9\x8d\xf9\x7a\x52\xf2\x59\xf5\xb4\x2a\xcd\x86\xb0\x8c\xab\x14" - "\xdd\x5c\xe7\xd6\xf8\xe5\xfd\xe5\x56\x69\xf6\xc4\x04\xc6\x72\x61" - "\x18\x03\x1d\x06\x7e\x75\xfb\x9c\x8e\xe7\xb8\xb1\x1e\x4c\xf8\x36" - "\xa6\x87\xe0\x43\xe9\x76\xad\x1f\xbf\xb2\xf3\x8c\x1f\xe9\x85\x2a" - "\x5c\xe8\xd1\xde\xba\xfd\x0f\x6b\xf0\x43\x52\x68\x09\x6b\x65\x0d" - "\x31\x91\xbf\x31\x2d\x55\xfe\x86\xb4\x01\xf2\x37\xe6\x4b\x95\x7f" - "\xd8\x20\xb7\x21\x69\xe4\x6f\x06\x93\x2a\x7f\x13\x98\x24\xf9\x27" - "\xf8\x35\x91\x7f\x12\xcf\x26\xf2\x4f\xe2\x3b\x59\xfe\x0f\x67\xeb" - "\x76\xa1\x1f\xbf\x51\xfe\x33\x8f\xa9\xf0\xcc\xb0\xf6\x0e\x24\xcb" - "\xdf\x9d\xaa\xff\x5a\x59\x6e\x33\xfd\x37\xa6\xa5\x91\xbf\xdb\x4c" - "\xff\x8d\xf9\x06\x91\xbf\x3b\x9d\xfe\x9b\xc1\x0c\x22\x7f\xb7\x99" - "\xfe\x27\xf8\x4d\x2f\x7f\x77\x3a\xfd\x4f\xe2\x3b\x59\xfe\x8f\x6c" - "\x48\x96\xbf\x3b\x45\xff\x1f\xd1\xf4\xff\x11\x4d\xff\x1f\xc9\xd3" - "\x7d\xb8\xe8\xe5\x65\xc3\xb8\x7c\x7e\x1b\xed\xa7\x21\x6c\x49\x0e" - "\x2b\x7f\xce\x90\x6e\x95\x76\x52\x8b\xd3\x65\x9b\xb0\xef\x03\xe3" - "\x2d\xe6\xf1\x6e\xd2\x71\xea\x3e\x9e\x96\x9e\xe4\xe7\x69\x71\x06" - "\x9b\x5b\xd4\xc1\xef\xfe\xbc\xcc\x5f\xd1\x11\xed\xdd\xa6\xbd\x75" - "\x7d\x4b\xf8\x3d\x92\x6f\x13\xff\x49\x8b\x1f\xe0\x3f\x0d\x8c\x77" - "\x1b\xe1\x7b\x0c\xf0\x56\xa3\x5c\x53\x7d\x39\x9d\x1f\x2d\x7d\x80" - "\xaf\xa7\xf3\x96\x3e\xdd\x50\xae\x56\xa6\xae\x4b\x66\x3c\xa5\xa4" - "\x25\xf1\x65\x4c\x0b\x61\x1c\x66\xf4\x0d\x75\xfd\xd1\xd2\x02\x2a" - "\x3c\x4b\x93\xe7\xac\x3d\x7a\xfb\xd5\x6d\xa7\xa1\xec\x24\x7f\xcb" - "\x50\x6e\x92\xbf\x35\x30\x7e\x80\x3c\x75\xf8\x54\x79\x26\xf9\x7e" - "\x26\xf2\x4c\x4d\x4f\x95\x67\x4a\x7a\x92\x3c\xc3\x46\xdb\x68\xc6" - "\x93\x89\x3c\x13\x7c\x25\xcb\x73\x76\x9e\xd1\x97\x4c\x96\xe7\x6c" - "\x6d\x1c\x32\xdb\xad\xbd\xa9\x5f\x9e\xee\x54\xfd\x4c\xf2\xcf\x92" - "\xcb\x75\x9b\xe9\xa7\x16\x6f\x26\x4f\xb7\x99\x7e\x26\xf9\x8a\xe9" - "\xe5\xe9\x4e\xa7\x9f\x29\xe9\xa9\xf2\x74\x9b\xe9\x67\x82\x27\x73" - "\x79\xba\x4d\xf4\x73\xce\x16\xa3\xef\x99\x2c\xcf\x39\x25\x2a\x3c" - "\xc7\xab\xbd\x0b\xfa\xed\x9b\x7b\xa8\xb2\x25\xee\xa1\xc9\xf6\x2d" - "\x11\xb6\x24\x87\x75\xfb\x96\x48\x37\xd8\x37\xf7\x50\x73\xfb\x96" - "\x14\x6f\x31\x8f\x67\xfb\xe6\x36\xda\xf4\x0e\x2d\x3d\xc5\xbe\xc9" - "\x38\x83\x7d\x9b\x7b\x44\xd9\x37\xb7\xc1\x9f\x9c\xbb\x4b\x7b\xef" - "\xd3\xde\x0d\x03\xed\x9b\x7b\xa8\xb9\x7d\x93\xf1\x26\xf6\x2d\x35" - "\xde\x6d\x84\x37\xb1\x6f\xee\xa1\x83\xdb\x37\xf7\xd0\xc1\xed\x5b" - "\xba\x74\x43\xb9\x03\xec\xdb\x40\x9e\x52\xd2\xd2\xd8\x37\x96\xdd" - "\xbc\x56\x73\xfb\x26\xd3\x1a\x54\x78\x9e\x26\xcf\x79\x5b\x06\xda" - "\xb7\x44\xd9\x29\xf6\x2d\x51\x6e\x8a\x7d\x4b\x8d\x1f\x20\xcf\x14" - "\xfb\xe6\x1e\x3a\xb8\x7d\x73\x0f\x1d\xdc\xbe\xa5\x4b\x4f\x92\x67" - "\x8a\x7d\x1b\xc8\x93\x89\x3c\x4d\xec\x1b\xcb\xac\xc4\x65\x6e\xdf" - "\x38\xad\x58\xf3\xf3\x4a\xec\xea\x5d\xac\xc6\xcb\xe0\x8f\xe7\x8c" - "\x8c\xed\xd0\x10\xb6\x24\x87\x55\x3b\x34\xa4\x27\xda\x21\xc7\x99" - "\xb5\xc3\x94\x78\x8b\x79\xbc\x9b\x74\x9c\x7a\x3b\xd4\xd2\x93\xda" - "\xa1\x16\x67\x68\x87\xf3\x0b\xf8\xdd\x9f\x97\xf9\x9a\x9f\xab\xbd" - "\x65\xf8\x24\x7d\xaf\x9d\xd7\x8c\xba\xac\x0e\x71\xb8\x74\xbc\x5c" - "\xc3\xd9\x3e\x4a\x1c\xd9\xfe\x92\x68\xec\xf6\x3f\x36\x21\x44\x1b" - "\xe5\x19\xd1\x1b\x11\xde\x88\xf8\xc3\x2e\x22\x9e\x73\x6f\x2c\xe3" - "\xb5\xa1\xc7\x8a\x42\x94\xd5\x94\xba\x36\x24\xfc\x53\x3a\x78\x5d" - "\xf6\x57\x55\xad\x43\x84\xf5\x9f\x3a\x5a\x3a\x3a\x69\xf7\xca\x8e" - "\x21\xbe\x3f\x90\x35\x18\x3d\x49\xb7\x8c\x24\x27\xef\x0f\xa8\x7f" - "\x49\x84\xf0\xee\xc0\xd3\xe9\x59\xc9\x67\x60\x3d\xf6\xfa\x8d\xb5" - "\x34\xf2\x8f\x7c\xf6\x89\x5c\xf3\x7a\xec\x9d\xfe\x35\xaf\xea\x8f" - "\x9a\xdb\x03\x86\xf5\xae\xea\xd5\xae\x01\xeb\x5d\x8f\x5f\x27\xe3" - "\x0e\x8a\xa8\x5a\xdf\x8a\x85\xb4\xf8\xcc\x94\xf8\x0e\x15\xbf\xe0" - "\x4c\x4a\x7c\x8f\x16\xff\x51\x4a\x7c\x58\x8b\x1f\xee\xd2\xd6\xd3" - "\x5a\x98\x8e\x15\xbc\x9e\x56\xfa\x77\x5e\x4f\x6b\x29\xd5\xd6\xd3" - "\xe4\xd9\x02\xa5\x1f\x89\x9f\x55\x13\x9f\x99\x84\xdf\x3f\x66\xfa" - "\xc5\x41\xd2\x69\xcf\x44\xdc\x43\x1c\xb7\xe5\xcf\x64\xc3\x23\xd7" - "\xd2\x84\xff\x7b\xd3\x78\x1d\x8d\xd7\xd3\xea\x9f\x27\xda\xf6\x92" - "\x38\x56\x37\x4a\xb4\xd6\xbd\x24\x9a\xba\xfd\xdf\x0f\xe8\x6b\x6a" - "\x1b\x10\xb7\x01\x71\x3f\x42\x3a\xaf\xab\xb1\x4c\xde\x9f\x13\x20" - "\x3e\x5b\x4b\xd4\x34\xd7\x3a\x2c\xe4\xd9\x74\x96\x6c\x7c\x96\xd9" - "\x5a\xc8\x37\x58\x1e\x91\xdf\x33\x6f\x7e\x49\xb4\xc7\xad\xb9\xd4" - "\x52\xde\xce\xeb\x39\xa3\xd6\xc4\xf9\x1b\xb5\x4f\xa9\x2a\x22\x4e" - "\xf3\x77\xcf\x4c\x43\x71\xc5\x3f\xf3\xf9\x89\x96\xc6\x02\x22\x3e" - "\x8b\xa2\xfe\x52\xa2\x1d\x97\x82\x46\xd0\x74\x78\x21\xd7\x77\x69" - "\x7e\x88\x02\xe5\x6a\x6f\xe4\x6a\x3b\x9f\x95\x7c\x92\xbe\xbf\x41" - "\xf8\x45\x0f\xf3\xe6\x88\x55\x13\x9f\xd5\x22\xac\x72\xcf\x4e\xd9" - "\x36\xfc\xde\xa2\x9f\xd7\xe2\x27\x1b\xc3\x04\x4f\xf4\x10\xd3\x1c" - "\xa2\xef\xb7\xbd\x5f\x19\xe0\xfc\x95\x2c\x1b\xe1\xf7\xe9\x38\x2c" - "\xf2\xbc\x17\x3f\xd9\xf9\xbc\x97\x2f\x83\x43\x64\x35\xe5\xbf\x5f" - "\x12\x26\x5e\x63\x0c\xb6\xf6\xd0\xfb\x95\x27\x65\x1a\xc3\x88\xac" - "\xc6\xa4\x34\x3d\x5f\xd6\x2a\xf1\x77\x94\x9d\xcf\x75\xc9\xe7\xb1" - "\xc5\xd4\xd9\x48\xd9\x7c\x76\x47\xa0\xea\x63\xae\xeb\x3f\xd4\xa3" - "\x6e\xb4\x33\xe5\xa0\x8b\x0b\x8e\xf0\xb9\x3b\x7c\x8e\x9c\x3c\x43" - "\xce\x3a\x9e\xc4\x0a\x77\x76\xe2\x1c\xb9\xff\x0f\xce\x90\x43\xdd" - "\x38\x77\x58\xd5\x19\x72\x09\xfe\xe7\x48\x19\xe6\xb2\xae\x72\xdc" - "\x8b\xf3\xc8\x18\xef\xe4\xf8\xcd\x7e\x71\x44\xd7\x13\x4e\x63\xbe" - "\x90\x46\x5a\x5a\xeb\xc0\xb4\xc7\x3a\x38\x8d\xd7\xd5\x82\xa5\x31" - "\xfa\xe5\xe3\x31\xeb\xfa\x5e\xb2\xf1\x1a\x9b\x86\x57\xca\x56\xad" - "\xb3\x3d\x5e\x92\xbc\xce\xf6\xa4\x07\x8f\x17\x4f\x0d\x9e\xad\x78" - "\x76\xe1\xd9\x87\xa7\x15\x4f\x07\xd1\x53\x00\x7b\x2a\x1b\x0f\x2c" - "\xc9\x53\xe3\xf1\x4c\xc4\x03\xab\xf1\x14\xb4\xee\xa9\x22\x3c\xa5" - "\x78\x80\xed\xa9\x0d\x78\x76\xe2\xd9\x8f\xe7\x18\x9e\x08\xd1\xc2" - "\x91\x78\x90\x67\x21\xe0\x17\x02\x6e\x21\x64\xba\x10\xe5\x2c\xac" - "\xc3\x03\xd8\x85\xbb\xf1\xec\xc5\xd3\x88\xe7\x04\x1e\xe4\x79\x1a" - "\x65\x3d\x3d\x16\xcf\x64\x3c\xc8\xf3\xf4\x5a\x3c\xa0\xeb\x69\xc0" - "\x3d\x0d\x9a\x9e\x6e\xc3\xd3\x89\x87\x61\xa3\x44\x8b\x6c\x78\x50" - "\xce\xa2\x71\x78\x90\x67\xd1\x1c\x3c\xa0\x67\x51\x2d\x1e\xe4\x59" - "\x04\x5a\x16\x81\x8f\xc5\x80\x5b\x0c\x1e\x16\xbb\xf1\x80\x87\xc5" - "\x80\x5d\x3c\x15\x4f\x21\x1e\x94\xb3\xb8\x12\x0f\xf2\x2c\x06\x4d" - "\x8b\x41\xcf\xe2\x76\x58\x35\xe4\xf1\x80\x16\xcf\x04\x3c\x80\xf3" - "\x40\x56\x1e\xc8\xca\x03\x5e\x3d\x80\xf5\x80\x0f\x0f\xf8\xf0\x80" - "\x67\x0f\xe8\xf7\x80\x9e\x67\xc6\xe0\x01\xfe\x67\x80\xf3\x19\xc0" - "\x3d\x03\x1a\x9e\x01\xdd\xcf\x80\xde\x25\x4e\x3c\xa0\x61\x09\xd2" - "\x97\xa0\xfc\x25\x28\x7f\x09\xf0\x2e\x41\x6b\x5d\x02\xd8\x25\x28" - "\x7b\x49\x13\x1e\xf0\xb7\x14\x3c\x2d\x05\xdc\x52\xe0\x59\x0a\xb9" - "\x2d\x45\x39\x4b\x8f\xe0\x01\xae\xa5\x9c\x0e\x7c\x4b\x51\x5e\x39" - "\x68\x2c\x47\x99\xe5\x80\x2d\x07\xef\xe5\xe0\xa3\x1c\x74\x95\x83" - "\x87\x72\xc0\x2d\x03\x9e\x65\xb9\x78\x50\xce\x32\xd0\xbe\x0c\xb8" - "\x96\x21\x7d\x19\xf0\x2d\x43\x79\xcb\x40\xdf\xb2\x00\x1e\xc8\x69" - "\x19\xe4\xb4\x0c\x38\x97\xe7\xe0\x81\x3c\x97\xa3\xde\x96\xa3\xfc" - "\xe5\x90\xe7\x72\xd0\xb7\x1c\x79\x96\x23\xcf\x72\xf0\xbb\x1c\xf8" - "\x97\x83\xd6\xe5\xc8\xb7\x1c\xf9\x56\x80\x8e\x15\xe0\x6d\x05\xe8" - "\x58\x01\xbd\x58\x01\x3a\x56\x34\xe0\x01\xdc\x0a\xc8\x66\x05\xf0" - "\x7a\x41\xa7\x17\xf2\xf4\x02\xc6\x0b\xfe\xbd\xe0\xdf\x0b\xba\xbc" - "\xe8\x9d\xbc\xa8\x67\x2f\xe0\xbd\xc0\xed\x45\x1d\x7b\x01\x5f\x01" - "\x7c\x15\x80\xab\x00\x5f\x15\xc0\x57\x01\xba\x2b\x40\x43\x05\x60" - "\x2a\x80\xb7\x02\xe5\x57\xa0\xfc\x0a\x94\xbf\x12\xe5\xaf\x04\xfc" - "\x4a\xe0\x5e\x89\xf2\x57\x02\x7e\x25\xf0\xad\x04\xdc\x4a\x94\xbf" - "\x12\xf8\x9e\x45\xf9\xcf\xa2\xfc\x67\x01\xf3\x2c\xf0\x3e\x8b\xf2" - "\x9f\x45\xf9\xcf\x96\xe0\x01\x8f\xcf\x42\x37\x9f\x45\x19\xcf\xee" - "\xc1\x03\xdc\xcf\x02\x6f\x25\xf0\x56\x42\x86\x95\x90\x47\x25\xf2" - "\x54\x22\x4f\x25\xe8\xa9\x84\x5c\x2a\x51\x6f\x95\xc8\x57\x89\x7c" - "\x95\xa0\x0b\xc6\x8d\x2a\x51\x56\x25\x7a\xc4\x55\x28\x6b\x55\x1e" - "\x1e\xc0\xad\x02\x2d\xab\x80\x77\x15\xe8\x5e\x05\x7a\x56\x01\x66" - "\x15\xf4\x6b\x15\xea\x67\x15\xea\xb1\xca\x8e\x07\x74\x55\x01\xbe" - "\x0a\xb8\xab\x50\x4f\x55\x80\xaf\x02\xbe\xaa\x76\x3e\xb9\x11\xd6" - "\x0e\xf8\x7c\xa0\xdb\x07\x1a\x7c\x80\xf1\x01\xaf\x0f\xe5\x3f\xc9" - "\x6f\xd0\xe0\xab\x61\xef\x07\x0f\x68\xf7\x35\xb2\x67\x89\x07\xf9" - "\xaa\xa1\x73\xd5\xd0\xf9\x6a\xe0\xae\x86\x5c\xaa\xc1\x6b\x35\xf4" - "\xb8\x9a\xdb\x7c\xc9\x36\xd8\x9f\x57\xfe\xcc\xfe\x86\xb2\x11\xfa" - "\xdb\xd7\x06\x1f\xf6\x93\x32\x63\x38\x8c\xb0\x25\x39\xec\x36\xa6" - "\xf7\x20\xdd\x6a\xcc\xef\x2b\x92\x71\x24\x8a\x93\xe2\xc3\x5a\xbc" - "\xc5\x3c\xde\x9d\x04\xdf\x57\xcc\x7e\x51\x32\x4d\x3a\x9d\x9c\xa6" - "\xd3\x65\x8c\x0b\xc1\x8e\xf1\xbb\xaf\xd8\x6d\xed\xe7\xeb\x49\xaf" - "\x0a\x3f\x59\xc3\xef\x6d\x9a\xdd\x95\x78\x8f\x49\xbc\x09\x19\x80" - "\x8e\x0e\x3d\x0e\xb4\x90\x21\x3e\x6c\x88\xb7\x98\xc7\xbb\x8d\xf0" - "\x3d\x06\xf8\x64\xd9\x14\x62\x4c\xc2\x32\x2b\xc6\x98\x04\x72\x4b" - "\x95\xb5\x49\xba\x65\xf0\x74\xf7\x00\x7e\x92\x64\x97\xc2\x53\x92" - "\x0c\x53\xf8\x4a\x96\xe5\x53\x3b\x25\x4c\x02\xa7\x51\xa6\x4f\x95" - "\xab\xf0\x53\x1b\xb4\x77\x29\xcb\x15\xb0\x5c\x27\x43\x52\xca\x96" - "\x71\x26\xf2\xd4\xe3\x53\xe5\xa9\xc5\x0f\x90\xa7\x0e\x9f\x2a\xcf" - "\xb0\x26\x8f\x21\x69\xe4\x99\x9a\x9e\x2a\xcf\x94\xf4\x24\x79\xca" - "\x32\x4d\xe4\x99\xe0\xc9\x44\x9e\x09\xbe\x92\xe5\xb9\x30\xa2\xc9" - "\x53\xc3\x69\x94\xe7\xc2\x46\x15\x5e\x78\x42\x7b\xef\xed\x97\xa7" - "\x3b\x55\x3f\x65\x9c\xb9\x3c\xdd\x66\xfa\xa9\xc5\x9b\xc9\xd3\x6d" - "\xa6\x9f\x9a\x3c\xdc\xe9\xf4\x33\x35\x3d\x8d\x3c\xdd\x66\xfa\x29" - "\xcb\x34\x97\xa7\x3b\x9d\x7e\x26\xf8\x4a\x96\xe7\xa2\xc9\xfd\xf2" - "\x74\xa7\xe8\xe7\xa2\x91\x2a\xbc\x68\x9c\xf6\xb6\x69\xf2\x64\xfb" - "\x33\x34\xa5\x6c\x19\x67\x22\x4f\x3d\x3e\x55\x9e\x5a\xfc\x00\x79" - "\xea\xf0\xa9\xf2\xec\xd1\xf4\x6b\x68\x1a\x79\xa6\xa6\xa7\xca\x33" - "\x25\x3d\x49\x9e\xb2\x4c\x13\x79\x26\x78\x32\x91\x67\x82\xaf\x64" - "\x79\x2e\xae\xd5\xe4\xa9\xe1\x34\xca\x73\x71\xa9\x0a\x2f\xae\xd4" - "\xde\x85\x9a\x3c\x25\x7f\x9a\xfd\x18\x9a\xc2\x77\x47\xd5\x31\x65" - "\xa7\x98\xe7\xf8\x27\x49\xe9\xe1\x94\x74\xcb\xe0\xe9\xee\xd4\xfc" - "\x3d\x29\xf9\xad\xc6\xf4\x2a\xcd\xe6\x71\xbd\x54\x1d\x4b\xd0\x67" - "\x8d\x17\x27\xd3\x51\xa5\xd9\x3f\x13\x38\xcb\x97\x83\x4b\xa1\xcb" - "\x20\x0f\x96\xe5\x97\x91\x49\x6a\x9f\x66\x26\x97\xe4\x7a\xf2\x44" - "\x75\xbb\xdc\x5f\x96\xdb\x6a\x2c\x0b\x30\xfb\x55\x3d\x79\x34\x7b" - "\xe2\xd9\xa9\xdb\x13\x2d\xcf\x10\x13\xda\xc2\x5a\xb9\x43\xd2\xd4" - "\x97\x31\xdd\xac\xbe\x0c\xe9\xa6\xf5\x65\xcc\x6f\x56\x5f\x61\x83" - "\x7c\x87\x0c\x52\x5f\x66\x70\x66\xf5\x65\x02\x37\xa0\xbe\x12\xf2" - "\x48\x53\x5f\x03\x64\x62\x52\x5f\x03\xe4\x92\x5c\x5f\x4b\x76\xeb" - "\x76\xaa\xbf\xac\xd4\xfa\x5a\xb2\x50\xd5\xd3\x12\xad\x3f\x5d\x52" - "\x98\x5c\x5f\x6e\xb3\xf6\xa5\x95\xeb\x4e\xd7\xbe\x8c\xe9\x83\xd4" - "\x97\x3b\x5d\xfb\x32\xe6\xbf\x40\x7d\xb9\x07\x6b\x5f\x66\x70\x17" - "\xa8\x2f\x77\xba\xf6\x95\x90\xc7\xe0\xf5\xe5\x1e\xac\x7d\x0d\x90" - "\x4b\x72\x7d\x95\xcf\x49\xae\x2f\xb7\x49\xfb\x2a\x1f\xa3\xea\xa9" - "\x7c\xa2\xf6\x96\xfd\x4b\xef\x27\xbc\x5e\xd0\x4f\x0f\x87\x53\xed" - "\xbd\x16\x67\x19\x18\x97\xec\x53\x6b\x70\xfd\x7d\x09\xcb\xdc\x10" - "\x3f\xa0\xbf\x4a\x4e\xb3\xa4\x4f\xeb\x2f\x87\xe3\x52\xfd\x6c\x9d" - "\xe6\x54\xb9\xe9\x74\x27\xcb\x6a\x59\x07\xbf\x15\x1e\x63\x7f\xb1" - "\x2c\xa0\xc2\xcb\x8e\x69\x6f\xdd\x9f\x91\xbe\xa4\x8e\x83\xf3\xa5" - "\xf3\x4f\xb5\x34\x53\xff\x74\x60\x9a\x3b\x35\x5f\x92\xff\x9d\x94" - "\x96\xc6\x07\x4f\x81\x31\xf5\xc3\x2f\x0c\x93\x42\x87\xc1\x1f\xbf" - "\x10\xcf\x7a\x3d\xa4\xe3\xdb\x98\x1e\xc2\x78\x3b\xd5\x37\x37\xe2" - "\x0f\x61\x5c\xae\xe4\xbe\x42\xf3\x8b\x96\x1f\x33\xfa\xe7\x26\xb4" - "\x0c\xf0\x67\x0d\x74\x0c\xf0\x67\x07\xa6\x99\xca\x3f\xe1\xaf\x9b" - "\xc8\x7f\x80\xcf\x6e\x22\xdb\x01\x7e\xfb\x85\x61\x06\xc8\x3f\xe1" - "\xbf\x5f\x88\x67\x13\xf9\x27\xf1\x9d\x2c\x7f\x6f\x43\xaa\x2f\x9f" - "\x2c\x7f\x6f\x99\x92\xbb\x77\xad\xf6\x2e\x34\xfa\xf3\xe6\xb4\xb8" - "\xd3\xe9\xff\x00\xff\x77\x60\x5a\x3a\xf9\xbb\xd3\xe9\xff\x00\x1f" - "\x3f\xbd\x6c\xdd\x83\xe9\xff\x00\x5f\x7f\xa0\xfc\xdd\xe9\xf4\x3f" - "\x89\x67\x73\xf9\xbb\xd3\xe8\xff\x4a\x57\x5f\x8a\xef\x9f\x2c\xff" - "\x0a\x4d\xff\x57\x6a\xfa\x5f\x71\x4c\xd9\x67\x77\x52\x7f\xc1\xe1" - "\x81\xf6\x59\xc6\x59\x06\xc6\xa5\xda\x67\x09\x67\x62\x9f\x55\xbc" - "\xb9\x7d\x4e\xa4\x99\xd8\x67\x3d\xcd\x68\x9f\xdd\xc9\xbe\xbd\x81" - "\xe6\x81\xf6\x59\xd1\x9d\x6c\x9f\x9f\xad\x51\xf6\xd9\x9d\xe2\xcf" - "\x3f\x5b\xa2\xc2\xcf\x6a\xe3\xf8\x67\x0b\xcd\xed\xb3\x7b\x68\x7a" - "\xfb\x2c\xd3\xd2\xd8\xe7\xd4\x34\x77\x6a\xbe\x34\xf6\x19\x69\x17" - "\xb4\xcf\x12\xe6\x02\xf6\x39\x1d\x4c\x0a\x1d\xa6\xf6\xd9\x9c\xe7" - "\x7e\xfd\x33\xe7\xdb\x98\x1e\xa2\xca\x40\x7a\xfb\x2c\xd3\x6b\x94" - "\xdc\x2b\x77\x6a\xef\x72\x73\xfb\x9c\xa0\xc5\xc4\x3e\x27\xe8\x30" - "\xb1\xcf\xa9\x69\xa6\xf2\x37\xb1\xcf\x09\xf9\x0f\x62\x9f\x13\xb2" - "\x1d\xc4\x3e\xa7\x83\x19\x20\x7f\x13\xfb\x6c\xce\xb3\x89\xfc\xd3" - "\xd8\x67\x96\x6f\x55\x5e\x7a\xfb\x2c\xd3\xed\x4a\xee\x55\x63\xd5" - "\x7b\x55\x44\xca\x1f\xbc\xf3\x9c\x68\xaa\x4d\xd0\xe2\x2c\x03\xe3" - "\x92\x6d\x82\x06\x37\xc0\x26\xe8\xf1\x66\x36\xc1\x90\x36\xc0\x26" - "\xf4\xa7\xf5\x97\xc3\x71\xa9\x36\x41\xa7\x39\xd5\x26\xe8\x74\x27" - "\xdb\x04\x5f\x1d\xbf\x15\x1e\xa3\x4d\xf0\x69\xb6\xc0\x27\x75\xf3" - "\x24\x3d\x76\xcc\xb8\xde\x9c\xbc\xce\x59\xbd\x4b\x5f\x6f\x3e\xec" - "\xe2\xf5\xc6\xea\x7d\x21\xca\xf2\x70\x98\xd7\x3b\x6b\x21\x4b\x7d" - "\xfd\x53\x5f\xaf\xe2\x32\xd6\x8e\x12\x21\x0e\x4f\x3a\x43\xc3\x0e" - "\x17\x10\xbd\x32\x4a\xb4\xa9\xf5\xeb\xea\x1e\xfd\xec\xe9\xf5\x88" - "\xe3\x35\x6c\xce\x63\xf6\xbd\xac\xfe\x7d\x66\xcc\x4f\x57\xc5\xac" - "\x64\x09\x56\x7f\x4c\xc1\xad\xa2\xba\x25\x7a\x8c\xe6\x95\x93\x35" - "\x9e\xf1\xd4\x5f\x78\x1d\xcd\x51\x49\x43\xf9\xcd\xeb\xc1\xa7\x69" - "\xf5\x94\xe2\x08\x0d\x15\x6b\x90\x66\x45\x9a\x97\xbe\x63\x48\x53" - "\x67\xac\xf4\xe7\xbb\xc9\x90\x26\xef\xa5\xb8\xe9\x33\xbe\xf3\x74" - "\xb5\x3b\x95\x9e\xff\x22\x2d\x1f\x0c\x42\xcb\x99\xf4\xb4\xf8\xe5" - "\xb7\x7f\x37\x75\x92\xc5\xb5\x88\x2e\xf9\x8c\x56\xef\xe5\xb0\xbc" - "\x9f\x70\x8d\x59\x39\xfe\x3b\xb5\xf4\x21\x86\x74\x43\x59\xfe\x59" - "\x26\xf9\x8d\xe5\x55\x5c\x00\xff\xcb\x17\xc0\xff\xdb\x0b\xe0\x3f" - "\xce\xeb\xd2\x90\x9d\x23\x6e\x4d\x86\xbb\x39\x2a\xcf\x4c\x00\xdc" - "\x69\xc0\xad\x91\x1f\x09\x8b\x35\xb3\xff\xe2\xbb\x5a\x7e\x07\x2e" - "\xef\xdb\xd8\x84\xf4\x60\xb4\x5d\xae\x99\x4f\x06\xa5\x37\x47\x92" - "\xf2\xdc\x91\x4a\xdb\x88\xa8\x4e\x9b\x4c\x9f\x99\x4a\x1b\xd2\x6f" - "\x32\xa4\x2f\xeb\xaf\x77\x7f\x38\x5d\xbd\xf3\x5a\x7c\x70\x2b\x11" - "\xdf\x8b\x7d\xd8\x46\xc4\xe7\x0b\xd7\x26\xce\x54\x58\xd3\x14\xa2" - "\xd5\x4e\xc3\x79\xea\x7c\xd6\xd8\x55\x2d\x91\x08\xf1\xf7\xae\xda" - "\xf9\xb3\x5f\xaf\x3a\x47\x97\xf2\xdd\x1e\x7c\x3f\x4f\x71\xac\xc0" - "\x7a\xb8\x92\xdb\xd3\x5a\xbb\x9e\x37\xdd\xd9\x0d\x5c\xae\x56\xa6" - "\x3c\x9b\x19\x79\x26\xea\x79\x18\x37\x9f\x47\x1c\x87\x5e\xaa\xfb" - "\x07\x3b\x79\xbd\xfb\xeb\xbe\x0a\x2e\x8b\xcb\x29\x21\xad\x1c\x0f" - "\xf2\xec\x1c\xa4\x9c\x41\xf8\x5b\xbb\xfb\xe2\xf9\x23\x9d\xbf\x8e" - "\x0b\xf0\x37\x48\xb9\xcf\x8d\xbd\xf8\x72\x73\xb4\x72\x9f\x2b\xb9" - "\x78\xb9\x3e\x57\xfb\xe5\xe5\x9a\xab\xc9\xf5\xb9\x23\x17\x90\xab" - "\x59\x39\xd1\x2f\x5f\x8e\x4b\x2b\xe7\x07\xb9\x66\xe5\x18\xed\xa4" - "\x3c\xe7\x83\xcb\x50\x77\x3d\x58\xd0\xe6\x32\x91\xaf\xcc\x78\x87" - "\x3b\xc7\x23\xae\x52\xbf\xc3\xbd\xff\x2c\xeb\x1f\xbc\x5c\xdc\x20" - "\xcf\x79\x89\x87\xe8\x07\x75\x7c\xc6\xfc\xe4\x55\xfa\xbd\xe9\x32" - "\xcf\x9e\xc1\xee\x8e\xe7\x7b\x4e\x85\x28\x92\xe7\xe3\xab\xbb\x9a" - "\x7e\xf0\x37\x3e\x7b\x59\xdd\x79\xfc\x83\x88\x6a\x83\x3f\x88\x00" - "\x77\xde\x20\x38\xe4\x9d\xca\x63\x9d\xbe\x2f\xe4\xfd\xed\x2b\xc9" - "\x16\x74\x2a\xdd\x38\x45\x3f\x9c\xa9\xce\x80\xfe\xe1\x04\x9d\x1f" - "\xed\x8c\x7d\xe0\xfd\xe1\x54\x9d\x9f\x10\xfd\x50\x9e\xf3\x23\xd6" - "\xff\x67\xf5\x60\xe7\x9c\x0b\xfb\x71\x79\xc7\x39\xca\xb0\x9f\xa2" - "\x9a\x9d\xf5\xea\x6c\x74\xfd\x4e\x67\x1b\xca\x3b\xa7\xe3\x8f\x58" - "\xab\xb9\xdc\x3d\x26\xe5\x36\xea\xe5\x0a\x3f\x65\xb3\xcc\x5c\xd7" - "\xc8\xbc\x67\x22\x99\xc7\x03\xa2\xe6\x78\x80\xef\x0a\x3a\xe5\xe2" - "\xfb\x89\x6b\x76\x92\x3c\x83\xe2\x87\x6d\x61\xa4\x71\x5f\xaa\x70" - "\x1f\xce\xee\xf6\xd7\x64\x0f\xc4\x5d\xe3\x32\xe0\xce\xe0\x3b\x10" - "\x94\x5c\x6b\x5e\x56\xf7\x42\xd5\xdc\x7f\x38\xca\x7b\x74\x28\x9b" - "\x71\x8a\x75\xc7\x03\x9c\x17\xf8\xbe\xc2\x6d\x88\xcb\x00\x8e\x52" - "\x1d\xaf\xb0\xb7\x55\x73\xfb\x61\x18\x79\xff\x4b\x94\x65\x59\xb3" - "\x36\xa1\x07\x88\x2b\x77\xc1\x7f\x83\xdc\x18\x9f\x76\x8f\x79\x44" - "\xc7\x9d\xee\x0e\x0c\x29\x33\xd4\xfb\x0b\x4a\x8f\xac\xa7\x68\xfd" - "\xf5\xac\x7f\xea\x9e\xae\x75\xcf\x69\x34\xcb\xfa\x64\x5a\x19\x57" - "\x88\xd6\xf3\xdd\xdd\xa4\xe8\xad\xe6\x76\xd1\xd1\xed\x5f\x97\xa3" - "\xd3\xca\xf7\x4e\xe8\x72\x68\x94\xba\xbf\x6e\x9c\xae\x7b\xbc\x37" - "\x86\xf7\x32\x09\xf0\xa7\xee\xb6\x5b\x97\x0f\x1a\xcb\x38\x4d\x9d" - "\x59\xbf\xee\x69\x52\xe7\xf0\xb4\xca\x3b\xd3\xe4\xf9\x3c\x19\x7f" - "\x3d\x49\xeb\xee\x96\x7a\xa1\xea\x24\x1b\x34\x85\x1b\x6d\xbc\x3e" - "\xbc\x5e\x9d\x09\x22\xef\xdc\xe0\xfc\x35\x7c\x2e\x6b\xf6\x66\x79" - "\x77\xb6\xac\x9f\x2c\x91\xd9\x56\x8d\x72\xf6\x18\xe8\x0b\xeb\xed" - "\x62\x6c\x65\xb1\xd4\x4f\xa4\xb7\x26\x68\xb4\x82\x46\x3f\x68\x04" - "\xaf\xf5\xf2\xfc\xfc\x75\x9d\xc9\x34\xae\xbf\x24\x0d\x8d\x7f\x19" - "\x8c\xc6\x7e\x7d\x7c\x17\xe5\xad\xcf\x1b\xa8\x33\xeb\x0b\xf5\xfa" - "\xe4\xf0\xe1\x6b\x26\x72\x59\x7b\x18\x87\xd2\xe1\xf5\xe5\x09\x1e" - "\x12\xfc\xae\xaf\xe5\xfb\xb5\x99\x5f\xdf\x17\x64\x77\x44\xc9\xca" - "\xed\xde\x80\x73\x97\xce\x57\x48\xc9\xc6\x9e\x6a\x7f\xd2\xdd\x77" - "\x84\x7e\x9c\xeb\xd1\x1a\x5e\x77\xb4\x7c\x5a\x54\xc4\xe1\x07\xa1" - "\x9e\xd7\xc3\xff\xdb\x28\x6d\x9f\x58\x2e\x9a\x36\xf7\xaa\xbb\x18" - "\xa7\xc5\xba\x44\x71\xcc\xce\xe7\x0c\x80\xce\x1f\x8d\xd1\xcf\x36" - "\x52\x6d\xfe\x47\xa8\xff\x1f\xec\xe7\x70\x38\xe3\x86\x4b\xf1\xb8" - "\x4d\xed\x87\x8e\x2f\xf3\x68\x79\x71\x2c\x5b\xe2\x52\xf7\x3c\xfe" - "\x68\x61\xe2\xce\x4b\xd0\x24\xb2\x9a\xcb\xf8\x3e\x9d\x70\x5f\x19" - "\x9f\xeb\x64\x51\x74\xfd\x68\x8b\x5e\xc6\x85\xee\x2f\x19\x84\xdf" - "\x36\xfd\x9c\x28\xe0\x0b\x85\x68\x53\x07\xe3\x73\x58\xf8\xfe\x34" - "\xd1\x83\x32\x47\x22\x3e\xc1\x3f\x9f\x15\xc5\x69\xea\xac\x99\x1f" - "\x1d\x53\x36\x72\x83\xd3\xec\xbc\xa8\xc7\x16\x2f\x2e\x2f\x5e\xb2" - "\x80\x5f\xee\xeb\x96\x5d\x9f\x95\x62\xf7\xb3\xd5\x1d\x56\x1b\xc6" - "\xf2\xfe\xc0\x17\x2e\xd5\xcf\x68\xda\x50\xaa\xef\x51\xe4\xb6\x8c" - "\x76\x73\x2f\xf7\x9b\xdc\xbf\x20\xad\xfa\x9d\xca\x55\x72\x7f\xd8" - "\x5f\xec\x64\x4d\xe7\xf7\xb0\x8e\x76\x65\x8a\x6a\x96\x97\xd8\x38" - "\x0a\x7d\xf2\x06\xf8\xff\x1b\x26\x0c\x72\x36\xb9\x27\xb6\xfe\xe3" - "\x1c\xd7\x68\xe2\x7b\x10\xad\xbf\x5e\xd9\x66\xe5\x73\x22\xaa\xf0" - "\x9b\xfd\x38\x79\xae\x84\x95\x04\xd3\x71\xf0\x6c\x1b\xec\xc5\x46" - "\xd8\x84\x66\xf8\x26\x1b\x6d\x69\x69\x30\x9c\xb5\xc5\x67\x1f\xb5" - "\xd3\xc6\xb1\xe9\x60\x45\x4d\x9b\x76\x9f\xe6\xc6\x8a\x46\x3e\x5b" - "\x75\x34\xfd\xf0\x24\x6d\x5c\x66\x73\x92\x13\xbf\x7f\x8e\xdf\xd2" - "\xd7\xe5\xb4\xa4\x3a\xbd\xe2\x4c\x83\x2d\x43\x58\x85\x10\x16\xa1" - "\xfe\x30\xa0\x52\x7f\x19\x78\xac\xc2\x22\x4f\xac\xc9\x80\xa4\x86" - "\x0d\xb5\x91\x63\x44\xb6\xfd\xaa\x2b\xc7\x38\xef\xbd\x67\xe2\x04" - "\x5f\x55\xa5\x57\xc4\xa3\x3d\x0e\x61\xbc\xc3\x54\xb8\x66\x5e\x5f" - "\xad\xce\x0d\x5b\x27\x5c\x66\xb4\x6e\xf4\x0b\x0f\xdf\xd9\x14\x1f" - "\x31\xaa\xc4\xb7\x8c\xac\x6f\xf6\x86\xac\x7c\xcf\xb8\x6b\x39\xef" - "\xc9\xfd\x13\x9d\xa4\x4d\x43\x0e\x21\x0e\xfc\x7b\xc5\x86\x51\x25" - "\x4a\x4f\x36\x4d\x89\x6f\x1a\x55\xd2\x8f\xdf\x46\x8c\xdf\xf7\x32" - "\x59\x77\x56\x75\x58\x83\xb6\x7b\x28\xe8\x8a\xd0\x21\xfc\x4e\x53" - "\x9f\x1e\xc8\x9f\x18\x47\xbd\x3f\x5e\x83\x36\x6f\xe5\x7d\x8d\xb0" - "\x05\xd6\xcf\x68\xd3\xaa\x3d\x69\xf2\xf1\x9d\x34\x5d\x59\x47\xef" - "\xea\xf6\x6f\x42\xfd\x7f\x3b\x71\x07\x15\xc2\x47\x74\x7d\x46\xfa" - "\x9d\x5d\x7e\x19\x77\x42\x87\x31\xef\xe7\x79\x4f\xaa\x08\x48\x3b" - "\x79\xfe\x6f\x1d\xf5\x55\xe6\xe7\x49\x83\xce\x61\x41\xef\x6d\x7c" - "\xce\xcb\x90\x11\x3d\x94\xed\x3b\x27\xfa\x30\x86\x18\x09\xb5\xb5" - "\x62\x0c\x76\x55\xf4\xbc\x28\x6a\xee\x3c\x4b\x2d\x91\x63\x7c\x46" - "\x94\xe5\x57\x8f\xbf\x6b\x0d\xf6\x7c\x1e\x08\xae\x8d\x53\x8b\x27" - "\x4a\xc1\xba\xcf\x03\xcd\x9d\xc7\xf0\x3b\x46\xcd\xf4\x31\x35\x7b" - "\xff\xb3\x5a\x8e\xdb\xea\x44\x35\xcb\xb9\xef\xbc\x28\x0c\xda\xfe" - "\x37\x71\x5f\x08\x3b\x31\x07\x72\x77\x7d\x46\x9b\x5f\x3b\x08\x3c" - "\x6f\xfe\x19\xb8\xa2\xec\x67\xde\x4d\x87\xf0\xbb\xdb\xbf\x79\x8f" - "\x7e\xbe\x99\x19\xad\x0e\x4b\x60\xa3\xc3\x3b\xd7\x1a\x3f\x2f\x26" - "\xf0\xfd\xb2\xe2\xbc\x18\xcf\x7c\x21\x9c\xcb\x61\xbc\xc7\xf1\xdb" - "\xb1\x3a\xb0\xdd\x11\x9d\x4b\xb0\x55\x45\x6c\x9f\x10\x5f\x58\x7f" - "\x9e\x38\x5c\xa0\x85\xa7\x6a\xe1\x7c\x2d\x3c\x59\x0b\xe7\x69\xe1" - "\x89\x1c\x66\x7a\xbb\xfd\x5b\x26\xeb\x34\x75\x59\x87\xb5\x22\x5c" - "\xa8\xd7\x05\xe8\x19\xee\xf0\xae\xb2\x0a\xa6\x47\xd1\x31\x5e\xa3" - "\x2b\x57\x0b\xeb\xf4\x5c\xe1\x88\xae\xfa\x9f\xa2\xe7\x58\x0a\x3d" - "\xed\x06\x7a\xc8\xe1\xcd\xfb\x32\xf4\xe4\x38\xa2\x79\xff\x2d\x7a" - "\x98\x16\x8e\xeb\xf6\xff\xb8\x34\x99\x9e\x1f\x97\xeb\xf4\xa4\xe9" - "\x3f\x3a\xb8\xff\x58\x7a\x99\xbc\x6b\x7d\x58\x30\x7a\x87\xa1\x0f" - "\xf9\xf1\x9e\xc1\xee\x0a\x46\x5b\x70\x02\x06\xfc\xff\xb8\x5a\x96" - "\xb7\x5c\xec\x57\xfd\xe7\x8f\x3b\xf4\xb3\xf5\xc0\xeb\xae\xcd\x8a" - "\xd7\xdd\x6b\xf9\x6e\xe2\x0a\xba\xdc\xe7\x15\x1d\xf0\xbb\xfe\x4f" - "\xa3\x2b\x9c\xd4\x06\x16\x96\x2f\x5d\xfa\xf4\x5d\xae\x85\xf3\x17" - "\x2d\x70\x5d\x57\xea\x5a\x5a\xf6\xc4\xe3\xe5\x0b\x92\xcf\xac\xca" - "\x61\xdb\xc1\x76\x7e\x87\xba\xbf\x2c\xcc\x6d\x80\xf5\x9f\xfb\x76" - "\x75\xde\xe8\xf3\xaf\x0b\xff\xf3\x23\xb9\x6f\xd8\xf1\x3c\xd9\xea" - "\xe5\xd9\x51\xcf\x7b\xf5\x3e\x61\x8d\xe6\xe3\x58\x73\xf8\x5e\x92" - "\xe7\xd1\xff\x6d\xce\x31\xc4\x33\xec\x4e\x3d\x8e\xf1\x6b\xb6\x69" - "\xd8\x49\x7a\x7e\x0a\x97\x69\x2a\xc3\xf3\xa2\x01\x3e\xb4\x25\x2e" - "\x8a\xac\xb0\x29\x82\xef\xaa\x84\xff\x6b\x45\x3e\x01\x7a\xce\xb1" - "\xed\x2d\x44\x98\xc7\xf6\x2e\x9f\x00\x8d\x2f\x64\x22\xcf\x4e\xc4" - "\xd9\x36\xc5\x79\x97\xa3\xe8\xe0\x7c\x88\xbf\x9a\xef\x7f\x2b\xe4" - "\x33\xe4\xa2\xf2\x6e\x08\x8e\xbb\x83\xef\x67\x43\x5c\x8e\x21\xee" - "\x7e\xc4\x39\x11\xe7\xd2\xf0\xcd\x62\x39\x23\x9c\xa7\xf9\xf2\x0c" - "\xf3\xb4\x56\x6e\xb5\x91\xe6\x82\x49\xf7\x4f\xb9\xed\xe6\x5c\x57" - "\xe1\x8c\x6f\xdd\x7d\xcf\xf7\x17\x2f\x7a\x3c\x8b\xa4\xd8\xdd\xb9" - "\xde\xeb\x72\x6f\xf3\x5e\x7f\x97\xcb\xb3\x60\xc1\x12\xd7\x8a\x05" - "\x8b\xca\x5d\xf3\x57\xcc\xaf\xc8\xa2\xc7\x17\x2f\xf9\xfe\x13\x8b" - "\xfe\x97\xac\x96\xa5\xc5\xdf\x7f\xfc\x7f\xf1\xc1\x62\x0a\x3a\x2b" - "\xa9\x3f\x2e\xe4\xbe\x5d\xbb\x8f\xef\x08\x1e\xbe\x2b\xd3\x89\x77" - "\x23\x9e\xfd\x78\xf6\xe1\xe1\xbb\x9c\x5b\x4f\xd3\xcb\x76\xbc\xf7" - "\x76\xfb\x6b\x73\x74\x7f\xa1\x5f\x77\x6a\xc7\xea\xba\x83\xfe\x7b" - "\xaf\xea\xd7\x6a\x0b\x5b\xa2\xb2\xdd\x24\x74\x69\xf3\xf9\x7e\x5d" - "\x92\x77\x78\xf3\x99\x79\xcb\x91\x0e\xdd\xe5\x7b\xb2\x20\xeb\x4c" - "\x96\xd7\x29\xfa\xc9\x65\xf0\x99\x9b\xf8\x6e\x48\xbc\x1b\xa1\x27" - "\x4d\xca\x07\xac\x6d\x05\xdc\xd5\x28\x63\xbf\x56\x86\x0a\x8f\x12" - "\x47\x90\x9e\x71\x52\x0b\x33\xae\x53\xf4\xd2\xeb\xfc\x9b\xdf\xda" - "\xfe\x7f\x47\x30\x22\xc7\x26\xd6\xfe\xb4\x17\xef\xd4\xca\xe0\x73" - "\x0e\xab\xd9\xf7\xd1\xfd\x5d\x1e\xe7\x3a\x2c\xf7\x0a\xd0\xf3\x79" - "\x3c\x63\x76\x9b\xbc\xaf\xb8\xba\x17\xb6\xe1\xf6\xdb\x83\x5e\x11" - "\x40\xba\x85\xc7\xc1\x0f\x7a\x44\xbc\xc5\x73\x8e\xe2\x19\x4f\xb5" - "\xb1\x2c\x59\x7e\xa7\xa9\x76\x88\x1a\x43\xbd\x6c\x97\xf8\x80\x5f" - "\xd1\xfb\xa2\x3a\x23\x57\xf9\xdd\x7c\x07\x18\xfb\xd5\xfb\xb8\x7c" - "\xbe\xcb\x0f\x70\xad\xf5\x2a\x7c\xac\x9f\xe7\x17\xd7\xea\x34\x69" - "\xf1\xad\x80\x3b\xa6\xee\xc9\xab\x3d\xa1\xa7\x29\xdf\xbc\x2e\x0f" - "\x32\xf8\x0b\xf3\xc2\x78\xe5\x37\x0f\xbd\x51\x09\x87\xbc\x7b\x74" - "\xbb\xc1\x76\xa2\x38\x86\x76\x26\x7d\xd8\x17\x43\x09\x1f\x36\x51" - "\x9f\x2f\x46\xcc\x6c\x81\x59\xfd\x69\x32\x9e\x2b\xfc\x2f\x78\x41" - "\xd7\x1e\x29\x4b\x43\x39\xb0\x4f\x7d\xaa\x9c\x97\xf2\x13\xbe\xad" - "\x96\x8e\xb4\x58\x88\x69\xeb\x95\xdf\xb1\x68\xed\xfe\x25\x8f\xde" - "\xee\x75\xb8\x78\x4d\x4b\x36\xda\xbe\xcd\x61\x11\x71\x87\xd7\x22" - "\x78\xce\x86\xfb\x3c\xe9\x53\x00\x66\xc4\x39\xc8\xb2\x97\xc7\x1f" - "\x2f\x8d\x8b\xaf\x6b\x51\x3e\xa6\xff\x85\x1f\xf5\xdb\x92\x97\x1a" - "\x53\x71\xb2\x2d\x91\x77\x27\xdb\x5b\xb2\x8b\x63\x36\x3e\x33\xd6" - "\x22\x32\x5b\xb2\x39\x5d\xa3\xb7\x27\x95\x5e\xd6\xb3\x69\xb1\x3e" - "\xa1\xdd\x4d\x0a\x7f\xe2\xa5\x42\x99\x36\x4a\x34\xaa\xba\xda\xfa" - "\x0e\xd7\x07\xda\xc9\xee\x6e\xff\x4f\x30\xfe\x7f\xbe\x51\x1b\xc3" - "\x34\xc1\x2e\xed\x3e\xbc\x72\x32\x60\x7e\x52\x98\x52\x9f\xfb\x35" - "\xdd\xae\x30\x8c\xb5\x8e\xa9\xfa\xbc\xa7\xfa\x24\xfd\xa4\xd6\x10" - "\xaf\xd5\xf3\xe1\x82\x93\xb4\xf5\x01\x35\x06\x6b\x6e\x52\xba\xf5" - "\x13\xa9\x0b\x3a\xad\x42\x8d\x9f\xf7\xf2\xfd\xa9\x5c\x07\xfd\x7c" - "\xfd\xa4\x55\xb7\xfd\xdc\x56\x43\x4a\x37\xf6\xb3\xcc\x20\x2b\x1b" - "\xe4\xf6\x0b\x25\xb3\x9f\xf4\x24\x64\xc6\x77\xd4\xa3\x8c\x11\xab" - "\x45\x7c\x44\x04\x6e\x27\xca\x2c\xae\xb0\x11\xeb\x3f\xb7\x59\x9e" - "\xef\x64\x18\xee\x1f\x75\xb9\x76\xfb\xb7\x4e\x18\x58\xdf\x7d\x22" - "\x44\x3f\xd9\xc5\x74\x24\xf3\x39\xac\xf5\xa4\xce\x3f\xec\x10\x8f" - "\xc5\x11\xf6\x6a\xe3\xdd\xa6\xc0\x68\xfe\x2e\xaa\x76\xd5\x61\xdb" - "\xb7\xe8\xb0\x77\x3c\x29\xf9\x6e\xdd\x0a\xf9\x8e\xd3\xc7\xda\x5c" - "\x37\x2c\x63\x96\xa9\xa8\x69\xb1\xeb\x75\xa4\xce\x7e\xab\xf5\x8a" - "\x75\x2d\x72\x8c\xc0\xb4\x74\x59\xe5\x3d\xe3\xad\x4c\x13\xdb\x3a" - "\x6e\x8f\xb2\x3d\x80\x9e\x7e\x39\x6d\xed\x31\xc8\xa9\x91\x65\xa4" - "\xc9\x6a\x6f\x8a\x6d\x5e\xe0\x5a\x78\xb7\xb2\xad\x2e\xf7\x75\xa5" - "\xb7\xf0\xc9\x8d\xd7\xbb\xfe\x69\xd2\x5d\xae\x82\xbb\xaf\xf3\x96" - "\x8d\x7b\x90\x5f\xff\xab\x6c\xdc\xa4\x82\xa9\x1c\x4e\xb6\xbf\xae" - "\x6e\xff\xcb\x25\x21\xcb\x3d\x36\x2e\x27\xbe\x5c\x74\x6e\x3e\x4b" - "\x14\x63\x79\x2f\x62\xbd\x6f\xde\x35\x0d\x36\x74\x5a\x85\xf8\xa2" - "\x1e\xf1\xf5\x88\xe3\xbe\x8d\xc7\x9a\xf1\x75\xcd\xbb\xc2\x99\xc2" - "\x15\xce\x8c\x87\xc2\x99\x47\xa7\x4e\xb9\xde\x27\x80\x6b\xb7\x4e" - "\xb3\xc8\xc0\xf8\x11\xf9\x75\x3b\x15\x8c\x76\xf0\xbd\x94\x36\x8c" - "\x61\x76\x89\x0c\x1e\x47\xbe\xdc\x06\x3b\x5e\xaa\xce\xc1\x7d\x19" - "\xfe\xcf\x0b\x47\x34\x5f\xb9\x00\x61\xb4\xff\x6f\xc8\x3b\x83\x85" - "\xd5\x49\x22\xe3\x86\xe9\x6c\x4b\x24\xce\x75\xf1\x90\x09\xde\xa1" - "\x3a\x5e\xfa\x92\x67\x8e\x8a\xac\x96\x1a\xfe\x76\xa9\xde\x1a\x2f" - "\x72\x44\x2d\xd5\xfc\xfd\x92\xfe\xad\x56\x7c\x3d\xd2\x2c\xea\xbe" - "\x65\xb4\xf7\x6a\x86\xd1\xd3\x36\xfb\xe3\xa1\xcd\xd6\x78\x0f\xc6" - "\x68\x39\xca\xef\xed\x64\xfb\x8d\x31\xe4\x2b\xbb\xf4\x7e\x49\xeb" - "\xd3\xaa\xd5\x39\xae\xaf\xfc\x81\xf3\x9d\xf5\xdb\x60\x1f\x5e\x2e" - "\xb8\x66\xa4\x1c\x5b\xf4\x08\xab\x3e\x9e\x7d\x65\x3b\xa7\x6f\x52" - "\xf3\x35\x57\x39\x56\x8b\x70\x55\x44\x84\x1d\x51\x11\xe6\xf9\x5b" - "\x69\xfb\xe9\x34\x05\x2b\xbb\xab\xf9\x5e\x75\xe9\xbb\xa0\x5c\x65" - "\xf7\x63\xca\xee\xa3\x7c\x8c\xf5\x4b\x60\xfb\x2d\xa7\xe9\x95\x85" - "\x4c\xbf\x26\xa3\xec\x38\xe4\x15\xe4\x7e\x8e\xe5\x93\xd5\x6a\x4f" - "\xc7\x33\x78\x0a\x6d\xf2\x83\x2f\x2b\xf8\xf2\x9e\xe1\xf6\xd1\xc3" - "\xdf\xd8\xa1\x7d\x8d\xea\xbf\xef\x6d\xdb\x06\x73\x1e\xb7\xbd\x31" - "\x38\x8f\xdb\x56\x6b\x6d\x4b\xd2\xc9\xf6\xa2\x93\xb6\xe5\x8d\x58" - "\xcd\xdf\xaf\x35\xef\x82\x4e\x4d\xe2\x76\xb2\xc3\x2f\xf8\xce\xb5" - "\x5d\x66\xf5\xa5\xce\x8b\x66\x5c\x75\x53\x1d\xab\xab\x4b\xba\xfd" - "\x75\x4e\x23\x2d\xdc\xe7\x68\xe9\x77\x9a\xd1\x12\xf7\x33\x2d\x4c" - "\x6b\xdd\x70\xce\xcf\x74\xf0\xfc\x98\x23\x8a\x41\x36\x74\x18\xe3" - "\xac\x1a\xb3\x72\x47\xac\x6e\x60\xba\x4c\xd3\x60\x73\x3a\xd9\x2e" - "\xc9\xfe\xcc\x4b\x62\x1a\x1e\xb6\x41\xa0\x6d\xaf\x6e\x7b\x1c\x16" - "\x57\x86\xb4\x05\x56\xb1\xc5\x0c\x87\x63\xf5\x16\xfe\x7e\x6e\x12" - "\xca\x37\x4d\x87\x8c\x5d\x90\xd1\xd6\xf8\x9a\x1b\xaf\x71\x58\xe8" - "\xde\x70\xc6\x8d\x59\x0e\x6f\x74\x2c\xcb\x10\x38\xbd\xa7\x68\xc7" - "\x3b\x3c\xbe\x54\xf7\x1e\x6f\x1f\x17\xa2\x37\xe4\xbc\x71\x38\xb3" - "\x79\xab\x9a\x13\xda\x9e\x17\xa2\xbd\xd9\xfd\x73\x44\xdb\x0b\x42" - "\x96\x2b\x95\x5d\xcd\xb8\xfc\x15\xb1\xfe\xa8\x33\xee\x77\x08\xd7" - "\x4a\x07\xfc\xbf\xed\x7f\x8b\x0b\xb7\x55\x64\x1d\x75\xf6\xeb\x89" - "\xfa\xb6\x4f\xd7\x13\xe4\xdf\x62\xae\x03\xdb\xdf\x1a\x5c\x07\xb6" - "\x3f\xc7\xe9\x2c\x77\x35\xc6\xd8\xde\x96\x98\xdf\x5a\x73\xf9\x2b" - "\xae\x2a\x59\xfe\x42\x55\x36\xcb\x24\x8f\xe7\xd6\xa6\x42\x2e\xd5" - "\xdd\xfe\x1d\xb6\x84\x3d\x80\xbe\x38\x62\x64\x61\xbb\xc4\xba\x82" - "\x34\x17\x6c\x8e\x9c\x8f\xe2\x3b\x84\x61\xd3\xc6\xc4\xfd\x2f\x8f" - "\x0c\xfb\xca\xb6\xf1\x19\xb0\x91\xcc\x96\x1c\xc0\x60\xfc\x77\x62" - "\x9f\x9a\xdf\x6d\xb1\xc3\x3e\x67\xd7\x5e\x0a\x7b\xab\xbe\x57\xcd" - "\xe6\x36\x8d\x77\x0e\xb7\x6b\xc4\x8d\x04\xdd\x39\x08\x63\x9c\xb2" - "\xa3\x52\xef\x83\xe2\xfe\x3c\xd8\x03\x21\x75\x13\x7d\xcc\x98\x2e" - "\xc8\xee\x45\x6b\x7c\xd7\xf9\x5b\x9c\xc4\x3c\x9f\x5f\x33\x7a\xd7" - "\x0f\x6f\x26\xdb\xbf\x3b\x1f\x23\xcf\x6d\x34\x72\xf5\xb7\x6c\xf4" - "\x7f\x27\x90\x95\xe5\x10\xa2\x1d\x1b\x94\xec\x76\x34\xe9\xf5\x13" - "\xa2\xed\xe3\xb9\x3e\x52\xfd\x6c\xd7\x13\x4b\x5d\xa5\x8b\x57\x2c" - "\xba\xfa\xea\xa4\x31\x8c\x8d\x1f\xe1\xdf\x11\x52\x7d\x63\xfd\x48" - "\x9d\x2e\xab\xbc\x1f\xb2\x1e\xfe\xef\xcb\xf9\xa9\x63\xae\xa9\xc5" - "\xda\x11\xbf\xc5\xb9\xd4\xff\xfb\x56\x9a\x7a\xab\x21\x78\x3b\x4d" - "\xbd\xed\xf6\xe2\xe9\x0b\xe6\x97\x56\x18\x62\xef\x30\xce\x9b\x6d" - "\x7e\x85\x6d\xef\xe8\xef\xc2\x16\x58\x1e\x7c\x96\xfb\xfa\x86\xcc" - "\xaa\xa8\xf8\xab\xe0\xbb\x79\xac\x54\xdc\x5c\x1e\xa5\x66\xd8\x2a" - "\x71\x39\x6c\xb5\x7f\x98\xba\x07\x02\x3e\x12\x74\xc7\x31\x0d\x76" - "\x0c\xfe\xda\x39\x9e\x37\x41\xbe\x9b\x5a\xb6\xf6\xa0\xcd\x1f\x2d" - "\x54\x3e\x43\x3d\x8f\x61\x2e\x41\xfc\x25\x78\x0f\xc5\xfb\x6b\xae" - "\x45\x18\x8f\xf0\x39\xc2\xcb\xf9\x1c\xe1\xfa\x18\xcb\xed\xe6\x48" - "\x35\xdd\xbc\x84\x7d\xea\xfa\x86\xc3\xe5\xec\x67\x35\x14\xc8\x35" - "\x09\xc0\x22\xee\x6f\xae\x27\x29\x97\xdf\xec\xd3\x86\x80\x53\xac" - "\x3b\x5a\x28\xb6\x61\x5c\x55\x45\x63\x81\xf3\x81\x0c\xcb\x5f\x28" - "\xc3\x39\x74\x7f\xb7\xbf\x61\x6a\x88\x36\xd4\xb2\x9c\x90\xdf\x7c" - "\x5e\x2c\xc5\xd7\x28\xae\x80\xaf\x87\x7e\xa6\xd8\xbb\x9e\xf0\xdb" - "\x56\x5f\xa5\x8f\x73\x1b\xb6\x1a\xe6\x5e\xb3\x10\xde\xa5\xeb\x33" - "\x7e\xef\xd5\xf5\xcd\x58\xc6\x94\x45\xe5\x0b\x96\x2c\x28\x75\x5d" - "\xb7\x34\x8b\x0a\x9f\x78\x7a\x41\xe9\x4d\x8b\x97\x95\xbb\x56\x94" - "\x2d\x58\xe4\x5a\xb2\xe0\x99\x65\x0b\x96\x96\xf3\x98\x89\x53\x93" - "\xfa\xe8\x91\x22\xeb\x83\x1a\xfd\x5c\x7a\xd7\x68\x96\xe3\x4f\x2f" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:58:26 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 200071065677; Sat, 28 Feb 2009 17:58:26 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AA4D8FC1A; Sat, 28 Feb 2009 17:58:26 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHwQ6F017354; Sat, 28 Feb 2009 17:58:26 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHwPZn017343; Sat, 28 Feb 2009 17:58:25 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281758.n1SHwPZn017343@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189186 - in projects/jbuild/sys/dev: aac acpi_support acpica adb ae agp an arcmsr atkbdc bce bge bm cardbus ce cfi ciss cm cp ctau cx cxgb/ulp/iw_cxgb dcons de digi e1000 exca fxp hifn... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:58:26 -0000 Author: jb Date: Sat Feb 28 17:58:25 2009 New Revision: 189186 URL: http://svn.freebsd.org/changeset/base/189186 Log: MFC Added: projects/jbuild/sys/dev/cfi/cfi_bus_ixp4xx.c - copied unchanged from r189173, head/sys/dev/cfi/cfi_bus_ixp4xx.c projects/jbuild/sys/dev/ofw/ofw_iicbus.c - copied unchanged from r189173, head/sys/dev/ofw/ofw_iicbus.c Deleted: projects/jbuild/sys/dev/digi/con.CX-IBM.h projects/jbuild/sys/dev/digi/con.CX.h projects/jbuild/sys/dev/digi/con.EPCX.h projects/jbuild/sys/dev/digi/con.MBank.h Modified: projects/jbuild/sys/dev/aac/aac.c projects/jbuild/sys/dev/aac/aac_debug.c projects/jbuild/sys/dev/aac/aac_pci.c projects/jbuild/sys/dev/aac/aacreg.h projects/jbuild/sys/dev/aac/aacvar.h projects/jbuild/sys/dev/acpi_support/acpi_panasonic.c projects/jbuild/sys/dev/acpica/acpi_battery.c projects/jbuild/sys/dev/acpica/acpi_cpu.c projects/jbuild/sys/dev/acpica/acpi_pcib_acpi.c projects/jbuild/sys/dev/adb/adb_kbd.c projects/jbuild/sys/dev/adb/adb_mouse.c projects/jbuild/sys/dev/ae/if_ae.c projects/jbuild/sys/dev/agp/agp.c projects/jbuild/sys/dev/agp/agp_amd64.c projects/jbuild/sys/dev/agp/agp_via.c projects/jbuild/sys/dev/an/if_an.c projects/jbuild/sys/dev/an/if_anreg.h projects/jbuild/sys/dev/arcmsr/arcmsr.c projects/jbuild/sys/dev/atkbdc/atkbdc_isa.c projects/jbuild/sys/dev/bce/if_bce.c projects/jbuild/sys/dev/bce/if_bcefw.h projects/jbuild/sys/dev/bce/if_bcereg.h projects/jbuild/sys/dev/bge/if_bge.c projects/jbuild/sys/dev/bm/if_bm.c projects/jbuild/sys/dev/cardbus/cardbus.c projects/jbuild/sys/dev/cardbus/cardbus_device.c projects/jbuild/sys/dev/ce/if_ce.c projects/jbuild/sys/dev/cfi/cfi_core.c projects/jbuild/sys/dev/cfi/cfi_dev.c projects/jbuild/sys/dev/cfi/cfi_reg.h projects/jbuild/sys/dev/cfi/cfi_var.h projects/jbuild/sys/dev/ciss/ciss.c projects/jbuild/sys/dev/cm/smc90cx6.c projects/jbuild/sys/dev/cp/if_cp.c projects/jbuild/sys/dev/ctau/if_ct.c projects/jbuild/sys/dev/cx/if_cx.c projects/jbuild/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c projects/jbuild/sys/dev/dcons/dcons_crom.c projects/jbuild/sys/dev/dcons/dcons_os.c projects/jbuild/sys/dev/de/if_de.c projects/jbuild/sys/dev/e1000/if_igb.c projects/jbuild/sys/dev/exca/exca.c projects/jbuild/sys/dev/fxp/if_fxp.c projects/jbuild/sys/dev/hifn/hifn7751.c projects/jbuild/sys/dev/hwpmc/hwpmc_core.c projects/jbuild/sys/dev/hwpmc/hwpmc_intel.c projects/jbuild/sys/dev/hwpmc/pmc_events.h projects/jbuild/sys/dev/ichsmb/ichsmb.c projects/jbuild/sys/dev/if_ndis/if_ndis.c projects/jbuild/sys/dev/if_ndis/if_ndis_pccard.c projects/jbuild/sys/dev/if_ndis/if_ndis_pci.c projects/jbuild/sys/dev/if_ndis/if_ndis_usb.c projects/jbuild/sys/dev/iicbus/ad7418.c projects/jbuild/sys/dev/iicbus/ds1672.c projects/jbuild/sys/dev/iicbus/icee.c projects/jbuild/sys/dev/iicbus/if_ic.c projects/jbuild/sys/dev/iicbus/iic.c projects/jbuild/sys/dev/iicbus/iic.h projects/jbuild/sys/dev/iicbus/iicbb.c projects/jbuild/sys/dev/iicbus/iicbus.c projects/jbuild/sys/dev/iicbus/iicsmb.c projects/jbuild/sys/dev/ipmi/ipmi_acpi.c projects/jbuild/sys/dev/ipmi/ipmi_smbios.c projects/jbuild/sys/dev/iscsi/initiator/isc_subr.c projects/jbuild/sys/dev/iwn/if_iwn.c projects/jbuild/sys/dev/kbdmux/kbdmux.c projects/jbuild/sys/dev/lmc/if_lmc.c projects/jbuild/sys/dev/lmc/if_lmc.h projects/jbuild/sys/dev/mca/mca_bus.c projects/jbuild/sys/dev/md/md.c projects/jbuild/sys/dev/mge/if_mge.c projects/jbuild/sys/dev/mge/if_mgevar.h projects/jbuild/sys/dev/mmc/mmc.c projects/jbuild/sys/dev/mmc/mmcreg.h projects/jbuild/sys/dev/mmc/mmcsd.c projects/jbuild/sys/dev/msk/if_msk.c projects/jbuild/sys/dev/msk/if_mskreg.h projects/jbuild/sys/dev/my/if_my.c projects/jbuild/sys/dev/nsp/nsp.c projects/jbuild/sys/dev/nve/if_nve.c projects/jbuild/sys/dev/ofw/ofw_bus_subr.c projects/jbuild/sys/dev/ofw/openfirm.c projects/jbuild/sys/dev/ofw/openfirm.h projects/jbuild/sys/dev/pccard/card_if.m projects/jbuild/sys/dev/pccard/pccard.c projects/jbuild/sys/dev/pccard/pccard_cis.c projects/jbuild/sys/dev/pccard/pccardvar.h projects/jbuild/sys/dev/pccard/pccardvarp.h projects/jbuild/sys/dev/pccbb/pccbb.c projects/jbuild/sys/dev/pccbb/pccbb_pci.c projects/jbuild/sys/dev/pccbb/pccbbvar.h projects/jbuild/sys/dev/pci/pci.c projects/jbuild/sys/dev/pci/pci_user.c projects/jbuild/sys/dev/pci/pcireg.h projects/jbuild/sys/dev/pcn/if_pcn.c projects/jbuild/sys/dev/puc/pucdata.c projects/jbuild/sys/dev/re/if_re.c projects/jbuild/sys/dev/safe/safe.c projects/jbuild/sys/dev/scc/scc_if.m projects/jbuild/sys/dev/sdhci/sdhci.c projects/jbuild/sys/dev/si/si.c projects/jbuild/sys/dev/sis/if_sis.c projects/jbuild/sys/dev/smbus/smb.c projects/jbuild/sys/dev/snp/snp.c projects/jbuild/sys/dev/speaker/spkr.c projects/jbuild/sys/dev/stg/tmc18c30.c projects/jbuild/sys/dev/streams/streams.c projects/jbuild/sys/dev/tl/if_tl.c projects/jbuild/sys/dev/tsec/if_tsec.c projects/jbuild/sys/dev/tsec/if_tsec.h projects/jbuild/sys/dev/tsec/if_tsec_ocp.c projects/jbuild/sys/dev/tsec/if_tsecreg.h projects/jbuild/sys/dev/tx/if_tx.c projects/jbuild/sys/dev/txp/3c990img.h projects/jbuild/sys/dev/txp/if_txp.c projects/jbuild/sys/dev/txp/if_txpreg.h projects/jbuild/sys/dev/uart/uart_bus_pci.c projects/jbuild/sys/dev/uart/uart_cpu_mv.c projects/jbuild/sys/dev/wpi/if_wpi.c projects/jbuild/sys/dev/xen/blkback/blkback.c projects/jbuild/sys/dev/xen/netback/netback.c projects/jbuild/sys/dev/xen/netfront/netfront.c Modified: projects/jbuild/sys/dev/aac/aac.c ============================================================================== --- projects/jbuild/sys/dev/aac/aac.c Sat Feb 28 17:58:14 2009 (r189185) +++ projects/jbuild/sys/dev/aac/aac.c Sat Feb 28 17:58:25 2009 (r189186) @@ -71,6 +71,7 @@ static void aac_startup(void *arg); static void aac_add_container(struct aac_softc *sc, struct aac_mntinforesp *mir, int f); static void aac_get_bus_info(struct aac_softc *sc); +static void aac_daemon(void *arg); /* Command Processing */ static void aac_timeout(struct aac_softc *sc); @@ -292,6 +293,9 @@ aac_attach(struct aac_softc *sc) TAILQ_INIT(&sc->aac_container_tqh); TAILQ_INIT(&sc->aac_ev_cmfree); + /* Initialize the clock daemon callout. */ + callout_init_mtx(&sc->aac_daemontime, &sc->aac_io_lock, 0); + /* * Initialize the adapter. */ @@ -349,9 +353,34 @@ aac_attach(struct aac_softc *sc) aac_get_bus_info(sc); } + mtx_lock(&sc->aac_io_lock); + callout_reset(&sc->aac_daemontime, 30 * 60 * hz, aac_daemon, sc); + mtx_unlock(&sc->aac_io_lock); + return(0); } +static void +aac_daemon(void *arg) +{ + struct timeval tv; + struct aac_softc *sc; + struct aac_fib *fib; + + sc = arg; + mtx_assert(&sc->aac_io_lock, MA_OWNED); + + if (callout_pending(&sc->aac_daemontime) || + callout_active(&sc->aac_daemontime) == 0) + return; + getmicrotime(&tv); + aac_alloc_sync_fib(sc, &fib); + *(uint32_t *)fib->data = tv.tv_sec; + aac_sync_fib(sc, SendHostTime, 0, fib, sizeof(uint32_t)); + aac_release_sync_fib(sc); + callout_schedule(&sc->aac_daemontime, 30 * 60 * hz); +} + void aac_add_event(struct aac_softc *sc, struct aac_event *event) { @@ -632,9 +661,12 @@ aac_free(struct aac_softc *sc) bus_dma_tag_destroy(sc->aac_parent_dmat); /* release the register window mapping */ - if (sc->aac_regs_resource != NULL) + if (sc->aac_regs_res0 != NULL) + bus_release_resource(sc->aac_dev, SYS_RES_MEMORY, + sc->aac_regs_rid0, sc->aac_regs_res0); + if (sc->aac_hwif == AAC_HWIF_NARK && sc->aac_regs_res1 != NULL) bus_release_resource(sc->aac_dev, SYS_RES_MEMORY, - sc->aac_regs_rid, sc->aac_regs_resource); + sc->aac_regs_rid1, sc->aac_regs_res1); } /* @@ -654,6 +686,8 @@ aac_detach(device_t dev) if (sc->aac_state & AAC_STATE_OPEN) return(EBUSY); + callout_drain(&sc->aac_daemontime); + /* Remove the child containers */ while ((co = TAILQ_FIRST(&sc->aac_container_tqh)) != NULL) { error = device_delete_child(dev, co->co_disk); @@ -834,7 +868,7 @@ aac_new_intr(void *arg) } index &= ~2; for (i = 0; i < sizeof(struct aac_fib)/4; ++i) - ((u_int32_t *)fib)[i] = AAC_GETREG4(sc, index + i*4); + ((u_int32_t *)fib)[i] = AAC_MEM1_GETREG4(sc, index + i*4); aac_handle_aif(sc, fib); free(fib, M_AACBUF); @@ -1754,26 +1788,33 @@ aac_check_firmware(struct aac_softc *sc) /* Remap mem. resource, if required */ if ((sc->flags & AAC_FLAGS_NEW_COMM) && - atu_size > rman_get_size(sc->aac_regs_resource)) { + atu_size > rman_get_size(sc->aac_regs_res1)) { bus_release_resource( sc->aac_dev, SYS_RES_MEMORY, - sc->aac_regs_rid, sc->aac_regs_resource); - sc->aac_regs_resource = bus_alloc_resource( - sc->aac_dev, SYS_RES_MEMORY, &sc->aac_regs_rid, + sc->aac_regs_rid1, sc->aac_regs_res1); + sc->aac_regs_res1 = bus_alloc_resource( + sc->aac_dev, SYS_RES_MEMORY, &sc->aac_regs_rid1, 0ul, ~0ul, atu_size, RF_ACTIVE); - if (sc->aac_regs_resource == NULL) { - sc->aac_regs_resource = bus_alloc_resource_any( + if (sc->aac_regs_res1 == NULL) { + sc->aac_regs_res1 = bus_alloc_resource_any( sc->aac_dev, SYS_RES_MEMORY, - &sc->aac_regs_rid, RF_ACTIVE); - if (sc->aac_regs_resource == NULL) { + &sc->aac_regs_rid1, RF_ACTIVE); + if (sc->aac_regs_res1 == NULL) { device_printf(sc->aac_dev, "couldn't allocate register window\n"); return (ENXIO); } sc->flags &= ~AAC_FLAGS_NEW_COMM; } - sc->aac_btag = rman_get_bustag(sc->aac_regs_resource); - sc->aac_bhandle = rman_get_bushandle(sc->aac_regs_resource); + sc->aac_btag1 = rman_get_bustag(sc->aac_regs_res1); + sc->aac_bhandle1 = rman_get_bushandle(sc->aac_regs_res1); + + if (sc->aac_hwif == AAC_HWIF_NARK) { + sc->aac_regs_res0 = sc->aac_regs_res1; + sc->aac_regs_rid0 = sc->aac_regs_rid1; + sc->aac_btag0 = sc->aac_btag1; + sc->aac_bhandle0 = sc->aac_bhandle1; + } } /* Read preferred settings */ @@ -1944,10 +1985,10 @@ aac_init(struct aac_softc *sc) */ switch (sc->aac_hwif) { case AAC_HWIF_I960RX: - AAC_SETREG4(sc, AAC_RX_ODBR, ~0); + AAC_MEM0_SETREG4(sc, AAC_RX_ODBR, ~0); break; case AAC_HWIF_RKT: - AAC_SETREG4(sc, AAC_RKT_ODBR, ~0); + AAC_MEM0_SETREG4(sc, AAC_RKT_ODBR, ~0); break; default: break; @@ -2367,7 +2408,7 @@ aac_sa_get_fwstatus(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_SA_FWSTATUS)); + return(AAC_MEM0_GETREG4(sc, AAC_SA_FWSTATUS)); } static int @@ -2375,7 +2416,8 @@ aac_rx_get_fwstatus(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_FWSTATUS)); + return(AAC_MEM0_GETREG4(sc, sc->flags & AAC_FLAGS_NEW_COMM ? + AAC_RX_OMR0 : AAC_RX_FWSTATUS)); } static int @@ -2385,7 +2427,7 @@ aac_fa_get_fwstatus(struct aac_softc *sc fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - val = AAC_GETREG4(sc, AAC_FA_FWSTATUS); + val = AAC_MEM0_GETREG4(sc, AAC_FA_FWSTATUS); return (val); } @@ -2394,7 +2436,8 @@ aac_rkt_get_fwstatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_FWSTATUS)); + return(AAC_MEM0_GETREG4(sc, sc->flags & AAC_FLAGS_NEW_COMM ? + AAC_RKT_OMR0 : AAC_RKT_FWSTATUS)); } /* @@ -2406,7 +2449,7 @@ aac_sa_qnotify(struct aac_softc *sc, int { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG2(sc, AAC_SA_DOORBELL1_SET, qbit); + AAC_MEM0_SETREG2(sc, AAC_SA_DOORBELL1_SET, qbit); } static void @@ -2414,7 +2457,7 @@ aac_rx_qnotify(struct aac_softc *sc, int { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RX_IDBR, qbit); + AAC_MEM0_SETREG4(sc, AAC_RX_IDBR, qbit); } static void @@ -2422,7 +2465,7 @@ aac_fa_qnotify(struct aac_softc *sc, int { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG2(sc, AAC_FA_DOORBELL1, qbit); + AAC_MEM0_SETREG2(sc, AAC_FA_DOORBELL1, qbit); AAC_FA_HACK(sc); } @@ -2431,7 +2474,7 @@ aac_rkt_qnotify(struct aac_softc *sc, in { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RKT_IDBR, qbit); + AAC_MEM0_SETREG4(sc, AAC_RKT_IDBR, qbit); } /* @@ -2442,7 +2485,7 @@ aac_sa_get_istatus(struct aac_softc *sc) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG2(sc, AAC_SA_DOORBELL0)); + return(AAC_MEM0_GETREG2(sc, AAC_SA_DOORBELL0)); } static int @@ -2450,7 +2493,7 @@ aac_rx_get_istatus(struct aac_softc *sc) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_ODBR)); + return(AAC_MEM0_GETREG4(sc, AAC_RX_ODBR)); } static int @@ -2460,7 +2503,7 @@ aac_fa_get_istatus(struct aac_softc *sc) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - val = AAC_GETREG2(sc, AAC_FA_DOORBELL0); + val = AAC_MEM0_GETREG2(sc, AAC_FA_DOORBELL0); return (val); } @@ -2469,7 +2512,7 @@ aac_rkt_get_istatus(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_ODBR)); + return(AAC_MEM0_GETREG4(sc, AAC_RKT_ODBR)); } /* @@ -2480,7 +2523,7 @@ aac_sa_clear_istatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG2(sc, AAC_SA_DOORBELL0_CLEAR, mask); + AAC_MEM0_SETREG2(sc, AAC_SA_DOORBELL0_CLEAR, mask); } static void @@ -2488,7 +2531,7 @@ aac_rx_clear_istatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RX_ODBR, mask); + AAC_MEM0_SETREG4(sc, AAC_RX_ODBR, mask); } static void @@ -2496,7 +2539,7 @@ aac_fa_clear_istatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG2(sc, AAC_FA_DOORBELL0_CLEAR, mask); + AAC_MEM0_SETREG2(sc, AAC_FA_DOORBELL0_CLEAR, mask); AAC_FA_HACK(sc); } @@ -2505,7 +2548,7 @@ aac_rkt_clear_istatus(struct aac_softc * { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RKT_ODBR, mask); + AAC_MEM0_SETREG4(sc, AAC_RKT_ODBR, mask); } /* @@ -2517,11 +2560,11 @@ aac_sa_set_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_SA_MAILBOX, command); - AAC_SETREG4(sc, AAC_SA_MAILBOX + 4, arg0); - AAC_SETREG4(sc, AAC_SA_MAILBOX + 8, arg1); - AAC_SETREG4(sc, AAC_SA_MAILBOX + 12, arg2); - AAC_SETREG4(sc, AAC_SA_MAILBOX + 16, arg3); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX + 16, arg3); } static void @@ -2530,11 +2573,11 @@ aac_rx_set_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RX_MAILBOX, command); - AAC_SETREG4(sc, AAC_RX_MAILBOX + 4, arg0); - AAC_SETREG4(sc, AAC_RX_MAILBOX + 8, arg1); - AAC_SETREG4(sc, AAC_RX_MAILBOX + 12, arg2); - AAC_SETREG4(sc, AAC_RX_MAILBOX + 16, arg3); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 16, arg3); } static void @@ -2543,15 +2586,15 @@ aac_fa_set_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_FA_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX, command); AAC_FA_HACK(sc); - AAC_SETREG4(sc, AAC_FA_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 4, arg0); AAC_FA_HACK(sc); - AAC_SETREG4(sc, AAC_FA_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 8, arg1); AAC_FA_HACK(sc); - AAC_SETREG4(sc, AAC_FA_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 12, arg2); AAC_FA_HACK(sc); - AAC_SETREG4(sc, AAC_FA_MAILBOX + 16, arg3); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 16, arg3); AAC_FA_HACK(sc); } @@ -2561,11 +2604,11 @@ aac_rkt_set_mailbox(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RKT_MAILBOX, command); - AAC_SETREG4(sc, AAC_RKT_MAILBOX + 4, arg0); - AAC_SETREG4(sc, AAC_RKT_MAILBOX + 8, arg1); - AAC_SETREG4(sc, AAC_RKT_MAILBOX + 12, arg2); - AAC_SETREG4(sc, AAC_RKT_MAILBOX + 16, arg3); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX + 16, arg3); } /* @@ -2576,7 +2619,7 @@ aac_sa_get_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_SA_MAILBOX + (mb * 4))); + return(AAC_MEM1_GETREG4(sc, AAC_SA_MAILBOX + (mb * 4))); } static int @@ -2584,7 +2627,7 @@ aac_rx_get_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_MAILBOX + (mb * 4))); + return(AAC_MEM1_GETREG4(sc, AAC_RX_MAILBOX + (mb * 4))); } static int @@ -2594,7 +2637,7 @@ aac_fa_get_mailbox(struct aac_softc *sc, fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - val = AAC_GETREG4(sc, AAC_FA_MAILBOX + (mb * 4)); + val = AAC_MEM1_GETREG4(sc, AAC_FA_MAILBOX + (mb * 4)); return (val); } @@ -2603,7 +2646,7 @@ aac_rkt_get_mailbox(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_MAILBOX + (mb * 4))); + return(AAC_MEM1_GETREG4(sc, AAC_RKT_MAILBOX + (mb * 4))); } /* @@ -2615,9 +2658,9 @@ aac_sa_set_interrupts(struct aac_softc * fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "%sable interrupts", enable ? "en" : "dis"); if (enable) { - AAC_SETREG2((sc), AAC_SA_MASK0_CLEAR, AAC_DB_INTERRUPTS); + AAC_MEM0_SETREG2((sc), AAC_SA_MASK0_CLEAR, AAC_DB_INTERRUPTS); } else { - AAC_SETREG2((sc), AAC_SA_MASK0_SET, ~0); + AAC_MEM0_SETREG2((sc), AAC_SA_MASK0_SET, ~0); } } @@ -2628,11 +2671,11 @@ aac_rx_set_interrupts(struct aac_softc * if (enable) { if (sc->flags & AAC_FLAGS_NEW_COMM) - AAC_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INT_NEW_COMM); + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INT_NEW_COMM); else - AAC_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INTERRUPTS); + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INTERRUPTS); } else { - AAC_SETREG4(sc, AAC_RX_OIMR, ~0); + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, ~0); } } @@ -2642,10 +2685,10 @@ aac_fa_set_interrupts(struct aac_softc * fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "%sable interrupts", enable ? "en" : "dis"); if (enable) { - AAC_SETREG2((sc), AAC_FA_MASK0_CLEAR, AAC_DB_INTERRUPTS); + AAC_MEM0_SETREG2((sc), AAC_FA_MASK0_CLEAR, AAC_DB_INTERRUPTS); AAC_FA_HACK(sc); } else { - AAC_SETREG2((sc), AAC_FA_MASK0, ~0); + AAC_MEM0_SETREG2((sc), AAC_FA_MASK0, ~0); AAC_FA_HACK(sc); } } @@ -2657,11 +2700,11 @@ aac_rkt_set_interrupts(struct aac_softc if (enable) { if (sc->flags & AAC_FLAGS_NEW_COMM) - AAC_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INT_NEW_COMM); + AAC_MEM0_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INT_NEW_COMM); else - AAC_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INTERRUPTS); + AAC_MEM0_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INTERRUPTS); } else { - AAC_SETREG4(sc, AAC_RKT_OIMR, ~0); + AAC_MEM0_SETREG4(sc, AAC_RKT_OIMR, ~0); } } @@ -2675,19 +2718,19 @@ aac_rx_send_command(struct aac_softc *sc fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "send command (new comm.)"); - index = AAC_GETREG4(sc, AAC_RX_IQUE); + index = AAC_MEM0_GETREG4(sc, AAC_RX_IQUE); if (index == 0xffffffffL) - index = AAC_GETREG4(sc, AAC_RX_IQUE); + index = AAC_MEM0_GETREG4(sc, AAC_RX_IQUE); if (index == 0xffffffffL) return index; aac_enqueue_busy(cm); device = index; - AAC_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); device += 4; - AAC_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); device += 4; - AAC_SETREG4(sc, device, cm->cm_fib->Header.Size); - AAC_SETREG4(sc, AAC_RX_IQUE, index); + AAC_MEM1_SETREG4(sc, device, cm->cm_fib->Header.Size); + AAC_MEM0_SETREG4(sc, AAC_RX_IQUE, index); return 0; } @@ -2698,19 +2741,19 @@ aac_rkt_send_command(struct aac_softc *s fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "send command (new comm.)"); - index = AAC_GETREG4(sc, AAC_RKT_IQUE); + index = AAC_MEM0_GETREG4(sc, AAC_RKT_IQUE); if (index == 0xffffffffL) - index = AAC_GETREG4(sc, AAC_RKT_IQUE); + index = AAC_MEM0_GETREG4(sc, AAC_RKT_IQUE); if (index == 0xffffffffL) return index; aac_enqueue_busy(cm); device = index; - AAC_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); device += 4; - AAC_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); device += 4; - AAC_SETREG4(sc, device, cm->cm_fib->Header.Size); - AAC_SETREG4(sc, AAC_RKT_IQUE, index); + AAC_MEM1_SETREG4(sc, device, cm->cm_fib->Header.Size); + AAC_MEM0_SETREG4(sc, AAC_RKT_IQUE, index); return 0; } @@ -2722,7 +2765,7 @@ aac_rx_get_outb_queue(struct aac_softc * { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_OQUE)); + return(AAC_MEM0_GETREG4(sc, AAC_RX_OQUE)); } static int @@ -2730,7 +2773,7 @@ aac_rkt_get_outb_queue(struct aac_softc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_OQUE)); + return(AAC_MEM0_GETREG4(sc, AAC_RKT_OQUE)); } static void @@ -2738,7 +2781,7 @@ aac_rx_set_outb_queue(struct aac_softc * { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RX_OQUE, index); + AAC_MEM0_SETREG4(sc, AAC_RX_OQUE, index); } static void @@ -2746,7 +2789,7 @@ aac_rkt_set_outb_queue(struct aac_softc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RKT_OQUE, index); + AAC_MEM0_SETREG4(sc, AAC_RKT_OQUE, index); } /* Modified: projects/jbuild/sys/dev/aac/aac_debug.c ============================================================================== --- projects/jbuild/sys/dev/aac/aac_debug.c Sat Feb 28 17:58:14 2009 (r189185) +++ projects/jbuild/sys/dev/aac/aac_debug.c Sat Feb 28 17:58:25 2009 (r189186) @@ -134,17 +134,18 @@ aac_printstate0(void) aac_print_queues(sc); switch (sc->aac_hwif) { case AAC_HWIF_I960RX: + case AAC_HWIF_NARK: device_printf(sc->aac_dev, "IDBR 0x%08x IIMR 0x%08x " - "IISR 0x%08x\n", AAC_GETREG4(sc, AAC_RX_IDBR), - AAC_GETREG4(sc, AAC_RX_IIMR), AAC_GETREG4(sc, AAC_RX_IISR)); + "IISR 0x%08x\n", AAC_MEM0_GETREG4(sc, AAC_RX_IDBR), + AAC_MEM0_GETREG4(sc, AAC_RX_IIMR), AAC_MEM0_GETREG4(sc, AAC_RX_IISR)); device_printf(sc->aac_dev, "ODBR 0x%08x OIMR 0x%08x " - "OISR 0x%08x\n", AAC_GETREG4(sc, AAC_RX_ODBR), - AAC_GETREG4(sc, AAC_RX_OIMR), AAC_GETREG4(sc, AAC_RX_OISR)); - AAC_SETREG4(sc, AAC_RX_OIMR, 0/*~(AAC_DB_COMMAND_READY | + "OISR 0x%08x\n", AAC_MEM0_GETREG4(sc, AAC_RX_ODBR), + AAC_MEM0_GETREG4(sc, AAC_RX_OIMR), AAC_MEM0_GETREG4(sc, AAC_RX_OISR)); + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, 0/*~(AAC_DB_COMMAND_READY | AAC_DB_RESPONSE_READY | AAC_DB_PRINTF)*/); device_printf(sc->aac_dev, "ODBR 0x%08x OIMR 0x%08x " - "OISR 0x%08x\n", AAC_GETREG4(sc, AAC_RX_ODBR), - AAC_GETREG4(sc, AAC_RX_OIMR), AAC_GETREG4(sc, AAC_RX_OISR)); + "OISR 0x%08x\n", AAC_MEM0_GETREG4(sc, AAC_RX_ODBR), + AAC_MEM0_GETREG4(sc, AAC_RX_OIMR), AAC_MEM0_GETREG4(sc, AAC_RX_OISR)); break; case AAC_HWIF_STRONGARM: /* XXX implement */ Modified: projects/jbuild/sys/dev/aac/aac_pci.c ============================================================================== --- projects/jbuild/sys/dev/aac/aac_pci.c Sat Feb 28 17:58:14 2009 (r189185) +++ projects/jbuild/sys/dev/aac/aac_pci.c Sat Feb 28 17:58:25 2009 (r189186) @@ -372,21 +372,32 @@ aac_pci_attach(device_t dev) /* * Allocate the PCI register window. */ - sc->aac_regs_rid = PCIR_BAR(0); - if ((sc->aac_regs_resource = bus_alloc_resource_any(sc->aac_dev, - SYS_RES_MEMORY, - &sc->aac_regs_rid, - RF_ACTIVE)) == - NULL) { + sc->aac_regs_rid0 = PCIR_BAR(0); + if ((sc->aac_regs_res0 = bus_alloc_resource_any(sc->aac_dev, + SYS_RES_MEMORY, &sc->aac_regs_rid0, RF_ACTIVE)) == NULL) { device_printf(sc->aac_dev, - "couldn't allocate register window\n"); + "couldn't allocate register window 0\n"); goto out; } - sc->aac_btag = rman_get_bustag(sc->aac_regs_resource); - sc->aac_bhandle = rman_get_bushandle(sc->aac_regs_resource); + sc->aac_btag0 = rman_get_bustag(sc->aac_regs_res0); + sc->aac_bhandle0 = rman_get_bushandle(sc->aac_regs_res0); - /* assume failure is 'out of memory' */ - error = ENOMEM; + if (sc->aac_hwif == AAC_HWIF_NARK) { + sc->aac_regs_rid1 = PCIR_BAR(1); + if ((sc->aac_regs_res1 = bus_alloc_resource_any(sc->aac_dev, + SYS_RES_MEMORY, &sc->aac_regs_rid1, RF_ACTIVE)) == NULL) { + device_printf(sc->aac_dev, + "couldn't allocate register window 1\n"); + goto out; + } + sc->aac_btag1 = rman_get_bustag(sc->aac_regs_res1); + sc->aac_bhandle1 = rman_get_bushandle(sc->aac_regs_res1); + } else { + sc->aac_regs_res1 = sc->aac_regs_res0; + sc->aac_regs_rid1 = sc->aac_regs_rid0; + sc->aac_btag1 = sc->aac_btag0; + sc->aac_bhandle1 = sc->aac_bhandle0; + } /* * Allocate the parent bus DMA tag appropriate for our PCI interface. @@ -416,7 +427,8 @@ aac_pci_attach(device_t dev) sc->aac_hwif = id->hwif; switch(sc->aac_hwif) { case AAC_HWIF_I960RX: - fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for i960Rx"); + case AAC_HWIF_NARK: + fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for i960Rx/NARK"); sc->aac_if = aac_rx_interface; break; case AAC_HWIF_STRONGARM: Modified: projects/jbuild/sys/dev/aac/aacreg.h ============================================================================== --- projects/jbuild/sys/dev/aac/aacreg.h Sat Feb 28 17:58:14 2009 (r189185) +++ projects/jbuild/sys/dev/aac/aacreg.h Sat Feb 28 17:58:25 2009 (r189186) @@ -1468,7 +1468,7 @@ enum { #define AAC_FA_FWSTATUS 0x2c /* Mailbox 7 */ #define AAC_FA_INTSRC 0x900 -#define AAC_FA_HACK(sc) (void)AAC_GETREG4(sc, AAC_FA_INTSRC) +#define AAC_FA_HACK(sc) (void)AAC_MEM0_GETREG4(sc, AAC_FA_INTSRC) /* * Register definitions for the Adaptec AAC-364 'Jalapeno I/II' adapters, based @@ -1495,6 +1495,8 @@ enum { * and other related adapters. */ +#define AAC_RX_OMR0 0x18 /* outbound message register 0 */ +#define AAC_RX_OMR1 0x1c /* outbound message register 1 */ #define AAC_RX_IDBR 0x20 /* inbound doorbell register */ #define AAC_RX_IISR 0x24 /* inbound interrupt status register */ #define AAC_RX_IIMR 0x28 /* inbound interrupt mask register */ @@ -1512,6 +1514,8 @@ enum { * Unsurprisingly, it's quite similar to the i960! */ +#define AAC_RKT_OMR0 0x18 /* outbound message register 0 */ +#define AAC_RKT_OMR1 0x1c /* outbound message register 1 */ #define AAC_RKT_IDBR 0x20 /* inbound doorbell register */ #define AAC_RKT_IISR 0x24 /* inbound interrupt status register */ #define AAC_RKT_IIMR 0x28 /* inbound interrupt mask register */ Modified: projects/jbuild/sys/dev/aac/aacvar.h ============================================================================== --- projects/jbuild/sys/dev/aac/aacvar.h Sat Feb 28 17:58:14 2009 (r189185) +++ projects/jbuild/sys/dev/aac/aacvar.h Sat Feb 28 17:58:25 2009 (r189186) @@ -30,6 +30,7 @@ */ #include +#include #include #include #include @@ -259,18 +260,31 @@ extern struct aac_interface aac_rkt_inte #define AAC_GET_OUTB_QUEUE(sc) ((sc)->aac_if.aif_get_outb_queue((sc))) #define AAC_SET_OUTB_QUEUE(sc, idx) ((sc)->aac_if.aif_set_outb_queue((sc), (idx))) -#define AAC_SETREG4(sc, reg, val) bus_space_write_4(sc->aac_btag, \ - sc->aac_bhandle, reg, val) -#define AAC_GETREG4(sc, reg) bus_space_read_4 (sc->aac_btag, \ - sc->aac_bhandle, reg) -#define AAC_SETREG2(sc, reg, val) bus_space_write_2(sc->aac_btag, \ - sc->aac_bhandle, reg, val) -#define AAC_GETREG2(sc, reg) bus_space_read_2 (sc->aac_btag, \ - sc->aac_bhandle, reg) -#define AAC_SETREG1(sc, reg, val) bus_space_write_1(sc->aac_btag, \ - sc->aac_bhandle, reg, val) -#define AAC_GETREG1(sc, reg) bus_space_read_1 (sc->aac_btag, \ - sc->aac_bhandle, reg) +#define AAC_MEM0_SETREG4(sc, reg, val) bus_space_write_4(sc->aac_btag0, \ + sc->aac_bhandle0, reg, val) +#define AAC_MEM0_GETREG4(sc, reg) bus_space_read_4(sc->aac_btag0, \ + sc->aac_bhandle0, reg) +#define AAC_MEM0_SETREG2(sc, reg, val) bus_space_write_2(sc->aac_btag0, \ + sc->aac_bhandle0, reg, val) +#define AAC_MEM0_GETREG2(sc, reg) bus_space_read_2(sc->aac_btag0, \ + sc->aac_bhandle0, reg) +#define AAC_MEM0_SETREG1(sc, reg, val) bus_space_write_1(sc->aac_btag0, \ + sc->aac_bhandle0, reg, val) +#define AAC_MEM0_GETREG1(sc, reg) bus_space_read_1(sc->aac_btag0, \ + sc->aac_bhandle0, reg) + +#define AAC_MEM1_SETREG4(sc, reg, val) bus_space_write_4(sc->aac_btag1, \ + sc->aac_bhandle1, reg, val) +#define AAC_MEM1_GETREG4(sc, reg) bus_space_read_4(sc->aac_btag1, \ + sc->aac_bhandle1, reg) +#define AAC_MEM1_SETREG2(sc, reg, val) bus_space_write_2(sc->aac_btag1, \ + sc->aac_bhandle1, reg, val) +#define AAC_MEM1_GETREG2(sc, reg) bus_space_read_2(sc->aac_btag1, \ + sc->aac_bhandle1, reg) +#define AAC_MEM1_SETREG1(sc, reg, val) bus_space_write_1(sc->aac_btag1, \ + sc->aac_bhandle1, reg, val) +#define AAC_MEM1_GETREG1(sc, reg) bus_space_read_1(sc->aac_btag1, \ + sc->aac_bhandle1, reg) /* fib context (IOCTL) */ struct aac_fib_context { @@ -287,11 +301,10 @@ struct aac_softc { /* bus connections */ device_t aac_dev; - struct resource *aac_regs_resource; /* register interface - * window */ - int aac_regs_rid; /* resource ID */ - bus_space_handle_t aac_bhandle; /* bus space handle */ - bus_space_tag_t aac_btag; /* bus space tag */ + struct resource *aac_regs_res0, *aac_regs_res1; /* reg. if. window */ + int aac_regs_rid0, aac_regs_rid1; /* resource ID */ + bus_space_handle_t aac_bhandle0, aac_bhandle1; /* bus space handle */ + bus_space_tag_t aac_btag0, aac_btag1; /* bus space tag */ bus_dma_tag_t aac_parent_dmat; /* parent DMA tag */ bus_dma_tag_t aac_buffer_dmat; /* data buffer/command * DMA tag */ @@ -315,6 +328,7 @@ struct aac_softc #define AAC_HWIF_STRONGARM 1 #define AAC_HWIF_FALCON 2 #define AAC_HWIF_RKT 3 +#define AAC_HWIF_NARK 4 #define AAC_HWIF_UNKNOWN -1 bus_dma_tag_t aac_common_dmat; /* common structure * DMA tag */ @@ -398,6 +412,8 @@ struct aac_softc u_int32_t scsi_method_id; TAILQ_HEAD(,aac_sim) aac_sim_tqh; + struct callout aac_daemontime; /* clock daemon callout */ + u_int32_t aac_max_fibs; /* max. FIB count */ u_int32_t aac_max_fibs_alloc; /* max. alloc. per alloc_commands() */ u_int32_t aac_max_fib_size; /* max. FIB size */ Modified: projects/jbuild/sys/dev/acpi_support/acpi_panasonic.c ============================================================================== --- projects/jbuild/sys/dev/acpi_support/acpi_panasonic.c Sat Feb 28 17:58:14 2009 (r189185) +++ projects/jbuild/sys/dev/acpi_support/acpi_panasonic.c Sat Feb 28 17:58:25 2009 (r189186) @@ -79,7 +79,7 @@ typedef int hkey_fn_t(ACPI_HANDLE, int, static int acpi_panasonic_probe(device_t dev); static int acpi_panasonic_attach(device_t dev); static int acpi_panasonic_detach(device_t dev); -static void acpi_panasonic_shutdown(device_t dev); +static int acpi_panasonic_shutdown(device_t dev); static int acpi_panasonic_sysctl(SYSCTL_HANDLER_ARGS); static ACPI_INTEGER acpi_panasonic_sinf(ACPI_HANDLE h, ACPI_INTEGER index); static void acpi_panasonic_sset(ACPI_HANDLE h, ACPI_INTEGER index, @@ -220,7 +220,7 @@ acpi_panasonic_detach(device_t dev) return (0); } -static void +static int acpi_panasonic_shutdown(device_t dev) { struct acpi_panasonic_softc *sc; @@ -230,6 +230,7 @@ acpi_panasonic_shutdown(device_t dev) sc = device_get_softc(dev); mute = 1; hkey_sound_mute(sc->handle, HKEY_SET, &mute); + return (0); } static int Modified: projects/jbuild/sys/dev/acpica/acpi_battery.c ============================================================================== --- projects/jbuild/sys/dev/acpica/acpi_battery.c Sat Feb 28 17:58:14 2009 (r189185) +++ projects/jbuild/sys/dev/acpica/acpi_battery.c Sat Feb 28 17:58:25 2009 (r189186) @@ -197,7 +197,7 @@ acpi_battery_get_battinfo(device_t dev, * is 0 (due to some error reading the battery), skip this * conversion. */ - if (bif->units == ACPI_BIF_UNITS_MA && bif->dvol != 0) { + if (bif->units == ACPI_BIF_UNITS_MA && bif->dvol != 0 && dev == NULL) { bst[i].rate = (bst[i].rate * bif->dvol) / 1000; bst[i].cap = (bst[i].cap * bif->dvol) / 1000; bif->lfcap = (bif->lfcap * bif->dvol) / 1000; Modified: projects/jbuild/sys/dev/acpica/acpi_cpu.c ============================================================================== --- projects/jbuild/sys/dev/acpica/acpi_cpu.c Sat Feb 28 17:58:14 2009 (r189185) +++ projects/jbuild/sys/dev/acpica/acpi_cpu.c Sat Feb 28 17:58:25 2009 (r189186) @@ -1082,6 +1082,10 @@ acpi_cpu_quirks(void) * * Also, make sure that all interrupts cause a "Stop Break" * event to exit from C2 state. + * Also, BRLD_EN_BM (ACPI_BITREG_BUS_MASTER_RLD in ACPI-speak) + * should be set to zero, otherwise it causes C2 to short-sleep. + * PIIX4 doesn't properly support C3 and bus master activity + * need not break out of C2. */ case PCI_REVISION_A_STEP: case PCI_REVISION_B_STEP: @@ -1094,10 +1098,16 @@ acpi_cpu_quirks(void) val = pci_read_config(acpi_dev, PIIX4_DEVACTB_REG, 4); if ((val & PIIX4_STOP_BREAK_MASK) != PIIX4_STOP_BREAK_MASK) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "PIIX4: enabling IRQs to generate Stop Break\n")); + "acpi_cpu: PIIX4: enabling IRQs to generate Stop Break\n")); val |= PIIX4_STOP_BREAK_MASK; pci_write_config(acpi_dev, PIIX4_DEVACTB_REG, val, 4); } + AcpiGetRegister(ACPI_BITREG_BUS_MASTER_RLD, &val); + if (val) { + ACPI_DEBUG_PRINT((ACPI_DB_INFO, + "acpi_cpu: PIIX4: reset BRLD_EN_BM\n")); + AcpiSetRegister(ACPI_BITREG_BUS_MASTER_RLD, 0); + } break; default: break; Modified: projects/jbuild/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- projects/jbuild/sys/dev/acpica/acpi_pcib_acpi.c Sat Feb 28 17:58:14 2009 (r189185) +++ projects/jbuild/sys/dev/acpica/acpi_pcib_acpi.c Sat Feb 28 17:58:25 2009 (r189186) @@ -68,10 +68,11 @@ static int acpi_pcib_read_ivar(device_t int which, uintptr_t *result); static int acpi_pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value); -static uint32_t acpi_pcib_read_config(device_t dev, int bus, int slot, - int func, int reg, int bytes); -static void acpi_pcib_write_config(device_t dev, int bus, int slot, - int func, int reg, uint32_t data, int bytes); +static uint32_t acpi_pcib_read_config(device_t dev, u_int bus, + u_int slot, u_int func, u_int reg, int bytes); +static void acpi_pcib_write_config(device_t dev, u_int bus, + u_int slot, u_int func, u_int reg, uint32_t data, + int bytes); static int acpi_pcib_acpi_route_interrupt(device_t pcib, device_t dev, int pin); static int acpi_pcib_alloc_msi(device_t pcib, device_t dev, @@ -297,15 +298,15 @@ acpi_pcib_write_ivar(device_t dev, devic } static uint32_t -acpi_pcib_read_config(device_t dev, int bus, int slot, int func, int reg, - int bytes) +acpi_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func, + u_int reg, int bytes) { return (pci_cfgregread(bus, slot, func, reg, bytes)); } static void -acpi_pcib_write_config(device_t dev, int bus, int slot, int func, int reg, - uint32_t data, int bytes) +acpi_pcib_write_config(device_t dev, u_int bus, u_int slot, u_int func, + u_int reg, uint32_t data, int bytes) { pci_cfgregwrite(bus, slot, func, reg, data, bytes); } Modified: projects/jbuild/sys/dev/adb/adb_kbd.c ============================================================================== --- projects/jbuild/sys/dev/adb/adb_kbd.c Sat Feb 28 17:58:14 2009 (r189185) +++ projects/jbuild/sys/dev/adb/adb_kbd.c Sat Feb 28 17:58:25 2009 (r189186) @@ -72,6 +72,9 @@ struct adb_kbd_softc { int have_led_control; uint8_t buffer[8]; +#ifdef AKBD_EMULATE_ATKBD + uint8_t at_buffered_char[2]; +#endif volatile int buffers; struct callout sc_repeater; @@ -105,6 +108,17 @@ static devclass_t adb_kbd_devclass; DRIVER_MODULE(akbd, adb, adb_kbd_driver, adb_kbd_devclass, 0, 0); +#ifdef AKBD_EMULATE_ATKBD + +#define SCAN_PRESS 0x000 +#define SCAN_RELEASE 0x080 +#define SCAN_PREFIX_E0 0x100 +#define SCAN_PREFIX_E1 0x200 +#define SCAN_PREFIX_CTL 0x400 +#define SCAN_PREFIX_SHIFT 0x800 +#define SCAN_PREFIX (SCAN_PREFIX_E0 | SCAN_PREFIX_E1 | \ + SCAN_PREFIX_CTL | SCAN_PREFIX_SHIFT) + static const uint8_t adb_to_at_scancode_map[128] = { 30, 31, 32, 33, 35, 34, 44, 45, 46, 47, 0, 48, 16, 17, 18, 19, 21, 20, 2, 3, 4, 5, 7, 6, 13, 10, 8, 12, 9, 11, 27, 24, 22, 26, 23, 25, 28, 38, 36, 40, 37, 39, 43, @@ -114,6 +128,47 @@ static const uint8_t adb_to_at_scancode_ 66, 67, 0, 87, 0, 105, 0, 70, 0, 68, 0, 88, 0, 107, 102, 94, 96, 103, 62, 99, 60, 101, 59, 54, 93, 90, 0, 0 }; +static int +keycode2scancode(int keycode, int shift, int up) +{ + static const int scan[] = { + /* KP enter, right ctrl, KP divide */ + 0x1c , 0x1d , 0x35 , + /* print screen */ + 0x37 | SCAN_PREFIX_SHIFT, + /* right alt, home, up, page up, left, right, end */ + 0x38, 0x47, 0x48, 0x49, 0x4b, 0x4d, 0x4f, + /* down, page down, insert, delete */ + 0x50, 0x51, 0x52, 0x53, + /* pause/break (see also below) */ + 0x46, + /* + * MS: left window, right window, menu + * also Sun: left meta, right meta, compose + */ + 0x5b, 0x5c, 0x5d, + /* Sun type 6 USB */ + /* help, stop, again, props, undo, front, copy */ + 0x68, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, + /* open, paste, find, cut, audiomute, audiolower, audioraise */ + 0x64, 0x65, 0x66, 0x67, 0x25, 0x1f, 0x1e, + /* power */ + 0x20 + }; + int scancode; + + scancode = keycode; + if ((keycode >= 89) && (keycode < 89 + sizeof(scan) / sizeof(scan[0]))) + scancode = scan[keycode - 89] | SCAN_PREFIX_E0; + /* pause/break */ + if ((keycode == 104) && !(shift & CTLS)) + scancode = 0x45 | SCAN_PREFIX_E1 | SCAN_PREFIX_CTL; + if (shift & SHIFTS) + scancode &= ~SCAN_PREFIX_SHIFT; + return (scancode | (up ? SCAN_RELEASE : SCAN_PRESS)); +} +#endif + /* keyboard driver declaration */ static int akbd_configure(int flags); static kbd_probe_t akbd_probe; @@ -468,6 +523,13 @@ akbd_check(keyboard_t *kbd) sc = (struct adb_kbd_softc *)(kbd); mtx_lock(&sc->sc_mutex); +#ifdef AKBD_EMULATE_ATKBD + if (sc->at_buffered_char[0]) { + mtx_unlock(&sc->sc_mutex); + return (TRUE); + } +#endif + if (sc->buffers > 0) { mtx_unlock(&sc->sc_mutex); return (TRUE); @@ -481,36 +543,89 @@ static u_int akbd_read_char(keyboard_t *kbd, int wait) { struct adb_kbd_softc *sc; - uint8_t adb_code, final_scancode; + uint16_t key; + uint8_t adb_code; int i; sc = (struct adb_kbd_softc *)(kbd); mtx_lock(&sc->sc_mutex); - if (!sc->buffers && wait) - cv_wait(&sc->sc_cv,&sc->sc_mutex); - if (!sc->buffers) { - mtx_unlock(&sc->sc_mutex); - return (0); +#if defined(AKBD_EMULATE_ATKBD) + if (sc->sc_mode == K_RAW && sc->at_buffered_char[0]) { + key = sc->at_buffered_char[0]; + if (key & SCAN_PREFIX) { + sc->at_buffered_char[0] = key & ~SCAN_PREFIX; + key = (key & SCAN_PREFIX_E0) ? 0xe0 : 0xe1; + } else { + sc->at_buffered_char[0] = sc->at_buffered_char[1]; + sc->at_buffered_char[1] = 0; } - adb_code = sc->buffer[0]; + mtx_unlock(&sc->sc_mutex); - for (i = 1; i < sc->buffers; i++) - sc->buffer[i-1] = sc->buffer[i]; + return (key); + } +#endif - sc->buffers--; - mtx_unlock(&sc->sc_mutex); + if (!sc->buffers && wait) + cv_wait(&sc->sc_cv,&sc->sc_mutex); + + if (!sc->buffers) { + mtx_unlock(&sc->sc_mutex); + return (0); + } + + adb_code = sc->buffer[0]; + + for (i = 1; i < sc->buffers; i++) + sc->buffer[i-1] = sc->buffer[i]; + + sc->buffers--; #ifdef AKBD_EMULATE_ATKBD - final_scancode = adb_to_at_scancode_map[adb_code & 0x7f]; - final_scancode |= adb_code & 0x80; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:58:53 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4928106566B; Sat, 28 Feb 2009 17:58:53 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1EC78FC1C; Sat, 28 Feb 2009 17:58:53 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHwrrd017406; Sat, 28 Feb 2009 17:58:53 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHwr1V017395; Sat, 28 Feb 2009 17:58:53 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281758.n1SHwr1V017395@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:58:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189187 - projects/jbuild/sys/sys X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:58:54 -0000 Author: jb Date: Sat Feb 28 17:58:53 2009 New Revision: 189187 URL: http://svn.freebsd.org/changeset/base/189187 Log: MFC Modified: projects/jbuild/sys/sys/_null.h projects/jbuild/sys/sys/bus_dma.h projects/jbuild/sys/sys/cdefs.h projects/jbuild/sys/sys/cfictl.h projects/jbuild/sys/sys/clist.h projects/jbuild/sys/sys/conf.h projects/jbuild/sys/sys/disk.h projects/jbuild/sys/sys/elf64.h projects/jbuild/sys/sys/elf_common.h projects/jbuild/sys/sys/elf_generic.h projects/jbuild/sys/sys/fcntl.h projects/jbuild/sys/sys/file.h projects/jbuild/sys/sys/imgact_elf.h projects/jbuild/sys/sys/jail.h projects/jbuild/sys/sys/kobj.h projects/jbuild/sys/sys/ktr.h projects/jbuild/sys/sys/libkern.h projects/jbuild/sys/sys/link_elf.h projects/jbuild/sys/sys/lock.h projects/jbuild/sys/sys/lockmgr.h projects/jbuild/sys/sys/malloc.h projects/jbuild/sys/sys/mbuf.h projects/jbuild/sys/sys/mount.h projects/jbuild/sys/sys/osd.h projects/jbuild/sys/sys/param.h projects/jbuild/sys/sys/pciio.h projects/jbuild/sys/sys/pcpu.h projects/jbuild/sys/sys/pmc.h projects/jbuild/sys/sys/priv.h projects/jbuild/sys/sys/protosw.h projects/jbuild/sys/sys/sched.h projects/jbuild/sys/sys/soundcard.h projects/jbuild/sys/sys/syscallsubr.h projects/jbuild/sys/sys/sysctl.h projects/jbuild/sys/sys/systm.h projects/jbuild/sys/sys/tty.h projects/jbuild/sys/sys/ttyqueue.h projects/jbuild/sys/sys/types.h projects/jbuild/sys/sys/unistd.h projects/jbuild/sys/sys/vnode.h Modified: projects/jbuild/sys/sys/_null.h ============================================================================== --- projects/jbuild/sys/sys/_null.h Sat Feb 28 17:58:25 2009 (r189186) +++ projects/jbuild/sys/sys/_null.h Sat Feb 28 17:58:53 2009 (r189187) @@ -31,11 +31,15 @@ #if defined(_KERNEL) || !defined(__cplusplus) #define NULL ((void *)0) #else +#if defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 +#define NULL __null +#else #if defined(__LP64__) #define NULL (0L) #else #define NULL 0 #endif /* __LP64__ */ +#endif /* __GNUG__ */ #endif /* _KERNEL || !__cplusplus */ #endif Modified: projects/jbuild/sys/sys/bus_dma.h ============================================================================== --- projects/jbuild/sys/sys/bus_dma.h Sat Feb 28 17:58:25 2009 (r189186) +++ projects/jbuild/sys/sys/bus_dma.h Sat Feb 28 17:58:53 2009 (r189187) @@ -102,6 +102,13 @@ #define BUS_DMA_NOWRITE 0x100 #define BUS_DMA_NOCACHE 0x200 +/* + * The following flag is a DMA tag hint that the page offset of the + * loaded kernel virtual address must be preserved in the first + * physical segment address, when the KVA is loaded into DMA. + */ +#define BUS_DMA_KEEP_PG_OFFSET 0x400 + /* Forwards needed by prototypes below. */ struct mbuf; struct uio; Modified: projects/jbuild/sys/sys/cdefs.h ============================================================================== --- projects/jbuild/sys/sys/cdefs.h Sat Feb 28 17:58:25 2009 (r189186) +++ projects/jbuild/sys/sys/cdefs.h Sat Feb 28 17:58:53 2009 (r189187) @@ -221,8 +221,10 @@ #endif #if __GNUC_PREREQ__(2, 96) +#define __malloc_like __attribute__((__malloc__)) #define __pure __attribute__((__pure__)) #else +#define __malloc_like #define __pure #endif @@ -470,6 +472,7 @@ * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, * and the omnibus ISO/IEC 9945-1: 1996 * _POSIX_C_SOURCE == 200112 1003.1-2001 + * _POSIX_C_SOURCE == 200809 1003.1-2008 * * In addition, the X/Open Portability Guide, which is now the Single UNIX * Specification, defines a feature-test macro which indicates the version of @@ -492,7 +495,11 @@ /* Deal with various X/Open Portability Guides and Single UNIX Spec. */ #ifdef _XOPEN_SOURCE -#if _XOPEN_SOURCE - 0 >= 600 +#if _XOPEN_SOURCE - 0 >= 700 +#define __XSI_VISIBLE 700 +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200809 +#elif _XOPEN_SOURCE - 0 >= 600 #define __XSI_VISIBLE 600 #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112 @@ -511,7 +518,10 @@ #define _POSIX_C_SOURCE 198808 #endif #ifdef _POSIX_C_SOURCE -#if _POSIX_C_SOURCE >= 200112 +#if _POSIX_C_SOURCE >= 200809 +#define __POSIX_VISIBLE 200809 +#define __ISO_C_VISIBLE 1999 +#elif _POSIX_C_SOURCE >= 200121 #define __POSIX_VISIBLE 200112 #define __ISO_C_VISIBLE 1999 #elif _POSIX_C_SOURCE >= 199506 @@ -554,8 +564,8 @@ #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 1999 #else /* Default environment: show everything. */ -#define __POSIX_VISIBLE 200112 -#define __XSI_VISIBLE 600 +#define __POSIX_VISIBLE 200809 +#define __XSI_VISIBLE 700 #define __BSD_VISIBLE 1 #define __ISO_C_VISIBLE 1999 #endif Modified: projects/jbuild/sys/sys/cfictl.h ============================================================================== --- projects/jbuild/sys/sys/cfictl.h Sat Feb 28 17:58:25 2009 (r189186) +++ projects/jbuild/sys/sys/cfictl.h Sat Feb 28 17:58:53 2009 (r189187) @@ -44,4 +44,10 @@ struct cfiocqry { #define CFIOCQRY _IOWR('q', 0, struct cfiocqry) +/* Intel StrataFlash Protection Register support */ +#define CFIOCGFACTORYPR _IOR('q', 1, uint64_t) /* get factory protection reg */ +#define CFIOCGOEMPR _IOR('q', 2, uint64_t) /* get oem protection reg */ +#define CFIOCSOEMPR _IOW('q', 3, uint64_t) /* set oem protection reg */ +#define CFIOCGPLR _IOR('q', 4, uint32_t) /* get protection lock reg */ +#define CFIOCSPLR _IO('q', 5) /* set protection log reg */ #endif /* _SYS_CFICTL_H_ */ Modified: projects/jbuild/sys/sys/clist.h ============================================================================== --- projects/jbuild/sys/sys/clist.h Sat Feb 28 17:58:25 2009 (r189186) +++ projects/jbuild/sys/sys/clist.h Sat Feb 28 17:58:53 2009 (r189187) @@ -54,8 +54,6 @@ struct cblock { }; #ifdef _KERNEL -extern int cfreecount; - int b_to_q(char *cp, int cc, struct clist *q); void clist_alloc_cblocks(struct clist *q, int ccmax, int ccres); void clist_free_cblocks(struct clist *q); Modified: projects/jbuild/sys/sys/conf.h ============================================================================== --- projects/jbuild/sys/sys/conf.h Sat Feb 28 17:58:25 2009 (r189186) +++ projects/jbuild/sys/sys/conf.h Sat Feb 28 17:58:53 2009 (r189187) @@ -141,11 +141,11 @@ typedef void d_purge_t(struct cdev *dev) typedef int d_spare2_t(struct cdev *dev); typedef int dumper_t( - void *priv, /* Private to the driver. */ - void *virtual, /* Virtual (mapped) address. */ - vm_offset_t physical, /* Physical address of virtual. */ - off_t offset, /* Byte-offset to write at. */ - size_t length); /* Number of bytes to dump. */ + void *_priv, /* Private to the driver. */ + void *_virtual, /* Virtual (mapped) address. */ + vm_offset_t _physical, /* Physical address of virtual. */ + off_t _offset, /* Byte-offset to write at. */ + size_t _length); /* Number of bytes to dump. */ #endif /* _KERNEL */ @@ -219,8 +219,6 @@ struct cdevsw { #define d_gianttrick __d_giant.gianttrick #define d_postfree_list __d_giant.postfree_list -#define NUMCDEVSW 256 - struct module; struct devsw_module_data { @@ -274,10 +272,7 @@ void dev_lock(void); void dev_unlock(void); void setconf(void); -#define dev2unit(d) ((d) ? (d)->si_drv0 : NODEV) -#define minor(d) ((d) ? (d)->si_drv0 : NODEV) -#define unit2minor(u) (u) -#define minor2unit(m) (m) +#define dev2unit(d) ((d)->si_drv0) typedef void (*cdevpriv_dtr_t)(void *data); int devfs_get_cdevpriv(void **datap); Modified: projects/jbuild/sys/sys/disk.h ============================================================================== --- projects/jbuild/sys/sys/disk.h Sat Feb 28 17:58:25 2009 (r189186) +++ projects/jbuild/sys/sys/disk.h Sat Feb 28 17:58:53 2009 (r189187) @@ -104,4 +104,10 @@ void disk_err(struct bio *bp, const char * must be at least MAXPATHLEN bytes long. */ +#define DIOCGPROVIDERALIAS _IOR('d', 139, char[MAXPATHLEN]) + /*- + * Store the provider alias, if present, in a buffer. The buffer must + * be at least MAXPATHLEN bytes long. + */ + #endif /* _SYS_DISK_H_ */ Modified: projects/jbuild/sys/sys/elf64.h ============================================================================== --- projects/jbuild/sys/sys/elf64.h Sat Feb 28 17:58:25 2009 (r189186) +++ projects/jbuild/sys/sys/elf64.h Sat Feb 28 17:58:53 2009 (r189187) @@ -141,16 +141,16 @@ typedef struct { } Elf64_Rela; /* Macros for accessing the fields of r_info. */ -#define ELF64_R_SYM(info) ((info) >> 32) -#define ELF64_R_TYPE(info) ((info) & 0xffffffffL) +#define ELF64_R_SYM(info) ((info) >> 32) +#define ELF64_R_TYPE(info) ((info) & 0xffffffffL) /* Macro for constructing r_info from field values. */ -#define ELF64_R_INFO(sym, type) (((sym) << 32) + ((type) & 0xffffffffL)) +#define ELF64_R_INFO(sym, type) (((sym) << 32) + ((type) & 0xffffffffL)) #define ELF64_R_TYPE_DATA(info) (((Elf64_Xword)(info)<<32)>>40) #define ELF64_R_TYPE_ID(info) (((Elf64_Xword)(info)<<56)>>56) #define ELF64_R_TYPE_INFO(data, type) \ - (((Elf64_Xword)(data)<<8)+(Elf64_Xword)(type)) + (((Elf64_Xword)(data)<<8)+(Elf64_Xword)(type)) /* * Note entry header @@ -197,14 +197,14 @@ typedef struct { } Elf64_Sym; /* Macros for accessing the fields of st_info. */ -#define ELF64_ST_BIND(info) ((info) >> 4) -#define ELF64_ST_TYPE(info) ((info) & 0xf) +#define ELF64_ST_BIND(info) ((info) >> 4) +#define ELF64_ST_TYPE(info) ((info) & 0xf) /* Macro for constructing st_info from field values. */ -#define ELF64_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) +#define ELF64_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) /* Macro for accessing the fields of st_other. */ -#define ELF64_ST_VISIBILITY(oth) ((oth) & 0x3) +#define ELF64_ST_VISIBILITY(oth) ((oth) & 0x3) /* Structures used by Sun & GNU-style symbol versioning. */ typedef struct { Modified: projects/jbuild/sys/sys/elf_common.h ============================================================================== --- projects/jbuild/sys/sys/elf_common.h Sat Feb 28 17:58:25 2009 (r189186) +++ projects/jbuild/sys/sys/elf_common.h Sat Feb 28 17:58:53 2009 (r189187) @@ -27,7 +27,7 @@ */ #ifndef _SYS_ELF_COMMON_H_ -#define _SYS_ELF_COMMON_H_ 1 +#define _SYS_ELF_COMMON_H_ 1 /* * ELF definitions that are independent of architecture or word size. @@ -48,269 +48,281 @@ typedef struct { u_int32_t n_type; /* Type of this note. */ } Elf_Note; +/* + * The header for GNU-style hash sections. + */ + +typedef struct { + u_int32_t gh_nbuckets; /* Number of hash buckets. */ + u_int32_t gh_symndx; /* First visible symbol in .dynsym. */ + u_int32_t gh_maskwords; /* #maskwords used in bloom filter. */ + u_int32_t gh_shift2; /* Bloom filter shift count. */ +} Elf_GNU_Hash_Header; + /* Indexes into the e_ident array. Keep synced with http://www.sco.com/developers/gabi/latest/ch4.eheader.html */ -#define EI_MAG0 0 /* Magic number, byte 0. */ -#define EI_MAG1 1 /* Magic number, byte 1. */ -#define EI_MAG2 2 /* Magic number, byte 2. */ -#define EI_MAG3 3 /* Magic number, byte 3. */ -#define EI_CLASS 4 /* Class of machine. */ -#define EI_DATA 5 /* Data format. */ -#define EI_VERSION 6 /* ELF format version. */ -#define EI_OSABI 7 /* Operating system / ABI identification */ -#define EI_ABIVERSION 8 /* ABI version */ -#define OLD_EI_BRAND 8 /* Start of architecture identification. */ -#define EI_PAD 9 /* Start of padding (per SVR4 ABI). */ -#define EI_NIDENT 16 /* Size of e_ident array. */ +#define EI_MAG0 0 /* Magic number, byte 0. */ +#define EI_MAG1 1 /* Magic number, byte 1. */ +#define EI_MAG2 2 /* Magic number, byte 2. */ +#define EI_MAG3 3 /* Magic number, byte 3. */ +#define EI_CLASS 4 /* Class of machine. */ +#define EI_DATA 5 /* Data format. */ +#define EI_VERSION 6 /* ELF format version. */ +#define EI_OSABI 7 /* Operating system / ABI identification */ +#define EI_ABIVERSION 8 /* ABI version */ +#define OLD_EI_BRAND 8 /* Start of architecture identification. */ +#define EI_PAD 9 /* Start of padding (per SVR4 ABI). */ +#define EI_NIDENT 16 /* Size of e_ident array. */ /* Values for the magic number bytes. */ -#define ELFMAG0 0x7f -#define ELFMAG1 'E' -#define ELFMAG2 'L' -#define ELFMAG3 'F' -#define ELFMAG "\177ELF" /* magic string */ -#define SELFMAG 4 /* magic string size */ +#define ELFMAG0 0x7f +#define ELFMAG1 'E' +#define ELFMAG2 'L' +#define ELFMAG3 'F' +#define ELFMAG "\177ELF" /* magic string */ +#define SELFMAG 4 /* magic string size */ /* Values for e_ident[EI_VERSION] and e_version. */ -#define EV_NONE 0 -#define EV_CURRENT 1 +#define EV_NONE 0 +#define EV_CURRENT 1 /* Values for e_ident[EI_CLASS]. */ -#define ELFCLASSNONE 0 /* Unknown class. */ -#define ELFCLASS32 1 /* 32-bit architecture. */ -#define ELFCLASS64 2 /* 64-bit architecture. */ +#define ELFCLASSNONE 0 /* Unknown class. */ +#define ELFCLASS32 1 /* 32-bit architecture. */ +#define ELFCLASS64 2 /* 64-bit architecture. */ /* Values for e_ident[EI_DATA]. */ -#define ELFDATANONE 0 /* Unknown data format. */ -#define ELFDATA2LSB 1 /* 2's complement little-endian. */ -#define ELFDATA2MSB 2 /* 2's complement big-endian. */ +#define ELFDATANONE 0 /* Unknown data format. */ +#define ELFDATA2LSB 1 /* 2's complement little-endian. */ +#define ELFDATA2MSB 2 /* 2's complement big-endian. */ /* Values for e_ident[EI_OSABI]. */ -#define ELFOSABI_NONE 0 /* UNIX System V ABI */ -#define ELFOSABI_HPUX 1 /* HP-UX operating system */ -#define ELFOSABI_NETBSD 2 /* NetBSD */ -#define ELFOSABI_LINUX 3 /* GNU/Linux */ -#define ELFOSABI_HURD 4 /* GNU/Hurd */ -#define ELFOSABI_86OPEN 5 /* 86Open common IA32 ABI */ -#define ELFOSABI_SOLARIS 6 /* Solaris */ -#define ELFOSABI_AIX 7 /* AIX */ -#define ELFOSABI_IRIX 8 /* IRIX */ -#define ELFOSABI_FREEBSD 9 /* FreeBSD */ -#define ELFOSABI_TRU64 10 /* TRU64 UNIX */ -#define ELFOSABI_MODESTO 11 /* Novell Modesto */ -#define ELFOSABI_OPENBSD 12 /* OpenBSD */ -#define ELFOSABI_OPENVMS 13 /* Open VMS */ -#define ELFOSABI_NSK 14 /* HP Non-Stop Kernel */ -#define ELFOSABI_AROS 15 /* Amiga Research OS */ -#define ELFOSABI_ARM 97 /* ARM */ -#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ +#define ELFOSABI_NONE 0 /* UNIX System V ABI */ +#define ELFOSABI_HPUX 1 /* HP-UX operating system */ +#define ELFOSABI_NETBSD 2 /* NetBSD */ +#define ELFOSABI_LINUX 3 /* GNU/Linux */ +#define ELFOSABI_HURD 4 /* GNU/Hurd */ +#define ELFOSABI_86OPEN 5 /* 86Open common IA32 ABI */ +#define ELFOSABI_SOLARIS 6 /* Solaris */ +#define ELFOSABI_AIX 7 /* AIX */ +#define ELFOSABI_IRIX 8 /* IRIX */ +#define ELFOSABI_FREEBSD 9 /* FreeBSD */ +#define ELFOSABI_TRU64 10 /* TRU64 UNIX */ +#define ELFOSABI_MODESTO 11 /* Novell Modesto */ +#define ELFOSABI_OPENBSD 12 /* OpenBSD */ +#define ELFOSABI_OPENVMS 13 /* Open VMS */ +#define ELFOSABI_NSK 14 /* HP Non-Stop Kernel */ +#define ELFOSABI_AROS 15 /* Amiga Research OS */ +#define ELFOSABI_ARM 97 /* ARM */ +#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ -#define ELFOSABI_SYSV ELFOSABI_NONE /* symbol used in old spec */ -#define ELFOSABI_MONTEREY ELFOSABI_AIX /* Monterey */ +#define ELFOSABI_SYSV ELFOSABI_NONE /* symbol used in old spec */ +#define ELFOSABI_MONTEREY ELFOSABI_AIX /* Monterey */ /* e_ident */ -#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \ +#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \ (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \ (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \ (ehdr).e_ident[EI_MAG3] == ELFMAG3) /* Values for e_type. */ -#define ET_NONE 0 /* Unknown type. */ -#define ET_REL 1 /* Relocatable. */ -#define ET_EXEC 2 /* Executable. */ -#define ET_DYN 3 /* Shared object. */ -#define ET_CORE 4 /* Core file. */ -#define ET_LOOS 0xfe00 /* First operating system specific. */ -#define ET_HIOS 0xfeff /* Last operating system-specific. */ -#define ET_LOPROC 0xff00 /* First processor-specific. */ -#define ET_HIPROC 0xffff /* Last processor-specific. */ +#define ET_NONE 0 /* Unknown type. */ +#define ET_REL 1 /* Relocatable. */ +#define ET_EXEC 2 /* Executable. */ +#define ET_DYN 3 /* Shared object. */ +#define ET_CORE 4 /* Core file. */ +#define ET_LOOS 0xfe00 /* First operating system specific. */ +#define ET_HIOS 0xfeff /* Last operating system-specific. */ +#define ET_LOPROC 0xff00 /* First processor-specific. */ +#define ET_HIPROC 0xffff /* Last processor-specific. */ /* Values for e_machine. */ -#define EM_NONE 0 /* Unknown machine. */ -#define EM_M32 1 /* AT&T WE32100. */ -#define EM_SPARC 2 /* Sun SPARC. */ -#define EM_386 3 /* Intel i386. */ -#define EM_68K 4 /* Motorola 68000. */ -#define EM_88K 5 /* Motorola 88000. */ -#define EM_860 7 /* Intel i860. */ -#define EM_MIPS 8 /* MIPS R3000 Big-Endian only. */ -#define EM_S370 9 /* IBM System/370. */ -#define EM_MIPS_RS3_LE 10 /* MIPS R3000 Little-Endian. */ -#define EM_PARISC 15 /* HP PA-RISC. */ -#define EM_VPP500 17 /* Fujitsu VPP500. */ -#define EM_SPARC32PLUS 18 /* SPARC v8plus. */ -#define EM_960 19 /* Intel 80960. */ -#define EM_PPC 20 /* PowerPC 32-bit. */ -#define EM_PPC64 21 /* PowerPC 64-bit. */ -#define EM_S390 22 /* IBM System/390. */ -#define EM_V800 36 /* NEC V800. */ -#define EM_FR20 37 /* Fujitsu FR20. */ -#define EM_RH32 38 /* TRW RH-32. */ -#define EM_RCE 39 /* Motorola RCE. */ -#define EM_ARM 40 /* ARM. */ -#define EM_SH 42 /* Hitachi SH. */ -#define EM_SPARCV9 43 /* SPARC v9 64-bit. */ -#define EM_TRICORE 44 /* Siemens TriCore embedded processor. */ -#define EM_ARC 45 /* Argonaut RISC Core. */ -#define EM_H8_300 46 /* Hitachi H8/300. */ -#define EM_H8_300H 47 /* Hitachi H8/300H. */ -#define EM_H8S 48 /* Hitachi H8S. */ -#define EM_H8_500 49 /* Hitachi H8/500. */ -#define EM_IA_64 50 /* Intel IA-64 Processor. */ -#define EM_MIPS_X 51 /* Stanford MIPS-X. */ -#define EM_COLDFIRE 52 /* Motorola ColdFire. */ -#define EM_68HC12 53 /* Motorola M68HC12. */ -#define EM_MMA 54 /* Fujitsu MMA. */ -#define EM_PCP 55 /* Siemens PCP. */ -#define EM_NCPU 56 /* Sony nCPU. */ -#define EM_NDR1 57 /* Denso NDR1 microprocessor. */ -#define EM_STARCORE 58 /* Motorola Star*Core processor. */ -#define EM_ME16 59 /* Toyota ME16 processor. */ -#define EM_ST100 60 /* STMicroelectronics ST100 processor. */ -#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ processor. */ -#define EM_X86_64 62 /* Advanced Micro Devices x86-64 */ +#define EM_NONE 0 /* Unknown machine. */ +#define EM_M32 1 /* AT&T WE32100. */ +#define EM_SPARC 2 /* Sun SPARC. */ +#define EM_386 3 /* Intel i386. */ +#define EM_68K 4 /* Motorola 68000. */ +#define EM_88K 5 /* Motorola 88000. */ +#define EM_860 7 /* Intel i860. */ +#define EM_MIPS 8 /* MIPS R3000 Big-Endian only. */ +#define EM_S370 9 /* IBM System/370. */ +#define EM_MIPS_RS3_LE 10 /* MIPS R3000 Little-Endian. */ +#define EM_PARISC 15 /* HP PA-RISC. */ +#define EM_VPP500 17 /* Fujitsu VPP500. */ +#define EM_SPARC32PLUS 18 /* SPARC v8plus. */ +#define EM_960 19 /* Intel 80960. */ +#define EM_PPC 20 /* PowerPC 32-bit. */ +#define EM_PPC64 21 /* PowerPC 64-bit. */ +#define EM_S390 22 /* IBM System/390. */ +#define EM_V800 36 /* NEC V800. */ +#define EM_FR20 37 /* Fujitsu FR20. */ +#define EM_RH32 38 /* TRW RH-32. */ +#define EM_RCE 39 /* Motorola RCE. */ +#define EM_ARM 40 /* ARM. */ +#define EM_SH 42 /* Hitachi SH. */ +#define EM_SPARCV9 43 /* SPARC v9 64-bit. */ +#define EM_TRICORE 44 /* Siemens TriCore embedded processor. */ +#define EM_ARC 45 /* Argonaut RISC Core. */ +#define EM_H8_300 46 /* Hitachi H8/300. */ +#define EM_H8_300H 47 /* Hitachi H8/300H. */ +#define EM_H8S 48 /* Hitachi H8S. */ +#define EM_H8_500 49 /* Hitachi H8/500. */ +#define EM_IA_64 50 /* Intel IA-64 Processor. */ +#define EM_MIPS_X 51 /* Stanford MIPS-X. */ +#define EM_COLDFIRE 52 /* Motorola ColdFire. */ +#define EM_68HC12 53 /* Motorola M68HC12. */ +#define EM_MMA 54 /* Fujitsu MMA. */ +#define EM_PCP 55 /* Siemens PCP. */ +#define EM_NCPU 56 /* Sony nCPU. */ +#define EM_NDR1 57 /* Denso NDR1 microprocessor. */ +#define EM_STARCORE 58 /* Motorola Star*Core processor. */ +#define EM_ME16 59 /* Toyota ME16 processor. */ +#define EM_ST100 60 /* STMicroelectronics ST100 processor. */ +#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ processor. */ +#define EM_X86_64 62 /* Advanced Micro Devices x86-64 */ #define EM_AMD64 EM_X86_64 /* Advanced Micro Devices x86-64 (compat) */ -#define EM_PDSP 63 /* Sony DSP Processor. */ -#define EM_FX66 66 /* Siemens FX66 microcontroller. */ -#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 +#define EM_PDSP 63 /* Sony DSP Processor. */ +#define EM_FX66 66 /* Siemens FX66 microcontroller. */ +#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 microcontroller. */ -#define EM_ST7 68 /* STmicroelectronics ST7 8-bit +#define EM_ST7 68 /* STmicroelectronics ST7 8-bit microcontroller. */ -#define EM_68HC16 69 /* Motorola MC68HC16 microcontroller. */ -#define EM_68HC11 70 /* Motorola MC68HC11 microcontroller. */ -#define EM_68HC08 71 /* Motorola MC68HC08 microcontroller. */ -#define EM_68HC05 72 /* Motorola MC68HC05 microcontroller. */ -#define EM_SVX 73 /* Silicon Graphics SVx. */ -#define EM_ST19 74 /* STMicroelectronics ST19 8-bit mc. */ -#define EM_VAX 75 /* Digital VAX. */ -#define EM_CRIS 76 /* Axis Communications 32-bit embedded +#define EM_68HC16 69 /* Motorola MC68HC16 microcontroller. */ +#define EM_68HC11 70 /* Motorola MC68HC11 microcontroller. */ +#define EM_68HC08 71 /* Motorola MC68HC08 microcontroller. */ +#define EM_68HC05 72 /* Motorola MC68HC05 microcontroller. */ +#define EM_SVX 73 /* Silicon Graphics SVx. */ +#define EM_ST19 74 /* STMicroelectronics ST19 8-bit mc. */ +#define EM_VAX 75 /* Digital VAX. */ +#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor. */ -#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded +#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded processor. */ -#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor. */ -#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor. */ -#define EM_MMIX 80 /* Donald Knuth's educational 64-bit proc. */ -#define EM_HUANY 81 /* Harvard University machine-independent +#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor. */ +#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor. */ +#define EM_MMIX 80 /* Donald Knuth's educational 64-bit proc. */ +#define EM_HUANY 81 /* Harvard University machine-independent object files. */ -#define EM_PRISM 82 /* SiTera Prism. */ -#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller. */ -#define EM_FR30 84 /* Fujitsu FR30. */ -#define EM_D10V 85 /* Mitsubishi D10V. */ -#define EM_D30V 86 /* Mitsubishi D30V. */ -#define EM_V850 87 /* NEC v850. */ -#define EM_M32R 88 /* Mitsubishi M32R. */ -#define EM_MN10300 89 /* Matsushita MN10300. */ -#define EM_MN10200 90 /* Matsushita MN10200. */ -#define EM_PJ 91 /* picoJava. */ -#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor. */ -#define EM_ARC_A5 93 /* ARC Cores Tangent-A5. */ -#define EM_XTENSA 94 /* Tensilica Xtensa Architecture. */ -#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor. */ -#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose +#define EM_PRISM 82 /* SiTera Prism. */ +#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller. */ +#define EM_FR30 84 /* Fujitsu FR30. */ +#define EM_D10V 85 /* Mitsubishi D10V. */ +#define EM_D30V 86 /* Mitsubishi D30V. */ +#define EM_V850 87 /* NEC v850. */ +#define EM_M32R 88 /* Mitsubishi M32R. */ +#define EM_MN10300 89 /* Matsushita MN10300. */ +#define EM_MN10200 90 /* Matsushita MN10200. */ +#define EM_PJ 91 /* picoJava. */ +#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor. */ +#define EM_ARC_A5 93 /* ARC Cores Tangent-A5. */ +#define EM_XTENSA 94 /* Tensilica Xtensa Architecture. */ +#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor. */ +#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor. */ -#define EM_NS32K 97 /* National Semiconductor 32000 series. */ -#define EM_TPC 98 /* Tenor Network TPC processor. */ -#define EM_SNP1K 99 /* Trebia SNP 1000 processor. */ -#define EM_ST200 100 /* STMicroelectronics ST200 microcontroller. */ -#define EM_IP2K 101 /* Ubicom IP2xxx microcontroller family. */ -#define EM_MAX 102 /* MAX Processor. */ -#define EM_CR 103 /* National Semiconductor CompactRISC +#define EM_NS32K 97 /* National Semiconductor 32000 series. */ +#define EM_TPC 98 /* Tenor Network TPC processor. */ +#define EM_SNP1K 99 /* Trebia SNP 1000 processor. */ +#define EM_ST200 100 /* STMicroelectronics ST200 microcontroller. */ +#define EM_IP2K 101 /* Ubicom IP2xxx microcontroller family. */ +#define EM_MAX 102 /* MAX Processor. */ +#define EM_CR 103 /* National Semiconductor CompactRISC microprocessor. */ -#define EM_F2MC16 104 /* Fujitsu F2MC16. */ -#define EM_MSP430 105 /* Texas Instruments embedded microcontroller +#define EM_F2MC16 104 /* Fujitsu F2MC16. */ +#define EM_MSP430 105 /* Texas Instruments embedded microcontroller msp430. */ -#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor. */ -#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors. */ -#define EM_SEP 108 /* Sharp embedded microprocessor. */ -#define EM_ARCA 109 /* Arca RISC Microprocessor. */ -#define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. +#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor. */ +#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors. */ +#define EM_SEP 108 /* Sharp embedded microprocessor. */ +#define EM_ARCA 109 /* Arca RISC Microprocessor. */ +#define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */ /* Non-standard or deprecated. */ -#define EM_486 6 /* Intel i486. */ -#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */ -#define EM_ALPHA_STD 41 /* Digital Alpha (standard value). */ -#define EM_ALPHA 0x9026 /* Alpha (written in the absence of an ABI) */ +#define EM_486 6 /* Intel i486. */ +#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */ +#define EM_ALPHA_STD 41 /* Digital Alpha (standard value). */ +#define EM_ALPHA 0x9026 /* Alpha (written in the absence of an ABI) */ /* Special section indexes. */ -#define SHN_UNDEF 0 /* Undefined, missing, irrelevant. */ -#define SHN_LORESERVE 0xff00 /* First of reserved range. */ -#define SHN_LOPROC 0xff00 /* First processor-specific. */ -#define SHN_HIPROC 0xff1f /* Last processor-specific. */ -#define SHN_LOOS 0xff20 /* First operating system-specific. */ -#define SHN_HIOS 0xff3f /* Last operating system-specific. */ -#define SHN_ABS 0xfff1 /* Absolute values. */ -#define SHN_COMMON 0xfff2 /* Common data. */ -#define SHN_XINDEX 0xffff /* Escape -- index stored elsewhere. */ -#define SHN_HIRESERVE 0xffff /* Last of reserved range. */ +#define SHN_UNDEF 0 /* Undefined, missing, irrelevant. */ +#define SHN_LORESERVE 0xff00 /* First of reserved range. */ +#define SHN_LOPROC 0xff00 /* First processor-specific. */ +#define SHN_HIPROC 0xff1f /* Last processor-specific. */ +#define SHN_LOOS 0xff20 /* First operating system-specific. */ +#define SHN_HIOS 0xff3f /* Last operating system-specific. */ +#define SHN_ABS 0xfff1 /* Absolute values. */ +#define SHN_COMMON 0xfff2 /* Common data. */ +#define SHN_XINDEX 0xffff /* Escape -- index stored elsewhere. */ +#define SHN_HIRESERVE 0xffff /* Last of reserved range. */ /* sh_type */ -#define SHT_NULL 0 /* inactive */ -#define SHT_PROGBITS 1 /* program defined information */ -#define SHT_SYMTAB 2 /* symbol table section */ -#define SHT_STRTAB 3 /* string table section */ -#define SHT_RELA 4 /* relocation section with addends */ -#define SHT_HASH 5 /* symbol hash table section */ -#define SHT_DYNAMIC 6 /* dynamic section */ -#define SHT_NOTE 7 /* note section */ -#define SHT_NOBITS 8 /* no space section */ -#define SHT_REL 9 /* relocation section - no addends */ -#define SHT_SHLIB 10 /* reserved - purpose unknown */ -#define SHT_DYNSYM 11 /* dynamic symbol table section */ -#define SHT_INIT_ARRAY 14 /* Initialization function pointers. */ -#define SHT_FINI_ARRAY 15 /* Termination function pointers. */ -#define SHT_PREINIT_ARRAY 16 /* Pre-initialization function ptrs. */ -#define SHT_GROUP 17 /* Section group. */ -#define SHT_SYMTAB_SHNDX 18 /* Section indexes (see SHN_XINDEX). */ -#define SHT_LOOS 0x60000000 /* First of OS specific semantics */ -#define SHT_LOSUNW 0x6ffffff4 -#define SHT_SUNW_dof 0x6ffffff4 -#define SHT_SUNW_cap 0x6ffffff5 -#define SHT_SUNW_SIGNATURE 0x6ffffff6 -#define SHT_SUNW_ANNOTATE 0x6ffffff7 -#define SHT_SUNW_DEBUGSTR 0x6ffffff8 -#define SHT_SUNW_DEBUG 0x6ffffff9 -#define SHT_SUNW_move 0x6ffffffa -#define SHT_SUNW_COMDAT 0x6ffffffb -#define SHT_SUNW_syminfo 0x6ffffffc -#define SHT_SUNW_verdef 0x6ffffffd -#define SHT_GNU_verdef 0x6ffffffd /* Symbol versions provided */ -#define SHT_SUNW_verneed 0x6ffffffe -#define SHT_GNU_verneed 0x6ffffffe /* Symbol versions required */ -#define SHT_SUNW_versym 0x6fffffff -#define SHT_GNU_versym 0x6fffffff /* Symbol version table */ -#define SHT_HISUNW 0x6fffffff -#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ -#define SHT_LOPROC 0x70000000 /* reserved range for processor */ -#define SHT_AMD64_UNWIND 0x70000001 /* unwind information */ -#define SHT_HIPROC 0x7fffffff /* specific section header types */ -#define SHT_LOUSER 0x80000000 /* reserved range for application */ -#define SHT_HIUSER 0xffffffff /* specific indexes */ +#define SHT_NULL 0 /* inactive */ +#define SHT_PROGBITS 1 /* program defined information */ +#define SHT_SYMTAB 2 /* symbol table section */ +#define SHT_STRTAB 3 /* string table section */ +#define SHT_RELA 4 /* relocation section with addends */ +#define SHT_HASH 5 /* symbol hash table section */ +#define SHT_DYNAMIC 6 /* dynamic section */ +#define SHT_NOTE 7 /* note section */ +#define SHT_NOBITS 8 /* no space section */ +#define SHT_REL 9 /* relocation section - no addends */ +#define SHT_SHLIB 10 /* reserved - purpose unknown */ +#define SHT_DYNSYM 11 /* dynamic symbol table section */ +#define SHT_INIT_ARRAY 14 /* Initialization function pointers. */ +#define SHT_FINI_ARRAY 15 /* Termination function pointers. */ +#define SHT_PREINIT_ARRAY 16 /* Pre-initialization function ptrs. */ +#define SHT_GROUP 17 /* Section group. */ +#define SHT_SYMTAB_SHNDX 18 /* Section indexes (see SHN_XINDEX). */ +#define SHT_LOOS 0x60000000 /* First of OS specific semantics */ +#define SHT_LOSUNW 0x6ffffff4 +#define SHT_SUNW_dof 0x6ffffff4 +#define SHT_SUNW_cap 0x6ffffff5 +#define SHT_SUNW_SIGNATURE 0x6ffffff6 +#define SHT_GNU_HASH 0x6ffffff6 +#define SHT_SUNW_ANNOTATE 0x6ffffff7 +#define SHT_SUNW_DEBUGSTR 0x6ffffff8 +#define SHT_SUNW_DEBUG 0x6ffffff9 +#define SHT_SUNW_move 0x6ffffffa +#define SHT_SUNW_COMDAT 0x6ffffffb +#define SHT_SUNW_syminfo 0x6ffffffc +#define SHT_SUNW_verdef 0x6ffffffd +#define SHT_GNU_verdef 0x6ffffffd /* Symbol versions provided */ +#define SHT_SUNW_verneed 0x6ffffffe +#define SHT_GNU_verneed 0x6ffffffe /* Symbol versions required */ +#define SHT_SUNW_versym 0x6fffffff +#define SHT_GNU_versym 0x6fffffff /* Symbol version table */ +#define SHT_HISUNW 0x6fffffff +#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ +#define SHT_LOPROC 0x70000000 /* reserved range for processor */ +#define SHT_AMD64_UNWIND 0x70000001 /* unwind information */ +#define SHT_HIPROC 0x7fffffff /* specific section header types */ +#define SHT_LOUSER 0x80000000 /* reserved range for application */ +#define SHT_HIUSER 0xffffffff /* specific indexes */ /* Flags for sh_flags. */ -#define SHF_WRITE 0x1 /* Section contains writable data. */ -#define SHF_ALLOC 0x2 /* Section occupies memory. */ -#define SHF_EXECINSTR 0x4 /* Section contains instructions. */ -#define SHF_MERGE 0x10 /* Section may be merged. */ -#define SHF_STRINGS 0x20 /* Section contains strings. */ -#define SHF_INFO_LINK 0x40 /* sh_info holds section index. */ -#define SHF_LINK_ORDER 0x80 /* Special ordering requirements. */ -#define SHF_OS_NONCONFORMING 0x100 /* OS-specific processing required. */ -#define SHF_GROUP 0x200 /* Member of section group. */ -#define SHF_TLS 0x400 /* Section contains TLS data. */ -#define SHF_MASKOS 0x0ff00000 /* OS-specific semantics. */ -#define SHF_MASKPROC 0xf0000000 /* Processor-specific semantics. */ +#define SHF_WRITE 0x1 /* Section contains writable data. */ +#define SHF_ALLOC 0x2 /* Section occupies memory. */ +#define SHF_EXECINSTR 0x4 /* Section contains instructions. */ +#define SHF_MERGE 0x10 /* Section may be merged. */ +#define SHF_STRINGS 0x20 /* Section contains strings. */ +#define SHF_INFO_LINK 0x40 /* sh_info holds section index. */ +#define SHF_LINK_ORDER 0x80 /* Special ordering requirements. */ +#define SHF_OS_NONCONFORMING 0x100 /* OS-specific processing required. */ +#define SHF_GROUP 0x200 /* Member of section group. */ +#define SHF_TLS 0x400 /* Section contains TLS data. */ +#define SHF_MASKOS 0x0ff00000 /* OS-specific semantics. */ +#define SHF_MASKPROC 0xf0000000 /* Processor-specific semantics. */ /* Values for p_type. */ -#define PT_NULL 0 /* Unused entry. */ -#define PT_LOAD 1 /* Loadable segment. */ -#define PT_DYNAMIC 2 /* Dynamic linking information segment. */ -#define PT_INTERP 3 /* Pathname of interpreter. */ -#define PT_NOTE 4 /* Auxiliary information. */ -#define PT_SHLIB 5 /* Reserved (not used). */ -#define PT_PHDR 6 /* Location of program header itself. */ +#define PT_NULL 0 /* Unused entry. */ +#define PT_LOAD 1 /* Loadable segment. */ +#define PT_DYNAMIC 2 /* Dynamic linking information segment. */ +#define PT_INTERP 3 /* Pathname of interpreter. */ +#define PT_NOTE 4 /* Auxiliary information. */ +#define PT_SHLIB 5 /* Reserved (not used). */ +#define PT_PHDR 6 /* Location of program header itself. */ #define PT_TLS 7 /* Thread local storage segment */ -#define PT_LOOS 0x60000000 /* First OS-specific. */ +#define PT_LOOS 0x60000000 /* First OS-specific. */ #define PT_SUNW_UNWIND 0x6464e550 /* amd64 UNWIND program header */ #define PT_GNU_EH_FRAME 0x6474e550 #define PT_LOSUNW 0x6ffffffa @@ -319,48 +331,48 @@ typedef struct { #define PT_SUNWDTRACE 0x6ffffffc /* private */ #define PT_SUNWCAP 0x6ffffffd /* hard/soft capabilities segment */ #define PT_HISUNW 0x6fffffff -#define PT_HIOS 0x6fffffff /* Last OS-specific. */ -#define PT_LOPROC 0x70000000 /* First processor-specific type. */ -#define PT_HIPROC 0x7fffffff /* Last processor-specific type. */ +#define PT_HIOS 0x6fffffff /* Last OS-specific. */ +#define PT_LOPROC 0x70000000 /* First processor-specific type. */ +#define PT_HIPROC 0x7fffffff /* Last processor-specific type. */ /* Values for p_flags. */ -#define PF_X 0x1 /* Executable. */ -#define PF_W 0x2 /* Writable. */ -#define PF_R 0x4 /* Readable. */ -#define PF_MASKOS 0x0ff00000 /* Operating system-specific. */ -#define PF_MASKPROC 0xf0000000 /* Processor-specific. */ +#define PF_X 0x1 /* Executable. */ +#define PF_W 0x2 /* Writable. */ +#define PF_R 0x4 /* Readable. */ +#define PF_MASKOS 0x0ff00000 /* Operating system-specific. */ +#define PF_MASKPROC 0xf0000000 /* Processor-specific. */ /* Extended program header index. */ #define PN_XNUM 0xffff /* Values for d_tag. */ -#define DT_NULL 0 /* Terminating entry. */ -#define DT_NEEDED 1 /* String table offset of a needed shared +#define DT_NULL 0 /* Terminating entry. */ +#define DT_NEEDED 1 /* String table offset of a needed shared library. */ -#define DT_PLTRELSZ 2 /* Total size in bytes of PLT relocations. */ -#define DT_PLTGOT 3 /* Processor-dependent address. */ -#define DT_HASH 4 /* Address of symbol hash table. */ -#define DT_STRTAB 5 /* Address of string table. */ -#define DT_SYMTAB 6 /* Address of symbol table. */ -#define DT_RELA 7 /* Address of ElfNN_Rela relocations. */ -#define DT_RELASZ 8 /* Total size of ElfNN_Rela relocations. */ -#define DT_RELAENT 9 /* Size of each ElfNN_Rela relocation entry. */ -#define DT_STRSZ 10 /* Size of string table. */ -#define DT_SYMENT 11 /* Size of each symbol table entry. */ -#define DT_INIT 12 /* Address of initialization function. */ -#define DT_FINI 13 /* Address of finalization function. */ -#define DT_SONAME 14 /* String table offset of shared object +#define DT_PLTRELSZ 2 /* Total size in bytes of PLT relocations. */ +#define DT_PLTGOT 3 /* Processor-dependent address. */ +#define DT_HASH 4 /* Address of symbol hash table. */ +#define DT_STRTAB 5 /* Address of string table. */ +#define DT_SYMTAB 6 /* Address of symbol table. */ +#define DT_RELA 7 /* Address of ElfNN_Rela relocations. */ +#define DT_RELASZ 8 /* Total size of ElfNN_Rela relocations. */ +#define DT_RELAENT 9 /* Size of each ElfNN_Rela relocation entry. */ +#define DT_STRSZ 10 /* Size of string table. */ +#define DT_SYMENT 11 /* Size of each symbol table entry. */ +#define DT_INIT 12 /* Address of initialization function. */ +#define DT_FINI 13 /* Address of finalization function. */ +#define DT_SONAME 14 /* String table offset of shared object name. */ -#define DT_RPATH 15 /* String table offset of library path. [sup] */ -#define DT_SYMBOLIC 16 /* Indicates "symbolic" linking. [sup] */ -#define DT_REL 17 /* Address of ElfNN_Rel relocations. */ -#define DT_RELSZ 18 /* Total size of ElfNN_Rel relocations. */ -#define DT_RELENT 19 /* Size of each ElfNN_Rel relocation. */ -#define DT_PLTREL 20 /* Type of relocation used for PLT. */ -#define DT_DEBUG 21 /* Reserved (not used). */ -#define DT_TEXTREL 22 /* Indicates there may be relocations in +#define DT_RPATH 15 /* String table offset of library path. [sup] */ +#define DT_SYMBOLIC 16 /* Indicates "symbolic" linking. [sup] */ +#define DT_REL 17 /* Address of ElfNN_Rel relocations. */ +#define DT_RELSZ 18 /* Total size of ElfNN_Rel relocations. */ +#define DT_RELENT 19 /* Size of each ElfNN_Rel relocation. */ +#define DT_PLTREL 20 /* Type of relocation used for PLT. */ +#define DT_DEBUG 21 /* Reserved (not used). */ +#define DT_TEXTREL 22 /* Indicates there may be relocations in non-writable segments. [sup] */ -#define DT_JMPREL 23 /* Address of PLT relocations. */ +#define DT_JMPREL 23 /* Address of PLT relocations. */ #define DT_BIND_NOW 24 /* [sup] */ #define DT_INIT_ARRAY 25 /* Address of the array of pointers to initialization functions */ @@ -455,63 +467,63 @@ typedef struct { thread-local storage scheme. */ /* Values for n_type. Used in core files. */ -#define NT_PRSTATUS 1 /* Process status. */ -#define NT_FPREGSET 2 /* Floating point registers. */ -#define NT_PRPSINFO 3 /* Process state info. */ +#define NT_PRSTATUS 1 /* Process status. */ +#define NT_FPREGSET 2 /* Floating point registers. */ +#define NT_PRPSINFO 3 /* Process state info. */ /* Symbol Binding - ELFNN_ST_BIND - st_info */ -#define STB_LOCAL 0 /* Local symbol */ -#define STB_GLOBAL 1 /* Global symbol */ -#define STB_WEAK 2 /* like global - lower precedence */ -#define STB_LOOS 10 /* Reserved range for operating system */ -#define STB_HIOS 12 /* specific semantics. */ -#define STB_LOPROC 13 /* reserved range for processor */ -#define STB_HIPROC 15 /* specific semantics. */ +#define STB_LOCAL 0 /* Local symbol */ +#define STB_GLOBAL 1 /* Global symbol */ +#define STB_WEAK 2 /* like global - lower precedence */ +#define STB_LOOS 10 /* Reserved range for operating system */ +#define STB_HIOS 12 /* specific semantics. */ +#define STB_LOPROC 13 /* reserved range for processor */ +#define STB_HIPROC 15 /* specific semantics. */ /* Symbol type - ELFNN_ST_TYPE - st_info */ -#define STT_NOTYPE 0 /* Unspecified type. */ -#define STT_OBJECT 1 /* Data object. */ -#define STT_FUNC 2 /* Function. */ -#define STT_SECTION 3 /* Section. */ -#define STT_FILE 4 /* Source file. */ -#define STT_COMMON 5 /* Uninitialized common block. */ -#define STT_TLS 6 /* TLS object. */ -#define STT_NUM 7 -#define STT_LOOS 10 /* Reserved range for operating system */ -#define STT_HIOS 12 /* specific semantics. */ -#define STT_LOPROC 13 /* reserved range for processor */ -#define STT_HIPROC 15 /* specific semantics. */ +#define STT_NOTYPE 0 /* Unspecified type. */ +#define STT_OBJECT 1 /* Data object. */ +#define STT_FUNC 2 /* Function. */ +#define STT_SECTION 3 /* Section. */ +#define STT_FILE 4 /* Source file. */ +#define STT_COMMON 5 /* Uninitialized common block. */ +#define STT_TLS 6 /* TLS object. */ +#define STT_NUM 7 +#define STT_LOOS 10 /* Reserved range for operating system */ +#define STT_HIOS 12 /* specific semantics. */ +#define STT_LOPROC 13 /* reserved range for processor */ +#define STT_HIPROC 15 /* specific semantics. */ /* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */ -#define STV_DEFAULT 0x0 /* Default visibility (see binding). */ -#define STV_INTERNAL 0x1 /* Special meaning in relocatable objects. */ -#define STV_HIDDEN 0x2 /* Not visible. */ -#define STV_PROTECTED 0x3 /* Visible but not preemptible. */ -#define STV_EXPORTED 0x4 -#define STV_SINGLETON 0x5 -#define STV_ELIMINATE 0x6 +#define STV_DEFAULT 0x0 /* Default visibility (see binding). */ +#define STV_INTERNAL 0x1 /* Special meaning in relocatable objects. */ +#define STV_HIDDEN 0x2 /* Not visible. */ +#define STV_PROTECTED 0x3 /* Visible but not preemptible. */ +#define STV_EXPORTED 0x4 +#define STV_SINGLETON 0x5 +#define STV_ELIMINATE 0x6 /* Special symbol table indexes. */ -#define STN_UNDEF 0 /* Undefined symbol index. */ +#define STN_UNDEF 0 /* Undefined symbol index. */ /* Symbol versioning flags. */ #define VER_DEF_CURRENT 1 -#define VER_DEF_IDX(x) VER_NDX(x) +#define VER_DEF_IDX(x) VER_NDX(x) #define VER_FLG_BASE 0x01 #define VER_FLG_WEAK 0x02 #define VER_NEED_CURRENT 1 -#define VER_NEED_WEAK (1u << 15) -#define VER_NEED_HIDDEN VER_NDX_HIDDEN -#define VER_NEED_IDX(x) VER_NDX(x) +#define VER_NEED_WEAK (1u << 15) +#define VER_NEED_HIDDEN VER_NDX_HIDDEN +#define VER_NEED_IDX(x) VER_NDX(x) #define VER_NDX_LOCAL 0 #define VER_NDX_GLOBAL 1 -#define VER_NDX_GIVEN 2 +#define VER_NDX_GIVEN 2 -#define VER_NDX_HIDDEN (1u << 15) -#define VER_NDX(x) ((x) & ~(1u << 15)) +#define VER_NDX_HIDDEN (1u << 15) +#define VER_NDX(x) ((x) & ~(1u << 15)) #define CA_SUNW_NULL 0 #define CA_SUNW_HW_1 1 /* first hardware capabilities entry */ @@ -763,30 +775,30 @@ typedef struct { /* * TLS relocations */ -#define R_PPC_TLS 67 -#define R_PPC_DTPMOD32 68 -#define R_PPC_TPREL16 69 -#define R_PPC_TPREL16_LO 70 -#define R_PPC_TPREL16_HI 71 -#define R_PPC_TPREL16_HA 72 -#define R_PPC_TPREL32 73 -#define R_PPC_DTPREL16 74 -#define R_PPC_DTPREL16_LO 75 -#define R_PPC_DTPREL16_HI 76 -#define R_PPC_DTPREL16_HA 77 -#define R_PPC_DTPREL32 78 -#define R_PPC_GOT_TLSGD16 79 -#define R_PPC_GOT_TLSGD16_LO 80 -#define R_PPC_GOT_TLSGD16_HI 81 -#define R_PPC_GOT_TLSGD16_HA 82 -#define R_PPC_GOT_TLSLD16 83 -#define R_PPC_GOT_TLSLD16_LO 84 -#define R_PPC_GOT_TLSLD16_HI 85 -#define R_PPC_GOT_TLSLD16_HA 86 -#define R_PPC_GOT_TPREL16 87 -#define R_PPC_GOT_TPREL16_LO 88 -#define R_PPC_GOT_TPREL16_HI 89 -#define R_PPC_GOT_TPREL16_HA 90 +#define R_PPC_TLS 67 +#define R_PPC_DTPMOD32 68 +#define R_PPC_TPREL16 69 +#define R_PPC_TPREL16_LO 70 +#define R_PPC_TPREL16_HI 71 +#define R_PPC_TPREL16_HA 72 +#define R_PPC_TPREL32 73 +#define R_PPC_DTPREL16 74 +#define R_PPC_DTPREL16_LO 75 +#define R_PPC_DTPREL16_HI 76 +#define R_PPC_DTPREL16_HA 77 +#define R_PPC_DTPREL32 78 +#define R_PPC_GOT_TLSGD16 79 +#define R_PPC_GOT_TLSGD16_LO 80 +#define R_PPC_GOT_TLSGD16_HI 81 +#define R_PPC_GOT_TLSGD16_HA 82 +#define R_PPC_GOT_TLSLD16 83 +#define R_PPC_GOT_TLSLD16_LO 84 +#define R_PPC_GOT_TLSLD16_HI 85 +#define R_PPC_GOT_TLSLD16_HA 86 +#define R_PPC_GOT_TPREL16 87 +#define R_PPC_GOT_TPREL16_LO 88 +#define R_PPC_GOT_TPREL16_HI 89 +#define R_PPC_GOT_TPREL16_HA 90 /* * The remaining relocs are from the Embedded ELF ABI, and are not in the Modified: projects/jbuild/sys/sys/elf_generic.h ============================================================================== --- projects/jbuild/sys/sys/elf_generic.h Sat Feb 28 17:58:25 2009 (r189186) +++ projects/jbuild/sys/sys/elf_generic.h Sat Feb 28 17:58:53 2009 (r189187) @@ -27,7 +27,7 @@ */ #ifndef _SYS_ELF_GENERIC_H_ -#define _SYS_ELF_GENERIC_H_ 1 +#define _SYS_ELF_GENERIC_H_ 1 #include @@ -40,20 +40,20 @@ #error "__ELF_WORD_SIZE must be defined as 32 or 64" #endif -#define ELF_CLASS __CONCAT(ELFCLASS,__ELF_WORD_SIZE) +#define ELF_CLASS __CONCAT(ELFCLASS,__ELF_WORD_SIZE) #if BYTE_ORDER == LITTLE_ENDIAN -#define ELF_DATA ELFDATA2LSB +#define ELF_DATA ELFDATA2LSB #elif BYTE_ORDER == BIG_ENDIAN -#define ELF_DATA ELFDATA2MSB +#define ELF_DATA ELFDATA2MSB #else #error "Unknown byte order" #endif -#define __elfN(x) __CONCAT(__CONCAT(__CONCAT(elf,__ELF_WORD_SIZE),_),x) -#define __ElfN(x) __CONCAT(__CONCAT(__CONCAT(Elf,__ELF_WORD_SIZE),_),x) -#define __ELFN(x) __CONCAT(__CONCAT(__CONCAT(ELF,__ELF_WORD_SIZE),_),x) -#define __ElfType(x) typedef __ElfN(x) __CONCAT(Elf_,x) +#define __elfN(x) __CONCAT(__CONCAT(__CONCAT(elf,__ELF_WORD_SIZE),_),x) +#define __ElfN(x) __CONCAT(__CONCAT(__CONCAT(Elf,__ELF_WORD_SIZE),_),x) +#define __ELFN(x) __CONCAT(__CONCAT(__CONCAT(ELF,__ELF_WORD_SIZE),_),x) +#define __ElfType(x) typedef __ElfN(x) __CONCAT(Elf_,x) __ElfType(Addr); __ElfType(Half); @@ -78,11 +78,11 @@ __ElfType(Hashelt); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:59:03 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A543E106568B; Sat, 28 Feb 2009 17:59:03 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FD978FC18; Sat, 28 Feb 2009 17:59:03 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHx3iu017457; Sat, 28 Feb 2009 17:59:03 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHx3cp017445; Sat, 28 Feb 2009 17:59:03 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281759.n1SHx3cp017445@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189188 - in projects/jbuild/sys/amd64: amd64 conf ia32 include linux32 pci X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:59:04 -0000 Author: jb Date: Sat Feb 28 17:59:02 2009 New Revision: 189188 URL: http://svn.freebsd.org/changeset/base/189188 Log: MFC Modified: projects/jbuild/sys/amd64/amd64/amd64_mem.c projects/jbuild/sys/amd64/amd64/busdma_machdep.c projects/jbuild/sys/amd64/amd64/cpu_switch.S projects/jbuild/sys/amd64/amd64/exception.S projects/jbuild/sys/amd64/amd64/fpu.c projects/jbuild/sys/amd64/amd64/identcpu.c projects/jbuild/sys/amd64/amd64/initcpu.c projects/jbuild/sys/amd64/amd64/io_apic.c projects/jbuild/sys/amd64/amd64/local_apic.c projects/jbuild/sys/amd64/amd64/machdep.c projects/jbuild/sys/amd64/amd64/mp_machdep.c projects/jbuild/sys/amd64/amd64/msi.c projects/jbuild/sys/amd64/amd64/pmap.c projects/jbuild/sys/amd64/conf/DEFAULTS projects/jbuild/sys/amd64/conf/GENERIC projects/jbuild/sys/amd64/conf/NOTES projects/jbuild/sys/amd64/ia32/ia32_signal.c projects/jbuild/sys/amd64/ia32/ia32_sigtramp.S projects/jbuild/sys/amd64/include/apicvar.h projects/jbuild/sys/amd64/include/cpufunc.h projects/jbuild/sys/amd64/include/cputypes.h projects/jbuild/sys/amd64/include/fpu.h projects/jbuild/sys/amd64/include/intr_machdep.h projects/jbuild/sys/amd64/include/legacyvar.h projects/jbuild/sys/amd64/include/md_var.h projects/jbuild/sys/amd64/include/specialreg.h projects/jbuild/sys/amd64/linux32/linux32_locore.s projects/jbuild/sys/amd64/linux32/linux32_machdep.c projects/jbuild/sys/amd64/linux32/linux32_sysvec.c projects/jbuild/sys/amd64/pci/pci_bus.c Modified: projects/jbuild/sys/amd64/amd64/amd64_mem.c ============================================================================== --- projects/jbuild/sys/amd64/amd64/amd64_mem.c Sat Feb 28 17:58:53 2009 (r189187) +++ projects/jbuild/sys/amd64/amd64/amd64_mem.c Sat Feb 28 17:59:02 2009 (r189188) @@ -678,9 +678,17 @@ amd64_mem_drvinit(void *unused) return; if ((cpu_id & 0xf00) != 0x600 && (cpu_id & 0xf00) != 0xf00) return; - if (cpu_vendor_id != CPU_VENDOR_INTEL && - cpu_vendor_id != CPU_VENDOR_AMD) + switch (cpu_vendor_id) { + case CPU_VENDOR_INTEL: + case CPU_VENDOR_AMD: + break; + case CPU_VENDOR_CENTAUR: + if (cpu_exthigh >= 0x80000008) + break; + /* FALLTHROUGH */ + default: return; + } mem_range_softc.mr_op = &amd64_mrops; } SYSINIT(amd64memdev, SI_SUB_DRIVERS, SI_ORDER_FIRST, amd64_mem_drvinit, NULL); Modified: projects/jbuild/sys/amd64/amd64/busdma_machdep.c ============================================================================== --- projects/jbuild/sys/amd64/amd64/busdma_machdep.c Sat Feb 28 17:58:53 2009 (r189187) +++ projects/jbuild/sys/amd64/amd64/busdma_machdep.c Sat Feb 28 17:59:02 2009 (r189188) @@ -93,6 +93,7 @@ struct bounce_zone { int active_bpages; int total_bounced; int total_deferred; + int map_count; bus_size_t alignment; bus_size_t boundary; bus_addr_t lowaddr; @@ -418,7 +419,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in else maxpages = MIN(MAX_BPAGES, Maxmem -atop(dmat->lowaddr)); if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 - || (dmat->map_count > 0 && bz->total_bpages < maxpages)) { + || (bz->map_count > 0 && bz->total_bpages < maxpages)) { int pages; pages = MAX(atop(dmat->maxsize), 1); @@ -434,6 +435,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in error = 0; } } + bz->map_count++; } else { *mapp = NULL; } @@ -457,6 +459,8 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b __func__, dmat, EBUSY); return (EBUSY); } + if (dmat->bounce_zone) + dmat->bounce_zone->map_count--; free(map, M_DEVBUF); } dmat->map_count--; @@ -989,6 +993,7 @@ alloc_bounce_zone(bus_dma_tag_t dmat) bz->lowaddr = dmat->lowaddr; bz->alignment = dmat->alignment; bz->boundary = dmat->boundary; + bz->map_count = 0; snprintf(bz->zoneid, 8, "zone%d", busdma_zonecount); busdma_zonecount++; snprintf(bz->lowaddrid, 18, "%#jx", (uintmax_t)bz->lowaddr); @@ -1128,6 +1133,13 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ bz->active_bpages++; mtx_unlock(&bounce_lock); + if (dmat->flags & BUS_DMA_KEEP_PG_OFFSET) { + /* page offset needs to be preserved */ + bpage->vaddr &= ~PAGE_MASK; + bpage->busaddr &= ~PAGE_MASK; + bpage->vaddr |= vaddr & PAGE_MASK; + bpage->busaddr |= vaddr & PAGE_MASK; + } bpage->datavaddr = vaddr; bpage->datacount = size; STAILQ_INSERT_TAIL(&(map->bpages), bpage, links); Modified: projects/jbuild/sys/amd64/amd64/cpu_switch.S ============================================================================== --- projects/jbuild/sys/amd64/amd64/cpu_switch.S Sat Feb 28 17:58:53 2009 (r189187) +++ projects/jbuild/sys/amd64/amd64/cpu_switch.S Sat Feb 28 17:59:02 2009 (r189188) @@ -199,6 +199,7 @@ done_load_seg: cmpq PCB_FSBASE(%r8),%r9 jz 1f /* Restore userland %fs */ +restore_fsbase: movl $MSR_FSBASE,%ecx movl PCB_FSBASE(%r8),%eax movl PCB_FSBASE+4(%r8),%edx @@ -259,12 +260,12 @@ do_kthread: jmp do_tss store_seg: - movl %gs,PCB_GS(%r8) + mov %gs,PCB_GS(%r8) testl $PCB_GS32BIT,PCB_FLAGS(%r8) jnz 2f -1: movl %ds,PCB_DS(%r8) - movl %es,PCB_ES(%r8) - movl %fs,PCB_FS(%r8) +1: mov %ds,PCB_DS(%r8) + mov %es,PCB_ES(%r8) + mov %fs,PCB_FS(%r8) jmp done_store_seg 2: movq PCPU(GS32P),%rax movq (%rax),%rax @@ -276,12 +277,12 @@ load_seg: jnz 2f 1: movl $MSR_GSBASE,%ecx rdmsr - movl PCB_GS(%r8),%gs + mov PCB_GS(%r8),%gs wrmsr - movl PCB_DS(%r8),%ds - movl PCB_ES(%r8),%es - movl PCB_FS(%r8),%fs - jmp done_load_seg + mov PCB_DS(%r8),%ds + mov PCB_ES(%r8),%es + mov PCB_FS(%r8),%fs + jmp restore_fsbase /* Restore userland %gs while preserving kernel gsbase */ 2: movq PCPU(GS32P),%rax movq PCB_GS32SD(%r8),%rcx Modified: projects/jbuild/sys/amd64/amd64/exception.S ============================================================================== --- projects/jbuild/sys/amd64/amd64/exception.S Sat Feb 28 17:58:53 2009 (r189187) +++ projects/jbuild/sys/amd64/amd64/exception.S Sat Feb 28 17:59:02 2009 (r189188) @@ -383,22 +383,24 @@ IDTVEC(fast_syscall32) * NMI handling is special. * * First, NMIs do not respect the state of the processor's RFLAGS.IF - * bit and the NMI handler may be invoked at any time, including when - * the processor is in a critical section with RFLAGS.IF == 0. In - * particular, this means that the processor's GS.base values could be - * inconsistent on entry to the handler, and so we need to read - * MSR_GSBASE to determine if a 'swapgs' is needed. We use '%ebx', a - * C-preserved register, to remember whether to swap GS back on the - * exit path. + * bit. The NMI handler may be entered at any time, including when + * the processor is in a critical section with RFLAGS.IF == 0. + * The processor's GS.base value could be invalid on entry to the + * handler. * * Second, the processor treats NMIs specially, blocking further NMIs - * until an 'iretq' instruction is executed. We therefore need to - * execute the NMI handler with interrupts disabled to prevent a - * nested interrupt from executing an 'iretq' instruction and - * inadvertently taking the processor out of NMI mode. + * until an 'iretq' instruction is executed. We thus need to execute + * the NMI handler with interrupts disabled, to prevent a nested interrupt + * from executing an 'iretq' instruction and inadvertently taking the + * processor out of NMI mode. * - * Third, the NMI handler runs on its own stack (tss_ist1), shared - * with the double fault handler. + * Third, the NMI handler runs on its own stack (tss_ist2). The canonical + * GS.base value for the processor is stored just above the bottom of its + * NMI stack. For NMIs taken from kernel mode, the current value in + * the processor's GS.base is saved at entry to C-preserved register %r12, + * the canonical value for GS.base is then loaded into the processor, and + * the saved value is restored at exit time. For NMIs taken from user mode, + * the cheaper 'SWAPGS' instructions are used for swapping GS.base. */ IDTVEC(nmi) @@ -423,12 +425,22 @@ IDTVEC(nmi) movq %r15,TF_R15(%rsp) xorl %ebx,%ebx testb $SEL_RPL_MASK,TF_CS(%rsp) - jnz nmi_needswapgs /* we came from userland */ + jnz nmi_fromuserspace + /* + * We've interrupted the kernel. Preserve GS.base in %r12. + */ movl $MSR_GSBASE,%ecx rdmsr - cmpl $VM_MAXUSER_ADDRESS >> 32,%edx - jae nmi_calltrap /* GS.base holds a kernel VA */ -nmi_needswapgs: + movq %rax,%r12 + shlq $32,%rdx + orq %rdx,%r12 + /* Retrieve and load the canonical value for GS.base. */ + movq TF_SIZE(%rsp),%rdx + movl %edx,%eax + shrq $32,%rdx + wrmsr + jmp nmi_calltrap +nmi_fromuserspace: incl %ebx swapgs /* Note: this label is also used by ddb and gdb: */ @@ -439,14 +451,19 @@ nmi_calltrap: MEXITCOUNT #ifdef HWPMC_HOOKS /* - * Check if the current trap was from user mode and if so - * whether the current thread needs a user call chain to be - * captured. We are still in NMI mode at this point. + * Capture a userspace callchain if needed. + * + * - Check if the current trap was from user mode. + * - Check if the current thread is valid. + * - Check if the thread requires a user call chain to be + * captured. + * + * We are still in NMI mode at this point. */ - testb $SEL_RPL_MASK,TF_CS(%rsp) - jz nocallchain - movq PCPU(CURTHREAD),%rax /* curthread present? */ - orq %rax,%rax + testl %ebx,%ebx + jz nocallchain /* not from userspace */ + movq PCPU(CURTHREAD),%rax + orq %rax,%rax /* curthread present? */ jz nocallchain testl $TDP_CALLCHAIN,TD_PFLAGS(%rax) /* flagged for capture? */ jz nocallchain @@ -494,11 +511,22 @@ outofnmi: movq %rsp,%rdx /* frame */ sti call *%rax + cli nocallchain: #endif testl %ebx,%ebx - jz nmi_restoreregs + jz nmi_kernelexit swapgs + jmp nmi_restoreregs +nmi_kernelexit: + /* + * Put back the preserved MSR_GSBASE value. + */ + movl $MSR_GSBASE,%ecx + movq %r12,%rdx + movl %edx,%eax + shrq $32,%rdx + wrmsr nmi_restoreregs: movq TF_RDI(%rsp),%rdi movq TF_RSI(%rsp),%rsi Modified: projects/jbuild/sys/amd64/amd64/fpu.c ============================================================================== --- projects/jbuild/sys/amd64/amd64/fpu.c Sat Feb 28 17:58:53 2009 (r189187) +++ projects/jbuild/sys/amd64/amd64/fpu.c Sat Feb 28 17:59:02 2009 (r189188) @@ -98,10 +98,8 @@ typedef u_char bool_t; static void fpu_clean_state(void); -int hw_float = 1; -SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint, - CTLFLAG_RD, &hw_float, 0, - "Floatingpoint instructions executed in hardware"); +SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, + NULL, 1, "Floating point instructions executed in hardware"); static struct savefpu fpu_cleanstate; static bool_t fpu_cleanstate_ready; @@ -391,6 +389,7 @@ fpudna() { struct pcb *pcb; register_t s; + u_short control; if (PCPU_GET(fpcurthread) == curthread) { printf("fpudna: fpcurthread == curthread %d times\n", @@ -421,6 +420,10 @@ fpudna() * explicitly load sanitized registers. */ fxrstor(&fpu_cleanstate); + if (pcb->pcb_flags & PCB_32BIT) { + control = __INITIAL_FPUCW_I386__; + fldcw(&control); + } pcb->pcb_flags |= PCB_FPUINITDONE; } else fxrstor(&pcb->pcb_save); Modified: projects/jbuild/sys/amd64/amd64/identcpu.c ============================================================================== --- projects/jbuild/sys/amd64/amd64/identcpu.c Sat Feb 28 17:58:53 2009 (r189187) +++ projects/jbuild/sys/amd64/amd64/identcpu.c Sat Feb 28 17:59:02 2009 (r189188) @@ -72,6 +72,7 @@ void panicifcpuunsupported(void); static u_int find_cpu_vendor_id(void); static void print_AMD_info(void); static void print_AMD_assoc(int i); +static void print_via_padlock_info(void); int cpu_class; char machine[] = "amd64"; @@ -102,6 +103,7 @@ static struct { } cpu_vendors[] = { { INTEL_VENDOR_ID, CPU_VENDOR_INTEL }, /* GenuineIntel */ { AMD_VENDOR_ID, CPU_VENDOR_AMD }, /* AuthenticAMD */ + { CENTAUR_VENDOR_ID, CPU_VENDOR_CENTAUR }, /* CentaurHauls */ }; int cpu_cores; @@ -131,24 +133,33 @@ printcpuinfo(void) } } - if (cpu_vendor_id == CPU_VENDOR_INTEL) { + switch (cpu_vendor_id) { + case CPU_VENDOR_INTEL: /* Please make up your mind folks! */ strcat(cpu_model, "EM64T"); - } else if (cpu_vendor_id == CPU_VENDOR_AMD) { + break; + case CPU_VENDOR_AMD: /* * Values taken from AMD Processor Recognition * http://www.amd.com/K6/k6docs/pdf/20734g.pdf * (also describes ``Features'' encodings. */ strcpy(cpu_model, "AMD "); - switch (cpu_id & 0xF00) { - case 0xf00: + if ((cpu_id & 0xf00) == 0xf00) strcat(cpu_model, "AMD64 Processor"); - break; - default: + else strcat(cpu_model, "Unknown"); - break; - } + break; + case CPU_VENDOR_CENTAUR: + strcpy(cpu_model, "VIA "); + if ((cpu_id & 0xff0) == 0x6f0) + strcat(cpu_model, "Nano Processor"); + else + strcat(cpu_model, "Unknown"); + break; + default: + strcat(cpu_model, "Unknown"); + break; } /* @@ -180,7 +191,8 @@ printcpuinfo(void) printf(" Id = 0x%x", cpu_id); if (cpu_vendor_id == CPU_VENDOR_INTEL || - cpu_vendor_id == CPU_VENDOR_AMD) { + cpu_vendor_id == CPU_VENDOR_AMD || + cpu_vendor_id == CPU_VENDOR_CENTAUR) { printf(" Stepping = %u", cpu_id & 0xf); if (cpu_high > 0) { u_int cmp = 1, htt = 1; @@ -352,6 +364,9 @@ printcpuinfo(void) ); } + if (cpu_vendor_id == CPU_VENDOR_CENTAUR) + print_via_padlock_info(); + if ((cpu_feature & CPUID_HTT) && cpu_vendor_id == CPU_VENDOR_AMD) cpu_feature &= ~CPUID_HTT; @@ -375,6 +390,12 @@ printcpuinfo(void) AMD64_CPU_MODEL(cpu_id) >= 0x3)) tsc_is_invariant = 1; break; + case CPU_VENDOR_CENTAUR: + if (AMD64_CPU_FAMILY(cpu_id) == 0x6 && + AMD64_CPU_MODEL(cpu_id) >= 0xf && + (rdmsr(0x1203) & 0x100000000ULL) == 0) + tsc_is_invariant = 1; + break; } if (tsc_is_invariant) printf("\n TSC: P-state invariant"); @@ -456,7 +477,7 @@ EVENTHANDLER_DEFINE(cpufreq_post_change, EVENTHANDLER_PRI_ANY); /* - * Final stage of CPU identification. -- Should I check TI? + * Final stage of CPU identification. */ void identify_cpu(void) @@ -478,7 +499,8 @@ identify_cpu(void) cpu_feature2 = regs[2]; if (cpu_vendor_id == CPU_VENDOR_INTEL || - cpu_vendor_id == CPU_VENDOR_AMD) { + cpu_vendor_id == CPU_VENDOR_AMD || + cpu_vendor_id == CPU_VENDOR_CENTAUR) { do_cpuid(0x80000000, regs); cpu_exthigh = regs[0]; } @@ -599,3 +621,37 @@ print_AMD_info(void) print_AMD_l2_assoc((regs[2] >> 12) & 0x0f); } } + +static void +print_via_padlock_info(void) +{ + u_int regs[4]; + + /* Check for supported models. */ + switch (cpu_id & 0xff0) { + case 0x690: + if ((cpu_id & 0xf) < 3) + return; + case 0x6a0: + case 0x6d0: + case 0x6f0: + break; + default: + return; + } + + do_cpuid(0xc0000000, regs); + if (regs[0] >= 0xc0000001) + do_cpuid(0xc0000001, regs); + else + return; + + printf("\n VIA Padlock Features=0x%b", regs[3], + "\020" + "\003RNG" /* RNG */ + "\007AES" /* ACE */ + "\011AES-CTR" /* ACE2 */ + "\013SHA1,SHA256" /* PHE */ + "\015RSA" /* PMM */ + ); +} Modified: projects/jbuild/sys/amd64/amd64/initcpu.c ============================================================================== --- projects/jbuild/sys/amd64/amd64/initcpu.c Sat Feb 28 17:58:53 2009 (r189187) +++ projects/jbuild/sys/amd64/amd64/initcpu.c Sat Feb 28 17:59:02 2009 (r189188) @@ -54,6 +54,8 @@ u_int cpu_feature2; /* Feature flags */ u_int amd_feature; /* AMD feature flags */ u_int amd_feature2; /* AMD feature flags */ u_int amd_pminfo; /* AMD advanced power management info */ +u_int via_feature_rng; /* VIA RNG features */ +u_int via_feature_xcrypt; /* VIA ACE features */ u_int cpu_high; /* Highest arg to CPUID */ u_int cpu_exthigh; /* Highest arg to extended CPUID */ u_int cpu_id; /* Stepping ID */ @@ -64,6 +66,75 @@ u_int cpu_vendor_id; /* CPU vendor ID * u_int cpu_fxsr; /* SSE enabled */ u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ +SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, + &via_feature_rng, 0, "VIA C3/C7 RNG feature available in CPU"); +SYSCTL_UINT(_hw, OID_AUTO, via_feature_xcrypt, CTLFLAG_RD, + &via_feature_xcrypt, 0, "VIA C3/C7 xcrypt feature available in CPU"); + +/* + * Initialize special VIA C3/C7 features + */ +static void +init_via(void) +{ + u_int regs[4], val; + u_int64_t msreg; + + do_cpuid(0xc0000000, regs); + val = regs[0]; + if (val >= 0xc0000001) { + do_cpuid(0xc0000001, regs); + val = regs[3]; + } else + val = 0; + + /* Enable RNG if present and disabled */ + if (val & VIA_CPUID_HAS_RNG) { + if (!(val & VIA_CPUID_DO_RNG)) { + msreg = rdmsr(0x110B); + msreg |= 0x40; + wrmsr(0x110B, msreg); + } + via_feature_rng = VIA_HAS_RNG; + } + /* Enable AES engine if present and disabled */ + if (val & VIA_CPUID_HAS_ACE) { + if (!(val & VIA_CPUID_DO_ACE)) { + msreg = rdmsr(0x1107); + msreg |= (0x01 << 28); + wrmsr(0x1107, msreg); + } + via_feature_xcrypt |= VIA_HAS_AES; + } + /* Enable ACE2 engine if present and disabled */ + if (val & VIA_CPUID_HAS_ACE2) { + if (!(val & VIA_CPUID_DO_ACE2)) { + msreg = rdmsr(0x1107); + msreg |= (0x01 << 28); + wrmsr(0x1107, msreg); + } + via_feature_xcrypt |= VIA_HAS_AESCTR; + } + /* Enable SHA engine if present and disabled */ + if (val & VIA_CPUID_HAS_PHE) { + if (!(val & VIA_CPUID_DO_PHE)) { + msreg = rdmsr(0x1107); + msreg |= (0x01 << 28/**/); + wrmsr(0x1107, msreg); + } + via_feature_xcrypt |= VIA_HAS_SHA; + } + /* Enable MM engine if present and disabled */ + if (val & VIA_CPUID_HAS_PMM) { + if (!(val & VIA_CPUID_DO_PMM)) { + msreg = rdmsr(0x1107); + msreg |= (0x01 << 28/**/); + wrmsr(0x1107, msreg); + } + via_feature_xcrypt |= VIA_HAS_MM; + } +} + /* * Initialize CPU control registers */ @@ -81,4 +152,8 @@ initializecpu(void) wrmsr(MSR_EFER, msr); pg_nx = PG_NX; } + if (cpu_vendor_id == CPU_VENDOR_CENTAUR && + AMD64_CPU_FAMILY(cpu_id) == 0x6 && + AMD64_CPU_MODEL(cpu_id) >= 0xf) + init_via(); } Modified: projects/jbuild/sys/amd64/amd64/io_apic.c ============================================================================== --- projects/jbuild/sys/amd64/amd64/io_apic.c Sat Feb 28 17:58:53 2009 (r189187) +++ projects/jbuild/sys/amd64/amd64/io_apic.c Sat Feb 28 17:59:02 2009 (r189188) @@ -327,39 +327,56 @@ ioapic_assign_cpu(struct intsrc *isrc, u { struct ioapic_intsrc *intpin = (struct ioapic_intsrc *)isrc; struct ioapic *io = (struct ioapic *)isrc->is_pic; + u_int old_vector; + u_int old_id; + /* + * keep 1st core as the destination for NMI + */ + if (intpin->io_irq == IRQ_NMI) + apic_id = 0; + + /* + * Set us up to free the old irq. + */ + old_vector = intpin->io_vector; + old_id = intpin->io_cpu; + if (old_vector && apic_id == old_id) + return; + + /* + * Allocate an APIC vector for this interrupt pin. Once + * we have a vector we program the interrupt pin. + */ intpin->io_cpu = apic_id; + intpin->io_vector = apic_alloc_vector(apic_id, intpin->io_irq); if (bootverbose) { - printf("ioapic%u: Assigning ", io->io_id); + printf("ioapic%u: routing intpin %u (", io->io_id, + intpin->io_intpin); ioapic_print_irq(intpin); - printf(" to local APIC %u\n", intpin->io_cpu); + printf(") to lapic %u vector %u\n", intpin->io_cpu, + intpin->io_vector); } ioapic_program_intpin(intpin); + /* + * Free the old vector after the new one is established. This is done + * to prevent races where we could miss an interrupt. + */ + if (old_vector) + apic_free_vector(old_id, old_vector, intpin->io_irq); } static void ioapic_enable_intr(struct intsrc *isrc) { struct ioapic_intsrc *intpin = (struct ioapic_intsrc *)isrc; - struct ioapic *io = (struct ioapic *)isrc->is_pic; - if (intpin->io_vector == 0) { - /* - * Allocate an APIC vector for this interrupt pin. Once - * we have a vector we program the interrupt pin. - */ - intpin->io_vector = apic_alloc_vector(intpin->io_irq); - if (bootverbose) { - printf("ioapic%u: routing intpin %u (", io->io_id, - intpin->io_intpin); - ioapic_print_irq(intpin); - printf(") to vector %u\n", intpin->io_vector); - } - ioapic_program_intpin(intpin); - apic_enable_vector(intpin->io_vector); - } + if (intpin->io_vector == 0) + ioapic_assign_cpu(isrc, pcpu_find(0)->pc_apic_id); + apic_enable_vector(intpin->io_cpu, intpin->io_vector); } + static void ioapic_disable_intr(struct intsrc *isrc) { @@ -369,11 +386,11 @@ ioapic_disable_intr(struct intsrc *isrc) if (intpin->io_vector != 0) { /* Mask this interrupt pin and free its APIC vector. */ vector = intpin->io_vector; - apic_disable_vector(vector); + apic_disable_vector(intpin->io_cpu, vector); intpin->io_masked = 1; intpin->io_vector = 0; ioapic_program_intpin(intpin); - apic_free_vector(vector, intpin->io_irq); + apic_free_vector(intpin->io_cpu, vector, intpin->io_irq); } } Modified: projects/jbuild/sys/amd64/amd64/local_apic.c ============================================================================== --- projects/jbuild/sys/amd64/amd64/local_apic.c Sat Feb 28 17:58:53 2009 (r189187) +++ projects/jbuild/sys/amd64/amd64/local_apic.c Sat Feb 28 17:59:02 2009 (r189188) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -109,6 +111,8 @@ struct lapic { u_long la_hard_ticks; u_long la_stat_ticks; u_long la_prof_ticks; + /* Include IDT_SYSCALL to make indexing easier. */ + u_int la_ioint_irqs[APIC_NUM_IOINTS + 1]; } static lapics[MAX_APIC_ID + 1]; /* XXX: should thermal be an NMI? */ @@ -134,8 +138,6 @@ static inthand_t *ioint_handlers[] = { IDTVEC(apic_isr7), /* 224 - 255 */ }; -/* Include IDT_SYSCALL to make indexing easier. */ -static u_int ioint_irqs[APIC_NUM_IOINTS + 1]; static u_int32_t lapic_timer_divisors[] = { APIC_TDCR_1, APIC_TDCR_2, APIC_TDCR_4, APIC_TDCR_8, APIC_TDCR_16, @@ -215,14 +217,12 @@ lapic_init(vm_paddr_t addr) /* Perform basic initialization of the BSP's local APIC. */ lapic_enable(); - ioint_irqs[IDT_SYSCALL - APIC_IO_INTS] = IRQ_SYSCALL; /* Set BSP's per-CPU local APIC ID. */ PCPU_SET(apic_id, lapic_id()); /* Local APIC timer interrupt. */ setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYSIGT, SEL_KPL, 0); - ioint_irqs[APIC_TIMER_INT - APIC_IO_INTS] = IRQ_TIMER; /* XXX: error/thermal interrupts */ } @@ -254,6 +254,9 @@ lapic_create(u_int apic_id, int boot_cpu lapics[apic_id].la_lvts[i] = lvts[i]; lapics[apic_id].la_lvts[i].lvt_active = 0; } + lapics[apic_id].la_ioint_irqs[IDT_SYSCALL - APIC_IO_INTS] = IRQ_SYSCALL; + lapics[apic_id].la_ioint_irqs[APIC_TIMER_INT - APIC_IO_INTS] = + IRQ_TIMER; #ifdef SMP cpu_add(apic_id, boot_cpu); @@ -664,7 +667,8 @@ lapic_handle_intr(int vector, struct tra if (vector == -1) panic("Couldn't get vector from ISR!"); - isrc = intr_lookup_source(apic_idt_to_irq(vector)); + isrc = intr_lookup_source(apic_idt_to_irq(PCPU_GET(apic_id), + vector)); intr_execute_handlers(isrc, frame); } @@ -779,9 +783,19 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +u_int +apic_cpuid(u_int apic_id) +{ +#ifdef SMP + return apic_cpuids[apic_id]; +#else + return 0; +#endif +} + /* Request a free IDT vector to be used by the specified IRQ. */ u_int -apic_alloc_vector(u_int irq) +apic_alloc_vector(u_int apic_id, u_int irq) { u_int vector; @@ -793,9 +807,9 @@ apic_alloc_vector(u_int irq) */ mtx_lock_spin(&icu_lock); for (vector = 0; vector < APIC_NUM_IOINTS; vector++) { - if (ioint_irqs[vector] != 0) + if (lapics[apic_id].la_ioint_irqs[vector] != 0) continue; - ioint_irqs[vector] = irq; + lapics[apic_id].la_ioint_irqs[vector] = irq; mtx_unlock_spin(&icu_lock); return (vector + APIC_IO_INTS); } @@ -810,7 +824,7 @@ apic_alloc_vector(u_int irq) * satisfied, 0 is returned. */ u_int -apic_alloc_vectors(u_int *irqs, u_int count, u_int align) +apic_alloc_vectors(u_int apic_id, u_int *irqs, u_int count, u_int align) { u_int first, run, vector; @@ -833,7 +847,7 @@ apic_alloc_vectors(u_int *irqs, u_int co for (vector = 0; vector < APIC_NUM_IOINTS; vector++) { /* Vector is in use, end run. */ - if (ioint_irqs[vector] != 0) { + if (lapics[apic_id].la_ioint_irqs[vector] != 0) { run = 0; first = 0; continue; @@ -853,7 +867,8 @@ apic_alloc_vectors(u_int *irqs, u_int co /* Found a run, assign IRQs and return the first vector. */ for (vector = 0; vector < count; vector++) - ioint_irqs[first + vector] = irqs[vector]; + lapics[apic_id].la_ioint_irqs[first + vector] = + irqs[vector]; mtx_unlock_spin(&icu_lock); return (first + APIC_IO_INTS); } @@ -862,8 +877,14 @@ apic_alloc_vectors(u_int *irqs, u_int co return (0); } +/* + * Enable a vector for a particular apic_id. Since all lapics share idt + * entries and ioint_handlers this enables the vector on all lapics. lapics + * which do not have the vector configured would report spurious interrupts + * should it fire. + */ void -apic_enable_vector(u_int vector) +apic_enable_vector(u_int apic_id, u_int vector) { KASSERT(vector != IDT_SYSCALL, ("Attempt to overwrite syscall entry")); @@ -873,38 +894,61 @@ apic_enable_vector(u_int vector) } void -apic_disable_vector(u_int vector) +apic_disable_vector(u_int apic_id, u_int vector) { KASSERT(vector != IDT_SYSCALL, ("Attempt to overwrite syscall entry")); KASSERT(ioint_handlers[vector / 32] != NULL, ("No ISR handler for vector %u", vector)); +#ifdef notyet + /* + * We can not currently clear the idt entry because other cpus + * may have a valid vector at this offset. + */ setidt(vector, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); +#endif } /* Release an APIC vector when it's no longer in use. */ void -apic_free_vector(u_int vector, u_int irq) +apic_free_vector(u_int apic_id, u_int vector, u_int irq) { + struct thread *td; KASSERT(vector >= APIC_IO_INTS && vector != IDT_SYSCALL && vector <= APIC_IO_INTS + APIC_NUM_IOINTS, ("Vector %u does not map to an IRQ line", vector)); KASSERT(irq < NUM_IO_INTS, ("Invalid IRQ %u", irq)); - KASSERT(ioint_irqs[vector - APIC_IO_INTS] == irq, ("IRQ mismatch")); + KASSERT(lapics[apic_id].la_ioint_irqs[vector - APIC_IO_INTS] == + irq, ("IRQ mismatch")); + + /* + * Bind us to the cpu that owned the vector before freeing it so + * we don't lose an interrupt delivery race. + */ + td = curthread; + thread_lock(td); + if (sched_is_bound(td)) + panic("apic_free_vector: Thread already bound.\n"); + sched_bind(td, apic_cpuid(apic_id)); + thread_unlock(td); mtx_lock_spin(&icu_lock); - ioint_irqs[vector - APIC_IO_INTS] = 0; + lapics[apic_id].la_ioint_irqs[vector - APIC_IO_INTS] = 0; mtx_unlock_spin(&icu_lock); + thread_lock(td); + sched_unbind(td); + thread_unlock(td); + } /* Map an IDT vector (APIC) to an IRQ (interrupt source). */ u_int -apic_idt_to_irq(u_int vector) +apic_idt_to_irq(u_int apic_id, u_int vector) { KASSERT(vector >= APIC_IO_INTS && vector != IDT_SYSCALL && vector <= APIC_IO_INTS + APIC_NUM_IOINTS, ("Vector %u does not map to an IRQ line", vector)); - return (ioint_irqs[vector - APIC_IO_INTS]); + return (lapics[apic_id].la_ioint_irqs[vector - APIC_IO_INTS]); } #ifdef DDB @@ -915,6 +959,7 @@ DB_SHOW_COMMAND(apic, db_show_apic) { struct intsrc *isrc; int i, verbose; + u_int apic_id; u_int irq; if (strcmp(modif, "vv") == 0) @@ -923,9 +968,14 @@ DB_SHOW_COMMAND(apic, db_show_apic) verbose = 1; else verbose = 0; - for (i = 0; i < APIC_NUM_IOINTS + 1 && !db_pager_quit; i++) { - irq = ioint_irqs[i]; - if (irq != 0 && irq != IRQ_SYSCALL) { + for (apic_id = 0; apic_id <= MAX_APIC_ID; apic_id++) { + if (lapics[apic_id].la_present == 0) + continue; + db_printf("Interrupts bound to lapic %u\n", apic_id); + for (i = 0; i < APIC_NUM_IOINTS + 1 && !db_pager_quit; i++) { + irq = lapics[apic_id].la_ioint_irqs[i]; + if (irq == 0 || irq == IRQ_SYSCALL) + continue; db_printf("vec 0x%2x -> ", i + APIC_IO_INTS); if (irq == IRQ_TIMER) db_printf("lapic timer\n"); Modified: projects/jbuild/sys/amd64/amd64/machdep.c ============================================================================== --- projects/jbuild/sys/amd64/amd64/machdep.c Sat Feb 28 17:58:53 2009 (r189187) +++ projects/jbuild/sys/amd64/amd64/machdep.c Sat Feb 28 17:59:02 2009 (r189188) @@ -809,6 +809,9 @@ struct gate_descriptor *idt = &idt0[0]; static char dblfault_stack[PAGE_SIZE] __aligned(16); +static char nmi0_stack[PAGE_SIZE] __aligned(16); +CTASSERT(sizeof(struct nmi_pcpu) == 16); + struct amd64tss common_tss[MAXCPU]; /* software prototypes -- in more palatable form */ @@ -1291,6 +1294,7 @@ hammer_time(u_int64_t modulep, u_int64_t caddr_t kmdp; int gsel_tss, x; struct pcpu *pc; + struct nmi_pcpu *np; u_int64_t msr; char *env; @@ -1365,7 +1369,7 @@ hammer_time(u_int64_t modulep, u_int64_t setidt(x, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); setidt(IDT_DE, &IDTVEC(div), SDT_SYSIGT, SEL_KPL, 0); setidt(IDT_DB, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL, 0); - setidt(IDT_NMI, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 1); + setidt(IDT_NMI, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 2); setidt(IDT_BP, &IDTVEC(bpt), SDT_SYSIGT, SEL_UPL, 0); setidt(IDT_OF, &IDTVEC(ofl), SDT_SYSIGT, SEL_KPL, 0); setidt(IDT_BR, &IDTVEC(bnd), SDT_SYSIGT, SEL_KPL, 0); @@ -1438,6 +1442,14 @@ hammer_time(u_int64_t modulep, u_int64_t /* doublefault stack space, runs on ist1 */ common_tss[0].tss_ist1 = (long)&dblfault_stack[sizeof(dblfault_stack)]; + /* + * NMI stack, runs on ist2. The pcpu pointer is stored just + * above the start of the ist2 stack. + */ + np = ((struct nmi_pcpu *) &nmi0_stack[sizeof(nmi0_stack)]) - 1; + np->np_pcpu = (register_t) pc; + common_tss[0].tss_ist2 = (long) np; + /* Set the IO permission bitmap (empty due to tss seg limit) */ common_tss[0].tss_iobase = sizeof(struct amd64tss); Modified: projects/jbuild/sys/amd64/amd64/mp_machdep.c ============================================================================== --- projects/jbuild/sys/amd64/amd64/mp_machdep.c Sat Feb 28 17:58:53 2009 (r189187) +++ projects/jbuild/sys/amd64/amd64/mp_machdep.c Sat Feb 28 17:59:02 2009 (r189188) @@ -92,6 +92,7 @@ void *bootstacks[MAXCPU]; /* Temporary holder for double fault stack */ char *doublefault_stack; +char *nmi_stack; /* Hotwire a 0->4MB V==P mapping */ extern pt_entry_t *KPTphys; @@ -150,8 +151,10 @@ struct cpu_info { int cpu_present:1; int cpu_bsp:1; int cpu_disabled:1; + int cpu_hyperthread:1; } static cpu_info[MAX_APIC_ID + 1]; int cpu_apic_ids[MAXCPU]; +int apic_cpuids[MAX_APIC_ID + 1]; /* Holds pending bitmap based IPIs per CPU */ static volatile u_int cpu_ipi_pending[MAXCPU]; @@ -349,11 +352,7 @@ cpu_mp_start(void) KASSERT(boot_cpu_id == PCPU_GET(apic_id), ("BSP's APIC ID doesn't match boot_cpu_id")); cpu_apic_ids[0] = boot_cpu_id; - - assign_cpu_ids(); - - /* Start each Application Processor */ - start_all_aps(); + apic_cpuids[boot_cpu_id] = 0; /* Setup the initial logical CPUs info. */ logical_cpus = logical_cpus_mask = 0; @@ -401,6 +400,11 @@ cpu_mp_start(void) hyperthreading_cpus = logical_cpus; } + assign_cpu_ids(); + + /* Start each Application Processor */ + start_all_aps(); + set_interrupt_apic_ids(); } @@ -412,18 +416,26 @@ void cpu_mp_announce(void) { int i, x; + const char *hyperthread; /* List CPUs */ printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id); for (i = 1, x = 0; x <= MAX_APIC_ID; x++) { if (!cpu_info[x].cpu_present || cpu_info[x].cpu_bsp) continue; + if (cpu_info[x].cpu_hyperthread) { + hyperthread = "/HT"; + } else { + hyperthread = ""; + } if (cpu_info[x].cpu_disabled) - printf(" cpu (AP): APIC ID: %2d (disabled)\n", x); + printf(" cpu (AP%s): APIC ID: %2d (disabled)\n", + hyperthread, x); else { KASSERT(i < mp_ncpus, ("mp_ncpus and actual cpus are out of whack")); - printf(" cpu%d (AP): APIC ID: %2d\n", i++, x); + printf(" cpu%d (AP%s): APIC ID: %2d\n", i++, + hyperthread, x); } } } @@ -435,6 +447,7 @@ void init_secondary(void) { struct pcpu *pc; + struct nmi_pcpu *np; u_int64_t msr, cr0; int cpu, gsel_tss, x; struct region_descriptor ap_gdt; @@ -448,6 +461,10 @@ init_secondary(void) common_tss[cpu].tss_iobase = sizeof(struct amd64tss); common_tss[cpu].tss_ist1 = (long)&doublefault_stack[PAGE_SIZE]; + /* The NMI stack runs on IST2. */ + np = ((struct nmi_pcpu *) &nmi_stack[PAGE_SIZE]) - 1; + common_tss[cpu].tss_ist2 = (long) np; + /* Prepare private GDT */ gdt_segs[GPROC0_SEL].ssd_base = (long) &common_tss[cpu]; ssdtosyssd(&gdt_segs[GPROC0_SEL], @@ -472,6 +489,9 @@ init_secondary(void) pc->pc_rsp0 = 0; pc->pc_gs32p = &gdt[NGDT * cpu + GUGS32_SEL]; + /* Save the per-cpu pointer for use by the NMI handler. */ + np->np_pcpu = (register_t) pc; + wrmsr(MSR_FSBASE, 0); /* User value */ wrmsr(MSR_GSBASE, (u_int64_t)pc); wrmsr(MSR_KGSBASE, (u_int64_t)pc); /* XXX User value while we're in the kernel */ @@ -631,11 +651,28 @@ assign_cpu_ids(void) { u_int i; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:59:30 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18FAE106567A; Sat, 28 Feb 2009 17:59:30 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF3098FC16; Sat, 28 Feb 2009 17:59:29 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHxTFF017501; Sat, 28 Feb 2009 17:59:29 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHxTJP017500; Sat, 28 Feb 2009 17:59:29 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281759.n1SHxTJP017500@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189189 - in projects/jbuild/sys/legacy: . dev/usb X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:59:31 -0000 Author: jb Date: Sat Feb 28 17:59:29 2009 New Revision: 189189 URL: http://svn.freebsd.org/changeset/base/189189 Log: MFC Added: projects/jbuild/sys/legacy/ - copied from r189173, head/sys/legacy/ Modified: projects/jbuild/sys/legacy/dev/usb/ (props changed) From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 17:59:42 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72E87106566C; Sat, 28 Feb 2009 17:59:42 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EB428FC13; Sat, 28 Feb 2009 17:59:42 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SHxg2m017565; Sat, 28 Feb 2009 17:59:42 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SHxf3p017543; Sat, 28 Feb 2009 17:59:41 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281759.n1SHxf3p017543@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 17:59:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189190 - in projects/jbuild/sys/arm: arm at91 conf include mv mv/discovery mv/kirkwood mv/orion sa11x0 xscale/i8134x xscale/ixp425 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 17:59:42 -0000 Author: jb Date: Sat Feb 28 17:59:41 2009 New Revision: 189190 URL: http://svn.freebsd.org/changeset/base/189190 Log: MFC Added: projects/jbuild/sys/arm/arm/cpufunc_asm_sheeva.S - copied unchanged from r189173, head/sys/arm/arm/cpufunc_asm_sheeva.S Deleted: projects/jbuild/sys/arm/arm/cpufunc_asm_feroceon.S Modified: projects/jbuild/sys/arm/arm/busdma_machdep.c projects/jbuild/sys/arm/arm/cpufunc.c projects/jbuild/sys/arm/arm/dump_machdep.c projects/jbuild/sys/arm/arm/elf_trampoline.c projects/jbuild/sys/arm/arm/genassym.c projects/jbuild/sys/arm/arm/machdep.c projects/jbuild/sys/arm/arm/pmap.c projects/jbuild/sys/arm/arm/swtch.S projects/jbuild/sys/arm/arm/vm_machdep.c projects/jbuild/sys/arm/at91/at91.c projects/jbuild/sys/arm/at91/at91_mci.c projects/jbuild/sys/arm/at91/at91_twi.c projects/jbuild/sys/arm/at91/at91_twireg.h projects/jbuild/sys/arm/at91/at91var.h projects/jbuild/sys/arm/at91/files.at91 projects/jbuild/sys/arm/at91/uart_bus_at91usart.c projects/jbuild/sys/arm/at91/uart_cpu_at91rm9200usart.c projects/jbuild/sys/arm/at91/uart_dev_at91usart.c projects/jbuild/sys/arm/conf/AVILA projects/jbuild/sys/arm/conf/AVILA.hints projects/jbuild/sys/arm/conf/BWCT projects/jbuild/sys/arm/conf/CAMBRIA projects/jbuild/sys/arm/conf/HL200 projects/jbuild/sys/arm/conf/KB920X projects/jbuild/sys/arm/conf/NSLU projects/jbuild/sys/arm/include/atomic.h projects/jbuild/sys/arm/include/cpufunc.h projects/jbuild/sys/arm/include/proc.h projects/jbuild/sys/arm/include/sysarch.h projects/jbuild/sys/arm/include/vmparam.h projects/jbuild/sys/arm/mv/common.c projects/jbuild/sys/arm/mv/discovery/db78xxx.c projects/jbuild/sys/arm/mv/discovery/discovery.c projects/jbuild/sys/arm/mv/files.mv projects/jbuild/sys/arm/mv/gpio.c projects/jbuild/sys/arm/mv/kirkwood/db88f6xxx.c projects/jbuild/sys/arm/mv/kirkwood/kirkwood.c projects/jbuild/sys/arm/mv/mv_machdep.c projects/jbuild/sys/arm/mv/mv_pci.c projects/jbuild/sys/arm/mv/mvreg.h projects/jbuild/sys/arm/mv/mvvar.h projects/jbuild/sys/arm/mv/obio.c projects/jbuild/sys/arm/mv/orion/db88f5xxx.c projects/jbuild/sys/arm/mv/orion/orion.c projects/jbuild/sys/arm/sa11x0/assabet_machdep.c projects/jbuild/sys/arm/xscale/i8134x/i81342_mcu.c projects/jbuild/sys/arm/xscale/ixp425/avila_machdep.c projects/jbuild/sys/arm/xscale/ixp425/files.ixp425 projects/jbuild/sys/arm/xscale/ixp425/ixp425.c projects/jbuild/sys/arm/xscale/ixp425/ixp425reg.h Modified: projects/jbuild/sys/arm/arm/busdma_machdep.c ============================================================================== --- projects/jbuild/sys/arm/arm/busdma_machdep.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/arm/busdma_machdep.c Sat Feb 28 17:59:41 2009 (r189190) @@ -112,6 +112,7 @@ struct bounce_zone { int active_bpages; int total_bounced; int total_deferred; + int map_count; bus_size_t alignment; bus_size_t boundary; bus_addr_t lowaddr; @@ -523,7 +524,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in */ maxpages = MAX_BPAGES; if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 - || (dmat->map_count > 0 && bz->total_bpages < maxpages)) { + || (bz->map_count > 0 && bz->total_bpages < maxpages)) { int pages; pages = MAX(atop(dmat->maxsize), 1); @@ -539,6 +540,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, in error = 0; } } + bz->map_count++; } CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, error); @@ -560,6 +562,8 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, b __func__, dmat, EBUSY); return (EBUSY); } + if (dmat->bounce_zone) + dmat->bounce_zone->map_count--; dmat->map_count--; CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat); return (0); @@ -1144,6 +1148,7 @@ _bus_dmamap_sync_bp(bus_dma_tag_t dmat, cpu_l2cache_wb_range(bpage->vaddr, bpage->datacount); } + dmat->bounce_zone->total_bounced++; } if (op & BUS_DMASYNC_POSTREAD) { if (bpage->vaddr_nocache == 0) { @@ -1155,6 +1160,7 @@ _bus_dmamap_sync_bp(bus_dma_tag_t dmat, bcopy((void *)(bpage->vaddr_nocache != 0 ? bpage->vaddr_nocache : bpage->vaddr), (void *)bpage->datavaddr, bpage->datacount); + dmat->bounce_zone->total_bounced++; } } } @@ -1166,7 +1172,7 @@ _bus_dma_buf_is_in_bp(bus_dmamap_t map, STAILQ_FOREACH(bpage, &map->bpages, links) { if ((vm_offset_t)buf >= bpage->datavaddr && - (vm_offset_t)buf + len < bpage->datavaddr + + (vm_offset_t)buf + len <= bpage->datavaddr + bpage->datacount) return (1); } @@ -1275,6 +1281,7 @@ alloc_bounce_zone(bus_dma_tag_t dmat) bz->lowaddr = dmat->lowaddr; bz->alignment = dmat->alignment; bz->boundary = dmat->boundary; + bz->map_count = 0; snprintf(bz->zoneid, 8, "zone%d", busdma_zonecount); busdma_zonecount++; snprintf(bz->lowaddrid, 18, "%#jx", (uintmax_t)bz->lowaddr); @@ -1415,6 +1422,13 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ bz->active_bpages++; mtx_unlock(&bounce_lock); + if (dmat->flags & BUS_DMA_KEEP_PG_OFFSET) { + /* page offset needs to be preserved */ + bpage->vaddr &= ~PAGE_MASK; + bpage->busaddr &= ~PAGE_MASK; + bpage->vaddr |= vaddr & PAGE_MASK; + bpage->busaddr |= vaddr & PAGE_MASK; + } bpage->datavaddr = vaddr; bpage->datacount = size; STAILQ_INSERT_TAIL(&(map->bpages), bpage, links); Modified: projects/jbuild/sys/arm/arm/cpufunc.c ============================================================================== --- projects/jbuild/sys/arm/arm/cpufunc.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/arm/cpufunc.c Sat Feb 28 17:59:41 2009 (r189190) @@ -358,7 +358,7 @@ struct cpu_functions armv5_ec_cpufuncs = }; -struct cpu_functions feroceon_cpufuncs = { +struct cpu_functions sheeva_cpufuncs = { /* CPU functions */ cpufunc_id, /* id */ @@ -368,7 +368,7 @@ struct cpu_functions feroceon_cpufuncs = cpufunc_control, /* control */ cpufunc_domains, /* Domain */ - feroceon_setttb, /* Setttb */ + sheeva_setttb, /* Setttb */ cpufunc_faultstatus, /* Faultstatus */ cpufunc_faultaddress, /* Faultaddress */ @@ -387,17 +387,17 @@ struct cpu_functions feroceon_cpufuncs = armv5_ec_icache_sync_range, /* icache_sync_range */ armv5_ec_dcache_wbinv_all, /* dcache_wbinv_all */ - feroceon_dcache_wbinv_range, /* dcache_wbinv_range */ - feroceon_dcache_inv_range, /* dcache_inv_range */ - feroceon_dcache_wb_range, /* dcache_wb_range */ + sheeva_dcache_wbinv_range, /* dcache_wbinv_range */ + sheeva_dcache_inv_range, /* dcache_inv_range */ + sheeva_dcache_wb_range, /* dcache_wb_range */ armv5_ec_idcache_wbinv_all, /* idcache_wbinv_all */ - feroceon_idcache_wbinv_range, /* idcache_wbinv_all */ + sheeva_idcache_wbinv_range, /* idcache_wbinv_all */ - feroceon_l2cache_wbinv_all, /* l2cache_wbinv_all */ - feroceon_l2cache_wbinv_range, /* l2cache_wbinv_range */ - feroceon_l2cache_inv_range, /* l2cache_inv_range */ - feroceon_l2cache_wb_range, /* l2cache_wb_range */ + sheeva_l2cache_wbinv_all, /* l2cache_wbinv_all */ + sheeva_l2cache_wbinv_range, /* l2cache_wbinv_range */ + sheeva_l2cache_inv_range, /* l2cache_inv_range */ + sheeva_l2cache_wb_range, /* l2cache_wb_range */ /* Other functions */ @@ -1000,7 +1000,7 @@ set_cpufuncs() cputype == CPU_ID_MV88FR571_VD || cputype == CPU_ID_MV88FR571_41) { - cpufuncs = feroceon_cpufuncs; + cpufuncs = sheeva_cpufuncs; /* * Workaround for Marvell MV78100 CPU: Cache prefetch * mechanism may affect the cache coherency validity, @@ -1011,12 +1011,12 @@ set_cpufuncs() */ if (cputype == CPU_ID_MV88FR571_VD || cputype == CPU_ID_MV88FR571_41) { - feroceon_control_ext(0xffffffff, + sheeva_control_ext(0xffffffff, FC_DCACHE_STREAM_EN | FC_WR_ALLOC_EN | FC_BRANCH_TARG_BUF_DIS | FC_L2CACHE_EN | FC_L2_PREF_DIS); } else { - feroceon_control_ext(0xffffffff, + sheeva_control_ext(0xffffffff, FC_DCACHE_STREAM_EN | FC_WR_ALLOC_EN | FC_BRANCH_TARG_BUF_DIS | FC_L2CACHE_EN); } Copied: projects/jbuild/sys/arm/arm/cpufunc_asm_sheeva.S (from r189173, head/sys/arm/arm/cpufunc_asm_sheeva.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/jbuild/sys/arm/arm/cpufunc_asm_sheeva.S Sat Feb 28 17:59:41 2009 (r189190, copy of r189173, head/sys/arm/arm/cpufunc_asm_sheeva.S) @@ -0,0 +1,386 @@ +/*- + * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. + * All rights reserved. + * + * Developed by Semihalf. + * + * 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. + * 3. Neither the name of MARVELL nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR 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 AUTHOR 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 +__FBSDID("$FreeBSD$"); + +#include + +.Lsheeva_cache_line_size: + .word _C_LABEL(arm_pdcache_line_size) +.Lsheeva_asm_page_mask: + .word _C_LABEL(PAGE_MASK) + +ENTRY(sheeva_setttb) + /* Disable irqs */ + mrs r2, cpsr + orr r3, r2, #I32_bit | F32_bit + msr cpsr_c, r3 + + mov r1, #0 + mcr p15, 0, r1, c7, c5, 0 /* Invalidate ICache */ +1: mrc p15, 0, r15, c7, c14, 3 /* Test, clean and invalidate DCache */ + bne 1b /* More to do? */ + + mcr p15, 1, r1, c15, c9, 0 /* Clean L2 */ + mcr p15, 1, r1, c15, c11, 0 /* Invalidate L2 */ + + /* Reenable irqs */ + msr cpsr_c, r2 + + mcr p15, 0, r1, c7, c10, 4 /* drain the write buffer */ + + mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ + + mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ + RET + +ENTRY(sheeva_dcache_wbinv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 5, r0, c15, c15, 0 /* Clean and inv zone start address */ + mcr p15, 5, r2, c15, c15, 1 /* Clean and inv zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_idcache_wbinv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 5, r0, c15, c15, 0 /* Clean and inv zone start address */ + mcr p15, 5, r2, c15, c15, 1 /* Clean and inv zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + /* Invalidate and clean icache line by line */ + ldr r3, .Lsheeva_cache_line_size + ldr r3, [r3] +2: + mcr p15, 0, r0, c7, c5, 1 + add r0, r0, r3 + cmp r2, r0 + bhi 2b + + add r0, r2, #1 + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_dcache_inv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 5, r0, c15, c14, 0 /* Inv zone start address */ + mcr p15, 5, r2, c15, c14, 1 /* Inv zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_dcache_wb_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 5, r0, c15, c13, 0 /* Clean zone start address */ + mcr p15, 5, r2, c15, c13, 1 /* Clean zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_l2cache_wbinv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 1, r0, c15, c9, 4 /* Clean L2 zone start address */ + mcr p15, 1, r2, c15, c9, 5 /* Clean L2 zone end address */ + mcr p15, 1, r0, c15, c11, 4 /* Inv L2 zone start address */ + mcr p15, 1, r2, c15, c11, 5 /* Inv L2 zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_l2cache_inv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 1, r0, c15, c11, 4 /* Inv L2 zone start address */ + mcr p15, 1, r2, c15, c11, 5 /* Inv L2 zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_l2cache_wb_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 1, r0, c15, c9, 4 /* Clean L2 zone start address */ + mcr p15, 1, r2, c15, c9, 5 /* Clean L2 zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_l2cache_wbinv_all) + mov r0, #0 + mcr p15, 1, r0, c15, c9, 0 /* Clean L2 */ + mcr p15, 1, r0, c15, c11, 0 /* Invalidate L2 */ + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + RET + +ENTRY(sheeva_control_ext) + mrc p15, 1, r3, c15, c1, 0 /* Read the control register */ + bic r2, r3, r0 /* Clear bits */ + eor r2, r2, r1 /* XOR bits */ + + teq r2, r3 /* Only write if there is a change */ + mcrne p15, 1, r2, c15, c1, 0 /* Write new control register */ + mov r0, r3 /* Return old value */ + RET Modified: projects/jbuild/sys/arm/arm/dump_machdep.c ============================================================================== --- projects/jbuild/sys/arm/arm/dump_machdep.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/arm/dump_machdep.c Sat Feb 28 17:59:41 2009 (r189190) @@ -158,14 +158,12 @@ cb_dumpdata(struct md_pa *mdp, int seqnr { struct dumperinfo *di = (struct dumperinfo*)arg; vm_paddr_t pa; - vm_offset_t va; uint32_t pgs; size_t counter, sz, chunk; int c, error; error = 0; /* catch case in which chunk size is 0 */ counter = 0; - va = 0; pgs = mdp->md_size / PAGE_SIZE; pa = mdp->md_start; Modified: projects/jbuild/sys/arm/arm/elf_trampoline.c ============================================================================== --- projects/jbuild/sys/arm/arm/elf_trampoline.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/arm/elf_trampoline.c Sat Feb 28 17:59:41 2009 (r189190) @@ -74,7 +74,7 @@ void __startC(void); #ifdef CPU_XSCALE_81342 #define cpu_l2cache_wbinv_all xscalec3_l2cache_purge #elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) -#define cpu_l2cache_wbinv_all feroceon_l2cache_wbinv_all +#define cpu_l2cache_wbinv_all sheeva_l2cache_wbinv_all #else #define cpu_l2cache_wbinv_all() #endif @@ -404,11 +404,11 @@ load_kernel(unsigned int kstart, unsigne int symtabindex = -1; int symstrindex = -1; vm_offset_t lastaddr = 0; - Elf_Addr ssym = 0, esym = 0; + Elf_Addr ssym = 0; Elf_Dyn *dp; eh = (Elf32_Ehdr *)kstart; - ssym = esym = 0; + ssym = 0; entry_point = (void*)eh->e_entry; memcpy(phdr, (void *)(kstart + eh->e_phoff ), eh->e_phnum * sizeof(phdr[0])); Modified: projects/jbuild/sys/arm/arm/genassym.c ============================================================================== --- projects/jbuild/sys/arm/arm/genassym.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/arm/genassym.c Sat Feb 28 17:59:41 2009 (r189190) @@ -96,6 +96,8 @@ ASSYM(TD_FRAME, offsetof(struct thread, ASSYM(TD_MD, offsetof(struct thread, td_md)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); ASSYM(MD_TP, offsetof(struct mdthread, md_tp)); +ASSYM(MD_RAS_START, offsetof(struct mdthread, md_ras_start)); +ASSYM(MD_RAS_END, offsetof(struct mdthread, md_ras_end)); ASSYM(TF_R0, offsetof(struct trapframe, tf_r0)); ASSYM(TF_R1, offsetof(struct trapframe, tf_r1)); Modified: projects/jbuild/sys/arm/arm/machdep.c ============================================================================== --- projects/jbuild/sys/arm/arm/machdep.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/arm/machdep.c Sat Feb 28 17:59:41 2009 (r189190) @@ -304,7 +304,6 @@ cpu_startup(void *dummy) USPACE_SVC_STACK_TOP; vector_page_setprot(VM_PROT_READ); pmap_set_pcb_pagedir(pmap_kernel(), pcb); - thread0.td_frame = (struct trapframe *)pcb->un_32.pcb32_sp - 1; pmap_postinit(); #ifdef ARM_CACHE_LOCK_ENABLE pmap_kenter_user(ARM_TP_ADDRESS, ARM_TP_ADDRESS); Modified: projects/jbuild/sys/arm/arm/pmap.c ============================================================================== --- projects/jbuild/sys/arm/arm/pmap.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/arm/pmap.c Sat Feb 28 17:59:41 2009 (r189190) @@ -3102,7 +3102,7 @@ void pmap_remove_all(vm_page_t m) { pv_entry_t pv; - pt_entry_t *ptep, pte; + pt_entry_t *ptep; struct l2_bucket *l2b; boolean_t flush = FALSE; pmap_t curpm; @@ -3130,7 +3130,6 @@ pmap_remove_all(vm_page_t m) l2b = pmap_get_l2_bucket(pv->pv_pmap, pv->pv_va); KASSERT(l2b != NULL, ("No l2 bucket")); ptep = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; - pte = *ptep; *ptep = 0; PTE_SYNC_CURRENT(pv->pv_pmap, ptep); pmap_free_l2_bucket(pv->pv_pmap, l2b, 1); Modified: projects/jbuild/sys/arm/arm/swtch.S ============================================================================== --- projects/jbuild/sys/arm/arm/swtch.S Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/arm/swtch.S Sat Feb 28 17:59:41 2009 (r189190) @@ -205,8 +205,12 @@ ENTRY(cpu_throw) /* Set the new tp */ ldr r6, [r5, #(TD_MD + MD_TP)] - ldr r5, =ARM_TP_ADDRESS - strt r6, [r5] + ldr r4, =ARM_TP_ADDRESS + str r6, [r4] + ldr r6, [r5, #(TD_MD + MD_RAS_START)] + str r6, [r4, #4] /* ARM_RAS_START */ + ldr r6, [r5, #(TD_MD + MD_RAS_END)] + str r6, [r4, #8] /* ARM_RAS_END */ /* Hook in a new pcb */ ldr r6, .Lcurpcb @@ -265,12 +269,20 @@ ENTRY(cpu_switch) */ /* Store the old tp */ ldr r3, =ARM_TP_ADDRESS - ldrt r9, [r3] + ldr r9, [r3] str r9, [r0, #(TD_MD + MD_TP)] + ldr r9, [r3, #4] + str r9, [r0, #(TD_MD + MD_RAS_START)] + ldr r9, [r3, #8] + str r9, [r0, #(TD_MD + MD_RAS_END)] /* Set the new tp */ ldr r9, [r1, #(TD_MD + MD_TP)] - strt r9, [r3] + str r9, [r3] + ldr r9, [r1, #(TD_MD + MD_RAS_START)] + str r9, [r3, #4] + ldr r9, [r1, #(TD_MD + MD_RAS_END)] + str r9, [r3, #8] /* Get the user structure for the new process in r9 */ ldr r9, [r1, #(TD_PCB)] Modified: projects/jbuild/sys/arm/arm/vm_machdep.c ============================================================================== --- projects/jbuild/sys/arm/arm/vm_machdep.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/arm/vm_machdep.c Sat Feb 28 17:59:41 2009 (r189190) @@ -108,14 +108,13 @@ void cpu_fork(register struct thread *td1, register struct proc *p2, struct thread *td2, int flags) { - struct pcb *pcb1, *pcb2; + struct pcb *pcb2; struct trapframe *tf; struct switchframe *sf; struct mdproc *mdp2; if ((flags & RFPROC) == 0) return; - pcb1 = td1->td_pcb; pcb2 = (struct pcb *)(td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; #ifdef __XSCALE__ #ifndef CPU_XSCALE_CORE3 Modified: projects/jbuild/sys/arm/at91/at91.c ============================================================================== --- projects/jbuild/sys/arm/at91/at91.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/at91/at91.c Sat Feb 28 17:59:41 2009 (r189190) @@ -50,6 +50,8 @@ static struct at91_softc *at91_softc; static void at91_eoi(void *); +uint32_t at91_master_clock = AT91C_MASTER_CLOCK; + static int at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) Modified: projects/jbuild/sys/arm/at91/at91_mci.c ============================================================================== --- projects/jbuild/sys/arm/at91/at91_mci.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/at91/at91_mci.c Sat Feb 28 17:59:41 2009 (r189190) @@ -67,6 +67,9 @@ __FBSDID("$FreeBSD$"); struct at91_mci_softc { void *intrhand; /* Interrupt handle */ device_t dev; + int sc_cap; +#define CAP_HAS_4WIRE 1 /* Has 4 wire bus */ +#define CAP_NEEDS_BOUNCE 2 /* broken hardware needing bounce */ int flags; #define CMD_STARTED 1 #define STOP_STARTED 2 @@ -77,7 +80,6 @@ struct at91_mci_softc { bus_dmamap_t map; int mapped; struct mmc_host host; - int wire4; int bus_busy; struct mmc_request *req; struct mmc_command *curcmd; @@ -167,6 +169,7 @@ at91_mci_attach(device_t dev) device_t child; sc->dev = dev; + sc->sc_cap = CAP_NEEDS_BOUNCE; err = at91_mci_activate(dev); if (err) goto out; @@ -199,9 +202,12 @@ at91_mci_attach(device_t dev) goto out; } sc->host.f_min = 375000; - sc->host.f_max = 30000000; + sc->host.f_max = at91_master_clock / 2; /* Typically 30MHz */ sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; - sc->host.caps = MMC_CAP_4_BIT_DATA; + if (sc->sc_cap & CAP_HAS_4WIRE) + sc->host.caps = MMC_CAP_4_BIT_DATA; + else + sc->host.caps = 0; child = device_add_child(dev, "mmc", 0); device_set_ivars(dev, &sc->host); err = bus_generic_attach(dev); @@ -274,7 +280,6 @@ at91_mci_getaddr(void *arg, bus_dma_segm static int at91_mci_update_ios(device_t brdev, device_t reqdev) { - uint32_t at91_master_clock = AT91C_MASTER_CLOCK; struct at91_mci_softc *sc; struct mmc_host *host; struct mmc_ios *ios; @@ -294,11 +299,12 @@ at91_mci_update_ios(device_t brdev, devi else clkdiv = (at91_master_clock / ios->clock) / 2; } - if (ios->bus_width == bus_width_4 && sc->wire4) + if (ios->bus_width == bus_width_4) WR4(sc, MCI_SDCR, RD4(sc, MCI_SDCR) | MCI_SDCR_SDCBUS); else WR4(sc, MCI_SDCR, RD4(sc, MCI_SDCR) & ~MCI_SDCR_SDCBUS); WR4(sc, MCI_MR, (RD4(sc, MCI_MR) & ~MCI_MR_CLKDIV) | clkdiv); + /* Do we need a settle time here? */ /* XXX We need to turn the device on/off here with a GPIO pin */ return (0); } @@ -311,7 +317,6 @@ at91_mci_start_cmd(struct at91_mci_softc int i; struct mmc_data *data; struct mmc_request *req; - size_t block_size = 1 << 9; // Fixed, per mmc/sd spec for 2GB cards void *vaddr; bus_addr_t paddr; @@ -353,19 +358,21 @@ at91_mci_start_cmd(struct at91_mci_softc // Set block size and turn on PDC mode for dma xfer and disable // PDC until we're ready. mr = RD4(sc, MCI_MR) & ~MCI_MR_BLKLEN; - WR4(sc, MCI_MR, mr | (block_size << 16) | MCI_MR_PDCMODE); + WR4(sc, MCI_MR, mr | (data->len << 16) | MCI_MR_PDCMODE); WR4(sc, PDC_PTCR, PDC_PTCR_RXTDIS | PDC_PTCR_TXTDIS); if (cmdr & MCI_CMDR_TRCMD_START) { if (cmdr & MCI_CMDR_TRDIR) vaddr = cmd->data->data; else { - if (data->len != BBSZ) - panic("Write multiblock write support"); - vaddr = sc->bounce_buffer; - src = (uint32_t *)cmd->data->data; - dst = (uint32_t *)vaddr; - for (i = 0; i < data->len / 4; i++) - dst[i] = bswap32(src[i]); + if (sc->sc_cap & CAP_NEEDS_BOUNCE) { + vaddr = sc->bounce_buffer; + src = (uint32_t *)cmd->data->data; + dst = (uint32_t *)vaddr; + for (i = 0; i < data->len / 4; i++) + dst[i] = bswap32(src[i]); + } + else + vaddr = cmd->data->data; } data->xfer_len = 0; if (bus_dmamap_load(sc->dmatag, sc->map, vaddr, data->len, @@ -496,10 +503,12 @@ at91_mci_read_done(struct at91_mci_softc bus_dmamap_sync(sc->dmatag, sc->map, BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->dmatag, sc->map); sc->mapped--; - walker = (uint32_t *)cmd->data->data; - len = cmd->data->len / 4; - for (i = 0; i < len; i++) - walker[i] = bswap32(walker[i]); + if (sc->sc_cap & CAP_NEEDS_BOUNCE) { + walker = (uint32_t *)cmd->data->data; + len = cmd->data->len / 4; + for (i = 0; i < len; i++) + walker[i] = bswap32(walker[i]); + } // Finish up the sequence... WR4(sc, MCI_IDR, MCI_SR_ENDRX); WR4(sc, MCI_IER, MCI_SR_RXBUFF); @@ -643,6 +652,9 @@ at91_mci_read_ivar(device_t bus, device_ case MMCBR_IVAR_VDD: *(int *)result = sc->host.ios.vdd; break; + case MMCBR_IVAR_CAPS: + *(int *)result = sc->host.caps; + break; case MMCBR_IVAR_MAX_DATA: *(int *)result = 1; break; @@ -683,6 +695,7 @@ at91_mci_write_ivar(device_t bus, device sc->host.ios.vdd = value; break; /* These are read-only */ + case MMCBR_IVAR_CAPS: case MMCBR_IVAR_HOST_OCR: case MMCBR_IVAR_F_MIN: case MMCBR_IVAR_F_MAX: Modified: projects/jbuild/sys/arm/at91/at91_twi.c ============================================================================== --- projects/jbuild/sys/arm/at91/at91_twi.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/at91/at91_twi.c Sat Feb 28 17:59:41 2009 (r189190) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -128,7 +129,7 @@ at91_twi_attach(device_t dev) AT91_TWI_LOCK_DESTROY(sc); goto out; } - sc->cwgr = TWI_CWGR_CKDIV(8 * AT91C_MASTER_CLOCK / TWI_FASTEST_CLOCK) | + sc->cwgr = TWI_CWGR_CKDIV(8 * at91_master_clock / TWI_FASTEST_CLOCK) | TWI_CWGR_CHDIV(TWI_CWGR_DIV(TWI_DEF_CLK)) | TWI_CWGR_CLDIV(TWI_CWGR_DIV(TWI_DEF_CLK)); WR4(sc, TWI_CR, TWI_CR_SWRST); Modified: projects/jbuild/sys/arm/at91/at91_twireg.h ============================================================================== --- projects/jbuild/sys/arm/at91/at91_twireg.h Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/at91/at91_twireg.h Sat Feb 28 17:59:41 2009 (r189190) @@ -63,7 +63,7 @@ #define TWI_CWGR_CKDIV(x) ((x) << 16) /* Clock Divider */ #define TWI_CWGR_CHDIV(x) ((x) << 8) /* Clock High Divider */ #define TWI_CWGR_CLDIV(x) ((x) << 0) /* Clock Low Divider */ -#define TWI_CWGR_DIV(rate) ((AT91C_MASTER_CLOCK /(4*(rate))) - 2) +#define TWI_CWGR_DIV(rate) ((at91_master_clock /(4*(rate))) - 2) /* TWI_SR */ /* TWI_IER */ Modified: projects/jbuild/sys/arm/at91/at91var.h ============================================================================== --- projects/jbuild/sys/arm/at91/at91var.h Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/at91/at91var.h Sat Feb 28 17:59:41 2009 (r189190) @@ -43,4 +43,6 @@ struct at91_ivar { struct resource_list resources; }; +extern uint32_t at91_master_clock; + #endif /* _AT91VAR_H_ */ Modified: projects/jbuild/sys/arm/at91/files.at91 ============================================================================== --- projects/jbuild/sys/arm/at91/files.at91 Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/at91/files.at91 Sat Feb 28 17:59:41 2009 (r189190) @@ -15,10 +15,10 @@ arm/at91/at91_tc.c optional at91_tc arm/at91/at91_twi.c optional at91_twi arm/at91/at91_udp.c optional at91_udp arm/at91/if_ate.c optional ate -arm/at91/ohci_atmelarm.c optional ohci arm/at91/uart_bus_at91usart.c optional uart arm/at91/uart_cpu_at91rm9200usart.c optional uart arm/at91/uart_dev_at91usart.c optional uart +dev/usb/controller/ohci_atmelarm.c optional ohci # # All the boards we support # Modified: projects/jbuild/sys/arm/at91/uart_bus_at91usart.c ============================================================================== --- projects/jbuild/sys/arm/at91/uart_bus_at91usart.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/at91/uart_bus_at91usart.c Sat Feb 28 17:59:41 2009 (r189190) @@ -38,13 +38,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include #include #include +#include #include "uart_if.h" @@ -103,6 +102,8 @@ usart_at91rm92_probe(device_t dev) break; } sc->sc_class = &at91_usart_class; + if (sc->sc_class->uc_rclk == 0) + sc->sc_class->uc_rclk = at91_master_clock; return (uart_bus_probe(dev, 0, 0, 0, device_get_unit(dev))); } Modified: projects/jbuild/sys/arm/at91/uart_cpu_at91rm9200usart.c ============================================================================== --- projects/jbuild/sys/arm/at91/uart_cpu_at91rm9200usart.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/at91/uart_cpu_at91rm9200usart.c Sat Feb 28 17:59:41 2009 (r189190) @@ -35,12 +35,16 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include +#include #include #include +#include bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; @@ -60,6 +64,8 @@ uart_cpu_getdev(int devtype, struct uart struct uart_class *class; class = &at91_usart_class; + if (class->uc_rclk == 0) + class->uc_rclk = at91_master_clock; di->ops = uart_getops(class); di->bas.chan = 0; di->bas.bst = &at91_bs_tag; Modified: projects/jbuild/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- projects/jbuild/sys/arm/at91/uart_dev_at91usart.c Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/at91/uart_dev_at91usart.c Sat Feb 28 17:59:41 2009 (r189190) @@ -45,10 +45,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "uart_if.h" -#define DEFAULT_RCLK AT91C_MASTER_CLOCK +#define DEFAULT_RCLK at91_master_clock #define USART_BUFFER_SIZE 128 /* @@ -684,6 +685,5 @@ struct uart_class at91_usart_class = { at91_usart_methods, sizeof(struct at91_usart_softc), .uc_ops = &at91_usart_ops, - .uc_range = 8, - .uc_rclk = DEFAULT_RCLK + .uc_range = 8 }; Modified: projects/jbuild/sys/arm/conf/AVILA ============================================================================== --- projects/jbuild/sys/arm/conf/AVILA Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/conf/AVILA Sat Feb 28 17:59:41 2009 (r189190) @@ -66,13 +66,15 @@ options BOOTP_COMPAT device pci device uart +device ixpwdog # watchdog timer +device cfi # flash support + # I2C Bus device iicbus device iicbb device iic device ixpiic # I2C bus glue -device ixpwdog # watchdog timer device ds1672 # DS1672 on I2C bus device ad7418 # AD7418 on I2C bus @@ -86,7 +88,7 @@ device npe # Network Processing Engine device npe_fw device firmware device qmgr # Q Manager (required by npe) -device miibus # NB: required by npe +device mii # NB: required by npe device ether device bpf @@ -131,7 +133,6 @@ device usb #options USB_DEBUG device ohci device ehci -device ugen #device umass #device scbus # SCSI bus (required for SCSI) #device da # Direct Access (disks) Modified: projects/jbuild/sys/arm/conf/AVILA.hints ============================================================================== --- projects/jbuild/sys/arm/conf/AVILA.hints Sat Feb 28 17:59:29 2009 (r189189) +++ projects/jbuild/sys/arm/conf/AVILA.hints Sat Feb 28 17:59:41 2009 (r189190) @@ -29,6 +29,10 @@ hint.npe.1.mac="C" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 18:00:55 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36BE91065670; Sat, 28 Feb 2009 18:00:55 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20B918FC18; Sat, 28 Feb 2009 18:00:55 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SI0txs017672; Sat, 28 Feb 2009 18:00:55 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SI0sMv017662; Sat, 28 Feb 2009 18:00:54 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281800.n1SI0sMv017662@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 18:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189191 - in projects/jbuild/sys: . boot boot/common boot/ficl/mips boot/forth boot/i386/btx/btx boot/i386/libi386 boot/i386/loader boot/i386/pxeldr boot/ia64/common boot/ia64/efi boot/... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 18:00:55 -0000 Author: jb Date: Sat Feb 28 18:00:53 2009 New Revision: 189191 URL: http://svn.freebsd.org/changeset/base/189191 Log: MFC Added: projects/jbuild/sys/boot/ficl/mips/ - copied from r189173, head/sys/boot/ficl/mips/ projects/jbuild/sys/bsm/audit_domain.h - copied unchanged from r189173, head/sys/bsm/audit_domain.h projects/jbuild/sys/bsm/audit_errno.h - copied unchanged from r189173, head/sys/bsm/audit_errno.h projects/jbuild/sys/bsm/audit_socket_type.h - copied unchanged from r189173, head/sys/bsm/audit_socket_type.h projects/jbuild/sys/geom/part/g_part_ebr.c - copied unchanged from r189173, head/sys/geom/part/g_part_ebr.c projects/jbuild/sys/libkern/memmove.c - copied unchanged from r189173, head/sys/libkern/memmove.c projects/jbuild/sys/mips/mips/elf64_machdep.c - copied unchanged from r189173, head/sys/mips/mips/elf64_machdep.c projects/jbuild/sys/modules/geom/geom_part/geom_part_ebr/ - copied from r189173, head/sys/modules/geom/geom_part/geom_part_ebr/ projects/jbuild/sys/modules/sound/driver/ai2s/ - copied from r189173, head/sys/modules/sound/driver/ai2s/ projects/jbuild/sys/modules/sound/driver/davbus/ - copied from r189173, head/sys/modules/sound/driver/davbus/ projects/jbuild/sys/net80211/ieee80211_tdma.c - copied unchanged from r189173, head/sys/net80211/ieee80211_tdma.c projects/jbuild/sys/net80211/ieee80211_tdma.h - copied unchanged from r189173, head/sys/net80211/ieee80211_tdma.h projects/jbuild/sys/netinet/libalias/alias_sctp.c - copied unchanged from r189173, head/sys/netinet/libalias/alias_sctp.c projects/jbuild/sys/netinet/libalias/alias_sctp.h - copied unchanged from r189173, head/sys/netinet/libalias/alias_sctp.h projects/jbuild/sys/pc98/cbus/sctermvar.h - copied unchanged from r189173, head/sys/pc98/cbus/sctermvar.h projects/jbuild/sys/powerpc/include/altivec.h - copied unchanged from r189173, head/sys/powerpc/include/altivec.h projects/jbuild/sys/powerpc/powermac/kiic.c - copied unchanged from r189173, head/sys/powerpc/powermac/kiic.c projects/jbuild/sys/powerpc/powerpc/altivec.c - copied unchanged from r189173, head/sys/powerpc/powerpc/altivec.c projects/jbuild/sys/security/audit/audit_bsm_domain.c - copied unchanged from r189173, head/sys/security/audit/audit_bsm_domain.c projects/jbuild/sys/security/audit/audit_bsm_errno.c - copied unchanged from r189173, head/sys/security/audit/audit_bsm_errno.c projects/jbuild/sys/security/audit/audit_bsm_socket_type.c - copied unchanged from r189173, head/sys/security/audit/audit_bsm_socket_type.c Replaced: projects/jbuild/sys/modules/usb/ - copied from r189173, head/sys/modules/usb/ projects/jbuild/sys/modules/usb/Makefile - copied unchanged from r189173, head/sys/modules/usb/Makefile Deleted: projects/jbuild/sys/boot/common/load.c projects/jbuild/sys/modules/aue/ projects/jbuild/sys/modules/axe/ projects/jbuild/sys/modules/cdce/ projects/jbuild/sys/modules/cue/ projects/jbuild/sys/modules/ehci/ projects/jbuild/sys/modules/kue/ projects/jbuild/sys/modules/ohci/ projects/jbuild/sys/modules/rue/ projects/jbuild/sys/modules/rum/ projects/jbuild/sys/modules/slhci/ projects/jbuild/sys/modules/sound/driver/au88x0/ projects/jbuild/sys/modules/u3g/ projects/jbuild/sys/modules/uark/ projects/jbuild/sys/modules/ubsa/ projects/jbuild/sys/modules/ucom/ projects/jbuild/sys/modules/udav/ projects/jbuild/sys/modules/udbp/ projects/jbuild/sys/modules/ufm/ projects/jbuild/sys/modules/ufoma/ projects/jbuild/sys/modules/uftdi/ projects/jbuild/sys/modules/ugen/ projects/jbuild/sys/modules/uhci/ projects/jbuild/sys/modules/uhid/ projects/jbuild/sys/modules/uipaq/ projects/jbuild/sys/modules/ukbd/ projects/jbuild/sys/modules/ulpt/ projects/jbuild/sys/modules/umass/ projects/jbuild/sys/modules/umct/ projects/jbuild/sys/modules/umodem/ projects/jbuild/sys/modules/ums/ projects/jbuild/sys/modules/upgt/ projects/jbuild/sys/modules/uplcom/ projects/jbuild/sys/modules/ural/ projects/jbuild/sys/modules/urio/ projects/jbuild/sys/modules/usb2/ projects/jbuild/sys/modules/uscanner/ projects/jbuild/sys/modules/uslcom/ projects/jbuild/sys/modules/uvisor/ projects/jbuild/sys/modules/uvscom/ projects/jbuild/sys/modules/zyd/ projects/jbuild/sys/pccard/ projects/jbuild/sys/powerpc/booke/support.S Modified: projects/jbuild/sys/ (props changed) projects/jbuild/sys/Makefile projects/jbuild/sys/boot/Makefile projects/jbuild/sys/boot/Makefile.inc projects/jbuild/sys/boot/common/loader.8 projects/jbuild/sys/boot/common/module.c projects/jbuild/sys/boot/forth/loader.4th projects/jbuild/sys/boot/forth/loader.conf projects/jbuild/sys/boot/forth/pnp.4th projects/jbuild/sys/boot/forth/support.4th projects/jbuild/sys/boot/i386/btx/btx/btx.S projects/jbuild/sys/boot/i386/libi386/bootinfo64.c projects/jbuild/sys/boot/i386/loader/Makefile projects/jbuild/sys/boot/i386/pxeldr/pxeboot.8 projects/jbuild/sys/boot/ia64/common/Makefile projects/jbuild/sys/boot/ia64/efi/Makefile projects/jbuild/sys/boot/ia64/ski/Makefile projects/jbuild/sys/boot/pc98/loader/Makefile projects/jbuild/sys/boot/powerpc/ofw/Makefile projects/jbuild/sys/boot/sparc64/loader/Makefile projects/jbuild/sys/boot/sparc64/loader/main.c projects/jbuild/sys/bsm/audit.h projects/jbuild/sys/bsm/audit_internal.h projects/jbuild/sys/bsm/audit_kevents.h projects/jbuild/sys/bsm/audit_record.h projects/jbuild/sys/cam/cam_periph.c projects/jbuild/sys/cam/cam_xpt.c projects/jbuild/sys/cam/cam_xpt_sim.h projects/jbuild/sys/cam/scsi/scsi_all.c projects/jbuild/sys/cam/scsi/scsi_cd.c projects/jbuild/sys/cam/scsi/scsi_ch.c projects/jbuild/sys/cam/scsi/scsi_da.c projects/jbuild/sys/cam/scsi/scsi_low.c projects/jbuild/sys/cam/scsi/scsi_pass.c projects/jbuild/sys/cam/scsi/scsi_pt.c projects/jbuild/sys/cam/scsi/scsi_sa.c projects/jbuild/sys/cam/scsi/scsi_ses.c projects/jbuild/sys/cam/scsi/scsi_sg.c projects/jbuild/sys/cddl/compat/opensolaris/sys/sysmacros.h projects/jbuild/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c projects/jbuild/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c projects/jbuild/sys/compat/linprocfs/linprocfs.c projects/jbuild/sys/compat/linux/linux_file.c projects/jbuild/sys/compat/linux/linux_getcwd.c projects/jbuild/sys/compat/linux/linux_ioctl.c projects/jbuild/sys/compat/linux/linux_stats.c projects/jbuild/sys/compat/ndis/kern_ndis.c projects/jbuild/sys/compat/ndis/kern_windrv.c projects/jbuild/sys/compat/ndis/subr_hal.c projects/jbuild/sys/compat/ndis/subr_ndis.c projects/jbuild/sys/compat/ndis/subr_ntoskrnl.c projects/jbuild/sys/compat/ndis/subr_usbd.c projects/jbuild/sys/compat/ndis/winx32_wrap.S projects/jbuild/sys/compat/svr4/svr4_misc.c projects/jbuild/sys/compat/svr4/svr4_sockio.c projects/jbuild/sys/compat/svr4/svr4_types.h projects/jbuild/sys/conf/Makefile.arm projects/jbuild/sys/conf/NOTES projects/jbuild/sys/conf/files projects/jbuild/sys/conf/files.amd64 projects/jbuild/sys/conf/files.i386 projects/jbuild/sys/conf/files.ia64 projects/jbuild/sys/conf/files.mips projects/jbuild/sys/conf/files.pc98 projects/jbuild/sys/conf/files.powerpc projects/jbuild/sys/conf/files.sparc64 projects/jbuild/sys/conf/files.sun4v projects/jbuild/sys/conf/kern.mk projects/jbuild/sys/conf/kern.post.mk projects/jbuild/sys/conf/kern.pre.mk projects/jbuild/sys/conf/kmod.mk projects/jbuild/sys/conf/newvers.sh projects/jbuild/sys/conf/options projects/jbuild/sys/conf/options.amd64 projects/jbuild/sys/conf/options.i386 projects/jbuild/sys/conf/options.ia64 projects/jbuild/sys/conf/options.mips projects/jbuild/sys/conf/options.pc98 projects/jbuild/sys/contrib/altq/altq/altq_subr.c projects/jbuild/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c projects/jbuild/sys/contrib/pf/ (props changed) projects/jbuild/sys/contrib/pf/net/pf_if.c projects/jbuild/sys/contrib/pf/net/pf_ioctl.c projects/jbuild/sys/crypto/via/padlock.c projects/jbuild/sys/crypto/via/padlock_hash.c projects/jbuild/sys/fs/cd9660/cd9660_lookup.c projects/jbuild/sys/fs/cd9660/cd9660_node.c projects/jbuild/sys/fs/cd9660/cd9660_node.h projects/jbuild/sys/fs/cd9660/cd9660_rrip.c projects/jbuild/sys/fs/cd9660/cd9660_vfsops.c projects/jbuild/sys/fs/cd9660/cd9660_vnops.c projects/jbuild/sys/fs/coda/coda_vfsops.c projects/jbuild/sys/fs/coda/coda_vnops.c projects/jbuild/sys/fs/devfs/devfs_devs.c projects/jbuild/sys/fs/devfs/devfs_vnops.c projects/jbuild/sys/fs/fifofs/fifo_vnops.c projects/jbuild/sys/fs/hpfs/hpfs_vfsops.c projects/jbuild/sys/fs/msdosfs/denode.h projects/jbuild/sys/fs/msdosfs/msdosfs_conv.c projects/jbuild/sys/fs/msdosfs/msdosfs_vfsops.c projects/jbuild/sys/fs/msdosfs/msdosfs_vnops.c projects/jbuild/sys/fs/msdosfs/msdosfsmount.h projects/jbuild/sys/fs/nullfs/null_vnops.c projects/jbuild/sys/fs/nwfs/nwfs_subr.c projects/jbuild/sys/fs/nwfs/nwfs_vnops.c projects/jbuild/sys/fs/procfs/procfs.c projects/jbuild/sys/fs/pseudofs/pseudofs_vncache.c projects/jbuild/sys/fs/pseudofs/pseudofs_vnops.c projects/jbuild/sys/fs/smbfs/smbfs_vnops.c projects/jbuild/sys/fs/tmpfs/tmpfs.h projects/jbuild/sys/fs/tmpfs/tmpfs_subr.c projects/jbuild/sys/fs/tmpfs/tmpfs_vnops.c projects/jbuild/sys/fs/udf/ecma167-udf.h projects/jbuild/sys/fs/udf/udf.h projects/jbuild/sys/fs/udf/udf_vfsops.c projects/jbuild/sys/fs/udf/udf_vnops.c projects/jbuild/sys/geom/geom.h projects/jbuild/sys/geom/geom_dev.c projects/jbuild/sys/geom/geom_subr.c projects/jbuild/sys/geom/geom_vfs.c projects/jbuild/sys/geom/label/g_label_msdosfs.c projects/jbuild/sys/geom/part/g_part.c projects/jbuild/sys/geom/part/g_part.h projects/jbuild/sys/geom/part/g_part_apm.c projects/jbuild/sys/geom/part/g_part_bsd.c projects/jbuild/sys/geom/part/g_part_gpt.c projects/jbuild/sys/geom/part/g_part_if.m projects/jbuild/sys/geom/part/g_part_mbr.c projects/jbuild/sys/geom/part/g_part_pc98.c projects/jbuild/sys/geom/part/g_part_vtoc8.c projects/jbuild/sys/gnu/fs/ext2fs/ext2_bitops.h projects/jbuild/sys/gnu/fs/ext2fs/ext2_fs.h projects/jbuild/sys/gnu/fs/ext2fs/ext2_fs_sb.h projects/jbuild/sys/gnu/fs/ext2fs/ext2_inode.c projects/jbuild/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c projects/jbuild/sys/gnu/fs/ext2fs/ext2_vfsops.c projects/jbuild/sys/gnu/fs/xfs/FreeBSD/xfs_compat.h projects/jbuild/sys/i386/acpica/acpi_wakeup.c projects/jbuild/sys/i386/conf/DEFAULTS projects/jbuild/sys/i386/conf/GENERIC projects/jbuild/sys/i386/conf/NOTES projects/jbuild/sys/i386/conf/XBOX projects/jbuild/sys/i386/cpufreq/est.c projects/jbuild/sys/i386/cpufreq/smist.c projects/jbuild/sys/i386/i386/busdma_machdep.c projects/jbuild/sys/i386/i386/i686_mem.c projects/jbuild/sys/i386/i386/identcpu.c projects/jbuild/sys/i386/i386/initcpu.c projects/jbuild/sys/i386/i386/io_apic.c projects/jbuild/sys/i386/i386/local_apic.c projects/jbuild/sys/i386/i386/locore.s projects/jbuild/sys/i386/i386/mp_machdep.c projects/jbuild/sys/i386/i386/msi.c projects/jbuild/sys/i386/i386/pmap.c projects/jbuild/sys/i386/i386/swtch.s projects/jbuild/sys/i386/i386/vm86.c projects/jbuild/sys/i386/i386/vm_machdep.c projects/jbuild/sys/i386/ibcs2/ibcs2_misc.c projects/jbuild/sys/i386/ibcs2/ibcs2_sysi86.c projects/jbuild/sys/i386/include/apicvar.h projects/jbuild/sys/i386/include/cpufunc.h projects/jbuild/sys/i386/include/intr_machdep.h projects/jbuild/sys/i386/isa/npx.c projects/jbuild/sys/i386/linux/linux_locore.s projects/jbuild/sys/i386/linux/linux_machdep.c projects/jbuild/sys/i386/svr4/svr4_locore.s projects/jbuild/sys/i386/xen/clock.c projects/jbuild/sys/i386/xen/mp_machdep.c projects/jbuild/sys/i386/xen/pmap.c projects/jbuild/sys/i386/xen/xen_machdep.c projects/jbuild/sys/ia64/conf/GENERIC projects/jbuild/sys/ia64/conf/NOTES projects/jbuild/sys/ia64/ia64/busdma_machdep.c projects/jbuild/sys/ia64/ia64/mca.c projects/jbuild/sys/ia64/ia64/mp_machdep.c projects/jbuild/sys/ia64/ia64/pmap.c projects/jbuild/sys/ia64/include/mca.h projects/jbuild/sys/kern/imgact_elf.c projects/jbuild/sys/kern/kern_clock.c projects/jbuild/sys/kern/kern_condvar.c projects/jbuild/sys/kern/kern_cons.c projects/jbuild/sys/kern/kern_descrip.c projects/jbuild/sys/kern/kern_exec.c projects/jbuild/sys/kern/kern_exit.c projects/jbuild/sys/kern/kern_jail.c projects/jbuild/sys/kern/kern_linker.c projects/jbuild/sys/kern/kern_lock.c projects/jbuild/sys/kern/kern_malloc.c projects/jbuild/sys/kern/kern_mbuf.c projects/jbuild/sys/kern/kern_mib.c projects/jbuild/sys/kern/kern_osd.c projects/jbuild/sys/kern/kern_poll.c projects/jbuild/sys/kern/kern_priv.c projects/jbuild/sys/kern/kern_proc.c projects/jbuild/sys/kern/kern_rwlock.c projects/jbuild/sys/kern/kern_sig.c projects/jbuild/sys/kern/kern_synch.c projects/jbuild/sys/kern/kern_sysctl.c projects/jbuild/sys/kern/kern_thr.c projects/jbuild/sys/kern/kern_time.c projects/jbuild/sys/kern/kern_timeout.c projects/jbuild/sys/kern/kern_uuid.c projects/jbuild/sys/kern/link_elf.c projects/jbuild/sys/kern/link_elf_obj.c projects/jbuild/sys/kern/sched_4bsd.c projects/jbuild/sys/kern/sched_ule.c projects/jbuild/sys/kern/subr_autoconf.c projects/jbuild/sys/kern/subr_bus.c projects/jbuild/sys/kern/subr_clist.c projects/jbuild/sys/kern/subr_devstat.c projects/jbuild/sys/kern/subr_disk.c projects/jbuild/sys/kern/subr_firmware.c projects/jbuild/sys/kern/subr_kobj.c projects/jbuild/sys/kern/subr_param.c projects/jbuild/sys/kern/subr_pcpu.c projects/jbuild/sys/kern/subr_prf.c projects/jbuild/sys/kern/subr_prof.c projects/jbuild/sys/kern/subr_rman.c projects/jbuild/sys/kern/subr_rtc.c projects/jbuild/sys/kern/subr_smp.c projects/jbuild/sys/kern/subr_taskqueue.c projects/jbuild/sys/kern/subr_witness.c projects/jbuild/sys/kern/sys_generic.c projects/jbuild/sys/kern/sysv_sem.c projects/jbuild/sys/kern/tty.c projects/jbuild/sys/kern/tty_info.c projects/jbuild/sys/kern/tty_inq.c projects/jbuild/sys/kern/tty_outq.c projects/jbuild/sys/kern/tty_pts.c projects/jbuild/sys/kern/tty_pty.c projects/jbuild/sys/kern/tty_ttydisc.c projects/jbuild/sys/kern/uipc_cow.c projects/jbuild/sys/kern/uipc_debug.c projects/jbuild/sys/kern/uipc_domain.c projects/jbuild/sys/kern/uipc_mbuf.c projects/jbuild/sys/kern/uipc_socket.c projects/jbuild/sys/kern/uipc_usrreq.c projects/jbuild/sys/kern/vfs_aio.c projects/jbuild/sys/kern/vfs_bio.c projects/jbuild/sys/kern/vfs_cache.c projects/jbuild/sys/kern/vfs_extattr.c projects/jbuild/sys/kern/vfs_init.c projects/jbuild/sys/kern/vfs_mount.c projects/jbuild/sys/kern/vfs_subr.c projects/jbuild/sys/kern/vfs_syscalls.c projects/jbuild/sys/kern/vfs_vnops.c projects/jbuild/sys/kern/vnode_if.src projects/jbuild/sys/libkern/crc32.c projects/jbuild/sys/libkern/strtouq.c projects/jbuild/sys/mips/idt/idtpci.c projects/jbuild/sys/mips/include/fpu.h projects/jbuild/sys/mips/include/frame.h projects/jbuild/sys/mips/include/pmap.h projects/jbuild/sys/mips/malta/gt_pci.c projects/jbuild/sys/mips/mips/busdma_machdep.c projects/jbuild/sys/mips/mips/cpu.c projects/jbuild/sys/mips/mips/in_cksum.c projects/jbuild/sys/mips/mips/machdep.c projects/jbuild/sys/mips/mips/nexus.c projects/jbuild/sys/mips/mips/pmap.c projects/jbuild/sys/modules/Makefile projects/jbuild/sys/modules/acpi/acpi/Makefile projects/jbuild/sys/modules/agp/Makefile projects/jbuild/sys/modules/ata/atausb/Makefile projects/jbuild/sys/modules/dtrace/dtrace/Makefile projects/jbuild/sys/modules/geom/geom_part/Makefile projects/jbuild/sys/modules/iwnfw/Makefile projects/jbuild/sys/modules/libalias/libalias/Makefile projects/jbuild/sys/modules/linux/Makefile projects/jbuild/sys/modules/netgraph/bluetooth/ubt/Makefile projects/jbuild/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile projects/jbuild/sys/modules/sound/driver/Makefile projects/jbuild/sys/modules/sound/driver/uaudio/Makefile projects/jbuild/sys/modules/svr4/Makefile projects/jbuild/sys/net/bridgestp.c projects/jbuild/sys/net/if.c projects/jbuild/sys/net/if.h projects/jbuild/sys/net/if_bridge.c projects/jbuild/sys/net/if_ef.c projects/jbuild/sys/net/if_ethersubr.c projects/jbuild/sys/net/if_llatbl.c projects/jbuild/sys/net/if_loop.c projects/jbuild/sys/net/if_mib.c projects/jbuild/sys/net/if_spppsubr.c projects/jbuild/sys/net/if_vlan.c projects/jbuild/sys/net/raw_cb.c projects/jbuild/sys/net/raw_usrreq.c projects/jbuild/sys/net/route.c projects/jbuild/sys/net/route.h projects/jbuild/sys/net/rtsock.c projects/jbuild/sys/net/vnet.h projects/jbuild/sys/net80211/_ieee80211.h projects/jbuild/sys/net80211/ieee80211.c projects/jbuild/sys/net80211/ieee80211.h projects/jbuild/sys/net80211/ieee80211_adhoc.c projects/jbuild/sys/net80211/ieee80211_crypto.h projects/jbuild/sys/net80211/ieee80211_ddb.c projects/jbuild/sys/net80211/ieee80211_freebsd.c projects/jbuild/sys/net80211/ieee80211_freebsd.h projects/jbuild/sys/net80211/ieee80211_hostap.c projects/jbuild/sys/net80211/ieee80211_ht.h projects/jbuild/sys/net80211/ieee80211_input.c projects/jbuild/sys/net80211/ieee80211_input.h projects/jbuild/sys/net80211/ieee80211_ioctl.c projects/jbuild/sys/net80211/ieee80211_ioctl.h projects/jbuild/sys/net80211/ieee80211_node.c projects/jbuild/sys/net80211/ieee80211_node.h projects/jbuild/sys/net80211/ieee80211_output.c projects/jbuild/sys/net80211/ieee80211_phy.c projects/jbuild/sys/net80211/ieee80211_proto.c projects/jbuild/sys/net80211/ieee80211_proto.h projects/jbuild/sys/net80211/ieee80211_regdomain.c projects/jbuild/sys/net80211/ieee80211_regdomain.h projects/jbuild/sys/net80211/ieee80211_scan.c projects/jbuild/sys/net80211/ieee80211_scan.h projects/jbuild/sys/net80211/ieee80211_scan_sta.c projects/jbuild/sys/net80211/ieee80211_var.h projects/jbuild/sys/net80211/ieee80211_wds.c projects/jbuild/sys/netatalk/ddp_usrreq.c projects/jbuild/sys/netgraph/atm/ng_atm.c projects/jbuild/sys/netgraph/atm/uni/ng_uni_cust.h projects/jbuild/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c projects/jbuild/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c projects/jbuild/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c projects/jbuild/sys/netgraph/ng_deflate.c projects/jbuild/sys/netgraph/ng_ether.c projects/jbuild/sys/netgraph/ng_gif.c projects/jbuild/sys/netgraph/ng_iface.c projects/jbuild/sys/netgraph/ng_iface.h projects/jbuild/sys/netgraph/ng_l2tp.c projects/jbuild/sys/netgraph/ng_mppc.c projects/jbuild/sys/netgraph/ng_ppp.c projects/jbuild/sys/netgraph/ng_pred1.c projects/jbuild/sys/netgraph/ng_vjc.c projects/jbuild/sys/netinet/if_ether.c projects/jbuild/sys/netinet/if_ether.h projects/jbuild/sys/netinet/igmp.c projects/jbuild/sys/netinet/in.c projects/jbuild/sys/netinet/in.h projects/jbuild/sys/netinet/in_mcast.c projects/jbuild/sys/netinet/in_pcb.c projects/jbuild/sys/netinet/in_pcb.h projects/jbuild/sys/netinet/in_proto.c projects/jbuild/sys/netinet/in_rmx.c projects/jbuild/sys/netinet/in_systm.h projects/jbuild/sys/netinet/ip.h projects/jbuild/sys/netinet/ip_divert.c projects/jbuild/sys/netinet/ip_dummynet.c projects/jbuild/sys/netinet/ip_fw.h projects/jbuild/sys/netinet/ip_fw2.c projects/jbuild/sys/netinet/ip_fw_nat.c projects/jbuild/sys/netinet/ip_fw_pfil.c projects/jbuild/sys/netinet/ip_icmp.c projects/jbuild/sys/netinet/ip_icmp.h projects/jbuild/sys/netinet/ip_input.c projects/jbuild/sys/netinet/ip_ipsec.c projects/jbuild/sys/netinet/ip_options.c projects/jbuild/sys/netinet/ip_output.c projects/jbuild/sys/netinet/libalias/alias.c projects/jbuild/sys/netinet/libalias/alias_db.c projects/jbuild/sys/netinet/libalias/alias_ftp.c projects/jbuild/sys/netinet/libalias/alias_irc.c projects/jbuild/sys/netinet/libalias/alias_local.h projects/jbuild/sys/netinet/libalias/alias_nbt.c projects/jbuild/sys/netinet/raw_ip.c projects/jbuild/sys/netinet/sctp_auth.c projects/jbuild/sys/netinet/sctp_constants.h projects/jbuild/sys/netinet/sctp_crc32.c projects/jbuild/sys/netinet/sctp_crc32.h projects/jbuild/sys/netinet/sctp_header.h projects/jbuild/sys/netinet/sctp_input.c projects/jbuild/sys/netinet/sctp_os_bsd.h projects/jbuild/sys/netinet/sctp_output.c projects/jbuild/sys/netinet/sctp_output.h projects/jbuild/sys/netinet/sctp_pcb.c projects/jbuild/sys/netinet/sctp_pcb.h projects/jbuild/sys/netinet/sctp_structs.h projects/jbuild/sys/netinet/sctp_sysctl.c projects/jbuild/sys/netinet/sctp_uio.h projects/jbuild/sys/netinet/sctp_usrreq.c projects/jbuild/sys/netinet/sctputil.c projects/jbuild/sys/netinet/sctputil.h projects/jbuild/sys/netinet/tcp_debug.h projects/jbuild/sys/netinet/tcp_input.c projects/jbuild/sys/netinet/tcp_subr.c projects/jbuild/sys/netinet/tcp_syncache.c projects/jbuild/sys/netinet/tcp_timer.c projects/jbuild/sys/netinet/tcp_usrreq.c projects/jbuild/sys/netinet/tcp_var.h projects/jbuild/sys/netinet/udp_usrreq.c projects/jbuild/sys/netinet/udp_var.h projects/jbuild/sys/netinet/vinet.h projects/jbuild/sys/netinet6/frag6.c projects/jbuild/sys/netinet6/icmp6.c projects/jbuild/sys/netinet6/in6.c projects/jbuild/sys/netinet6/in6_gif.c projects/jbuild/sys/netinet6/in6_ifattach.c projects/jbuild/sys/netinet6/in6_pcb.c projects/jbuild/sys/netinet6/in6_proto.c projects/jbuild/sys/netinet6/in6_rmx.c projects/jbuild/sys/netinet6/in6_src.c projects/jbuild/sys/netinet6/ip6_forward.c projects/jbuild/sys/netinet6/ip6_input.c projects/jbuild/sys/netinet6/ip6_ipsec.c projects/jbuild/sys/netinet6/ip6_mroute.c projects/jbuild/sys/netinet6/ip6_output.c projects/jbuild/sys/netinet6/ip6_var.h projects/jbuild/sys/netinet6/ip6protosw.h projects/jbuild/sys/netinet6/nd6.c projects/jbuild/sys/netinet6/nd6_nbr.c projects/jbuild/sys/netinet6/nd6_rtr.c projects/jbuild/sys/netinet6/raw_ip6.c projects/jbuild/sys/netinet6/scope6.c projects/jbuild/sys/netinet6/sctp6_usrreq.c projects/jbuild/sys/netinet6/udp6_usrreq.c projects/jbuild/sys/netinet6/vinet6.h projects/jbuild/sys/netipsec/ipsec.c projects/jbuild/sys/netipsec/ipsec.h projects/jbuild/sys/netipsec/ipsec6.h projects/jbuild/sys/netipsec/ipsec_mbuf.c projects/jbuild/sys/netipsec/ipsec_output.c projects/jbuild/sys/netipsec/key.c projects/jbuild/sys/netipsec/key_debug.c projects/jbuild/sys/netipsec/keysock.c projects/jbuild/sys/netipsec/xform_ipip.c projects/jbuild/sys/nfs4client/nfs4_subs.c projects/jbuild/sys/nfsclient/bootp_subr.c projects/jbuild/sys/nfsclient/nfs_diskless.c projects/jbuild/sys/nfsclient/nfs_vfsops.c projects/jbuild/sys/nfsclient/nfs_vnops.c projects/jbuild/sys/nfsclient/nfsnode.h projects/jbuild/sys/nfsserver/nfs_serv.c projects/jbuild/sys/nfsserver/nfs_srvsubs.c projects/jbuild/sys/nfsserver/nfs_syscalls.c projects/jbuild/sys/opencrypto/cryptosoft.c projects/jbuild/sys/pc98/cbus/scterm-sck.c projects/jbuild/sys/pc98/conf/GENERIC projects/jbuild/sys/pc98/conf/NOTES projects/jbuild/sys/pci/if_rl.c projects/jbuild/sys/pci/if_rlreg.h projects/jbuild/sys/powerpc/aim/machdep.c projects/jbuild/sys/powerpc/aim/swtch.S projects/jbuild/sys/powerpc/aim/trap.c projects/jbuild/sys/powerpc/aim/trap_subr.S projects/jbuild/sys/powerpc/booke/locore.S projects/jbuild/sys/powerpc/booke/machdep.c projects/jbuild/sys/powerpc/booke/pmap.c projects/jbuild/sys/powerpc/booke/swtch.S projects/jbuild/sys/powerpc/booke/trap.c projects/jbuild/sys/powerpc/booke/trap_subr.S projects/jbuild/sys/powerpc/conf/GENERIC projects/jbuild/sys/powerpc/conf/MPC85XX projects/jbuild/sys/powerpc/conf/NOTES projects/jbuild/sys/powerpc/include/frame.h projects/jbuild/sys/powerpc/include/pcb.h projects/jbuild/sys/powerpc/include/pcpu.h projects/jbuild/sys/powerpc/include/pmap.h projects/jbuild/sys/powerpc/include/pte.h projects/jbuild/sys/powerpc/include/tlb.h projects/jbuild/sys/powerpc/powermac/ata_macio.c projects/jbuild/sys/powerpc/powermac/grackle.c projects/jbuild/sys/powerpc/powermac/gracklevar.h projects/jbuild/sys/powerpc/powermac/macgpio.c projects/jbuild/sys/powerpc/powermac/macio.c projects/jbuild/sys/powerpc/powermac/uninorth.c projects/jbuild/sys/powerpc/powermac/uninorthvar.h projects/jbuild/sys/powerpc/powerpc/genassym.c projects/jbuild/sys/powerpc/powerpc/intr_machdep.c projects/jbuild/sys/rpc/clnt_rc.c projects/jbuild/sys/security/audit/audit.h projects/jbuild/sys/security/audit/audit_bsm.c projects/jbuild/sys/security/audit/audit_bsm_klib.c projects/jbuild/sys/security/audit/audit_bsm_token.c projects/jbuild/sys/security/audit/audit_pipe.c projects/jbuild/sys/security/audit/audit_private.h projects/jbuild/sys/security/mac/mac_audit.c projects/jbuild/sys/security/mac/mac_framework.c projects/jbuild/sys/security/mac/mac_inet6.c projects/jbuild/sys/security/mac/mac_internal.h projects/jbuild/sys/security/mac/mac_policy.h projects/jbuild/sys/security/mac/mac_priv.c projects/jbuild/sys/security/mac/mac_process.c projects/jbuild/sys/security/mac_biba/mac_biba.c projects/jbuild/sys/security/mac_bsdextended/mac_bsdextended.c projects/jbuild/sys/security/mac_ifoff/mac_ifoff.c projects/jbuild/sys/security/mac_lomac/mac_lomac.c projects/jbuild/sys/security/mac_mls/mac_mls.c projects/jbuild/sys/security/mac_none/mac_none.c projects/jbuild/sys/security/mac_partition/mac_partition.c projects/jbuild/sys/security/mac_portacl/mac_portacl.c projects/jbuild/sys/security/mac_seeotheruids/mac_seeotheruids.c projects/jbuild/sys/security/mac_stub/mac_stub.c projects/jbuild/sys/security/mac_test/mac_test.c projects/jbuild/sys/sparc64/conf/GENERIC projects/jbuild/sys/sparc64/include/bus_private.h projects/jbuild/sys/sparc64/include/tlb.h projects/jbuild/sys/sparc64/include/vmparam.h projects/jbuild/sys/sparc64/sparc64/iommu.c projects/jbuild/sys/sparc64/sparc64/machdep.c projects/jbuild/sys/sparc64/sparc64/pmap.c projects/jbuild/sys/sun4v/conf/GENERIC projects/jbuild/sys/sun4v/include/pcpu.h projects/jbuild/sys/sun4v/include/vmparam.h projects/jbuild/sys/ufs/ffs/ffs_alloc.c projects/jbuild/sys/ufs/ffs/ffs_balloc.c projects/jbuild/sys/ufs/ffs/ffs_extern.h projects/jbuild/sys/ufs/ffs/ffs_inode.c projects/jbuild/sys/ufs/ffs/ffs_vfsops.c projects/jbuild/sys/ufs/ffs/ffs_vnops.c projects/jbuild/sys/ufs/ufs/ufs_dirhash.c projects/jbuild/sys/ufs/ufs/ufs_extattr.c projects/jbuild/sys/ufs/ufs/ufs_lookup.c projects/jbuild/sys/ufs/ufs/ufs_vnops.c projects/jbuild/sys/vm/swap_pager.c projects/jbuild/sys/vm/uma.h projects/jbuild/sys/vm/uma_core.c projects/jbuild/sys/vm/uma_dbg.c projects/jbuild/sys/vm/uma_int.h projects/jbuild/sys/vm/vm_fault.c projects/jbuild/sys/vm/vm_kern.c projects/jbuild/sys/vm/vm_map.c projects/jbuild/sys/vm/vm_map.h projects/jbuild/sys/vm/vm_meter.c projects/jbuild/sys/vm/vm_mmap.c projects/jbuild/sys/vm/vm_object.c projects/jbuild/sys/vm/vm_object.h projects/jbuild/sys/vm/vm_page.c projects/jbuild/sys/vm/vm_page.h projects/jbuild/sys/vm/vm_pager.c projects/jbuild/sys/vm/vnode_pager.c projects/jbuild/sys/vm/vnode_pager.h projects/jbuild/sys/xdr/xdr_mem.c Modified: projects/jbuild/sys/Makefile ============================================================================== --- projects/jbuild/sys/Makefile Sat Feb 28 17:59:41 2009 (r189190) +++ projects/jbuild/sys/Makefile Sat Feb 28 18:00:53 2009 (r189191) @@ -12,7 +12,7 @@ CSCOPEDIRS= boot bsm cam cddl compat con geom gnu isa kern libkern modules net net80211 netatalk \ netgraph netinet netinet6 netipsec netipx netnatm netncp \ netsmb nfs nfs4client nfsclient nfsserver nlm opencrypto \ - pccard pci rpc security sys ufs vm xdr ${CSCOPE_ARCHDIR} + pci rpc security sys ufs vm xdr ${CSCOPE_ARCHDIR} .if defined(ALL_ARCH) CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v .else Modified: projects/jbuild/sys/boot/Makefile ============================================================================== --- projects/jbuild/sys/boot/Makefile Sat Feb 28 17:59:41 2009 (r189190) +++ projects/jbuild/sys/boot/Makefile Sat Feb 28 18:00:53 2009 (r189191) @@ -2,10 +2,6 @@ .include -.if ${MACHINE_ARCH} == "mips" -MK_FORTH=no # not yet -.endif - .if ${MK_FORTH} != "no" # Build the add-in FORTH interpreter. SUBDIR+= ficl Modified: projects/jbuild/sys/boot/Makefile.inc ============================================================================== --- projects/jbuild/sys/boot/Makefile.inc Sat Feb 28 17:59:41 2009 (r189190) +++ projects/jbuild/sys/boot/Makefile.inc Sat Feb 28 18:00:53 2009 (r189191) @@ -1,3 +1,3 @@ # $FreeBSD$ -WITHOUT_SSP= +SSP_CFLAGS= Modified: projects/jbuild/sys/boot/common/loader.8 ============================================================================== --- projects/jbuild/sys/boot/common/loader.8 Sat Feb 28 17:59:41 2009 (r189190) +++ projects/jbuild/sys/boot/common/loader.8 Sat Feb 28 18:00:53 2009 (r189191) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 8, 2007 +.Dd February 15, 2009 .Dt LOADER 8 .Os .Sh NAME @@ -215,6 +215,17 @@ Any arguments passed after the name of t will be passed as arguments to that file. Currently, argument passing does not work for the kernel. .Pp +.It Ic load_geli Xo +.Op Fl n Ar keyno +.Ar prov Ar file +.Xc +Loads a +.Xr geli 8 +encryption keyfile for the given provider name. +The key index can be specified via +.Ar keyno +or will default to zero. +.Pp .It Ic ls Xo .Op Fl l .Op Ar path Modified: projects/jbuild/sys/boot/common/module.c ============================================================================== --- projects/jbuild/sys/boot/common/module.c Sat Feb 28 17:59:41 2009 (r189190) +++ projects/jbuild/sys/boot/common/module.c Sat Feb 28 18:00:53 2009 (r189191) @@ -154,6 +154,44 @@ command_load(int argc, char *argv[]) return (error == 0 ? CMD_OK : CMD_ERROR); } +COMMAND_SET(load_geli, "load_geli", "load a geli key", command_load_geli); + +static int +command_load_geli(int argc, char *argv[]) +{ + char typestr[80]; + char *cp; + int ch, num; + + if (argc < 3) { + command_errmsg = "usage is [-n key#] "; + return(CMD_ERROR); + } + + num = 0; + optind = 1; + optreset = 1; + while ((ch = getopt(argc, argv, "n:")) != -1) { + switch(ch) { + case 'n': + num = strtol(optarg, &cp, 0); + if (cp == optarg) { + sprintf(command_errbuf, "bad key index '%s'", optarg); + return(CMD_ERROR); + } + break; + case '?': + default: + /* getopt has already reported an error */ + return(CMD_OK); + } + } + argv += (optind - 1); + argc -= (optind - 1); + sprintf(typestr, "%s:geli_keyfile%d", argv[1], num); + return(file_loadraw(typestr, argv[2])); +} + COMMAND_SET(unload, "unload", "unload all modules", command_unload); static int Modified: projects/jbuild/sys/boot/forth/loader.4th ============================================================================== --- projects/jbuild/sys/boot/forth/loader.4th Sat Feb 28 17:59:41 2009 (r189190) +++ projects/jbuild/sys/boot/forth/loader.4th Sat Feb 28 18:00:53 2009 (r189191) @@ -93,6 +93,7 @@ only forth definitions also support-func \ \ If a password was defined, execute autoboot and ask for \ password if autoboot returns. +\ Do not exit unless the right password is given. : check-password password .addr @ if @@ -150,8 +151,7 @@ only forth definitions also support-func \ line, if interpreted, or given on the stack, if compiled in. : (read-conf) ( addr len -- ) - conf_files .addr @ ?dup if free abort" Fatal error freeing memory" then - strdup conf_files .len ! conf_files .addr ! + conf_files string= include_conf_files \ Will recurse on new loader_conf_files definitions ; @@ -165,110 +165,26 @@ only forth definitions also support-func then ; immediate -\ ***** enable-module -\ -\ Turn a module loading on. +\ show, enable, disable, toggle module loading. They all take module from +\ the next word -: enable-module ( -- ) - bl parse module_options @ >r - begin - r@ - while - 2dup - r@ module.name dup .addr @ swap .len @ - compare 0= if - 2drop - r@ module.name dup .addr @ swap .len @ type - true r> module.flag ! - ." will be loaded." cr - exit - then - r> module.next @ >r - repeat - r> drop - type ." wasn't found." cr +: set-module-flag ( module_addr val -- ) \ set and print flag + over module.flag ! + dup module.name strtype + module.flag @ if ." will be loaded" else ." will not be loaded" then cr ; -\ ***** disable-module -\ -\ Turn a module loading off. - -: disable-module ( -- ) - bl parse module_options @ >r - begin - r@ - while - 2dup - r@ module.name dup .addr @ swap .len @ - compare 0= if - 2drop - r@ module.name dup .addr @ swap .len @ type - false r> module.flag ! - ." will not be loaded." cr - exit - then - r> module.next @ >r - repeat - r> drop - type ." wasn't found." cr -; +: enable-module find-module ?dup if true set-module-flag then ; -\ ***** toggle-module -\ -\ Turn a module loading on/off. +: disable-module find-module ?dup if false set-module-flag then ; -: toggle-module ( -- ) - bl parse module_options @ >r - begin - r@ - while - 2dup - r@ module.name dup .addr @ swap .len @ - compare 0= if - 2drop - r@ module.name dup .addr @ swap .len @ type - r@ module.flag @ 0= dup r> module.flag ! - if - ." will be loaded." cr - else - ." will not be loaded." cr - then - exit - then - r> module.next @ >r - repeat - r> drop - type ." wasn't found." cr -; +: toggle-module find-module ?dup if dup module.flag @ 0= set-module-flag then ; \ ***** show-module \ \ Show loading information about a module. -: show-module ( -- ) - bl parse module_options @ >r - begin - r@ - while - 2dup - r@ module.name dup .addr @ swap .len @ - compare 0= if - 2drop - ." Name: " r@ module.name dup .addr @ swap .len @ type cr - ." Path: " r@ module.loadname dup .addr @ swap .len @ type cr - ." Type: " r@ module.type dup .addr @ swap .len @ type cr - ." Flags: " r@ module.args dup .addr @ swap .len @ type cr - ." Before load: " r@ module.beforeload dup .addr @ swap .len @ type cr - ." After load: " r@ module.afterload dup .addr @ swap .len @ type cr - ." Error: " r@ module.loaderror dup .addr @ swap .len @ type cr - ." Status: " r> module.flag @ if ." Load" else ." Don't load" then cr - exit - then - r> module.next @ >r - repeat - r> drop - type ." wasn't found." cr -; +: show-module ( -- ) find-module ?dup if show-one-module then ; \ Words to be used inside configuration files Modified: projects/jbuild/sys/boot/forth/loader.conf ============================================================================== --- projects/jbuild/sys/boot/forth/loader.conf Sat Feb 28 17:59:41 2009 (r189190) +++ projects/jbuild/sys/boot/forth/loader.conf Sat Feb 28 18:00:53 2009 (r189191) @@ -278,6 +278,7 @@ if_vge_load="NO" # VIA VT6122 PCI Gigab if_udav_load="NO" # Davicom DM9601 USB Ethernet if_upgt_load="NO" # Conexant/Intersil PrismGT USB wireless if_ural_load="NO" # Ralink Technology USB wireless +if_urtw_load="NO" # Realtek 8187L USB wireless if_vr_load="NO" # VIA Rhine I and Rhine II if_vx_load="NO" # 3Com 3C590 family if_wb_load="NO" # Winbond W89C840F Modified: projects/jbuild/sys/boot/forth/pnp.4th ============================================================================== --- projects/jbuild/sys/boot/forth/pnp.4th Sat Feb 28 17:59:41 2009 (r189190) +++ projects/jbuild/sys/boot/forth/pnp.4th Sat Feb 28 18:00:53 2009 (r189191) @@ -24,6 +24,39 @@ \ \ $FreeBSD$ + +\ The following pnp code is used in pnp.4th and pnp.c +structure: STAILQ_HEAD + ptr stqh_first \ type* + ptr stqh_last \ type** +;structure + +structure: STAILQ_ENTRY + ptr stqe_next \ type* +;structure + +structure: pnphandler + ptr pnph.name + ptr pnph.enumerate +;structure + +structure: pnpident + ptr pnpid.ident \ char* + sizeof STAILQ_ENTRY cells member: pnpid.link \ pnpident +;structure + +structure: pnpinfo \ sync with sys/boot/config/bootstrap.h + ptr pnpi.desc + int pnpi.revision + ptr pnpi.module \ (char*) module args + int pnpi.argc + ptr pnpi.argv + ptr pnpi.handler \ pnphandler + sizeof STAILQ_HEAD member: pnpi.ident \ pnpident + sizeof STAILQ_ENTRY member: pnpi.link \ pnpinfo +;structure +\ end of pnp support + pnpdevices drop : enumerate Modified: projects/jbuild/sys/boot/forth/support.4th ============================================================================== --- projects/jbuild/sys/boot/forth/support.4th Sat Feb 28 17:59:41 2009 (r189190) +++ projects/jbuild/sys/boot/forth/support.4th Sat Feb 28 18:00:53 2009 (r189191) @@ -26,7 +26,6 @@ \ Loader.rc support functions: \ -\ initialize_support ( -- ) initialize global variables \ initialize ( addr len -- ) as above, plus load_conf_files \ load_conf ( addr len -- ) load conf file given \ include_conf_files ( -- ) load all conf files in load_conf_files @@ -61,24 +60,23 @@ \ value any_conf_read? indicates if a conf file was succesfully read \ \ Other exported words: -\ +\ note, strlen is internal \ strdup ( addr len -- addr' len) similar to strdup(3) \ strcat ( addr len addr' len' -- addr len+len' ) similar to strcat(3) -\ strlen ( addr -- len ) similar to strlen(3) \ s' ( | string' -- addr len | ) similar to s" \ rudimentary structure support \ Exception values -1 constant syntax_error -2 constant out_of_memory -3 constant free_error -4 constant set_error -5 constant read_error -6 constant open_error -7 constant exec_error -8 constant before_load_error -9 constant after_load_error +1 constant ESYNTAX +2 constant ENOMEM +3 constant EFREE +4 constant ESETERROR \ error setting environment variable +5 constant EREAD \ error reading +6 constant EOPEN +7 constant EEXEC \ XXX never catched +8 constant EBEFORELOAD +9 constant EAFTERLOAD \ I/O constants @@ -132,7 +130,8 @@ structure: module ptr module.next ;structure -\ Internal loader structures +\ Internal loader structures (preloaded_file, kernel_module, file_metadata) +\ must be in sync with the C struct in sys/boot/common/bootstrap.h structure: preloaded_file ptr pf.name ptr pf.type @@ -159,51 +158,7 @@ structure: file_metadata 0 member: md.data \ variable size ;structure -structure: config_resource - ptr cf.name - int cf.type -0 constant RES_INT -1 constant RES_STRING -2 constant RES_LONG - 2 cells member: u -;structure - -structure: config_device - ptr cd.name - int cd.unit - int cd.resource_count - ptr cd.resources \ config_resource -;structure - -structure: STAILQ_HEAD - ptr stqh_first \ type* - ptr stqh_last \ type** -;structure - -structure: STAILQ_ENTRY - ptr stqe_next \ type* -;structure - -structure: pnphandler - ptr pnph.name - ptr pnph.enumerate -;structure - -structure: pnpident - ptr pnpid.ident \ char* - sizeof STAILQ_ENTRY cells member: pnpid.link \ pnpident -;structure - -structure: pnpinfo - ptr pnpi.desc - int pnpi.revision - ptr pnpi.module \ (char*) module args - int pnpi.argc - ptr pnpi.argv - ptr pnpi.handler \ pnphandler - sizeof STAILQ_HEAD member: pnpi.ident \ pnpident - sizeof STAILQ_ENTRY member: pnpi.link \ pnpinfo -;structure +\ end of structures \ Global variables @@ -216,11 +171,9 @@ create last_module_option sizeof module. 0 value nextboot? \ Support string functions - -: strdup ( addr len -- addr' len ) - >r r@ allocate if out_of_memory throw then - tuck r@ move - r> +: strdup { addr len -- addr' len' } + len allocate if ENOMEM throw then + addr over len move len ; : strcat { addr len addr' len' -- addr len+len' } @@ -228,29 +181,27 @@ create last_module_option sizeof module. addr len len' + ; -: strlen ( addr -- len ) - 0 >r +: strchr { addr len c -- addr' len' } begin - dup c@ while - 1+ r> 1+ >r repeat - drop r> + len + while + addr c@ c = if addr len exit then + addr 1 + to addr + len 1 - to len + repeat + 0 0 ; -: s' +: s' \ same as s", allows " in the string [char] ' parse - state @ if - postpone sliteral - then + state @ if postpone sliteral then ; immediate : 2>r postpone >r postpone >r ; immediate : 2r> postpone r> postpone r> ; immediate : 2r@ postpone 2r> postpone 2dup postpone 2>r ; immediate -: getenv? - getenv - -1 = if false else drop true then -; +: getenv? getenv -1 = if false else drop true then ; \ Private definitions @@ -271,27 +222,27 @@ only forth also support-functions defini \ Standard suffixes -: load_module_suffix s" _load" ; -: module_loadname_suffix s" _name" ; -: module_type_suffix s" _type" ; -: module_args_suffix s" _flags" ; -: module_beforeload_suffix s" _before" ; -: module_afterload_suffix s" _after" ; -: module_loaderror_suffix s" _error" ; +: load_module_suffix s" _load" ; +: module_loadname_suffix s" _name" ; +: module_type_suffix s" _type" ; +: module_args_suffix s" _flags" ; +: module_beforeload_suffix s" _before" ; +: module_afterload_suffix s" _after" ; +: module_loaderror_suffix s" _error" ; \ Support operators : >= < 0= ; : <= > 0= ; -\ Assorted support funcitons +\ Assorted support functions -: free-memory free if free_error throw then ; +: free-memory free if EFREE throw then ; : strget { var -- addr len } var .addr @ var .len @ ; \ assign addr len to variable. -: strset { addr len var -- } addr var .addr ! len var .len ! ; +: strset { addr len var -- } addr var .addr ! len var .len ! ; \ free memory and reset fields : strfree { var -- } var .addr @ ?dup if free-memory 0 0 var strset then ; @@ -299,6 +250,18 @@ only forth also support-functions defini \ free old content, make a copy of the string and assign to variable : string= { addr len var -- } var strfree addr len strdup var strset ; +: strtype ( str -- ) strget type ; + +\ assign a reference to what is on the stack +: strref { addr len var -- addr len } + addr var .addr ! len var .len ! addr len +; + +\ unquote a string +: unquote ( addr len -- addr len ) + over c@ [char] " = if 2 chars - swap char+ swap then +; + \ Assignment data temporary storage string name_buffer @@ -366,16 +329,16 @@ line-reading definitions line_buffer .len @ if line_buffer .addr @ line_buffer .len @ r@ + - resize if out_of_memory throw then + resize if ENOMEM throw then else - r@ allocate if out_of_memory throw then + r@ allocate if ENOMEM throw then then line_buffer .addr ! r> ; : append_to_line_buffer ( addr len -- ) - line_buffer .addr @ line_buffer .len @ + line_buffer strget 2swap strcat line_buffer .len ! drop @@ -395,23 +358,15 @@ line-reading definitions : refill_buffer 0 to read_buffer_ptr read_buffer .addr @ 0= if - read_buffer_size allocate if out_of_memory throw then + read_buffer_size allocate if ENOMEM throw then read_buffer .addr ! then fd @ read_buffer .addr @ read_buffer_size fread - dup -1 = if read_error throw then + dup -1 = if EREAD throw then dup 0= if true to end_of_file? then read_buffer .len ! ; -: reset_line_buffer - line_buffer .addr @ ?dup if - free-memory - then - 0 line_buffer .addr ! - 0 line_buffer .len ! -; - support-functions definitions : reset_line_reading @@ -419,7 +374,7 @@ support-functions definitions ; : read_line - reset_line_buffer + line_buffer strfree skip_newlines begin read_from_buffer @@ -459,9 +414,9 @@ also parser definitions also 0 value parsing_function 0 value end_of_line -: end_of_line? - line_pointer end_of_line = -; +: end_of_line? line_pointer end_of_line = ; + +\ classifiers for various character classes in the input line : letter? line_pointer c@ >r @@ -480,70 +435,46 @@ also parser definitions also or ; -: quote? - line_pointer c@ [char] " = -; +: quote? line_pointer c@ [char] " = ; -: assignment_sign? - line_pointer c@ [char] = = -; +: assignment_sign? line_pointer c@ [char] = = ; -: comment? - line_pointer c@ [char] # = -; +: comment? line_pointer c@ [char] # = ; -: space? - line_pointer c@ bl = - line_pointer c@ tab = or -; +: space? line_pointer c@ bl = line_pointer c@ tab = or ; -: backslash? - line_pointer c@ [char] \ = -; +: backslash? line_pointer c@ [char] \ = ; -: underscore? - line_pointer c@ [char] _ = -; +: underscore? line_pointer c@ [char] _ = ; -: dot? - line_pointer c@ [char] . = -; +: dot? line_pointer c@ [char] . = ; -: skip_character - line_pointer char+ to line_pointer -; +\ manipulation of input line +: skip_character line_pointer char+ to line_pointer ; -: skip_to_end_of_line - end_of_line to line_pointer -; +: skip_to_end_of_line end_of_line to line_pointer ; : eat_space begin - space? + end_of_line? if 0 else space? then while skip_character - end_of_line? if exit then repeat ; : parse_name ( -- addr len ) line_pointer begin - letter? digit? underscore? dot? or or or + end_of_line? if 0 else letter? digit? underscore? dot? or or or then while skip_character - end_of_line? if - line_pointer over - - strdup - exit - then repeat line_pointer over - strdup ; : remove_backslashes { addr len | addr' len' -- addr' len' } - len allocate if out_of_memory throw then + len allocate if ENOMEM throw then to addr' addr >r begin @@ -561,16 +492,16 @@ also parser definitions also : parse_quote ( -- addr len ) line_pointer skip_character - end_of_line? if syntax_error throw then + end_of_line? if ESYNTAX throw then begin quote? 0= while backslash? if skip_character - end_of_line? if syntax_error throw then + end_of_line? if ESYNTAX throw then then skip_character - end_of_line? if syntax_error throw then + end_of_line? if ESYNTAX throw then repeat skip_character line_pointer over - @@ -579,8 +510,7 @@ also parser definitions also : read_name parse_name ( -- addr len ) - name_buffer .len ! - name_buffer .addr ! + name_buffer strset ; : read_value @@ -589,8 +519,7 @@ also parser definitions also else parse_name ( -- addr len ) then - value_buffer .len ! - value_buffer .addr ! + value_buffer strset ; : comment @@ -600,7 +529,7 @@ also parser definitions also : white_space_4 eat_space comment? if ['] comment to parsing_function exit then - end_of_line? 0= if syntax_error throw then + end_of_line? 0= if ESYNTAX throw then ; : variable_value @@ -613,7 +542,7 @@ also parser definitions also letter? digit? quote? or or if ['] variable_value to parsing_function exit then - syntax_error throw + ESYNTAX throw ; : assignment_sign @@ -624,7 +553,7 @@ also parser definitions also : white_space_2 eat_space assignment_sign? if ['] assignment_sign to parsing_function exit then - syntax_error throw + ESYNTAX throw ; : variable_name @@ -636,13 +565,13 @@ also parser definitions also eat_space letter? if ['] variable_name to parsing_function exit then comment? if ['] comment to parsing_function exit then - end_of_line? 0= if syntax_error throw then + end_of_line? 0= if ESYNTAX throw then ; file-processing definitions : get_assignment - line_buffer .addr @ line_buffer .len @ + to end_of_line + line_buffer strget + to end_of_line line_buffer .addr @ to line_pointer ['] white_space_1 to parsing_function begin @@ -653,7 +582,7 @@ file-processing definitions parsing_function ['] comment = parsing_function ['] white_space_1 = parsing_function ['] white_space_4 = - or or 0= if syntax_error throw then + or or 0= if ESYNTAX throw then ; only forth also support-functions also file-processing definitions also @@ -661,7 +590,7 @@ only forth also support-functions also f \ Process line : assignment_type? ( addr len -- flag ) - name_buffer .addr @ name_buffer .len @ + name_buffer strget compare 0= ; @@ -671,69 +600,56 @@ only forth also support-functions also f over compare 0= ; -: loader_conf_files? - s" loader_conf_files" assignment_type? -; +: loader_conf_files? s" loader_conf_files" assignment_type? ; -: nextboot_flag? - s" nextboot_enable" assignment_type? -; +: nextboot_flag? s" nextboot_enable" assignment_type? ; -: nextboot_conf? - s" nextboot_conf" assignment_type? -; +: nextboot_conf? s" nextboot_conf" assignment_type? ; -: verbose_flag? - s" verbose_loading" assignment_type? -; +: verbose_flag? s" verbose_loading" assignment_type? ; -: execute? - s" exec" assignment_type? -; +: execute? s" exec" assignment_type? ; -: password? - s" password" assignment_type? -; +: password? s" password" assignment_type? ; -: module_load? - load_module_suffix suffix_type? -; +: module_load? load_module_suffix suffix_type? ; -: module_loadname? - module_loadname_suffix suffix_type? -; +: module_loadname? module_loadname_suffix suffix_type? ; -: module_type? - module_type_suffix suffix_type? -; +: module_type? module_type_suffix suffix_type? ; -: module_args? - module_args_suffix suffix_type? -; +: module_args? module_args_suffix suffix_type? ; -: module_beforeload? - module_beforeload_suffix suffix_type? -; +: module_beforeload? module_beforeload_suffix suffix_type? ; -: module_afterload? - module_afterload_suffix suffix_type? -; +: module_afterload? module_afterload_suffix suffix_type? ; -: module_loaderror? - module_loaderror_suffix suffix_type? -; +: module_loaderror? module_loaderror_suffix suffix_type? ; -: set_nextboot_conf - nextboot_conf_file .addr @ ?dup if - free-memory - then - value_buffer .addr @ c@ [char] " = if - value_buffer .addr @ char+ value_buffer .len @ 2 chars - +\ build a 'set' statement and execute it +: set_environment_variable + name_buffer .len @ value_buffer .len @ + 5 chars + \ size of result string + allocate if ENOMEM throw then + dup 0 \ start with an empty string and append the pieces + s" set " strcat + name_buffer strget strcat + s" =" strcat + value_buffer strget strcat + ['] evaluate catch if + 2drop free drop + ESETERROR throw else - value_buffer .addr @ value_buffer .len @ + free-memory then - strdup - nextboot_conf_file .len ! nextboot_conf_file .addr ! +; + +: set_conf_files + set_environment_variable + s" loader_conf_files" getenv conf_files string= +; + +: set_nextboot_conf \ XXX maybe do as set_conf_files ? + value_buffer strget unquote nextboot_conf_file string= ; : append_to_module_options_list ( addr -- ) @@ -746,35 +662,32 @@ only forth also support-functions also f then ; -: set_module_name ( addr -- ) - name_buffer .addr @ name_buffer .len @ - strdup - >r over module.name .addr ! - r> swap module.name .len ! +: set_module_name { addr -- } \ check leaks + name_buffer strget addr module.name string= ; : yes_value? - value_buffer .addr @ value_buffer .len @ + value_buffer strget \ XXX could use unquote 2dup s' "YES"' compare >r 2dup s' "yes"' compare >r 2dup s" YES" compare >r s" yes" compare r> r> r> and and and 0= ; -: find_module_option ( -- addr | 0 ) +: find_module_option ( -- addr | 0 ) \ return ptr to entry matching name_buffer module_options @ begin dup while - dup module.name dup .addr @ swap .len @ - name_buffer .addr @ name_buffer .len @ + dup module.name strget + name_buffer strget compare 0= if exit then module.next @ repeat ; : new_module_option ( -- addr ) - sizeof module allocate if out_of_memory throw then + sizeof module allocate if ENOMEM throw then dup sizeof module erase dup append_to_module_options_list dup set_module_name @@ -792,103 +705,38 @@ only forth also support-functions also f : set_module_args name_buffer .len @ module_args_suffix nip - name_buffer .len ! - get_module_option module.args - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.args string= ; : set_module_loadname name_buffer .len @ module_loadname_suffix nip - name_buffer .len ! - get_module_option module.loadname - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.loadname string= ; : set_module_type name_buffer .len @ module_type_suffix nip - name_buffer .len ! - get_module_option module.type - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.type string= ; : set_module_beforeload name_buffer .len @ module_beforeload_suffix nip - name_buffer .len ! - get_module_option module.beforeload - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.beforeload string= ; : set_module_afterload name_buffer .len @ module_afterload_suffix nip - name_buffer .len ! - get_module_option module.afterload - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.afterload string= ; : set_module_loaderror *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Feb 28 18:03:30 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C74241065672; Sat, 28 Feb 2009 18:03:30 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFECA8FC12; Sat, 28 Feb 2009 18:03:30 +0000 (UTC) (envelope-from jb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1SI3UIM017790; Sat, 28 Feb 2009 18:03:30 GMT (envelope-from jb@svn.freebsd.org) Received: (from jb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1SI3T9H017762; Sat, 28 Feb 2009 18:03:29 GMT (envelope-from jb@svn.freebsd.org) Message-Id: <200902281803.n1SI3T9H017762@svn.freebsd.org> From: John Birrell Date: Sat, 28 Feb 2009 18:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189192 - in projects/jbuild: . bin/chmod bin/dd bin/kenv bin/ln bin/pax bin/ps bin/test cddl/contrib/opensolaris/lib/libdtrace/common contrib/bind9 contrib/bind9/lib/dns contrib/bind9/... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 18:03:31 -0000 Author: jb Date: Sat Feb 28 18:03:28 2009 New Revision: 189192 URL: http://svn.freebsd.org/changeset/base/189192 Log: MFC Added: projects/jbuild/contrib/csup/lex.rcs.c - copied unchanged from r189173, head/contrib/csup/lex.rcs.c projects/jbuild/contrib/csup/rcsfile.c - copied unchanged from r189173, head/contrib/csup/rcsfile.c projects/jbuild/contrib/csup/rcsfile.h - copied unchanged from r189173, head/contrib/csup/rcsfile.h projects/jbuild/contrib/csup/rcsparse.c - copied unchanged from r189173, head/contrib/csup/rcsparse.c projects/jbuild/contrib/csup/rcsparse.h - copied unchanged from r189173, head/contrib/csup/rcsparse.h projects/jbuild/contrib/csup/rcstokenizer.h - copied unchanged from r189173, head/contrib/csup/rcstokenizer.h projects/jbuild/contrib/csup/rcstokenizer.l - copied unchanged from r189173, head/contrib/csup/rcstokenizer.l projects/jbuild/contrib/csup/rsyncfile.c - copied unchanged from r189173, head/contrib/csup/rsyncfile.c projects/jbuild/contrib/csup/rsyncfile.h - copied unchanged from r189173, head/contrib/csup/rsyncfile.h projects/jbuild/contrib/file/AUTHORS - copied unchanged from r189173, head/contrib/file/AUTHORS projects/jbuild/contrib/file/COPYING - copied unchanged from r189173, head/contrib/file/COPYING projects/jbuild/contrib/file/INSTALL - copied unchanged from r189173, head/contrib/file/INSTALL projects/jbuild/contrib/file/Magdir/clarion - copied unchanged from r189173, head/contrib/file/Magdir/clarion projects/jbuild/contrib/file/Magdir/erlang - copied unchanged from r189173, head/contrib/file/Magdir/erlang projects/jbuild/contrib/file/Magdir/gnome-keyring - copied unchanged from r189173, head/contrib/file/Magdir/gnome-keyring projects/jbuild/contrib/file/Magdir/gnumeric - copied unchanged from r189173, head/contrib/file/Magdir/gnumeric projects/jbuild/contrib/file/Magdir/graphviz - copied unchanged from r189173, head/contrib/file/Magdir/graphviz projects/jbuild/contrib/file/Magdir/inform - copied unchanged from r189173, head/contrib/file/Magdir/inform projects/jbuild/contrib/file/Magdir/kde - copied unchanged from r189173, head/contrib/file/Magdir/kde projects/jbuild/contrib/file/Magdir/llvm - copied unchanged from r189173, head/contrib/file/Magdir/llvm projects/jbuild/contrib/file/Magdir/lua - copied unchanged from r189173, head/contrib/file/Magdir/lua projects/jbuild/contrib/file/Magdir/luks - copied unchanged from r189173, head/contrib/file/Magdir/luks projects/jbuild/contrib/file/Magdir/mathcad - copied unchanged from r189173, head/contrib/file/Magdir/mathcad projects/jbuild/contrib/file/Magdir/mercurial - copied unchanged from r189173, head/contrib/file/Magdir/mercurial projects/jbuild/contrib/file/Magdir/mozilla - copied unchanged from r189173, head/contrib/file/Magdir/mozilla projects/jbuild/contrib/file/Magdir/netware - copied unchanged from r189173, head/contrib/file/Magdir/netware projects/jbuild/contrib/file/Magdir/ole2compounddocs - copied unchanged from r189173, head/contrib/file/Magdir/ole2compounddocs projects/jbuild/contrib/file/Magdir/ruby - copied unchanged from r189173, head/contrib/file/Magdir/ruby projects/jbuild/contrib/file/Magdir/securitycerts - copied unchanged from r189173, head/contrib/file/Magdir/securitycerts projects/jbuild/contrib/file/Magdir/warc - copied unchanged from r189173, head/contrib/file/Magdir/warc projects/jbuild/contrib/file/Magdir/weak - copied unchanged from r189173, head/contrib/file/Magdir/weak projects/jbuild/contrib/file/Magdir/windows - copied unchanged from r189173, head/contrib/file/Magdir/windows projects/jbuild/contrib/file/Magdir/xilinx - copied unchanged from r189173, head/contrib/file/Magdir/xilinx projects/jbuild/contrib/file/NEWS - copied unchanged from r189173, head/contrib/file/NEWS projects/jbuild/contrib/file/TODO - copied unchanged from r189173, head/contrib/file/TODO projects/jbuild/contrib/file/asprintf.c - copied unchanged from r189173, head/contrib/file/asprintf.c projects/jbuild/contrib/file/compile - copied unchanged from r189173, head/contrib/file/compile projects/jbuild/contrib/file/config.guess - copied unchanged from r189173, head/contrib/file/config.guess projects/jbuild/contrib/file/config.sub - copied unchanged from r189173, head/contrib/file/config.sub projects/jbuild/contrib/file/configure.ac - copied unchanged from r189173, head/contrib/file/configure.ac projects/jbuild/contrib/file/elfclass.h - copied unchanged from r189173, head/contrib/file/elfclass.h projects/jbuild/contrib/file/getopt_long.c - copied unchanged from r189173, head/contrib/file/getopt_long.c projects/jbuild/contrib/file/mygetopt.h - copied unchanged from r189173, head/contrib/file/mygetopt.h projects/jbuild/contrib/file/tests/ - copied from r189173, head/contrib/file/tests/ projects/jbuild/contrib/file/vasprintf.c - copied unchanged from r189173, head/contrib/file/vasprintf.c projects/jbuild/contrib/gdtoa/gdtoa_fltrnds.h - copied unchanged from r189173, head/contrib/gdtoa/gdtoa_fltrnds.h projects/jbuild/contrib/gdtoa/test/obad/ - copied from r189173, head/contrib/gdtoa/test/obad/ projects/jbuild/contrib/openbsm/bin/auditd/auditd_darwin.c - copied unchanged from r189173, head/contrib/openbsm/bin/auditd/auditd_darwin.c projects/jbuild/contrib/openbsm/bin/auditd/auditd_fbsd.c - copied unchanged from r189173, head/contrib/openbsm/bin/auditd/auditd_fbsd.c projects/jbuild/contrib/openbsm/bsm/auditd_lib.h - copied unchanged from r189173, head/contrib/openbsm/bsm/auditd_lib.h projects/jbuild/contrib/openbsm/libauditd/ - copied from r189173, head/contrib/openbsm/libauditd/ projects/jbuild/contrib/openbsm/libbsm/au_domain.3 - copied unchanged from r189173, head/contrib/openbsm/libbsm/au_domain.3 projects/jbuild/contrib/openbsm/libbsm/au_errno.3 - copied unchanged from r189173, head/contrib/openbsm/libbsm/au_errno.3 projects/jbuild/contrib/openbsm/libbsm/au_socket_type.3 - copied unchanged from r189173, head/contrib/openbsm/libbsm/au_socket_type.3 projects/jbuild/contrib/openbsm/libbsm/bsm_domain.c - copied unchanged from r189173, head/contrib/openbsm/libbsm/bsm_domain.c projects/jbuild/contrib/openbsm/libbsm/bsm_errno.c - copied unchanged from r189173, head/contrib/openbsm/libbsm/bsm_errno.c projects/jbuild/contrib/openbsm/libbsm/bsm_socket_type.c - copied unchanged from r189173, head/contrib/openbsm/libbsm/bsm_socket_type.c projects/jbuild/contrib/openbsm/sys/bsm/audit_domain.h - copied unchanged from r189173, head/contrib/openbsm/sys/bsm/audit_domain.h projects/jbuild/contrib/openbsm/sys/bsm/audit_errno.h - copied unchanged from r189173, head/contrib/openbsm/sys/bsm/audit_errno.h projects/jbuild/contrib/openbsm/sys/bsm/audit_socket_type.h - copied unchanged from r189173, head/contrib/openbsm/sys/bsm/audit_socket_type.h projects/jbuild/contrib/openbsm/test/reference/E2BIG_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/E2BIG_record projects/jbuild/contrib/openbsm/test/reference/EACCES_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EACCES_record projects/jbuild/contrib/openbsm/test/reference/EBADF_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EBADF_record projects/jbuild/contrib/openbsm/test/reference/EBUSY_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EBUSY_record projects/jbuild/contrib/openbsm/test/reference/ECHILD_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ECHILD_record projects/jbuild/contrib/openbsm/test/reference/EDEADLK_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EDEADLK_record projects/jbuild/contrib/openbsm/test/reference/EEXIST_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EEXIST_record projects/jbuild/contrib/openbsm/test/reference/EFAULT_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EFAULT_record projects/jbuild/contrib/openbsm/test/reference/EFBIG_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EFBIG_record projects/jbuild/contrib/openbsm/test/reference/EINTR_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EINTR_record projects/jbuild/contrib/openbsm/test/reference/EINVAL_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EINVAL_record projects/jbuild/contrib/openbsm/test/reference/EIO_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EIO_record projects/jbuild/contrib/openbsm/test/reference/EISDIR_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EISDIR_record projects/jbuild/contrib/openbsm/test/reference/EMFILE_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EMFILE_record projects/jbuild/contrib/openbsm/test/reference/EMLINK_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EMLINK_record projects/jbuild/contrib/openbsm/test/reference/ENFILE_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ENFILE_record projects/jbuild/contrib/openbsm/test/reference/ENODEV_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ENODEV_record projects/jbuild/contrib/openbsm/test/reference/ENOENT_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ENOENT_record projects/jbuild/contrib/openbsm/test/reference/ENOEXEC_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ENOEXEC_record projects/jbuild/contrib/openbsm/test/reference/ENOMEM_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ENOMEM_record projects/jbuild/contrib/openbsm/test/reference/ENOSPC_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ENOSPC_record projects/jbuild/contrib/openbsm/test/reference/ENOTBLK_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ENOTBLK_record projects/jbuild/contrib/openbsm/test/reference/ENOTDIR_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ENOTDIR_record projects/jbuild/contrib/openbsm/test/reference/ENOTTY_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ENOTTY_record projects/jbuild/contrib/openbsm/test/reference/ENXIO_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ENXIO_record projects/jbuild/contrib/openbsm/test/reference/EPERM_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EPERM_record projects/jbuild/contrib/openbsm/test/reference/EPIPE_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EPIPE_record projects/jbuild/contrib/openbsm/test/reference/EROFS_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EROFS_record projects/jbuild/contrib/openbsm/test/reference/ESPIPE_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ESPIPE_record projects/jbuild/contrib/openbsm/test/reference/ESRCH_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ESRCH_record projects/jbuild/contrib/openbsm/test/reference/ETXTBSY_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/ETXTBSY_record projects/jbuild/contrib/openbsm/test/reference/EXDEV_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/EXDEV_record projects/jbuild/contrib/openbsm/test/reference/socketex_record - copied unchanged from r189173, head/contrib/openbsm/test/reference/socketex_record projects/jbuild/contrib/openbsm/test/reference/socketex_token - copied unchanged from r189173, head/contrib/openbsm/test/reference/socketex_token projects/jbuild/gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c - copied unchanged from r189173, head/gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c projects/jbuild/gnu/usr.bin/gdb/gdbserver/reg-ppc.c - copied unchanged from r189173, head/gnu/usr.bin/gdb/gdbserver/reg-ppc.c projects/jbuild/lib/libarchive/test/test_write_disk_failures.c - copied unchanged from r189173, head/lib/libarchive/test/test_write_disk_failures.c projects/jbuild/lib/libarchive/test/test_write_disk_sparse.c - copied unchanged from r189173, head/lib/libarchive/test/test_write_disk_sparse.c projects/jbuild/lib/libauditd/ - copied from r189173, head/lib/libauditd/ projects/jbuild/lib/libc/gen/fdevname.c - copied unchanged from r189173, head/lib/libc/gen/fdevname.c projects/jbuild/lib/libc/stdio/getdelim.c - copied unchanged from r189173, head/lib/libc/stdio/getdelim.c projects/jbuild/lib/libc/stdio/getline.3 - copied unchanged from r189173, head/lib/libc/stdio/getline.3 projects/jbuild/lib/libc/stdio/getline.c - copied unchanged from r189173, head/lib/libc/stdio/getline.c projects/jbuild/lib/libc/stdio/printfcommon.h - copied unchanged from r189173, head/lib/libc/stdio/printfcommon.h projects/jbuild/lib/libc/string/stpncpy.c - copied unchanged from r189173, head/lib/libc/string/stpncpy.c projects/jbuild/lib/libc/string/strnlen.c - copied unchanged from r189173, head/lib/libc/string/strnlen.c projects/jbuild/lib/libc/string/wcscasecmp.c - copied unchanged from r189173, head/lib/libc/string/wcscasecmp.c projects/jbuild/lib/libc/string/wcsncasecmp.c - copied unchanged from r189173, head/lib/libc/string/wcsncasecmp.c projects/jbuild/lib/libc/string/wcsnlen.c - copied unchanged from r189173, head/lib/libc/string/wcsnlen.c projects/jbuild/lib/libelf/README - copied unchanged from r189173, head/lib/libelf/README projects/jbuild/lib/libmp/Symbol.map - copied unchanged from r189173, head/lib/libmp/Symbol.map projects/jbuild/lib/libusbhid/descr_compat.c - copied unchanged from r189173, head/lib/libusbhid/descr_compat.c projects/jbuild/sbin/ipfw/altq.c - copied unchanged from r189173, head/sbin/ipfw/altq.c projects/jbuild/sbin/ipfw/dummynet.c - copied unchanged from r189173, head/sbin/ipfw/dummynet.c projects/jbuild/sbin/ipfw/ipfw2.h - copied unchanged from r189173, head/sbin/ipfw/ipfw2.h projects/jbuild/sbin/ipfw/ipv6.c - copied unchanged from r189173, head/sbin/ipfw/ipv6.c projects/jbuild/sbin/ipfw/main.c - copied unchanged from r189173, head/sbin/ipfw/main.c projects/jbuild/sbin/ipfw/nat.c - copied unchanged from r189173, head/sbin/ipfw/nat.c projects/jbuild/share/man/man4/man4.powerpc/snd_ai2s.4 - copied unchanged from r189173, head/share/man/man4/man4.powerpc/snd_ai2s.4 projects/jbuild/share/man/man4/man4.powerpc/snd_davbus.4 - copied unchanged from r189173, head/share/man/man4/man4.powerpc/snd_davbus.4 projects/jbuild/share/man/man4/urtw.4 - copied unchanged from r189173, head/share/man/man4/urtw.4 projects/jbuild/share/man/man5/portindex.5 - copied unchanged from r189173, head/share/man/man5/portindex.5 projects/jbuild/share/man/man7/adding_user.7 - copied unchanged from r189173, head/share/man/man7/adding_user.7 projects/jbuild/tools/regression/file/newfileops_on_fork/ - copied from r189173, head/tools/regression/file/newfileops_on_fork/ projects/jbuild/tools/regression/lib/libc/stdio/test-getdelim.c - copied unchanged from r189173, head/tools/regression/lib/libc/stdio/test-getdelim.c projects/jbuild/tools/regression/lib/libc/stdio/test-printbasic.c - copied unchanged from r189173, head/tools/regression/lib/libc/stdio/test-printbasic.c projects/jbuild/tools/regression/lib/libc/string/test-stpncpy.c - copied unchanged from r189173, head/tools/regression/lib/libc/string/test-stpncpy.c projects/jbuild/tools/regression/lib/libc/string/test-wcscasecmp.c - copied unchanged from r189173, head/tools/regression/lib/libc/string/test-wcscasecmp.c projects/jbuild/tools/regression/lib/libc/string/test-wcsnlen.c - copied unchanged from r189173, head/tools/regression/lib/libc/string/test-wcsnlen.c projects/jbuild/tools/regression/lib/msun/test-conj.c - copied unchanged from r189173, head/tools/regression/lib/msun/test-conj.c projects/jbuild/tools/regression/lib/msun/test-conj.t - copied unchanged from r189173, head/tools/regression/lib/msun/test-conj.t projects/jbuild/tools/regression/usr.bin/jot/regress.wX1.out - copied unchanged from r189173, head/tools/regression/usr.bin/jot/regress.wX1.out projects/jbuild/tools/tools/ath/athrd/ - copied from r189173, head/tools/tools/ath/athrd/ projects/jbuild/tools/tools/cfi/ - copied from r189173, head/tools/tools/cfi/ projects/jbuild/tools/tools/nanobsd/gateworks/ - copied from r189173, head/tools/tools/nanobsd/gateworks/ projects/jbuild/tools/tools/nanobsd/rescue/ - copied from r189173, head/tools/tools/nanobsd/rescue/ projects/jbuild/tools/tools/net80211/scripts/setup.tdma-master - copied unchanged from r189173, head/tools/tools/net80211/scripts/setup.tdma-master projects/jbuild/tools/tools/net80211/scripts/setup.tdma-slave - copied unchanged from r189173, head/tools/tools/net80211/scripts/setup.tdma-slave projects/jbuild/tools/tools/net80211/wlantxtime/ - copied from r189173, head/tools/tools/net80211/wlantxtime/ projects/jbuild/tools/tools/sysbuild/ - copied from r189173, head/tools/tools/sysbuild/ projects/jbuild/usr.bin/mail/util.c - copied unchanged from r189173, head/usr.bin/mail/util.c projects/jbuild/usr.bin/truss/mips-fbsd.c - copied unchanged from r189173, head/usr.bin/truss/mips-fbsd.c projects/jbuild/usr.sbin/bluetooth/btpand/ - copied from r189173, head/usr.sbin/bluetooth/btpand/ projects/jbuild/usr.sbin/dumpcis/cardinfo.h - copied unchanged from r189173, head/usr.sbin/dumpcis/cardinfo.h projects/jbuild/usr.sbin/dumpcis/cis.h - copied unchanged from r189173, head/usr.sbin/dumpcis/cis.h projects/jbuild/usr.sbin/i2c/ - copied from r189173, head/usr.sbin/i2c/ Replaced: projects/jbuild/contrib/file/FREEBSD-upgrade - copied unchanged from r189173, head/contrib/file/FREEBSD-upgrade projects/jbuild/contrib/file/magic2mime - copied unchanged from r189173, head/contrib/file/magic2mime Deleted: projects/jbuild/contrib/file/LEGAL.NOTICE projects/jbuild/contrib/file/Makefile.std projects/jbuild/contrib/file/PORTING projects/jbuild/contrib/file/configure.in projects/jbuild/contrib/file/magic.mime projects/jbuild/contrib/file/mkinstalldirs projects/jbuild/contrib/file/test.c projects/jbuild/gnu/games/ projects/jbuild/share/man/man8/adding_user.8 projects/jbuild/tools/regression/usr.bin/jot/regress.wX.out projects/jbuild/usr.bin/mail/aux.c projects/jbuild/usr.bin/netstat/mcast.c projects/jbuild/usr.sbin/pccard/ projects/jbuild/usr.sbin/sysinstall/pccard.c Modified: projects/jbuild/ (props changed) projects/jbuild/Makefile.inc1 projects/jbuild/ObsoleteFiles.inc projects/jbuild/UPDATING projects/jbuild/bin/chmod/chmod.1 projects/jbuild/bin/dd/dd.1 projects/jbuild/bin/kenv/kenv.1 projects/jbuild/bin/ln/ln.1 projects/jbuild/bin/pax/file_subs.c projects/jbuild/bin/ps/extern.h projects/jbuild/bin/ps/keyword.c projects/jbuild/bin/ps/print.c projects/jbuild/bin/test/test.1 projects/jbuild/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c projects/jbuild/contrib/bind9/ (props changed) projects/jbuild/contrib/bind9/CHANGES projects/jbuild/contrib/bind9/lib/dns/api projects/jbuild/contrib/bind9/lib/dns/openssldsa_link.c projects/jbuild/contrib/bind9/lib/dns/opensslrsa_link.c projects/jbuild/contrib/bind9/lib/isc/unix/socket.c projects/jbuild/contrib/bind9/version projects/jbuild/contrib/bsnmp/snmp_mibII/mibII.c projects/jbuild/contrib/cpio/ (props changed) projects/jbuild/contrib/csup/ (props changed) projects/jbuild/contrib/csup/GNUmakefile projects/jbuild/contrib/csup/Makefile projects/jbuild/contrib/csup/TODO projects/jbuild/contrib/csup/config.c projects/jbuild/contrib/csup/csup.1 projects/jbuild/contrib/csup/detailer.c projects/jbuild/contrib/csup/diff.c projects/jbuild/contrib/csup/diff.h projects/jbuild/contrib/csup/fattr.c projects/jbuild/contrib/csup/fattr.h projects/jbuild/contrib/csup/keyword.c projects/jbuild/contrib/csup/keyword.h projects/jbuild/contrib/csup/lister.c projects/jbuild/contrib/csup/misc.c projects/jbuild/contrib/csup/misc.h projects/jbuild/contrib/csup/mux.c projects/jbuild/contrib/csup/proto.c projects/jbuild/contrib/csup/proto.h projects/jbuild/contrib/csup/status.c projects/jbuild/contrib/csup/stream.c projects/jbuild/contrib/csup/stream.h projects/jbuild/contrib/csup/updater.c projects/jbuild/contrib/file/ (props changed) projects/jbuild/contrib/file/ChangeLog projects/jbuild/contrib/file/MAINT projects/jbuild/contrib/file/Magdir/adventure projects/jbuild/contrib/file/Magdir/animation projects/jbuild/contrib/file/Magdir/apple projects/jbuild/contrib/file/Magdir/archive projects/jbuild/contrib/file/Magdir/audio projects/jbuild/contrib/file/Magdir/c-lang projects/jbuild/contrib/file/Magdir/c64 projects/jbuild/contrib/file/Magdir/cafebabe projects/jbuild/contrib/file/Magdir/cddb projects/jbuild/contrib/file/Magdir/commands projects/jbuild/contrib/file/Magdir/compress projects/jbuild/contrib/file/Magdir/console projects/jbuild/contrib/file/Magdir/cracklib projects/jbuild/contrib/file/Magdir/ctags projects/jbuild/contrib/file/Magdir/database projects/jbuild/contrib/file/Magdir/diff projects/jbuild/contrib/file/Magdir/dump projects/jbuild/contrib/file/Magdir/elf projects/jbuild/contrib/file/Magdir/filesystems projects/jbuild/contrib/file/Magdir/flash projects/jbuild/contrib/file/Magdir/fonts projects/jbuild/contrib/file/Magdir/fortran projects/jbuild/contrib/file/Magdir/frame projects/jbuild/contrib/file/Magdir/freebsd projects/jbuild/contrib/file/Magdir/fsav projects/jbuild/contrib/file/Magdir/games projects/jbuild/contrib/file/Magdir/gimp projects/jbuild/contrib/file/Magdir/gnu projects/jbuild/contrib/file/Magdir/hp projects/jbuild/contrib/file/Magdir/iff projects/jbuild/contrib/file/Magdir/images projects/jbuild/contrib/file/Magdir/java projects/jbuild/contrib/file/Magdir/jpeg projects/jbuild/contrib/file/Magdir/lex projects/jbuild/contrib/file/Magdir/linux projects/jbuild/contrib/file/Magdir/lisp projects/jbuild/contrib/file/Magdir/macintosh projects/jbuild/contrib/file/Magdir/mail.news projects/jbuild/contrib/file/Magdir/mathematica projects/jbuild/contrib/file/Magdir/misctools projects/jbuild/contrib/file/Magdir/msdos projects/jbuild/contrib/file/Magdir/mup projects/jbuild/contrib/file/Magdir/os2 projects/jbuild/contrib/file/Magdir/palm projects/jbuild/contrib/file/Magdir/pdf projects/jbuild/contrib/file/Magdir/perl projects/jbuild/contrib/file/Magdir/pgp projects/jbuild/contrib/file/Magdir/pkgadd projects/jbuild/contrib/file/Magdir/printer projects/jbuild/contrib/file/Magdir/psion projects/jbuild/contrib/file/Magdir/revision projects/jbuild/contrib/file/Magdir/riff projects/jbuild/contrib/file/Magdir/rpm projects/jbuild/contrib/file/Magdir/rtf projects/jbuild/contrib/file/Magdir/sc projects/jbuild/contrib/file/Magdir/scientific projects/jbuild/contrib/file/Magdir/sgi projects/jbuild/contrib/file/Magdir/sgml projects/jbuild/contrib/file/Magdir/sharc projects/jbuild/contrib/file/Magdir/sketch projects/jbuild/contrib/file/Magdir/softquad projects/jbuild/contrib/file/Magdir/spectrum projects/jbuild/contrib/file/Magdir/tex projects/jbuild/contrib/file/Magdir/troff projects/jbuild/contrib/file/Magdir/unicode projects/jbuild/contrib/file/Magdir/uuencode projects/jbuild/contrib/file/Magdir/varied.script projects/jbuild/contrib/file/Magdir/vorbis projects/jbuild/contrib/file/Magdir/wordprocessors projects/jbuild/contrib/file/Makefile.am projects/jbuild/contrib/file/Makefile.in projects/jbuild/contrib/file/README projects/jbuild/contrib/file/acinclude.m4 projects/jbuild/contrib/file/aclocal.m4 projects/jbuild/contrib/file/apprentice.c projects/jbuild/contrib/file/ascmagic.c projects/jbuild/contrib/file/compress.c projects/jbuild/contrib/file/config.h.in projects/jbuild/contrib/file/configure projects/jbuild/contrib/file/file.c projects/jbuild/contrib/file/file.h projects/jbuild/contrib/file/file.man projects/jbuild/contrib/file/fsmagic.c projects/jbuild/contrib/file/funcs.c projects/jbuild/contrib/file/is_tar.c projects/jbuild/contrib/file/libmagic.man projects/jbuild/contrib/file/magic.c projects/jbuild/contrib/file/magic.h projects/jbuild/contrib/file/magic.man projects/jbuild/contrib/file/names.h projects/jbuild/contrib/file/patchlevel.h projects/jbuild/contrib/file/print.c projects/jbuild/contrib/file/readelf.c projects/jbuild/contrib/file/readelf.h projects/jbuild/contrib/file/softmagic.c projects/jbuild/contrib/file/tar.h projects/jbuild/contrib/gdtoa/ (props changed) projects/jbuild/contrib/gdtoa/README projects/jbuild/contrib/gdtoa/g_Qfmt.c projects/jbuild/contrib/gdtoa/g__fmt.c projects/jbuild/contrib/gdtoa/g_ddfmt.c projects/jbuild/contrib/gdtoa/g_dfmt.c projects/jbuild/contrib/gdtoa/g_ffmt.c projects/jbuild/contrib/gdtoa/g_xLfmt.c projects/jbuild/contrib/gdtoa/g_xfmt.c projects/jbuild/contrib/gdtoa/gdtoa.c projects/jbuild/contrib/gdtoa/gdtoa.h projects/jbuild/contrib/gdtoa/gdtoaimp.h projects/jbuild/contrib/gdtoa/gethex.c projects/jbuild/contrib/gdtoa/makefile projects/jbuild/contrib/gdtoa/smisc.c projects/jbuild/contrib/gdtoa/strtod.c projects/jbuild/contrib/gdtoa/strtodg.c projects/jbuild/contrib/gdtoa/strtof.c projects/jbuild/contrib/gdtoa/strtopQ.c projects/jbuild/contrib/gdtoa/strtopd.c projects/jbuild/contrib/gdtoa/strtopdd.c projects/jbuild/contrib/gdtoa/strtopf.c projects/jbuild/contrib/gdtoa/strtopx.c projects/jbuild/contrib/gdtoa/strtopxL.c projects/jbuild/contrib/gdtoa/test/README projects/jbuild/contrib/gdtoa/test/getround.c projects/jbuild/contrib/gdtoa/test/makefile projects/jbuild/contrib/gdtoa/test/xsum0.out projects/jbuild/contrib/gdtoa/xsum0.out projects/jbuild/contrib/less/line.c projects/jbuild/contrib/lukemftpd/src/extern.h projects/jbuild/contrib/lukemftpd/src/ftpcmd.y projects/jbuild/contrib/lukemftpd/src/ftpd.c projects/jbuild/contrib/ncurses/ (props changed) projects/jbuild/contrib/netcat/ (props changed) projects/jbuild/contrib/ntp/ (props changed) projects/jbuild/contrib/ntp/ntpd/ntp_crypto.c projects/jbuild/contrib/openbsm/ (props changed) projects/jbuild/contrib/openbsm/INSTALL projects/jbuild/contrib/openbsm/Makefile.am projects/jbuild/contrib/openbsm/Makefile.in projects/jbuild/contrib/openbsm/NEWS projects/jbuild/contrib/openbsm/README projects/jbuild/contrib/openbsm/TODO projects/jbuild/contrib/openbsm/VERSION projects/jbuild/contrib/openbsm/bin/Makefile.in projects/jbuild/contrib/openbsm/bin/audit/Makefile.am projects/jbuild/contrib/openbsm/bin/audit/Makefile.in projects/jbuild/contrib/openbsm/bin/audit/audit.8 projects/jbuild/contrib/openbsm/bin/audit/audit.c projects/jbuild/contrib/openbsm/bin/auditd/Makefile.am projects/jbuild/contrib/openbsm/bin/auditd/Makefile.in projects/jbuild/contrib/openbsm/bin/auditd/audit_warn.c projects/jbuild/contrib/openbsm/bin/auditd/auditd.8 projects/jbuild/contrib/openbsm/bin/auditd/auditd.c projects/jbuild/contrib/openbsm/bin/auditd/auditd.h projects/jbuild/contrib/openbsm/bin/auditfilterd/Makefile.in projects/jbuild/contrib/openbsm/bin/auditreduce/Makefile.in projects/jbuild/contrib/openbsm/bin/auditreduce/auditreduce.c projects/jbuild/contrib/openbsm/bin/praudit/Makefile.in projects/jbuild/contrib/openbsm/bsm/Makefile.am projects/jbuild/contrib/openbsm/bsm/Makefile.in projects/jbuild/contrib/openbsm/bsm/audit_uevents.h projects/jbuild/contrib/openbsm/bsm/libbsm.h projects/jbuild/contrib/openbsm/compat/endian.h projects/jbuild/contrib/openbsm/config/config.h projects/jbuild/contrib/openbsm/config/config.h.in projects/jbuild/contrib/openbsm/configure projects/jbuild/contrib/openbsm/configure.ac projects/jbuild/contrib/openbsm/etc/audit_event projects/jbuild/contrib/openbsm/libbsm/Makefile.am projects/jbuild/contrib/openbsm/libbsm/Makefile.in projects/jbuild/contrib/openbsm/libbsm/au_token.3 projects/jbuild/contrib/openbsm/libbsm/audit_submit.3 projects/jbuild/contrib/openbsm/libbsm/bsm_audit.c projects/jbuild/contrib/openbsm/libbsm/bsm_class.c projects/jbuild/contrib/openbsm/libbsm/bsm_control.c projects/jbuild/contrib/openbsm/libbsm/bsm_event.c projects/jbuild/contrib/openbsm/libbsm/bsm_io.c projects/jbuild/contrib/openbsm/libbsm/bsm_mask.c projects/jbuild/contrib/openbsm/libbsm/bsm_token.c projects/jbuild/contrib/openbsm/libbsm/bsm_user.c projects/jbuild/contrib/openbsm/libbsm/bsm_wrappers.c projects/jbuild/contrib/openbsm/libbsm/libbsm.3 projects/jbuild/contrib/openbsm/man/Makefile.in projects/jbuild/contrib/openbsm/man/audit.log.5 projects/jbuild/contrib/openbsm/man/audit_user.5 projects/jbuild/contrib/openbsm/modules/Makefile.in projects/jbuild/contrib/openbsm/modules/auditfilter_noop/Makefile.in projects/jbuild/contrib/openbsm/sys/Makefile.in projects/jbuild/contrib/openbsm/sys/bsm/Makefile.am projects/jbuild/contrib/openbsm/sys/bsm/Makefile.in projects/jbuild/contrib/openbsm/sys/bsm/audit.h projects/jbuild/contrib/openbsm/sys/bsm/audit_internal.h projects/jbuild/contrib/openbsm/sys/bsm/audit_kevents.h projects/jbuild/contrib/openbsm/sys/bsm/audit_record.h projects/jbuild/contrib/openbsm/test/Makefile.in projects/jbuild/contrib/openbsm/test/bsm/Makefile.in projects/jbuild/contrib/openbsm/test/bsm/generate.c projects/jbuild/contrib/openbsm/test/reference/arg32_record projects/jbuild/contrib/openbsm/test/reference/data_record projects/jbuild/contrib/openbsm/test/reference/data_token projects/jbuild/contrib/openbsm/test/reference/file_record projects/jbuild/contrib/openbsm/test/reference/header32_token projects/jbuild/contrib/openbsm/test/reference/in_addr_record projects/jbuild/contrib/openbsm/test/reference/ip_record projects/jbuild/contrib/openbsm/test/reference/ipc_record projects/jbuild/contrib/openbsm/test/reference/iport_record projects/jbuild/contrib/openbsm/test/reference/opaque_record projects/jbuild/contrib/openbsm/test/reference/path_record projects/jbuild/contrib/openbsm/test/reference/process32_record projects/jbuild/contrib/openbsm/test/reference/process32ex_record-IPv4 projects/jbuild/contrib/openbsm/test/reference/process32ex_record-IPv6 projects/jbuild/contrib/openbsm/test/reference/process64_record projects/jbuild/contrib/openbsm/test/reference/process64ex_record-IPv4 projects/jbuild/contrib/openbsm/test/reference/process64ex_record-IPv6 projects/jbuild/contrib/openbsm/test/reference/return32_record projects/jbuild/contrib/openbsm/test/reference/return32_token projects/jbuild/contrib/openbsm/test/reference/seq_record projects/jbuild/contrib/openbsm/test/reference/subject32_record projects/jbuild/contrib/openbsm/test/reference/subject32ex_record projects/jbuild/contrib/openbsm/test/reference/text_record projects/jbuild/contrib/openbsm/test/reference/zonename_record projects/jbuild/contrib/openbsm/tools/Makefile.in projects/jbuild/contrib/openpam/ (props changed) projects/jbuild/contrib/openpam/include/security/openpam.h projects/jbuild/contrib/openpam/lib/openpam_dynamic.c projects/jbuild/contrib/opie/opiekey.1 projects/jbuild/contrib/pf/ (props changed) projects/jbuild/contrib/sendmail/ (props changed) projects/jbuild/contrib/smbfs/mount_smbfs/mount_smbfs.8 projects/jbuild/contrib/smbfs/mount_smbfs/mount_smbfs.c projects/jbuild/contrib/telnet/libtelnet/pk.c projects/jbuild/contrib/telnet/telnetd/sys_term.c projects/jbuild/contrib/top/ (props changed) projects/jbuild/contrib/wpa_supplicant/ (props changed) projects/jbuild/contrib/wpa_supplicant/ChangeLog projects/jbuild/contrib/wpa_supplicant/Makefile projects/jbuild/contrib/wpa_supplicant/base64.c projects/jbuild/contrib/wpa_supplicant/ctrl_iface.c projects/jbuild/contrib/wpa_supplicant/ctrl_iface_dbus.c projects/jbuild/contrib/wpa_supplicant/ctrl_iface_unix.c projects/jbuild/contrib/wpa_supplicant/dbus_dict_helpers.c projects/jbuild/contrib/wpa_supplicant/doc/docbook/wpa_background.8 projects/jbuild/contrib/wpa_supplicant/doc/docbook/wpa_cli.8 projects/jbuild/contrib/wpa_supplicant/doc/docbook/wpa_cli.sgml projects/jbuild/contrib/wpa_supplicant/doc/docbook/wpa_passphrase.8 projects/jbuild/contrib/wpa_supplicant/doc/docbook/wpa_supplicant.8 projects/jbuild/contrib/wpa_supplicant/doc/docbook/wpa_supplicant.conf.5 projects/jbuild/contrib/wpa_supplicant/doc/docbook/wpa_supplicant.conf.sgml projects/jbuild/contrib/wpa_supplicant/doc/docbook/wpa_supplicant.sgml projects/jbuild/contrib/wpa_supplicant/driver_ndis.c projects/jbuild/contrib/wpa_supplicant/eap.c projects/jbuild/contrib/wpa_supplicant/eap_aka.c projects/jbuild/contrib/wpa_supplicant/eap_gpsk.c projects/jbuild/contrib/wpa_supplicant/eap_gpsk_common.c projects/jbuild/contrib/wpa_supplicant/eap_ttls.c projects/jbuild/contrib/wpa_supplicant/eloop.c projects/jbuild/contrib/wpa_supplicant/eloop.h projects/jbuild/contrib/wpa_supplicant/eloop_none.c projects/jbuild/contrib/wpa_supplicant/mlme.c projects/jbuild/contrib/wpa_supplicant/os_unix.c projects/jbuild/contrib/wpa_supplicant/preauth_test.c projects/jbuild/contrib/wpa_supplicant/radius.c projects/jbuild/contrib/wpa_supplicant/sha1.c projects/jbuild/contrib/wpa_supplicant/tls_openssl.c projects/jbuild/contrib/wpa_supplicant/version.h projects/jbuild/contrib/wpa_supplicant/wpa.c projects/jbuild/contrib/wpa_supplicant/wpa.h projects/jbuild/contrib/wpa_supplicant/wpa_cli.c projects/jbuild/contrib/wpa_supplicant/wpa_gui-qt4/networkconfig.cpp projects/jbuild/contrib/wpa_supplicant/wpa_gui-qt4/scanresults.cpp projects/jbuild/contrib/wpa_supplicant/wpa_gui-qt4/wpagui.cpp projects/jbuild/contrib/wpa_supplicant/wpa_gui/networkconfig.ui.h projects/jbuild/contrib/wpa_supplicant/wpa_gui/userdatarequest.ui.h projects/jbuild/contrib/wpa_supplicant/wpa_gui/wpagui.ui.h projects/jbuild/contrib/wpa_supplicant/wpa_i.h projects/jbuild/contrib/wpa_supplicant/wpa_supplicant.c projects/jbuild/crypto/openssh/ (props changed) projects/jbuild/crypto/openssl/ (props changed) projects/jbuild/crypto/openssl/apps/speed.c projects/jbuild/crypto/openssl/apps/spkac.c projects/jbuild/crypto/openssl/apps/verify.c projects/jbuild/crypto/openssl/apps/x509.c projects/jbuild/crypto/openssl/ssl/s2_clnt.c projects/jbuild/crypto/openssl/ssl/s2_srvr.c projects/jbuild/crypto/openssl/ssl/s3_clnt.c projects/jbuild/crypto/openssl/ssl/s3_srvr.c projects/jbuild/crypto/openssl/ssl/ssltest.c projects/jbuild/etc/defaults/rc.conf projects/jbuild/etc/devd.conf projects/jbuild/etc/etc.amd64/ttys projects/jbuild/etc/etc.arm/ttys projects/jbuild/etc/etc.i386/ttys projects/jbuild/etc/etc.ia64/ttys projects/jbuild/etc/etc.mips/ttys projects/jbuild/etc/etc.powerpc/ttys projects/jbuild/etc/etc.sparc64/ttys projects/jbuild/etc/mtree/BSD.include.dist projects/jbuild/etc/network.subr projects/jbuild/etc/periodic/weekly/Makefile projects/jbuild/etc/rc.d/defaultroute projects/jbuild/etc/rc.d/jail projects/jbuild/etc/rc.d/named projects/jbuild/etc/rc.shutdown projects/jbuild/etc/regdomain.xml projects/jbuild/games/fortune/datfiles/freebsd-tips projects/jbuild/gnu/lib/csu/Makefile projects/jbuild/gnu/lib/libgcc/Makefile projects/jbuild/gnu/lib/libssp/Makefile projects/jbuild/gnu/lib/libstdc++/Makefile projects/jbuild/gnu/usr.bin/gdb/Makefile projects/jbuild/gnu/usr.bin/gdb/gdbserver/Makefile projects/jbuild/gnu/usr.bin/grep/savedir.c projects/jbuild/gnu/usr.bin/groff/tmac/mdoc.local projects/jbuild/gnu/usr.bin/man/manpath/manpath.config projects/jbuild/include/Makefile projects/jbuild/include/paths.h projects/jbuild/include/stdio.h projects/jbuild/include/stdlib.h projects/jbuild/include/string.h projects/jbuild/include/wchar.h projects/jbuild/lib/Makefile projects/jbuild/lib/csu/Makefile.inc projects/jbuild/lib/libarchive/archive_read_support_compression_gzip.c projects/jbuild/lib/libarchive/archive_read_support_format_ar.c projects/jbuild/lib/libarchive/archive_read_support_format_iso9660.c projects/jbuild/lib/libarchive/archive_write_disk.c projects/jbuild/lib/libarchive/test/Makefile projects/jbuild/lib/libarchive/test/test_write_disk_secure.c projects/jbuild/lib/libbsm/Makefile projects/jbuild/lib/libc/ (props changed) projects/jbuild/lib/libc/arm/sys/Ovfork.S projects/jbuild/lib/libc/db/man/dbm.3 projects/jbuild/lib/libc/gen/Makefile.inc projects/jbuild/lib/libc/gen/Symbol.map projects/jbuild/lib/libc/gen/devname.3 projects/jbuild/lib/libc/gen/getttyent.c projects/jbuild/lib/libc/gen/sysctl.3 projects/jbuild/lib/libc/gen/ttyname.c projects/jbuild/lib/libc/gen/ttyslot.c projects/jbuild/lib/libc/locale/mbstowcs.c projects/jbuild/lib/libc/locale/wcsftime.c projects/jbuild/lib/libc/locale/wcstombs.c projects/jbuild/lib/libc/mips/Symbol.map projects/jbuild/lib/libc/mips/sys/Ovfork.S projects/jbuild/lib/libc/net/getaddrinfo.3 projects/jbuild/lib/libc/net/getaddrinfo.c projects/jbuild/lib/libc/net/gethostbydns.c projects/jbuild/lib/libc/sparc64/sys/__sparc_utrap.c projects/jbuild/lib/libc/stdio/Makefile.inc projects/jbuild/lib/libc/stdio/Symbol.map projects/jbuild/lib/libc/stdio/ferror.3 projects/jbuild/lib/libc/stdio/fgetln.3 projects/jbuild/lib/libc/stdio/fgets.3 projects/jbuild/lib/libc/stdio/fputws.c projects/jbuild/lib/libc/stdio/printf-pos.c projects/jbuild/lib/libc/stdio/printf.3 projects/jbuild/lib/libc/stdio/stdio.3 projects/jbuild/lib/libc/stdio/vfprintf.c projects/jbuild/lib/libc/stdio/vfscanf.c projects/jbuild/lib/libc/stdio/vfwprintf.c projects/jbuild/lib/libc/stdio/vfwscanf.c projects/jbuild/lib/libc/stdio/vswscanf.c projects/jbuild/lib/libc/stdio/wsetup.c projects/jbuild/lib/libc/stdlib/atol.3 projects/jbuild/lib/libc/stdlib/ptsname.c projects/jbuild/lib/libc/stdtime/ (props changed) projects/jbuild/lib/libc/string/Makefile.inc projects/jbuild/lib/libc/string/Symbol.map projects/jbuild/lib/libc/string/ffs.3 projects/jbuild/lib/libc/string/ffsll.c (props changed) projects/jbuild/lib/libc/string/flsll.c (props changed) projects/jbuild/lib/libc/string/memccpy.c projects/jbuild/lib/libc/string/memchr.c projects/jbuild/lib/libc/string/memcmp.c projects/jbuild/lib/libc/string/memmem.c projects/jbuild/lib/libc/string/stpcpy.c projects/jbuild/lib/libc/string/strcasecmp.c projects/jbuild/lib/libc/string/strcasestr.c projects/jbuild/lib/libc/string/strcmp.c projects/jbuild/lib/libc/string/strcoll.c projects/jbuild/lib/libc/string/strcpy.3 projects/jbuild/lib/libc/string/strdup.c projects/jbuild/lib/libc/string/strlcat.c projects/jbuild/lib/libc/string/strlcpy.3 projects/jbuild/lib/libc/string/strlcpy.c projects/jbuild/lib/libc/string/strlen.3 projects/jbuild/lib/libc/string/strlen.c projects/jbuild/lib/libc/string/strmode.c projects/jbuild/lib/libc/string/strncmp.c projects/jbuild/lib/libc/string/strncpy.c projects/jbuild/lib/libc/string/strnstr.c projects/jbuild/lib/libc/string/strpbrk.c projects/jbuild/lib/libc/string/strsep.c projects/jbuild/lib/libc/string/strstr.c projects/jbuild/lib/libc/string/wcscat.c projects/jbuild/lib/libc/string/wcscmp.c projects/jbuild/lib/libc/string/wcscpy.c projects/jbuild/lib/libc/string/wcscspn.c projects/jbuild/lib/libc/string/wcslcat.c projects/jbuild/lib/libc/string/wcslcpy.c projects/jbuild/lib/libc/string/wcslen.c projects/jbuild/lib/libc/string/wcsncat.c projects/jbuild/lib/libc/string/wcsncmp.c projects/jbuild/lib/libc/string/wcspbrk.c projects/jbuild/lib/libc/string/wcsspn.c projects/jbuild/lib/libc/string/wcsstr.c projects/jbuild/lib/libc/string/wmemchr.3 projects/jbuild/lib/libc/string/wmemchr.c projects/jbuild/lib/libc/string/wmemcmp.c projects/jbuild/lib/libc/string/wmemcpy.c projects/jbuild/lib/libc/string/wmemmove.c projects/jbuild/lib/libc/string/wmemset.c projects/jbuild/lib/libc/sys/jail.2 projects/jbuild/lib/libc/sys/open.2 projects/jbuild/lib/libc/sys/send.2 projects/jbuild/lib/libc/sys/socket.2 projects/jbuild/lib/libc/sys/timer_create.2 projects/jbuild/lib/libc_r/Makefile projects/jbuild/lib/libc_r/uthread/uthread_init.c projects/jbuild/lib/libcompat/4.3/rexec.c projects/jbuild/lib/libdisk/open_disk.c projects/jbuild/lib/libkse/Makefile projects/jbuild/lib/libmagic/Makefile projects/jbuild/lib/libmd/mdX.3 projects/jbuild/lib/libmp/Makefile projects/jbuild/lib/libmp/libmp.3 projects/jbuild/lib/libmp/mp.h projects/jbuild/lib/libmp/mpasbn.c projects/jbuild/lib/libpam/modules/Makefile.inc projects/jbuild/lib/libpmc/libpmc.c projects/jbuild/lib/librpcsvc/rnusers.c projects/jbuild/lib/librpcsvc/rstat.c projects/jbuild/lib/librpcsvc/rwall.c projects/jbuild/lib/librpcsvc/secretkey.c projects/jbuild/lib/librpcsvc/xcrypt.c projects/jbuild/lib/libstand/Makefile projects/jbuild/lib/libstand/bootp.c projects/jbuild/lib/libtelnet/Makefile projects/jbuild/lib/libthr/Makefile projects/jbuild/lib/libusb20/libusb20.3 projects/jbuild/lib/libusb20/libusb20.c projects/jbuild/lib/libusb20/libusb20.h projects/jbuild/lib/libusb20/libusb20_compat01.c projects/jbuild/lib/libusb20/libusb20_desc.c projects/jbuild/lib/libusb20/libusb20_int.h projects/jbuild/lib/libusb20/libusb20_ugen20.c projects/jbuild/lib/libusbhid/Makefile projects/jbuild/lib/libusbhid/descr.c projects/jbuild/lib/libusbhid/usbhid.3 projects/jbuild/lib/libusbhid/usbhid.h projects/jbuild/lib/libusbhid/usbvar.h projects/jbuild/lib/libutil/ (props changed) projects/jbuild/lib/msun/src/e_rem_pio2.c projects/jbuild/lib/msun/src/e_rem_pio2f.c projects/jbuild/lib/msun/src/k_cosf.c projects/jbuild/lib/msun/src/k_sinf.c projects/jbuild/lib/msun/src/k_tanf.c projects/jbuild/lib/msun/src/math.h projects/jbuild/libexec/comsat/comsat.c projects/jbuild/libexec/ftpd/ftpd.8 projects/jbuild/libexec/rtld-elf/Makefile projects/jbuild/release/Makefile projects/jbuild/release/doc/en_US.ISO8859-1/relnotes/article.sgml projects/jbuild/release/picobsd/bridge/PICOBSD projects/jbuild/release/picobsd/bridge/PICOBSD.hints projects/jbuild/release/picobsd/bridge/crunch.conf projects/jbuild/release/picobsd/build/picobsd projects/jbuild/release/picobsd/floppy.tree/etc/ttys projects/jbuild/release/scripts/doFS.sh projects/jbuild/rescue/librescue/Makefile projects/jbuild/rescue/rescue/Makefile projects/jbuild/sbin/ (props changed) projects/jbuild/sbin/atacontrol/atacontrol.8 projects/jbuild/sbin/atacontrol/atacontrol.c projects/jbuild/sbin/dumpfs/dumpfs.8 projects/jbuild/sbin/dumpfs/dumpfs.c projects/jbuild/sbin/fdisk/fdisk.c projects/jbuild/sbin/fsck/fsck.8 projects/jbuild/sbin/fsck/fsck.c projects/jbuild/sbin/fsck/fsutil.h projects/jbuild/sbin/fsck_ffs/fsck.h projects/jbuild/sbin/fsck_ffs/fsck_ffs.8 projects/jbuild/sbin/fsck_ffs/fsutil.c projects/jbuild/sbin/fsck_ffs/inode.c projects/jbuild/sbin/fsck_ffs/main.c projects/jbuild/sbin/fsck_ffs/pass1.c projects/jbuild/sbin/fsck_ffs/setup.c projects/jbuild/sbin/geom/class/journal/gjournal.8 projects/jbuild/sbin/geom/class/part/geom_part.c projects/jbuild/sbin/geom/class/virstor/gvirstor.8 projects/jbuild/sbin/geom/core/geom.c projects/jbuild/sbin/ifconfig/ifclone.c projects/jbuild/sbin/ifconfig/ifconfig.8 projects/jbuild/sbin/ifconfig/ifconfig.c projects/jbuild/sbin/ifconfig/ifconfig.h projects/jbuild/sbin/ifconfig/ifieee80211.c projects/jbuild/sbin/ifconfig/ifvlan.c projects/jbuild/sbin/ifconfig/regdomain.c projects/jbuild/sbin/ifconfig/regdomain.h projects/jbuild/sbin/ipfw/Makefile projects/jbuild/sbin/ipfw/ipfw.8 projects/jbuild/sbin/ipfw/ipfw2.c projects/jbuild/sbin/md5/md5.1 projects/jbuild/sbin/mdconfig/mdconfig.8 projects/jbuild/sbin/mdconfig/mdconfig.c projects/jbuild/sbin/mount/mount.c projects/jbuild/sbin/mount_msdosfs/mount_msdosfs.8 projects/jbuild/sbin/mount_nfs/mount_nfs.c projects/jbuild/sbin/mount_ntfs/mount_ntfs.8 projects/jbuild/sbin/newfs/mkfs.c projects/jbuild/sbin/newfs/newfs.c projects/jbuild/sbin/newfs_msdos/newfs_msdos.c projects/jbuild/sbin/ping/ping.8 projects/jbuild/sbin/reboot/reboot.c projects/jbuild/sbin/recoverdisk/recoverdisk.c projects/jbuild/sbin/restore/interactive.c projects/jbuild/sbin/route/route.c projects/jbuild/share/examples/cvsup/refuse.README projects/jbuild/share/man/man4/Makefile projects/jbuild/share/man/man4/ae.4 projects/jbuild/share/man/man4/ath.4 projects/jbuild/share/man/man4/bce.4 projects/jbuild/share/man/man4/bge.4 projects/jbuild/share/man/man4/cd.4 projects/jbuild/share/man/man4/cpuctl.4 projects/jbuild/share/man/man4/gem.4 projects/jbuild/share/man/man4/geom.4 projects/jbuild/share/man/man4/hme.4 projects/jbuild/share/man/man4/iic.4 projects/jbuild/share/man/man4/iwi.4 projects/jbuild/share/man/man4/man4.powerpc/Makefile projects/jbuild/share/man/man4/ng_bpf.4 projects/jbuild/share/man/man4/nge.4 projects/jbuild/share/man/man4/re.4 projects/jbuild/share/man/man4/rum.4 projects/jbuild/share/man/man4/sdhci.4 projects/jbuild/share/man/man4/sk.4 projects/jbuild/share/man/man4/smb.4 projects/jbuild/share/man/man4/snd_hda.4 projects/jbuild/share/man/man4/snd_ich.4 projects/jbuild/share/man/man4/sysmouse.4 projects/jbuild/share/man/man4/u3g.4 projects/jbuild/share/man/man4/usb2_core.4 projects/jbuild/share/man/man5/Makefile projects/jbuild/share/man/man5/rc.conf.5 projects/jbuild/share/man/man5/src.conf.5 projects/jbuild/share/man/man7/Makefile projects/jbuild/share/man/man7/build.7 projects/jbuild/share/man/man7/hier.7 projects/jbuild/share/man/man7/ports.7 projects/jbuild/share/man/man7/tuning.7 projects/jbuild/share/man/man8/Makefile projects/jbuild/share/man/man9/Makefile projects/jbuild/share/man/man9/dev_clone.9 projects/jbuild/share/man/man9/disk.9 projects/jbuild/share/man/man9/domain.9 projects/jbuild/share/man/man9/insmntque.9 projects/jbuild/share/man/man9/kthread.9 projects/jbuild/share/man/man9/lock.9 projects/jbuild/share/man/man9/redzone.9 projects/jbuild/share/misc/bsd-family-tree projects/jbuild/share/misc/committers-ports.dot projects/jbuild/share/misc/committers-src.dot projects/jbuild/share/misc/pci_vendors projects/jbuild/share/mk/bsd.cpu.mk projects/jbuild/share/mk/bsd.libnames.mk projects/jbuild/share/mk/bsd.own.mk projects/jbuild/share/zoneinfo/ (props changed) projects/jbuild/share/zoneinfo/asia projects/jbuild/share/zoneinfo/backward projects/jbuild/share/zoneinfo/europe projects/jbuild/share/zoneinfo/leapseconds projects/jbuild/share/zoneinfo/northamerica projects/jbuild/share/zoneinfo/zone.tab projects/jbuild/tools/build/options/WITHOUT_LIBPTHREAD projects/jbuild/tools/build/options/makeman projects/jbuild/tools/regression/fstest/fstest.c projects/jbuild/tools/regression/fstest/tests/conf projects/jbuild/tools/regression/fstest/tests/misc.sh projects/jbuild/tools/regression/lib/libc/stdio/Makefile projects/jbuild/tools/regression/lib/libc/stdio/test-printfloat.c projects/jbuild/tools/regression/lib/libc/string/Makefile projects/jbuild/tools/regression/lib/libmp/test-libmp.c projects/jbuild/tools/regression/lib/msun/Makefile projects/jbuild/tools/regression/usr.bin/jot/regress.sh projects/jbuild/tools/sched/schedgraph.py projects/jbuild/tools/tools/README projects/jbuild/tools/tools/ath/Makefile projects/jbuild/tools/tools/ath/Makefile.inc projects/jbuild/tools/tools/ath/athdebug/athdebug.c projects/jbuild/tools/tools/ath/athregs/dumpregs_5416.c projects/jbuild/tools/tools/ath/athstats/Makefile projects/jbuild/tools/tools/ath/athstats/athstats.c projects/jbuild/tools/tools/ath/athstats/athstats.h projects/jbuild/tools/tools/ath/athstats/main.c projects/jbuild/tools/tools/nanobsd/gateworks/Files/ (props changed) projects/jbuild/tools/tools/nanobsd/gateworks/Files/root/ (props changed) projects/jbuild/tools/tools/nanobsd/gateworks/cfg/ (props changed) projects/jbuild/tools/tools/nanobsd/gateworks/cfg/ssh/ (props changed) projects/jbuild/tools/tools/net80211/Makefile projects/jbuild/tools/tools/net80211/wlanstats/main.c projects/jbuild/tools/tools/net80211/wlanstats/wlanstats.c projects/jbuild/tools/tools/usb/print-usb-if-vids.sh projects/jbuild/usr.bin/Makefile projects/jbuild/usr.bin/basename/basename.1 projects/jbuild/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c projects/jbuild/usr.bin/calendar/calendars/calendar.freebsd projects/jbuild/usr.bin/chkey/Makefile projects/jbuild/usr.bin/csplit/csplit.1 projects/jbuild/usr.bin/csup/ (props changed) projects/jbuild/usr.bin/csup/Makefile projects/jbuild/usr.bin/dirname/dirname.c projects/jbuild/usr.bin/fetch/fetch.c projects/jbuild/usr.bin/fstat/msdosfs.c projects/jbuild/usr.bin/gprof/gprof.c projects/jbuild/usr.bin/kdump/mkioctls projects/jbuild/usr.bin/ktrdump/ktrdump.c projects/jbuild/usr.bin/mail/Makefile projects/jbuild/usr.bin/make/Makefile projects/jbuild/usr.bin/make/buf.c projects/jbuild/usr.bin/make/globals.h projects/jbuild/usr.bin/make/job.c projects/jbuild/usr.bin/make/main.c projects/jbuild/usr.bin/make/make.1 projects/jbuild/usr.bin/make/suff.c projects/jbuild/usr.bin/make/var.c projects/jbuild/usr.bin/netstat/Makefile projects/jbuild/usr.bin/netstat/inet6.c projects/jbuild/usr.bin/netstat/main.c projects/jbuild/usr.bin/netstat/netstat.1 projects/jbuild/usr.bin/netstat/netstat.h projects/jbuild/usr.bin/netstat/unix.c projects/jbuild/usr.bin/newkey/Makefile projects/jbuild/usr.bin/newkey/generic.c projects/jbuild/usr.bin/newkey/newkey.c projects/jbuild/usr.bin/newkey/update.c projects/jbuild/usr.bin/nl/nl.c projects/jbuild/usr.bin/printenv/printenv.c projects/jbuild/usr.bin/procstat/ (props changed) projects/jbuild/usr.bin/sockstat/sockstat.c projects/jbuild/usr.bin/split/split.1 projects/jbuild/usr.bin/stat/stat.c projects/jbuild/usr.bin/talk/get_names.c projects/jbuild/usr.bin/tar/subst.c projects/jbuild/usr.bin/tar/write.c projects/jbuild/usr.bin/truncate/truncate.c projects/jbuild/usr.bin/truss/extern.h projects/jbuild/usr.bin/truss/main.c projects/jbuild/usr.bin/truss/truss.1 projects/jbuild/usr.bin/usbhidaction/usbhidaction.c projects/jbuild/usr.bin/usbhidctl/usbhid.c projects/jbuild/usr.bin/vmstat/vmstat.c projects/jbuild/usr.bin/window/compress.c projects/jbuild/usr.bin/window/context.c projects/jbuild/usr.bin/window/lcmd1.c projects/jbuild/usr.bin/window/lcmd2.c projects/jbuild/usr.bin/window/scanner.c projects/jbuild/usr.bin/window/startup.c projects/jbuild/usr.bin/window/string.c projects/jbuild/usr.bin/window/ttoutput.c projects/jbuild/usr.bin/window/tttermcap.c projects/jbuild/usr.bin/window/ttzapple.c projects/jbuild/usr.bin/window/var.c projects/jbuild/usr.bin/window/wwdump.c projects/jbuild/usr.bin/window/wwend.c projects/jbuild/usr.bin/window/wwenviron.c projects/jbuild/usr.bin/window/wwflush.c projects/jbuild/usr.bin/window/wwinit.c projects/jbuild/usr.bin/window/wwpty.c projects/jbuild/usr.bin/window/wwspawn.c projects/jbuild/usr.bin/window/xx.c projects/jbuild/usr.sbin/Makefile projects/jbuild/usr.sbin/auditd/Makefile projects/jbuild/usr.sbin/bluetooth/Makefile projects/jbuild/usr.sbin/bluetooth/bcmfw/bcmfw.c projects/jbuild/usr.sbin/bluetooth/hcsecd/hcsecd.c projects/jbuild/usr.sbin/bluetooth/hcseriald/hcseriald.c projects/jbuild/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c projects/jbuild/usr.sbin/boot0cfg/boot0cfg.8 projects/jbuild/usr.sbin/burncd/burncd.c projects/jbuild/usr.sbin/config/config.8 projects/jbuild/usr.sbin/config/main.c projects/jbuild/usr.sbin/cpucontrol/cpucontrol.8 projects/jbuild/usr.sbin/crunch/crunchgen/crunchgen.c projects/jbuild/usr.sbin/dumpcis/printcis.c projects/jbuild/usr.sbin/dumpcis/readcis.c projects/jbuild/usr.sbin/fifolog/lib/fifolog_reader.c projects/jbuild/usr.sbin/fifolog/lib/fifolog_write_poll.c projects/jbuild/usr.sbin/fwcontrol/fwcontrol.c projects/jbuild/usr.sbin/fwcontrol/fwdv.c projects/jbuild/usr.sbin/fwcontrol/fwmpegts.c projects/jbuild/usr.sbin/gssd/gssd.8 projects/jbuild/usr.sbin/ifmcstat/ifmcstat.8 projects/jbuild/usr.sbin/ifmcstat/ifmcstat.c projects/jbuild/usr.sbin/inetd/inetd.c projects/jbuild/usr.sbin/jail/jail.8 projects/jbuild/usr.sbin/keyserv/Makefile projects/jbuild/usr.sbin/keyserv/setkey.c projects/jbuild/usr.sbin/kldxref/ef_i386.c projects/jbuild/usr.sbin/kldxref/ef_obj.c projects/jbuild/usr.sbin/kldxref/fileformat projects/jbuild/usr.sbin/kldxref/kldxref.c projects/jbuild/usr.sbin/lmcconfig/lmcconfig.c projects/jbuild/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) projects/jbuild/usr.sbin/makefs/ffs/ffs_subr.c (props changed) projects/jbuild/usr.sbin/makefs/ffs/ufs_bswap.h (contents, props changed) projects/jbuild/usr.sbin/makefs/getid.c (props changed) projects/jbuild/usr.sbin/mergemaster/mergemaster.8 projects/jbuild/usr.sbin/mergemaster/mergemaster.sh projects/jbuild/usr.sbin/mld6query/mld6query.8 projects/jbuild/usr.sbin/mtree/create.c projects/jbuild/usr.sbin/mtree/mtree.5 projects/jbuild/usr.sbin/mtree/mtree.8 projects/jbuild/usr.sbin/mtree/spec.c projects/jbuild/usr.sbin/pciconf/cap.c projects/jbuild/usr.sbin/pciconf/pciconf.8 projects/jbuild/usr.sbin/pciconf/pciconf.c projects/jbuild/usr.sbin/pkg_install/add/pkg_add.1 projects/jbuild/usr.sbin/pkg_install/lib/lib.h projects/jbuild/usr.sbin/pkg_install/lib/plist.c projects/jbuild/usr.sbin/pppd/cbcp.c projects/jbuild/usr.sbin/pstat/pstat.8 projects/jbuild/usr.sbin/pstat/pstat.c projects/jbuild/usr.sbin/rpc.yppasswdd/yppasswdd_server.c projects/jbuild/usr.sbin/rrenumd/rrenumd.8 projects/jbuild/usr.sbin/rtadvd/rrenum.c projects/jbuild/usr.sbin/rtadvd/rtadvd.8 projects/jbuild/usr.sbin/rtsold/rtsold.8 projects/jbuild/usr.sbin/sade/disks.c projects/jbuild/usr.sbin/sysinstall/devices.c projects/jbuild/usr.sbin/sysinstall/disks.c projects/jbuild/usr.sbin/sysinstall/install.c projects/jbuild/usr.sbin/sysinstall/main.c projects/jbuild/usr.sbin/sysinstall/menus.c projects/jbuild/usr.sbin/sysinstall/options.c projects/jbuild/usr.sbin/sysinstall/sysinstall.h projects/jbuild/usr.sbin/sysinstall/tcpip.c projects/jbuild/usr.sbin/timed/timed/Makefile projects/jbuild/usr.sbin/timed/timed/networkdelta.c projects/jbuild/usr.sbin/timed/timedc/Makefile projects/jbuild/usr.sbin/traceroute6/traceroute6.8 projects/jbuild/usr.sbin/trpt/trpt.c projects/jbuild/usr.sbin/usbconfig/dump.c projects/jbuild/usr.sbin/usbconfig/dump.h projects/jbuild/usr.sbin/usbconfig/usbconfig.c projects/jbuild/usr.sbin/wlandebug/wlandebug.c projects/jbuild/usr.sbin/zic/ (props changed) Modified: projects/jbuild/Makefile.inc1 ============================================================================== --- projects/jbuild/Makefile.inc1 Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/Makefile.inc1 Sat Feb 28 18:03:28 2009 (r189192) @@ -5,6 +5,7 @@ # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir # -DNO_CLEAN do not clean at all # -DNO_SHARE do not go into share subdir +# -DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELCONFIG # -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel # -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel # -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel @@ -229,7 +230,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR= \ BOOTSTRAPPING=${OSRELDATE} \ - -DWITHOUT_SSP \ + SSP_CFLAGS= \ -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \ -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF @@ -239,8 +240,9 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ DESTDIR= \ + SSP_CFLAGS= \ BOOTSTRAPPING=${OSRELDATE} -DNO_LINT -DNO_CPU_CFLAGS \ - -DNO_WARNS -DNO_CTF -DWITHOUT_SSP + -DNO_WARNS -DNO_CTF # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ @@ -457,7 +459,7 @@ build32: .if ${MK_KERBEROS} != "no" .for _t in obj depend all cd ${.CURDIR}/kerberos5/tools; \ - MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DWITHOUT_SSP DESTDIR= \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ ${_t} .endfor .endif @@ -480,7 +482,7 @@ build32: .endfor .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic cd ${.CURDIR}/${_dir}; \ - MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} -DWITHOUT_SSP DESTDIR= \ + MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ build-tools .endfor cd ${.CURDIR}; \ @@ -697,6 +699,15 @@ distrib-dirs distribution: # be set to cross-build, we have to make sure TARGET is set # properly. +.if defined(KERNFAST) +NO_KERNELCLEAN= t +NO_KERNELCONFIG= t +NO_KERNELDEPEND= t +# Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah +.if !defined(KERNCONF) && ${KERNFAST} != "1" +KERNCONF=${KERNFAST} +.endif +.endif .if !defined(KERNCONF) && defined(KERNEL) KERNCONF= ${KERNEL} KERNWARN= @@ -772,14 +783,14 @@ buildkernel: @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${_kernel}; \ MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} -DWITHOUT_SSP -DNO_CPU_CFLAGS -DNO_CTF \ + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \ -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) .for target in obj depend all cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} -DWITHOUT_SSP -DNO_CPU_CFLAGS -DNO_CTF ${target} + ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target} .endfor .endif .if !defined(NO_KERNELDEPEND) Modified: projects/jbuild/ObsoleteFiles.inc ============================================================================== --- projects/jbuild/ObsoleteFiles.inc Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/ObsoleteFiles.inc Sat Feb 28 18:03:28 2009 (r189192) @@ -14,6 +14,78 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20090226: libmp(3) functions renamed +OLD_LIBS+=usr/lib/libmp.so.6 +# 20090223: changeover of USB stacks +OLD_FILES+=usr/include/dev/usb2/include/ufm2_ioctl.h +OLD_FILES+=usr/include/dev/usb2/include/urio2_ioctl.h +OLD_FILES+=usr/include/dev/usb2/include/usb2_cdc.h +OLD_FILES+=usr/include/dev/usb2/include/usb2_defs.h +OLD_FILES+=usr/include/dev/usb2/include/usb2_devid.h +OLD_FILES+=usr/include/dev/usb2/include/usb2_devtable.h +OLD_FILES+=usr/include/dev/usb2/include/usb2_endian.h +OLD_FILES+=usr/include/dev/usb2/include/usb2_error.h +OLD_FILES+=usr/include/dev/usb2/include/usb2_hid.h +OLD_FILES+=usr/include/dev/usb2/include/usb2_ioctl.h +OLD_FILES+=usr/include/dev/usb2/include/usb2_mfunc.h +OLD_FILES+=usr/include/dev/usb2/include/usb2_revision.h +OLD_FILES+=usr/include/dev/usb2/include/usb2_standard.h +OLD_DIRS+=usr/include/dev/usb2/include +OLD_DIRS+=usr/include/dev/usb2 +OLD_FILES+=usr/include/dev/usb/dsbr100io.h +OLD_FILES+=usr/include/dev/usb/ehcireg.h +OLD_FILES+=usr/include/dev/usb/ehcivar.h +OLD_FILES+=usr/include/dev/usb/hid.h +OLD_FILES+=usr/include/dev/usb/if_auereg.h +OLD_FILES+=usr/include/dev/usb/if_axereg.h +OLD_FILES+=usr/include/dev/usb/if_cdcereg.h +OLD_FILES+=usr/include/dev/usb/if_cuereg.h +OLD_FILES+=usr/include/dev/usb/if_kuereg.h +OLD_FILES+=usr/include/dev/usb/if_ruereg.h +OLD_FILES+=usr/include/dev/usb/if_rumreg.h +OLD_FILES+=usr/include/dev/usb/if_rumvar.h +OLD_FILES+=usr/include/dev/usb/if_udavreg.h +OLD_FILES+=usr/include/dev/usb/if_upgtvar.h +OLD_FILES+=usr/include/dev/usb/if_uralreg.h +OLD_FILES+=usr/include/dev/usb/if_uralvar.h +OLD_FILES+=usr/include/dev/usb/if_zydfw.h +OLD_FILES+=usr/include/dev/usb/if_zydreg.h +OLD_FILES+=usr/include/dev/usb/kue_fw.h +OLD_FILES+=usr/include/dev/usb/ohcireg.h +OLD_FILES+=usr/include/dev/usb/ohcivar.h +OLD_FILES+=usr/include/dev/usb/rio500_usb.h +OLD_FILES+=usr/include/dev/usb/rt2573_ucode.h +OLD_FILES+=usr/include/dev/usb/sl811hsreg.h +OLD_FILES+=usr/include/dev/usb/sl811hsvar.h +OLD_FILES+=usr/include/dev/usb/ubser.h +OLD_FILES+=usr/include/dev/usb/ucomvar.h +OLD_FILES+=usr/include/dev/usb/udbp.h +OLD_FILES+=usr/include/dev/usb/uftdireg.h +OLD_FILES+=usr/include/dev/usb/ugraphire_rdesc.h +OLD_FILES+=usr/include/dev/usb/uhcireg.h +OLD_FILES+=usr/include/dev/usb/uhcivar.h +OLD_FILES+=usr/include/dev/usb/usb_ethersubr.h +OLD_FILES+=usr/include/dev/usb/usb_mem.h +OLD_FILES+=usr/include/dev/usb/usb_port.h +OLD_FILES+=usr/include/dev/usb/usb_quirks.h +OLD_FILES+=usr/include/dev/usb/usbcdc.h +OLD_FILES+=usr/include/dev/usb/usbdi.h +OLD_FILES+=usr/include/dev/usb/usbdi_util.h +OLD_FILES+=usr/include/dev/usb/usbdivar.h +OLD_FILES+=usr/include/dev/usb/uxb360gp_rdesc.h +# 20090203: removal of pccard header files +OLD_FILES+=usr/include/pccard/cardinfo.h +OLD_FILES+=usr/include/pccard/cis.h +OLD_DIRS+=usr/include/pccard +# 20090203: adding_user.8 moved to adding_user.7 +OLD_FILES+=usr/share/man/man8/adding_user.8.gz +# 20090122: tzdata2009a import +OLD_FILES+=usr/share/zoneinfo/Asia/Katmandu +# 20090102: file 4.26 import +OLD_FILES+=usr/share/misc/magic.mime +OLD_FILES+=usr/share/misc/magic.mime.mgc +# 20081223: bind 9.4.3 import, nsupdate.8 moved to nsupdate.1 +OLD_FILES+=usr/share/man/man8/nsupdate.8.gz # 20081223: ipprotosw.h removed OLD_FILES+=usr/include/netinet/ipprotosw.h # 20081123: vfs_mountedon.9 removed @@ -1661,7 +1733,7 @@ OLD_FILES+=usr/lib/libpam_ssh.a OLD_FILES+=usr/lib/libpam_ssh_p.a OLD_FILES+=usr/bin/help OLD_FILES+=usr/bin/sccs -.if ${TARGET_ARCH} != "i386" +.if ${TARGET_ARCH} != "arm" && ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "powerpc" OLD_FILES+=usr/bin/gdbserver .endif OLD_FILES+=usr/bin/ssh-keysign Modified: projects/jbuild/UPDATING ============================================================================== --- projects/jbuild/UPDATING Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/UPDATING Sat Feb 28 18:03:28 2009 (r189192) @@ -22,6 +22,64 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090227: + The /dev handling for the new USB stack has changed, a + buildworld/installworld is required for libusb20. + +20090223: + The new USB2 stack has now been permanently moved in and all kernel and + module names reverted to their previous values (eg, usb, ehci, ohci, + ums, ...). The old usb stack can be compiled in by prefixing the name + with the letter 'o', the old usb modules have been removed. + Updating entry 20090216 for xorg may still apply. + +20090217: + The rc.conf(5) option if_up_delay has been renamed to + defaultroute_delay to better reflect its purpose. If you have + customized this setting in /etc/rc.conf you need to update it to + use the new name. + +20090216: + xorg 7.4 wants to configure its input devices via hald which does not + yet work with USB2. If the keyboard/mouse does not work in xorg then + add + Option "AllowEmptyInput" "off" + to your ServerLayout section. This will cause X to use the configured + kbd and mouse sections from your xorg.conf. + +20090215: + The GENERIC kernels for all architectures now default to the new USB2 + stack. No kernel config options or code have been removed so if a + problem arises please report it and optionally revert to the old USB + stack. If you are loading USB kernel modules or have a custom kernel + that includes GENERIC then ensure that usb names are also changed over, + eg uftdi -> usb2_serial_ftdi. + +20090203: + The ichsmb(4) driver has been changed to require SMBus slave + addresses be left-justified (xxxxxxx0b) rather than right-justified. + All of the other SMBus controller drivers require left-justified + slave addresses, so this change makes all the drivers provide the + same interface. + +20090201: + INET6 statistics (struct ip6stat) was updated. + netstat(1) needs to be recompiled. + +20090119: + NTFS has been removed from GENERIC kernel on amd64 to match + GENERIC on i386. Should not cause any issues since mount_ntfs(8) + will load ntfs.ko module automatically when NTFS support is + actually needed, unless ntfs.ko is not installed or security + level prohibits loading kernel modules. If either is the case, + "options NTFS" has to be added into kernel config. + +20090115: + TCP Appropriate Byte Counting (RFC 3465) support added to kernel. + New field in struct tcpcb breaks ABI, so bump __FreeBSD_version to + 800061. User space tools that rely on the size of struct tcpcb in + tcp_var.h (e.g. sockstat) need to be recompiled. + 20081225: ng_tty(4) module updated to match the new TTY subsystem. Due to API change, user-level applications must be updated. @@ -33,13 +91,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. the base system (it was a port). 20081216: - The afdata and ifnet locks have been changed from mutexes to + The afdata and ifnet locks have been changed from mutexes to rwlocks, network modules will need to be re-compiled. 20081214: __FreeBSD_version 800059 incorporates the new arp-v2 rewrite. RTF_CLONING, RTF_LLINFO and RTF_WASCLONED flags are eliminated. - The new code reduced struct rtentry{} by 16 bytes on 32-bit + The new code reduced struct rtentry{} by 16 bytes on 32-bit architecture and 40 bytes on 64-bit architecture. The userland applications "arp" and "ndp" have been updated accordingly. The output from "netstat -r" shows only routing entries and Modified: projects/jbuild/bin/chmod/chmod.1 ============================================================================== --- projects/jbuild/bin/chmod/chmod.1 Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/bin/chmod/chmod.1 Sat Feb 28 18:03:28 2009 (r189192) @@ -32,7 +32,7 @@ .\" @(#)chmod.1 8.4 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd December 22, 2006 +.Dd January 26, 2009 .Dt CHMOD 1 .Os .Sh NAME @@ -281,6 +281,10 @@ Operations upon the other permissions on ``o'' by itself), in combination with the .Ar perm symbols ``s'' or ``t'', are ignored. +.Pp +The ``w'' permission on directories will permit file creation, relocation, +and copy into that directory. +Files created within the directory itself will inherit its group ID. .Sh EXAMPLES .Bl -tag -width "u=rwx,go=u-w" -compact .It Li 644 @@ -343,4 +347,4 @@ command appeared in .Sh BUGS There is no .Ar perm -option for the naughty bits. +option for the naughty bits of a horse. Modified: projects/jbuild/bin/dd/dd.1 ============================================================================== --- projects/jbuild/bin/dd/dd.1 Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/bin/dd/dd.1 Sat Feb 28 18:03:28 2009 (r189192) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd August 15, 2004 +.Dd January 23, 2009 .Dt DD 1 .Os .Sh NAME @@ -392,6 +392,11 @@ Remove parity bit from a file: Check for (even) parity errors on a file: .Pp .Dl "dd if=file conv=pareven | cmp -x - file" +.Pp +To create an image of a Mode-1 CD-ROM, which is a commonly used format +for data CD-ROM disks, use a block size of 2048 bytes: +.Pp +.Dl "dd if=/dev/acd0 of=filename.iso bs=2048" .Sh SEE ALSO .Xr cp 1 , .Xr mt 1 , Modified: projects/jbuild/bin/kenv/kenv.1 ============================================================================== --- projects/jbuild/bin/kenv/kenv.1 Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/bin/kenv/kenv.1 Sat Feb 28 18:03:28 2009 (r189192) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 13, 2005 +.Dd January 13, 2009 .Dt KENV 1 .Os .Sh NAME @@ -67,8 +67,28 @@ If the .Fl q option is set, warnings normally printed as a result of being unable to perform the requested operation will be suppressed. +.Pp +Variables can be added to the kernel environment using the +.Xr /boot/loader.conf +file, or also statically compiled into the kernel using the statement +.Pp +.Dl Ic env Ar filename +.Pp +in the kernel config file. +The file can contain lines of the form +.Pp +.Dl name = "value" # this is a comment +.Pp +where whitespace around name and '=', and +everything after a '#' character, are ignored. Almost any printable +character except '=' is acceptable as part of a name. Quotes +are optional and necessary only if the value contains +whitespace. +.Pp .Sh SEE ALSO .Xr kenv 2 , +.Xr config 5 , +.Xr loader.conf 5 , .Xr loader 8 .Sh HISTORY The Modified: projects/jbuild/bin/ln/ln.1 ============================================================================== --- projects/jbuild/bin/ln/ln.1 Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/bin/ln/ln.1 Sat Feb 28 18:03:28 2009 (r189192) @@ -38,7 +38,7 @@ .Sh NAME .Nm ln , .Nm link -.Nd make links +.Nd link files .Sh SYNOPSIS .Nm .Op Fl s Op Fl F @@ -57,8 +57,13 @@ .Sh DESCRIPTION The .Nm -utility creates a new directory entry (linked file) which has the -same modes as the original file. +utility creates a new directory entry (linked file) for the file name +specified by +.Ar target_file . +The +.Ar target_file +will be created with the same file modes as the +.Ar source_file . It is useful for maintaining multiple copies of a file in many places at once without using up storage for the .Dq copies ; @@ -148,7 +153,7 @@ links. A hard link to a file is indistinguishable from the original directory entry; any changes to a file are effectively independent of the name used to reference the file. -Hard links may not normally refer to directories and may not span file systems. +Directories may not be hardlinked, and hard links may not span file systems. .Pp A symbolic link contains the name of the file to which it is linked. Modified: projects/jbuild/bin/pax/file_subs.c ============================================================================== --- projects/jbuild/bin/pax/file_subs.c Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/bin/pax/file_subs.c Sat Feb 28 18:03:28 2009 (r189192) @@ -425,19 +425,11 @@ node_creat(ARCHD *arcn) * we were able to create the node. set uid/gid, modes and times */ if (pids) - res = ((arcn->type == PAX_SLK) ? - set_lids(arcn->name, arcn->sb.st_uid, arcn->sb.st_gid) : - set_ids(arcn->name, arcn->sb.st_uid, arcn->sb.st_gid)); + res = set_ids(arcn->name, arcn->sb.st_uid, arcn->sb.st_gid); else res = 0; /* - * symlinks are done now. - */ - if (arcn->type == PAX_SLK) - return(0); - - /* * IMPORTANT SECURITY NOTE: * if not preserving mode or we cannot set uid/gid, then PROHIBIT any * set uid/gid bits @@ -632,7 +624,7 @@ chk_path( char *name, uid_t st_uid, gid_ * used by -t to reset access times). * When ign is zero, only those times the user has asked for are set, the * other ones are left alone. We do not assume the un-documented feature - * of many utimes() implementations that consider a 0 time value as a do + * of many lutimes() implementations that consider a 0 time value as a do * not set request. */ @@ -661,7 +653,7 @@ set_ftime(char *fnm, time_t mtime, time_ /* * set the times */ - if (utimes(fnm, tv) < 0) + if (lutimes(fnm, tv) < 0) syswarn(1, errno, "Access/modification time set failed on: %s", fnm); return; @@ -677,30 +669,6 @@ set_ftime(char *fnm, time_t mtime, time_ int set_ids(char *fnm, uid_t uid, gid_t gid) { - if (chown(fnm, uid, gid) < 0) { - /* - * ignore EPERM unless in verbose mode or being run by root. - * if running as pax, POSIX requires a warning. - */ - if (strcmp(NM_PAX, argv0) == 0 || errno != EPERM || vflag || - geteuid() == 0) - syswarn(1, errno, "Unable to set file uid/gid of %s", - fnm); - return(-1); - } - return(0); -} - -/* - * set_lids() - * set the uid and gid of a file system node - * Return: - * 0 when set, -1 on failure - */ - -int -set_lids(char *fnm, uid_t uid, gid_t gid) -{ if (lchown(fnm, uid, gid) < 0) { /* * ignore EPERM unless in verbose mode or being run by root. @@ -724,7 +692,7 @@ void set_pmode(char *fnm, mode_t mode) { mode &= ABITS; - if (chmod(fnm, mode) < 0) + if (lchmod(fnm, mode) < 0) syswarn(1, errno, "Could not set permissions on %s", fnm); return; } Modified: projects/jbuild/bin/ps/extern.h ============================================================================== --- projects/jbuild/bin/ps/extern.h Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/bin/ps/extern.h Sat Feb 28 18:03:28 2009 (r189192) @@ -71,6 +71,7 @@ void priorityr(KINFO *, VARENT *); void rgroupname(KINFO *, VARENT *); void runame(KINFO *, VARENT *); void rvar(KINFO *, VARENT *); +int s_comm(KINFO *); int s_label(KINFO *); int s_rgroupname(KINFO *); int s_runame(KINFO *); Modified: projects/jbuild/bin/ps/keyword.c ============================================================================== --- projects/jbuild/bin/ps/keyword.c Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/bin/ps/keyword.c Sat Feb 28 18:03:28 2009 (r189192) @@ -79,8 +79,8 @@ static VAR var[] = { CHAR, NULL, 0}, {"blocked", "", "sigmask", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"caught", "", "sigcatch", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, - {"comm", "COMMAND", NULL, LJUST, ucomm, NULL, MAXCOMLEN, 0, CHAR, - NULL, 0}, + {"comm", "COMMAND", NULL, LJUST|DSIZ, ucomm, s_comm, + COMMLEN + OCOMMLEN + 1, 0, CHAR, NULL, 0}, {"command", "COMMAND", NULL, COMM|LJUST|USER, command, NULL, 16, 0, CHAR, NULL, 0}, {"cpu", "CPU", NULL, 0, kvar, NULL, 3, KOFF(ki_estcpu), UINT, "d", @@ -135,12 +135,13 @@ static VAR var[] = { LONG, "ld", 0}, {"nvcsw", "NVCSW", NULL, USER, rvar, NULL, 5, ROFF(ru_nvcsw), LONG, "ld", 0}, - {"nwchan", "NWCHAN", NULL, LJUST, nwchan, NULL, 8, 0, CHAR, NULL, 0}, + {"nwchan", "NWCHAN", NULL, LJUST, nwchan, NULL, sizeof(void *) * 2, 0, + CHAR, NULL, 0}, {"oublk", "OUBLK", NULL, USER, rvar, NULL, 4, ROFF(ru_oublock), LONG, "ld", 0}, {"oublock", "", "oublk", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, - {"paddr", "PADDR", NULL, 0, kvar, NULL, 8, KOFF(ki_paddr), KPTR, - "lx", 0}, + {"paddr", "PADDR", NULL, 0, kvar, NULL, sizeof(void *) * 2, + KOFF(ki_paddr), KPTR, "lx", 0}, {"pagein", "PAGEIN", NULL, USER, pagein, NULL, 6, 0, CHAR, NULL, 0}, {"pcpu", "", "%cpu", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"pending", "", "sig", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, @@ -195,13 +196,13 @@ static VAR var[] = { {"tsiz", "TSIZ", NULL, 0, kvar, NULL, 4, KOFF(ki_tsize), PGTOK, "ld", 0}, {"tt", "TT ", NULL, 0, tname, NULL, 4, 0, CHAR, NULL, 0}, {"tty", "TTY", NULL, LJUST, longtname, NULL, 8, 0, CHAR, NULL, 0}, - {"ucomm", "UCOMM", NULL, LJUST, ucomm, NULL, MAXCOMLEN, 0, CHAR, NULL, - 0}, + {"ucomm", "UCOMM", NULL, LJUST|DSIZ, ucomm, s_comm, + COMMLEN + OCOMMLEN + 1, 0, CHAR, NULL, 0}, {"uid", "UID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_uid), UINT, UIDFMT, 0}, {"upr", "UPR", NULL, 0, upr, NULL, 3, 0, CHAR, NULL, 0}, - {"uprocp", "UPROCP", NULL, 0, kvar, NULL, 8, KOFF(ki_paddr), KPTR, - "lx", 0}, + {"uprocp", "UPROCP", NULL, 0, kvar, NULL, sizeof(void *) * 2, + KOFF(ki_paddr), KPTR, "lx", 0}, {"user", "USER", NULL, LJUST|DSIZ, uname, s_uname, USERLEN, 0, CHAR, NULL, 0}, {"usrpri", "", "upr", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, @@ -325,6 +326,8 @@ findvar(char *p, int user, char **header */ rflen = strlen(v->alias) + strlen(hp) + 2; realfmt = malloc(rflen); + if (realfmt == NULL) + errx(1, "malloc failed"); snprintf(realfmt, rflen, "%s=%s", v->alias, hp); parsefmt(realfmt, user); } Modified: projects/jbuild/bin/ps/print.c ============================================================================== --- projects/jbuild/bin/ps/print.c Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/bin/ps/print.c Sat Feb 28 18:03:28 2009 (r189192) @@ -177,6 +177,7 @@ command(KINFO *k, VARENT *ve) void ucomm(KINFO *k, VARENT *ve) { + char tmpbuff[COMMLEN + OCOMMLEN + 2]; VAR *v; v = ve->var; @@ -184,8 +185,15 @@ ucomm(KINFO *k, VARENT *ve) (void)printf("%s", k->ki_p->ki_comm); if (showthreads && k->ki_p->ki_numthreads > 1) printf("/%s", k->ki_p->ki_ocomm); - } else - (void)printf("%-*s", v->width, k->ki_p->ki_comm); + } else { + bzero(tmpbuff, sizeof(tmpbuff)); + if (showthreads && k->ki_p->ki_numthreads > 1) + sprintf(tmpbuff, "%s/%s", k->ki_p->ki_comm, + k->ki_p->ki_ocomm); + else + sprintf(tmpbuff, "%s", k->ki_p->ki_comm); + (void)printf("%-*s", v->width, tmpbuff); + } } void @@ -821,6 +829,20 @@ out: } int +s_comm(KINFO *k) +{ + char tmpbuff[COMMLEN + OCOMMLEN + 2]; + + bzero(tmpbuff, sizeof(tmpbuff)); + if (showthreads && k->ki_p->ki_numthreads > 1) + sprintf(tmpbuff, "%s/%s", k->ki_p->ki_comm, + k->ki_p->ki_ocomm); + else + sprintf(tmpbuff, "%s", k->ki_p->ki_comm); + return (strlen(tmpbuff)); +} + +int s_label(KINFO *k) { char *string = NULL; Modified: projects/jbuild/bin/test/test.1 ============================================================================== --- projects/jbuild/bin/test/test.1 Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/bin/test/test.1 Sat Feb 28 18:03:28 2009 (r189192) @@ -310,7 +310,7 @@ are evaluated consistently according to standards document. All other cases are subject to the ambiguity in the command semantics. -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility exits with one of the following values: Modified: projects/jbuild/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- projects/jbuild/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sat Feb 28 18:03:28 2009 (r189192) @@ -1739,15 +1739,11 @@ dtrace_program_link(dtrace_hdl_t *dtp, d * Arches which are 32-bit only just use the normal * library path. */ -#if defined(__i386__) - int use_32 = 1; /* use /usr/lib/... -sson */ -#else int use_32 = 0; #endif -#endif (void) snprintf(drti, sizeof (drti), "/usr/lib%s/dtrace/drti.o", - use_32 ? "":"32"); + use_32 ? "32":""); len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, tfile, drti) + 1; Modified: projects/jbuild/contrib/bind9/CHANGES ============================================================================== --- projects/jbuild/contrib/bind9/CHANGES Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/bind9/CHANGES Sat Feb 28 18:03:28 2009 (r189192) @@ -1,3 +1,11 @@ + --- 9.4.3-P1 released --- + +2522. [security] Handle -1 from DSA_do_verify(). + +2498. [bug] Removed a bogus function argument used with + ISC_SOCKET_USE_POLLWATCH: it could cause compiler + warning or crash named with the debug 1 level + of logging. [RT #18917] --- 9.4.3 released --- Modified: projects/jbuild/contrib/bind9/lib/dns/api ============================================================================== --- projects/jbuild/contrib/bind9/lib/dns/api Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/bind9/lib/dns/api Sat Feb 28 18:03:28 2009 (r189192) @@ -1,3 +1,3 @@ LIBINTERFACE = 36 -LIBREVISION = 1 +LIBREVISION = 2 LIBAGE = 0 Modified: projects/jbuild/contrib/bind9/lib/dns/openssldsa_link.c ============================================================================== --- projects/jbuild/contrib/bind9/lib/dns/openssldsa_link.c Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/bind9/lib/dns/openssldsa_link.c Sat Feb 28 18:03:28 2009 (r189192) @@ -16,7 +16,7 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: openssldsa_link.c,v 1.1.6.9 2007/08/28 07:20:04 tbox Exp $ */ +/* $Id: openssldsa_link.c,v 1.1.6.9.28.1 2008/12/24 00:21:22 marka Exp $ */ #ifdef OPENSSL @@ -133,7 +133,7 @@ openssldsa_verify(dst_context_t *dctx, c status = DSA_do_verify(digest, ISC_SHA1_DIGESTLENGTH, dsasig, dsa); DSA_SIG_free(dsasig); - if (status == 0) + if (status != 1) return (dst__openssl_toresult(DST_R_VERIFYFAILURE)); return (ISC_R_SUCCESS); Modified: projects/jbuild/contrib/bind9/lib/dns/opensslrsa_link.c ============================================================================== --- projects/jbuild/contrib/bind9/lib/dns/opensslrsa_link.c Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/bind9/lib/dns/opensslrsa_link.c Sat Feb 28 18:03:28 2009 (r189192) @@ -17,7 +17,7 @@ /* * Principal Author: Brian Wellington - * $Id: opensslrsa_link.c,v 1.1.6.11 2006/11/07 21:28:49 marka Exp $ + * $Id: opensslrsa_link.c,v 1.1.6.11.58.1 2008/12/24 00:21:22 marka Exp $ */ #ifdef OPENSSL @@ -246,7 +246,7 @@ opensslrsa_verify(dst_context_t *dctx, c status = RSA_verify(type, digest, digestlen, sig->base, RSA_size(rsa), rsa); - if (status == 0) + if (status != 1) return (dst__openssl_toresult(DST_R_VERIFYFAILURE)); return (ISC_R_SUCCESS); Modified: projects/jbuild/contrib/bind9/lib/isc/unix/socket.c ============================================================================== --- projects/jbuild/contrib/bind9/lib/isc/unix/socket.c Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/bind9/lib/isc/unix/socket.c Sat Feb 28 18:03:28 2009 (r189192) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.237.18.56 2008/11/12 03:58:36 marka Exp $ */ +/* $Id: socket.c,v 1.237.18.56.2.1 2008/12/23 00:14:34 marka Exp $ */ /*! \file */ @@ -501,7 +501,7 @@ FIX_IPV6_RECVPKTINFO(isc_socket_t *sock) if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, (void *)&on, sizeof(on)) < 0) { - + UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d, IPV6_RECVPKTINFO) " "%s: %s", sock->fd, @@ -3163,7 +3163,6 @@ watcher(void *uap) { ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(1), - ISC_LOG_INFO, "unexpected POLL timeout"); } pollstate = poll_active; @@ -4902,7 +4901,7 @@ isc_socket_ipv6only(isc_socket_t *sock, if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&onoff, sizeof(int)) < 0) { char strbuf[ISC_STRERRORSIZE]; - + UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d, IPV6_V6ONLY) " "%s: %s", sock->fd, Modified: projects/jbuild/contrib/bind9/version ============================================================================== --- projects/jbuild/contrib/bind9/version Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/bind9/version Sat Feb 28 18:03:28 2009 (r189192) @@ -1,4 +1,4 @@ -# $Id: version,v 1.29.134.23 2008/11/12 04:17:12 marka Exp $ +# $Id: version,v 1.29.134.23.2.1 2008/12/24 00:21:22 marka Exp $ # # This file must follow /bin/sh rules. It is imported directly via # configure. @@ -6,5 +6,5 @@ MAJORVER=9 MINORVER=4 PATCHVER=3 -RELEASETYPE= -RELEASEVER= +RELEASETYPE=-P +RELEASEVER=1 Modified: projects/jbuild/contrib/bsnmp/snmp_mibII/mibII.c ============================================================================== --- projects/jbuild/contrib/bsnmp/snmp_mibII/mibII.c Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/bsnmp/snmp_mibII/mibII.c Sat Feb 28 18:03:28 2009 (r189192) @@ -1013,7 +1013,7 @@ handle_rtmsg(struct rt_msghdr *rtm) break; case RTM_IFINFO: - ifm = (struct if_msghdr *)rtm; + ifm = (struct if_msghdr *)(void *)rtm; mib_extract_addrs(ifm->ifm_addrs, (u_char *)(ifm + 1), addrs); if ((ifp = mib_find_if_sys(ifm->ifm_index)) == NULL) break; Modified: projects/jbuild/contrib/csup/GNUmakefile ============================================================================== --- projects/jbuild/contrib/csup/GNUmakefile Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/csup/GNUmakefile Sat Feb 28 18:03:28 2009 (r189192) @@ -12,8 +12,9 @@ GROUP?= 0 UNAME= $(shell uname -s) SRCS= attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ - globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c pathcomp.c \ - parse.c proto.c status.c stream.c threads.c token.c updater.c + globtree.c idcache.c keyword.c lex.rcs.c lister.c main.c misc.c mux.c \ + pathcomp.c parse.c proto.c rcsfile.c rcsparse.c rsyncfile.c status.c \ + stream.c threads.c token.c updater.c OBJS= $(SRCS:.c=.o) WARNS= -Wall -W -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith \ Modified: projects/jbuild/contrib/csup/Makefile ============================================================================== --- projects/jbuild/contrib/csup/Makefile Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/csup/Makefile Sat Feb 28 18:03:28 2009 (r189192) @@ -9,10 +9,11 @@ UNAME!= /usr/bin/uname -s PROG= csup SRCS= attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \ - pathcomp.c proto.c status.c stream.c threads.c token.l updater.c + pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \ + rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c CFLAGS+= -I. -I${.CURDIR} -g -pthread -DHAVE_FFLAGS -DNDEBUG -WARNS?= 6 +WARNS?= 1 # A bit of tweaking is needed to get this Makefile working # with the bsd.prog.mk of all the *BSD OSes... Modified: projects/jbuild/contrib/csup/TODO ============================================================================== --- projects/jbuild/contrib/csup/TODO Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/csup/TODO Sat Feb 28 18:03:28 2009 (r189192) @@ -28,4 +28,3 @@ MISSING FEATURES: checkout files (files in CVS/ subdirectores), a command line override to only update a specific collection and a third verbosity level to display commit log messages. -- Add support for CVS mode (maybe?). Modified: projects/jbuild/contrib/csup/config.c ============================================================================== --- projects/jbuild/contrib/csup/config.c Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/csup/config.c Sat Feb 28 18:03:28 2009 (r189192) @@ -133,7 +133,6 @@ config_init(const char *file, struct col coll->co_options &= ~CO_CHECKRCS; /* In recent versions, we always try to set the file modes. */ coll->co_options |= CO_SETMODE; - /* XXX We don't support the rsync updating algorithm yet. */ coll->co_options |= CO_NORSYNC; error = config_parse_refusefiles(coll); if (error) @@ -444,10 +443,6 @@ coll_add(char *name) "\"%s\"\n", cur_coll->co_name); exit(1); } - if (!(cur_coll->co_options & CO_CHECKOUTMODE)) { - lprintf(-1, "Client only supports checkout mode\n"); - exit(1); - } if (!STAILQ_EMPTY(&colls)) { coll = STAILQ_LAST(&colls, coll, co_next); if (strcmp(coll->co_host, cur_coll->co_host) != 0) { Modified: projects/jbuild/contrib/csup/csup.1 ============================================================================== --- projects/jbuild/contrib/csup/csup.1 Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/csup/csup.1 Sat Feb 28 18:03:28 2009 (r189192) @@ -442,8 +442,6 @@ They are called mode and .Em checkout mode. -.Nm -only supports the checkout mode for now. .Pp In CVS mode, the client receives copies of the actual RCS files making up the master CVS repository. CVS mode is the default mode of operation. Modified: projects/jbuild/contrib/csup/detailer.c ============================================================================== --- projects/jbuild/contrib/csup/detailer.c Sat Feb 28 18:00:53 2009 (r189191) +++ projects/jbuild/contrib/csup/detailer.c Sat Feb 28 18:03:28 2009 (r189192) @@ -30,13 +30,21 @@ #include #include #include +#include + +#include +#include +#include #include "config.h" #include "detailer.h" #include "fixups.h" +#include "globtree.h" #include "misc.h" #include "mux.h" #include "proto.h" +#include "rcsfile.h" +#include "rsyncfile.h" #include "status.h" #include "stream.h" @@ -56,8 +64,16 @@ struct detailer { static int detailer_batch(struct detailer *); static int detailer_coll(struct detailer *, struct coll *, struct status *); -static int detailer_dofile(struct detailer *, struct coll *, +static int detailer_dofile_co(struct detailer *, struct coll *, struct status *, char *); +static int detailer_dofile_rcs(struct detailer *, struct coll *, + char *, char *); +static int detailer_dofile_regular(struct detailer *, char *, char *); +static int detailer_dofile_rsync(struct detailer *, char *, char *); +static int detailer_checkrcsattr(struct detailer *, struct coll *, char *, + struct fattr *, int); +int detailer_send_details(struct detailer *, struct coll *, char *, + char *, struct fattr *); void * detailer(void *arg) @@ -186,8 +202,13 @@ detailer_batch(struct detailer *d) } if (fixup->f_coll != coll) break; - error = proto_printf(wr, "Y %s %s %s\n", fixup->f_name, - coll->co_tag, coll->co_date); + if (coll->co_options & CO_CHECKOUTMODE) + error = proto_printf(wr, "Y %s %s %s\n", + fixup->f_name, coll->co_tag, coll->co_date); + else { + error = proto_printf(wr, "A %s\n", + fixup->f_name); + } if (error) return (DETAILER_ERR_WRITE); fixup = NULL; @@ -208,12 +229,14 @@ detailer_batch(struct detailer *d) static int detailer_coll(struct detailer *d, struct coll *coll, struct status *st) { + struct fattr *rcsattr; struct stream *rd, *wr; - char *cmd, *file, *line, *msg; - int error; + char *attr, *cmd, *file, *line, *msg, *path, *target; + int error, attic; rd = d->rd; wr = d->wr; + attic = 0; line = stream_getln(rd, NULL); if (line == NULL) return (DETAILER_ERR_READ); @@ -226,17 +249,84 @@ detailer_coll(struct detailer *d, struct /* Delete file. */ file = proto_get_ascii(&line); if (file == NULL || line != NULL) - return (DETAILER_ERR_PROTO); + return (DETAILER_ERR_PROTO); error = proto_printf(wr, "D %s\n", file); if (error) return (DETAILER_ERR_WRITE); break; + case 'I': + case 'i': + case 'j': + /* Directory operations. */ + file = proto_get_ascii(&line); + if (file == NULL || line != NULL) + return (DETAILER_ERR_PROTO); + error = proto_printf(wr, "%s %s\n", cmd, file); + if (error) + return (DETAILER_ERR_WRITE); + break; + case 'J': + /* Set directory attributes. */ + file = proto_get_ascii(&line); + attr = proto_get_ascii(&line); + if (file == NULL || line != NULL || attr == NULL) + return (DETAILER_ERR_PROTO); + error = proto_printf(wr, "%s %s %s\n", cmd, file, attr); + if (error) + return (DETAILER_ERR_WRITE); + break; + case 'H': + case 'h': + /* Create a hard link. */ + file = proto_get_ascii(&line); + target = proto_get_ascii(&line); + if (file == NULL || target == NULL) + return (DETAILER_ERR_PROTO); + error = proto_printf(wr, "%s %s %s\n", cmd, file, + target); + break; + case 't': + file = proto_get_ascii(&line); + attr = proto_get_ascii(&line); + if (file == NULL || attr == NULL || line != NULL) { + return (DETAILER_ERR_PROTO); + } + rcsattr = fattr_decode(attr); + if (rcsattr == NULL) { + return (DETAILER_ERR_PROTO); + } + error = detailer_checkrcsattr(d, coll, file, rcsattr, + 1); + break; + + case 'T': + file = proto_get_ascii(&line); + attr = proto_get_ascii(&line); + if (file == NULL || attr == NULL || line != NULL) + return (DETAILER_ERR_PROTO); + rcsattr = fattr_decode(attr); + if (rcsattr == NULL) + return (DETAILER_ERR_PROTO); + error = detailer_checkrcsattr(d, coll, file, rcsattr, + 0); + break; + case 'U': /* Add or update file. */ file = proto_get_ascii(&line); if (file == NULL || line != NULL) return (DETAILER_ERR_PROTO); - error = detailer_dofile(d, coll, st, file); + if (coll->co_options & CO_CHECKOUTMODE) { + error = detailer_dofile_co(d, coll, st, file); + } else { + path = cvspath(coll->co_prefix, file, 0); + rcsattr = fattr_frompath(path, FATTR_NOFOLLOW); + error = detailer_send_details(d, coll, file, + path, rcsattr); + if (rcsattr != NULL) + fattr_free(rcsattr); + free(path); + } if (error) return (error); break; @@ -261,14 +351,110 @@ detailer_coll(struct detailer *d, struct return (0); } +/* + * Tell the server to update a regular file. + */ static int -detailer_dofile(struct detailer *d, struct coll *coll, struct status *st, - char *file) +detailer_dofile_regular(struct detailer *d, char *name, char *path) { + struct stream *wr; + struct stat st; char md5[MD5_DIGEST_SIZE]; + int error; + + wr = d->wr; + error = stat(path, &st); + /* If we don't have it or it's unaccessible, we want it again. */ + if (error) { + proto_printf(wr, "A %s\n", name); + return (0); + } + + /* If not, we want the file to be updated. */ + error = MD5_File(path, md5); + if (error) { + lprintf(-1, "Error reading \"%s\"\n", name); + return (error); + } + error = proto_printf(wr, "R %s %O %s\n", name, st.st_size, md5); + if (error) + return (DETAILER_ERR_WRITE); + return (0); +} *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***