From owner-svn-src-projects@FreeBSD.ORG Sun Oct 25 01:10:41 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B1CB10656C2; Sun, 25 Oct 2009 01:10:41 +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 3A64E8FC14; Sun, 25 Oct 2009 01:10:41 +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 n9P1AfZX022371; Sun, 25 Oct 2009 01:10:41 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9P1AfYt022369; Sun, 25 Oct 2009 01:10:41 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <200910250110.n9P1AfYt022369@svn.freebsd.org> From: Sean Bruno Date: Sun, 25 Oct 2009 01:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198461 - projects/sbruno_firewire/sys/dev/firewire X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2009 01:10:41 -0000 Author: sbruno Date: Sun Oct 25 01:10:40 2009 New Revision: 198461 URL: http://svn.freebsd.org/changeset/base/198461 Log: Fix compiler warning on 32bit Modified: projects/sbruno_firewire/sys/dev/firewire/sbp_targ.c Modified: projects/sbruno_firewire/sys/dev/firewire/sbp_targ.c ============================================================================== --- projects/sbruno_firewire/sys/dev/firewire/sbp_targ.c Sun Oct 25 01:10:29 2009 (r198460) +++ projects/sbruno_firewire/sys/dev/firewire/sbp_targ.c Sun Oct 25 01:10:40 2009 (r198461) @@ -2224,7 +2224,7 @@ sbp_targ_recv(struct fw_xfer *xfer) if (fwdev == NULL) { getmicrotime(&tv); printf("(%ld)(%ld) %s: cannot resolve nodeid=%d\n", - tv.tv_sec, tv.tv_usec,__func__, fp->mode.wreqb.src & 0x3f); + (long)tv.tv_sec, tv.tv_usec,__func__, fp->mode.wreqb.src & 0x3f); rtcode = RESP_TYPE_ERROR; /* XXX */ } else { lo = fp->mode.wreqb.dest_lo; From owner-svn-src-projects@FreeBSD.ORG Sun Oct 25 01:19:58 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 766DF1065676; Sun, 25 Oct 2009 01:19:58 +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 613598FC0C; Sun, 25 Oct 2009 01:19:58 +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 n9P1JvUA022819; Sun, 25 Oct 2009 01:19:57 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9P1JuCh022774; Sun, 25 Oct 2009 01:19:56 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <200910250119.n9P1JuCh022774@svn.freebsd.org> From: Sean Bruno Date: Sun, 25 Oct 2009 01:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198462 - in projects/sbruno_firewire: . bin/cat bin/csh bin/ls bin/sh bin/uuidgen cddl/contrib/opensolaris/lib/libzfs/common contrib/gcc/config/i386 contrib/openpam contrib/openpam/doc... 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, 25 Oct 2009 01:19:58 -0000 Author: sbruno Date: Sun Oct 25 01:19:55 2009 New Revision: 198462 URL: http://svn.freebsd.org/changeset/base/198462 Log: Update to HEAD, since CAM stuff has changed Added: projects/sbruno_firewire/lib/libthr/arch/ia64/ia64/_umtx_op_err.S - copied unchanged from r198459, head/lib/libthr/arch/ia64/ia64/_umtx_op_err.S projects/sbruno_firewire/share/man/man9/BUS_BIND_INTR.9 - copied unchanged from r198459, head/share/man/man9/BUS_BIND_INTR.9 projects/sbruno_firewire/share/man/man9/BUS_DESCRIBE_INTR.9 - copied unchanged from r198459, head/share/man/man9/BUS_DESCRIBE_INTR.9 projects/sbruno_firewire/sys/cam/ata/ata_pmp.c - copied unchanged from r198459, head/sys/cam/ata/ata_pmp.c projects/sbruno_firewire/sys/contrib/dev/acpica/common/dmextern.c - copied unchanged from r198459, head/sys/contrib/dev/acpica/common/dmextern.c projects/sbruno_firewire/sys/contrib/dev/iwn/iwlwifi-4965-228.57.2.23.fw.uu - copied unchanged from r198459, head/sys/contrib/dev/iwn/iwlwifi-4965-228.57.2.23.fw.uu projects/sbruno_firewire/sys/contrib/dev/iwn/iwlwifi-5000-5.4.A.11.fw.uu - copied unchanged from r198459, head/sys/contrib/dev/iwn/iwlwifi-5000-5.4.A.11.fw.uu projects/sbruno_firewire/sys/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu - copied unchanged from r198459, head/sys/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu projects/sbruno_firewire/sys/dev/ath/ath_hal/ah_eeprom_v4k.c - copied unchanged from r198459, head/sys/dev/ath/ath_hal/ah_eeprom_v4k.c projects/sbruno_firewire/sys/dev/ath/ath_hal/ah_eeprom_v4k.h - copied unchanged from r198459, head/sys/dev/ath/ath_hal/ah_eeprom_v4k.h projects/sbruno_firewire/sys/dev/cxgb/common/cxgb_aq100x.c - copied unchanged from r198459, head/sys/dev/cxgb/common/cxgb_aq100x.c projects/sbruno_firewire/sys/dev/usb/controller/ehcireg.h - copied unchanged from r198459, head/sys/dev/usb/controller/ehcireg.h projects/sbruno_firewire/sys/dev/usb/controller/ohcireg.h - copied unchanged from r198459, head/sys/dev/usb/controller/ohcireg.h projects/sbruno_firewire/sys/dev/usb/controller/uhcireg.h - copied unchanged from r198459, head/sys/dev/usb/controller/uhcireg.h projects/sbruno_firewire/sys/modules/iwnfw/Makefile.inc - copied unchanged from r198459, head/sys/modules/iwnfw/Makefile.inc projects/sbruno_firewire/sys/modules/iwnfw/iwn4965/ - copied from r198459, head/sys/modules/iwnfw/iwn4965/ projects/sbruno_firewire/sys/modules/iwnfw/iwn5000/ - copied from r198459, head/sys/modules/iwnfw/iwn5000/ projects/sbruno_firewire/sys/modules/iwnfw/iwn5150/ - copied from r198459, head/sys/modules/iwnfw/iwn5150/ projects/sbruno_firewire/tools/regression/bin/sh/errors/backquote-error2.0 - copied unchanged from r197720, head/tools/regression/bin/sh/errors/backquote-error2.0 projects/sbruno_firewire/tools/regression/bin/sh/execution/unknown1.0 - copied unchanged from r198459, head/tools/regression/bin/sh/execution/unknown1.0 projects/sbruno_firewire/tools/regression/bin/sh/expansion/question1.0 - copied unchanged from r198459, head/tools/regression/bin/sh/expansion/question1.0 projects/sbruno_firewire/tools/regression/bin/sh/expansion/set-u1.0 - copied unchanged from r198459, head/tools/regression/bin/sh/expansion/set-u1.0 projects/sbruno_firewire/tools/regression/bin/sh/expansion/set-u2.0 - copied unchanged from r198459, head/tools/regression/bin/sh/expansion/set-u2.0 projects/sbruno_firewire/tools/regression/sockets/unix_seqpacket/ - copied from r198459, head/tools/regression/sockets/unix_seqpacket/ projects/sbruno_firewire/tools/regression/sockets/unix_seqpacket_exercise/ - copied from r198459, head/tools/regression/sockets/unix_seqpacket_exercise/ Deleted: projects/sbruno_firewire/sys/arm/xscale/xscalereg.h projects/sbruno_firewire/sys/arm/xscale/xscalevar.h projects/sbruno_firewire/sys/compat/x86bios/x86bios_alloc.c projects/sbruno_firewire/sys/contrib/dev/iwn/iwlwifi-4965-4.44.17.fw.uu projects/sbruno_firewire/sys/contrib/x86emu/x86emu_util.c projects/sbruno_firewire/sys/dev/usb/serial/uch341.c projects/sbruno_firewire/sys/modules/usb/uch341/ Modified: projects/sbruno_firewire/ (props changed) projects/sbruno_firewire/Makefile.inc1 projects/sbruno_firewire/ObsoleteFiles.inc projects/sbruno_firewire/bin/cat/Makefile projects/sbruno_firewire/bin/csh/iconv_stub.c projects/sbruno_firewire/bin/ls/ls.c projects/sbruno_firewire/bin/sh/eval.c projects/sbruno_firewire/bin/sh/exec.c projects/sbruno_firewire/bin/sh/expand.c projects/sbruno_firewire/bin/sh/parser.c projects/sbruno_firewire/bin/sh/sh.1 projects/sbruno_firewire/bin/uuidgen/Makefile projects/sbruno_firewire/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c projects/sbruno_firewire/contrib/gcc/config/i386/i386.c projects/sbruno_firewire/contrib/openpam/ (props changed) projects/sbruno_firewire/contrib/openpam/doc/man/pam.conf.5 projects/sbruno_firewire/contrib/tcpdump/print-tcp.c projects/sbruno_firewire/contrib/tcpdump/tcp.h projects/sbruno_firewire/contrib/tcsh/sh.c projects/sbruno_firewire/crypto/openssh/sftp-server.8 (props changed) projects/sbruno_firewire/crypto/openssh/ssh-agent.1 (props changed) projects/sbruno_firewire/crypto/openssh/ssh_namespace.h projects/sbruno_firewire/crypto/openssh/sshd_config projects/sbruno_firewire/etc/defaults/rc.conf projects/sbruno_firewire/etc/gettytab projects/sbruno_firewire/etc/network.subr projects/sbruno_firewire/etc/pam.d/ftpd projects/sbruno_firewire/etc/pam.d/kde projects/sbruno_firewire/etc/pam.d/other projects/sbruno_firewire/etc/pam.d/sshd projects/sbruno_firewire/etc/pam.d/system projects/sbruno_firewire/etc/pam.d/telnetd projects/sbruno_firewire/etc/pam.d/xdm projects/sbruno_firewire/etc/rc.d/bgfsck projects/sbruno_firewire/etc/rc.d/cleartmp projects/sbruno_firewire/etc/rc.d/defaultroute projects/sbruno_firewire/etc/rc.d/faith projects/sbruno_firewire/etc/rc.d/fsck projects/sbruno_firewire/etc/rc.d/hostid projects/sbruno_firewire/etc/rc.d/hostname projects/sbruno_firewire/etc/rc.d/ip6addrctl projects/sbruno_firewire/etc/rc.d/ldconfig projects/sbruno_firewire/etc/rc.d/motd projects/sbruno_firewire/etc/rc.d/mountcritlocal projects/sbruno_firewire/etc/rc.d/moused projects/sbruno_firewire/etc/rc.d/netif projects/sbruno_firewire/etc/rc.d/netoptions projects/sbruno_firewire/etc/rc.d/newsyslog projects/sbruno_firewire/etc/rc.d/nfsclient projects/sbruno_firewire/etc/rc.d/pf projects/sbruno_firewire/etc/rc.d/routing projects/sbruno_firewire/etc/rc.d/savecore projects/sbruno_firewire/etc/rc.d/static_arp projects/sbruno_firewire/etc/rc.d/stf projects/sbruno_firewire/etc/rc.subr projects/sbruno_firewire/etc/services projects/sbruno_firewire/games/fortune/datfiles/fortunes projects/sbruno_firewire/games/fortune/datfiles/fortunes.sp.ok projects/sbruno_firewire/games/number/Makefile projects/sbruno_firewire/games/number/number.c projects/sbruno_firewire/include/langinfo.h projects/sbruno_firewire/include/libgen.h projects/sbruno_firewire/kerberos5/lib/libgssapi_krb5/Makefile projects/sbruno_firewire/kerberos5/lib/libgssapi_spnego/Makefile projects/sbruno_firewire/lib/libc/gen/Makefile.inc projects/sbruno_firewire/lib/libc/gen/Symbol.map projects/sbruno_firewire/lib/libc/gen/basename.3 projects/sbruno_firewire/lib/libc/gen/basename.c projects/sbruno_firewire/lib/libc/gen/errlst.c projects/sbruno_firewire/lib/libc/gen/fts.3 projects/sbruno_firewire/lib/libc/gen/fts.c projects/sbruno_firewire/lib/libc/gen/getcwd.c projects/sbruno_firewire/lib/libc/gen/wordexp.c projects/sbruno_firewire/lib/libc/include/namespace.h projects/sbruno_firewire/lib/libc/include/un-namespace.h projects/sbruno_firewire/lib/libc/locale/nl_langinfo.c projects/sbruno_firewire/lib/libc/nls/C.msg projects/sbruno_firewire/lib/libc/stdio/getdelim.c projects/sbruno_firewire/lib/libc/sys/Symbol.map projects/sbruno_firewire/lib/libc/sys/intro.2 projects/sbruno_firewire/lib/libc/sys/nanosleep.2 projects/sbruno_firewire/lib/libfetch/common.c projects/sbruno_firewire/lib/libpam/modules/pam_ssh/Makefile projects/sbruno_firewire/lib/libpmc/Makefile projects/sbruno_firewire/lib/libpmc/libpmc.c projects/sbruno_firewire/lib/libthr/arch/ia64/Makefile.inc projects/sbruno_firewire/lib/libthr/arch/ia64/include/pthread_md.h projects/sbruno_firewire/lib/libthr/pthread.map projects/sbruno_firewire/lib/libthr/thread/thr_private.h projects/sbruno_firewire/lib/libthr/thread/thr_syscalls.c projects/sbruno_firewire/lib/libusb/libusb20_ugen20.c projects/sbruno_firewire/libexec/rtld-elf/map_object.c projects/sbruno_firewire/libexec/rtld-elf/rtld.c projects/sbruno_firewire/release/doc/README projects/sbruno_firewire/release/doc/en_US.ISO8859-1/errata/article.sgml projects/sbruno_firewire/release/doc/share/misc/man2hwnotes.pl projects/sbruno_firewire/release/doc/share/mk/doc.relnotes.mk projects/sbruno_firewire/release/doc/share/sgml/release.dsl projects/sbruno_firewire/release/doc/share/sgml/release.ent projects/sbruno_firewire/release/scripts/package-split.py projects/sbruno_firewire/sbin/Makefile.inc projects/sbruno_firewire/sbin/adjkerntz/Makefile projects/sbruno_firewire/sbin/atacontrol/Makefile projects/sbruno_firewire/sbin/atm/atmconfig/Makefile projects/sbruno_firewire/sbin/badsect/Makefile projects/sbruno_firewire/sbin/bsdlabel/Makefile projects/sbruno_firewire/sbin/camcontrol/Makefile projects/sbruno_firewire/sbin/ccdconfig/Makefile projects/sbruno_firewire/sbin/clri/Makefile projects/sbruno_firewire/sbin/comcontrol/Makefile projects/sbruno_firewire/sbin/conscontrol/Makefile projects/sbruno_firewire/sbin/dhclient/Makefile projects/sbruno_firewire/sbin/dhclient/bpf.c projects/sbruno_firewire/sbin/dhclient/dhcpd.h projects/sbruno_firewire/sbin/dhclient/packet.c projects/sbruno_firewire/sbin/dmesg/Makefile projects/sbruno_firewire/sbin/dump/Makefile projects/sbruno_firewire/sbin/dumpfs/Makefile projects/sbruno_firewire/sbin/dumpfs/dumpfs.c projects/sbruno_firewire/sbin/dumpon/Makefile projects/sbruno_firewire/sbin/geom/Makefile projects/sbruno_firewire/sbin/geom/Makefile.inc projects/sbruno_firewire/sbin/geom/class/part/gpart.8 projects/sbruno_firewire/sbin/ggate/Makefile.inc projects/sbruno_firewire/sbin/growfs/Makefile projects/sbruno_firewire/sbin/growfs/growfs.c projects/sbruno_firewire/sbin/gvinum/Makefile projects/sbruno_firewire/sbin/ifconfig/af_nd6.c projects/sbruno_firewire/sbin/ifconfig/ifieee80211.c projects/sbruno_firewire/sbin/init/Makefile projects/sbruno_firewire/sbin/ipf/Makefile.inc projects/sbruno_firewire/sbin/iscontrol/Makefile projects/sbruno_firewire/sbin/kldunload/Makefile projects/sbruno_firewire/sbin/ldconfig/Makefile projects/sbruno_firewire/sbin/md5/Makefile projects/sbruno_firewire/sbin/mdconfig/Makefile projects/sbruno_firewire/sbin/mdmfs/Makefile projects/sbruno_firewire/sbin/mksnap_ffs/Makefile projects/sbruno_firewire/sbin/mount/Makefile projects/sbruno_firewire/sbin/mount_autofs/Makefile projects/sbruno_firewire/sbin/mount_cd9660/Makefile projects/sbruno_firewire/sbin/mount_ext2fs/Makefile projects/sbruno_firewire/sbin/mount_msdosfs/Makefile projects/sbruno_firewire/sbin/mount_nullfs/Makefile projects/sbruno_firewire/sbin/mount_reiserfs/Makefile projects/sbruno_firewire/sbin/mount_unionfs/Makefile projects/sbruno_firewire/sbin/newfs_msdos/Makefile projects/sbruno_firewire/sbin/nfsiod/Makefile projects/sbruno_firewire/sbin/pfctl/Makefile projects/sbruno_firewire/sbin/rcorder/Makefile projects/sbruno_firewire/sbin/reboot/Makefile projects/sbruno_firewire/sbin/recoverdisk/Makefile projects/sbruno_firewire/sbin/routed/Makefile projects/sbruno_firewire/sbin/savecore/Makefile projects/sbruno_firewire/sbin/sconfig/Makefile projects/sbruno_firewire/sbin/shutdown/Makefile projects/sbruno_firewire/sbin/spppcontrol/Makefile projects/sbruno_firewire/sbin/swapon/Makefile projects/sbruno_firewire/sbin/sysctl/sysctl.c projects/sbruno_firewire/sbin/tunefs/Makefile projects/sbruno_firewire/sbin/tunefs/tunefs.8 projects/sbruno_firewire/share/man/man4/Makefile projects/sbruno_firewire/share/man/man4/acpi_hp.4 projects/sbruno_firewire/share/man/man4/acpi_wmi.4 projects/sbruno_firewire/share/man/man4/atapicam.4 projects/sbruno_firewire/share/man/man4/bce.4 projects/sbruno_firewire/share/man/man4/bge.4 projects/sbruno_firewire/share/man/man4/de.4 projects/sbruno_firewire/share/man/man4/hifn.4 projects/sbruno_firewire/share/man/man4/ichwd.4 projects/sbruno_firewire/share/man/man4/lindev.4 projects/sbruno_firewire/share/man/man4/mac_mls.4 projects/sbruno_firewire/share/man/man4/malo.4 projects/sbruno_firewire/share/man/man4/sbp_targ.4 projects/sbruno_firewire/share/man/man4/targ.4 projects/sbruno_firewire/share/man/man4/umass.4 projects/sbruno_firewire/share/man/man4/unix.4 projects/sbruno_firewire/share/man/man4/urtw.4 projects/sbruno_firewire/share/man/man4/zyd.4 projects/sbruno_firewire/share/man/man9/Makefile projects/sbruno_firewire/share/man/man9/fetch.9 projects/sbruno_firewire/share/man/man9/store.9 projects/sbruno_firewire/share/misc/bsd-family-tree projects/sbruno_firewire/share/misc/committers-src.dot projects/sbruno_firewire/share/mk/bsd.sys.mk projects/sbruno_firewire/share/zoneinfo/ (props changed) projects/sbruno_firewire/share/zoneinfo/Makefile projects/sbruno_firewire/share/zoneinfo/asia projects/sbruno_firewire/share/zoneinfo/australasia projects/sbruno_firewire/sys/amd64/acpica/acpi_machdep.c projects/sbruno_firewire/sys/amd64/acpica/acpi_wakecode.S projects/sbruno_firewire/sys/amd64/acpica/acpi_wakeup.c projects/sbruno_firewire/sys/amd64/amd64/elf_machdep.c projects/sbruno_firewire/sys/amd64/amd64/intr_machdep.c projects/sbruno_firewire/sys/amd64/amd64/nexus.c projects/sbruno_firewire/sys/amd64/amd64/pmap.c projects/sbruno_firewire/sys/amd64/conf/GENERIC projects/sbruno_firewire/sys/amd64/include/atomic.h projects/sbruno_firewire/sys/amd64/include/elf.h projects/sbruno_firewire/sys/amd64/include/intr_machdep.h projects/sbruno_firewire/sys/arm/arm/cpufunc.c projects/sbruno_firewire/sys/arm/arm/elf_machdep.c projects/sbruno_firewire/sys/arm/arm/pmap.c projects/sbruno_firewire/sys/arm/conf/HL200 projects/sbruno_firewire/sys/arm/conf/KB920X projects/sbruno_firewire/sys/arm/include/elf.h projects/sbruno_firewire/sys/arm/xscale/i80321/i80321_timer.c projects/sbruno_firewire/sys/boot/i386/zfsboot/zfsboot.c projects/sbruno_firewire/sys/boot/zfs/zfs.c projects/sbruno_firewire/sys/boot/zfs/zfsimpl.c projects/sbruno_firewire/sys/cam/ata/ata_da.c projects/sbruno_firewire/sys/cam/ata/ata_xpt.c projects/sbruno_firewire/sys/cam/cam.h projects/sbruno_firewire/sys/cam/cam_periph.c projects/sbruno_firewire/sys/cam/cam_queue.c projects/sbruno_firewire/sys/cam/cam_xpt.c projects/sbruno_firewire/sys/cam/cam_xpt_internal.h projects/sbruno_firewire/sys/cam/scsi/scsi_all.c projects/sbruno_firewire/sys/cam/scsi/scsi_cd.c projects/sbruno_firewire/sys/cam/scsi/scsi_ch.c projects/sbruno_firewire/sys/cam/scsi/scsi_da.c projects/sbruno_firewire/sys/cam/scsi/scsi_low.c projects/sbruno_firewire/sys/cam/scsi/scsi_pt.c projects/sbruno_firewire/sys/cam/scsi/scsi_sa.c projects/sbruno_firewire/sys/cam/scsi/scsi_targ_bh.c projects/sbruno_firewire/sys/cam/scsi/scsi_target.c projects/sbruno_firewire/sys/cam/scsi/scsi_xpt.c projects/sbruno_firewire/sys/cddl/boot/zfs/zfsimpl.h projects/sbruno_firewire/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c projects/sbruno_firewire/sys/cddl/compat/opensolaris/sys/policy.h projects/sbruno_firewire/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c projects/sbruno_firewire/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c projects/sbruno_firewire/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c projects/sbruno_firewire/sys/compat/ia32/ia32_sysvec.c projects/sbruno_firewire/sys/compat/x86bios/x86bios.c projects/sbruno_firewire/sys/compat/x86bios/x86bios.h projects/sbruno_firewire/sys/conf/NOTES projects/sbruno_firewire/sys/conf/files projects/sbruno_firewire/sys/conf/files.amd64 projects/sbruno_firewire/sys/conf/files.i386 projects/sbruno_firewire/sys/conf/options projects/sbruno_firewire/sys/contrib/dev/acpica/ (props changed) projects/sbruno_firewire/sys/contrib/dev/acpica/changes.txt projects/sbruno_firewire/sys/contrib/dev/acpica/common/adfile.c projects/sbruno_firewire/sys/contrib/dev/acpica/common/adisasm.c projects/sbruno_firewire/sys/contrib/dev/acpica/common/adwalk.c projects/sbruno_firewire/sys/contrib/dev/acpica/common/dmtable.c projects/sbruno_firewire/sys/contrib/dev/acpica/common/getopt.c projects/sbruno_firewire/sys/contrib/dev/acpica/compiler/aslload.c projects/sbruno_firewire/sys/contrib/dev/acpica/debugger/dbcmds.c projects/sbruno_firewire/sys/contrib/dev/acpica/debugger/dbinput.c projects/sbruno_firewire/sys/contrib/dev/acpica/disassembler/dmutils.c projects/sbruno_firewire/sys/contrib/dev/acpica/disassembler/dmwalk.c projects/sbruno_firewire/sys/contrib/dev/acpica/dispatcher/dswload.c projects/sbruno_firewire/sys/contrib/dev/acpica/events/evregion.c projects/sbruno_firewire/sys/contrib/dev/acpica/include/acapps.h projects/sbruno_firewire/sys/contrib/dev/acpica/include/acdebug.h projects/sbruno_firewire/sys/contrib/dev/acpica/include/acdisasm.h projects/sbruno_firewire/sys/contrib/dev/acpica/include/acglobal.h projects/sbruno_firewire/sys/contrib/dev/acpica/include/aclocal.h projects/sbruno_firewire/sys/contrib/dev/acpica/include/acpixf.h projects/sbruno_firewire/sys/contrib/dev/acpica/namespace/nsrepair.c projects/sbruno_firewire/sys/contrib/dev/acpica/utilities/utglobal.c projects/sbruno_firewire/sys/contrib/dev/iwn/LICENSE projects/sbruno_firewire/sys/dev/agp/agp_i810.c projects/sbruno_firewire/sys/dev/ahci/ahci.c projects/sbruno_firewire/sys/dev/ahci/ahci.h projects/sbruno_firewire/sys/dev/aic7xxx/aicasm/aicasm.c projects/sbruno_firewire/sys/dev/ata/ata-queue.c projects/sbruno_firewire/sys/dev/ata/atapi-cd.c projects/sbruno_firewire/sys/dev/ata/atapi-fd.c projects/sbruno_firewire/sys/dev/ata/atapi-tape.c projects/sbruno_firewire/sys/dev/ata/chipsets/ata-ati.c projects/sbruno_firewire/sys/dev/atkbdc/atkbd.c projects/sbruno_firewire/sys/dev/bce/if_bce.c projects/sbruno_firewire/sys/dev/bce/if_bcereg.h projects/sbruno_firewire/sys/dev/bge/if_bge.c projects/sbruno_firewire/sys/dev/bge/if_bgereg.h projects/sbruno_firewire/sys/dev/cxgb/common/cxgb_ael1002.c projects/sbruno_firewire/sys/dev/cxgb/common/cxgb_common.h projects/sbruno_firewire/sys/dev/cxgb/common/cxgb_mv88e1xxx.c projects/sbruno_firewire/sys/dev/cxgb/common/cxgb_regs.h projects/sbruno_firewire/sys/dev/cxgb/common/cxgb_t3_hw.c projects/sbruno_firewire/sys/dev/cxgb/common/cxgb_tn1010.c projects/sbruno_firewire/sys/dev/cxgb/common/cxgb_vsc8211.c projects/sbruno_firewire/sys/dev/cxgb/common/cxgb_xgmac.c projects/sbruno_firewire/sys/dev/cxgb/cxgb_adapter.h projects/sbruno_firewire/sys/dev/cxgb/cxgb_main.c projects/sbruno_firewire/sys/dev/cxgb/cxgb_osdep.h projects/sbruno_firewire/sys/dev/cxgb/cxgb_t3fw.h projects/sbruno_firewire/sys/dev/dpms/dpms.c projects/sbruno_firewire/sys/dev/drm/drm_pciids.h projects/sbruno_firewire/sys/dev/drm/i915_drv.h projects/sbruno_firewire/sys/dev/drm/mach64_state.c projects/sbruno_firewire/sys/dev/fb/vesa.c projects/sbruno_firewire/sys/dev/fb/vesa.h projects/sbruno_firewire/sys/dev/fdc/fdc.c projects/sbruno_firewire/sys/dev/gem/if_gem_pci.c projects/sbruno_firewire/sys/dev/hwpmc/hwpmc_core.c projects/sbruno_firewire/sys/dev/hwpmc/hwpmc_mod.c projects/sbruno_firewire/sys/dev/ips/ips_disk.c projects/sbruno_firewire/sys/dev/iwn/if_iwn.c projects/sbruno_firewire/sys/dev/iwn/if_iwnreg.h projects/sbruno_firewire/sys/dev/iwn/if_iwnvar.h projects/sbruno_firewire/sys/dev/mpt/mpt.c projects/sbruno_firewire/sys/dev/mpt/mpt.h projects/sbruno_firewire/sys/dev/mpt/mpt_cam.c projects/sbruno_firewire/sys/dev/mpt/mpt_raid.c projects/sbruno_firewire/sys/dev/mwl/if_mwl_pci.c projects/sbruno_firewire/sys/dev/mxge/if_mxge.c projects/sbruno_firewire/sys/dev/mxge/if_mxge_var.h projects/sbruno_firewire/sys/dev/pci/pci.c projects/sbruno_firewire/sys/dev/pci/vga_pci.c projects/sbruno_firewire/sys/dev/ppbus/lpt.c projects/sbruno_firewire/sys/dev/ppbus/pcfclock.c projects/sbruno_firewire/sys/dev/siis/siis.c projects/sbruno_firewire/sys/dev/syscons/syscons.c projects/sbruno_firewire/sys/dev/uart/uart_bus.h projects/sbruno_firewire/sys/dev/uart/uart_core.c projects/sbruno_firewire/sys/dev/uart/uart_tty.c projects/sbruno_firewire/sys/dev/usb/controller/ehci.c projects/sbruno_firewire/sys/dev/usb/controller/ehci.h projects/sbruno_firewire/sys/dev/usb/controller/ehci_ixp4xx.c projects/sbruno_firewire/sys/dev/usb/controller/ehci_mbus.c projects/sbruno_firewire/sys/dev/usb/controller/ehci_pci.c projects/sbruno_firewire/sys/dev/usb/controller/ohci.c projects/sbruno_firewire/sys/dev/usb/controller/ohci.h projects/sbruno_firewire/sys/dev/usb/controller/ohci_atmelarm.c projects/sbruno_firewire/sys/dev/usb/controller/ohci_pci.c projects/sbruno_firewire/sys/dev/usb/controller/uhci.c projects/sbruno_firewire/sys/dev/usb/controller/uhci.h projects/sbruno_firewire/sys/dev/usb/controller/uhci_pci.c projects/sbruno_firewire/sys/dev/usb/input/ukbd.c projects/sbruno_firewire/sys/dev/usb/input/ums.c projects/sbruno_firewire/sys/dev/usb/net/if_cdce.c projects/sbruno_firewire/sys/dev/usb/serial/uchcom.c projects/sbruno_firewire/sys/dev/usb/storage/umass.c projects/sbruno_firewire/sys/dev/usb/usbdevs projects/sbruno_firewire/sys/dev/usb/wlan/if_rum.c projects/sbruno_firewire/sys/dev/usb/wlan/if_uath.c projects/sbruno_firewire/sys/dev/usb/wlan/if_upgt.c projects/sbruno_firewire/sys/dev/usb/wlan/if_ural.c projects/sbruno_firewire/sys/dev/usb/wlan/if_urtw.c projects/sbruno_firewire/sys/dev/usb/wlan/if_urtwreg.h projects/sbruno_firewire/sys/dev/usb/wlan/if_urtwvar.h projects/sbruno_firewire/sys/dev/usb/wlan/if_zyd.c projects/sbruno_firewire/sys/fs/nfsclient/nfs_clport.c projects/sbruno_firewire/sys/fs/nfsclient/nfs_clstate.c projects/sbruno_firewire/sys/fs/nfsclient/nfs_clsubs.c projects/sbruno_firewire/sys/fs/smbfs/smbfs_vfsops.c projects/sbruno_firewire/sys/fs/tmpfs/tmpfs.h projects/sbruno_firewire/sys/fs/tmpfs/tmpfs_subr.c projects/sbruno_firewire/sys/fs/tmpfs/tmpfs_vnops.c projects/sbruno_firewire/sys/geom/concat/g_concat.c projects/sbruno_firewire/sys/geom/label/g_label.c projects/sbruno_firewire/sys/geom/part/g_part.c projects/sbruno_firewire/sys/geom/part/g_part_gpt.c projects/sbruno_firewire/sys/geom/shsec/g_shsec.c projects/sbruno_firewire/sys/geom/stripe/g_stripe.c projects/sbruno_firewire/sys/geom/uzip/g_uzip.c projects/sbruno_firewire/sys/geom/vinum/geom_vinum_create.c projects/sbruno_firewire/sys/geom/vinum/geom_vinum_events.c projects/sbruno_firewire/sys/geom/vinum/geom_vinum_init.c projects/sbruno_firewire/sys/geom/vinum/geom_vinum_move.c projects/sbruno_firewire/sys/geom/vinum/geom_vinum_rm.c projects/sbruno_firewire/sys/geom/vinum/geom_vinum_subr.c projects/sbruno_firewire/sys/i386/conf/GENERIC projects/sbruno_firewire/sys/i386/conf/NOTES projects/sbruno_firewire/sys/i386/i386/elf_machdep.c projects/sbruno_firewire/sys/i386/i386/intr_machdep.c projects/sbruno_firewire/sys/i386/i386/nexus.c projects/sbruno_firewire/sys/i386/i386/pmap.c projects/sbruno_firewire/sys/i386/i386/vm_machdep.c projects/sbruno_firewire/sys/i386/include/atomic.h projects/sbruno_firewire/sys/i386/include/cpufunc.h projects/sbruno_firewire/sys/i386/include/elf.h projects/sbruno_firewire/sys/i386/include/intr_machdep.h projects/sbruno_firewire/sys/i386/xen/pmap.c projects/sbruno_firewire/sys/i386/xen/xen_machdep.c projects/sbruno_firewire/sys/ia64/conf/GENERIC projects/sbruno_firewire/sys/ia64/ia64/elf_machdep.c projects/sbruno_firewire/sys/ia64/ia64/pmap.c projects/sbruno_firewire/sys/ia64/include/asm.h projects/sbruno_firewire/sys/ia64/include/elf.h projects/sbruno_firewire/sys/ia64/include/param.h projects/sbruno_firewire/sys/kern/bus_if.m projects/sbruno_firewire/sys/kern/imgact_elf.c projects/sbruno_firewire/sys/kern/init_main.c projects/sbruno_firewire/sys/kern/kern_event.c projects/sbruno_firewire/sys/kern/kern_exec.c projects/sbruno_firewire/sys/kern/kern_exit.c projects/sbruno_firewire/sys/kern/kern_intr.c projects/sbruno_firewire/sys/kern/kern_ktrace.c projects/sbruno_firewire/sys/kern/kern_lock.c projects/sbruno_firewire/sys/kern/kern_proc.c projects/sbruno_firewire/sys/kern/kern_shutdown.c projects/sbruno_firewire/sys/kern/kern_sig.c projects/sbruno_firewire/sys/kern/kern_thr.c projects/sbruno_firewire/sys/kern/sched_ule.c projects/sbruno_firewire/sys/kern/stack_protector.c projects/sbruno_firewire/sys/kern/subr_bus.c projects/sbruno_firewire/sys/kern/subr_taskqueue.c projects/sbruno_firewire/sys/kern/subr_trap.c projects/sbruno_firewire/sys/kern/sys_process.c projects/sbruno_firewire/sys/kern/sysv_shm.c projects/sbruno_firewire/sys/kern/tty.c projects/sbruno_firewire/sys/kern/tty_ttydisc.c projects/sbruno_firewire/sys/kern/uipc_socket.c projects/sbruno_firewire/sys/kern/uipc_usrreq.c projects/sbruno_firewire/sys/kern/vfs_acl.c projects/sbruno_firewire/sys/mips/include/elf.h projects/sbruno_firewire/sys/mips/mips/elf64_machdep.c projects/sbruno_firewire/sys/mips/mips/elf_machdep.c projects/sbruno_firewire/sys/mips/mips/pmap.c projects/sbruno_firewire/sys/modules/Makefile projects/sbruno_firewire/sys/modules/cam/Makefile projects/sbruno_firewire/sys/modules/cxgb/cxgb/Makefile projects/sbruno_firewire/sys/modules/dpms/Makefile projects/sbruno_firewire/sys/modules/iwnfw/Makefile projects/sbruno_firewire/sys/modules/nfslockd/Makefile projects/sbruno_firewire/sys/modules/pf/Makefile projects/sbruno_firewire/sys/modules/ubser/Makefile projects/sbruno_firewire/sys/modules/usb/Makefile projects/sbruno_firewire/sys/modules/usb/ucom/Makefile projects/sbruno_firewire/sys/modules/vesa/Makefile projects/sbruno_firewire/sys/modules/x86bios/Makefile projects/sbruno_firewire/sys/net/bpf.c projects/sbruno_firewire/sys/net/flowtable.c projects/sbruno_firewire/sys/net/if_bridge.c projects/sbruno_firewire/sys/net/if_enc.c projects/sbruno_firewire/sys/net/if_ethersubr.c projects/sbruno_firewire/sys/net/if_gif.c projects/sbruno_firewire/sys/net/pfil.c projects/sbruno_firewire/sys/net/pfil.h projects/sbruno_firewire/sys/net/route.c projects/sbruno_firewire/sys/net80211/ieee80211_hwmp.c projects/sbruno_firewire/sys/net80211/ieee80211_mesh.c projects/sbruno_firewire/sys/net80211/ieee80211_mesh.h projects/sbruno_firewire/sys/net80211/ieee80211_output.c projects/sbruno_firewire/sys/net80211/ieee80211_proto.h projects/sbruno_firewire/sys/netgraph/NOTES projects/sbruno_firewire/sys/netgraph/ng_bridge.c projects/sbruno_firewire/sys/netinet/if_ether.c projects/sbruno_firewire/sys/netinet/in.c projects/sbruno_firewire/sys/netinet/ip_fastfwd.c projects/sbruno_firewire/sys/netinet/ip_icmp.c projects/sbruno_firewire/sys/netinet/ip_input.c projects/sbruno_firewire/sys/netinet/ip_output.c projects/sbruno_firewire/sys/netinet/ip_var.h projects/sbruno_firewire/sys/netinet/ipfw/ip_fw2.c projects/sbruno_firewire/sys/netinet/ipfw/ip_fw_pfil.c projects/sbruno_firewire/sys/netinet/raw_ip.c projects/sbruno_firewire/sys/netinet/sctp_bsd_addr.c projects/sbruno_firewire/sys/netinet/sctp_os_bsd.h projects/sbruno_firewire/sys/netinet/sctp_output.c projects/sbruno_firewire/sys/netinet/sctp_pcb.c projects/sbruno_firewire/sys/netinet/tcp_input.c projects/sbruno_firewire/sys/netinet6/icmp6.c projects/sbruno_firewire/sys/netinet6/in6.c projects/sbruno_firewire/sys/netinet6/in6_ifattach.c projects/sbruno_firewire/sys/netinet6/ip6_forward.c projects/sbruno_firewire/sys/netinet6/ip6_input.c projects/sbruno_firewire/sys/netinet6/ip6_output.c projects/sbruno_firewire/sys/netinet6/ip6_var.h projects/sbruno_firewire/sys/nfsclient/nfs_kdtrace.c projects/sbruno_firewire/sys/nfsclient/nfs_vnops.c projects/sbruno_firewire/sys/nlm/nlm.h projects/sbruno_firewire/sys/nlm/nlm_prot_impl.c projects/sbruno_firewire/sys/nlm/nlm_prot_server.c projects/sbruno_firewire/sys/pc98/conf/GENERIC projects/sbruno_firewire/sys/powerpc/aim/clock.c projects/sbruno_firewire/sys/powerpc/aim/machdep.c projects/sbruno_firewire/sys/powerpc/aim/mmu_oea.c projects/sbruno_firewire/sys/powerpc/aim/mmu_oea64.c projects/sbruno_firewire/sys/powerpc/aim/mp_cpudep.c projects/sbruno_firewire/sys/powerpc/aim/platform_chrp.c projects/sbruno_firewire/sys/powerpc/aim/swtch.S projects/sbruno_firewire/sys/powerpc/aim/trap_subr.S projects/sbruno_firewire/sys/powerpc/booke/mp_cpudep.c projects/sbruno_firewire/sys/powerpc/booke/pmap.c projects/sbruno_firewire/sys/powerpc/include/elf.h projects/sbruno_firewire/sys/powerpc/include/hid.h projects/sbruno_firewire/sys/powerpc/include/pcpu.h projects/sbruno_firewire/sys/powerpc/include/pmap.h projects/sbruno_firewire/sys/powerpc/include/smp.h projects/sbruno_firewire/sys/powerpc/include/spr.h projects/sbruno_firewire/sys/powerpc/powermac/hrowpic.c projects/sbruno_firewire/sys/powerpc/powerpc/cpu.c projects/sbruno_firewire/sys/powerpc/powerpc/elf_machdep.c projects/sbruno_firewire/sys/powerpc/powerpc/mmu_if.m projects/sbruno_firewire/sys/powerpc/powerpc/mp_machdep.c projects/sbruno_firewire/sys/powerpc/powerpc/pmap_dispatch.c projects/sbruno_firewire/sys/powerpc/powerpc/uio_machdep.c projects/sbruno_firewire/sys/sparc64/conf/GENERIC projects/sbruno_firewire/sys/sparc64/include/elf.h projects/sbruno_firewire/sys/sparc64/sparc64/elf_machdep.c projects/sbruno_firewire/sys/sparc64/sparc64/pmap.c projects/sbruno_firewire/sys/sun4v/include/elf.h projects/sbruno_firewire/sys/sun4v/sun4v/pmap.c projects/sbruno_firewire/sys/sys/bus.h projects/sbruno_firewire/sys/sys/errno.h projects/sbruno_firewire/sys/sys/interrupt.h projects/sbruno_firewire/sys/sys/kernel.h projects/sbruno_firewire/sys/sys/ktrace.h projects/sbruno_firewire/sys/sys/pmc.h projects/sbruno_firewire/sys/sys/signalvar.h projects/sbruno_firewire/sys/sys/ttyqueue.h projects/sbruno_firewire/sys/teken/sequences projects/sbruno_firewire/sys/teken/teken.c projects/sbruno_firewire/sys/teken/teken_subr.h projects/sbruno_firewire/sys/tools/fw_stub.awk projects/sbruno_firewire/sys/tools/makeobjops.awk projects/sbruno_firewire/sys/vm/pmap.h projects/sbruno_firewire/sys/vm/swap_pager.c projects/sbruno_firewire/sys/vm/vm_extern.h projects/sbruno_firewire/sys/vm/vm_glue.c projects/sbruno_firewire/sys/vm/vm_mmap.c projects/sbruno_firewire/sys/vm/vm_page.c projects/sbruno_firewire/sys/vm/vm_page.h projects/sbruno_firewire/tools/regression/fstest/tests/rename/21.t projects/sbruno_firewire/tools/regression/lib/libc/gen/test-wordexp.c projects/sbruno_firewire/tools/regression/lib/libc/stdio/test-getdelim.c projects/sbruno_firewire/tools/regression/lib/libutil/test-flopen.c projects/sbruno_firewire/tools/regression/mmap/mmap.c projects/sbruno_firewire/tools/regression/sigqueue/sigqtest1/sigqtest1.c projects/sbruno_firewire/tools/regression/sigqueue/sigqtest2/sigqtest2.c projects/sbruno_firewire/tools/regression/tmpfs/h_tools.c projects/sbruno_firewire/tools/tools/netrate/netsend/netsend.c projects/sbruno_firewire/usr.bin/calendar/calendars/calendar.freebsd projects/sbruno_firewire/usr.bin/locale/locale.1 projects/sbruno_firewire/usr.bin/locale/locale.c projects/sbruno_firewire/usr.bin/make/job.c projects/sbruno_firewire/usr.bin/make/main.c projects/sbruno_firewire/usr.bin/netstat/main.c projects/sbruno_firewire/usr.bin/netstat/netstat.h projects/sbruno_firewire/usr.bin/netstat/route.c projects/sbruno_firewire/usr.bin/netstat/unix.c projects/sbruno_firewire/usr.bin/systat/keyboard.c projects/sbruno_firewire/usr.bin/systat/main.c projects/sbruno_firewire/usr.bin/touch/touch.c projects/sbruno_firewire/usr.bin/whois/whois.1 projects/sbruno_firewire/usr.bin/whois/whois.c projects/sbruno_firewire/usr.sbin/acpi/iasl/Makefile projects/sbruno_firewire/usr.sbin/cdcontrol/cdcontrol.c projects/sbruno_firewire/usr.sbin/jail/jail.8 projects/sbruno_firewire/usr.sbin/mfiutil/mfiutil.8 (props changed) projects/sbruno_firewire/usr.sbin/ntp/doc/ntpd.8 projects/sbruno_firewire/usr.sbin/sysinstall/tcpip.c projects/sbruno_firewire/usr.sbin/tzsetup/tzsetup.8 projects/sbruno_firewire/usr.sbin/tzsetup/tzsetup.c Modified: projects/sbruno_firewire/Makefile.inc1 ============================================================================== --- projects/sbruno_firewire/Makefile.inc1 Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/Makefile.inc1 Sun Oct 25 01:19:55 2009 (r198462) @@ -929,6 +929,10 @@ _ar= usr.bin/ar _mklocale= usr.bin/mklocale .endif +.if ${BOOTSTRAPPING} < 900002 +_sed= usr.bin/sed +.endif + .if ${BOOTSTRAPPING} < 700018 _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif @@ -954,6 +958,7 @@ bootstrap-tools: usr.bin/makewhatis \ ${_mklocale} \ usr.bin/rpcgen \ + ${_sed} \ usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ @@ -1033,7 +1038,6 @@ cross-tools: .for _tool in \ gnu/usr.bin/binutils \ gnu/usr.bin/cc \ - usr.bin/sed \ usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \ ${_btxld} \ ${_crunchide} \ @@ -1122,7 +1126,7 @@ lib/libradius__L secure/lib/libssl__L: s _secure_lib_libssh= secure/lib/libssh secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L .if ${MK_KERBEROS} != "no" -kerberos5/lib/libgssapi_krb5__L: kerberos5/lib/libkrb5__L \ +kerberos5/lib/libgssapi_krb5__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libmd__L kerberos5/lib/libroken__L secure/lib/libcrypto__L \ lib/libcrypt__L Modified: projects/sbruno_firewire/ObsoleteFiles.inc ============================================================================== --- projects/sbruno_firewire/ObsoleteFiles.inc Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/ObsoleteFiles.inc Sun Oct 25 01:19:55 2009 (r198462) @@ -14,6 +14,9 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20091005: fusword.9 and susword.9 removed +OLD_FILES+=usr/share/man/man9/fusword.9.gz +OLD_FILES+=usr/share/man/man9/susword.9.gz # 20090909: vesa and dpms promoted to be i386/amd64 common OLD_FILES+=usr/include/machine/pc/vesa.h OLD_FILES+=usr/share/man/man4/i386/dpms.4.gz @@ -26,6 +29,49 @@ OLD_FILES+=usr/share/man/man8/lukemftpd. OLD_FILES+=etc/mtree/BSD.local.dist OLD_FILES+=etc/mtree/BSD.x11.dist OLD_FILES+=etc/mtree/BSD.x11-4.dist +# 20090812: net80211 documentation overhaul +OLD_FILES+=usr/share/man/man9/ieee80211_add_rates.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_add_xrates.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_alloc_node.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_attach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_begin_scan.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_cfgget.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_cfgset.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_chan2ieee.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_chan2mode.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_create_ibss.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_crypto_attach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_crypto_detach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_decap.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_dump_pkt.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_dup_bss.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_encap.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_end_scan.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_find_node.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_fix_rate.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_free_allnodes.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_ieee2mhz.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_ioctl.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_lookup_node.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_media2rate.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_media_change.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_media_init.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_media_status.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_mhz2ieee.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_next_scan.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_node_attach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_node_detach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_node_lateattach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_print_essid.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_proto_attach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_proto_detach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_rate2media.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_recv_mgmt.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_send_mgmt.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_setmode.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_timeout_nodes.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_watchdog.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_wep_crypt.9.gz # 20090801: vimage.h removed in favour of vnet.h OLD_FILES+=usr/include/sys/vimage.h # 20090719: library version bump for 8.0 @@ -503,6 +549,8 @@ OLD_FILES+=usr/include/dev/usb/usb_quirk OLD_FILES+=usr/include/dev/usb/usbcdc.h OLD_FILES+=usr/include/dev/usb/usbdivar.h OLD_FILES+=usr/include/dev/usb/uxb360gp_rdesc.h +OLD_FILES+=usr/sbin/usbdevs +OLD_FILES+=usr/share/man/man8/usbdevs.8.gz # 20090203: removal of pccard header files OLD_FILES+=usr/include/pccard/cardinfo.h OLD_FILES+=usr/include/pccard/cis.h Modified: projects/sbruno_firewire/bin/cat/Makefile ============================================================================== --- projects/sbruno_firewire/bin/cat/Makefile Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/bin/cat/Makefile Sun Oct 25 01:19:55 2009 (r198462) @@ -2,6 +2,5 @@ # $FreeBSD$ PROG= cat -WARNS?= 6 .include Modified: projects/sbruno_firewire/bin/csh/iconv_stub.c ============================================================================== --- projects/sbruno_firewire/bin/csh/iconv_stub.c Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/bin/csh/iconv_stub.c Sun Oct 25 01:19:55 2009 (r198462) @@ -61,9 +61,20 @@ dl_iconv_open(const char *tocode, const if (iconvlib == NULL) return (iconv_t)-1; iconv_open = (iconv_open_t *)dlfunc(iconvlib, ICONV_OPEN); + if (iconv_open == NULL) + goto dlfunc_err; dl_iconv = (dl_iconv_t *)dlfunc(iconvlib, ICONV_ENGINE); + if (dl_iconv == NULL) + goto dlfunc_err; dl_iconv_close = (dl_iconv_close_t *)dlfunc(iconvlib, ICONV_CLOSE); + if (dl_iconv_close == NULL) + goto dlfunc_err; } return iconv_open(tocode, fromcode); + +dlfunc_err: + dlclose(iconvlib); + iconvlib = NULL; + return (iconv_t)-1; } Modified: projects/sbruno_firewire/bin/ls/ls.c ============================================================================== --- projects/sbruno_firewire/bin/ls/ls.c Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/bin/ls/ls.c Sun Oct 25 01:19:55 2009 (r198462) @@ -399,7 +399,7 @@ main(int argc, char *argv[]) * If not -F, -d or -l options, follow any symbolic links listed on * the command line. */ - if (!f_longform && !f_listdir && !f_type) + if (!f_longform && !f_listdir && (!f_type || f_slash)) fts_options |= FTS_COMFOLLOW; /* Modified: projects/sbruno_firewire/bin/sh/eval.c ============================================================================== --- projects/sbruno_firewire/bin/sh/eval.c Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/bin/sh/eval.c Sun Oct 25 01:19:55 2009 (r198462) @@ -713,12 +713,7 @@ evalcommand(union node *cmd, int flags, do_clearcmdentry = 1; } - find_command(argv[0], &cmdentry, 1, path); - if (cmdentry.cmdtype == CMDUNKNOWN) { /* command not found */ - exitstatus = 127; - flushout(&errout); - return; - } + find_command(argv[0], &cmdentry, 0, path); /* implement the bltin builtin here */ if (cmdentry.cmdtype == CMDBUILTIN && cmdentry.u.index == BLTINCMD) { for (;;) { @@ -740,7 +735,7 @@ evalcommand(union node *cmd, int flags, /* Fork off a child process if necessary. */ if (cmd->ncmd.backgnd - || (cmdentry.cmdtype == CMDNORMAL + || ((cmdentry.cmdtype == CMDNORMAL || cmdentry.cmdtype == CMDUNKNOWN) && ((flags & EV_EXIT) == 0 || have_traps())) || ((flags & EV_BACKCMD) != 0 && (cmdentry.cmdtype != CMDBUILTIN Modified: projects/sbruno_firewire/bin/sh/exec.c ============================================================================== --- projects/sbruno_firewire/bin/sh/exec.c Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/bin/sh/exec.c Sun Oct 25 01:19:55 2009 (r198462) @@ -429,6 +429,7 @@ loop: outfmt(out2, "%s: %s\n", name, strerror(e)); } entry->cmdtype = CMDUNKNOWN; + entry->u.index = 0; return; success: Modified: projects/sbruno_firewire/bin/sh/expand.c ============================================================================== --- projects/sbruno_firewire/bin/sh/expand.c Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/bin/sh/expand.c Sun Oct 25 01:19:55 2009 (r198462) @@ -657,7 +657,7 @@ again: /* jump here after setting a vari } varlen = 0; startloc = expdest - stackblock(); - if (!set && uflag) { + if (!set && uflag && *var != '@' && *var != '*') { switch (subtype) { case VSNORMAL: case VSTRIMLEFT: Modified: projects/sbruno_firewire/bin/sh/parser.c ============================================================================== --- projects/sbruno_firewire/bin/sh/parser.c Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/bin/sh/parser.c Sun Oct 25 01:19:55 2009 (r198462) @@ -82,7 +82,6 @@ struct heredoc { STATIC struct heredoc *heredoclist; /* list of here documents to read */ -STATIC int parsebackquote; /* nonzero if we are inside backquotes */ STATIC int doprompt; /* if set, prompt the user */ STATIC int needprompt; /* true if interactive and at start of line */ STATIC int lasttoken; /* last token read */ @@ -1043,7 +1042,7 @@ readtoken1(int firstc, char const *synta endword: if (syntax == ARISYNTAX) synerror("Missing '))'"); - if (syntax != BASESYNTAX && ! parsebackquote && eofmark == NULL) + if (syntax != BASESYNTAX && eofmark == NULL) synerror("Unterminated quoted string"); if (varnest != 0) { startlinno = plinno; @@ -1303,20 +1302,22 @@ parsesub: { parsebackq: { struct nodelist **nlpp; - int savepbq; union node *n; char *volatile str; struct jmploc jmploc; struct jmploc *const savehandler = handler; int savelen; int saveprompt; + const int bq_startlinno = plinno; - savepbq = parsebackquote; if (setjmp(jmploc.loc)) { if (str) ckfree(str); - parsebackquote = 0; handler = savehandler; + if (exception == EXERROR) { + startlinno = bq_startlinno; + synerror("Error in command substitution"); + } longjmp(handler->loc, 1); } INTOFF; @@ -1397,7 +1398,6 @@ done: nlpp = &(*nlpp)->next; *nlpp = (struct nodelist *)stalloc(sizeof (struct nodelist)); (*nlpp)->next = NULL; - parsebackquote = oldstyle; if (oldstyle) { saveprompt = doprompt; @@ -1433,7 +1433,6 @@ done: str = NULL; INTON; } - parsebackquote = savepbq; handler = savehandler; if (arinest || dblquote) USTPUTC(CTLBACKQ | CTLQUOTE, out); Modified: projects/sbruno_firewire/bin/sh/sh.1 ============================================================================== --- projects/sbruno_firewire/bin/sh/sh.1 Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/bin/sh/sh.1 Sun Oct 25 01:19:55 2009 (r198462) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd May 31, 2009 +.Dd October 24, 2009 .Dt SH 1 .Os .Sh NAME @@ -296,7 +296,10 @@ sh -T -c "trap 'exit 1' 2 ; some-blockin .Ed .It Fl u Li nounset Write a message to standard error when attempting -to expand a variable that is not set, and if the +to expand a variable, a positional parameter or +the special parameter +.Va \&! +that is not set, and if the shell is not interactive, exit immediately. .It Fl V Li vi Enable the built-in @@ -1227,6 +1230,9 @@ In all cases, the final value of .Ar parameter is substituted. +Quoting inside +.Ar word +does not prevent field splitting or pathname expansion. Only variables, not positional parameters or special parameters, can be assigned in this way. Modified: projects/sbruno_firewire/bin/uuidgen/Makefile ============================================================================== --- projects/sbruno_firewire/bin/uuidgen/Makefile Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/bin/uuidgen/Makefile Sun Oct 25 01:19:55 2009 (r198462) @@ -1,6 +1,5 @@ # $FreeBSD$ PROG= uuidgen -WARNS?= 6 .include Modified: projects/sbruno_firewire/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- projects/sbruno_firewire/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 25 01:19:55 2009 (r198462) @@ -1790,11 +1790,14 @@ zfs_prop_set(zfs_handle_t *zhp, const ch /* We don't support those properties on FreeBSD. */ switch (prop) { - case ZFS_PROP_SHAREISCSI: case ZFS_PROP_DEVICES: - case ZFS_PROP_ACLMODE: - case ZFS_PROP_ACLINHERIT: + case ZFS_PROP_ZONED: + case ZFS_PROP_SHAREISCSI: case ZFS_PROP_ISCSIOPTIONS: + case ZFS_PROP_XATTR: + case ZFS_PROP_VSCAN: + case ZFS_PROP_NBMAND: + case ZFS_PROP_SHARESMB: (void) snprintf(errbuf, sizeof (errbuf), "property '%s' not supported on FreeBSD", propname); ret = zfs_error(hdl, EZFS_PERM, errbuf); Modified: projects/sbruno_firewire/contrib/gcc/config/i386/i386.c ============================================================================== --- projects/sbruno_firewire/contrib/gcc/config/i386/i386.c Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/contrib/gcc/config/i386/i386.c Sun Oct 25 01:19:55 2009 (r198462) @@ -1614,7 +1614,7 @@ override_options (void) "-mtune=generic instead as appropriate."); if (!ix86_arch_string) - ix86_arch_string = TARGET_64BIT ? "x86-64" : "i386"; + ix86_arch_string = TARGET_64BIT ? "x86-64" : "i486"; if (!strcmp (ix86_arch_string, "generic")) error ("generic CPU can be used only for -mtune= switch"); if (!strncmp (ix86_arch_string, "generic", 7)) Modified: projects/sbruno_firewire/contrib/openpam/doc/man/pam.conf.5 ============================================================================== --- projects/sbruno_firewire/contrib/openpam/doc/man/pam.conf.5 Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/contrib/openpam/doc/man/pam.conf.5 Sun Oct 25 01:19:55 2009 (r198462) @@ -109,7 +109,7 @@ will be failure regardless of the succes .It Cm requisite If this module succeeds, the result of the chain will be success unless a later module fails. -If it module fails, the chain is broken and the result is failure. +If the module fails, the chain is broken and the result is failure. .It Cm sufficient If this module succeeds, the chain is broken and the result is success. Modified: projects/sbruno_firewire/contrib/tcpdump/print-tcp.c ============================================================================== --- projects/sbruno_firewire/contrib/tcpdump/print-tcp.c Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/contrib/tcpdump/print-tcp.c Sun Oct 25 01:19:55 2009 (r198462) @@ -124,6 +124,7 @@ struct tok tcp_option_values[] = { { TCPOPT_CCECHO, "" }, { TCPOPT_SIGNATURE, "md5" }, { TCPOPT_AUTH, "enhanced auth" }, + { TCPOPT_UTO, "uto" }, { 0, NULL } }; @@ -613,6 +614,17 @@ tcp_print(register const u_char *bp, reg */ break; + case TCPOPT_UTO: + datalen = 2; + LENCHECK(datalen); + uint utoval = EXTRACT_16BITS(cp); + if (utoval & 0x0001) + utoval = (utoval >> 1) * 60; + else + utoval >>= 1; + (void)printf(" %u", utoval); + break; + default: datalen = len - 2; for (i = 0; i < datalen; ++i) { Modified: projects/sbruno_firewire/contrib/tcpdump/tcp.h ============================================================================== --- projects/sbruno_firewire/contrib/tcpdump/tcp.h Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/contrib/tcpdump/tcp.h Sun Oct 25 01:19:55 2009 (r198462) @@ -83,6 +83,8 @@ struct tcphdr { #define TCPOLEN_SIGNATURE 18 #define TCP_SIGLEN 16 /* length of an option 19 digest */ #define TCPOPT_AUTH 20 /* Enhanced AUTH option */ +#define TCPOPT_UTO 28 /* tcp user timeout (rfc5482) */ +#define TCPOLEN_UTO 4 #define TCPOPT_TSTAMP_HDR \ (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP) Modified: projects/sbruno_firewire/contrib/tcsh/sh.c ============================================================================== --- projects/sbruno_firewire/contrib/tcsh/sh.c Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/contrib/tcsh/sh.c Sun Oct 25 01:19:55 2009 (r198462) @@ -1291,6 +1291,8 @@ main(int argc, char **argv) /* * Mop-up. */ + /* Take care of these (especially HUP) here instead of inside flush. */ + handle_pending_signals(); if (intty) { if (loginsh) { xprintf("logout\n"); Modified: projects/sbruno_firewire/crypto/openssh/ssh_namespace.h ============================================================================== --- projects/sbruno_firewire/crypto/openssh/ssh_namespace.h Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/crypto/openssh/ssh_namespace.h Sun Oct 25 01:19:55 2009 (r198462) @@ -7,7 +7,7 @@ * * A list of symbols which need munging is obtained as follows: * - * nm libssh.a | awk '$2 == "T" && $3 !~ /^ssh_/ { print "#define", $3, "ssh_" $3 }' + * nm libssh.a | awk '/[0-9a-z] [A-Z] / && $3 !~ /^ssh_/ { print "#define", $3, "ssh_" $3 }' * * $FreeBSD$ */ @@ -18,6 +18,7 @@ #define acss_setkey ssh_acss_setkey #define acss_setsubkey ssh_acss_setsubkey #define add_host_to_hostfile ssh_add_host_to_hostfile +#define add_recv_bytes ssh_add_recv_bytes #define addargs ssh_addargs #define addr_match_list ssh_addr_match_list #define ask_permission ssh_ask_permission @@ -111,6 +112,8 @@ #define channel_open_message ssh_channel_open_message #define channel_output_poll ssh_channel_output_poll #define channel_permit_all_opens ssh_channel_permit_all_opens +#define channel_post ssh_channel_post +#define channel_pre ssh_channel_pre #define channel_prepare_select ssh_channel_prepare_select #define channel_print_adm_permitted_opens ssh_channel_print_adm_permitted_opens #define channel_register_cleanup ssh_channel_register_cleanup @@ -150,14 +153,19 @@ #define cipher_set_key_string ssh_cipher_set_key_string #define cipher_set_keycontext ssh_cipher_set_keycontext #define cipher_set_keyiv ssh_cipher_set_keyiv +#define ciphers ssh_ciphers #define ciphers_valid ssh_ciphers_valid #define cleanhostname ssh_cleanhostname #define cleanup_exit ssh_cleanup_exit #define clear_cached_addr ssh_clear_cached_addr #define colon ssh_colon +#define compat13 ssh_compat13 +#define compat20 ssh_compat20 #define compat_cipher_proposal ssh_compat_cipher_proposal #define compat_datafellows ssh_compat_datafellows #define convtime ssh_convtime +#define current_keys ssh_current_keys +#define datafellows ssh_datafellows #define debug ssh_debug #define debug ssh_debug #define debug2 ssh_debug2 @@ -175,6 +183,7 @@ #define dh_new_group14 ssh_dh_new_group14 #define dh_new_group_asc ssh_dh_new_group_asc #define dh_pub_is_valid ssh_dh_pub_is_valid +#define dispatch ssh_dispatch #define dispatch_init ssh_dispatch_init #define dispatch_protocol_error ssh_dispatch_protocol_error #define dispatch_protocol_ignore ssh_dispatch_protocol_ignore @@ -205,6 +214,7 @@ #define get_local_port ssh_get_local_port #define get_peer_ipaddr ssh_get_peer_ipaddr #define get_peer_port ssh_get_peer_port +#define get_recv_bytes ssh_get_recv_bytes #define get_remote_ipaddr ssh_get_remote_ipaddr #define get_remote_name_or_ip ssh_get_remote_name_or_ip #define get_remote_port ssh_get_remote_port @@ -216,6 +226,7 @@ #define host_hash ssh_host_hash #define hostfile_read_key ssh_hostfile_read_key #define hpdelim ssh_hpdelim +#define incoming_stream ssh_incoming_stream #define init_rng ssh_init_rng #define ipv64_normalise_mapped ssh_ipv64_normalise_mapped #define kex_derive_keys ssh_kex_derive_keys @@ -268,6 +279,7 @@ #define mac_init ssh_mac_init #define mac_setup ssh_mac_setup #define mac_valid ssh_mac_valid +#define macs ssh_macs #define match_host_and_ip ssh_match_host_and_ip #define match_hostname ssh_match_hostname #define match_list ssh_match_list @@ -279,6 +291,7 @@ #define ms_subtract_diff ssh_ms_subtract_diff #define ms_to_timeval ssh_ms_to_timeval #define mysignal ssh_mysignal +#define outgoing_stream ssh_outgoing_stream #define packet_add_padding ssh_packet_add_padding #define packet_backup_state ssh_packet_backup_state #define packet_close ssh_packet_close @@ -363,9 +376,13 @@ #define refresh_progress_meter ssh_refresh_progress_meter #define replacearg ssh_replacearg #define restore_uid ssh_restore_uid +#define resume_in_progress ssh_resume_in_progress +#define resume_kex ssh_resume_kex #define rijndael_decrypt ssh_rijndael_decrypt #define rijndael_encrypt ssh_rijndael_encrypt #define rijndael_set_key ssh_rijndael_set_key +#define roaming_read ssh_roaming_read +#define roaming_write ssh_roaming_write #define rsa_generate_additional_parameters ssh_rsa_generate_additional_parameters #define rsa_private_decrypt ssh_rsa_private_decrypt #define rsa_public_encrypt ssh_rsa_public_encrypt @@ -393,6 +410,7 @@ #define tty_make_modes ssh_tty_make_modes #define tty_parse_modes ssh_tty_parse_modes #define tun_open ssh_tun_open +#define umac_ctx ssh_umac_ctx #define umac_delete ssh_umac_delete #define umac_final ssh_umac_final #define umac_new ssh_umac_new Modified: projects/sbruno_firewire/crypto/openssh/sshd_config ============================================================================== --- projects/sbruno_firewire/crypto/openssh/sshd_config Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/crypto/openssh/sshd_config Sun Oct 25 01:19:55 2009 (r198462) @@ -17,7 +17,6 @@ #VersionAddendum FreeBSD-20091001 #Port 22 -#Protocol 2 #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress :: Modified: projects/sbruno_firewire/etc/defaults/rc.conf ============================================================================== --- projects/sbruno_firewire/etc/defaults/rc.conf Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/defaults/rc.conf Sun Oct 25 01:19:55 2009 (r198462) @@ -600,6 +600,7 @@ harvest_ethernet="YES" # Entropy device harvest_p_to_p="YES" # Entropy device harvests point-to-point randomness dmesg_enable="YES" # Save dmesg(8) to /var/run/dmesg.boot watchdogd_enable="NO" # Start the software watchdog daemon +watchdogd_flags="" # Flags to watchdogd (if enabled) devfs_rulesets="/etc/defaults/devfs.rules /etc/devfs.rules" # Files containing # devfs(8) rules. devfs_system_ruleset="" # The name (NOT number) of a ruleset to apply to /dev Modified: projects/sbruno_firewire/etc/gettytab ============================================================================== --- projects/sbruno_firewire/etc/gettytab Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/gettytab Sun Oct 25 01:19:55 2009 (r198462) @@ -162,7 +162,7 @@ X|Xwindow|X window system:\ :fd@:nd@:cd@:rw:sp#9600: P|Pc|Pc console:\ - :ht:np:sp#115200: + :ht:np:sp#9600: # # Wierdo special case for fast crt's with hardcopy devices Modified: projects/sbruno_firewire/etc/network.subr ============================================================================== --- projects/sbruno_firewire/etc/network.subr Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/network.subr Sun Oct 25 01:19:55 2009 (r198462) @@ -356,6 +356,16 @@ afexists() inet6) ${SYSCTL_N} net.inet6 > /dev/null 2>&1 ;; + ipx) + ${SYSCTL_N} net.ipx > /dev/null 2>&1 + ;; + atm) + if [ -x /sbin/atmconfig ]; then + /sbin/atmconfig diag list > /dev/null 2>&1 + else + return 1 + fi + ;; *) err 1 "afexists(): Unsupported address family: $_af" ;; Modified: projects/sbruno_firewire/etc/pam.d/ftpd ============================================================================== --- projects/sbruno_firewire/etc/pam.d/ftpd Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/pam.d/ftpd Sun Oct 25 01:19:55 2009 (r198462) @@ -8,12 +8,12 @@ auth sufficient pam_opie.so no_warn no_fake_prompts auth requisite pam_opieaccess.so no_warn allow_local #auth sufficient pam_krb5.so no_warn -#auth sufficient pam_ssh.so no_warn try_first_pass +#auth sufficient pam_ssh.so no_warn try_first_pass auth required pam_unix.so no_warn try_first_pass # account account required pam_nologin.so -#account required pam_krb5.so +#account required pam_krb5.so account required pam_unix.so # session Modified: projects/sbruno_firewire/etc/pam.d/kde ============================================================================== --- projects/sbruno_firewire/etc/pam.d/kde Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/pam.d/kde Sun Oct 25 01:19:55 2009 (r198462) @@ -11,9 +11,9 @@ auth required pam_unix.so no_warn try_ # account account required pam_nologin.so -#account required pam_krb5.so +#account required pam_krb5.so account required pam_unix.so # session -#session optional pam_ssh.so +#session optional pam_ssh.so want_agent session required pam_permit.so Modified: projects/sbruno_firewire/etc/pam.d/other ============================================================================== --- projects/sbruno_firewire/etc/pam.d/other Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/pam.d/other Sun Oct 25 01:19:55 2009 (r198462) @@ -13,12 +13,12 @@ auth required pam_unix.so no_warn try_ # account account required pam_nologin.so -#account required pam_krb5.so +#account required pam_krb5.so account required pam_login_access.so account required pam_unix.so # session -#session optional pam_ssh.so +#session optional pam_ssh.so want_agent session required pam_permit.so # password Modified: projects/sbruno_firewire/etc/pam.d/sshd ============================================================================== --- projects/sbruno_firewire/etc/pam.d/sshd Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/pam.d/sshd Sun Oct 25 01:19:55 2009 (r198462) @@ -13,12 +13,12 @@ auth required pam_unix.so no_warn try_ # account account required pam_nologin.so -#account required pam_krb5.so +#account required pam_krb5.so account required pam_login_access.so account required pam_unix.so # session -#session optional pam_ssh.so +#session optional pam_ssh.so want_agent session required pam_permit.so # password Modified: projects/sbruno_firewire/etc/pam.d/system ============================================================================== --- projects/sbruno_firewire/etc/pam.d/system Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/pam.d/system Sun Oct 25 01:19:55 2009 (r198462) @@ -12,12 +12,12 @@ auth requisite pam_opieaccess.so no_war auth required pam_unix.so no_warn try_first_pass nullok # account -#account required pam_krb5.so +#account required pam_krb5.so account required pam_login_access.so account required pam_unix.so # session -#session optional pam_ssh.so +#session optional pam_ssh.so want_agent session required pam_lastlog.so no_fail # password Modified: projects/sbruno_firewire/etc/pam.d/telnetd ============================================================================== --- projects/sbruno_firewire/etc/pam.d/telnetd Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/pam.d/telnetd Sun Oct 25 01:19:55 2009 (r198462) @@ -13,12 +13,12 @@ auth required pam_unix.so no_warn try_ # account account required pam_nologin.so -#account required pam_krb5.so +#account required pam_krb5.so account required pam_login_access.so account required pam_unix.so # session -#session optional pam_ssh.so +#session optional pam_ssh.so want_agent session required pam_lastlog.so no_fail # password Modified: projects/sbruno_firewire/etc/pam.d/xdm ============================================================================== --- projects/sbruno_firewire/etc/pam.d/xdm Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/pam.d/xdm Sun Oct 25 01:19:55 2009 (r198462) @@ -11,11 +11,11 @@ auth required pam_unix.so no_warn try_ # account account required pam_nologin.so -#account required pam_krb5.so +#account required pam_krb5.so account required pam_unix.so # session -#session required pam_ssh.so want_agent +#session required pam_ssh.so want_agent session required pam_lastlog.so no_fail # password Modified: projects/sbruno_firewire/etc/rc.d/bgfsck ============================================================================== --- projects/sbruno_firewire/etc/rc.d/bgfsck Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/bgfsck Sun Oct 25 01:19:55 2009 (r198462) @@ -31,7 +31,7 @@ bgfsck_start () bgfsck_msg="${bgfsck_msg} in ${background_fsck_delay} seconds" fi if [ -z "${rc_force}" ]; then - [ -z "${rc_quiet}" ] && echo "${bgfsck_msg}." + check_startmsgs && echo "${bgfsck_msg}." fi (sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \ Modified: projects/sbruno_firewire/etc/rc.d/cleartmp ============================================================================== --- projects/sbruno_firewire/etc/rc.d/cleartmp Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/cleartmp Sun Oct 25 01:19:55 2009 (r198462) @@ -25,7 +25,7 @@ cleartmp_start() ${tmp}/.ICE-unix ${tmp}/.font-unix" if checkyesno ${rcvar1}; then - [ -z "${rc_quiet}" ] && echo "Clearing ${tmp}." + check_startmsgs && echo "Clearing ${tmp}." # This is not needed for mfs, but doesn't hurt anything. # Things to note: @@ -44,7 +44,7 @@ cleartmp_start() elif checkyesno clear_tmp_X; then # Remove X lock files, since they will prevent you from # restarting X. Remove other X related directories. - [ -z "${rc_quiet}" ] && echo "Clearing ${tmp} (X related)." + check_startmsgs && echo "Clearing ${tmp} (X related)." rm -rf ${tmp}/.X[0-9]-lock ${x11_socket_dirs} fi if checkyesno clear_tmp_X; then Modified: projects/sbruno_firewire/etc/rc.d/defaultroute ============================================================================== --- projects/sbruno_firewire/etc/rc.d/defaultroute Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/defaultroute Sun Oct 25 01:19:55 2009 (r198462) @@ -20,6 +20,8 @@ defaultroute_start() { local output carrier nocarrier nl + afexists inet || return 0 + # Return without waiting if we don't have dhcp interfaces or # if none of the dhcp interfaces is plugged in. dhcp_interfaces=`list_net_interfaces dhcp` Modified: projects/sbruno_firewire/etc/rc.d/faith ============================================================================== --- projects/sbruno_firewire/etc/rc.d/faith Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/faith Sun Oct 25 01:19:55 2009 (r198462) @@ -3,7 +3,7 @@ # # PROVIDE: faith -# REQUIRE: netif routing +# REQUIRE: netif # KEYWORD: nojail . /etc/rc.subr @@ -39,9 +39,7 @@ faith_up() route change -inet6 ${prefix} -prefixlen ${prefixlen} \ -ifp faith0 done - if [ -z "${rc_quiet}" ]; then - ifconfig faith0 - fi + check_startmsgs && ifconfig faith0 ;; esac } Modified: projects/sbruno_firewire/etc/rc.d/fsck ============================================================================== --- projects/sbruno_firewire/etc/rc.d/fsck Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/fsck Sun Oct 25 01:19:55 2009 (r198462) @@ -23,7 +23,7 @@ fsck_start() # During fsck ignore SIGQUIT trap : 3 - [ -z "${rc_quiet}" ] && echo "Starting file system checks:" + check_startmsgs && echo "Starting file system checks:" if checkyesno background_fsck; then fsck -F -p else Modified: projects/sbruno_firewire/etc/rc.d/hostid ============================================================================== --- projects/sbruno_firewire/etc/rc.d/hostid Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/hostid Sun Oct 25 01:19:55 2009 (r198462) @@ -49,9 +49,9 @@ hostid_set() # Set both kern.hostuuid and kern.hostid. # - [ -z "${rc_quiet}" ] && echo "Setting hostuuid: ${uuid}." + check_startmsgs && echo "Setting hostuuid: ${uuid}." ${SYSCTL_W} kern.hostuuid="${uuid}" >/dev/null - [ -z "${rc_quiet}" ] && echo "Setting hostid: ${id}." + check_startmsgs && echo "Setting hostid: ${id}." ${SYSCTL_W} kern.hostid=${id} >/dev/null } Modified: projects/sbruno_firewire/etc/rc.d/hostname ============================================================================== --- projects/sbruno_firewire/etc/rc.d/hostname Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/hostname Sun Oct 25 01:19:55 2009 (r198462) @@ -72,8 +72,9 @@ hostname_start() # All right, it is safe to invoke hostname(1) now. # - [ -z "${rc_quiet}" ] && echo "Setting hostname: ${hostname}." + check_startmsgs && echo -n "Setting hostname: ${hostname}" /bin/hostname "${hostname}" + check_startmsgs && echo '.' } load_rc_config $name Modified: projects/sbruno_firewire/etc/rc.d/ip6addrctl ============================================================================== --- projects/sbruno_firewire/etc/rc.d/ip6addrctl Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/ip6addrctl Sun Oct 25 01:19:55 2009 (r198462) @@ -9,6 +9,7 @@ # KEYWORD: nojail . /etc/rc.subr +. /etc/network.subr name="ip6addrctl" rcvar=`set_rcvar` @@ -23,6 +24,8 @@ set_rcvar_obsolete ipv6_enable ipv6_pref ip6addrctl_prefer_ipv6() { + afexists inet6 || return 0 + ip6addrctl flush >/dev/null 2>&1 ip6addrctl add ::1/128 50 0 ip6addrctl add ::/0 40 1 @@ -34,6 +37,8 @@ ip6addrctl_prefer_ipv6() ip6addrctl_prefer_ipv4() { + afexists inet6 || return 0 + ip6addrctl flush >/dev/null 2>&1 ip6addrctl add ::ffff:0:0/96 50 0 ip6addrctl add ::1/128 40 1 @@ -45,30 +50,27 @@ ip6addrctl_prefer_ipv4() ip6addrctl_start() { - if ifconfig lo0 inet6 >/dev/null 2>&1; then - # We have IPv6 support in kernel. + afexists inet6 || return 0 - # install the policy of the address selection algorithm. - if [ -f /etc/ip6addrctl.conf ]; then - ip6addrctl flush >/dev/null 2>&1 - ip6addrctl install /etc/ip6addrctl.conf - checkyesno ip6addrctl_verbose && ip6addrctl + # install the policy of the address selection algorithm. + if [ -f /etc/ip6addrctl.conf ]; then + ip6addrctl flush >/dev/null 2>&1 + ip6addrctl install /etc/ip6addrctl.conf + checkyesno ip6addrctl_verbose && ip6addrctl + else + if checkyesno ipv6_prefer; then + ip6addrctl_prefer_ipv6 else - if checkyesno ipv6_prefer; then - ip6addrctl_prefer_ipv6 - else - ip6addrctl_prefer_ipv4 - fi + ip6addrctl_prefer_ipv4 fi fi } ip6addrctl_stop() { - if ifconfig lo0 inet6 >/dev/null 2>&1; then - # We have IPv6 support in kernel. - ip6addrctl flush >/dev/null 2>&1 - fi + afexists inet6 || return 0 + + ip6addrctl flush >/dev/null 2>&1 } load_rc_config $name Modified: projects/sbruno_firewire/etc/rc.d/ldconfig ============================================================================== --- projects/sbruno_firewire/etc/rc.d/ldconfig Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/ldconfig Sun Oct 25 01:19:55 2009 (r198462) @@ -36,7 +36,7 @@ ldconfig_start() _LDC="${_LDC} ${i}" fi done - [ -z "${rc_quiet}" ] && echo 'ELF ldconfig path:' ${_LDC} + check_startmsgs && echo 'ELF ldconfig path:' ${_LDC} ${ldconfig} -elf ${_ins} ${_LDC} case `sysctl -n hw.machine_arch` in @@ -55,7 +55,7 @@ ldconfig_start() _LDC="${_LDC} ${i}" fi done - [ -z "${rc_quiet}" ] && + check_startmsgs && echo '32-bit compatibility ldconfig path:' ${_LDC} ${ldconfig} -32 -m ${_ins} ${_LDC} ;; @@ -72,8 +72,7 @@ ldconfig_start() _LDC="${_LDC} ${i}" fi done - [ -z "${rc_quiet}" ] && - echo 'a.out ldconfig path:' ${_LDC} + check_startmsgs && echo 'a.out ldconfig path:' ${_LDC} ${ldconfig} -aout ${_ins} ${_LDC} ;; esac Modified: projects/sbruno_firewire/etc/rc.d/motd ============================================================================== --- projects/sbruno_firewire/etc/rc.d/motd Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/motd Sun Oct 25 01:19:55 2009 (r198462) @@ -22,7 +22,7 @@ motd_start() # Must be done *before* interactive logins are possible # to prevent possible race conditions. # - [ -z "${rc_quiet}" ] && echo -n 'Updating motd:' + check_startmsgs && echo -n 'Updating motd:' if [ ! -f /etc/motd ]; then install -c -o root -g wheel -m ${PERMS} /dev/null /etc/motd fi @@ -42,7 +42,7 @@ motd_start() } rm -f $T - [ -z "${rc_quiet}" ] && echo . + check_startmsgs && echo '.' } load_rc_config $name Modified: projects/sbruno_firewire/etc/rc.d/mountcritlocal ============================================================================== --- projects/sbruno_firewire/etc/rc.d/mountcritlocal Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/mountcritlocal Sun Oct 25 01:19:55 2009 (r198462) @@ -28,7 +28,7 @@ mountcritlocal_start() esac # Mount everything except nfs filesystems. - [ -z "${rc_quiet}" ] && echo -n 'Mounting local file systems:' + check_startmsgs && echo -n 'Mounting local file systems:' mount_excludes='no' for i in ${netfs_types}; do fstype=${i%:*} @@ -37,7 +37,7 @@ mountcritlocal_start() mount_excludes=${mount_excludes%,} mount -a -t ${mount_excludes} err=$? - [ -z "${rc_quiet}" ] && echo '.' + check_startmsgs && echo '.' case ${err} in 0) Modified: projects/sbruno_firewire/etc/rc.d/moused ============================================================================== --- projects/sbruno_firewire/etc/rc.d/moused Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/moused Sun Oct 25 01:19:55 2009 (r198462) @@ -51,8 +51,9 @@ moused_start() mytype="$moused_type" fi - [ -z "${rc_quiet}" ] && echo -n "Starting ${ms} moused." + check_startmsgs && echo -n "Starting ${ms} moused" /usr/sbin/moused ${myflags} -p ${myport} -t ${mytype} ${pidarg} + check_startmsgs && echo '.' mousechar_arg= case ${mousechar_start} in Modified: projects/sbruno_firewire/etc/rc.d/netif ============================================================================== --- projects/sbruno_firewire/etc/rc.d/netif Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/netif Sun Oct 25 01:19:55 2009 (r198462) @@ -143,7 +143,7 @@ network_common() ;; esac echo "${_str} Network:${_ok}." - if [ -z "${rc_quiet}" ]; then + if check_startmsgs; then for ifn in ${_ok}; do /sbin/ifconfig ${ifn} done Modified: projects/sbruno_firewire/etc/rc.d/netoptions ============================================================================== --- projects/sbruno_firewire/etc/rc.d/netoptions Sun Oct 25 01:10:40 2009 (r198461) +++ projects/sbruno_firewire/etc/rc.d/netoptions Sun Oct 25 01:19:55 2009 (r198462) @@ -26,29 +26,51 @@ netoptions_init() netoptions_start() { - if checkyesno log_in_vain; then + local _af + + for _af in inet inet6; do + afexists ${_af} && eval netoptions_${_af} + done + [ -n "${_netoptions_initdone}" ] && echo '.' +} + +netoptions_inet() +{ + case ${log_in_vain} in + [12]) netoptions_init echo -n " log_in_vain=${log_in_vain}" - ${SYSCTL_W} net.inet.tcp.log_in_vain="${log_in_vain}" >/dev/null - ${SYSCTL_W} net.inet.udp.log_in_vain="${log_in_vain}" >/dev/null - fi + ${SYSCTL_W} net.inet.tcp.log_in_vain=${log_in_vain} >/dev/null + ${SYSCTL_W} net.inet.udp.log_in_vain=${log_in_vain} >/dev/null + ;; + *) + ${SYSCTL_W} net.inet.tcp.log_in_vain=0 >/dev/null + ${SYSCTL_W} net.inet.udp.log_in_vain=0 >/dev/null + ;; + esac if checkyesno tcp_extensions; then + ${SYSCTL_W} net.inet.tcp.rfc1323=1 >/dev/null + else netoptions_init - echo -n ' rfc1323 extensions=NO' + echo -n " rfc1323 extensions=${tcp_extensions}" ${SYSCTL_W} net.inet.tcp.rfc1323=0 >/dev/null fi - if ! checkyesno tcp_keepalive; then + if checkyesno tcp_keepalive; then + ${SYSCTL_W} net.inet.tcp.always_keepalive=1 >/dev/null + else netoptions_init - echo -n ' TCP keepalive=NO' + echo -n " TCP keepalive=${tcp_keepalive}" ${SYSCTL_W} net.inet.tcp.always_keepalive=0 >/dev/null fi if checkyesno tcp_drop_synfin; then netoptions_init - echo -n ' drop SYN+FIN packets=YES' + echo -n " drop SYN+FIN packets=${tcp_drop_synfin}" ${SYSCTL_W} net.inet.tcp.drop_synfin=1 >/dev/null + else + ${SYSCTL_W} net.inet.tcp.drop_synfin=0 >/dev/null fi case ${ip_portrange_first} in @@ -66,17 +88,17 @@ netoptions_start() ${SYSCTL_W} net.inet.ip.portrange.last=$ip_portrange_last >/dev/null *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sun Oct 25 08:43:39 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21705106566C; Sun, 25 Oct 2009 08:43:39 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 107BD8FC16; Sun, 25 Oct 2009 08:43:39 +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 n9P8hcqi052241; Sun, 25 Oct 2009 08:43:38 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9P8hcv7052240; Sun, 25 Oct 2009 08:43:38 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <200910250843.n9P8hcv7052240@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sun, 25 Oct 2009 08:43:38 +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: r198465 - projects/mips/sys/dev/flash 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, 25 Oct 2009 08:43:39 -0000 Author: gonzo Date: Sun Oct 25 08:43:38 2009 New Revision: 198465 URL: http://svn.freebsd.org/changeset/base/198465 Log: - Add write support for mx25l flash chip - Some minor style(9) fixes Modified: projects/mips/sys/dev/flash/mx25l.c projects/mips/sys/dev/flash/mx25lreg.h Modified: projects/mips/sys/dev/flash/mx25l.c ============================================================================== --- projects/mips/sys/dev/flash/mx25l.c Sun Oct 25 04:34:47 2009 (r198464) +++ projects/mips/sys/dev/flash/mx25l.c Sun Oct 25 08:43:38 2009 (r198465) @@ -156,6 +156,50 @@ mx25l_get_device_ident(struct mx25l_soft return (NULL); } +static void +mx25l_set_writable(device_t dev, int writable) +{ + uint8_t txBuf[1], rxBuf[1]; + struct spi_command cmd; + int err; + + memset(&cmd, 0, sizeof(cmd)); + memset(txBuf, 0, sizeof(txBuf)); + memset(rxBuf, 0, sizeof(rxBuf)); + + txBuf[0] = writable ? CMD_WRITE_ENABLE : CMD_WRITE_DISABLE; + cmd.tx_cmd = txBuf; + cmd.rx_cmd = rxBuf; + cmd.rx_cmd_sz = 1; + cmd.tx_cmd_sz = 1; + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); +} + +static void +mx25l_erase_sector(device_t dev, off_t sector) +{ + uint8_t txBuf[4], rxBuf[4]; + struct spi_command cmd; + int err; + + mx25l_wait_for_device_ready(dev); + mx25l_set_writable(dev, 1); + + memset(&cmd, 0, sizeof(cmd)); + memset(txBuf, 0, sizeof(txBuf)); + memset(rxBuf, 0, sizeof(rxBuf)); + + txBuf[0] = CMD_SECTOR_ERASE; + cmd.tx_cmd = txBuf; + cmd.rx_cmd = rxBuf; + cmd.rx_cmd_sz = 4; + cmd.tx_cmd_sz = 4; + txBuf[1] = ((sector >> 16) & 0xff); + txBuf[2] = ((sector >> 8) & 0xff); + txBuf[3] = (sector & 0xff); + err = SPIBUS_TRANSFER(device_get_parent(dev), dev, &cmd); +} + static int mx25l_probe(device_t dev) { @@ -233,7 +277,6 @@ mx25l_ioctl(struct disk *dp, u_long cmd, return (EINVAL); } - static void mx25l_strategy(struct bio *bp) { @@ -254,6 +297,8 @@ mx25l_task(void *arg) uint8_t txBuf[8], rxBuf[8]; struct spi_command cmd; device_t dev, pdev; + off_t write_offset; + long bytes_to_write, bytes_writen; for (;;) { dev = sc->sc_dev; @@ -284,11 +329,67 @@ mx25l_task(void *arg) cmd.tx_data_sz = bp->bio_bcount; cmd.rx_data = bp->bio_data; cmd.rx_data_sz = bp->bio_bcount; + bp->bio_error = SPIBUS_TRANSFER(pdev, dev, &cmd); } + else if (bp->bio_cmd == BIO_WRITE) { + mx25l_erase_sector(dev, bp->bio_offset); + + cmd.tx_cmd_sz = 4; + cmd.rx_cmd_sz = 4; + + bytes_writen = 0; + write_offset = bp->bio_offset; + + /* + * I assume here that we write per-sector only + * and sector size should be 256 bytes aligned + */ + KASSERT(write_offset % FLASH_PAGE_SIZE == 0, + ("offset for BIO_WRITE is not %d bytes aliIgned", + FLASH_PAGE_SIZE)); + + /* + * Maximum write size for CMD_PAGE_PROGRAM is + * FLASH_PAGE_SIZE, so split data to chunks + * FLASH_PAGE_SIZE bytes eash and write them + * one by one + */ + while (bytes_writen < bp->bio_bcount) { + txBuf[0] = CMD_PAGE_PROGRAM; + txBuf[1] = ((write_offset >> 16) & 0xff); + txBuf[2] = ((write_offset >> 8) & 0xff); + txBuf[3] = (write_offset & 0xff); + + bytes_to_write = MIN(FLASH_PAGE_SIZE, + bp->bio_bcount - bytes_writen); + cmd.tx_cmd = txBuf; + cmd.rx_cmd = rxBuf; + cmd.tx_data = bp->bio_data + bytes_writen; + cmd.tx_data_sz = bytes_to_write; + cmd.rx_data = bp->bio_data + bytes_writen; + cmd.rx_data_sz = bytes_to_write; + + /* + * Eash completed write operation resets WEL + * (write enable latch) to disabled state, + * so we re-enable it here + */ + mx25l_wait_for_device_ready(dev); + mx25l_set_writable(dev, 1); + + bp->bio_error = SPIBUS_TRANSFER(pdev, dev, &cmd); + if (bp->bio_error) + break; + + bytes_writen += bytes_to_write; + write_offset += bytes_to_write; + } + } else bp->bio_error = EINVAL; + biodone(bp); } } Modified: projects/mips/sys/dev/flash/mx25lreg.h ============================================================================== --- projects/mips/sys/dev/flash/mx25lreg.h Sun Oct 25 04:34:47 2009 (r198464) +++ projects/mips/sys/dev/flash/mx25lreg.h Sun Oct 25 08:43:38 2009 (r198465) @@ -52,5 +52,7 @@ #define STATUS_WEL (1 << 1) #define STATUS_WIP (1 << 0) +#define FLASH_PAGE_SIZE 256 + #endif /* __MX25LREG_H__ */ From owner-svn-src-projects@FreeBSD.ORG Sun Oct 25 19:13:40 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 127FC106566C; Sun, 25 Oct 2009 19:13:40 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01D3F8FC18; Sun, 25 Oct 2009 19:13:40 +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 n9PJDdf0066692; Sun, 25 Oct 2009 19:13:39 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9PJDdAO066690; Sun, 25 Oct 2009 19:13:39 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200910251913.n9PJDdAO066690@svn.freebsd.org> From: Andrew Thompson Date: Sun, 25 Oct 2009 19:13:39 +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: r198474 - projects/mips/sys/geom 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, 25 Oct 2009 19:13:40 -0000 Author: thompsa Date: Sun Oct 25 19:13:39 2009 New Revision: 198474 URL: http://svn.freebsd.org/changeset/base/198474 Log: If the FIS entry is smaller than the sector size then set it as hot so g_slice calls us to fix it, we then issue a read for a full sector and then copy in/out the payload. This will happen if Redboot is compiled with CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG. Modified: projects/mips/sys/geom/geom_redboot.c Modified: projects/mips/sys/geom/geom_redboot.c ============================================================================== --- projects/mips/sys/geom/geom_redboot.c Sun Oct 25 17:47:52 2009 (r198473) +++ projects/mips/sys/geom/geom_redboot.c Sun Oct 25 19:13:39 2009 (r198474) @@ -71,6 +71,7 @@ struct fis_image_desc { struct g_redboot_softc { uint32_t entry[REDBOOT_MAXSLICE]; uint32_t dsize[REDBOOT_MAXSLICE]; + uint32_t sectoff[REDBOOT_MAXSLICE]; uint8_t readonly[REDBOOT_MAXSLICE]; g_access_t *parent_access; }; @@ -104,29 +105,125 @@ g_redboot_access(struct g_provider *pp, return (sc->parent_access(pp, dread, dwrite, dexcl)); } +static void +g_redboot_done(struct bio *bp) +{ + struct bio *bp2; + struct g_provider *pp; + struct g_consumer *cp; + struct g_geom *gp; + struct g_redboot_softc *sc; + struct g_slicer *gsp; + int idx; + + bp2 = bp->bio_parent; + pp = bp2->bio_to; + idx = pp->index; + gp = pp->geom; + gsp = gp->softc; + sc = gsp->softc; + + bp2->bio_error = bp->bio_error; + if (bp2->bio_error != 0) + goto done; + + KASSERT(sc->sectoff[idx] + bp2->bio_length <= bp->bio_length, + ("overflowed bio data")); + if (bp2->bio_cmd == BIO_READ) { + /* Copy out read data */ + memcpy(bp2->bio_data, bp->bio_data + sc->sectoff[idx], + bp2->bio_length); + bp2->bio_completed = bp2->bio_length; + } else { + if (bp->bio_cmd == BIO_READ) { + /* Copy in and reissue as write */ + cp = LIST_FIRST(&gp->consumer); + memcpy(bp->bio_data + sc->sectoff[idx], bp2->bio_data, + bp2->bio_length); + bp->bio_cmd = BIO_WRITE; + g_io_request(bp, cp); + return; + } else { + /* Write done */ + bp2->bio_completed = bp2->bio_length; + } + } +done: + /* + * Finish processing the request. + */ + free(bp->bio_data, M_GEOM); + g_destroy_bio(bp); + g_io_deliver(bp2, bp2->bio_error); +} + static int g_redboot_start(struct bio *bp) { - struct g_provider *pp; + struct g_provider *pp, *pp2; struct g_geom *gp; struct g_redboot_softc *sc; struct g_slicer *gsp; + struct g_slice *gsl; + struct g_consumer *cp; + struct bio *bp2; + size_t bsize; int idx; pp = bp->bio_to; idx = pp->index; gp = pp->geom; gsp = gp->softc; + gsl = &gsp->slices[idx]; sc = gsp->softc; - if (bp->bio_cmd == BIO_GETATTR) { - if (g_handleattr_int(bp, REDBOOT_CLASS_NAME "::entry", - sc->entry[idx])) - return (1); - if (g_handleattr_int(bp, REDBOOT_CLASS_NAME "::dsize", - sc->dsize[idx])) - return (1); + switch (bp->bio_cmd) { + /* + * Read/Write are handled in g_redboot_done() after reading + * the sector + */ + case BIO_READ: + case BIO_WRITE: + break; + case BIO_GETATTR: + if (g_handleattr_int(bp, REDBOOT_CLASS_NAME "::entry", + sc->entry[idx])) + return (1); + if (g_handleattr_int(bp, REDBOOT_CLASS_NAME "::dsize", + sc->dsize[idx])) + return (1); + if (g_handleattr_int(bp, REDBOOT_CLASS_NAME "::sectoff", + sc->sectoff[idx])) + return (1); + return (0); + default: + return (EINVAL); } + cp = LIST_FIRST(&gp->consumer); + pp2 = cp->provider; + bsize = pp2->sectorsize; + + /* + * At this point we have a request which is less than the flash sector + * size, to do this we read the entire sector and then copy the data + * in/out. + */ + KASSERT(bp->bio_length < bsize, ("length greater than one sector")); + KASSERT(bp->bio_offset == 0, ("not at start of sector")); + + bp2 = g_clone_bio(bp); + if (bp2 == NULL) + return (ENOMEM); + bp2->bio_cmd = BIO_READ; + bp2->bio_done = g_redboot_done; + bp2->bio_offset = gsl->offset - sc->sectoff[idx]; + bp2->bio_length = bsize; + bp2->bio_data = malloc(bsize, M_GEOM, M_NOWAIT); + if (bp2->bio_data == NULL) { + g_destroy_bio(bp2); + return (ENOMEM); + } + g_io_request(bp2, cp); return (0); } @@ -144,11 +241,14 @@ g_redboot_dumpconf(struct sbuf *sb, cons if (indent == NULL) { sbuf_printf(sb, " entry %d", sc->entry[pp->index]); sbuf_printf(sb, " dsize %d", sc->dsize[pp->index]); + sbuf_printf(sb, " sectoff %d", sc->sectoff[pp->index]); } else { sbuf_printf(sb, "%s%d\n", indent, sc->entry[pp->index]); sbuf_printf(sb, "%s%d\n", indent, sc->dsize[pp->index]); + sbuf_printf(sb, "%s%d\n", indent, + sc->sectoff[pp->index]); } } } @@ -172,7 +272,7 @@ parse_fis_directory(u_char *buf, size_t { #define match(a,b) (bcmp(a, b, sizeof(b)-1) == 0) struct fis_image_desc *fd, *efd; - struct fis_image_desc *fisdir, *redbcfg; + struct fis_image_desc *fisdir; struct fis_image_desc *head, **tail; int i; @@ -193,15 +293,13 @@ parse_fis_directory(u_char *buf, size_t /* * Scan forward collecting entries in a list. */ - fisdir = redbcfg = NULL; + fisdir = NULL; *(tail = &head) = NULL; for (i = 0; fd < efd; i++, fd++) { if (fd->name[0] == 0xff) continue; if (match(fd->name, FISDIR_NAME)) fisdir = fd; - else if (match(fd->name, REDBCFG_NAME)) - redbcfg = fd; if (nameok(fd->name)) { /* * NB: flash address includes platform mapping; @@ -220,16 +318,6 @@ parse_fis_directory(u_char *buf, size_t (long) offset); return (NULL); } - if (redbcfg != NULL && - fisdir->offset + fisdir->size == redbcfg->offset) { - /* - * Merged FIS/RedBoot config directory. - */ - if (bootverbose) - printf("FIS/RedBoot merged at 0x%jx (not yet)\n", - offset + fisdir->offset); - /* XXX */ - } return head; #undef match } @@ -252,7 +340,8 @@ g_redboot_taste(struct g_class *mp, stru if (!strcmp(pp->geom->class->name, REDBOOT_CLASS_NAME)) return (NULL); /* XXX only taste flash providers */ - if (strncmp(pp->name, "cfi", 3)) + if (strncmp(pp->name, "cfi", 3) && + strncmp(pp->name, "flash/spi", 9)) return (NULL); gp = g_slice_new(mp, REDBOOT_MAXSLICE, pp, &cp, &sc, sizeof(*sc), g_redboot_start); @@ -300,8 +389,25 @@ again: for (fd = head, i = 0; fd != NULL; fd = fd->next) { if (fd->name[0] == '\0') continue; - error = g_slice_config(gp, i, G_SLICE_CONFIG_SET, - fd->offset, fd->size, sectorsize, "redboot/%s", fd->name); + if (fd->size < sectorsize) { + /* + * If the FIS entry is smaller than the sector size + * then set it as hot so g_slice calls us to fix it. + * This will happen if Redboot is compiled with + * CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG. + */ + sc->sectoff[i] = fd->offset & (sectorsize - 1); + error = g_slice_config(gp, i, G_SLICE_CONFIG_SET, + fd->offset, fd->size, fd->size, + "redboot/%s", fd->name); + g_slice_conf_hot(gp, i, fd->offset, fd->size, + G_SLICE_HOT_START, G_SLICE_HOT_DENY, + G_SLICE_HOT_START); + } else { + error = g_slice_config(gp, i, G_SLICE_CONFIG_SET, + fd->offset, fd->size, sectorsize, "redboot/%s", + fd->name); + } if (error) printf("%s: g_slice_config returns %d for \"%s\"\n", __func__, error, fd->name); From owner-svn-src-projects@FreeBSD.ORG Mon Oct 26 10:59:57 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47DBA106568F; Mon, 26 Oct 2009 10:59:56 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 371898FC17; Mon, 26 Oct 2009 10:59:56 +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 n9QAxtX2086488; Mon, 26 Oct 2009 10:59:55 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9QAxtsU086486; Mon, 26 Oct 2009 10:59:55 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200910261059.n9QAxtsU086486@svn.freebsd.org> From: Randall Stewart Date: Mon, 26 Oct 2009 10:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198484 - projects/mips/sys/mips/rmi 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, 26 Oct 2009 10:59:57 -0000 Author: rrs Date: Mon Oct 26 10:59:55 2009 New Revision: 198484 URL: http://svn.freebsd.org/changeset/base/198484 Log: Fix Copyright ;-) Modified: projects/mips/sys/mips/rmi/intr_machdep.c Modified: projects/mips/sys/mips/rmi/intr_machdep.c ============================================================================== --- projects/mips/sys/mips/rmi/intr_machdep.c Mon Oct 26 10:35:16 2009 (r198483) +++ projects/mips/sys/mips/rmi/intr_machdep.c Mon Oct 26 10:59:55 2009 (r198484) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006 Fill this file and put your name here + * Copyright (c) 2006-2009 RMI Corporation * Copyright (c) 2002-2004 Juli Mallett * All rights reserved. * From owner-svn-src-projects@FreeBSD.ORG Mon Oct 26 11:00:37 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6E001065692; Mon, 26 Oct 2009 11:00:37 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4CBA8FC1E; Mon, 26 Oct 2009 11:00:37 +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 n9QB0bE3086566; Mon, 26 Oct 2009 11:00:37 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9QB0btN086564; Mon, 26 Oct 2009 11:00:37 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200910261100.n9QB0btN086564@svn.freebsd.org> From: Randall Stewart Date: Mon, 26 Oct 2009 11:00:37 +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: r198485 - projects/mips/sys/mips/rmi 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, 26 Oct 2009 11:00:37 -0000 Author: rrs Date: Mon Oct 26 11:00:37 2009 New Revision: 198485 URL: http://svn.freebsd.org/changeset/base/198485 Log: White space changes. Modified: projects/mips/sys/mips/rmi/board.c Modified: projects/mips/sys/mips/rmi/board.c ============================================================================== --- projects/mips/sys/mips/rmi/board.c Mon Oct 26 10:59:55 2009 (r198484) +++ projects/mips/sys/mips/rmi/board.c Mon Oct 26 11:00:37 2009 (r198485) @@ -40,45 +40,45 @@ #include static int xlr_rxstn_to_txstn_map[128] = { - [0 ... 7] = TX_STN_CPU_0, - [8 ... 15] = TX_STN_CPU_1, - [16 ... 23] = TX_STN_CPU_2, - [24 ... 31] = TX_STN_CPU_3, - [32 ... 39] = TX_STN_CPU_4, - [40 ... 47] = TX_STN_CPU_5, - [48 ... 55] = TX_STN_CPU_6, - [56 ... 63] = TX_STN_CPU_7, - [64 ... 95] = TX_STN_INVALID, - [96 ... 103] = TX_STN_GMAC, - [104 ... 107] = TX_STN_DMA, - [108 ... 111] = TX_STN_INVALID, - [112 ... 113] = TX_STN_XGS_0, - [114 ... 115] = TX_STN_XGS_1, - [116 ... 119] = TX_STN_INVALID, - [120 ... 127] = TX_STN_SAE + [0 ... 7] = TX_STN_CPU_0, + [8 ... 15] = TX_STN_CPU_1, + [16 ... 23] = TX_STN_CPU_2, + [24 ... 31] = TX_STN_CPU_3, + [32 ... 39] = TX_STN_CPU_4, + [40 ... 47] = TX_STN_CPU_5, + [48 ... 55] = TX_STN_CPU_6, + [56 ... 63] = TX_STN_CPU_7, + [64 ... 95] = TX_STN_INVALID, + [96 ... 103] = TX_STN_GMAC, + [104 ... 107] = TX_STN_DMA, + [108 ... 111] = TX_STN_INVALID, + [112 ... 113] = TX_STN_XGS_0, + [114 ... 115] = TX_STN_XGS_1, + [116 ... 119] = TX_STN_INVALID, + [120 ... 127] = TX_STN_SAE }; static int xls_rxstn_to_txstn_map[128] = { - [0 ... 7] = TX_STN_CPU_0, - [8 ... 15] = TX_STN_CPU_1, - [16 ... 23] = TX_STN_CPU_2, - [24 ... 31] = TX_STN_CPU_3, - [32 ... 63] = TX_STN_INVALID, - [64 ... 71] = TX_STN_PCIE, - [72 ... 79] = TX_STN_INVALID, - [80 ... 87] = TX_STN_GMAC1, - [88 ... 95] = TX_STN_INVALID, - [96 ... 103] = TX_STN_GMAC0, - [104 ... 107] = TX_STN_DMA, - [108 ... 111] = TX_STN_CDE, - [112 ... 119] = TX_STN_INVALID, - [120 ... 127] = TX_STN_SAE + [0 ... 7] = TX_STN_CPU_0, + [8 ... 15] = TX_STN_CPU_1, + [16 ... 23] = TX_STN_CPU_2, + [24 ... 31] = TX_STN_CPU_3, + [32 ... 63] = TX_STN_INVALID, + [64 ... 71] = TX_STN_PCIE, + [72 ... 79] = TX_STN_INVALID, + [80 ... 87] = TX_STN_GMAC1, + [88 ... 95] = TX_STN_INVALID, + [96 ... 103] = TX_STN_GMAC0, + [104 ... 107] = TX_STN_DMA, + [108 ... 111] = TX_STN_CDE, + [112 ... 119] = TX_STN_INVALID, + [120 ... 127] = TX_STN_SAE }; struct stn_cc *xlr_core_cc_configs[] = {&cc_table_cpu_0, &cc_table_cpu_1, - &cc_table_cpu_2, &cc_table_cpu_3, - &cc_table_cpu_4, &cc_table_cpu_5, - &cc_table_cpu_6, &cc_table_cpu_7 }; + &cc_table_cpu_2, &cc_table_cpu_3, + &cc_table_cpu_4, &cc_table_cpu_5, + &cc_table_cpu_6, &cc_table_cpu_7 }; struct stn_cc *xls_core_cc_configs[] = {&xls_cc_table_cpu_0, &xls_cc_table_cpu_1, &xls_cc_table_cpu_2, &xls_cc_table_cpu_3}; @@ -106,30 +106,30 @@ int xlr_board_info_setup() /* network block 0 */ xlr_board_info.gmac_block[0].type = XLR_GMAC; xlr_board_info.gmac_block[0].enabled = 0xf; - xlr_board_info.gmac_block[0].credit_config = &xls_cc_table_gmac0; - xlr_board_info.gmac_block[0].station_txbase = MSGRNG_STNID_GMACTX0; - xlr_board_info.gmac_block[0].station_rfr = MSGRNG_STNID_GMACRFR_0; + xlr_board_info.gmac_block[0].credit_config = &xls_cc_table_gmac0; + xlr_board_info.gmac_block[0].station_txbase = MSGRNG_STNID_GMACTX0; + xlr_board_info.gmac_block[0].station_rfr = MSGRNG_STNID_GMACRFR_0; if (xlr_boot1_info.board_major_version == RMI_XLR_BOARD_ARIZONA_VI) xlr_board_info.gmac_block[0].mode = XLR_PORT0_RGMII; else xlr_board_info.gmac_block[0].mode = XLR_SGMII; - xlr_board_info.gmac_block[0].baseaddr = XLR_IO_GMAC_0_OFFSET; - xlr_board_info.gmac_block[0].baseirq = PIC_GMAC_0_IRQ; - xlr_board_info.gmac_block[0].baseinst = 0; + xlr_board_info.gmac_block[0].baseaddr = XLR_IO_GMAC_0_OFFSET; + xlr_board_info.gmac_block[0].baseirq = PIC_GMAC_0_IRQ; + xlr_board_info.gmac_block[0].baseinst = 0; - /* network block 1 */ + /* network block 1 */ xlr_board_info.gmac_block[1].type = XLR_GMAC; - xlr_board_info.gmac_block[1].enabled = 0xf; - xlr_board_info.gmac_block[1].credit_config = &xls_cc_table_gmac1; - xlr_board_info.gmac_block[1].station_txbase = MSGRNG_STNID_GMAC1_TX0; - xlr_board_info.gmac_block[1].station_rfr = MSGRNG_STNID_GMAC1_FR_0; - xlr_board_info.gmac_block[1].mode = XLR_SGMII; - xlr_board_info.gmac_block[1].baseaddr = XLR_IO_GMAC_4_OFFSET; - xlr_board_info.gmac_block[1].baseirq = PIC_XGS_0_IRQ; - xlr_board_info.gmac_block[1].baseinst = 4; + xlr_board_info.gmac_block[1].enabled = 0xf; + xlr_board_info.gmac_block[1].credit_config = &xls_cc_table_gmac1; + xlr_board_info.gmac_block[1].station_txbase = MSGRNG_STNID_GMAC1_TX0; + xlr_board_info.gmac_block[1].station_rfr = MSGRNG_STNID_GMAC1_FR_0; + xlr_board_info.gmac_block[1].mode = XLR_SGMII; + xlr_board_info.gmac_block[1].baseaddr = XLR_IO_GMAC_4_OFFSET; + xlr_board_info.gmac_block[1].baseirq = PIC_XGS_0_IRQ; + xlr_board_info.gmac_block[1].baseinst = 4; - /* network block 2 */ - xlr_board_info.gmac_block[2].enabled = 0; /* disabled on XLS */ + /* network block 2 */ + xlr_board_info.gmac_block[2].enabled = 0; /* disabled on XLS */ } else { xlr_board_info.is_xls = 0; xlr_board_info.nr_cpus = 32; @@ -141,38 +141,38 @@ int xlr_board_info_setup() xlr_board_info.msgmap = xlr_rxstn_to_txstn_map; xlr_board_info.gmacports = 4; - /* GMAC0 */ + /* GMAC0 */ xlr_board_info.gmac_block[0].type = XLR_GMAC; - xlr_board_info.gmac_block[0].enabled = 0xf; - xlr_board_info.gmac_block[0].credit_config = &cc_table_gmac; - xlr_board_info.gmac_block[0].station_txbase = MSGRNG_STNID_GMACTX0; - xlr_board_info.gmac_block[0].station_rfr = MSGRNG_STNID_GMACRFR_0; + xlr_board_info.gmac_block[0].enabled = 0xf; + xlr_board_info.gmac_block[0].credit_config = &cc_table_gmac; + xlr_board_info.gmac_block[0].station_txbase = MSGRNG_STNID_GMACTX0; + xlr_board_info.gmac_block[0].station_rfr = MSGRNG_STNID_GMACRFR_0; xlr_board_info.gmac_block[0].mode = XLR_RGMII; - xlr_board_info.gmac_block[0].baseaddr = XLR_IO_GMAC_0_OFFSET; - xlr_board_info.gmac_block[0].baseirq = PIC_GMAC_0_IRQ; - xlr_board_info.gmac_block[0].baseinst = 0; + xlr_board_info.gmac_block[0].baseaddr = XLR_IO_GMAC_0_OFFSET; + xlr_board_info.gmac_block[0].baseirq = PIC_GMAC_0_IRQ; + xlr_board_info.gmac_block[0].baseinst = 0; - /* XGMAC0 */ + /* XGMAC0 */ xlr_board_info.gmac_block[1].type = XLR_XGMAC; - xlr_board_info.gmac_block[1].enabled = 1; - xlr_board_info.gmac_block[1].credit_config = &cc_table_xgs_0; - xlr_board_info.gmac_block[1].station_txbase = MSGRNG_STNID_XGS0_TX; - xlr_board_info.gmac_block[1].station_rfr = MSGRNG_STNID_XGS0FR; + xlr_board_info.gmac_block[1].enabled = 1; + xlr_board_info.gmac_block[1].credit_config = &cc_table_xgs_0; + xlr_board_info.gmac_block[1].station_txbase = MSGRNG_STNID_XGS0_TX; + xlr_board_info.gmac_block[1].station_rfr = MSGRNG_STNID_XGS0FR; xlr_board_info.gmac_block[1].mode = -1; - xlr_board_info.gmac_block[1].baseaddr = XLR_IO_XGMAC_0_OFFSET; - xlr_board_info.gmac_block[1].baseirq = PIC_XGS_0_IRQ; - xlr_board_info.gmac_block[1].baseinst = 4; + xlr_board_info.gmac_block[1].baseaddr = XLR_IO_XGMAC_0_OFFSET; + xlr_board_info.gmac_block[1].baseirq = PIC_XGS_0_IRQ; + xlr_board_info.gmac_block[1].baseinst = 4; - /* XGMAC1 */ + /* XGMAC1 */ xlr_board_info.gmac_block[2].type = XLR_XGMAC; - xlr_board_info.gmac_block[2].enabled = 1; - xlr_board_info.gmac_block[2].credit_config = &cc_table_xgs_1; - xlr_board_info.gmac_block[2].station_txbase = MSGRNG_STNID_XGS1_TX; - xlr_board_info.gmac_block[2].station_rfr = MSGRNG_STNID_XGS1FR; + xlr_board_info.gmac_block[2].enabled = 1; + xlr_board_info.gmac_block[2].credit_config = &cc_table_xgs_1; + xlr_board_info.gmac_block[2].station_txbase = MSGRNG_STNID_XGS1_TX; + xlr_board_info.gmac_block[2].station_rfr = MSGRNG_STNID_XGS1FR; xlr_board_info.gmac_block[2].mode = -1; - xlr_board_info.gmac_block[2].baseaddr = XLR_IO_XGMAC_1_OFFSET; - xlr_board_info.gmac_block[2].baseirq = PIC_XGS_1_IRQ; - xlr_board_info.gmac_block[2].baseinst = 5; + xlr_board_info.gmac_block[2].baseaddr = XLR_IO_XGMAC_1_OFFSET; + xlr_board_info.gmac_block[2].baseirq = PIC_XGS_1_IRQ; + xlr_board_info.gmac_block[2].baseinst = 5; } return 0; } From owner-svn-src-projects@FreeBSD.ORG Mon Oct 26 23:39:08 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DEC71065676; Mon, 26 Oct 2009 23:39:08 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C1AF8FC1C; Mon, 26 Oct 2009 23:39:08 +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 n9QNd7Qu013710; Mon, 26 Oct 2009 23:39:07 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9QNd7Rc013704; Mon, 26 Oct 2009 23:39:07 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200910262339.n9QNd7Rc013704@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 26 Oct 2009 23:39: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: r198504 - projects/tcp_ffcaia2008_head/sys/netinet 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, 26 Oct 2009 23:39:08 -0000 Author: lstewart Date: Mon Oct 26 23:39:07 2009 New Revision: 198504 URL: http://svn.freebsd.org/changeset/base/198504 Log: WIP checkpoint commit for reassembly queue autotuning and related cleanup. More cleanup and testing required. Sponsored by: FreeBSD Foundation Modified: projects/tcp_ffcaia2008_head/sys/netinet/tcp_input.c projects/tcp_ffcaia2008_head/sys/netinet/tcp_reass.c projects/tcp_ffcaia2008_head/sys/netinet/tcp_subr.c projects/tcp_ffcaia2008_head/sys/netinet/tcp_usrreq.c projects/tcp_ffcaia2008_head/sys/netinet/tcp_var.h Modified: projects/tcp_ffcaia2008_head/sys/netinet/tcp_input.c ============================================================================== --- projects/tcp_ffcaia2008_head/sys/netinet/tcp_input.c Mon Oct 26 23:24:59 2009 (r198503) +++ projects/tcp_ffcaia2008_head/sys/netinet/tcp_input.c Mon Oct 26 23:39:07 2009 (r198504) @@ -1461,10 +1461,23 @@ tcp_do_segment(struct mbuf *m, struct tc * Set new socket buffer size. * Give up when limit is reached. */ - if (newsize) + if (newsize) { if (!sbreserve_locked(&so->so_rcv, newsize, so, NULL)) so->so_rcv.sb_flags &= ~SB_AUTOSIZE; + else { + /* + * Scale reassembly queue to 8/7 + * the socket buffer size to + * allow a little wiggle room. + */ + tp->t_segq.tsegq_maxbytes = + (newsize << 3) / 7; + tp->t_segq.tsegq_maxmbufs = + tp->t_segq.tsegq_maxbytes / + tp->t_maxseg; + } + } m_adj(m, drop_hdrlen); /* delayed header drop */ sbappendstream_locked(&so->so_rcv, m); } Modified: projects/tcp_ffcaia2008_head/sys/netinet/tcp_reass.c ============================================================================== --- projects/tcp_ffcaia2008_head/sys/netinet/tcp_reass.c Mon Oct 26 23:24:59 2009 (r198503) +++ projects/tcp_ffcaia2008_head/sys/netinet/tcp_reass.c Mon Oct 26 23:39:07 2009 (r198504) @@ -74,41 +74,49 @@ __FBSDID("$FreeBSD$"); #include #endif /* TCPDEBUG */ -static VNET_DEFINE(int, tcp_reass_maxseg); -VNET_DEFINE(int, tcp_reass_qsize); -static VNET_DEFINE(int, tcp_reass_maxqlen); +#include + +static VNET_DEFINE(int, tcp_reass_maxmbufs); +static VNET_DEFINE(int, tcp_reass_maxbytes); +VNET_DEFINE(int, tcp_reass_curmbufs); +VNET_DEFINE(int, tcp_reass_curbytes); static VNET_DEFINE(int, tcp_reass_overflows); -#define V_tcp_reass_maxseg VNET(tcp_reass_maxseg) -#define V_tcp_reass_maxqlen VNET(tcp_reass_maxqlen) +#define V_tcp_reass_maxmbufs VNET(tcp_reass_maxmbufs) +#define V_tcp_reass_maxbytes VNET(tcp_reass_maxbytes) #define V_tcp_reass_overflows VNET(tcp_reass_overflows) SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, "TCP Segment Reassembly Queue"); -SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_RDTUN, - &VNET_NAME(tcp_reass_maxseg), 0, - "Global maximum number of TCP Segments in Reassembly Queue"); - -SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, cursegments, CTLFLAG_RD, - &VNET_NAME(tcp_reass_qsize), 0, - "Global number of TCP Segments currently in Reassembly Queue"); - -SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, maxqlen, CTLFLAG_RW, - &VNET_NAME(tcp_reass_maxqlen), 0, - "Maximum number of TCP Segments per individual Reassembly Queue"); +SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, maxmbufs, CTLFLAG_RD, + &VNET_NAME(tcp_reass_maxmbufs), 0, + "Global maximum number of mbufs permitted across TCP reassembly queues"); + +SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, maxbytes, CTLFLAG_RD, + &VNET_NAME(tcp_reass_maxbytes), 0, + "Global maximum number of bytes permitted across TCP reassembly queues"); + +SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, curmbufs, CTLFLAG_RD, + &VNET_NAME(tcp_reass_curmbufs), 0, + "Global number of mbufs currently held in TCP reassembly queues"); + +SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, curbytes, CTLFLAG_RD, + &VNET_NAME(tcp_reass_curbytes), 0, + "Global number of bytes currently held in TCP reassembly queues"); SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, overflows, CTLFLAG_RD, &VNET_NAME(tcp_reass_overflows), 0, - "Global number of TCP Segment Reassembly Queue Overflows"); + "Global number of overflows across TCP reassembly queues"); /* Initialize TCP reassembly queue */ static void tcp_reass_zone_change(void *tag) { - V_tcp_reass_maxseg = nmbclusters / 16; - uma_zone_set_max(V_tcp_reass_zone, V_tcp_reass_maxseg); + V_tcp_reass_maxmbufs = nmbclusters / 16; + V_tcp_reass_maxbytes = V_tcp_reass_maxmbufs * 1448; + uma_zone_set_max(V_tcp_reass_zone, V_tcp_reass_maxmbufs); } VNET_DEFINE(uma_zone_t, tcp_reass_zone); @@ -117,19 +125,24 @@ void tcp_reass_init(void) { - V_tcp_reass_maxseg = 0; - V_tcp_reass_qsize = 0; - V_tcp_reass_maxqlen = 48; + V_tcp_reass_maxmbufs = 0; + V_tcp_reass_maxbytes = 0; + V_tcp_reass_curmbufs = 0; + V_tcp_reass_curbytes = 0; V_tcp_reass_overflows = 0; - V_tcp_reass_maxseg = nmbclusters / 16; - TUNABLE_INT_FETCH("net.inet.tcp.reass.maxsegments", - &V_tcp_reass_maxseg); + /**/ + V_tcp_reass_maxmbufs = nmbclusters / 16; + TUNABLE_INT_FETCH("net.inet.tcp.reass.maxmbufs", + &V_tcp_reass_maxmbufs); + /* 1448 bytes is the most common segment size for bulk transfer */ + V_tcp_reass_maxbytes = V_tcp_reass_maxmbufs * 1448; V_tcp_reass_zone = uma_zcreate("tcpreass", sizeof (struct tseg_qent), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); - uma_zone_set_max(V_tcp_reass_zone, V_tcp_reass_maxseg); + uma_zone_set_max(V_tcp_reass_zone, V_tcp_reass_maxmbufs); EVENTHANDLER_REGISTER(nmbclusters_change, tcp_reass_zone_change, NULL, EVENTHANDLER_PRI_ANY); + /**/ } int @@ -141,6 +154,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd struct tseg_qent *te = NULL; struct socket *so = tp->t_inpcb->inp_socket; int flags; + struct tsegq *t_segq = &tp->t_segq; INP_WLOCK_ASSERT(tp->t_inpcb); @@ -164,9 +178,11 @@ tcp_reass(struct tcpcb *tp, struct tcphd * process the missing segment. */ if (th->th_seq != tp->rcv_nxt && - (V_tcp_reass_qsize + 1 >= V_tcp_reass_maxseg || - tp->t_segqlen >= V_tcp_reass_maxqlen)) { - V_tcp_reass_overflows++; + (V_tcp_reass_curmbufs + 1 > V_tcp_reass_maxmbufs || + V_tcp_reass_curbytes + *tlenp > V_tcp_reass_maxbytes || + t_segq->tsegq_bytes + *tlenp >= t_segq->tsegq_maxbytes || + t_segq->tsegq_mbufs + 1 > t_segq->tsegq_maxmbufs)) { + atomic_add_int(&V_tcp_reass_overflows, 1); TCPSTAT_INC(tcps_rcvmemdrop); m_freem(m); *tlenp = 0; @@ -184,8 +200,10 @@ tcp_reass(struct tcpcb *tp, struct tcphd *tlenp = 0; return (0); } - tp->t_segqlen++; - V_tcp_reass_qsize++; + t_segq->tsegq_bytes += *tlenp; + t_segq->tsegq_mbufs++; + atomic_add_int(&V_tcp_reass_curmbufs, 1); + atomic_add_int(&V_tcp_reass_curbytes, *tlenp); /* * Find a segment which begins after this one does. @@ -211,8 +229,10 @@ tcp_reass(struct tcpcb *tp, struct tcphd TCPSTAT_ADD(tcps_rcvdupbyte, *tlenp); m_freem(m); uma_zfree(V_tcp_reass_zone, te); - tp->t_segqlen--; - V_tcp_reass_qsize--; + t_segq->tsegq_bytes -= *tlenp; + t_segq->tsegq_mbufs--; + atomic_subtract_int(&V_tcp_reass_curmbufs, 1); + atomic_subtract_int(&V_tcp_reass_curbytes, *tlenp); /* * Try to present any queued data * at the left window edge to the user. @@ -248,8 +268,10 @@ tcp_reass(struct tcpcb *tp, struct tcphd LIST_REMOVE(q, tqe_q); m_freem(q->tqe_m); uma_zfree(V_tcp_reass_zone, q); - tp->t_segqlen--; - V_tcp_reass_qsize--; + t_segq->tsegq_bytes -= *tlenp; + t_segq->tsegq_mbufs--; + atomic_subtract_int(&V_tcp_reass_curmbufs, 1); + atomic_subtract_int(&V_tcp_reass_curbytes, *tlenp); q = nq; } @@ -285,8 +307,10 @@ present: else sbappendstream_locked(&so->so_rcv, q->tqe_m); uma_zfree(V_tcp_reass_zone, q); - tp->t_segqlen--; - V_tcp_reass_qsize--; + t_segq->tsegq_bytes -= *tlenp; + t_segq->tsegq_mbufs--; + atomic_subtract_int(&V_tcp_reass_curmbufs, 1); + atomic_subtract_int(&V_tcp_reass_curbytes, *tlenp); q = nq; } while (q && q->tqe_th->th_seq == tp->rcv_nxt); ND6_HINT(tp); Modified: projects/tcp_ffcaia2008_head/sys/netinet/tcp_subr.c ============================================================================== --- projects/tcp_ffcaia2008_head/sys/netinet/tcp_subr.c Mon Oct 26 23:24:59 2009 (r198503) +++ projects/tcp_ffcaia2008_head/sys/netinet/tcp_subr.c Mon Oct 26 23:39:07 2009 (r198504) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include #endif /*IPSEC*/ +#include #include #include @@ -825,7 +826,6 @@ tcp_drop(struct tcpcb *tp, int errno) void tcp_discardcb(struct tcpcb *tp) { - struct tseg_qent *q; struct inpcb *inp = tp->t_inpcb; struct socket *so = inp->inp_socket; #ifdef INET6 @@ -903,13 +903,8 @@ tcp_discardcb(struct tcpcb *tp) } /* free the reassembly queue, if any */ - while ((q = LIST_FIRST(&tp->t_segq)) != NULL) { - LIST_REMOVE(q, tqe_q); - m_freem(q->tqe_m); - uma_zfree(V_tcp_reass_zone, q); - tp->t_segqlen--; - V_tcp_reass_qsize--; - } + TCP_REASS_FLUSH(&tp->t_segq); + /* Disconnect offload device, if any. */ tcp_offload_detach(tp); @@ -967,7 +962,6 @@ tcp_drain(void) CURVNET_SET(vnet_iter); struct inpcb *inpb; struct tcpcb *tcpb; - struct tseg_qent *te; /* * Walk the tcpbs, if existing, and flush the reassembly queue, @@ -983,14 +977,7 @@ tcp_drain(void) continue; INP_WLOCK(inpb); if ((tcpb = intotcpcb(inpb)) != NULL) { - while ((te = LIST_FIRST(&tcpb->t_segq)) - != NULL) { - LIST_REMOVE(te, tqe_q); - m_freem(te->tqe_m); - uma_zfree(V_tcp_reass_zone, te); - tcpb->t_segqlen--; - V_tcp_reass_qsize--; - } + TCP_REASS_FLUSH(&tcpb->t_segq); tcp_clean_sackreport(tcpb); } INP_WUNLOCK(inpb); Modified: projects/tcp_ffcaia2008_head/sys/netinet/tcp_usrreq.c ============================================================================== --- projects/tcp_ffcaia2008_head/sys/netinet/tcp_usrreq.c Mon Oct 26 23:24:59 2009 (r198503) +++ projects/tcp_ffcaia2008_head/sys/netinet/tcp_usrreq.c Mon Oct 26 23:39:07 2009 (r198504) @@ -1452,6 +1452,9 @@ tcp_attach(struct socket *so) INP_INFO_WUNLOCK(&V_tcbinfo); return (ENOBUFS); } + + tp->t_segq.tsegq_maxbytes = (so->so_rcv.sb_hiwat << 3) / 7; + tp->t_segq.tsegq_maxmbufs = tp->t_segq.tsegq_maxbytes / tp->t_maxseg; tp->t_state = TCPS_CLOSED; INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&V_tcbinfo); @@ -1749,8 +1752,8 @@ db_print_tcpcb(struct tcpcb *tp, const c indent += 2; db_print_indent(indent); - db_printf("t_segq first: %p t_segqlen: %d t_dupacks: %d\n", - LIST_FIRST(&tp->t_segq), tp->t_segqlen, tp->t_dupacks); + db_printf("t_segq first: %p t_dupacks: %d\n", + LIST_FIRST(&tp->t_segq), tp->t_dupacks); db_print_indent(indent); db_printf("tt_rexmt: %p tt_persist: %p tt_keep: %p\n", Modified: projects/tcp_ffcaia2008_head/sys/netinet/tcp_var.h ============================================================================== --- projects/tcp_ffcaia2008_head/sys/netinet/tcp_var.h Mon Oct 26 23:24:59 2009 (r198503) +++ projects/tcp_ffcaia2008_head/sys/netinet/tcp_var.h Mon Oct 26 23:39:07 2009 (r198504) @@ -42,10 +42,12 @@ * Kernel variables for tcp. */ VNET_DECLARE(int, tcp_do_rfc1323); -VNET_DECLARE(int, tcp_reass_qsize); VNET_DECLARE(struct uma_zone *, tcp_reass_zone); +VNET_DECLARE(int, tcp_reass_curmbufs); +VNET_DECLARE(int, tcp_reass_curbytes); #define V_tcp_do_rfc1323 VNET(tcp_do_rfc1323) -#define V_tcp_reass_qsize VNET(tcp_reass_qsize) +#define V_tcp_reass_curmbufs VNET(tcp_reass_curmbufs) +#define V_tcp_reass_curbytes VNET(tcp_reass_curbytes) #define V_tcp_reass_zone VNET(tcp_reass_zone) #endif /* _KERNEL */ @@ -57,7 +59,14 @@ struct tseg_qent { struct tcphdr *tqe_th; /* a pointer to tcp header */ struct mbuf *tqe_m; /* mbuf contains packet */ }; -LIST_HEAD(tsegqe_head, tseg_qent); + +struct tsegq { + int tsegq_mbufs; + int tsegq_bytes; + int tsegq_maxbytes; + int tsegq_maxmbufs; + struct tseg_qent *lh_first; +}; struct sackblk { tcp_seq start; /* start seq no. of sack block */ @@ -95,9 +104,8 @@ do { \ * Organized for 16 byte cacheline efficiency. */ struct tcpcb { - struct tsegqe_head t_segq; /* segment reassembly queue */ + struct tsegq t_segq; /* segment reassembly queue */ void *t_pspare[2]; /* new reassembly queue */ - int t_segqlen; /* segment reassembly queue length */ int t_dupacks; /* consecutive dup acks recd */ struct tcp_timer *t_timers; /* All the TCP timers in one struct */ @@ -356,6 +364,19 @@ struct tcptw { max((tp)->t_rttmin, (((tp)->t_srtt >> (TCP_RTT_SHIFT - TCP_DELTA_SHIFT)) \ + (tp)->t_rttvar) >> TCP_DELTA_SHIFT) +#define TCP_REASS_FLUSH(segq) do { \ + struct tseg_qent *qe; \ + while ((qe = LIST_FIRST((segq))) != NULL) { \ + LIST_REMOVE(qe, tqe_q); \ + (segq)->tsegq_mbufs--; \ + (segq)->tsegq_bytes -= qe->tqe_len; \ + atomic_subtract_int(&V_tcp_reass_curmbufs, 1); \ + atomic_subtract_int(&V_tcp_reass_curbytes, qe->tqe_len); \ + m_freem(qe->tqe_m); \ + uma_zfree(V_tcp_reass_zone, qe); \ + } \ +} while (0) + /* * TCP statistics. * Many of these should be kept per connection, From owner-svn-src-projects@FreeBSD.ORG Tue Oct 27 20:40:05 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB32F1065679; Tue, 27 Oct 2009 20:40:05 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9D508FC17; Tue, 27 Oct 2009 20:40: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 n9RKe53n041354; Tue, 27 Oct 2009 20:40:05 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9RKe5L4041350; Tue, 27 Oct 2009 20:40:05 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200910272040.n9RKe5L4041350@svn.freebsd.org> From: Roman Divacky Date: Tue, 27 Oct 2009 20:40:05 +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: r198526 - in projects/clangbsd/contrib/llvm/tools/clang: include/clang/Driver lib/Driver 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, 27 Oct 2009 20:40:06 -0000 Author: rdivacky Date: Tue Oct 27 20:40:05 2009 New Revision: 198526 URL: http://svn.freebsd.org/changeset/base/198526 Log: Implement parts of -B, namely prefixing of library searching that we need when building 32bit libs on amd64. Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/Driver.h projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/Options.def projects/clangbsd/contrib/llvm/tools/clang/lib/Driver/Driver.cpp Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/Driver.h ============================================================================== --- projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/Driver.h Tue Oct 27 19:37:37 2009 (r198525) +++ projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/Driver.h Tue Oct 27 20:40:05 2009 (r198526) @@ -111,6 +111,9 @@ private: std::list TempFiles; std::list ResultFiles; + /// -B prefix + std::string Prefix; + public: Driver(const char *_Name, const char *_Dir, const char *_DefaultHostTriple, @@ -191,6 +194,8 @@ public: /// PrintVersion - Print the driver version. void PrintVersion(const Compilation &C, llvm::raw_ostream &OS) const; + std::string GetPrefix() const; + /// GetFilePath - Lookup \arg Name in the list of file search paths. /// /// \arg TC - The tool chain for additional information on Modified: projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/Options.def ============================================================================== --- projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/Options.def Tue Oct 27 19:37:37 2009 (r198525) +++ projects/clangbsd/contrib/llvm/tools/clang/include/clang/Driver/Options.def Tue Oct 27 20:40:05 2009 (r198526) @@ -254,7 +254,7 @@ OPTION("--write-dependencies", _write_de OPTION("--write-user-dependencies", _write_user_dependencies, Flag, INVALID, MMD, "", 0, 0, 0) OPTION("--", _, Joined, INVALID, f, "u", 0, 0, 0) OPTION("-A", A, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0) -OPTION("-B", B, JoinedOrSeparate, INVALID, INVALID, "u", 0, 0, 0) +OPTION("-B", B, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0) OPTION("-CC", CC, Flag, INVALID, INVALID, "", 0, 0, 0) OPTION("-C", C, Flag, INVALID, INVALID, "", 0, 0, 0) OPTION("-D", D, JoinedOrSeparate, INVALID, INVALID, "", 0, 0, 0) Modified: projects/clangbsd/contrib/llvm/tools/clang/lib/Driver/Driver.cpp ============================================================================== --- projects/clangbsd/contrib/llvm/tools/clang/lib/Driver/Driver.cpp Tue Oct 27 19:37:37 2009 (r198525) +++ projects/clangbsd/contrib/llvm/tools/clang/lib/Driver/Driver.cpp Tue Oct 27 20:40:05 2009 (r198526) @@ -219,6 +219,14 @@ Compilation *Driver::BuildCompilation(in if (!HandleImmediateArgs(*C)) return C; + // HACK + if (C->getArgs().hasArg(options::OPT_B)) { + Arg *B_dir = C->getArgs().getLastArg(options::OPT_B); + Prefix = B_dir->getValue(C->getArgs()); + } else { + Prefix = ""; + } + // Construct the list of abstract actions to perform for this compilation. We // avoid passing a Compilation here simply to enforce the abstraction that // pipelining is not host or toolchain dependent (other than the driver driver @@ -1130,6 +1138,10 @@ void Driver::BuildJobsForAction(Compilat } } +std::string Driver::GetPrefix() const { + return Prefix; +} + const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA, const char *BaseInput, @@ -1183,6 +1195,12 @@ const char *Driver::GetNamedOutputPath(C std::string Driver::GetFilePath(const char *Name, const ToolChain &TC) const { const ToolChain::path_list &List = TC.getFilePaths(); + if (!Prefix.empty()) { + llvm::sys::Path P(Prefix); + P.appendComponent(Name); + if (P.exists()) + return P.str(); + } for (ToolChain::path_list::const_iterator it = List.begin(), ie = List.end(); it != ie; ++it) { llvm::sys::Path P(*it); @@ -1197,6 +1215,12 @@ std::string Driver::GetFilePath(const ch std::string Driver::GetProgramPath(const char *Name, const ToolChain &TC, bool WantFile) const { const ToolChain::path_list &List = TC.getProgramPaths(); + if (!Prefix.empty()) { + llvm::sys::Path P(Prefix); + P.appendComponent(Name); + if (WantFile ? P.exists() : P.canExecute()) + return P.str(); + } for (ToolChain::path_list::const_iterator it = List.begin(), ie = List.end(); it != ie; ++it) { llvm::sys::Path P(*it); From owner-svn-src-projects@FreeBSD.ORG Tue Oct 27 20:41:56 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 196A61065670; Tue, 27 Oct 2009 20:41:56 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 095CF8FC17; Tue, 27 Oct 2009 20:41:56 +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 n9RKftEs041425; Tue, 27 Oct 2009 20:41:55 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9RKftg0041423; Tue, 27 Oct 2009 20:41:55 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200910272041.n9RKftg0041423@svn.freebsd.org> From: Roman Divacky Date: Tue, 27 Oct 2009 20:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198527 - projects/clangbsd 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, 27 Oct 2009 20:41:56 -0000 Author: rdivacky Date: Tue Oct 27 20:41:55 2009 New Revision: 198527 URL: http://svn.freebsd.org/changeset/base/198527 Log: Put the -iprefix and -B back. Fix a style issue. Modified: projects/clangbsd/Makefile.inc1 Modified: projects/clangbsd/Makefile.inc1 ============================================================================== --- projects/clangbsd/Makefile.inc1 Tue Oct 27 20:40:05 2009 (r198526) +++ projects/clangbsd/Makefile.inc1 Tue Oct 27 20:41:55 2009 (r198527) @@ -259,6 +259,7 @@ WMAKEENV= ${CROSSENV} \ PATH=${TMPPATH} \ CC="${CC} -isystem ${WORLDTMP}/usr/include" \ CXX="${CXX} -isystem ${WORLDTMP}/include/c++/4.2 -isystem ${WORLDTMP}/include/c++/4.2/backward" + .if ${MK_CDDL} == "no" || defined(NO_CTF) WMAKEENV+= NO_CTF=1 .endif @@ -274,8 +275,10 @@ LIB32CPUFLAGS= -march=i686 -mmmx -msse - LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -mfancy-math-387 -DCOMPAT_32BIT \ + -iprefix ${LIB32TMP}/usr/ \ -L${LIB32TMP}/usr/lib32 \ - -isystem ${LIB32TMP}/usr/include/ + -isystem ${LIB32TMP}/usr/include/ \ + -B${LIB32TMP}/usr/lib32 # Yes, the flags are redundant. LIB32WMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ From owner-svn-src-projects@FreeBSD.ORG Tue Oct 27 23:45:48 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7F591065676; Tue, 27 Oct 2009 23:45:48 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C78018FC19; Tue, 27 Oct 2009 23:45: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 n9RNjmVu045003; Tue, 27 Oct 2009 23:45:48 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9RNjmfh045002; Tue, 27 Oct 2009 23:45:48 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <200910272345.n9RNjmfh045002@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Tue, 27 Oct 2009 23:45: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: r198530 - projects/mips/sys/mips/mips 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, 27 Oct 2009 23:45:48 -0000 Author: gonzo Date: Tue Oct 27 23:45:48 2009 New Revision: 198530 URL: http://svn.freebsd.org/changeset/base/198530 Log: - Replace stubs with actual cache info - minor style(9) fix Modified: projects/mips/sys/mips/mips/cache.c Modified: projects/mips/sys/mips/mips/cache.c ============================================================================== --- projects/mips/sys/mips/mips/cache.c Tue Oct 27 21:09:52 2009 (r198529) +++ projects/mips/sys/mips/mips/cache.c Tue Oct 27 23:45:48 2009 (r198530) @@ -81,6 +81,7 @@ struct mips_cache_ops mips_cache_ops; void mips_config_cache(struct mips_cpuinfo * cpuinfo) { + switch (cpuinfo->l1.ic_linesize) { case 16: mips_cache_ops.mco_icache_sync_all = mipsNN_icache_sync_all_16; @@ -223,7 +224,9 @@ mips_config_cache(struct mips_cpuinfo * #endif /* Check that all cache ops are set up. */ - if (mips_picache_size || 1) { /* XXX- must have primary Icache */ + /* must have primary Icache */ + if (cpuinfo->l1.ic_size) { + if (!mips_cache_ops.mco_icache_sync_all) panic("no icache_sync_all cache op"); if (!mips_cache_ops.mco_icache_sync_range) @@ -231,7 +234,8 @@ mips_config_cache(struct mips_cpuinfo * if (!mips_cache_ops.mco_icache_sync_range_index) panic("no icache_sync_range_index cache op"); } - if (mips_pdcache_size || 1) { /* XXX- must have primary Icache */ + /* must have primary Dcache */ + if (cpuinfo->l1.dc_size) { if (!mips_cache_ops.mco_pdcache_wbinv_all) panic("no pdcache_wbinv_all"); if (!mips_cache_ops.mco_pdcache_wbinv_range) From owner-svn-src-projects@FreeBSD.ORG Wed Oct 28 00:01:21 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DECD106568B; Wed, 28 Oct 2009 00:01:21 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 136B88FC29; Wed, 28 Oct 2009 00:01:21 +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 n9S01Kmh045399; Wed, 28 Oct 2009 00:01:20 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9S01KW4045396; Wed, 28 Oct 2009 00:01:20 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <200910280001.n9S01KW4045396@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Wed, 28 Oct 2009 00:01:20 +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: r198531 - in projects/mips/sys/mips: include mips X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 00:01:21 -0000 Author: gonzo Date: Wed Oct 28 00:01:20 2009 New Revision: 198531 URL: http://svn.freebsd.org/changeset/base/198531 Log: - Remove bunch of declared but not defined cach-related variables - Add mips_picache_linesize and mips_pdcache_linesize variables Modified: projects/mips/sys/mips/include/cache.h projects/mips/sys/mips/mips/cache_mipsNN.c Modified: projects/mips/sys/mips/include/cache.h ============================================================================== --- projects/mips/sys/mips/include/cache.h Tue Oct 27 23:45:48 2009 (r198530) +++ projects/mips/sys/mips/include/cache.h Wed Oct 28 00:01:20 2009 (r198531) @@ -159,50 +159,8 @@ struct mips_cache_ops { extern struct mips_cache_ops mips_cache_ops; /* PRIMARY CACHE VARIABLES */ -extern u_int mips_picache_size; -extern u_int mips_picache_line_size; -extern u_int mips_picache_ways; -extern u_int mips_picache_way_size; -extern u_int mips_picache_way_mask; - -extern u_int mips_pdcache_size; /* and unified */ -extern u_int mips_pdcache_line_size; -extern u_int mips_pdcache_ways; -extern u_int mips_pdcache_way_size; -extern u_int mips_pdcache_way_mask; -extern int mips_pdcache_write_through; - -extern int mips_pcache_unified; - -/* SECONDARY CACHE VARIABLES */ -extern u_int mips_sicache_size; -extern u_int mips_sicache_line_size; -extern u_int mips_sicache_ways; -extern u_int mips_sicache_way_size; -extern u_int mips_sicache_way_mask; - -extern u_int mips_sdcache_size; /* and unified */ -extern u_int mips_sdcache_line_size; -extern u_int mips_sdcache_ways; -extern u_int mips_sdcache_way_size; -extern u_int mips_sdcache_way_mask; -extern int mips_sdcache_write_through; - -extern int mips_scache_unified; - -/* TERTIARY CACHE VARIABLES */ -extern u_int mips_tcache_size; /* always unified */ -extern u_int mips_tcache_line_size; -extern u_int mips_tcache_ways; -extern u_int mips_tcache_way_size; -extern u_int mips_tcache_way_mask; -extern int mips_tcache_write_through; - -extern u_int mips_dcache_align; -extern u_int mips_dcache_align_mask; - -extern u_int mips_cache_alias_mask; -extern u_int mips_cache_prefer_mask; +extern int mips_picache_linesize; +extern int mips_pdcache_linesize; #define __mco_noargs(prefix, x) \ do { \ Modified: projects/mips/sys/mips/mips/cache_mipsNN.c ============================================================================== --- projects/mips/sys/mips/mips/cache_mipsNN.c Tue Oct 27 23:45:48 2009 (r198530) +++ projects/mips/sys/mips/mips/cache_mipsNN.c Wed Oct 28 00:01:20 2009 (r198531) @@ -65,6 +65,11 @@ __FBSDID("$FreeBSD$"); #define SYNCI #endif +/* + * Exported variables for consumers like bus_dma code + */ +int mips_picache_linesize; +int mips_pdcache_linesize; static int picache_size; static int picache_stride; @@ -107,10 +112,15 @@ mipsNN_cache_init(struct mips_cpuinfo * pdcache_loopcount = (cpuinfo->l1.dc_nsets * cpuinfo->l1.dc_linesize / PAGE_SIZE) * cpuinfo->l1.dc_nways; } + + mips_picache_linesize = cpuinfo->l1.ic_linesize; + mips_pdcache_linesize = cpuinfo->l1.dc_linesize; + picache_size = cpuinfo->l1.ic_size; picache_way_mask = cpuinfo->l1.ic_nways - 1; pdcache_size = cpuinfo->l1.dc_size; pdcache_way_mask = cpuinfo->l1.dc_nways - 1; + #define CACHE_DEBUG #ifdef CACHE_DEBUG printf("Cache info:\n"); From owner-svn-src-projects@FreeBSD.ORG Wed Oct 28 03:34:06 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1ED021065670; Wed, 28 Oct 2009 03:34:06 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E84058FC13; Wed, 28 Oct 2009 03:34: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 n9S3Y5jn049538; Wed, 28 Oct 2009 03:34:05 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9S3Y5NQ049536; Wed, 28 Oct 2009 03:34:05 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <200910280334.n9S3Y5NQ049536@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Wed, 28 Oct 2009 03:34:05 +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: r198534 - projects/mips/sys/mips/mips X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 03:34:06 -0000 Author: gonzo Date: Wed Oct 28 03:34:05 2009 New Revision: 198534 URL: http://svn.freebsd.org/changeset/base/198534 Log: - Fix busdma sync: dcache invalidation operates on cache line aligned addresses and could modify areas of memory that share the same cache line at the beginning and at the ending of the buffer. In order to prevent a data loss we save these chunks in temporary buffer before invalidation and restore them afer it. Idea suggested by: cognet Modified: projects/mips/sys/mips/mips/busdma_machdep.c Modified: projects/mips/sys/mips/mips/busdma_machdep.c ============================================================================== --- projects/mips/sys/mips/mips/busdma_machdep.c Wed Oct 28 02:20:29 2009 (r198533) +++ projects/mips/sys/mips/mips/busdma_machdep.c Wed Oct 28 03:34:05 2009 (r198534) @@ -1029,10 +1029,43 @@ _bus_dmamap_unload(bus_dma_tag_t dmat, b static void bus_dmamap_sync_buf(void *buf, int len, bus_dmasync_op_t op) { + char tmp_cl[mips_pdcache_linesize], tmp_clend[mips_pdcache_linesize]; + vm_offset_t buf_cl, buf_clend; + vm_size_t size_cl, size_clend; + int cache_linesize_mask = mips_pdcache_linesize - 1; + + /* + * dcache invalidation operates on cache line aligned addresses + * and could modify areas of memory that share the same cache line + * at the beginning and the ending of the buffer. In order to + * prevent a data loss we save these chunks in temporary buffer + * before invalidation and restore them afer it + */ + buf_cl = (vm_offset_t)buf & ~cache_linesize_mask; + size_cl = (vm_offset_t)buf & cache_linesize_mask; + buf_clend = (vm_offset_t)buf + len; + size_clend = (mips_pdcache_linesize - + (buf_clend & cache_linesize_mask)) & cache_linesize_mask; + switch (op) { case BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE: case BUS_DMASYNC_POSTREAD: + + /* + * Save buffers that might be modified by invalidation + */ + if (size_cl) + memcpy (tmp_cl, (void*)buf_cl, size_cl); + if (size_clend) + memcpy (tmp_clend, (void*)buf_clend, size_clend); mips_dcache_inv_range((vm_offset_t)buf, len); + /* + * Restore them + */ + if (size_cl) + memcpy ((void*)buf_cl, tmp_cl, size_cl); + if (size_clend) + memcpy ((void*)buf_clend, tmp_clend, size_clend); break; case BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE: @@ -1040,11 +1073,21 @@ bus_dmamap_sync_buf(void *buf, int len, break; case BUS_DMASYNC_PREREAD: -#if 0 - mips_dcache_wbinv_range((vm_offset_t)buf, len); -#else + /* + * Save buffers that might be modified by invalidation + */ + if (size_cl) + memcpy (tmp_cl, (void *)buf_cl, size_cl); + if (size_clend) + memcpy (tmp_clend, (void *)buf_clend, size_clend); mips_dcache_inv_range((vm_offset_t)buf, len); -#endif + /* + * Restore them + */ + if (size_cl) + memcpy ((void *)buf_cl, tmp_cl, size_cl); + if (size_clend) + memcpy ((void *)buf_clend, tmp_clend, size_clend); break; case BUS_DMASYNC_PREWRITE: From owner-svn-src-projects@FreeBSD.ORG Wed Oct 28 17:03:20 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6EA6106566B; Wed, 28 Oct 2009 17:03:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96F418FC0A; Wed, 28 Oct 2009 17:03:20 +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 n9SH3KUd067212; Wed, 28 Oct 2009 17:03:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9SH3K98067210; Wed, 28 Oct 2009 17:03:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200910281703.n9SH3K98067210@svn.freebsd.org> From: Warner Losh Date: Wed, 28 Oct 2009 17:03:20 +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: r198550 - projects/mips/sys/mips/mips X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 17:03:20 -0000 Author: imp Date: Wed Oct 28 17:03:20 2009 New Revision: 198550 URL: http://svn.freebsd.org/changeset/base/198550 Log: Remove useless for statement. i isn't used after it. Remove needless braces. Modified: projects/mips/sys/mips/mips/pmap.c Modified: projects/mips/sys/mips/mips/pmap.c ============================================================================== --- projects/mips/sys/mips/mips/pmap.c Wed Oct 28 16:54:48 2009 (r198549) +++ projects/mips/sys/mips/mips/pmap.c Wed Oct 28 17:03:20 2009 (r198550) @@ -291,9 +291,8 @@ pmap_bootstrap(void) /* Sort. */ again: for (i = 0; phys_avail[i + 1] != 0; i += 2) { - if (phys_avail[i + 1] >= MIPS_KSEG0_LARGEST_PHYS) { + if (phys_avail[i + 1] >= MIPS_KSEG0_LARGEST_PHYS) memory_larger_than_512meg++; - } if (i < 2) continue; if (phys_avail[i - 2] > phys_avail[i]) { @@ -414,9 +413,6 @@ again: for (i = 0, j = (virtual_avail >> SEGSHIFT); i < nkpt; i++, j++) kernel_segmap[j] = (pd_entry_t)(pgtab + (i * NPTEPG)); - for (i = 0; phys_avail[i + 2]; i += 2) - continue; - /* * The kernel's pmap is statically allocated so we don't have to use * pmap_create, which is unlikely to work correctly at this part of From owner-svn-src-projects@FreeBSD.ORG Wed Oct 28 21:25:23 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 716CA1065693; Wed, 28 Oct 2009 21:25:23 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 478D08FC2A; Wed, 28 Oct 2009 21:25:23 +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 n9SLPNo4072727; Wed, 28 Oct 2009 21:25:23 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9SLPNWv072724; Wed, 28 Oct 2009 21:25:23 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200910282125.n9SLPNWv072724@svn.freebsd.org> From: Andrew Thompson Date: Wed, 28 Oct 2009 21:25: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: r198561 - in projects/mips/sys: kern sys X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 21:25:23 -0000 Author: thompsa Date: Wed Oct 28 21:25:22 2009 New Revision: 198561 URL: http://svn.freebsd.org/changeset/base/198561 Log: Allow a scratch buffer to be set in order to be able to use setenv() while booting, before dynamic kenv is running. A few platforms implement their own scratch+sprintf handling to save data from the boot environment. Modified: projects/mips/sys/kern/kern_environment.c projects/mips/sys/sys/systm.h Modified: projects/mips/sys/kern/kern_environment.c ============================================================================== --- projects/mips/sys/kern/kern_environment.c Wed Oct 28 21:13:58 2009 (r198560) +++ projects/mips/sys/kern/kern_environment.c Wed Oct 28 21:25:22 2009 (r198561) @@ -60,6 +60,8 @@ static MALLOC_DEFINE(M_KENV, "kenv", "ke /* pointer to the static environment */ char *kern_envp; +static int env_len; +static int env_pos; static char *kernenv_next(char *); /* dynamic environment variables */ @@ -208,6 +210,14 @@ done: return (error); } +void +init_static_kenv(char *buf, size_t len) +{ + kern_envp = buf; + env_len = len; + env_pos = 0; +} + /* * Setup the dynamic kernel environment. */ @@ -336,6 +346,26 @@ testenv(const char *name) return (0); } +static int +setenv_static(const char *name, const char *value) +{ + int len; + + if (env_pos >= env_len) + return (-1); + + /* Check space for x=y and two nuls */ + len = strlen(name) + strlen(value); + if (len + 3 < env_len - env_pos) { + len = sprintf(&kern_envp[env_pos], "%s=%s", name, value); + env_pos += len+1; + kern_envp[env_pos] = '\0'; + return (0); + } else + return (-1); + +} + /* * Set an environment variable by name. */ @@ -345,6 +375,9 @@ setenv(const char *name, const char *val char *buf, *cp, *oldenv; int namelen, vallen, i; + if (dynamic_kenv == 0 && env_len > 0) + return (setenv_static(name, value)); + KENV_CHECK; namelen = strlen(name) + 1; Modified: projects/mips/sys/sys/systm.h ============================================================================== --- projects/mips/sys/sys/systm.h Wed Oct 28 21:13:58 2009 (r198560) +++ projects/mips/sys/sys/systm.h Wed Oct 28 21:25:22 2009 (r198561) @@ -164,6 +164,7 @@ void critical_exit(void); void init_param1(void); void init_param2(long physpages); void init_param3(long kmempages); +void init_static_kenv(char *, size_t); void tablefull(const char *); int kvprintf(char const *, void (*)(int, void*), void *, int, __va_list) __printflike(1, 0); From owner-svn-src-projects@FreeBSD.ORG Wed Oct 28 21:27:57 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 541D2106568B; Wed, 28 Oct 2009 21:27:57 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29D448FC16; Wed, 28 Oct 2009 21:27:57 +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 n9SLRvxQ072819; Wed, 28 Oct 2009 21:27:57 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9SLRvvD072817; Wed, 28 Oct 2009 21:27:57 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200910282127.n9SLRvvD072817@svn.freebsd.org> From: Andrew Thompson Date: Wed, 28 Oct 2009 21:27:57 +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: r198562 - projects/mips/sys/mips/atheros X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 21:27:57 -0000 Author: thompsa Date: Wed Oct 28 21:27:56 2009 New Revision: 198562 URL: http://svn.freebsd.org/changeset/base/198562 Log: Parse and save the command line passed in from RedBoot (exec -c "xxx") and also the board specific environment variables. This is not ar71xx specific and should be shared better. Modified: projects/mips/sys/mips/atheros/ar71xx_machdep.c Modified: projects/mips/sys/mips/atheros/ar71xx_machdep.c ============================================================================== --- projects/mips/sys/mips/atheros/ar71xx_machdep.c Wed Oct 28 21:25:22 2009 (r198561) +++ projects/mips/sys/mips/atheros/ar71xx_machdep.c Wed Oct 28 21:27:56 2009 (r198562) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -59,6 +60,42 @@ __FBSDID("$FreeBSD$"); extern int *edata; extern int *end; uint32_t ar711_base_mac[ETHER_ADDR_LEN]; +/* 4KB static data aread to keep a copy of the bootload env until + the dynamic kenv is setup */ +char boot1_env[4096]; + +/* + * We get a string in from Redboot with the all the arguments together, + * "foo=bar bar=baz". Split them up and save in kenv. + */ +static void +parse_argv(char *str) +{ + char *n, *v; + + while ((v = strsep(&str, " ")) != NULL) { + if (*v == '\0') + continue; + if (*v == '-') { + while (*v != '\0') { + v++; + switch (*v) { + case 'a': boothowto |= RB_ASKNAME; break; + case 'd': boothowto |= RB_KDB; break; + case 'g': boothowto |= RB_GDB; break; + case 's': boothowto |= RB_SINGLE; break; + case 'v': boothowto |= RB_VERBOSE; break; + } + } + } else { + n = strsep(&v, "="); + if (v == NULL) + setenv(n, "1"); + else + setenv(n, v); + } + } +} void platform_halt(void) @@ -154,6 +191,7 @@ platform_start(__register_t a0 __unused, platform_counter_freq = ar71xx_cpu_freq(); mips_timer_init_params(platform_counter_freq, 1); cninit(); + init_static_kenv(boot1_env, sizeof(boot1_env)); printf("platform frequency: %lld\n", platform_counter_freq); printf("arguments: \n"); @@ -164,8 +202,10 @@ platform_start(__register_t a0 __unused, printf("Cmd line:"); if (MIPS_IS_VALID_PTR(argv)) { - for (i = 0; i < argc; i++) + for (i = 0; i < argc; i++) { printf(" %s", argv[i]); + parse_argv(argv[i]); + } } else printf ("argv is invalid"); @@ -173,8 +213,10 @@ platform_start(__register_t a0 __unused, printf("Environment:\n"); if (MIPS_IS_VALID_PTR(envp)) { - for (i = 0; envp[i]; i+=2) + for (i = 0; envp[i]; i+=2) { printf(" %s = %s\n", envp[i], envp[i+1]); + setenv(envp[i], envp[i+1]); + } } else printf ("envp is invalid\n"); From owner-svn-src-projects@FreeBSD.ORG Wed Oct 28 21:36:49 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76016106566C; Wed, 28 Oct 2009 21:36:49 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 556178FC26; Wed, 28 Oct 2009 21:36:49 +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 n9SLalU2073045; Wed, 28 Oct 2009 21:36:47 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9SLalub073044; Wed, 28 Oct 2009 21:36:47 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200910282136.n9SLalub073044@svn.freebsd.org> From: Andrew Thompson Date: Wed, 28 Oct 2009 21:36:47 +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: r198563 - projects/mips/sys/mips/rmi X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 21:36:49 -0000 Author: thompsa Date: Wed Oct 28 21:36:46 2009 New Revision: 198563 URL: http://svn.freebsd.org/changeset/base/198563 Log: Use init_static_kenv() and setenv() to simplify the environment string handling. Modified: projects/mips/sys/mips/rmi/xlr_machdep.c Modified: projects/mips/sys/mips/rmi/xlr_machdep.c ============================================================================== --- projects/mips/sys/mips/rmi/xlr_machdep.c Wed Oct 28 21:27:56 2009 (r198562) +++ projects/mips/sys/mips/rmi/xlr_machdep.c Wed Oct 28 21:36:46 2009 (r198563) @@ -331,7 +331,7 @@ void platform_start() { vm_size_t physsz = 0; - int i, j; + int i; struct xlr_boot1_mem_map *boot_map; #ifdef SMP uint32_t tmp; @@ -358,23 +358,21 @@ platform_start() /* clockrate used by delay, so initialize it here */ hw_clockrate = xlr_boot1_info.cpu_frequency/1000000 ; cninit(); + init_static_kenv(boot1_env, sizeof(boot1_env)); printf("Environment (from %d args):\n", xlr_argc-1); if (xlr_argc == 1) printf("\tNone\n"); - for(i=1,j=0; i sizeof(boot1_env)) { - printf("*** Environment could not be copied in full\n"); - break; - } - + for(i=1; i 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 342E0106568F; Wed, 28 Oct 2009 21:39:34 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23EDC8FC19; Wed, 28 Oct 2009 21:39:34 +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 n9SLdXZr073149; Wed, 28 Oct 2009 21:39:33 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9SLdXGF073148; Wed, 28 Oct 2009 21:39:33 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200910282139.n9SLdXGF073148@svn.freebsd.org> From: Andrew Thompson Date: Wed, 28 Oct 2009 21:39:33 +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: r198564 - projects/mips/sys/mips/rmi X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 21:39:34 -0000 Author: thompsa Date: Wed Oct 28 21:39:33 2009 New Revision: 198564 URL: http://svn.freebsd.org/changeset/base/198564 Log: Fix build from r198563 Modified: projects/mips/sys/mips/rmi/xlr_machdep.c Modified: projects/mips/sys/mips/rmi/xlr_machdep.c ============================================================================== --- projects/mips/sys/mips/rmi/xlr_machdep.c Wed Oct 28 21:36:46 2009 (r198563) +++ projects/mips/sys/mips/rmi/xlr_machdep.c Wed Oct 28 21:39:33 2009 (r198564) @@ -368,7 +368,7 @@ platform_start() printf("\t%s\n", xlr_argv[i]); n = strsep(&xlr_argv[i], "="); - if (v == NULL) + if (xlr_argv[i] == NULL) setenv(n, "1"); else setenv(n, xlr_argv[i]); From owner-svn-src-projects@FreeBSD.ORG Wed Oct 28 21:41:24 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 372AD1065670; Wed, 28 Oct 2009 21:41:24 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 270728FC0A; Wed, 28 Oct 2009 21:41: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 n9SLfOjg073223; Wed, 28 Oct 2009 21:41:24 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9SLfOxc073221; Wed, 28 Oct 2009 21:41:24 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200910282141.n9SLfOxc073221@svn.freebsd.org> From: Andrew Thompson Date: Wed, 28 Oct 2009 21:41:24 +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: r198565 - projects/mips/sys/mips/rmi X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 21:41:24 -0000 Author: thompsa Date: Wed Oct 28 21:41:23 2009 New Revision: 198565 URL: http://svn.freebsd.org/changeset/base/198565 Log: Fix build from r198563 (again). Sigh. Modified: projects/mips/sys/mips/rmi/xlr_machdep.c Modified: projects/mips/sys/mips/rmi/xlr_machdep.c ============================================================================== --- projects/mips/sys/mips/rmi/xlr_machdep.c Wed Oct 28 21:39:33 2009 (r198564) +++ projects/mips/sys/mips/rmi/xlr_machdep.c Wed Oct 28 21:41:23 2009 (r198565) @@ -331,7 +331,7 @@ void platform_start() { vm_size_t physsz = 0; - int i; + int i, j; struct xlr_boot1_mem_map *boot_map; #ifdef SMP uint32_t tmp; From owner-svn-src-projects@FreeBSD.ORG Thu Oct 29 05:18:03 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24AEA1065676; Thu, 29 Oct 2009 05:18:03 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1488E8FC1A; Thu, 29 Oct 2009 05:18: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 n9T5I2OS084738; Thu, 29 Oct 2009 05:18:02 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9T5I2rF084737; Thu, 29 Oct 2009 05:18:02 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <200910290518.n9T5I2rF084737@svn.freebsd.org> From: Neel Natu Date: Thu, 29 Oct 2009 05:18:02 +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: r198569 - projects/mips/sys/mips/mips 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, 29 Oct 2009 05:18:03 -0000 Author: neel Date: Thu Oct 29 05:18:02 2009 New Revision: 198569 URL: http://svn.freebsd.org/changeset/base/198569 Log: Deal with overflow of the COUNT register correctly. The 'cycles_per_hz' has nothing to do with the rollover. Approved by: imp (mentor) Modified: projects/mips/sys/mips/mips/tick.c Modified: projects/mips/sys/mips/mips/tick.c ============================================================================== --- projects/mips/sys/mips/mips/tick.c Wed Oct 28 22:00:49 2009 (r198568) +++ projects/mips/sys/mips/mips/tick.c Thu Oct 29 05:18:02 2009 (r198569) @@ -223,9 +223,9 @@ DELAY(int n) /* Check to see if the timer has wrapped around. */ if (cur < last) - delta += (cur + (cycles_per_hz - last)); + delta += cur + (0xffffffff - last) + 1; else - delta += (cur - last); + delta += cur - last; last = cur; From owner-svn-src-projects@FreeBSD.ORG Thu Oct 29 15:55:25 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E586D106566C; Thu, 29 Oct 2009 15:55:25 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D46BF8FC1C; Thu, 29 Oct 2009 15:55:25 +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 n9TFtPNv002119; Thu, 29 Oct 2009 15:55:25 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9TFtPJC002109; Thu, 29 Oct 2009 15:55:25 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200910291555.n9TFtPJC002109@svn.freebsd.org> From: Randall Stewart Date: Thu, 29 Oct 2009 15:55:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198607 - projects/mips/sys/mips/rmi 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, 29 Oct 2009 15:55:26 -0000 Author: rrs Date: Thu Oct 29 15:55:25 2009 New Revision: 198607 URL: http://svn.freebsd.org/changeset/base/198607 Log: more Updates on the RMI code close to compiling now ;-) Added: projects/mips/sys/mips/rmi/ehcireg.h projects/mips/sys/mips/rmi/ehcivar.h projects/mips/sys/mips/rmi/tick.c Modified: projects/mips/sys/mips/rmi/board.c projects/mips/sys/mips/rmi/clock.c projects/mips/sys/mips/rmi/clock.h projects/mips/sys/mips/rmi/files.xlr projects/mips/sys/mips/rmi/intr_machdep.c projects/mips/sys/mips/rmi/iodi.c projects/mips/sys/mips/rmi/msgring.c projects/mips/sys/mips/rmi/msgring.h projects/mips/sys/mips/rmi/msgring_xls.c projects/mips/sys/mips/rmi/on_chip.c projects/mips/sys/mips/rmi/pcibus.c projects/mips/sys/mips/rmi/pcibus.h projects/mips/sys/mips/rmi/perfmon.h projects/mips/sys/mips/rmi/perfmon_kern.c projects/mips/sys/mips/rmi/perfmon_percpu.c projects/mips/sys/mips/rmi/perfmon_xlrconfig.h projects/mips/sys/mips/rmi/pic.h projects/mips/sys/mips/rmi/std.xlr projects/mips/sys/mips/rmi/uart_cpu_mips_xlr.c projects/mips/sys/mips/rmi/xlr_boot1_console.c projects/mips/sys/mips/rmi/xlr_i2c.c projects/mips/sys/mips/rmi/xlr_machdep.c projects/mips/sys/mips/rmi/xlr_pci.c projects/mips/sys/mips/rmi/xlrconfig.h projects/mips/sys/mips/rmi/xls_ehci.c Modified: projects/mips/sys/mips/rmi/board.c ============================================================================== --- projects/mips/sys/mips/rmi/board.c Thu Oct 29 15:42:50 2009 (r198606) +++ projects/mips/sys/mips/rmi/board.c Thu Oct 29 15:55:25 2009 (r198607) @@ -35,9 +35,10 @@ #include #include -#include -#include -#include +#include +#include +#include +#include static int xlr_rxstn_to_txstn_map[128] = { [0 ... 7] = TX_STN_CPU_0, Modified: projects/mips/sys/mips/rmi/clock.c ============================================================================== --- projects/mips/sys/mips/rmi/clock.c Thu Oct 29 15:42:50 2009 (r198606) +++ projects/mips/sys/mips/rmi/clock.c Thu Oct 29 15:55:25 2009 (r198607) @@ -53,19 +53,24 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #ifdef XLR_PERFMON -#include +#include #endif -int hw_clockrate; -SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, &hw_clockrate, - 0, "CPU instruction clock rate"); +uint64_t counter_freq; +uint64_t cycles_per_tick; +uint64_t cycles_per_usec; +uint64_t cycles_per_sec; +uint64_t cycles_per_hz; + +u_int32_t counter_upper = 0; +u_int32_t counter_lower_last = 0; #define STAT_PROF_CLOCK_SCALE_FACTOR 8 @@ -77,6 +82,15 @@ uint64_t platform_get_frequency() return XLR_PIC_HZ; } +void +mips_timer_early_init(uint64_t clock_hz) +{ + /* Initialize clock early so that we can use DELAY sooner */ + counter_freq = clock_hz; + cycles_per_usec = (clock_hz / (1000 * 1000)); + +} + /* * count_compare_clockhandler: * @@ -100,11 +114,11 @@ count_compare_clockhandler(struct trapfr cycles += XLR_CPU_HZ/hz; mips_wr_compare(cycles); - hardclock_process((struct clockframe *)tf); + hardclock_cpu(USERMODE(tf->sr)); if (count_scale_factor[cpu] == STAT_PROF_CLOCK_SCALE_FACTOR) { - statclock((struct clockframe *)tf); + statclock(USERMODE(tf->sr)); if(profprocs != 0) { - profclock((struct clockframe *)tf); + profclock(USERMODE(tf->sr), tf->pc); } count_scale_factor[cpu] = 0; } @@ -124,11 +138,11 @@ pic_hardclockhandler(struct trapframe *t if (cpu == 0) { scale_factor++; - hardclock((struct clockframe *)tf); + hardclock(USERMODE(tf->sr), tf->pc); if (scale_factor == STAT_PROF_CLOCK_SCALE_FACTOR) { - statclock((struct clockframe *)tf); + statclock(USERMODE(tf->sr)); if(profprocs != 0) { - profclock((struct clockframe *)tf); + profclock(USERMODE(tf->sr), tf->pc); } scale_factor = 0; } @@ -141,73 +155,164 @@ pic_hardclockhandler(struct trapframe *t else { /* If needed , handle count compare tick skew here */ } - critical_exit(); } -void +int pic_timecounthandler(struct trapframe *tf) { + return (FILTER_HANDLED); } void platform_initclocks(void) { - int cpu = PCPU_GET(cpuid); - void *cookie; + int cpu = PCPU_GET(cpuid); + void *cookie; - /* Note: Passing #3 as NULL ensures that clockhandler - * gets called with trapframe - */ - /* profiling/process accounting timer interrupt for non-zero cpus */ - cpu_establish_intr("compare", IRQ_TIMER, - (driver_intr_t *)count_compare_clockhandler, - NULL, INTR_TYPE_CLK|INTR_FAST, &cookie, NULL, NULL); - - /* timekeeping timer interrupt for cpu 0 */ - cpu_establish_intr("hardclk", PIC_TIMER_7_IRQ, - (driver_intr_t *)pic_hardclockhandler, - NULL, INTR_TYPE_CLK|INTR_FAST, &cookie, NULL, NULL); - - /* this is used by timecounter */ - cpu_establish_intr("timecount", PIC_TIMER_6_IRQ, - (driver_intr_t *)pic_timecounthandler, - NULL, INTR_TYPE_CLK|INTR_FAST, &cookie, NULL, NULL); + /* Note: Passing #3 as NULL ensures that clockhandler + * gets called with trapframe + */ + /* profiling/process accounting timer interrupt for non-zero cpus */ + cpu_establish_hardintr("compare", + NULL, + (driver_intr_t *)count_compare_clockhandler, + NULL, + IRQ_TIMER, + INTR_TYPE_CLK|INTR_FAST, &cookie); + + /* timekeeping timer interrupt for cpu 0 */ + cpu_establish_hardintr("hardclk", + NULL, + (driver_intr_t *)pic_hardclockhandler, + NULL, + PIC_TIMER_7_IRQ, + INTR_TYPE_CLK|INTR_FAST, + &cookie); + + /* this is used by timecounter */ + cpu_establish_hardintr("timecount", + (driver_filter_t *)pic_timecounthandler, NULL, + NULL, PIC_TIMER_6_IRQ, INTR_TYPE_CLK|INTR_FAST, + &cookie); + + if (cpu == 0) { + __uint64_t maxval = XLR_PIC_HZ/hz; + xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); - if (cpu == 0) { - __uint64_t maxval = XLR_PIC_HZ/hz; - xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); + stathz = hz / STAT_PROF_CLOCK_SCALE_FACTOR; + profhz = stathz; - stathz = hz / STAT_PROF_CLOCK_SCALE_FACTOR; - profhz = stathz; + /* Setup PIC Interrupt */ - /* Setup PIC Interrupt */ + mtx_lock_spin(&xlr_pic_lock); + xlr_write_reg(mmio, PIC_TIMER_7_MAXVAL_0, (maxval & 0xffffffff)); /* 0x100 + 7*/ + xlr_write_reg(mmio, PIC_TIMER_7_MAXVAL_1, (maxval >> 32) & 0xffffffff);/* 0x110 + 7 */ + /* 0x40 + 8 */ + /* reg 40 is lower bits 31-0 and holds CPU mask */ + xlr_write_reg(mmio, PIC_IRT_0_TIMER_7, (1 << cpu)); + /* 0x80 + 8 */ + /* Reg 80 is upper bits 63-32 and holds */ + /* Valid Edge Local IRQ */ + xlr_write_reg(mmio, PIC_IRT_1_TIMER_7, (1<<31)|(0<<30)|(1<<6)|(PIC_TIMER_7_IRQ)); + pic_update_control(1<<(8+7)); + + xlr_write_reg(mmio, PIC_TIMER_6_MAXVAL_0, (0xffffffff & 0xffffffff)); + xlr_write_reg(mmio, PIC_TIMER_6_MAXVAL_1, (0xffffffff & 0xffffffff)); + xlr_write_reg(mmio, PIC_IRT_0_TIMER_6, (1 << cpu)); + xlr_write_reg(mmio, PIC_IRT_1_TIMER_6, (1<<31)|(0<<30)|(1<<6)|(PIC_TIMER_6_IRQ)); + pic_update_control(1<<(8+6)); + mtx_unlock_spin(&xlr_pic_lock); + } else { + /* Setup count-compare interrupt for vcpu[1-31] */ + mips_wr_compare((xlr_boot1_info.cpu_frequency)/hz); + } +} - mtx_lock_spin(&xlr_pic_lock); - xlr_write_reg(mmio, PIC_TIMER_7_MAXVAL_0, (maxval & 0xffffffff)); - xlr_write_reg(mmio, PIC_TIMER_7_MAXVAL_1, (maxval >> 32) & 0xffffffff); - xlr_write_reg(mmio, PIC_IRT_0_TIMER_7, (1 << cpu)); - xlr_write_reg(mmio, PIC_IRT_1_TIMER_7, (1<<31)|(0<<30)|(1<<6)|(PIC_TIMER_7_IRQ)); - pic_update_control(1<<(8+7)); - - xlr_write_reg(mmio, PIC_TIMER_6_MAXVAL_0, (0xffffffff & 0xffffffff)); - xlr_write_reg(mmio, PIC_TIMER_6_MAXVAL_1, (0x0) & 0xffffffff); - xlr_write_reg(mmio, PIC_IRT_0_TIMER_6, (1 << cpu)); - xlr_write_reg(mmio, PIC_IRT_1_TIMER_6, (1<<31)|(0<<30)|(1<<6)|(PIC_TIMER_6_IRQ)); - pic_update_control(1<<(8+6)); - mtx_unlock_spin(&xlr_pic_lock); - } else { - /* Setup count-compare interrupt for vcpu[1-31] */ - mips_wr_compare((xlr_boot1_info.cpu_frequency)/hz); - } +unsigned __attribute__((no_instrument_function)) +platform_get_timecount(struct timecounter *tc __unused) +{ + xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); + + return 0xffffffffU - xlr_read_reg(mmio, PIC_TIMER_6_COUNTER_0); } +void +DELAY(int n) +{ + uint32_t cur, last, delta, usecs; + /* + * This works by polling the timer and counting the number of + * microseconds that go by. + */ + last = platform_get_timecount(NULL); + delta = usecs = 0; + + while (n > usecs) { + cur = platform_get_timecount(NULL); + + /* Check to see if the timer has wrapped around. */ + if (cur < last) + delta += (cur + (cycles_per_hz - last)); + else + delta += (cur - last); + + last = cur; + + if (delta >= cycles_per_usec) { + usecs += delta / cycles_per_usec; + delta %= cycles_per_usec; + } + } +} -unsigned __attribute__((no_instrument_function)) -platform_get_timecount(struct timecounter *tc) +static +uint64_t read_pic_counter(void) { xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); + uint32_t lower, upper; + uint64_t tc; + /* Pull the value of the 64 bit counter which is stored in + * PIC register 120+N and 130+N + */ + upper = 0xffffffffU - xlr_read_reg(mmio, PIC_TIMER_6_COUNTER_1); + lower = 0xffffffffU - xlr_read_reg(mmio, PIC_TIMER_6_COUNTER_0); + tc = (((uint64_t)upper << 32) | (uint64_t)lower); + return(tc); +} - return 0xffffffffU - xlr_read_reg(mmio, PIC_TIMER_6_COUNTER_0); +extern struct timecounter counter_timecounter; + +void +mips_timer_init_params(uint64_t platform_counter_freq, int double_count) +{ + + /* + * XXX: Do not use printf here: uart code 8250 may use DELAY so this + * function should be called before cninit. + */ + counter_freq = platform_counter_freq; + /* + * XXX: Some MIPS32 cores update the Count register only every two + * pipeline cycles. + */ + if (double_count != 0) + counter_freq /= 2; + + cycles_per_tick = counter_freq / 1000; + cycles_per_hz = counter_freq / hz; + cycles_per_usec = counter_freq / (1 * 1000 * 1000); + cycles_per_sec = counter_freq ; + + counter_timecounter.tc_frequency = counter_freq; + printf("hz=%d cyl_per_hz:%jd cyl_per_usec:%jd freq:%jd cyl_per_hz:%jd cyl_per_sec:%jd\n", + hz, + cycles_per_tick, + cycles_per_usec, + counter_freq, + cycles_per_hz, + cycles_per_sec + ); + set_cputicker(read_pic_counter, counter_freq, 1); } Modified: projects/mips/sys/mips/rmi/clock.h ============================================================================== --- projects/mips/sys/mips/rmi/clock.h Thu Oct 29 15:42:50 2009 (r198606) +++ projects/mips/sys/mips/rmi/clock.h Thu Oct 29 15:55:25 2009 (r198607) @@ -35,6 +35,6 @@ void count_compare_clockhandler(struct trapframe *); void pic_hardclockhandler(struct trapframe *); -void pic_timecounthandler(struct trapframe *); +int pic_timecounthandler(struct trapframe *); #endif /* _RMI_CLOCK_H_ */ Added: projects/mips/sys/mips/rmi/ehcireg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mips/sys/mips/rmi/ehcireg.h Thu Oct 29 15:55:25 2009 (r198607) @@ -0,0 +1,301 @@ +/* $NetBSD: ehcireg.h,v 1.18 2004/10/22 10:38:17 augustss Exp $ */ +/* $FreeBSD: src/sys/dev/usb/ehcireg.h,v 1.7.2.2.2.1 2008/10/02 02:57:24 kensmith Exp $ */ + +/*- + * Copyright (c) 2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Lennart Augustsson (lennart@augustsson.net). + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * The EHCI 0.96 spec can be found at + * http://developer.intel.com/technology/usb/download/ehci-r096.pdf + * and the USB 2.0 spec at + * http://www.usb.org/developers/data/usb_20.zip + */ + +#ifndef _DEV_PCI_EHCIREG_H_ +#define _DEV_PCI_EHCIREG_H_ + +/*** PCI config registers ***/ + +#define PCI_CBMEM 0x10 /* configuration base MEM */ + +#define PCI_INTERFACE_EHCI 0x20 + +#define PCI_USBREV 0x60 /* RO USB protocol revision */ +#define PCI_USBREV_MASK 0xff +#define PCI_USBREV_PRE_1_0 0x00 +#define PCI_USBREV_1_0 0x10 +#define PCI_USBREV_1_1 0x11 +#define PCI_USBREV_2_0 0x20 + +#define PCI_EHCI_FLADJ 0x61 /*RW Frame len adj, SOF=59488+6*fladj */ + +#define PCI_EHCI_PORTWAKECAP 0x62 /* RW Port wake caps (opt) */ + +/* EHCI Extended Capabilities */ +#define EHCI_EC_LEGSUP 0x01 + +#define EHCI_EECP_NEXT(x) (((x) >> 8) & 0xff) +#define EHCI_EECP_ID(x) ((x) & 0xff) + +/* Legacy support extended capability */ +#define EHCI_LEGSUP_OS_SEM 0x03 /* OS owned semaphore */ +#define EHCI_LEGSUP_BIOS_SEM 0x02 /* BIOS owned semaphore */ +#define EHCI_LEGSUP_USBLEGCTLSTS 0x04 + +/*** EHCI capability registers ***/ + +#define EHCI_CAPLENGTH 0x00 /*RO Capability register length field */ +/* reserved 0x01 */ +#define EHCI_HCIVERSION 0x02 /* RO Interface version number */ + +#define EHCI_HCSPARAMS 0x04 /* RO Structural parameters */ +#define EHCI_HCS_DEBUGPORT(x) (((x) >> 20) & 0xf) +#define EHCI_HCS_P_INDICATOR(x) ((x) & 0x10000) +#define EHCI_HCS_N_CC(x) (((x) >> 12) & 0xf) /* # of companion ctlrs */ +#define EHCI_HCS_N_PCC(x) (((x) >> 8) & 0xf) /* # of ports per comp. */ +#define EHCI_HCS_PPC(x) ((x) & 0x10) /* port power control */ +#define EHCI_HCS_N_PORTS(x) ((x) & 0xf) /* # of ports */ + +#define EHCI_HCCPARAMS 0x08 /* RO Capability parameters */ +#define EHCI_HCC_EECP(x) (((x) >> 8) & 0xff) /* extended ports caps */ +#define EHCI_HCC_IST(x) (((x) >> 4) & 0xf) /* isoc sched threshold */ +#define EHCI_HCC_ASPC(x) ((x) & 0x4) /* async sched park cap */ +#define EHCI_HCC_PFLF(x) ((x) & 0x2) /* prog frame list flag */ +#define EHCI_HCC_64BIT(x) ((x) & 0x1) /* 64 bit address cap */ + +#define EHCI_HCSP_PORTROUTE 0x0c /*RO Companion port route description */ + +/* EHCI operational registers. Offset given by EHCI_CAPLENGTH register */ +#define EHCI_USBCMD 0x00 /* RO, RW, WO Command register */ +#define EHCI_CMD_ITC_M 0x00ff0000 /* RW interrupt threshold ctrl */ +#define EHCI_CMD_ITC_1 0x00010000 +#define EHCI_CMD_ITC_2 0x00020000 +#define EHCI_CMD_ITC_4 0x00040000 +#define EHCI_CMD_ITC_8 0x00080000 +#define EHCI_CMD_ITC_16 0x00100000 +#define EHCI_CMD_ITC_32 0x00200000 +#define EHCI_CMD_ITC_64 0x00400000 +#define EHCI_CMD_ASPME 0x00000800 /* RW/RO async park enable */ +#define EHCI_CMD_ASPMC 0x00000300 /* RW/RO async park count */ +#define EHCI_CMD_LHCR 0x00000080 /* RW light host ctrl reset */ +#define EHCI_CMD_IAAD 0x00000040 /* RW intr on async adv door bell */ +#define EHCI_CMD_ASE 0x00000020 /* RW async sched enable */ +#define EHCI_CMD_PSE 0x00000010 /* RW periodic sched enable */ +#define EHCI_CMD_FLS_M 0x0000000c /* RW/RO frame list size */ +#define EHCI_CMD_FLS(x) (((x) >> 2) & 3) /* RW/RO frame list size */ +#define EHCI_CMD_HCRESET 0x00000002 /* RW reset */ +#define EHCI_CMD_RS 0x00000001 /* RW run/stop */ + +#define EHCI_USBSTS 0x04 /* RO, RW, RWC Status register */ +#define EHCI_STS_ASS 0x00008000 /* RO async sched status */ +#define EHCI_STS_PSS 0x00004000 /* RO periodic sched status */ +#define EHCI_STS_REC 0x00002000 /* RO reclamation */ +#define EHCI_STS_HCH 0x00001000 /* RO host controller halted */ +#define EHCI_STS_IAA 0x00000020 /* RWC interrupt on async adv */ +#define EHCI_STS_HSE 0x00000010 /* RWC host system error */ +#define EHCI_STS_FLR 0x00000008 /* RWC frame list rollover */ +#define EHCI_STS_PCD 0x00000004 /* RWC port change detect */ +#define EHCI_STS_ERRINT 0x00000002 /* RWC error interrupt */ +#define EHCI_STS_INT 0x00000001 /* RWC interrupt */ +#define EHCI_STS_INTRS(x) ((x) & 0x3f) + +#define EHCI_NORMAL_INTRS (EHCI_STS_IAA | EHCI_STS_HSE | EHCI_STS_PCD | EHCI_STS_ERRINT | EHCI_STS_INT) + +#define EHCI_USBINTR 0x08 /* RW Interrupt register */ +#define EHCI_INTR_IAAE 0x00000020 /* interrupt on async advance ena */ +#define EHCI_INTR_HSEE 0x00000010 /* host system error ena */ +#define EHCI_INTR_FLRE 0x00000008 /* frame list rollover ena */ +#define EHCI_INTR_PCIE 0x00000004 /* port change ena */ +#define EHCI_INTR_UEIE 0x00000002 /* USB error intr ena */ +#define EHCI_INTR_UIE 0x00000001 /* USB intr ena */ + +#define EHCI_FRINDEX 0x0c /* RW Frame Index register */ + +#define EHCI_CTRLDSSEGMENT 0x10 /* RW Control Data Structure Segment */ + +#define EHCI_PERIODICLISTBASE 0x14 /* RW Periodic List Base */ +#define EHCI_ASYNCLISTADDR 0x18 /* RW Async List Base */ + +#define EHCI_CONFIGFLAG 0x40 /* RW Configure Flag register */ +#define EHCI_CONF_CF 0x00000001 /* RW configure flag */ + +#define EHCI_PORTSC(n) (0x40+4*(n)) /* RO, RW, RWC Port Status reg */ +#define EHCI_PS_WKOC_E 0x00400000 /* RW wake on over current ena */ +#define EHCI_PS_WKDSCNNT_E 0x00200000 /* RW wake on disconnect ena */ +#define EHCI_PS_WKCNNT_E 0x00100000 /* RW wake on connect ena */ +#define EHCI_PS_PTC 0x000f0000 /* RW port test control */ +#define EHCI_PS_PIC 0x0000c000 /* RW port indicator control */ +#define EHCI_PS_PO 0x00002000 /* RW port owner */ +#define EHCI_PS_PP 0x00001000 /* RW,RO port power */ +#define EHCI_PS_LS 0x00000c00 /* RO line status */ +#define EHCI_PS_IS_LOWSPEED(x) (((x) & EHCI_PS_LS) == 0x00000400) +#define EHCI_PS_PR 0x00000100 /* RW port reset */ +#define EHCI_PS_SUSP 0x00000080 /* RW suspend */ +#define EHCI_PS_FPR 0x00000040 /* RW force port resume */ +#define EHCI_PS_OCC 0x00000020 /* RWC over current change */ +#define EHCI_PS_OCA 0x00000010 /* RO over current active */ +#define EHCI_PS_PEC 0x00000008 /* RWC port enable change */ +#define EHCI_PS_PE 0x00000004 /* RW port enable */ +#define EHCI_PS_CSC 0x00000002 /* RWC connect status change */ +#define EHCI_PS_CS 0x00000001 /* RO connect status */ +#define EHCI_PS_CLEAR (EHCI_PS_OCC|EHCI_PS_PEC|EHCI_PS_CSC) + +#define EHCI_PORT_RESET_COMPLETE 2 /* ms */ + +#define EHCI_FLALIGN_ALIGN 0x1000 + +/* No data structure may cross a page boundary. */ +#define EHCI_PAGE_SIZE 0x1000 +#define EHCI_PAGE(x) ((x) &~ 0xfff) +#define EHCI_PAGE_OFFSET(x) ((x) & 0xfff) +#if defined(__FreeBSD__) +#define EHCI_PAGE_MASK(x) ((x) & 0xfff) +#endif + +typedef u_int32_t ehci_link_t; +#define EHCI_LINK_TERMINATE 0x00000001 +#define EHCI_LINK_TYPE(x) ((x) & 0x00000006) +#define EHCI_LINK_ITD 0x0 +#define EHCI_LINK_QH 0x2 +#define EHCI_LINK_SITD 0x4 +#define EHCI_LINK_FSTN 0x6 +#define EHCI_LINK_ADDR(x) ((x) &~ 0x1f) + +typedef u_int32_t ehci_physaddr_t; + +/* Isochronous Transfer Descriptor */ +typedef struct { + ehci_link_t itd_next; + /* XXX many more */ +} ehci_itd_t; +#define EHCI_ITD_ALIGN 32 + +/* Split Transaction Isochronous Transfer Descriptor */ +typedef struct { + ehci_link_t sitd_next; + /* XXX many more */ +} ehci_sitd_t; +#define EHCI_SITD_ALIGN 32 + +/* Queue Element Transfer Descriptor */ +#define EHCI_QTD_NBUFFERS 5 +typedef struct { + ehci_link_t qtd_next; + ehci_link_t qtd_altnext; + u_int32_t qtd_status; +#define EHCI_QTD_GET_STATUS(x) (((x) >> 0) & 0xff) +#define EHCI_QTD_SET_STATUS(x) ((x) << 0) +#define EHCI_QTD_ACTIVE 0x80 +#define EHCI_QTD_HALTED 0x40 +#define EHCI_QTD_BUFERR 0x20 +#define EHCI_QTD_BABBLE 0x10 +#define EHCI_QTD_XACTERR 0x08 +#define EHCI_QTD_MISSEDMICRO 0x04 +#define EHCI_QTD_SPLITXSTATE 0x02 +#define EHCI_QTD_PINGSTATE 0x01 +#define EHCI_QTD_STATERRS 0x7c +#define EHCI_QTD_GET_PID(x) (((x) >> 8) & 0x3) +#define EHCI_QTD_SET_PID(x) ((x) << 8) +#define EHCI_QTD_PID_OUT 0x0 +#define EHCI_QTD_PID_IN 0x1 +#define EHCI_QTD_PID_SETUP 0x2 +#define EHCI_QTD_GET_CERR(x) (((x) >> 10) & 0x3) +#define EHCI_QTD_SET_CERR(x) ((x) << 10) +#define EHCI_QTD_GET_C_PAGE(x) (((x) >> 12) & 0x7) +#define EHCI_QTD_SET_C_PAGE(x) ((x) << 12) +#define EHCI_QTD_GET_IOC(x) (((x) >> 15) & 0x1) +#define EHCI_QTD_IOC 0x00008000 +#define EHCI_QTD_GET_BYTES(x) (((x) >> 16) & 0x7fff) +#define EHCI_QTD_SET_BYTES(x) ((x) << 16) +#define EHCI_QTD_GET_TOGGLE(x) (((x) >> 31) & 0x1) +#define EHCI_QTD_SET_TOGGLE(x) ((x) << 31) +#define EHCI_QTD_TOGGLE_MASK 0x80000000 + ehci_physaddr_t qtd_buffer[EHCI_QTD_NBUFFERS]; + ehci_physaddr_t qtd_buffer_hi[EHCI_QTD_NBUFFERS]; +} ehci_qtd_t; +#define EHCI_QTD_ALIGN 32 + +/* Queue Head */ +typedef struct { + ehci_link_t qh_link; + u_int32_t qh_endp; +#define EHCI_QH_GET_ADDR(x) (((x) >> 0) & 0x7f) /* endpoint addr */ +#define EHCI_QH_SET_ADDR(x) (x) +#define EHCI_QH_ADDRMASK 0x0000007f +#define EHCI_QH_GET_INACT(x) (((x) >> 7) & 0x01) /* inactivate on next */ +#define EHCI_QH_INACT 0x00000080 +#define EHCI_QH_GET_ENDPT(x) (((x) >> 8) & 0x0f) /* endpoint no */ +#define EHCI_QH_SET_ENDPT(x) ((x) << 8) +#define EHCI_QH_GET_EPS(x) (((x) >> 12) & 0x03) /* endpoint speed */ +#define EHCI_QH_SET_EPS(x) ((x) << 12) +#define EHCI_QH_SPEED_FULL 0x0 +#define EHCI_QH_SPEED_LOW 0x1 +#define EHCI_QH_SPEED_HIGH 0x2 +#define EHCI_QH_GET_DTC(x) (((x) >> 14) & 0x01) /* data toggle control */ +#define EHCI_QH_DTC 0x00004000 +#define EHCI_QH_GET_HRECL(x) (((x) >> 15) & 0x01) /* head of reclamation */ +#define EHCI_QH_HRECL 0x00008000 +#define EHCI_QH_GET_MPL(x) (((x) >> 16) & 0x7ff) /* max packet len */ +#define EHCI_QH_SET_MPL(x) ((x) << 16) +#define EHCI_QH_MPLMASK 0x07ff0000 +#define EHCI_QH_GET_CTL(x) (((x) >> 27) & 0x01) /* control endpoint */ +#define EHCI_QH_CTL 0x08000000 +#define EHCI_QH_GET_NRL(x) (((x) >> 28) & 0x0f) /* NAK reload */ +#define EHCI_QH_SET_NRL(x) ((x) << 28) + u_int32_t qh_endphub; +#define EHCI_QH_GET_SMASK(x) (((x) >> 0) & 0xff) /* intr sched mask */ +#define EHCI_QH_SET_SMASK(x) ((x) << 0) +#define EHCI_QH_GET_CMASK(x) (((x) >> 8) & 0xff) /* split completion mask */ +#define EHCI_QH_SET_CMASK(x) ((x) << 8) +#define EHCI_QH_GET_HUBA(x) (((x) >> 16) & 0x7f) /* hub address */ +#define EHCI_QH_SET_HUBA(x) ((x) << 16) +#define EHCI_QH_GET_PORT(x) (((x) >> 23) & 0x7f) /* hub port */ +#define EHCI_QH_SET_PORT(x) ((x) << 23) +#define EHCI_QH_GET_MULT(x) (((x) >> 30) & 0x03) /* pipe multiplier */ +#define EHCI_QH_SET_MULT(x) ((x) << 30) + ehci_link_t qh_curqtd; + ehci_qtd_t qh_qtd; +} ehci_qh_t; +#define EHCI_QH_ALIGN 32 + +/* Periodic Frame Span Traversal Node */ +typedef struct { + ehci_link_t fstn_link; + ehci_link_t fstn_back; +} ehci_fstn_t; +#define EHCI_FSTN_ALIGN 32 + +#endif /* _DEV_PCI_EHCIREG_H_ */ Added: projects/mips/sys/mips/rmi/ehcivar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mips/sys/mips/rmi/ehcivar.h Thu Oct 29 15:55:25 2009 (r198607) @@ -0,0 +1,191 @@ +/* $NetBSD: ehcivar.h,v 1.19 2005/04/29 15:04:29 augustss Exp $ */ +/* $FreeBSD: src/sys/dev/usb/ehcivar.h,v 1.9.2.1.8.1 2008/10/02 02:57:24 kensmith Exp $ */ + +/*- + * Copyright (c) 2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Lennart Augustsson (lennart@augustsson.net). + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +typedef struct ehci_soft_qtd { + ehci_qtd_t qtd; + struct ehci_soft_qtd *nextqtd; /* mirrors nextqtd in TD */ + ehci_physaddr_t physaddr; + usbd_xfer_handle xfer; + LIST_ENTRY(ehci_soft_qtd) hnext; + u_int16_t len; +} ehci_soft_qtd_t; +#define EHCI_SQTD_SIZE ((sizeof (struct ehci_soft_qtd) + EHCI_QTD_ALIGN - 1) / EHCI_QTD_ALIGN * EHCI_QTD_ALIGN) +#define EHCI_SQTD_CHUNK (EHCI_PAGE_SIZE / EHCI_SQTD_SIZE) + +typedef struct ehci_soft_qh { + ehci_qh_t qh; + struct ehci_soft_qh *next; + struct ehci_soft_qh *prev; + struct ehci_soft_qtd *sqtd; + ehci_physaddr_t physaddr; + int islot; /* Interrupt list slot. */ +} ehci_soft_qh_t; +#define EHCI_SQH_SIZE ((sizeof (struct ehci_soft_qh) + EHCI_QH_ALIGN - 1) / EHCI_QH_ALIGN * EHCI_QH_ALIGN) +#define EHCI_SQH_CHUNK (EHCI_PAGE_SIZE / EHCI_SQH_SIZE) + +struct ehci_xfer { + struct usbd_xfer xfer; + struct usb_task abort_task; + LIST_ENTRY(ehci_xfer) inext; /* list of active xfers */ + ehci_soft_qtd_t *sqtdstart; + ehci_soft_qtd_t *sqtdend; + u_int32_t ehci_xfer_flags; +#ifdef DIAGNOSTIC + int isdone; +#endif +}; +#define EHCI_XFER_ABORTING 0x0001 /* xfer is aborting. */ +#define EHCI_XFER_ABORTWAIT 0x0002 /* abort completion is being awaited. */ + +#define EXFER(xfer) ((struct ehci_xfer *)(xfer)) + +/* + * Information about an entry in the interrupt list. + */ +struct ehci_soft_islot { + ehci_soft_qh_t *sqh; /* Queue Head. */ +}; + +#define EHCI_FRAMELIST_MAXCOUNT 1024 +#define EHCI_IPOLLRATES 8 /* Poll rates (1ms, 2, 4, 8 ... 128) */ +#define EHCI_INTRQHS ((1 << EHCI_IPOLLRATES) - 1) +#define EHCI_MAX_POLLRATE (1 << (EHCI_IPOLLRATES - 1)) +#define EHCI_IQHIDX(lev, pos) \ + ((((pos) & ((1 << (lev)) - 1)) | (1 << (lev))) - 1) +#define EHCI_ILEV_IVAL(lev) (1 << (lev)) + +#define EHCI_HASH_SIZE 128 +#define EHCI_COMPANION_MAX 8 + +#define EHCI_SCFLG_DONEINIT 0x0001 /* ehci_init() has been called. */ +#define EHCI_SCFLG_LOSTINTRBUG 0x0002 /* workaround for VIA / ATI chipsets */ + +typedef struct ehci_softc { + struct usbd_bus sc_bus; /* base device */ + int sc_flags; + bus_space_tag_t iot; + bus_space_handle_t ioh; + bus_size_t sc_size; +#if defined(__FreeBSD__) + void *ih; + + struct resource *io_res; + struct resource *irq_res; +#endif + u_int sc_offs; /* offset to operational regs */ + + char sc_vendor[32]; /* vendor string for root hub */ + int sc_id_vendor; /* vendor ID for root hub */ + + u_int32_t sc_cmd; /* shadow of cmd reg during suspend */ +#if defined(__NetBSD__) || defined(__OpenBSD__) + void *sc_powerhook; /* cookie from power hook */ + void *sc_shutdownhook; /* cookie from shutdown hook */ +#endif + + u_int sc_ncomp; + u_int sc_npcomp; + struct usbd_bus *sc_comps[EHCI_COMPANION_MAX]; + + usb_dma_t sc_fldma; + ehci_link_t *sc_flist; + u_int sc_flsize; +#ifndef __FreeBSD__ + u_int sc_rand; /* XXX need proper intr scheduling */ +#endif + + struct ehci_soft_islot sc_islots[EHCI_INTRQHS]; + + LIST_HEAD(, ehci_xfer) sc_intrhead; + + ehci_soft_qh_t *sc_freeqhs; + ehci_soft_qtd_t *sc_freeqtds; + + int sc_noport; + u_int8_t sc_addr; /* device address */ + u_int8_t sc_conf; /* device configuration */ + usbd_xfer_handle sc_intrxfer; + char sc_isreset; +#ifdef USB_USE_SOFTINTR + char sc_softwake; +#endif /* USB_USE_SOFTINTR */ + + u_int32_t sc_eintrs; + ehci_soft_qh_t *sc_async_head; + + SIMPLEQ_HEAD(, usbd_xfer) sc_free_xfers; /* free xfers */ + + struct lock sc_doorbell_lock; + + usb_callout_t sc_tmo_pcd; + usb_callout_t sc_tmo_intrlist; + +#if defined(__NetBSD__) || defined(__OpenBSD__) + device_ptr_t sc_child; /* /dev/usb# device */ +#endif + char sc_dying; +#if defined(__NetBSD__) + struct usb_dma_reserve sc_dma_reserve; +#endif +} ehci_softc_t; + +#define EREAD1(sc, a) bus_space_read_1((sc)->iot, (sc)->ioh, (a)) +#define EREAD2(sc, a) bus_space_read_2((sc)->iot, (sc)->ioh, (a)) +#define EREAD4(sc, a) bus_space_read_4((sc)->iot, (sc)->ioh, (a)) +#define EWRITE1(sc, a, x) bus_space_write_1((sc)->iot, (sc)->ioh, (a), (x)) +#define EWRITE2(sc, a, x) bus_space_write_2((sc)->iot, (sc)->ioh, (a), (x)) +#define EWRITE4(sc, a, x) bus_space_write_4((sc)->iot, (sc)->ioh, (a), (x)) +#define EOREAD1(sc, a) bus_space_read_1((sc)->iot, (sc)->ioh, (sc)->sc_offs+(a)) +#define EOREAD2(sc, a) bus_space_read_2((sc)->iot, (sc)->ioh, (sc)->sc_offs+(a)) +#define EOREAD4(sc, a) bus_space_read_4((sc)->iot, (sc)->ioh, (sc)->sc_offs+(a)) +#define EOWRITE1(sc, a, x) bus_space_write_1((sc)->iot, (sc)->ioh, (sc)->sc_offs+(a), (x)) +#define EOWRITE2(sc, a, x) bus_space_write_2((sc)->iot, (sc)->ioh, (sc)->sc_offs+(a), (x)) +#define EOWRITE4(sc, a, x) bus_space_write_4((sc)->iot, (sc)->ioh, (sc)->sc_offs+(a), (x)) + +usbd_status ehci_init(ehci_softc_t *); +int ehci_intr(void *); +int ehci_detach(ehci_softc_t *, int); +#if defined(__NetBSD__) || defined(__OpenBSD__) +int ehci_activate(device_ptr_t, enum devact); +#endif +void ehci_power(int state, void *priv); +void ehci_shutdown(void *v); + +#define MS_TO_TICKS(ms) ((ms) * hz / 1000) + Modified: projects/mips/sys/mips/rmi/files.xlr ============================================================================== --- projects/mips/sys/mips/rmi/files.xlr Thu Oct 29 15:42:50 2009 (r198606) +++ projects/mips/sys/mips/rmi/files.xlr Thu Oct 29 15:55:25 2009 (r198607) @@ -1,13 +1,14 @@ # $FreeBSD$ -mips/rmi/xlr_boot1_console.c standard +#mips/rmi/xlr_boot1_console.c standard mips/rmi/xlr_machdep.c standard -#mips/rmi/clock.c standard +mips/rmi/clock.c standard +mips/rmi/tick.c standard mips/rmi/iodi.c standard mips/rmi/msgring.c standard mips/rmi/msgring_xls.c standard mips/rmi/board.c standard mips/rmi/on_chip.c standard -mips/rmip/intr_machdep.c standard +mips/rmi/intr_machdep.c standard mips/rmi/xlr_i2c.c optional iic mips/rmi/uart_bus_xlr_iodi.c optional uart mips/rmi/uart_cpu_mips_xlr.c optional uart @@ -15,7 +16,7 @@ mips/rmi/perfmon_kern.c optional xlr_ mips/rmi/perfmon_percpu.c optional xlr_perfmon mips/rmi/pcibus.c optional pci mips/rmi/xlr_pci.c optional pci -mips/rmi/xls_ehci.c optional usb ehci +#mips/rmi/xls_ehci.c optional usb ehci dev/rmi/xlr/rge.c optional rge dev/iicbus/xlr_rtc.c optional xlr_rtc dev/iicbus/xlr_temperature.c optional xlr_temperature Modified: projects/mips/sys/mips/rmi/intr_machdep.c ============================================================================== --- projects/mips/sys/mips/rmi/intr_machdep.c Thu Oct 29 15:42:50 2009 (r198606) +++ projects/mips/sys/mips/rmi/intr_machdep.c Thu Oct 29 15:55:25 2009 (r198607) @@ -44,7 +44,11 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include +#include +#include + +/*#include */ struct mips_intrhand mips_intr_handlers[XLR_MAX_INTR]; @@ -72,16 +76,16 @@ cpu_establish_hardintr(const char *name, struct intr_event *ie; /* descriptor for the IRQ */ int errcode; - if (intr < 0 || intr > XLR_MAX_INTR) - panic("%s called for unknown hard intr %d", __func__, intr); + if (irq < 0 || irq > XLR_MAX_INTR) + panic("%s called for unknown hard intr %d", __func__, irq); /* FIXME locking - not needed now, because we do this only on startup from CPU0 */ mih = &mips_intr_handlers[irq]; - mih->cntp = &intrcnt[irq]; + /*mih->cntp = &intrcnt[irq]; */ ie = mih->mih_event; if (ie == NULL) { - errcode = intr_event_create(&event, (void *)(uintptr_t)irq, 0, + errcode = intr_event_create(&ie, (void *)(uintptr_t)irq, 0, irq, mips_mask_hard_irq, mips_unmask_hard_irq, NULL, NULL, "hard intr%d:", irq); @@ -90,7 +94,7 @@ cpu_establish_hardintr(const char *name, return; } } - intr_event_add_handler(event, name, filt, handler, arg, + intr_event_add_handler(ie, name, filt, handler, arg, intr_priority(flags), flags, cookiep); mih->mih_event = ie; mips_unmask_hard_irq((void*)(uintptr_t)irq); @@ -103,17 +107,18 @@ cpu_establish_softintr(const char *name, void **cookiep) { /* we don't separate them into soft/hard like other mips */ - cpu_establish_hardintr(name, filt, handler, arg, intr, flags, cookiep); + cpu_establish_hardintr(name, filt, handler, arg, irq, flags, cookiep); } + + void cpu_intr(struct trapframe *tf) { struct mips_intrhand *mih; - struct intr_handler *ih; struct intr_event *ie; register_t eirr; - int i, thread, error; + int i; critical_enter(); eirr = read_c0_eirr64(); @@ -156,7 +161,7 @@ cpu_intr(struct trapframe *tf) #endif #endif mih = &mips_intr_handlers[i]; - atomic_add_long(mih->cntp, 1); + /*atomic_add_long(mih->cntp, 1);*/ ie = mih->mih_event; write_c0_eirr64(1ULL << i); @@ -166,8 +171,7 @@ cpu_intr(struct trapframe *tf) } if (intr_event_handle(ie, tf) != 0) { - printf("stray %s interrupt %d\n", - hard ? "hard" : "soft", i); + printf("stray interrupt %d\n",i); } } Modified: projects/mips/sys/mips/rmi/iodi.c ============================================================================== --- projects/mips/sys/mips/rmi/iodi.c Thu Oct 29 15:42:50 2009 (r198606) +++ projects/mips/sys/mips/rmi/iodi.c Thu Oct 29 15:55:25 2009 (r198607) @@ -46,11 +46,30 @@ #include #include #include -#include -#include -#include +#include +#include +#include +#include #include + +#include +#include +#include /* for DELAY */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + extern void iodi_activateirqs(void); extern bus_space_tag_t uart_bus_space_mem; @@ -61,10 +80,11 @@ static struct resource *iodi_alloc_resou static int iodi_activate_resource(device_t, device_t, int, int, struct resource *); static int iodi_setup_intr(device_t, device_t, struct resource *, int, - driver_intr_t *, void *, void **); + driver_filter_t *, driver_intr_t *, void *, void **); struct iodi_softc *iodi_softc; /* There can be only one. */ +/* static void pic_usb_ack(void *arg) { xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); @@ -74,10 +94,11 @@ static void pic_usb_ack(void *arg) xlr_write_reg(mmio, PIC_INT_ACK, (1 << (irq - PIC_IRQ_BASE))); mtx_unlock_spin(&xlr_pic_lock); } +*/ static int iodi_setup_intr(device_t dev, device_t child, - struct resource *ires, int flags, driver_intr_t *intr, void *arg, + struct resource *ires, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) { int level; @@ -92,34 +113,38 @@ iodi_setup_intr(device_t dev, device_t c xlr_write_reg(mmio, PIC_IRT_0_UART_0, 0x01); xlr_write_reg(mmio, PIC_IRT_1_UART_0, ((1 << 31) | (level<<30)|(1<<6)|(PIC_UART_0_IRQ))); mtx_unlock_spin(&xlr_pic_lock); - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Thu Oct 29 15:55:59 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 127E7106566B; Thu, 29 Oct 2009 15:55:59 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 017988FC0A; Thu, 29 Oct 2009 15:55:59 +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 n9TFtwZX002165; Thu, 29 Oct 2009 15:55:58 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9TFtwtO002162; Thu, 29 Oct 2009 15:55:58 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200910291555.n9TFtwtO002162@svn.freebsd.org> From: Randall Stewart Date: Thu, 29 Oct 2009 15:55:58 +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: r198608 - projects/mips/sys/dev/rmi/xlr 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, 29 Oct 2009 15:55:59 -0000 Author: rrs Date: Thu Oct 29 15:55:58 2009 New Revision: 198608 URL: http://svn.freebsd.org/changeset/base/198608 Log: updates to rge to get it to compile Modified: projects/mips/sys/dev/rmi/xlr/rge.c projects/mips/sys/dev/rmi/xlr/rge.h Modified: projects/mips/sys/dev/rmi/xlr/rge.c ============================================================================== --- projects/mips/sys/dev/rmi/xlr/rge.c Thu Oct 29 15:55:25 2009 (r198607) +++ projects/mips/sys/dev/rmi/xlr/rge.c Thu Oct 29 15:55:58 2009 (r198608) @@ -79,30 +79,33 @@ #include #include #include /* for DELAY */ -#include +#include /* */ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include + + #include #include -#include "miidevs.h" #include -#include "miibus_if.h" + #include +#include /* #include "opt_rge.h" */ +#include "miibus_if.h" + MODULE_DEPEND(rge, ether, 1, 1, 1); MODULE_DEPEND(rge, miibus, 1, 1, 1); @@ -160,93 +163,6 @@ int mac_debug = 0; *****************************************************************/ extern uint32_t cpu_ltop_map[32]; -typedef enum { - xlr_mac_speed_10, xlr_mac_speed_100, - xlr_mac_speed_1000, xlr_mac_speed_rsvd -} xlr_mac_speed_t; - -typedef enum { - xlr_mac_duplex_auto, xlr_mac_duplex_half, - xlr_mac_duplex_full -} xlr_mac_duplex_t; - -typedef enum { - xlr_mac_link_down, - xlr_mac_link_up, -} xlr_mac_link_t; - -typedef enum { - xlr_mac_fc_auto, xlr_mac_fc_disabled, xlr_mac_fc_frame, - xlr_mac_fc_collision, xlr_mac_fc_carrier -} xlr_mac_fc_t; - - -struct rge_softc_stats { - unsigned long rx_frames; - unsigned long tx_frames; - unsigned long rx_packets; - unsigned long rx_bytes; - unsigned long tx_packets; - unsigned long tx_bytes; -}; - -struct driver_data { - - /* - * Let these be the first fields in this structure the structure is - * cacheline aligned when allocated in init_etherdev - */ - struct fr_desc *frin_spill; - struct fr_desc *frout_spill; - union rx_tx_desc *class_0_spill; - union rx_tx_desc *class_1_spill; - union rx_tx_desc *class_2_spill; - union rx_tx_desc *class_3_spill; - int spill_configured; - - struct rge_softc *sc; /* pointer to freebsd device soft-pointer */ - struct rge_softc_stats stats; - struct mtx lock; - - xlr_reg_t *mmio; - xlr_reg_t *mii_mmio; - xlr_reg_t *pcs_mmio; - xlr_reg_t *serdes_mmio; - - int txbucket; - int rfrbucket; - - int phy_oldbmsr; - int phy_oldanlpar; - int phy_oldk1stsr; - int phy_oldlinkstat; - unsigned char phys_addr[2]; - - xlr_mac_speed_t speed; /* current speed */ - xlr_mac_duplex_t duplex;/* current duplex */ - xlr_mac_link_t link; /* current link */ - xlr_mac_fc_t flow_ctrl; /* current flow control setting */ - int advertising; - - int id; - int type; - int mode; - int instance; - int phy_addr; - int frin_to_be_sent[8]; - int init_frin_desc; -}; - -/* static int mac_frin_to_be_sent_thr[8]; */ - -enum { - PORT_TX, - PORT_TX_COMPLETE, - PORT_STARTQ, - PORT_STOPQ, - PORT_START_DEV_STATE, - PORT_STOP_DEV_STATE, -}; #ifdef ENABLED_DEBUG static int port_counters[4][8] __aligned(XLR_CACHELINE_SIZE); @@ -285,37 +201,6 @@ ldadd_wu(unsigned int value, unsigned lo /* #define mac_stats_add(x, val) ({(x) += (val);}) */ #define mac_stats_add(x, val) ldadd_wu(val, &x) -struct rge_softc { - int unit; - int irq; - unsigned char dev_addr[6]; - unsigned long base_addr; - unsigned long mem_end; - struct ifnet *rge_ifp;/* interface info */ - device_t rge_dev; - int mtu; - int flags; - struct driver_data priv; - struct mtx rge_mtx; - device_t rge_miibus; - struct mii_data rge_mii;/* MII/media information */ - bus_space_handle_t rge_bhandle; - bus_space_tag_t rge_btag; - void *rge_intrhand; - struct resource rge_irq; - struct resource *rge_res; - struct ifmedia rge_ifmedia; /* TBI media info */ - int rge_if_flags; - int rge_link; /* link state */ - int rge_link_evt; /* pending link event */ - struct callout rge_stat_ch; - void (*xmit) (struct ifnet *); - void (*stop) (struct rge_softc *); - int (*ioctl) (struct ifnet *, u_long, caddr_t); - struct rge_softc_stats *(*get_stats) (struct rge_softc *); - int active; - int link_up; -}; #define XLR_MAX_CORE 8 #define RGE_LOCK_INIT(_sc, _name) \ @@ -354,7 +239,7 @@ static int rge_ioctl(struct ifnet *, u_l static void rge_init(void *); static void rge_stop(struct rge_softc *); static void rge_watchdog(struct ifnet *); -static void rge_shutdown(device_t); +static int rge_shutdown(device_t); static void rge_reset(struct rge_softc *); static struct mbuf *get_mbuf(void); @@ -367,8 +252,8 @@ static void rmi_xlr_mac_set_enable(struc static void rmi_xlr_xgmac_init(struct driver_data *priv); static void rmi_xlr_gmac_init(struct driver_data *priv); static void mac_common_init(void); -static void rge_mii_write(struct device *, int, int, int); -static int rge_mii_read(struct device *, int, int); +static int rge_mii_write(device_t, int, int, int); +static int rge_mii_read(device_t, int, int); static void rmi_xlr_mac_mii_statchg(device_t); static int rmi_xlr_mac_mediachange(struct ifnet *); static void rmi_xlr_mac_mediastatus(struct ifnet *, struct ifmediareq *); @@ -418,8 +303,8 @@ static device_method_t rge_methods[] = { /* MII interface */ DEVMETHOD(miibus_readreg, rge_mii_read), - DEVMETHOD(miibus_writereg, rge_mii_write), DEVMETHOD(miibus_statchg, rmi_xlr_mac_mii_statchg), + DEVMETHOD(miibus_writereg, rge_mii_write), {0, 0} }; @@ -693,7 +578,7 @@ build_frag_list(struct mbuf *m_head, str p1 = vtophys(taddr); if ((p2 + len2) != p1) { - printf("p1 = %llx p2 = %llx\n", p1, p2); + printf("p1 = %p p2 = %p\n", (void *)p1, (void *)p2); printf("len1 = %x len2 = %x\n", len1, len2); printf("m_data %p\n", m->m_data); @@ -989,7 +874,7 @@ rge_mii_read_internal(xlr_reg_t *mii_mmi } static int -rge_mii_read(struct device *dev, int phyaddr, int regidx) +rge_mii_read(device_t dev, int phyaddr, int regidx) { struct rge_softc *sc = device_get_softc(dev); return rge_mii_read_internal(sc->priv.mii_mmio, phyaddr, regidx); @@ -1051,7 +936,7 @@ rmi_xlr_mac_mediastatus(struct ifnet *if * Return value: * nothing ********************************************************************* */ -static void +static void rge_mii_write_internal(xlr_reg_t *mii_mmio, int phyaddr, int regidx, int regval) { int i = 0; @@ -1071,16 +956,17 @@ rge_mii_write_internal(xlr_reg_t *mii_mm return; } -static void -rge_mii_write(struct device *dev, int phyaddr, int regidx, int regval) +static int +rge_mii_write(device_t dev, int phyaddr, int regidx, int regval) { struct rge_softc *sc = device_get_softc(dev); rge_mii_write_internal(sc->priv.mii_mmio, phyaddr, regidx, regval); + return (0); } static void -rmi_xlr_mac_mii_statchg(device_t dev) +rmi_xlr_mac_mii_statchg(struct device *dev) { } @@ -1906,8 +1792,7 @@ static void xlr_tx_q_wakeup(void *addr) } static int -rge_attach(dev) - device_t dev; +rge_attach(device_t dev) { struct ifnet *ifp; struct rge_softc *sc; @@ -2017,12 +1902,12 @@ rge_attach(dev) /* Initialize the rge_softc */ sc->irq = gmac_conf->baseirq + priv->instance % 4; - sc->rge_irq.r_flags = (u_int) sc->irq; /* We will use r_flags for - * storing irq which - * iodi_setup_intr can check */ + + /* Set the IRQ into the rid field */ + rman_set_rid(&sc->rge_irq, sc->irq); ret = bus_setup_intr(dev, &sc->rge_irq, INTR_FAST | INTR_TYPE_NET | INTR_MPSAFE, - rge_intr, sc, &sc->rge_intrhand); + NULL, rge_intr, sc, &sc->rge_intrhand); if (ret) { rge_detach(dev); @@ -2047,7 +1932,7 @@ rge_attach(dev) */ sc->rge_mii.mii_ifp = ifp; sc->rge_mii.mii_readreg = rge_mii_read; - sc->rge_mii.mii_writereg = rge_mii_write; + sc->rge_mii.mii_writereg = (mii_writereg_t)rge_mii_write; sc->rge_mii.mii_statchg = rmi_xlr_mac_mii_statchg; ifmedia_init(&sc->rge_mii.mii_media, 0, rmi_xlr_mac_mediachange, rmi_xlr_mac_mediastatus); @@ -2235,7 +2120,7 @@ rge_rx(struct rge_softc *sc, vm_paddr_t if (mag != 0xf00bad) { /* somebody else packet Error - FIXME in intialization */ - printf("cpu %d: *ERROR* Not my packet paddr %llx\n", xlr_cpu_id(), paddr); + printf("cpu %d: *ERROR* Not my packet paddr %p\n", xlr_cpu_id(), (void *)paddr); return; } @@ -2469,7 +2354,7 @@ rge_watchdog(struct ifnet *sc) { } -static void +static int rge_shutdown(device_t dev) { struct rge_softc *sc; @@ -2480,7 +2365,7 @@ rge_shutdown(device_t dev) rge_reset(sc); RGE_UNLOCK(sc); - return; + return(0); } static int @@ -2800,7 +2685,7 @@ mac_common_init(void) } } -#if notyet + /* Not yet if (xlr_board_atx_ii()) { if (register_msgring_handler (TX_STN_XGS_0, rmi_xlr_mac_msgring_handler, NULL)) { @@ -2811,5 +2696,5 @@ mac_common_init(void) panic("Couldn't register msgring handler for TX_STN_XGS_1\n"); } } -#endif + */ } Modified: projects/mips/sys/dev/rmi/xlr/rge.h ============================================================================== --- projects/mips/sys/dev/rmi/xlr/rge.h Thu Oct 29 15:55:25 2009 (r198607) +++ projects/mips/sys/dev/rmi/xlr/rge.h Thu Oct 29 15:55:58 2009 (r198608) @@ -940,6 +940,125 @@ #define R_CC_CPU6_0 0x3b0 #define R_CC_CPU7_0 0x3b8 +typedef enum { + xlr_mac_speed_10, xlr_mac_speed_100, + xlr_mac_speed_1000, xlr_mac_speed_rsvd +} xlr_mac_speed_t; + +typedef enum { + xlr_mac_duplex_auto, xlr_mac_duplex_half, + xlr_mac_duplex_full +} xlr_mac_duplex_t; + +typedef enum { + xlr_mac_link_down, + xlr_mac_link_up, +} xlr_mac_link_t; + +typedef enum { + xlr_mac_fc_auto, xlr_mac_fc_disabled, xlr_mac_fc_frame, + xlr_mac_fc_collision, xlr_mac_fc_carrier +} xlr_mac_fc_t; + +/* static int mac_frin_to_be_sent_thr[8]; */ + +enum { + PORT_TX, + PORT_TX_COMPLETE, + PORT_STARTQ, + PORT_STOPQ, + PORT_START_DEV_STATE, + PORT_STOP_DEV_STATE, +}; + +struct rge_softc_stats { + unsigned long rx_frames; + unsigned long tx_frames; + unsigned long rx_packets; + unsigned long rx_bytes; + unsigned long tx_packets; + unsigned long tx_bytes; +}; + +struct driver_data { + + /* + * Let these be the first fields in this structure the structure is + * cacheline aligned when allocated in init_etherdev + */ + struct fr_desc *frin_spill; + struct fr_desc *frout_spill; + union rx_tx_desc *class_0_spill; + union rx_tx_desc *class_1_spill; + union rx_tx_desc *class_2_spill; + union rx_tx_desc *class_3_spill; + int spill_configured; + + struct rge_softc *sc; /* pointer to freebsd device soft-pointer */ + struct rge_softc_stats stats; + struct mtx lock; + + xlr_reg_t *mmio; + xlr_reg_t *mii_mmio; + xlr_reg_t *pcs_mmio; + xlr_reg_t *serdes_mmio; + + int txbucket; + int rfrbucket; + + int phy_oldbmsr; + int phy_oldanlpar; + int phy_oldk1stsr; + int phy_oldlinkstat; + unsigned char phys_addr[2]; + + xlr_mac_speed_t speed; /* current speed */ + xlr_mac_duplex_t duplex;/* current duplex */ + xlr_mac_link_t link; /* current link */ + xlr_mac_fc_t flow_ctrl; /* current flow control setting */ + int advertising; + + int id; + int type; + int mode; + int instance; + int phy_addr; + int frin_to_be_sent[8]; + int init_frin_desc; +}; + +struct rge_softc { + int unit; + int irq; + unsigned char dev_addr[6]; + unsigned long base_addr; + unsigned long mem_end; + struct ifnet *rge_ifp;/* interface info */ + device_t rge_dev; + int mtu; + int flags; + struct driver_data priv; + struct mtx rge_mtx; + device_t rge_miibus; + struct mii_data rge_mii;/* MII/media information */ + bus_space_handle_t rge_bhandle; + bus_space_tag_t rge_btag; + void *rge_intrhand; + struct resource rge_irq; + struct resource *rge_res; + struct ifmedia rge_ifmedia; /* TBI media info */ + int rge_if_flags; + int rge_link; /* link state */ + int rge_link_evt; /* pending link event */ + struct callout rge_stat_ch; + void (*xmit) (struct ifnet *); + void (*stop) (struct rge_softc *); + int (*ioctl) (struct ifnet *, u_long, caddr_t); + struct rge_softc_stats *(*get_stats) (struct rge_softc *); + int active; + int link_up; +}; + struct size_1_desc { uint64_t entry0; }; From owner-svn-src-projects@FreeBSD.ORG Thu Oct 29 21:14:10 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EB41106568B; Thu, 29 Oct 2009 21:14:10 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C5AA8FC0A; Thu, 29 Oct 2009 21:14:10 +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 n9TLEAO6009777; Thu, 29 Oct 2009 21:14:10 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9TLEAw3009768; Thu, 29 Oct 2009 21:14:10 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200910292114.n9TLEAw3009768@svn.freebsd.org> From: Randall Stewart Date: Thu, 29 Oct 2009 21:14: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: r198625 - projects/mips/sys/mips/rmi 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, 29 Oct 2009 21:14:10 -0000 Author: rrs Date: Thu Oct 29 21:14:10 2009 New Revision: 198625 URL: http://svn.freebsd.org/changeset/base/198625 Log: White space changes > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M rmi/xls_ehci.c M rmi/clock.h M rmi/xlr_pci.c M rmi/perfmon.h M rmi/uart_bus_xlr_iodi.c M rmi/perfmon_percpu.c M rmi/iodi.c M rmi/pcibus.c M rmi/perfmon_kern.c M rmi/perfmon_xlrconfig.h M rmi/pcibus.h M rmi/tick.c M rmi/xlr_boot1_console.c M rmi/debug.h M rmi/uart_cpu_mips_xlr.c M rmi/xlrconfig.h M rmi/interrupt.h M rmi/xlr_i2c.c M rmi/shared_structs.h M rmi/msgring.c M rmi/iomap.h M rmi/ehcireg.h M rmi/msgring.h M rmi/shared_structs_func.h M rmi/on_chip.c M rmi/pic.h M rmi/xlr_machdep.c M rmi/ehcivar.h M rmi/board.c M rmi/clock.c M rmi/shared_structs_offsets.h M rmi/perfmon_utils.h M rmi/board.h M rmi/msgring_xls.c M rmi/intr_machdep.c Modified: projects/mips/sys/mips/rmi/board.c projects/mips/sys/mips/rmi/board.h projects/mips/sys/mips/rmi/clock.c projects/mips/sys/mips/rmi/clock.h projects/mips/sys/mips/rmi/debug.h projects/mips/sys/mips/rmi/ehcireg.h projects/mips/sys/mips/rmi/ehcivar.h projects/mips/sys/mips/rmi/interrupt.h projects/mips/sys/mips/rmi/intr_machdep.c projects/mips/sys/mips/rmi/iodi.c projects/mips/sys/mips/rmi/iomap.h projects/mips/sys/mips/rmi/msgring.c projects/mips/sys/mips/rmi/msgring.h projects/mips/sys/mips/rmi/msgring_xls.c projects/mips/sys/mips/rmi/on_chip.c projects/mips/sys/mips/rmi/pcibus.c projects/mips/sys/mips/rmi/pcibus.h projects/mips/sys/mips/rmi/perfmon.h projects/mips/sys/mips/rmi/perfmon_kern.c projects/mips/sys/mips/rmi/perfmon_percpu.c projects/mips/sys/mips/rmi/perfmon_utils.h projects/mips/sys/mips/rmi/perfmon_xlrconfig.h projects/mips/sys/mips/rmi/pic.h projects/mips/sys/mips/rmi/shared_structs.h projects/mips/sys/mips/rmi/shared_structs_func.h projects/mips/sys/mips/rmi/shared_structs_offsets.h projects/mips/sys/mips/rmi/tick.c projects/mips/sys/mips/rmi/uart_bus_xlr_iodi.c projects/mips/sys/mips/rmi/uart_cpu_mips_xlr.c projects/mips/sys/mips/rmi/xlr_boot1_console.c projects/mips/sys/mips/rmi/xlr_i2c.c projects/mips/sys/mips/rmi/xlr_machdep.c projects/mips/sys/mips/rmi/xlr_pci.c projects/mips/sys/mips/rmi/xlrconfig.h projects/mips/sys/mips/rmi/xls_ehci.c Modified: projects/mips/sys/mips/rmi/board.c ============================================================================== --- projects/mips/sys/mips/rmi/board.c Thu Oct 29 21:13:57 2009 (r198624) +++ projects/mips/sys/mips/rmi/board.c Thu Oct 29 21:14:10 2009 (r198625) @@ -41,68 +41,69 @@ #include static int xlr_rxstn_to_txstn_map[128] = { - [0 ... 7] = TX_STN_CPU_0, - [8 ... 15] = TX_STN_CPU_1, - [16 ... 23] = TX_STN_CPU_2, - [24 ... 31] = TX_STN_CPU_3, - [32 ... 39] = TX_STN_CPU_4, - [40 ... 47] = TX_STN_CPU_5, - [48 ... 55] = TX_STN_CPU_6, - [56 ... 63] = TX_STN_CPU_7, - [64 ... 95] = TX_STN_INVALID, - [96 ... 103] = TX_STN_GMAC, - [104 ... 107] = TX_STN_DMA, - [108 ... 111] = TX_STN_INVALID, - [112 ... 113] = TX_STN_XGS_0, - [114 ... 115] = TX_STN_XGS_1, - [116 ... 119] = TX_STN_INVALID, - [120 ... 127] = TX_STN_SAE + [0...7] = TX_STN_CPU_0, + [8...15] = TX_STN_CPU_1, + [16...23] = TX_STN_CPU_2, + [24...31] = TX_STN_CPU_3, + [32...39] = TX_STN_CPU_4, + [40...47] = TX_STN_CPU_5, + [48...55] = TX_STN_CPU_6, + [56...63] = TX_STN_CPU_7, + [64...95] = TX_STN_INVALID, + [96...103] = TX_STN_GMAC, + [104...107] = TX_STN_DMA, + [108...111] = TX_STN_INVALID, + [112...113] = TX_STN_XGS_0, + [114...115] = TX_STN_XGS_1, + [116...119] = TX_STN_INVALID, + [120...127] = TX_STN_SAE }; static int xls_rxstn_to_txstn_map[128] = { - [0 ... 7] = TX_STN_CPU_0, - [8 ... 15] = TX_STN_CPU_1, - [16 ... 23] = TX_STN_CPU_2, - [24 ... 31] = TX_STN_CPU_3, - [32 ... 63] = TX_STN_INVALID, - [64 ... 71] = TX_STN_PCIE, - [72 ... 79] = TX_STN_INVALID, - [80 ... 87] = TX_STN_GMAC1, - [88 ... 95] = TX_STN_INVALID, - [96 ... 103] = TX_STN_GMAC0, - [104 ... 107] = TX_STN_DMA, - [108 ... 111] = TX_STN_CDE, - [112 ... 119] = TX_STN_INVALID, - [120 ... 127] = TX_STN_SAE + [0...7] = TX_STN_CPU_0, + [8...15] = TX_STN_CPU_1, + [16...23] = TX_STN_CPU_2, + [24...31] = TX_STN_CPU_3, + [32...63] = TX_STN_INVALID, + [64...71] = TX_STN_PCIE, + [72...79] = TX_STN_INVALID, + [80...87] = TX_STN_GMAC1, + [88...95] = TX_STN_INVALID, + [96...103] = TX_STN_GMAC0, + [104...107] = TX_STN_DMA, + [108...111] = TX_STN_CDE, + [112...119] = TX_STN_INVALID, + [120...127] = TX_STN_SAE }; struct stn_cc *xlr_core_cc_configs[] = {&cc_table_cpu_0, &cc_table_cpu_1, - &cc_table_cpu_2, &cc_table_cpu_3, - &cc_table_cpu_4, &cc_table_cpu_5, - &cc_table_cpu_6, &cc_table_cpu_7 }; + &cc_table_cpu_2, &cc_table_cpu_3, + &cc_table_cpu_4, &cc_table_cpu_5, +&cc_table_cpu_6, &cc_table_cpu_7}; -struct stn_cc *xls_core_cc_configs[] = {&xls_cc_table_cpu_0, &xls_cc_table_cpu_1, - &xls_cc_table_cpu_2, &xls_cc_table_cpu_3}; +struct stn_cc *xls_core_cc_configs[] = {&xls_cc_table_cpu_0, &xls_cc_table_cpu_1, +&xls_cc_table_cpu_2, &xls_cc_table_cpu_3}; struct xlr_board_info xlr_board_info; /* - * All our knowledge of chip and board that cannot be detected by probing + * All our knowledge of chip and board that cannot be detected by probing * at run-time goes here */ -int xlr_board_info_setup() +int +xlr_board_info_setup() { if (xlr_is_xls()) { xlr_board_info.is_xls = 1; xlr_board_info.nr_cpus = 8; xlr_board_info.usb = 1; xlr_board_info.cfi = - (xlr_boot1_info.board_major_version != RMI_XLR_BOARD_ARIZONA_VIII); + (xlr_boot1_info.board_major_version != RMI_XLR_BOARD_ARIZONA_VIII); xlr_board_info.pci_irq = 0; xlr_board_info.credit_configs = xls_core_cc_configs; - xlr_board_info.bucket_sizes = &xls_bucket_sizes; - xlr_board_info.msgmap = xls_rxstn_to_txstn_map; - xlr_board_info.gmacports = 8; + xlr_board_info.bucket_sizes = &xls_bucket_sizes; + xlr_board_info.msgmap = xls_rxstn_to_txstn_map; + xlr_board_info.gmacports = 8; /* network block 0 */ xlr_board_info.gmac_block[0].type = XLR_GMAC; @@ -110,13 +111,13 @@ int xlr_board_info_setup() xlr_board_info.gmac_block[0].credit_config = &xls_cc_table_gmac0; xlr_board_info.gmac_block[0].station_txbase = MSGRNG_STNID_GMACTX0; xlr_board_info.gmac_block[0].station_rfr = MSGRNG_STNID_GMACRFR_0; - if (xlr_boot1_info.board_major_version == RMI_XLR_BOARD_ARIZONA_VI) + if (xlr_boot1_info.board_major_version == RMI_XLR_BOARD_ARIZONA_VI) xlr_board_info.gmac_block[0].mode = XLR_PORT0_RGMII; else xlr_board_info.gmac_block[0].mode = XLR_SGMII; - xlr_board_info.gmac_block[0].baseaddr = XLR_IO_GMAC_0_OFFSET; - xlr_board_info.gmac_block[0].baseirq = PIC_GMAC_0_IRQ; - xlr_board_info.gmac_block[0].baseinst = 0; + xlr_board_info.gmac_block[0].baseaddr = XLR_IO_GMAC_0_OFFSET; + xlr_board_info.gmac_block[0].baseirq = PIC_GMAC_0_IRQ; + xlr_board_info.gmac_block[0].baseinst = 0; /* network block 1 */ xlr_board_info.gmac_block[1].type = XLR_GMAC; @@ -124,13 +125,13 @@ int xlr_board_info_setup() xlr_board_info.gmac_block[1].credit_config = &xls_cc_table_gmac1; xlr_board_info.gmac_block[1].station_txbase = MSGRNG_STNID_GMAC1_TX0; xlr_board_info.gmac_block[1].station_rfr = MSGRNG_STNID_GMAC1_FR_0; - xlr_board_info.gmac_block[1].mode = XLR_SGMII; - xlr_board_info.gmac_block[1].baseaddr = XLR_IO_GMAC_4_OFFSET; - xlr_board_info.gmac_block[1].baseirq = PIC_XGS_0_IRQ; - xlr_board_info.gmac_block[1].baseinst = 4; + xlr_board_info.gmac_block[1].mode = XLR_SGMII; + xlr_board_info.gmac_block[1].baseaddr = XLR_IO_GMAC_4_OFFSET; + xlr_board_info.gmac_block[1].baseirq = PIC_XGS_0_IRQ; + xlr_board_info.gmac_block[1].baseinst = 4; /* network block 2 */ - xlr_board_info.gmac_block[2].enabled = 0; /* disabled on XLS */ + xlr_board_info.gmac_block[2].enabled = 0; /* disabled on XLS */ } else { xlr_board_info.is_xls = 0; xlr_board_info.nr_cpus = 32; @@ -138,9 +139,9 @@ int xlr_board_info_setup() xlr_board_info.cfi = 1; xlr_board_info.pci_irq = 0; xlr_board_info.credit_configs = xlr_core_cc_configs; - xlr_board_info.bucket_sizes = &bucket_sizes; - xlr_board_info.msgmap = xlr_rxstn_to_txstn_map; - xlr_board_info.gmacports = 4; + xlr_board_info.bucket_sizes = &bucket_sizes; + xlr_board_info.msgmap = xlr_rxstn_to_txstn_map; + xlr_board_info.gmacports = 4; /* GMAC0 */ xlr_board_info.gmac_block[0].type = XLR_GMAC; @@ -149,9 +150,9 @@ int xlr_board_info_setup() xlr_board_info.gmac_block[0].station_txbase = MSGRNG_STNID_GMACTX0; xlr_board_info.gmac_block[0].station_rfr = MSGRNG_STNID_GMACRFR_0; xlr_board_info.gmac_block[0].mode = XLR_RGMII; - xlr_board_info.gmac_block[0].baseaddr = XLR_IO_GMAC_0_OFFSET; - xlr_board_info.gmac_block[0].baseirq = PIC_GMAC_0_IRQ; - xlr_board_info.gmac_block[0].baseinst = 0; + xlr_board_info.gmac_block[0].baseaddr = XLR_IO_GMAC_0_OFFSET; + xlr_board_info.gmac_block[0].baseirq = PIC_GMAC_0_IRQ; + xlr_board_info.gmac_block[0].baseinst = 0; /* XGMAC0 */ xlr_board_info.gmac_block[1].type = XLR_XGMAC; @@ -160,9 +161,9 @@ int xlr_board_info_setup() xlr_board_info.gmac_block[1].station_txbase = MSGRNG_STNID_XGS0_TX; xlr_board_info.gmac_block[1].station_rfr = MSGRNG_STNID_XGS0FR; xlr_board_info.gmac_block[1].mode = -1; - xlr_board_info.gmac_block[1].baseaddr = XLR_IO_XGMAC_0_OFFSET; - xlr_board_info.gmac_block[1].baseirq = PIC_XGS_0_IRQ; - xlr_board_info.gmac_block[1].baseinst = 4; + xlr_board_info.gmac_block[1].baseaddr = XLR_IO_XGMAC_0_OFFSET; + xlr_board_info.gmac_block[1].baseirq = PIC_XGS_0_IRQ; + xlr_board_info.gmac_block[1].baseinst = 4; /* XGMAC1 */ xlr_board_info.gmac_block[2].type = XLR_XGMAC; @@ -171,9 +172,9 @@ int xlr_board_info_setup() xlr_board_info.gmac_block[2].station_txbase = MSGRNG_STNID_XGS1_TX; xlr_board_info.gmac_block[2].station_rfr = MSGRNG_STNID_XGS1FR; xlr_board_info.gmac_block[2].mode = -1; - xlr_board_info.gmac_block[2].baseaddr = XLR_IO_XGMAC_1_OFFSET; - xlr_board_info.gmac_block[2].baseirq = PIC_XGS_1_IRQ; - xlr_board_info.gmac_block[2].baseinst = 5; + xlr_board_info.gmac_block[2].baseaddr = XLR_IO_XGMAC_1_OFFSET; + xlr_board_info.gmac_block[2].baseirq = PIC_XGS_1_IRQ; + xlr_board_info.gmac_block[2].baseinst = 5; } return 0; } Modified: projects/mips/sys/mips/rmi/board.h ============================================================================== --- projects/mips/sys/mips/rmi/board.h Thu Oct 29 21:13:57 2009 (r198624) +++ projects/mips/sys/mips/rmi/board.h Thu Oct 29 21:14:10 2009 (r198625) @@ -150,7 +150,7 @@ xlr_revision_b0(void) static __inline__ int xlr_revision_b1(void) { - return xlr_revision() == 0x0c0003; + return xlr_revision() == 0x0c0003; } static __inline__ int @@ -182,7 +182,8 @@ static __inline__ int xlr_board_atx_iv(void) { return (xlr_boot1_info.board_major_version == RMI_XLR_BOARD_ARIZONA_IV) - && (xlr_boot1_info.board_minor_version == 0); } + && (xlr_boot1_info.board_minor_version == 0); +} static __inline__ int xlr_board_atx_iv_b(void) { @@ -225,48 +226,54 @@ static __inline__ int xlr_board_pci(void) { return (xlr_board_atx_iii_256() || xlr_board_atx_iii_512() - || xlr_board_atx_v_512()); + || xlr_board_atx_v_512()); } static __inline__ int xlr_is_xls2xx(void) { - uint32_t chipid = mips_rd_prid() & 0xffffff00U; + uint32_t chipid = mips_rd_prid() & 0xffffff00U; - return chipid == 0x0c8e00 || chipid == 0x0c8f00; + return chipid == 0x0c8e00 || chipid == 0x0c8f00; } static __inline__ int xlr_is_xls4xx(void) { - uint32_t chipid = mips_rd_prid() & 0xffffff00U; + uint32_t chipid = mips_rd_prid() & 0xffffff00U; - return chipid == 0x0c8800 || chipid == 0x0c8c00; + return chipid == 0x0c8800 || chipid == 0x0c8c00; } /* all our knowledge of chip and board that cannot be detected run-time goes here */ -enum gmac_block_types { XLR_GMAC, XLR_XGMAC, XLR_SPI4}; -enum gmac_block_modes { XLR_RGMII, XLR_SGMII, XLR_PORT0_RGMII }; +enum gmac_block_types { + XLR_GMAC, XLR_XGMAC, XLR_SPI4 +}; +enum gmac_block_modes { + XLR_RGMII, XLR_SGMII, XLR_PORT0_RGMII +}; struct xlr_board_info { int is_xls; int nr_cpus; - int usb; /* usb enabled ? */ - int cfi; /* compact flash driver for NOR? */ + int usb; /* usb enabled ? */ + int cfi; /* compact flash driver for NOR? */ int pci_irq; - struct stn_cc **credit_configs; /* pointer to Core station credits */ - struct bucket_size *bucket_sizes; /* pointer to Core station bucket */ - int *msgmap; /* mapping of message station to devices */ - int gmacports; /* number of gmac ports on the board */ + struct stn_cc **credit_configs; /* pointer to Core station credits */ + struct bucket_size *bucket_sizes; /* pointer to Core station + * bucket */ + int *msgmap; /* mapping of message station to devices */ + int gmacports; /* number of gmac ports on the board */ struct xlr_gmac_block_t { - int type; /* see enum gmac_block_types */ - unsigned int enabled; /* mask of ports enabled */ - struct stn_cc *credit_config; /* credit configuration */ - int station_txbase; /* station id for tx */ - int station_rfr; /* free desc bucket */ - int mode; /* see gmac_block_modes */ - uint32_t baseaddr; /* IO base */ - int baseirq; /* first irq for this block, the rest are in sequence */ - int baseinst; /* the first rge unit for this block */ - } gmac_block [3]; + int type; /* see enum gmac_block_types */ + unsigned int enabled; /* mask of ports enabled */ + struct stn_cc *credit_config; /* credit configuration */ + int station_txbase; /* station id for tx */ + int station_rfr;/* free desc bucket */ + int mode; /* see gmac_block_modes */ + uint32_t baseaddr; /* IO base */ + int baseirq; /* first irq for this block, the rest are in + * sequence */ + int baseinst; /* the first rge unit for this block */ + } gmac_block[3]; }; extern struct xlr_board_info xlr_board_info; Modified: projects/mips/sys/mips/rmi/clock.c ============================================================================== --- projects/mips/sys/mips/rmi/clock.c Thu Oct 29 21:13:57 2009 (r198624) +++ projects/mips/sys/mips/rmi/clock.c Thu Oct 29 21:14:10 2009 (r198625) @@ -28,7 +28,7 @@ * * RMI_BSD */ -#include /* RCS ID & Copyright macro defns */ +#include /* RCS ID & Copyright macro defns */ #include #include @@ -77,12 +77,13 @@ u_int32_t counter_lower_last = 0; static int scale_factor; static int count_scale_factor[32]; -uint64_t platform_get_frequency() +uint64_t +platform_get_frequency() { return XLR_PIC_HZ; } -void +void mips_timer_early_init(uint64_t clock_hz) { /* Initialize clock early so that we can use DELAY sooner */ @@ -94,7 +95,7 @@ mips_timer_early_init(uint64_t clock_hz) /* * count_compare_clockhandler: * -* Handle the clock interrupt when count becomes equal to +* Handle the clock interrupt when count becomes equal to * compare. */ void @@ -107,23 +108,21 @@ count_compare_clockhandler(struct trapfr if (cpu == 0) { mips_wr_compare(0); - } - else { + } else { count_scale_factor[cpu]++; cycles = mips_rd_count(); - cycles += XLR_CPU_HZ/hz; + cycles += XLR_CPU_HZ / hz; mips_wr_compare(cycles); hardclock_cpu(USERMODE(tf->sr)); if (count_scale_factor[cpu] == STAT_PROF_CLOCK_SCALE_FACTOR) { statclock(USERMODE(tf->sr)); - if(profprocs != 0) { + if (profprocs != 0) { profclock(USERMODE(tf->sr), tf->pc); } count_scale_factor[cpu] = 0; } - - /* If needed , handle count compare tick skew here */ + /* If needed , handle count compare tick skew here */ } critical_exit(); @@ -141,18 +140,17 @@ pic_hardclockhandler(struct trapframe *t hardclock(USERMODE(tf->sr), tf->pc); if (scale_factor == STAT_PROF_CLOCK_SCALE_FACTOR) { statclock(USERMODE(tf->sr)); - if(profprocs != 0) { + if (profprocs != 0) { profclock(USERMODE(tf->sr), tf->pc); } scale_factor = 0; } #ifdef XLR_PERFMON if (xlr_perfmon_started) - xlr_perfmon_clockhandler(); + xlr_perfmon_clockhandler(); #endif - } - else { + } else { /* If needed , handle count compare tick skew here */ } critical_exit(); @@ -161,75 +159,77 @@ pic_hardclockhandler(struct trapframe *t int pic_timecounthandler(struct trapframe *tf) { - return (FILTER_HANDLED); + return (FILTER_HANDLED); } void platform_initclocks(void) { - int cpu = PCPU_GET(cpuid); - void *cookie; + int cpu = PCPU_GET(cpuid); + void *cookie; - /* Note: Passing #3 as NULL ensures that clockhandler - * gets called with trapframe - */ - /* profiling/process accounting timer interrupt for non-zero cpus */ - cpu_establish_hardintr("compare", - NULL, - (driver_intr_t *)count_compare_clockhandler, - NULL, - IRQ_TIMER, - INTR_TYPE_CLK|INTR_FAST, &cookie); - - /* timekeeping timer interrupt for cpu 0 */ - cpu_establish_hardintr("hardclk", - NULL, - (driver_intr_t *)pic_hardclockhandler, - NULL, - PIC_TIMER_7_IRQ, - INTR_TYPE_CLK|INTR_FAST, - &cookie); - - /* this is used by timecounter */ - cpu_establish_hardintr("timecount", - (driver_filter_t *)pic_timecounthandler, NULL, - NULL, PIC_TIMER_6_IRQ, INTR_TYPE_CLK|INTR_FAST, - &cookie); - - if (cpu == 0) { - __uint64_t maxval = XLR_PIC_HZ/hz; - xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); + /* + * Note: Passing #3 as NULL ensures that clockhandler gets called + * with trapframe + */ + /* profiling/process accounting timer interrupt for non-zero cpus */ + cpu_establish_hardintr("compare", + NULL, + (driver_intr_t *) count_compare_clockhandler, + NULL, + IRQ_TIMER, + INTR_TYPE_CLK | INTR_FAST, &cookie); + + /* timekeeping timer interrupt for cpu 0 */ + cpu_establish_hardintr("hardclk", + NULL, + (driver_intr_t *) pic_hardclockhandler, + NULL, + PIC_TIMER_7_IRQ, + INTR_TYPE_CLK | INTR_FAST, + &cookie); + + /* this is used by timecounter */ + cpu_establish_hardintr("timecount", + (driver_filter_t *) pic_timecounthandler, NULL, + NULL, PIC_TIMER_6_IRQ, INTR_TYPE_CLK | INTR_FAST, + &cookie); + + if (cpu == 0) { + __uint64_t maxval = XLR_PIC_HZ / hz; + xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); - stathz = hz / STAT_PROF_CLOCK_SCALE_FACTOR; - profhz = stathz; + stathz = hz / STAT_PROF_CLOCK_SCALE_FACTOR; + profhz = stathz; - /* Setup PIC Interrupt */ + /* Setup PIC Interrupt */ - mtx_lock_spin(&xlr_pic_lock); - xlr_write_reg(mmio, PIC_TIMER_7_MAXVAL_0, (maxval & 0xffffffff)); /* 0x100 + 7*/ - xlr_write_reg(mmio, PIC_TIMER_7_MAXVAL_1, (maxval >> 32) & 0xffffffff);/* 0x110 + 7 */ - /* 0x40 + 8 */ - /* reg 40 is lower bits 31-0 and holds CPU mask */ - xlr_write_reg(mmio, PIC_IRT_0_TIMER_7, (1 << cpu)); - /* 0x80 + 8 */ - /* Reg 80 is upper bits 63-32 and holds */ - /* Valid Edge Local IRQ */ - xlr_write_reg(mmio, PIC_IRT_1_TIMER_7, (1<<31)|(0<<30)|(1<<6)|(PIC_TIMER_7_IRQ)); - pic_update_control(1<<(8+7)); - - xlr_write_reg(mmio, PIC_TIMER_6_MAXVAL_0, (0xffffffff & 0xffffffff)); - xlr_write_reg(mmio, PIC_TIMER_6_MAXVAL_1, (0xffffffff & 0xffffffff)); - xlr_write_reg(mmio, PIC_IRT_0_TIMER_6, (1 << cpu)); - xlr_write_reg(mmio, PIC_IRT_1_TIMER_6, (1<<31)|(0<<30)|(1<<6)|(PIC_TIMER_6_IRQ)); - pic_update_control(1<<(8+6)); - mtx_unlock_spin(&xlr_pic_lock); - } else { - /* Setup count-compare interrupt for vcpu[1-31] */ - mips_wr_compare((xlr_boot1_info.cpu_frequency)/hz); - } + mtx_lock_spin(&xlr_pic_lock); + xlr_write_reg(mmio, PIC_TIMER_7_MAXVAL_0, (maxval & 0xffffffff)); /* 0x100 + 7 */ + xlr_write_reg(mmio, PIC_TIMER_7_MAXVAL_1, (maxval >> 32) & 0xffffffff); /* 0x110 + 7 */ + /* 0x40 + 8 */ + /* reg 40 is lower bits 31-0 and holds CPU mask */ + xlr_write_reg(mmio, PIC_IRT_0_TIMER_7, (1 << cpu)); + /* 0x80 + 8 */ + /* Reg 80 is upper bits 63-32 and holds */ + /* Valid Edge Local IRQ */ + xlr_write_reg(mmio, PIC_IRT_1_TIMER_7, (1 << 31) | (0 << 30) | (1 << 6) | (PIC_TIMER_7_IRQ)); + pic_update_control(1 << (8 + 7)); + + xlr_write_reg(mmio, PIC_TIMER_6_MAXVAL_0, (0xffffffff & 0xffffffff)); + xlr_write_reg(mmio, PIC_TIMER_6_MAXVAL_1, (0xffffffff & 0xffffffff)); + xlr_write_reg(mmio, PIC_IRT_0_TIMER_6, (1 << cpu)); + xlr_write_reg(mmio, PIC_IRT_1_TIMER_6, (1 << 31) | (0 << 30) | (1 << 6) | (PIC_TIMER_6_IRQ)); + pic_update_control(1 << (8 + 6)); + mtx_unlock_spin(&xlr_pic_lock); + } else { + /* Setup count-compare interrupt for vcpu[1-31] */ + mips_wr_compare((xlr_boot1_info.cpu_frequency) / hz); + } } -unsigned __attribute__((no_instrument_function)) +unsigned +__attribute__((no_instrument_function)) platform_get_timecount(struct timecounter *tc __unused) { xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); @@ -268,18 +268,21 @@ DELAY(int n) } static -uint64_t read_pic_counter(void) +uint64_t +read_pic_counter(void) { xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_PIC_OFFSET); uint32_t lower, upper; uint64_t tc; - /* Pull the value of the 64 bit counter which is stored in - * PIC register 120+N and 130+N + + /* + * Pull the value of the 64 bit counter which is stored in PIC + * register 120+N and 130+N */ - upper = 0xffffffffU - xlr_read_reg(mmio, PIC_TIMER_6_COUNTER_1); + upper = 0xffffffffU - xlr_read_reg(mmio, PIC_TIMER_6_COUNTER_1); lower = 0xffffffffU - xlr_read_reg(mmio, PIC_TIMER_6_COUNTER_0); - tc = (((uint64_t)upper << 32) | (uint64_t)lower); - return(tc); + tc = (((uint64_t) upper << 32) | (uint64_t) lower); + return (tc); } extern struct timecounter counter_timecounter; @@ -303,16 +306,16 @@ mips_timer_init_params(uint64_t platform cycles_per_tick = counter_freq / 1000; cycles_per_hz = counter_freq / hz; cycles_per_usec = counter_freq / (1 * 1000 * 1000); - cycles_per_sec = counter_freq ; - + cycles_per_sec = counter_freq; + counter_timecounter.tc_frequency = counter_freq; printf("hz=%d cyl_per_hz:%jd cyl_per_usec:%jd freq:%jd cyl_per_hz:%jd cyl_per_sec:%jd\n", - hz, - cycles_per_tick, - cycles_per_usec, - counter_freq, - cycles_per_hz, - cycles_per_sec - ); + hz, + cycles_per_tick, + cycles_per_usec, + counter_freq, + cycles_per_hz, + cycles_per_sec + ); set_cputicker(read_pic_counter, counter_freq, 1); } Modified: projects/mips/sys/mips/rmi/clock.h ============================================================================== --- projects/mips/sys/mips/rmi/clock.h Thu Oct 29 21:13:57 2009 (r198624) +++ projects/mips/sys/mips/rmi/clock.h Thu Oct 29 21:14:10 2009 (r198625) @@ -37,4 +37,4 @@ void count_compare_clockhandler(struct t void pic_hardclockhandler(struct trapframe *); int pic_timecounthandler(struct trapframe *); -#endif /* _RMI_CLOCK_H_ */ +#endif /* _RMI_CLOCK_H_ */ Modified: projects/mips/sys/mips/rmi/debug.h ============================================================================== --- projects/mips/sys/mips/rmi/debug.h Thu Oct 29 21:13:57 2009 (r198624) +++ projects/mips/sys/mips/rmi/debug.h Thu Oct 29 21:14:10 2009 (r198625) @@ -33,51 +33,51 @@ #include enum { - //cacheline 0 - MSGRNG_INT, - MSGRNG_PIC_INT, - MSGRNG_MSG, - MSGRNG_EXIT_STATUS, - MSGRNG_MSG_CYCLES, - //cacheline 1 - NETIF_TX = 8, - NETIF_RX, - NETIF_TX_COMPLETE, - NETIF_TX_COMPLETE_TX, - NETIF_RX_CYCLES, - NETIF_TX_COMPLETE_CYCLES, - NETIF_TX_CYCLES, - NETIF_TIMER_START_Q, - //NETIF_REG_FRIN, - //NETIF_INT_REG, - //cacheline 2 - REPLENISH_ENTER = 16, - REPLENISH_ENTER_COUNT, - REPLENISH_CPU, - REPLENISH_FRIN, - REPLENISH_CYCLES, - NETIF_STACK_TX, - NETIF_START_Q, - NETIF_STOP_Q, - //cacheline 3 - USER_MAC_START = 24, - USER_MAC_INT = 24, - USER_MAC_TX_COMPLETE, - USER_MAC_RX, - USER_MAC_POLL, - USER_MAC_TX, - USER_MAC_TX_FAIL, - USER_MAC_TX_COUNT, - USER_MAC_FRIN, - //cacheline 4 - USER_MAC_TX_FAIL_GMAC_CREDITS = 32, - USER_MAC_DO_PAGE_FAULT, - USER_MAC_UPDATE_TLB, - USER_MAC_UPDATE_BIGTLB, - USER_MAC_UPDATE_TLB_PFN0, - USER_MAC_UPDATE_TLB_PFN1, - - XLR_MAX_COUNTERS = 40 + //cacheline 0 + MSGRNG_INT, + MSGRNG_PIC_INT, + MSGRNG_MSG, + MSGRNG_EXIT_STATUS, + MSGRNG_MSG_CYCLES, + //cacheline 1 + NETIF_TX = 8, + NETIF_RX, + NETIF_TX_COMPLETE, + NETIF_TX_COMPLETE_TX, + NETIF_RX_CYCLES, + NETIF_TX_COMPLETE_CYCLES, + NETIF_TX_CYCLES, + NETIF_TIMER_START_Q, + //NETIF_REG_FRIN, + //NETIF_INT_REG, + //cacheline 2 + REPLENISH_ENTER = 16, + REPLENISH_ENTER_COUNT, + REPLENISH_CPU, + REPLENISH_FRIN, + REPLENISH_CYCLES, + NETIF_STACK_TX, + NETIF_START_Q, + NETIF_STOP_Q, + //cacheline 3 + USER_MAC_START = 24, + USER_MAC_INT = 24, + USER_MAC_TX_COMPLETE, + USER_MAC_RX, + USER_MAC_POLL, + USER_MAC_TX, + USER_MAC_TX_FAIL, + USER_MAC_TX_COUNT, + USER_MAC_FRIN, + //cacheline 4 + USER_MAC_TX_FAIL_GMAC_CREDITS = 32, + USER_MAC_DO_PAGE_FAULT, + USER_MAC_UPDATE_TLB, + USER_MAC_UPDATE_BIGTLB, + USER_MAC_UPDATE_TLB_PFN0, + USER_MAC_UPDATE_TLB_PFN1, + + XLR_MAX_COUNTERS = 40 }; extern int xlr_counters[MAXCPU][XLR_MAX_COUNTERS]; extern __uint32_t msgrng_msg_cycles; @@ -88,7 +88,7 @@ extern __uint32_t msgrng_msg_cycles; #define xlr_set_counter(x, value) atomic_set_int(&xlr_counters[PCPU_GET(cpuid)][(x)], (value)) #define xlr_get_counter(x) (&xlr_counters[0][(x)]) -#else /* default mode */ +#else /* default mode */ #define xlr_inc_counter(x) #define xlr_dec_counter(x) Modified: projects/mips/sys/mips/rmi/ehcireg.h ============================================================================== --- projects/mips/sys/mips/rmi/ehcireg.h Thu Oct 29 21:13:57 2009 (r198624) +++ projects/mips/sys/mips/rmi/ehcireg.h Thu Oct 29 21:14:10 2009 (r198625) @@ -60,7 +60,7 @@ #define PCI_USBREV_1_1 0x11 #define PCI_USBREV_2_0 0x20 -#define PCI_EHCI_FLADJ 0x61 /*RW Frame len adj, SOF=59488+6*fladj */ +#define PCI_EHCI_FLADJ 0x61 /* RW Frame len adj, SOF=59488+6*fladj */ #define PCI_EHCI_PORTWAKECAP 0x62 /* RW Port wake caps (opt) */ @@ -77,30 +77,30 @@ /*** EHCI capability registers ***/ -#define EHCI_CAPLENGTH 0x00 /*RO Capability register length field */ +#define EHCI_CAPLENGTH 0x00 /* RO Capability register length field */ /* reserved 0x01 */ #define EHCI_HCIVERSION 0x02 /* RO Interface version number */ #define EHCI_HCSPARAMS 0x04 /* RO Structural parameters */ #define EHCI_HCS_DEBUGPORT(x) (((x) >> 20) & 0xf) #define EHCI_HCS_P_INDICATOR(x) ((x) & 0x10000) -#define EHCI_HCS_N_CC(x) (((x) >> 12) & 0xf) /* # of companion ctlrs */ -#define EHCI_HCS_N_PCC(x) (((x) >> 8) & 0xf) /* # of ports per comp. */ -#define EHCI_HCS_PPC(x) ((x) & 0x10) /* port power control */ -#define EHCI_HCS_N_PORTS(x) ((x) & 0xf) /* # of ports */ +#define EHCI_HCS_N_CC(x) (((x) >> 12) & 0xf) /* # of companion ctlrs */ +#define EHCI_HCS_N_PCC(x) (((x) >> 8) & 0xf) /* # of ports per comp. */ +#define EHCI_HCS_PPC(x) ((x) & 0x10) /* port power control */ +#define EHCI_HCS_N_PORTS(x) ((x) & 0xf) /* # of ports */ #define EHCI_HCCPARAMS 0x08 /* RO Capability parameters */ -#define EHCI_HCC_EECP(x) (((x) >> 8) & 0xff) /* extended ports caps */ -#define EHCI_HCC_IST(x) (((x) >> 4) & 0xf) /* isoc sched threshold */ -#define EHCI_HCC_ASPC(x) ((x) & 0x4) /* async sched park cap */ -#define EHCI_HCC_PFLF(x) ((x) & 0x2) /* prog frame list flag */ -#define EHCI_HCC_64BIT(x) ((x) & 0x1) /* 64 bit address cap */ +#define EHCI_HCC_EECP(x) (((x) >> 8) & 0xff) /* extended ports caps */ +#define EHCI_HCC_IST(x) (((x) >> 4) & 0xf) /* isoc sched threshold */ +#define EHCI_HCC_ASPC(x) ((x) & 0x4) /* async sched park cap */ +#define EHCI_HCC_PFLF(x) ((x) & 0x2) /* prog frame list flag */ +#define EHCI_HCC_64BIT(x) ((x) & 0x1) /* 64 bit address cap */ -#define EHCI_HCSP_PORTROUTE 0x0c /*RO Companion port route description */ +#define EHCI_HCSP_PORTROUTE 0x0c /* RO Companion port route description */ /* EHCI operational registers. Offset given by EHCI_CAPLENGTH register */ #define EHCI_USBCMD 0x00 /* RO, RW, WO Command register */ -#define EHCI_CMD_ITC_M 0x00ff0000 /* RW interrupt threshold ctrl */ +#define EHCI_CMD_ITC_M 0x00ff0000 /* RW interrupt threshold ctrl */ #define EHCI_CMD_ITC_1 0x00010000 #define EHCI_CMD_ITC_2 0x00020000 #define EHCI_CMD_ITC_4 0x00040000 @@ -108,39 +108,41 @@ #define EHCI_CMD_ITC_16 0x00100000 #define EHCI_CMD_ITC_32 0x00200000 #define EHCI_CMD_ITC_64 0x00400000 -#define EHCI_CMD_ASPME 0x00000800 /* RW/RO async park enable */ -#define EHCI_CMD_ASPMC 0x00000300 /* RW/RO async park count */ -#define EHCI_CMD_LHCR 0x00000080 /* RW light host ctrl reset */ -#define EHCI_CMD_IAAD 0x00000040 /* RW intr on async adv door bell */ -#define EHCI_CMD_ASE 0x00000020 /* RW async sched enable */ -#define EHCI_CMD_PSE 0x00000010 /* RW periodic sched enable */ -#define EHCI_CMD_FLS_M 0x0000000c /* RW/RO frame list size */ -#define EHCI_CMD_FLS(x) (((x) >> 2) & 3) /* RW/RO frame list size */ -#define EHCI_CMD_HCRESET 0x00000002 /* RW reset */ -#define EHCI_CMD_RS 0x00000001 /* RW run/stop */ +#define EHCI_CMD_ASPME 0x00000800 /* RW/RO async park enable */ +#define EHCI_CMD_ASPMC 0x00000300 /* RW/RO async park count */ +#define EHCI_CMD_LHCR 0x00000080 /* RW light host ctrl reset */ +#define EHCI_CMD_IAAD 0x00000040 /* RW intr on async adv door + * bell */ +#define EHCI_CMD_ASE 0x00000020 /* RW async sched enable */ +#define EHCI_CMD_PSE 0x00000010 /* RW periodic sched enable */ +#define EHCI_CMD_FLS_M 0x0000000c /* RW/RO frame list size */ +#define EHCI_CMD_FLS(x) (((x) >> 2) & 3) /* RW/RO frame list size */ +#define EHCI_CMD_HCRESET 0x00000002 /* RW reset */ +#define EHCI_CMD_RS 0x00000001 /* RW run/stop */ #define EHCI_USBSTS 0x04 /* RO, RW, RWC Status register */ -#define EHCI_STS_ASS 0x00008000 /* RO async sched status */ -#define EHCI_STS_PSS 0x00004000 /* RO periodic sched status */ -#define EHCI_STS_REC 0x00002000 /* RO reclamation */ -#define EHCI_STS_HCH 0x00001000 /* RO host controller halted */ -#define EHCI_STS_IAA 0x00000020 /* RWC interrupt on async adv */ -#define EHCI_STS_HSE 0x00000010 /* RWC host system error */ -#define EHCI_STS_FLR 0x00000008 /* RWC frame list rollover */ -#define EHCI_STS_PCD 0x00000004 /* RWC port change detect */ -#define EHCI_STS_ERRINT 0x00000002 /* RWC error interrupt */ -#define EHCI_STS_INT 0x00000001 /* RWC interrupt */ +#define EHCI_STS_ASS 0x00008000 /* RO async sched status */ +#define EHCI_STS_PSS 0x00004000 /* RO periodic sched status */ +#define EHCI_STS_REC 0x00002000 /* RO reclamation */ +#define EHCI_STS_HCH 0x00001000 /* RO host controller halted */ +#define EHCI_STS_IAA 0x00000020 /* RWC interrupt on async adv */ +#define EHCI_STS_HSE 0x00000010 /* RWC host system error */ +#define EHCI_STS_FLR 0x00000008 /* RWC frame list rollover */ +#define EHCI_STS_PCD 0x00000004 /* RWC port change detect */ +#define EHCI_STS_ERRINT 0x00000002 /* RWC error interrupt */ +#define EHCI_STS_INT 0x00000001 /* RWC interrupt */ #define EHCI_STS_INTRS(x) ((x) & 0x3f) #define EHCI_NORMAL_INTRS (EHCI_STS_IAA | EHCI_STS_HSE | EHCI_STS_PCD | EHCI_STS_ERRINT | EHCI_STS_INT) #define EHCI_USBINTR 0x08 /* RW Interrupt register */ -#define EHCI_INTR_IAAE 0x00000020 /* interrupt on async advance ena */ -#define EHCI_INTR_HSEE 0x00000010 /* host system error ena */ -#define EHCI_INTR_FLRE 0x00000008 /* frame list rollover ena */ -#define EHCI_INTR_PCIE 0x00000004 /* port change ena */ -#define EHCI_INTR_UEIE 0x00000002 /* USB error intr ena */ -#define EHCI_INTR_UIE 0x00000001 /* USB intr ena */ +#define EHCI_INTR_IAAE 0x00000020 /* interrupt on async advance + * ena */ +#define EHCI_INTR_HSEE 0x00000010 /* host system error ena */ +#define EHCI_INTR_FLRE 0x00000008 /* frame list rollover ena */ +#define EHCI_INTR_PCIE 0x00000004 /* port change ena */ +#define EHCI_INTR_UEIE 0x00000002 /* USB error intr ena */ +#define EHCI_INTR_UIE 0x00000001 /* USB intr ena */ #define EHCI_FRINDEX 0x0c /* RW Frame Index register */ @@ -150,30 +152,30 @@ #define EHCI_ASYNCLISTADDR 0x18 /* RW Async List Base */ #define EHCI_CONFIGFLAG 0x40 /* RW Configure Flag register */ -#define EHCI_CONF_CF 0x00000001 /* RW configure flag */ +#define EHCI_CONF_CF 0x00000001 /* RW configure flag */ -#define EHCI_PORTSC(n) (0x40+4*(n)) /* RO, RW, RWC Port Status reg */ -#define EHCI_PS_WKOC_E 0x00400000 /* RW wake on over current ena */ -#define EHCI_PS_WKDSCNNT_E 0x00200000 /* RW wake on disconnect ena */ -#define EHCI_PS_WKCNNT_E 0x00100000 /* RW wake on connect ena */ -#define EHCI_PS_PTC 0x000f0000 /* RW port test control */ -#define EHCI_PS_PIC 0x0000c000 /* RW port indicator control */ -#define EHCI_PS_PO 0x00002000 /* RW port owner */ -#define EHCI_PS_PP 0x00001000 /* RW,RO port power */ -#define EHCI_PS_LS 0x00000c00 /* RO line status */ +#define EHCI_PORTSC(n) (0x40+4*(n)) /* RO, RW, RWC Port Status reg */ +#define EHCI_PS_WKOC_E 0x00400000 /* RW wake on over current ena */ +#define EHCI_PS_WKDSCNNT_E 0x00200000 /* RW wake on disconnect ena */ +#define EHCI_PS_WKCNNT_E 0x00100000 /* RW wake on connect ena */ +#define EHCI_PS_PTC 0x000f0000 /* RW port test control */ +#define EHCI_PS_PIC 0x0000c000 /* RW port indicator control */ +#define EHCI_PS_PO 0x00002000 /* RW port owner */ +#define EHCI_PS_PP 0x00001000 /* RW,RO port power */ +#define EHCI_PS_LS 0x00000c00 /* RO line status */ #define EHCI_PS_IS_LOWSPEED(x) (((x) & EHCI_PS_LS) == 0x00000400) -#define EHCI_PS_PR 0x00000100 /* RW port reset */ -#define EHCI_PS_SUSP 0x00000080 /* RW suspend */ -#define EHCI_PS_FPR 0x00000040 /* RW force port resume */ -#define EHCI_PS_OCC 0x00000020 /* RWC over current change */ -#define EHCI_PS_OCA 0x00000010 /* RO over current active */ -#define EHCI_PS_PEC 0x00000008 /* RWC port enable change */ -#define EHCI_PS_PE 0x00000004 /* RW port enable */ -#define EHCI_PS_CSC 0x00000002 /* RWC connect status change */ -#define EHCI_PS_CS 0x00000001 /* RO connect status */ +#define EHCI_PS_PR 0x00000100 /* RW port reset */ +#define EHCI_PS_SUSP 0x00000080 /* RW suspend */ +#define EHCI_PS_FPR 0x00000040 /* RW force port resume */ +#define EHCI_PS_OCC 0x00000020 /* RWC over current change */ +#define EHCI_PS_OCA 0x00000010 /* RO over current active */ +#define EHCI_PS_PEC 0x00000008 /* RWC port enable change */ +#define EHCI_PS_PE 0x00000004 /* RW port enable */ +#define EHCI_PS_CSC 0x00000002 /* RWC connect status change */ +#define EHCI_PS_CS 0x00000001 /* RO connect status */ #define EHCI_PS_CLEAR (EHCI_PS_OCC|EHCI_PS_PEC|EHCI_PS_CSC) -#define EHCI_PORT_RESET_COMPLETE 2 /* ms */ +#define EHCI_PORT_RESET_COMPLETE 2 /* ms */ #define EHCI_FLALIGN_ALIGN 0x1000 @@ -186,6 +188,7 @@ #endif typedef u_int32_t ehci_link_t; + #define EHCI_LINK_TERMINATE 0x00000001 #define EHCI_LINK_TYPE(x) ((x) & 0x00000006) #define EHCI_LINK_ITD 0x0 @@ -198,24 +201,26 @@ typedef u_int32_t ehci_physaddr_t; /* Isochronous Transfer Descriptor */ typedef struct { - ehci_link_t itd_next; + ehci_link_t itd_next; /* XXX many more */ -} ehci_itd_t; +} ehci_itd_t; + #define EHCI_ITD_ALIGN 32 /* Split Transaction Isochronous Transfer Descriptor */ typedef struct { - ehci_link_t sitd_next; + ehci_link_t sitd_next; /* XXX many more */ -} ehci_sitd_t; +} ehci_sitd_t; + #define EHCI_SITD_ALIGN 32 /* Queue Element Transfer Descriptor */ #define EHCI_QTD_NBUFFERS 5 typedef struct { - ehci_link_t qtd_next; - ehci_link_t qtd_altnext; - u_int32_t qtd_status; + ehci_link_t qtd_next; + ehci_link_t qtd_altnext; + u_int32_t qtd_status; #define EHCI_QTD_GET_STATUS(x) (((x) >> 0) & 0xff) #define EHCI_QTD_SET_STATUS(x) ((x) << 0) #define EHCI_QTD_ACTIVE 0x80 @@ -243,59 +248,62 @@ typedef struct { #define EHCI_QTD_GET_TOGGLE(x) (((x) >> 31) & 0x1) #define EHCI_QTD_SET_TOGGLE(x) ((x) << 31) #define EHCI_QTD_TOGGLE_MASK 0x80000000 - ehci_physaddr_t qtd_buffer[EHCI_QTD_NBUFFERS]; + ehci_physaddr_t qtd_buffer[EHCI_QTD_NBUFFERS]; ehci_physaddr_t qtd_buffer_hi[EHCI_QTD_NBUFFERS]; -} ehci_qtd_t; +} ehci_qtd_t; + #define EHCI_QTD_ALIGN 32 /* Queue Head */ typedef struct { - ehci_link_t qh_link; - u_int32_t qh_endp; -#define EHCI_QH_GET_ADDR(x) (((x) >> 0) & 0x7f) /* endpoint addr */ + ehci_link_t qh_link; + u_int32_t qh_endp; +#define EHCI_QH_GET_ADDR(x) (((x) >> 0) & 0x7f) /* endpoint addr */ #define EHCI_QH_SET_ADDR(x) (x) #define EHCI_QH_ADDRMASK 0x0000007f -#define EHCI_QH_GET_INACT(x) (((x) >> 7) & 0x01) /* inactivate on next */ +#define EHCI_QH_GET_INACT(x) (((x) >> 7) & 0x01) /* inactivate on next */ #define EHCI_QH_INACT 0x00000080 -#define EHCI_QH_GET_ENDPT(x) (((x) >> 8) & 0x0f) /* endpoint no */ +#define EHCI_QH_GET_ENDPT(x) (((x) >> 8) & 0x0f) /* endpoint no */ #define EHCI_QH_SET_ENDPT(x) ((x) << 8) -#define EHCI_QH_GET_EPS(x) (((x) >> 12) & 0x03) /* endpoint speed */ +#define EHCI_QH_GET_EPS(x) (((x) >> 12) & 0x03) /* endpoint speed */ #define EHCI_QH_SET_EPS(x) ((x) << 12) #define EHCI_QH_SPEED_FULL 0x0 #define EHCI_QH_SPEED_LOW 0x1 #define EHCI_QH_SPEED_HIGH 0x2 -#define EHCI_QH_GET_DTC(x) (((x) >> 14) & 0x01) /* data toggle control */ +#define EHCI_QH_GET_DTC(x) (((x) >> 14) & 0x01) /* data toggle control */ #define EHCI_QH_DTC 0x00004000 -#define EHCI_QH_GET_HRECL(x) (((x) >> 15) & 0x01) /* head of reclamation */ +#define EHCI_QH_GET_HRECL(x) (((x) >> 15) & 0x01) /* head of reclamation */ #define EHCI_QH_HRECL 0x00008000 -#define EHCI_QH_GET_MPL(x) (((x) >> 16) & 0x7ff) /* max packet len */ +#define EHCI_QH_GET_MPL(x) (((x) >> 16) & 0x7ff) /* max packet len */ #define EHCI_QH_SET_MPL(x) ((x) << 16) #define EHCI_QH_MPLMASK 0x07ff0000 -#define EHCI_QH_GET_CTL(x) (((x) >> 27) & 0x01) /* control endpoint */ +#define EHCI_QH_GET_CTL(x) (((x) >> 27) & 0x01) /* control endpoint */ #define EHCI_QH_CTL 0x08000000 -#define EHCI_QH_GET_NRL(x) (((x) >> 28) & 0x0f) /* NAK reload */ +#define EHCI_QH_GET_NRL(x) (((x) >> 28) & 0x0f) /* NAK reload */ #define EHCI_QH_SET_NRL(x) ((x) << 28) - u_int32_t qh_endphub; -#define EHCI_QH_GET_SMASK(x) (((x) >> 0) & 0xff) /* intr sched mask */ + u_int32_t qh_endphub; +#define EHCI_QH_GET_SMASK(x) (((x) >> 0) & 0xff) /* intr sched mask */ #define EHCI_QH_SET_SMASK(x) ((x) << 0) -#define EHCI_QH_GET_CMASK(x) (((x) >> 8) & 0xff) /* split completion mask */ +#define EHCI_QH_GET_CMASK(x) (((x) >> 8) & 0xff) /* split completion mask */ #define EHCI_QH_SET_CMASK(x) ((x) << 8) -#define EHCI_QH_GET_HUBA(x) (((x) >> 16) & 0x7f) /* hub address */ +#define EHCI_QH_GET_HUBA(x) (((x) >> 16) & 0x7f) /* hub address */ #define EHCI_QH_SET_HUBA(x) ((x) << 16) -#define EHCI_QH_GET_PORT(x) (((x) >> 23) & 0x7f) /* hub port */ +#define EHCI_QH_GET_PORT(x) (((x) >> 23) & 0x7f) /* hub port */ #define EHCI_QH_SET_PORT(x) ((x) << 23) -#define EHCI_QH_GET_MULT(x) (((x) >> 30) & 0x03) /* pipe multiplier */ +#define EHCI_QH_GET_MULT(x) (((x) >> 30) & 0x03) /* pipe multiplier */ #define EHCI_QH_SET_MULT(x) ((x) << 30) - ehci_link_t qh_curqtd; - ehci_qtd_t qh_qtd; -} ehci_qh_t; + ehci_link_t qh_curqtd; + ehci_qtd_t qh_qtd; +} ehci_qh_t; + #define EHCI_QH_ALIGN 32 /* Periodic Frame Span Traversal Node */ typedef struct { - ehci_link_t fstn_link; - ehci_link_t fstn_back; -} ehci_fstn_t; + ehci_link_t fstn_link; + ehci_link_t fstn_back; +} ehci_fstn_t; + #define EHCI_FSTN_ALIGN 32 -#endif /* _DEV_PCI_EHCIREG_H_ */ +#endif /* _DEV_PCI_EHCIREG_H_ */ Modified: projects/mips/sys/mips/rmi/ehcivar.h ============================================================================== --- projects/mips/sys/mips/rmi/ehcivar.h Thu Oct 29 21:13:57 2009 (r198624) +++ projects/mips/sys/mips/rmi/ehcivar.h Thu Oct 29 21:14:10 2009 (r198625) @@ -39,12 +39,13 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Thu Oct 29 21:21:02 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46A88106566C; Thu, 29 Oct 2009 21:21:02 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34E5F8FC0C; Thu, 29 Oct 2009 21:21:02 +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 n9TLL2pj009995; Thu, 29 Oct 2009 21:21:02 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9TLL2U1009992; Thu, 29 Oct 2009 21:21:02 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200910292121.n9TLL2U1009992@svn.freebsd.org> From: Randall Stewart Date: Thu, 29 Oct 2009 21:21:02 +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: r198626 - projects/mips/sys/dev/rmi/xlr 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, 29 Oct 2009 21:21:02 -0000 Author: rrs Date: Thu Oct 29 21:21:01 2009 New Revision: 198626 URL: http://svn.freebsd.org/changeset/base/198626 Log: white space changes Modified: projects/mips/sys/dev/rmi/xlr/rge.c projects/mips/sys/dev/rmi/xlr/rge.h projects/mips/sys/dev/rmi/xlr/xgmac_mdio.h Modified: projects/mips/sys/dev/rmi/xlr/rge.c ============================================================================== --- projects/mips/sys/dev/rmi/xlr/rge.c Thu Oct 29 21:14:10 2009 (r198625) +++ projects/mips/sys/dev/rmi/xlr/rge.c Thu Oct 29 21:21:01 2009 (r198626) @@ -79,7 +79,7 @@ #include #include #include /* for DELAY */ -#include /* */ +#include /* */ #include #include #include @@ -117,7 +117,8 @@ MODULE_DEPEND(rge, miibus, 1, 1, 1); #ifdef DEBUG #undef dbg_msg -int mac_debug = 1; +int mac_debug = 1; + #define dbg_msg(fmt, args...) \ do {\ if (mac_debug) {\ @@ -130,7 +131,8 @@ int mac_debug = 1; #else #undef dbg_msg #define dbg_msg(fmt, args...) -int mac_debug = 0; +int mac_debug = 0; + #endif #define MAC_B2B_IPG 88 @@ -165,12 +167,13 @@ int mac_debug = 0; extern uint32_t cpu_ltop_map[32]; #ifdef ENABLED_DEBUG -static int port_counters[4][8] __aligned(XLR_CACHELINE_SIZE); +static int port_counters[4][8] __aligned(XLR_CACHELINE_SIZE); + #define port_inc_counter(port, counter) atomic_add_int(&port_counters[port][(counter)], 1) #define port_set_counter(port, counter, value) atomic_set_int(&port_counters[port][(counter)], (value)) #else -#define port_inc_counter(port, counter) /*Nothing*/ -#define port_set_counter(port, counter, value) /*Nothing*/ +#define port_inc_counter(port, counter) /* Nothing */ +#define port_set_counter(port, counter, value) /* Nothing */ #endif int xlr_rge_tx_prepend[MAXCPU]; @@ -181,20 +184,21 @@ int xlr_rge_tx_ok_done[MAXCPU]; int xlr_rge_rx_done[MAXCPU]; int xlr_rge_repl_done[MAXCPU]; -static __inline__ unsigned int +static __inline__ unsigned int ldadd_wu(unsigned int value, unsigned long *addr) { - __asm__ __volatile__( ".set push\n" - ".set noreorder\n" - "move $8, %2\n" - "move $9, %3\n" - /* "ldaddwu $8, $9\n" */ - ".word 0x71280011\n" - "move %0, $8\n" - ".set pop\n" - : "=&r"(value), "+m"(*addr) - : "0"(value), "r" ((unsigned long)addr) - : "$8", "$9"); + __asm__ __volatile__(".set push\n" + ".set noreorder\n" + "move $8, %2\n" + "move $9, %3\n" + /* "ldaddwu $8, $9\n" */ + ".word 0x71280011\n" + "move %0, $8\n" + ".set pop\n" + : "=&r"(value), "+m"(*addr) + : "0"(value), "r"((unsigned long)addr) + : "$8", "$9"); + return value; } @@ -212,85 +216,86 @@ ldadd_wu(unsigned int value, unsigned lo #define XLR_MAX_MACS 8 #define XLR_MAX_TX_FRAGS 14 -#define MAX_P2D_DESC_PER_PORT 512 +#define MAX_P2D_DESC_PER_PORT 512 struct p2d_tx_desc { - uint64_t frag [XLR_MAX_TX_FRAGS + 2]; + uint64_t frag[XLR_MAX_TX_FRAGS + 2]; }; + #define MAX_TX_RING_SIZE (XLR_MAX_MACS * MAX_P2D_DESC_PER_PORT * sizeof(struct p2d_tx_desc)) struct rge_softc *dev_mac[XLR_MAX_MACS]; -static int dev_mac_xgs0; -static int dev_mac_gmac0; +static int dev_mac_xgs0; +static int dev_mac_gmac0; -static int gmac_common_init_done; +static int gmac_common_init_done; -static int rge_probe(device_t); -static int rge_attach(device_t); -static int rge_detach(device_t); -static int rge_suspend(device_t); -static int rge_resume(device_t); -static void rge_release_resources(struct rge_softc *); -static void rge_rx(struct rge_softc *, vm_paddr_t paddr, int); -static void rge_intr(void *); -static void rge_start_locked(struct ifnet *, int); -static void rge_start(struct ifnet *); -static int rge_ioctl(struct ifnet *, u_long, caddr_t); -static void rge_init(void *); -static void rge_stop(struct rge_softc *); -static void rge_watchdog(struct ifnet *); -static int rge_shutdown(device_t); -static void rge_reset(struct rge_softc *); +static int rge_probe(device_t); +static int rge_attach(device_t); +static int rge_detach(device_t); +static int rge_suspend(device_t); +static int rge_resume(device_t); +static void rge_release_resources(struct rge_softc *); +static void rge_rx(struct rge_softc *, vm_paddr_t paddr, int); +static void rge_intr(void *); +static void rge_start_locked(struct ifnet *, int); +static void rge_start(struct ifnet *); +static int rge_ioctl(struct ifnet *, u_long, caddr_t); +static void rge_init(void *); +static void rge_stop(struct rge_softc *); +static void rge_watchdog(struct ifnet *); +static int rge_shutdown(device_t); +static void rge_reset(struct rge_softc *); static struct mbuf *get_mbuf(void); -static void free_buf(vm_paddr_t paddr); -static void *get_buf(void); +static void free_buf(vm_paddr_t paddr); +static void *get_buf(void); -static void xlr_mac_get_hwaddr(struct rge_softc *); -static void xlr_mac_setup_hwaddr(struct driver_data *); -static void rmi_xlr_mac_set_enable(struct driver_data *priv, int flag); -static void rmi_xlr_xgmac_init(struct driver_data *priv); -static void rmi_xlr_gmac_init(struct driver_data *priv); -static void mac_common_init(void); -static int rge_mii_write(device_t, int, int, int); -static int rge_mii_read(device_t, int, int); -static void rmi_xlr_mac_mii_statchg(device_t); -static int rmi_xlr_mac_mediachange(struct ifnet *); -static void rmi_xlr_mac_mediastatus(struct ifnet *, struct ifmediareq *); -static void xlr_mac_set_rx_mode(struct rge_softc *sc); -void +static void xlr_mac_get_hwaddr(struct rge_softc *); +static void xlr_mac_setup_hwaddr(struct driver_data *); +static void rmi_xlr_mac_set_enable(struct driver_data *priv, int flag); +static void rmi_xlr_xgmac_init(struct driver_data *priv); +static void rmi_xlr_gmac_init(struct driver_data *priv); +static void mac_common_init(void); +static int rge_mii_write(device_t, int, int, int); +static int rge_mii_read(device_t, int, int); +static void rmi_xlr_mac_mii_statchg(device_t); +static int rmi_xlr_mac_mediachange(struct ifnet *); +static void rmi_xlr_mac_mediastatus(struct ifnet *, struct ifmediareq *); +static void xlr_mac_set_rx_mode(struct rge_softc *sc); +void rmi_xlr_mac_msgring_handler(int bucket, int size, int code, - int stid, struct msgrng_msg *msg, - void *data); -static void mac_frin_replenish(void *); -static int rmi_xlr_mac_open(struct rge_softc *); -static int rmi_xlr_mac_close(struct rge_softc *); -static int + int stid, struct msgrng_msg *msg, + void *data); +static void mac_frin_replenish(void *); +static int rmi_xlr_mac_open(struct rge_softc *); +static int rmi_xlr_mac_close(struct rge_softc *); +static int mac_xmit(struct mbuf *, struct rge_softc *, - struct driver_data *, int, struct p2d_tx_desc *); -static int rmi_xlr_mac_xmit(struct mbuf *, struct rge_softc *, int, struct p2d_tx_desc *); + struct driver_data *, int, struct p2d_tx_desc *); +static int rmi_xlr_mac_xmit(struct mbuf *, struct rge_softc *, int, struct p2d_tx_desc *); static struct rge_softc_stats *rmi_xlr_mac_get_stats(struct rge_softc *sc); -static void rmi_xlr_mac_set_multicast_list(struct rge_softc *sc); -static int rmi_xlr_mac_change_mtu(struct rge_softc *sc, int new_mtu); -static int rmi_xlr_mac_fill_rxfr(struct rge_softc *sc); -static void rmi_xlr_config_spill_area(struct driver_data *priv); -static int rmi_xlr_mac_set_speed(struct driver_data *s, xlr_mac_speed_t speed); -static int +static void rmi_xlr_mac_set_multicast_list(struct rge_softc *sc); +static int rmi_xlr_mac_change_mtu(struct rge_softc *sc, int new_mtu); +static int rmi_xlr_mac_fill_rxfr(struct rge_softc *sc); +static void rmi_xlr_config_spill_area(struct driver_data *priv); +static int rmi_xlr_mac_set_speed(struct driver_data *s, xlr_mac_speed_t speed); +static int rmi_xlr_mac_set_duplex(struct driver_data *s, - xlr_mac_duplex_t duplex, xlr_mac_fc_t fc); + xlr_mac_duplex_t duplex, xlr_mac_fc_t fc); static void serdes_regs_init(struct driver_data *priv); static int rmi_xlr_gmac_reset(struct driver_data *priv); /*Statistics...*/ static int get_p2d_desc_failed = 0; -static int msg_snd_failed =0; +static int msg_snd_failed = 0; SYSCTL_INT(_hw, OID_AUTO, get_p2d_failed, CTLFLAG_RW, - &get_p2d_desc_failed, 0, "p2d desc failed"); + &get_p2d_desc_failed, 0, "p2d desc failed"); SYSCTL_INT(_hw, OID_AUTO, msg_snd_failed, CTLFLAG_RW, - &msg_snd_failed, 0, "msg snd failed"); + &msg_snd_failed, 0, "msg snd failed"); -struct callout xlr_tx_stop_bkp; +struct callout xlr_tx_stop_bkp; static device_method_t rge_methods[] = { /* Device interface */ @@ -308,7 +313,7 @@ static device_method_t rge_methods[] = { {0, 0} }; -static driver_t rge_driver = { +static driver_t rge_driver = { "rge", rge_methods, sizeof(struct rge_softc) @@ -328,60 +333,61 @@ DRIVER_MODULE(miibus, rge, miibus_driver #define XKPHYS 0x8000000000000000 -static __inline__ uint32_t +static __inline__ uint32_t lw_40bit_phys(uint64_t phys, int cca) { - uint64_t addr; - uint32_t value = 0; - unsigned long flags; + uint64_t addr; + uint32_t value = 0; + unsigned long flags; + + addr = XKPHYS | ((uint64_t) cca << 59) | (phys & 0xfffffffffcULL); - addr = XKPHYS | ((uint64_t)cca << 59) | (phys & 0xfffffffffcULL); - enable_KX(flags); - __asm__ __volatile__( - ".set push\n" - ".set noreorder\n" - ".set mips64\n" - "lw %0, 0(%1) \n" - ".set pop\n" - : "=r" (value) - : "r" (addr) ); + __asm__ __volatile__( + ".set push\n" + ".set noreorder\n" + ".set mips64\n" + "lw %0, 0(%1) \n" + ".set pop\n" + : "=r"(value) + : "r"(addr)); disable_KX(flags); return value; } -static __inline__ uint64_t +static __inline__ uint64_t ld_40bit_phys(uint64_t phys, int cca) { - uint64_t addr; - uint64_t value = 0; - unsigned long flags; + uint64_t addr; + uint64_t value = 0; + unsigned long flags; - addr = XKPHYS | ((uint64_t)cca << 59) | (phys & 0xfffffffffcULL); + addr = XKPHYS | ((uint64_t) cca << 59) | (phys & 0xfffffffffcULL); enable_KX(flags); - __asm__ __volatile__( - ".set push\n" - ".set noreorder\n" - ".set mips64\n" - "ld %0, 0(%1) \n" - ".set pop\n" - : "=r" (value) - : "r" (addr)); + __asm__ __volatile__( + ".set push\n" + ".set noreorder\n" + ".set mips64\n" + "ld %0, 0(%1) \n" + ".set pop\n" + : "=r"(value) + : "r"(addr)); disable_KX(flags); return value; } -void *xlr_tx_ring_mem; +void *xlr_tx_ring_mem; struct tx_desc_node { struct p2d_tx_desc *ptr; - TAILQ_ENTRY (tx_desc_node) list; + TAILQ_ENTRY(tx_desc_node) list; }; + #define XLR_MAX_TX_DESC_NODES (XLR_MAX_MACS * MAX_P2D_DESC_PER_PORT) struct tx_desc_node tx_desc_nodes[XLR_MAX_TX_DESC_NODES]; static volatile int xlr_tot_avail_p2d[XLR_MAX_CORE]; @@ -391,37 +397,38 @@ static int xlr_total_active_core = 0; * This should contain the list of all free tx frag desc nodes pointing to tx * p2d arrays */ -static +static TAILQ_HEAD(, tx_desc_node) tx_frag_desc[XLR_MAX_CORE] = - { - TAILQ_HEAD_INITIALIZER(tx_frag_desc[0]), - TAILQ_HEAD_INITIALIZER(tx_frag_desc[1]), - TAILQ_HEAD_INITIALIZER(tx_frag_desc[2]), - TAILQ_HEAD_INITIALIZER(tx_frag_desc[3]), - TAILQ_HEAD_INITIALIZER(tx_frag_desc[4]), - TAILQ_HEAD_INITIALIZER(tx_frag_desc[5]), - TAILQ_HEAD_INITIALIZER(tx_frag_desc[6]), - TAILQ_HEAD_INITIALIZER(tx_frag_desc[7]), - }; +{ + TAILQ_HEAD_INITIALIZER(tx_frag_desc[0]), + TAILQ_HEAD_INITIALIZER(tx_frag_desc[1]), + TAILQ_HEAD_INITIALIZER(tx_frag_desc[2]), + TAILQ_HEAD_INITIALIZER(tx_frag_desc[3]), + TAILQ_HEAD_INITIALIZER(tx_frag_desc[4]), + TAILQ_HEAD_INITIALIZER(tx_frag_desc[5]), + TAILQ_HEAD_INITIALIZER(tx_frag_desc[6]), + TAILQ_HEAD_INITIALIZER(tx_frag_desc[7]), +}; /* This contains a list of free tx frag node descriptors */ -static TAILQ_HEAD(, tx_desc_node) free_tx_frag_desc[XLR_MAX_CORE] = - { - TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[0]), - TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[1]), - TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[2]), - TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[3]), - TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[4]), - TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[5]), - TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[6]), - TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[7]), - }; +static +TAILQ_HEAD(, tx_desc_node) free_tx_frag_desc[XLR_MAX_CORE] = +{ + TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[0]), + TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[1]), + TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[2]), + TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[3]), + TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[4]), + TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[5]), + TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[6]), + TAILQ_HEAD_INITIALIZER(free_tx_frag_desc[7]), +}; static struct mtx tx_desc_lock[XLR_MAX_CORE]; static inline void -mac_make_desc_rfr(struct msgrng_msg *msg, - vm_paddr_t addr) +mac_make_desc_rfr(struct msgrng_msg *msg, + vm_paddr_t addr) { msg->msg0 = (uint64_t) addr & 0xffffffffe0ULL; msg->msg1 = msg->msg2 = msg->msg3 = 0; @@ -432,8 +439,8 @@ mac_make_desc_rfr(struct msgrng_msg *msg static void init_p2d_allocation(void) { - int active_core[8]= {0}; - int i=0; + int active_core[8] = {0}; + int i = 0; uint32_t cpumask; int cpu; @@ -442,43 +449,43 @@ init_p2d_allocation(void) for (i = 0; i < 32; i++) { if (cpumask & (1 << i)) { cpu = cpu_ltop_map[i]; - if(!active_core[cpu/4]){ - active_core[cpu/4] = 1; + if (!active_core[cpu / 4]) { + active_core[cpu / 4] = 1; xlr_total_active_core++; } } } - for(i=0; iptr = tx_desc; tx_desc++; TAILQ_INSERT_HEAD(&tx_frag_desc[j], node, list); - j = (i / (XLR_MAX_TX_DESC_NODES/xlr_total_active_core)); + j = (i / (XLR_MAX_TX_DESC_NODES / xlr_total_active_core)); } } @@ -508,14 +515,14 @@ get_p2d_desc(void) TAILQ_REMOVE(&tx_frag_desc[cpu], node, list); tx_desc = node->ptr; TAILQ_INSERT_HEAD(&free_tx_frag_desc[cpu], node, list); - }else{ - /*Increment p2d desc fail count*/ + } else { + /* Increment p2d desc fail count */ get_p2d_desc_failed++; } mtx_unlock_spin(&tx_desc_lock[cpu]); return tx_desc; } -static void +static void free_p2d_desc(struct p2d_tx_desc *tx_desc) { struct tx_desc_node *node; @@ -533,17 +540,18 @@ free_p2d_desc(struct p2d_tx_desc *tx_des } -static int +static int build_frag_list(struct mbuf *m_head, struct msgrng_msg *p2p_msg, struct p2d_tx_desc *tx_desc) { - struct mbuf *m; - vm_paddr_t paddr; - uint64_t p2d_len; - int nfrag; - vm_paddr_t p1 , p2; - uint32_t len1 , len2; - vm_offset_t taddr; - uint64_t fr_stid; + struct mbuf *m; + vm_paddr_t paddr; + uint64_t p2d_len; + int nfrag; + vm_paddr_t p1, p2; + uint32_t len1, len2; + vm_offset_t taddr; + uint64_t fr_stid; + fr_stid = (xlr_cpu_id() << 3) + xlr_thr_id() + 4; if (tx_desc == NULL) @@ -558,21 +566,21 @@ build_frag_list(struct mbuf *m_head, str if (m->m_len != 0) { paddr = vtophys(mtod(m, vm_offset_t)); p1 = paddr + m->m_len; - p2 = vtophys(((vm_offset_t) m->m_data + m->m_len)); + p2 = vtophys(((vm_offset_t)m->m_data + m->m_len)); if (p1 != p2) { len1 = (uint32_t) - (PAGE_SIZE - (paddr & PAGE_MASK)); + (PAGE_SIZE - (paddr & PAGE_MASK)); tx_desc->frag[nfrag] = (127ULL << 54) | - ((uint64_t) len1 << 40) | paddr; + ((uint64_t) len1 << 40) | paddr; nfrag++; - taddr = (vm_offset_t) m->m_data + len1; + taddr = (vm_offset_t)m->m_data + len1; p2 = vtophys(taddr); len2 = m->m_len - len1; if (nfrag >= XLR_MAX_TX_FRAGS) panic("TX frags exceeded"); tx_desc->frag[nfrag] = (127ULL << 54) | - ((uint64_t) len2 << 40) | p2; + ((uint64_t) len2 << 40) | p2; taddr += len2; p1 = vtophys(taddr); @@ -580,76 +588,76 @@ build_frag_list(struct mbuf *m_head, str if ((p2 + len2) != p1) { printf("p1 = %p p2 = %p\n", (void *)p1, (void *)p2); printf("len1 = %x len2 = %x\n", len1, - len2); + len2); printf("m_data %p\n", m->m_data); DELAY(1000000); panic("Multiple Mbuf segment discontiguous\n"); } } else { tx_desc->frag[nfrag] = (127ULL << 54) | - ((uint64_t) m->m_len << 40) | paddr; + ((uint64_t) m->m_len << 40) | paddr; } nfrag++; } } /* set eop in the last tx p2d desc */ tx_desc->frag[nfrag - 1] |= (1ULL << 63); - paddr = vtophys((vm_offset_t) tx_desc); + paddr = vtophys((vm_offset_t)tx_desc); tx_desc->frag[nfrag] = (1ULL << 63) | (fr_stid << 54) | paddr; nfrag++; - tx_desc->frag[XLR_MAX_TX_FRAGS] = (uint64_t) (vm_offset_t) tx_desc; - tx_desc->frag[XLR_MAX_TX_FRAGS + 1] = (uint64_t) (vm_offset_t) m_head; + tx_desc->frag[XLR_MAX_TX_FRAGS] = (uint64_t) (vm_offset_t)tx_desc; + tx_desc->frag[XLR_MAX_TX_FRAGS + 1] = (uint64_t) (vm_offset_t)m_head; p2d_len = (nfrag * 8); p2p_msg->msg0 = (1ULL << 63) | (1ULL << 62) | (127ULL << 54) | - (p2d_len << 40) | paddr; + (p2d_len << 40) | paddr; return 0; } -static void +static void release_tx_desc(struct msgrng_msg *msg, int rel_buf) { - vm_paddr_t paddr = msg->msg0 & 0xffffffffffULL; - uint64_t temp; + vm_paddr_t paddr = msg->msg0 & 0xffffffffffULL; + uint64_t temp; struct p2d_tx_desc *tx_desc; - struct mbuf *m; + struct mbuf *m; paddr += (XLR_MAX_TX_FRAGS * sizeof(uint64_t)); temp = ld_40bit_phys(paddr, 3); - tx_desc = (struct p2d_tx_desc *)((vm_offset_t) temp); + tx_desc = (struct p2d_tx_desc *)((vm_offset_t)temp); if (rel_buf) { paddr += sizeof(uint64_t); temp = ld_40bit_phys(paddr, 3); - m = (struct mbuf *)((vm_offset_t) temp); + m = (struct mbuf *)((vm_offset_t)temp); m_freem(m); } - free_p2d_desc(tx_desc); } #ifdef RX_COPY #define RGE_MAX_NUM_DESC (6 * MAX_NUM_DESC) -uint8_t *rge_rx_buffers[RGE_MAX_NUM_DESC]; +uint8_t *rge_rx_buffers[RGE_MAX_NUM_DESC]; static struct mtx rge_rx_mtx; -int g_rx_buf_head; +int g_rx_buf_head; -static void +static void init_rx_buf(void) { - int i; - uint8_t *buf, *start; - uint32_t size , *ptr; + int i; + uint8_t *buf, *start; + uint32_t size, *ptr; + mtx_init(&rge_rx_mtx, "xlr rx_desc", NULL, MTX_SPIN); size = (RGE_MAX_NUM_DESC * (MAX_FRAME_SIZE + XLR_CACHELINE_SIZE)); start = (uint8_t *) contigmalloc(size, M_DEVBUF, M_NOWAIT | M_ZERO, - 0, 0xffffffff, XLR_CACHELINE_SIZE, 0); + 0, 0xffffffff, XLR_CACHELINE_SIZE, 0); if (start == NULL) panic("NO RX BUFFERS"); buf = start; @@ -662,10 +670,11 @@ init_rx_buf(void) } } -static void * +static void * get_rx_buf(void) { - void *ptr = NULL; + void *ptr = NULL; + mtx_lock_spin(&rge_rx_mtx); if (g_rx_buf_head < RGE_MAX_NUM_DESC) { ptr = (void *)rge_rx_buffers[g_rx_buf_head]; @@ -674,12 +683,13 @@ get_rx_buf(void) mtx_unlock_spin(&rge_rx_mtx); return ptr; } + #endif -static struct mbuf * +static struct mbuf * get_mbuf(void) { - struct mbuf *m_new = NULL; + struct mbuf *m_new = NULL; if ((m_new = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR)) == NULL) return NULL; @@ -689,11 +699,11 @@ get_mbuf(void) return m_new; } -static void +static void free_buf(vm_paddr_t paddr) { - struct mbuf *m; - vm_offset_t temp; + struct mbuf *m; + vm_offset_t temp; temp = lw_40bit_phys((paddr - XLR_CACHELINE_SIZE), 3); m = (struct mbuf *)temp; @@ -707,9 +717,11 @@ get_buf(void) #ifdef RX_COPY return get_rx_buf(); #else - struct mbuf *m_new = NULL; + struct mbuf *m_new = NULL; + #ifdef INVARIANTS - vm_paddr_t temp1, temp2; + vm_paddr_t temp1, temp2; + #endif unsigned int *md; @@ -727,8 +739,8 @@ get_buf(void) /* return (void *)m_new; */ #ifdef INVARIANTS - temp1 = vtophys((vm_offset_t) m_new->m_data); - temp2 = vtophys((vm_offset_t) m_new->m_data + 1536); + temp1 = vtophys((vm_offset_t)m_new->m_data); + temp2 = vtophys((vm_offset_t)m_new->m_data + 1536); if ((temp1 + 1536) != temp2) panic("ALLOCED BUFFER IS NOT CONTIGUOUS\n"); #endif @@ -738,16 +750,16 @@ get_buf(void) /********************************************************************** **********************************************************************/ -static void +static void rmi_xlr_mac_set_enable(struct driver_data *priv, int flag) { - uint32_t regval; - int tx_threshold = 1518; + uint32_t regval; + int tx_threshold = 1518; if (flag) { regval = xlr_read_reg(priv->mmio, R_TX_CONTROL); regval |= (1 << O_TX_CONTROL__TxEnable) | - (tx_threshold << O_TX_CONTROL__TxThreshold); + (tx_threshold << O_TX_CONTROL__TxThreshold); xlr_write_reg(priv->mmio, R_TX_CONTROL, regval); @@ -763,7 +775,7 @@ rmi_xlr_mac_set_enable(struct driver_dat } else { regval = xlr_read_reg(priv->mmio, R_TX_CONTROL); regval &= ~((1 << O_TX_CONTROL__TxEnable) | - (tx_threshold << O_TX_CONTROL__TxThreshold)); + (tx_threshold << O_TX_CONTROL__TxThreshold)); xlr_write_reg(priv->mmio, R_TX_CONTROL, regval); @@ -779,19 +791,19 @@ rmi_xlr_mac_set_enable(struct driver_dat /********************************************************************** **********************************************************************/ -static __inline__ int +static __inline__ int xlr_mac_send_fr(struct driver_data *priv, - vm_paddr_t addr, int len) + vm_paddr_t addr, int len) { - int stid = priv->rfrbucket; + int stid = priv->rfrbucket; struct msgrng_msg msg; - int vcpu = (xlr_cpu_id()<<2)+xlr_thr_id(); + int vcpu = (xlr_cpu_id() << 2) + xlr_thr_id(); - mac_make_desc_rfr(&msg, addr); + mac_make_desc_rfr(&msg, addr); /* Send the packet to MAC */ dbg_msg("mac_%d: Sending free packet %llx to stid %d\n", - priv->instance, addr, stid); + priv->instance, addr, stid); if (priv->type == XLR_XGMAC) { while (message_send(1, MSGRNG_CODE_XGMAC, stid, &msg)); } else { @@ -804,11 +816,12 @@ xlr_mac_send_fr(struct driver_data *priv /**************************************************************/ -static void +static void xgmac_mdio_setup(volatile unsigned int *_mmio) { - int i; - uint32_t rd_data; + int i; + uint32_t rd_data; + for (i = 0; i < 4; i++) { rd_data = xmdio_read(_mmio, 1, 0x8000 + i); rd_data = rd_data & 0xffffdfff; /* clear isolate bit */ @@ -824,10 +837,10 @@ xgmac_mdio_setup(volatile unsigned int * ********************************************************************* */ #define PHY_STATUS_RETRIES 25000 -static void +static void rmi_xlr_mac_mii_init(struct driver_data *priv) { - xlr_reg_t *mii_mmio = priv->mii_mmio; + xlr_reg_t *mii_mmio = priv->mii_mmio; /* use the lowest clock divisor - divisor 28 */ xlr_write_reg(mii_mmio, R_MII_MGMT_CONFIG, 0x07); @@ -845,17 +858,17 @@ rmi_xlr_mac_mii_init(struct driver_data * value read, or 0 if an error occurred. ********************************************************************* */ -static int -rge_mii_read_internal(xlr_reg_t *mii_mmio, int phyaddr, int regidx) +static int +rge_mii_read_internal(xlr_reg_t * mii_mmio, int phyaddr, int regidx) { - int i = 0; + int i = 0; /* setup the phy reg to be used */ xlr_write_reg(mii_mmio, R_MII_MGMT_ADDRESS, - (phyaddr << 8) | (regidx << 0)); + (phyaddr << 8) | (regidx << 0)); /* Issue the read command */ xlr_write_reg(mii_mmio, R_MII_MGMT_COMMAND, - (1 << O_MII_MGMT_COMMAND__rstat)); + (1 << O_MII_MGMT_COMMAND__rstat)); /* poll for the read cycle to complete */ for (i = 0; i < PHY_STATUS_RETRIES; i++) { @@ -873,10 +886,11 @@ rge_mii_read_internal(xlr_reg_t *mii_mmi return xlr_read_reg(mii_mmio, R_MII_MGMT_STATUS); } -static int +static int rge_mii_read(device_t dev, int phyaddr, int regidx) { struct rge_softc *sc = device_get_softc(dev); + return rge_mii_read_internal(sc->priv.mii_mmio, phyaddr, regidx); } @@ -889,7 +903,7 @@ rge_mii_read(device_t dev, int phyaddr, * Return value: * nothing ********************************************************************* */ -static int +static int rmi_xlr_mac_mediachange(struct ifnet *ifp) { struct rge_softc *sc = ifp->if_softc; @@ -915,11 +929,11 @@ rmi_xlr_mac_mediastatus(struct ifnet *if { struct rge_softc *sc = ifp->if_softc; - /*Check whether this is interface is active or not.*/ + /* Check whether this is interface is active or not. */ ifmr->ifm_status = IFM_AVALID; - if(sc->link_up){ + if (sc->link_up) { ifmr->ifm_status |= IFM_ACTIVE; - }else{ + } else { ifmr->ifm_active = IFM_ETHER; } } @@ -937,12 +951,12 @@ rmi_xlr_mac_mediastatus(struct ifnet *if * nothing ********************************************************************* */ static void -rge_mii_write_internal(xlr_reg_t *mii_mmio, int phyaddr, int regidx, int regval) +rge_mii_write_internal(xlr_reg_t * mii_mmio, int phyaddr, int regidx, int regval) { - int i = 0; + int i = 0; xlr_write_reg(mii_mmio, R_MII_MGMT_ADDRESS, - (phyaddr << 8) | (regidx << 0)); + (phyaddr << 8) | (regidx << 0)); /* Write the data which starts the write cycle */ xlr_write_reg(mii_mmio, R_MII_MGMT_WRITE_DATA, regval); @@ -965,7 +979,7 @@ rge_mii_write(device_t dev, int phyaddr, return (0); } -static void +static void rmi_xlr_mac_mii_statchg(struct device *dev) { } @@ -973,12 +987,12 @@ rmi_xlr_mac_mii_statchg(struct device *d static void serdes_regs_init(struct driver_data *priv) { - xlr_reg_t *mmio_gpio = (xlr_reg_t *)(xlr_io_base + XLR_IO_GPIO_OFFSET); + xlr_reg_t *mmio_gpio = (xlr_reg_t *) (xlr_io_base + XLR_IO_GPIO_OFFSET); int i; /* Initialize SERDES CONTROL Registers */ rge_mii_write_internal(priv->serdes_mmio, 26, 0, 0x6DB0); - rge_mii_write_internal(priv->serdes_mmio, 26, 1, 0xFFFF); + rge_mii_write_internal(priv->serdes_mmio, 26, 1, 0xFFFF); rge_mii_write_internal(priv->serdes_mmio, 26, 2, 0xB6D0); rge_mii_write_internal(priv->serdes_mmio, 26, 3, 0x00FF); rge_mii_write_internal(priv->serdes_mmio, 26, 4, 0x0000); @@ -987,87 +1001,92 @@ serdes_regs_init(struct driver_data *pri rge_mii_write_internal(priv->serdes_mmio, 26, 7, 0x0001); rge_mii_write_internal(priv->serdes_mmio, 26, 8, 0x0000); rge_mii_write_internal(priv->serdes_mmio, 26, 9, 0x0000); - rge_mii_write_internal(priv->serdes_mmio, 26,10, 0x0000); + rge_mii_write_internal(priv->serdes_mmio, 26, 10, 0x0000); - /* + /* * For loop delay and GPIO programming crud from Linux driver, */ - for(i=0;i<10000000;i++){} + for (i = 0; i < 10000000; i++) { + } mmio_gpio[0x20] = 0x7e6802; mmio_gpio[0x10] = 0x7104; - for(i=0;i<100000000;i++){} + for (i = 0; i < 100000000; i++) { + } return; -} +} -static void serdes_autoconfig(struct driver_data *priv) +static void +serdes_autoconfig(struct driver_data *priv) { - int delay = 100000; + int delay = 100000; - /* Enable Auto negotiation in the PCS Layer*/ - rge_mii_write_internal(priv->pcs_mmio, 27, 0, 0x1000); - DELAY(delay); - rge_mii_write_internal(priv->pcs_mmio, 27, 0, 0x0200); - DELAY(delay); - - rge_mii_write_internal(priv->pcs_mmio, 28, 0, 0x1000); - DELAY(delay); - rge_mii_write_internal(priv->pcs_mmio, 28, 0, 0x0200); - DELAY(delay); - - rge_mii_write_internal(priv->pcs_mmio, 29, 0, 0x1000); - DELAY(delay); - rge_mii_write_internal(priv->pcs_mmio, 29, 0, 0x0200); - DELAY(delay); - - rge_mii_write_internal(priv->pcs_mmio, 30, 0, 0x1000); - DELAY(delay); - rge_mii_write_internal(priv->pcs_mmio, 30, 0, 0x0200); - DELAY(delay); + /* Enable Auto negotiation in the PCS Layer */ + rge_mii_write_internal(priv->pcs_mmio, 27, 0, 0x1000); + DELAY(delay); + rge_mii_write_internal(priv->pcs_mmio, 27, 0, 0x0200); + DELAY(delay); + + rge_mii_write_internal(priv->pcs_mmio, 28, 0, 0x1000); + DELAY(delay); + rge_mii_write_internal(priv->pcs_mmio, 28, 0, 0x0200); + DELAY(delay); + + rge_mii_write_internal(priv->pcs_mmio, 29, 0, 0x1000); + DELAY(delay); + rge_mii_write_internal(priv->pcs_mmio, 29, 0, 0x0200); + DELAY(delay); + + rge_mii_write_internal(priv->pcs_mmio, 30, 0, 0x1000); + DELAY(delay); + rge_mii_write_internal(priv->pcs_mmio, 30, 0, 0x0200); + DELAY(delay); } /***************************************************************** * Initialize GMAC *****************************************************************/ -static void +static void rmi_xlr_config_pde(struct driver_data *priv) { - int i = 0, cpu = 0, bucket = 0; - uint64_t bucket_map = 0; + int i = 0, cpu = 0, bucket = 0; + uint64_t bucket_map = 0; + /* uint32_t desc_pack_ctrl = 0; */ - uint32_t cpumask; + uint32_t cpumask; cpumask = PCPU_GET(cpumask) | PCPU_GET(other_cpus); for (i = 0; i < 32; i++) { if (cpumask & (1 << i)) { cpu = cpu_ltop_map[i]; - bucket = ((cpu >> 2) << 3);//| (cpu & 0x03); + bucket = ((cpu >> 2) << 3); + //|(cpu & 0x03); bucket_map |= (1ULL << bucket); dbg_msg("i=%d, cpu=%d, bucket = %d, bucket_map=%llx\n", - i, cpu, bucket, bucket_map); + i, cpu, bucket, bucket_map); } } /* bucket_map = 0x1; */ xlr_write_reg(priv->mmio, R_PDE_CLASS_0, (bucket_map & 0xffffffff)); xlr_write_reg(priv->mmio, R_PDE_CLASS_0 + 1, - ((bucket_map >> 32) & 0xffffffff)); + ((bucket_map >> 32) & 0xffffffff)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Thu Oct 29 21:23:44 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA5771065695; Thu, 29 Oct 2009 21:23:44 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B76EB8FC1A; Thu, 29 Oct 2009 21:23:44 +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 n9TLNiWG010251; Thu, 29 Oct 2009 21:23:44 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9TLNi4j010248; Thu, 29 Oct 2009 21:23:44 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200910292123.n9TLNi4j010248@svn.freebsd.org> From: Randall Stewart Date: Thu, 29 Oct 2009 21:23:44 +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: r198627 - projects/mips/sys/dev/rmi/sec 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, 29 Oct 2009 21:23:44 -0000 Author: rrs Date: Thu Oct 29 21:23:44 2009 New Revision: 198627 URL: http://svn.freebsd.org/changeset/base/198627 Log: white space changes Modified: projects/mips/sys/dev/rmi/sec/desc.h projects/mips/sys/dev/rmi/sec/rmilib.c projects/mips/sys/dev/rmi/sec/rmilib.h projects/mips/sys/dev/rmi/sec/rmisec.c Modified: projects/mips/sys/dev/rmi/sec/desc.h ============================================================================== --- projects/mips/sys/dev/rmi/sec/desc.h Thu Oct 29 21:21:01 2009 (r198626) +++ projects/mips/sys/dev/rmi/sec/desc.h Thu Oct 29 21:23:44 2009 (r198627) @@ -70,7 +70,7 @@ (word) |= (((value) & (field ## _BITS)) << (field ## _LSB)); } /* - * NOTE: May be used to build value specific mask + * NOTE: May be used to build value specific mask * (e.g. GEN_MASK(CTL_DSC_CPHR_3DES,CTL_DSC_CPHR_LSB) */ #define GEN_MASK(bits,lsb) ((bits) << (lsb)) @@ -122,7 +122,7 @@ * | Ctrl | Destination Id | 2'b00 | Desc Ctrl | 1'b0 | Data Error | Address of packet descriptor data structure | * ---------------------------------------------------------------------------------------------------------------------------- * - * The Instruction and Data Error codes are enumerated in the + * The Instruction and Data Error codes are enumerated in the * ControlDescriptor and PacketDescriptor sections below * */ @@ -132,12 +132,12 @@ * Operating assumptions * ===================== * - * + * * -> For all IpSec ops, I assume that all the IP/IPSec/TCP headers * and the data are present at the specified source addresses. * I also assume that all necessary header data already exists * at the destination. Additionally, in AH I assume that all - * mutable fields (IP.{TOS, Flags, Offset, TTL, Header_Checksum}) + * mutable fields (IP.{TOS, Flags, Offset, TTL, Header_Checksum}) * and the AH.Authentication_Data have been zeroed by the client. * * @@ -183,9 +183,9 @@ * * A) Rebuilding packets from fragments on dword boundaries. The discussion * below is exemplified by tests memcpy_all_off_frags and memcpy_same_off_frags - * + * * 1) The Offset before data/iv on first fragment is ALWAYS written back - * Non-zero dst dword or global offsets may cause more data to be + * Non-zero dst dword or global offsets may cause more data to be * written than the user-specified length. * * @@ -217,7 +217,7 @@ * Cipher_Offset = 3 * IV_Offset = 3 * Use_IV = ANY - * + * * * * 3 2 1 0 3 2 1 0 @@ -228,7 +228,7 @@ * ----------------------- ----------------------- * | | | | D05 | | | | D05 | D04 | * ----------------------- ----------------------- - * + * * 2) On fragments following the first, IV_Offset is overloaded to mean data offset * (number of dwords to skip from beginning of cacheline before starting processing) * and Use_IV is overloaded to mean do writeback the offset (in the clear). @@ -253,7 +253,7 @@ * Packet_Legth = 104 Dst_dword_offset = 1 * IV_Offset = 1 * Use_IV = 0 - * + * * * * 3 2 1 0 3 2 1 0 @@ -275,7 +275,7 @@ * engine always writes full lines, therefore ADD1 + 0x20 will be re-written. Setting Use_IV to 0 * will allow the sec pipe write back buffer to preserve D04, D05 from previous frag and only * receive D10, D11 thereby preserving the integrity of the previous data. - * + * * 3) On fragments following the first, !UseIV in combination w/ Dst_dword_offset >= (4 - IV_Offset) * will cause a wraparound of the write thus achieving all 16 possible (Initial_Location, Final_Location) * combinations for the data. @@ -284,7 +284,7 @@ * Example: * -------- * - * Contiguously merging 2 data sets above with a third located at ADD3. If this is the last fragment, + * Contiguously merging 2 data sets above with a third located at ADD3. If this is the last fragment, * reset its Next bit. * * @@ -295,7 +295,7 @@ * Packet_Legth = 152 Dst_dword_offset = 3 * IV_Offset = 3 * Use_IV = 0 - * + * * * * 3 2 1 0 3 2 1 0 @@ -312,13 +312,13 @@ * ----------------------- ----------------------- * | D21 | D20 | D1b | D1a | <- ADD1 + 0x80 * ----------------------- - * | D25 | D24 | D23 | D22 | + * | D25 | D24 | D23 | D22 | * ----------------------- - * | D29 | D28 | D27 | D26 | + * | D29 | D28 | D27 | D26 | * ----------------------- - * | D2d | D2c | D2b | D2a | + * | D2d | D2c | D2b | D2a | * ----------------------- - * |(D2d)|(D2c)| D2f | D2e | + * |(D2d)|(D2c)| D2f | D2e | * ----------------------- * * It is worth noticing that always writing full-lines causes the last 2 dwords in the reconstituted @@ -327,7 +327,7 @@ * * * B) Implications of fragmentation on AES - * + * * 1) AES is a 128 bit block cipher; therefore it requires an even dword total data length * Data fragments (provided there are more than 1) are allowed to have odd dword * data lengths provided the total length (cumulated over fragments) is an even dword @@ -354,9 +354,9 @@ * Use_IV = 1 * Cipher = Any AES * Next = 1 - * * - * + * + * * * 3 2 1 0 3 2 1 0 * ----------------------- ----------------------- @@ -396,7 +396,7 @@ /* #define MSG_CMD_CTL_ADDR */ -#define MSG_CMD_CTL_ADDR_LSB 0 +#define MSG_CMD_CTL_ADDR_LSB 0 #define MSG_CMD_CTL_ADDR_BITS FOURTY_BITS #define MSG_CMD_CTL_ADDR_MASK (MSG_CMD_CTL_ADDR_BITS << MSG_CMD_CTL_ADDR_LSB) @@ -419,8 +419,8 @@ #define MSG_CMD_DATA_LEN_MASK (MSG_CMD_DATA_LEN_BITS << MSG_CMD_DATA_LEN_LSB) /* #define MSG_CMD_DATA_ADDR */ -#define MSG_CMD_DATA_ADDR_LSB 0 -#define MSG_CMD_DATA_ADDR_BITS FOURTY_BITS +#define MSG_CMD_DATA_ADDR_LSB 0 +#define MSG_CMD_DATA_ADDR_BITS FOURTY_BITS #define MSG_CMD_DATA_ADDR_MASK (MSG_CMD_DATA_ADDR_BITS << MSG_CMD_DATA_ADDR_LSB) #define MSG_CMD_DATA_MASK (MSG_CMD_DATA_CTL_MASK | \ @@ -620,7 +620,7 @@ * For ARC4, IFetch/IDecode will always read exactly 4 * consecutive dwords into its CipherKey{0,3} regardless * of this quantity; it will however only use the specified - * number of bytes. + * number of bytes. * Cipher = 3'b000 Bypass * 3'b001 DES * 3'b010 3DES @@ -642,7 +642,7 @@ * and recalculate the Arc4 Sbox if Arc4 Cipher chosen; * This overrides LoadArc4State setting. * HASH.HMAC = 1'b0 Hash without HMAC - * 1'b1 Hash with HMAC + * 1'b1 Hash with HMAC * Needs to be set to 0 for GCM and Kasumi F9 authenticators * otherwise unpredictable results will be generated * Hash = 2'b00 Hash NOP @@ -712,7 +712,7 @@ #define CTL_DSC_ARC4_KEYLEN_MASK (CTL_DSC_ARC4_KEYLEN_BITS << CTL_DSC_ARC4_KEYLEN_LSB) /* #define CTL_DSC_CPHR (cipher) */ -#define CTL_DSC_CPHR_BYPASS 0 /* undefined */ +#define CTL_DSC_CPHR_BYPASS 0 /* undefined */ #define CTL_DSC_CPHR_DES 1 #define CTL_DSC_CPHR_3DES 2 #define CTL_DSC_CPHR_AES128 3 @@ -736,8 +736,8 @@ #define CTL_DSC_MODE_MASK (CTL_DSC_MODE_BITS << CTL_DSC_MODE_LSB) /* #define CTL_DSC_ICPHR */ -#define CTL_DSC_ICPHR_OKY 0 /* Old Keys */ -#define CTL_DSC_ICPHR_NKY 1 /* New Keys */ +#define CTL_DSC_ICPHR_OKY 0 /* Old Keys */ +#define CTL_DSC_ICPHR_NKY 1 /* New Keys */ #define CTL_DSC_ICPHR_LSB 28 #define CTL_DSC_ICPHR_BITS ONE_BIT #define CTL_DSC_ICPHR_MASK (CTL_DSC_ICPHR_BITS << CTL_DSC_ICPHR_LSB) @@ -788,1075 +788,1075 @@ /* AES256, (ECB, CBC, OFB, CTR, CFB), HMAC (MD5, SHA-1, SHA-256) - 96 bytes */ typedef struct AES256HMAC_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKey3; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; -} AES256HMAC_t, *AES256HMAC_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKey3; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; +} AES256HMAC_t, *AES256HMAC_pt; /* AES256, (ECB, CBC, OFB, CTR, CFB), HMAC (SHA-384, SHA-512) - 160 bytes */ typedef struct AES256HMAC2_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKey3; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; - uint64_t hmacKey8; - uint64_t hmacKey9; - uint64_t hmacKey10; - uint64_t hmacKey11; - uint64_t hmacKey12; - uint64_t hmacKey13; - uint64_t hmacKey14; - uint64_t hmacKey15; -} AES256HMAC2_t, *AES256HMAC2_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKey3; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; + uint64_t hmacKey8; + uint64_t hmacKey9; + uint64_t hmacKey10; + uint64_t hmacKey11; + uint64_t hmacKey12; + uint64_t hmacKey13; + uint64_t hmacKey14; + uint64_t hmacKey15; +} AES256HMAC2_t, *AES256HMAC2_pt; /* AES256, (ECB, CBC, OFB, CTR, CFB), GCM - 56 bytes */ typedef struct AES256GCM_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKey3; - uint64_t GCMH0; - uint64_t GCMH1; - uint64_t GCMSCI; -} AES256GCM_t, *AES256GCM_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKey3; + uint64_t GCMH0; + uint64_t GCMH1; + uint64_t GCMSCI; +} AES256GCM_t, *AES256GCM_pt; /* AES256, (ECB, CBC, OFB, CTR, CFB), F9 - 56 bytes */ typedef struct AES256F9_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKey3; - uint64_t authKey0; - uint64_t authKey1; -} AES256F9_t, *AES256F9_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKey3; + uint64_t authKey0; + uint64_t authKey1; +} AES256F9_t, *AES256F9_pt; /* AES256, (ECB, CBC, OFB, CTR, CFB), Non-HMAC (MD5, SHA-1, SHA-256) - 32 bytes */ typedef struct AES256_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKey3; -} AES256_t, *AES256_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKey3; +} AES256_t, *AES256_pt; /* All AES192 possibilities */ /* AES192, (ECB, CBC, OFB, CTR, CFB), HMAC (MD5, SHA-1, SHA-192) - 88 bytes */ typedef struct AES192HMAC_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; -} AES192HMAC_t, *AES192HMAC_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; +} AES192HMAC_t, *AES192HMAC_pt; /* AES192, (ECB, CBC, OFB, CTR, CFB), HMAC (SHA-384, SHA-512) - 152 bytes */ typedef struct AES192HMAC2_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; - uint64_t hmacKey8; - uint64_t hmacKey9; - uint64_t hmacKey10; - uint64_t hmacKey11; - uint64_t hmacKey12; - uint64_t hmacKey13; - uint64_t hmacKey14; - uint64_t hmacKey15; -} AES192HMAC2_t, *AES192HMAC2_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; + uint64_t hmacKey8; + uint64_t hmacKey9; + uint64_t hmacKey10; + uint64_t hmacKey11; + uint64_t hmacKey12; + uint64_t hmacKey13; + uint64_t hmacKey14; + uint64_t hmacKey15; +} AES192HMAC2_t, *AES192HMAC2_pt; /* AES192, (ECB, CBC, OFB, CTR, CFB), GCM - 48 bytes */ typedef struct AES192GCM_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t GCMH0; - uint64_t GCMH1; - uint64_t GCMSCI; -} AES192GCM_t, *AES192GCM_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t GCMH0; + uint64_t GCMH1; + uint64_t GCMSCI; +} AES192GCM_t, *AES192GCM_pt; /* AES192, (ECB, CBC, OFB, CTR, CFB), F9 - 48 bytes */ typedef struct AES192F9_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t authKey0; - uint64_t authKey1; -} AES192F9_t, *AES192F9_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t authKey0; + uint64_t authKey1; +} AES192F9_t, *AES192F9_pt; /* AES192, (ECB, CBC, OFB, CTR, CFB), Non-HMAC (MD5, SHA-1, SHA-192) - 24 bytes */ typedef struct AES192_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; -} AES192_t, *AES192_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; +} AES192_t, *AES192_pt; /* All AES128 possibilities */ /* AES128, (ECB, CBC, OFB, CTR, CFB), HMAC (MD5, SHA-1, SHA-128) - 80 bytes */ typedef struct AES128HMAC_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; -} AES128HMAC_t, *AES128HMAC_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; +} AES128HMAC_t, *AES128HMAC_pt; /* AES128, (ECB, CBC, OFB, CTR, CFB), HMAC (SHA-384, SHA-612) - 144 bytes */ typedef struct AES128HMAC2_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; - uint64_t hmacKey8; - uint64_t hmacKey9; - uint64_t hmacKey10; - uint64_t hmacKey11; - uint64_t hmacKey12; - uint64_t hmacKey13; - uint64_t hmacKey14; - uint64_t hmacKey15; -} AES128HMAC2_t, *AES128HMAC2_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; + uint64_t hmacKey8; + uint64_t hmacKey9; + uint64_t hmacKey10; + uint64_t hmacKey11; + uint64_t hmacKey12; + uint64_t hmacKey13; + uint64_t hmacKey14; + uint64_t hmacKey15; +} AES128HMAC2_t, *AES128HMAC2_pt; /* AES128, (ECB, CBC, OFB, CTR, CFB), GCM - 40 bytes */ typedef struct AES128GCM_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t GCMH0; - uint64_t GCMH1; - uint64_t GCMSCI; -} AES128GCM_t, *AES128GCM_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t GCMH0; + uint64_t GCMH1; + uint64_t GCMSCI; +} AES128GCM_t, *AES128GCM_pt; /* AES128, (ECB, CBC, OFB, CTR, CFB), F9 - 48 bytes */ typedef struct AES128F9_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t authKey0; - uint64_t authKey1; -} AES128F9_t, *AES128F9_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t authKey0; + uint64_t authKey1; +} AES128F9_t, *AES128F9_pt; /* AES128, (ECB, CBC, OFB, CTR, CFB), Non-HMAC (MD5, SHA-1, SHA-128) - 16 bytes */ typedef struct AES128_s { - uint64_t cipherKey0; - uint64_t cipherKey1; -} AES128_t, *AES128_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; +} AES128_t, *AES128_pt; /* AES128, (OFB F8), Non-HMAC (MD5, SHA-1, SHA-256) - 32 bytes */ typedef struct AES128F8_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKeyMask0; - uint64_t cipherKeyMask1; -} AES128F8_t, *AES128F8_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKeyMask0; + uint64_t cipherKeyMask1; +} AES128F8_t, *AES128F8_pt; /* AES128, (OFB F8), HMAC (MD5, SHA-1, SHA-256) - 96 bytes */ typedef struct AES128F8HMAC_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKeyMask0; - uint64_t cipherKeyMask1; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; -} AES128F8HMAC_t, *AES128F8HMAC_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKeyMask0; + uint64_t cipherKeyMask1; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; +} AES128F8HMAC_t, *AES128F8HMAC_pt; /* AES128, (OFB F8), HMAC (SHA-384, SHA-512) - 160 bytes */ typedef struct AES128F8HMAC2_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKeyMask0; - uint64_t cipherKeyMask1; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; - uint64_t hmacKey8; - uint64_t hmacKey9; - uint64_t hmacKey10; - uint64_t hmacKey11; - uint64_t hmacKey12; - uint64_t hmacKey13; - uint64_t hmacKey14; - uint64_t hmacKey15; -} AES128F8HMAC2_t, *AES128F8HMAC2_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKeyMask0; + uint64_t cipherKeyMask1; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; + uint64_t hmacKey8; + uint64_t hmacKey9; + uint64_t hmacKey10; + uint64_t hmacKey11; + uint64_t hmacKey12; + uint64_t hmacKey13; + uint64_t hmacKey14; + uint64_t hmacKey15; +} AES128F8HMAC2_t, *AES128F8HMAC2_pt; /* AES192, (OFB F8), Non-HMAC (MD5, SHA-1, SHA-256) - 48 bytes */ typedef struct AES192F8_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKeyMask0; - uint64_t cipherKeyMask1; - uint64_t cipherKeyMask2; -} AES192F8_t, *AES192F8_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKeyMask0; + uint64_t cipherKeyMask1; + uint64_t cipherKeyMask2; +} AES192F8_t, *AES192F8_pt; /* AES192, (OFB F8), HMAC (MD5, SHA-1, SHA-256) - 112 bytes */ typedef struct AES192F8HMAC_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKeyMask0; - uint64_t cipherKeyMask1; - uint64_t cipherKeyMask2; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; -} AES192F8HMAC_t, *AES192F8HMAC_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKeyMask0; + uint64_t cipherKeyMask1; + uint64_t cipherKeyMask2; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; +} AES192F8HMAC_t, *AES192F8HMAC_pt; /* AES192, (OFB F8), HMAC (SHA-384, SHA-512) - 176 bytes */ typedef struct AES192F8HMAC2_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKeyMask0; - uint64_t cipherKeyMask1; - uint64_t cipherKeyMask2; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; - uint64_t hmacKey8; - uint64_t hmacKey9; - uint64_t hmacKey10; - uint64_t hmacKey11; - uint64_t hmacKey12; - uint64_t hmacKey13; - uint64_t hmacKey14; - uint64_t hmacKey15; -} AES192F8HMAC2_t, *AES192F8HMAC2_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKeyMask0; + uint64_t cipherKeyMask1; + uint64_t cipherKeyMask2; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; + uint64_t hmacKey8; + uint64_t hmacKey9; + uint64_t hmacKey10; + uint64_t hmacKey11; + uint64_t hmacKey12; + uint64_t hmacKey13; + uint64_t hmacKey14; + uint64_t hmacKey15; +} AES192F8HMAC2_t, *AES192F8HMAC2_pt; /* AES256, (OFB F8), Non-HMAC (MD5, SHA-1, SHA-256) - 64 bytes */ typedef struct AES256F8_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKey3; - uint64_t cipherKeyMask0; - uint64_t cipherKeyMask1; - uint64_t cipherKeyMask2; - uint64_t cipherKeyMask3; -} AES256F8_t, *AES256F8_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKey3; + uint64_t cipherKeyMask0; + uint64_t cipherKeyMask1; + uint64_t cipherKeyMask2; + uint64_t cipherKeyMask3; +} AES256F8_t, *AES256F8_pt; /* AES256, (OFB F8), HMAC (MD5, SHA-1, SHA-256) - 128 bytes */ typedef struct AES256F8HMAC_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKey3; - uint64_t cipherKeyMask0; - uint64_t cipherKeyMask1; - uint64_t cipherKeyMask2; - uint64_t cipherKeyMask3; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; -} AES256F8HMAC_t, *AES256F8HMAC_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKey3; + uint64_t cipherKeyMask0; + uint64_t cipherKeyMask1; + uint64_t cipherKeyMask2; + uint64_t cipherKeyMask3; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; +} AES256F8HMAC_t, *AES256F8HMAC_pt; /* AES256, (OFB F8), HMAC (SHA-384, SHA-512) - 192 bytes */ typedef struct AES256F8HMAC2_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKey3; - uint64_t cipherKeyMask0; - uint64_t cipherKeyMask1; - uint64_t cipherKeyMask2; - uint64_t cipherKeyMask3; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; - uint64_t hmacKey8; - uint64_t hmacKey9; - uint64_t hmacKey10; - uint64_t hmacKey11; - uint64_t hmacKey12; - uint64_t hmacKey13; - uint64_t hmacKey14; - uint64_t hmacKey15; -} AES256F8HMAC2_t, *AES256F8HMAC2_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKey3; + uint64_t cipherKeyMask0; + uint64_t cipherKeyMask1; + uint64_t cipherKeyMask2; + uint64_t cipherKeyMask3; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; + uint64_t hmacKey8; + uint64_t hmacKey9; + uint64_t hmacKey10; + uint64_t hmacKey11; + uint64_t hmacKey12; + uint64_t hmacKey13; + uint64_t hmacKey14; + uint64_t hmacKey15; +} AES256F8HMAC2_t, *AES256F8HMAC2_pt; /* AES256, (F8), GCM - 40 bytes */ typedef struct AES128F8GCM_s { - uint64_t cipherKey0; - uint64_t cipherKey2; - uint64_t GCMH0; - uint64_t GCMH1; - uint64_t GCMSCI; -} AES128F8GCM_t, *AES128F8GCM_pt; + uint64_t cipherKey0; + uint64_t cipherKey2; + uint64_t GCMH0; + uint64_t GCMH1; + uint64_t GCMSCI; +} AES128F8GCM_t, *AES128F8GCM_pt; /* AES256, (F8), GCM - 48 bytes */ typedef struct AES192F8GCM_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t GCMH0; - uint64_t GCMH1; - uint64_t GCMSCI; -} AES192F8GCM_t, *AES192F8GCM_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t GCMH0; + uint64_t GCMH1; + uint64_t GCMSCI; +} AES192F8GCM_t, *AES192F8GCM_pt; /* AES256, (F8), GCM - 56 bytes */ typedef struct AES256F8GCM_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKey3; - uint64_t GCMH0; - uint64_t GCMH1; - uint64_t GCMSCI; -} AES256F8GCM_t, *AES256F8GCM_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKey3; + uint64_t GCMH0; + uint64_t GCMH1; + uint64_t GCMSCI; +} AES256F8GCM_t, *AES256F8GCM_pt; /* AES256, (F8), F9 - 40 bytes */ typedef struct AES128F8F9_s { - uint64_t cipherKey0; - uint64_t cipherKey2; - uint64_t authKey0; - uint64_t authKey1; -} AES128F8F9_t, *AES128F8F9_pt; + uint64_t cipherKey0; + uint64_t cipherKey2; + uint64_t authKey0; + uint64_t authKey1; +} AES128F8F9_t, *AES128F8F9_pt; /* AES256, (F8), F9 - 48 bytes */ typedef struct AES192F8F9_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t authKey0; - uint64_t authKey1; -} AES192F8F9_t, *AES192F8F9_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t authKey0; + uint64_t authKey1; +} AES192F8F9_t, *AES192F8F9_pt; /* AES256F8, (F8), F9 - 56 bytes */ typedef struct AES256F8F9_s { - uint64_t cipherKey0; - uint64_t cipherKey1; - uint64_t cipherKey2; - uint64_t cipherKey3; - uint64_t authKey0; - uint64_t authKey1; -} AES256F8F9_t, *AES256F8F9_pt; + uint64_t cipherKey0; + uint64_t cipherKey1; + uint64_t cipherKey2; + uint64_t cipherKey3; + uint64_t authKey0; + uint64_t authKey1; +} AES256F8F9_t, *AES256F8F9_pt; /* All DES possibilities */ /* DES, (ECB, CBC), HMAC (MD5, SHA-1, SHA-128) - 72 bytes */ typedef struct DESHMAC_s { - uint64_t cipherKey0; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; -} DESHMAC_t, *DESHMAC_pt; + uint64_t cipherKey0; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; +} DESHMAC_t, *DESHMAC_pt; /* DES, (ECB, CBC), HMAC (SHA-384, SHA-512) - 136 bytes */ typedef struct DESHMAC2_s { - uint64_t cipherKey0; - uint64_t hmacKey0; - uint64_t hmacKey1; - uint64_t hmacKey2; - uint64_t hmacKey3; - uint64_t hmacKey4; - uint64_t hmacKey5; - uint64_t hmacKey6; - uint64_t hmacKey7; - uint64_t hmacKey8; - uint64_t hmacKey9; - uint64_t hmacKey10; - uint64_t hmacKey11; - uint64_t hmacKey12; - uint64_t hmacKey13; - uint64_t hmacKey14; - uint64_t hmacKey15; -} DESHMAC2_t, *DESHMAC2_pt; + uint64_t cipherKey0; + uint64_t hmacKey0; + uint64_t hmacKey1; + uint64_t hmacKey2; + uint64_t hmacKey3; + uint64_t hmacKey4; + uint64_t hmacKey5; + uint64_t hmacKey6; + uint64_t hmacKey7; + uint64_t hmacKey8; + uint64_t hmacKey9; + uint64_t hmacKey10; + uint64_t hmacKey11; + uint64_t hmacKey12; + uint64_t hmacKey13; + uint64_t hmacKey14; + uint64_t hmacKey15; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Thu Oct 29 21:30:22 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 549E51065679; Thu, 29 Oct 2009 21:30:22 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 438D18FC12; Thu, 29 Oct 2009 21:30:22 +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 n9TLUMvA010753; Thu, 29 Oct 2009 21:30:22 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9TLUM2A010750; Thu, 29 Oct 2009 21:30:22 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200910292130.n9TLUM2A010750@svn.freebsd.org> From: Randall Stewart Date: Thu, 29 Oct 2009 21:30:22 +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: r198629 - projects/mips/sys/mips/rmi 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, 29 Oct 2009 21:30:22 -0000 Author: rrs Date: Thu Oct 29 21:30:21 2009 New Revision: 198629 URL: http://svn.freebsd.org/changeset/base/198629 Log: adds rmi specific mips extensions file and makes sure the includes point to the new place. Added: projects/mips/sys/mips/rmi/rmi_mips_exts.h Modified: projects/mips/sys/mips/rmi/xlr_machdep.c projects/mips/sys/mips/rmi/xlr_pci.c Added: projects/mips/sys/mips/rmi/rmi_mips_exts.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mips/sys/mips/rmi/rmi_mips_exts.h Thu Oct 29 21:30:21 2009 (r198629) @@ -0,0 +1,144 @@ +/*- + * Copyright (c) 2003-2009 RMI Corporation + * 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. + * 3. Neither the name of RMI Corporation, nor the names of its contributors, + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE 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. + * + * RMI_BSD */ +#ifndef __MIPS_EXTS_H__ +#define __MIPS_EXTS_H__ + +#define enable_KX(flags) __asm__ __volatile__ ( \ + ".set push\n" \ + ".set noat\n" \ + ".set noreorder\n" \ + "mfc0 %0, $12\n\t" \ + "ori $1, %0, 0x81\n\t" \ + "xori $1, 1\n\t" \ + "mtc0 $1, $12\n" \ + ".set pop\n" \ + : "=r"(flags) ) + +#define disable_KX(flags) __asm__ __volatile__ ( \ + ".set push\n" \ + "mtc0 %0, $12\n" \ + ".set pop\n" \ + : : "r"(flags) ) + +#define CPU_BLOCKID_IFU 0 +#define CPU_BLOCKID_ICU 1 +#define CPU_BLOCKID_IEU 2 +#define CPU_BLOCKID_LSU 3 +#define CPU_BLOCKID_MMU 4 +#define CPU_BLOCKID_PRF 5 + +#define LSU_CERRLOG_REGID 9 + +static __inline__ unsigned int read_32bit_phnx_ctrl_reg(int block, int reg) +{ + unsigned int __res; + + __asm__ __volatile__( + ".set\tpush\n\t" + ".set\tnoreorder\n\t" + "move $9, %1\n" + /* "mfcr\t$8, $9\n\t" */ + ".word 0x71280018\n" + "move %0, $8\n" + ".set\tpop" + : "=r" (__res) : "r"((block<<8)|reg) + : "$8", "$9" + ); + return __res; +} + +static __inline__ void write_32bit_phnx_ctrl_reg(int block, int reg, unsigned int value) +{ + __asm__ __volatile__( + ".set\tpush\n\t" + ".set\tnoreorder\n\t" + "move $8, %0\n" + "move $9, %1\n" + /* "mtcr\t$8, $9\n\t" */ + ".word 0x71280019\n" + ".set\tpop" + : + : "r" (value), "r"((block<<8)|reg) + : "$8", "$9" + ); +} + +static __inline__ unsigned long long read_64bit_phnx_ctrl_reg(int block, int reg) +{ + unsigned int high, low; + + __asm__ __volatile__( + ".set\tmips64\n\t" + "move $9, %2\n" + /* "mfcr $8, $9\n" */ + ".word 0x71280018\n" + "dsrl32 %0, $8, 0\n\t" + "dsll32 $8, $8, 0\n\t" + "dsrl32 %1, $8, 0\n\t" + ".set mips0" + : "=r" (high), "=r"(low) + : "r"((block<<8)|reg) + : "$8", "$9" + ); + + return ( (((unsigned long long)high)<<32) | low); +} + +static __inline__ void write_64bit_phnx_ctrl_reg(int block, int reg,unsigned long long value) +{ + __uint32_t low, high; + high = value >> 32; + low = value & 0xffffffff; + + __asm__ __volatile__( + ".set push\n" + ".set noreorder\n" + ".set mips4\n\t" + /* Set up "rs" */ + "move $9, %0\n" + + /* Store 64 bit value in "rt" */ + "dsll32 $10, %1, 0 \n\t" + "dsll32 $8, %2, 0 \n\t" + "dsrl32 $8, $8, 0 \n\t" + "or $10, $8, $8 \n\t" + + ".word 0x71280019\n" /* mtcr $8, $9 */ + + ".set pop\n" + + : /* No outputs */ + : "r"((block<<8)|reg), "r" (high), "r" (low) + : "$8", "$9", "$10" + ); +} + + +#endif Modified: projects/mips/sys/mips/rmi/xlr_machdep.c ============================================================================== --- projects/mips/sys/mips/rmi/xlr_machdep.c Thu Oct 29 21:25:16 2009 (r198628) +++ projects/mips/sys/mips/rmi/xlr_machdep.c Thu Oct 29 21:30:21 2009 (r198629) @@ -69,7 +69,7 @@ #include #include #include -#include +#include #include #include Modified: projects/mips/sys/mips/rmi/xlr_pci.c ============================================================================== --- projects/mips/sys/mips/rmi/xlr_pci.c Thu Oct 29 21:25:16 2009 (r198628) +++ projects/mips/sys/mips/rmi/xlr_pci.c Thu Oct 29 21:30:21 2009 (r198629) @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include From owner-svn-src-projects@FreeBSD.ORG Thu Oct 29 23:13:52 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C296510656B4 for ; Thu, 29 Oct 2009 23:13:52 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outC.internet-mail-service.net (outc.internet-mail-service.net [216.240.47.226]) by mx1.freebsd.org (Postfix) with ESMTP id A5A578FC12 for ; Thu, 29 Oct 2009 23:13:52 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 0753FB9858; Thu, 29 Oct 2009 16:00:09 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 66B7D2D6028; Thu, 29 Oct 2009 16:00:08 -0700 (PDT) Message-ID: <4AEA1E78.3010008@elischer.org> Date: Thu, 29 Oct 2009 16:00:08 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Randall Stewart References: <200910292130.n9TLUM2A010750@svn.freebsd.org> In-Reply-To: <200910292130.n9TLUM2A010750@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: r198629 - projects/mips/sys/mips/rmi 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, 29 Oct 2009 23:13:52 -0000 Randall Stewart wrote: > Author: rrs > Date: Thu Oct 29 21:30:21 2009 > New Revision: 198629 > URL: http://svn.freebsd.org/changeset/base/198629 > > Log: > adds rmi specific mips extensions file and makes sure > the includes point to the new place. nice.. pitty someone stripped out the fifty or so lines of comments that this file mus SURELY have had when it was written.. (surely?) > > Added: > projects/mips/sys/mips/rmi/rmi_mips_exts.h > Modified: > projects/mips/sys/mips/rmi/xlr_machdep.c > projects/mips/sys/mips/rmi/xlr_pci.c > > Added: projects/mips/sys/mips/rmi/rmi_mips_exts.h > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ projects/mips/sys/mips/rmi/rmi_mips_exts.h Thu Oct 29 21:30:21 2009 (r198629) > @@ -0,0 +1,144 @@ > +/*- > + * Copyright (c) 2003-2009 RMI Corporation > + * 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. > + * 3. Neither the name of RMI Corporation, nor the names of its contributors, > + * may be used to endorse or promote products derived from this software > + * without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE 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. > + * > + * RMI_BSD */ > +#ifndef __MIPS_EXTS_H__ > +#define __MIPS_EXTS_H__ > + > +#define enable_KX(flags) __asm__ __volatile__ ( \ > + ".set push\n" \ > + ".set noat\n" \ > + ".set noreorder\n" \ > + "mfc0 %0, $12\n\t" \ > + "ori $1, %0, 0x81\n\t" \ > + "xori $1, 1\n\t" \ > + "mtc0 $1, $12\n" \ > + ".set pop\n" \ > + : "=r"(flags) ) > + > +#define disable_KX(flags) __asm__ __volatile__ ( \ > + ".set push\n" \ > + "mtc0 %0, $12\n" \ > + ".set pop\n" \ > + : : "r"(flags) ) > + > +#define CPU_BLOCKID_IFU 0 > +#define CPU_BLOCKID_ICU 1 > +#define CPU_BLOCKID_IEU 2 > +#define CPU_BLOCKID_LSU 3 > +#define CPU_BLOCKID_MMU 4 > +#define CPU_BLOCKID_PRF 5 > + > +#define LSU_CERRLOG_REGID 9 > + > +static __inline__ unsigned int read_32bit_phnx_ctrl_reg(int block, int reg) > +{ > + unsigned int __res; > + > + __asm__ __volatile__( > + ".set\tpush\n\t" > + ".set\tnoreorder\n\t" > + "move $9, %1\n" > + /* "mfcr\t$8, $9\n\t" */ > + ".word 0x71280018\n" > + "move %0, $8\n" > + ".set\tpop" > + : "=r" (__res) : "r"((block<<8)|reg) > + : "$8", "$9" > + ); > + return __res; > +} > + > +static __inline__ void write_32bit_phnx_ctrl_reg(int block, int reg, unsigned int value) > +{ > + __asm__ __volatile__( > + ".set\tpush\n\t" > + ".set\tnoreorder\n\t" > + "move $8, %0\n" > + "move $9, %1\n" > + /* "mtcr\t$8, $9\n\t" */ > + ".word 0x71280019\n" > + ".set\tpop" > + : > + : "r" (value), "r"((block<<8)|reg) > + : "$8", "$9" > + ); > +} > + > +static __inline__ unsigned long long read_64bit_phnx_ctrl_reg(int block, int reg) > +{ > + unsigned int high, low; > + > + __asm__ __volatile__( > + ".set\tmips64\n\t" > + "move $9, %2\n" > + /* "mfcr $8, $9\n" */ > + ".word 0x71280018\n" > + "dsrl32 %0, $8, 0\n\t" > + "dsll32 $8, $8, 0\n\t" > + "dsrl32 %1, $8, 0\n\t" > + ".set mips0" > + : "=r" (high), "=r"(low) > + : "r"((block<<8)|reg) > + : "$8", "$9" > + ); > + > + return ( (((unsigned long long)high)<<32) | low); > +} > + > +static __inline__ void write_64bit_phnx_ctrl_reg(int block, int reg,unsigned long long value) > +{ > + __uint32_t low, high; > + high = value >> 32; > + low = value & 0xffffffff; > + > + __asm__ __volatile__( > + ".set push\n" > + ".set noreorder\n" > + ".set mips4\n\t" > + /* Set up "rs" */ > + "move $9, %0\n" > + > + /* Store 64 bit value in "rt" */ > + "dsll32 $10, %1, 0 \n\t" > + "dsll32 $8, %2, 0 \n\t" > + "dsrl32 $8, $8, 0 \n\t" > + "or $10, $8, $8 \n\t" > + > + ".word 0x71280019\n" /* mtcr $8, $9 */ > + > + ".set pop\n" > + > + : /* No outputs */ > + : "r"((block<<8)|reg), "r" (high), "r" (low) > + : "$8", "$9", "$10" > + ); > +} > + > + > +#endif > > Modified: projects/mips/sys/mips/rmi/xlr_machdep.c > ============================================================================== > --- projects/mips/sys/mips/rmi/xlr_machdep.c Thu Oct 29 21:25:16 2009 (r198628) > +++ projects/mips/sys/mips/rmi/xlr_machdep.c Thu Oct 29 21:30:21 2009 (r198629) > @@ -69,7 +69,7 @@ > #include > #include > #include > -#include > +#include > > #include > #include > > Modified: projects/mips/sys/mips/rmi/xlr_pci.c > ============================================================================== > --- projects/mips/sys/mips/rmi/xlr_pci.c Thu Oct 29 21:25:16 2009 (r198628) > +++ projects/mips/sys/mips/rmi/xlr_pci.c Thu Oct 29 21:30:21 2009 (r198629) > @@ -38,7 +38,7 @@ > #include > #include > #include > -#include > +#include > #include > #include > #include From owner-svn-src-projects@FreeBSD.ORG Thu Oct 29 23:22:41 2009 Return-Path: Delivered-To: svn-src-projects@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 974A41065694; Thu, 29 Oct 2009 23:22:41 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 119BC8FC0A; Thu, 29 Oct 2009 23:22:40 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id n9TNMZu7084071 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 29 Oct 2009 19:22:35 -0400 (EDT) (envelope-from rrs@lakerest.net) Message-Id: <6CCB8B83-4DA5-4494-9919-82C778E9745F@lakerest.net> From: Randall Stewart To: Julian Elischer In-Reply-To: <4AEA1E78.3010008@elischer.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Thu, 29 Oct 2009 19:22:35 -0400 References: <200910292130.n9TLUM2A010750@svn.freebsd.org> <4AEA1E78.3010008@elischer.org> X-Mailer: Apple Mail (2.936) Cc: svn-src-projects@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r198629 - projects/mips/sys/mips/rmi 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, 29 Oct 2009 23:22:41 -0000 Twas not me.. I suppose I could read the manuals I have and add comments BUT I would first have to check with RMI on that.. since I have been authorized to commit their code (and any mod's I need to make).. but I had to sign a NDA to get the manuals and such.. so I may not be able to ;-( R On Oct 29, 2009, at 7:00 PM, Julian Elischer wrote: > Randall Stewart wrote: >> Author: rrs >> Date: Thu Oct 29 21:30:21 2009 >> New Revision: 198629 >> URL: http://svn.freebsd.org/changeset/base/198629 >> Log: >> adds rmi specific mips extensions file and makes sure >> the includes point to the new place. > > nice.. pitty someone stripped out the fifty or so lines of comments > that this file mus SURELY have had when it was written.. (surely?) > >> Added: >> projects/mips/sys/mips/rmi/rmi_mips_exts.h >> Modified: >> projects/mips/sys/mips/rmi/xlr_machdep.c >> projects/mips/sys/mips/rmi/xlr_pci.c >> Added: projects/mips/sys/mips/rmi/rmi_mips_exts.h >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ projects/mips/sys/mips/rmi/rmi_mips_exts.h Thu Oct 29 21:30:21 >> 2009 (r198629) >> @@ -0,0 +1,144 @@ >> +/*- >> + * Copyright (c) 2003-2009 RMI Corporation >> + * 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. >> + * 3. Neither the name of RMI Corporation, nor the names of its >> contributors, >> + * may be used to endorse or promote products derived from this >> software >> + * without specific prior written permission. >> + * >> + * THIS SOFTWARE IS PROVIDED BY THE 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. >> + * >> + * RMI_BSD */ >> +#ifndef __MIPS_EXTS_H__ >> +#define __MIPS_EXTS_H__ >> + >> +#define enable_KX(flags) __asm__ __volatile__ ( \ >> + ".set push\n" \ >> + ".set noat\n" \ >> + ".set noreorder\n" \ >> + "mfc0 %0, $12\n\t" \ >> + "ori $1, %0, 0x81\n\t" \ >> + "xori $1, 1\n\t" \ >> + "mtc0 $1, $12\n" \ >> + ".set pop\n" \ >> + : "=r"(flags) ) >> + >> +#define disable_KX(flags) __asm__ __volatile__ ( \ >> + ".set push\n" \ >> + "mtc0 %0, $12\n" \ >> + ".set pop\n" \ >> + : : "r"(flags) ) >> + >> +#define CPU_BLOCKID_IFU 0 >> +#define CPU_BLOCKID_ICU 1 >> +#define CPU_BLOCKID_IEU 2 >> +#define CPU_BLOCKID_LSU 3 >> +#define CPU_BLOCKID_MMU 4 >> +#define CPU_BLOCKID_PRF 5 >> + >> +#define LSU_CERRLOG_REGID 9 >> + >> +static __inline__ unsigned int read_32bit_phnx_ctrl_reg(int block, >> int reg) >> +{ + unsigned int __res; >> + >> + __asm__ __volatile__( + ".set >> \tpush\n\t" + ".set\tnoreorder\n\t" >> + "move $9, %1\n" + /* "mfcr\t$8, $9\n\t" */ >> + ".word 0x71280018\n" >> + "move %0, $8\n" >> + ".set\tpop" + : "=r" (__res) : "r"((block<<8)|reg) >> + : "$8", "$9" >> + ); >> + return __res; >> +} >> + >> +static __inline__ void write_32bit_phnx_ctrl_reg(int block, int >> reg, unsigned int value) >> +{ >> + __asm__ __volatile__( + ".set\tpush\n\t" >> + ".set\tnoreorder\n\t" >> + "move $8, %0\n" >> + "move $9, %1\n" >> + /* "mtcr\t$8, $9\n\t" */ >> + ".word 0x71280019\n" >> + ".set\tpop" >> + : >> + : "r" (value), "r"((block<<8)|reg) >> + : "$8", "$9" >> + ); >> +} >> + >> +static __inline__ unsigned long long read_64bit_phnx_ctrl_reg(int >> block, int reg) >> +{ >> + unsigned int high, low; >> + >> + __asm__ __volatile__( >> + ".set\tmips64\n\t" >> + "move $9, %2\n" >> + /* "mfcr $8, $9\n" */ >> + ".word 0x71280018\n" >> + "dsrl32 %0, $8, 0\n\t" + "dsll32 $8, $8, 0\n >> \t" + "dsrl32 %1, $8, 0\n >> \t" + ".set mips0" >> + : "=r" (high), "=r"(low) >> + : "r"((block<<8)|reg) >> + : "$8", "$9" >> + ); >> + >> + return ( (((unsigned long long)high)<<32) | low); >> +} >> + >> +static __inline__ void write_64bit_phnx_ctrl_reg(int block, int >> reg,unsigned long long value) >> +{ >> + __uint32_t low, high; >> + high = value >> 32; >> + low = value & 0xffffffff; >> + >> + __asm__ __volatile__( >> + ".set push\n" >> + ".set noreorder\n" >> + ".set mips4\n\t" >> + /* Set up "rs" */ >> + "move $9, %0\n" >> + >> + /* Store 64 bit value in "rt" */ >> + "dsll32 $10, %1, 0 \n\t" >> + "dsll32 $8, %2, 0 \n\t" >> + "dsrl32 $8, $8, 0 \n\t" >> + "or $10, $8, $8 \n\t" >> + >> + ".word 0x71280019\n" /* mtcr $8, $9 */ >> + >> + ".set pop\n" >> + >> + : /* No outputs */ >> + : "r"((block<<8)|reg), "r" (high), "r" (low) >> + : "$8", "$9", "$10" >> + ); >> +} >> + >> + >> +#endif >> Modified: projects/mips/sys/mips/rmi/xlr_machdep.c >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- projects/mips/sys/mips/rmi/xlr_machdep.c Thu Oct 29 21:25:16 >> 2009 (r198628) >> +++ projects/mips/sys/mips/rmi/xlr_machdep.c Thu Oct 29 21:30:21 >> 2009 (r198629) >> @@ -69,7 +69,7 @@ >> #include >> #include >> #include >> -#include >> +#include >> #include >> #include >> Modified: projects/mips/sys/mips/rmi/xlr_pci.c >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- projects/mips/sys/mips/rmi/xlr_pci.c Thu Oct 29 21:25:16 2009 >> (r198628) >> +++ projects/mips/sys/mips/rmi/xlr_pci.c Thu Oct 29 21:30:21 2009 >> (r198629) >> @@ -38,7 +38,7 @@ >> #include >> #include >> #include >> -#include >> +#include >> #include >> #include >> #include > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-svn-src-projects@FreeBSD.ORG Fri Oct 30 00:37:05 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A8601065692; Fri, 30 Oct 2009 00:37:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECE158FC08; Fri, 30 Oct 2009 00:37:04 +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 n9U0b4N3018252; Fri, 30 Oct 2009 00:37:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9U0b40R018250; Fri, 30 Oct 2009 00:37:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200910300037.n9U0b40R018250@svn.freebsd.org> From: Warner Losh Date: Fri, 30 Oct 2009 00:37: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: r198665 - projects/mips/sys/mips/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: Fri, 30 Oct 2009 00:37:05 -0000 Author: imp Date: Fri Oct 30 00:37:04 2009 New Revision: 198665 URL: http://svn.freebsd.org/changeset/base/198665 Log: db_expr_t is really closer to a register_t. Submitted by: bde@ Modified: projects/mips/sys/mips/include/db_machdep.h Modified: projects/mips/sys/mips/include/db_machdep.h ============================================================================== --- projects/mips/sys/mips/include/db_machdep.h Thu Oct 29 23:28:48 2009 (r198664) +++ projects/mips/sys/mips/include/db_machdep.h Fri Oct 30 00:37:04 2009 (r198665) @@ -46,7 +46,7 @@ typedef struct trapframe db_regs_t; extern db_regs_t ddb_regs; /* register state */ typedef vm_offset_t db_addr_t; /* address - unsigned */ -typedef intptr_t db_expr_t; /* expression - signed */ +typedef register_t db_expr_t; /* expression - signed */ #if BYTE_ORDER == _BIG_ENDIAN #define BYTE_MSF (1) From owner-svn-src-projects@FreeBSD.ORG Fri Oct 30 00:37:51 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11D581065692; Fri, 30 Oct 2009 00:37:51 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0000B8FC27; Fri, 30 Oct 2009 00:37:50 +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 n9U0bow8018297; Fri, 30 Oct 2009 00:37:50 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9U0bo43018295; Fri, 30 Oct 2009 00:37:50 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200910300037.n9U0bo43018295@svn.freebsd.org> From: Warner Losh Date: Fri, 30 Oct 2009 00:37:50 +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: r198666 - projects/mips/sys/mips/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: Fri, 30 Oct 2009 00:37:51 -0000 Author: imp Date: Fri Oct 30 00:37:50 2009 New Revision: 198666 URL: http://svn.freebsd.org/changeset/base/198666 Log: Add some newer MIPS CO cores. Modified: projects/mips/sys/mips/include/cpuregs.h Modified: projects/mips/sys/mips/include/cpuregs.h ============================================================================== --- projects/mips/sys/mips/include/cpuregs.h Fri Oct 30 00:37:04 2009 (r198665) +++ projects/mips/sys/mips/include/cpuregs.h Fri Oct 30 00:37:50 2009 (r198666) @@ -850,6 +850,10 @@ #define MIPS_4KEc_R2 0x90 /* MIPS 4KEc_R2 ISA 32 Rel 2 */ #define MIPS_4KEmp_R2 0x91 /* MIPS 4KEm/4KEp_R2 ISA 32 Rel 2 */ #define MIPS_4KSd 0x92 /* MIPS 4KSd ISA 32 Rel 2 */ +#define MIPS_24K 0x93 /* MIPS 24Kc/24Kf ISA 32 Rel 2 */ +#define MIPS_34K 0x95 /* MIPS 34K ISA 32 R2 MT */ +#define MIPS_24KE 0x96 /* MIPS 24KEc ISA 32 Rel 2 */ +#define MIPS_74K 0x97 /* MIPS 74Kc/74Kf ISA 32 Rel 2 */ /* * AMD (company ID 3) use the processor ID field to donote the CPU core From owner-svn-src-projects@FreeBSD.ORG Fri Oct 30 01:40:32 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D57F1106566C; Fri, 30 Oct 2009 01:40:32 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB8728FC3B; Fri, 30 Oct 2009 01:40: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 n9U1eWL6019502; Fri, 30 Oct 2009 01:40:32 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9U1eW8T019500; Fri, 30 Oct 2009 01:40:32 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <200910300140.n9U1eW8T019500@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Fri, 30 Oct 2009 01:40: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: r198667 - projects/mips/sys/mips/atheros 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, 30 Oct 2009 01:40:32 -0000 Author: gonzo Date: Fri Oct 30 01:40:32 2009 New Revision: 198667 URL: http://svn.freebsd.org/changeset/base/198667 Log: - Fix build with DEVICE_POLLING enabled Modified: projects/mips/sys/mips/atheros/if_arge.c Modified: projects/mips/sys/mips/atheros/if_arge.c ============================================================================== --- projects/mips/sys/mips/atheros/if_arge.c Fri Oct 30 00:37:50 2009 (r198666) +++ projects/mips/sys/mips/atheros/if_arge.c Fri Oct 30 01:40:32 2009 (r198667) @@ -104,7 +104,7 @@ static int arge_resume(device_t); static int arge_rx_ring_init(struct arge_softc *); static int arge_tx_ring_init(struct arge_softc *); #ifdef DEVICE_POLLING -static void arge_poll(struct ifnet *, enum poll_cmd, int); +static int arge_poll(struct ifnet *, enum poll_cmd, int); #endif static int arge_shutdown(device_t); static void arge_start(struct ifnet *); @@ -112,7 +112,7 @@ static void arge_start_locked(struct ifn static void arge_stop(struct arge_softc *); static int arge_suspend(device_t); -static void arge_rx_locked(struct arge_softc *); +static int arge_rx_locked(struct arge_softc *); static void arge_tx_locked(struct arge_softc *); static void arge_intr(void *); static int arge_intr_filter(void *); @@ -1394,17 +1394,20 @@ arge_fixup_rx(struct mbuf *m) } #ifdef DEVICE_POLLING -static void +static int arge_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct arge_softc *sc = ifp->if_softc; + int rx_npkts = 0; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { ARGE_LOCK(sc); arge_tx_locked(sc); - arge_rx_locked(sc); + rx_npkts = arge_rx_locked(sc); ARGE_UNLOCK(sc); } + + return (rx_npkts); } #endif /* DEVICE_POLLING */ @@ -1470,7 +1473,7 @@ arge_tx_locked(struct arge_softc *sc) } -static void +static int arge_rx_locked(struct arge_softc *sc) { struct arge_rxdesc *rxd; @@ -1478,6 +1481,7 @@ arge_rx_locked(struct arge_softc *sc) int cons, prog, packet_len, i; struct arge_desc *cur_rx; struct mbuf *m; + int rx_npkts = 0; ARGE_LOCK_ASSERT(sc); @@ -1510,6 +1514,7 @@ arge_rx_locked(struct arge_softc *sc) /* Skip 4 bytes of CRC */ m->m_pkthdr.len = m->m_len = packet_len - ETHER_CRC_LEN; ifp->if_ipackets++; + rx_npkts++; ARGE_UNLOCK(sc); (*ifp->if_input)(ifp, m); @@ -1535,6 +1540,8 @@ arge_rx_locked(struct arge_softc *sc) sc->arge_cdata.arge_rx_cons = cons; } + + return (rx_npkts); } static int From owner-svn-src-projects@FreeBSD.ORG Fri Oct 30 08:51:38 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7138C1065695; Fri, 30 Oct 2009 08:51:38 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D167B8FC25; Fri, 30 Oct 2009 08:51:37 +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 n9U8pbvW033837; Fri, 30 Oct 2009 08:51:37 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9U8pbWr033836; Fri, 30 Oct 2009 08:51:37 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200910300851.n9U8pbWr033836@svn.freebsd.org> From: Randall Stewart Date: Fri, 30 Oct 2009 08:51:37 +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: r198668 - projects/mips/sys/dev/uart X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2009 08:51:38 -0000 Author: rrs Date: Fri Oct 30 08:51:37 2009 New Revision: 198668 URL: http://svn.freebsd.org/changeset/base/198668 Log: This is a temporary hack so we can get RMI to re-use the ns8250 code. We will need to think of a better way for code reuse for this (see sys/mips/rmi/uart_cpu_mips_xlr.c for where it is used) Modified: projects/mips/sys/dev/uart/uart_dev_ns8250.c Modified: projects/mips/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- projects/mips/sys/dev/uart/uart_dev_ns8250.c Fri Oct 30 01:40:32 2009 (r198667) +++ projects/mips/sys/dev/uart/uart_dev_ns8250.c Fri Oct 30 08:51:37 2009 (r198668) @@ -224,7 +224,7 @@ static void ns8250_putc(struct uart_bas static int ns8250_rxready(struct uart_bas *bas); static int ns8250_getc(struct uart_bas *bas, struct mtx *); -static struct uart_ops uart_ns8250_ops = { +struct uart_ops uart_ns8250_ops = { .probe = ns8250_probe, .init = ns8250_init, .term = ns8250_term, From owner-svn-src-projects@FreeBSD.ORG Fri Oct 30 08:53:13 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47F4E106566C; Fri, 30 Oct 2009 08:53:12 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33ACA8FC0C; Fri, 30 Oct 2009 08:53:12 +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 n9U8rC01034062; Fri, 30 Oct 2009 08:53:12 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9U8rBC7034035; Fri, 30 Oct 2009 08:53:11 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200910300853.n9U8rBC7034035@svn.freebsd.org> From: Randall Stewart Date: Fri, 30 Oct 2009 08:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198669 - in projects/mips/sys: conf mips/adm5120 mips/alchemy mips/atheros mips/idt mips/include mips/malta mips/mips mips/octeon1 mips/sentry5 mips/sibyte 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, 30 Oct 2009 08:53:13 -0000 Author: rrs Date: Fri Oct 30 08:53:11 2009 New Revision: 198669 URL: http://svn.freebsd.org/changeset/base/198669 Log: With this commit our friend RMI will now compile. I have not tested it and the chances of it running yet are about ZERO.. but it will now compile. The hard part now begins, making it run ;-) Added: projects/mips/sys/mips/include/fls64.h Modified: projects/mips/sys/conf/files.mips projects/mips/sys/conf/options.mips projects/mips/sys/mips/adm5120/adm5120_machdep.c projects/mips/sys/mips/adm5120/files.adm5120 projects/mips/sys/mips/alchemy/alchemy_machdep.c projects/mips/sys/mips/alchemy/files.alchemy projects/mips/sys/mips/atheros/ar71xx_machdep.c projects/mips/sys/mips/atheros/files.ar71xx projects/mips/sys/mips/idt/files.idt projects/mips/sys/mips/idt/idt_machdep.c projects/mips/sys/mips/include/hwfunc.h projects/mips/sys/mips/include/intr_machdep.h projects/mips/sys/mips/include/kdb.h projects/mips/sys/mips/malta/files.malta projects/mips/sys/mips/malta/malta_machdep.c projects/mips/sys/mips/mips/cpu.c projects/mips/sys/mips/mips/machdep.c projects/mips/sys/mips/mips/tick.c projects/mips/sys/mips/octeon1/files.octeon1 projects/mips/sys/mips/octeon1/octeon_machdep.c projects/mips/sys/mips/sentry5/files.sentry5 projects/mips/sys/mips/sentry5/s5_machdep.c projects/mips/sys/mips/sibyte/files.sibyte projects/mips/sys/mips/sibyte/sb_machdep.c Modified: projects/mips/sys/conf/files.mips ============================================================================== --- projects/mips/sys/conf/files.mips Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/conf/files.mips Fri Oct 30 08:53:11 2009 (r198669) @@ -45,7 +45,6 @@ mips/mips/vm_machdep.c standard # ---------------------------------------------------------------------- # Phase 4 # ---------------------------------------------------------------------- -mips/mips/tick.c standard # ---------------------------------------------------------------------- # Phase 5 # ---------------------------------------------------------------------- Modified: projects/mips/sys/conf/options.mips ============================================================================== --- projects/mips/sys/conf/options.mips Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/conf/options.mips Fri Oct 30 08:53:11 2009 (r198669) @@ -51,9 +51,11 @@ CFE_ENV_SIZE opt_global.h KERNPHYSADDR opt_global.h KERNVIRTADDR opt_global.h PHYSADDR opt_global.h - +PHYS_ADDR_64BIT opt_global.h +NOFPU opt_global.h TARGET_OCTEON opt_global.h TARGET_EMULATOR opt_ddb.h +TARGET_XLR_XLS opt_global.h TICK_USE_YAMON_FREQ opt_global.h TICK_USE_MALTA_RTC opt_global.h Modified: projects/mips/sys/mips/adm5120/adm5120_machdep.c ============================================================================== --- projects/mips/sys/mips/adm5120/adm5120_machdep.c Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/adm5120/adm5120_machdep.c Fri Oct 30 08:53:11 2009 (r198669) @@ -73,6 +73,12 @@ __FBSDID("$FreeBSD$"); extern int *edata; extern int *end; +void +platform_cpu_init() +{ + /* Nothing special */ +} + static void mips_init(void) { Modified: projects/mips/sys/mips/adm5120/files.adm5120 ============================================================================== --- projects/mips/sys/mips/adm5120/files.adm5120 Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/adm5120/files.adm5120 Fri Oct 30 08:53:11 2009 (r198669) @@ -10,3 +10,4 @@ mips/adm5120/uart_bus_adm5120.c optional mips/adm5120/uart_cpu_adm5120.c optional uart mips/adm5120/uart_dev_adm5120.c optional uart mips/mips/intr_machdep.c standard +mips/mips/tick.c standard Modified: projects/mips/sys/mips/alchemy/alchemy_machdep.c ============================================================================== --- projects/mips/sys/mips/alchemy/alchemy_machdep.c Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/alchemy/alchemy_machdep.c Fri Oct 30 08:53:11 2009 (r198669) @@ -73,6 +73,12 @@ __FBSDID("$FreeBSD$"); extern int *edata; extern int *end; +void +platform_cpu_init() +{ + /* Nothing special */ +} + static void mips_init(void) { Modified: projects/mips/sys/mips/alchemy/files.alchemy ============================================================================== --- projects/mips/sys/mips/alchemy/files.alchemy Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/alchemy/files.alchemy Fri Oct 30 08:53:11 2009 (r198669) @@ -6,3 +6,4 @@ mips/alchemy/obio.c standard mips/alchemy/uart_bus_alchemy.c optional uart mips/alchemy/uart_cpu_alchemy.c optional uart mips/mips/intr_machdep.c standard +mips/mips/tick.c standard Modified: projects/mips/sys/mips/atheros/ar71xx_machdep.c ============================================================================== --- projects/mips/sys/mips/atheros/ar71xx_machdep.c Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/atheros/ar71xx_machdep.c Fri Oct 30 08:53:11 2009 (r198669) @@ -98,6 +98,12 @@ parse_argv(char *str) } void +platform_cpu_init() +{ + /* Nothing special */ +} + +void platform_halt(void) { Modified: projects/mips/sys/mips/atheros/files.ar71xx ============================================================================== --- projects/mips/sys/mips/atheros/files.ar71xx Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/atheros/files.ar71xx Fri Oct 30 08:53:11 2009 (r198669) @@ -13,3 +13,4 @@ mips/atheros/uart_bus_ar71xx.c optional mips/atheros/uart_cpu_ar71xx.c optional uart mips/atheros/ar71xx_bus_space_reversed.c standard mips/mips/intr_machdep.c standard +mips/mips/tick.c standard Modified: projects/mips/sys/mips/idt/files.idt ============================================================================== --- projects/mips/sys/mips/idt/files.idt Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/idt/files.idt Fri Oct 30 08:53:11 2009 (r198669) @@ -7,3 +7,4 @@ mips/idt/obio.c standard mips/idt/uart_cpu_rc32434.c optional uart mips/idt/uart_bus_rc32434.c optional uart mips/mips/intr_machdep.c standard +mips/mips/tick.c standard Modified: projects/mips/sys/mips/idt/idt_machdep.c ============================================================================== --- projects/mips/sys/mips/idt/idt_machdep.c Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/idt/idt_machdep.c Fri Oct 30 08:53:11 2009 (r198669) @@ -76,6 +76,12 @@ extern int *edata; extern int *end; void +platform_cpu_init() +{ + /* Nothing special */ +} + +void platform_halt(void) { Added: projects/mips/sys/mips/include/fls64.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mips/sys/mips/include/fls64.h Fri Oct 30 08:53:11 2009 (r198669) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2003-2009 RMI Corporation + * 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. + * 3. Neither the name of RMI Corporation, nor the names of its contributors, + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE 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. + * + * RMI_BSD */ +#ifndef _MIPS_FLS64_H_ +#define _MIPS_FLS64_H_ + +/* + * Find Last Set bit (64 bit) + */ +static inline int +fls64(__uint64_t mask) +{ + int bit; + + if (mask == 0) + return (0); + for (bit = 1; ((mask & 0x1ULL) == 0); bit++) + mask = mask >> 1; + return (bit); +} +#endif Modified: projects/mips/sys/mips/include/hwfunc.h ============================================================================== --- projects/mips/sys/mips/include/hwfunc.h Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/include/hwfunc.h Fri Oct 30 08:53:11 2009 (r198669) @@ -29,7 +29,7 @@ #define _MACHINE_HWFUNC_H_ struct trapframe; - +struct timecounter; /* * Hooks downward into hardware functionality. */ @@ -39,4 +39,12 @@ void platform_intr(struct trapframe *); void platform_reset(void); void platform_start(__register_t, __register_t, __register_t, __register_t); +/* For clocks and ticks and such */ +void platform_initclocks(void); +uint64_t platform_get_frequency(void); +unsigned platform_get_timecount(struct timecounter *); + +/* For hardware specific CPU initialization */ +void platform_cpu_init(void); +void platform_secondary_init(void); #endif /* !_MACHINE_HWFUNC_H_ */ Modified: projects/mips/sys/mips/include/intr_machdep.h ============================================================================== --- projects/mips/sys/mips/include/intr_machdep.h Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/include/intr_machdep.h Fri Oct 30 08:53:11 2009 (r198669) @@ -52,9 +52,9 @@ extern struct mips_intrhand mips_intr_ha struct trapframe; -void cpu_establish_hardintr(const char *, int (*)(void*), void (*)(void*), +void cpu_establish_hardintr(const char *, driver_filter_t *, driver_intr_t *, void *, int, int, void **); -void cpu_establish_softintr(const char *, int (*)(void*), void (*)(void*), +void cpu_establish_softintr(const char *, driver_filter_t *, void (*)(void*), void *, int, int, void **); void cpu_intr(struct trapframe *); Modified: projects/mips/sys/mips/include/kdb.h ============================================================================== --- projects/mips/sys/mips/include/kdb.h Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/include/kdb.h Fri Oct 30 08:53:11 2009 (r198669) @@ -47,4 +47,8 @@ kdb_cpu_trap(int vector, int _) { } +static __inline void +kdb_cpu_sync_icache(unsigned char *addr, size_t size) +{ +} #endif /* _MACHINE_KDB_H_ */ Modified: projects/mips/sys/mips/malta/files.malta ============================================================================== --- projects/mips/sys/mips/malta/files.malta Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/malta/files.malta Fri Oct 30 08:53:11 2009 (r198669) @@ -8,3 +8,4 @@ dev/uart/uart_dev_ns8250.c optional uar mips/malta/malta_machdep.c standard mips/malta/yamon.c standard mips/mips/intr_machdep.c standard +mips/mips/tick.c standard Modified: projects/mips/sys/mips/malta/malta_machdep.c ============================================================================== --- projects/mips/sys/mips/malta/malta_machdep.c Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/malta/malta_machdep.c Fri Oct 30 08:53:11 2009 (r198669) @@ -97,6 +97,12 @@ static int malta_lcd_offs[] = { MALTA_ASCIIPOS7 }; +void +platform_cpu_init() +{ + /* Nothing special */ +} + /* * Put character to Malta LCD at given position. */ Modified: projects/mips/sys/mips/mips/cpu.c ============================================================================== --- projects/mips/sys/mips/mips/cpu.c Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/mips/cpu.c Fri Oct 30 08:53:11 2009 (r198669) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include static struct mips_cpuinfo cpuinfo; @@ -129,6 +130,7 @@ mips_get_identity(struct mips_cpuinfo *c void mips_cpu_init(void) { + platform_cpu_init(); mips_get_identity(&cpuinfo); num_tlbentries = cpuinfo.tlb_nentries; Mips_SetWIRED(0); Modified: projects/mips/sys/mips/mips/machdep.c ============================================================================== --- projects/mips/sys/mips/mips/machdep.c Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/mips/machdep.c Fri Oct 30 08:53:11 2009 (r198669) @@ -112,8 +112,8 @@ int clocks_running = 0; vm_offset_t kstack0; #ifdef SMP -struct pcpu __pcpu[32]; -char pcpu_boot_stack[KSTACK_PAGES * PAGE_SIZE * (MAXCPU-1)]; +struct pcpu __pcpu[MAXCPU]; +char pcpu_boot_stack[KSTACK_PAGES * PAGE_SIZE * MAXCPU]; #else struct pcpu pcpu; struct pcpu *pcpup = &pcpu; @@ -288,6 +288,12 @@ mips_proc0_init(void) PCPU_SET(curpcb, thread0.td_pcb); } +void +cpu_initclocks(void) +{ + platform_initclocks(); +} + struct msgbuf *msgbufp=0; /* Modified: projects/mips/sys/mips/mips/tick.c ============================================================================== --- projects/mips/sys/mips/mips/tick.c Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/mips/tick.c Fri Oct 30 08:53:11 2009 (r198669) @@ -59,6 +59,8 @@ u_int32_t counter_upper = 0; u_int32_t counter_lower_last = 0; int tick_started = 0; +void platform_initclocks(void); + struct clk_ticks { u_long hard_ticks; @@ -97,9 +99,8 @@ mips_timer_early_init(uint64_t clock_hz) } void -cpu_initclocks(void) +platform_initclocks(void) { - if (!tick_started) { tc_init(&counter_timecounter); tick_started++; Modified: projects/mips/sys/mips/octeon1/files.octeon1 ============================================================================== --- projects/mips/sys/mips/octeon1/files.octeon1 Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/octeon1/files.octeon1 Fri Oct 30 08:53:11 2009 (r198669) @@ -14,3 +14,4 @@ mips/octeon1/uart_bus_octeonusart.c opt mips/octeon1/uart_cpu_octeonusart.c optional uart mips/octeon1/uart_dev_oct16550.c optional uart mips/mips/intr_machdep.c standard +mips/mips/tick.c standard Modified: projects/mips/sys/mips/octeon1/octeon_machdep.c ============================================================================== --- projects/mips/sys/mips/octeon1/octeon_machdep.c Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/octeon1/octeon_machdep.c Fri Oct 30 08:53:11 2009 (r198669) @@ -80,6 +80,11 @@ __FBSDID("$FreeBSD$"); extern int *edata; extern int *end; +void +platform_cpu_init() +{ + /* Nothing special yet */ +} /* * Perform a board-level soft-reset. Modified: projects/mips/sys/mips/sentry5/files.sentry5 ============================================================================== --- projects/mips/sys/mips/sentry5/files.sentry5 Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/sentry5/files.sentry5 Fri Oct 30 08:53:11 2009 (r198669) @@ -6,3 +6,4 @@ # which just need to be tweaked for attachment to an SSB system bus. mips/sentry5/s5_machdep.c standard mips/mips/intr_machdep.c standard +mips/mips/tick.c standard Modified: projects/mips/sys/mips/sentry5/s5_machdep.c ============================================================================== --- projects/mips/sys/mips/sentry5/s5_machdep.c Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/sentry5/s5_machdep.c Fri Oct 30 08:53:11 2009 (r198669) @@ -87,6 +87,12 @@ extern uint32_t cfe_vector; extern int *edata; extern int *end; +void +platform_cpu_init() +{ + /* Nothing special */ +} + static void mips_init(void) { Modified: projects/mips/sys/mips/sibyte/files.sibyte ============================================================================== --- projects/mips/sys/mips/sibyte/files.sibyte Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/sibyte/files.sibyte Fri Oct 30 08:53:11 2009 (r198669) @@ -7,3 +7,4 @@ mips/sibyte/sb_scd.c standard mips/sibyte/ata_zbbus.c standard mips/mips/intr_machdep.c standard mips/sibyte/sb_asm.S standard +mips/mips/tick.c standard Modified: projects/mips/sys/mips/sibyte/sb_machdep.c ============================================================================== --- projects/mips/sys/mips/sibyte/sb_machdep.c Fri Oct 30 08:51:37 2009 (r198668) +++ projects/mips/sys/mips/sibyte/sb_machdep.c Fri Oct 30 08:53:11 2009 (r198669) @@ -98,6 +98,12 @@ extern void cfe_env_init(void); extern int *edata; extern int *end; +void +platform_cpu_init() +{ + /* Nothing special */ +} + static void mips_init(void) { From owner-svn-src-projects@FreeBSD.ORG Fri Oct 30 21:01:00 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4102E106566B; Fri, 30 Oct 2009 21:01:00 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C2F88FC0A; Fri, 30 Oct 2009 21:01:00 +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 n9UL0xDr057507; Fri, 30 Oct 2009 21:00:59 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9UL0xBm057467; Fri, 30 Oct 2009 21:00:59 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200910302100.n9UL0xBm057467@svn.freebsd.org> From: Lawrence Stewart Date: Fri, 30 Oct 2009 21:00:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198701 - in projects/tcp_ffcaia2008_head: . bin/cat bin/csh bin/ls bin/sh bin/uuidgen contrib/gcc/config/i386 contrib/ncurses/ncurses/base etc etc/defaults etc/rc.d games/number gnu/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: Fri, 30 Oct 2009 21:01:00 -0000 Author: lstewart Date: Fri Oct 30 21:00:58 2009 New Revision: 198701 URL: http://svn.freebsd.org/changeset/base/198701 Log: Merge r197958:198700 from head. Sponsored by: FreeBSD Foundation Added: projects/tcp_ffcaia2008_head/lib/libc/sys/pselect.2 - copied unchanged from r198700, head/lib/libc/sys/pselect.2 projects/tcp_ffcaia2008_head/lib/libthr/arch/ia64/ia64/_umtx_op_err.S - copied unchanged from r198700, head/lib/libthr/arch/ia64/ia64/_umtx_op_err.S projects/tcp_ffcaia2008_head/share/man/man9/BUS_BIND_INTR.9 - copied unchanged from r198700, head/share/man/man9/BUS_BIND_INTR.9 projects/tcp_ffcaia2008_head/share/man/man9/BUS_DESCRIBE_INTR.9 - copied unchanged from r198700, head/share/man/man9/BUS_DESCRIBE_INTR.9 projects/tcp_ffcaia2008_head/sys/cam/ata/ata_pmp.c - copied unchanged from r198700, head/sys/cam/ata/ata_pmp.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/common/dmextern.c - copied unchanged from r198700, head/sys/contrib/dev/acpica/common/dmextern.c projects/tcp_ffcaia2008_head/sys/contrib/dev/iwn/iwlwifi-4965-228.57.2.23.fw.uu - copied unchanged from r198700, head/sys/contrib/dev/iwn/iwlwifi-4965-228.57.2.23.fw.uu projects/tcp_ffcaia2008_head/sys/contrib/dev/iwn/iwlwifi-5000-5.4.A.11.fw.uu - copied unchanged from r198700, head/sys/contrib/dev/iwn/iwlwifi-5000-5.4.A.11.fw.uu projects/tcp_ffcaia2008_head/sys/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu - copied unchanged from r198700, head/sys/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu projects/tcp_ffcaia2008_head/sys/dev/usb/controller/ehcireg.h - copied unchanged from r198700, head/sys/dev/usb/controller/ehcireg.h projects/tcp_ffcaia2008_head/sys/dev/usb/controller/ohcireg.h - copied unchanged from r198700, head/sys/dev/usb/controller/ohcireg.h projects/tcp_ffcaia2008_head/sys/dev/usb/controller/uhcireg.h - copied unchanged from r198700, head/sys/dev/usb/controller/uhcireg.h projects/tcp_ffcaia2008_head/sys/modules/iwnfw/Makefile.inc - copied unchanged from r198700, head/sys/modules/iwnfw/Makefile.inc projects/tcp_ffcaia2008_head/sys/modules/iwnfw/iwn4965/ - copied from r198700, head/sys/modules/iwnfw/iwn4965/ projects/tcp_ffcaia2008_head/sys/modules/iwnfw/iwn5000/ - copied from r198700, head/sys/modules/iwnfw/iwn5000/ projects/tcp_ffcaia2008_head/sys/modules/iwnfw/iwn5150/ - copied from r198700, head/sys/modules/iwnfw/iwn5150/ projects/tcp_ffcaia2008_head/tools/regression/bin/sh/expansion/question1.0 - copied unchanged from r198700, head/tools/regression/bin/sh/expansion/question1.0 projects/tcp_ffcaia2008_head/tools/regression/bin/sh/expansion/set-u1.0 - copied unchanged from r198700, head/tools/regression/bin/sh/expansion/set-u1.0 projects/tcp_ffcaia2008_head/tools/regression/bin/sh/expansion/set-u2.0 - copied unchanged from r198700, head/tools/regression/bin/sh/expansion/set-u2.0 Deleted: projects/tcp_ffcaia2008_head/lib/libc/gen/pselect.3 projects/tcp_ffcaia2008_head/lib/libc/gen/pselect.c projects/tcp_ffcaia2008_head/sys/compat/x86bios/x86bios_alloc.c projects/tcp_ffcaia2008_head/sys/contrib/dev/iwn/iwlwifi-4965-4.44.17.fw.uu projects/tcp_ffcaia2008_head/sys/contrib/x86emu/x86emu_util.c projects/tcp_ffcaia2008_head/sys/dev/usb/serial/uch341.c projects/tcp_ffcaia2008_head/sys/modules/usb/uch341/ Modified: projects/tcp_ffcaia2008_head/ (props changed) projects/tcp_ffcaia2008_head/Makefile.inc1 projects/tcp_ffcaia2008_head/ObsoleteFiles.inc projects/tcp_ffcaia2008_head/UPDATING projects/tcp_ffcaia2008_head/bin/cat/Makefile projects/tcp_ffcaia2008_head/bin/csh/iconv_stub.c projects/tcp_ffcaia2008_head/bin/ls/ls.c projects/tcp_ffcaia2008_head/bin/sh/expand.c projects/tcp_ffcaia2008_head/bin/sh/parser.c projects/tcp_ffcaia2008_head/bin/sh/sh.1 projects/tcp_ffcaia2008_head/bin/uuidgen/Makefile projects/tcp_ffcaia2008_head/contrib/gcc/config/i386/i386.c projects/tcp_ffcaia2008_head/contrib/ncurses/ncurses/base/lib_getch.c projects/tcp_ffcaia2008_head/etc/defaults/rc.conf projects/tcp_ffcaia2008_head/etc/gettytab projects/tcp_ffcaia2008_head/etc/rc.d/faith projects/tcp_ffcaia2008_head/etc/rc.d/netoptions projects/tcp_ffcaia2008_head/etc/rc.d/stf projects/tcp_ffcaia2008_head/etc/rc.subr projects/tcp_ffcaia2008_head/games/number/Makefile projects/tcp_ffcaia2008_head/games/number/number.c projects/tcp_ffcaia2008_head/gnu/lib/libgcov/Makefile projects/tcp_ffcaia2008_head/kerberos5/lib/libgssapi_krb5/Makefile projects/tcp_ffcaia2008_head/kerberos5/lib/libgssapi_spnego/Makefile projects/tcp_ffcaia2008_head/lib/libbluetooth/bluetooth.3 projects/tcp_ffcaia2008_head/lib/libbluetooth/bluetooth.h projects/tcp_ffcaia2008_head/lib/libc/gen/Makefile.inc projects/tcp_ffcaia2008_head/lib/libc/gen/Symbol.map projects/tcp_ffcaia2008_head/lib/libc/gen/getcwd.c projects/tcp_ffcaia2008_head/lib/libc/gen/wordexp.c projects/tcp_ffcaia2008_head/lib/libc/include/namespace.h projects/tcp_ffcaia2008_head/lib/libc/include/un-namespace.h projects/tcp_ffcaia2008_head/lib/libc/nls/C.msg projects/tcp_ffcaia2008_head/lib/libc/sys/Makefile.inc projects/tcp_ffcaia2008_head/lib/libc/sys/Symbol.map projects/tcp_ffcaia2008_head/lib/libfetch/common.c projects/tcp_ffcaia2008_head/lib/libpmc/libpmc.c projects/tcp_ffcaia2008_head/lib/libstand/open.c projects/tcp_ffcaia2008_head/lib/libthr/arch/ia64/Makefile.inc projects/tcp_ffcaia2008_head/lib/libthr/arch/ia64/include/pthread_md.h projects/tcp_ffcaia2008_head/lib/libthr/pthread.map projects/tcp_ffcaia2008_head/lib/libthr/thread/thr_private.h projects/tcp_ffcaia2008_head/lib/libthr/thread/thr_syscalls.c projects/tcp_ffcaia2008_head/lib/libusb/libusb20_ugen20.c projects/tcp_ffcaia2008_head/release/doc/README projects/tcp_ffcaia2008_head/release/doc/en_US.ISO8859-1/errata/article.sgml projects/tcp_ffcaia2008_head/release/doc/share/mk/doc.relnotes.mk projects/tcp_ffcaia2008_head/release/doc/share/sgml/release.dsl projects/tcp_ffcaia2008_head/release/doc/share/sgml/release.ent projects/tcp_ffcaia2008_head/release/scripts/package-split.py projects/tcp_ffcaia2008_head/sbin/Makefile.inc projects/tcp_ffcaia2008_head/sbin/adjkerntz/Makefile projects/tcp_ffcaia2008_head/sbin/atacontrol/Makefile projects/tcp_ffcaia2008_head/sbin/atm/atmconfig/Makefile projects/tcp_ffcaia2008_head/sbin/badsect/Makefile projects/tcp_ffcaia2008_head/sbin/bsdlabel/Makefile projects/tcp_ffcaia2008_head/sbin/camcontrol/Makefile projects/tcp_ffcaia2008_head/sbin/ccdconfig/Makefile projects/tcp_ffcaia2008_head/sbin/clri/Makefile projects/tcp_ffcaia2008_head/sbin/comcontrol/Makefile projects/tcp_ffcaia2008_head/sbin/conscontrol/Makefile projects/tcp_ffcaia2008_head/sbin/ddb/ddb_capture.c projects/tcp_ffcaia2008_head/sbin/dhclient/Makefile projects/tcp_ffcaia2008_head/sbin/dhclient/bpf.c projects/tcp_ffcaia2008_head/sbin/dhclient/dhcpd.h projects/tcp_ffcaia2008_head/sbin/dhclient/packet.c projects/tcp_ffcaia2008_head/sbin/dmesg/Makefile projects/tcp_ffcaia2008_head/sbin/dump/Makefile projects/tcp_ffcaia2008_head/sbin/dumpfs/Makefile projects/tcp_ffcaia2008_head/sbin/dumpfs/dumpfs.c projects/tcp_ffcaia2008_head/sbin/dumpon/Makefile projects/tcp_ffcaia2008_head/sbin/geom/Makefile projects/tcp_ffcaia2008_head/sbin/geom/Makefile.inc projects/tcp_ffcaia2008_head/sbin/geom/class/part/Makefile projects/tcp_ffcaia2008_head/sbin/geom/class/part/geom_part.c projects/tcp_ffcaia2008_head/sbin/geom/class/part/gpart.8 projects/tcp_ffcaia2008_head/sbin/ggate/Makefile.inc projects/tcp_ffcaia2008_head/sbin/growfs/Makefile projects/tcp_ffcaia2008_head/sbin/gvinum/Makefile projects/tcp_ffcaia2008_head/sbin/ifconfig/af_nd6.c projects/tcp_ffcaia2008_head/sbin/ifconfig/ifieee80211.c projects/tcp_ffcaia2008_head/sbin/init/Makefile projects/tcp_ffcaia2008_head/sbin/ipf/Makefile.inc projects/tcp_ffcaia2008_head/sbin/iscontrol/Makefile projects/tcp_ffcaia2008_head/sbin/kldunload/Makefile projects/tcp_ffcaia2008_head/sbin/ldconfig/Makefile projects/tcp_ffcaia2008_head/sbin/md5/Makefile projects/tcp_ffcaia2008_head/sbin/mdconfig/Makefile projects/tcp_ffcaia2008_head/sbin/mdmfs/Makefile projects/tcp_ffcaia2008_head/sbin/mksnap_ffs/Makefile projects/tcp_ffcaia2008_head/sbin/mount/Makefile projects/tcp_ffcaia2008_head/sbin/mount_autofs/Makefile projects/tcp_ffcaia2008_head/sbin/mount_cd9660/Makefile projects/tcp_ffcaia2008_head/sbin/mount_ext2fs/Makefile projects/tcp_ffcaia2008_head/sbin/mount_msdosfs/Makefile projects/tcp_ffcaia2008_head/sbin/mount_nfs/mount_nfs.c projects/tcp_ffcaia2008_head/sbin/mount_nullfs/Makefile projects/tcp_ffcaia2008_head/sbin/mount_reiserfs/Makefile projects/tcp_ffcaia2008_head/sbin/mount_unionfs/Makefile projects/tcp_ffcaia2008_head/sbin/newfs_msdos/Makefile projects/tcp_ffcaia2008_head/sbin/nfsiod/Makefile projects/tcp_ffcaia2008_head/sbin/pfctl/Makefile projects/tcp_ffcaia2008_head/sbin/rcorder/Makefile projects/tcp_ffcaia2008_head/sbin/reboot/Makefile projects/tcp_ffcaia2008_head/sbin/recoverdisk/Makefile projects/tcp_ffcaia2008_head/sbin/routed/Makefile projects/tcp_ffcaia2008_head/sbin/savecore/Makefile projects/tcp_ffcaia2008_head/sbin/sconfig/Makefile projects/tcp_ffcaia2008_head/sbin/shutdown/Makefile projects/tcp_ffcaia2008_head/sbin/spppcontrol/Makefile projects/tcp_ffcaia2008_head/sbin/swapon/Makefile projects/tcp_ffcaia2008_head/sbin/sysctl/sysctl.c projects/tcp_ffcaia2008_head/sbin/tunefs/Makefile projects/tcp_ffcaia2008_head/sbin/tunefs/tunefs.8 projects/tcp_ffcaia2008_head/share/man/man4/Makefile projects/tcp_ffcaia2008_head/share/man/man4/acpi_hp.4 projects/tcp_ffcaia2008_head/share/man/man4/acpi_wmi.4 projects/tcp_ffcaia2008_head/share/man/man4/atapicam.4 projects/tcp_ffcaia2008_head/share/man/man4/bge.4 projects/tcp_ffcaia2008_head/share/man/man4/hifn.4 projects/tcp_ffcaia2008_head/share/man/man4/ichwd.4 projects/tcp_ffcaia2008_head/share/man/man4/iwn.4 projects/tcp_ffcaia2008_head/share/man/man4/iwnfw.4 projects/tcp_ffcaia2008_head/share/man/man4/mac_mls.4 projects/tcp_ffcaia2008_head/share/man/man4/malo.4 projects/tcp_ffcaia2008_head/share/man/man4/msk.4 projects/tcp_ffcaia2008_head/share/man/man4/sbp_targ.4 projects/tcp_ffcaia2008_head/share/man/man4/targ.4 projects/tcp_ffcaia2008_head/share/man/man4/umass.4 projects/tcp_ffcaia2008_head/share/man/man4/urtw.4 projects/tcp_ffcaia2008_head/share/man/man5/regdomain.5 projects/tcp_ffcaia2008_head/share/man/man9/Makefile projects/tcp_ffcaia2008_head/share/man/man9/get_cyclecount.9 projects/tcp_ffcaia2008_head/share/misc/bsd-family-tree projects/tcp_ffcaia2008_head/share/misc/committers-src.dot projects/tcp_ffcaia2008_head/share/mk/bsd.sys.mk projects/tcp_ffcaia2008_head/share/zoneinfo/Makefile projects/tcp_ffcaia2008_head/share/zoneinfo/asia projects/tcp_ffcaia2008_head/share/zoneinfo/australasia projects/tcp_ffcaia2008_head/share/zoneinfo/southamerica projects/tcp_ffcaia2008_head/sys/amd64/acpica/acpi_wakecode.S projects/tcp_ffcaia2008_head/sys/amd64/amd64/intr_machdep.c projects/tcp_ffcaia2008_head/sys/amd64/amd64/machdep.c projects/tcp_ffcaia2008_head/sys/amd64/amd64/nexus.c projects/tcp_ffcaia2008_head/sys/amd64/amd64/pmap.c projects/tcp_ffcaia2008_head/sys/amd64/conf/GENERIC projects/tcp_ffcaia2008_head/sys/amd64/ia32/ia32_signal.c projects/tcp_ffcaia2008_head/sys/amd64/include/intr_machdep.h projects/tcp_ffcaia2008_head/sys/amd64/linux32/linux32_machdep.c projects/tcp_ffcaia2008_head/sys/amd64/linux32/linux32_sysvec.c projects/tcp_ffcaia2008_head/sys/arm/arm/machdep.c projects/tcp_ffcaia2008_head/sys/arm/arm/pmap.c projects/tcp_ffcaia2008_head/sys/arm/conf/HL200 projects/tcp_ffcaia2008_head/sys/arm/conf/KB920X projects/tcp_ffcaia2008_head/sys/boot/common/commands.c projects/tcp_ffcaia2008_head/sys/boot/i386/zfsboot/zfsboot.c projects/tcp_ffcaia2008_head/sys/boot/zfs/zfs.c projects/tcp_ffcaia2008_head/sys/boot/zfs/zfsimpl.c projects/tcp_ffcaia2008_head/sys/cam/ata/ata_da.c projects/tcp_ffcaia2008_head/sys/cam/ata/ata_xpt.c projects/tcp_ffcaia2008_head/sys/cam/cam.h projects/tcp_ffcaia2008_head/sys/cam/cam_periph.c projects/tcp_ffcaia2008_head/sys/cam/cam_queue.c projects/tcp_ffcaia2008_head/sys/cam/cam_xpt.c projects/tcp_ffcaia2008_head/sys/cam/cam_xpt_internal.h projects/tcp_ffcaia2008_head/sys/cam/scsi/scsi_all.c projects/tcp_ffcaia2008_head/sys/cam/scsi/scsi_cd.c projects/tcp_ffcaia2008_head/sys/cam/scsi/scsi_ch.c projects/tcp_ffcaia2008_head/sys/cam/scsi/scsi_da.c projects/tcp_ffcaia2008_head/sys/cam/scsi/scsi_low.c projects/tcp_ffcaia2008_head/sys/cam/scsi/scsi_pt.c projects/tcp_ffcaia2008_head/sys/cam/scsi/scsi_sa.c projects/tcp_ffcaia2008_head/sys/cam/scsi/scsi_targ_bh.c projects/tcp_ffcaia2008_head/sys/cam/scsi/scsi_target.c projects/tcp_ffcaia2008_head/sys/cam/scsi/scsi_xpt.c projects/tcp_ffcaia2008_head/sys/cddl/boot/zfs/zfsimpl.h projects/tcp_ffcaia2008_head/sys/compat/freebsd32/freebsd32_misc.c projects/tcp_ffcaia2008_head/sys/compat/freebsd32/freebsd32_proto.h projects/tcp_ffcaia2008_head/sys/compat/freebsd32/freebsd32_syscall.h projects/tcp_ffcaia2008_head/sys/compat/freebsd32/freebsd32_syscalls.c projects/tcp_ffcaia2008_head/sys/compat/freebsd32/freebsd32_sysent.c projects/tcp_ffcaia2008_head/sys/compat/freebsd32/syscalls.master projects/tcp_ffcaia2008_head/sys/compat/linux/linux_socket.c projects/tcp_ffcaia2008_head/sys/compat/x86bios/x86bios.c projects/tcp_ffcaia2008_head/sys/compat/x86bios/x86bios.h projects/tcp_ffcaia2008_head/sys/conf/NOTES projects/tcp_ffcaia2008_head/sys/conf/files projects/tcp_ffcaia2008_head/sys/conf/files.amd64 projects/tcp_ffcaia2008_head/sys/conf/files.i386 projects/tcp_ffcaia2008_head/sys/conf/options projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/changes.txt projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/common/adfile.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/common/adisasm.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/common/adwalk.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/common/dmtable.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/common/getopt.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/compiler/aslload.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/debugger/dbcmds.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/debugger/dbinput.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/disassembler/dmutils.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/disassembler/dmwalk.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/dispatcher/dswload.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/events/evregion.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/include/acapps.h projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/include/acdebug.h projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/include/acdisasm.h projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/include/acglobal.h projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/include/aclocal.h projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/include/acpixf.h projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/namespace/nsrepair.c projects/tcp_ffcaia2008_head/sys/contrib/dev/acpica/utilities/utglobal.c projects/tcp_ffcaia2008_head/sys/contrib/dev/iwn/LICENSE projects/tcp_ffcaia2008_head/sys/dev/aac/aac.c projects/tcp_ffcaia2008_head/sys/dev/aac/aac_cam.c projects/tcp_ffcaia2008_head/sys/dev/aac/aacreg.h projects/tcp_ffcaia2008_head/sys/dev/aac/aacvar.h projects/tcp_ffcaia2008_head/sys/dev/acpi_support/acpi_aiboost.c projects/tcp_ffcaia2008_head/sys/dev/ahci/ahci.c projects/tcp_ffcaia2008_head/sys/dev/ahci/ahci.h projects/tcp_ffcaia2008_head/sys/dev/aic7xxx/aic79xx_pci.c projects/tcp_ffcaia2008_head/sys/dev/aic7xxx/aicasm/aicasm.c projects/tcp_ffcaia2008_head/sys/dev/amr/amr.c projects/tcp_ffcaia2008_head/sys/dev/ata/ata-all.h projects/tcp_ffcaia2008_head/sys/dev/ata/ata-disk.c projects/tcp_ffcaia2008_head/sys/dev/ata/ata-pci.h projects/tcp_ffcaia2008_head/sys/dev/ata/ata-queue.c projects/tcp_ffcaia2008_head/sys/dev/ata/ata-raid.c projects/tcp_ffcaia2008_head/sys/dev/ata/atapi-cam.c projects/tcp_ffcaia2008_head/sys/dev/ata/atapi-cd.c projects/tcp_ffcaia2008_head/sys/dev/ata/atapi-fd.c projects/tcp_ffcaia2008_head/sys/dev/ata/atapi-tape.c projects/tcp_ffcaia2008_head/sys/dev/ata/chipsets/ata-adaptec.c projects/tcp_ffcaia2008_head/sys/dev/ata/chipsets/ata-marvell.c projects/tcp_ffcaia2008_head/sys/dev/ata/chipsets/ata-nvidia.c projects/tcp_ffcaia2008_head/sys/dev/ata/chipsets/ata-serverworks.c projects/tcp_ffcaia2008_head/sys/dev/ata/chipsets/ata-via.c projects/tcp_ffcaia2008_head/sys/dev/atkbdc/atkbd.c projects/tcp_ffcaia2008_head/sys/dev/bce/if_bce.c projects/tcp_ffcaia2008_head/sys/dev/bce/if_bcereg.h projects/tcp_ffcaia2008_head/sys/dev/bge/if_bge.c projects/tcp_ffcaia2008_head/sys/dev/dpms/dpms.c projects/tcp_ffcaia2008_head/sys/dev/drm/drmP.h projects/tcp_ffcaia2008_head/sys/dev/drm/drm_scatter.c projects/tcp_ffcaia2008_head/sys/dev/drm/mach64_state.c projects/tcp_ffcaia2008_head/sys/dev/drm/r600_blit.c projects/tcp_ffcaia2008_head/sys/dev/drm/radeon_cp.c projects/tcp_ffcaia2008_head/sys/dev/fb/vesa.c projects/tcp_ffcaia2008_head/sys/dev/fb/vesa.h projects/tcp_ffcaia2008_head/sys/dev/fdc/fdc.c projects/tcp_ffcaia2008_head/sys/dev/gem/if_gem_pci.c projects/tcp_ffcaia2008_head/sys/dev/hwpmc/hwpmc_core.c projects/tcp_ffcaia2008_head/sys/dev/hwpmc/hwpmc_mod.c projects/tcp_ffcaia2008_head/sys/dev/ips/ips_disk.c projects/tcp_ffcaia2008_head/sys/dev/iwn/if_iwn.c projects/tcp_ffcaia2008_head/sys/dev/iwn/if_iwnreg.h projects/tcp_ffcaia2008_head/sys/dev/iwn/if_iwnvar.h projects/tcp_ffcaia2008_head/sys/dev/mpt/mpt.c projects/tcp_ffcaia2008_head/sys/dev/mpt/mpt.h projects/tcp_ffcaia2008_head/sys/dev/mpt/mpt_cam.c projects/tcp_ffcaia2008_head/sys/dev/mpt/mpt_raid.c projects/tcp_ffcaia2008_head/sys/dev/msk/if_msk.c projects/tcp_ffcaia2008_head/sys/dev/msk/if_mskreg.h projects/tcp_ffcaia2008_head/sys/dev/mwl/if_mwl_pci.c projects/tcp_ffcaia2008_head/sys/dev/mxge/if_mxge.c projects/tcp_ffcaia2008_head/sys/dev/mxge/if_mxge_var.h projects/tcp_ffcaia2008_head/sys/dev/pci/pci.c projects/tcp_ffcaia2008_head/sys/dev/pci/vga_pci.c projects/tcp_ffcaia2008_head/sys/dev/ppbus/lpt.c projects/tcp_ffcaia2008_head/sys/dev/ppbus/pcfclock.c projects/tcp_ffcaia2008_head/sys/dev/siis/siis.c projects/tcp_ffcaia2008_head/sys/dev/syscons/syscons.c projects/tcp_ffcaia2008_head/sys/dev/usb/controller/ehci.c projects/tcp_ffcaia2008_head/sys/dev/usb/controller/ehci.h projects/tcp_ffcaia2008_head/sys/dev/usb/controller/ehci_ixp4xx.c projects/tcp_ffcaia2008_head/sys/dev/usb/controller/ehci_mbus.c projects/tcp_ffcaia2008_head/sys/dev/usb/controller/ehci_pci.c projects/tcp_ffcaia2008_head/sys/dev/usb/controller/ohci.c projects/tcp_ffcaia2008_head/sys/dev/usb/controller/ohci.h projects/tcp_ffcaia2008_head/sys/dev/usb/controller/ohci_atmelarm.c projects/tcp_ffcaia2008_head/sys/dev/usb/controller/ohci_pci.c projects/tcp_ffcaia2008_head/sys/dev/usb/controller/uhci.c projects/tcp_ffcaia2008_head/sys/dev/usb/controller/uhci.h projects/tcp_ffcaia2008_head/sys/dev/usb/controller/uhci_pci.c projects/tcp_ffcaia2008_head/sys/dev/usb/input/ukbd.c projects/tcp_ffcaia2008_head/sys/dev/usb/input/ums.c projects/tcp_ffcaia2008_head/sys/dev/usb/net/if_cdce.c projects/tcp_ffcaia2008_head/sys/dev/usb/serial/uchcom.c projects/tcp_ffcaia2008_head/sys/dev/usb/storage/umass.c projects/tcp_ffcaia2008_head/sys/dev/usb/usbdevs projects/tcp_ffcaia2008_head/sys/dev/usb/wlan/if_rum.c projects/tcp_ffcaia2008_head/sys/dev/usb/wlan/if_uath.c projects/tcp_ffcaia2008_head/sys/dev/usb/wlan/if_upgt.c projects/tcp_ffcaia2008_head/sys/dev/usb/wlan/if_ural.c projects/tcp_ffcaia2008_head/sys/dev/usb/wlan/if_urtw.c projects/tcp_ffcaia2008_head/sys/dev/usb/wlan/if_urtwreg.h projects/tcp_ffcaia2008_head/sys/dev/usb/wlan/if_urtwvar.h projects/tcp_ffcaia2008_head/sys/dev/usb/wlan/if_zyd.c projects/tcp_ffcaia2008_head/sys/fs/nfsclient/nfs_clport.c projects/tcp_ffcaia2008_head/sys/fs/nfsclient/nfs_clstate.c projects/tcp_ffcaia2008_head/sys/fs/nfsclient/nfs_clsubs.c projects/tcp_ffcaia2008_head/sys/fs/smbfs/smbfs_vfsops.c projects/tcp_ffcaia2008_head/sys/fs/tmpfs/tmpfs_subr.c projects/tcp_ffcaia2008_head/sys/geom/part/g_part_gpt.c projects/tcp_ffcaia2008_head/sys/i386/conf/GENERIC projects/tcp_ffcaia2008_head/sys/i386/conf/NOTES projects/tcp_ffcaia2008_head/sys/i386/i386/intr_machdep.c projects/tcp_ffcaia2008_head/sys/i386/i386/machdep.c projects/tcp_ffcaia2008_head/sys/i386/i386/nexus.c projects/tcp_ffcaia2008_head/sys/i386/i386/pmap.c projects/tcp_ffcaia2008_head/sys/i386/include/intr_machdep.h projects/tcp_ffcaia2008_head/sys/i386/linux/linux_machdep.c projects/tcp_ffcaia2008_head/sys/i386/linux/linux_sysvec.c projects/tcp_ffcaia2008_head/sys/i386/xen/pmap.c projects/tcp_ffcaia2008_head/sys/ia64/conf/GENERIC projects/tcp_ffcaia2008_head/sys/ia64/ia64/machdep.c projects/tcp_ffcaia2008_head/sys/ia64/ia64/pmap.c projects/tcp_ffcaia2008_head/sys/ia64/include/asm.h projects/tcp_ffcaia2008_head/sys/ia64/include/param.h projects/tcp_ffcaia2008_head/sys/kern/bus_if.m projects/tcp_ffcaia2008_head/sys/kern/imgact_elf.c projects/tcp_ffcaia2008_head/sys/kern/init_main.c projects/tcp_ffcaia2008_head/sys/kern/init_sysent.c projects/tcp_ffcaia2008_head/sys/kern/kern_context.c projects/tcp_ffcaia2008_head/sys/kern/kern_cpuset.c projects/tcp_ffcaia2008_head/sys/kern/kern_exec.c projects/tcp_ffcaia2008_head/sys/kern/kern_intr.c projects/tcp_ffcaia2008_head/sys/kern/kern_ktrace.c projects/tcp_ffcaia2008_head/sys/kern/kern_shutdown.c projects/tcp_ffcaia2008_head/sys/kern/kern_sig.c projects/tcp_ffcaia2008_head/sys/kern/kern_thr.c projects/tcp_ffcaia2008_head/sys/kern/kern_thread.c projects/tcp_ffcaia2008_head/sys/kern/sched_ule.c projects/tcp_ffcaia2008_head/sys/kern/stack_protector.c projects/tcp_ffcaia2008_head/sys/kern/subr_bus.c projects/tcp_ffcaia2008_head/sys/kern/subr_taskqueue.c projects/tcp_ffcaia2008_head/sys/kern/subr_trap.c projects/tcp_ffcaia2008_head/sys/kern/sys_generic.c projects/tcp_ffcaia2008_head/sys/kern/sys_process.c projects/tcp_ffcaia2008_head/sys/kern/syscalls.c projects/tcp_ffcaia2008_head/sys/kern/syscalls.master projects/tcp_ffcaia2008_head/sys/kern/systrace_args.c projects/tcp_ffcaia2008_head/sys/kern/sysv_shm.c projects/tcp_ffcaia2008_head/sys/kern/tty.c projects/tcp_ffcaia2008_head/sys/kern/tty_ttydisc.c projects/tcp_ffcaia2008_head/sys/kern/uipc_syscalls.c projects/tcp_ffcaia2008_head/sys/mips/mips/pm_machdep.c projects/tcp_ffcaia2008_head/sys/mips/mips/pmap.c projects/tcp_ffcaia2008_head/sys/modules/Makefile projects/tcp_ffcaia2008_head/sys/modules/cam/Makefile projects/tcp_ffcaia2008_head/sys/modules/dpms/Makefile projects/tcp_ffcaia2008_head/sys/modules/iwnfw/Makefile projects/tcp_ffcaia2008_head/sys/modules/ubser/Makefile projects/tcp_ffcaia2008_head/sys/modules/usb/Makefile projects/tcp_ffcaia2008_head/sys/modules/usb/ucom/Makefile projects/tcp_ffcaia2008_head/sys/modules/vesa/Makefile projects/tcp_ffcaia2008_head/sys/modules/x86bios/Makefile projects/tcp_ffcaia2008_head/sys/net/bpf.c projects/tcp_ffcaia2008_head/sys/net/flowtable.c projects/tcp_ffcaia2008_head/sys/net/if_enc.c projects/tcp_ffcaia2008_head/sys/net/if_gif.c projects/tcp_ffcaia2008_head/sys/net/pfil.c projects/tcp_ffcaia2008_head/sys/net/pfil.h projects/tcp_ffcaia2008_head/sys/net80211/ieee80211_hwmp.c projects/tcp_ffcaia2008_head/sys/net80211/ieee80211_mesh.c projects/tcp_ffcaia2008_head/sys/net80211/ieee80211_mesh.h projects/tcp_ffcaia2008_head/sys/net80211/ieee80211_output.c projects/tcp_ffcaia2008_head/sys/net80211/ieee80211_proto.h projects/tcp_ffcaia2008_head/sys/netgraph/NOTES projects/tcp_ffcaia2008_head/sys/netinet/if_ether.c projects/tcp_ffcaia2008_head/sys/netinet/in.c projects/tcp_ffcaia2008_head/sys/netinet/ip_icmp.c projects/tcp_ffcaia2008_head/sys/netinet/ip_input.c projects/tcp_ffcaia2008_head/sys/netinet/libalias/alias.c projects/tcp_ffcaia2008_head/sys/netinet/sctp_cc_functions.c projects/tcp_ffcaia2008_head/sys/netinet/sctp_output.c projects/tcp_ffcaia2008_head/sys/netinet6/icmp6.c projects/tcp_ffcaia2008_head/sys/netinet6/in6.c projects/tcp_ffcaia2008_head/sys/netinet6/in6_ifattach.c projects/tcp_ffcaia2008_head/sys/nfsclient/nfs_kdtrace.c projects/tcp_ffcaia2008_head/sys/nfsclient/nfs_vnops.c projects/tcp_ffcaia2008_head/sys/pc98/conf/GENERIC projects/tcp_ffcaia2008_head/sys/pc98/pc98/machdep.c projects/tcp_ffcaia2008_head/sys/powerpc/aim/clock.c projects/tcp_ffcaia2008_head/sys/powerpc/aim/machdep.c projects/tcp_ffcaia2008_head/sys/powerpc/aim/mmu_oea.c projects/tcp_ffcaia2008_head/sys/powerpc/aim/mmu_oea64.c projects/tcp_ffcaia2008_head/sys/powerpc/aim/mp_cpudep.c projects/tcp_ffcaia2008_head/sys/powerpc/aim/platform_chrp.c projects/tcp_ffcaia2008_head/sys/powerpc/aim/swtch.S projects/tcp_ffcaia2008_head/sys/powerpc/aim/trap_subr.S projects/tcp_ffcaia2008_head/sys/powerpc/booke/machdep.c projects/tcp_ffcaia2008_head/sys/powerpc/booke/mp_cpudep.c projects/tcp_ffcaia2008_head/sys/powerpc/booke/pmap.c projects/tcp_ffcaia2008_head/sys/powerpc/include/hid.h projects/tcp_ffcaia2008_head/sys/powerpc/include/pcpu.h projects/tcp_ffcaia2008_head/sys/powerpc/include/pmap.h projects/tcp_ffcaia2008_head/sys/powerpc/include/smp.h projects/tcp_ffcaia2008_head/sys/powerpc/include/spr.h projects/tcp_ffcaia2008_head/sys/powerpc/powermac/hrowpic.c projects/tcp_ffcaia2008_head/sys/powerpc/powerpc/cpu.c projects/tcp_ffcaia2008_head/sys/powerpc/powerpc/mmu_if.m projects/tcp_ffcaia2008_head/sys/powerpc/powerpc/mp_machdep.c projects/tcp_ffcaia2008_head/sys/powerpc/powerpc/pmap_dispatch.c projects/tcp_ffcaia2008_head/sys/powerpc/powerpc/stack_machdep.c projects/tcp_ffcaia2008_head/sys/powerpc/powerpc/uio_machdep.c projects/tcp_ffcaia2008_head/sys/sparc64/conf/GENERIC projects/tcp_ffcaia2008_head/sys/sparc64/include/elf.h projects/tcp_ffcaia2008_head/sys/sparc64/include/in_cksum.h projects/tcp_ffcaia2008_head/sys/sparc64/sparc64/machdep.c projects/tcp_ffcaia2008_head/sys/sparc64/sparc64/pmap.c projects/tcp_ffcaia2008_head/sys/sun4v/include/elf.h projects/tcp_ffcaia2008_head/sys/sun4v/sun4v/machdep.c projects/tcp_ffcaia2008_head/sys/sun4v/sun4v/pmap.c projects/tcp_ffcaia2008_head/sys/sys/aac_ioctl.h projects/tcp_ffcaia2008_head/sys/sys/ata.h projects/tcp_ffcaia2008_head/sys/sys/bus.h projects/tcp_ffcaia2008_head/sys/sys/interrupt.h projects/tcp_ffcaia2008_head/sys/sys/kernel.h projects/tcp_ffcaia2008_head/sys/sys/ktrace.h projects/tcp_ffcaia2008_head/sys/sys/signalvar.h projects/tcp_ffcaia2008_head/sys/sys/syscall.h projects/tcp_ffcaia2008_head/sys/sys/syscall.mk projects/tcp_ffcaia2008_head/sys/sys/syscallsubr.h projects/tcp_ffcaia2008_head/sys/sys/sysproto.h projects/tcp_ffcaia2008_head/sys/sys/time.h projects/tcp_ffcaia2008_head/sys/sys/ttyqueue.h projects/tcp_ffcaia2008_head/sys/tools/fw_stub.awk projects/tcp_ffcaia2008_head/sys/tools/makeobjops.awk projects/tcp_ffcaia2008_head/sys/vm/pmap.h projects/tcp_ffcaia2008_head/sys/vm/swap_pager.c projects/tcp_ffcaia2008_head/sys/vm/vm_extern.h projects/tcp_ffcaia2008_head/sys/vm/vm_fault.c projects/tcp_ffcaia2008_head/sys/vm/vm_glue.c projects/tcp_ffcaia2008_head/sys/vm/vm_map.c projects/tcp_ffcaia2008_head/tools/regression/fstest/tests/rename/21.t projects/tcp_ffcaia2008_head/tools/regression/lib/libc/gen/test-wordexp.c projects/tcp_ffcaia2008_head/tools/regression/lib/libutil/test-flopen.c projects/tcp_ffcaia2008_head/tools/regression/sigqueue/sigqtest1/sigqtest1.c projects/tcp_ffcaia2008_head/tools/regression/sigqueue/sigqtest2/sigqtest2.c projects/tcp_ffcaia2008_head/tools/tools/netrate/netsend/netsend.c projects/tcp_ffcaia2008_head/usr.bin/bsdiff/bsdiff/bsdiff.1 projects/tcp_ffcaia2008_head/usr.bin/bsdiff/bspatch/bspatch.1 projects/tcp_ffcaia2008_head/usr.bin/make/job.c projects/tcp_ffcaia2008_head/usr.bin/make/main.c projects/tcp_ffcaia2008_head/usr.bin/netstat/route.c projects/tcp_ffcaia2008_head/usr.bin/touch/touch.c projects/tcp_ffcaia2008_head/usr.bin/vmstat/vmstat.c projects/tcp_ffcaia2008_head/usr.sbin/acpi/iasl/Makefile projects/tcp_ffcaia2008_head/usr.sbin/crashinfo/crashinfo.sh projects/tcp_ffcaia2008_head/usr.sbin/jail/jail.8 projects/tcp_ffcaia2008_head/usr.sbin/ntp/doc/ntpd.8 projects/tcp_ffcaia2008_head/usr.sbin/sysinstall/cdrom.c projects/tcp_ffcaia2008_head/usr.sbin/sysinstall/tcpip.c projects/tcp_ffcaia2008_head/usr.sbin/tzsetup/tzsetup.8 projects/tcp_ffcaia2008_head/usr.sbin/tzsetup/tzsetup.c Modified: projects/tcp_ffcaia2008_head/Makefile.inc1 ============================================================================== --- projects/tcp_ffcaia2008_head/Makefile.inc1 Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/Makefile.inc1 Fri Oct 30 21:00:58 2009 (r198701) @@ -599,11 +599,14 @@ installcheck_UGID: .if ${MK_INFO} != "no" _install-info= install-info .endif +.if ${MK_ZONEINFO} != "no" +_zoneinfo= zic tzsetup +.endif ITOOLS= [ awk cap_mkdb cat chflags chmod chown \ date echo egrep find grep ${_install-info} \ ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \ - test true uname wc zic + test true uname wc ${_zoneinfo} # # distributeworld @@ -929,6 +932,10 @@ _ar= usr.bin/ar _mklocale= usr.bin/mklocale .endif +.if ${BOOTSTRAPPING} < 900002 +_sed= usr.bin/sed +.endif + .if ${BOOTSTRAPPING} < 700018 _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif @@ -954,6 +961,7 @@ bootstrap-tools: usr.bin/makewhatis \ ${_mklocale} \ usr.bin/rpcgen \ + ${_sed} \ usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ @@ -1033,7 +1041,6 @@ cross-tools: .for _tool in \ gnu/usr.bin/binutils \ gnu/usr.bin/cc \ - usr.bin/sed \ usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \ ${_btxld} \ ${_crunchide} \ @@ -1122,7 +1129,7 @@ lib/libradius__L secure/lib/libssl__L: s _secure_lib_libssh= secure/lib/libssh secure/lib/libssh__L: lib/libz__L secure/lib/libcrypto__L lib/libcrypt__L .if ${MK_KERBEROS} != "no" -kerberos5/lib/libgssapi_krb5__L: kerberos5/lib/libkrb5__L \ +kerberos5/lib/libgssapi_krb5__L: lib/libgssapi__L kerberos5/lib/libkrb5__L \ kerberos5/lib/libhx509__L kerberos5/lib/libasn1__L lib/libcom_err__L \ lib/libmd__L kerberos5/lib/libroken__L secure/lib/libcrypto__L \ lib/libcrypt__L Modified: projects/tcp_ffcaia2008_head/ObsoleteFiles.inc ============================================================================== --- projects/tcp_ffcaia2008_head/ObsoleteFiles.inc Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/ObsoleteFiles.inc Fri Oct 30 21:00:58 2009 (r198701) @@ -14,6 +14,11 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20091027: pselect.3 implemented as syscall +OLD_FILES+=usr/share/man/man3/pselect.3.gz +# 20091005: fusword.9 and susword.9 removed +OLD_FILES+=usr/share/man/man9/fusword.9.gz +OLD_FILES+=usr/share/man/man9/susword.9.gz # 20090909: vesa and dpms promoted to be i386/amd64 common OLD_FILES+=usr/include/machine/pc/vesa.h OLD_FILES+=usr/share/man/man4/i386/dpms.4.gz @@ -26,6 +31,49 @@ OLD_FILES+=usr/share/man/man8/lukemftpd. OLD_FILES+=etc/mtree/BSD.local.dist OLD_FILES+=etc/mtree/BSD.x11.dist OLD_FILES+=etc/mtree/BSD.x11-4.dist +# 20090812: net80211 documentation overhaul +OLD_FILES+=usr/share/man/man9/ieee80211_add_rates.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_add_xrates.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_alloc_node.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_attach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_begin_scan.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_cfgget.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_cfgset.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_chan2ieee.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_chan2mode.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_create_ibss.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_crypto_attach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_crypto_detach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_decap.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_dump_pkt.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_dup_bss.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_encap.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_end_scan.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_find_node.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_fix_rate.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_free_allnodes.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_ieee2mhz.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_ioctl.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_lookup_node.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_media2rate.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_media_change.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_media_init.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_media_status.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_mhz2ieee.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_next_scan.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_node_attach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_node_detach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_node_lateattach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_print_essid.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_proto_attach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_proto_detach.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_rate2media.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_recv_mgmt.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_send_mgmt.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_setmode.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_timeout_nodes.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_watchdog.9.gz +OLD_FILES+=usr/share/man/man9/ieee80211_wep_crypt.9.gz # 20090801: vimage.h removed in favour of vnet.h OLD_FILES+=usr/include/sys/vimage.h # 20090719: library version bump for 8.0 @@ -503,6 +551,8 @@ OLD_FILES+=usr/include/dev/usb/usb_quirk OLD_FILES+=usr/include/dev/usb/usbcdc.h OLD_FILES+=usr/include/dev/usb/usbdivar.h OLD_FILES+=usr/include/dev/usb/uxb360gp_rdesc.h +OLD_FILES+=usr/sbin/usbdevs +OLD_FILES+=usr/share/man/man8/usbdevs.8.gz # 20090203: removal of pccard header files OLD_FILES+=usr/include/pccard/cardinfo.h OLD_FILES+=usr/include/pccard/cis.h Modified: projects/tcp_ffcaia2008_head/UPDATING ============================================================================== --- projects/tcp_ffcaia2008_head/UPDATING Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/UPDATING Fri Oct 30 21:00:58 2009 (r198701) @@ -22,6 +22,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20091025: + The iwn(4) driver has been updated to support the 5000 and 5150 series. + There's one kernel module for each firmware. Adding "device iwnfw" + to the kernel configuration file means including all three firmware + images inside the kernel. If you want to include just the one for + your wireless card, use the the devices iwn4965fw, iwn5000fw or + iwn5150fw. + 20090926: The rc.d/network_ipv6, IPv6 configuration script has been integrated into rc.d/netif. The changes are the following: @@ -624,6 +632,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. userland (libpmc(3)) and the kernel module (hwpmc(4)) in sync. +20081009: + atapci kernel module now includes only generic PCI ATA + driver. AHCI driver moved to ataahci kernel module. + All vendor-specific code moved into separate kernel modules: + ataacard, ataacerlabs, ataadaptec, ataamd, ataati, atacenatek, + atacypress, atacyrix, atahighpoint, ataintel, ataite, atajmicron, + atamarvell, atamicron, atanational, atanetcell, atanvidia, + atapromise, ataserverworks, atasiliconimage, atasis, atavia + 20080820: The TTY subsystem of the kernel has been replaced by a new implementation, which provides better scalability and an Modified: projects/tcp_ffcaia2008_head/bin/cat/Makefile ============================================================================== --- projects/tcp_ffcaia2008_head/bin/cat/Makefile Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/bin/cat/Makefile Fri Oct 30 21:00:58 2009 (r198701) @@ -2,6 +2,5 @@ # $FreeBSD$ PROG= cat -WARNS?= 6 .include Modified: projects/tcp_ffcaia2008_head/bin/csh/iconv_stub.c ============================================================================== --- projects/tcp_ffcaia2008_head/bin/csh/iconv_stub.c Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/bin/csh/iconv_stub.c Fri Oct 30 21:00:58 2009 (r198701) @@ -61,9 +61,20 @@ dl_iconv_open(const char *tocode, const if (iconvlib == NULL) return (iconv_t)-1; iconv_open = (iconv_open_t *)dlfunc(iconvlib, ICONV_OPEN); + if (iconv_open == NULL) + goto dlfunc_err; dl_iconv = (dl_iconv_t *)dlfunc(iconvlib, ICONV_ENGINE); + if (dl_iconv == NULL) + goto dlfunc_err; dl_iconv_close = (dl_iconv_close_t *)dlfunc(iconvlib, ICONV_CLOSE); + if (dl_iconv_close == NULL) + goto dlfunc_err; } return iconv_open(tocode, fromcode); + +dlfunc_err: + dlclose(iconvlib); + iconvlib = NULL; + return (iconv_t)-1; } Modified: projects/tcp_ffcaia2008_head/bin/ls/ls.c ============================================================================== --- projects/tcp_ffcaia2008_head/bin/ls/ls.c Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/bin/ls/ls.c Fri Oct 30 21:00:58 2009 (r198701) @@ -399,7 +399,7 @@ main(int argc, char *argv[]) * If not -F, -d or -l options, follow any symbolic links listed on * the command line. */ - if (!f_longform && !f_listdir && !f_type) + if (!f_longform && !f_listdir && (!f_type || f_slash)) fts_options |= FTS_COMFOLLOW; /* Modified: projects/tcp_ffcaia2008_head/bin/sh/expand.c ============================================================================== --- projects/tcp_ffcaia2008_head/bin/sh/expand.c Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/bin/sh/expand.c Fri Oct 30 21:00:58 2009 (r198701) @@ -657,7 +657,7 @@ again: /* jump here after setting a vari } varlen = 0; startloc = expdest - stackblock(); - if (!set && uflag) { + if (!set && uflag && *var != '@' && *var != '*') { switch (subtype) { case VSNORMAL: case VSTRIMLEFT: Modified: projects/tcp_ffcaia2008_head/bin/sh/parser.c ============================================================================== --- projects/tcp_ffcaia2008_head/bin/sh/parser.c Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/bin/sh/parser.c Fri Oct 30 21:00:58 2009 (r198701) @@ -1308,11 +1308,16 @@ parsebackq: { struct jmploc *const savehandler = handler; int savelen; int saveprompt; + const int bq_startlinno = plinno; if (setjmp(jmploc.loc)) { if (str) ckfree(str); handler = savehandler; + if (exception == EXERROR) { + startlinno = bq_startlinno; + synerror("Error in command substitution"); + } longjmp(handler->loc, 1); } INTOFF; Modified: projects/tcp_ffcaia2008_head/bin/sh/sh.1 ============================================================================== --- projects/tcp_ffcaia2008_head/bin/sh/sh.1 Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/bin/sh/sh.1 Fri Oct 30 21:00:58 2009 (r198701) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd May 31, 2009 +.Dd October 24, 2009 .Dt SH 1 .Os .Sh NAME @@ -296,7 +296,10 @@ sh -T -c "trap 'exit 1' 2 ; some-blockin .Ed .It Fl u Li nounset Write a message to standard error when attempting -to expand a variable that is not set, and if the +to expand a variable, a positional parameter or +the special parameter +.Va \&! +that is not set, and if the shell is not interactive, exit immediately. .It Fl V Li vi Enable the built-in Modified: projects/tcp_ffcaia2008_head/bin/uuidgen/Makefile ============================================================================== --- projects/tcp_ffcaia2008_head/bin/uuidgen/Makefile Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/bin/uuidgen/Makefile Fri Oct 30 21:00:58 2009 (r198701) @@ -1,6 +1,5 @@ # $FreeBSD$ PROG= uuidgen -WARNS?= 6 .include Modified: projects/tcp_ffcaia2008_head/contrib/gcc/config/i386/i386.c ============================================================================== --- projects/tcp_ffcaia2008_head/contrib/gcc/config/i386/i386.c Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/contrib/gcc/config/i386/i386.c Fri Oct 30 21:00:58 2009 (r198701) @@ -1614,7 +1614,7 @@ override_options (void) "-mtune=generic instead as appropriate."); if (!ix86_arch_string) - ix86_arch_string = TARGET_64BIT ? "x86-64" : "i386"; + ix86_arch_string = TARGET_64BIT ? "x86-64" : "i486"; if (!strcmp (ix86_arch_string, "generic")) error ("generic CPU can be used only for -mtune= switch"); if (!strncmp (ix86_arch_string, "generic", 7)) Modified: projects/tcp_ffcaia2008_head/contrib/ncurses/ncurses/base/lib_getch.c ============================================================================== --- projects/tcp_ffcaia2008_head/contrib/ncurses/ncurses/base/lib_getch.c Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/contrib/ncurses/ncurses/base/lib_getch.c Fri Oct 30 21:00:58 2009 (r198701) @@ -476,6 +476,12 @@ _nc_wgetch(WINDOW *win, /* resizeterm can push KEY_RESIZE */ if (cooked_key_in_fifo()) { *result = fifo_pull(sp); + /* + * Get the ERR from queue -- it is from WINCH, + * so we should take it out, the "error" is handled. + */ + if (fifo_peek(sp) == -1) + fifo_pull(sp); returnCode(*result >= KEY_MIN ? KEY_CODE_YES : OK); } } Modified: projects/tcp_ffcaia2008_head/etc/defaults/rc.conf ============================================================================== --- projects/tcp_ffcaia2008_head/etc/defaults/rc.conf Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/etc/defaults/rc.conf Fri Oct 30 21:00:58 2009 (r198701) @@ -600,6 +600,7 @@ harvest_ethernet="YES" # Entropy device harvest_p_to_p="YES" # Entropy device harvests point-to-point randomness dmesg_enable="YES" # Save dmesg(8) to /var/run/dmesg.boot watchdogd_enable="NO" # Start the software watchdog daemon +watchdogd_flags="" # Flags to watchdogd (if enabled) devfs_rulesets="/etc/defaults/devfs.rules /etc/devfs.rules" # Files containing # devfs(8) rules. devfs_system_ruleset="" # The name (NOT number) of a ruleset to apply to /dev Modified: projects/tcp_ffcaia2008_head/etc/gettytab ============================================================================== --- projects/tcp_ffcaia2008_head/etc/gettytab Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/etc/gettytab Fri Oct 30 21:00:58 2009 (r198701) @@ -162,7 +162,7 @@ X|Xwindow|X window system:\ :fd@:nd@:cd@:rw:sp#9600: P|Pc|Pc console:\ - :ht:np:sp#115200: + :ht:np:sp#9600: # # Wierdo special case for fast crt's with hardcopy devices Modified: projects/tcp_ffcaia2008_head/etc/rc.d/faith ============================================================================== --- projects/tcp_ffcaia2008_head/etc/rc.d/faith Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/etc/rc.d/faith Fri Oct 30 21:00:58 2009 (r198701) @@ -3,7 +3,7 @@ # # PROVIDE: faith -# REQUIRE: netif routing +# REQUIRE: netif # KEYWORD: nojail . /etc/rc.subr Modified: projects/tcp_ffcaia2008_head/etc/rc.d/netoptions ============================================================================== --- projects/tcp_ffcaia2008_head/etc/rc.d/netoptions Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/etc/rc.d/netoptions Fri Oct 30 21:00:58 2009 (r198701) @@ -53,7 +53,7 @@ netoptions_inet() ${SYSCTL_W} net.inet.tcp.rfc1323=1 >/dev/null else netoptions_init - echo -n ' rfc1323 extensions=${tcp_extensions}' + echo -n " rfc1323 extensions=${tcp_extensions}" ${SYSCTL_W} net.inet.tcp.rfc1323=0 >/dev/null fi @@ -61,13 +61,13 @@ netoptions_inet() ${SYSCTL_W} net.inet.tcp.always_keepalive=1 >/dev/null else netoptions_init - echo -n ' TCP keepalive=${tcp_keepalive}' + echo -n " TCP keepalive=${tcp_keepalive}" ${SYSCTL_W} net.inet.tcp.always_keepalive=0 >/dev/null fi if checkyesno tcp_drop_synfin; then netoptions_init - echo -n ' drop SYN+FIN packets=${tcp_drop_synfin}' + echo -n " drop SYN+FIN packets=${tcp_drop_synfin}" ${SYSCTL_W} net.inet.tcp.drop_synfin=1 >/dev/null else ${SYSCTL_W} net.inet.tcp.drop_synfin=0 >/dev/null Modified: projects/tcp_ffcaia2008_head/etc/rc.d/stf ============================================================================== --- projects/tcp_ffcaia2008_head/etc/rc.d/stf Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/etc/rc.d/stf Fri Oct 30 21:00:58 2009 (r198701) @@ -3,7 +3,7 @@ # # PROVIDE: stf -# REQUIRE: netif routing +# REQUIRE: netif # KEYWORD: nojail . /etc/rc.subr Modified: projects/tcp_ffcaia2008_head/etc/rc.subr ============================================================================== --- projects/tcp_ffcaia2008_head/etc/rc.subr Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/etc/rc.subr Fri Oct 30 21:00:58 2009 (r198701) @@ -593,7 +593,7 @@ run_rc_command() rc_fast=yes rc_quiet=yes ;; - force*) # "force prefix; always run + force*) # "force" prefix; always run rc_force=yes _rc_prefix=force rc_arg=${rc_arg#${_rc_prefix}} @@ -616,7 +616,7 @@ run_rc_command() esac eval _override_command=\$${name}_program - command=${command:+${_override_command:-$command}} + command=${_override_command:-$command} _keywords="start stop restart rcvar $extra_commands" rc_pid= Modified: projects/tcp_ffcaia2008_head/games/number/Makefile ============================================================================== --- projects/tcp_ffcaia2008_head/games/number/Makefile Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/games/number/Makefile Fri Oct 30 21:00:58 2009 (r198701) @@ -4,4 +4,6 @@ PROG= number MAN= number.6 +WARNS?= 6 + .include Modified: projects/tcp_ffcaia2008_head/games/number/number.c ============================================================================== --- projects/tcp_ffcaia2008_head/games/number/number.c Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/games/number/number.c Fri Oct 30 21:00:58 2009 (r198701) @@ -88,9 +88,7 @@ void usage(void); int lflag; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch, first; char line[256]; @@ -275,7 +273,7 @@ void pfract(len) int len; { - static char *pref[] = { "", "ten-", "hundred-" }; + static char const * const pref[] = { "", "ten-", "hundred-" }; switch(len) { case 1: Modified: projects/tcp_ffcaia2008_head/gnu/lib/libgcov/Makefile ============================================================================== --- projects/tcp_ffcaia2008_head/gnu/lib/libgcov/Makefile Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/gnu/lib/libgcov/Makefile Fri Oct 30 21:00:58 2009 (r198701) @@ -2,6 +2,7 @@ NO_PROFILE= .include +MK_SSP= no .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" GCCDIR= ${.CURDIR}/../../../contrib/gcc Modified: projects/tcp_ffcaia2008_head/kerberos5/lib/libgssapi_krb5/Makefile ============================================================================== --- projects/tcp_ffcaia2008_head/kerberos5/lib/libgssapi_krb5/Makefile Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/kerberos5/lib/libgssapi_krb5/Makefile Fri Oct 30 21:00:58 2009 (r198701) @@ -2,8 +2,8 @@ LIB= gssapi_krb5 LDFLAGS= -Wl,-Bsymbolic -LDADD= -lkrb5 -lhx509 -lcrypto -lroken -lasn1 -lcom_err -lcrypt -DPADD= ${LIBKRB5} ${LIBHX509} ${LIBCRYPTO} ${LIBROKEN} ${LIBASN1} \ +LDADD= -lgssapi -lkrb5 -lhx509 -lcrypto -lroken -lasn1 -lcom_err -lcrypt +DPADD= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBCRYPTO} ${LIBROKEN} ${LIBASN1} \ ${LIBCOM_ERR} ${LIBCRYPT} INCS= ${KRB5DIR}/lib/gssapi/gssapi/gssapi_krb5.h Modified: projects/tcp_ffcaia2008_head/kerberos5/lib/libgssapi_spnego/Makefile ============================================================================== --- projects/tcp_ffcaia2008_head/kerberos5/lib/libgssapi_spnego/Makefile Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/kerberos5/lib/libgssapi_spnego/Makefile Fri Oct 30 21:00:58 2009 (r198701) @@ -2,8 +2,8 @@ LIB= gssapi_spnego LDFLAGS= -Wl,-Bsymbolic -LDADD= -lasn1 -DPADD= ${LIBASN1} +LDADD= -lgssapi -lasn1 +DPADD= ${LIBGSSAPI} ${LIBASN1} SRCS= accept_sec_context.c \ compat.c \ Modified: projects/tcp_ffcaia2008_head/lib/libbluetooth/bluetooth.3 ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libbluetooth/bluetooth.3 Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libbluetooth/bluetooth.3 Fri Oct 30 21:00:58 2009 (r198701) @@ -272,7 +272,7 @@ otherwise 0. .Pp The .Fn bt_devinfo -function populates prodivded +function populates provided .Vt bt_devinfo structure with the information about given Bluetooth device. The caller is expected to pass Bluetooth device name in the Modified: projects/tcp_ffcaia2008_head/lib/libbluetooth/bluetooth.h ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libbluetooth/bluetooth.h Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libbluetooth/bluetooth.h Fri Oct 30 21:00:58 2009 (r198701) @@ -163,8 +163,8 @@ int bt_devclose(int s); int bt_devsend (int s, uint16_t opcode, void *param, size_t plen); ssize_t bt_devrecv (int s, void *buf, size_t size, time_t to); int bt_devreq (int s, struct bt_devreq *r, time_t to); -int bt_devfilter(int s, struct bt_devfilter const *new, - struct bt_devfilter *old); +int bt_devfilter(int s, struct bt_devfilter const *newp, + struct bt_devfilter *oldp); void bt_devfilter_pkt_set(struct bt_devfilter *filter, uint8_t type); void bt_devfilter_pkt_clr(struct bt_devfilter *filter, uint8_t type); int bt_devfilter_pkt_tst(struct bt_devfilter const *filter, uint8_t type); Modified: projects/tcp_ffcaia2008_head/lib/libc/gen/Makefile.inc ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libc/gen/Makefile.inc Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libc/gen/Makefile.inc Fri Oct 30 21:00:58 2009 (r198701) @@ -21,7 +21,7 @@ SRCS+= __getosreldate.c __xuname.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ nlist.c nrand48.c opendir.c \ - pause.c pmadvise.c popen.c posix_spawn.c pselect.c \ + pause.c pmadvise.c popen.c posix_spawn.c \ psignal.c pw_scan.c pwcache.c \ raise.c readdir.c readpassphrase.c rewinddir.c \ scandir.c seed48.c seekdir.c sem.c semctl.c \ @@ -62,7 +62,7 @@ MAN+= alarm.3 arc4random.3 \ posix_spawnattr_getpgroup.3 posix_spawnattr_getschedparam.3 \ posix_spawnattr_getschedpolicy.3 posix_spawnattr_init.3 \ posix_spawnattr_getsigdefault.3 posix_spawnattr_getsigmask.3 \ - pselect.3 psignal.3 pwcache.3 \ + psignal.3 pwcache.3 \ raise.3 rand48.3 readpassphrase.3 rfork_thread.3 \ scandir.3 sem_destroy.3 sem_getvalue.3 sem_init.3 \ sem_open.3 sem_post.3 sem_timedwait.3 sem_wait.3 \ Modified: projects/tcp_ffcaia2008_head/lib/libc/gen/Symbol.map ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libc/gen/Symbol.map Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libc/gen/Symbol.map Fri Oct 30 21:00:58 2009 (r198701) @@ -223,7 +223,6 @@ FBSD_1.0 { posix_madvise; popen; pclose; - pselect; psignal; raise; readdir; @@ -454,7 +453,6 @@ FBSDprivate_1.0 { __opendir2; __pause; _pause; - __pselect; __pw_scan; /* Used by (at least) libutil */ __raise; _raise; Modified: projects/tcp_ffcaia2008_head/lib/libc/gen/getcwd.c ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libc/gen/getcwd.c Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libc/gen/getcwd.c Fri Oct 30 21:00:58 2009 (r198701) @@ -62,13 +62,14 @@ getcwd(pt, size) dev_t dev; ino_t ino; int first; - char *bpt, *bup; + char *bpt; struct stat s; dev_t root_dev; ino_t root_ino; - size_t ptsize, upsize; + size_t ptsize; int save_errno; - char *ept, *eup, *up, c; + char *ept, c; + int fd; /* * If no buffer specified by the user, allocate one as necessary. @@ -106,18 +107,6 @@ getcwd(pt, size) bpt = ept - 1; *bpt = '\0'; - /* - * Allocate 1024 bytes for the string of "../"'s. - * Should always be enough. If it's not, allocate - * as necessary. Special case the first stat, it's ".", not "..". - */ - if ((up = malloc(upsize = 1024)) == NULL) - goto err; - eup = up + upsize; - bup = up; - up[0] = '.'; - up[1] = '\0'; - /* Save root values, so know when to stop. */ if (stat("/", &s)) goto err; @@ -128,7 +117,7 @@ getcwd(pt, size) for (first = 1;; first = 0) { /* Stat the current level. */ - if (lstat(up, &s)) + if (dir != NULL ? _fstat(dirfd(dir), &s) : lstat(".", &s)) goto err; /* Save current node values. */ @@ -144,32 +133,22 @@ getcwd(pt, size) * been that way and stuff would probably break. */ bcopy(bpt, pt, ept - bpt); - free(up); + if (dir) + (void) closedir(dir); return (pt); } - /* - * Build pointer to the parent directory, allocating memory - * as necessary. Max length is 3 for "../", the largest - * possible component name, plus a trailing NUL. - */ - while (bup + 3 + MAXNAMLEN + 1 >= eup) { - if ((up = reallocf(up, upsize *= 2)) == NULL) - goto err; - bup = up; - eup = up + upsize; - } - *bup++ = '.'; - *bup++ = '.'; - *bup = '\0'; - /* Open and stat parent directory. */ - if (!(dir = opendir(up)) || _fstat(dirfd(dir), &s)) + fd = _openat(dir != NULL ? dirfd(dir) : AT_FDCWD, + "..", O_RDONLY); + if (fd == -1) goto err; - - /* Add trailing slash for next directory. */ - *bup++ = '/'; - *bup = '\0'; + if (dir) + (void) closedir(dir); + if (!(dir = fdopendir(fd)) || _fstat(dirfd(dir), &s)) { + _close(fd); + goto err; + } /* * If it's a mount point, have to stat each element because @@ -190,10 +169,10 @@ getcwd(pt, size) goto notfound; if (ISDOT(dp)) continue; - bcopy(dp->d_name, bup, dp->d_namlen + 1); /* Save the first error for later. */ - if (lstat(up, &s)) { + if (fstatat(dirfd(dir), dp->d_name, &s, + AT_SYMLINK_NOFOLLOW)) { if (!save_errno) save_errno = errno; errno = 0; @@ -227,11 +206,6 @@ getcwd(pt, size) *--bpt = '/'; bpt -= dp->d_namlen; bcopy(dp->d_name, bpt, dp->d_namlen); - (void) closedir(dir); - dir = NULL; - - /* Truncate any file name. */ - *bup = '\0'; } notfound: @@ -250,7 +224,6 @@ err: free(pt); if (dir) (void) closedir(dir); - free(up); errno = save_errno; return (NULL); Modified: projects/tcp_ffcaia2008_head/lib/libc/gen/wordexp.c ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libc/gen/wordexp.c Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libc/gen/wordexp.c Fri Oct 30 21:00:58 2009 (r198701) @@ -28,8 +28,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -73,6 +75,24 @@ wordexp(const char * __restrict words, w return (0); } +static size_t +we_read_fully(int fd, char *buffer, size_t len) +{ + size_t done; + ssize_t nread; + + done = 0; + do { + nread = _read(fd, buffer + done, len - done); + if (nread == -1 && errno == EINTR) + continue; + if (nread <= 0) + break; + done += nread; + } while (done != len); + return done; +} + /* * we_askshell -- * Use the `wordexp' /bin/sh builtin function to do most of the work @@ -90,20 +110,31 @@ we_askshell(const char *words, wordexp_t size_t sofs; /* Offset into we->we_strings */ size_t vofs; /* Offset into we->we_wordv */ pid_t pid; /* Process ID of child */ + pid_t wpid; /* waitpid return value */ int status; /* Child exit status */ + int error; /* Our return value */ + int serrno; /* errno to return */ char *ifs; /* IFS env. var. */ char *np, *p; /* Handy pointers */ char *nstrings; /* Temporary for realloc() */ char **nwv; /* Temporary for realloc() */ + sigset_t newsigblock, oldsigblock; + serrno = errno; if ((ifs = getenv("IFS")) == NULL) ifs = " \t\n"; if (pipe(pdes) < 0) return (WRDE_NOSPACE); /* XXX */ + (void)sigemptyset(&newsigblock); + (void)sigaddset(&newsigblock, SIGCHLD); + (void)_sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock); if ((pid = fork()) < 0) { + serrno = errno; _close(pdes[0]); _close(pdes[1]); + (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); + errno = serrno; return (WRDE_NOSPACE); /* XXX */ } else if (pid == 0) { @@ -114,6 +145,7 @@ we_askshell(const char *words, wordexp_t int devnull; char *cmd; + (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); _close(pdes[0]); if (_dup2(pdes[1], STDOUT_FILENO) < 0) _exit(1); @@ -139,10 +171,11 @@ we_askshell(const char *words, wordexp_t * the expanded words separated by nulls. */ _close(pdes[1]); - if (_read(pdes[0], wbuf, 8) != 8 || _read(pdes[0], bbuf, 8) != 8) { - _close(pdes[0]); - _waitpid(pid, &status, 0); - return (flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX); + if (we_read_fully(pdes[0], wbuf, 8) != 8 || + we_read_fully(pdes[0], bbuf, 8) != 8) { + error = flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX; + serrno = errno; + goto cleanup; } wbuf[8] = bbuf[8] = '\0'; nwords = strtol(wbuf, NULL, 16); @@ -162,33 +195,38 @@ we_askshell(const char *words, wordexp_t if ((nwv = realloc(we->we_wordv, (we->we_wordc + 1 + (flags & WRDE_DOOFFS ? we->we_offs : 0)) * sizeof(char *))) == NULL) { - _close(pdes[0]); - _waitpid(pid, &status, 0); - return (WRDE_NOSPACE); + error = WRDE_NOSPACE; + goto cleanup; } we->we_wordv = nwv; if ((nstrings = realloc(we->we_strings, we->we_nbytes)) == NULL) { - _close(pdes[0]); - _waitpid(pid, &status, 0); - return (WRDE_NOSPACE); + error = WRDE_NOSPACE; + goto cleanup; } for (i = 0; i < vofs; i++) if (we->we_wordv[i] != NULL) we->we_wordv[i] += nstrings - we->we_strings; we->we_strings = nstrings; - if (_read(pdes[0], we->we_strings + sofs, nbytes) != nbytes) { - _close(pdes[0]); - _waitpid(pid, &status, 0); - return (flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX); + if (we_read_fully(pdes[0], we->we_strings + sofs, nbytes) != nbytes) { + error = flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX; + serrno = errno; + goto cleanup; } - if (_waitpid(pid, &status, 0) < 0 || !WIFEXITED(status) || - WEXITSTATUS(status) != 0) { - _close(pdes[0]); - return (flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX); - } + error = 0; +cleanup: _close(pdes[0]); + do + wpid = _waitpid(pid, &status, 0); + while (wpid < 0 && errno == EINTR); + (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); + if (error != 0) { + errno = serrno; + return (error); + } + if (wpid < 0 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) + return (flags & WRDE_UNDEF ? WRDE_BADVAL : WRDE_SYNTAX); /* * Break the null-terminated expanded word strings out into Modified: projects/tcp_ffcaia2008_head/lib/libc/include/namespace.h ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libc/include/namespace.h Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libc/include/namespace.h Fri Oct 30 21:00:58 2009 (r198701) @@ -80,6 +80,7 @@ #define listen _listen #define nanosleep _nanosleep #define open _open +#define openat _openat #define poll _poll #define pthread_atfork _pthread_atfork #define pthread_attr_destroy _pthread_attr_destroy Modified: projects/tcp_ffcaia2008_head/lib/libc/include/un-namespace.h ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libc/include/un-namespace.h Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libc/include/un-namespace.h Fri Oct 30 21:00:58 2009 (r198701) @@ -61,6 +61,7 @@ #undef listen #undef nanosleep #undef open +#undef openat #undef poll #undef pthread_atfork #undef pthread_attr_destroy Modified: projects/tcp_ffcaia2008_head/lib/libc/nls/C.msg ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libc/nls/C.msg Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libc/nls/C.msg Fri Oct 30 21:00:58 2009 (r198701) @@ -181,6 +181,16 @@ $ ENOATTR 87 Attribute not found $ EDOOFUS 88 Programming error +$ EBADMSG +89 Bad message +$ EMULTIHOP +90 Multihop attempted +$ ENOLINK +91 Link has been severed +$ EPROTO +92 Protocol error +$ ENOTCAPABLE +93 Capabilities insufficient $ $ strsignal() support catalog $ Modified: projects/tcp_ffcaia2008_head/lib/libc/sys/Makefile.inc ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libc/sys/Makefile.inc Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libc/sys/Makefile.inc Fri Oct 30 21:00:58 2009 (r198701) @@ -83,7 +83,8 @@ MAN+= abort2.2 accept.2 access.2 acct.2 mq_setattr.2 \ msgctl.2 msgget.2 msgrcv.2 msgsnd.2 \ msync.2 munmap.2 nanosleep.2 nfssvc.2 ntp_adjtime.2 open.2 \ - pathconf.2 pipe.2 poll.2 posix_openpt.2 profil.2 ptrace.2 quotactl.2 \ + pathconf.2 pipe.2 poll.2 posix_openpt.2 profil.2 \ + pselect.2 ptrace.2 quotactl.2 \ read.2 readlink.2 reboot.2 recv.2 rename.2 revoke.2 rfork.2 rmdir.2 \ rtprio.2 .if !defined(NO_P1003_1B) Modified: projects/tcp_ffcaia2008_head/lib/libc/sys/Symbol.map ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libc/sys/Symbol.map Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libc/sys/Symbol.map Fri Oct 30 21:00:58 2009 (r198701) @@ -211,6 +211,7 @@ FBSD_1.0 { posix_openpt; preadv; profil; + pselect; ptrace; pwritev; quotactl; @@ -769,6 +770,8 @@ FBSDprivate_1.0 { __sys_olio_listio; _open; __sys_open; + _openat; + __sys_openat; _pathconf; __sys_pathconf; _pipe; @@ -779,6 +782,8 @@ FBSDprivate_1.0 { __sys_preadv; _profil; __sys_profil; + _pselect; + __sys_pselect; _ptrace; __sys_ptrace; _pwritev; Copied: projects/tcp_ffcaia2008_head/lib/libc/sys/pselect.2 (from r198700, head/lib/libc/sys/pselect.2) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/tcp_ffcaia2008_head/lib/libc/sys/pselect.2 Fri Oct 30 21:00:58 2009 (r198701, copy of r198700, head/lib/libc/sys/pselect.2) @@ -0,0 +1,122 @@ +.\" +.\" Copyright 2002 Massachusetts Institute of Technology +.\" +.\" Permission to use, copy, modify, and distribute this software and +.\" its documentation for any purpose and without fee is hereby +.\" granted, provided that both the above copyright notice and this +.\" permission notice appear in all copies, that both the above +.\" copyright notice and this permission notice appear in all +.\" supporting documentation, and that the name of M.I.T. not be used +.\" in advertising or publicity pertaining to distribution of the +.\" software without specific, written prior permission. M.I.T. makes +.\" no representations about the suitability of this software for any +.\" purpose. It is provided "as is" without express or implied +.\" warranty. +.\" +.\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS +.\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, +.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT +.\" SHALL M.I.T. 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$ +.\" +.Dd October 27, 2009 +.Dt PSELECT 2 +.Os +.Sh NAME +.Nm pselect +.Nd synchronous I/O multiplexing a la POSIX.1g +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/select.h +.Ft int +.Fo pselect +.Fa "int nfds" +.Fa "fd_set * restrict readfds" +.Fa "fd_set * restrict writefds" +.Fa "fd_set * restrict exceptfds" +.Fa "const struct timespec * restrict timeout" +.Fa "const sigset_t * restrict newsigmask" +.Fc +.Sh DESCRIPTION +The +.Fn pselect +function was introduced by +.St -p1003.1g-2000 +as a slightly stronger version of +.Xr select 2 . +The +.Fa nfds , readfds , writefds , +and +.Fa exceptfds +arguments are all identical to the analogous arguments of +.Fn select . +The +.Fa timeout +argument in +.Fn pselect +points to a +.Vt "const struct timespec" +rather than the (modifiable) +.Vt "struct timeval" +used by +.Fn select ; +as in +.Fn select , +a null pointer may be passed to indicate that +.Fn pselect +should wait indefinitely. +Finally, +.Fa newsigmask +specifies a signal mask which is set while waiting for input. +When +.Fn pselect +returns, the original signal mask is restored. +.Pp +See +.Xr select 2 +for a more detailed discussion of the semantics of this interface, and +for macros used to manipulate the +.Vt "fd_set" +data type. +.Sh RETURN VALUES +The +.Fn pselect +function returns the same values and under the same conditions as +.Fn select . +.Sh ERRORS +The +.Fn pselect +function may fail for any of the reasons documented for +.Xr select 2 +and (if a signal mask is provided) +.Xr sigprocmask 2 . +.Sh SEE ALSO +.Xr kqueue 2 , +.Xr poll 2 , +.Xr select 2 , +.Xr sigprocmask 2 +.Sh STANDARDS +The +.Fn pselect +function conforms to +.St -p1003.1-2001 . +.Sh HISTORY +The +.Fn pselect +function first appeared in +.Fx 5.0 . +.Sh AUTHORS +The first implementation of +.Fn pselect +function and this manual page were written by +.An Garrett Wollman Aq wollman@FreeBSD.org . Modified: projects/tcp_ffcaia2008_head/lib/libfetch/common.c ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libfetch/common.c Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libfetch/common.c Fri Oct 30 21:00:58 2009 (r198701) @@ -772,7 +772,7 @@ fetch_no_proxy_match(const char *host) break; d_len = q - p; - if (d_len > 0 && h_len > d_len && + if (d_len > 0 && h_len >= d_len && strncasecmp(host + h_len - d_len, p, d_len) == 0) { /* domain name matches */ Modified: projects/tcp_ffcaia2008_head/lib/libpmc/libpmc.c ============================================================================== --- projects/tcp_ffcaia2008_head/lib/libpmc/libpmc.c Fri Oct 30 20:28:49 2009 (r198700) +++ projects/tcp_ffcaia2008_head/lib/libpmc/libpmc.c Fri Oct 30 21:00:58 2009 (r198701) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Oct 31 19:22:12 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E48B9106566B; Sat, 31 Oct 2009 19:22:12 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F4DB8FC19; Sat, 31 Oct 2009 19:22:12 +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 n9VJMCYk000575; Sat, 31 Oct 2009 19:22:12 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9VJMCcP000573; Sat, 31 Oct 2009 19:22:12 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <200910311922.n9VJMCcP000573@svn.freebsd.org> From: Roman Divacky Date: Sat, 31 Oct 2009 19:22:12 +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: r198730 - projects/clangbsd X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2009 19:22:13 -0000 Author: rdivacky Date: Sat Oct 31 19:22:12 2009 New Revision: 198730 URL: http://svn.freebsd.org/changeset/base/198730 Log: Nor gcc nor clang needs the -iprefix, remove that. Reshuffle to minimize diff against head. Modified: projects/clangbsd/Makefile.inc1 Modified: projects/clangbsd/Makefile.inc1 ============================================================================== --- projects/clangbsd/Makefile.inc1 Sat Oct 31 19:02:08 2009 (r198729) +++ projects/clangbsd/Makefile.inc1 Sat Oct 31 19:22:12 2009 (r198730) @@ -275,9 +275,8 @@ LIB32CPUFLAGS= -march=i686 -mmmx -msse - LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -mfancy-math-387 -DCOMPAT_32BIT \ - -iprefix ${LIB32TMP}/usr/ \ - -L${LIB32TMP}/usr/lib32 \ -isystem ${LIB32TMP}/usr/include/ \ + -L${LIB32TMP}/usr/lib32 \ -B${LIB32TMP}/usr/lib32 # Yes, the flags are redundant.