From owner-svn-src-projects@FreeBSD.ORG Sun Nov 14 01:06:11 2010 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 44EBB106566C; Sun, 14 Nov 2010 01:06:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EACB8FC0C; Sun, 14 Nov 2010 01:06:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAE16BBY065535; Sun, 14 Nov 2010 01:06:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAE16Ant065516; Sun, 14 Nov 2010 01:06:10 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011140106.oAE16Ant065516@svn.freebsd.org> From: Dimitry Andric Date: Sun, 14 Nov 2010 01:06:10 +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: r215273 - in projects/binutils-2.17: . bin/echo bin/sh bin/sh/funcs contrib/binutils/bfd contrib/top etc etc/defaults etc/periodic/security include lib/libc/gen lib/libc_r lib/libusb li... 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, 14 Nov 2010 01:06:11 -0000 Author: dim Date: Sun Nov 14 01:06:10 2010 New Revision: 215273 URL: http://svn.freebsd.org/changeset/base/215273 Log: Sync: merge r215189 through r215272 from ^/head. Added: projects/binutils-2.17/etc/periodic/security/110.neggrpperm - copied unchanged from r215272, head/etc/periodic/security/110.neggrpperm projects/binutils-2.17/share/mk/bsd.crunchgen.mk - copied unchanged from r215272, head/share/mk/bsd.crunchgen.mk projects/binutils-2.17/sys/mips/atheros/std.ar71xx - copied unchanged from r215272, head/sys/mips/atheros/std.ar71xx projects/binutils-2.17/sys/mips/sentry5/std.sentry5 - copied unchanged from r215272, head/sys/mips/sentry5/std.sentry5 projects/binutils-2.17/sys/mips/sibyte/std.sibyte - copied unchanged from r215272, head/sys/mips/sibyte/std.sibyte projects/binutils-2.17/tools/regression/netinet/arphold/ - copied from r215272, head/tools/regression/netinet/arphold/ projects/binutils-2.17/usr.sbin/bluetooth/ath3kfw/ - copied from r215272, head/usr.sbin/bluetooth/ath3kfw/ Deleted: projects/binutils-2.17/lib/libc_r/ projects/binutils-2.17/sys/boot/pc98/libpc98/i386_module.c projects/binutils-2.17/sys/i386/acpica/Makefile projects/binutils-2.17/sys/i386/acpica/genwakecode.sh Modified: projects/binutils-2.17/Makefile projects/binutils-2.17/Makefile.inc1 projects/binutils-2.17/bin/echo/echo.1 projects/binutils-2.17/bin/sh/funcs/suspend projects/binutils-2.17/bin/sh/sh.1 projects/binutils-2.17/bin/sh/var.c projects/binutils-2.17/contrib/binutils/bfd/config.bfd projects/binutils-2.17/etc/defaults/periodic.conf projects/binutils-2.17/etc/devd.conf projects/binutils-2.17/etc/periodic/security/Makefile projects/binutils-2.17/etc/services projects/binutils-2.17/include/readpassphrase.h projects/binutils-2.17/lib/libc/gen/readpassphrase.3 projects/binutils-2.17/lib/libc/gen/readpassphrase.c projects/binutils-2.17/lib/libusb/libusb10.c projects/binutils-2.17/lib/libusb/libusb10_io.c projects/binutils-2.17/lib/msun/src/e_jn.c projects/binutils-2.17/lib/msun/src/e_jnf.c projects/binutils-2.17/rescue/rescue/Makefile projects/binutils-2.17/sbin/ifconfig/ifmedia.c projects/binutils-2.17/sbin/kldstat/kldstat.c projects/binutils-2.17/sbin/mdconfig/mdconfig.8 projects/binutils-2.17/sbin/mdconfig/mdconfig.c projects/binutils-2.17/share/man/man5/periodic.conf.5 projects/binutils-2.17/share/man/man5/rc.conf.5 projects/binutils-2.17/sys/boot/i386/libi386/i386_module.c projects/binutils-2.17/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/binutils-2.17/sys/conf/files.i386 projects/binutils-2.17/sys/conf/ldscript.mips projects/binutils-2.17/sys/dev/arcmsr/arcmsr.c projects/binutils-2.17/sys/dev/arcmsr/arcmsr.h projects/binutils-2.17/sys/dev/nfe/if_nfe.c projects/binutils-2.17/sys/dev/usb/input/uhid.c projects/binutils-2.17/sys/dev/usb/serial/u3g.c projects/binutils-2.17/sys/dev/usb/usbdevs projects/binutils-2.17/sys/i386/acpica/acpi_wakecode.S projects/binutils-2.17/sys/i386/acpica/acpi_wakeup.c projects/binutils-2.17/sys/kern/sched_ule.c projects/binutils-2.17/sys/mips/adm5120/std.adm5120 projects/binutils-2.17/sys/mips/alchemy/std.alchemy projects/binutils-2.17/sys/mips/cavium/std.octeon1 projects/binutils-2.17/sys/mips/conf/ADM5120 projects/binutils-2.17/sys/mips/conf/ALCHEMY projects/binutils-2.17/sys/mips/conf/AR71XX projects/binutils-2.17/sys/mips/conf/DEFAULTS projects/binutils-2.17/sys/mips/conf/MALTA projects/binutils-2.17/sys/mips/conf/MALTA64 projects/binutils-2.17/sys/mips/conf/OCTEON1 projects/binutils-2.17/sys/mips/conf/OCTEON1-32 projects/binutils-2.17/sys/mips/conf/QEMU projects/binutils-2.17/sys/mips/conf/SENTRY5 projects/binutils-2.17/sys/mips/conf/SWARM projects/binutils-2.17/sys/mips/conf/SWARM64 projects/binutils-2.17/sys/mips/conf/SWARM64_SMP projects/binutils-2.17/sys/mips/conf/SWARM_SMP projects/binutils-2.17/sys/mips/conf/XLR projects/binutils-2.17/sys/mips/conf/XLR64 projects/binutils-2.17/sys/mips/conf/XLRN32 projects/binutils-2.17/sys/mips/conf/std.SWARM projects/binutils-2.17/sys/mips/idt/std.idt projects/binutils-2.17/sys/modules/Makefile projects/binutils-2.17/sys/modules/acpi/acpi/Makefile projects/binutils-2.17/sys/net/if_llatbl.c projects/binutils-2.17/sys/net/if_llatbl.h projects/binutils-2.17/sys/net/vnet.h projects/binutils-2.17/sys/net80211/ieee80211_ratectl_none.c projects/binutils-2.17/sys/netinet/if_ether.c projects/binutils-2.17/sys/netinet/in.c projects/binutils-2.17/sys/netinet/sctp_output.c projects/binutils-2.17/sys/netinet/sctp_pcb.c projects/binutils-2.17/sys/netinet/sctputil.c projects/binutils-2.17/sys/powerpc/aim/mp_cpudep.c projects/binutils-2.17/usr.bin/top/top.local.1 projects/binutils-2.17/usr.bin/truss/main.c projects/binutils-2.17/usr.sbin/bluetooth/Makefile projects/binutils-2.17/usr.sbin/sysinstall/install.c projects/binutils-2.17/usr.sbin/sysinstall/menus.c Directory Properties: projects/binutils-2.17/ (props changed) projects/binutils-2.17/cddl/contrib/opensolaris/ (props changed) projects/binutils-2.17/contrib/bind9/ (props changed) projects/binutils-2.17/contrib/binutils/ (props changed) projects/binutils-2.17/contrib/bzip2/ (props changed) projects/binutils-2.17/contrib/ee/ (props changed) projects/binutils-2.17/contrib/expat/ (props changed) projects/binutils-2.17/contrib/file/ (props changed) projects/binutils-2.17/contrib/gdb/ (props changed) projects/binutils-2.17/contrib/gdtoa/ (props changed) projects/binutils-2.17/contrib/gnu-sort/ (props changed) projects/binutils-2.17/contrib/groff/ (props changed) projects/binutils-2.17/contrib/less/ (props changed) projects/binutils-2.17/contrib/libpcap/ (props changed) projects/binutils-2.17/contrib/llvm/ (props changed) projects/binutils-2.17/contrib/llvm/tools/clang/ (props changed) projects/binutils-2.17/contrib/ncurses/ (props changed) projects/binutils-2.17/contrib/netcat/ (props changed) projects/binutils-2.17/contrib/ntp/ (props changed) projects/binutils-2.17/contrib/one-true-awk/ (props changed) projects/binutils-2.17/contrib/openbsm/ (props changed) projects/binutils-2.17/contrib/openpam/ (props changed) projects/binutils-2.17/contrib/pf/ (props changed) projects/binutils-2.17/contrib/sendmail/ (props changed) projects/binutils-2.17/contrib/tcpdump/ (props changed) projects/binutils-2.17/contrib/tcsh/ (props changed) projects/binutils-2.17/contrib/top/ (props changed) projects/binutils-2.17/contrib/top/install-sh (props changed) projects/binutils-2.17/contrib/tzcode/stdtime/ (props changed) projects/binutils-2.17/contrib/tzcode/zic/ (props changed) projects/binutils-2.17/contrib/tzdata/ (props changed) projects/binutils-2.17/contrib/wpa/ (props changed) projects/binutils-2.17/contrib/xz/ (props changed) projects/binutils-2.17/crypto/openssh/ (props changed) projects/binutils-2.17/crypto/openssl/ (props changed) projects/binutils-2.17/lib/libc/ (props changed) projects/binutils-2.17/lib/libc/stdtime/ (props changed) projects/binutils-2.17/lib/libutil/ (props changed) projects/binutils-2.17/lib/libz/ (props changed) projects/binutils-2.17/sbin/ (props changed) projects/binutils-2.17/sbin/ipfw/ (props changed) projects/binutils-2.17/share/mk/bsd.arch.inc.mk (props changed) projects/binutils-2.17/share/zoneinfo/ (props changed) projects/binutils-2.17/sys/ (props changed) projects/binutils-2.17/sys/amd64/include/xen/ (props changed) projects/binutils-2.17/sys/cddl/contrib/opensolaris/ (props changed) projects/binutils-2.17/sys/contrib/dev/acpica/ (props changed) projects/binutils-2.17/sys/contrib/pf/ (props changed) projects/binutils-2.17/sys/contrib/x86emu/ (props changed) projects/binutils-2.17/sys/dev/xen/xenpci/ (props changed) projects/binutils-2.17/usr.bin/calendar/ (props changed) projects/binutils-2.17/usr.bin/csup/ (props changed) projects/binutils-2.17/usr.bin/procstat/ (props changed) projects/binutils-2.17/usr.sbin/zic/ (props changed) Modified: projects/binutils-2.17/Makefile ============================================================================== --- projects/binutils-2.17/Makefile Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/Makefile Sun Nov 14 01:06:10 2010 (r215273) @@ -281,7 +281,7 @@ tinderbox: # existing system is. # .if make(universe) || make(universe_kernels) || make(tinderbox) -TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v +TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v mips .if defined(DOING_TINDERBOX) FAILFILE=tinderbox.failed Modified: projects/binutils-2.17/Makefile.inc1 ============================================================================== --- projects/binutils-2.17/Makefile.inc1 Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/Makefile.inc1 Sun Nov 14 01:06:10 2010 (r215273) @@ -123,6 +123,21 @@ TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun ${TARGET_ARCH} != ${MACHINE_ARCH} TARGET= ${TARGET_ARCH:C/mipse[lb]/mips/:C/armeb/arm} .endif +# Legacy names, for a transition period mips:mips -> mipsel:mips +.if defined(TARGET) && defined(TARGET_ARCH) && \ + ${TARGET_ARCH} == "mips" && ${TARGET} == "mips" +.warning "TARGET_ARCH of mips is deprecated in favor of mipsel or mipseb" +.if defined(TARGET_BIG_ENDIAN) +TARGET_ARCH=mipseb +.else +TARGET_ARCH=mipsel +.endif +.endif +# arm with TARGET_BIG_ENDIAN -> armeb +.if defined(TARGET_ARCH) && ${TARGET_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN) +.warning "TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated. use armeb" +TARGET_ARCH=armeb +.endif # Otherwise, default to current machine type and architecture. TARGET?= ${MACHINE} TARGET_ARCH?= ${MACHINE_ARCH} Modified: projects/binutils-2.17/bin/echo/echo.1 ============================================================================== --- projects/binutils-2.17/bin/echo/echo.1 Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/bin/echo/echo.1 Sun Nov 14 01:06:10 2010 (r215273) @@ -32,7 +32,7 @@ .\" @(#)echo.1 8.1 (Berkeley) 7/22/93 .\" $FreeBSD$ .\" -.Dd April 12, 2003 +.Dd November 12, 2010 .Dt ECHO 1 .Os .Sh NAME @@ -56,24 +56,37 @@ The following option is available: .Bl -tag -width flag .It Fl n Do not print the trailing newline character. -This may also be achieved by appending +.El +.Pp +The end-of-options marker +.Fl Fl +is not recognized and written literally. +.Pp +The newline may also be suppressed by appending .Ql \ec to the end of the string, as is done by iBCS2 compatible systems. -Note that this option as well as the effect of +Note that the +.Fl n +option as well as the effect of .Ql \ec are implementation-defined in .St -p1003.1-2001 as amended by Cor.\& 1-2002. -Applications aiming for maximum -portability are strongly encouraged to use +For portability, +.Nm +should only be used if the first argument does not start with a hyphen +.Pq Ql "-" +and does not contain any backslashes +.Pq Ql "\e" . +If this is not sufficient, .Xr printf 1 -to suppress the newline character. -.El +should be used. .Pp -Some shells may provide a builtin +Most shells provide a builtin .Nm -command which is similar or identical to this utility. +command which tends to differ from this utility +in the treatment of options and backslashes. Consult the .Xr builtin 1 manual page. Modified: projects/binutils-2.17/bin/sh/funcs/suspend ============================================================================== --- projects/binutils-2.17/bin/sh/funcs/suspend Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/bin/sh/funcs/suspend Sun Nov 14 01:06:10 2010 (r215273) @@ -34,6 +34,6 @@ suspend() { local - - set +j + set +m kill -TSTP 0 } Modified: projects/binutils-2.17/bin/sh/sh.1 ============================================================================== --- projects/binutils-2.17/bin/sh/sh.1 Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/bin/sh/sh.1 Sun Nov 14 01:06:10 2010 (r215273) @@ -626,6 +626,7 @@ There are two kinds of built-in commands Assignments before special builtins persist after they finish executing and assignment errors, redirection errors and certain operand errors cause a script to be aborted. +Special builtins cannot be overridden with a function. Both regular and special builtins can affect the shell in ways normal programs cannot. .Pp @@ -1268,19 +1269,22 @@ consists of all characters until the mat .Ql } . Any .Ql } -escaped by a backslash or within a single-quoted string, and characters in +escaped by a backslash or within a single-quoted or double-quoted +string, and characters in embedded arithmetic expansions, command substitutions, and variable expansions, are not examined in determining the matching .Ql } . -Except for the variants with +If the variants with .Ql + , .Ql - , .Ql = or -.Ql ?\& , -any +.Ql ?\& +occur within a double-quoted string, +as an extension there may be unquoted parts +(via double-quotes inside the expansion); .Ql } -within a double-quoted string is also not examined in determining the matching +within such parts are also not examined in determining the matching .Ql } . .Pp The simplest form for parameter expansion is: Modified: projects/binutils-2.17/bin/sh/var.c ============================================================================== --- projects/binutils-2.17/bin/sh/var.c Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/bin/sh/var.c Sun Nov 14 01:06:10 2010 (r215273) @@ -805,6 +805,7 @@ poplocalvars(void) if (vp == NULL) { /* $- saved */ memcpy(optlist, lvp->text, sizeof optlist); ckfree(lvp->text); + optschanged(); } else if ((lvp->flags & (VUNSET|VSTRFIXED)) == VUNSET) { (void)unsetvar(vp->text); } else { Modified: projects/binutils-2.17/contrib/binutils/bfd/config.bfd ============================================================================== --- projects/binutils-2.17/contrib/binutils/bfd/config.bfd Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/contrib/binutils/bfd/config.bfd Sun Nov 14 01:06:10 2010 (r215273) @@ -863,14 +863,18 @@ case "${targ}" in targ_defvec=bfd_elf32_tradlittlemips_vec targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_little_vec ecoff_big_vec" ;; - mips*-*-freebsd*) - targ_defvec=bfd_elf32_tradbigmips_vec - targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmisp_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" - ;; mips*-*-netbsd*) targ_defvec=bfd_elf32_tradbigmips_vec targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" ;; + mips*el-*-freebsd*) + targ_defvec=bfd_elf32_tradlittlemips_vec + targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf32_ntradbigmisp_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" + ;; + mips*-*-freebsd*) + targ_defvec=bfd_elf32_tradbigmips_vec + targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmisp_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" + ;; mips*-dec-* | mips*el-*-ecoff*) targ_defvec=ecoff_little_vec targ_selvecs=ecoff_big_vec Modified: projects/binutils-2.17/etc/defaults/periodic.conf ============================================================================== --- projects/binutils-2.17/etc/defaults/periodic.conf Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/etc/defaults/periodic.conf Sun Nov 14 01:06:10 2010 (r215273) @@ -160,6 +160,9 @@ daily_status_security_diff_flags="-b -u" # 100.chksetuid daily_status_security_chksetuid_enable="YES" +# 110.neggrpperm +daily_status_security_neggrpperm_enable="NO" + # 200.chkmounts daily_status_security_chkmounts_enable="YES" #daily_status_security_chkmounts_ignore="^amd:" # Don't check matching Modified: projects/binutils-2.17/etc/devd.conf ============================================================================== --- projects/binutils-2.17/etc/devd.conf Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/etc/devd.conf Sun Nov 14 01:06:10 2010 (r215273) @@ -97,6 +97,13 @@ detach 100 { action "/etc/rc.d/bluetooth quietstop $device-name"; }; +# Firmware downloader for Atheros AR3011 based USB Bluetooth devices +#attach 100 { +# match "vendor" "0x0cf3"; +# match "product" "0x3000"; +# action "sleep 2 && /usr/sbin/ath3kfw -d $device-name -f /usr/local/etc/ath3k-1.fw"; +#}; + # When a USB keyboard arrives, attach it as the console keyboard. attach 100 { device-name "ukbd0"; Copied: projects/binutils-2.17/etc/periodic/security/110.neggrpperm (from r215272, head/etc/periodic/security/110.neggrpperm) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/binutils-2.17/etc/periodic/security/110.neggrpperm Sun Nov 14 01:06:10 2010 (r215273, copy of r215272, head/etc/periodic/security/110.neggrpperm) @@ -0,0 +1,54 @@ +#!/bin/sh - +# +# Copyright (c) 2001 The FreeBSD Project +# 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$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +rc=0 + +case "$daily_status_security_neggrpperm_enable" in + [Yy][Ee][Ss]) + echo "" + echo 'Checking negative group permissions:' + MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'` + n=$(find -sx $MP /dev/null -type f \ + \( \( ! -perm +010 -and -perm +001 \) -or \ + \( ! -perm +020 -and -perm +002 \) -or \ + \( ! -perm +040 -and -perm +004 \) \) \ + -exec ls -liTd \{\} \+ | tee /dev/stderr | wc -l) + [ $n -gt 0 ] && rc=1 || rc=0 + ;; +esac + +exit $rc Modified: projects/binutils-2.17/etc/periodic/security/Makefile ============================================================================== --- projects/binutils-2.17/etc/periodic/security/Makefile Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/etc/periodic/security/Makefile Sun Nov 14 01:06:10 2010 (r215273) @@ -3,6 +3,7 @@ .include FILES= 100.chksetuid \ + 110.neggrpperm \ 200.chkmounts \ 300.chkuid0 \ 400.passwdless \ Modified: projects/binutils-2.17/etc/services ============================================================================== --- projects/binutils-2.17/etc/services Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/etc/services Sun Nov 14 01:06:10 2010 (r215273) @@ -33,24 +33,31 @@ echo 4/ddp #AppleTalk Echo Protoco rje 5/tcp #Remote Job Entry rje 5/udp #Remote Job Entry zip 6/ddp #Zone Information Protocol +echo 7/sctp echo 7/tcp echo 7/udp +discard 9/sctp sink null discard 9/tcp sink null discard 9/udp sink null systat 11/tcp users #Active Users systat 11/udp users #Active Users +daytime 13/sctp daytime 13/tcp daytime 13/udp qotd 17/tcp quote #Quote of the Day qotd 17/udp quote #Quote of the Day msp 18/tcp #Message Send Protocol msp 18/udp #Message Send Protocol +chargen 19/sctp ttytst source #Character Generator chargen 19/tcp ttytst source #Character Generator chargen 19/udp ttytst source #Character Generator +ftp-data 20/sctp #File Transfer [Default Data] ftp-data 20/tcp #File Transfer [Default Data] ftp-data 20/udp #File Transfer [Default Data] +ftp 21/sctp #File Transfer [Control] ftp 21/tcp #File Transfer [Control] ftp 21/udp #File Transfer [Control] +ssh 22/sctp #Secure Shell Login ssh 22/tcp #Secure Shell Login ssh 22/udp #Secure Shell Login telnet 23/tcp @@ -151,6 +158,7 @@ vettcp 78/tcp vettcp 78/udp finger 79/tcp finger 79/udp +http 80/sctp www www-http #World Wide Web HTTP http 80/tcp www www-http #World Wide Web HTTP http 80/udp www www-http #World Wide Web HTTP hosts2-ns 81/tcp #HOSTS2 Name Server @@ -350,6 +358,7 @@ xdmcp 177/tcp #X Display Manager Con xdmcp 177/udp #X Display Manager Control Protocol NextStep 178/tcp nextstep NeXTStep #NextStep Window Server NextStep 178/udp nextstep NeXTStep #NextStep Window Server +bgp 179/sctp #Border Gateway Protocol bgp 179/tcp #Border Gateway Protocol bgp 179/udp #Border Gateway Protocol ris 180/tcp #Intergraph @@ -738,6 +747,7 @@ decvms-sysmgt 441/tcp decvms-sysmgt 441/udp cvc_hostd 442/tcp cvc_hostd 442/udp +https 443/sctp https 443/tcp https 443/udp snpp 444/tcp #Simple Network Paging Protocol @@ -1519,7 +1529,9 @@ nfsd-keepalive 1110/udp #Client status supfiledbg 1127/tcp # for SUP nfa 1155/tcp #Network File Access nfa 1155/udp #Network File Access -phone 1167/udp #conference calling +cisco-ipsla 1167/sctp #Cisco IP SLAs Control Protocol +cisco-ipsla 1167/tcp #Cisco IP SLAs Control Protocol +cisco-ipsla 1167/udp #Cisco IP SLAs Control Protocol skkserv 1178/tcp #SKK (kanji input) openvpn 1194/tcp #OpenVPN openvpn 1194/udp #OpenVPN @@ -2119,6 +2131,7 @@ sdfunc 2046/udp #dls 2047/udp dls-monitor 2048/tcp dls-monitor 2048/udp +nfsd 2049/sctp nfs # NFS server daemon nfsd 2049/tcp nfs # NFS server daemon nfsd 2049/udp nfs # NFS server daemon #PROBLEMS!============================================================= @@ -2146,6 +2159,8 @@ hpssd 2207/tcp #HP Status and Service hpssd 2207/udp #HP Status and Services hpiod 2208/tcp #HP I/O Backend hpiod 2208/udp #HP I/O Backend +rcip-itu 2225/sctp #Resource Connection Initiation Protocol +rcip-itu 2225/tcp #Resource Connection Initiation Protocol ivs-video 2232/tcp #IVS Video default ivs-video 2232/udp #IVS Video default ivsd 2241/tcp #IVS Daemon @@ -2179,6 +2194,17 @@ dict 2628/udp #RFC 2229 listen 2766/tcp #System V listener port www-dev 2784/tcp #world wide web - development www-dev 2784/udp #world wide web - development +m2ua 2904/sctp #M2UA +m2ua 2904/tcp #M2UA +m2ua 2904/udp #M2UA +m3ua 2905/sctp #M3UA +m3ua 2905/tcp #M3UA +megaco-h248 2944/sctp #Megaco-H.248 text +megaco-h248 2944/tcp #Megaco H-248 +megaco-h248 2944/udp #Megaco H-248 +h248-binary 2945/sctp #Megaco/H.248 binary +h248-binary 2945/tcp #H248 Binary +h248-binary 2945/udp #H248 Binary eppc 3031/tcp #Remote AppleEvents/PPC Toolbox eppc 3031/udp #Remote AppleEvents/PPC Toolbox NSWS 3049/tcp @@ -2186,6 +2212,7 @@ NSWS 3049/udp gds_db 3050/tcp #InterBase Database Remote Protocol gds_db 3050/udp #InterBase Database Remote Protocol sj3 3086/tcp #SJ3 (kanji input) +itu-bicc-stc 3097/sctp #ITU-T Q.1902.1/Q.2150.3 vmodem 3141/tcp vmodem 3141/udp iscsi-target 3260/tcp # iSCSI port @@ -2205,10 +2232,19 @@ vat-control 3457/tcp #VAT default cont vat-control 3457/udp #VAT default control nut 3493/tcp #Network UPS Tools nut 3493/udp #Network UPS Tools +m2pa 3565/sctp #M2PA +m2pa 3565/tcp #M2PA tsp 3653/tcp #Tunnel Setup Protocol tsp 3653/udp #Tunnel Setup Protocol svn 3690/tcp #Subversion svn 3690/udp #Subversion +asap 3863/sctp #asap sctp +asap 3863/tcp #asap tcp port +asap 3863/udp #asap udp port +asap-tls 3864/sctp #asap-sctp/tls +asap-tls 3864/tcp #asap/tls tcp port +diameter 3868/tcp #DIAMETER +diameter 3868/sctp #DIAMETER udt_os 3900/tcp #Unidata UDT OS udt_os 3900/udp #Unidata UDT OS mapper-nodemgr 3984/tcp #MAPPER network node manager @@ -2245,6 +2281,12 @@ fax 4557/tcp #FAX transmission servic hylafax 4559/tcp #HylaFAX client-server protocol rfa 4672/tcp #remote file access server rfa 4672/udp #remote file access server +ipfix 4739/sctp #IP Flow Info Export +ipfix 4739/tcp #IP Flow Info Export +ipfix 4739/udp #IP Flow Info Export +ipfixs 4740/sctp #ipfix protocol over DTLS +ipfixs 4740/tcp #ipfix protocol over TLS +ipfixs 4740/udp #ipfix protocol over DTLS commplex-main 5000/tcp commplex-main 5000/udp commplex-link 5001/tcp @@ -2263,6 +2305,8 @@ sip 5060/tcp #Session Initialization sip 5060/udp #Session Initialization Protocol (VoIP) sip-tls 5061/tcp #SIP over TLS sip-tls 5061/udp #SIP over TLS +car 5090/sctp #Candidate AR +cxtp 5091/sctp #Context Transfer Protocol rmonitor_secure 5145/tcp rmonitor_secure 5145/udp aol 5190/tcp #America-Online @@ -2298,6 +2342,12 @@ mdns 5353/udp #Multicast DNS postgresql 5432/tcp #PostgreSQL Database postgresql 5432/udp #PostgreSQL Database rplay 5555/udp +amqp 5672/sctp #AMQP +amqp 5672/tcp #AMQP +amqp 5672/udp #AMQP +v5ua 5675/sctp #V5UA application port +v5ua 5675/tcp #V5UA application port +v5ua 5675/udp #V5UA application port canna 5680/tcp #Canna (Japanese Input) proshareaudio 5713/tcp #proshare conf audio proshareaudio 5713/udp #proshare conf audio @@ -2343,6 +2393,9 @@ xdsxdm 6558/udp sane-port 6566/tcp #Scanner Access Now Easy (SANE) Control Port sane-port 6566/udp #Scanner Access Now Easy (SANE) Control Port ircd 6667/tcp #Internet Relay Chat (unoffical) +frc-hp 6704/sctp #ForCES HP (High Priority) channel +frc-mp 6705/sctp #ForCES MP (Medium Priority) channel +frc-lp 6706/sctp #ForCES LP (Low priority) channel acmsoda 6969/tcp acmsoda 6969/udp afs3-fileserver 7000/tcp #file server itself @@ -2377,8 +2430,16 @@ fodms 7200/tcp #FODMS FLIP fodms 7200/udp #FODMS FLIP dlip 7201/tcp dlip 7201/udp +simco 7626/sctp #SImple Middlebox COnfiguration (SIMCO) +simco 7626/tcp #SImple Middlebox COnfiguration (SIMCO) Server ftp-proxy 8021/tcp # FTP proxy +pim 8471/sctp #PIM over Reliable Transport +pim 8471/tcp #PIM over Reliable Transport natd 8668/divert # Network Address Translation +lcs-ap 9082/sctp #LCS Application Protocol +aurora 9084/sctp #IBM AURORA Performance Visualizer +aurora 9084/tcp #IBM AURORA Performance Visualizer +aurora 9084/udp #IBM AURORA Performance Visualizer jetdirect 9100/tcp #HP JetDirect card git 9418/tcp #git pack transfer service git 9418/udp #git pack transfer service @@ -2386,18 +2447,37 @@ man 9535/tcp man 9535/udp sd 9876/tcp #Session Director sd 9876/udp #Session Director +iua 9900/sctp #IUA +iua 9900/tcp #IUA +iua 9900/udp #IUA +enrp 9901/sctp #enrp server channel +enrp 9901/udp #enrp server channel +enrp-tls 9902/sctp #enrp/tls server channel amanda 10080/tcp #Dump server control amanda 10080/udp #Dump server control amandaidx 10082/tcp #Amanda indexing amidxtape 10083/tcp #Amanda tape indexing +wmereceiving 11997/sctp #WorldMailExpress +wmedistribution 11998/sctp #WorldMailExpress +wmereporting 11999/sctp #WorldMailExpress +sua 14001/sctp #SUA +sua 14001/tcp #SUA isode-dua 17007/tcp isode-dua 17007/udp biimenu 18000/tcp #Beckman Instruments, Inc. biimenu 18000/udp #Beckman Instruments, Inc. +nfsrdma 20049/sctp #Network File System (NFS) over RDMA +nfsrdma 20049/tcp #Network File System (NFS) over RDMA +nfsrdma 20049/udp #Network File System (NFS) over RDMA wnn4 22273/tcp wnn6 #Wnn4 (Japanese input) wnn4_Cn 22289/tcp wnn6_Cn #Wnn4 (Chinese input) wnn4_Kr 22305/tcp wnn6_Kr #Wnn4 (Korean input) wnn4_Tw 22321/tcp wnn6_Tw #Wnn4 (Taiwanse input) wnn6_DS 26208/tcp #Wnn6 (Dserver) +sgsap 29118/sctp #SGsAP in 3GPP +sbcap 29168/sctp #SBcAP in 3GPP +iuhsctpassoc 29169/sctp #HNBAP and RUA Common Association +s1-control 36412/sctp #S1-Control Plane (3GPP) +x2-control 36422/sctp #X2-Control Plane (3GPP) dbbrowse 47557/tcp #Databeam Corporation dbbrowse 47557/udp #Databeam Corporation Modified: projects/binutils-2.17/include/readpassphrase.h ============================================================================== --- projects/binutils-2.17/include/readpassphrase.h Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/include/readpassphrase.h Sun Nov 14 01:06:10 2010 (r215273) @@ -1,31 +1,24 @@ -/* $OpenBSD: /usr/local/www/cvsroot/OpenBSD/src/include/readpassphrase.h,v 1.2 2002/02/16 21:27:17 millert Exp $ */ +/* $OpenBSD: readpassphrase.h,v 1.5 2003/06/17 21:56:23 millert Exp $ */ /* $FreeBSD$ */ /* - * Copyright (c) 2000 Todd C. Miller - * All rights reserved. + * Copyright (c) 2000, 2002 Todd C. Miller * - * 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. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * THIS SOFTWARE IS PROVIDED ``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. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Sponsored in part by the Defense Advanced Research Projects + * Agency (DARPA) and Air Force Research Laboratory, Air Force + * Materiel Command, USAF, under agreement number F39502-99-1-0512. */ #ifndef _READPASSPHRASE_H_ @@ -37,6 +30,7 @@ #define RPP_FORCELOWER 0x04 /* Force input to lower case. */ #define RPP_FORCEUPPER 0x08 /* Force input to upper case. */ #define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */ +#define RPP_STDIN 0x20 /* Read from stdin, not /dev/tty */ #include #include Modified: projects/binutils-2.17/lib/libc/gen/readpassphrase.3 ============================================================================== --- projects/binutils-2.17/lib/libc/gen/readpassphrase.3 Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/lib/libc/gen/readpassphrase.3 Sun Nov 14 01:06:10 2010 (r215273) @@ -1,33 +1,26 @@ -.\" $OpenBSD: readpassphrase.3,v 1.7 2001/12/15 15:37:51 millert Exp $ +.\" $OpenBSD: readpassphrase.3,v 1.17 2007/05/31 19:19:28 jmc Exp $ .\" -.\" Copyright (c) 2000 Todd C. Miller -.\" All rights reserved. +.\" Copyright (c) 2000, 2002 Todd C. Miller .\" -.\" 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. 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 ``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. +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.\" Sponsored in part by the Defense Advanced Research Projects +.\" Agency (DARPA) and Air Force Research Laboratory, Air Force +.\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" .\" $FreeBSD$ .\" -.Dd December 7, 2001 +.Dd May 31, 2007 .Dt READPASSPHRASE 3 .Os .Sh NAME @@ -79,6 +72,8 @@ force input to lower case force input to upper case .It Dv RPP_SEVENBIT strip the high bit from input +.It Dv RPP_STDIN +force read of passphrase from stdin .El .Pp The calling process should zero the passphrase as soon as possible to @@ -87,7 +82,7 @@ space. .Sh RETURN VALUES Upon successful completion, .Fn readpassphrase -returns a pointer to the null-terminated passphrase. +returns a pointer to the NUL-terminated passphrase. If an error is encountered, the terminal state is restored and a .Dv NULL @@ -117,40 +112,6 @@ if (compare(transform(passbuf), epass) ! memset(passbuf, 0, sizeof(passbuf)); .Ed -.Sh SIGNALS -The -.Fn readpassphrase -function -will catch the following signals: -.Pp -.Bl -tag -compact -.It Dv SIGINT -.It Dv SIGHUP -.It Dv SIGQUIT -.It Dv SIGTERM -.It Dv SIGTSTP -.It Dv SIGTTIN -.It Dv SIGTTOU -.El -.Pp -When one of the above signals is intercepted, terminal echo will -be restored if it had previously been turned off. -If a signal handler was installed for the signal when -.Fn readpassphrase -was called that handler is then executed. -If no handler was previously installed for the signal then the -default action is taken as per -.Xr sigaction 2 . -.Pp -The -.Dv SIGTSTP , SIGTTIN , -and -.Dv SIGTTOU -signals (stop signal generated from keyboard or due to terminal I/O -from a background process) are treated specially. -When the process is resumed after it has been stopped, -.Fn readpassphrase -will reprint the prompt and the user may then enter a passphrase. .Sh ERRORS .Bl -tag -width Er .It Bq Er EINTR @@ -159,14 +120,14 @@ The function was interrupted by a signal. .It Bq Er EINVAL The -.Fa bufsiz +.Ar bufsiz argument was zero. .It Bq Er EIO The process is a member of a background process attempting to read from its controlling terminal, the process is ignoring or blocking the .Dv SIGTTIN -signal or the process group is orphaned. +signal, or the process group is orphaned. .It Bq Er EMFILE The process has already reached its limit for open file descriptors. .It Bq Er ENFILE @@ -176,6 +137,35 @@ There is no controlling terminal and the .Dv RPP_REQUIRE_TTY flag was specified. .El +.Sh SIGNALS +The +.Fn readpassphrase +function +will catch the following signals: +.Bd -literal -offset indent +SIGALRM SIGHUP SIGINT +SIGPIPE SIGQUIT SIGTERM +SIGTSTP SIGTTIN SIGTTOU +.Ed +.Pp +When one of the above signals is intercepted, terminal echo will +be restored if it had previously been turned off. +If a signal handler was installed for the signal when +.Fn readpassphrase +was called, that handler is then executed. +If no handler was previously installed for the signal then the +default action is taken as per +.Xr sigaction 2 . +.Pp +The +.Dv SIGTSTP , SIGTTIN +and +.Dv SIGTTOU +signals (stop signals generated from keyboard or due to terminal I/O +from a background process) are treated specially. +When the process is resumed after it has been stopped, +.Fn readpassphrase +will reprint the prompt and the user may then enter a passphrase. .Sh SEE ALSO .Xr sigaction 2 , .Xr getpass 3 Modified: projects/binutils-2.17/lib/libc/gen/readpassphrase.c ============================================================================== --- projects/binutils-2.17/lib/libc/gen/readpassphrase.c Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/lib/libc/gen/readpassphrase.c Sun Nov 14 01:06:10 2010 (r215273) @@ -1,35 +1,26 @@ -/* $OpenBSD: readpassphrase.c,v 1.12 2001/12/15 05:41:00 millert Exp $ */ +/* $OpenBSD: readpassphrase.c,v 1.23 2010/05/14 13:30:34 millert Exp $ */ /* - * Copyright (c) 2000 Todd C. Miller - * All rights reserved. + * Copyright (c) 2000-2002, 2007, 2010 + * Todd C. Miller * - * 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. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. * - * THIS SOFTWARE IS PROVIDED ``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. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Sponsored in part by the Defense Advanced Research Projects + * Agency (DARPA) and Air Force Research Laboratory, Air Force + * Materiel Command, USAF, under agreement number F39502-99-1-0512. */ -#if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$OpenBSD: readpassphrase.c,v 1.12 2001/12/15 05:41:00 millert Exp $"; -#endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); @@ -46,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" -static volatile sig_atomic_t signo; +static volatile sig_atomic_t signo[NSIG]; static void handler(int); @@ -54,11 +45,11 @@ char * readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags) { ssize_t nr; - int input, output, save_errno; + int input, output, save_errno, i, need_restart; char ch, *p, *end; struct termios term, oterm; - struct sigaction sa, saveint, savehup, savequit, saveterm; - struct sigaction savetstp, savettin, savettou; + struct sigaction sa, savealrm, saveint, savehup, savequit, saveterm; + struct sigaction savetstp, savettin, savettou, savepipe; /* I suppose we could alloc on demand in this case (XXX). */ if (bufsiz == 0) { @@ -67,11 +58,17 @@ readpassphrase(const char *prompt, char } restart: + for (i = 0; i < NSIG; i++) + signo[i] = 0; + nr = -1; + save_errno = 0; + need_restart = 0; /* * Read and write to /dev/tty if available. If not, read from * stdin and write to stderr unless a tty is required. */ - if ((input = output = _open(_PATH_TTY, O_RDWR)) == -1) { + if ((flags & RPP_STDIN) || + (input = output = _open(_PATH_TTY, O_RDWR)) == -1) { if (flags & RPP_REQUIRE_TTY) { errno = ENOTTY; return(NULL); @@ -81,45 +78,55 @@ restart: } /* + * Turn off echo if possible. + * If we are using a tty but are not the foreground pgrp this will + * generate SIGTTOU, so do it *before* installing the signal handlers. + */ + if (input != STDIN_FILENO && tcgetattr(input, &oterm) == 0) { + memcpy(&term, &oterm, sizeof(term)); + if (!(flags & RPP_ECHO_ON)) + term.c_lflag &= ~(ECHO | ECHONL); + if (term.c_cc[VSTATUS] != _POSIX_VDISABLE) + term.c_cc[VSTATUS] = _POSIX_VDISABLE; + (void)tcsetattr(input, TCSAFLUSH|TCSASOFT, &term); + } else { + memset(&term, 0, sizeof(term)); + term.c_lflag |= ECHO; + memset(&oterm, 0, sizeof(oterm)); + oterm.c_lflag |= ECHO; + } + + /* * Catch signals that would otherwise cause the user to end * up with echo turned off in the shell. Don't worry about - * things like SIGALRM and SIGPIPE for now. + * things like SIGXCPU and SIGVTALRM for now. */ sigemptyset(&sa.sa_mask); sa.sa_flags = 0; /* don't restart system calls */ sa.sa_handler = handler; - (void)_sigaction(SIGINT, &sa, &saveint); + (void)_sigaction(SIGALRM, &sa, &savealrm); (void)_sigaction(SIGHUP, &sa, &savehup); + (void)_sigaction(SIGINT, &sa, &saveint); + (void)_sigaction(SIGPIPE, &sa, &savepipe); (void)_sigaction(SIGQUIT, &sa, &savequit); (void)_sigaction(SIGTERM, &sa, &saveterm); (void)_sigaction(SIGTSTP, &sa, &savetstp); (void)_sigaction(SIGTTIN, &sa, &savettin); (void)_sigaction(SIGTTOU, &sa, &savettou); - /* Turn off echo if possible. */ - if (tcgetattr(input, &oterm) == 0) { - memcpy(&term, &oterm, sizeof(term)); - if (!(flags & RPP_ECHO_ON)) - term.c_lflag &= ~(ECHO | ECHONL); - if (term.c_cc[VSTATUS] != _POSIX_VDISABLE) - term.c_cc[VSTATUS] = _POSIX_VDISABLE; - (void)tcsetattr(input, TCSAFLUSH|TCSASOFT, &term); - } else { - memset(&term, 0, sizeof(term)); - memset(&oterm, 0, sizeof(oterm)); - } - - (void)_write(output, prompt, strlen(prompt)); + if (!(flags & RPP_STDIN)) + (void)_write(output, prompt, strlen(prompt)); end = buf + bufsiz - 1; - for (p = buf; (nr = _read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r';) { + p = buf; + while ((nr = _read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r') { if (p < end) { if ((flags & RPP_SEVENBIT)) ch &= 0x7f; if (isalpha(ch)) { if ((flags & RPP_FORCELOWER)) - ch = tolower(ch); + ch = (char)tolower(ch); if ((flags & RPP_FORCEUPPER)) - ch = toupper(ch); + ch = (char)toupper(ch); } *p++ = ch; } @@ -130,11 +137,16 @@ restart: (void)_write(output, "\n", 1); /* Restore old terminal settings and signals. */ - if (memcmp(&term, &oterm, sizeof(term)) != 0) - (void)tcsetattr(input, TCSANOW|TCSASOFT, &oterm); - (void)_sigaction(SIGINT, &saveint, NULL); + if (memcmp(&term, &oterm, sizeof(term)) != 0) { + while (tcsetattr(input, TCSAFLUSH|TCSASOFT, &oterm) == -1 && + errno == EINTR && !signo[SIGTTOU]) + continue; + } + (void)_sigaction(SIGALRM, &savealrm, NULL); (void)_sigaction(SIGHUP, &savehup, NULL); + (void)_sigaction(SIGINT, &saveint, NULL); (void)_sigaction(SIGQUIT, &savequit, NULL); + (void)_sigaction(SIGPIPE, &savepipe, NULL); (void)_sigaction(SIGTERM, &saveterm, NULL); (void)_sigaction(SIGTSTP, &savetstp, NULL); (void)_sigaction(SIGTTIN, &savettin, NULL); @@ -146,18 +158,22 @@ restart: * If we were interrupted by a signal, resend it to ourselves * now that we have restored the signal handlers. */ - if (signo) { - kill(getpid(), signo); - switch (signo) { - case SIGTSTP: - case SIGTTIN: - case SIGTTOU: - signo = 0; - goto restart; + for (i = 0; i < NSIG; i++) { + if (signo[i]) { + kill(getpid(), i); + switch (i) { + case SIGTSTP: + case SIGTTIN: + case SIGTTOU: + need_restart = 1; + } } } + if (need_restart) + goto restart; - errno = save_errno; + if (save_errno) + errno = save_errno; return(nr == -1 ? NULL : buf); } @@ -174,5 +190,5 @@ getpass(const char *prompt) static void handler(int s) { - signo = s; + signo[s] = 1; } Modified: projects/binutils-2.17/lib/libusb/libusb10.c ============================================================================== --- projects/binutils-2.17/lib/libusb/libusb10.c Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/lib/libusb/libusb10.c Sun Nov 14 01:06:10 2010 (r215273) @@ -800,6 +800,10 @@ libusb_free_transfer(struct libusb_trans if (uxfer == NULL) return; /* be NULL safe */ + /* check if we should free the transfer buffer */ + if (uxfer->flags & LIBUSB_TRANSFER_FREE_BUFFER) + free(uxfer->buffer); + sxfer = (struct libusb_super_transfer *)( (uint8_t *)uxfer - sizeof(*sxfer)); Modified: projects/binutils-2.17/lib/libusb/libusb10_io.c ============================================================================== --- projects/binutils-2.17/lib/libusb/libusb10_io.c Sat Nov 13 22:40:37 2010 (r215272) +++ projects/binutils-2.17/lib/libusb/libusb10_io.c Sun Nov 14 01:06:10 2010 (r215273) @@ -187,6 +187,8 @@ do_done: /* Do all done callbacks */ while ((sxfer = TAILQ_FIRST(&ctx->tr_done))) { + uint8_t flags; + TAILQ_REMOVE(&ctx->tr_done, sxfer, entry); sxfer->entry.tqe_prev = NULL; @@ -197,13 +199,14 @@ do_done: uxfer = (struct libusb_transfer *)( ((uint8_t *)sxfer) + sizeof(*sxfer)); + /* Allow the callback to free the transfer itself. */ + flags = uxfer->flags; + if (uxfer->callback != NULL) (uxfer->callback) (uxfer); - if (uxfer->flags & LIBUSB_TRANSFER_FREE_BUFFER) - free(uxfer->buffer); - - if (uxfer->flags & LIBUSB_TRANSFER_FREE_TRANSFER) + /* Check if the USB transfer should be automatically freed. */ + if (flags & LIBUSB_TRANSFER_FREE_TRANSFER) libusb_free_transfer(uxfer); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sun Nov 14 20:47:31 2010 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 6C4191065674; Sun, 14 Nov 2010 20:47:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57BDF8FC13; Sun, 14 Nov 2010 20:47:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAEKlVqI093533; Sun, 14 Nov 2010 20:47:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAEKlUpf093507; Sun, 14 Nov 2010 20:47:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011142047.oAEKlUpf093507@svn.freebsd.org> From: Dimitry Andric Date: Sun, 14 Nov 2010 20:47:30 +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: r215320 - in projects/binutils-2.17: . bin/sh bin/sh/bltin contrib/top crypto/openssl/ssl gnu/lib/libgcc gnu/usr.bin/binutils gnu/usr.bin/cc gnu/usr.bin/gdb gnu/usr.bin/gdb/libgdb lib/l... 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, 14 Nov 2010 20:47:31 -0000 Author: dim Date: Sun Nov 14 20:47:30 2010 New Revision: 215320 URL: http://svn.freebsd.org/changeset/base/215320 Log: Sync: merge r215273 through r215318 from ^/head. Modified: projects/binutils-2.17/Makefile.inc1 projects/binutils-2.17/ObsoleteFiles.inc projects/binutils-2.17/README projects/binutils-2.17/UPDATING projects/binutils-2.17/bin/sh/bltin/bltin.h projects/binutils-2.17/bin/sh/output.c projects/binutils-2.17/bin/sh/output.h projects/binutils-2.17/crypto/openssl/ssl/s3_clnt.c projects/binutils-2.17/gnu/lib/libgcc/Makefile projects/binutils-2.17/gnu/usr.bin/binutils/Makefile.inc0 projects/binutils-2.17/gnu/usr.bin/cc/Makefile.tgt projects/binutils-2.17/gnu/usr.bin/gdb/Makefile.inc projects/binutils-2.17/gnu/usr.bin/gdb/libgdb/Makefile projects/binutils-2.17/lib/libc/gen/pututxline.c projects/binutils-2.17/lib/libkvm/kvm.c projects/binutils-2.17/lib/libkvm/kvm_pcpu.c projects/binutils-2.17/share/mk/bsd.cpu.mk projects/binutils-2.17/sys/amd64/amd64/trap.c projects/binutils-2.17/sys/boot/i386/boot2/boot1.S projects/binutils-2.17/sys/dev/arcmsr/arcmsr.c projects/binutils-2.17/sys/dev/bce/if_bce.c projects/binutils-2.17/sys/dev/bge/if_bge.c projects/binutils-2.17/sys/dev/mii/atphy.c projects/binutils-2.17/sys/dev/mii/brgphy.c projects/binutils-2.17/sys/dev/mii/ciphy.c projects/binutils-2.17/sys/dev/mii/e1000phy.c projects/binutils-2.17/sys/dev/mii/gentbi.c projects/binutils-2.17/sys/dev/mii/ip1000phy.c projects/binutils-2.17/sys/dev/mii/jmphy.c projects/binutils-2.17/sys/dev/mii/mii.h projects/binutils-2.17/sys/dev/mii/mii_physubr.c projects/binutils-2.17/sys/dev/mii/miivar.h projects/binutils-2.17/sys/dev/mii/nsgphy.c projects/binutils-2.17/sys/dev/mii/rgephy.c projects/binutils-2.17/sys/dev/mii/smcphy.c projects/binutils-2.17/sys/dev/mii/ukphy_subr.c projects/binutils-2.17/sys/dev/mii/xmphy.c projects/binutils-2.17/sys/dev/msk/if_msk.c projects/binutils-2.17/sys/dev/nfe/if_nfe.c projects/binutils-2.17/sys/dev/stge/if_stge.c projects/binutils-2.17/sys/geom/eli/g_eli.c projects/binutils-2.17/sys/i386/i386/trap.c projects/binutils-2.17/sys/kern/kern_clock.c projects/binutils-2.17/sys/kern/kern_clocksource.c projects/binutils-2.17/sys/kern/kern_proc.c projects/binutils-2.17/sys/kern/kern_tc.c projects/binutils-2.17/sys/kern/link_elf_obj.c projects/binutils-2.17/sys/kern/sched_4bsd.c projects/binutils-2.17/sys/kern/subr_clock.c projects/binutils-2.17/sys/kern/subr_pcpu.c projects/binutils-2.17/sys/kern/sysv_sem.c projects/binutils-2.17/sys/kern/vfs_cache.c projects/binutils-2.17/sys/kern/vfs_mountroot.c projects/binutils-2.17/sys/kern/vfs_subr.c projects/binutils-2.17/sys/libkern/gets.c projects/binutils-2.17/sys/mips/mips/tick.c projects/binutils-2.17/sys/mips/rmi/tick.c projects/binutils-2.17/sys/net/flowtable.c projects/binutils-2.17/sys/net/if.c projects/binutils-2.17/sys/net/if_clone.c projects/binutils-2.17/sys/net/if_ethersubr.c projects/binutils-2.17/sys/net/if_gif.c projects/binutils-2.17/sys/net/if_llatbl.c projects/binutils-2.17/sys/net/if_loop.c projects/binutils-2.17/sys/net/if_media.h projects/binutils-2.17/sys/net/route.c projects/binutils-2.17/sys/net/vnet.c projects/binutils-2.17/sys/net/vnet.h projects/binutils-2.17/sys/net80211/ieee80211_ratectl.h projects/binutils-2.17/sys/netgraph/ng_base.c projects/binutils-2.17/sys/netgraph/ng_eiface.c projects/binutils-2.17/sys/netgraph/ng_iface.c projects/binutils-2.17/sys/netinet/if_ether.c projects/binutils-2.17/sys/netinet/igmp.c projects/binutils-2.17/sys/netinet/in.c projects/binutils-2.17/sys/netinet/in_pcb.c projects/binutils-2.17/sys/netinet/in_rmx.c projects/binutils-2.17/sys/netinet/ip_divert.c projects/binutils-2.17/sys/netinet/ip_fastfwd.c projects/binutils-2.17/sys/netinet/ip_icmp.c projects/binutils-2.17/sys/netinet/ip_input.c projects/binutils-2.17/sys/netinet/ip_ipsec.c projects/binutils-2.17/sys/netinet/ip_mroute.c projects/binutils-2.17/sys/netinet/ipfw/ip_fw2.c projects/binutils-2.17/sys/netinet/ipfw/ip_fw_dynamic.c projects/binutils-2.17/sys/netinet/ipfw/ip_fw_nat.c projects/binutils-2.17/sys/netinet/ipfw/ip_fw_pfil.c projects/binutils-2.17/sys/netinet/sctp_crc32.c projects/binutils-2.17/sys/netinet/sctp_output.c projects/binutils-2.17/sys/netinet/siftr.c projects/binutils-2.17/sys/netinet/tcp_hostcache.c projects/binutils-2.17/sys/netinet/tcp_reass.c projects/binutils-2.17/sys/netinet/tcp_subr.c projects/binutils-2.17/sys/netinet/tcp_syncache.c projects/binutils-2.17/sys/netinet/tcp_timewait.c projects/binutils-2.17/sys/netinet/udp_usrreq.c projects/binutils-2.17/sys/netinet6/frag6.c projects/binutils-2.17/sys/netinet6/icmp6.c projects/binutils-2.17/sys/netinet6/in6_rmx.c projects/binutils-2.17/sys/netinet6/in6_src.c projects/binutils-2.17/sys/netinet6/ip6_ipsec.c projects/binutils-2.17/sys/netinet6/ip6_mroute.c projects/binutils-2.17/sys/netinet6/mld6.c projects/binutils-2.17/sys/netinet6/nd6.c projects/binutils-2.17/sys/netinet6/nd6_nbr.c projects/binutils-2.17/sys/netinet6/nd6_rtr.c projects/binutils-2.17/sys/netinet6/scope6.c projects/binutils-2.17/sys/netinet6/send.c projects/binutils-2.17/sys/netipsec/key.c projects/binutils-2.17/sys/netipsec/keysock.c projects/binutils-2.17/sys/netipsec/xform_esp.c projects/binutils-2.17/sys/opencrypto/cryptosoft.c projects/binutils-2.17/sys/powerpc/aim/clock.c projects/binutils-2.17/sys/powerpc/booke/clock.c projects/binutils-2.17/sys/sys/cdefs.h projects/binutils-2.17/sys/sys/libkern.h projects/binutils-2.17/sys/sys/linker_set.h projects/binutils-2.17/sys/sys/param.h projects/binutils-2.17/sys/sys/pcpu.h projects/binutils-2.17/sys/vm/vm_map.c projects/binutils-2.17/sys/vm/vm_mmap.c projects/binutils-2.17/tools/build/mk/OptionalObsoleteFiles.inc projects/binutils-2.17/usr.sbin/sysinstall/cdrom.c projects/binutils-2.17/usr.sbin/sysinstall/config.c projects/binutils-2.17/usr.sbin/sysinstall/help/shortcuts.hlp projects/binutils-2.17/usr.sbin/sysinstall/install.c projects/binutils-2.17/usr.sbin/sysinstall/media.c projects/binutils-2.17/usr.sbin/sysinstall/menus.c projects/binutils-2.17/usr.sbin/sysinstall/sysinstall.8 projects/binutils-2.17/usr.sbin/sysinstall/sysinstall.h Directory Properties: projects/binutils-2.17/ (props changed) projects/binutils-2.17/cddl/contrib/opensolaris/ (props changed) projects/binutils-2.17/contrib/bind9/ (props changed) projects/binutils-2.17/contrib/binutils/ (props changed) projects/binutils-2.17/contrib/bzip2/ (props changed) projects/binutils-2.17/contrib/ee/ (props changed) projects/binutils-2.17/contrib/expat/ (props changed) projects/binutils-2.17/contrib/file/ (props changed) projects/binutils-2.17/contrib/gdb/ (props changed) projects/binutils-2.17/contrib/gdtoa/ (props changed) projects/binutils-2.17/contrib/gnu-sort/ (props changed) projects/binutils-2.17/contrib/groff/ (props changed) projects/binutils-2.17/contrib/less/ (props changed) projects/binutils-2.17/contrib/libpcap/ (props changed) projects/binutils-2.17/contrib/llvm/ (props changed) projects/binutils-2.17/contrib/llvm/tools/clang/ (props changed) projects/binutils-2.17/contrib/ncurses/ (props changed) projects/binutils-2.17/contrib/netcat/ (props changed) projects/binutils-2.17/contrib/ntp/ (props changed) projects/binutils-2.17/contrib/one-true-awk/ (props changed) projects/binutils-2.17/contrib/openbsm/ (props changed) projects/binutils-2.17/contrib/openpam/ (props changed) projects/binutils-2.17/contrib/pf/ (props changed) projects/binutils-2.17/contrib/sendmail/ (props changed) projects/binutils-2.17/contrib/tcpdump/ (props changed) projects/binutils-2.17/contrib/tcsh/ (props changed) projects/binutils-2.17/contrib/top/ (props changed) projects/binutils-2.17/contrib/top/install-sh (props changed) projects/binutils-2.17/contrib/tzcode/stdtime/ (props changed) projects/binutils-2.17/contrib/tzcode/zic/ (props changed) projects/binutils-2.17/contrib/tzdata/ (props changed) projects/binutils-2.17/contrib/wpa/ (props changed) projects/binutils-2.17/contrib/xz/ (props changed) projects/binutils-2.17/crypto/openssh/ (props changed) projects/binutils-2.17/crypto/openssl/ (props changed) projects/binutils-2.17/lib/libc/ (props changed) projects/binutils-2.17/lib/libc/stdtime/ (props changed) projects/binutils-2.17/lib/libutil/ (props changed) projects/binutils-2.17/lib/libz/ (props changed) projects/binutils-2.17/sbin/ (props changed) projects/binutils-2.17/sbin/ipfw/ (props changed) projects/binutils-2.17/share/mk/bsd.arch.inc.mk (props changed) projects/binutils-2.17/share/zoneinfo/ (props changed) projects/binutils-2.17/sys/ (props changed) projects/binutils-2.17/sys/amd64/include/xen/ (props changed) projects/binutils-2.17/sys/cddl/contrib/opensolaris/ (props changed) projects/binutils-2.17/sys/contrib/dev/acpica/ (props changed) projects/binutils-2.17/sys/contrib/pf/ (props changed) projects/binutils-2.17/sys/contrib/x86emu/ (props changed) projects/binutils-2.17/sys/dev/xen/xenpci/ (props changed) projects/binutils-2.17/usr.bin/calendar/ (props changed) projects/binutils-2.17/usr.bin/csup/ (props changed) projects/binutils-2.17/usr.bin/procstat/ (props changed) projects/binutils-2.17/usr.sbin/zic/ (props changed) Modified: projects/binutils-2.17/Makefile.inc1 ============================================================================== --- projects/binutils-2.17/Makefile.inc1 Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/Makefile.inc1 Sun Nov 14 20:47:30 2010 (r215320) @@ -121,7 +121,7 @@ VERSION+= ${OSRELDATE} TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -TARGET= ${TARGET_ARCH:C/mipse[lb]/mips/:C/armeb/arm} +TARGET= ${TARGET_ARCH:C/mipse[lb]/mips/:C/armeb/arm/} .endif # Legacy names, for a transition period mips:mips -> mipsel:mips .if defined(TARGET) && defined(TARGET_ARCH) && \ Modified: projects/binutils-2.17/ObsoleteFiles.inc ============================================================================== --- projects/binutils-2.17/ObsoleteFiles.inc Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/ObsoleteFiles.inc Sun Nov 14 20:47:30 2010 (r215320) @@ -5086,7 +5086,7 @@ OLD_LIBS+=usr/lib/libthr.so.2 .endif # 20060127: revert libdisk to static-only OLD_LIBS+=usr/lib/libdisk.so.3 -# 20051027: libc_r discontinued +# 20051027: libc_r discontinued (removed 20101113) OLD_LIBS+=usr/lib/libc_r.a OLD_LIBS+=usr/lib/libc_r.so OLD_LIBS+=usr/lib/libc_r.so.7 Modified: projects/binutils-2.17/README ============================================================================== --- projects/binutils-2.17/README Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/README Sun Nov 14 20:47:30 2010 (r215320) @@ -43,6 +43,9 @@ Source Roadmap: --------------- bin System/user commands. +cddl Various commands and libraries under the Common Development + and Distribution License. + contrib Packages contributed by 3rd parties. crypto Cryptography stuff (see crypto/README). Modified: projects/binutils-2.17/UPDATING ============================================================================== --- projects/binutils-2.17/UPDATING Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/UPDATING Sun Nov 14 20:47:30 2010 (r215320) @@ -22,6 +22,32 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20101114: + Generic IEEE 802.3 annex 31B full duplex flow control support has been + added to mii(4) and bge(4), bce(4), msk(4), nfe(4) and stge(4) along + with brgphy(4), e1000phy(4) as well as ip1000phy() have been converted + to take advantage of it instead of using custom implementations. This + means that these drivers now no longer unconditionally advertise + support for flow control but only do so if flow control is a selected + media option. This was implemented in the generic support that way in + order to allow flow control to be switched on and off via ifconfig(8) + with the PHY specific default to typically off in order to protect + from unwanted effects. Consequently, if you used flow control with + one of the above mentioned drivers you now need to explicitly enable + it, for example via: + ifconfig bge0 media auto mediaopt flowcontrol + + Along with the above mentioned changes generic support for setting + 1000baseT master mode also has been added and brgphy(4), ciphy(4), + e1000phy(4) as well as ip1000phy(4) have been converted to take + advantage of it. This means that these drivers now no longer take the + link0 parameter for selecting master mode but the master media option + has to be used instead, for example like in the following: + ifconfig bge0 media 1000baseT mediaopt full-duplex,master + + Selection of master mode now is also available with all other PHY + drivers supporting 1000baseT. + 20101111: The TCP stack has received a significant update to add support for modularised congestion control and generally improve the clarity of Modified: projects/binutils-2.17/bin/sh/bltin/bltin.h ============================================================================== --- projects/binutils-2.17/bin/sh/bltin/bltin.h Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/bin/sh/bltin/bltin.h Sun Nov 14 20:47:30 2010 (r215320) @@ -54,6 +54,7 @@ #define putchar(c) out1c(c) #define fprintf outfmt #define fputs outstr +#define fwrite(ptr, size, nmemb, file) outbin(ptr, (size) * (nmemb), file) #define fflush flushout #define INITARGS(argv) #define warnx1(a, b, c) { \ Modified: projects/binutils-2.17/bin/sh/output.c ============================================================================== --- projects/binutils-2.17/bin/sh/output.c Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/bin/sh/output.c Sun Nov 14 20:47:30 2010 (r215320) @@ -122,8 +122,7 @@ out2qstr(const char *p) void outstr(const char *p, struct output *file) { - while (*p) - outc(*p++, file); + outbin(p, strlen(p), file); } /* Like outstr(), but quote for re-input into the shell. */ @@ -165,6 +164,16 @@ outqstr(const char *p, struct output *fi outc('\'', file); } +void +outbin(const void *data, size_t len, struct output *file) +{ + const char *p; + + p = data; + while (len-- > 0) + outc(*p++, file); +} + static char out_junk[16]; void @@ -285,17 +294,11 @@ static int doformat_wr(void *cookie, const char *buf, int len) { struct output *o; - int origlen; - unsigned char c; o = (struct output *)cookie; - origlen = len; - while (len-- != 0) { - c = (unsigned char)*buf++; - outc(c, o); - } + outbin(buf, len, o); - return (origlen); + return (len); } void Modified: projects/binutils-2.17/bin/sh/output.h ============================================================================== --- projects/binutils-2.17/bin/sh/output.h Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/bin/sh/output.h Sun Nov 14 20:47:30 2010 (r215320) @@ -36,6 +36,7 @@ #ifndef OUTPUT_INCL #include +#include struct output { char *nextc; @@ -59,6 +60,7 @@ void out2str(const char *); void out2qstr(const char *); void outstr(const char *, struct output *); void outqstr(const char *, struct output *); +void outbin(const void *, size_t, struct output *); void emptyoutbuf(struct output *); void flushall(void); void flushout(struct output *); Modified: projects/binutils-2.17/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- projects/binutils-2.17/crypto/openssl/ssl/s3_clnt.c Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/crypto/openssl/ssl/s3_clnt.c Sun Nov 14 20:47:30 2010 (r215320) @@ -1377,6 +1377,7 @@ int ssl3_get_key_exchange(SSL *s) s->session->sess_cert->peer_ecdh_tmp=ecdh; ecdh=NULL; BN_CTX_free(bn_ctx); + bn_ctx = NULL; EC_POINT_free(srvr_ecpoint); srvr_ecpoint = NULL; } Modified: projects/binutils-2.17/gnu/lib/libgcc/Makefile ============================================================================== --- projects/binutils-2.17/gnu/lib/libgcc/Makefile Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/gnu/lib/libgcc/Makefile Sun Nov 14 20:47:30 2010 (r215320) @@ -140,13 +140,13 @@ LIB1ASMFUNCS = __divxf3 __divdf3 __divsf LIB2ADDEH = unwind-ia64.c unwind-sjlj.c unwind-c.c .endif -.if ${TARGET_CPUARCH} == "powerpc" +.if ${TARGET_ARCH} == "powerpc" # from config/rs6000/t-ppccomm LIB2FUNCS_EXTRA = tramp.asm LIB2FUNCS_STATIC_EXTRA = eabi.asm .endif -.if ${TARGET_CPUARCH} == "powerpc64" +.if ${TARGET_ARCH} == "powerpc64" # from config/rs6000/t-ppccomm LIB2FUNCS_EXTRA = tramp.asm .endif Modified: projects/binutils-2.17/gnu/usr.bin/binutils/Makefile.inc0 ============================================================================== --- projects/binutils-2.17/gnu/usr.bin/binutils/Makefile.inc0 Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/gnu/usr.bin/binutils/Makefile.inc0 Sun Nov 14 20:47:30 2010 (r215320) @@ -7,7 +7,7 @@ VERSION= "2.17.50 [FreeBSD] 2007-07-03" .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif @@ -29,7 +29,7 @@ RELSRC= ${RELTOP}/../../../contrib/binut SRCDIR= ${.CURDIR}/${RELSRC} .if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \ - ${TARGET_CPUARCH} == "powerpc" || \ + ${TARGET_ARCH} == "powerpc" || \ (${TARGET_CPUARCH} == "mips" && \ (!defined(TARGET_ABI) || ${TARGET_ABI} != "n64")) CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 Modified: projects/binutils-2.17/gnu/usr.bin/cc/Makefile.tgt ============================================================================== --- projects/binutils-2.17/gnu/usr.bin/cc/Makefile.tgt Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/gnu/usr.bin/cc/Makefile.tgt Sun Nov 14 20:47:30 2010 (r215320) @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: projects/binutils-2.17/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- projects/binutils-2.17/gnu/usr.bin/gdb/Makefile.inc Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/gnu/usr.bin/gdb/Makefile.inc Sun Nov 14 20:47:30 2010 (r215320) @@ -20,7 +20,7 @@ OBJ_GDB= ${OBJ_ROOT}/gdb # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: projects/binutils-2.17/gnu/usr.bin/gdb/libgdb/Makefile ============================================================================== --- projects/binutils-2.17/gnu/usr.bin/gdb/libgdb/Makefile Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/gnu/usr.bin/gdb/libgdb/Makefile Sun Nov 14 20:47:30 2010 (r215320) @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/} +TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Modified: projects/binutils-2.17/lib/libc/gen/pututxline.c ============================================================================== --- projects/binutils-2.17/lib/libc/gen/pututxline.c Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/lib/libc/gen/pututxline.c Sun Nov 14 20:47:30 2010 (r215320) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -53,6 +54,7 @@ futx_open(const char *file) /* Safety check: never use broken files. */ if (_fstat(fd, &sb) != -1 && sb.st_size % sizeof(struct futx) != 0) { _close(fd); + errno = EINVAL; return (NULL); } @@ -142,6 +144,7 @@ utx_active_remove(struct futx *fu) } fclose(fp); + errno = ESRCH; return (1); } Modified: projects/binutils-2.17/lib/libkvm/kvm.c ============================================================================== --- projects/binutils-2.17/lib/libkvm/kvm.c Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/lib/libkvm/kvm.c Sun Nov 14 20:47:30 2010 (r215320) @@ -50,6 +50,7 @@ static char sccsid[] = "@(#)kvm.c 8.2 (B #include #include #include +#include #include @@ -433,7 +434,7 @@ _kvm_nlist(kvm_t *kd, struct nlist *nl, if (error > 0 && _kvm_dpcpu_initialized(kd, initialize)) error = kvm_fdnlist_prefix(kd, nl, error, - "pcpu_entry_", _kvm_dpcpu_validaddr); + DPCPU_SYMPREFIX, _kvm_dpcpu_validaddr); return (error); } @@ -473,7 +474,7 @@ again: p->n_value = _kvm_vnet_validaddr(kd, lookup.symvalue); else if (_kvm_dpcpu_initialized(kd, initialize) && - !strcmp(prefix, "pcpu_entry_")) + !strcmp(prefix, DPCPU_SYMPREFIX)) p->n_value = _kvm_dpcpu_validaddr(kd, lookup.symvalue); else @@ -495,7 +496,7 @@ again: } if (error && _kvm_dpcpu_initialized(kd, initialize) && !tried_dpcpu) { tried_dpcpu = 1; - prefix = "pcpu_entry_"; + prefix = DPCPU_SYMPREFIX; goto again; } Modified: projects/binutils-2.17/lib/libkvm/kvm_pcpu.c ============================================================================== --- projects/binutils-2.17/lib/libkvm/kvm_pcpu.c Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/lib/libkvm/kvm_pcpu.c Sun Nov 14 20:47:30 2010 (r215320) @@ -197,9 +197,9 @@ _kvm_dpcpu_init(kvm_t *kd) { struct nlist nl[] = { #define NLIST_START_SET_PCPU 0 - { "___start_set_pcpu" }, + { "___start_" DPCPU_SETNAME }, #define NLIST_STOP_SET_PCPU 1 - { "___stop_set_pcpu" }, + { "___stop_" DPCPU_SETNAME }, #define NLIST_DPCPU_OFF 2 { "_dpcpu_off" }, #define NLIST_MP_MAXCPUS 3 Modified: projects/binutils-2.17/share/mk/bsd.cpu.mk ============================================================================== --- projects/binutils-2.17/share/mk/bsd.cpu.mk Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/share/mk/bsd.cpu.mk Sun Nov 14 20:47:30 2010 (r215320) @@ -114,7 +114,7 @@ _CPUCFLAGS = -march=armv5te -D__XSCALE__ . else _CPUCFLAGS = -mcpu=${CPUTYPE} . endif -. elif ${MACHINE_CPUARCH} == "powerpc" +. elif ${MACHINE_ARCH} == "powerpc" . if ${CPUTYPE} == "e500" MACHINE_CPU = booke _CPUCFLAGS = -Wa,-me500 -msoft-float Modified: projects/binutils-2.17/sys/amd64/amd64/trap.c ============================================================================== --- projects/binutils-2.17/sys/amd64/amd64/trap.c Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/sys/amd64/amd64/trap.c Sun Nov 14 20:47:30 2010 (r215320) @@ -415,9 +415,9 @@ trap(struct trapframe *frame) * This check also covers the images * without the ABI-tag ELF note. */ - if (SV_CURPROC_ABI() == - SV_ABI_FREEBSD && - p->p_osrel >= 700004) { + if (SV_CURPROC_ABI() == SV_ABI_FREEBSD + && p->p_osrel >= + __FreeBSD_version_SIGSEGV) { i = SIGSEGV; ucode = SEGV_ACCERR; } else { Modified: projects/binutils-2.17/sys/boot/i386/boot2/boot1.S ============================================================================== --- projects/binutils-2.17/sys/boot/i386/boot2/boot1.S Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/sys/boot/i386/boot2/boot1.S Sun Nov 14 20:47:30 2010 (r215320) @@ -239,7 +239,7 @@ error: callw putstr # Display message xorb %ah,%ah # BIOS: Get int $0x16 # keypress movw $0x1234, BDA_BOOT # Do a warm boot - ljmp $0xffff,$0x0 # reboot the machine + ljmp $0xf000,$0xfff0 # reboot the machine /* * Display a null-terminated string using the BIOS output. */ Modified: projects/binutils-2.17/sys/dev/arcmsr/arcmsr.c ============================================================================== --- projects/binutils-2.17/sys/dev/arcmsr/arcmsr.c Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/sys/dev/arcmsr/arcmsr.c Sun Nov 14 20:47:30 2010 (r215320) @@ -2470,11 +2470,15 @@ static void arcmsr_action(struct cam_sim splx(s); } else { /* Buffer is physical */ +#ifdef PAE + panic("arcmsr: CAM_DATA_PHYS not supported"); +#else struct bus_dma_segment seg; seg.ds_addr = (bus_addr_t)pccb->csio.data_ptr; seg.ds_len = pccb->csio.dxfer_len; arcmsr_execute_srb(srb, &seg, 1, 0); +#endif } } else { /* Scatter/gather list */ Modified: projects/binutils-2.17/sys/dev/bce/if_bce.c ============================================================================== --- projects/binutils-2.17/sys/dev/bce/if_bce.c Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/sys/dev/bce/if_bce.c Sun Nov 14 20:47:30 2010 (r215320) @@ -1143,7 +1143,7 @@ bce_attach(device_t dev) /* MII child bus by attaching the PHY. */ rc = mii_attach(dev, &sc->bce_miibus, ifp, bce_ifmedia_upd, bce_ifmedia_sts, BMSR_DEFCAPMASK, sc->bce_phy_addr, - MII_OFFSET_ANY, 0); + MII_OFFSET_ANY, MIIF_DOPAUSE); if (rc != 0) { BCE_PRINTF("%s(%d): attaching PHYs failed\n", __FILE__, __LINE__); @@ -1769,8 +1769,7 @@ bce_miibus_statchg(device_t dev) REG_WR(sc, BCE_EMAC_MODE, val); - /* FLAG0 is set if RX is enabled and FLAG1 if TX is enabled */ - if (mii->mii_media_active & IFM_FLAG0) { + if ((mii->mii_media_active & IFM_ETH_RXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling RX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); @@ -1780,7 +1779,7 @@ bce_miibus_statchg(device_t dev) BCE_CLRBIT(sc, BCE_EMAC_RX_MODE, BCE_EMAC_RX_MODE_FLOW_EN); } - if (mii->mii_media_active & IFM_FLAG1) { + if ((mii->mii_media_active & IFM_ETH_TXPAUSE) != 0) { DBPRINT(sc, BCE_INFO_PHY, "%s(): Enabling TX flow control.\n", __FUNCTION__); BCE_SETBIT(sc, BCE_EMAC_TX_MODE, BCE_EMAC_TX_MODE_FLOW_EN); Modified: projects/binutils-2.17/sys/dev/bge/if_bge.c ============================================================================== --- projects/binutils-2.17/sys/dev/bge/if_bge.c Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/sys/dev/bge/if_bge.c Sun Nov 14 20:47:30 2010 (r215320) @@ -914,11 +914,13 @@ bge_miibus_statchg(device_t dev) if (IFM_OPTIONS(mii->mii_media_active & IFM_FDX) != 0) { BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_HALF_DUPLEX); - if (IFM_OPTIONS(mii->mii_media_active) & IFM_FLAG1) + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_TXPAUSE) != 0) BGE_SETBIT(sc, BGE_TX_MODE, BGE_TXMODE_FLOWCTL_ENABLE); else BGE_CLRBIT(sc, BGE_TX_MODE, BGE_TXMODE_FLOWCTL_ENABLE); - if (IFM_OPTIONS(mii->mii_media_active) & IFM_FLAG0) + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_RXPAUSE) != 0) BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_FLOWCTL_ENABLE); else BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_FLOWCTL_ENABLE); @@ -2638,7 +2640,7 @@ bge_attach(device_t dev) struct bge_softc *sc; uint32_t hwcfg = 0, misccfg; u_char eaddr[ETHER_ADDR_LEN]; - int error, f, msicount, phy_addr, reg, rid, trys; + int capmask, error, f, msicount, phy_addr, reg, rid, trys; sc = device_get_softc(dev); sc->bge_dev = dev; @@ -2822,13 +2824,31 @@ bge_attach(device_t dev) if (BGE_IS_5755_PLUS(sc) == 0) sc->bge_flags |= BGE_FLAG_4G_BNDRY_BUG; + misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID; if (sc->bge_asicrev == BGE_ASICREV_BCM5705) { - misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID; if (misccfg == BGE_MISCCFG_BOARD_ID_5788 || misccfg == BGE_MISCCFG_BOARD_ID_5788M) sc->bge_flags |= BGE_FLAG_5788; } + capmask = BMSR_DEFCAPMASK; + if ((sc->bge_asicrev == BGE_ASICREV_BCM5703 && + (misccfg == 0x4000 || misccfg == 0x8000)) || + (sc->bge_asicrev == BGE_ASICREV_BCM5705 && + pci_get_vendor(dev) == BCOM_VENDORID && + (pci_get_device(dev) == BCOM_DEVICEID_BCM5901 || + pci_get_device(dev) == BCOM_DEVICEID_BCM5901A2 || + pci_get_device(dev) == BCOM_DEVICEID_BCM5705F)) || + (pci_get_vendor(dev) == BCOM_VENDORID && + (pci_get_device(dev) == BCOM_DEVICEID_BCM5751F || + pci_get_device(dev) == BCOM_DEVICEID_BCM5753F || + pci_get_device(dev) == BCOM_DEVICEID_BCM5787F)) || + pci_get_device(dev) == BCOM_DEVICEID_BCM57790 || + sc->bge_asicrev == BGE_ASICREV_BCM5906) { + /* These chips are 10/100 only. */ + capmask &= ~BMSR_EXTSTAT; + } + /* * Some controllers seem to require a special firmware to use * TSO. But the firmware is not available to FreeBSD and Linux @@ -3102,9 +3122,9 @@ bge_attach(device_t dev) again: bge_asf_driver_up(sc); - error = (mii_attach(dev, &sc->bge_miibus, ifp, - bge_ifmedia_upd, bge_ifmedia_sts, BMSR_DEFCAPMASK, - phy_addr, MII_OFFSET_ANY, 0)); + error = mii_attach(dev, &sc->bge_miibus, ifp, bge_ifmedia_upd, + bge_ifmedia_sts, capmask, phy_addr, MII_OFFSET_ANY, + MIIF_DOPAUSE); if (error != 0) { if (trys++ < 4) { device_printf(sc->bge_dev, "Try again\n"); Modified: projects/binutils-2.17/sys/dev/mii/atphy.c ============================================================================== --- projects/binutils-2.17/sys/dev/mii/atphy.c Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/sys/dev/mii/atphy.c Sun Nov 14 20:47:30 2010 (r215320) @@ -82,7 +82,7 @@ static int atphy_service(struct mii_soft static void atphy_status(struct mii_softc *); static void atphy_reset(struct mii_softc *); static uint16_t atphy_anar(struct ifmedia_entry *); -static int atphy_auto(struct mii_softc *); +static int atphy_setmedia(struct mii_softc *, int); static const struct mii_phydesc atphys[] = { MII_PHY_DESC(ATHEROS, F1), @@ -158,7 +158,7 @@ atphy_service(struct mii_softc *sc, stru if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO || IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { - atphy_auto(sc); + atphy_setmedia(sc, ife->ifm_media); break; } @@ -175,7 +175,7 @@ atphy_service(struct mii_softc *sc, stru /* * XXX * Due to an unknown reason powering down PHY resulted - * in unexpected results such as inaccessbility of + * in unexpected results such as inaccessibility of * hardware of freshly rebooted system. Disable * powering down PHY until I got more information for * Attansic/Atheros PHY hardwares. @@ -189,8 +189,9 @@ atphy_service(struct mii_softc *sc, stru anar = atphy_anar(ife); if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) { bmcr |= BMCR_FDX; - /* Enable pause. */ - anar |= (3 << 10); + if (((ife->ifm_media & IFM_GMASK) & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= ANAR_PAUSE_TOWARDS; } if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | @@ -222,7 +223,7 @@ done: } /* - * check for link. + * Check for link. * Read the status register twice; BMSR_LINK is latch-low. */ bmsr = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); @@ -238,7 +239,7 @@ done: return (0); sc->mii_ticks = 0; - atphy_auto(sc); + atphy_setmedia(sc, ife->ifm_media); break; } @@ -284,7 +285,7 @@ atphy_status(struct mii_softc *sc) case ATPHY_SSR_1000MBS: mii->mii_media_active |= IFM_1000_T; /* - * atphy(4) got a valid link so reset mii_ticks. + * atphy(4) has a valid link so reset mii_ticks. * Resetting mii_ticks is needed in order to * detect link loss after auto-negotiation. */ @@ -304,11 +305,13 @@ atphy_status(struct mii_softc *sc) } if ((ssr & ATPHY_SSR_DUPLEX) != 0) - mii->mii_media_active |= IFM_FDX; + mii->mii_media_active |= IFM_FDX | mii_phy_flowstatus(sc); else mii->mii_media_active |= IFM_HDX; - /* XXX Master/Slave, Flow-control */ + if ((IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) && + (PHY_READ(sc, MII_100T2SR) & GTSR_MS_RES) != 0) + mii->mii_media_active |= IFM_ETH_MASTER; } static void @@ -336,7 +339,7 @@ atphy_reset(struct mii_softc *sc) PHY_WRITE(sc, ATPHY_SCR, reg); /* Workaround F1 bug to reset phy. */ - atphy_auto(sc); + atphy_setmedia(sc, sc->mii_pdata->mii_media.ifm_cur->ifm_media); for (i = 0; i < 1000; i++) { DELAY(1); @@ -378,12 +381,17 @@ atphy_anar(struct ifmedia_entry *ife) } static int -atphy_auto(struct mii_softc *sc) +atphy_setmedia(struct mii_softc *sc, int media) { uint16_t anar; - anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities); - PHY_WRITE(sc, MII_ANAR, anar | (3 << 10) | ANAR_CSMA); + anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; + if (((IFM_SUBTYPE(media) == IFM_AUTO || + ((media & IFM_GMASK) & IFM_FDX) != 0) && + ((media & IFM_GMASK) & IFM_FLOW) != 0) || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= ANAR_PAUSE_TOWARDS; + PHY_WRITE(sc, MII_ANAR, anar); if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) PHY_WRITE(sc, MII_100T2CR, GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX); Modified: projects/binutils-2.17/sys/dev/mii/brgphy.c ============================================================================== --- projects/binutils-2.17/sys/dev/mii/brgphy.c Sun Nov 14 20:41:22 2010 (r215319) +++ projects/binutils-2.17/sys/dev/mii/brgphy.c Sun Nov 14 20:47:30 2010 (r215320) @@ -99,9 +99,9 @@ static driver_t brgphy_driver = { DRIVER_MODULE(brgphy, miibus, brgphy_driver, brgphy_devclass, 0, 0); static int brgphy_service(struct mii_softc *, struct mii_data *, int); -static void brgphy_setmedia(struct mii_softc *, int, int); +static void brgphy_setmedia(struct mii_softc *, int); static void brgphy_status(struct mii_softc *); -static void brgphy_mii_phy_auto(struct mii_softc *); +static void brgphy_mii_phy_auto(struct mii_softc *, int); static void brgphy_reset(struct mii_softc *); static void brgphy_enable_loopback(struct mii_softc *); static void bcm5401_load_dspcode(struct mii_softc *); @@ -169,6 +169,7 @@ detect_hs21(struct bce_softc *bce_sc) static int brgphy_probe(device_t dev) { + return (mii_phy_dev_probe(dev, brgphys, BUS_PROBE_DEFAULT)); } @@ -183,7 +184,6 @@ brgphy_attach(device_t dev) struct mii_attach_args *ma; struct mii_data *mii; struct ifnet *ifp; - int fast_ether; bsc = device_get_softc(dev); sc = &bsc->mii_sc; @@ -203,8 +203,7 @@ brgphy_attach(device_t dev) * At least some variants wedge when isolating, at least some also * don't support loopback. */ - sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP; - sc->mii_anegticks = MII_ANEGTICKS_GIGE; + sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP | MIIF_NOMANPAUSE; /* Initialize brgphy_softc structure */ bsc->mii_oui = MII_OUI(ma->mii_id1, ma->mii_id2); @@ -212,8 +211,6 @@ brgphy_attach(device_t dev) bsc->mii_rev = MII_REV(ma->mii_id2); bsc->serdes_flags = 0; - fast_ether = 0; - if (bootverbose) device_printf(dev, "OUI 0x%06x, model 0x%04x, rev. %d\n", bsc->mii_oui, bsc->mii_model, bsc->mii_rev); @@ -271,18 +268,6 @@ brgphy_attach(device_t dev) bce_sc = ifp->if_softc; } - /* Todo: Need to add additional controllers such as 5906 & 5787F */ - /* The 590x chips are 10/100 only. */ - if (bge_sc && - pci_get_vendor(bge_sc->bge_dev) == BCOM_VENDORID && - (pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5901 || - pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5901A2 || - pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5906 || - pci_get_device(bge_sc->bge_dev) == BCOM_DEVICEID_BCM5906M)) { - fast_ether = 1; - sc->mii_anegticks = MII_ANEGTICKS; - } - brgphy_reset(sc); /* Read the PHY's capabilities. */ @@ -295,27 +280,10 @@ brgphy_attach(device_t dev) /* Add the supported media types */ if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, 0, sc->mii_inst), - BRGPHY_S10); - printf("10baseT, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, IFM_FDX, sc->mii_inst), - BRGPHY_S10 | BRGPHY_BMCR_FDX); - printf("10baseT-FDX, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, 0, sc->mii_inst), - BRGPHY_S100); - printf("100baseTX, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_FDX, sc->mii_inst), - BRGPHY_S100 | BRGPHY_BMCR_FDX); - printf("100baseTX-FDX, "); - if (fast_ether == 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, sc->mii_inst), - BRGPHY_S1000); - printf("1000baseT, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, sc->mii_inst), - BRGPHY_S1000 | BRGPHY_BMCR_FDX); - printf("1000baseT-FDX, "); - } + mii_phy_add_media(sc); + printf("\n"); } else { + sc->mii_anegticks = MII_ANEGTICKS_GIGE; ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst), BRGPHY_S1000 | BRGPHY_BMCR_FDX); printf("1000baseSX-FDX, "); @@ -337,11 +305,10 @@ brgphy_attach(device_t dev) printf("auto-neg workaround, "); bsc->serdes_flags |= BRGPHY_NOANWAIT; } + ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); + printf("auto\n"); } - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); - printf("auto\n"); - #undef ADD MIIBUS_MEDIAINIT(sc->mii_dev); return (0); @@ -367,15 +334,14 @@ brgphy_service(struct mii_softc *sc, str switch (IFM_SUBTYPE(ife->ifm_media)) { case IFM_AUTO: - brgphy_mii_phy_auto(sc); + brgphy_mii_phy_auto(sc, ife->ifm_media); break; case IFM_2500_SX: case IFM_1000_SX: case IFM_1000_T: case IFM_100_TX: case IFM_10_T: - brgphy_setmedia(sc, ife->ifm_media, - mii->mii_ifp->if_flags & IFF_LINK0); + brgphy_setmedia(sc, ife->ifm_media); break; default: return (EINVAL); @@ -397,7 +363,7 @@ brgphy_service(struct mii_softc *sc, str * Check to see if we have link. If we do, we don't * need to restart the autonegotiation process. */ - val = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); + val = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); if (val & BMSR_LINK) { sc->mii_ticks = 0; /* Reset autoneg timer. */ break; @@ -414,7 +380,7 @@ brgphy_service(struct mii_softc *sc, str /* Retry autonegotiation */ sc->mii_ticks = 0; - brgphy_mii_phy_auto(sc); + brgphy_mii_phy_auto(sc, ife->ifm_media); break; } @@ -456,7 +422,6 @@ brgphy_service(struct mii_softc *sc, str return (0); } - /****************************************************************************/ /* Sets the PHY link speed. */ /* */ @@ -464,12 +429,10 @@ brgphy_service(struct mii_softc *sc, str /* None */ /****************************************************************************/ static void -brgphy_setmedia(struct mii_softc *sc, int media, int master) +brgphy_setmedia(struct mii_softc *sc, int media) { - struct brgphy_softc *bsc = (struct brgphy_softc *)sc; int bmcr = 0, gig; - /* Calculate the value for the BMCR register. */ switch (IFM_SUBTYPE(media)) { case IFM_2500_SX: break; @@ -486,7 +449,6 @@ brgphy_setmedia(struct mii_softc *sc, in break; } - /* Calculate duplex settings for 1000BasetT/1000BaseX. */ if ((media & IFM_GMASK) == IFM_FDX) { bmcr |= BRGPHY_BMCR_FDX; gig = BRGPHY_1000CTL_AFD; @@ -494,53 +456,30 @@ brgphy_setmedia(struct mii_softc *sc, in gig = BRGPHY_1000CTL_AHD; } - /* Force loopback to disconnect PHY for Ethernet medium. */ + /* Force loopback to disconnect PHY from Ethernet medium. */ brgphy_enable_loopback(sc); - /* Disable 1000BaseT advertisements. */ PHY_WRITE(sc, BRGPHY_MII_1000CTL, 0); - /* Disable 10/100 advertisements. */ PHY_WRITE(sc, BRGPHY_MII_ANAR, BRGPHY_SEL_TYPE); - /* Write forced link speed. */ - PHY_WRITE(sc, BRGPHY_MII_BMCR, bmcr); - /* If 10/100 only then configuration is complete. */ - if ((IFM_SUBTYPE(media) != IFM_1000_T) && (IFM_SUBTYPE(media) != IFM_1000_SX)) - goto brgphy_setmedia_exit; + if (IFM_SUBTYPE(media) != IFM_1000_T && + IFM_SUBTYPE(media) != IFM_1000_SX) { + PHY_WRITE(sc, BRGPHY_MII_BMCR, bmcr); + return; + } - /* Set duplex speed advertisement for 1000BaseT/1000BaseX. */ + if (IFM_SUBTYPE(media) == IFM_1000_T) { + gig |= BRGPHY_1000CTL_MSE; + if ((media & IFM_ETH_MASTER) != 0) + gig |= BRGPHY_1000CTL_MSC; + } PHY_WRITE(sc, BRGPHY_MII_1000CTL, gig); - /* Restart auto-negotiation for 1000BaseT/1000BaseX. */ PHY_WRITE(sc, BRGPHY_MII_BMCR, bmcr | BRGPHY_BMCR_AUTOEN | BRGPHY_BMCR_STARTNEG); - - /* If not 5701 PHY then configuration is complete. */ - if (bsc->mii_model != MII_MODEL_xxBROADCOM_BCM5701) - goto brgphy_setmedia_exit; - - /* - * When setting the link manually, one side must be the master and - * the other the slave. However ifmedia doesn't give us a good way - * to specify this, so we fake it by using one of the LINK flags. - * If LINK0 is set, we program the PHY to be a master, otherwise - * it's a slave. - */ - if (master) { - PHY_WRITE(sc, BRGPHY_MII_1000CTL, - gig | BRGPHY_1000CTL_MSE | BRGPHY_1000CTL_MSC); - } else { - PHY_WRITE(sc, BRGPHY_MII_1000CTL, - gig | BRGPHY_1000CTL_MSE); - } - -brgphy_setmedia_exit: - return; } /****************************************************************************/ /* Set the media status based on the PHY settings. */ -/* IFM_FLAG0 = 0 (RX flow control disabled) | 1 (enabled) */ -/* IFM_FLAG1 = 0 (TX flow control disabled) | 1 (enabled) */ /* */ /* Returns: */ /* None */ @@ -550,34 +489,34 @@ brgphy_status(struct mii_softc *sc) { struct brgphy_softc *bsc = (struct brgphy_softc *)sc; struct mii_data *mii = sc->mii_pdata; - int aux, bmcr, bmsr, anar, anlpar, xstat, val; - + int aux, bmcr, bmsr, val, xstat; + u_int flowstat; mii->mii_media_status = IFM_AVALID; mii->mii_media_active = IFM_ETHER; bmsr = PHY_READ(sc, BRGPHY_MII_BMSR) | PHY_READ(sc, BRGPHY_MII_BMSR); bmcr = PHY_READ(sc, BRGPHY_MII_BMCR); - anar = PHY_READ(sc, BRGPHY_MII_ANAR); - anlpar = PHY_READ(sc, BRGPHY_MII_ANLPAR); - /* Loopback is enabled. */ if (bmcr & BRGPHY_BMCR_LOOP) { - mii->mii_media_active |= IFM_LOOP; } - /* Autoneg is still in progress. */ if ((bmcr & BRGPHY_BMCR_AUTOEN) && (bmsr & BRGPHY_BMSR_ACOMP) == 0 && (bsc->serdes_flags & BRGPHY_NOANWAIT) == 0) { /* Erg, still trying, I guess... */ mii->mii_media_active |= IFM_NONE; - goto brgphy_status_exit; + return; } - /* Autoneg is enabled and complete, link should be up. */ if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { + /* + * NB: reading the ANAR, ANLPAR or 1000STS after the AUXSTS + * wedges at least the PHY of BCM5704 (but not others). + */ + flowstat = mii_phy_flowstatus(sc); + xstat = PHY_READ(sc, BRGPHY_MII_1000STS); aux = PHY_READ(sc, BRGPHY_MII_AUXSTS); /* If copper link is up, get the negotiated speed/duplex. */ @@ -601,8 +540,16 @@ brgphy_status(struct mii_softc *sc) default: mii->mii_media_active |= IFM_NONE; break; } + + if ((mii->mii_media_active & IFM_FDX) != 0) + mii->mii_media_active |= flowstat; + + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T && + (xstat & BRGPHY_1000STS_MSR) != 0) + mii->mii_media_active |= IFM_ETH_MASTER; } } else { + /* Todo: Add support for flow control. */ /* If serdes link is up, get the negotiated speed/duplex. */ if (bmsr & BRGPHY_BMSR_LINK) { mii->mii_media_status |= IFM_ACTIVE; @@ -620,7 +567,6 @@ brgphy_status(struct mii_softc *sc) else mii->mii_media_active |= IFM_HDX; } - } else if (bsc->serdes_flags & BRGPHY_5708S) { PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, BRGPHY_5708S_DIG_PG0); xstat = PHY_READ(sc, BRGPHY_5708S_PG0_1000X_STAT1); @@ -642,9 +588,7 @@ brgphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_FDX; else mii->mii_media_active |= IFM_HDX; - } else if (bsc->serdes_flags & BRGPHY_5709S) { - /* Select GP Status Block of the AN MMD, get autoneg results. */ PHY_WRITE(sc, BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_GP_STATUS); xstat = PHY_READ(sc, BRGPHY_GP_STATUS_TOP_ANEG_STATUS); @@ -670,65 +614,42 @@ brgphy_status(struct mii_softc *sc) else mii->mii_media_active |= IFM_HDX; } - } - - /* Todo: Change bge to use these settings. */ - - /* Fetch flow control settings from the copper PHY. */ - if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - /* Set FLAG0 if RX is enabled and FLAG1 if TX is enabled */ - if ((anar & BRGPHY_ANAR_PC) && (anlpar & BRGPHY_ANLPAR_PC)) { - mii->mii_media_active |= IFM_FLAG0 | IFM_FLAG1; - } else if (!(anar & BRGPHY_ANAR_PC) && (anlpar & BRGPHY_ANAR_ASP) && - (anlpar & BRGPHY_ANLPAR_PC) && (anlpar & BRGPHY_ANLPAR_ASP)) { - mii->mii_media_active |= IFM_FLAG1; - } else if ((anar & BRGPHY_ANAR_PC) && (anar & BRGPHY_ANAR_ASP) && - !(anlpar & BRGPHY_ANLPAR_PC) && (anlpar & BRGPHY_ANLPAR_ASP)) { - mii->mii_media_active |= IFM_FLAG0; - } - } - - /* Todo: Add support for fiber settings too. */ - - -brgphy_status_exit: - return; } static void -brgphy_mii_phy_auto(struct mii_softc *sc) +brgphy_mii_phy_auto(struct mii_softc *sc, int media) { struct brgphy_softc *bsc = (struct brgphy_softc *)sc; - int ktcr = 0; + int anar, ktcr = 0; brgphy_reset(sc); - /* Enable flow control in the advertisement register. */ if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - /* Pause capability advertisement (pause capable & asymmetric) */ - PHY_WRITE(sc, BRGPHY_MII_ANAR, - BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA | - BRGPHY_ANAR_ASP | BRGPHY_ANAR_PC); + anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; + if ((media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= BRGPHY_ANAR_PC | BRGPHY_ANAR_ASP; + PHY_WRITE(sc, BRGPHY_MII_ANAR, anar); } else { - PHY_WRITE(sc, BRGPHY_SERDES_ANAR, BRGPHY_SERDES_ANAR_FDX | - BRGPHY_SERDES_ANAR_HDX | BRGPHY_SERDES_ANAR_BOTH_PAUSE); + anar = BRGPHY_SERDES_ANAR_FDX | BRGPHY_SERDES_ANAR_HDX; + if ((media & IFM_FLOW) != 0 || + (sc->mii_flags & MIIF_FORCEPAUSE) != 0) + anar |= BRGPHY_SERDES_ANAR_BOTH_PAUSE; + PHY_WRITE(sc, BRGPHY_SERDES_ANAR, anar); } - /* Enable speed in the 1000baseT control register */ ktcr = BRGPHY_1000CTL_AFD | BRGPHY_1000CTL_AHD; if (bsc->mii_model == MII_MODEL_xxBROADCOM_BCM5701) ktcr |= BRGPHY_1000CTL_MSE | BRGPHY_1000CTL_MSC; PHY_WRITE(sc, BRGPHY_MII_1000CTL, ktcr); ktcr = PHY_READ(sc, BRGPHY_MII_1000CTL); - /* Start autonegotiation */ - PHY_WRITE(sc, BRGPHY_MII_BMCR,BRGPHY_BMCR_AUTOEN | BRGPHY_BMCR_STARTNEG); + PHY_WRITE(sc, BRGPHY_MII_BMCR, BRGPHY_BMCR_AUTOEN | + BRGPHY_BMCR_STARTNEG); PHY_WRITE(sc, BRGPHY_MII_IMR, 0xFF00); - } - /* Enable loopback to force the link down. */ static void brgphy_enable_loopback(struct mii_softc *sc) @@ -923,7 +844,6 @@ brgphy_fixup_jitter_bug(struct mii_softc PHY_WRITE(sc, dspcode[i].reg, dspcode[i].val); } - static void brgphy_fixup_disable_early_dac(struct mii_softc *sc) { @@ -936,7 +856,6 @@ brgphy_fixup_disable_early_dac(struct mi } - static void brgphy_ethernet_wirespeed(struct mii_softc *sc) { @@ -948,7 +867,6 @@ brgphy_ethernet_wirespeed(struct mii_sof PHY_WRITE(sc, BRGPHY_MII_AUXCTL, val | (1 << 15) | (1 << 4)); } - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Mon Nov 15 17:24:07 2010 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 A2345106566C; Mon, 15 Nov 2010 17:24:07 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 774F68FC28; Mon, 15 Nov 2010 17:24:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFHO7Mb023233; Mon, 15 Nov 2010 17:24:07 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFHO7CU023232; Mon, 15 Nov 2010 17:24:07 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201011151724.oAFHO7CU023232@svn.freebsd.org> From: Sean Bruno Date: Mon, 15 Nov 2010 17:24:07 +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: r215340 - projects/sbruno_64cpus 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: Mon, 15 Nov 2010 17:24:07 -0000 Author: sbruno Date: Mon Nov 15 17:24:07 2010 New Revision: 215340 URL: http://svn.freebsd.org/changeset/base/215340 Log: Begin branch to start work on 64 CPU support and beyond Added: - copied from r215339, head/ Directory Properties: projects/sbruno_64cpus/ (props changed) From owner-svn-src-projects@FreeBSD.ORG Mon Nov 15 17:40:48 2010 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 EEFAC1065672; Mon, 15 Nov 2010 17:40:48 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA3A18FC15; Mon, 15 Nov 2010 17:40:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFHemYH023592; Mon, 15 Nov 2010 17:40:48 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFHemm7023567; Mon, 15 Nov 2010 17:40:48 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201011151740.oAFHemm7023567@svn.freebsd.org> From: Sean Bruno Date: Mon, 15 Nov 2010 17:40:48 +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: r215341 - in projects/sbruno_64cpus: lib/libmemstat sys/amd64/amd64 sys/amd64/include sys/cddl/dev/dtrace/amd64 sys/dev/hwpmc sys/geom/eli sys/i386/i386 sys/i386/include sys/kern sys/sy... 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: Mon, 15 Nov 2010 17:40:49 -0000 Author: sbruno Date: Mon Nov 15 17:40:48 2010 New Revision: 215341 URL: http://svn.freebsd.org/changeset/base/215341 Log: Initial patches to support 64CPUS. *note that this dies in memory allocation/locking at this time *note that this does not raise MAXCPU yet *note that this does raise MAXCPU for libmemestat Obtained from: peter@ via Yahoo! Inc Modified: projects/sbruno_64cpus/lib/libmemstat/memstat.h projects/sbruno_64cpus/sys/amd64/amd64/cpu_switch.S projects/sbruno_64cpus/sys/amd64/amd64/intr_machdep.c projects/sbruno_64cpus/sys/amd64/amd64/mp_machdep.c projects/sbruno_64cpus/sys/amd64/amd64/pmap.c projects/sbruno_64cpus/sys/amd64/amd64/vm_machdep.c projects/sbruno_64cpus/sys/amd64/include/_types.h projects/sbruno_64cpus/sys/cddl/dev/dtrace/amd64/dtrace_subr.c projects/sbruno_64cpus/sys/dev/hwpmc/hwpmc_mod.c projects/sbruno_64cpus/sys/geom/eli/g_eli.c projects/sbruno_64cpus/sys/i386/i386/mp_machdep.c projects/sbruno_64cpus/sys/i386/i386/vm_machdep.c projects/sbruno_64cpus/sys/i386/include/_types.h projects/sbruno_64cpus/sys/kern/kern_ktr.c projects/sbruno_64cpus/sys/kern/kern_pmc.c projects/sbruno_64cpus/sys/kern/sched_4bsd.c projects/sbruno_64cpus/sys/kern/sched_ule.c projects/sbruno_64cpus/sys/kern/subr_pcpu.c projects/sbruno_64cpus/sys/kern/subr_smp.c projects/sbruno_64cpus/sys/sys/smp.h projects/sbruno_64cpus/sys/sys/systm.h projects/sbruno_64cpus/sys/x86/x86/local_apic.c projects/sbruno_64cpus/sys/x86/x86/mca.c projects/sbruno_64cpus/sys/x86/x86/mptable.c Modified: projects/sbruno_64cpus/lib/libmemstat/memstat.h ============================================================================== --- projects/sbruno_64cpus/lib/libmemstat/memstat.h Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/lib/libmemstat/memstat.h Mon Nov 15 17:40:48 2010 (r215341) @@ -33,7 +33,7 @@ * Number of CPU slots in library-internal data structures. This should be * at least the value of MAXCPU from param.h. */ -#define MEMSTAT_MAXCPU 32 +#define MEMSTAT_MAXCPU 64 /* * Amount of caller data to maintain for each caller data slot. Applications Modified: projects/sbruno_64cpus/sys/amd64/amd64/cpu_switch.S ============================================================================== --- projects/sbruno_64cpus/sys/amd64/amd64/cpu_switch.S Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/amd64/amd64/cpu_switch.S Mon Nov 15 17:40:48 2010 (r215341) @@ -74,7 +74,7 @@ ENTRY(cpu_throw) jz 1f /* release bit from old pm_active */ movq PCPU(CURPMAP),%rdx - LK btrl %eax,PM_ACTIVE(%rdx) /* clear old */ + LK btrq %rax,VM_PMAP+PM_ACTIVE(%rdx) /* clear old */ 1: movq TD_PCB(%rsi),%r8 /* newtd->td_proc */ movq PCB_CR3(%r8),%rdx @@ -138,14 +138,14 @@ swinact: movl PCPU(CPUID), %eax /* Release bit from old pmap->pm_active */ movq PCPU(CURPMAP),%rcx - LK btrl %eax,PM_ACTIVE(%rcx) /* clear old */ + LK btrq %rax,VM_PMAP+PM_ACTIVE(%rcx) /* clear old */ SETLK %rdx, TD_LOCK(%rdi) /* Release the old thread */ swact: /* Set bit in new pmap->pm_active */ movq TD_PROC(%rsi),%rdx /* newproc */ movq P_VMSPACE(%rdx), %rdx addq $VM_PMAP,%rdx - LK btsl %eax,PM_ACTIVE(%rdx) /* set new */ + LK btsq %rax,VM_PMAP+PM_ACTIVE(%rdx) /* set new */ movq %rdx,PCPU(CURPMAP) sw1: Modified: projects/sbruno_64cpus/sys/amd64/amd64/intr_machdep.c ============================================================================== --- projects/sbruno_64cpus/sys/amd64/amd64/intr_machdep.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/amd64/amd64/intr_machdep.c Mon Nov 15 17:40:48 2010 (r215341) @@ -444,7 +444,7 @@ DB_SHOW_COMMAND(irqs, db_show_irqs) */ /* The BSP is always a valid target. */ -static cpumask_t intr_cpus = (1 << 0); +static cpumask_t intr_cpus = cputomask(0); static int current_cpu; /* @@ -466,7 +466,7 @@ intr_next_cpu(void) current_cpu++; if (current_cpu > mp_maxid) current_cpu = 0; - } while (!(intr_cpus & (1 << current_cpu))); + } while (!(intr_cpus & cputomask(current_cpu))); mtx_unlock_spin(&icu_lock); return (apic_id); } @@ -497,7 +497,7 @@ intr_add_cpu(u_int cpu) printf("INTR: Adding local APIC %d as a target\n", cpu_apic_ids[cpu]); - intr_cpus |= (1 << cpu); + intr_cpus |= cputomask(cpu); } /* Modified: projects/sbruno_64cpus/sys/amd64/amd64/mp_machdep.c ============================================================================== --- projects/sbruno_64cpus/sys/amd64/amd64/mp_machdep.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/amd64/amd64/mp_machdep.c Mon Nov 15 17:40:48 2010 (r215341) @@ -933,7 +933,7 @@ start_all_aps(void) panic("AP #%d (PHY# %d) failed!", cpu, apic_id); } - all_cpus |= (1 << cpu); /* record AP in CPU map */ + all_cpus |= cputomask(cpu); /* record AP in CPU map */ } /* build our map of 'other' CPUs */ @@ -1091,27 +1091,16 @@ smp_tlb_shootdown(u_int vector, vm_offse static void smp_targeted_tlb_shootdown(cpumask_t mask, u_int vector, vm_offset_t addr1, vm_offset_t addr2) { - int ncpu, othercpus; + int cpu, ncpu, othercpus; othercpus = mp_ncpus - 1; if (mask == (cpumask_t)-1) { - ncpu = othercpus; - if (ncpu < 1) + if (othercpus < 1) return; } else { mask &= ~PCPU_GET(cpumask); if (mask == 0) return; - ncpu = bitcount32(mask); - if (ncpu > othercpus) { - /* XXX this should be a panic offence */ - printf("SMP: tlb shootdown to %d other cpus (only have %d)\n", - ncpu, othercpus); - ncpu = othercpus; - } - /* XXX should be a panic, implied by mask == 0 above */ - if (ncpu < 1) - return; } if (!(read_rflags() & PSL_I)) panic("%s: interrupts disabled", __func__); @@ -1119,10 +1108,18 @@ smp_targeted_tlb_shootdown(cpumask_t mas smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; atomic_store_rel_int(&smp_tlb_wait, 0); - if (mask == (cpumask_t)-1) + if (mask == (cpumask_t)-1) { + ncpu = othercpus; ipi_all_but_self(vector); - else - ipi_selected(mask, vector); + } else { + ncpu = 0; + while ((cpu = ffsl(mask)) != 0) { + cpu--; + mask &= ~cputomask(cpu); + lapic_ipi_vectored(vector, cpu_apic_ids[cpu]); + ncpu++; + } + } while (smp_tlb_wait < ncpu) ia32_pause(); mtx_unlock_spin(&smp_ipi_mtx); @@ -1285,12 +1282,12 @@ ipi_selected(cpumask_t cpus, u_int ipi) * Set the mask of receiving CPUs for this purpose. */ if (ipi == IPI_STOP_HARD) - atomic_set_int(&ipi_nmi_pending, cpus); + atomic_set_long(&ipi_nmi_pending, cpus); CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); - while ((cpu = ffs(cpus)) != 0) { + while ((cpu = ffsl(cpus)) != 0) { cpu--; - cpus &= ~(1 << cpu); + cpus &= ~(cputomask(cpu)); ipi_send_cpu(cpu, ipi); } } @@ -1308,7 +1305,7 @@ ipi_cpu(int cpu, u_int ipi) * Set the mask of receiving CPUs for this purpose. */ if (ipi == IPI_STOP_HARD) - atomic_set_int(&ipi_nmi_pending, 1 << cpu); + atomic_set_long(&ipi_nmi_pending, cputomask(cpu)); CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, ipi); ipi_send_cpu(cpu, ipi); @@ -1332,7 +1329,7 @@ ipi_all_but_self(u_int ipi) * Set the mask of receiving CPUs for this purpose. */ if (ipi == IPI_STOP_HARD) - atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); + atomic_set_long(&ipi_nmi_pending, PCPU_GET(other_cpus)); CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); @@ -1353,7 +1350,7 @@ ipi_nmi_handler() if ((ipi_nmi_pending & cpumask) == 0) return (1); - atomic_clear_int(&ipi_nmi_pending, cpumask); + atomic_clear_long(&ipi_nmi_pending, cpumask); cpustop_handler(); return (0); } @@ -1374,14 +1371,14 @@ cpustop_handler(void) savectx(&stoppcbs[cpu]); /* Indicate that we are stopped */ - atomic_set_int(&stopped_cpus, cpumask); + atomic_set_long(&stopped_cpus, cpumask); /* Wait for restart */ while (!(started_cpus & cpumask)) ia32_pause(); - atomic_clear_int(&started_cpus, cpumask); - atomic_clear_int(&stopped_cpus, cpumask); + atomic_clear_long(&started_cpus, cpumask); + atomic_clear_long(&stopped_cpus, cpumask); if (cpu == 0 && cpustop_restartfunc != NULL) { cpustop_restartfunc(); @@ -1408,7 +1405,7 @@ cpususpend_handler(void) if (savectx(susppcbs[cpu])) { wbinvd(); - atomic_set_int(&stopped_cpus, cpumask); + atomic_set_long(&stopped_cpus, cpumask); } else { PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); @@ -1418,8 +1415,8 @@ cpususpend_handler(void) while (!(started_cpus & cpumask)) ia32_pause(); - atomic_clear_int(&started_cpus, cpumask); - atomic_clear_int(&stopped_cpus, cpumask); + atomic_clear_long(&started_cpus, cpumask); + atomic_clear_long(&stopped_cpus, cpumask); /* Restore CR3 and enable interrupts */ load_cr3(cr3); @@ -1451,7 +1448,7 @@ sysctl_hlt_cpus(SYSCTL_HANDLER_ARGS) int error; mask = hlt_cpus_mask; - error = sysctl_handle_int(oidp, &mask, 0, req); + error = sysctl_handle_long(oidp, &mask, 0, req); if (error || !req->newptr) return (error); @@ -1465,12 +1462,12 @@ sysctl_hlt_cpus(SYSCTL_HANDLER_ARGS) mask |= hyperthreading_cpus_mask; if ((mask & all_cpus) == all_cpus) - mask &= ~(1<<0); + mask &= ~cputomask(0); hlt_cpus_mask = mask; return (error); } -SYSCTL_PROC(_machdep, OID_AUTO, hlt_cpus, CTLTYPE_INT|CTLFLAG_RW, - 0, 0, sysctl_hlt_cpus, "IU", +SYSCTL_PROC(_machdep, OID_AUTO, hlt_cpus, CTLTYPE_LONG|CTLFLAG_RW, + 0, 0, sysctl_hlt_cpus, "LU", "Bitmap of CPUs to halt. 101 (binary) will halt CPUs 0 and 2."); static int @@ -1492,7 +1489,7 @@ sysctl_hlt_logical_cpus(SYSCTL_HANDLER_A hlt_cpus_mask |= hyperthreading_cpus_mask; if ((hlt_cpus_mask & all_cpus) == all_cpus) - hlt_cpus_mask &= ~(1<<0); + hlt_cpus_mask &= ~cputomask(0); hlt_logical_cpus = disable; return (error); @@ -1530,7 +1527,7 @@ sysctl_hyperthreading_allowed(SYSCTL_HAN hlt_logical_cpus = 0; if ((hlt_cpus_mask & all_cpus) == all_cpus) - hlt_cpus_mask &= ~(1<<0); + hlt_cpus_mask &= ~cputomask(0); hyperthreading_allowed = allowed; return (error); Modified: projects/sbruno_64cpus/sys/amd64/amd64/pmap.c ============================================================================== --- projects/sbruno_64cpus/sys/amd64/amd64/pmap.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/amd64/amd64/pmap.c Mon Nov 15 17:40:48 2010 (r215341) @@ -573,7 +573,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) PMAP_LOCK_INIT(kernel_pmap); kernel_pmap->pm_pml4 = (pdp_entry_t *)PHYS_TO_DMAP(KPML4phys); kernel_pmap->pm_root = NULL; - kernel_pmap->pm_active = -1; /* don't allow deactivation */ + kernel_pmap->pm_active = (cpumask_t)-1; /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); /* @@ -5061,8 +5061,8 @@ pmap_activate(struct thread *td) pmap = vmspace_pmap(td->td_proc->p_vmspace); oldpmap = PCPU_GET(curpmap); #ifdef SMP - atomic_clear_int(&oldpmap->pm_active, PCPU_GET(cpumask)); - atomic_set_int(&pmap->pm_active, PCPU_GET(cpumask)); + atomic_clear_long(&oldpmap->pm_active, PCPU_GET(cpumask)); + atomic_set_long(&pmap->pm_active, PCPU_GET(cpumask)); #else oldpmap->pm_active &= ~PCPU_GET(cpumask); pmap->pm_active |= PCPU_GET(cpumask); Modified: projects/sbruno_64cpus/sys/amd64/amd64/vm_machdep.c ============================================================================== --- projects/sbruno_64cpus/sys/amd64/amd64/vm_machdep.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/amd64/amd64/vm_machdep.c Mon Nov 15 17:40:48 2010 (r215341) @@ -544,7 +544,7 @@ cpu_reset() printf("cpu_reset: Restarting BSP\n"); /* Restart CPU #0. */ - atomic_store_rel_int(&started_cpus, 1 << 0); + atomic_store_rel_long(&started_cpus, cputomask(0)); cnt = 0; while (cpu_reset_proxy_active == 0 && cnt < 10000000) Modified: projects/sbruno_64cpus/sys/amd64/include/_types.h ============================================================================== --- projects/sbruno_64cpus/sys/amd64/include/_types.h Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/amd64/include/_types.h Mon Nov 15 17:40:48 2010 (r215341) @@ -61,7 +61,7 @@ typedef unsigned long __uint64_t; * Standard type definitions. */ typedef __int32_t __clock_t; /* clock()... */ -typedef unsigned int __cpumask_t; +typedef unsigned long __cpumask_t; typedef __int64_t __critical_t; typedef double __double_t; typedef float __float_t; Modified: projects/sbruno_64cpus/sys/cddl/dev/dtrace/amd64/dtrace_subr.c ============================================================================== --- projects/sbruno_64cpus/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Mon Nov 15 17:40:48 2010 (r215341) @@ -120,14 +120,14 @@ dtrace_xcall(processorid_t cpu, dtrace_x if (cpu == DTRACE_CPUALL) cpus = all_cpus; else - cpus = (cpumask_t) (1 << cpu); + cpus = cputomask(cpu); /* If the current CPU is in the set, call the function directly: */ - if ((cpus & (1 << curcpu)) != 0) { + if ((cpus & cputomask(curcpu)) != 0) { (*func)(arg); /* Mask the current CPU from the set */ - cpus &= ~(1 << curcpu); + cpus &= ~cputomask(curcpu); } /* If there are any CPUs in the set, cross-call to those CPUs */ Modified: projects/sbruno_64cpus/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- projects/sbruno_64cpus/sys/dev/hwpmc/hwpmc_mod.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/dev/hwpmc/hwpmc_mod.c Mon Nov 15 17:40:48 2010 (r215341) @@ -1991,7 +1991,7 @@ pmc_hook_handler(struct thread *td, int * had already processed the interrupt). We don't * lose the interrupt sample. */ - atomic_clear_int(&pmc_cpumask, (1 << PCPU_GET(cpuid))); + atomic_clear_long(&pmc_cpumask, PCPU_GET(cpuid)); pmc_process_samples(PCPU_GET(cpuid)); break; @@ -4083,7 +4083,7 @@ pmc_process_interrupt(int cpu, struct pm done: /* mark CPU as needing processing */ - atomic_set_rel_int(&pmc_cpumask, (1 << cpu)); + atomic_set_rel_long(&pmc_cpumask, cputomask(cpu)); return (error); } @@ -4193,7 +4193,7 @@ pmc_process_samples(int cpu) break; if (ps->ps_nsamples == PMC_SAMPLE_INUSE) { /* Need a rescan at a later time. */ - atomic_set_rel_int(&pmc_cpumask, (1 << cpu)); + atomic_set_rel_long(&pmc_cpumask, cputomask(cpu)); break; } @@ -4782,7 +4782,7 @@ pmc_cleanup(void) PMCDBG(MOD,INI,0, "%s", "cleanup"); /* switch off sampling */ - atomic_store_rel_int(&pmc_cpumask, 0); + atomic_store_rel_long(&pmc_cpumask, 0); pmc_intr = NULL; sx_xlock(&pmc_sx); Modified: projects/sbruno_64cpus/sys/geom/eli/g_eli.c ============================================================================== --- projects/sbruno_64cpus/sys/geom/eli/g_eli.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/geom/eli/g_eli.c Mon Nov 15 17:40:48 2010 (r215341) @@ -688,7 +688,7 @@ static int g_eli_cpu_is_disabled(int cpu) { #ifdef SMP - return ((hlt_cpus_mask & (1 << cpu)) != 0); + return ((hlt_cpus_mask & cputomask(cpu)) != 0); #else return (0); #endif Modified: projects/sbruno_64cpus/sys/i386/i386/mp_machdep.c ============================================================================== --- projects/sbruno_64cpus/sys/i386/i386/mp_machdep.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/i386/i386/mp_machdep.c Mon Nov 15 17:40:48 2010 (r215341) @@ -1388,7 +1388,7 @@ ipi_selected(cpumask_t cpus, u_int ipi) * Set the mask of receiving CPUs for this purpose. */ if (ipi == IPI_STOP_HARD) - atomic_set_int(&ipi_nmi_pending, cpus); + atomic_set_long(&ipi_nmi_pending, cpus); CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { @@ -1411,7 +1411,7 @@ ipi_cpu(int cpu, u_int ipi) * Set the mask of receiving CPUs for this purpose. */ if (ipi == IPI_STOP_HARD) - atomic_set_int(&ipi_nmi_pending, 1 << cpu); + atomic_set_long(&ipi_nmi_pending, cputomask(cpu)); CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, ipi); ipi_send_cpu(cpu, ipi); @@ -1435,7 +1435,7 @@ ipi_all_but_self(u_int ipi) * Set the mask of receiving CPUs for this purpose. */ if (ipi == IPI_STOP_HARD) - atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); + atomic_set_long(&ipi_nmi_pending, PCPU_GET(other_cpus)); CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } @@ -1476,14 +1476,14 @@ cpustop_handler(void) savectx(&stoppcbs[cpu]); /* Indicate that we are stopped */ - atomic_set_int(&stopped_cpus, cpumask); + atomic_set_long(&stopped_cpus, cpumask); /* Wait for restart */ while (!(started_cpus & cpumask)) ia32_pause(); - atomic_clear_int(&started_cpus, cpumask); - atomic_clear_int(&stopped_cpus, cpumask); + atomic_clear_long(&started_cpus, cpumask); + atomic_clear_long(&stopped_cpus, cpumask); if (cpu == 0 && cpustop_restartfunc != NULL) { cpustop_restartfunc(); Modified: projects/sbruno_64cpus/sys/i386/i386/vm_machdep.c ============================================================================== --- projects/sbruno_64cpus/sys/i386/i386/vm_machdep.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/i386/i386/vm_machdep.c Mon Nov 15 17:40:48 2010 (r215341) @@ -614,7 +614,7 @@ cpu_reset() /* Restart CPU #0. */ /* XXX: restart_cpus(1 << 0); */ - atomic_store_rel_int(&started_cpus, (1 << 0)); + atomic_store_rel_long(&started_cpus, cputomask(0)); cnt = 0; while (cpu_reset_proxy_active == 0 && cnt < 10000000) Modified: projects/sbruno_64cpus/sys/i386/include/_types.h ============================================================================== --- projects/sbruno_64cpus/sys/i386/include/_types.h Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/i386/include/_types.h Mon Nov 15 17:40:48 2010 (r215341) @@ -74,7 +74,7 @@ typedef unsigned long long __uint64_t; * Standard type definitions. */ typedef unsigned long __clock_t; /* clock()... */ -typedef unsigned int __cpumask_t; +typedef unsigned long __cpumask_t; typedef __int32_t __critical_t; typedef long double __double_t; typedef long double __float_t; Modified: projects/sbruno_64cpus/sys/kern/kern_ktr.c ============================================================================== --- projects/sbruno_64cpus/sys/kern/kern_ktr.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/kern/kern_ktr.c Mon Nov 15 17:40:48 2010 (r215341) @@ -82,7 +82,7 @@ __FBSDID("$FreeBSD$"); SYSCTL_NODE(_debug, OID_AUTO, ktr, CTLFLAG_RD, 0, "KTR options"); -int ktr_cpumask = KTR_CPUMASK; +cpumask_t ktr_cpumask = KTR_CPUMASK; TUNABLE_INT("debug.ktr.cpumask", &ktr_cpumask); SYSCTL_INT(_debug_ktr, OID_AUTO, cpumask, CTLFLAG_RW, &ktr_cpumask, 0, "Bitmask of CPUs on which KTR logging is enabled"); @@ -211,7 +211,7 @@ ktr_tracepoint(u_int mask, const char *f if ((ktr_mask & mask) == 0) return; cpu = KTR_CPU; - if (((1 << cpu) & ktr_cpumask) == 0) + if ((cpumask(cpu) & ktr_cpumask) == 0) return; #if defined(KTR_VERBOSE) || defined(KTR_ALQ) td = curthread; Modified: projects/sbruno_64cpus/sys/kern/kern_pmc.c ============================================================================== --- projects/sbruno_64cpus/sys/kern/kern_pmc.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/kern/kern_pmc.c Mon Nov 15 17:40:48 2010 (r215341) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" #include +#include #include #include #include @@ -110,7 +111,7 @@ pmc_cpu_is_active(int cpu) { #ifdef SMP return (pmc_cpu_is_present(cpu) && - (hlt_cpus_mask & (1 << cpu)) == 0); + (hlt_cpus_mask & cputomask(cpu)) == 0); #else return (1); #endif @@ -137,7 +138,7 @@ int pmc_cpu_is_primary(int cpu) { #ifdef SMP - return ((logical_cpus_mask & (1 << cpu)) == 0); + return ((logical_cpus_mask & cputomask(cpu)) == 0); #else return (1); #endif Modified: projects/sbruno_64cpus/sys/kern/sched_4bsd.c ============================================================================== --- projects/sbruno_64cpus/sys/kern/sched_4bsd.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/kern/sched_4bsd.c Mon Nov 15 17:40:48 2010 (r215341) @@ -1097,7 +1097,7 @@ forward_wakeup(int cpunum) me = PCPU_GET(cpumask); /* Don't bother if we should be doing it ourself. */ - if ((me & idle_cpus_mask) && (cpunum == NOCPU || me == (1 << cpunum))) + if ((me & idle_cpus_mask) && (cpunum == NOCPU || me == cputomask(cpunum))) return (0); dontuse = me | stopped_cpus | hlt_cpus_mask; @@ -1119,7 +1119,7 @@ forward_wakeup(int cpunum) /* If they are both on, compare and use loop if different. */ if (forward_wakeup_use_loop) { if (map != map3) { - printf("map (%02X) != map3 (%02X)\n", map, + printf("map (%02lX) != map3 (%02lX)\n", map, map3); map = map3; } @@ -1131,7 +1131,7 @@ forward_wakeup(int cpunum) /* If we only allow a specific CPU, then mask off all the others. */ if (cpunum != NOCPU) { KASSERT((cpunum <= mp_maxcpus),("forward_wakeup: bad cpunum.")); - map &= (1 << cpunum); + map &= cputomask(cpunum); } else { /* Try choose an idle die. */ if (forward_wakeup_use_htt) { Modified: projects/sbruno_64cpus/sys/kern/sched_ule.c ============================================================================== --- projects/sbruno_64cpus/sys/kern/sched_ule.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/kern/sched_ule.c Mon Nov 15 17:40:48 2010 (r215341) @@ -549,7 +549,7 @@ struct cpu_search { #define CPUSET_FOREACH(cpu, mask) \ for ((cpu) = 0; (cpu) <= mp_maxid; (cpu)++) \ - if ((mask) & 1 << (cpu)) + if ((mask) & cputomask(cpu)) static __inline int cpu_search(struct cpu_group *cg, struct cpu_search *low, struct cpu_search *high, const int match); @@ -2645,11 +2645,11 @@ sysctl_kern_sched_topology_spec_internal sbuf_printf(sb, "%*s\n", indent, "", 1 + indent / 2, cg->cg_level); - sbuf_printf(sb, "%*s ", indent, "", + sbuf_printf(sb, "%*s ", indent, "", cg->cg_count, cg->cg_mask); first = TRUE; for (i = 0; i < MAXCPU; i++) { - if ((cg->cg_mask & (1 << i)) != 0) { + if ((cg->cg_mask & cputomask(i)) != 0) { if (!first) sbuf_printf(sb, ", "); else Modified: projects/sbruno_64cpus/sys/kern/subr_pcpu.c ============================================================================== --- projects/sbruno_64cpus/sys/kern/subr_pcpu.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/kern/subr_pcpu.c Mon Nov 15 17:40:48 2010 (r215341) @@ -88,7 +88,7 @@ pcpu_init(struct pcpu *pcpu, int cpuid, KASSERT(cpuid >= 0 && cpuid < MAXCPU, ("pcpu_init: invalid cpuid %d", cpuid)); pcpu->pc_cpuid = cpuid; - pcpu->pc_cpumask = 1 << cpuid; + pcpu->pc_cpumask = cputomask(cpuid); cpuid_to_pcpu[cpuid] = pcpu; SLIST_INSERT_HEAD(&cpuhead, pcpu, pc_allcpu); cpu_pcpu_init(pcpu, cpuid, size); Modified: projects/sbruno_64cpus/sys/kern/subr_smp.c ============================================================================== --- projects/sbruno_64cpus/sys/kern/subr_smp.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/kern/subr_smp.c Mon Nov 15 17:40:48 2010 (r215341) @@ -290,7 +290,7 @@ restart_cpus(cpumask_t map) CTR1(KTR_SMP, "restart_cpus(%x)", map); /* signal other cpus to restart */ - atomic_store_rel_int(&started_cpus, map); + atomic_store_rel_long(&started_cpus, map); /* wait for each to clear its bit */ while ((stopped_cpus & map) != 0) @@ -368,11 +368,11 @@ smp_rendezvous_cpus(cpumask_t map, } CPU_FOREACH(i) { - if (((1 << i) & map) != 0) + if ((cputomask(i) & map) != 0) ncpus++; } if (ncpus == 0) - panic("ncpus is 0 with map=0x%x", map); + panic("ncpus is 0 with map=0x%lx", map); /* obtain rendezvous lock */ mtx_lock_spin(&smp_ipi_mtx); @@ -388,10 +388,10 @@ smp_rendezvous_cpus(cpumask_t map, atomic_store_rel_int(&smp_rv_waiters[0], 0); /* signal other processors, which will enter the IPI with interrupts off */ - ipi_selected(map & ~(1 << curcpu), IPI_RENDEZVOUS); + ipi_selected(map & ~cputomask(curcpu), IPI_RENDEZVOUS); /* Check if the current CPU is in the map */ - if ((map & (1 << curcpu)) != 0) + if ((map & cputomask(curcpu)) != 0) smp_rendezvous_action(); if (teardown_func == smp_no_rendevous_barrier) @@ -463,7 +463,7 @@ smp_topo(void) panic("Built bad topology at %p. CPU count %d != %d", top, top->cg_count, mp_ncpus); if (top->cg_mask != all_cpus) - panic("Built bad topology at %p. CPU mask 0x%X != 0x%X", + panic("Built bad topology at %p. CPU mask 0x%lX != 0x%lX", top, top->cg_mask, all_cpus); return (top); } @@ -476,7 +476,7 @@ smp_topo_none(void) top = &group[0]; top->cg_parent = NULL; top->cg_child = NULL; - top->cg_mask = ~0U >> (32 - mp_ncpus); + top->cg_mask = ~0lU >> (MAXCPU - mp_ncpus); top->cg_count = mp_ncpus; top->cg_children = 0; top->cg_level = CG_SHARE_NONE; @@ -493,7 +493,7 @@ smp_topo_addleaf(struct cpu_group *paren int i; for (mask = 0, i = 0; i < count; i++, start++) - mask |= (1 << start); + mask |= cputomask(start); child->cg_parent = parent; child->cg_child = NULL; child->cg_children = 0; @@ -504,7 +504,7 @@ smp_topo_addleaf(struct cpu_group *paren parent->cg_children++; for (; parent != NULL; parent = parent->cg_parent) { if ((parent->cg_mask & child->cg_mask) != 0) - panic("Duplicate children in %p. mask 0x%X child 0x%X", + panic("Duplicate children in %p. mask 0x%lX child 0x%lX", parent, parent->cg_mask, child->cg_mask); parent->cg_mask |= child->cg_mask; parent->cg_count += child->cg_count; @@ -570,7 +570,7 @@ smp_topo_find(struct cpu_group *top, int int children; int i; - mask = (1 << cpu); + mask = cputomask(cpu); cg = top; for (;;) { if ((cg->cg_mask & mask) == 0) Modified: projects/sbruno_64cpus/sys/sys/smp.h ============================================================================== --- projects/sbruno_64cpus/sys/sys/smp.h Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/sys/smp.h Mon Nov 15 17:40:48 2010 (r215341) @@ -90,7 +90,8 @@ extern cpumask_t all_cpus; * time, thus permitting us to configure sparse maps of cpuid-dependent * (per-CPU) structures. */ -#define CPU_ABSENT(x_cpu) ((all_cpus & (1 << (x_cpu))) == 0) +#include +#define CPU_ABSENT(x_cpu) ((all_cpus & (cputomask(x_cpu))) == 0) /* * Macros to iterate over non-absent CPUs. CPU_FOREACH() takes an @@ -102,7 +103,7 @@ extern cpumask_t all_cpus; */ #define CPU_FOREACH(i) \ for ((i) = 0; (i) <= mp_maxid; (i)++) \ - if (!CPU_ABSENT((i))) + if (!CPU_ABSENT(i)) static __inline int cpu_first(void) Modified: projects/sbruno_64cpus/sys/sys/systm.h ============================================================================== --- projects/sbruno_64cpus/sys/sys/systm.h Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/sys/systm.h Mon Nov 15 17:40:48 2010 (r215341) @@ -426,4 +426,6 @@ bitcount32(uint32_t x) return (x); } +#define cputomask(_cpu) ((__cpumask_t)1 << _cpu) + #endif /* !_SYS_SYSTM_H_ */ Modified: projects/sbruno_64cpus/sys/x86/x86/local_apic.c ============================================================================== --- projects/sbruno_64cpus/sys/x86/x86/local_apic.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/x86/x86/local_apic.c Mon Nov 15 17:40:48 2010 (r215341) @@ -809,7 +809,7 @@ lapic_handle_timer(struct trapframe *fra * and unlike other schedulers it actually schedules threads to * those CPUs. */ - if ((hlt_cpus_mask & (1 << PCPU_GET(cpuid))) != 0) + if ((hlt_cpus_mask & PCPU_GET(cpumask)) != 0) return; #endif Modified: projects/sbruno_64cpus/sys/x86/x86/mca.c ============================================================================== --- projects/sbruno_64cpus/sys/x86/x86/mca.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/x86/x86/mca.c Mon Nov 15 17:40:48 2010 (r215341) @@ -539,7 +539,7 @@ mca_scan(enum scan_mode mode) * For a CMCI, only check banks this CPU is * responsible for. */ - if (mode == CMCI && !(PCPU_GET(cmci_mask) & 1 << i)) + if (mode == CMCI && !(PCPU_GET(cmci_mask) & cputomask(i))) continue; #endif @@ -558,7 +558,7 @@ mca_scan(enum scan_mode mode) * If this is a bank this CPU monitors via CMCI, * update the threshold. */ - if (PCPU_GET(cmci_mask) & 1 << i) + if (PCPU_GET(cmci_mask) & cputomask(i)) cmci_update(mode, i, valid, &rec); #endif } @@ -734,7 +734,7 @@ cmci_monitor(int i) wrmsr(MSR_MC_CTL2(i), ctl); /* Mark this bank as monitored. */ - PCPU_SET(cmci_mask, PCPU_GET(cmci_mask) | 1 << i); + PCPU_SET(cmci_mask, PCPU_GET(cmci_mask) | cputomask(i)); } /* @@ -750,7 +750,7 @@ cmci_resume(int i) KASSERT(i < cmc_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); /* Ignore banks not monitored by this CPU. */ - if (!(PCPU_GET(cmci_mask) & 1 << i)) + if (!(PCPU_GET(cmci_mask) & cputomask(i))) return; cc = &cmc_state[PCPU_GET(cpuid)][i]; Modified: projects/sbruno_64cpus/sys/x86/x86/mptable.c ============================================================================== --- projects/sbruno_64cpus/sys/x86/x86/mptable.c Mon Nov 15 17:24:07 2010 (r215340) +++ projects/sbruno_64cpus/sys/x86/x86/mptable.c Mon Nov 15 17:40:48 2010 (r215341) @@ -162,7 +162,7 @@ static int lookup_bus_type(char *name); static void mptable_count_items(void); static void mptable_count_items_handler(u_char *entry, void *arg); #ifdef MPTABLE_FORCE_HTT -static void mptable_hyperthread_fixup(u_int id_mask); +static void mptable_hyperthread_fixup(cpumask_t id_mask); #endif static void mptable_parse_apics_and_busses(void); static void mptable_parse_apics_and_busses_handler(u_char *entry, @@ -303,7 +303,7 @@ found: static int mptable_probe_cpus(void) { - u_int cpu_mask; + cpumask_t cpu_mask; /* Is this a pre-defined config? */ if (mpfps->config_type != 0) { @@ -423,7 +423,7 @@ static void mptable_probe_cpus_handler(u_char *entry, void *arg) { proc_entry_ptr proc; - u_int *cpu_mask; + cpumask_t *cpu_mask; switch (*entry) { case MPCT_ENTRY_PROCESSOR: @@ -432,8 +432,8 @@ mptable_probe_cpus_handler(u_char *entry lapic_create(proc->apic_id, proc->cpu_flags & PROCENTRY_FLAG_BP); if (proc->apic_id < MAX_LAPIC_ID) { - cpu_mask = (u_int *)arg; - *cpu_mask |= (1ul << proc->apic_id); + cpu_mask = (cpumask_t *)arg; + *cpu_mask |= cputomask(proc->apic_id); } } break; @@ -883,7 +883,7 @@ mptable_parse_ints(void) * with the number of logical CPU's in the processor. */ static void -mptable_hyperthread_fixup(u_int id_mask) +mptable_hyperthread_fixup(cpumask_t id_mask) { u_int i, id, logical_cpus; @@ -901,13 +901,13 @@ mptable_hyperthread_fixup(u_int id_mask) * already in the table, then kill the fixup. */ for (id = 0; id <= MAX_LAPIC_ID; id++) { - if ((id_mask & 1 << id) == 0) + if ((id_mask & cputomask(id)) == 0) continue; /* First, make sure we are on a logical_cpus boundary. */ if (id % logical_cpus != 0) return; for (i = id + 1; i < id + logical_cpus; i++) - if ((id_mask & 1 << i) != 0) + if ((id_mask & cputomask(i)) != 0) return; } @@ -915,7 +915,7 @@ mptable_hyperthread_fixup(u_int id_mask) * Ok, the ID's checked out, so perform the fixup by * adding the logical CPUs. */ - while ((id = ffs(id_mask)) != 0) { + while ((id = ffsl(id_mask)) != 0) { id--; for (i = id + 1; i < id + logical_cpus; i++) { if (bootverbose) @@ -924,7 +924,7 @@ mptable_hyperthread_fixup(u_int id_mask) i, id); lapic_create(i, 0); } - id_mask &= ~(1 << id); + id_mask &= ~cputomask(id); } } #endif /* MPTABLE_FORCE_HTT */ From owner-svn-src-projects@FreeBSD.ORG Mon Nov 15 18:10:08 2010 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 C68ED106567A for ; Mon, 15 Nov 2010 18:10:08 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh8.mail.rice.edu (mh8.mail.rice.edu [128.42.201.24]) by mx1.freebsd.org (Postfix) with ESMTP id 9462F8FC19 for ; Mon, 15 Nov 2010 18:10:08 +0000 (UTC) Received: from mh8.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh8.mail.rice.edu (Postfix) with ESMTP id 74DAC28F84C; Mon, 15 Nov 2010 11:54:52 -0600 (CST) X-Virus-Scanned: by amavis-2.6.4 at mh8.mail.rice.edu, auth channel Received: from mh8.mail.rice.edu ([127.0.0.1]) by mh8.mail.rice.edu (mh8.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id WLboOeQpSgT8; Mon, 15 Nov 2010 11:54:52 -0600 (CST) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh8.mail.rice.edu (Postfix) with ESMTPSA id CE60A28F846; Mon, 15 Nov 2010 11:54:51 -0600 (CST) Message-ID: <4CE173EB.9090201@rice.edu> Date: Mon, 15 Nov 2010 11:54:51 -0600 From: Alan Cox User-Agent: Thunderbird 2.0.0.24 (X11/20100725) MIME-Version: 1.0 To: Sean Bruno References: <201011151740.oAFHemm7023567@svn.freebsd.org> In-Reply-To: <201011151740.oAFHemm7023567@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215341 - in projects/sbruno_64cpus: lib/libmemstat sys/amd64/amd64 sys/amd64/include sys/cddl/dev/dtrace/amd64 sys/dev/hwpmc sys/geom/eli sys/i386/i386 sys/i386/include sys/kern sys/sy... 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: Mon, 15 Nov 2010 18:10:08 -0000 Sean Bruno wrote: > Author: sbruno > Date: Mon Nov 15 17:40:48 2010 > New Revision: 215341 > URL: http://svn.freebsd.org/changeset/base/215341 > > Log: > Initial patches to support 64CPUS. > > *note that this dies in memory allocation/locking at this time > *note that this does not raise MAXCPU yet > *note that this does raise MAXCPU for libmemestat > > Obtained from: peter@ via Yahoo! Inc > The changes to amd64/cpu_switch.S are incorrect. The "VM_PMAP+" should be removed from each of the modified operands. Alan From owner-svn-src-projects@FreeBSD.ORG Mon Nov 15 21:41:33 2010 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 F3ADD106564A; Mon, 15 Nov 2010 21:41:32 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E28D68FC15; Mon, 15 Nov 2010 21:41:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFLfWjk029390; Mon, 15 Nov 2010 21:41:32 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAFLfWwo029387; Mon, 15 Nov 2010 21:41:32 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201011152141.oAFLfWwo029387@svn.freebsd.org> From: Sean Bruno Date: Mon, 15 Nov 2010 21:41: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: r215347 - in projects/sbruno_64cpus/sys/amd64: amd64 include 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: Mon, 15 Nov 2010 21:41:33 -0000 Author: sbruno Date: Mon Nov 15 21:41:32 2010 New Revision: 215347 URL: http://svn.freebsd.org/changeset/base/215347 Log: Bump MAXCPU to 64 after alc@ pointed out that cpu_switch.S was plain wrong. Modified: projects/sbruno_64cpus/sys/amd64/amd64/cpu_switch.S projects/sbruno_64cpus/sys/amd64/include/param.h Modified: projects/sbruno_64cpus/sys/amd64/amd64/cpu_switch.S ============================================================================== --- projects/sbruno_64cpus/sys/amd64/amd64/cpu_switch.S Mon Nov 15 21:19:50 2010 (r215346) +++ projects/sbruno_64cpus/sys/amd64/amd64/cpu_switch.S Mon Nov 15 21:41:32 2010 (r215347) @@ -74,7 +74,7 @@ ENTRY(cpu_throw) jz 1f /* release bit from old pm_active */ movq PCPU(CURPMAP),%rdx - LK btrq %rax,VM_PMAP+PM_ACTIVE(%rdx) /* clear old */ + LK btrq %rax,PM_ACTIVE(%rdx) /* clear old */ 1: movq TD_PCB(%rsi),%r8 /* newtd->td_proc */ movq PCB_CR3(%r8),%rdx @@ -138,14 +138,14 @@ swinact: movl PCPU(CPUID), %eax /* Release bit from old pmap->pm_active */ movq PCPU(CURPMAP),%rcx - LK btrq %rax,VM_PMAP+PM_ACTIVE(%rcx) /* clear old */ + LK btrq %rax,PM_ACTIVE(%rcx) /* clear old */ SETLK %rdx, TD_LOCK(%rdi) /* Release the old thread */ swact: /* Set bit in new pmap->pm_active */ movq TD_PROC(%rsi),%rdx /* newproc */ movq P_VMSPACE(%rdx), %rdx addq $VM_PMAP,%rdx - LK btsq %rax,VM_PMAP+PM_ACTIVE(%rdx) /* set new */ + LK btsq %rax,PM_ACTIVE(%rdx) /* set new */ movq %rdx,PCPU(CURPMAP) sw1: Modified: projects/sbruno_64cpus/sys/amd64/include/param.h ============================================================================== --- projects/sbruno_64cpus/sys/amd64/include/param.h Mon Nov 15 21:19:50 2010 (r215346) +++ projects/sbruno_64cpus/sys/amd64/include/param.h Mon Nov 15 21:41:32 2010 (r215347) @@ -64,7 +64,7 @@ #endif #if defined(SMP) || defined(KLD_MODULE) -#define MAXCPU 32 +#define MAXCPU 64 #else #define MAXCPU 1 #endif From owner-svn-src-projects@FreeBSD.ORG Tue Nov 16 10:33:42 2010 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 9BE90106566B; Tue, 16 Nov 2010 10:33:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 869678FC0A; Tue, 16 Nov 2010 10:33:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAGAXg4u048702; Tue, 16 Nov 2010 10:33:42 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAGAXgIw048668; Tue, 16 Nov 2010 10:33:42 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011161033.oAGAXgIw048668@svn.freebsd.org> From: Dimitry Andric Date: Tue, 16 Nov 2010 10:33:42 +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: r215396 - in projects/binutils-2.17: contrib/top gnu/usr.bin/binutils gnu/usr.bin/binutils/as gnu/usr.bin/binutils/as/powerpc64-freebsd gnu/usr.bin/binutils/libbfd gnu/usr.bin/binutils/... 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, 16 Nov 2010 10:33:42 -0000 Author: dim Date: Tue Nov 16 10:33:41 2010 New Revision: 215396 URL: http://svn.freebsd.org/changeset/base/215396 Log: Sync: merge r215319 through r215395 from ^/head, so ports can actually build! :) Deleted: projects/binutils-2.17/gnu/usr.bin/binutils/as/powerpc64-freebsd/ projects/binutils-2.17/gnu/usr.bin/binutils/libopcodes/Makefile.powerpc64 projects/binutils-2.17/share/man/man8/MAKEDEV.8 Modified: projects/binutils-2.17/gnu/usr.bin/binutils/Makefile.inc0 projects/binutils-2.17/gnu/usr.bin/binutils/as/Makefile projects/binutils-2.17/gnu/usr.bin/binutils/libbfd/Makefile projects/binutils-2.17/lib/clang/clang.build.mk projects/binutils-2.17/sbin/hastd/primary.c projects/binutils-2.17/share/doc/papers/jail/mgt.ms projects/binutils-2.17/share/doc/smm/01.setup/2.t projects/binutils-2.17/share/doc/smm/01.setup/4.t projects/binutils-2.17/share/doc/smm/01.setup/5.t projects/binutils-2.17/share/doc/smm/01.setup/spell.ok projects/binutils-2.17/share/man/man5/src.conf.5 projects/binutils-2.17/share/man/man8/Makefile projects/binutils-2.17/sys/amd64/amd64/trap.c projects/binutils-2.17/sys/arm/xscale/ixp425/avila_gpio.c projects/binutils-2.17/sys/arm/xscale/ixp425/avila_led.c projects/binutils-2.17/sys/arm/xscale/ixp425/cambria_gpio.c projects/binutils-2.17/sys/arm/xscale/ixp425/ixp425.c projects/binutils-2.17/sys/arm/xscale/ixp425/ixp425_iic.c projects/binutils-2.17/sys/arm/xscale/ixp425/ixp425var.h projects/binutils-2.17/sys/boot/arm/uboot/ldscript.arm projects/binutils-2.17/sys/boot/forth/beastie.4th projects/binutils-2.17/sys/compat/linsysfs/linsysfs.c projects/binutils-2.17/sys/compat/linux/linux_futex.c projects/binutils-2.17/sys/compat/linux/linux_futex.h projects/binutils-2.17/sys/dev/drm/drmP.h projects/binutils-2.17/sys/dev/drm/drm_agpsupport.c projects/binutils-2.17/sys/dev/drm/drm_drv.c projects/binutils-2.17/sys/dev/drm/drm_memory.c projects/binutils-2.17/sys/dev/drm/drm_sysctl.c projects/binutils-2.17/sys/dev/drm/radeon_cs.c projects/binutils-2.17/sys/dev/firewire/00README projects/binutils-2.17/sys/dev/mii/brgphy.c projects/binutils-2.17/sys/dev/mii/mii.c projects/binutils-2.17/sys/dev/mpt/mpt.h projects/binutils-2.17/sys/dev/nfe/if_nfe.c projects/binutils-2.17/sys/dev/re/if_re.c projects/binutils-2.17/sys/dev/tdfx/tdfx_pci.c projects/binutils-2.17/sys/dev/usb/net/if_ruereg.h projects/binutils-2.17/sys/dev/usb/serial/u3g.c projects/binutils-2.17/sys/dev/usb/usbdevs projects/binutils-2.17/sys/dev/xl/if_xl.c projects/binutils-2.17/sys/i386/i386/trap.c projects/binutils-2.17/sys/kern/kern_umtx.c projects/binutils-2.17/sys/netinet/cc.h projects/binutils-2.17/sys/netinet/cc/cc.c projects/binutils-2.17/sys/netinet/tcp_subr.c projects/binutils-2.17/sys/netinet/tcp_var.h projects/binutils-2.17/sys/sparc64/pci/psycho.c projects/binutils-2.17/sys/sparc64/pci/schizo.c projects/binutils-2.17/sys/sys/param.h projects/binutils-2.17/sys/vm/vm_mmap.c projects/binutils-2.17/tools/build/mk/OptionalObsoleteFiles.inc projects/binutils-2.17/usr.sbin/config/SMM.doc/6.t projects/binutils-2.17/usr.sbin/config/SMM.doc/spell.ok Directory Properties: projects/binutils-2.17/ (props changed) projects/binutils-2.17/cddl/contrib/opensolaris/ (props changed) projects/binutils-2.17/contrib/bind9/ (props changed) projects/binutils-2.17/contrib/binutils/ (props changed) projects/binutils-2.17/contrib/bzip2/ (props changed) projects/binutils-2.17/contrib/ee/ (props changed) projects/binutils-2.17/contrib/expat/ (props changed) projects/binutils-2.17/contrib/file/ (props changed) projects/binutils-2.17/contrib/gdb/ (props changed) projects/binutils-2.17/contrib/gdtoa/ (props changed) projects/binutils-2.17/contrib/gnu-sort/ (props changed) projects/binutils-2.17/contrib/groff/ (props changed) projects/binutils-2.17/contrib/less/ (props changed) projects/binutils-2.17/contrib/libpcap/ (props changed) projects/binutils-2.17/contrib/llvm/ (props changed) projects/binutils-2.17/contrib/llvm/tools/clang/ (props changed) projects/binutils-2.17/contrib/ncurses/ (props changed) projects/binutils-2.17/contrib/netcat/ (props changed) projects/binutils-2.17/contrib/ntp/ (props changed) projects/binutils-2.17/contrib/one-true-awk/ (props changed) projects/binutils-2.17/contrib/openbsm/ (props changed) projects/binutils-2.17/contrib/openpam/ (props changed) projects/binutils-2.17/contrib/pf/ (props changed) projects/binutils-2.17/contrib/sendmail/ (props changed) projects/binutils-2.17/contrib/tcpdump/ (props changed) projects/binutils-2.17/contrib/tcsh/ (props changed) projects/binutils-2.17/contrib/top/ (props changed) projects/binutils-2.17/contrib/top/install-sh (props changed) projects/binutils-2.17/contrib/tzcode/stdtime/ (props changed) projects/binutils-2.17/contrib/tzcode/zic/ (props changed) projects/binutils-2.17/contrib/tzdata/ (props changed) projects/binutils-2.17/contrib/wpa/ (props changed) projects/binutils-2.17/contrib/xz/ (props changed) projects/binutils-2.17/crypto/openssh/ (props changed) projects/binutils-2.17/crypto/openssl/ (props changed) projects/binutils-2.17/lib/libc/ (props changed) projects/binutils-2.17/lib/libc/stdtime/ (props changed) projects/binutils-2.17/lib/libutil/ (props changed) projects/binutils-2.17/lib/libz/ (props changed) projects/binutils-2.17/sbin/ (props changed) projects/binutils-2.17/sbin/ipfw/ (props changed) projects/binutils-2.17/share/mk/bsd.arch.inc.mk (props changed) projects/binutils-2.17/share/zoneinfo/ (props changed) projects/binutils-2.17/sys/ (props changed) projects/binutils-2.17/sys/amd64/include/xen/ (props changed) projects/binutils-2.17/sys/cddl/contrib/opensolaris/ (props changed) projects/binutils-2.17/sys/contrib/dev/acpica/ (props changed) projects/binutils-2.17/sys/contrib/pf/ (props changed) projects/binutils-2.17/sys/contrib/x86emu/ (props changed) projects/binutils-2.17/sys/dev/xen/xenpci/ (props changed) projects/binutils-2.17/usr.bin/calendar/ (props changed) projects/binutils-2.17/usr.bin/csup/ (props changed) projects/binutils-2.17/usr.bin/procstat/ (props changed) projects/binutils-2.17/usr.sbin/zic/ (props changed) Modified: projects/binutils-2.17/gnu/usr.bin/binutils/Makefile.inc0 ============================================================================== --- projects/binutils-2.17/gnu/usr.bin/binutils/Makefile.inc0 Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/gnu/usr.bin/binutils/Makefile.inc0 Tue Nov 16 10:33:41 2010 (r215396) @@ -38,28 +38,15 @@ CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 .endif CFLAGS+= -I. -.if exists(${.CURDIR}/${TARGET_CPUARCH}) -CFLAGS+= -I${.CURDIR}/${TARGET_CPUARCH} -.endif CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd CFLAGS+= -I${SRCDIR}/include -.if exists(${.CURDIR}/${TARGET_CPUARCH}) -.PATH: ${.CURDIR}/${TARGET_CPUARCH} -.endif - ARCHS= ${TARGET_CPUARCH} -.for _arch in ${CROSS_ARCH} -.if (${ARCHS:R:M${_arch:R}} == "") -ARCHS+= $(_arch) -.endif -.endfor - -.for _arch in ${ARCHS} -.if exists(${.CURDIR}/Makefile.${_arch}) -.include "${.CURDIR}/Makefile.${_arch}" +.if exists(${.CURDIR}/Makefile.${TARGET_ARCH}) +.include "${.CURDIR}/Makefile.${TARGET_ARCH}" +.elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH}) +.include "${.CURDIR}/Makefile.${TARGET_CPUARCH}" .endif -.endfor Modified: projects/binutils-2.17/gnu/usr.bin/binutils/as/Makefile ============================================================================== --- projects/binutils-2.17/gnu/usr.bin/binutils/as/Makefile Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/gnu/usr.bin/binutils/as/Makefile Tue Nov 16 10:33:41 2010 (r215396) @@ -47,7 +47,7 @@ SRCS+= itbl-ops.c itbl-parse.y itbl-lex. .if ${TARGET_ARCH} == "amd64" SRCS+= tc-i386.c -.elif ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64" +.elif ${TARGET_CPUARCH} == "powerpc" SRCS+= tc-ppc.c .elif ${TARGET_ARCH} == "sparc64" SRCS+= tc-sparc.c Modified: projects/binutils-2.17/gnu/usr.bin/binutils/libbfd/Makefile ============================================================================== --- projects/binutils-2.17/gnu/usr.bin/binutils/libbfd/Makefile Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/gnu/usr.bin/binutils/libbfd/Makefile Tue Nov 16 10:33:41 2010 (r215396) @@ -55,8 +55,6 @@ SELARCH= SELARCH= &bfd_i386_arch .elif ${TARGET_ARCH} == "sparc64" SELARCH= &bfd_sparc_arch -.elif ${TARGET_ARCH} == "powerpc64" -SELARCH= &bfd_powerpc_arch,&bfd_rs6000_arch .else .for _a in ${ARCHS} .if ${SELARCH} == "" Modified: projects/binutils-2.17/lib/clang/clang.build.mk ============================================================================== --- projects/binutils-2.17/lib/clang/clang.build.mk Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/lib/clang/clang.build.mk Tue Nov 16 10:33:41 2010 (r215396) @@ -18,14 +18,14 @@ TARGET_ARCH?= ${MACHINE_ARCH} CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH}-undermydesk-freebsd9.0\" .ifndef LLVM_REQUIRES_EH -CFLAGS+=-fno-exceptions +CXXFLAGS+=-fno-exceptions .else # If the library or program requires EH, it also requires RTTI. LLVM_REQUIRES_RTTI= .endif .ifndef LLVM_REQUIRES_RTTI -CFLAGS+=-fno-rtti +CXXFLAGS+=-fno-rtti .endif .ifdef TOOLS_PREFIX Modified: projects/binutils-2.17/sbin/hastd/primary.c ============================================================================== --- projects/binutils-2.17/sbin/hastd/primary.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sbin/hastd/primary.c Tue Nov 16 10:33:41 2010 (r215396) @@ -511,7 +511,8 @@ init_remote(struct hast_resource *res, s /* Prepare outgoing connection with remote node. */ if (proto_client(res->hr_remoteaddr, &out) < 0) { - primary_exit(EX_TEMPFAIL, "Unable to create connection to %s", + primary_exit(EX_TEMPFAIL, + "Unable to create outgoing connection to %s", res->hr_remoteaddr); } /* Try to connect, but accept failure. */ @@ -577,7 +578,8 @@ init_remote(struct hast_resource *res, s * Setup incoming connection with remote node. */ if (proto_client(res->hr_remoteaddr, &in) < 0) { - pjdlog_errno(LOG_WARNING, "Unable to create connection to %s", + primary_exit(EX_TEMPFAIL, + "Unable to create incoming connection to %s", res->hr_remoteaddr); } /* Try to connect, but accept failure. */ @@ -2008,6 +2010,7 @@ guard_thread(void *arg) PJDLOG_VERIFY(sigaddset(&mask, SIGINT) == 0); PJDLOG_VERIFY(sigaddset(&mask, SIGTERM) == 0); + timeout.tv_sec = RETRY_SLEEP; timeout.tv_nsec = 0; signo = -1; @@ -2033,7 +2036,6 @@ guard_thread(void *arg) guard_one(res, ii); lastcheck = now; } - timeout.tv_sec = RETRY_SLEEP; signo = sigtimedwait(&mask, NULL, &timeout); } /* NOTREACHED */ Modified: projects/binutils-2.17/share/doc/papers/jail/mgt.ms ============================================================================== --- projects/binutils-2.17/share/doc/papers/jail/mgt.ms Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/share/doc/papers/jail/mgt.ms Tue Nov 16 10:33:41 2010 (r215396) @@ -56,8 +56,6 @@ FreeBSD build environment. .PP One notable difference from the default FreeBSD install is that only a limited set of device nodes should be created. -MAKEDEV(8) has been modified to accept a ``jail'' argument that creates -the correct set of nodes. .PP To improve storage efficiency, a fair number of the binaries in the system tree may be deleted, as they are not relevant in a jail environment. Modified: projects/binutils-2.17/share/doc/smm/01.setup/2.t ============================================================================== --- projects/binutils-2.17/share/doc/smm/01.setup/2.t Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/share/doc/smm/01.setup/2.t Tue Nov 16 10:33:41 2010 (r215396) @@ -482,13 +482,7 @@ lw(2i) l. \fB#\fP \fImount_mfs -s 1000 -T type /dev/null /tmp\fP (create a writable filesystem) (\fItype\fP is the disk type as determined from /etc/disktab) \fB#\fP \fIcd /tmp\fP (connect to that directory) -\fB#\fP \fI../dev/MAKEDEV \*(Dk#\fP (create special files for root disk) -(\fI\*(Dk\fP is the disk type, \fI#\fP is the unit number) -(ignore warning from ``sh'') \fB#\fP \fImount \-uw /tmp/\*(Dk#a /\fP (read-write mount root filesystem) -\fB#\fP \fIcd /dev\fP (go to device directory) -\fB#\fP \fI./MAKEDEV \*(Dk#\fP (create permanent special files for root disk) -(again, ignore warning from ``sh'') .TE .DE .Sh 4 "Step 4: (optional) restoring the root filesystem" @@ -513,8 +507,6 @@ To really create the root filesystem on you should first label the disk as described in step 5 below. Then run the following commands: .DS -\fB#\fP \fIcd /dev\fP -\fB#\fP \fI./MAKEDEV \*(Dk1a\fP \fB#\fP\|\fInewfs /dev/r\*(Dk1a\fP \fB#\fP\|\fImount /dev/\*(Dk1a /mnt\fP \fB#\fP\|\fIcd /mnt\fP @@ -1393,8 +1385,6 @@ To make the .Pn /var filesystem we would do: .DS -\fB#\fP \fIcd /dev\fP -\fB#\fP \fIMAKEDEV \*(Dk1\fP \fB#\fP \fIdisklabel -wr \*(Dk1 "disk type" "disk name"\fP \fB#\fP \fInewfs \*(Dk1f\fP (information about filesystem prints out) Modified: projects/binutils-2.17/share/doc/smm/01.setup/4.t ============================================================================== --- projects/binutils-2.17/share/doc/smm/01.setup/4.t Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/share/doc/smm/01.setup/4.t Tue Nov 16 10:33:41 2010 (r215396) @@ -30,6 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)4.t 8.1 (Berkeley) 7/29/93 +.\" $FreeBSD$ .\" .ds LH "Installing/Operating \*(4B .ds CF \*(Dy @@ -152,38 +153,11 @@ directory. For all the devices supported by the distribution system, the files in .Pn /dev -are created by the -.Pn /dev/MAKEDEV -shell script. +are created by devfs. .PP Determine the set of devices that you have and create a new .Pn /dev -directory by running the MAKEDEV script. -First create a new directory -.Pn /newdev , -copy MAKEDEV into it, edit the file MAKEDEV.local -to provide an entry for local needs, -and run it to generate a -.Pn /newdev directory. -For instance, -.DS -\fB#\fP \fIcd /\fP -\fB#\fP \fImkdir newdev\fP -\fB#\fP \fIcp dev/MAKEDEV newdev/MAKEDEV\fP -\fB#\fP \fIcd newdev\fP -\fB#\fP \fIMAKEDEV \*(Dk0 pt0 std LOCAL\fP -.DE -Note the ``std'' argument causes standard devices such as -.Pn /dev/console , -the machine console, to be created. -.PP -You can then do -.DS -\fB#\fP \fIcd /\fP -\fB#\fP \fImv dev olddev ; mv newdev dev\fP -\fB#\fP \fIsync\fP -.DE -to install the new device directory. +directory by mounting devfs. .Sh 3 "Building new system images" .PP The kernel configuration of each UNIX system is described by @@ -232,8 +206,8 @@ the file must be edited. .PP To add a new terminal device, be sure the device is configured into the system -and that the special files for the device have been made by -.Pn /dev/MAKEDEV . +and that the special files for the device exist in +.Pn /dev . Then, enable the appropriate lines of .Pn /etc/ttys by setting the ``status'' @@ -335,9 +309,6 @@ Finally note that you should change the terminals to ttyd? where ? is in [0-9a-zA-Z], as some programs use this property of the names to determine if a terminal is a dialup. -Shell commands to do this should be put in the -.Pn /dev/MAKEDEV.local -script. .PP While it is possible to use truly arbitrary strings for terminal names, the accounting and noticeably the Modified: projects/binutils-2.17/share/doc/smm/01.setup/5.t ============================================================================== --- projects/binutils-2.17/share/doc/smm/01.setup/5.t Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/share/doc/smm/01.setup/5.t Tue Nov 16 10:33:41 2010 (r215396) @@ -30,6 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)5.t 8.1 (Berkeley) 7/27/93 +.\" $FreeBSD$ .\" .ds lq `` .ds rq '' @@ -111,35 +112,6 @@ translations for machines that do not pa command. Additional information is provided in the manual page describing .Xr ESIS (4). -.PP -To use the pseudo terminals just configured, device -entries must be created in the -.Pn /dev -directory. To create 32 -pseudo terminals (plenty, unless you have a heavy network load) -execute the following commands. -.DS -\fB#\fP \fIcd /dev\fP -\fB#\fP \fIMAKEDEV pty0 pty1\fP -.DE -More pseudo terminals may be made by specifying -.Pn pty2 , -.Pn pty3 , -etc. The kernel normally includes support for 32 pseudo terminals -unless the configuration file specifies a different number. -Each pseudo terminal really consists of two files in -.Pn /dev : -a master and a slave. The master pseudo terminal file is named -.Pn /dev/ptyp? , -while the slave side is -.Pn /dev/ttyp? . -Pseudo terminals are also used by several programs not related to the network. -In addition to creating the pseudo terminals, -be sure to install them in the -.Pn /etc/ttys -file (with a `none' in the second column so no -.Xr getty -is started). .Sh 2 "Local subnets" .PP In \*(4B the Internet support Modified: projects/binutils-2.17/share/doc/smm/01.setup/spell.ok ============================================================================== --- projects/binutils-2.17/share/doc/smm/01.setup/spell.ok Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/share/doc/smm/01.setup/spell.ok Tue Nov 16 10:33:41 2010 (r215396) @@ -1,3 +1,4 @@ +# $FreeBSD$ A1096A AA ACU @@ -91,7 +92,6 @@ LK201 LOGFILE Leffler Luna -MAKEDEV.local MB MC68040 MFS Modified: projects/binutils-2.17/share/man/man5/src.conf.5 ============================================================================== --- projects/binutils-2.17/share/man/man5/src.conf.5 Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/share/man/man5/src.conf.5 Tue Nov 16 10:33:41 2010 (r215396) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm .\" $FreeBSD$ -.Dd August 25, 2010 +.Dd November 14, 2010 .Dt SRC.CONF 5 .Os .Sh NAME @@ -355,6 +355,9 @@ Set to build some programs without optio .It Va WITHOUT_GPIB .\" from FreeBSD: head/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru Set to not build GPIB bus support. +.It Va WITH_GPIO +.\" from FreeBSD: head/tools/build/options/WITH_GPIO 213463 2010-10-05 22:26:01Z gonzo +Set to build gpioctl(8) as part of the base system. .It Va WITHOUT_GROFF .\" from FreeBSD: head/tools/build/options/WITHOUT_GROFF 156932 2006-03-21 07:50:50Z ru Set to not build Modified: projects/binutils-2.17/share/man/man8/Makefile ============================================================================== --- projects/binutils-2.17/share/man/man8/Makefile Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/share/man/man8/Makefile Tue Nov 16 10:33:41 2010 (r215396) @@ -4,7 +4,6 @@ MAN= crash.8 \ diskless.8 \ intro.8 \ - MAKEDEV.8 \ nanobsd.8 \ picobsd.8 \ rc.8 \ Modified: projects/binutils-2.17/sys/amd64/amd64/trap.c ============================================================================== --- projects/binutils-2.17/sys/amd64/amd64/trap.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/amd64/amd64/trap.c Tue Nov 16 10:33:41 2010 (r215396) @@ -416,8 +416,7 @@ trap(struct trapframe *frame) * without the ABI-tag ELF note. */ if (SV_CURPROC_ABI() == SV_ABI_FREEBSD - && p->p_osrel >= - __FreeBSD_version_SIGSEGV) { + && p->p_osrel >= P_OSREL_SIGSEGV) { i = SIGSEGV; ucode = SEGV_ACCERR; } else { Modified: projects/binutils-2.17/sys/arm/xscale/ixp425/avila_gpio.c ============================================================================== --- projects/binutils-2.17/sys/arm/xscale/ixp425/avila_gpio.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/arm/xscale/ixp425/avila_gpio.c Tue Nov 16 10:33:41 2010 (r215396) @@ -58,13 +58,8 @@ __FBSDID("$FreeBSD$"); #define GPIO_CLEAR_BITS(sc, reg, bits) \ GPIO_CONF_WRITE_4(sc, reg, GPIO_CONF_READ_4(sc, (reg)) & ~(bits)) -#define GPIO_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define GPIO_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define GPIO_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) - struct avila_gpio_softc { device_t sc_dev; - struct mtx sc_mtx; bus_space_tag_t sc_iot; bus_space_handle_t sc_gpio_ioh; uint32_t sc_valid; @@ -148,12 +143,12 @@ avila_gpio_pin_configure(struct avila_gp uint32_t mask; mask = 1 << pin->gp_pin; - GPIO_LOCK(sc); /* * Manage input/output */ if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { + IXP4XX_GPIO_LOCK(sc); pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); if (flags & GPIO_PIN_OUTPUT) { pin->gp_flags |= GPIO_PIN_OUTPUT; @@ -163,9 +158,8 @@ avila_gpio_pin_configure(struct avila_gp pin->gp_flags |= GPIO_PIN_INPUT; GPIO_SET_BITS(sc, IXP425_GPIO_GPOER, mask); } + IXP4XX_GPIO_UNLOCK(sc); } - - GPIO_UNLOCK(sc); } static int @@ -184,10 +178,7 @@ avila_gpio_pin_getcaps(device_t dev, uin if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & (1 << pin))) return (EINVAL); - GPIO_LOCK(sc); *caps = sc->sc_pins[pin].gp_caps; - GPIO_UNLOCK(sc); - return (0); } @@ -199,11 +190,11 @@ avila_gpio_pin_getflags(device_t dev, ui if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & (1 << pin))) return (EINVAL); - GPIO_LOCK(sc); + IXP4XX_GPIO_LOCK(sc); /* refresh since we do not own all the pins */ sc->sc_pins[pin].gp_flags = avila_gpio_pin_flags(sc, pin); *flags = sc->sc_pins[pin].gp_flags; - GPIO_UNLOCK(sc); + IXP4XX_GPIO_UNLOCK(sc); return (0); } @@ -216,10 +207,7 @@ avila_gpio_pin_getname(device_t dev, uin if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & (1 << pin))) return (EINVAL); - GPIO_LOCK(sc); memcpy(name, sc->sc_pins[pin].gp_name, GPIOMAXNAME); - GPIO_UNLOCK(sc); - return (0); } @@ -254,12 +242,12 @@ avila_gpio_pin_set(device_t dev, uint32_ if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & mask)) return (EINVAL); - GPIO_LOCK(sc); + IXP4XX_GPIO_LOCK(sc); if (value) GPIO_SET_BITS(sc, IXP425_GPIO_GPOUTR, mask); else GPIO_CLEAR_BITS(sc, IXP425_GPIO_GPOUTR, mask); - GPIO_UNLOCK(sc); + IXP4XX_GPIO_UNLOCK(sc); return (0); } @@ -272,9 +260,9 @@ avila_gpio_pin_get(device_t dev, uint32_ if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & (1 << pin))) return (EINVAL); - GPIO_LOCK(sc); + IXP4XX_GPIO_LOCK(sc); *val = (GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR) & (1 << pin)) ? 1 : 0; - GPIO_UNLOCK(sc); + IXP4XX_GPIO_UNLOCK(sc); return (0); } @@ -289,13 +277,13 @@ avila_gpio_pin_toggle(device_t dev, uint if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & mask)) return (EINVAL); - GPIO_LOCK(sc); - res = (GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR) & mask) ? 1 : 0; + IXP4XX_GPIO_LOCK(sc); + res = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR) & mask; if (res) GPIO_CLEAR_BITS(sc, IXP425_GPIO_GPOUTR, mask); else GPIO_SET_BITS(sc, IXP425_GPIO_GPOUTR, mask); - GPIO_UNLOCK(sc); + IXP4XX_GPIO_UNLOCK(sc); return (0); } @@ -320,9 +308,6 @@ avila_gpio_attach(device_t dev) sc->sc_iot = sa->sc_iot; sc->sc_gpio_ioh = sa->sc_gpio_ioh; - mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, - MTX_DEF); - for (i = 0; i < N(avila_gpio_pins); i++) { struct avila_gpio_pin *p = &avila_gpio_pins[i]; @@ -342,14 +327,9 @@ avila_gpio_attach(device_t dev) static int avila_gpio_detach(device_t dev) { - struct avila_gpio_softc *sc = device_get_softc(dev); - - KASSERT(mtx_initialized(&sc->sc_mtx), ("gpio mutex not initialized")); bus_generic_detach(dev); - mtx_destroy(&sc->sc_mtx); - return(0); } Modified: projects/binutils-2.17/sys/arm/xscale/ixp425/avila_led.c ============================================================================== --- projects/binutils-2.17/sys/arm/xscale/ixp425/avila_led.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/arm/xscale/ixp425/avila_led.c Tue Nov 16 10:33:41 2010 (r215396) @@ -52,12 +52,14 @@ led_func(void *arg, int onoff) struct led_avila_softc *sc = arg; uint32_t reg; + IXP4XX_GPIO_LOCK(); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOUTR); if (onoff) reg &= ~GPIO_LED_STATUS_BIT; else reg |= GPIO_LED_STATUS_BIT; GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOUTR, reg); + IXP4XX_GPIO_UNLOCK(); } static int Modified: projects/binutils-2.17/sys/arm/xscale/ixp425/cambria_gpio.c ============================================================================== --- projects/binutils-2.17/sys/arm/xscale/ixp425/cambria_gpio.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/arm/xscale/ixp425/cambria_gpio.c Tue Nov 16 10:33:41 2010 (r215396) @@ -133,11 +133,11 @@ i2c_getsda(struct cambria_gpio_softc *sc { uint32_t reg; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); return (reg & GPIO_I2C_SDA_BIT); } @@ -145,13 +145,13 @@ static void i2c_setsda(struct cambria_gpio_softc *sc, int val) { - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SDA_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); DELAY(I2C_DELAY); } @@ -159,13 +159,13 @@ static void i2c_setscl(struct cambria_gpio_softc *sc, int val) { - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SCL_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); DELAY(I2C_DELAY); } Modified: projects/binutils-2.17/sys/arm/xscale/ixp425/ixp425.c ============================================================================== --- projects/binutils-2.17/sys/arm/xscale/ixp425/ixp425.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/arm/xscale/ixp425/ixp425.c Tue Nov 16 10:33:41 2010 (r215396) @@ -66,6 +66,8 @@ uint32_t intr_steer2 = 0; struct ixp425_softc *ixp425_softc = NULL; +struct mtx ixp425_gpio_mtx; + static int ixp425_probe(device_t); static void ixp425_identify(driver_t *, device_t); static int ixp425_attach(device_t); @@ -164,6 +166,7 @@ ixp425_set_gpio(struct ixp425_softc *sc, { uint32_t gpiotr = GPIO_CONF_READ_4(sc, GPIO_TYPE_REG(pin)); + IXP4XX_GPIO_LOCK(); /* clear interrupt type */ GPIO_CONF_WRITE_4(sc, GPIO_TYPE_REG(pin), gpiotr &~ GPIO_TYPE(pin, GPIO_TYPE_MASK)); @@ -176,6 +179,7 @@ ixp425_set_gpio(struct ixp425_softc *sc, /* configure gpio line as an input */ GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER) | (1<sc_iot, IXP425_GPIO_HWBASE, IXP425_GPIO_SIZE, 0, &sc->sc_gpio_ioh)) panic("%s: unable to map GPIO registers", __func__); Modified: projects/binutils-2.17/sys/arm/xscale/ixp425/ixp425_iic.c ============================================================================== --- projects/binutils-2.17/sys/arm/xscale/ixp425/ixp425_iic.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/arm/xscale/ixp425/ixp425_iic.c Tue Nov 16 10:33:41 2010 (r215396) @@ -106,11 +106,11 @@ ixpiic_getscl(device_t dev) struct ixpiic_softc *sc = ixpiic_sc; uint32_t reg; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); return (reg & GPIO_I2C_SCL_BIT); } @@ -120,11 +120,11 @@ ixpiic_getsda(device_t dev) struct ixpiic_softc *sc = ixpiic_sc; uint32_t reg; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); return (reg & GPIO_I2C_SDA_BIT); } @@ -133,13 +133,13 @@ ixpiic_setsda(device_t dev, int val) { struct ixpiic_softc *sc = ixpiic_sc; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SDA_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); DELAY(I2C_DELAY); } @@ -148,13 +148,13 @@ ixpiic_setscl(device_t dev, int val) { struct ixpiic_softc *sc = ixpiic_sc; - mtx_lock(&Giant); + IXP4XX_GPIO_LOCK(); GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SCL_BIT); if (val) GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); else GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); - mtx_unlock(&Giant); + IXP4XX_GPIO_UNLOCK(); DELAY(I2C_DELAY); } Modified: projects/binutils-2.17/sys/arm/xscale/ixp425/ixp425var.h ============================================================================== --- projects/binutils-2.17/sys/arm/xscale/ixp425/ixp425var.h Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/arm/xscale/ixp425/ixp425var.h Tue Nov 16 10:33:41 2010 (r215396) @@ -93,6 +93,9 @@ struct ixppcib_softc { bus_space_write_4(sc->sc_iot, sc->sc_gpio_ioh, reg, data) #define GPIO_CONF_READ_4(sc, reg) \ bus_space_read_4(sc->sc_iot, sc->sc_gpio_ioh, reg) +#define IXP4XX_GPIO_LOCK() mtx_lock(&ixp425_gpio_mtx) +#define IXP4XX_GPIO_UNLOCK() mtx_unlock(&ixp425_gpio_mtx) +extern struct mtx ixp425_gpio_mtx; extern struct bus_space ixp425_bs_tag; extern struct bus_space ixp425_a4x_bs_tag; Modified: projects/binutils-2.17/sys/boot/arm/uboot/ldscript.arm ============================================================================== --- projects/binutils-2.17/sys/boot/arm/uboot/ldscript.arm Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/boot/arm/uboot/ldscript.arm Tue Nov 16 10:33:41 2010 (r215396) @@ -1,6 +1,5 @@ /* $FreeBSD$ */ -OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) SECTIONS Modified: projects/binutils-2.17/sys/boot/forth/beastie.4th ============================================================================== --- projects/binutils-2.17/sys/boot/forth/beastie.4th Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/boot/forth/beastie.4th Tue Nov 16 10:33:41 2010 (r215396) @@ -140,12 +140,16 @@ at-xy ." `--{__________) " fbsdbw-logo ; -: acpienabled? ( -- flag ) +: acpipresent? ( -- flag ) s" hint.acpi.0.rsdp" getenv dup -1 = if drop false exit then 2drop + true +; + +: acpienabled? ( -- flag ) s" hint.acpi.0.disabled" getenv dup -1 <> if s" 0" compare 0<> if @@ -180,11 +184,18 @@ at-xy ." `--{__________) " printmenuitem ." Boot FreeBSD [default]" bootkey ! s" arch-i386" environment? if drop - printmenuitem ." Boot FreeBSD with ACPI " bootacpikey ! - acpienabled? if - ." disabled" + acpipresent? if + printmenuitem ." Boot FreeBSD with ACPI " bootacpikey ! + acpienabled? if + ." disabled" + else + ." enabled" + then else - ." enabled" + menuidx @ + 1+ dup + menuidx ! + -2 bootacpikey ! then else -2 bootacpikey ! Modified: projects/binutils-2.17/sys/compat/linsysfs/linsysfs.c ============================================================================== --- projects/binutils-2.17/sys/compat/linsysfs/linsysfs.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/compat/linsysfs/linsysfs.c Tue Nov 16 10:33:41 2010 (r215396) @@ -182,8 +182,8 @@ linsysfs_run_bus(device_t dev, struct pf sprintf(host, "host%d", host_number++); strcat(new_path, "/"); strcat(new_path, host); - sub_dir = pfs_create_dir(dir, - host, NULL, NULL, NULL, 0); + pfs_create_dir(dir, host, + NULL, NULL, NULL, 0); scsi_host = malloc(sizeof( struct scsi_host_queue), M_DEVBUF, M_NOWAIT); Modified: projects/binutils-2.17/sys/compat/linux/linux_futex.c ============================================================================== --- projects/binutils-2.17/sys/compat/linux/linux_futex.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/compat/linux/linux_futex.c Tue Nov 16 10:33:41 2010 (r215396) @@ -416,7 +416,7 @@ futex_atomic_op(struct thread *td, int e int linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args) { - int op_ret, val, ret, nrwake; + int clockrt, nrwake, op_ret, ret, val; struct linux_emuldata *em; struct waiting_proc *wp; struct futex *f, *f2 = NULL; @@ -429,7 +429,19 @@ linux_sys_futex(struct thread *td, struc * in most cases (ie. when futexes are not shared on file descriptor * or between different processes.). */ - args->op = (args->op & ~LINUX_FUTEX_PRIVATE_FLAG); + args->op = args->op & ~LINUX_FUTEX_PRIVATE_FLAG; + + /* + * Currently support for switching between CLOCK_MONOTONIC and + * CLOCK_REALTIME is not present. However Linux forbids the use of + * FUTEX_CLOCK_REALTIME with any op except FUTEX_WAIT_BITSET and + * FUTEX_WAIT_REQUEUE_PI. + */ + clockrt = args->op & LINUX_FUTEX_CLOCK_REALTIME; + args->op = args->op & ~LINUX_FUTEX_CLOCK_REALTIME; + if (clockrt && args->op != LINUX_FUTEX_WAIT_BITSET && + args->op != LINUX_FUTEX_WAIT_REQUEUE_PI) + return (ENOSYS); switch (args->op) { case LINUX_FUTEX_WAIT: @@ -612,14 +624,23 @@ linux_sys_futex(struct thread *td, struc case LINUX_FUTEX_LOCK_PI: /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op LINUX_FUTEX_LOCK_PI not implemented.\n"); return (ENOSYS); case LINUX_FUTEX_UNLOCK_PI: /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op LINUX_FUTEX_UNLOCK_PI not implemented.\n"); return (ENOSYS); case LINUX_FUTEX_TRYLOCK_PI: /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op LINUX_FUTEX_TRYLOCK_PI not implemented.\n"); return (ENOSYS); case LINUX_FUTEX_REQUEUE: @@ -632,15 +653,30 @@ linux_sys_futex(struct thread *td, struc */ em = em_find(td->td_proc, EMUL_DONTLOCK); if (em->used_requeue == 0) { - printf("linux(%s (%d)) sys_futex: " - "unsupported futex_requeue op\n", - td->td_proc->p_comm, td->td_proc->p_pid); - em->used_requeue = 1; + linux_msg(td, + "linux_sys_futex: " + "unsupported futex_requeue op\n"); + em->used_requeue = 1; } return (EINVAL); + case LINUX_FUTEX_WAIT_BITSET: + /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op FUTEX_WAIT_BITSET not implemented.\n"); + return (ENOSYS); + + case LINUX_FUTEX_WAIT_REQUEUE_PI: + /* not yet implemented */ + linux_msg(td, + "linux_sys_futex: " + "op FUTEX_WAIT_REQUEUE_PI not implemented.\n"); + return (ENOSYS); + default: - printf("linux_sys_futex: unknown op %d\n", args->op); + linux_msg(td, + "linux_sys_futex: unknown op %d\n", args->op); return (ENOSYS); } @@ -665,7 +701,7 @@ linux_set_robust_list(struct thread *td, em->robust_futexes = args->head; EMUL_UNLOCK(&emul_lock); - return (0); + return (0); } int @@ -683,7 +719,7 @@ linux_get_robust_list(struct thread *td, if (!args->pid) { em = em_find(td->td_proc, EMUL_DONTLOCK); - head = em->robust_futexes; + head = em->robust_futexes; } else { struct proc *p; @@ -693,14 +729,14 @@ linux_get_robust_list(struct thread *td, em = em_find(p, EMUL_DONTLOCK); /* XXX: ptrace? */ - if (priv_check(td, PRIV_CRED_SETUID) || + if (priv_check(td, PRIV_CRED_SETUID) || priv_check(td, PRIV_CRED_SETEUID) || p_candebug(td, p)) { PROC_UNLOCK(p); return (EPERM); } head = em->robust_futexes; - + PROC_UNLOCK(p); } Modified: projects/binutils-2.17/sys/compat/linux/linux_futex.h ============================================================================== --- projects/binutils-2.17/sys/compat/linux/linux_futex.h Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/compat/linux/linux_futex.h Tue Nov 16 10:33:41 2010 (r215396) @@ -39,17 +39,20 @@ extern LIST_HEAD(futex_list, futex) futex_list; extern struct mtx futex_mtx; -#define LINUX_FUTEX_WAIT 0 -#define LINUX_FUTEX_WAKE 1 -#define LINUX_FUTEX_FD 2 /* unused */ -#define LINUX_FUTEX_REQUEUE 3 -#define LINUX_FUTEX_CMP_REQUEUE 4 -#define LINUX_FUTEX_WAKE_OP 5 -#define LINUX_FUTEX_LOCK_PI 6 -#define LINUX_FUTEX_UNLOCK_PI 7 -#define LINUX_FUTEX_TRYLOCK_PI 8 +#define LINUX_FUTEX_WAIT 0 +#define LINUX_FUTEX_WAKE 1 +#define LINUX_FUTEX_FD 2 /* unused */ +#define LINUX_FUTEX_REQUEUE 3 +#define LINUX_FUTEX_CMP_REQUEUE 4 +#define LINUX_FUTEX_WAKE_OP 5 +#define LINUX_FUTEX_LOCK_PI 6 +#define LINUX_FUTEX_UNLOCK_PI 7 +#define LINUX_FUTEX_TRYLOCK_PI 8 +#define LINUX_FUTEX_WAIT_BITSET 9 +#define LINUX_FUTEX_WAIT_REQUEUE_PI 11 #define LINUX_FUTEX_PRIVATE_FLAG 128 +#define LINUX_FUTEX_CLOCK_REALTIME 256 #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ #define FUTEX_OP_ADD 1 /* *(int *)UADDR2 += OPARG; */ Modified: projects/binutils-2.17/sys/dev/drm/drmP.h ============================================================================== --- projects/binutils-2.17/sys/dev/drm/drmP.h Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/dev/drm/drmP.h Tue Nov 16 10:33:41 2010 (r215396) @@ -80,7 +80,9 @@ struct drm_file; #include #include #include +#if defined(__i386__) || defined(__amd64__) #include +#endif #include #include #include @@ -246,20 +248,20 @@ typedef u_int8_t u8; *(volatile u_int8_t *)(((vm_offset_t)(map)->virtual) + \ (vm_offset_t)(offset)) #define DRM_READ16(map, offset) \ - *(volatile u_int16_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) + le16toh(*(volatile u_int16_t *)(((vm_offset_t)(map)->virtual) + \ + (vm_offset_t)(offset))) #define DRM_READ32(map, offset) \ - *(volatile u_int32_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) + le32toh(*(volatile u_int32_t *)(((vm_offset_t)(map)->virtual) + \ + (vm_offset_t)(offset))) #define DRM_WRITE8(map, offset, val) \ *(volatile u_int8_t *)(((vm_offset_t)(map)->virtual) + \ (vm_offset_t)(offset)) = val #define DRM_WRITE16(map, offset, val) \ *(volatile u_int16_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) = val + (vm_offset_t)(offset)) = htole16(val) #define DRM_WRITE32(map, offset, val) \ *(volatile u_int32_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) = val + (vm_offset_t)(offset)) = htole32(val) #define DRM_VERIFYAREA_READ( uaddr, size ) \ (!useracc(__DECONST(caddr_t, uaddr), size, VM_PROT_READ)) Modified: projects/binutils-2.17/sys/dev/drm/drm_agpsupport.c ============================================================================== --- projects/binutils-2.17/sys/dev/drm/drm_agpsupport.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/dev/drm/drm_agpsupport.c Tue Nov 16 10:33:41 2010 (r215396) @@ -318,7 +318,7 @@ int drm_agp_bind(struct drm_device *dev, if (!dev->agp || !dev->agp->acquired) return EINVAL; - DRM_DEBUG("agp_bind, page_size=%x\n", PAGE_SIZE); + DRM_DEBUG("agp_bind, page_size=%x\n", (int)PAGE_SIZE); entry = drm_agp_lookup_entry(dev, (void *)request->handle); if (entry == NULL || entry->bound) Modified: projects/binutils-2.17/sys/dev/drm/drm_drv.c ============================================================================== --- projects/binutils-2.17/sys/dev/drm/drm_drv.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/dev/drm/drm_drv.c Tue Nov 16 10:33:41 2010 (r215396) @@ -478,7 +478,7 @@ static int drm_load(struct drm_device *d retcode = ENOMEM; goto error; } - if (dev->agp != NULL) { + if (dev->agp != NULL && dev->agp->info.ai_aperture_base != 0) { if (drm_mtrr_add(dev->agp->info.ai_aperture_base, dev->agp->info.ai_aperture_size, DRM_MTRR_WC) == 0) dev->agp->mtrr = 1; Modified: projects/binutils-2.17/sys/dev/drm/drm_memory.c ============================================================================== --- projects/binutils-2.17/sys/dev/drm/drm_memory.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/dev/drm/drm_memory.c Tue Nov 16 10:33:41 2010 (r215396) @@ -73,7 +73,7 @@ void drm_mem_uninit(void) void *drm_ioremap_wc(struct drm_device *dev, drm_local_map_t *map) { - return pmap_mapdev_attr(map->offset, map->size, PAT_WRITE_COMBINING); + return pmap_mapdev_attr(map->offset, map->size, VM_MEMATTR_WRITE_COMBINING); } void *drm_ioremap(struct drm_device *dev, drm_local_map_t *map) Modified: projects/binutils-2.17/sys/dev/drm/drm_sysctl.c ============================================================================== --- projects/binutils-2.17/sys/dev/drm/drm_sysctl.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/dev/drm/drm_sysctl.c Tue Nov 16 10:33:41 2010 (r215396) @@ -259,7 +259,7 @@ static int drm_bufs_info DRM_SYSCTL_HAND *(1 << dma->bufs[i].page_order), (dma->bufs[i].seg_count * (1 << dma->bufs[i].page_order)) - * PAGE_SIZE / 1024); + * (int)PAGE_SIZE / 1024); } DRM_SYSCTL_PRINT("\n"); for (i = 0; i < dma->buf_count; i++) { Modified: projects/binutils-2.17/sys/dev/drm/radeon_cs.c ============================================================================== --- projects/binutils-2.17/sys/dev/drm/radeon_cs.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/dev/drm/radeon_cs.c Tue Nov 16 10:33:41 2010 (r215396) @@ -765,7 +765,7 @@ static int r600_cs_parse(struct drm_rade memcpy(parser->ib, ib_chunk->kdata, ib_chunk->length_dw * sizeof(uint32_t)); /* read back last byte to flush WC buffers */ - rb = readl(((vm_offset_t)parser->ib + (ib_chunk->length_dw-1) * sizeof(uint32_t))); + rb = *(volatile u_int32_t *) (((vm_offset_t)parser->ib + (ib_chunk->length_dw-1) * sizeof(uint32_t))); return 0; } Modified: projects/binutils-2.17/sys/dev/firewire/00README ============================================================================== --- projects/binutils-2.17/sys/dev/firewire/00README Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/dev/firewire/00README Tue Nov 16 10:33:41 2010 (r215396) @@ -44,10 +44,6 @@ IEEE 1394 support for FreeBSD-5.X and 4. - make install - make load - For FreeBSD-4 user: - - - ./MAKEDEV - 3. SBP-II support (sbp) - You need CAM(SCSI) support in your kernel. Modified: projects/binutils-2.17/sys/dev/mii/brgphy.c ============================================================================== --- projects/binutils-2.17/sys/dev/mii/brgphy.c Tue Nov 16 09:34:31 2010 (r215395) +++ projects/binutils-2.17/sys/dev/mii/brgphy.c Tue Nov 16 10:33:41 2010 (r215396) @@ -154,15 +154,19 @@ static int detect_hs21(struct bce_softc *bce_sc) { char *sysenv; + int found; - if (bce_sc->bce_chipid != HS21_BCM_CHIPID) - return (0); - sysenv = getenv("smbios.system.product"); - if (sysenv == NULL) - return (0); - if (strncmp(sysenv, HS21_PRODUCT_ID, strlen(HS21_PRODUCT_ID)) != 0) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Thu Nov 18 17:50:24 2010 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 8B6A81065672; Thu, 18 Nov 2010 17:50:24 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 793E68FC1D; Thu, 18 Nov 2010 17:50:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIHoOHr039926; Thu, 18 Nov 2010 17:50:24 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIHoNdW039889; Thu, 18 Nov 2010 17:50:23 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201011181750.oAIHoNdW039889@svn.freebsd.org> From: Sean Bruno Date: Thu, 18 Nov 2010 17:50: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: r215458 - in projects/sbruno_64cpus: . cddl contrib/top gnu/usr.bin/binutils gnu/usr.bin/binutils/as gnu/usr.bin/binutils/as/powerpc64-freebsd gnu/usr.bin/binutils/ld gnu/usr.bin/binuti... 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: Thu, 18 Nov 2010 17:50:24 -0000 Author: sbruno Date: Thu Nov 18 17:50:23 2010 New Revision: 215458 URL: http://svn.freebsd.org/changeset/base/215458 Log: Merge to HEAD. Building my own release for testing. Deleted: projects/sbruno_64cpus/gnu/usr.bin/binutils/as/powerpc64-freebsd/ projects/sbruno_64cpus/gnu/usr.bin/binutils/libopcodes/Makefile.powerpc64 projects/sbruno_64cpus/lib/libautofs/ projects/sbruno_64cpus/sbin/mount_autofs/ Modified: projects/sbruno_64cpus/Makefile.inc1 projects/sbruno_64cpus/cddl/Makefile.inc projects/sbruno_64cpus/gnu/usr.bin/binutils/Makefile.inc0 projects/sbruno_64cpus/gnu/usr.bin/binutils/as/Makefile projects/sbruno_64cpus/gnu/usr.bin/binutils/ld/Makefile.amd64 projects/sbruno_64cpus/gnu/usr.bin/binutils/libbfd/Makefile projects/sbruno_64cpus/gnu/usr.bin/cc/cc_tools/Makefile projects/sbruno_64cpus/lib/libusb/libusb.3 projects/sbruno_64cpus/share/mk/Makefile projects/sbruno_64cpus/share/mk/bsd.crunchgen.mk projects/sbruno_64cpus/sys/amd64/amd64/amd64_mem.c projects/sbruno_64cpus/sys/boot/arm/uboot/ldscript.arm projects/sbruno_64cpus/sys/boot/forth/beastie.4th projects/sbruno_64cpus/sys/boot/ofw/libofw/ofw_copy.c projects/sbruno_64cpus/sys/boot/ofw/libofw/ofw_net.c projects/sbruno_64cpus/sys/boot/ofw/libofw/openfirm.c projects/sbruno_64cpus/sys/boot/ofw/libofw/openfirm.h projects/sbruno_64cpus/sys/boot/powerpc/ofw/start.c projects/sbruno_64cpus/sys/cam/ata/ata_xpt.c projects/sbruno_64cpus/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/sbruno_64cpus/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c projects/sbruno_64cpus/sys/compat/linsysfs/linsysfs.c projects/sbruno_64cpus/sys/compat/ndis/ntoskrnl_var.h projects/sbruno_64cpus/sys/compat/ndis/subr_ntoskrnl.c projects/sbruno_64cpus/sys/crypto/aesni/aesni_wrap.c projects/sbruno_64cpus/sys/dev/ata/ata-pci.h projects/sbruno_64cpus/sys/dev/ata/ata-sata.c projects/sbruno_64cpus/sys/dev/ata/chipsets/ata-via.c projects/sbruno_64cpus/sys/dev/drm/drmP.h projects/sbruno_64cpus/sys/dev/drm/drm_agpsupport.c projects/sbruno_64cpus/sys/dev/drm/drm_drv.c projects/sbruno_64cpus/sys/dev/drm/drm_memory.c projects/sbruno_64cpus/sys/dev/drm/drm_sysctl.c projects/sbruno_64cpus/sys/dev/drm/radeon_cs.c projects/sbruno_64cpus/sys/dev/mii/brgphy.c projects/sbruno_64cpus/sys/dev/mii/mii.c projects/sbruno_64cpus/sys/dev/nfe/if_nfe.c projects/sbruno_64cpus/sys/i386/i386/i686_mem.c projects/sbruno_64cpus/sys/kern/kern_rmlock.c projects/sbruno_64cpus/sys/kern/subr_bus.c projects/sbruno_64cpus/sys/netinet/cc.h projects/sbruno_64cpus/sys/netinet/cc/cc.c projects/sbruno_64cpus/sys/netinet/sctp.h projects/sbruno_64cpus/sys/netinet/sctp_uio.h projects/sbruno_64cpus/sys/netinet/sctp_usrreq.c projects/sbruno_64cpus/sys/netinet/tcp.h projects/sbruno_64cpus/sys/netinet/tcp_output.c projects/sbruno_64cpus/sys/netinet/tcp_reass.c projects/sbruno_64cpus/sys/netinet/tcp_subr.c projects/sbruno_64cpus/sys/netinet/tcp_usrreq.c projects/sbruno_64cpus/sys/netinet/tcp_var.h projects/sbruno_64cpus/sys/netinet6/nd6.c projects/sbruno_64cpus/sys/sparc64/pci/psycho.c projects/sbruno_64cpus/sys/sparc64/pci/schizo.c projects/sbruno_64cpus/sys/sys/bus.h projects/sbruno_64cpus/sys/x86/cpufreq/hwpstate.c projects/sbruno_64cpus/tools/tools/mctest/mctest.cc projects/sbruno_64cpus/usr.bin/netstat/inet.c projects/sbruno_64cpus/usr.bin/netstat/main.c projects/sbruno_64cpus/usr.bin/netstat/netstat.1 projects/sbruno_64cpus/usr.bin/netstat/netstat.h projects/sbruno_64cpus/usr.sbin/iostat/iostat.8 projects/sbruno_64cpus/usr.sbin/iostat/iostat.c Directory Properties: projects/sbruno_64cpus/ (props changed) projects/sbruno_64cpus/cddl/contrib/opensolaris/ (props changed) projects/sbruno_64cpus/contrib/bind9/ (props changed) projects/sbruno_64cpus/contrib/binutils/ (props changed) projects/sbruno_64cpus/contrib/bzip2/ (props changed) projects/sbruno_64cpus/contrib/ee/ (props changed) projects/sbruno_64cpus/contrib/expat/ (props changed) projects/sbruno_64cpus/contrib/file/ (props changed) projects/sbruno_64cpus/contrib/gdb/ (props changed) projects/sbruno_64cpus/contrib/gdtoa/ (props changed) projects/sbruno_64cpus/contrib/gnu-sort/ (props changed) projects/sbruno_64cpus/contrib/groff/ (props changed) projects/sbruno_64cpus/contrib/less/ (props changed) projects/sbruno_64cpus/contrib/libpcap/ (props changed) projects/sbruno_64cpus/contrib/llvm/ (props changed) projects/sbruno_64cpus/contrib/llvm/tools/clang/ (props changed) projects/sbruno_64cpus/contrib/ncurses/ (props changed) projects/sbruno_64cpus/contrib/netcat/ (props changed) projects/sbruno_64cpus/contrib/ntp/ (props changed) projects/sbruno_64cpus/contrib/one-true-awk/ (props changed) projects/sbruno_64cpus/contrib/openbsm/ (props changed) projects/sbruno_64cpus/contrib/openpam/ (props changed) projects/sbruno_64cpus/contrib/pf/ (props changed) projects/sbruno_64cpus/contrib/sendmail/ (props changed) projects/sbruno_64cpus/contrib/tcpdump/ (props changed) projects/sbruno_64cpus/contrib/tcsh/ (props changed) projects/sbruno_64cpus/contrib/top/ (props changed) projects/sbruno_64cpus/contrib/top/install-sh (props changed) projects/sbruno_64cpus/contrib/tzcode/stdtime/ (props changed) projects/sbruno_64cpus/contrib/tzcode/zic/ (props changed) projects/sbruno_64cpus/contrib/tzdata/ (props changed) projects/sbruno_64cpus/contrib/wpa/ (props changed) projects/sbruno_64cpus/contrib/xz/ (props changed) projects/sbruno_64cpus/crypto/openssh/ (props changed) projects/sbruno_64cpus/crypto/openssl/ (props changed) projects/sbruno_64cpus/lib/libc/ (props changed) projects/sbruno_64cpus/lib/libc/stdtime/ (props changed) projects/sbruno_64cpus/lib/libutil/ (props changed) projects/sbruno_64cpus/lib/libz/ (props changed) projects/sbruno_64cpus/sbin/ (props changed) projects/sbruno_64cpus/sbin/ipfw/ (props changed) projects/sbruno_64cpus/share/mk/bsd.arch.inc.mk (props changed) projects/sbruno_64cpus/share/zoneinfo/ (props changed) projects/sbruno_64cpus/sys/ (props changed) projects/sbruno_64cpus/sys/amd64/include/xen/ (props changed) projects/sbruno_64cpus/sys/cddl/contrib/opensolaris/ (props changed) projects/sbruno_64cpus/sys/contrib/dev/acpica/ (props changed) projects/sbruno_64cpus/sys/contrib/pf/ (props changed) projects/sbruno_64cpus/sys/contrib/x86emu/ (props changed) projects/sbruno_64cpus/sys/dev/xen/xenpci/ (props changed) projects/sbruno_64cpus/usr.bin/calendar/ (props changed) projects/sbruno_64cpus/usr.bin/csup/ (props changed) projects/sbruno_64cpus/usr.bin/procstat/ (props changed) projects/sbruno_64cpus/usr.sbin/zic/ (props changed) Modified: projects/sbruno_64cpus/Makefile.inc1 ============================================================================== --- projects/sbruno_64cpus/Makefile.inc1 Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/Makefile.inc1 Thu Nov 18 17:50:23 2010 (r215458) @@ -322,7 +322,7 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ - -DWITHOUT_HTML -DNO_CTF DESTDIR=${LIB32TMP} + -DWITHOUT_HTML -DNO_CTF -DNO_LINT DESTDIR=${LIB32TMP} LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS .endif Modified: projects/sbruno_64cpus/cddl/Makefile.inc ============================================================================== --- projects/sbruno_64cpus/cddl/Makefile.inc Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/cddl/Makefile.inc Thu Nov 18 17:50:23 2010 (r215458) @@ -9,3 +9,8 @@ CFLAGS+= -DNEED_SOLARIS_BOOLEAN WARNS?= 6 CSTD?= gnu89 + +# Do not lint the CDDL stuff. It is all externally maintained and +# lint output is wasteful noise here. + +NO_LINT= Modified: projects/sbruno_64cpus/gnu/usr.bin/binutils/Makefile.inc0 ============================================================================== --- projects/sbruno_64cpus/gnu/usr.bin/binutils/Makefile.inc0 Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/gnu/usr.bin/binutils/Makefile.inc0 Thu Nov 18 17:50:23 2010 (r215458) @@ -36,28 +36,15 @@ CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 .endif CFLAGS+= -I. -.if exists(${.CURDIR}/${TARGET_CPUARCH}) -CFLAGS+= -I${.CURDIR}/${TARGET_CPUARCH} -.endif CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd CFLAGS+= -I${SRCDIR}/include -.if exists(${.CURDIR}/${TARGET_CPUARCH}) -.PATH: ${.CURDIR}/${TARGET_CPUARCH} -.endif - ARCHS= ${TARGET_CPUARCH} -.for _arch in ${CROSS_ARCH} -.if (${ARCHS:R:M${_arch:R}} == "") -ARCHS+= $(_arch) -.endif -.endfor - -.for _arch in ${ARCHS} -.if exists(${.CURDIR}/Makefile.${_arch}) -.include "${.CURDIR}/Makefile.${_arch}" +.if exists(${.CURDIR}/Makefile.${TARGET_ARCH}) +.include "${.CURDIR}/Makefile.${TARGET_ARCH}" +.elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH}) +.include "${.CURDIR}/Makefile.${TARGET_CPUARCH}" .endif -.endfor Modified: projects/sbruno_64cpus/gnu/usr.bin/binutils/as/Makefile ============================================================================== --- projects/sbruno_64cpus/gnu/usr.bin/binutils/as/Makefile Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/gnu/usr.bin/binutils/as/Makefile Thu Nov 18 17:50:23 2010 (r215458) @@ -26,7 +26,7 @@ SRCS+= itbl-ops.c itbl-parse.y itbl-lex. .if ${TARGET_ARCH} == "amd64" SRCS+= tc-i386.c -.elif ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64" +.elif ${TARGET_CPUARCH} == "powerpc" SRCS+= tc-ppc.c .elif ${TARGET_ARCH} == "sparc64" # change back to tc-sparc.c when new binutils is imported Modified: projects/sbruno_64cpus/gnu/usr.bin/binutils/ld/Makefile.amd64 ============================================================================== --- projects/sbruno_64cpus/gnu/usr.bin/binutils/ld/Makefile.amd64 Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/gnu/usr.bin/binutils/ld/Makefile.amd64 Thu Nov 18 17:50:23 2010 (r215458) @@ -12,7 +12,7 @@ e${NATIVE_EMULATION}.c: emulparams/${NAT ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} X86_EMULATION= elf_i386_fbsd -_i386_path= \"${TOOLS_PREFIX}/usr/lib/i386\" +_i386_path= \"${TOOLS_PREFIX}/usr/lib32\" EMS+= ${X86_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${X86_EMULATION}.${ext} Modified: projects/sbruno_64cpus/gnu/usr.bin/binutils/libbfd/Makefile ============================================================================== --- projects/sbruno_64cpus/gnu/usr.bin/binutils/libbfd/Makefile Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/gnu/usr.bin/binutils/libbfd/Makefile Thu Nov 18 17:50:23 2010 (r215458) @@ -24,8 +24,6 @@ SELARCH= SELARCH= &bfd_i386_arch .elif ${TARGET_ARCH} == "sparc64" SELARCH= &bfd_sparc_arch -.elif ${TARGET_ARCH} == "powerpc64" -SELARCH= &bfd_powerpc_arch,&bfd_rs6000_arch .else .for _a in ${ARCHS} .if ${SELARCH} == "" Modified: projects/sbruno_64cpus/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- projects/sbruno_64cpus/gnu/usr.bin/cc/cc_tools/Makefile Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/gnu/usr.bin/cc/cc_tools/Makefile Thu Nov 18 17:50:23 2010 (r215458) @@ -307,7 +307,7 @@ GENSRCS+= gcov-iov.h # Multilib config file multilib.h: -.if ${TARGET_ARCH} == "powerpc64" +.if ${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH} == "amd64" echo 'static const char *const multilib_raw[] = { \ ". !m64 !m32;", \ "64:../lib m64 !m32;", \ Modified: projects/sbruno_64cpus/lib/libusb/libusb.3 ============================================================================== --- projects/sbruno_64cpus/lib/libusb/libusb.3 Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/lib/libusb/libusb.3 Thu Nov 18 17:50:23 2010 (r215458) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2010 +.Dd November 18, 2010 .Dt LIBUSB 3 .Os .Sh NAME @@ -380,10 +380,15 @@ LIBUSB_ERROR code on failure. .Pp .Ft int .Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint8_t bRequest" "uint16_t wValue" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" -Perform a USB control transfer. Returns 0 on success, LIBUSB_ERROR_TIMEOUT -if the transfer timeout, LIBUSB_ERROR_PIPE if the control request was not -supported, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and -LIBUSB_ERROR code on other failure. +Perform a USB control transfer. Returns the actual number of bytes +transferred on success in the range from and including zero until and +including +.Xa wLength . +On error a libusb error code is returned, for example +LIBUSB_ERROR_TIMEOUT if the transfer timeout, LIBUSB_ERROR_PIPE if the +control request was not supported, LIBUSB_ERROR_NO_DEVICE if the +device has been disconnected or another LIBUSB_ERROR code on other failures. +The libusb error codes are always negative. . .Pp .Ft int Modified: projects/sbruno_64cpus/share/mk/Makefile ============================================================================== --- projects/sbruno_64cpus/share/mk/Makefile Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/share/mk/Makefile Thu Nov 18 17:50:23 2010 (r215458) @@ -5,7 +5,7 @@ FILES= bsd.README FILES+= bsd.arch.inc.mk FILES+= bsd.compat.mk bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.dtrace.mk FILES+= bsd.endian.mk -FILES+= bsd.files.mk bsd.incs.mk bsd.info.mk bsd.init.mk +FILES+= bsd.files.mk bsd.crunchgen.mk bsd.incs.mk bsd.info.mk bsd.init.mk FILES+= bsd.kmod.mk FILES+= bsd.lib.mk bsd.libnames.mk bsd.links.mk bsd.man.mk bsd.nls.mk FILES+= bsd.obj.mk bsd.own.mk Modified: projects/sbruno_64cpus/share/mk/bsd.crunchgen.mk ============================================================================== --- projects/sbruno_64cpus/share/mk/bsd.crunchgen.mk Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/share/mk/bsd.crunchgen.mk Thu Nov 18 17:50:23 2010 (r215458) @@ -51,17 +51,14 @@ $(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefi .else $(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile .endif -# Disable building links for bsdbox - whatever is installing the binaries into -# the embedded system should (for now) do the linking there. This may change -# in the future. -adrian -#.ifndef CRUNCH_SUPPRESS_LINK_${P} -#LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P) -#.endif -#.for A in $(CRUNCH_ALIAS_$(P)) -#.ifndef CRUNCH_SUPPRESS_LINK_${A} -#LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A) -#.endif -#.endfor +.ifndef CRUNCH_SUPPRESS_LINK_${P} +LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P) +.endif +.for A in $(CRUNCH_ALIAS_$(P)) +.ifndef CRUNCH_SUPPRESS_LINK_${A} +LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A) +.endif +.endfor .endfor .endfor Modified: projects/sbruno_64cpus/sys/amd64/amd64/amd64_mem.c ============================================================================== --- projects/sbruno_64cpus/sys/amd64/amd64/amd64_mem.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/amd64/amd64/amd64_mem.c Thu Nov 18 17:50:23 2010 (r215458) @@ -307,20 +307,21 @@ amd64_mrstoreone(void *arg) struct mem_range_desc *mrd; u_int64_t omsrv, msrv; int i, j, msr; - u_int cr4save; + u_long cr0, cr4; mrd = sc->mr_desc; /* Disable PGE. */ - cr4save = rcr4(); - if (cr4save & CR4_PGE) - load_cr4(cr4save & ~CR4_PGE); + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); /* Disable caches (CD = 1, NW = 0). */ - load_cr0((rcr0() & ~CR0_NW) | CR0_CD); + cr0 = rcr0(); + load_cr0((cr0 & ~CR0_NW) | CR0_CD); /* Flushes caches and TLBs. */ wbinvd(); + invltlb(); /* Disable MTRRs (E = 0). */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) & ~MTRR_DEF_ENABLE); @@ -388,17 +389,16 @@ amd64_mrstoreone(void *arg) wrmsr(msr + 1, msrv); } - /* Flush caches, TLBs. */ + /* Flush caches and TLBs. */ wbinvd(); + invltlb(); /* Enable MTRRs. */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) | MTRR_DEF_ENABLE); - /* Enable caches (CD = 0, NW = 0). */ - load_cr0(rcr0() & ~(CR0_CD | CR0_NW)); - - /* Restore PGE. */ - load_cr4(cr4save); + /* Restore caches and PGE. */ + load_cr0(cr0); + load_cr4(cr4); } /* Modified: projects/sbruno_64cpus/sys/boot/arm/uboot/ldscript.arm ============================================================================== --- projects/sbruno_64cpus/sys/boot/arm/uboot/ldscript.arm Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/boot/arm/uboot/ldscript.arm Thu Nov 18 17:50:23 2010 (r215458) @@ -1,6 +1,5 @@ /* $FreeBSD$ */ -OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) SECTIONS Modified: projects/sbruno_64cpus/sys/boot/forth/beastie.4th ============================================================================== --- projects/sbruno_64cpus/sys/boot/forth/beastie.4th Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/boot/forth/beastie.4th Thu Nov 18 17:50:23 2010 (r215458) @@ -140,12 +140,16 @@ at-xy ." `--{__________) " fbsdbw-logo ; -: acpienabled? ( -- flag ) +: acpipresent? ( -- flag ) s" hint.acpi.0.rsdp" getenv dup -1 = if drop false exit then 2drop + true +; + +: acpienabled? ( -- flag ) s" hint.acpi.0.disabled" getenv dup -1 <> if s" 0" compare 0<> if @@ -180,11 +184,18 @@ at-xy ." `--{__________) " printmenuitem ." Boot FreeBSD [default]" bootkey ! s" arch-i386" environment? if drop - printmenuitem ." Boot FreeBSD with ACPI " bootacpikey ! - acpienabled? if - ." disabled" + acpipresent? if + printmenuitem ." Boot FreeBSD with ACPI " bootacpikey ! + acpienabled? if + ." disabled" + else + ." enabled" + then else - ." enabled" + menuidx @ + 1+ dup + menuidx ! + -2 bootacpikey ! then else -2 bootacpikey ! Modified: projects/sbruno_64cpus/sys/boot/ofw/libofw/ofw_copy.c ============================================================================== --- projects/sbruno_64cpus/sys/boot/ofw/libofw/ofw_copy.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/boot/ofw/libofw/ofw_copy.c Thu Nov 18 17:50:23 2010 (r215458) @@ -91,16 +91,22 @@ ofw_mapmem(vm_offset_t dest, const size_ return (ENOMEM); } - if (OF_call_method("claim", mmu, 3, 1, destp, dlen, 0, &addr) == -1) { - printf("ofw_mapmem: virtual claim failed\n"); - return (ENOMEM); - } - - if (OF_call_method("map", mmu, 4, 0, destp, destp, dlen, 0) == -1) { - printf("ofw_mapmem: map failed\n"); - return (ENOMEM); - } + /* + * We only do virtual memory management when real_mode is false. + */ + if (real_mode == 0) { + if (OF_call_method("claim", mmu, 3, 1, destp, dlen, 0, &addr) + == -1) { + printf("ofw_mapmem: virtual claim failed\n"); + return (ENOMEM); + } + if (OF_call_method("map", mmu, 4, 0, destp, destp, dlen, 0) + == -1) { + printf("ofw_mapmem: map failed\n"); + return (ENOMEM); + } + } last_dest = (vm_offset_t) destp; last_len = dlen; Modified: projects/sbruno_64cpus/sys/boot/ofw/libofw/ofw_net.c ============================================================================== --- projects/sbruno_64cpus/sys/boot/ofw/libofw/ofw_net.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/boot/ofw/libofw/ofw_net.c Thu Nov 18 17:50:23 2010 (r215458) @@ -90,11 +90,11 @@ ofwn_probe(struct netif *nif, void *mach static int ofwn_put(struct iodesc *desc, void *pkt, size_t len) { - struct ether_header *eh; size_t sendlen; ssize_t rv; #if defined(NETIF_DEBUG) + struct ether_header *eh; printf("netif_put: desc=0x%x pkt=0x%x len=%d\n", desc, pkt, len); eh = pkt; printf("dst: %s ", ether_sprintf(eh->ether_dhost)); Modified: projects/sbruno_64cpus/sys/boot/ofw/libofw/openfirm.c ============================================================================== --- projects/sbruno_64cpus/sys/boot/ofw/libofw/openfirm.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/boot/ofw/libofw/openfirm.c Thu Nov 18 17:50:23 2010 (r215458) @@ -69,12 +69,15 @@ int (*openfirmware)(void *); phandle_t chosen; ihandle_t mmu; ihandle_t memory; +int real_mode = 0; /* Initialiser */ void OF_init(int (*openfirm)(void *)) { + phandle_t options; + char mode[8]; openfirmware = openfirm; @@ -89,6 +92,15 @@ OF_init(int (*openfirm)(void *)) } if (OF_getprop(chosen, "mmu", &mmu, sizeof(mmu)) == -1) OF_exit(); + + /* + * Check if we run in real mode. If so, we do not need to map + * memory later on. + */ + options = OF_finddevice("/options"); + OF_getprop(options, "real-mode?", mode, sizeof(mode)); + if (strncmp(mode, "true", 4) == 0) + real_mode = 1; } /* Modified: projects/sbruno_64cpus/sys/boot/ofw/libofw/openfirm.h ============================================================================== --- projects/sbruno_64cpus/sys/boot/ofw/libofw/openfirm.h Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/boot/ofw/libofw/openfirm.h Thu Nov 18 17:50:23 2010 (r215458) @@ -72,6 +72,7 @@ typedef unsigned long int cell_t; extern int (*openfirmware)(void *); extern phandle_t chosen; extern ihandle_t memory, mmu; +extern int real_mode; /* * This isn't actually an Open Firmware function, but it seemed like the right Modified: projects/sbruno_64cpus/sys/boot/powerpc/ofw/start.c ============================================================================== --- projects/sbruno_64cpus/sys/boot/powerpc/ofw/start.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/boot/powerpc/ofw/start.c Thu Nov 18 17:50:23 2010 (r215458) @@ -50,7 +50,20 @@ _start: \n\ addi %r1,%r1,stack@l \n\ addi %r1,%r1,8192 \n\ \n\ - b startup \n\ + /* Clear the .bss!!! */ \n\ + li %r0,0 \n\ + lis %r8,_edata@ha \n\ + addi %r8,%r8,_edata@l\n\ + lis %r9,_end@ha \n\ + addi %r9,%r9,_end@l \n\ + \n\ +1: cmpw 0,%r8,%r9 \n\ + bge 2f \n\ + stw %r0,0(%r8) \n\ + addi %r8,%r8,4 \n\ + b 1b \n\ + \n\ +2: b startup \n\ "); void Modified: projects/sbruno_64cpus/sys/cam/ata/ata_xpt.c ============================================================================== --- projects/sbruno_64cpus/sys/cam/ata/ata_xpt.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/cam/ata/ata_xpt.c Thu Nov 18 17:50:23 2010 (r215458) @@ -963,6 +963,8 @@ noerror: xpt_action((union ccb *)&cts); if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) caps &= cts.xport_specific.sata.caps; + else + caps = 0; /* Store result to SIM. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); @@ -1103,6 +1105,8 @@ notsata: xpt_action((union ccb *)&cts); if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) caps &= cts.xport_specific.sata.caps; + else + caps = 0; /* Store result to SIM. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); Modified: projects/sbruno_64cpus/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- projects/sbruno_64cpus/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Thu Nov 18 17:50:23 2010 (r215458) @@ -1557,7 +1557,7 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla int err; /* - * zfs_zget() can't operate on virtual entires like .zfs/ or + * zfs_zget() can't operate on virtual entries like .zfs/ or * .zfs/snapshot/ directories, that's why we return EOPNOTSUPP. * This will make NFS to switch to LOOKUP instead of using VGET. */ Modified: projects/sbruno_64cpus/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- projects/sbruno_64cpus/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Nov 18 17:50:23 2010 (r215458) @@ -67,6 +67,7 @@ #include #include #include +#include /* * Programming rules. @@ -481,7 +482,7 @@ again: uiomove_fromphys(&m, off, bytes, uio); VM_OBJECT_LOCK(obj); vm_page_wakeup(m); - } else if (m != NULL && uio->uio_segflg == UIO_NOCOPY) { + } else if (uio->uio_segflg == UIO_NOCOPY) { /* * The code below is here to make sendfile(2) work * correctly with ZFS. As pointed out by ups@ @@ -491,7 +492,7 @@ again: */ KASSERT(off == 0, ("unexpected offset in mappedread for sendfile")); - if ((m->oflags & VPO_BUSY) != 0) { + if (m != NULL && (m->oflags & VPO_BUSY) != 0) { /* * Reference the page before unlocking and * sleeping so that the page daemon is less @@ -501,8 +502,17 @@ again: vm_page_flag_set(m, PG_REFERENCED); vm_page_sleep(m, "zfsmrb"); goto again; + } else if (m == NULL) { + m = vm_page_alloc(obj, OFF_TO_IDX(start), + VM_ALLOC_NOBUSY | VM_ALLOC_NORMAL); + if (m == NULL) { + VM_OBJECT_UNLOCK(obj); + VM_WAIT; + VM_OBJECT_LOCK(obj); + goto again; + } } - vm_page_busy(m); + vm_page_io_start(m); VM_OBJECT_UNLOCK(obj); if (dirbytes > 0) { error = dmu_read_uio(os, zp->z_id, uio, @@ -520,7 +530,7 @@ again: VM_OBJECT_LOCK(obj); if (error == 0) m->valid = VM_PAGE_BITS_ALL; - vm_page_wakeup(m); + vm_page_io_finish(m); if (error == 0) { uio->uio_resid -= bytes; uio->uio_offset += bytes; Modified: projects/sbruno_64cpus/sys/compat/linsysfs/linsysfs.c ============================================================================== --- projects/sbruno_64cpus/sys/compat/linsysfs/linsysfs.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/compat/linsysfs/linsysfs.c Thu Nov 18 17:50:23 2010 (r215458) @@ -182,8 +182,8 @@ linsysfs_run_bus(device_t dev, struct pf sprintf(host, "host%d", host_number++); strcat(new_path, "/"); strcat(new_path, host); - sub_dir = pfs_create_dir(dir, - host, NULL, NULL, NULL, 0); + pfs_create_dir(dir, host, + NULL, NULL, NULL, 0); scsi_host = malloc(sizeof( struct scsi_host_queue), M_DEVBUF, M_NOWAIT); Modified: projects/sbruno_64cpus/sys/compat/ndis/ntoskrnl_var.h ============================================================================== --- projects/sbruno_64cpus/sys/compat/ndis/ntoskrnl_var.h Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/compat/ndis/ntoskrnl_var.h Thu Nov 18 17:50:23 2010 (r215458) @@ -162,6 +162,16 @@ typedef struct mdl mdl, ndis_buffer; #define WDM_MINOR_WINXP 0x20 #define WDM_MINOR_WIN2003 0x30 +enum nt_caching_type { + MmNonCached = 0, + MmCached = 1, + MmWriteCombined = 2, + MmHardwareCoherentCached = 3, + MmNonCachedUnordered = 4, + MmUSWCCached = 5, + MmMaximumCacheType = 6 +}; + /*- * The ndis_kspin_lock type is called KSPIN_LOCK in MS-Windows. * According to the Windows DDK header files, KSPIN_LOCK is defined like this: Modified: projects/sbruno_64cpus/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- projects/sbruno_64cpus/sys/compat/ndis/subr_ntoskrnl.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/compat/ndis/subr_ntoskrnl.c Thu Nov 18 17:50:23 2010 (r215458) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -197,9 +198,10 @@ static uint32_t InterlockedDecrement(vol static void ExInterlockedAddLargeStatistic(uint64_t *, uint32_t); static void *MmAllocateContiguousMemory(uint32_t, uint64_t); static void *MmAllocateContiguousMemorySpecifyCache(uint32_t, - uint64_t, uint64_t, uint64_t, uint32_t); + uint64_t, uint64_t, uint64_t, enum nt_caching_type); static void MmFreeContiguousMemory(void *); -static void MmFreeContiguousMemorySpecifyCache(void *, uint32_t, uint32_t); +static void MmFreeContiguousMemorySpecifyCache(void *, uint32_t, + enum nt_caching_type); static uint32_t MmSizeOfMdl(void *, size_t); static void *MmMapLockedPages(mdl *, uint8_t); static void *MmMapLockedPagesSpecifyCache(mdl *, @@ -2424,11 +2426,34 @@ MmAllocateContiguousMemorySpecifyCache(s uint64_t lowest; uint64_t highest; uint64_t boundary; - uint32_t cachetype; + enum nt_caching_type cachetype; { + vm_memattr_t memattr; + void *ret; - return (contigmalloc(size, M_DEVBUF, M_ZERO|M_NOWAIT, lowest, - highest, PAGE_SIZE, boundary)); + switch (cachetype) { + case MmNonCached: + memattr = VM_MEMATTR_UNCACHEABLE; + break; + case MmWriteCombined: + memattr = VM_MEMATTR_WRITE_COMBINING; + break; + case MmNonCachedUnordered: + memattr = VM_MEMATTR_UNCACHEABLE; + break; + case MmCached: + case MmHardwareCoherentCached: + case MmUSWCCached: + default: + memattr = VM_MEMATTR_DEFAULT; + break; + } + + ret = (void *)kmem_alloc_contig(kernel_map, size, M_ZERO | M_NOWAIT, + lowest, highest, PAGE_SIZE, boundary, memattr); + if (ret != NULL) + malloc_type_allocated(M_DEVBUF, round_page(size)); + return (ret); } static void @@ -2442,7 +2467,7 @@ static void MmFreeContiguousMemorySpecifyCache(base, size, cachetype) void *base; uint32_t size; - uint32_t cachetype; + enum nt_caching_type cachetype; { contigfree(base, size, M_DEVBUF); } @@ -4212,8 +4237,8 @@ image_patch_table ntoskrnl_functbl[] = { IMPORT_FFUNC(ExInterlockedAddLargeStatistic, 2), IMPORT_SFUNC(IoAllocateMdl, 5), IMPORT_SFUNC(IoFreeMdl, 1), - IMPORT_SFUNC(MmAllocateContiguousMemory, 2), - IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5), + IMPORT_SFUNC(MmAllocateContiguousMemory, 2 + 1), + IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5 + 3), IMPORT_SFUNC(MmFreeContiguousMemory, 1), IMPORT_SFUNC(MmFreeContiguousMemorySpecifyCache, 3), IMPORT_SFUNC_MAP(MmGetPhysicalAddress, pmap_kextract, 1), Modified: projects/sbruno_64cpus/sys/crypto/aesni/aesni_wrap.c ============================================================================== --- projects/sbruno_64cpus/sys/crypto/aesni/aesni_wrap.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/crypto/aesni/aesni_wrap.c Thu Nov 18 17:50:23 2010 (r215458) @@ -246,14 +246,21 @@ int aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini) { struct thread *td; - int error; + int error, saved_ctx; td = curthread; - error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); + if (!is_fpu_kern_thread(0)) { + error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); + saved_ctx = 1; + } else { + error = 0; + saved_ctx = 0; + } if (error == 0) { error = aesni_cipher_setup_common(ses, encini->cri_key, encini->cri_klen); - fpu_kern_leave(td, &ses->fpu_ctx); + if (saved_ctx) + fpu_kern_leave(td, &ses->fpu_ctx); } return (error); } @@ -264,16 +271,22 @@ aesni_cipher_process(struct aesni_sessio { struct thread *td; uint8_t *buf; - int error, allocated; + int error, allocated, saved_ctx; buf = aesni_cipher_alloc(enccrd, crp, &allocated); if (buf == NULL) return (ENOMEM); td = curthread; - error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); - if (error != 0) - goto out; + if (!is_fpu_kern_thread(0)) { + error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); + if (error != 0) + goto out; + saved_ctx = 1; + } else { + saved_ctx = 0; + error = 0; + } if ((enccrd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { error = aesni_cipher_setup_common(ses, enccrd->crd_key, @@ -311,7 +324,8 @@ aesni_cipher_process(struct aesni_sessio ses->iv); } } - fpu_kern_leave(td, &ses->fpu_ctx); + if (saved_ctx) + fpu_kern_leave(td, &ses->fpu_ctx); if (allocated) crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, enccrd->crd_len, buf); Modified: projects/sbruno_64cpus/sys/dev/ata/ata-pci.h ============================================================================== --- projects/sbruno_64cpus/sys/dev/ata/ata-pci.h Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/dev/ata/ata-pci.h Thu Nov 18 17:50:23 2010 (r215458) @@ -512,7 +512,10 @@ struct ata_pci_controller { #define ATA_VIACX700 0x83241106 #define ATA_VIASATAIDE 0x53241106 #define ATA_VIAVX800 0x83531106 +#define ATA_VIASATAIDE2 0xc4091106 #define ATA_VIAVX855 0x84091106 +#define ATA_VIASATAIDE3 0x90011106 +#define ATA_VIAVX900 0x84101106 /* global prototypes ata-pci.c */ int ata_pci_probe(device_t dev); Modified: projects/sbruno_64cpus/sys/dev/ata/ata-sata.c ============================================================================== --- projects/sbruno_64cpus/sys/dev/ata/ata-sata.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/dev/ata/ata-sata.c Thu Nov 18 17:50:23 2010 (r215458) @@ -153,8 +153,12 @@ ata_sata_phy_reset(device_t dev, int por if (quick) { if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val)) return (0); - if ((val & ATA_SC_DET_MASK) == ATA_SC_DET_IDLE) + if ((val & ATA_SC_DET_MASK) == ATA_SC_DET_IDLE) { + ata_sata_scr_write(ch, port, ATA_SCONTROL, + ATA_SC_DET_IDLE | ((ch->pm_level > 0) ? 0 : + ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER)); return ata_sata_connect(ch, port, quick); + } } if (bootverbose) { Modified: projects/sbruno_64cpus/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- projects/sbruno_64cpus/sys/dev/ata/chipsets/ata-via.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/dev/ata/chipsets/ata-via.c Thu Nov 18 17:50:23 2010 (r215458) @@ -63,6 +63,12 @@ static int ata_via_new_setmode(device_t static int ata_via_sata_ch_attach(device_t dev); static int ata_via_sata_getrev(device_t dev, int target); static int ata_via_sata_setmode(device_t dev, int target, int mode); +static void ata_via_sata_reset(device_t dev); +static int ata_via_sata_scr_read(device_t dev, int port, int reg, + u_int32_t *result); +static int ata_via_sata_scr_write(device_t dev, int port, int reg, + u_int32_t value); +static int ata_via_sata_status(device_t dev); /* misc defines */ #define VIA33 0 @@ -106,6 +112,7 @@ ata_via_probe(device_t dev) { ATA_VIACX700, 0x00, VIA133, VIASATA, ATA_SA150, "CX700" }, { ATA_VIAVX800, 0x00, VIA133, VIASATA, ATA_SA150, "VX800" }, { ATA_VIAVX855, 0x00, VIA133, 0x00, ATA_UDMA6, "VX855" }, + { ATA_VIAVX900, 0x00, VIA133, VIASATA, ATA_SA300, "VX900" }, { 0, 0, 0, 0, 0, 0 }}; static struct ata_chip_id new_ids[] = {{ ATA_VIA6410, 0x00, 0, 0x00, ATA_UDMA6, "6410" }, @@ -123,7 +130,9 @@ ata_via_probe(device_t dev) if (pci_get_devid(dev) == ATA_VIA82C571 || pci_get_devid(dev) == ATA_VIACX700IDE || - pci_get_devid(dev) == ATA_VIASATAIDE) { + pci_get_devid(dev) == ATA_VIASATAIDE || + pci_get_devid(dev) == ATA_VIASATAIDE2 || + pci_get_devid(dev) == ATA_VIASATAIDE3) { if (!(ctlr->chip = ata_find_chip(dev, ids, -99))) return ENXIO; } @@ -150,11 +159,12 @@ ata_via_chipinit(device_t dev) if (ata_ahci_chipinit(dev) != ENXIO) return (0); } - /* 2 SATA without SATA registers on first channel + 1 PATA on second */ + /* 2 SATA with "SATA registers" at PCI config space + PATA on secondary */ if (ctlr->chip->cfg2 & VIASATA) { ctlr->ch_attach = ata_via_sata_ch_attach; ctlr->setmode = ata_via_sata_setmode; ctlr->getrev = ata_via_sata_getrev; + ctlr->reset = ata_via_sata_reset; return 0; } /* Legacy SATA/SATA+PATA with SATA registers in BAR(5). */ @@ -402,18 +412,30 @@ ata_via_sata_ch_attach(device_t dev) if (ata_pci_ch_attach(dev)) return ENXIO; - if (ch->unit == 0) + if (ch->unit == 0) { + ch->hw.status = ata_via_sata_status; + ch->hw.pm_read = ata_via_sata_scr_read; + ch->hw.pm_write = ata_via_sata_scr_write; + ch->flags |= ATA_PERIODIC_POLL; ch->flags |= ATA_SATA; + ata_sata_scr_write(ch, 0, ATA_SERROR, 0xffffffff); + ata_sata_scr_write(ch, 1, ATA_SERROR, 0xffffffff); + } return (0); } static int ata_via_sata_getrev(device_t dev, int target) { + device_t parent = device_get_parent(dev); struct ata_channel *ch = device_get_softc(dev); - if (ch->unit == 0) - return (1); + if (ch->unit == 0) { + if (pci_read_config(parent, 0xa0 + target, 1) & 0x10) + return (2); + else + return (1); + } return (0); } @@ -427,5 +449,112 @@ ata_via_sata_setmode(device_t dev, int t return (ata_via_old_setmode(dev, target, mode)); } +static void +ata_via_sata_reset(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + int devs; + + if (ch->unit == 0) { + devs = ata_sata_phy_reset(dev, 0, 0); + DELAY(10000); + devs += ata_sata_phy_reset(dev, 1, 0); + } else + devs = 1; + if (devs) + ata_generic_reset(dev); + else + ch->devices = 0; +} + +static int +ata_via_sata_scr_read(device_t dev, int port, int reg, u_int32_t *result) +{ + struct ata_channel *ch; + device_t parent; + uint32_t val; + + parent = device_get_parent(dev); + ch = device_get_softc(dev); + port = (port == 1) ? 1 : 0; + switch (reg) { + case ATA_SSTATUS: + val = pci_read_config(parent, 0xa0 + port, 1); + *result = val & 0x03; + if (*result != ATA_SS_DET_NO_DEVICE) { + if (val & 0x04) + *result |= ATA_SS_IPM_PARTIAL; + else if (val & 0x08) + *result |= ATA_SS_IPM_SLUMBER; + else + *result |= ATA_SS_IPM_ACTIVE; + if (val & 0x10) + *result |= ATA_SS_SPD_GEN2; + else + *result |= ATA_SS_SPD_GEN1; + } + break; + case ATA_SERROR: + *result = pci_read_config(parent, 0xa8 + port * 4, 4); + break; + case ATA_SCONTROL: + val = pci_read_config(parent, 0xa4 + port, 1); + *result = 0; + if (val & 0x01) + *result |= ATA_SC_DET_RESET; + if (val & 0x02) + *result |= ATA_SC_DET_DISABLE; + if (val & 0x04) + *result |= ATA_SC_IPM_DIS_PARTIAL; + if (val & 0x08) + *result |= ATA_SC_IPM_DIS_SLUMBER; + break; + default: + return (EINVAL); + } + return (0); +} + +static int +ata_via_sata_scr_write(device_t dev, int port, int reg, u_int32_t value) +{ + struct ata_channel *ch; + device_t parent; + uint32_t val; + + parent = device_get_parent(dev); + ch = device_get_softc(dev); + port = (port == 1) ? 1 : 0; + switch (reg) { + case ATA_SERROR: + pci_write_config(parent, 0xa8 + port * 4, value, 4); + break; + case ATA_SCONTROL: + val = 0; + if (value & ATA_SC_DET_RESET) + val |= 0x01; + if (value & ATA_SC_DET_DISABLE) + val |= 0x02; + if (value & ATA_SC_IPM_DIS_PARTIAL) + val |= 0x04; + if (value & ATA_SC_IPM_DIS_SLUMBER) + val |= 0x08; + pci_write_config(parent, 0xa4 + port, val, 1); + break; + default: + return (EINVAL); + } + return (0); +} + +static int +ata_via_sata_status(device_t dev) +{ + + ata_sata_phy_check_events(dev, 0); + ata_sata_phy_check_events(dev, 1); + return (ata_pci_status(dev)); +} + ATA_DECLARE_DRIVER(ata_via); MODULE_DEPEND(ata_via, ata_ahci, 1, 1, 1); Modified: projects/sbruno_64cpus/sys/dev/drm/drmP.h ============================================================================== --- projects/sbruno_64cpus/sys/dev/drm/drmP.h Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/dev/drm/drmP.h Thu Nov 18 17:50:23 2010 (r215458) @@ -80,7 +80,9 @@ struct drm_file; #include #include #include +#if defined(__i386__) || defined(__amd64__) #include +#endif #include #include #include @@ -246,20 +248,20 @@ typedef u_int8_t u8; *(volatile u_int8_t *)(((vm_offset_t)(map)->virtual) + \ (vm_offset_t)(offset)) #define DRM_READ16(map, offset) \ - *(volatile u_int16_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) + le16toh(*(volatile u_int16_t *)(((vm_offset_t)(map)->virtual) + \ + (vm_offset_t)(offset))) #define DRM_READ32(map, offset) \ - *(volatile u_int32_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) + le32toh(*(volatile u_int32_t *)(((vm_offset_t)(map)->virtual) + \ + (vm_offset_t)(offset))) #define DRM_WRITE8(map, offset, val) \ *(volatile u_int8_t *)(((vm_offset_t)(map)->virtual) + \ (vm_offset_t)(offset)) = val #define DRM_WRITE16(map, offset, val) \ *(volatile u_int16_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) = val + (vm_offset_t)(offset)) = htole16(val) #define DRM_WRITE32(map, offset, val) \ *(volatile u_int32_t *)(((vm_offset_t)(map)->virtual) + \ - (vm_offset_t)(offset)) = val + (vm_offset_t)(offset)) = htole32(val) #define DRM_VERIFYAREA_READ( uaddr, size ) \ (!useracc(__DECONST(caddr_t, uaddr), size, VM_PROT_READ)) Modified: projects/sbruno_64cpus/sys/dev/drm/drm_agpsupport.c ============================================================================== --- projects/sbruno_64cpus/sys/dev/drm/drm_agpsupport.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/dev/drm/drm_agpsupport.c Thu Nov 18 17:50:23 2010 (r215458) @@ -318,7 +318,7 @@ int drm_agp_bind(struct drm_device *dev, if (!dev->agp || !dev->agp->acquired) return EINVAL; - DRM_DEBUG("agp_bind, page_size=%x\n", PAGE_SIZE); + DRM_DEBUG("agp_bind, page_size=%x\n", (int)PAGE_SIZE); entry = drm_agp_lookup_entry(dev, (void *)request->handle); if (entry == NULL || entry->bound) Modified: projects/sbruno_64cpus/sys/dev/drm/drm_drv.c ============================================================================== --- projects/sbruno_64cpus/sys/dev/drm/drm_drv.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/dev/drm/drm_drv.c Thu Nov 18 17:50:23 2010 (r215458) @@ -478,7 +478,7 @@ static int drm_load(struct drm_device *d retcode = ENOMEM; goto error; } - if (dev->agp != NULL) { + if (dev->agp != NULL && dev->agp->info.ai_aperture_base != 0) { if (drm_mtrr_add(dev->agp->info.ai_aperture_base, dev->agp->info.ai_aperture_size, DRM_MTRR_WC) == 0) dev->agp->mtrr = 1; Modified: projects/sbruno_64cpus/sys/dev/drm/drm_memory.c ============================================================================== --- projects/sbruno_64cpus/sys/dev/drm/drm_memory.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/dev/drm/drm_memory.c Thu Nov 18 17:50:23 2010 (r215458) @@ -73,7 +73,7 @@ void drm_mem_uninit(void) void *drm_ioremap_wc(struct drm_device *dev, drm_local_map_t *map) { - return pmap_mapdev_attr(map->offset, map->size, PAT_WRITE_COMBINING); + return pmap_mapdev_attr(map->offset, map->size, VM_MEMATTR_WRITE_COMBINING); } void *drm_ioremap(struct drm_device *dev, drm_local_map_t *map) Modified: projects/sbruno_64cpus/sys/dev/drm/drm_sysctl.c ============================================================================== --- projects/sbruno_64cpus/sys/dev/drm/drm_sysctl.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/dev/drm/drm_sysctl.c Thu Nov 18 17:50:23 2010 (r215458) @@ -259,7 +259,7 @@ static int drm_bufs_info DRM_SYSCTL_HAND *(1 << dma->bufs[i].page_order), (dma->bufs[i].seg_count * (1 << dma->bufs[i].page_order)) - * PAGE_SIZE / 1024); + * (int)PAGE_SIZE / 1024); } DRM_SYSCTL_PRINT("\n"); for (i = 0; i < dma->buf_count; i++) { Modified: projects/sbruno_64cpus/sys/dev/drm/radeon_cs.c ============================================================================== --- projects/sbruno_64cpus/sys/dev/drm/radeon_cs.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/dev/drm/radeon_cs.c Thu Nov 18 17:50:23 2010 (r215458) @@ -765,7 +765,7 @@ static int r600_cs_parse(struct drm_rade memcpy(parser->ib, ib_chunk->kdata, ib_chunk->length_dw * sizeof(uint32_t)); /* read back last byte to flush WC buffers */ - rb = readl(((vm_offset_t)parser->ib + (ib_chunk->length_dw-1) * sizeof(uint32_t))); + rb = *(volatile u_int32_t *) (((vm_offset_t)parser->ib + (ib_chunk->length_dw-1) * sizeof(uint32_t))); return 0; } Modified: projects/sbruno_64cpus/sys/dev/mii/brgphy.c ============================================================================== --- projects/sbruno_64cpus/sys/dev/mii/brgphy.c Thu Nov 18 17:49:24 2010 (r215457) +++ projects/sbruno_64cpus/sys/dev/mii/brgphy.c Thu Nov 18 17:50:23 2010 (r215458) @@ -154,15 +154,19 @@ static int detect_hs21(struct bce_softc *bce_sc) { char *sysenv; + int found; - if (bce_sc->bce_chipid != HS21_BCM_CHIPID) - return (0); - sysenv = getenv("smbios.system.product"); - if (sysenv == NULL) - return (0); - if (strncmp(sysenv, HS21_PRODUCT_ID, strlen(HS21_PRODUCT_ID)) != 0) - return (0); - return (1); + found = 0; + if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { + sysenv = getenv("smbios.system.product"); + if (sysenv != NULL) { + if (strncmp(sysenv, HS21_PRODUCT_ID, + strlen(HS21_PRODUCT_ID)) == 0) + found = 1; + freeenv(sysenv); + } + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Thu Nov 18 18:30:04 2010 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 0D4D8106564A; Thu, 18 Nov 2010 18:30:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E541D8FC08; Thu, 18 Nov 2010 18:30:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIIU3Ok041073; Thu, 18 Nov 2010 18:30:03 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIIU3tM041040; Thu, 18 Nov 2010 18:30:03 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011181830.oAIIU3tM041040@svn.freebsd.org> From: Dimitry Andric Date: Thu, 18 Nov 2010 18:30: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: r215464 - in projects/binutils-2.17: . cddl contrib/gcc contrib/gcc/config contrib/gcc/config/ia64 contrib/ipfilter/man contrib/top gnu/usr.bin/binutils/ld gnu/usr.bin/cc/cc_tools lib/l... 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: Thu, 18 Nov 2010 18:30:04 -0000 Author: dim Date: Thu Nov 18 18:30:03 2010 New Revision: 215464 URL: http://svn.freebsd.org/changeset/base/215464 Log: Sync: merge r215396 through r215463 from ^/head. Deleted: projects/binutils-2.17/lib/libautofs/ projects/binutils-2.17/sbin/mount_autofs/ Modified: projects/binutils-2.17/Makefile.inc1 projects/binutils-2.17/cddl/Makefile.inc projects/binutils-2.17/contrib/gcc/cgraphunit.c projects/binutils-2.17/contrib/gcc/config/elfos.h projects/binutils-2.17/contrib/gcc/config/ia64/hpux.h projects/binutils-2.17/contrib/gcc/config/ia64/ia64.c projects/binutils-2.17/contrib/gcc/output.h projects/binutils-2.17/contrib/gcc/toplev.c projects/binutils-2.17/contrib/gcc/varasm.c projects/binutils-2.17/contrib/ipfilter/man/ipnat.8 projects/binutils-2.17/contrib/ipfilter/man/mkfilters.1 projects/binutils-2.17/gnu/usr.bin/binutils/ld/Makefile.amd64 projects/binutils-2.17/gnu/usr.bin/cc/cc_tools/Makefile projects/binutils-2.17/lib/libusb/libusb.3 projects/binutils-2.17/share/man/man4/ata.4 projects/binutils-2.17/share/mk/Makefile projects/binutils-2.17/share/mk/bsd.crunchgen.mk projects/binutils-2.17/sys/amd64/amd64/amd64_mem.c projects/binutils-2.17/sys/boot/ofw/libofw/ofw_copy.c projects/binutils-2.17/sys/boot/ofw/libofw/ofw_net.c projects/binutils-2.17/sys/boot/ofw/libofw/openfirm.c projects/binutils-2.17/sys/boot/ofw/libofw/openfirm.h projects/binutils-2.17/sys/boot/powerpc/ofw/start.c projects/binutils-2.17/sys/cam/ata/ata_xpt.c projects/binutils-2.17/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/binutils-2.17/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c projects/binutils-2.17/sys/compat/ndis/ntoskrnl_var.h projects/binutils-2.17/sys/compat/ndis/subr_ntoskrnl.c projects/binutils-2.17/sys/crypto/aesni/aesni_wrap.c projects/binutils-2.17/sys/dev/ata/ata-pci.h projects/binutils-2.17/sys/dev/ata/ata-sata.c projects/binutils-2.17/sys/dev/ata/chipsets/ata-via.c projects/binutils-2.17/sys/dev/mii/atphy.c projects/binutils-2.17/sys/dev/nfe/if_nfe.c projects/binutils-2.17/sys/i386/i386/i686_mem.c projects/binutils-2.17/sys/kern/kern_rmlock.c projects/binutils-2.17/sys/kern/subr_bus.c projects/binutils-2.17/sys/netinet/sctp.h projects/binutils-2.17/sys/netinet/sctp_uio.h projects/binutils-2.17/sys/netinet/sctp_usrreq.c projects/binutils-2.17/sys/netinet/tcp.h projects/binutils-2.17/sys/netinet/tcp_output.c projects/binutils-2.17/sys/netinet/tcp_reass.c projects/binutils-2.17/sys/netinet/tcp_usrreq.c projects/binutils-2.17/sys/netinet/tcp_var.h projects/binutils-2.17/sys/netinet6/nd6.c projects/binutils-2.17/sys/sys/bus.h projects/binutils-2.17/sys/x86/cpufreq/hwpstate.c projects/binutils-2.17/tools/tools/mctest/mctest.cc projects/binutils-2.17/usr.bin/netstat/inet.c projects/binutils-2.17/usr.bin/netstat/main.c projects/binutils-2.17/usr.bin/netstat/netstat.1 projects/binutils-2.17/usr.bin/netstat/netstat.h projects/binutils-2.17/usr.sbin/iostat/iostat.8 projects/binutils-2.17/usr.sbin/iostat/iostat.c Directory Properties: projects/binutils-2.17/ (props changed) projects/binutils-2.17/cddl/contrib/opensolaris/ (props changed) projects/binutils-2.17/contrib/bind9/ (props changed) projects/binutils-2.17/contrib/binutils/ (props changed) projects/binutils-2.17/contrib/bzip2/ (props changed) projects/binutils-2.17/contrib/ee/ (props changed) projects/binutils-2.17/contrib/expat/ (props changed) projects/binutils-2.17/contrib/file/ (props changed) projects/binutils-2.17/contrib/gdb/ (props changed) projects/binutils-2.17/contrib/gdtoa/ (props changed) projects/binutils-2.17/contrib/gnu-sort/ (props changed) projects/binutils-2.17/contrib/groff/ (props changed) projects/binutils-2.17/contrib/less/ (props changed) projects/binutils-2.17/contrib/libpcap/ (props changed) projects/binutils-2.17/contrib/llvm/ (props changed) projects/binutils-2.17/contrib/llvm/tools/clang/ (props changed) projects/binutils-2.17/contrib/ncurses/ (props changed) projects/binutils-2.17/contrib/netcat/ (props changed) projects/binutils-2.17/contrib/ntp/ (props changed) projects/binutils-2.17/contrib/one-true-awk/ (props changed) projects/binutils-2.17/contrib/openbsm/ (props changed) projects/binutils-2.17/contrib/openpam/ (props changed) projects/binutils-2.17/contrib/pf/ (props changed) projects/binutils-2.17/contrib/sendmail/ (props changed) projects/binutils-2.17/contrib/tcpdump/ (props changed) projects/binutils-2.17/contrib/tcsh/ (props changed) projects/binutils-2.17/contrib/top/ (props changed) projects/binutils-2.17/contrib/top/install-sh (props changed) projects/binutils-2.17/contrib/tzcode/stdtime/ (props changed) projects/binutils-2.17/contrib/tzcode/zic/ (props changed) projects/binutils-2.17/contrib/tzdata/ (props changed) projects/binutils-2.17/contrib/wpa/ (props changed) projects/binutils-2.17/contrib/xz/ (props changed) projects/binutils-2.17/crypto/openssh/ (props changed) projects/binutils-2.17/crypto/openssl/ (props changed) projects/binutils-2.17/lib/libc/ (props changed) projects/binutils-2.17/lib/libc/stdtime/ (props changed) projects/binutils-2.17/lib/libutil/ (props changed) projects/binutils-2.17/lib/libz/ (props changed) projects/binutils-2.17/sbin/ (props changed) projects/binutils-2.17/sbin/ipfw/ (props changed) projects/binutils-2.17/share/mk/bsd.arch.inc.mk (props changed) projects/binutils-2.17/share/zoneinfo/ (props changed) projects/binutils-2.17/sys/ (props changed) projects/binutils-2.17/sys/amd64/include/xen/ (props changed) projects/binutils-2.17/sys/cddl/contrib/opensolaris/ (props changed) projects/binutils-2.17/sys/contrib/dev/acpica/ (props changed) projects/binutils-2.17/sys/contrib/pf/ (props changed) projects/binutils-2.17/sys/contrib/x86emu/ (props changed) projects/binutils-2.17/sys/dev/xen/xenpci/ (props changed) projects/binutils-2.17/usr.bin/calendar/ (props changed) projects/binutils-2.17/usr.bin/csup/ (props changed) projects/binutils-2.17/usr.bin/procstat/ (props changed) projects/binutils-2.17/usr.sbin/zic/ (props changed) Modified: projects/binutils-2.17/Makefile.inc1 ============================================================================== --- projects/binutils-2.17/Makefile.inc1 Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/Makefile.inc1 Thu Nov 18 18:30:03 2010 (r215464) @@ -322,7 +322,7 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ - -DWITHOUT_HTML -DNO_CTF DESTDIR=${LIB32TMP} + -DWITHOUT_HTML -DNO_CTF -DNO_LINT DESTDIR=${LIB32TMP} LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS .endif Modified: projects/binutils-2.17/cddl/Makefile.inc ============================================================================== --- projects/binutils-2.17/cddl/Makefile.inc Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/cddl/Makefile.inc Thu Nov 18 18:30:03 2010 (r215464) @@ -9,3 +9,8 @@ CFLAGS+= -DNEED_SOLARIS_BOOLEAN WARNS?= 6 CSTD?= gnu89 + +# Do not lint the CDDL stuff. It is all externally maintained and +# lint output is wasteful noise here. + +NO_LINT= Modified: projects/binutils-2.17/contrib/gcc/cgraphunit.c ============================================================================== --- projects/binutils-2.17/contrib/gcc/cgraphunit.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/contrib/gcc/cgraphunit.c Thu Nov 18 18:30:03 2010 (r215464) @@ -1536,8 +1536,6 @@ cgraph_optimize (void) return; } - process_pending_assemble_externals (); - /* Frontend may output common variables after the unit has been finalized. It is safe to deal with them here as they are always zero initialized. */ cgraph_varpool_analyze_pending_decls (); Modified: projects/binutils-2.17/contrib/gcc/config/elfos.h ============================================================================== --- projects/binutils-2.17/contrib/gcc/config/elfos.h Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/contrib/gcc/config/elfos.h Thu Nov 18 18:30:03 2010 (r215464) @@ -496,3 +496,13 @@ Boston, MA 02110-1301, USA. */ fprintf ((FILE), "\"\n"); \ } \ while (0) + +/* A C statement (sans semicolon) to output to the stdio stream STREAM + any text necessary for declaring the name of an external symbol + named NAME whch is referenced in this compilation but not defined. + It is needed to properly support non-default visibility. */ + +#ifndef ASM_OUTPUT_EXTERNAL +#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ + default_elf_asm_output_external (FILE, DECL, NAME) +#endif Modified: projects/binutils-2.17/contrib/gcc/config/ia64/hpux.h ============================================================================== --- projects/binutils-2.17/contrib/gcc/config/ia64/hpux.h Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/contrib/gcc/config/ia64/hpux.h Thu Nov 18 18:30:03 2010 (r215464) @@ -144,10 +144,6 @@ do { \ definitions, so do not use them in gthr-posix.h. */ #define GTHREAD_USE_WEAK 0 -/* Put out the needed function declarations at the end. */ - -#define TARGET_ASM_FILE_END ia64_hpux_file_end - #undef CTORS_SECTION_ASM_OP #define CTORS_SECTION_ASM_OP "\t.section\t.init_array,\t\"aw\",\"init_array\"" Modified: projects/binutils-2.17/contrib/gcc/config/ia64/ia64.c ============================================================================== --- projects/binutils-2.17/contrib/gcc/config/ia64/ia64.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/contrib/gcc/config/ia64/ia64.c Thu Nov 18 18:30:03 2010 (r215464) @@ -250,10 +250,6 @@ static section *ia64_select_rtx_section static void ia64_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; static unsigned int ia64_section_type_flags (tree, const char *, int); -static void ia64_hpux_add_extern_decl (tree decl) - ATTRIBUTE_UNUSED; -static void ia64_hpux_file_end (void) - ATTRIBUTE_UNUSED; static void ia64_init_libfuncs (void) ATTRIBUTE_UNUSED; static void ia64_hpux_init_libfuncs (void) @@ -5015,49 +5011,6 @@ ia64_secondary_reload_class (enum reg_cl } -/* Emit text to declare externally defined variables and functions, because - the Intel assembler does not support undefined externals. */ - -void -ia64_asm_output_external (FILE *file, tree decl, const char *name) -{ - int save_referenced; - - /* GNU as does not need anything here, but the HP linker does need - something for external functions. */ - - if (TARGET_GNU_AS - && (!TARGET_HPUX_LD - || TREE_CODE (decl) != FUNCTION_DECL - || strstr (name, "__builtin_") == name)) - return; - - /* ??? The Intel assembler creates a reference that needs to be satisfied by - the linker when we do this, so we need to be careful not to do this for - builtin functions which have no library equivalent. Unfortunately, we - can't tell here whether or not a function will actually be called by - expand_expr, so we pull in library functions even if we may not need - them later. */ - if (! strcmp (name, "__builtin_next_arg") - || ! strcmp (name, "alloca") - || ! strcmp (name, "__builtin_constant_p") - || ! strcmp (name, "__builtin_args_info")) - return; - - if (TARGET_HPUX_LD) - ia64_hpux_add_extern_decl (decl); - else - { - /* assemble_name will set TREE_SYMBOL_REFERENCED, so we must save and - restore it. */ - save_referenced = TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)); - if (TREE_CODE (decl) == FUNCTION_DECL) - ASM_OUTPUT_TYPE_DIRECTIVE (file, name, "function"); - (*targetm.asm_out.globalize_label) (file, name); - TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) = save_referenced; - } -} - /* Parse the -mfixed-range= option string. */ static void @@ -9223,55 +9176,33 @@ ia64_hpux_function_arg_padding (enum mac return DEFAULT_FUNCTION_ARG_PADDING (mode, type); } -/* Linked list of all external functions that are to be emitted by GCC. - We output the name if and only if TREE_SYMBOL_REFERENCED is set in - order to avoid putting out names that are never really used. */ - -struct extern_func_list GTY(()) -{ - struct extern_func_list *next; - tree decl; -}; - -static GTY(()) struct extern_func_list *extern_func_head; - -static void -ia64_hpux_add_extern_decl (tree decl) -{ - struct extern_func_list *p = ggc_alloc (sizeof (struct extern_func_list)); - - p->decl = decl; - p->next = extern_func_head; - extern_func_head = p; -} - -/* Print out the list of used global functions. */ +/* Emit text to declare externally defined variables and functions, because + the Intel assembler does not support undefined externals. */ -static void -ia64_hpux_file_end (void) +void +ia64_asm_output_external (FILE *file, tree decl, const char *name) { - struct extern_func_list *p; - - for (p = extern_func_head; p; p = p->next) - { - tree decl = p->decl; - tree id = DECL_ASSEMBLER_NAME (decl); - - gcc_assert (id); - - if (!TREE_ASM_WRITTEN (decl) && TREE_SYMBOL_REFERENCED (id)) - { - const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0); - - TREE_ASM_WRITTEN (decl) = 1; - (*targetm.asm_out.globalize_label) (asm_out_file, name); - fputs (TYPE_ASM_OP, asm_out_file); - assemble_name (asm_out_file, name); - fprintf (asm_out_file, "," TYPE_OPERAND_FMT "\n", "function"); - } + /* We output the name if and only if TREE_SYMBOL_REFERENCED is + set in order to avoid putting out names that are never really + used. */ + if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))) + { + /* maybe_assemble_visibility will return 1 if the assembler + visibility directive is outputed. */ + int need_visibility = ((*targetm.binds_local_p) (decl) + && maybe_assemble_visibility (decl)); + + /* GNU as does not need anything here, but the HP linker does + need something for external functions. */ + if ((TARGET_HPUX_LD || !TARGET_GNU_AS) + && TREE_CODE (decl) == FUNCTION_DECL) + { + ASM_OUTPUT_TYPE_DIRECTIVE (file, name, "function"); + (*targetm.asm_out.globalize_label) (file, name); + } + else if (need_visibility && !TARGET_GNU_AS) + (*targetm.asm_out.globalize_label) (file, name); } - - extern_func_head = 0; } /* Set SImode div/mod functions, init_integral_libfuncs only initializes Modified: projects/binutils-2.17/contrib/gcc/output.h ============================================================================== --- projects/binutils-2.17/contrib/gcc/output.h Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/contrib/gcc/output.h Thu Nov 18 18:30:03 2010 (r215464) @@ -200,9 +200,9 @@ extern void assemble_variable (tree, int DONT_OUTPUT_DATA is from assemble_variable. */ extern void align_variable (tree decl, bool dont_output_data); -/* Output something to declare an external symbol to the assembler. - (Most assemblers don't need this, so we normally output nothing.) - Do nothing if DECL is not external. */ +/* Queue for outputing something to declare an external symbol to the + assembler. (Most assemblers don't need this, so we normally output + nothing.) Do nothing if DECL is not external. */ extern void assemble_external (tree); /* Assemble code to leave SIZE bytes of zeros. */ @@ -607,6 +607,10 @@ extern void default_file_start (void); extern void file_end_indicate_exec_stack (void); extern bool default_valid_pointer_mode (enum machine_mode); +extern void default_elf_asm_output_external (FILE *file, tree, + const char *); +extern int maybe_assemble_visibility (tree); + extern int default_address_cost (rtx); /* dbxout helper functions */ Modified: projects/binutils-2.17/contrib/gcc/toplev.c ============================================================================== --- projects/binutils-2.17/contrib/gcc/toplev.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/contrib/gcc/toplev.c Thu Nov 18 18:30:03 2010 (r215464) @@ -1080,9 +1080,7 @@ compile_file (void) dw2_output_indirect_constants (); - /* Flush any pending external directives. cgraph did this for - assemble_external calls from the front end, but the RTL - expander can also generate them. */ + /* Flush any pending external directives. */ process_pending_assemble_externals (); /* Attach a special .ident directive to the end of the file to identify Modified: projects/binutils-2.17/contrib/gcc/varasm.c ============================================================================== --- projects/binutils-2.17/contrib/gcc/varasm.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/contrib/gcc/varasm.c Thu Nov 18 18:30:03 2010 (r215464) @@ -126,7 +126,6 @@ static unsigned HOST_WIDE_INT array_size static unsigned min_align (unsigned, unsigned); static void output_constructor (tree, unsigned HOST_WIDE_INT, unsigned int); static void globalize_decl (tree); -static void maybe_assemble_visibility (tree); #ifdef BSS_SECTION_ASM_OP #ifdef ASM_OUTPUT_BSS static void asm_output_bss (FILE *, tree, const char *, @@ -1957,11 +1956,10 @@ assemble_external (tree decl ATTRIBUTE_U if (!DECL_P (decl) || !DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl)) return; - if (flag_unit_at_a_time) - pending_assemble_externals = tree_cons (0, decl, - pending_assemble_externals); - else - assemble_external_real (decl); + /* We want to output external symbols at very last to check if they + are references or not. */ + pending_assemble_externals = tree_cons (0, decl, + pending_assemble_externals); #endif } @@ -5064,13 +5062,18 @@ default_assemble_visibility (tree decl, /* A helper function to call assemble_visibility when needed for a decl. */ -static void +int maybe_assemble_visibility (tree decl) { enum symbol_visibility vis = DECL_VISIBILITY (decl); if (vis != VISIBILITY_DEFAULT) - targetm.asm_out.visibility (decl, vis); + { + targetm.asm_out.visibility (decl, vis); + return 1; + } + else + return 0; } /* Returns 1 if the target configuration supports defining public symbols @@ -6224,4 +6227,19 @@ output_object_blocks (void) htab_traverse (object_block_htab, output_object_block_htab, NULL); } +/* Emit text to declare externally defined symbols. It is needed to + properly support non-default visibility. */ +void +default_elf_asm_output_external (FILE *file ATTRIBUTE_UNUSED, + tree decl, + const char *name ATTRIBUTE_UNUSED) +{ + /* We output the name if and only if TREE_SYMBOL_REFERENCED is + set in order to avoid putting out names that are never really + used. */ + if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) + && targetm.binds_local_p (decl)) + maybe_assemble_visibility (decl); +} + #include "gt-varasm.h" Modified: projects/binutils-2.17/contrib/ipfilter/man/ipnat.8 ============================================================================== --- projects/binutils-2.17/contrib/ipfilter/man/ipnat.8 Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/contrib/ipfilter/man/ipnat.8 Thu Nov 18 18:30:03 2010 (r215464) @@ -66,6 +66,6 @@ and active rules/table entries. .SH FILES /dev/ipnat .br -/usr/share/examples/ipf Directory with examples. +/usr/share/examples/ipfilter Directory with examples. .SH SEE ALSO ipnat(5), ipf(8), ipfstat(8) Modified: projects/binutils-2.17/contrib/ipfilter/man/mkfilters.1 ============================================================================== --- projects/binutils-2.17/contrib/ipfilter/man/mkfilters.1 Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/contrib/ipfilter/man/mkfilters.1 Thu Nov 18 18:30:03 2010 (r215464) @@ -6,7 +6,7 @@ mkfilters \- generate a minimal firewall .SH SYNOPSIS .B mkfilters .SH FILES -/usr/share/examples/ipf/mkfilters +/usr/share/examples/ipfilter/mkfilters .SH DESCRIPTION .PP \fBmkfilters\fP is a perl script that generates a minimal filter rule set for Modified: projects/binutils-2.17/gnu/usr.bin/binutils/ld/Makefile.amd64 ============================================================================== --- projects/binutils-2.17/gnu/usr.bin/binutils/ld/Makefile.amd64 Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/gnu/usr.bin/binutils/ld/Makefile.amd64 Thu Nov 18 18:30:03 2010 (r215464) @@ -12,7 +12,7 @@ e${NATIVE_EMULATION}.c: emulparams/${NAT ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} X86_EMULATION= elf_i386_fbsd -_i386_path= \"${TOOLS_PREFIX}/usr/lib/i386\" +_i386_path= \"${TOOLS_PREFIX}/usr/lib32\" EMS+= ${X86_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+= ${X86_EMULATION}.${ext} Modified: projects/binutils-2.17/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- projects/binutils-2.17/gnu/usr.bin/cc/cc_tools/Makefile Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/gnu/usr.bin/cc/cc_tools/Makefile Thu Nov 18 18:30:03 2010 (r215464) @@ -307,7 +307,7 @@ GENSRCS+= gcov-iov.h # Multilib config file multilib.h: -.if ${TARGET_ARCH} == "powerpc64" +.if ${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH} == "amd64" echo 'static const char *const multilib_raw[] = { \ ". !m64 !m32;", \ "64:../lib m64 !m32;", \ Modified: projects/binutils-2.17/lib/libusb/libusb.3 ============================================================================== --- projects/binutils-2.17/lib/libusb/libusb.3 Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/lib/libusb/libusb.3 Thu Nov 18 18:30:03 2010 (r215464) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2010 +.Dd November 18, 2010 .Dt LIBUSB 3 .Os .Sh NAME @@ -380,10 +380,15 @@ LIBUSB_ERROR code on failure. .Pp .Ft int .Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint8_t bRequest" "uint16_t wValue" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" -Perform a USB control transfer. Returns 0 on success, LIBUSB_ERROR_TIMEOUT -if the transfer timeout, LIBUSB_ERROR_PIPE if the control request was not -supported, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and -LIBUSB_ERROR code on other failure. +Perform a USB control transfer. Returns the actual number of bytes +transferred on success in the range from and including zero until and +including +.Xa wLength . +On error a libusb error code is returned, for example +LIBUSB_ERROR_TIMEOUT if the transfer timeout, LIBUSB_ERROR_PIPE if the +control request was not supported, LIBUSB_ERROR_NO_DEVICE if the +device has been disconnected or another LIBUSB_ERROR code on other failures. +The libusb error codes are always negative. . .Pp .Ft int Modified: projects/binutils-2.17/share/man/man4/ata.4 ============================================================================== --- projects/binutils-2.17/share/man/man4/ata.4 Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/share/man/man4/ata.4 Thu Nov 18 18:30:03 2010 (r215464) @@ -183,7 +183,7 @@ SIS963, SIS964, SIS965. .It VIA: VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686, VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237, -VT8237A, VT8237S, VT8251, CX700, VX800, VX855. +VT8237A, VT8237S, VT8251, CX700, VX800, VX855, VX900. .El .Pp Unknown ATA chipsets are supported in PIO modes, and if the standard Modified: projects/binutils-2.17/share/mk/Makefile ============================================================================== --- projects/binutils-2.17/share/mk/Makefile Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/share/mk/Makefile Thu Nov 18 18:30:03 2010 (r215464) @@ -5,7 +5,7 @@ FILES= bsd.README FILES+= bsd.arch.inc.mk FILES+= bsd.compat.mk bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.dtrace.mk FILES+= bsd.endian.mk -FILES+= bsd.files.mk bsd.incs.mk bsd.info.mk bsd.init.mk +FILES+= bsd.files.mk bsd.crunchgen.mk bsd.incs.mk bsd.info.mk bsd.init.mk FILES+= bsd.kmod.mk FILES+= bsd.lib.mk bsd.libnames.mk bsd.links.mk bsd.man.mk bsd.nls.mk FILES+= bsd.obj.mk bsd.own.mk Modified: projects/binutils-2.17/share/mk/bsd.crunchgen.mk ============================================================================== --- projects/binutils-2.17/share/mk/bsd.crunchgen.mk Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/share/mk/bsd.crunchgen.mk Thu Nov 18 18:30:03 2010 (r215464) @@ -51,17 +51,14 @@ $(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefi .else $(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile .endif -# Disable building links for bsdbox - whatever is installing the binaries into -# the embedded system should (for now) do the linking there. This may change -# in the future. -adrian -#.ifndef CRUNCH_SUPPRESS_LINK_${P} -#LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P) -#.endif -#.for A in $(CRUNCH_ALIAS_$(P)) -#.ifndef CRUNCH_SUPPRESS_LINK_${A} -#LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A) -#.endif -#.endfor +.ifndef CRUNCH_SUPPRESS_LINK_${P} +LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P) +.endif +.for A in $(CRUNCH_ALIAS_$(P)) +.ifndef CRUNCH_SUPPRESS_LINK_${A} +LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A) +.endif +.endfor .endfor .endfor Modified: projects/binutils-2.17/sys/amd64/amd64/amd64_mem.c ============================================================================== --- projects/binutils-2.17/sys/amd64/amd64/amd64_mem.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/amd64/amd64/amd64_mem.c Thu Nov 18 18:30:03 2010 (r215464) @@ -307,20 +307,21 @@ amd64_mrstoreone(void *arg) struct mem_range_desc *mrd; u_int64_t omsrv, msrv; int i, j, msr; - u_int cr4save; + u_long cr0, cr4; mrd = sc->mr_desc; /* Disable PGE. */ - cr4save = rcr4(); - if (cr4save & CR4_PGE) - load_cr4(cr4save & ~CR4_PGE); + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); /* Disable caches (CD = 1, NW = 0). */ - load_cr0((rcr0() & ~CR0_NW) | CR0_CD); + cr0 = rcr0(); + load_cr0((cr0 & ~CR0_NW) | CR0_CD); /* Flushes caches and TLBs. */ wbinvd(); + invltlb(); /* Disable MTRRs (E = 0). */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) & ~MTRR_DEF_ENABLE); @@ -388,17 +389,16 @@ amd64_mrstoreone(void *arg) wrmsr(msr + 1, msrv); } - /* Flush caches, TLBs. */ + /* Flush caches and TLBs. */ wbinvd(); + invltlb(); /* Enable MTRRs. */ wrmsr(MSR_MTRRdefType, rdmsr(MSR_MTRRdefType) | MTRR_DEF_ENABLE); - /* Enable caches (CD = 0, NW = 0). */ - load_cr0(rcr0() & ~(CR0_CD | CR0_NW)); - - /* Restore PGE. */ - load_cr4(cr4save); + /* Restore caches and PGE. */ + load_cr0(cr0); + load_cr4(cr4); } /* Modified: projects/binutils-2.17/sys/boot/ofw/libofw/ofw_copy.c ============================================================================== --- projects/binutils-2.17/sys/boot/ofw/libofw/ofw_copy.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/boot/ofw/libofw/ofw_copy.c Thu Nov 18 18:30:03 2010 (r215464) @@ -91,16 +91,22 @@ ofw_mapmem(vm_offset_t dest, const size_ return (ENOMEM); } - if (OF_call_method("claim", mmu, 3, 1, destp, dlen, 0, &addr) == -1) { - printf("ofw_mapmem: virtual claim failed\n"); - return (ENOMEM); - } - - if (OF_call_method("map", mmu, 4, 0, destp, destp, dlen, 0) == -1) { - printf("ofw_mapmem: map failed\n"); - return (ENOMEM); - } + /* + * We only do virtual memory management when real_mode is false. + */ + if (real_mode == 0) { + if (OF_call_method("claim", mmu, 3, 1, destp, dlen, 0, &addr) + == -1) { + printf("ofw_mapmem: virtual claim failed\n"); + return (ENOMEM); + } + if (OF_call_method("map", mmu, 4, 0, destp, destp, dlen, 0) + == -1) { + printf("ofw_mapmem: map failed\n"); + return (ENOMEM); + } + } last_dest = (vm_offset_t) destp; last_len = dlen; Modified: projects/binutils-2.17/sys/boot/ofw/libofw/ofw_net.c ============================================================================== --- projects/binutils-2.17/sys/boot/ofw/libofw/ofw_net.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/boot/ofw/libofw/ofw_net.c Thu Nov 18 18:30:03 2010 (r215464) @@ -90,11 +90,11 @@ ofwn_probe(struct netif *nif, void *mach static int ofwn_put(struct iodesc *desc, void *pkt, size_t len) { - struct ether_header *eh; size_t sendlen; ssize_t rv; #if defined(NETIF_DEBUG) + struct ether_header *eh; printf("netif_put: desc=0x%x pkt=0x%x len=%d\n", desc, pkt, len); eh = pkt; printf("dst: %s ", ether_sprintf(eh->ether_dhost)); Modified: projects/binutils-2.17/sys/boot/ofw/libofw/openfirm.c ============================================================================== --- projects/binutils-2.17/sys/boot/ofw/libofw/openfirm.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/boot/ofw/libofw/openfirm.c Thu Nov 18 18:30:03 2010 (r215464) @@ -69,12 +69,15 @@ int (*openfirmware)(void *); phandle_t chosen; ihandle_t mmu; ihandle_t memory; +int real_mode = 0; /* Initialiser */ void OF_init(int (*openfirm)(void *)) { + phandle_t options; + char mode[8]; openfirmware = openfirm; @@ -89,6 +92,15 @@ OF_init(int (*openfirm)(void *)) } if (OF_getprop(chosen, "mmu", &mmu, sizeof(mmu)) == -1) OF_exit(); + + /* + * Check if we run in real mode. If so, we do not need to map + * memory later on. + */ + options = OF_finddevice("/options"); + OF_getprop(options, "real-mode?", mode, sizeof(mode)); + if (strncmp(mode, "true", 4) == 0) + real_mode = 1; } /* Modified: projects/binutils-2.17/sys/boot/ofw/libofw/openfirm.h ============================================================================== --- projects/binutils-2.17/sys/boot/ofw/libofw/openfirm.h Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/boot/ofw/libofw/openfirm.h Thu Nov 18 18:30:03 2010 (r215464) @@ -72,6 +72,7 @@ typedef unsigned long int cell_t; extern int (*openfirmware)(void *); extern phandle_t chosen; extern ihandle_t memory, mmu; +extern int real_mode; /* * This isn't actually an Open Firmware function, but it seemed like the right Modified: projects/binutils-2.17/sys/boot/powerpc/ofw/start.c ============================================================================== --- projects/binutils-2.17/sys/boot/powerpc/ofw/start.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/boot/powerpc/ofw/start.c Thu Nov 18 18:30:03 2010 (r215464) @@ -50,7 +50,20 @@ _start: \n\ addi %r1,%r1,stack@l \n\ addi %r1,%r1,8192 \n\ \n\ - b startup \n\ + /* Clear the .bss!!! */ \n\ + li %r0,0 \n\ + lis %r8,_edata@ha \n\ + addi %r8,%r8,_edata@l\n\ + lis %r9,_end@ha \n\ + addi %r9,%r9,_end@l \n\ + \n\ +1: cmpw 0,%r8,%r9 \n\ + bge 2f \n\ + stw %r0,0(%r8) \n\ + addi %r8,%r8,4 \n\ + b 1b \n\ + \n\ +2: b startup \n\ "); void Modified: projects/binutils-2.17/sys/cam/ata/ata_xpt.c ============================================================================== --- projects/binutils-2.17/sys/cam/ata/ata_xpt.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/cam/ata/ata_xpt.c Thu Nov 18 18:30:03 2010 (r215464) @@ -963,6 +963,8 @@ noerror: xpt_action((union ccb *)&cts); if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) caps &= cts.xport_specific.sata.caps; + else + caps = 0; /* Store result to SIM. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); @@ -1103,6 +1105,8 @@ notsata: xpt_action((union ccb *)&cts); if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) caps &= cts.xport_specific.sata.caps; + else + caps = 0; /* Store result to SIM. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); Modified: projects/binutils-2.17/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- projects/binutils-2.17/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Thu Nov 18 18:30:03 2010 (r215464) @@ -1557,7 +1557,7 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla int err; /* - * zfs_zget() can't operate on virtual entires like .zfs/ or + * zfs_zget() can't operate on virtual entries like .zfs/ or * .zfs/snapshot/ directories, that's why we return EOPNOTSUPP. * This will make NFS to switch to LOOKUP instead of using VGET. */ Modified: projects/binutils-2.17/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- projects/binutils-2.17/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Nov 18 18:30:03 2010 (r215464) @@ -67,6 +67,7 @@ #include #include #include +#include /* * Programming rules. @@ -481,7 +482,7 @@ again: uiomove_fromphys(&m, off, bytes, uio); VM_OBJECT_LOCK(obj); vm_page_wakeup(m); - } else if (m != NULL && uio->uio_segflg == UIO_NOCOPY) { + } else if (uio->uio_segflg == UIO_NOCOPY) { /* * The code below is here to make sendfile(2) work * correctly with ZFS. As pointed out by ups@ @@ -491,7 +492,7 @@ again: */ KASSERT(off == 0, ("unexpected offset in mappedread for sendfile")); - if ((m->oflags & VPO_BUSY) != 0) { + if (m != NULL && (m->oflags & VPO_BUSY) != 0) { /* * Reference the page before unlocking and * sleeping so that the page daemon is less @@ -501,8 +502,17 @@ again: vm_page_flag_set(m, PG_REFERENCED); vm_page_sleep(m, "zfsmrb"); goto again; + } else if (m == NULL) { + m = vm_page_alloc(obj, OFF_TO_IDX(start), + VM_ALLOC_NOBUSY | VM_ALLOC_NORMAL); + if (m == NULL) { + VM_OBJECT_UNLOCK(obj); + VM_WAIT; + VM_OBJECT_LOCK(obj); + goto again; + } } - vm_page_busy(m); + vm_page_io_start(m); VM_OBJECT_UNLOCK(obj); if (dirbytes > 0) { error = dmu_read_uio(os, zp->z_id, uio, @@ -520,7 +530,7 @@ again: VM_OBJECT_LOCK(obj); if (error == 0) m->valid = VM_PAGE_BITS_ALL; - vm_page_wakeup(m); + vm_page_io_finish(m); if (error == 0) { uio->uio_resid -= bytes; uio->uio_offset += bytes; Modified: projects/binutils-2.17/sys/compat/ndis/ntoskrnl_var.h ============================================================================== --- projects/binutils-2.17/sys/compat/ndis/ntoskrnl_var.h Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/compat/ndis/ntoskrnl_var.h Thu Nov 18 18:30:03 2010 (r215464) @@ -162,6 +162,16 @@ typedef struct mdl mdl, ndis_buffer; #define WDM_MINOR_WINXP 0x20 #define WDM_MINOR_WIN2003 0x30 +enum nt_caching_type { + MmNonCached = 0, + MmCached = 1, + MmWriteCombined = 2, + MmHardwareCoherentCached = 3, + MmNonCachedUnordered = 4, + MmUSWCCached = 5, + MmMaximumCacheType = 6 +}; + /*- * The ndis_kspin_lock type is called KSPIN_LOCK in MS-Windows. * According to the Windows DDK header files, KSPIN_LOCK is defined like this: Modified: projects/binutils-2.17/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- projects/binutils-2.17/sys/compat/ndis/subr_ntoskrnl.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/compat/ndis/subr_ntoskrnl.c Thu Nov 18 18:30:03 2010 (r215464) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -197,9 +198,10 @@ static uint32_t InterlockedDecrement(vol static void ExInterlockedAddLargeStatistic(uint64_t *, uint32_t); static void *MmAllocateContiguousMemory(uint32_t, uint64_t); static void *MmAllocateContiguousMemorySpecifyCache(uint32_t, - uint64_t, uint64_t, uint64_t, uint32_t); + uint64_t, uint64_t, uint64_t, enum nt_caching_type); static void MmFreeContiguousMemory(void *); -static void MmFreeContiguousMemorySpecifyCache(void *, uint32_t, uint32_t); +static void MmFreeContiguousMemorySpecifyCache(void *, uint32_t, + enum nt_caching_type); static uint32_t MmSizeOfMdl(void *, size_t); static void *MmMapLockedPages(mdl *, uint8_t); static void *MmMapLockedPagesSpecifyCache(mdl *, @@ -2424,11 +2426,34 @@ MmAllocateContiguousMemorySpecifyCache(s uint64_t lowest; uint64_t highest; uint64_t boundary; - uint32_t cachetype; + enum nt_caching_type cachetype; { + vm_memattr_t memattr; + void *ret; - return (contigmalloc(size, M_DEVBUF, M_ZERO|M_NOWAIT, lowest, - highest, PAGE_SIZE, boundary)); + switch (cachetype) { + case MmNonCached: + memattr = VM_MEMATTR_UNCACHEABLE; + break; + case MmWriteCombined: + memattr = VM_MEMATTR_WRITE_COMBINING; + break; + case MmNonCachedUnordered: + memattr = VM_MEMATTR_UNCACHEABLE; + break; + case MmCached: + case MmHardwareCoherentCached: + case MmUSWCCached: + default: + memattr = VM_MEMATTR_DEFAULT; + break; + } + + ret = (void *)kmem_alloc_contig(kernel_map, size, M_ZERO | M_NOWAIT, + lowest, highest, PAGE_SIZE, boundary, memattr); + if (ret != NULL) + malloc_type_allocated(M_DEVBUF, round_page(size)); + return (ret); } static void @@ -2442,7 +2467,7 @@ static void MmFreeContiguousMemorySpecifyCache(base, size, cachetype) void *base; uint32_t size; - uint32_t cachetype; + enum nt_caching_type cachetype; { contigfree(base, size, M_DEVBUF); } @@ -4212,8 +4237,8 @@ image_patch_table ntoskrnl_functbl[] = { IMPORT_FFUNC(ExInterlockedAddLargeStatistic, 2), IMPORT_SFUNC(IoAllocateMdl, 5), IMPORT_SFUNC(IoFreeMdl, 1), - IMPORT_SFUNC(MmAllocateContiguousMemory, 2), - IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5), + IMPORT_SFUNC(MmAllocateContiguousMemory, 2 + 1), + IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5 + 3), IMPORT_SFUNC(MmFreeContiguousMemory, 1), IMPORT_SFUNC(MmFreeContiguousMemorySpecifyCache, 3), IMPORT_SFUNC_MAP(MmGetPhysicalAddress, pmap_kextract, 1), Modified: projects/binutils-2.17/sys/crypto/aesni/aesni_wrap.c ============================================================================== --- projects/binutils-2.17/sys/crypto/aesni/aesni_wrap.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/crypto/aesni/aesni_wrap.c Thu Nov 18 18:30:03 2010 (r215464) @@ -246,14 +246,21 @@ int aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini) { struct thread *td; - int error; + int error, saved_ctx; td = curthread; - error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); + if (!is_fpu_kern_thread(0)) { + error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); + saved_ctx = 1; + } else { + error = 0; + saved_ctx = 0; + } if (error == 0) { error = aesni_cipher_setup_common(ses, encini->cri_key, encini->cri_klen); - fpu_kern_leave(td, &ses->fpu_ctx); + if (saved_ctx) + fpu_kern_leave(td, &ses->fpu_ctx); } return (error); } @@ -264,16 +271,22 @@ aesni_cipher_process(struct aesni_sessio { struct thread *td; uint8_t *buf; - int error, allocated; + int error, allocated, saved_ctx; buf = aesni_cipher_alloc(enccrd, crp, &allocated); if (buf == NULL) return (ENOMEM); td = curthread; - error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); - if (error != 0) - goto out; + if (!is_fpu_kern_thread(0)) { + error = fpu_kern_enter(td, &ses->fpu_ctx, FPU_KERN_NORMAL); + if (error != 0) + goto out; + saved_ctx = 1; + } else { + saved_ctx = 0; + error = 0; + } if ((enccrd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { error = aesni_cipher_setup_common(ses, enccrd->crd_key, @@ -311,7 +324,8 @@ aesni_cipher_process(struct aesni_sessio ses->iv); } } - fpu_kern_leave(td, &ses->fpu_ctx); + if (saved_ctx) + fpu_kern_leave(td, &ses->fpu_ctx); if (allocated) crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, enccrd->crd_len, buf); Modified: projects/binutils-2.17/sys/dev/ata/ata-pci.h ============================================================================== --- projects/binutils-2.17/sys/dev/ata/ata-pci.h Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/dev/ata/ata-pci.h Thu Nov 18 18:30:03 2010 (r215464) @@ -512,7 +512,10 @@ struct ata_pci_controller { #define ATA_VIACX700 0x83241106 #define ATA_VIASATAIDE 0x53241106 #define ATA_VIAVX800 0x83531106 +#define ATA_VIASATAIDE2 0xc4091106 #define ATA_VIAVX855 0x84091106 +#define ATA_VIASATAIDE3 0x90011106 +#define ATA_VIAVX900 0x84101106 /* global prototypes ata-pci.c */ int ata_pci_probe(device_t dev); Modified: projects/binutils-2.17/sys/dev/ata/ata-sata.c ============================================================================== --- projects/binutils-2.17/sys/dev/ata/ata-sata.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/dev/ata/ata-sata.c Thu Nov 18 18:30:03 2010 (r215464) @@ -153,8 +153,12 @@ ata_sata_phy_reset(device_t dev, int por if (quick) { if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val)) return (0); - if ((val & ATA_SC_DET_MASK) == ATA_SC_DET_IDLE) + if ((val & ATA_SC_DET_MASK) == ATA_SC_DET_IDLE) { + ata_sata_scr_write(ch, port, ATA_SCONTROL, + ATA_SC_DET_IDLE | ((ch->pm_level > 0) ? 0 : + ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER)); return ata_sata_connect(ch, port, quick); + } } if (bootverbose) { Modified: projects/binutils-2.17/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- projects/binutils-2.17/sys/dev/ata/chipsets/ata-via.c Thu Nov 18 18:22:58 2010 (r215463) +++ projects/binutils-2.17/sys/dev/ata/chipsets/ata-via.c Thu Nov 18 18:30:03 2010 (r215464) @@ -63,6 +63,12 @@ static int ata_via_new_setmode(device_t static int ata_via_sata_ch_attach(device_t dev); static int ata_via_sata_getrev(device_t dev, int target); static int ata_via_sata_setmode(device_t dev, int target, int mode); +static void ata_via_sata_reset(device_t dev); +static int ata_via_sata_scr_read(device_t dev, int port, int reg, + u_int32_t *result); +static int ata_via_sata_scr_write(device_t dev, int port, int reg, + u_int32_t value); +static int ata_via_sata_status(device_t dev); /* misc defines */ #define VIA33 0 @@ -106,6 +112,7 @@ ata_via_probe(device_t dev) { ATA_VIACX700, 0x00, VIA133, VIASATA, ATA_SA150, "CX700" }, { ATA_VIAVX800, 0x00, VIA133, VIASATA, ATA_SA150, "VX800" }, { ATA_VIAVX855, 0x00, VIA133, 0x00, ATA_UDMA6, "VX855" }, + { ATA_VIAVX900, 0x00, VIA133, VIASATA, ATA_SA300, "VX900" }, { 0, 0, 0, 0, 0, 0 }}; static struct ata_chip_id new_ids[] = {{ ATA_VIA6410, 0x00, 0, 0x00, ATA_UDMA6, "6410" }, @@ -123,7 +130,9 @@ ata_via_probe(device_t dev) if (pci_get_devid(dev) == ATA_VIA82C571 || pci_get_devid(dev) == ATA_VIACX700IDE || - pci_get_devid(dev) == ATA_VIASATAIDE) { + pci_get_devid(dev) == ATA_VIASATAIDE || + pci_get_devid(dev) == ATA_VIASATAIDE2 || + pci_get_devid(dev) == ATA_VIASATAIDE3) { if (!(ctlr->chip = ata_find_chip(dev, ids, -99))) return ENXIO; } @@ -150,11 +159,12 @@ ata_via_chipinit(device_t dev) if (ata_ahci_chipinit(dev) != ENXIO) return (0); } - /* 2 SATA without SATA registers on first channel + 1 PATA on second */ + /* 2 SATA with "SATA registers" at PCI config space + PATA on secondary */ if (ctlr->chip->cfg2 & VIASATA) { ctlr->ch_attach = ata_via_sata_ch_attach; ctlr->setmode = ata_via_sata_setmode; ctlr->getrev = ata_via_sata_getrev; + ctlr->reset = ata_via_sata_reset; return 0; } /* Legacy SATA/SATA+PATA with SATA registers in BAR(5). */ @@ -402,18 +412,30 @@ ata_via_sata_ch_attach(device_t dev) if (ata_pci_ch_attach(dev)) return ENXIO; - if (ch->unit == 0) + if (ch->unit == 0) { + ch->hw.status = ata_via_sata_status; + ch->hw.pm_read = ata_via_sata_scr_read; + ch->hw.pm_write = ata_via_sata_scr_write; + ch->flags |= ATA_PERIODIC_POLL; ch->flags |= ATA_SATA; + ata_sata_scr_write(ch, 0, ATA_SERROR, 0xffffffff); + ata_sata_scr_write(ch, 1, ATA_SERROR, 0xffffffff); + } return (0); } static int ata_via_sata_getrev(device_t dev, int target) { + device_t parent = device_get_parent(dev); struct ata_channel *ch = device_get_softc(dev); - if (ch->unit == 0) - return (1); + if (ch->unit == 0) { + if (pci_read_config(parent, 0xa0 + target, 1) & 0x10) + return (2); + else + return (1); + } return (0); } @@ -427,5 +449,112 @@ ata_via_sata_setmode(device_t dev, int t return (ata_via_old_setmode(dev, target, mode)); } +static void +ata_via_sata_reset(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + int devs; + + if (ch->unit == 0) { + devs = ata_sata_phy_reset(dev, 0, 0); + DELAY(10000); + devs += ata_sata_phy_reset(dev, 1, 0); + } else + devs = 1; + if (devs) + ata_generic_reset(dev); + else + ch->devices = 0; +} + +static int +ata_via_sata_scr_read(device_t dev, int port, int reg, u_int32_t *result) +{ + struct ata_channel *ch; + device_t parent; + uint32_t val; + + parent = device_get_parent(dev); + ch = device_get_softc(dev); + port = (port == 1) ? 1 : 0; + switch (reg) { + case ATA_SSTATUS: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Thu Nov 18 18:37:02 2010 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 680D7106564A; Thu, 18 Nov 2010 18:37:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 26EF78FC12; Thu, 18 Nov 2010 18:37:02 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:448f:c14e:1431:40cd] (unknown [IPv6:2001:7b8:3a7:0:448f:c14e:1431:40cd]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 0E24B5C43; Thu, 18 Nov 2010 19:37:01 +0100 (CET) Message-ID: <4CE5724F.9080208@FreeBSD.org> Date: Thu, 18 Nov 2010 19:37:03 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13pre) Gecko/20101113 Lanikai/3.1.7pre MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-projects@freebsd.org References: <201011181830.oAIIU3tM041040@svn.freebsd.org> In-Reply-To: <201011181830.oAIIU3tM041040@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r215464 - in projects/binutils-2.17: . cddl contrib/gcc contrib/gcc/config contrib/gcc/config/ia64 contrib/ipfilter/man contrib/top gnu/usr.bin/binutils/ld gnu/usr.bin/cc/cc_tools lib/l... 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: Thu, 18 Nov 2010 18:37:02 -0000 On 2010-11-18 19:30, Dimitry Andric wrote: > Author: dim > Date: Thu Nov 18 18:30:03 2010 > New Revision: 215464 > URL: http://svn.freebsd.org/changeset/base/215464 > > Log: > Sync: merge r215396 through r215463 from ^/head. By accident, this also contained a patch for gcc PR 20218. :/ From owner-svn-src-projects@FreeBSD.ORG Thu Nov 18 18:49:05 2010 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 142B7106564A; Thu, 18 Nov 2010 18:49:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04CC78FC13; Thu, 18 Nov 2010 18:49:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAIIn4G5041599; Thu, 18 Nov 2010 18:49:04 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAIIn4KT041591; Thu, 18 Nov 2010 18:49:04 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011181849.oAIIn4KT041591@svn.freebsd.org> From: Dimitry Andric Date: Thu, 18 Nov 2010 18:49:04 +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: r215465 - in projects/binutils-2.17/contrib/gcc: . config config/ia64 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: Thu, 18 Nov 2010 18:49:05 -0000 Author: dim Date: Thu Nov 18 18:49:04 2010 New Revision: 215465 URL: http://svn.freebsd.org/changeset/base/215465 Log: Revert patch for gcc PR 20218 for now, I hope it can land in head soon, otherwise I'll just reapply it again. Modified: projects/binutils-2.17/contrib/gcc/cgraphunit.c projects/binutils-2.17/contrib/gcc/config/elfos.h projects/binutils-2.17/contrib/gcc/config/ia64/hpux.h projects/binutils-2.17/contrib/gcc/config/ia64/ia64.c projects/binutils-2.17/contrib/gcc/output.h projects/binutils-2.17/contrib/gcc/toplev.c projects/binutils-2.17/contrib/gcc/varasm.c Modified: projects/binutils-2.17/contrib/gcc/cgraphunit.c ============================================================================== --- projects/binutils-2.17/contrib/gcc/cgraphunit.c Thu Nov 18 18:30:03 2010 (r215464) +++ projects/binutils-2.17/contrib/gcc/cgraphunit.c Thu Nov 18 18:49:04 2010 (r215465) @@ -1536,6 +1536,8 @@ cgraph_optimize (void) return; } + process_pending_assemble_externals (); + /* Frontend may output common variables after the unit has been finalized. It is safe to deal with them here as they are always zero initialized. */ cgraph_varpool_analyze_pending_decls (); Modified: projects/binutils-2.17/contrib/gcc/config/elfos.h ============================================================================== --- projects/binutils-2.17/contrib/gcc/config/elfos.h Thu Nov 18 18:30:03 2010 (r215464) +++ projects/binutils-2.17/contrib/gcc/config/elfos.h Thu Nov 18 18:49:04 2010 (r215465) @@ -496,13 +496,3 @@ Boston, MA 02110-1301, USA. */ fprintf ((FILE), "\"\n"); \ } \ while (0) - -/* A C statement (sans semicolon) to output to the stdio stream STREAM - any text necessary for declaring the name of an external symbol - named NAME whch is referenced in this compilation but not defined. - It is needed to properly support non-default visibility. */ - -#ifndef ASM_OUTPUT_EXTERNAL -#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ - default_elf_asm_output_external (FILE, DECL, NAME) -#endif Modified: projects/binutils-2.17/contrib/gcc/config/ia64/hpux.h ============================================================================== --- projects/binutils-2.17/contrib/gcc/config/ia64/hpux.h Thu Nov 18 18:30:03 2010 (r215464) +++ projects/binutils-2.17/contrib/gcc/config/ia64/hpux.h Thu Nov 18 18:49:04 2010 (r215465) @@ -144,6 +144,10 @@ do { \ definitions, so do not use them in gthr-posix.h. */ #define GTHREAD_USE_WEAK 0 +/* Put out the needed function declarations at the end. */ + +#define TARGET_ASM_FILE_END ia64_hpux_file_end + #undef CTORS_SECTION_ASM_OP #define CTORS_SECTION_ASM_OP "\t.section\t.init_array,\t\"aw\",\"init_array\"" Modified: projects/binutils-2.17/contrib/gcc/config/ia64/ia64.c ============================================================================== --- projects/binutils-2.17/contrib/gcc/config/ia64/ia64.c Thu Nov 18 18:30:03 2010 (r215464) +++ projects/binutils-2.17/contrib/gcc/config/ia64/ia64.c Thu Nov 18 18:49:04 2010 (r215465) @@ -250,6 +250,10 @@ static section *ia64_select_rtx_section static void ia64_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; static unsigned int ia64_section_type_flags (tree, const char *, int); +static void ia64_hpux_add_extern_decl (tree decl) + ATTRIBUTE_UNUSED; +static void ia64_hpux_file_end (void) + ATTRIBUTE_UNUSED; static void ia64_init_libfuncs (void) ATTRIBUTE_UNUSED; static void ia64_hpux_init_libfuncs (void) @@ -5011,6 +5015,49 @@ ia64_secondary_reload_class (enum reg_cl } +/* Emit text to declare externally defined variables and functions, because + the Intel assembler does not support undefined externals. */ + +void +ia64_asm_output_external (FILE *file, tree decl, const char *name) +{ + int save_referenced; + + /* GNU as does not need anything here, but the HP linker does need + something for external functions. */ + + if (TARGET_GNU_AS + && (!TARGET_HPUX_LD + || TREE_CODE (decl) != FUNCTION_DECL + || strstr (name, "__builtin_") == name)) + return; + + /* ??? The Intel assembler creates a reference that needs to be satisfied by + the linker when we do this, so we need to be careful not to do this for + builtin functions which have no library equivalent. Unfortunately, we + can't tell here whether or not a function will actually be called by + expand_expr, so we pull in library functions even if we may not need + them later. */ + if (! strcmp (name, "__builtin_next_arg") + || ! strcmp (name, "alloca") + || ! strcmp (name, "__builtin_constant_p") + || ! strcmp (name, "__builtin_args_info")) + return; + + if (TARGET_HPUX_LD) + ia64_hpux_add_extern_decl (decl); + else + { + /* assemble_name will set TREE_SYMBOL_REFERENCED, so we must save and + restore it. */ + save_referenced = TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)); + if (TREE_CODE (decl) == FUNCTION_DECL) + ASM_OUTPUT_TYPE_DIRECTIVE (file, name, "function"); + (*targetm.asm_out.globalize_label) (file, name); + TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) = save_referenced; + } +} + /* Parse the -mfixed-range= option string. */ static void @@ -9176,33 +9223,55 @@ ia64_hpux_function_arg_padding (enum mac return DEFAULT_FUNCTION_ARG_PADDING (mode, type); } -/* Emit text to declare externally defined variables and functions, because - the Intel assembler does not support undefined externals. */ +/* Linked list of all external functions that are to be emitted by GCC. + We output the name if and only if TREE_SYMBOL_REFERENCED is set in + order to avoid putting out names that are never really used. */ -void -ia64_asm_output_external (FILE *file, tree decl, const char *name) +struct extern_func_list GTY(()) { - /* We output the name if and only if TREE_SYMBOL_REFERENCED is - set in order to avoid putting out names that are never really - used. */ - if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))) - { - /* maybe_assemble_visibility will return 1 if the assembler - visibility directive is outputed. */ - int need_visibility = ((*targetm.binds_local_p) (decl) - && maybe_assemble_visibility (decl)); - - /* GNU as does not need anything here, but the HP linker does - need something for external functions. */ - if ((TARGET_HPUX_LD || !TARGET_GNU_AS) - && TREE_CODE (decl) == FUNCTION_DECL) - { - ASM_OUTPUT_TYPE_DIRECTIVE (file, name, "function"); - (*targetm.asm_out.globalize_label) (file, name); - } - else if (need_visibility && !TARGET_GNU_AS) - (*targetm.asm_out.globalize_label) (file, name); + struct extern_func_list *next; + tree decl; +}; + +static GTY(()) struct extern_func_list *extern_func_head; + +static void +ia64_hpux_add_extern_decl (tree decl) +{ + struct extern_func_list *p = ggc_alloc (sizeof (struct extern_func_list)); + + p->decl = decl; + p->next = extern_func_head; + extern_func_head = p; +} + +/* Print out the list of used global functions. */ + +static void +ia64_hpux_file_end (void) +{ + struct extern_func_list *p; + + for (p = extern_func_head; p; p = p->next) + { + tree decl = p->decl; + tree id = DECL_ASSEMBLER_NAME (decl); + + gcc_assert (id); + + if (!TREE_ASM_WRITTEN (decl) && TREE_SYMBOL_REFERENCED (id)) + { + const char *name = XSTR (XEXP (DECL_RTL (decl), 0), 0); + + TREE_ASM_WRITTEN (decl) = 1; + (*targetm.asm_out.globalize_label) (asm_out_file, name); + fputs (TYPE_ASM_OP, asm_out_file); + assemble_name (asm_out_file, name); + fprintf (asm_out_file, "," TYPE_OPERAND_FMT "\n", "function"); + } } + + extern_func_head = 0; } /* Set SImode div/mod functions, init_integral_libfuncs only initializes Modified: projects/binutils-2.17/contrib/gcc/output.h ============================================================================== --- projects/binutils-2.17/contrib/gcc/output.h Thu Nov 18 18:30:03 2010 (r215464) +++ projects/binutils-2.17/contrib/gcc/output.h Thu Nov 18 18:49:04 2010 (r215465) @@ -200,9 +200,9 @@ extern void assemble_variable (tree, int DONT_OUTPUT_DATA is from assemble_variable. */ extern void align_variable (tree decl, bool dont_output_data); -/* Queue for outputing something to declare an external symbol to the - assembler. (Most assemblers don't need this, so we normally output - nothing.) Do nothing if DECL is not external. */ +/* Output something to declare an external symbol to the assembler. + (Most assemblers don't need this, so we normally output nothing.) + Do nothing if DECL is not external. */ extern void assemble_external (tree); /* Assemble code to leave SIZE bytes of zeros. */ @@ -607,10 +607,6 @@ extern void default_file_start (void); extern void file_end_indicate_exec_stack (void); extern bool default_valid_pointer_mode (enum machine_mode); -extern void default_elf_asm_output_external (FILE *file, tree, - const char *); -extern int maybe_assemble_visibility (tree); - extern int default_address_cost (rtx); /* dbxout helper functions */ Modified: projects/binutils-2.17/contrib/gcc/toplev.c ============================================================================== --- projects/binutils-2.17/contrib/gcc/toplev.c Thu Nov 18 18:30:03 2010 (r215464) +++ projects/binutils-2.17/contrib/gcc/toplev.c Thu Nov 18 18:49:04 2010 (r215465) @@ -1080,7 +1080,9 @@ compile_file (void) dw2_output_indirect_constants (); - /* Flush any pending external directives. */ + /* Flush any pending external directives. cgraph did this for + assemble_external calls from the front end, but the RTL + expander can also generate them. */ process_pending_assemble_externals (); /* Attach a special .ident directive to the end of the file to identify Modified: projects/binutils-2.17/contrib/gcc/varasm.c ============================================================================== --- projects/binutils-2.17/contrib/gcc/varasm.c Thu Nov 18 18:30:03 2010 (r215464) +++ projects/binutils-2.17/contrib/gcc/varasm.c Thu Nov 18 18:49:04 2010 (r215465) @@ -126,6 +126,7 @@ static unsigned HOST_WIDE_INT array_size static unsigned min_align (unsigned, unsigned); static void output_constructor (tree, unsigned HOST_WIDE_INT, unsigned int); static void globalize_decl (tree); +static void maybe_assemble_visibility (tree); #ifdef BSS_SECTION_ASM_OP #ifdef ASM_OUTPUT_BSS static void asm_output_bss (FILE *, tree, const char *, @@ -1956,10 +1957,11 @@ assemble_external (tree decl ATTRIBUTE_U if (!DECL_P (decl) || !DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl)) return; - /* We want to output external symbols at very last to check if they - are references or not. */ - pending_assemble_externals = tree_cons (0, decl, - pending_assemble_externals); + if (flag_unit_at_a_time) + pending_assemble_externals = tree_cons (0, decl, + pending_assemble_externals); + else + assemble_external_real (decl); #endif } @@ -5062,18 +5064,13 @@ default_assemble_visibility (tree decl, /* A helper function to call assemble_visibility when needed for a decl. */ -int +static void maybe_assemble_visibility (tree decl) { enum symbol_visibility vis = DECL_VISIBILITY (decl); if (vis != VISIBILITY_DEFAULT) - { - targetm.asm_out.visibility (decl, vis); - return 1; - } - else - return 0; + targetm.asm_out.visibility (decl, vis); } /* Returns 1 if the target configuration supports defining public symbols @@ -6227,19 +6224,4 @@ output_object_blocks (void) htab_traverse (object_block_htab, output_object_block_htab, NULL); } -/* Emit text to declare externally defined symbols. It is needed to - properly support non-default visibility. */ -void -default_elf_asm_output_external (FILE *file ATTRIBUTE_UNUSED, - tree decl, - const char *name ATTRIBUTE_UNUSED) -{ - /* We output the name if and only if TREE_SYMBOL_REFERENCED is - set in order to avoid putting out names that are never really - used. */ - if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) - && targetm.binds_local_p (decl)) - maybe_assemble_visibility (decl); -} - #include "gt-varasm.h" From owner-svn-src-projects@FreeBSD.ORG Fri Nov 19 18:32:09 2010 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 9CABE10656AD; Fri, 19 Nov 2010 18:32:09 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 881758FC18; Fri, 19 Nov 2010 18:32:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oAJIW9BD085106; Fri, 19 Nov 2010 18:32:09 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAJIW8Kn085062; Fri, 19 Nov 2010 18:32:08 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201011191832.oAJIW8Kn085062@svn.freebsd.org> From: Attilio Rao Date: Fri, 19 Nov 2010 18:32: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: r215542 - in projects/sv: . bin/echo bin/sh bin/sh/bltin bin/sh/funcs cddl contrib/binutils/bfd contrib/bzip2 contrib/compiler-rt contrib/ipfilter/man contrib/top contrib/xz contrib/xz/... 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, 19 Nov 2010 18:32:09 -0000 Author: attilio Date: Fri Nov 19 18:32:08 2010 New Revision: 215542 URL: http://svn.freebsd.org/changeset/base/215542 Log: MFC Added: projects/sv/contrib/compiler-rt/ - copied from r215540, head/contrib/compiler-rt/ projects/sv/contrib/xz/po/xz.pot - copied unchanged from r215540, head/contrib/xz/po/xz.pot projects/sv/crypto/openssh/openbsd-compat/strptime.c - copied unchanged from r215540, head/crypto/openssh/openbsd-compat/strptime.c projects/sv/etc/periodic/security/110.neggrpperm - copied unchanged from r215540, head/etc/periodic/security/110.neggrpperm projects/sv/lib/libblocksruntime/ - copied from r215540, head/lib/libblocksruntime/ projects/sv/lib/libcompiler_rt/ - copied from r215540, head/lib/libcompiler_rt/ projects/sv/share/man/man4/usb_quirk.4 - copied unchanged from r215540, head/share/man/man4/usb_quirk.4 projects/sv/share/mk/bsd.crunchgen.mk - copied unchanged from r215540, head/share/mk/bsd.crunchgen.mk projects/sv/sys/arm/xscale/ixp425/cambria_gpio.c - copied unchanged from r215540, head/sys/arm/xscale/ixp425/cambria_gpio.c projects/sv/sys/mips/atheros/std.ar71xx - copied unchanged from r215540, head/sys/mips/atheros/std.ar71xx projects/sv/sys/mips/conf/std.SWARM - copied unchanged from r215540, head/sys/mips/conf/std.SWARM projects/sv/sys/mips/sentry5/std.sentry5 - copied unchanged from r215540, head/sys/mips/sentry5/std.sentry5 projects/sv/sys/mips/sibyte/std.sibyte - copied unchanged from r215540, head/sys/mips/sibyte/std.sibyte projects/sv/sys/netinet/cc/ - copied from r215540, head/sys/netinet/cc/ projects/sv/sys/netinet/cc.h - copied unchanged from r215540, head/sys/netinet/cc.h projects/sv/sys/powerpc/ofw/ofw_machdep.c - copied unchanged from r215540, head/sys/powerpc/ofw/ofw_machdep.c projects/sv/sys/x86/acpica/acpi_apm.c - copied unchanged from r215540, head/sys/x86/acpica/acpi_apm.c projects/sv/sys/x86/include/apm_bios.h - copied unchanged from r215540, head/sys/x86/include/apm_bios.h projects/sv/sys/x86/include/mptable.h - copied unchanged from r215540, head/sys/x86/include/mptable.h projects/sv/tools/regression/netinet/arphold/ - copied from r215540, head/tools/regression/netinet/arphold/ projects/sv/usr.sbin/bluetooth/ath3kfw/ - copied from r215540, head/usr.sbin/bluetooth/ath3kfw/ Deleted: projects/sv/bin/sh/bltin/echo.1 projects/sv/crypto/openssh/ssh-pkcs11-helper.0 projects/sv/gnu/usr.bin/binutils/as/powerpc64-freebsd/ projects/sv/gnu/usr.bin/binutils/gasp/ projects/sv/gnu/usr.bin/binutils/gdb/ projects/sv/gnu/usr.bin/binutils/gdbreplay/ projects/sv/gnu/usr.bin/binutils/libopcodes/Makefile.powerpc64 projects/sv/lib/libautofs/ projects/sv/lib/libc_r/ projects/sv/sbin/mount_autofs/ projects/sv/share/man/man8/MAKEDEV.8 projects/sv/sys/amd64/include/mptable.h projects/sv/sys/amd64/include/mutex.h projects/sv/sys/arm/include/mutex.h projects/sv/sys/boot/pc98/libpc98/i386_module.c projects/sv/sys/i386/acpica/Makefile projects/sv/sys/i386/acpica/genwakecode.sh projects/sv/sys/i386/include/mptable.h projects/sv/sys/i386/include/mutex.h projects/sv/sys/ia64/include/mutex.h projects/sv/sys/mips/conf/SWARM_COMMON projects/sv/sys/mips/include/mutex.h projects/sv/sys/pc98/include/mptable.h projects/sv/sys/pc98/include/mutex.h projects/sv/sys/powerpc/aim/ofw_machdep.c projects/sv/sys/powerpc/include/mutex.h projects/sv/sys/sparc64/include/mutex.h projects/sv/sys/sun4v/include/mutex.h Modified: projects/sv/Makefile projects/sv/Makefile.inc1 projects/sv/ObsoleteFiles.inc projects/sv/README projects/sv/UPDATING projects/sv/bin/echo/echo.1 projects/sv/bin/sh/Makefile projects/sv/bin/sh/bltin/bltin.h projects/sv/bin/sh/builtins.def projects/sv/bin/sh/funcs/suspend projects/sv/bin/sh/output.c projects/sv/bin/sh/output.h projects/sv/bin/sh/sh.1 projects/sv/bin/sh/var.c projects/sv/cddl/Makefile.inc projects/sv/contrib/binutils/bfd/config.bfd projects/sv/contrib/binutils/bfd/opncls.c projects/sv/contrib/bzip2/CHANGES projects/sv/contrib/bzip2/LICENSE projects/sv/contrib/bzip2/Makefile projects/sv/contrib/bzip2/Makefile-libbz2_so projects/sv/contrib/bzip2/README projects/sv/contrib/bzip2/README.COMPILATION.PROBLEMS projects/sv/contrib/bzip2/blocksort.c projects/sv/contrib/bzip2/bzip2.1 projects/sv/contrib/bzip2/bzip2.c projects/sv/contrib/bzip2/bzip2recover.c projects/sv/contrib/bzip2/bzlib.c projects/sv/contrib/bzip2/bzlib.h projects/sv/contrib/bzip2/bzlib_private.h projects/sv/contrib/bzip2/compress.c projects/sv/contrib/bzip2/crctable.c projects/sv/contrib/bzip2/decompress.c projects/sv/contrib/bzip2/huffman.c projects/sv/contrib/bzip2/randtable.c projects/sv/contrib/bzip2/spewG.c projects/sv/contrib/bzip2/unzcrash.c projects/sv/contrib/ipfilter/man/ipnat.8 projects/sv/contrib/ipfilter/man/mkfilters.1 projects/sv/contrib/top/commands.c projects/sv/contrib/xz/ChangeLog projects/sv/contrib/xz/TODO projects/sv/contrib/xz/po/cs.po projects/sv/contrib/xz/po/de.po projects/sv/contrib/xz/po/it.po projects/sv/contrib/xz/src/common/sysdefs.h projects/sv/contrib/xz/src/liblzma/api/lzma.h projects/sv/contrib/xz/src/liblzma/api/lzma/base.h projects/sv/contrib/xz/src/liblzma/api/lzma/bcj.h projects/sv/contrib/xz/src/liblzma/api/lzma/block.h projects/sv/contrib/xz/src/liblzma/api/lzma/container.h projects/sv/contrib/xz/src/liblzma/api/lzma/filter.h projects/sv/contrib/xz/src/liblzma/api/lzma/hardware.h projects/sv/contrib/xz/src/liblzma/api/lzma/index.h projects/sv/contrib/xz/src/liblzma/api/lzma/index_hash.h projects/sv/contrib/xz/src/liblzma/api/lzma/lzma.h projects/sv/contrib/xz/src/liblzma/api/lzma/stream_flags.h projects/sv/contrib/xz/src/liblzma/api/lzma/version.h projects/sv/contrib/xz/src/liblzma/api/lzma/vli.h projects/sv/contrib/xz/src/liblzma/common/common.c projects/sv/contrib/xz/src/liblzma/common/filter_encoder.c projects/sv/contrib/xz/src/liblzma/common/filter_encoder.h projects/sv/contrib/xz/src/liblzma/common/index.c projects/sv/contrib/xz/src/liblzma/common/index_decoder.c projects/sv/contrib/xz/src/liblzma/common/index_encoder.c projects/sv/contrib/xz/src/liblzma/lzma/lzma2_decoder.c projects/sv/contrib/xz/src/liblzma/lzma/lzma_decoder.c projects/sv/contrib/xz/src/liblzma/lzma/lzma_encoder.c projects/sv/contrib/xz/src/xz/message.c projects/sv/contrib/xz/src/xz/message.h projects/sv/contrib/xz/src/xz/signals.c projects/sv/crypto/openssh/ChangeLog projects/sv/crypto/openssh/PROTOCOL.certkeys projects/sv/crypto/openssh/PROTOCOL.mux projects/sv/crypto/openssh/README projects/sv/crypto/openssh/auth-options.c projects/sv/crypto/openssh/auth-options.h projects/sv/crypto/openssh/auth-rsa.c projects/sv/crypto/openssh/auth.c projects/sv/crypto/openssh/auth.h projects/sv/crypto/openssh/auth1.c projects/sv/crypto/openssh/auth2-hostbased.c projects/sv/crypto/openssh/auth2-none.c projects/sv/crypto/openssh/auth2-pubkey.c projects/sv/crypto/openssh/authfd.c projects/sv/crypto/openssh/authfile.c projects/sv/crypto/openssh/authfile.h projects/sv/crypto/openssh/bufaux.c projects/sv/crypto/openssh/channels.c projects/sv/crypto/openssh/channels.h projects/sv/crypto/openssh/clientloop.c projects/sv/crypto/openssh/clientloop.h projects/sv/crypto/openssh/config.h projects/sv/crypto/openssh/config.h.in projects/sv/crypto/openssh/jpake.c projects/sv/crypto/openssh/key.c projects/sv/crypto/openssh/key.h projects/sv/crypto/openssh/loginrec.h projects/sv/crypto/openssh/misc.c projects/sv/crypto/openssh/misc.h projects/sv/crypto/openssh/monitor.c projects/sv/crypto/openssh/mux.c projects/sv/crypto/openssh/myproposal.h projects/sv/crypto/openssh/openbsd-compat/openbsd-compat.h projects/sv/crypto/openssh/openbsd-compat/openssl-compat.h projects/sv/crypto/openssh/openbsd-compat/port-tun.c projects/sv/crypto/openssh/openbsd-compat/port-uw.c projects/sv/crypto/openssh/packet.c projects/sv/crypto/openssh/readconf.c projects/sv/crypto/openssh/readconf.h projects/sv/crypto/openssh/scp.c projects/sv/crypto/openssh/servconf.c projects/sv/crypto/openssh/servconf.h projects/sv/crypto/openssh/session.c projects/sv/crypto/openssh/sftp-client.c projects/sv/crypto/openssh/sftp.c projects/sv/crypto/openssh/ssh-add.c projects/sv/crypto/openssh/ssh-agent.c projects/sv/crypto/openssh/ssh-dss.c projects/sv/crypto/openssh/ssh-keygen.1 projects/sv/crypto/openssh/ssh-keygen.c projects/sv/crypto/openssh/ssh-keyscan.c projects/sv/crypto/openssh/ssh-keysign.8 projects/sv/crypto/openssh/ssh-keysign.c projects/sv/crypto/openssh/ssh-pkcs11.c projects/sv/crypto/openssh/ssh-rsa.c projects/sv/crypto/openssh/ssh.1 projects/sv/crypto/openssh/ssh.c projects/sv/crypto/openssh/ssh.h projects/sv/crypto/openssh/ssh_config projects/sv/crypto/openssh/ssh_config.5 projects/sv/crypto/openssh/sshconnect.c projects/sv/crypto/openssh/sshconnect2.c projects/sv/crypto/openssh/sshd.8 projects/sv/crypto/openssh/sshd.c projects/sv/crypto/openssh/sshd_config projects/sv/crypto/openssh/sshd_config.5 projects/sv/crypto/openssh/version.h projects/sv/crypto/openssl/ssl/s3_clnt.c projects/sv/etc/defaults/periodic.conf projects/sv/etc/devd.conf projects/sv/etc/periodic/security/Makefile projects/sv/etc/services projects/sv/gnu/lib/libgcc/Makefile projects/sv/gnu/usr.bin/binutils/Makefile.inc0 projects/sv/gnu/usr.bin/binutils/as/Makefile projects/sv/gnu/usr.bin/binutils/doc/Makefile projects/sv/gnu/usr.bin/binutils/ld/Makefile.amd64 projects/sv/gnu/usr.bin/binutils/ld/Makefile.arm projects/sv/gnu/usr.bin/binutils/ld/Makefile.mips projects/sv/gnu/usr.bin/binutils/libbfd/Makefile projects/sv/gnu/usr.bin/binutils/libbfd/Makefile.arm projects/sv/gnu/usr.bin/binutils/libbfd/Makefile.mips projects/sv/gnu/usr.bin/cc/Makefile.inc projects/sv/gnu/usr.bin/cc/Makefile.tgt projects/sv/gnu/usr.bin/cc/cc_int/Makefile projects/sv/gnu/usr.bin/cc/cc_tools/Makefile projects/sv/gnu/usr.bin/gdb/Makefile.inc projects/sv/gnu/usr.bin/gdb/kgdb/Makefile projects/sv/gnu/usr.bin/gdb/libgdb/Makefile projects/sv/include/readpassphrase.h projects/sv/lib/Makefile projects/sv/lib/clang/clang.build.mk projects/sv/lib/libc/gen/pututxline.c projects/sv/lib/libc/gen/readpassphrase.3 projects/sv/lib/libc/gen/readpassphrase.c projects/sv/lib/libc/include/compat.h projects/sv/lib/libc/powerpc64/sys/brk.S projects/sv/lib/libc/powerpc64/sys/sbrk.S projects/sv/lib/libc/sys/getsockopt.2 projects/sv/lib/libkvm/kvm.c projects/sv/lib/libkvm/kvm_minidump_amd64.c projects/sv/lib/libkvm/kvm_pcpu.c projects/sv/lib/liblzma/Symbol.map projects/sv/lib/liblzma/config.h projects/sv/lib/libusb/libusb.3 projects/sv/lib/libusb/libusb10.c projects/sv/lib/libusb/libusb10_io.c projects/sv/lib/msun/src/e_jn.c projects/sv/lib/msun/src/e_jnf.c projects/sv/libexec/rtld-elf/Makefile projects/sv/libexec/tftpd/tftp-utils.c projects/sv/release/picobsd/build/picobsd projects/sv/rescue/rescue/Makefile projects/sv/sbin/camcontrol/camcontrol.c projects/sv/sbin/hastd/primary.c projects/sv/sbin/ifconfig/ifmedia.c projects/sv/sbin/ipfw/ipfw.8 projects/sv/sbin/ipfw/ipfw2.c projects/sv/sbin/ipfw/ipfw2.h projects/sv/sbin/kldstat/kldstat.c projects/sv/sbin/mdconfig/mdconfig.8 projects/sv/sbin/mdconfig/mdconfig.c projects/sv/share/doc/papers/jail/mgt.ms projects/sv/share/doc/smm/01.setup/2.t projects/sv/share/doc/smm/01.setup/4.t projects/sv/share/doc/smm/01.setup/5.t projects/sv/share/doc/smm/01.setup/spell.ok projects/sv/share/man/man1/builtin.1 projects/sv/share/man/man4/Makefile projects/sv/share/man/man4/ada.4 projects/sv/share/man/man4/ata.4 projects/sv/share/man/man4/siftr.4 projects/sv/share/man/man4/u3g.4 projects/sv/share/man/man5/periodic.conf.5 projects/sv/share/man/man5/rc.conf.5 projects/sv/share/man/man5/src.conf.5 projects/sv/share/man/man8/Makefile projects/sv/share/man/man9/Makefile projects/sv/share/man/man9/vflush.9 projects/sv/share/man/man9/vgone.9 projects/sv/share/misc/committers-src.dot projects/sv/share/mk/Makefile projects/sv/share/mk/bsd.cpu.mk projects/sv/share/mk/bsd.endian.mk projects/sv/share/mk/sys.mk projects/sv/sys/amd64/acpica/acpi_machdep.c projects/sv/sys/amd64/amd64/amd64_mem.c projects/sv/sys/amd64/amd64/minidump_machdep.c projects/sv/sys/amd64/amd64/trap.c projects/sv/sys/amd64/include/apm_bios.h projects/sv/sys/amd64/include/minidump.h projects/sv/sys/amd64/include/specialreg.h projects/sv/sys/arm/conf/BWCT.hints projects/sv/sys/arm/conf/CAMBRIA projects/sv/sys/arm/conf/CAMBRIA.hints projects/sv/sys/arm/include/cpuconf.h projects/sv/sys/arm/xscale/ixp425/avila_gpio.c projects/sv/sys/arm/xscale/ixp425/avila_led.c projects/sv/sys/arm/xscale/ixp425/files.avila projects/sv/sys/arm/xscale/ixp425/ixp425.c projects/sv/sys/arm/xscale/ixp425/ixp425_iic.c projects/sv/sys/arm/xscale/ixp425/ixp425_qmgr.c projects/sv/sys/arm/xscale/ixp425/ixp425var.h projects/sv/sys/boot/arm/ixp425/boot2/ixp425_board.c projects/sv/sys/boot/arm/uboot/ldscript.arm projects/sv/sys/boot/fdt/dts/mpc8555cds.dts projects/sv/sys/boot/forth/beastie.4th projects/sv/sys/boot/i386/boot2/boot1.S projects/sv/sys/boot/i386/libi386/i386_module.c projects/sv/sys/boot/ofw/libofw/ofw_copy.c projects/sv/sys/boot/ofw/libofw/ofw_net.c projects/sv/sys/boot/ofw/libofw/openfirm.c projects/sv/sys/boot/ofw/libofw/openfirm.h projects/sv/sys/boot/powerpc/ofw/start.c projects/sv/sys/cam/ata/ata_xpt.c projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c projects/sv/sys/compat/linsysfs/linsysfs.c projects/sv/sys/compat/linux/linux_futex.c projects/sv/sys/compat/linux/linux_futex.h projects/sv/sys/compat/ndis/ntoskrnl_var.h projects/sv/sys/compat/ndis/subr_ntoskrnl.c projects/sv/sys/conf/Makefile.mips projects/sv/sys/conf/files projects/sv/sys/conf/files.amd64 projects/sv/sys/conf/files.i386 projects/sv/sys/conf/files.powerpc projects/sv/sys/conf/ldscript.mips projects/sv/sys/crypto/aesni/aesni_wrap.c projects/sv/sys/dev/acpica/acpi_cpu.c projects/sv/sys/dev/acpica/acpi_hpet.c projects/sv/sys/dev/acpica/acpivar.h projects/sv/sys/dev/arcmsr/arcmsr.c projects/sv/sys/dev/arcmsr/arcmsr.h projects/sv/sys/dev/ata/ata-all.c projects/sv/sys/dev/ata/ata-all.h projects/sv/sys/dev/ata/ata-disk.c projects/sv/sys/dev/ata/ata-pci.h projects/sv/sys/dev/ata/ata-sata.c projects/sv/sys/dev/ata/chipsets/ata-via.c projects/sv/sys/dev/atkbdc/psm.c projects/sv/sys/dev/bce/if_bce.c projects/sv/sys/dev/bge/if_bge.c projects/sv/sys/dev/drm/drmP.h projects/sv/sys/dev/drm/drm_agpsupport.c projects/sv/sys/dev/drm/drm_drv.c projects/sv/sys/dev/drm/drm_memory.c projects/sv/sys/dev/drm/drm_sysctl.c projects/sv/sys/dev/drm/r300_reg.h projects/sv/sys/dev/drm/radeon_cs.c projects/sv/sys/dev/firewire/00README projects/sv/sys/dev/gpio/gpiobus.c projects/sv/sys/dev/gpio/gpioc.c projects/sv/sys/dev/isp/isp_freebsd.c projects/sv/sys/dev/ixgbe/ixgbe.c projects/sv/sys/dev/mii/atphy.c projects/sv/sys/dev/mii/brgphy.c projects/sv/sys/dev/mii/ciphy.c projects/sv/sys/dev/mii/e1000phy.c projects/sv/sys/dev/mii/gentbi.c projects/sv/sys/dev/mii/ip1000phy.c projects/sv/sys/dev/mii/jmphy.c projects/sv/sys/dev/mii/mii.c projects/sv/sys/dev/mii/mii.h projects/sv/sys/dev/mii/mii_physubr.c projects/sv/sys/dev/mii/miivar.h projects/sv/sys/dev/mii/nsgphy.c projects/sv/sys/dev/mii/rgephy.c projects/sv/sys/dev/mii/smcphy.c projects/sv/sys/dev/mii/ukphy_subr.c projects/sv/sys/dev/mii/xmphy.c projects/sv/sys/dev/mpt/mpt.h projects/sv/sys/dev/msk/if_msk.c projects/sv/sys/dev/nfe/if_nfe.c projects/sv/sys/dev/nfe/if_nfereg.h projects/sv/sys/dev/nfe/if_nfevar.h projects/sv/sys/dev/ofw/ofw_fdt.c projects/sv/sys/dev/ofw/openfirm.c projects/sv/sys/dev/pccard/pccardvar.h projects/sv/sys/dev/re/if_re.c projects/sv/sys/dev/sound/sbus/cs4231.c projects/sv/sys/dev/stge/if_stge.c projects/sv/sys/dev/syscons/schistory.c projects/sv/sys/dev/tdfx/tdfx_pci.c projects/sv/sys/dev/uart/uart_subr.c projects/sv/sys/dev/usb/input/uhid.c projects/sv/sys/dev/usb/net/if_ruereg.h projects/sv/sys/dev/usb/quirk/usb_quirk.c projects/sv/sys/dev/usb/quirk/usb_quirk.h projects/sv/sys/dev/usb/serial/u3g.c projects/sv/sys/dev/usb/usbdevs projects/sv/sys/dev/xl/if_xl.c projects/sv/sys/fs/nwfs/nwfs_vnops.c projects/sv/sys/geom/eli/g_eli.c projects/sv/sys/geom/part/g_part.c projects/sv/sys/i386/acpica/acpi_machdep.c projects/sv/sys/i386/acpica/acpi_wakecode.S projects/sv/sys/i386/acpica/acpi_wakeup.c projects/sv/sys/i386/bios/apm.c projects/sv/sys/i386/i386/i686_mem.c projects/sv/sys/i386/i386/initcpu.c projects/sv/sys/i386/i386/trap.c projects/sv/sys/i386/include/apm_bios.h projects/sv/sys/i386/include/specialreg.h projects/sv/sys/i386/xen/mptable.c projects/sv/sys/i386/xen/pmap.c projects/sv/sys/ia64/ia64/db_machdep.c projects/sv/sys/ia64/ia64/genassym.c projects/sv/sys/ia64/ia64/machdep.c projects/sv/sys/kern/kern_clock.c projects/sv/sys/kern/kern_clocksource.c projects/sv/sys/kern/kern_mutex.c projects/sv/sys/kern/kern_proc.c projects/sv/sys/kern/kern_rmlock.c projects/sv/sys/kern/kern_tc.c projects/sv/sys/kern/kern_umtx.c projects/sv/sys/kern/link_elf_obj.c projects/sv/sys/kern/p1003_1b.c projects/sv/sys/kern/posix4_mib.c projects/sv/sys/kern/sched_4bsd.c projects/sv/sys/kern/sched_ule.c projects/sv/sys/kern/subr_bus.c projects/sv/sys/kern/subr_clock.c projects/sv/sys/kern/subr_lock.c projects/sv/sys/kern/subr_pcpu.c projects/sv/sys/kern/sysv_sem.c projects/sv/sys/kern/uipc_socket.c projects/sv/sys/kern/vfs_cache.c projects/sv/sys/kern/vfs_mountroot.c projects/sv/sys/kern/vfs_subr.c projects/sv/sys/libkern/gets.c projects/sv/sys/mips/adm5120/std.adm5120 projects/sv/sys/mips/alchemy/std.alchemy projects/sv/sys/mips/cavium/std.octeon1 projects/sv/sys/mips/conf/ADM5120 projects/sv/sys/mips/conf/ALCHEMY projects/sv/sys/mips/conf/AR71XX projects/sv/sys/mips/conf/DEFAULTS projects/sv/sys/mips/conf/MALTA projects/sv/sys/mips/conf/MALTA64 projects/sv/sys/mips/conf/OCTEON1 projects/sv/sys/mips/conf/OCTEON1-32 projects/sv/sys/mips/conf/QEMU projects/sv/sys/mips/conf/SENTRY5 projects/sv/sys/mips/conf/SWARM projects/sv/sys/mips/conf/SWARM64 projects/sv/sys/mips/conf/SWARM64_SMP projects/sv/sys/mips/conf/SWARM_SMP projects/sv/sys/mips/conf/XLR projects/sv/sys/mips/conf/XLR64 projects/sv/sys/mips/conf/XLRN32 projects/sv/sys/mips/idt/std.idt projects/sv/sys/mips/mips/tick.c projects/sv/sys/mips/mips/vm_machdep.c projects/sv/sys/mips/rmi/tick.c projects/sv/sys/modules/Makefile projects/sv/sys/modules/acpi/acpi/Makefile projects/sv/sys/net/flowtable.c projects/sv/sys/net/if.c projects/sv/sys/net/if_clone.c projects/sv/sys/net/if_ethersubr.c projects/sv/sys/net/if_gif.c projects/sv/sys/net/if_llatbl.c projects/sv/sys/net/if_llatbl.h projects/sv/sys/net/if_loop.c projects/sv/sys/net/if_media.h projects/sv/sys/net/route.c projects/sv/sys/net/vnet.c projects/sv/sys/net/vnet.h projects/sv/sys/net80211/ieee80211_ratectl.h projects/sv/sys/net80211/ieee80211_ratectl_none.c projects/sv/sys/netgraph/ng_base.c projects/sv/sys/netgraph/ng_eiface.c projects/sv/sys/netgraph/ng_iface.c projects/sv/sys/netinet/if_ether.c projects/sv/sys/netinet/igmp.c projects/sv/sys/netinet/in.c projects/sv/sys/netinet/in_pcb.c projects/sv/sys/netinet/in_rmx.c projects/sv/sys/netinet/ip_divert.c projects/sv/sys/netinet/ip_fastfwd.c projects/sv/sys/netinet/ip_fw.h projects/sv/sys/netinet/ip_icmp.c projects/sv/sys/netinet/ip_input.c projects/sv/sys/netinet/ip_ipsec.c projects/sv/sys/netinet/ip_mroute.c projects/sv/sys/netinet/ipfw/ip_fw2.c projects/sv/sys/netinet/ipfw/ip_fw_dynamic.c projects/sv/sys/netinet/ipfw/ip_fw_nat.c projects/sv/sys/netinet/ipfw/ip_fw_pfil.c projects/sv/sys/netinet/ipfw/ip_fw_sockopt.c projects/sv/sys/netinet/libalias/alias_sctp.c projects/sv/sys/netinet/libalias/alias_sctp.h projects/sv/sys/netinet/sctp.h projects/sv/sys/netinet/sctp_crc32.c projects/sv/sys/netinet/sctp_os_bsd.h projects/sv/sys/netinet/sctp_output.c projects/sv/sys/netinet/sctp_pcb.c projects/sv/sys/netinet/sctp_uio.h projects/sv/sys/netinet/sctp_usrreq.c projects/sv/sys/netinet/sctputil.c projects/sv/sys/netinet/siftr.c projects/sv/sys/netinet/tcp.h projects/sv/sys/netinet/tcp_hostcache.c projects/sv/sys/netinet/tcp_input.c projects/sv/sys/netinet/tcp_output.c projects/sv/sys/netinet/tcp_reass.c projects/sv/sys/netinet/tcp_sack.c projects/sv/sys/netinet/tcp_subr.c projects/sv/sys/netinet/tcp_syncache.c projects/sv/sys/netinet/tcp_timer.c projects/sv/sys/netinet/tcp_timewait.c projects/sv/sys/netinet/tcp_usrreq.c projects/sv/sys/netinet/tcp_var.h projects/sv/sys/netinet/udp_usrreq.c projects/sv/sys/netinet6/frag6.c projects/sv/sys/netinet6/icmp6.c projects/sv/sys/netinet6/in6_rmx.c projects/sv/sys/netinet6/in6_src.c projects/sv/sys/netinet6/ip6_ipsec.c projects/sv/sys/netinet6/ip6_mroute.c projects/sv/sys/netinet6/mld6.c projects/sv/sys/netinet6/nd6.c projects/sv/sys/netinet6/nd6_nbr.c projects/sv/sys/netinet6/nd6_rtr.c projects/sv/sys/netinet6/scope6.c projects/sv/sys/netipsec/key.c projects/sv/sys/netipsec/keysock.c projects/sv/sys/netipsec/xform_esp.c projects/sv/sys/opencrypto/cryptosoft.c projects/sv/sys/pc98/include/apm_bios.h projects/sv/sys/powerpc/aim/clock.c projects/sv/sys/powerpc/aim/machdep.c projects/sv/sys/powerpc/aim/mmu_oea.c projects/sv/sys/powerpc/aim/mmu_oea64.c projects/sv/sys/powerpc/aim/mp_cpudep.c projects/sv/sys/powerpc/aim/nexus.c projects/sv/sys/powerpc/aim/slb.c projects/sv/sys/powerpc/aim/trap_subr32.S projects/sv/sys/powerpc/booke/clock.c projects/sv/sys/powerpc/booke/locore.S projects/sv/sys/powerpc/booke/machdep.c projects/sv/sys/powerpc/booke/pmap.c projects/sv/sys/powerpc/booke/trap_subr.S projects/sv/sys/powerpc/include/cpufunc.h projects/sv/sys/powerpc/include/platform.h projects/sv/sys/powerpc/include/spr.h projects/sv/sys/powerpc/include/tlb.h projects/sv/sys/powerpc/powermac/smu.c projects/sv/sys/powerpc/powerpc/cpu.c projects/sv/sys/powerpc/powerpc/mp_machdep.c projects/sv/sys/powerpc/powerpc/platform.c projects/sv/sys/powerpc/powerpc/platform_if.m projects/sv/sys/security/mac_portacl/mac_portacl.c projects/sv/sys/sparc64/include/vmparam.h projects/sv/sys/sparc64/pci/psycho.c projects/sv/sys/sparc64/pci/schizo.c projects/sv/sys/sun4v/include/pmap.h projects/sv/sys/sun4v/include/smp.h projects/sv/sys/sun4v/sun4v/mp_machdep.c projects/sv/sys/sys/bus.h projects/sv/sys/sys/cdefs.h projects/sv/sys/sys/kernel.h projects/sv/sys/sys/libkern.h projects/sv/sys/sys/linker_set.h projects/sv/sys/sys/mutex.h projects/sv/sys/sys/param.h projects/sv/sys/sys/pcpu.h projects/sv/sys/sys/signal.h projects/sv/sys/sys/smp.h projects/sv/sys/sys/socket.h projects/sv/sys/sys/socketvar.h projects/sv/sys/ufs/ffs/ffs_inode.c projects/sv/sys/ufs/ffs/ffs_softdep.c projects/sv/sys/ufs/ffs/fs.h projects/sv/sys/ufs/ufs/ufs_vnops.c projects/sv/sys/vm/vm_contig.c projects/sv/sys/vm/vm_map.c projects/sv/sys/vm/vm_mmap.c projects/sv/sys/vm/vm_object.c projects/sv/sys/vm/vm_page.c projects/sv/sys/vm/vm_pageout.c projects/sv/sys/vm/vm_pageout.h projects/sv/sys/vm/vm_reserv.c projects/sv/sys/x86/cpufreq/hwpstate.c projects/sv/sys/x86/x86/mptable.c projects/sv/sys/x86/x86/mptable_pci.c projects/sv/tools/build/mk/OptionalObsoleteFiles.inc projects/sv/tools/tools/mctest/mctest.cc projects/sv/tools/tools/nanobsd/nanobsd.sh projects/sv/usr.bin/at/at.c projects/sv/usr.bin/calendar/calendars/calendar.freebsd projects/sv/usr.bin/chkey/chkey.c projects/sv/usr.bin/lex/Makefile projects/sv/usr.bin/lex/initscan.c projects/sv/usr.bin/netstat/if.c projects/sv/usr.bin/netstat/inet.c projects/sv/usr.bin/netstat/main.c projects/sv/usr.bin/netstat/netstat.1 projects/sv/usr.bin/netstat/netstat.h projects/sv/usr.bin/printf/printf.1 projects/sv/usr.bin/printf/printf.c projects/sv/usr.bin/seq/seq.c projects/sv/usr.bin/top/top.local.1 projects/sv/usr.bin/truss/main.c projects/sv/usr.bin/yacc/reader.c projects/sv/usr.sbin/bluetooth/Makefile projects/sv/usr.sbin/config/SMM.doc/6.t projects/sv/usr.sbin/config/SMM.doc/spell.ok projects/sv/usr.sbin/config/configvers.h projects/sv/usr.sbin/freebsd-update/freebsd-update.sh projects/sv/usr.sbin/iostat/iostat.8 projects/sv/usr.sbin/iostat/iostat.c projects/sv/usr.sbin/mfiutil/mfi_config.c projects/sv/usr.sbin/mfiutil/mfi_evt.c projects/sv/usr.sbin/mfiutil/mfi_flash.c projects/sv/usr.sbin/mptutil/mpt_cam.c projects/sv/usr.sbin/mptutil/mpt_cmd.c projects/sv/usr.sbin/mptutil/mpt_config.c projects/sv/usr.sbin/mptutil/mpt_drive.c projects/sv/usr.sbin/mptutil/mpt_evt.c projects/sv/usr.sbin/mptutil/mpt_show.c projects/sv/usr.sbin/mptutil/mpt_volume.c projects/sv/usr.sbin/pc-sysinstall/backend/functions-disk.sh projects/sv/usr.sbin/sysinstall/cdrom.c projects/sv/usr.sbin/sysinstall/config.c projects/sv/usr.sbin/sysinstall/help/shortcuts.hlp projects/sv/usr.sbin/sysinstall/install.c projects/sv/usr.sbin/sysinstall/media.c projects/sv/usr.sbin/sysinstall/menus.c projects/sv/usr.sbin/sysinstall/sysinstall.8 projects/sv/usr.sbin/sysinstall/sysinstall.h projects/sv/usr.sbin/usbconfig/usbconfig.8 Directory Properties: projects/sv/ (props changed) projects/sv/cddl/contrib/opensolaris/ (props changed) projects/sv/contrib/bind9/ (props changed) projects/sv/contrib/binutils/ (props changed) projects/sv/contrib/bzip2/ (props changed) projects/sv/contrib/ee/ (props changed) projects/sv/contrib/expat/ (props changed) projects/sv/contrib/file/ (props changed) projects/sv/contrib/gdb/ (props changed) projects/sv/contrib/gdtoa/ (props changed) projects/sv/contrib/gnu-sort/ (props changed) projects/sv/contrib/groff/ (props changed) projects/sv/contrib/less/ (props changed) projects/sv/contrib/libpcap/ (props changed) projects/sv/contrib/llvm/ (props changed) projects/sv/contrib/llvm/tools/clang/ (props changed) projects/sv/contrib/ncurses/ (props changed) projects/sv/contrib/netcat/ (props changed) projects/sv/contrib/ntp/ (props changed) projects/sv/contrib/one-true-awk/ (props changed) projects/sv/contrib/openbsm/ (props changed) projects/sv/contrib/openpam/ (props changed) projects/sv/contrib/pf/ (props changed) projects/sv/contrib/sendmail/ (props changed) projects/sv/contrib/tcpdump/ (props changed) projects/sv/contrib/tcsh/ (props changed) projects/sv/contrib/top/ (props changed) projects/sv/contrib/top/install-sh (props changed) projects/sv/contrib/tzcode/stdtime/ (props changed) projects/sv/contrib/tzcode/zic/ (props changed) projects/sv/contrib/tzdata/ (props changed) projects/sv/contrib/wpa/ (props changed) projects/sv/contrib/xz/ (props changed) projects/sv/crypto/openssh/ (props changed) projects/sv/crypto/openssl/ (props changed) projects/sv/lib/libc/ (props changed) projects/sv/lib/libc/stdtime/ (props changed) projects/sv/lib/libutil/ (props changed) projects/sv/lib/libz/ (props changed) projects/sv/sbin/ (props changed) projects/sv/sbin/ipfw/ (props changed) projects/sv/share/mk/bsd.arch.inc.mk (props changed) projects/sv/share/zoneinfo/ (props changed) projects/sv/sys/ (props changed) projects/sv/sys/amd64/include/xen/ (props changed) projects/sv/sys/cddl/contrib/opensolaris/ (props changed) projects/sv/sys/contrib/dev/acpica/ (props changed) projects/sv/sys/contrib/pf/ (props changed) projects/sv/sys/contrib/x86emu/ (props changed) projects/sv/sys/dev/xen/xenpci/ (props changed) projects/sv/usr.bin/calendar/ (props changed) projects/sv/usr.bin/csup/ (props changed) projects/sv/usr.bin/procstat/ (props changed) projects/sv/usr.sbin/zic/ (props changed) Modified: projects/sv/Makefile ============================================================================== --- projects/sv/Makefile Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/Makefile Fri Nov 19 18:32:08 2010 (r215542) @@ -281,7 +281,7 @@ tinderbox: # existing system is. # .if make(universe) || make(universe_kernels) || make(tinderbox) -TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v +TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v mips .if defined(DOING_TINDERBOX) FAILFILE=tinderbox.failed Modified: projects/sv/Makefile.inc1 ============================================================================== --- projects/sv/Makefile.inc1 Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/Makefile.inc1 Fri Nov 19 18:32:08 2010 (r215542) @@ -118,16 +118,31 @@ VERSION+= ${OSRELDATE} # Guess machine architecture from machine type, and vice versa. .if !defined(TARGET_ARCH) && defined(TARGET) -TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/} +TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -TARGET= ${TARGET_ARCH} +TARGET= ${TARGET_ARCH:C/mipse[lb]/mips/:C/armeb/arm/} +.endif +# Legacy names, for a transition period mips:mips -> mipsel:mips +.if defined(TARGET) && defined(TARGET_ARCH) && \ + ${TARGET_ARCH} == "mips" && ${TARGET} == "mips" +.warning "TARGET_ARCH of mips is deprecated in favor of mipsel or mipseb" +.if defined(TARGET_BIG_ENDIAN) +TARGET_ARCH=mipseb +.else +TARGET_ARCH=mipsel +.endif +.endif +# arm with TARGET_BIG_ENDIAN -> armeb +.if defined(TARGET_ARCH) && ${TARGET_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN) +.warning "TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated. use armeb" +TARGET_ARCH=armeb .endif # Otherwise, default to current machine type and architecture. TARGET?= ${MACHINE} TARGET_ARCH?= ${MACHINE_ARCH} -KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 mips powerpc powerpc64/powerpc sparc64 sparc64/sun4v +KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips mipseb/mips powerpc powerpc64/powerpc sparc64 sparc64/sun4v .if ${TARGET} == ${TARGET_ARCH} _t= ${TARGET} .else @@ -307,7 +322,7 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ - -DWITHOUT_HTML -DNO_CTF DESTDIR=${LIB32TMP} + -DWITHOUT_HTML -DNO_CTF -DNO_LINT DESTDIR=${LIB32TMP} LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS .endif @@ -1123,7 +1138,7 @@ libraries: # # static libgcc.a prerequisite for shared libc # -_prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc +_prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc lib/libcompiler_rt # These dependencies are not automatically generated: # @@ -1139,6 +1154,7 @@ _startup_libs+= lib/csu/${MACHINE_ARCH} _startup_libs+= lib/csu/${MACHINE_CPUARCH} .endif _startup_libs+= gnu/lib/libgcc +_startup_libs+= lib/libcompiler_rt _startup_libs+= lib/libc gnu/lib/libgcc__L: lib/libc__L Modified: projects/sv/ObsoleteFiles.inc ============================================================================== --- projects/sv/ObsoleteFiles.inc Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/ObsoleteFiles.inc Fri Nov 19 18:32:08 2010 (r215542) @@ -14,6 +14,14 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20101112: vgonel(9) has gone to private API a while ago +OLD_FILES+=usr/share/man/man9/vgonel.9.gz +# 20101112: removed gasp.info +OLD_FILES+=usr/share/info/gasp.info.gz +# 20101109: headers moved to machine/ to x86/ +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/machine/mptable.h +.endif # 20101101: headers moved to machine/ to x86/ .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" OLD_FILES+=usr/include/machine/apicreg.h @@ -5078,7 +5086,7 @@ OLD_LIBS+=usr/lib/libthr.so.2 .endif # 20060127: revert libdisk to static-only OLD_LIBS+=usr/lib/libdisk.so.3 -# 20051027: libc_r discontinued +# 20051027: libc_r discontinued (removed 20101113) OLD_LIBS+=usr/lib/libc_r.a OLD_LIBS+=usr/lib/libc_r.so OLD_LIBS+=usr/lib/libc_r.so.7 Modified: projects/sv/README ============================================================================== --- projects/sv/README Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/README Fri Nov 19 18:32:08 2010 (r215542) @@ -43,6 +43,9 @@ Source Roadmap: --------------- bin System/user commands. +cddl Various commands and libraries under the Common Development + and Distribution License. + contrib Packages contributed by 3rd parties. crypto Cryptography stuff (see crypto/README). Modified: projects/sv/UPDATING ============================================================================== --- projects/sv/UPDATING Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/UPDATING Fri Nov 19 18:32:08 2010 (r215542) @@ -22,6 +22,39 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20101114: + Generic IEEE 802.3 annex 31B full duplex flow control support has been + added to mii(4) and bge(4), bce(4), msk(4), nfe(4) and stge(4) along + with brgphy(4), e1000phy(4) as well as ip1000phy() have been converted + to take advantage of it instead of using custom implementations. This + means that these drivers now no longer unconditionally advertise + support for flow control but only do so if flow control is a selected + media option. This was implemented in the generic support that way in + order to allow flow control to be switched on and off via ifconfig(8) + with the PHY specific default to typically off in order to protect + from unwanted effects. Consequently, if you used flow control with + one of the above mentioned drivers you now need to explicitly enable + it, for example via: + ifconfig bge0 media auto mediaopt flowcontrol + + Along with the above mentioned changes generic support for setting + 1000baseT master mode also has been added and brgphy(4), ciphy(4), + e1000phy(4) as well as ip1000phy(4) have been converted to take + advantage of it. This means that these drivers now no longer take the + link0 parameter for selecting master mode but the master media option + has to be used instead, for example like in the following: + ifconfig bge0 media 1000baseT mediaopt full-duplex,master + + Selection of master mode now is also available with all other PHY + drivers supporting 1000baseT. + +20101111: + The TCP stack has received a significant update to add support for + modularised congestion control and generally improve the clarity of + congestion control decisions. Bump __FreeBSD_version to 900025. User + space tools that rely on the size of struct tcpcb in tcp_var.h (e.g. + sockstat) need to be recompiled. + 20101002: The man(1) utility has been replaced by a new version that no longer uses /etc/manpath.config. Please consult man.conf(5) for how to Modified: projects/sv/bin/echo/echo.1 ============================================================================== --- projects/sv/bin/echo/echo.1 Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/bin/echo/echo.1 Fri Nov 19 18:32:08 2010 (r215542) @@ -32,7 +32,7 @@ .\" @(#)echo.1 8.1 (Berkeley) 7/22/93 .\" $FreeBSD$ .\" -.Dd April 12, 2003 +.Dd November 12, 2010 .Dt ECHO 1 .Os .Sh NAME @@ -56,24 +56,37 @@ The following option is available: .Bl -tag -width flag .It Fl n Do not print the trailing newline character. -This may also be achieved by appending +.El +.Pp +The end-of-options marker +.Fl Fl +is not recognized and written literally. +.Pp +The newline may also be suppressed by appending .Ql \ec to the end of the string, as is done by iBCS2 compatible systems. -Note that this option as well as the effect of +Note that the +.Fl n +option as well as the effect of .Ql \ec are implementation-defined in .St -p1003.1-2001 as amended by Cor.\& 1-2002. -Applications aiming for maximum -portability are strongly encouraged to use +For portability, +.Nm +should only be used if the first argument does not start with a hyphen +.Pq Ql "-" +and does not contain any backslashes +.Pq Ql "\e" . +If this is not sufficient, .Xr printf 1 -to suppress the newline character. -.El +should be used. .Pp -Some shells may provide a builtin +Most shells provide a builtin .Nm -command which is similar or identical to this utility. +command which tends to differ from this utility +in the treatment of options and backslashes. Consult the .Xr builtin 1 manual page. Modified: projects/sv/bin/sh/Makefile ============================================================================== --- projects/sv/bin/sh/Makefile Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/bin/sh/Makefile Fri Nov 19 18:32:08 2010 (r215542) @@ -5,7 +5,7 @@ PROG= sh INSTALLFLAGS= -S SHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \ histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ - mystring.c options.c output.c parser.c redir.c show.c \ + mystring.c options.c output.c parser.c printf.c redir.c show.c \ test.c trap.c var.c GENSRCS= builtins.c init.c nodes.c syntax.c GENHDRS= builtins.h nodes.h syntax.h token.h @@ -26,7 +26,8 @@ WARNS?= 2 WFORMAT=0 .PATH: ${.CURDIR}/bltin \ - ${.CURDIR}/../test + ${.CURDIR}/../test \ + ${.CURDIR}/../../usr.bin/printf CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \ mksyntax mksyntax.o Modified: projects/sv/bin/sh/bltin/bltin.h ============================================================================== --- projects/sv/bin/sh/bltin/bltin.h Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/bin/sh/bltin/bltin.h Fri Nov 19 18:32:08 2010 (r215542) @@ -54,6 +54,7 @@ #define putchar(c) out1c(c) #define fprintf outfmt #define fputs outstr +#define fwrite(ptr, size, nmemb, file) outbin(ptr, (size) * (nmemb), file) #define fflush flushout #define INITARGS(argv) #define warnx1(a, b, c) { \ Modified: projects/sv/bin/sh/builtins.def ============================================================================== --- projects/sv/bin/sh/builtins.def Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/bin/sh/builtins.def Fri Nov 19 18:32:08 2010 (r215542) @@ -71,7 +71,7 @@ histcmd -h fc jobidcmd jobid jobscmd jobs localcmd local -#printfcmd printf +printfcmd printf pwdcmd pwd readcmd read returncmd -s return Modified: projects/sv/bin/sh/funcs/suspend ============================================================================== --- projects/sv/bin/sh/funcs/suspend Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/bin/sh/funcs/suspend Fri Nov 19 18:32:08 2010 (r215542) @@ -34,6 +34,6 @@ suspend() { local - - set +j + set +m kill -TSTP 0 } Modified: projects/sv/bin/sh/output.c ============================================================================== --- projects/sv/bin/sh/output.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/bin/sh/output.c Fri Nov 19 18:32:08 2010 (r215542) @@ -122,8 +122,7 @@ out2qstr(const char *p) void outstr(const char *p, struct output *file) { - while (*p) - outc(*p++, file); + outbin(p, strlen(p), file); } /* Like outstr(), but quote for re-input into the shell. */ @@ -165,6 +164,16 @@ outqstr(const char *p, struct output *fi outc('\'', file); } +void +outbin(const void *data, size_t len, struct output *file) +{ + const char *p; + + p = data; + while (len-- > 0) + outc(*p++, file); +} + static char out_junk[16]; void @@ -285,17 +294,11 @@ static int doformat_wr(void *cookie, const char *buf, int len) { struct output *o; - int origlen; - unsigned char c; o = (struct output *)cookie; - origlen = len; - while (len-- != 0) { - c = (unsigned char)*buf++; - outc(c, o); - } + outbin(buf, len, o); - return (origlen); + return (len); } void Modified: projects/sv/bin/sh/output.h ============================================================================== --- projects/sv/bin/sh/output.h Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/bin/sh/output.h Fri Nov 19 18:32:08 2010 (r215542) @@ -36,6 +36,7 @@ #ifndef OUTPUT_INCL #include +#include struct output { char *nextc; @@ -59,6 +60,7 @@ void out2str(const char *); void out2qstr(const char *); void outstr(const char *, struct output *); void outqstr(const char *, struct output *); +void outbin(const void *, size_t, struct output *); void emptyoutbuf(struct output *); void flushall(void); void flushout(struct output *); Modified: projects/sv/bin/sh/sh.1 ============================================================================== --- projects/sv/bin/sh/sh.1 Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/bin/sh/sh.1 Fri Nov 19 18:32:08 2010 (r215542) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd October 31, 2010 +.Dd November 19, 2010 .Dt SH 1 .Os .Sh NAME @@ -65,20 +65,13 @@ The utility is the standard command interpreter for the system. The current version of .Nm -is in the process of being changed to -conform with the -.St -p1003.2 +is close to the +.St -p1003.1 specification for the shell. -This version has many features which make -it appear -similar in some respects to the Korn shell, but it is not a Korn -shell clone like -.Nm pdksh . -Only features +It only supports features designated by .Tn POSIX , -plus a few Berkeley extensions, are being -incorporated into this shell. +plus a few Berkeley extensions. This man page is not intended to be a tutorial nor a complete specification of the shell. .Ss Overview @@ -633,6 +626,7 @@ There are two kinds of built-in commands Assignments before special builtins persist after they finish executing and assignment errors, redirection errors and certain operand errors cause a script to be aborted. +Special builtins cannot be overridden with a function. Both regular and special builtins can affect the shell in ways normal programs cannot. .Pp @@ -1275,19 +1269,22 @@ consists of all characters until the mat .Ql } . Any .Ql } -escaped by a backslash or within a single-quoted string, and characters in +escaped by a backslash or within a single-quoted or double-quoted +string, and characters in embedded arithmetic expansions, command substitutions, and variable expansions, are not examined in determining the matching .Ql } . -Except for the variants with +If the variants with .Ql + , .Ql - , .Ql = or -.Ql ?\& , -any +.Ql ?\& +occur within a double-quoted string, +as an extension there may be unquoted parts +(via double-quotes inside the expansion); .Ql } -within a double-quoted string is also not examined in determining the matching +within such parts are also not examined in determining the matching .Ql } . .Pp The simplest form for parameter expansion is: @@ -2052,6 +2049,9 @@ line. See the .Sx Functions subsection. +.It Ic printf +A built-in equivalent of +.Xr printf 1 . .It Ic pwd Op Fl L | P Print the path of the current directory. The built-in command may @@ -2473,6 +2473,7 @@ will return the argument. .Xr echo 1 , .Xr ed 1 , .Xr emacs 1 , +.Xr printf 1 , .Xr pwd 1 , .Xr test 1 , .Xr vi 1 , Modified: projects/sv/bin/sh/var.c ============================================================================== --- projects/sv/bin/sh/var.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/bin/sh/var.c Fri Nov 19 18:32:08 2010 (r215542) @@ -805,6 +805,7 @@ poplocalvars(void) if (vp == NULL) { /* $- saved */ memcpy(optlist, lvp->text, sizeof optlist); ckfree(lvp->text); + optschanged(); } else if ((lvp->flags & (VUNSET|VSTRFIXED)) == VUNSET) { (void)unsetvar(vp->text); } else { Modified: projects/sv/cddl/Makefile.inc ============================================================================== --- projects/sv/cddl/Makefile.inc Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/cddl/Makefile.inc Fri Nov 19 18:32:08 2010 (r215542) @@ -9,3 +9,8 @@ CFLAGS+= -DNEED_SOLARIS_BOOLEAN WARNS?= 6 CSTD?= gnu89 + +# Do not lint the CDDL stuff. It is all externally maintained and +# lint output is wasteful noise here. + +NO_LINT= Modified: projects/sv/contrib/binutils/bfd/config.bfd ============================================================================== --- projects/sv/contrib/binutils/bfd/config.bfd Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/binutils/bfd/config.bfd Fri Nov 19 18:32:08 2010 (r215542) @@ -772,14 +772,18 @@ case "${targ}" in targ_defvec=bfd_elf32_littlemips_vec targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec" ;; - mips*-*-freebsd*) - targ_defvec=bfd_elf32_tradbigmips_vec - targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmisp_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" - ;; mips*-*-netbsd*) targ_defvec=bfd_elf32_bigmips_vec targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec" ;; + mips*el-*-freebsd*) + targ_defvec=bfd_elf32_tradlittlemips_vec + targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf32_ntradbigmisp_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" + ;; + mips*-*-freebsd*) + targ_defvec=bfd_elf32_tradbigmips_vec + targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmisp_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" + ;; mips*-dec-* | mips*el-*-ecoff*) targ_defvec=ecoff_little_vec targ_selvecs=ecoff_big_vec Modified: projects/sv/contrib/binutils/bfd/opncls.c ============================================================================== --- projects/sv/contrib/binutils/bfd/opncls.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/binutils/bfd/opncls.c Fri Nov 19 18:32:08 2010 (r215542) @@ -1151,7 +1151,7 @@ bfd_fill_in_gnu_debuglink_section (bfd * debuglink_size &= ~3; debuglink_size += 4; - contents = malloc (debuglink_size); + contents = bfd_zmalloc (debuglink_size); if (contents == NULL) { /* XXX Should we delete the section from the bfd ? */ Modified: projects/sv/contrib/bzip2/CHANGES ============================================================================== --- projects/sv/contrib/bzip2/CHANGES Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/CHANGES Fri Nov 19 18:32:08 2010 (r215542) @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -317,3 +317,11 @@ Fixes some minor bugs since the last ver ~~~~~~~~~~~~~~~~~ Security fix only. Fixes CERT-FI 20469 as it applies to bzip2. + +1.0.6 (6 Sept 10) +~~~~~~~~~~~~~~~~~ + +* Security fix for CVE-2010-0405. This was reported by Mikolaj + Izdebski. + +* Make the documentation build on Ubuntu 10.04 Modified: projects/sv/contrib/bzip2/LICENSE ============================================================================== --- projects/sv/contrib/bzip2/LICENSE Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/LICENSE Fri Nov 19 18:32:08 2010 (r215542) @@ -2,7 +2,7 @@ -------------------------------------------------------------------------- This program, "bzip2", the associated library "libbzip2", and all -documentation, are copyright (C) 1996-2007 Julian R Seward. All +documentation, are copyright (C) 1996-2010 Julian R Seward. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -37,6 +37,6 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Julian Seward, jseward@bzip.org -bzip2/libbzip2 version 1.0.5 of 10 December 2007 +bzip2/libbzip2 version 1.0.6 of 6 September 2010 -------------------------------------------------------------------------- Modified: projects/sv/contrib/bzip2/Makefile ============================================================================== --- projects/sv/contrib/bzip2/Makefile Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/Makefile Fri Nov 19 18:32:08 2010 (r215542) @@ -2,8 +2,8 @@ # This file is part of bzip2/libbzip2, a program and library for # lossless, block-sorting data compression. # -# bzip2/libbzip2 version 1.0.5 of 10 December 2007 -# Copyright (C) 1996-2007 Julian Seward +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward # # Please read the WARNING, DISCLAIMER and PATENTS sections in the # README file. @@ -137,7 +137,7 @@ bzip2recover.o: bzip2recover.c distclean: clean rm -f manual.ps manual.html manual.pdf -DISTNAME=bzip2-1.0.5 +DISTNAME=bzip2-1.0.6 dist: check manual rm -f $(DISTNAME) ln -s -f . $(DISTNAME) Modified: projects/sv/contrib/bzip2/Makefile-libbz2_so ============================================================================== --- projects/sv/contrib/bzip2/Makefile-libbz2_so Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/Makefile-libbz2_so Fri Nov 19 18:32:08 2010 (r215542) @@ -1,6 +1,6 @@ # This Makefile builds a shared version of the library, -# libbz2.so.1.0.4, with soname libbz2.so.1.0, +# libbz2.so.1.0.6, with soname libbz2.so.1.0, # at least on x86-Linux (RedHat 7.2), # with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98). # Please see the README file for some important info @@ -10,8 +10,8 @@ # This file is part of bzip2/libbzip2, a program and library for # lossless, block-sorting data compression. # -# bzip2/libbzip2 version 1.0.5 of 10 December 2007 -# Copyright (C) 1996-2007 Julian Seward +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward # # Please read the WARNING, DISCLAIMER and PATENTS sections in the # README file. @@ -35,13 +35,13 @@ OBJS= blocksort.o \ bzlib.o all: $(OBJS) - $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.4 $(OBJS) - $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.4 + $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) + $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 rm -f libbz2.so.1.0 - ln -s libbz2.so.1.0.4 libbz2.so.1.0 + ln -s libbz2.so.1.0.6 libbz2.so.1.0 clean: - rm -f $(OBJS) bzip2.o libbz2.so.1.0.4 libbz2.so.1.0 bzip2-shared + rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared blocksort.o: blocksort.c $(CC) $(CFLAGS) -c blocksort.c Modified: projects/sv/contrib/bzip2/README ============================================================================== --- projects/sv/contrib/bzip2/README Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/README Fri Nov 19 18:32:08 2010 (r215542) @@ -6,8 +6,8 @@ This version is fully compatible with th This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.5 of 10 December 2007 -Copyright (C) 1996-2007 Julian Seward +bzip2/libbzip2 version 1.0.6 of 6 September 2010 +Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in this file. @@ -181,6 +181,10 @@ WHAT'S NEW IN 1.0.5 ? See the CHANGES file. +WHAT'S NEW IN 1.0.6 ? + + See the CHANGES file. + I hope you find bzip2 useful. Feel free to contact me at jseward@bzip.org @@ -208,3 +212,4 @@ Cambridge, UK. 15 February 2005 (bzip2, version 1.0.3) 20 December 2006 (bzip2, version 1.0.4) 10 December 2007 (bzip2, version 1.0.5) + 6 Sept 2010 (bzip2, version 1.0.6) Modified: projects/sv/contrib/bzip2/README.COMPILATION.PROBLEMS ============================================================================== --- projects/sv/contrib/bzip2/README.COMPILATION.PROBLEMS Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/README.COMPILATION.PROBLEMS Fri Nov 19 18:32:08 2010 (r215542) @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.5 of 10 December 2007 -Copyright (C) 1996-2007 Julian Seward +bzip2/libbzip2 version 1.0.6 of 6 September 2010 +Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -12,7 +12,7 @@ This program is released under the terms in the file LICENSE. ------------------------------------------------------------------ -bzip2-1.0.5 should compile without problems on the vast majority of +bzip2-1.0.6 should compile without problems on the vast majority of platforms. Using the supplied Makefile, I've built and tested it myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ 6.0 and nmake, you can build a native Win32 version too. Large file Modified: projects/sv/contrib/bzip2/blocksort.c ============================================================================== --- projects/sv/contrib/bzip2/blocksort.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/blocksort.c Fri Nov 19 18:32:08 2010 (r215542) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: projects/sv/contrib/bzip2/bzip2.1 ============================================================================== --- projects/sv/contrib/bzip2/bzip2.1 Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/bzip2.1 Fri Nov 19 18:32:08 2010 (r215542) @@ -1,7 +1,7 @@ .PU .TH bzip2 1 .SH NAME -bzip2, bunzip2 \- a block-sorting file compressor, v1.0.4 +bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6 .br bzcat \- decompresses files to stdout .br @@ -405,11 +405,11 @@ I/O error messages are not as helpful as tries hard to detect I/O errors and exit cleanly, but the details of what the problem is sometimes seem rather misleading. -This manual page pertains to version 1.0.4 of +This manual page pertains to version 1.0.6 of .I bzip2. Compressed data created by this version is entirely forwards and backwards compatible with the previous public releases, versions -0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and 1.0.3, but with the following +0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and above, but with the following exception: 0.9.0 and above can correctly decompress multiple concatenated compressed files. 0.1pl2 cannot do this; it will stop after decompressing just the first file in the stream. Modified: projects/sv/contrib/bzip2/bzip2.c ============================================================================== --- projects/sv/contrib/bzip2/bzip2.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/bzip2.c Fri Nov 19 18:32:08 2010 (r215542) @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -1605,11 +1605,11 @@ void license ( void ) "bzip2, a block-sorting file compressor. " "Version %s.\n" " \n" - " Copyright (C) 1996-2007 by Julian Seward.\n" + " Copyright (C) 1996-2010 by Julian Seward.\n" " \n" " This program is free software; you can redistribute it and/or modify\n" " it under the terms set out in the LICENSE file, which is included\n" - " in the bzip2-1.0.5 source distribution.\n" + " in the bzip2-1.0.6 source distribution.\n" " \n" " This program is distributed in the hope that it will be useful,\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" Modified: projects/sv/contrib/bzip2/bzip2recover.c ============================================================================== --- projects/sv/contrib/bzip2/bzip2recover.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/bzip2recover.c Fri Nov 19 18:32:08 2010 (r215542) @@ -7,8 +7,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -313,7 +313,7 @@ Int32 main ( Int32 argc, Char** argv ) inFileName[0] = outFileName[0] = 0; fprintf ( stderr, - "bzip2recover 1.0.5: extracts blocks from damaged .bz2 files.\n" ); + "bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" ); if (argc != 2) { fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n", Modified: projects/sv/contrib/bzip2/bzlib.c ============================================================================== --- projects/sv/contrib/bzip2/bzlib.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/bzlib.c Fri Nov 19 18:32:08 2010 (r215542) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: projects/sv/contrib/bzip2/bzlib.h ============================================================================== --- projects/sv/contrib/bzip2/bzlib.h Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/bzlib.h Fri Nov 19 18:32:08 2010 (r215542) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: projects/sv/contrib/bzip2/bzlib_private.h ============================================================================== --- projects/sv/contrib/bzip2/bzlib_private.h Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/bzlib_private.h Fri Nov 19 18:32:08 2010 (r215542) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -36,7 +36,7 @@ /*-- General stuff. --*/ -#define BZ_VERSION "1.0.5, 10-Dec-2007" +#define BZ_VERSION "1.0.6, 6-Sept-2010" typedef char Char; typedef unsigned char Bool; Modified: projects/sv/contrib/bzip2/compress.c ============================================================================== --- projects/sv/contrib/bzip2/compress.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/compress.c Fri Nov 19 18:32:08 2010 (r215542) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: projects/sv/contrib/bzip2/crctable.c ============================================================================== --- projects/sv/contrib/bzip2/crctable.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/crctable.c Fri Nov 19 18:32:08 2010 (r215542) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: projects/sv/contrib/bzip2/decompress.c ============================================================================== --- projects/sv/contrib/bzip2/decompress.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/decompress.c Fri Nov 19 18:32:08 2010 (r215542) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -492,15 +492,28 @@ Int32 BZ2_decompress ( DState* s ) RETURN(BZ_DATA_ERROR); /*-- Set up cftab to facilitate generation of T^(-1) --*/ + /* Check: unzftab entries in range. */ + for (i = 0; i <= 255; i++) { + if (s->unzftab[i] < 0 || s->unzftab[i] > nblock) + RETURN(BZ_DATA_ERROR); + } + /* Actually generate cftab. */ s->cftab[0] = 0; for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1]; for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1]; + /* Check: cftab entries in range. */ for (i = 0; i <= 256; i++) { if (s->cftab[i] < 0 || s->cftab[i] > nblock) { /* s->cftab[i] can legitimately be == nblock */ RETURN(BZ_DATA_ERROR); } } + /* Check: cftab entries non-descending. */ + for (i = 1; i <= 256; i++) { + if (s->cftab[i-1] > s->cftab[i]) { + RETURN(BZ_DATA_ERROR); + } + } s->state_out_len = 0; s->state_out_ch = 0; Modified: projects/sv/contrib/bzip2/huffman.c ============================================================================== --- projects/sv/contrib/bzip2/huffman.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/huffman.c Fri Nov 19 18:32:08 2010 (r215542) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: projects/sv/contrib/bzip2/randtable.c ============================================================================== --- projects/sv/contrib/bzip2/randtable.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/randtable.c Fri Nov 19 18:32:08 2010 (r215542) @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: projects/sv/contrib/bzip2/spewG.c ============================================================================== --- projects/sv/contrib/bzip2/spewG.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/spewG.c Fri Nov 19 18:32:08 2010 (r215542) @@ -13,8 +13,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: projects/sv/contrib/bzip2/unzcrash.c ============================================================================== --- projects/sv/contrib/bzip2/unzcrash.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/bzip2/unzcrash.c Fri Nov 19 18:32:08 2010 (r215542) @@ -17,8 +17,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.5 of 10 December 2007 - Copyright (C) 1996-2007 Julian Seward + bzip2/libbzip2 version 1.0.6 of 6 September 2010 + Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. Modified: projects/sv/contrib/ipfilter/man/ipnat.8 ============================================================================== --- projects/sv/contrib/ipfilter/man/ipnat.8 Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/ipfilter/man/ipnat.8 Fri Nov 19 18:32:08 2010 (r215542) @@ -66,6 +66,6 @@ and active rules/table entries. .SH FILES /dev/ipnat .br -/usr/share/examples/ipf Directory with examples. +/usr/share/examples/ipfilter Directory with examples. .SH SEE ALSO ipnat(5), ipf(8), ipfstat(8) Modified: projects/sv/contrib/ipfilter/man/mkfilters.1 ============================================================================== --- projects/sv/contrib/ipfilter/man/mkfilters.1 Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/ipfilter/man/mkfilters.1 Fri Nov 19 18:32:08 2010 (r215542) @@ -6,7 +6,7 @@ mkfilters \- generate a minimal firewall .SH SYNOPSIS .B mkfilters .SH FILES -/usr/share/examples/ipf/mkfilters +/usr/share/examples/ipfilter/mkfilters .SH DESCRIPTION .PP \fBmkfilters\fP is a perl script that generates a minimal filter rule set for Modified: projects/sv/contrib/top/commands.c ============================================================================== --- projects/sv/contrib/top/commands.c Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/top/commands.c Fri Nov 19 18:32:08 2010 (r215542) @@ -80,10 +80,12 @@ n or # - change number of processes to #ifdef ORDER if (displaymode == DISP_CPU) fputs("\ -o - specify sort order (pri, size, res, cpu, time, threads)\n", stdout); +o - specify sort order (pri, size, res, cpu, time, threads, jid)\n", + stdout); else fputs("\ -o - specify sort order (vcsw, ivcsw, read, write, fault, total)\n", stdout); +o - specify sort order (vcsw, ivcsw, read, write, fault, total, jid)\n", + stdout); #endif fputs("\ r - renice a process\n\ Modified: projects/sv/contrib/xz/ChangeLog ============================================================================== --- projects/sv/contrib/xz/ChangeLog Fri Nov 19 17:57:50 2010 (r215541) +++ projects/sv/contrib/xz/ChangeLog Fri Nov 19 18:32:08 2010 (r215542) @@ -1,3 +1,114 @@ +commit e45929260cd902036efd40c5610a8d0a50d5712b +Author: Lasse Collin +Date: Sat Oct 23 17:25:52 2010 +0300 + + Build: Fix mydist rule when .git doesn't exist. + +commit 6e1326fcdf6b6209949be57cfe3ad4b781b65168 +Author: Lasse Collin +Date: Sat Oct 23 14:15:35 2010 +0300 + + Add NEWS for 5.0.0. + +commit b667a3ef6338a2c1db7b7706b1f6c99ea392221c +Author: Lasse Collin +Date: Sat Oct 23 14:02:53 2010 +0300 + + Bump version to 5.0.0 and liblzma version-info to 5:0:0. + +commit 8c947e9291691629714dafb4536c718b6cc24fbd +Author: Lasse Collin +Date: Sat Oct 23 12:30:54 2010 +0300 + + liblzma: Make lzma_code() check the reserved members in lzma_stream. + + If any of the reserved members in lzma_stream are non-zero + or non-NULL, LZMA_OPTIONS_ERROR is returned. It is possible + that a new feature in the future is indicated by just setting + a reserved member to some other value, so the old liblzma + version need to catch it as an unsupported feature. + +commit e61d85e082743ebd2dd0ff28fc0a82482ede0538 +Author: Lasse Collin +Date: Sat Oct 23 12:26:33 2010 +0300 + + Windows: Use MinGW's stdio functions. + + The non-standard ones from msvcrt.dll appear to work + most of the time with XZ Utils, but there are some + corner cases where things may go very wrong. So it's + good to use the better replacements provided by + MinGW(-w64) runtime. + +commit 23e23f1dc029146714c9a98313ab3ea93d71a2fc +Author: Lasse Collin +Date: Sat Oct 23 12:21:32 2010 +0300 + + liblzma: Use 512 as INDEX_GROUP_SIZE. + + This lets compiler use shifting instead of 64-bit division. + +commit 613939fc82603b75b59eee840871a05bc8dd08e0 +Author: Lasse Collin +Date: Sat Oct 23 12:20:11 2010 +0300 + + liblzma: A few ABI tweaks to reserve space in structures. + +commit 68b83f252df3d27480a9f6f03445d16f6506fef1 +Author: Lasse Collin +Date: Thu Oct 21 23:16:11 2010 +0300 + + xz: Make sure that message_strm() can never return NULL. + +commit d09c5753e33ff96ee57edb6d1e98e34041203695 +Author: Lasse Collin +Date: Thu Oct 21 23:06:31 2010 +0300 + + liblzma: Update the comments in the API headers. + + Adding support for LZMA_FINISH for Index encoding and + decoding needed tiny additions to the relevant .c files too. + *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***