summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-02-14 13:12:03 +0000
committerdim <dim@FreeBSD.org>2015-02-14 13:12:03 +0000
commitff34755926ad8a77e4498e82a23c847d33c6c72d (patch)
tree32512087a8fc0e78759068f074dd1fcac39ef5c9
parent3b7b68ffe74f0538bae62b7a4ba4e448156b9542 (diff)
parent1cd0dffdca6542739e3aa4c7e5221f0b28d076c4 (diff)
downloadFreeBSD-src-ff34755926ad8a77e4498e82a23c847d33c6c72d.zip
FreeBSD-src-ff34755926ad8a77e4498e82a23c847d33c6c72d.tar.gz
Merge ^/head r278499 through r278755.
-rw-r--r--Makefile.inc114
-rw-r--r--ObsoleteFiles.inc18
-rw-r--r--UPDATING15
-rw-r--r--bin/pkill/tests/pgrep-j_test.sh127
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c13
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d2
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c190
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c4
-rw-r--r--cddl/lib/Makefile3
-rw-r--r--cddl/lib/libdtrace/Makefile4
-rw-r--r--cddl/usr.sbin/Makefile6
-rw-r--r--contrib/binutils/ld/scripttempl/elf.sc2
-rw-r--r--contrib/elftoolchain/libdwarf/_libdwarf.h2
-rw-r--r--contrib/elftoolchain/libdwarf/dwarf_reloc.c4
-rw-r--r--contrib/elftoolchain/libdwarf/dwarf_set_reloc_application.34
-rw-r--r--contrib/elftoolchain/libdwarf/libdwarf.c2
-rw-r--r--contrib/elftoolchain/libdwarf/libdwarf.h1
-rw-r--r--contrib/elftoolchain/libdwarf/libdwarf_elf_init.c67
-rw-r--r--contrib/elftoolchain/libdwarf/libdwarf_reloc.c8
-rwxr-xr-xcontrib/netbsd-tests/games/t_factor.sh6
-rw-r--r--contrib/top/utils.c1
-rw-r--r--etc/login.conf2
-rw-r--r--etc/master.passwd2
-rw-r--r--etc/mtree/BSD.debug.dist2
-rw-r--r--etc/mtree/BSD.usr.dist2
-rwxr-xr-xetc/rc.d/LOGIN2
-rwxr-xr-xetc/rc.d/NETWORKING2
-rwxr-xr-xetc/rc.d/local_unbound1
-rwxr-xr-xetc/rc.d/netif3
-rwxr-xr-xetc/rc.d/utx1
-rw-r--r--etc/root/dot.cshrc2
-rw-r--r--etc/root/dot.login2
-rw-r--r--etc/root/dot.profile2
-rw-r--r--games/Makefile.inc3
-rw-r--r--games/caesar/rot13.sh2
-rw-r--r--games/fortune/datfiles/Makefile2
-rw-r--r--games/fortune/datfiles/freebsd-tips2
-rw-r--r--include/stdio.h2
-rw-r--r--lib/Makefile6
-rw-r--r--lib/libc/gen/_spinlock_stub.c41
-rw-r--r--lib/libc/include/libc_private.h5
-rw-r--r--lib/libc/nls/msgcat.c1
-rw-r--r--lib/libc/regex/regcomp.c17
-rw-r--r--lib/libc/sys/interposing_table.c2
-rw-r--r--lib/libiconv/Makefile25
-rw-r--r--lib/libproc/proc_bkpt.c3
-rw-r--r--lib/libproc/proc_regs.c8
-rw-r--r--lib/libproc/proc_sym.c21
-rw-r--r--lib/libthr/libthr.342
-rw-r--r--lib/libthr/thread/thr_private.h4
-rw-r--r--lib/libthr/thread/thr_spinlock.c10
-rw-r--r--lib/libthr/thread/thr_syscalls.c2
-rwxr-xr-xrelease/scripts/make-manifest.sh1
-rwxr-xr-xrelease/scripts/mk-vmimage.sh10
-rw-r--r--sbin/sysctl/sysctl.815
-rw-r--r--sbin/sysctl/sysctl.c23
-rw-r--r--share/info/Makefile22
-rw-r--r--share/info/dir-tmpl16
-rw-r--r--share/man/man4/led.42
-rw-r--r--share/man/man4/ral.410
-rw-r--r--share/man/man5/nullfs.55
-rw-r--r--share/man/man6/intro.611
-rw-r--r--share/man/man7/hier.72
-rw-r--r--share/mk/bsd.lib.mk2
-rw-r--r--share/mk/bsd.prog.mk10
-rw-r--r--share/skel/dot.cshrc2
-rw-r--r--share/skel/dot.login2
-rw-r--r--share/skel/dot.profile4
-rw-r--r--sys/amd64/amd64/db_disasm.c22
-rw-r--r--sys/arm/arm/cpufunc.c11
-rw-r--r--sys/arm/arm/cpufunc_asm_armv7.S27
-rw-r--r--sys/arm/arm/db_trace.c139
-rw-r--r--sys/arm/arm/elf_trampoline.c11
-rw-r--r--sys/arm/arm/exception.S15
-rw-r--r--sys/arm/arm/identcpu.c2
-rw-r--r--sys/arm/arm/trap.c10
-rw-r--r--sys/arm/conf/BEAGLEBONE6
-rw-r--r--sys/arm/include/armreg.h3
-rw-r--r--sys/arm/include/cpufunc.h2
-rw-r--r--sys/arm/xscale/ixp425/if_npe.c2
-rw-r--r--sys/boot/arm/ixp425/boot2/ixp425_board.c2
-rw-r--r--sys/boot/pc98/boot2/Makefile1
-rw-r--r--sys/cam/ctl/ctl.c174
-rw-r--r--sys/cam/ctl/ctl.h3
-rw-r--r--sys/cam/ctl/ctl_backend_block.c47
-rw-r--r--sys/cam/ctl/ctl_backend_ramdisk.c4
-rw-r--r--sys/cam/ctl/ctl_private.h11
-rw-r--r--sys/cam/ctl/ctl_tpc.c82
-rw-r--r--sys/cam/ctl/ctl_tpc.h2
-rw-r--r--sys/cam/ctl/ctl_tpc_local.c8
-rw-r--r--sys/cam/scsi/scsi_all.h40
-rw-r--r--sys/cddl/contrib/opensolaris/uts/arm/dtrace/fasttrap_isa.c30
-rw-r--r--sys/cddl/contrib/opensolaris/uts/arm/sys/fasttrap_isa.h94
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c2
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h7
-rw-r--r--sys/cddl/dev/dtrace/arm/dtrace_asm.S197
-rw-r--r--sys/cddl/dev/dtrace/arm/dtrace_isa.c356
-rw-r--r--sys/cddl/dev/dtrace/arm/dtrace_subr.c261
-rw-r--r--sys/cddl/dev/dtrace/arm/regset.h57
-rw-r--r--sys/cddl/dev/fbt/arm/fbt_isa.c192
-rw-r--r--sys/cddl/dev/fbt/arm/fbt_isa.h30
-rw-r--r--sys/cddl/dev/lockstat/lockstat.c3
-rw-r--r--sys/cddl/dev/profile/profile.c10
-rw-r--r--sys/conf/kern.pre.mk2
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h27
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c31
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c8
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c113
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c2
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h1
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c153
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c54
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_osprey22.ini4
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c5
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c14
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c217
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c92
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9340.ini8
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9580.ini8
-rw-r--r--sys/contrib/dev/ral/microcode.h694
-rw-r--r--sys/contrib/dev/ral/rt2860.fw.uu192
-rw-r--r--sys/contrib/vchiq/interface/compat/vchi_bsd.h8
-rw-r--r--sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c28
-rw-r--r--sys/dev/dwc/if_dwc.c31
-rw-r--r--sys/dev/hwpmc/hwpmc_armv7.c2
-rw-r--r--sys/dev/malo/if_malo.c15
-rw-r--r--sys/dev/mwl/if_mwl.c15
-rw-r--r--sys/dev/oce/oce_mbox.c1
-rw-r--r--sys/dev/ral/if_ral_pci.c3
-rw-r--r--sys/dev/ral/rt2860.c405
-rw-r--r--sys/dev/ral/rt2860reg.h230
-rw-r--r--sys/dev/smc/if_smc.c25
-rw-r--r--sys/dev/sound/usb/uaudio.c96
-rw-r--r--sys/dev/vt/font/vt_mouse_cursor.c62
-rw-r--r--sys/fs/autofs/autofs.c31
-rw-r--r--sys/fs/autofs/autofs_ioctl.h23
-rw-r--r--sys/i386/i386/db_disasm.c22
-rw-r--r--sys/kern/kern_sig.c23
-rw-r--r--sys/kern/kern_timeout.c36
-rw-r--r--sys/kern/sysv_shm.c3
-rw-r--r--sys/kern/vfs_mount.c10
-rw-r--r--sys/modules/dtrace/Makefile4
-rw-r--r--sys/modules/dtrace/dtrace/Makefile5
-rw-r--r--sys/netgraph/ng_base.c2
-rw-r--r--sys/ofed/include/linux/gfp.h17
-rw-r--r--sys/ofed/include/linux/kernel.h2
-rw-r--r--sys/ofed/include/linux/kref.h1
-rw-r--r--sys/ofed/include/linux/pci.h32
-rw-r--r--sys/sys/disk.h1
-rw-r--r--sys/sys/sockbuf.h2
-rw-r--r--sys/x86/acpica/madt.c13
-rw-r--r--sys/x86/include/vmware.h5
-rw-r--r--sys/x86/iommu/intel_drv.c7
-rw-r--r--sys/x86/iommu/intel_reg.h64
-rw-r--r--sys/x86/iommu/intel_utils.c6
-rw-r--r--tools/build/mk/OptionalObsoleteFiles.inc29
-rw-r--r--tools/tools/nanobsd/gateworks/Files/root/.profile2
-rw-r--r--tools/tools/nanobsd/pcengines/Files/root/.cshrc2
-rw-r--r--tools/tools/nanobsd/pcengines/Files/root/.login2
-rw-r--r--tools/tools/nanobsd/rescue/Files/root/.cshrc2
-rw-r--r--tools/tools/netmap/pkt-gen.c2
-rw-r--r--usr.bin/svn/svn/Makefile2
-rw-r--r--usr.bin/w/w.c4
-rw-r--r--usr.bin/wc/wc.c4
-rw-r--r--usr.bin/whereis/pathnames.h3
-rw-r--r--usr.bin/whereis/whereis.13
-rw-r--r--usr.bin/whereis/whereis.c5
-rw-r--r--usr.sbin/bsdconfig/include/messages.subr1
-rw-r--r--usr.sbin/ctladm/ctladm.88
-rw-r--r--usr.sbin/ctld/ctl.conf.56
-rw-r--r--usr.sbin/ctld/ctld.c10
-rw-r--r--usr.sbin/ctld/ctld.h1
-rw-r--r--usr.sbin/ctld/keys.c20
-rw-r--r--usr.sbin/flowctl/flowctl.c4
-rw-r--r--usr.sbin/freebsd-update/freebsd-update.sh36
-rw-r--r--usr.sbin/gssd/Makefile2
-rw-r--r--usr.sbin/gssd/gssd.c5
-rw-r--r--usr.sbin/iscsid/iscsid.h1
-rw-r--r--usr.sbin/iscsid/keys.c20
-rw-r--r--usr.sbin/mountd/mountd.c6
-rwxr-xr-xusr.sbin/pc-sysinstall/backend/functions-extractimage.sh2
181 files changed, 4327 insertions, 1424 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index f0fa949..9fefae8 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -50,10 +50,6 @@
.include <bsd.arch.inc.mk>
.include <bsd.compiler.mk>
-# We must do share/info early so that installation of info `dir'
-# entries works correctly. Do it first since it is less likely to
-# grow dependencies on include and lib than vice versa.
-#
# We must do lib/ and libexec/ before bin/, because if installworld
# installs a new /bin/sh, the 'make' command will *immediately*
# use that new version. And the new (dynamically-linked) /bin/sh
@@ -63,7 +59,7 @@ SRCDIR?= ${.CURDIR}
.if defined(SUBDIR_OVERRIDE)
SUBDIR= ${SUBDIR_OVERRIDE}
.else
-SUBDIR= share/info lib libexec
+SUBDIR= lib libexec
SUBDIR+=bin
.if ${MK_GAMES} != "no"
SUBDIR+=games
@@ -193,9 +189,8 @@ OBJTREE= ${MAKEOBJDIRPREFIX}
OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH}
.endif
WORLDTMP= ${OBJTREE}${.CURDIR}/tmp
-# /usr/games added for fortune which depend on strfile
-BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games:${WORLDTMP}/legacy/bin
-XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games
+BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin
+XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin
STRICTTMPPATH= ${BPATH}:${XPATH}
TMPPATH= ${STRICTTMPPATH}:${PATH}
@@ -811,9 +806,6 @@ ITOOLS+=makewhatis
# Non-base distributions produced by the base system
EXTRA_DISTRIBUTIONS= doc
-.if ${MK_GAMES} != "no"
-EXTRA_DISTRIBUTIONS+= games
-.endif
.if defined(LIB32TMP) && ${MK_LIB32} != "no"
EXTRA_DISTRIBUTIONS+= lib32
.endif
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index ccb2b5a..c29e87d 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -38,7 +38,7 @@
# xargs -n1 | sort | uniq -d;
# done
-# 20150210: new clang import which bumps version from 3.5.1 to 3.6.0.
+# 2015mmdd: new clang import which bumps version from 3.5.1 to 3.6.0.
OLD_FILES+=usr/include/clang/3.5.1/__wmmintrin_aes.h
OLD_FILES+=usr/include/clang/3.5.1/__wmmintrin_pclmul.h
OLD_FILES+=usr/include/clang/3.5.1/altivec.h
@@ -93,6 +93,22 @@ OLD_FILES+=usr/lib/clang/3.5.1/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a
OLD_DIRS+=usr/lib/clang/3.5.1/lib/freebsd
OLD_DIRS+=usr/lib/clang/3.5.1/lib
OLD_DIRS+=usr/lib/clang/3.5.1
+# 20150212: /usr/games moving into /usr/bin
+OLD_FILES+=usr/games/bcd
+OLD_FILES+=usr/games/caesar
+OLD_FILES+=usr/games/factor
+OLD_FILES+=usr/games/fortune
+OLD_FILES+=usr/games/grdc
+OLD_FILES+=usr/games/morse
+OLD_FILES+=usr/games/number
+OLD_FILES+=usr/games/pom
+OLD_FILES+=usr/games/ppt
+OLD_FILES+=usr/games/primes
+OLD_FILES+=usr/games/random
+OLD_FILES+=usr/games/rot13
+OLD_FILES+=usr/games/strfile
+OLD_FILES+=usr/games/unstr
+OLD_DIRS+=usr/games
# 20150209: liblzma header
OLD_FILES+=usr/include/lzma/lzma.h
# 20150124: spl.9 and friends
diff --git a/UPDATING b/UPDATING
index fba15c5..0fa66e0 100644
--- a/UPDATING
+++ b/UPDATING
@@ -34,6 +34,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
2015mmdd:
Clang and llvm have been upgraded to 3.6.0 release.
+20150210:
+ The autofs(4) ABI was changed in order to restore binary compatibility
+ with 10.1-RELEASE. The automountd(8) daemon needs to be rebuilt to work
+ with the new kernel.
+
20150131:
The powerpc64 kernel has been changed to a position-independent
executable. This can only be booted with a new version of loader(8),
@@ -290,6 +295,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
The lindev device has been removed since /dev/full has been made a
standard device. __FreeBSD_version has been bumped.
+20140424:
+ The knob WITHOUT_VI was added to the base system, which controls
+ building ex(1), vi(1), etc. Older releases of FreeBSD required ex(1)
+ in order to reorder files share/termcap and didn't build ex(1) as a
+ build tool, so building/installing with WITH_VI is highly advised for
+ build hosts for older releases.
+
+ This issue has been fixed in stable/9 and stable/10 in r277022 and
+ r276991, respectively.
+
20140418:
The YES_HESIOD knob has been removed. It has been obsolete for
a decade. Please move to using WITH_HESIOD instead or your builds
diff --git a/bin/pkill/tests/pgrep-j_test.sh b/bin/pkill/tests/pgrep-j_test.sh
index 6acfb4b..4830ace 100644
--- a/bin/pkill/tests/pgrep-j_test.sh
+++ b/bin/pkill/tests/pgrep-j_test.sh
@@ -4,94 +4,87 @@
jail_name_to_jid()
{
local check_name="$1"
- (
- line="$(jls -n 2> /dev/null | grep name=$check_name )"
- for nv in $line; do
- local name="${nv%=*}"
- if [ "${name}" = "jid" ]; then
- eval $nv
- echo $jid
- break
- fi
- done
- )
+ jls -j "$check_name" -s 2>/dev/null | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g'
}
base=pgrep_j_test
+if [ `id -u` -ne 0 ]; then
+ echo "1..0 # skip Test needs uid 0."
+ exit 0
+fi
+
echo "1..3"
+sleep=$(pwd)/sleep.txt
+ln -sf /bin/sleep $sleep
+
name="pgrep -j <jid>"
-if [ `id -u` -eq 0 ]; then
- sleep=$(pwd)/sleep.txt
- ln -sf /bin/sleep $sleep
- jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \
- command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 &
+sleep_amount=5
+jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \
+ command=daemon -p ${PWD}/${base}_1_1.pid $sleep $sleep_amount &
- jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \
- command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 &
+jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \
+ command=daemon -p ${PWD}/${base}_1_2.pid $sleep $sleep_amount &
+for i in `seq 1 10`; do
jid1=$(jail_name_to_jid ${base}_1_1)
jid2=$(jail_name_to_jid ${base}_1_2)
jid="${jid1},${jid2}"
- pid1="$(pgrep -f -x -j $jid "$sleep 5" | sort)"
- pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \
- $(cat ${PWD}/${base}_1_2.pid) | sort)
- if [ "$pid1" = "$pid2" ]; then
- echo "ok 1 - $name"
- else
- echo "not ok 1 - $name"
- fi
- [ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid)
- [ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid)
- rm -f $sleep
+ case "$jid" in
+ [0-9]+,[0-9]+)
+ break
+ ;;
+ esac
+ sleep 0.1
+done
+
+pid1="$(pgrep -f -x -j "$jid" "$sleep $sleep_amount" | sort)"
+pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \
+ $(cat ${PWD}/${base}_1_2.pid) | sort)
+if [ "$pid1" = "$pid2" ]; then
+ echo "ok 1 - $name"
else
- echo "ok 1 - $name # skip Test needs uid 0."
+ echo "not ok 1 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'"
fi
+[ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid)
+[ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid)
+wait
name="pgrep -j any"
-if [ `id -u` -eq 0 ]; then
- sleep=$(pwd)/sleep.txt
- ln -sf /bin/sleep $sleep
- jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \
- command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 &
+sleep_amount=6
+jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \
+ command=daemon -p ${PWD}/${base}_2_1.pid $sleep $sleep_amount &
- jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \
- command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 &
+jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \
+ command=daemon -p ${PWD}/${base}_2_2.pid $sleep $sleep_amount &
- sleep 2
- pid1="$(pgrep -f -x -j any "$sleep 5" | sort)"
- pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_2_1.pid)" \
- $(cat ${PWD}/${base}_2_2.pid) | sort)
- if [ "$pid1" = "$pid2" ]; then
- echo "ok 2 - $name"
- else
- echo "not ok 2 - $name"
- fi
- [ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid)
- [ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid)
- rm -f $sleep
+sleep 2
+pid1="$(pgrep -f -x -j any "$sleep $sleep_amount" | sort)"
+pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_2_1.pid)" \
+ $(cat ${PWD}/${base}_2_2.pid) | sort)
+if [ "$pid1" = "$pid2" ]; then
+ echo "ok 2 - $name"
else
- echo "ok 2 - $name # skip Test needs uid 0."
+ echo "not ok 2 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'"
fi
+[ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid)
+[ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid)
+wait
name="pgrep -j none"
-if [ `id -u` -eq 0 ]; then
- sleep=$(pwd)/sleep.txt
- ln -sf /bin/sleep $sleep
- daemon -p ${PWD}/${base}_3_1.pid $sleep 5 &
- jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \
- command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 &
- sleep 2
- pid="$(pgrep -f -x -j none "$sleep 5")"
- if [ "$pid" = "$(cat ${PWD}/${base}_3_1.pid)" ]; then
- echo "ok 3 - $name"
- else
- echo "not ok 3 - $name"
- fi
- rm -f $sleep
- [ -f ${PWD}/${base}_3_1.pid ] && kill $(cat $PWD/${base}_3_1.pid)
- [ -f ${PWD}/${base}_3_2.pid ] && kill $(cat $PWD/${base}_3_2.pid)
+sleep_amount=7
+daemon -p ${PWD}/${base}_3_1.pid $sleep $sleep_amount &
+jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \
+ command=daemon -p ${PWD}/${base}_3_2.pid $sleep $sleep_amount &
+sleep 2
+pid="$(pgrep -f -x -j none "$sleep $sleep_amount")"
+if [ "$pid" = "$(cat ${PWD}/${base}_3_1.pid)" ]; then
+ echo "ok 3 - $name"
else
- echo "ok 3 - $name # skip Test needs uid 0."
+ echo "not ok 3 - $name # pgrep output: '$(echo $pid1)', pidfile output: '$(echo $pid2)'"
fi
+[ -f ${PWD}/${base}_3_1.pid ] && kill $(cat $PWD/${base}_3_1.pid)
+[ -f ${PWD}/${base}_3_2.pid ] && kill $(cat $PWD/${base}_3_2.pid)
+
+rm -f $sleep
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c
index 3cded11..9b878a2 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.c
@@ -26,6 +26,8 @@
#pragma ident "%Z%%M% %I% %E% SMI"
+#include <sys/ioctl.h>
+
#include <assert.h>
#include <setjmp.h>
#include <signal.h>
@@ -69,7 +71,7 @@ main(int argc, char *argv[])
*/
if (sigsetjmp(env, 1) == 0) {
for (;;)
- (void) ioctl(-1, -1, NULL);
+ (void) ioctl(-1, 0, NULL);
}
/*
@@ -80,20 +82,19 @@ main(int argc, char *argv[])
fds[n++] = open(file, O_WRONLY);
fds[n++] = open(file, O_RDWR);
- fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | O_DSYNC |
- O_LARGEFILE | O_NOCTTY | O_NONBLOCK | O_NDELAY | O_RSYNC |
- O_SYNC | O_TRUNC | O_XATTR, 0666);
+ fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT |
+ O_NOCTTY | O_NONBLOCK | O_NDELAY | O_SYNC | O_TRUNC | 0666);
fds[n++] = open(file, O_RDWR);
(void) lseek(fds[n - 1], 123, SEEK_SET);
/*
* Once we have all the file descriptors in the state we want to test,
- * issue a bogus ioctl() on each fd with cmd -1 and arg NULL to whack
+ * issue a bogus ioctl() on each fd with cmd 0 and arg NULL to whack
* our DTrace script into recording the content of the fds[] array.
*/
for (i = 0; i < n; i++)
- (void) ioctl(fds[i], -1, NULL);
+ (void) ioctl(fds[i], 0, NULL);
assert(n <= sizeof (fds) / sizeof (fds[0]));
exit(0);
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d
index 52a3312..8685142 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/io/tst.fds.d
@@ -36,7 +36,7 @@ syscall::ioctl:entry
}
syscall::ioctl:entry
-/pid == $1 && arg0 != -1u && arg1 == -1u && arg2 == NULL/
+/pid == $1 && arg0 != -1u && arg1 == 0 && arg2 == NULL/
{
printf("fds[%d] fi_name = %s\n", arg0, fds[arg0].fi_name);
printf("fds[%d] fi_dirname = %s\n", arg0, fds[arg0].fi_dirname);
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c b/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c
new file mode 100644
index 0000000..25a250d
--- /dev/null
+++ b/cddl/contrib/opensolaris/lib/libdtrace/arm/dt_isadep.c
@@ -0,0 +1,190 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ * Copyright 2014 Howard Su
+ * Copyright 2015 George V. Neville-Neil
+ *
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#include <stdlib.h>
+#include <assert.h>
+#include <errno.h>
+#include <string.h>
+#include <libgen.h>
+
+#include <dt_impl.h>
+#include <dt_pid.h>
+
+#if !defined(sun)
+#define PR_MODEL_ILP32 1
+#define PR_MODEL_LP64 2
+#include <libproc_compat.h>
+#endif
+
+#define OP(x) ((x) >> 30)
+#define OP2(x) (((x) >> 22) & 0x07)
+#define COND(x) (((x) >> 25) & 0x0f)
+#define A(x) (((x) >> 29) & 0x01)
+
+#define OP_BRANCH 0
+
+#define OP2_BPcc 0x1
+#define OP2_Bicc 0x2
+#define OP2_BPr 0x3
+#define OP2_FBPfcc 0x5
+#define OP2_FBfcc 0x6
+
+/*ARGSUSED*/
+int
+dt_pid_create_entry_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp,
+ fasttrap_probe_spec_t *ftp, const GElf_Sym *symp)
+{
+ ftp->ftps_type = DTFTP_ENTRY;
+ ftp->ftps_pc = (uintptr_t)symp->st_value;
+ ftp->ftps_size = (size_t)symp->st_size;
+ ftp->ftps_noffs = 1;
+ ftp->ftps_offs[0] = 0;
+
+ if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) {
+ dt_dprintf("fasttrap probe creation ioctl failed: %s\n",
+ strerror(errno));
+ return (dt_set_errno(dtp, errno));
+ }
+
+ return (1);
+}
+
+int
+dt_pid_create_return_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp,
+ fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, uint64_t *stret)
+{
+
+ uint32_t *text;
+ int i;
+ int srdepth = 0;
+
+ dt_dprintf("%s: unimplemented\n", __func__);
+ return (DT_PROC_ERR);
+
+ if ((text = malloc(symp->st_size + 4)) == NULL) {
+ dt_dprintf("mr sparkle: malloc() failed\n");
+ return (DT_PROC_ERR);
+ }
+
+ if (Pread(P, text, symp->st_size, symp->st_value) != symp->st_size) {
+ dt_dprintf("mr sparkle: Pread() failed\n");
+ free(text);
+ return (DT_PROC_ERR);
+ }
+
+ /*
+ * Leave a dummy instruction in the last slot to simplify edge
+ * conditions.
+ */
+ text[symp->st_size / 4] = 0;
+
+ ftp->ftps_type = DTFTP_RETURN;
+ ftp->ftps_pc = symp->st_value;
+ ftp->ftps_size = symp->st_size;
+ ftp->ftps_noffs = 0;
+
+
+ free(text);
+ if (ftp->ftps_noffs > 0) {
+ if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) {
+ dt_dprintf("fasttrap probe creation ioctl failed: %s\n",
+ strerror(errno));
+ return (dt_set_errno(dtp, errno));
+ }
+ }
+
+
+ return (ftp->ftps_noffs);
+}
+
+/*ARGSUSED*/
+int
+dt_pid_create_offset_probe(struct ps_prochandle *P, dtrace_hdl_t *dtp,
+ fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, ulong_t off)
+{
+ if (off & 0x3)
+ return (DT_PROC_ALIGN);
+
+ ftp->ftps_type = DTFTP_OFFSETS;
+ ftp->ftps_pc = (uintptr_t)symp->st_value;
+ ftp->ftps_size = (size_t)symp->st_size;
+ ftp->ftps_noffs = 1;
+ ftp->ftps_offs[0] = off;
+
+ if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) {
+ dt_dprintf("fasttrap probe creation ioctl failed: %s\n",
+ strerror(errno));
+ return (dt_set_errno(dtp, errno));
+ }
+
+ return (1);
+}
+
+/*ARGSUSED*/
+int
+dt_pid_create_glob_offset_probes(struct ps_prochandle *P, dtrace_hdl_t *dtp,
+ fasttrap_probe_spec_t *ftp, const GElf_Sym *symp, const char *pattern)
+{
+ ulong_t i;
+
+ ftp->ftps_type = DTFTP_OFFSETS;
+ ftp->ftps_pc = (uintptr_t)symp->st_value;
+ ftp->ftps_size = (size_t)symp->st_size;
+ ftp->ftps_noffs = 0;
+
+ /*
+ * If we're matching against everything, just iterate through each
+ * instruction in the function, otherwise look for matching offset
+ * names by constructing the string and comparing it against the
+ * pattern.
+ */
+ if (strcmp("*", pattern) == 0) {
+ for (i = 0; i < symp->st_size; i += 4) {
+ ftp->ftps_offs[ftp->ftps_noffs++] = i;
+ }
+ } else {
+ char name[sizeof (i) * 2 + 1];
+
+ for (i = 0; i < symp->st_size; i += 4) {
+ (void) sprintf(name, "%lx", i);
+ if (gmatch(name, pattern))
+ ftp->ftps_offs[ftp->ftps_noffs++] = i;
+ }
+ }
+
+ if (ioctl(dtp->dt_ftfd, FASTTRAPIOC_MAKEPROBE, ftp) != 0) {
+ dt_dprintf("fasttrap probe creation ioctl failed: %s\n",
+ strerror(errno));
+ return (dt_set_errno(dtp, errno));
+ }
+
+ return (ftp->ftps_noffs);
+}
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c
index 82ec5fa..c6f47af 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/ctf.c
@@ -169,12 +169,12 @@ write_objects(iidesc_t *idp, ctf_buf_t *b)
{
ushort_t id = (idp ? idp->ii_dtype->t_id : 0);
- ctf_buf_write(b, &id, sizeof (id));
-
if (target_requires_swap) {
SWAP_16(id);
}
+ ctf_buf_write(b, &id, sizeof (id));
+
debug(3, "Wrote object %s (%d)\n", (idp ? idp->ii_name : "(null)"), id);
}
diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile
index 634d70e..955103e 100644
--- a/cddl/lib/Makefile
+++ b/cddl/lib/Makefile
@@ -27,7 +27,8 @@ _libzpool= libzpool
.endif
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \
- ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc"
+ ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "powerpc" || \
+ ${MACHINE_CPUARCH} == "arm"
_drti= drti
_libdtrace= libdtrace
.endif
diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile
index 006740a..7678db6 100644
--- a/cddl/lib/libdtrace/Makefile
+++ b/cddl/lib/libdtrace/Makefile
@@ -81,6 +81,10 @@ CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/mips
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/mips
.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/mips
+.elif ${MACHINE_CPUARCH} == "arm"
+CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/arm
+.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/arm
+.PATH: ${.CURDIR}/../../../sys/cddl/dev/dtrace/arm
.elif ${MACHINE_CPUARCH} == "powerpc"
CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/powerpc
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libdtrace/powerpc
diff --git a/cddl/usr.sbin/Makefile b/cddl/usr.sbin/Makefile
index 0d34afd..73315ff 100644
--- a/cddl/usr.sbin/Makefile
+++ b/cddl/usr.sbin/Makefile
@@ -30,6 +30,12 @@ _plockstat= plockstat
.endif
.endif
+.if ${MACHINE_CPUARCH} == "arm"
+_dtrace= dtrace
+_dtruss= dtruss
+_lockstat= lockstat
+.endif
+
.if ${MACHINE_CPUARCH} == "mips"
_dtrace= dtrace
.endif
diff --git a/contrib/binutils/ld/scripttempl/elf.sc b/contrib/binutils/ld/scripttempl/elf.sc
index 205d162..6060c3e 100644
--- a/contrib/binutils/ld/scripttempl/elf.sc
+++ b/contrib/binutils/ld/scripttempl/elf.sc
@@ -402,8 +402,8 @@ cat <<EOF
.fini_array ${RELOCATING-0} :
{
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_start = .);}}
- KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
+ KEEP (*(.fini_array))
${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
}
${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
diff --git a/contrib/elftoolchain/libdwarf/_libdwarf.h b/contrib/elftoolchain/libdwarf/_libdwarf.h
index d2e74c1..a7669e2 100644
--- a/contrib/elftoolchain/libdwarf/_libdwarf.h
+++ b/contrib/elftoolchain/libdwarf/_libdwarf.h
@@ -49,7 +49,7 @@
struct _libdwarf_globals {
Dwarf_Handler errhand;
Dwarf_Ptr errarg;
- int applyrela;
+ int applyreloc;
};
extern struct _libdwarf_globals _libdwarf;
diff --git a/contrib/elftoolchain/libdwarf/dwarf_reloc.c b/contrib/elftoolchain/libdwarf/dwarf_reloc.c
index 5e96db3..c912f27 100644
--- a/contrib/elftoolchain/libdwarf/dwarf_reloc.c
+++ b/contrib/elftoolchain/libdwarf/dwarf_reloc.c
@@ -33,8 +33,8 @@ dwarf_set_reloc_application(int apply)
{
int oldapply;
- oldapply = _libdwarf.applyrela;
- _libdwarf.applyrela = apply;
+ oldapply = _libdwarf.applyreloc;
+ _libdwarf.applyreloc = apply;
return (oldapply);
}
diff --git a/contrib/elftoolchain/libdwarf/dwarf_set_reloc_application.3 b/contrib/elftoolchain/libdwarf/dwarf_set_reloc_application.3
index d53c746..e62b262 100644
--- a/contrib/elftoolchain/libdwarf/dwarf_set_reloc_application.3
+++ b/contrib/elftoolchain/libdwarf/dwarf_set_reloc_application.3
@@ -24,7 +24,7 @@
.\"
.\" $Id: dwarf_set_reloc_application.3 2075 2011-10-27 03:47:28Z jkoshy $
.\"
-.Dd June 26, 2011
+.Dd February 11, 2015
.Os
.Dt DWARF_SET_RELOC_APPLICATION 3
.Sh NAME
@@ -47,6 +47,8 @@ handled by the DWARF(3) library.
If the argument
.Ar apply
holds a non-zero value, the library will process all the relevant
+.Dq ".rel"
+and
.Dq ".rela"
relocation sections and will apply the relocation records found to
their corresponding DWARF sections.
diff --git a/contrib/elftoolchain/libdwarf/libdwarf.c b/contrib/elftoolchain/libdwarf/libdwarf.c
index 5f48762..961fe2c 100644
--- a/contrib/elftoolchain/libdwarf/libdwarf.c
+++ b/contrib/elftoolchain/libdwarf/libdwarf.c
@@ -31,5 +31,5 @@ ELFTC_VCSID("$Id: libdwarf.c 2070 2011-10-27 03:05:32Z jkoshy $");
struct _libdwarf_globals _libdwarf = {
.errhand = NULL,
.errarg = NULL,
- .applyrela = 1
+ .applyreloc = 1
};
diff --git a/contrib/elftoolchain/libdwarf/libdwarf.h b/contrib/elftoolchain/libdwarf/libdwarf.h
index 9a4a899..20360a7 100644
--- a/contrib/elftoolchain/libdwarf/libdwarf.h
+++ b/contrib/elftoolchain/libdwarf/libdwarf.h
@@ -439,6 +439,7 @@ enum Dwarf_ISA {
DW_ISA_SPARC,
DW_ISA_X86,
DW_ISA_X86_64,
+ DW_ISA_AARCH64,
DW_ISA_MAX
};
diff --git a/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c b/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c
index 1e374f2..731a20d 100644
--- a/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c
+++ b/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c
@@ -50,32 +50,46 @@ static const char *debug_name[] = {
};
static void
-_dwarf_elf_apply_reloc(Dwarf_Debug dbg, void *buf, Elf_Data *rel_data,
- Elf_Data *symtab_data, int endian)
+_dwarf_elf_write_reloc(Dwarf_Debug dbg, Elf_Data *symtab_data, int endian,
+ void *buf, uint64_t offset, GElf_Xword r_info, GElf_Sxword r_addend)
{
- Dwarf_Unsigned type;
- GElf_Rela rela;
GElf_Sym sym;
- size_t symndx;
- uint64_t offset;
- int size, j;
+ int size;
+
+ if (gelf_getsym(symtab_data, GELF_R_SYM(r_info), &sym) == NULL)
+ return;
+ if ((size = _dwarf_get_reloc_size(dbg, GELF_R_TYPE(r_info))) == 0)
+ return; /* Unknown or non-absolute relocation. */
+ if (endian == ELFDATA2MSB)
+ _dwarf_write_msb(buf, &offset, sym.st_value + r_addend, size);
+ else
+ _dwarf_write_lsb(buf, &offset, sym.st_value + r_addend, size);
+}
- j = 0;
- while (gelf_getrela(rel_data, j++, &rela) != NULL) {
- symndx = GELF_R_SYM(rela.r_info);
- type = GELF_R_TYPE(rela.r_info);
+static void
+_dwarf_elf_apply_rel_reloc(Dwarf_Debug dbg, void *buf, Elf_Data *rel_data,
+ Elf_Data *symtab_data, int endian)
+{
+ GElf_Rel rel;
+ int j;
- if (gelf_getsym(symtab_data, symndx, &sym) == NULL)
- continue;
+ j = 0;
+ while (gelf_getrel(rel_data, j++, &rel) != NULL)
+ _dwarf_elf_write_reloc(dbg, symtab_data, endian, buf,
+ rel.r_offset, rel.r_info, 0);
+}
- offset = rela.r_offset;
- size = _dwarf_get_reloc_size(dbg, type);
+static void
+_dwarf_elf_apply_rela_reloc(Dwarf_Debug dbg, void *buf, Elf_Data *rel_data,
+ Elf_Data *symtab_data, int endian)
+{
+ GElf_Rela rela;
+ int j;
- if (endian == ELFDATA2MSB)
- _dwarf_write_msb(buf, &offset, rela.r_addend, size);
- else
- _dwarf_write_lsb(buf, &offset, rela.r_addend, size);
- }
+ j = 0;
+ while (gelf_getrela(rel_data, j++, &rela) != NULL)
+ _dwarf_elf_write_reloc(dbg, symtab_data, endian, buf,
+ rela.r_offset, rela.r_info, rela.r_addend);
}
static int
@@ -104,7 +118,8 @@ _dwarf_elf_relocate(Dwarf_Debug dbg, Elf *elf, Dwarf_Elf_Data *ed, size_t shndx,
return (DW_DLE_ELF);
}
- if (sh.sh_type != SHT_RELA || sh.sh_size == 0)
+ if ((sh.sh_type != SHT_REL && sh.sh_type != SHT_RELA) ||
+ sh.sh_size == 0)
continue;
if (sh.sh_info == shndx && sh.sh_link == symtab) {
@@ -125,8 +140,12 @@ _dwarf_elf_relocate(Dwarf_Debug dbg, Elf *elf, Dwarf_Elf_Data *ed, size_t shndx,
}
memcpy(ed->ed_alloc, ed->ed_data->d_buf,
ed->ed_data->d_size);
- _dwarf_elf_apply_reloc(dbg, ed->ed_alloc, rel,
- symtab_data, eh.e_ident[EI_DATA]);
+ if (sh.sh_type == SHT_REL)
+ _dwarf_elf_apply_rel_reloc(dbg, ed->ed_alloc,
+ rel, symtab_data, eh.e_ident[EI_DATA]);
+ else
+ _dwarf_elf_apply_rela_reloc(dbg, ed->ed_alloc,
+ rel, symtab_data, eh.e_ident[EI_DATA]);
return (DW_DLE_NONE);
}
@@ -282,7 +301,7 @@ _dwarf_elf_init(Dwarf_Debug dbg, Elf *elf, Dwarf_Error *error)
}
}
- if (_libdwarf.applyrela) {
+ if (_libdwarf.applyreloc) {
if (_dwarf_elf_relocate(dbg, elf,
&e->eo_data[j], elf_ndxscn(scn), symtab_ndx,
symtab_data, error) != DW_DLE_NONE)
diff --git a/contrib/elftoolchain/libdwarf/libdwarf_reloc.c b/contrib/elftoolchain/libdwarf/libdwarf_reloc.c
index ea91677..e3bba67 100644
--- a/contrib/elftoolchain/libdwarf/libdwarf_reloc.c
+++ b/contrib/elftoolchain/libdwarf/libdwarf_reloc.c
@@ -35,6 +35,8 @@ _dwarf_get_reloc_type(Dwarf_P_Debug dbg, int is64)
assert(dbg != NULL);
switch (dbg->dbgp_isa) {
+ case DW_ISA_AARCH64:
+ return (is64 ? R_AARCH64_ABS64 : R_AARCH64_ABS32);
case DW_ISA_X86:
return (R_386_32);
case DW_ISA_X86_64:
@@ -62,6 +64,12 @@ _dwarf_get_reloc_size(Dwarf_Debug dbg, Dwarf_Unsigned rel_type)
switch (dbg->dbg_machine) {
case EM_NONE:
break;
+ case EM_AARCH64:
+ if (rel_type == R_AARCH64_ABS32)
+ return (4);
+ else if (rel_type == R_AARCH64_ABS64)
+ return (8);
+ break;
case EM_ARM:
if (rel_type == R_ARM_ABS32)
return (4);
diff --git a/contrib/netbsd-tests/games/t_factor.sh b/contrib/netbsd-tests/games/t_factor.sh
index e2320a2..3a4ef62 100755
--- a/contrib/netbsd-tests/games/t_factor.sh
+++ b/contrib/netbsd-tests/games/t_factor.sh
@@ -27,13 +27,13 @@
expect() {
echo "${2}" >expout
- atf_check -s eq:0 -o file:expout -e empty /usr/games/factor ${1}
+ atf_check -s eq:0 -o file:expout -e empty /usr/bin/factor ${1}
}
atf_test_case overflow
overflow_head() {
atf_set "descr" "Tests for overflow conditions"
- atf_set "require.progs" "/usr/games/factor"
+ atf_set "require.progs" "/usr/bin/factor"
}
overflow_body() {
expect '8675309' '8675309: 8675309'
@@ -44,7 +44,7 @@ atf_test_case loop
loop_head() {
atf_set "descr" "Tests some cases that once locked the program" \
"in an infinite loop"
- atf_set "require.progs" "/usr/games/factor"
+ atf_set "require.progs" "/usr/bin/factor"
}
loop_body() {
expect '99999999999991' '99999999999991: 7 13 769231 1428571'
diff --git a/contrib/top/utils.c b/contrib/top/utils.c
index 43072b1..807f7ee 100644
--- a/contrib/top/utils.c
+++ b/contrib/top/utils.c
@@ -58,6 +58,7 @@ char *str;
* ever convert will be 2^32-1, which is 10
* digits.
*/
+_Static_assert(sizeof(int) <= 4, "buffer too small for this sized int");
char *itoa(val)
diff --git a/etc/login.conf b/etc/login.conf
index ff98d1c..5481f46 100644
--- a/etc/login.conf
+++ b/etc/login.conf
@@ -27,7 +27,7 @@ default:\
:copyright=/etc/COPYRIGHT:\
:welcome=/etc/motd:\
:setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\
- :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin ~/bin:\
+ :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\
:nologin=/var/run/nologin:\
:cputime=unlimited:\
:datasize=unlimited:\
diff --git a/etc/master.passwd b/etc/master.passwd
index af096dd..f2a4523 100644
--- a/etc/master.passwd
+++ b/etc/master.passwd
@@ -7,7 +7,7 @@ operator:*:2:5::0:0:System &:/:/usr/sbin/nologin
bin:*:3:7::0:0:Binaries Commands and Source:/:/usr/sbin/nologin
tty:*:4:65533::0:0:Tty Sandbox:/:/usr/sbin/nologin
kmem:*:5:65533::0:0:KMem Sandbox:/:/usr/sbin/nologin
-games:*:7:13::0:0:Games pseudo-user:/usr/games:/usr/sbin/nologin
+games:*:7:13::0:0:Games pseudo-user:/:/usr/sbin/nologin
news:*:8:8::0:0:News Subsystem:/:/usr/sbin/nologin
man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/usr/sbin/nologin
sshd:*:22:22::0:0:Secure Shell Daemon:/var/empty:/usr/sbin/nologin
diff --git a/etc/mtree/BSD.debug.dist b/etc/mtree/BSD.debug.dist
index bcb06b5..856a17e 100644
--- a/etc/mtree/BSD.debug.dist
+++ b/etc/mtree/BSD.debug.dist
@@ -21,8 +21,6 @@
usr
bin
..
- games
- ..
lib
clang
3.6.0
diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist
index da197cd..0e306d6 100644
--- a/etc/mtree/BSD.usr.dist
+++ b/etc/mtree/BSD.usr.dist
@@ -7,8 +7,6 @@
.
bin
..
- games
- ..
include
..
lib
diff --git a/etc/rc.d/LOGIN b/etc/rc.d/LOGIN
index ad4c8a7..2b45ba8 100755
--- a/etc/rc.d/LOGIN
+++ b/etc/rc.d/LOGIN
@@ -4,7 +4,7 @@
#
# PROVIDE: LOGIN
-# REQUIRE: DAEMON utx
+# REQUIRE: DAEMON
# This is a dummy dependency to ensure user services such as xdm,
# inetd, cron and kerberos are started after everything else, in case
diff --git a/etc/rc.d/NETWORKING b/etc/rc.d/NETWORKING
index 750d78a..2294628 100755
--- a/etc/rc.d/NETWORKING
+++ b/etc/rc.d/NETWORKING
@@ -6,7 +6,7 @@
# PROVIDE: NETWORKING NETWORK
# REQUIRE: netif netoptions routing ppp ipfw stf
# REQUIRE: defaultroute routed route6d mroute6d resolv bridge
-# REQUIRE: static_arp static_ndp local_unbound
+# REQUIRE: static_arp static_ndp
# This is a dummy dependency, for services which require networking
# to be operational before starting.
diff --git a/etc/rc.d/local_unbound b/etc/rc.d/local_unbound
index d8eef7d..5f3d0cf 100755
--- a/etc/rc.d/local_unbound
+++ b/etc/rc.d/local_unbound
@@ -5,6 +5,7 @@
# PROVIDE: local_unbound
# REQUIRE: FILESYSTEMS netif resolv
+# BEFORE: NETWORKING
# KEYWORD: shutdown
. /etc/rc.subr
diff --git a/etc/rc.d/netif b/etc/rc.d/netif
index dd0dde2..62ad31f 100755
--- a/etc/rc.d/netif
+++ b/etc/rc.d/netif
@@ -252,5 +252,8 @@ netif_common()
debug "The following interfaces were not configured: $_fail"
}
+# Load the old "network" config file also for compatibility.
+# This is needed for mfsBSD at least.
+load_rc_config network
load_rc_config $name
run_rc_command $*
diff --git a/etc/rc.d/utx b/etc/rc.d/utx
index 12f1f6a..694829f 100755
--- a/etc/rc.d/utx
+++ b/etc/rc.d/utx
@@ -5,6 +5,7 @@
# PROVIDE: utx
# REQUIRE: DAEMON FILESYSTEMS
+# BEFORE: LOGIN
# KEYWORD: shutdown
. /etc/rc.subr
diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc
index 3e94371..63bce3b 100644
--- a/etc/root/dot.cshrc
+++ b/etc/root/dot.cshrc
@@ -15,7 +15,7 @@ alias ll ls -lAF
# A righteous umask
umask 22
-set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)
+set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin)
setenv EDITOR vi
setenv PAGER more
diff --git a/etc/root/dot.login b/etc/root/dot.login
index 3a011ea..a849b68 100644
--- a/etc/root/dot.login
+++ b/etc/root/dot.login
@@ -6,4 +6,4 @@
#
# Uncomment to display a random cookie each login:
-# if ( -x /usr/games/fortune ) /usr/games/fortune -s
+# if ( -x /usr/bin/fortune ) /usr/bin/fortune -s
diff --git a/etc/root/dot.profile b/etc/root/dot.profile
index 1fca58e..1656b9b 100644
--- a/etc/root/dot.profile
+++ b/etc/root/dot.profile
@@ -1,6 +1,6 @@
# $FreeBSD$
#
-PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:~/bin
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin
export PATH
HOME=/root
export HOME
diff --git a/games/Makefile.inc b/games/Makefile.inc
index 2695d83..40525f8 100644
--- a/games/Makefile.inc
+++ b/games/Makefile.inc
@@ -1,7 +1,6 @@
# @(#)Makefile.inc 8.1 (Berkeley) 5/31/93
# $FreeBSD$
-BINDIR?= /usr/games
+BINDIR?= /usr/bin
FILESDIR?= ${SHAREDIR}/games
WARNS?= 6
-DISTRIBUTION?= games
diff --git a/games/caesar/rot13.sh b/games/caesar/rot13.sh
index 853205b..7dcef74 100644
--- a/games/caesar/rot13.sh
+++ b/games/caesar/rot13.sh
@@ -30,4 +30,4 @@
# @(#)rot13.sh 8.1 (Berkeley) 5/31/93
# $FreeBSD$
-exec /usr/games/caesar 13 "$@"
+exec /usr/bin/caesar 13 "$@"
diff --git a/games/fortune/datfiles/Makefile b/games/fortune/datfiles/Makefile
index bf13182..1eabaa4 100644
--- a/games/fortune/datfiles/Makefile
+++ b/games/fortune/datfiles/Makefile
@@ -15,7 +15,7 @@ FILESDIR= ${SHAREDIR}/games/fortune
.for f in ${DB}
$f.dat: $f
- PATH=$$PATH:/usr/games:${.OBJDIR}/../strfile \
+ PATH=$$PATH:/usr/bin:${.OBJDIR}/../strfile \
strfile -Cs ${.ALLSRC} ${.TARGET}
.endfor
diff --git a/games/fortune/datfiles/freebsd-tips b/games/fortune/datfiles/freebsd-tips
index b984d10..f3406a2 100644
--- a/games/fortune/datfiles/freebsd-tips
+++ b/games/fortune/datfiles/freebsd-tips
@@ -443,7 +443,7 @@ on this system. Example entries are in
%
You can use "pkg info" to see a list of packages you have installed.
%
-You can use the 'fetch' command to retrieve files over ftp or http.
+You can use the 'fetch' command to retrieve files over ftp, http or https.
fetch http://www.FreeBSD.org/index.html
diff --git a/include/stdio.h b/include/stdio.h
index 512e60e..eaebff8 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -166,7 +166,7 @@ __END_DECLS
#define __SRW 0x0010 /* open for reading & writing */
#define __SEOF 0x0020 /* found EOF */
#define __SERR 0x0040 /* found error */
-#define __SMBF 0x0080 /* _buf is from malloc */
+#define __SMBF 0x0080 /* _bf._base is from malloc */
#define __SAPP 0x0100 /* fdopen()ed in append mode */
#define __SSTR 0x0200 /* this is an sprintf/snprintf string */
#define __SOPT 0x0400 /* do fseek() optimization */
diff --git a/lib/Makefile b/lib/Makefile
index 2305dc6..c9e1e23 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -284,6 +284,12 @@ _libsmb= libsmb
_libsmb= libsmb
.endif
+.if ${MACHINE_CPUARCH} == "arm"
+_libsmb= libsmb
+_libproc= libproc
+_librtld_db= librtld_db
+.endif
+
.if ${MK_OPENSSL} != "no"
_libmp= libmp
.endif
diff --git a/lib/libc/gen/_spinlock_stub.c b/lib/libc/gen/_spinlock_stub.c
index 47bbfeb..fddfc1b 100644
--- a/lib/libc/gen/_spinlock_stub.c
+++ b/lib/libc/gen/_spinlock_stub.c
@@ -33,51 +33,48 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include "spinlock.h"
+#include "libc_private.h"
long _atomic_lock_stub(volatile long *);
void _spinlock_stub(spinlock_t *);
void _spinunlock_stub(spinlock_t *);
void _spinlock_debug_stub(spinlock_t *, char *, int);
-/*
- * Declare weak definitions in case the application is not linked
- * with libpthread.
- */
__weak_reference(_atomic_lock_stub, _atomic_lock);
-__weak_reference(_spinlock_stub, _spinlock);
-__weak_reference(_spinunlock_stub, _spinunlock);
-__weak_reference(_spinlock_debug_stub, _spinlock_debug);
-/*
- * This function is a stub for the _atomic_lock function in libpthread.
- */
long
_atomic_lock_stub(volatile long *lck __unused)
{
return (0L);
}
+__weak_reference(_spinlock, _spinlock_debug);
+#pragma weak _spinlock
+void
+_spinlock(spinlock_t *lck)
+{
-/*
- * This function is a stub for the spinlock function in libpthread.
- */
+ ((void (*)(spinlock_t *lck))__libc_interposing[INTERPOS_spinlock])
+ (lck);
+
+}
+
+#pragma weak _spinlock
void
-_spinlock_stub(spinlock_t *lck __unused)
+_spinunlock(spinlock_t *lck)
{
+
+ ((void (*)(spinlock_t *lck))__libc_interposing[INTERPOS_spinunlock])
+ (lck);
+
}
-/*
- * This function is a stub for the spinunlock function in libpthread.
- */
void
-_spinunlock_stub(spinlock_t *lck __unused)
+__libc_spinlock_stub(spinlock_t *lck __unused)
{
}
-/*
- * This function is a stub for the debug spinlock function in libpthread.
- */
void
-_spinlock_debug_stub(spinlock_t *lck __unused, char *fname __unused, int lineno __unused)
+__libc_spinunlock_stub(spinlock_t *lck __unused)
{
}
diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h
index bfcd3d0..71fc8df 100644
--- a/lib/libc/include/libc_private.h
+++ b/lib/libc/include/libc_private.h
@@ -95,6 +95,9 @@ do { \
_SPINUNLOCK(&__stdio_thread_lock); \
} while (0)
+void __libc_spinlock_stub(struct _spinlock *);
+void __libc_spinunlock_stub(struct _spinlock *);
+
/*
* Indexes into the pthread jump table.
*
@@ -216,6 +219,8 @@ enum {
INTERPOS_write,
INTERPOS_writev,
INTERPOS__pthread_mutex_init_calloc_cb,
+ INTERPOS_spinlock,
+ INTERPOS_spinunlock,
INTERPOS_MAX
};
diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c
index 2859916..0cba460 100644
--- a/lib/libc/nls/msgcat.c
+++ b/lib/libc/nls/msgcat.c
@@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$");
np->name = strdup(n); \
np->path = NULL; \
np->catd = NLERR; \
+ np->refcount = 0; \
np->lang = (l == NULL) ? NULL : \
strdup(l); \
np->caterrno = e; \
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index 2ecb88c..ae92f6a 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -192,6 +192,7 @@ regcomp(regex_t * __restrict preg,
struct parse *p = &pa;
int i;
size_t len;
+ size_t maxlen;
#ifdef REDEBUG
# define GOODFLAGS(f) (f)
#else
@@ -213,7 +214,23 @@ regcomp(regex_t * __restrict preg,
g = (struct re_guts *)malloc(sizeof(struct re_guts));
if (g == NULL)
return(REG_ESPACE);
+ /*
+ * Limit the pattern space to avoid a 32-bit overflow on buffer
+ * extension. Also avoid any signed overflow in case of conversion
+ * so make the real limit based on a 31-bit overflow.
+ *
+ * Likely not applicable on 64-bit systems but handle the case
+ * generically (who are we to stop people from using ~715MB+
+ * patterns?).
+ */
+ maxlen = ((size_t)-1 >> 1) / sizeof(sop) * 2 / 3;
+ if (len >= maxlen) {
+ free((char *)g);
+ return(REG_ESPACE);
+ }
p->ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */
+ assert(p->ssize >= len);
+
p->strip = (sop *)malloc(p->ssize * sizeof(sop));
p->slen = 0;
if (p->strip == NULL) {
diff --git a/lib/libc/sys/interposing_table.c b/lib/libc/sys/interposing_table.c
index d303779..0fd6c75 100644
--- a/lib/libc/sys/interposing_table.c
+++ b/lib/libc/sys/interposing_table.c
@@ -73,6 +73,8 @@ interpos_func_t __libc_interposing[INTERPOS_MAX] = {
SLOT(write, __sys_write),
SLOT(writev, __sys_writev),
SLOT(_pthread_mutex_init_calloc_cb, _pthread_mutex_init_calloc_cb_stub),
+ SLOT(spinlock, __libc_spinlock_stub),
+ SLOT(spinunlock, __libc_spinunlock_stub),
};
#undef SLOT
diff --git a/lib/libiconv/Makefile b/lib/libiconv/Makefile
deleted file mode 100644
index 1949597..0000000
--- a/lib/libiconv/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-# $FreeBSD$
-
-.PATH: ${.CURDIR}/../libc/iconv
-
-LIB= iconv
-SHLIB_MAJOR= 4
-MAN= iconv.3 iconvctl.3 iconv_canonicalize.3 iconvlist.3 \
- __iconv_get_list.3
-MLNKS= iconv.3 iconv_open.3 \
- iconv.3 iconv_open_into.3 \
- iconv.3 iconv_close.3 \
- iconv.3 __iconv.3 \
- __iconv_get_list.3 __iconv_free_list.3
-SRCS= citrus_bcs.c citrus_bcs_strtol.c citrus_bcs_strtoul.c \
- citrus_csmapper.c citrus_db.c citrus_db_factory.c \
- citrus_db_hash.c citrus_esdb.c citrus_hash.c \
- citrus_iconv.c citrus_lookup.c citrus_lookup_factory.c \
- citrus_mapper.c citrus_memstream.c citrus_mmap.c \
- citrus_module.c citrus_none.c citrus_pivot_factory.c \
- citrus_prop.c citrus_stdenc.c iconv.c
-
-CFLAGS.gcc+= --param max-inline-insns-single=128
-CFLAGS+= -I ${.CURDIR}/../../include -I${.CURDIR}/../libc/include
-
-.include <bsd.lib.mk>
diff --git a/lib/libproc/proc_bkpt.c b/lib/libproc/proc_bkpt.c
index fe6ed4a..1e4a6cc 100644
--- a/lib/libproc/proc_bkpt.c
+++ b/lib/libproc/proc_bkpt.c
@@ -51,6 +51,9 @@ __FBSDID("$FreeBSD$");
#elif defined(__powerpc__)
#define BREAKPOINT_INSTR 0x7fe00008 /* trap */
#define BREAKPOINT_INSTR_SZ 4
+#elif defined(__arm__)
+#define BREAKPOINT_INSTR 0xe7ffffff /* bkpt */
+#define BREAKPOINT_INSTR_SZ 4
#else
#error "Add support for your architecture"
#endif
diff --git a/lib/libproc/proc_regs.c b/lib/libproc/proc_regs.c
index 145c8fe..35d8d38 100644
--- a/lib/libproc/proc_regs.c
+++ b/lib/libproc/proc_regs.c
@@ -56,6 +56,8 @@ proc_regget(struct proc_handle *phdl, proc_reg_t reg, unsigned long *regvalue)
case REG_PC:
#if defined(__amd64__)
*regvalue = regs.r_rip;
+#elif defined(__arm__)
+ *regvalue = regs.r_pc;
#elif defined(__i386__)
*regvalue = regs.r_eip;
#elif defined(__mips__)
@@ -67,6 +69,8 @@ proc_regget(struct proc_handle *phdl, proc_reg_t reg, unsigned long *regvalue)
case REG_SP:
#if defined(__amd64__)
*regvalue = regs.r_rsp;
+#elif defined(__arm__)
+ *regvalue = regs.r_sp;
#elif defined(__i386__)
*regvalue = regs.r_esp;
#elif defined(__mips__)
@@ -99,6 +103,8 @@ proc_regset(struct proc_handle *phdl, proc_reg_t reg, unsigned long regvalue)
case REG_PC:
#if defined(__amd64__)
regs.r_rip = regvalue;
+#elif defined(__arm__)
+ regs.r_pc = regvalue;
#elif defined(__i386__)
regs.r_eip = regvalue;
#elif defined(__mips__)
@@ -110,6 +116,8 @@ proc_regset(struct proc_handle *phdl, proc_reg_t reg, unsigned long regvalue)
case REG_SP:
#if defined(__amd64__)
regs.r_rsp = regvalue;
+#elif defined(__arm__)
+ regs.r_sp = regvalue;
#elif defined(__i386__)
regs.r_esp = regvalue;
#elif defined(__mips__)
diff --git a/lib/libproc/proc_sym.c b/lib/libproc/proc_sym.c
index d4f8262..5c5ac55 100644
--- a/lib/libproc/proc_sym.c
+++ b/lib/libproc/proc_sym.c
@@ -82,6 +82,21 @@ fail:
strlcpy(buf, symbol, len);
}
+static int
+find_dbg_obj(const char *path)
+{
+ int fd;
+ char dbg_path[PATH_MAX];
+
+ snprintf(dbg_path, sizeof(dbg_path),
+ "/usr/lib/debug/%s.debug", path);
+ fd = open(dbg_path, O_RDONLY);
+ if (fd > 0)
+ return (fd);
+ else
+ return (open(path, O_RDONLY));
+}
+
static void
proc_rdl2prmap(rd_loadobj_t *rdl, prmap_t *map)
{
@@ -295,7 +310,7 @@ proc_addr2sym(struct proc_handle *p, uintptr_t addr, char *name,
if ((map = proc_addr2map(p, addr)) == NULL)
return (-1);
- if ((fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) {
+ if ((fd = find_dbg_obj(map->pr_mapname)) < 0) {
DPRINTF("ERROR: open %s failed", map->pr_mapname);
goto err0;
}
@@ -443,7 +458,7 @@ proc_name2sym(struct proc_handle *p, const char *object, const char *symbol,
DPRINTFX("ERROR: couldn't find object %s", object);
goto err0;
}
- if ((fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) {
+ if ((fd = find_dbg_obj(map->pr_mapname)) < 0) {
DPRINTF("ERROR: open %s failed", map->pr_mapname);
goto err0;
}
@@ -539,7 +554,7 @@ proc_iter_symbyaddr(struct proc_handle *p, const char *object, int which,
if ((map = proc_name2map(p, object)) == NULL)
return (-1);
- if ((fd = open(map->pr_mapname, O_RDONLY)) < 0) {
+ if ((fd = find_dbg_obj(map->pr_mapname)) < 0) {
DPRINTF("ERROR: open %s failed", map->pr_mapname);
goto err0;
}
diff --git a/lib/libthr/libthr.3 b/lib/libthr/libthr.3
index 4b636ce..8108e2f 100644
--- a/lib/libthr/libthr.3
+++ b/lib/libthr/libthr.3
@@ -1,5 +1,5 @@
.\" Copyright (c) 2005 Robert N. M. Watson
-.\" Copyright (c) 2014 The FreeBSD Foundation, Inc.
+.\" Copyright (c) 2014,2015 The FreeBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Part of this documentation was written by
@@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 26, 2014
+.Dd February 12, 2015
.Dt LIBTHR 3
.Os
.Sh NAME
@@ -200,45 +200,25 @@ Bigger values reduce the frequency of the FIFO discipline.
The value must be between 0 and 255.
.El
.Sh INTERACTION WITH RUN-TIME LINKER
-The
+On load,
.Nm
-library must appear before
-.Li libc
-in the global order of depended objects.
-.Pp
-Loading
-.Nm
-with the
-.Xr dlopen 3
-call in the process after the program binary is activated
-is not supported, and causes miscellaneous and hard-to-diagnose misbehaviour.
-This is due to
-.Nm
-interposing several important
-.Li libc
-symbols to provide thread-safe services.
-In particular,
-.Dv errno
-and the locking stubs from
-.Li libc
-are affected.
-This requirement is currently not enforced.
-.Pp
-If the program loads any modules at run-time, and those modules may require
-threading services, the main program binary must be linked with
-.Li libpthread ,
-even if it does not require any services from the library.
+installs interposing handlers into the hooks exported by
+.Li libc .
+The interposers provide real locking implementation instead of the
+stubs for single-threaded processes in
+.Li ,
+cancellation support and some modifications to the signal operations.
.Pp
.Nm
cannot be unloaded; the
.Xr dlclose 3
function does not perform any action when called with a handle for
.Nm .
-One of the reasons is that the interposing of
+One of the reasons is that the internal interposing of
.Li libc
functions cannot be undone.
.Sh SIGNALS
-The implementation also interposes the user-installed
+The implementation interposes the user-installed
.Xr signal 3
handlers.
This interposing is done to postpone signal delivery to threads which
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h
index 50be059..3cfbc63 100644
--- a/lib/libthr/thread/thr_private.h
+++ b/lib/libthr/thread/thr_private.h
@@ -928,6 +928,10 @@ int __thr_sigwait(const sigset_t *set, int *sig);
int __thr_sigwaitinfo(const sigset_t *set, siginfo_t *info);
int __thr_swapcontext(ucontext_t *oucp, const ucontext_t *ucp);
+struct _spinlock;
+void __thr_spinunlock(struct _spinlock *lck);
+void __thr_spinlock(struct _spinlock *lck);
+
struct tcb *_tcb_ctor(struct pthread *, int);
void _tcb_dtor(struct tcb *);
diff --git a/lib/libthr/thread/thr_spinlock.c b/lib/libthr/thread/thr_spinlock.c
index ecc8067..380d10d 100644
--- a/lib/libthr/thread/thr_spinlock.c
+++ b/lib/libthr/thread/thr_spinlock.c
@@ -61,7 +61,7 @@ static void init_spinlock(spinlock_t *lck);
*/
void
-_spinunlock(spinlock_t *lck)
+__thr_spinunlock(spinlock_t *lck)
{
struct spinlock_extra *_extra;
@@ -70,7 +70,7 @@ _spinunlock(spinlock_t *lck)
}
void
-_spinlock(spinlock_t *lck)
+__thr_spinlock(spinlock_t *lck)
{
struct spinlock_extra *_extra;
@@ -84,12 +84,6 @@ _spinlock(spinlock_t *lck)
THR_UMUTEX_LOCK(_get_curthread(), &_extra->lock);
}
-void
-_spinlock_debug(spinlock_t *lck, char *fname __unused, int lineno __unused)
-{
- _spinlock(lck);
-}
-
static void
init_spinlock(spinlock_t *lck)
{
diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c
index 06b63c8..10fbad4 100644
--- a/lib/libthr/thread/thr_syscalls.c
+++ b/lib/libthr/thread/thr_syscalls.c
@@ -597,6 +597,8 @@ __thr_interpose_libc(void)
SLOT(wait4);
SLOT(write);
SLOT(writev);
+ SLOT(spinlock);
+ SLOT(spinunlock);
#undef SLOT
*(__libc_interposing_slot(
INTERPOS__pthread_mutex_init_calloc_cb)) =
diff --git a/release/scripts/make-manifest.sh b/release/scripts/make-manifest.sh
index 7f54688..b21e8f5 100755
--- a/release/scripts/make-manifest.sh
+++ b/release/scripts/make-manifest.sh
@@ -13,7 +13,6 @@ desc_base="Base system (MANDATORY)"
desc_kernel="Kernel (MANDATORY)"
desc_doc="Additional documentation"
doc_default=off
-desc_games="Games (fortune, etc.)"
desc_lib32="32-bit compatibility libraries"
desc_ports="Ports tree"
desc_src="System source code"
diff --git a/release/scripts/mk-vmimage.sh b/release/scripts/mk-vmimage.sh
index b6122a5..16c33c8 100755
--- a/release/scripts/mk-vmimage.sh
+++ b/release/scripts/mk-vmimage.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#-
-# Copyright (c) 2014 The FreeBSD Foundation
+# Copyright (c) 2014, 2015 The FreeBSD Foundation
# All rights reserved.
#
# This software was developed by Glen Barber under sponsorship
@@ -40,6 +40,7 @@ usage() {
main() {
local arg
+ VMCONFIG="/dev/null"
while getopts "C:c:d:f:i:o:s:S:" arg; do
case "${arg}" in
C)
@@ -76,10 +77,9 @@ main() {
-z "${WORLDDIR}" -o \
-z "${DESTDIR}" -o \
-z "${VMSIZE}" -o \
- -z "${VMIMAGE}" -o \
- -z "${VMCONFIG}" ];
+ -z "${VMIMAGE}" ];
then
- usage
+ usage || exit 0
fi
if [ -z "${VMBUILDCONF}" ] || [ ! -e "${VMBUILDCONF}" ]; then
@@ -89,7 +89,7 @@ main() {
. "${VMBUILDCONF}"
- if [ ! -z "${VMCONFIG}" ] && [ -e "${VMCONFIG}" ]; then
+ if [ ! -z "${VMCONFIG}" ] && [ ! -c "${VMCONFIG}" ]; then
. "${VMCONFIG}"
fi
diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8
index b81de6e..cb8145e 100644
--- a/sbin/sysctl/sysctl.8
+++ b/sbin/sysctl/sysctl.8
@@ -28,7 +28,7 @@
.\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93
.\" $FreeBSD$
.\"
-.Dd December 13, 2012
+.Dd February 12, 2015
.Dt SYSCTL 8
.Os
.Sh NAME
@@ -37,11 +37,13 @@
.Sh SYNOPSIS
.Nm
.Op Fl bdehiNnoRTqx
+.Op Fl B Ar bufsize
.Op Fl f Ar filename
.Ar name Ns Op = Ns Ar value
.Ar ...
.Nm
.Op Fl bdehNnoRTqx
+.Op Fl B Ar bufsize
.Fl a
.Sh DESCRIPTION
The
@@ -68,6 +70,15 @@ the command line.
Force the value of the variable(s) to be output in raw, binary format.
No names are printed and no terminating newlines are output.
This is mostly useful with a single variable.
+.It Fl B Ar bufsize
+Set the buffer size to read from the
+.Nm
+to
+.Ar bufsize .
+This is necessary for a
+.Nm
+that has variable length, and the probe value of 0 is a valid length, such as
+.Va kern.arandom .
.It Fl d
Print the description of the variable instead of its value.
.It Fl e
@@ -128,7 +139,7 @@ Suppress some warnings generated by
.Nm
to standard error.
.It Fl T
-Display only variables that are setable via loader (CTLFLAG_TUN).
+Display only variables that are settable via loader (CTLFLAG_TUN).
.It Fl W
Display only writable variables that are not statistical.
Useful for determining the set of runtime tunable sysctls.
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index 6849b9e..f321120 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -71,7 +71,7 @@ static const char rcsid[] =
static const char *conffile;
-static int aflag, bflag, dflag, eflag, hflag, iflag;
+static int aflag, bflag, Bflag, dflag, eflag, hflag, iflag;
static int Nflag, nflag, oflag, qflag, Tflag, Wflag, xflag;
static int oidfmt(int *, int, char *, u_int *);
@@ -112,8 +112,8 @@ usage(void)
{
(void)fprintf(stderr, "%s\n%s\n",
- "usage: sysctl [-bdehiNnoqTWx] [-f filename] name[=value] ...",
- " sysctl [-bdehNnoqTWx] -a");
+ "usage: sysctl [-bdehiNnoqTWx] [ -B <bufsize> ] [-f filename] name[=value] ...",
+ " sysctl [-bdehNnoqTWx] [ -B <bufsize> ] -a");
exit(1);
}
@@ -127,7 +127,7 @@ main(int argc, char **argv)
setbuf(stdout,0);
setbuf(stderr,0);
- while ((ch = getopt(argc, argv, "Aabdef:hiNnoqTwWxX")) != -1) {
+ while ((ch = getopt(argc, argv, "AabB:def:hiNnoqTwWxX")) != -1) {
switch (ch) {
case 'A':
/* compatibility */
@@ -139,6 +139,9 @@ main(int argc, char **argv)
case 'b':
bflag = 1;
break;
+ case 'B':
+ Bflag = strtol(optarg, NULL, 0);
+ break;
case 'd':
dflag = 1;
break;
@@ -222,7 +225,7 @@ parse(const char *string, int lineno)
unsigned int uintval;
long longval;
unsigned long ulongval;
- size_t newsize = 0;
+ size_t newsize = Bflag;
int64_t i64val;
uint64_t u64val;
int mib[CTL_MAXNAME];
@@ -815,9 +818,13 @@ show_var(int *oid, int nlen)
return (0);
}
/* find an estimate of how much we need for this var */
- j = 0;
- i = sysctl(oid, nlen, 0, &j, 0, 0);
- j += j; /* we want to be sure :-) */
+ if (Bflag)
+ j = Bflag;
+ else {
+ j = 0;
+ i = sysctl(oid, nlen, 0, &j, 0, 0);
+ j += j; /* we want to be sure :-) */
+ }
val = oval = malloc(j + 1);
if (val == NULL) {
diff --git a/share/info/Makefile b/share/info/Makefile
deleted file mode 100644
index 6c09adb..0000000
--- a/share/info/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 6/5/93
-# $FreeBSD$
-
-NO_OBJ=
-
-.include <bsd.prog.mk>
-
-beforeinstall:
-.if !exists(${DESTDIR}${INFODIR})
- @echo "Warning: the directory ${DESTDIR}${INFODIR} does not exist!"
- @echo "Perhaps the variable INFODIR is set incorrectly"
- @echo "or your mtree database files are broken."
- @echo ""
- @echo "As a workaround you can create the directory by hand, e.g.:"
- @echo -n "install -d -o ${INFOOWN} -g ${INFOGRP} "
- @echo "-m 0755 ${DESTDIR}${INFODIR}"
- @exit 3;
-.endif
-.if !exists(${DESTDIR}${INFODIR}/dir)
- ${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m 644 \
- dir-tmpl ${DESTDIR}${INFODIR}/dir
-.endif
diff --git a/share/info/dir-tmpl b/share/info/dir-tmpl
deleted file mode 100644
index 6064d3a..0000000
--- a/share/info/dir-tmpl
+++ /dev/null
@@ -1,16 +0,0 @@
--*- Text -*-
-This is the file .../info/dir, which contains the
-topmost node of the Info hierarchy, called (dir)Top.
-The first time you invoke Info you start off looking at this node.
-
-File: dir, Node: Top This is the top of the INFO tree
-
- This (the Directory node) gives a menu of major topics.
- Typing "q" exits, "?" lists all Info commands, "d" returns here,
- "h" gives a primer for first-timers,
- "mEmacs<Return>" visits the Emacs manual, etc.
-
- In Emacs, you can click mouse button 2 on a menu item or cross reference
- to select it.
-
-* Menu:
diff --git a/share/man/man4/led.4 b/share/man/man4/led.4
index 0fe4af0..1ae8f91 100644
--- a/share/man/man4/led.4
+++ b/share/man/man4/led.4
@@ -170,7 +170,7 @@ flashes
.Pp
.Dl *_*__**_
.Bd -literal
-/usr/games/morse -l "Soekris rocks" > /dev/led/error
+/usr/bin/morse -l "Soekris rocks" > /dev/led/error
.Ed
.Sh SEE ALSO
.Xr morse 6
diff --git a/share/man/man4/ral.4 b/share/man/man4/ral.4
index d9024b0..29aaa8c 100644
--- a/share/man/man4/ral.4
+++ b/share/man/man4/ral.4
@@ -42,7 +42,7 @@ if_ral_load="YES"
The
.Nm
driver supports PCI/PCIe/CardBus wireless adapters based on the Ralink RT2500,
-RT2501, RT2600, RT2700, RT2800 and RT3090 chipsets.
+RT2501, RT2600, RT2700, RT2800, RT3090 and RT3900E chipsets.
.Pp
The RT2500 chipset is the first generation of 802.11b/g adapters from Ralink.
It consists of two integrated chips, an RT2560 MAC/BBP and an RT2525 radio
@@ -104,6 +104,13 @@ interfaces may be operated together with a
.Cm hostap
interface to construct a wireless repeater device.
.Pp
+The RT3900E chipset is a single-chip 802.11n adapters from Ralink.
+The MAC/Baseband Processor can be an RT5390 or RT5392.
+The RT5390 chip operates in the 2GHz spectrum and supports 1 transmit path
+and 1 receiver path (1T1R).
+The RT5392 chip operates in the 2GHz spectrum and supports up to 2 transmit
+paths and 2 receiver paths (2T2R).
+.Pp
The transmit speed is user-selectable or can be adapted automatically by the
driver depending on the number of hardware transmission retries.
For more information on configuring this device, see
@@ -142,6 +149,7 @@ chipsets, including:
.It "Compex WLP54G" Ta RT2560 Ta PCI
.It "Conceptronic C54RC" Ta RT2560 Ta CardBus
.It "Conceptronic C54Ri" Ta RT2560 Ta PCI
+.It "D-Link DWA-525 rev A2" Ta RT5392 Ta PCI
.It "Digitus DN-7001G-RA" Ta RT2560 Ta CardBus
.It "Digitus DN-7006G-RA" Ta RT2560 Ta PCI
.It "E-Tech WGPC02" Ta RT2560 Ta CardBus
diff --git a/share/man/man5/nullfs.5 b/share/man/man5/nullfs.5
index 3f691e4..4536480 100644
--- a/share/man/man5/nullfs.5
+++ b/share/man/man5/nullfs.5
@@ -24,15 +24,14 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 5, 2008
+.Dd February 10, 2015
.Dt NULLFS 5
.Os
.Sh NAME
.Nm nullfs
.Nd "null file system"
.Sh SYNOPSIS
-To enable support for
-.Nm ,
+To enable support for this driver,
place the following line in the kernel configuration file:
.Bd -ragged -offset indent
.Cd "options NULLFS"
diff --git a/share/man/man6/intro.6 b/share/man/man6/intro.6
index 2abfeda..797472f 100644
--- a/share/man/man6/intro.6
+++ b/share/man/man6/intro.6
@@ -37,7 +37,7 @@
This section contains information about games.
The games
are located in
-.Pa /usr/games
+.Pa /usr/bin
if installed.
You can get a short overview about all the games with the
command:
@@ -45,13 +45,18 @@ command:
$ apropos '\\(6\\)'
.Ed
.Sh FILES
-.Bl -tag -width /usr/games -compact
-.It Pa /usr/games
+.Bl -tag -width /usr/bin -compact
+.It Pa /usr/bin
location of games
.El
.Sh SEE ALSO
.Xr intro 1
.Sh HISTORY
+In earlier versions of
+.Fx ,
+games were located in
+.Pa /usr/games .
+.Pp
The
.Nm
section manual page appeared in
diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7
index 197533f..5c3a5a1 100644
--- a/share/man/man7/hier.7
+++ b/share/man/man7/hier.7
@@ -187,8 +187,6 @@ common utilities, programming tools, and applications
.It Pa compat/
files needed to support binary compatibility with other operating systems,
such as Linux
-.It Pa games/
-useful and semi-frivolous programs
.It Pa include/
standard C include files
.Pp
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 6a6f3f2..72a43ae 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -286,7 +286,7 @@ _EXTRADEPEND:
mv $$TMP ${DEPENDFILE}
.if !defined(NO_EXTRADEPEND) && defined(SHLIB_NAME)
.if defined(DPADD) && !empty(DPADD)
- echo ${SHLIB_NAME}: ${DPADD} >> ${DEPENDFILE}
+ echo ${SHLIB_NAME_FULL}: ${DPADD} >> ${DEPENDFILE}
.endif
.endif
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 340950a..3fb70d1 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -62,7 +62,7 @@ PROG_FULL=${PROG}.full
${BINDIR} == "/bin" ||\
${BINDIR} == "/libexec" ||\
${BINDIR} == "/sbin" ||\
- ${BINDIR:C%/usr/(bin|bsdinstall|games|libexec|lpr|sendmail|sm.bin|sbin)(/.*)?%/usr/bin%} == "/usr/bin"\
+ ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin)(/.*)?%/usr/bin%} == "/usr/bin"\
)
DEBUGFILEDIR= ${DEBUGDIR}${BINDIR}
.else
@@ -168,15 +168,15 @@ CLEANFILES+= ${OBJS}
_EXTRADEPEND:
.if defined(LDFLAGS) && !empty(LDFLAGS:M-nostdlib)
.if defined(DPADD) && !empty(DPADD)
- echo ${PROG}: ${DPADD} >> ${DEPENDFILE}
+ echo ${PROG_FULL}: ${DPADD} >> ${DEPENDFILE}
.endif
.else
- echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE}
+ echo ${PROG_FULL}: ${LIBC} ${DPADD} >> ${DEPENDFILE}
.if defined(PROG_CXX)
.if ${COMPILER_TYPE} == "clang" && empty(CXXFLAGS:M-stdlib=libstdc++)
- echo ${PROG}: ${LIBCPLUSPLUS} >> ${DEPENDFILE}
+ echo ${PROG_FULL}: ${LIBCPLUSPLUS} >> ${DEPENDFILE}
.else
- echo ${PROG}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE}
+ echo ${PROG_FULL}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE}
.endif
.endif
.endif
diff --git a/share/skel/dot.cshrc b/share/skel/dot.cshrc
index d6c6798..2f92be2 100644
--- a/share/skel/dot.cshrc
+++ b/share/skel/dot.cshrc
@@ -14,7 +14,7 @@ alias ll ls -lAF
# These are normally set through /etc/login.conf. You may override them here
# if wanted.
-# set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)
+# set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin)
# setenv BLOCKSIZE K
# A righteous umask
# umask 22
diff --git a/share/skel/dot.login b/share/skel/dot.login
index b8688f9..170d25c 100644
--- a/share/skel/dot.login
+++ b/share/skel/dot.login
@@ -5,4 +5,4 @@
# see also csh(1), environ(7).
#
-if ( -x /usr/games/fortune ) /usr/games/fortune freebsd-tips
+if ( -x /usr/bin/fortune ) /usr/bin/fortune freebsd-tips
diff --git a/share/skel/dot.profile b/share/skel/dot.profile
index 300402a..ad66198 100644
--- a/share/skel/dot.profile
+++ b/share/skel/dot.profile
@@ -7,7 +7,7 @@
# These are normally set through /etc/login.conf. You may override them here
# if wanted.
-# PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH
+# PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH
# BLOCKSIZE=K; export BLOCKSIZE
# Setting TERM is normally done through /etc/ttys. Do only override
@@ -21,4 +21,4 @@ PAGER=more; export PAGER
# set ENV to a file invoked each time sh is started for interactive use.
ENV=$HOME/.shrc; export ENV
-if [ -x /usr/games/fortune ] ; then /usr/games/fortune freebsd-tips ; fi
+if [ -x /usr/bin/fortune ] ; then /usr/bin/fortune freebsd-tips ; fi
diff --git a/sys/amd64/amd64/db_disasm.c b/sys/amd64/amd64/db_disasm.c
index 7e7a2ad..50da76b 100644
--- a/sys/amd64/amd64/db_disasm.c
+++ b/sys/amd64/amd64/db_disasm.c
@@ -250,6 +250,26 @@ static const struct inst db_inst_0f0x[] = {
/*0f*/ { "", FALSE, NONE, 0, 0 },
};
+static const struct inst db_inst_0f1x[] = {
+/*10*/ { "", FALSE, NONE, 0, 0 },
+/*11*/ { "", FALSE, NONE, 0, 0 },
+/*12*/ { "", FALSE, NONE, 0, 0 },
+/*13*/ { "", FALSE, NONE, 0, 0 },
+/*14*/ { "", FALSE, NONE, 0, 0 },
+/*15*/ { "", FALSE, NONE, 0, 0 },
+/*16*/ { "", FALSE, NONE, 0, 0 },
+/*17*/ { "", FALSE, NONE, 0, 0 },
+
+/*18*/ { "", FALSE, NONE, 0, 0 },
+/*19*/ { "", FALSE, NONE, 0, 0 },
+/*1a*/ { "", FALSE, NONE, 0, 0 },
+/*1b*/ { "", FALSE, NONE, 0, 0 },
+/*1c*/ { "", FALSE, NONE, 0, 0 },
+/*1d*/ { "", FALSE, NONE, 0, 0 },
+/*1e*/ { "", FALSE, NONE, 0, 0 },
+/*1f*/ { "nopl", TRUE, SDEP, 0, "nopw" },
+};
+
static const struct inst db_inst_0f2x[] = {
/*20*/ { "mov", TRUE, LONG, op2(CR,El), 0 },
/*21*/ { "mov", TRUE, LONG, op2(DR,El), 0 },
@@ -431,7 +451,7 @@ static const struct inst db_inst_0fcx[] = {
static const struct inst * const db_inst_0f[] = {
db_inst_0f0x,
- 0,
+ db_inst_0f1x,
db_inst_0f2x,
db_inst_0f3x,
db_inst_0f4x,
diff --git a/sys/arm/arm/cpufunc.c b/sys/arm/arm/cpufunc.c
index 8e69c54..65a2bca 100644
--- a/sys/arm/arm/cpufunc.c
+++ b/sys/arm/arm/cpufunc.c
@@ -837,6 +837,11 @@ u_int cpu_reset_needs_v4_MMU_disable; /* flag used in locore.s */
defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \
defined(CPU_CORTEXA) || defined(CPU_KRAIT)
+/* Global cache line sizes, use 32 as default */
+int arm_dcache_min_line_size = 32;
+int arm_icache_min_line_size = 32;
+int arm_idcache_min_line_size = 32;
+
static void get_cachetype_cp15(void);
/* Additional cache information local to this file. Log2 of some of the
@@ -868,6 +873,12 @@ get_cachetype_cp15()
goto out;
if (CPU_CT_FORMAT(ctype) == CPU_CT_ARMV7) {
+ /* Resolve minimal cache line sizes */
+ arm_dcache_min_line_size = 1 << (CPU_CT_DMINLINE(ctype) + 2);
+ arm_icache_min_line_size = 1 << (CPU_CT_IMINLINE(ctype) + 2);
+ arm_idcache_min_line_size =
+ min(arm_icache_min_line_size, arm_dcache_min_line_size);
+
__asm __volatile("mrc p15, 1, %0, c0, c0, 1"
: "=r" (clevel));
arm_cache_level = clevel;
diff --git a/sys/arm/arm/cpufunc_asm_armv7.S b/sys/arm/arm/cpufunc_asm_armv7.S
index 9fe6aa5..5dcc171 100644
--- a/sys/arm/arm/cpufunc_asm_armv7.S
+++ b/sys/arm/arm/cpufunc_asm_armv7.S
@@ -41,6 +41,12 @@ __FBSDID("$FreeBSD$");
.word _C_LABEL(arm_cache_loc)
.Lcache_type:
.word _C_LABEL(arm_cache_type)
+.Larmv7_dcache_line_size:
+ .word _C_LABEL(arm_dcache_min_line_size)
+.Larmv7_icache_line_size:
+ .word _C_LABEL(arm_icache_min_line_size)
+.Larmv7_idcache_line_size:
+ .word _C_LABEL(arm_idcache_min_line_size)
.Lway_mask:
.word 0x3ff
.Lmax_index:
@@ -180,14 +186,9 @@ ENTRY(armv7_idcache_wbinv_all)
RET
END(armv7_idcache_wbinv_all)
-/* XXX Temporary set it to 32 for MV cores, however this value should be
- * get from Cache Type register
- */
-.Larmv7_line_size:
- .word 32
-
ENTRY(armv7_dcache_wb_range)
- ldr ip, .Larmv7_line_size
+ ldr ip, .Larmv7_dcache_line_size
+ ldr ip, [ip]
sub r3, ip, #1
and r2, r0, r3
add r1, r1, r2
@@ -202,7 +203,8 @@ ENTRY(armv7_dcache_wb_range)
END(armv7_dcache_wb_range)
ENTRY(armv7_dcache_wbinv_range)
- ldr ip, .Larmv7_line_size
+ ldr ip, .Larmv7_dcache_line_size
+ ldr ip, [ip]
sub r3, ip, #1
and r2, r0, r3
add r1, r1, r2
@@ -221,7 +223,8 @@ END(armv7_dcache_wbinv_range)
* must use wb-inv of the entire cache.
*/
ENTRY(armv7_dcache_inv_range)
- ldr ip, .Larmv7_line_size
+ ldr ip, .Larmv7_dcache_line_size
+ ldr ip, [ip]
sub r3, ip, #1
and r2, r0, r3
add r1, r1, r2
@@ -236,7 +239,8 @@ ENTRY(armv7_dcache_inv_range)
END(armv7_dcache_inv_range)
ENTRY(armv7_idcache_wbinv_range)
- ldr ip, .Larmv7_line_size
+ ldr ip, .Larmv7_idcache_line_size
+ ldr ip, [ip]
sub r3, ip, #1
and r2, r0, r3
add r1, r1, r2
@@ -264,7 +268,8 @@ ENTRY_NP(armv7_icache_sync_all)
END(armv7_icache_sync_all)
ENTRY_NP(armv7_icache_sync_range)
- ldr ip, .Larmv7_line_size
+ ldr ip, .Larmv7_icache_line_size
+ ldr ip, [ip]
.Larmv7_sync_next:
mcr CP15_ICIMVAU(r0)
mcr CP15_DCCMVAC(r0)
diff --git a/sys/arm/arm/db_trace.c b/sys/arm/arm/db_trace.c
index 04ab565..cbeee1f 100644
--- a/sys/arm/arm/db_trace.c
+++ b/sys/arm/arm/db_trace.c
@@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$");
#include <ddb/db_sym.h>
#include <ddb/db_output.h>
-#ifdef __ARM_EABI__
/*
* Definitions for the instruction interpreter.
*
@@ -453,131 +452,6 @@ db_stack_trace_cmd(struct unwind_state *state)
}
}
}
-#endif
-
-/*
- * APCS stack frames are awkward beasts, so I don't think even trying to use
- * a structure to represent them is a good idea.
- *
- * Here's the diagram from the APCS. Increasing address is _up_ the page.
- *
- * save code pointer [fp] <- fp points to here
- * return link value [fp, #-4]
- * return sp value [fp, #-8]
- * return fp value [fp, #-12]
- * [saved v7 value]
- * [saved v6 value]
- * [saved v5 value]
- * [saved v4 value]
- * [saved v3 value]
- * [saved v2 value]
- * [saved v1 value]
- * [saved a4 value]
- * [saved a3 value]
- * [saved a2 value]
- * [saved a1 value]
- *
- * The save code pointer points twelve bytes beyond the start of the
- * code sequence (usually a single STM) that created the stack frame.
- * We have to disassemble it if we want to know which of the optional
- * fields are actually present.
- */
-
-#ifndef __ARM_EABI__ /* The frame format is differend in AAPCS */
-static void
-db_stack_trace_cmd(db_expr_t addr, db_expr_t count, boolean_t kernel_only)
-{
- u_int32_t *frame, *lastframe;
- c_db_sym_t sym;
- const char *name;
- db_expr_t value;
- db_expr_t offset;
- int scp_offset;
-
- frame = (u_int32_t *)addr;
- lastframe = NULL;
- scp_offset = -(get_pc_str_offset() >> 2);
-
- while (count-- && frame != NULL && !db_pager_quit) {
- db_addr_t scp;
- u_int32_t savecode;
- int r;
- u_int32_t *rp;
- const char *sep;
-
- /*
- * In theory, the SCP isn't guaranteed to be in the function
- * that generated the stack frame. We hope for the best.
- */
- scp = frame[FR_SCP];
-
- sym = db_search_symbol(scp, DB_STGY_ANY, &offset);
- if (sym == C_DB_SYM_NULL) {
- value = 0;
- name = "(null)";
- } else
- db_symbol_values(sym, &name, &value);
- db_printf("%s() at ", name);
- db_printsym(scp, DB_STGY_PROC);
- db_printf("\n");
-#ifdef __PROG26
- db_printf("\tscp=0x%08x rlv=0x%08x (", scp, frame[FR_RLV] & R15_PC);
- db_printsym(frame[FR_RLV] & R15_PC, DB_STGY_PROC);
- db_printf(")\n");
-#else
- db_printf("\tscp=0x%08x rlv=0x%08x (", scp, frame[FR_RLV]);
- db_printsym(frame[FR_RLV], DB_STGY_PROC);
- db_printf(")\n");
-#endif
- db_printf("\trsp=0x%08x rfp=0x%08x", frame[FR_RSP], frame[FR_RFP]);
-
- savecode = ((u_int32_t *)scp)[scp_offset];
- if ((savecode & 0x0e100000) == 0x08000000) {
- /* Looks like an STM */
- rp = frame - 4;
- sep = "\n\t";
- for (r = 10; r >= 0; r--) {
- if (savecode & (1 << r)) {
- db_printf("%sr%d=0x%08x",
- sep, r, *rp--);
- sep = (frame - rp) % 4 == 2 ?
- "\n\t" : " ";
- }
- }
- }
-
- db_printf("\n");
-
- /*
- * Switch to next frame up
- */
- if (frame[FR_RFP] == 0)
- break; /* Top of stack */
-
- lastframe = frame;
- frame = (u_int32_t *)(frame[FR_RFP]);
-
- if (INKERNEL((int)frame)) {
- /* staying in kernel */
- if (frame <= lastframe) {
- db_printf("Bad frame pointer: %p\n", frame);
- break;
- }
- } else if (INKERNEL((int)lastframe)) {
- /* switch from user to kernel */
- if (kernel_only)
- break; /* kernel stack only */
- } else {
- /* in user */
- if (frame <= lastframe) {
- db_printf("Bad user frame pointer: %p\n",
- frame);
- break;
- }
- }
- }
-}
-#endif
/* XXX stubs */
void
@@ -600,24 +474,18 @@ db_md_set_watchpoint(db_expr_t addr, db_expr_t size)
int
db_trace_thread(struct thread *thr, int count)
{
-#ifdef __ARM_EABI__
struct unwind_state state;
-#endif
struct pcb *ctx;
if (thr != curthread) {
ctx = kdb_thr_ctx(thr);
-#ifdef __ARM_EABI__
state.registers[FP] = ctx->pcb_regs.sf_r11;
state.registers[SP] = ctx->pcb_regs.sf_sp;
state.registers[LR] = ctx->pcb_regs.sf_lr;
state.registers[PC] = ctx->pcb_regs.sf_pc;
db_stack_trace_cmd(&state);
-#else
- db_stack_trace_cmd(ctx->pcb_regs.sf_r11, -1, TRUE);
-#endif
} else
db_trace_self();
return (0);
@@ -626,7 +494,6 @@ db_trace_thread(struct thread *thr, int count)
void
db_trace_self(void)
{
-#ifdef __ARM_EABI__
struct unwind_state state;
uint32_t sp;
@@ -639,10 +506,4 @@ db_trace_self(void)
state.registers[PC] = (uint32_t)db_trace_self;
db_stack_trace_cmd(&state);
-#else
- db_addr_t addr;
-
- addr = (db_addr_t)__builtin_frame_address(0);
- db_stack_trace_cmd(addr, -1, FALSE);
-#endif
}
diff --git a/sys/arm/arm/elf_trampoline.c b/sys/arm/arm/elf_trampoline.c
index 559b992..24b3011 100644
--- a/sys/arm/arm/elf_trampoline.c
+++ b/sys/arm/arm/elf_trampoline.c
@@ -115,6 +115,10 @@ int arm_pcache_unified;
int arm_dcache_align;
int arm_dcache_align_mask;
+int arm_dcache_min_line_size = 32;
+int arm_icache_min_line_size = 32;
+int arm_idcache_min_line_size = 32;
+
u_int arm_cache_level;
u_int arm_cache_type[14];
u_int arm_cache_loc;
@@ -277,6 +281,13 @@ get_cachetype_cp15()
goto out;
if (CPU_CT_FORMAT(ctype) == CPU_CT_ARMV7) {
+ /* Resolve minimal cache line sizes */
+ arm_dcache_min_line_size = 1 << (CPU_CT_DMINLINE(ctype) + 2);
+ arm_icache_min_line_size = 1 << (CPU_CT_IMINLINE(ctype) + 2);
+ arm_idcache_min_line_size =
+ (arm_dcache_min_line_size > arm_icache_min_line_size ?
+ arm_icache_min_line_size : arm_dcache_min_line_size);
+
__asm __volatile("mrc p15, 1, %0, c0, c0, 1"
: "=r" (clevel));
arm_cache_level = clevel;
diff --git a/sys/arm/arm/exception.S b/sys/arm/arm/exception.S
index 17172f8..58ae612 100644
--- a/sys/arm/arm/exception.S
+++ b/sys/arm/arm/exception.S
@@ -48,11 +48,26 @@
#include "assym.s"
+#include "opt_kdtrace.h"
#include <machine/asm.h>
#include <machine/armreg.h>
#include <machine/asmacros.h>
__FBSDID("$FreeBSD$");
+#ifdef KDTRACE_HOOKS
+ .bss
+ .align 4
+ .global _C_LABEL(dtrace_invop_jump_addr)
+_C_LABEL(dtrace_invop_jump_addr):
+ .word 0
+ .word 0
+
+ .global _C_LABEL(dtrace_invop_calltrap_addr)
+_C_LABEL(dtrace_invop_calltrap_addr):
+ .word 0
+ .word 0
+#endif
+
.text
.align 2
diff --git a/sys/arm/arm/identcpu.c b/sys/arm/arm/identcpu.c
index b37a1b3..75bf08c 100644
--- a/sys/arm/arm/identcpu.c
+++ b/sys/arm/arm/identcpu.c
@@ -387,7 +387,7 @@ identify_arm_cpu(void)
u_int8_t type, linesize;
int i;
- cpuid = cpu_id();
+ cpuid = cpu_ident();
if (cpuid == 0) {
printf("Processor failed probe - no CPU ID\n");
diff --git a/sys/arm/arm/trap.c b/sys/arm/arm/trap.c
index 081cfaa..0f142ce 100644
--- a/sys/arm/arm/trap.c
+++ b/sys/arm/arm/trap.c
@@ -78,6 +78,9 @@
* Created : 28/11/94
*/
+#ifdef KDTRACE_HOOKS
+#include <sys/dtrace_bsd.h>
+#endif
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -427,6 +430,13 @@ dab_fatal(struct trapframe *tf, u_int fsr, u_int far, struct thread *td,
{
const char *mode;
+#ifdef KDTRACE_HOOKS
+ if (!TRAP_USERMODE(tf)) {
+ if (dtrace_trap_func != NULL && (*dtrace_trap_func)(tf, far & FAULT_TYPE_MASK))
+ return (0);
+ }
+#endif
+
mode = TRAP_USERMODE(tf) ? "user" : "kernel";
disable_interrupts(PSR_I|PSR_F);
diff --git a/sys/arm/conf/BEAGLEBONE b/sys/arm/conf/BEAGLEBONE
index 44e5c4e..975d6b2 100644
--- a/sys/arm/conf/BEAGLEBONE
+++ b/sys/arm/conf/BEAGLEBONE
@@ -27,6 +27,12 @@ include "../ti/am335x/std.am335x"
makeoptions WITHOUT_MODULES="ahc"
+# DTrace support
+options KDTRACE_HOOKS # Kernel DTrace hooks
+options DDB_CTF # all architectures - kernel ELF linker loads CTF data
+makeoptions WITH_CTF=1
+makeoptions MODULES_OVERRIDE="opensolaris dtrace dtrace/lockstat dtrace/profile dtrace/fbt"
+
options HZ=100
options SCHED_4BSD # 4BSD scheduler
options PREEMPTION # Enable kernel thread preemption
diff --git a/sys/arm/include/armreg.h b/sys/arm/include/armreg.h
index 4d0078c..3163ba5 100644
--- a/sys/arm/include/armreg.h
+++ b/sys/arm/include/armreg.h
@@ -320,6 +320,9 @@
#define CPU_CT_S (1U << 24) /* split cache */
#define CPU_CT_CTYPE(x) (((x) >> 25) & 0xf) /* cache type */
#define CPU_CT_FORMAT(x) ((x) >> 29)
+/* Cache type register definitions for ARM v7 */
+#define CPU_CT_IMINLINE(x) ((x) & 0xf) /* I$ min line size */
+#define CPU_CT_DMINLINE(x) (((x) >> 16) & 0xf) /* D$ min line size */
#define CPU_CT_CTYPE_WT 0 /* write-through */
#define CPU_CT_CTYPE_WB1 1 /* write-back, clean w/ read */
diff --git a/sys/arm/include/cpufunc.h b/sys/arm/include/cpufunc.h
index ae2f979..25e5efe 100644
--- a/sys/arm/include/cpufunc.h
+++ b/sys/arm/include/cpufunc.h
@@ -175,7 +175,7 @@ struct cpu_functions {
extern struct cpu_functions cpufuncs;
extern u_int cputype;
-#define cpu_id() cpufuncs.cf_id()
+#define cpu_ident() cpufuncs.cf_id()
#define cpu_cpwait() cpufuncs.cf_cpwait()
#define cpu_control(c, e) cpufuncs.cf_control(c, e)
diff --git a/sys/arm/xscale/ixp425/if_npe.c b/sys/arm/xscale/ixp425/if_npe.c
index d6db7e6..fa3eacb 100644
--- a/sys/arm/xscale/ixp425/if_npe.c
+++ b/sys/arm/xscale/ixp425/if_npe.c
@@ -285,7 +285,7 @@ unit2npeid(int unit)
};
/* XXX check feature register instead */
return (unit < 3 ? npeidmap[
- (cpu_id() & CPU_ID_CPU_MASK) == CPU_ID_IXP435][unit] : -1);
+ (cpu_ident() & CPU_ID_CPU_MASK) == CPU_ID_IXP435][unit] : -1);
}
static int
diff --git a/sys/boot/arm/ixp425/boot2/ixp425_board.c b/sys/boot/arm/ixp425/boot2/ixp425_board.c
index c13f8ed..d2bf813 100644
--- a/sys/boot/arm/ixp425/boot2/ixp425_board.c
+++ b/sys/boot/arm/ixp425/boot2/ixp425_board.c
@@ -74,7 +74,7 @@ board_init(void)
{
struct board_config **pbp;
- cputype = cpu_id() & CPU_ID_CPU_MASK;
+ cputype = cpu_ident() & CPU_ID_CPU_MASK;
SET_FOREACH(pbp, boards)
/* XXX pass down redboot board type */
diff --git a/sys/boot/pc98/boot2/Makefile b/sys/boot/pc98/boot2/Makefile
index 3d571cf..24de9d4 100644
--- a/sys/boot/pc98/boot2/Makefile
+++ b/sys/boot/pc98/boot2/Makefile
@@ -92,6 +92,7 @@ boot2.out: ${BTXCRT} boot2.o sio.o
${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC}
boot2.o: boot2.s
+ ${CC} ${ACFLAGS} -c boot2.s
SRCS= boot2.c boot2.h
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index e6305aa..f278c7c 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -4483,6 +4483,8 @@ ctl_init_log_page_index(struct ctl_lun *lun)
lun->log_pages.index[1].page_len = k * 2;
lun->log_pages.index[2].page_data = &lun->log_pages.lbp_page[0];
lun->log_pages.index[2].page_len = 12*CTL_NUM_LBP_PARAMS;
+ lun->log_pages.index[3].page_data = (uint8_t *)&lun->log_pages.stat_page;
+ lun->log_pages.index[3].page_len = sizeof(lun->log_pages.stat_page);
return (CTL_RETVAL_COMPLETE);
}
@@ -4720,6 +4722,9 @@ ctl_alloc_lun(struct ctl_softc *ctl_softc, struct ctl_lun *ctl_lun,
lun->serseq = CTL_LUN_SERSEQ_OFF;
lun->ctl_softc = ctl_softc;
+#ifdef CTL_TIME_IO
+ lun->last_busy = getsbinuptime();
+#endif
TAILQ_INIT(&lun->ooa_queue);
TAILQ_INIT(&lun->blocked_queue);
STAILQ_INIT(&lun->error_list);
@@ -7085,6 +7090,67 @@ ctl_lbp_log_sense_handler(struct ctl_scsiio *ctsio,
}
int
+ctl_sap_log_sense_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index,
+ int pc)
+{
+ struct ctl_lun *lun;
+ struct stat_page *data;
+ uint64_t rn, wn, rb, wb;
+ struct bintime rt, wt;
+ int i;
+
+ lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
+ data = (struct stat_page *)page_index->page_data;
+
+ scsi_ulto2b(SLP_SAP, data->sap.hdr.param_code);
+ data->sap.hdr.param_control = SLP_LBIN;
+ data->sap.hdr.param_len = sizeof(struct scsi_log_stat_and_perf) -
+ sizeof(struct scsi_log_param_header);
+ rn = wn = rb = wb = 0;
+ bintime_clear(&rt);
+ bintime_clear(&wt);
+ for (i = 0; i < CTL_MAX_PORTS; i++) {
+ rn += lun->stats.ports[i].operations[CTL_STATS_READ];
+ wn += lun->stats.ports[i].operations[CTL_STATS_WRITE];
+ rb += lun->stats.ports[i].bytes[CTL_STATS_READ];
+ wb += lun->stats.ports[i].bytes[CTL_STATS_WRITE];
+ bintime_add(&rt, &lun->stats.ports[i].time[CTL_STATS_READ]);
+ bintime_add(&wt, &lun->stats.ports[i].time[CTL_STATS_WRITE]);
+ }
+ scsi_u64to8b(rn, data->sap.read_num);
+ scsi_u64to8b(wn, data->sap.write_num);
+ if (lun->stats.blocksize > 0) {
+ scsi_u64to8b(wb / lun->stats.blocksize,
+ data->sap.recvieved_lba);
+ scsi_u64to8b(rb / lun->stats.blocksize,
+ data->sap.transmitted_lba);
+ }
+ scsi_u64to8b((uint64_t)rt.sec * 1000 + rt.frac / (UINT64_MAX / 1000),
+ data->sap.read_int);
+ scsi_u64to8b((uint64_t)wt.sec * 1000 + wt.frac / (UINT64_MAX / 1000),
+ data->sap.write_int);
+ scsi_u64to8b(0, data->sap.weighted_num);
+ scsi_u64to8b(0, data->sap.weighted_int);
+ scsi_ulto2b(SLP_IT, data->it.hdr.param_code);
+ data->it.hdr.param_control = SLP_LBIN;
+ data->it.hdr.param_len = sizeof(struct scsi_log_idle_time) -
+ sizeof(struct scsi_log_param_header);
+#ifdef CTL_TIME_IO
+ scsi_u64to8b(lun->idle_time / SBT_1MS, data->it.idle_int);
+#endif
+ scsi_ulto2b(SLP_TI, data->ti.hdr.param_code);
+ data->it.hdr.param_control = SLP_LBIN;
+ data->ti.hdr.param_len = sizeof(struct scsi_log_time_interval) -
+ sizeof(struct scsi_log_param_header);
+ scsi_ulto4b(3, data->ti.exponent);
+ scsi_ulto4b(1, data->ti.integer);
+
+ page_index->page_len = sizeof(*data);
+ return (0);
+}
+
+int
ctl_log_sense(struct ctl_scsiio *ctsio)
{
struct ctl_lun *lun;
@@ -11646,7 +11712,8 @@ ctl_clear_ua(struct ctl_softc *ctl_softc, uint32_t initidx,
STAILQ_FOREACH(lun, &ctl_softc->lun_list, links) {
mtx_lock(&lun->lun_lock);
pu = lun->pending_ua[initidx / CTL_MAX_INIT_PER_PORT];
- pu[initidx % CTL_MAX_INIT_PER_PORT] &= ~ua_type;
+ if (pu != NULL)
+ pu[initidx % CTL_MAX_INIT_PER_PORT] &= ~ua_type;
mtx_unlock(&lun->lun_lock);
}
}
@@ -11689,6 +11756,12 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ctl_scsiio *ctsio)
* Every I/O goes into the OOA queue for a
* particular LUN, and stays there until completion.
*/
+#ifdef CTL_TIME_IO
+ if (TAILQ_EMPTY(&lun->ooa_queue)) {
+ lun->idle_time += getsbinuptime() -
+ lun->last_busy;
+ }
+#endif
TAILQ_INSERT_TAIL(&lun->ooa_queue, &ctsio->io_hdr,
ooa_links);
}
@@ -12286,64 +12359,57 @@ ctl_abort_task(union ctl_io *io)
printf("%s\n", sbuf_data(&sb));
#endif
- if ((xio->io_hdr.nexus.targ_port == io->io_hdr.nexus.targ_port)
- && (xio->io_hdr.nexus.initid.id ==
- io->io_hdr.nexus.initid.id)) {
- /*
- * If the abort says that the task is untagged, the
- * task in the queue must be untagged. Otherwise,
- * we just check to see whether the tag numbers
- * match. This is because the QLogic firmware
- * doesn't pass back the tag type in an abort
- * request.
- */
+ if ((xio->io_hdr.nexus.targ_port != io->io_hdr.nexus.targ_port)
+ || (xio->io_hdr.nexus.initid.id != io->io_hdr.nexus.initid.id)
+ || (xio->io_hdr.flags & CTL_FLAG_ABORT))
+ continue;
+
+ /*
+ * If the abort says that the task is untagged, the
+ * task in the queue must be untagged. Otherwise,
+ * we just check to see whether the tag numbers
+ * match. This is because the QLogic firmware
+ * doesn't pass back the tag type in an abort
+ * request.
+ */
#if 0
- if (((xio->scsiio.tag_type == CTL_TAG_UNTAGGED)
- && (io->taskio.tag_type == CTL_TAG_UNTAGGED))
- || (xio->scsiio.tag_num == io->taskio.tag_num)) {
+ if (((xio->scsiio.tag_type == CTL_TAG_UNTAGGED)
+ && (io->taskio.tag_type == CTL_TAG_UNTAGGED))
+ || (xio->scsiio.tag_num == io->taskio.tag_num)) {
#endif
- /*
- * XXX KDM we've got problems with FC, because it
- * doesn't send down a tag type with aborts. So we
- * can only really go by the tag number...
- * This may cause problems with parallel SCSI.
- * Need to figure that out!!
- */
- if (xio->scsiio.tag_num == io->taskio.tag_num) {
- xio->io_hdr.flags |= CTL_FLAG_ABORT;
- found = 1;
- if ((io->io_hdr.flags &
- CTL_FLAG_FROM_OTHER_SC) == 0 &&
- !(lun->flags & CTL_LUN_PRIMARY_SC)) {
- union ctl_ha_msg msg_info;
-
- io->io_hdr.flags |=
- CTL_FLAG_SENT_2OTHER_SC;
- msg_info.hdr.nexus = io->io_hdr.nexus;
- msg_info.task.task_action =
- CTL_TASK_ABORT_TASK;
- msg_info.task.tag_num =
- io->taskio.tag_num;
- msg_info.task.tag_type =
- io->taskio.tag_type;
- msg_info.hdr.msg_type =
- CTL_MSG_MANAGE_TASKS;
- msg_info.hdr.original_sc = NULL;
- msg_info.hdr.serializing_sc = NULL;
+ /*
+ * XXX KDM we've got problems with FC, because it
+ * doesn't send down a tag type with aborts. So we
+ * can only really go by the tag number...
+ * This may cause problems with parallel SCSI.
+ * Need to figure that out!!
+ */
+ if (xio->scsiio.tag_num == io->taskio.tag_num) {
+ xio->io_hdr.flags |= CTL_FLAG_ABORT;
+ found = 1;
+ if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) == 0 &&
+ !(lun->flags & CTL_LUN_PRIMARY_SC)) {
+ union ctl_ha_msg msg_info;
+
+ io->io_hdr.flags |= CTL_FLAG_SENT_2OTHER_SC;
+ msg_info.hdr.nexus = io->io_hdr.nexus;
+ msg_info.task.task_action = CTL_TASK_ABORT_TASK;
+ msg_info.task.tag_num = io->taskio.tag_num;
+ msg_info.task.tag_type = io->taskio.tag_type;
+ msg_info.hdr.msg_type = CTL_MSG_MANAGE_TASKS;
+ msg_info.hdr.original_sc = NULL;
+ msg_info.hdr.serializing_sc = NULL;
#if 0
- printf("Sent Abort to other side\n");
+ printf("Sent Abort to other side\n");
#endif
- if (CTL_HA_STATUS_SUCCESS !=
- ctl_ha_msg_send(CTL_HA_CHAN_CTL,
- (void *)&msg_info,
- sizeof(msg_info), 0)) {
- }
+ if (ctl_ha_msg_send(CTL_HA_CHAN_CTL,
+ (void *)&msg_info, sizeof(msg_info), 0) !=
+ CTL_HA_STATUS_SUCCESS) {
}
+ }
#if 0
- printf("ctl_abort_task: found I/O to abort\n");
+ printf("ctl_abort_task: found I/O to abort\n");
#endif
- break;
- }
}
}
mtx_unlock(&lun->lun_lock);
@@ -13742,6 +13808,10 @@ ctl_process_done(union ctl_io *io)
* Remove this from the OOA queue.
*/
TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links);
+#ifdef CTL_TIME_IO
+ if (TAILQ_EMPTY(&lun->ooa_queue))
+ lun->last_busy = getsbinuptime();
+#endif
/*
* Run through the blocked queue on this LUN and see if anything
diff --git a/sys/cam/ctl/ctl.h b/sys/cam/ctl/ctl.h
index 9cf967c..2693419 100644
--- a/sys/cam/ctl/ctl.h
+++ b/sys/cam/ctl/ctl.h
@@ -181,6 +181,9 @@ int ctl_debugconf_sp_select_handler(struct ctl_scsiio *ctsio,
int ctl_lbp_log_sense_handler(struct ctl_scsiio *ctsio,
struct ctl_page_index *page_index,
int pc);
+int ctl_sap_log_sense_handler(struct ctl_scsiio *ctsio,
+ struct ctl_page_index *page_index,
+ int pc);
int ctl_config_move_done(union ctl_io *io);
void ctl_datamove(union ctl_io *io);
void ctl_done(union ctl_io *io);
diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c
index a5e45024..a922967 100644
--- a/sys/cam/ctl/ctl_backend_block.c
+++ b/sys/cam/ctl/ctl_backend_block.c
@@ -1188,6 +1188,7 @@ ctl_be_block_cw_dispatch_ws(struct ctl_be_block_lun *be_lun,
struct ctl_be_block_softc *softc;
struct ctl_lba_len_flags *lbalen;
uint64_t len_left, lba;
+ uint32_t pb, pbo, adj;
int i, seglen;
uint8_t *buf, *end;
@@ -1241,6 +1242,11 @@ ctl_be_block_cw_dispatch_ws(struct ctl_be_block_lun *be_lun,
DPRINTF("WRITE SAME at LBA %jx len %u\n",
(uintmax_t)lbalen->lba, lbalen->len);
+ pb = be_lun->blocksize << be_lun->pblockexp;
+ if (be_lun->pblockoff > 0)
+ pbo = pb - be_lun->blocksize * be_lun->pblockoff;
+ else
+ pbo = 0;
len_left = (uint64_t)lbalen->len * be_lun->blocksize;
for (i = 0, lba = 0; i < CTLBLK_MAX_SEGS && len_left > 0; i++) {
@@ -1248,7 +1254,15 @@ ctl_be_block_cw_dispatch_ws(struct ctl_be_block_lun *be_lun,
* Setup the S/G entry for this chunk.
*/
seglen = MIN(CTLBLK_MAX_SEG, len_left);
- seglen -= seglen % be_lun->blocksize;
+ if (pb > be_lun->blocksize) {
+ adj = ((lbalen->lba + lba) * be_lun->blocksize +
+ seglen - pbo) % pb;
+ if (seglen > adj)
+ seglen -= adj;
+ else
+ seglen -= seglen % be_lun->blocksize;
+ } else
+ seglen -= seglen % be_lun->blocksize;
beio->sg_segs[i].len = seglen;
beio->sg_segs[i].addr = uma_zalloc(be_lun->lun_zone, M_WAITOK);
@@ -1860,7 +1874,7 @@ ctl_be_block_open_dev(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req)
struct cdev *dev;
struct cdevsw *devsw;
char *value;
- int error, atomic, maxio;
+ int error, atomic, maxio, unmap;
off_t ps, pss, po, pos, us, uss, uo, uos;
params = &be_lun->params;
@@ -1885,7 +1899,6 @@ ctl_be_block_open_dev(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req)
maxio = CTLBLK_MAX_IO_SIZE;
}
be_lun->lun_flush = ctl_be_block_flush_dev;
- be_lun->unmap = ctl_be_block_unmap_dev;
be_lun->getattr = ctl_be_block_getattr_dev;
error = VOP_GETATTR(be_lun->vn, &vattr, NOCRED);
@@ -2016,6 +2029,24 @@ ctl_be_block_open_dev(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req)
be_lun->atomicblock = atomic / be_lun->blocksize;
be_lun->opttxferlen = maxio / be_lun->blocksize;
+
+ if (be_lun->dispatch == ctl_be_block_dispatch_zvol) {
+ unmap = 1;
+ } else {
+ struct diocgattr_arg arg;
+
+ strlcpy(arg.name, "GEOM::candelete", sizeof(arg.name));
+ arg.len = sizeof(arg.value.i);
+ error = devsw->d_ioctl(dev, DIOCGATTR,
+ (caddr_t)&arg, FREAD, curthread);
+ unmap = (error == 0) ? arg.value.i : 0;
+ }
+ value = ctl_get_opt(&be_lun->ctl_be_lun.options, "unmap");
+ if (value != NULL)
+ unmap = (strcmp(value, "on") == 0);
+ if (unmap)
+ be_lun->unmap = ctl_be_block_unmap_dev;
+
return (0);
}
@@ -2168,7 +2199,7 @@ ctl_be_block_create(struct ctl_be_block_softc *softc, struct ctl_lun_req *req)
char num_thread_str[16];
char tmpstr[32];
char *value;
- int retval, num_threads, unmap;
+ int retval, num_threads;
int tmp_num_threads;
params = &req->reqdata.create;
@@ -2261,16 +2292,12 @@ ctl_be_block_create(struct ctl_be_block_softc *softc, struct ctl_lun_req *req)
}
num_threads = tmp_num_threads;
}
- unmap = (be_lun->dispatch == ctl_be_block_dispatch_zvol);
- value = ctl_get_opt(&be_lun->ctl_be_lun.options, "unmap");
- if (value != NULL)
- unmap = (strcmp(value, "on") == 0);
be_lun->flags = CTL_BE_BLOCK_LUN_UNCONFIGURED;
be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY;
if (be_lun->vn == NULL)
be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_OFFLINE;
- if (unmap)
+ if (be_lun->unmap != NULL)
be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP;
if (be_lun->dispatch != ctl_be_block_dispatch_dev)
be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_SERSEQ_READ;
@@ -2654,6 +2681,8 @@ ctl_be_block_modify(struct ctl_be_block_softc *softc, struct ctl_lun_req *req)
* XXX: Note that this field is being updated without locking,
* which might cause problems on 32-bit architectures.
*/
+ if (be_lun->unmap != NULL)
+ be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP;
be_lun->ctl_be_lun.maxlba = (be_lun->size_blocks == 0) ?
0 : (be_lun->size_blocks - 1);
be_lun->ctl_be_lun.blocksize = be_lun->blocksize;
diff --git a/sys/cam/ctl/ctl_backend_ramdisk.c b/sys/cam/ctl/ctl_backend_ramdisk.c
index d43cb60..ad90241 100644
--- a/sys/cam/ctl/ctl_backend_ramdisk.c
+++ b/sys/cam/ctl/ctl_backend_ramdisk.c
@@ -588,10 +588,10 @@ ctl_backend_ramdisk_create(struct ctl_be_ramdisk_softc *softc,
be_lun->softc = softc;
- unmap = 0;
+ unmap = 1;
value = ctl_get_opt(&be_lun->ctl_be_lun.options, "unmap");
if (value != NULL && strcmp(value, "on") == 0)
- unmap = 1;
+ unmap = (strcmp(value, "on") == 0);
be_lun->flags = CTL_BE_RAMDISK_LUN_UNCONFIGURED;
be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY;
diff --git a/sys/cam/ctl/ctl_private.h b/sys/cam/ctl/ctl_private.h
index ffcb063..428142c 100644
--- a/sys/cam/ctl/ctl_private.h
+++ b/sys/cam/ctl/ctl_private.h
@@ -342,6 +342,8 @@ static const struct ctl_page_index log_page_index_template[] = {
CTL_PAGE_FLAG_NONE, NULL, NULL},
{SLS_LOGICAL_BLOCK_PROVISIONING, 0, 0, NULL,
CTL_PAGE_FLAG_NONE, ctl_lbp_log_sense_handler, NULL},
+ {SLS_STAT_AND_PERF, 0, 0, NULL,
+ CTL_PAGE_FLAG_NONE, ctl_sap_log_sense_handler, NULL},
};
#define CTL_NUM_LOG_PAGES sizeof(log_page_index_template)/ \
@@ -351,6 +353,11 @@ struct ctl_log_pages {
uint8_t pages_page[CTL_NUM_LOG_PAGES];
uint8_t subpages_page[CTL_NUM_LOG_PAGES * 2];
uint8_t lbp_page[12*CTL_NUM_LBP_PARAMS];
+ struct stat_page {
+ struct scsi_log_stat_and_perf sap;
+ struct scsi_log_idle_time it;
+ struct scsi_log_time_interval ti;
+ } stat_page;
struct ctl_page_index index[CTL_NUM_LOG_PAGES];
};
@@ -403,6 +410,10 @@ struct ctl_lun {
struct ctl_lun_delay_info delay_info;
int sync_interval;
int sync_count;
+#ifdef CTL_TIME_IO
+ sbintime_t idle_time;
+ sbintime_t last_busy;
+#endif
TAILQ_HEAD(ctl_ooaq, ctl_io_hdr) ooa_queue;
TAILQ_HEAD(ctl_blockq,ctl_io_hdr) blocked_queue;
STAILQ_ENTRY(ctl_lun) links;
diff --git a/sys/cam/ctl/ctl_tpc.c b/sys/cam/ctl/ctl_tpc.c
index 63aee27..fee5b90 100644
--- a/sys/cam/ctl/ctl_tpc.c
+++ b/sys/cam/ctl/ctl_tpc.c
@@ -785,18 +785,25 @@ ctl_copy_operation_abort(struct ctl_scsiio *ctsio)
}
static uint64_t
-tpc_resolve(struct tpc_list *list, uint16_t idx, uint32_t *ss)
+tpc_resolve(struct tpc_list *list, uint16_t idx, uint32_t *ss,
+ uint32_t *pb, uint32_t *pbo)
{
if (idx == 0xffff) {
if (ss && list->lun->be_lun)
*ss = list->lun->be_lun->blocksize;
+ if (pb && list->lun->be_lun)
+ *pb = list->lun->be_lun->blocksize <<
+ list->lun->be_lun->pblockexp;
+ if (pbo && list->lun->be_lun)
+ *pbo = list->lun->be_lun->blocksize *
+ list->lun->be_lun->pblockoff;
return (list->lun->lun);
}
if (idx >= list->ncscd)
return (UINT64_MAX);
return (tpcl_resolve(list->lun->ctl_softc,
- list->init_port, &list->cscd[idx], ss));
+ list->init_port, &list->cscd[idx], ss, pb, pbo));
}
static int
@@ -809,7 +816,7 @@ tpc_process_b2b(struct tpc_list *list)
uint64_t sl, dl;
off_t srclba, dstlba, numbytes, donebytes, roundbytes;
int numlba;
- uint32_t srcblock, dstblock;
+ uint32_t srcblock, dstblock, pb, pbo, adj;
if (list->stage == 1) {
while ((tior = TAILQ_FIRST(&list->allio)) != NULL) {
@@ -834,14 +841,16 @@ tpc_process_b2b(struct tpc_list *list)
TAILQ_INIT(&list->allio);
seg = (struct scsi_ec_segment_b2b *)list->seg[list->curseg];
- sl = tpc_resolve(list, scsi_2btoul(seg->src_cscd), &srcblock);
- dl = tpc_resolve(list, scsi_2btoul(seg->dst_cscd), &dstblock);
+ sl = tpc_resolve(list, scsi_2btoul(seg->src_cscd), &srcblock, NULL, NULL);
+ dl = tpc_resolve(list, scsi_2btoul(seg->dst_cscd), &dstblock, &pb, &pbo);
if (sl >= CTL_MAX_LUNS || dl >= CTL_MAX_LUNS) {
ctl_set_sense(list->ctsio, /*current_error*/ 1,
/*sense_key*/ SSD_KEY_COPY_ABORTED,
/*asc*/ 0x08, /*ascq*/ 0x04, SSD_ELEM_NONE);
return (CTL_RETVAL_ERROR);
}
+ if (pbo > 0)
+ pbo = pb - pbo;
sdstp = &list->cscd[scsi_2btoul(seg->src_cscd)].dtsp;
if (scsi_3btoul(sdstp->block_length) != 0)
srcblock = scsi_3btoul(sdstp->block_length);
@@ -878,7 +887,16 @@ tpc_process_b2b(struct tpc_list *list)
prun = &run;
list->tbdio = 1;
while (donebytes < numbytes) {
- roundbytes = MIN(numbytes - donebytes, TPC_MAX_IO_SIZE);
+ roundbytes = numbytes - donebytes;
+ if (roundbytes > TPC_MAX_IO_SIZE) {
+ roundbytes = TPC_MAX_IO_SIZE;
+ roundbytes -= roundbytes % dstblock;
+ if (pb > dstblock) {
+ adj = (dstlba * dstblock + roundbytes - pbo) % pb;
+ if (roundbytes > adj)
+ roundbytes -= adj;
+ }
+ }
tior = malloc(sizeof(*tior), M_CTL, M_WAITOK | M_ZERO);
TAILQ_INIT(&tior->run);
@@ -891,7 +909,7 @@ tpc_process_b2b(struct tpc_list *list)
/*read_op*/ 1,
/*byte2*/ 0,
/*minimum_cdb_size*/ 0,
- /*lba*/ srclba + donebytes / srcblock,
+ /*lba*/ srclba,
/*num_blocks*/ roundbytes / srcblock,
/*tag_type*/ CTL_TAG_SIMPLE,
/*control*/ 0);
@@ -910,7 +928,7 @@ tpc_process_b2b(struct tpc_list *list)
/*read_op*/ 0,
/*byte2*/ 0,
/*minimum_cdb_size*/ 0,
- /*lba*/ dstlba + donebytes / dstblock,
+ /*lba*/ dstlba,
/*num_blocks*/ roundbytes / dstblock,
/*tag_type*/ CTL_TAG_SIMPLE,
/*control*/ 0);
@@ -922,6 +940,8 @@ tpc_process_b2b(struct tpc_list *list)
TAILQ_INSERT_TAIL(prun, tior, rlinks);
prun = &tior->run;
donebytes += roundbytes;
+ srclba += roundbytes / srcblock;
+ dstlba += roundbytes / dstblock;
}
while ((tior = TAILQ_FIRST(&run)) != NULL) {
@@ -961,7 +981,7 @@ tpc_process_verify(struct tpc_list *list)
TAILQ_INIT(&list->allio);
seg = (struct scsi_ec_segment_verify *)list->seg[list->curseg];
- sl = tpc_resolve(list, scsi_2btoul(seg->src_cscd), NULL);
+ sl = tpc_resolve(list, scsi_2btoul(seg->src_cscd), NULL, NULL, NULL);
if (sl >= CTL_MAX_LUNS) {
ctl_set_sense(list->ctsio, /*current_error*/ 1,
/*sense_key*/ SSD_KEY_COPY_ABORTED,
@@ -1019,7 +1039,7 @@ tpc_process_register_key(struct tpc_list *list)
TAILQ_INIT(&list->allio);
seg = (struct scsi_ec_segment_register_key *)list->seg[list->curseg];
- dl = tpc_resolve(list, scsi_2btoul(seg->dst_cscd), NULL);
+ dl = tpc_resolve(list, scsi_2btoul(seg->dst_cscd), NULL, NULL, NULL);
if (dl >= CTL_MAX_LUNS) {
ctl_set_sense(list->ctsio, /*current_error*/ 1,
/*sense_key*/ SSD_KEY_COPY_ABORTED,
@@ -1090,7 +1110,7 @@ tpc_process_wut(struct tpc_list *list)
int drange, srange;
off_t doffset, soffset;
off_t srclba, dstlba, numbytes, donebytes, roundbytes;
- uint32_t srcblock, dstblock;
+ uint32_t srcblock, dstblock, pb, pbo, adj;
if (list->stage > 0) {
/* Cleanup after previous rounds. */
@@ -1118,6 +1138,11 @@ tpc_process_wut(struct tpc_list *list)
&drange, &doffset) != 0)
return (CTL_RETVAL_COMPLETE);
dstblock = list->lun->be_lun->blocksize;
+ pb = dstblock << list->lun->be_lun->pblockexp;
+ if (list->lun->be_lun->pblockoff > 0)
+ pbo = pb - dstblock * list->lun->be_lun->pblockoff;
+ else
+ pbo = 0;
/* Check where we are on source ranges list. */
srcblock = list->token->blocksize;
@@ -1131,12 +1156,20 @@ tpc_process_wut(struct tpc_list *list)
}
srclba = scsi_8btou64(list->token->range[srange].lba) + soffset;
- numbytes = srcblock * omin(TPC_MAX_IOCHUNK_SIZE / srcblock,
- (scsi_4btoul(list->token->range[srange].length) - soffset));
dstlba = scsi_8btou64(list->range[drange].lba) + doffset;
- numbytes = omin(numbytes,
- dstblock * omin(TPC_MAX_IOCHUNK_SIZE / dstblock,
- (scsi_4btoul(list->range[drange].length) - doffset)));
+ numbytes = srcblock *
+ (scsi_4btoul(list->token->range[srange].length) - soffset);
+ numbytes = omin(numbytes, dstblock *
+ (scsi_4btoul(list->range[drange].length) - doffset));
+ if (numbytes > TPC_MAX_IOCHUNK_SIZE) {
+ numbytes = TPC_MAX_IOCHUNK_SIZE;
+ numbytes -= numbytes % dstblock;
+ if (pb > dstblock) {
+ adj = (dstlba * dstblock + numbytes - pbo) % pb;
+ if (numbytes > adj)
+ numbytes -= adj;
+ }
+ }
if (numbytes % srcblock != 0 || numbytes % dstblock != 0) {
ctl_set_sense(list->ctsio, /*current_error*/ 1,
@@ -1157,7 +1190,16 @@ tpc_process_wut(struct tpc_list *list)
list->tbdio = 1;
TAILQ_INIT(&list->allio);
while (donebytes < numbytes) {
- roundbytes = MIN(numbytes - donebytes, TPC_MAX_IO_SIZE);
+ roundbytes = numbytes - donebytes;
+ if (roundbytes > TPC_MAX_IO_SIZE) {
+ roundbytes = TPC_MAX_IO_SIZE;
+ roundbytes -= roundbytes % dstblock;
+ if (pb > dstblock) {
+ adj = (dstlba * dstblock + roundbytes - pbo) % pb;
+ if (roundbytes > adj)
+ roundbytes -= adj;
+ }
+ }
tior = malloc(sizeof(*tior), M_CTL, M_WAITOK | M_ZERO);
TAILQ_INIT(&tior->run);
@@ -1170,7 +1212,7 @@ tpc_process_wut(struct tpc_list *list)
/*read_op*/ 1,
/*byte2*/ 0,
/*minimum_cdb_size*/ 0,
- /*lba*/ srclba + donebytes / srcblock,
+ /*lba*/ srclba,
/*num_blocks*/ roundbytes / srcblock,
/*tag_type*/ CTL_TAG_SIMPLE,
/*control*/ 0);
@@ -1189,7 +1231,7 @@ tpc_process_wut(struct tpc_list *list)
/*read_op*/ 0,
/*byte2*/ 0,
/*minimum_cdb_size*/ 0,
- /*lba*/ dstlba + donebytes / dstblock,
+ /*lba*/ dstlba,
/*num_blocks*/ roundbytes / dstblock,
/*tag_type*/ CTL_TAG_SIMPLE,
/*control*/ 0);
@@ -1201,6 +1243,8 @@ tpc_process_wut(struct tpc_list *list)
TAILQ_INSERT_TAIL(prun, tior, rlinks);
prun = &tior->run;
donebytes += roundbytes;
+ srclba += roundbytes / srcblock;
+ dstlba += roundbytes / dstblock;
}
while ((tior = TAILQ_FIRST(&run)) != NULL) {
diff --git a/sys/cam/ctl/ctl_tpc.h b/sys/cam/ctl/ctl_tpc.h
index ffdab5a..a02183b 100644
--- a/sys/cam/ctl/ctl_tpc.h
+++ b/sys/cam/ctl/ctl_tpc.h
@@ -32,7 +32,7 @@
void tpc_done(union ctl_io *io);
uint64_t tpcl_resolve(struct ctl_softc *softc, int init_port,
- struct scsi_ec_cscd *cscd, uint32_t *ss);
+ struct scsi_ec_cscd *cscd, uint32_t *ss, uint32_t *ps, uint32_t *pso);
union ctl_io * tpcl_alloc_io(void);
int tpcl_queue(union ctl_io *io, uint64_t lun);
diff --git a/sys/cam/ctl/ctl_tpc_local.c b/sys/cam/ctl/ctl_tpc_local.c
index a254418..a8f675b 100644
--- a/sys/cam/ctl/ctl_tpc_local.c
+++ b/sys/cam/ctl/ctl_tpc_local.c
@@ -309,7 +309,7 @@ tpcl_done(union ctl_io *io)
uint64_t
tpcl_resolve(struct ctl_softc *softc, int init_port,
- struct scsi_ec_cscd *cscd, uint32_t *ss)
+ struct scsi_ec_cscd *cscd, uint32_t *ss, uint32_t *ps, uint32_t *pso)
{
struct scsi_ec_cscd_id *cscdid;
struct ctl_port *port;
@@ -337,6 +337,12 @@ tpcl_resolve(struct ctl_softc *softc, int init_port,
lunid = lun->lun;
if (ss && lun->be_lun)
*ss = lun->be_lun->blocksize;
+ if (ps && lun->be_lun)
+ *ps = lun->be_lun->blocksize <<
+ lun->be_lun->pblockexp;
+ if (pso && lun->be_lun)
+ *pso = lun->be_lun->blocksize *
+ lun->be_lun->pblockoff;
break;
}
}
diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h
index dfd0db0..46d0bfc 100644
--- a/sys/cam/scsi/scsi_all.h
+++ b/sys/cam/scsi/scsi_all.h
@@ -561,6 +561,7 @@ struct scsi_log_sense
#define SLS_ERROR_LASTN_PAGE 0x07
#define SLS_LOGICAL_BLOCK_PROVISIONING 0x0c
#define SLS_SELF_TEST_PAGE 0x10
+#define SLS_STAT_AND_PERF 0x19
#define SLS_IE_PAGE 0x2f
#define SLS_PAGE_CTRL_MASK 0xC0
#define SLS_PAGE_CTRL_THRESHOLD 0x00
@@ -619,6 +620,45 @@ struct scsi_log_param_header {
u_int8_t param_len;
};
+struct scsi_log_stat_and_perf {
+ struct scsi_log_param_header hdr;
+#define SLP_SAP 0x0001
+ uint8_t read_num[8];
+ uint8_t write_num[8];
+ uint8_t recvieved_lba[8];
+ uint8_t transmitted_lba[8];
+ uint8_t read_int[8];
+ uint8_t write_int[8];
+ uint8_t weighted_num[8];
+ uint8_t weighted_int[8];
+};
+
+struct scsi_log_idle_time {
+ struct scsi_log_param_header hdr;
+#define SLP_IT 0x0002
+ uint8_t idle_int[8];
+};
+
+struct scsi_log_time_interval {
+ struct scsi_log_param_header hdr;
+#define SLP_TI 0x0003
+ uint8_t exponent[4];
+ uint8_t integer[4];
+};
+
+struct scsi_log_fua_stat_and_perf {
+ struct scsi_log_param_header hdr;
+#define SLP_FUA_SAP 0x0004
+ uint8_t fua_read_num[8];
+ uint8_t fua_write_num[8];
+ uint8_t fuanv_read_num[8];
+ uint8_t fuanv_write_num[8];
+ uint8_t fua_read_int[8];
+ uint8_t fua_write_int[8];
+ uint8_t fuanv_read_int[8];
+ uint8_t fuanv_write_int[8];
+};
+
struct scsi_control_page {
u_int8_t page_code;
u_int8_t page_length;
diff --git a/sys/cddl/contrib/opensolaris/uts/arm/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/arm/dtrace/fasttrap_isa.c
new file mode 100644
index 0000000..18e3837
--- /dev/null
+++ b/sys/cddl/contrib/opensolaris/uts/arm/dtrace/fasttrap_isa.c
@@ -0,0 +1,30 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+
+/*
+ * XXX: Placeholder for ARM fasttrap code
+ */
diff --git a/sys/cddl/contrib/opensolaris/uts/arm/sys/fasttrap_isa.h b/sys/cddl/contrib/opensolaris/uts/arm/sys/fasttrap_isa.h
new file mode 100644
index 0000000..10361cbe
--- /dev/null
+++ b/sys/cddl/contrib/opensolaris/uts/arm/sys/fasttrap_isa.h
@@ -0,0 +1,94 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _FASTTRAP_ISA_H
+#define _FASTTRAP_ISA_H
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This is our reserved trap instruction: ta 0x38
+ */
+#define FASTTRAP_INSTR 0x91d02038
+
+#define FASTTRAP_SUNWDTRACE_SIZE 128
+
+typedef uint32_t fasttrap_instr_t;
+
+typedef struct fasttrap_machtp {
+ fasttrap_instr_t ftmt_instr; /* original instruction */
+ uintptr_t ftmt_dest; /* destination of DCTI */
+ uint8_t ftmt_type; /* emulation type */
+ uint8_t ftmt_flags; /* emulation flags */
+ uint8_t ftmt_cc; /* which cc to look at */
+ uint8_t ftmt_code; /* branch condition */
+} fasttrap_machtp_t;
+
+#define ftt_instr ftt_mtp.ftmt_instr
+#define ftt_dest ftt_mtp.ftmt_dest
+#define ftt_type ftt_mtp.ftmt_type
+#define ftt_flags ftt_mtp.ftmt_flags
+#define ftt_cc ftt_mtp.ftmt_cc
+#define ftt_code ftt_mtp.ftmt_code
+
+#define FASTTRAP_T_COMMON 0x00 /* common case -- no emulation */
+#define FASTTRAP_T_CCR 0x01 /* integer condition code branch */
+#define FASTTRAP_T_FCC 0x02 /* floating-point branch */
+#define FASTTRAP_T_REG 0x03 /* register predicated branch */
+#define FASTTRAP_T_ALWAYS 0x04 /* branch always */
+#define FASTTRAP_T_CALL 0x05 /* call instruction */
+#define FASTTRAP_T_JMPL 0x06 /* jmpl instruction */
+#define FASTTRAP_T_RDPC 0x07 /* rdpc instruction */
+#define FASTTRAP_T_RETURN 0x08 /* return instruction */
+
+/*
+ * For performance rather than correctness.
+ */
+#define FASTTRAP_T_SAVE 0x10 /* save instruction (func entry only) */
+#define FASTTRAP_T_RESTORE 0x11 /* restore instruction */
+#define FASTTRAP_T_OR 0x12 /* mov instruction */
+#define FASTTRAP_T_SETHI 0x13 /* sethi instruction (includes nop) */
+
+#define FASTTRAP_F_ANNUL 0x01 /* branch is annulled */
+#define FASTTRAP_F_RETMAYBE 0x02 /* not definitely a return site */
+
+#define FASTTRAP_AFRAMES 3
+#define FASTTRAP_RETURN_AFRAMES 4
+#define FASTTRAP_ENTRY_AFRAMES 3
+#define FASTTRAP_OFFSET_AFRAMES 3
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _FASTTRAP_ISA_H */
diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
index dcf33c6..818f180 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
@@ -11880,7 +11880,7 @@ err:
int i;
*factor = 1;
-#if defined(__amd64__) || defined(__mips__) || defined(__powerpc__)
+#if defined(__amd64__) || defined(__arm__) || defined(__mips__) || defined(__powerpc__)
/*
* FreeBSD isn't good at limiting the amount of memory we
* ask to malloc, so let's place a limit here before trying
diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
index d449294..3cb7eb2 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
@@ -2434,6 +2434,13 @@ extern void dtrace_helpers_destroy(proc_t *);
#define DTRACE_INVOP_MFLR_R0 5
#define DTRACE_INVOP_NOP 6
+#elif defined(__arm__)
+
+#define DTRACE_INVOP_PUSHM 1
+#define DTRACE_INVOP_POPM 2
+#define DTRACE_INVOP_B 3
+
+
#endif
#ifdef __cplusplus
diff --git a/sys/cddl/dev/dtrace/arm/dtrace_asm.S b/sys/cddl/dev/dtrace/arm/dtrace_asm.S
new file mode 100644
index 0000000..a536492
--- /dev/null
+++ b/sys/cddl/dev/dtrace/arm/dtrace_asm.S
@@ -0,0 +1,197 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ * $FreeBSD$
+ */
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#define _ASM
+#define _LOCORE
+#define LOCORE
+
+#include <sys/cpuvar_defs.h>
+#include <sys/dtrace.h>
+
+#include <machine/armreg.h>
+#include <machine/asm.h>
+
+#include "assym.s"
+
+/*
+void dtrace_membar_producer(void)
+*/
+ENTRY(dtrace_membar_producer)
+ RET
+END(dtrace_membar_producer)
+
+/*
+void dtrace_membar_consumer(void)
+*/
+ENTRY(dtrace_membar_consumer)
+ RET
+END(dtrace_membar_consumer)
+
+/*
+dtrace_icookie_t dtrace_interrupt_disable(void)
+*/
+ENTRY(dtrace_interrupt_disable)
+ mrs r0, cpsr
+ mov r1, r0
+ orr r1, r1, #(PSR_I | PSR_F)
+ msr cpsr_c, r1
+ RET
+END(dtrace_interrupt_disable)
+
+/*
+void dtrace_interrupt_enable(dtrace_icookie_t cookie)
+*/
+ENTRY(dtrace_interrupt_enable)
+ and r0, r0, #(PSR_I | PSR_F)
+ mrs r1, cpsr
+ bic r1, r1, #(PSR_I | PSR_F)
+ orr r1, r1, r0
+ msr cpsr_c, r1
+ RET
+END(dtrace_interrupt_enable)
+/*
+uint8_t
+dtrace_fuword8_nocheck(void *addr)
+*/
+ENTRY(dtrace_fuword8_nocheck)
+ ldrb r3, [r0]
+ mov r0, r3
+ RET
+END(dtrace_fuword8_nocheck)
+
+/*
+uint16_t
+dtrace_fuword16_nocheck(void *addr)
+*/
+ENTRY(dtrace_fuword16_nocheck)
+ ldrh r3, [r0]
+ mov r0, r3
+ RET
+END(dtrace_fuword16_nocheck)
+
+/*
+uint32_t
+dtrace_fuword32_nocheck(void *addr)
+*/
+ENTRY(dtrace_fuword32_nocheck)
+ ldr r3, [r0]
+ mov r0, r3
+ RET
+END(dtrace_fuword32_nocheck)
+
+/*
+uint64_t
+dtrace_fuword64_nocheck(void *addr)
+*/
+ENTRY(dtrace_fuword64_nocheck)
+ ldm r0, {r2, r3}
+
+ mov r0, r2
+ mov r1, r3
+#if defined(__BIG_ENDIAN__)
+/* big endian */
+ mov r0, r3
+ mov r1, r2
+#else
+/* little endian */
+ mov r0, r2
+ mov r1, r3
+
+#endif
+ RET
+END(dtrace_fuword64_nocheck)
+
+/*
+void
+dtrace_copy(uintptr_t uaddr, uintptr_t kaddr, size_t size)
+*/
+ENTRY(dtrace_copy)
+ stmfd sp!, {r4-r5} /* stack is 8 byte aligned */
+ teq r2, #0x00000000
+ mov r5, #0x00000000
+ beq 2f
+
+1: ldrb r4, [r0], #0x0001
+ add r5, r5, #0x00000001
+ strb r4, [r1], #0x0001
+ teqne r5, r2
+ bne 1b
+
+2: ldmfd sp!, {r4-r5} /* stack is 8 byte aligned */
+ RET
+END(dtrace_copy)
+
+/*
+void
+dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_t size,
+ volatile uint16_t *flags)
+XXX: Check for flags?
+*/
+ENTRY(dtrace_copystr)
+ stmfd sp!, {r4-r5} /* stack is 8 byte aligned */
+ teq r2, #0x00000000
+ mov r5, #0x00000000
+ beq 2f
+
+1: ldrb r4, [r0], #0x0001
+ add r5, r5, #0x00000001
+ teq r4, #0x00000000
+ strb r4, [r1], #0x0001
+ teqne r5, r2
+ bne 1b
+
+2: ldmfd sp!, {r4-r5} /* stack is 8 byte aligned */
+ RET
+END(dtrace_copystr)
+
+/*
+void
+vpanic(const char *format, va_list alist)
+*/
+ENTRY(vpanic) /* Initial stack layout: */
+vpanic_common:
+ RET
+END(vpanic)
+
+/*
+void
+dtrace_vpanic(const char *format, va_list alist)
+*/
+ENTRY(dtrace_vpanic) /* Initial stack layout: */
+ b vpanic
+ RET
+END(dtrace_vpanic) /* Initial stack layout: */
+
+/*
+uintptr_t
+dtrace_caller(int aframes)
+*/
+ENTRY(dtrace_caller)
+ mov r0, #-1
+ RET
+END(dtrace_caller)
diff --git a/sys/cddl/dev/dtrace/arm/dtrace_isa.c b/sys/cddl/dev/dtrace/arm/dtrace_isa.c
new file mode 100644
index 0000000..7d3dc2e
--- /dev/null
+++ b/sys/cddl/dev/dtrace/arm/dtrace_isa.c
@@ -0,0 +1,356 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ * $FreeBSD$
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+#include <sys/cdefs.h>
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/stack.h>
+#include <sys/pcpu.h>
+
+#include <machine/frame.h>
+#include <machine/md_var.h>
+#include <machine/reg.h>
+
+#include <vm/vm.h>
+#include <vm/vm_param.h>
+#include <vm/pmap.h>
+
+#include <machine/atomic.h>
+#include <machine/db_machdep.h>
+#include <machine/md_var.h>
+#include <machine/vmparam.h>
+#include <machine/stack.h>
+#include <ddb/db_sym.h>
+#include <ddb/ddb.h>
+#include <sys/kdb.h>
+
+#include "regset.h"
+
+/*
+ * Wee need some reasonable default to prevent backtrace code
+ * from wandering too far
+ */
+#define MAX_FUNCTION_SIZE 0x10000
+#define MAX_PROLOGUE_SIZE 0x100
+
+
+uint8_t dtrace_fuword8_nocheck(void *);
+uint16_t dtrace_fuword16_nocheck(void *);
+uint32_t dtrace_fuword32_nocheck(void *);
+uint64_t dtrace_fuword64_nocheck(void *);
+
+void
+dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes,
+ uint32_t *intrpc)
+{
+ u_int32_t *frame, *lastframe;
+ int scp_offset;
+ int depth = 0;
+ pc_t caller = (pc_t) solaris_cpu[curcpu].cpu_dtrace_caller;
+
+ if (intrpc != 0)
+ pcstack[depth++] = (pc_t) intrpc;
+
+ aframes++;
+
+ frame = (u_int32_t *)__builtin_frame_address(0);;
+ lastframe = NULL;
+ scp_offset = -(get_pc_str_offset() >> 2);
+
+ while ((frame != NULL) && (depth < pcstack_limit)) {
+ db_addr_t scp;
+#if 0
+ u_int32_t savecode;
+ int r;
+ u_int32_t *rp;
+#endif
+
+ /*
+ * In theory, the SCP isn't guaranteed to be in the function
+ * that generated the stack frame. We hope for the best.
+ */
+ scp = frame[FR_SCP];
+
+ if (aframes > 0) {
+ aframes--;
+ if ((aframes == 0) && (caller != 0)) {
+ pcstack[depth++] = caller;
+ }
+ }
+ else {
+ pcstack[depth++] = scp;
+ }
+
+#if 0
+ savecode = ((u_int32_t *)scp)[scp_offset];
+ if ((savecode & 0x0e100000) == 0x08000000) {
+ /* Looks like an STM */
+ rp = frame - 4;
+ for (r = 10; r >= 0; r--) {
+ if (savecode & (1 << r)) {
+ /* register r == *rp-- */
+ }
+ }
+ }
+#endif
+
+ /*
+ * Switch to next frame up
+ */
+ if (frame[FR_RFP] == 0)
+ break; /* Top of stack */
+
+ lastframe = frame;
+ frame = (u_int32_t *)(frame[FR_RFP]);
+
+ if (INKERNEL((int)frame)) {
+ /* staying in kernel */
+ if (frame <= lastframe) {
+ /* bad frame pointer */
+ break;
+ }
+ }
+ else
+ break;
+ }
+
+ for (; depth < pcstack_limit; depth++) {
+ pcstack[depth] = 0;
+ }
+}
+
+void
+dtrace_getupcstack(uint64_t *pcstack, int pcstack_limit)
+{
+ printf("IMPLEMENT ME: %s\n", __func__);
+}
+
+int
+dtrace_getustackdepth(void)
+{
+ printf("IMPLEMENT ME: %s\n", __func__);
+ return (0);
+}
+
+void
+dtrace_getufpstack(uint64_t *pcstack, uint64_t *fpstack, int pcstack_limit)
+{
+ printf("IMPLEMENT ME: %s\n", __func__);
+}
+
+/*ARGSUSED*/
+uint64_t
+dtrace_getarg(int arg, int aframes)
+{
+/* struct arm_frame *fp = (struct arm_frame *)dtrace_getfp();*/
+
+ return (0);
+}
+
+int
+dtrace_getstackdepth(int aframes)
+{
+ u_int32_t *frame, *lastframe;
+ int scp_offset;
+ int depth = 1;
+
+ frame = (u_int32_t *)__builtin_frame_address(0);;
+ lastframe = NULL;
+ scp_offset = -(get_pc_str_offset() >> 2);
+
+ while (frame != NULL) {
+ db_addr_t scp;
+#if 0
+ u_int32_t savecode;
+ int r;
+ u_int32_t *rp;
+#endif
+
+ /*
+ * In theory, the SCP isn't guaranteed to be in the function
+ * that generated the stack frame. We hope for the best.
+ */
+ scp = frame[FR_SCP];
+
+ depth++;
+
+ /*
+ * Switch to next frame up
+ */
+ if (frame[FR_RFP] == 0)
+ break; /* Top of stack */
+
+ lastframe = frame;
+ frame = (u_int32_t *)(frame[FR_RFP]);
+
+ if (INKERNEL((int)frame)) {
+ /* staying in kernel */
+ if (frame <= lastframe) {
+ /* bad frame pointer */
+ break;
+ }
+ }
+ else
+ break;
+ }
+
+ if (depth < aframes)
+ return 0;
+ else
+ return depth - aframes;
+
+}
+
+ulong_t
+dtrace_getreg(struct trapframe *rp, uint_t reg)
+{
+ printf("IMPLEMENT ME: %s\n", __func__);
+
+ return (0);
+}
+
+static int
+dtrace_copycheck(uintptr_t uaddr, uintptr_t kaddr, size_t size)
+{
+
+ if (uaddr + size > VM_MAXUSER_ADDRESS || uaddr + size < uaddr) {
+ DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR);
+ cpu_core[curcpu].cpuc_dtrace_illval = uaddr;
+ return (0);
+ }
+
+ return (1);
+}
+
+void
+dtrace_copyin(uintptr_t uaddr, uintptr_t kaddr, size_t size,
+ volatile uint16_t *flags)
+{
+ if (dtrace_copycheck(uaddr, kaddr, size))
+ dtrace_copy(uaddr, kaddr, size);
+}
+
+void
+dtrace_copyout(uintptr_t kaddr, uintptr_t uaddr, size_t size,
+ volatile uint16_t *flags)
+{
+ if (dtrace_copycheck(uaddr, kaddr, size))
+ dtrace_copy(kaddr, uaddr, size);
+}
+
+void
+dtrace_copyinstr(uintptr_t uaddr, uintptr_t kaddr, size_t size,
+ volatile uint16_t *flags)
+{
+ if (dtrace_copycheck(uaddr, kaddr, size))
+ dtrace_copystr(uaddr, kaddr, size, flags);
+}
+
+void
+dtrace_copyoutstr(uintptr_t kaddr, uintptr_t uaddr, size_t size,
+ volatile uint16_t *flags)
+{
+ if (dtrace_copycheck(uaddr, kaddr, size))
+ dtrace_copystr(kaddr, uaddr, size, flags);
+}
+
+uint8_t
+dtrace_fuword8(void *uaddr)
+{
+ if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) {
+ DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR);
+ cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr;
+ return (0);
+ }
+ return (dtrace_fuword8_nocheck(uaddr));
+}
+
+uint16_t
+dtrace_fuword16(void *uaddr)
+{
+ if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) {
+ DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR);
+ cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr;
+ return (0);
+ }
+ return (dtrace_fuword16_nocheck(uaddr));
+}
+
+uint32_t
+dtrace_fuword32(void *uaddr)
+{
+ if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) {
+ DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR);
+ cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr;
+ return (0);
+ }
+ return (dtrace_fuword32_nocheck(uaddr));
+}
+
+uint64_t
+dtrace_fuword64(void *uaddr)
+{
+ if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) {
+ DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR);
+ cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr;
+ return (0);
+ }
+ return (dtrace_fuword64_nocheck(uaddr));
+}
+
+#define __with_interrupts_disabled(expr) \
+ do { \
+ u_int cpsr_save, tmp; \
+ \
+ __asm __volatile( \
+ "mrs %0, cpsr;" \
+ "orr %1, %0, %2;" \
+ "msr cpsr_fsxc, %1;" \
+ : "=r" (cpsr_save), "=r" (tmp) \
+ : "I" (PSR_I | PSR_F) \
+ : "cc" ); \
+ (expr); \
+ __asm __volatile( \
+ "msr cpsr_fsxc, %0" \
+ : /* no output */ \
+ : "r" (cpsr_save) \
+ : "cc" ); \
+ } while(0)
+
+uint32_t dtrace_cas32(uint32_t *target, uint32_t cmp, uint32_t new)
+{
+ return atomic_cmpset_32((uint32_t*)target, (uint32_t)cmp, (uint32_t)new);
+
+}
+
+void * dtrace_casptr(volatile void *target, volatile void *cmp, volatile void *new)
+{
+ return (void*)dtrace_cas32((uint32_t*)target, (uint32_t)cmp, (uint32_t)new);
+}
+
diff --git a/sys/cddl/dev/dtrace/arm/dtrace_subr.c b/sys/cddl/dev/dtrace/arm/dtrace_subr.c
new file mode 100644
index 0000000..d4c12a6
--- /dev/null
+++ b/sys/cddl/dev/dtrace/arm/dtrace_subr.c
@@ -0,0 +1,261 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ * $FreeBSD$
+ *
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/types.h>
+#include <sys/kernel.h>
+#include <sys/malloc.h>
+#include <sys/kmem.h>
+#include <sys/smp.h>
+#include <sys/dtrace_impl.h>
+#include <sys/dtrace_bsd.h>
+#include <machine/armreg.h>
+#include <machine/clock.h>
+#include <machine/frame.h>
+#include <machine/trap.h>
+#include <vm/pmap.h>
+
+#define DELAYBRANCH(x) ((int)(x) < 0)
+
+extern uintptr_t dtrace_in_probe_addr;
+extern int dtrace_in_probe;
+extern dtrace_id_t dtrace_probeid_error;
+extern int (*dtrace_invop_jump_addr)(struct trapframe *);
+
+int dtrace_invop(uintptr_t, uintptr_t *, uintptr_t);
+void dtrace_invop_init(void);
+void dtrace_invop_uninit(void);
+
+typedef struct dtrace_invop_hdlr {
+ int (*dtih_func)(uintptr_t, uintptr_t *, uintptr_t);
+ struct dtrace_invop_hdlr *dtih_next;
+} dtrace_invop_hdlr_t;
+
+dtrace_invop_hdlr_t *dtrace_invop_hdlr;
+
+int
+dtrace_invop(uintptr_t addr, uintptr_t *stack, uintptr_t eax)
+{
+ dtrace_invop_hdlr_t *hdlr;
+ int rval;
+
+ for (hdlr = dtrace_invop_hdlr; hdlr != NULL; hdlr = hdlr->dtih_next)
+ if ((rval = hdlr->dtih_func(addr, stack, eax)) != 0)
+ return (rval);
+
+ return (0);
+}
+
+
+void
+dtrace_invop_add(int (*func)(uintptr_t, uintptr_t *, uintptr_t))
+{
+ dtrace_invop_hdlr_t *hdlr;
+
+ hdlr = kmem_alloc(sizeof (dtrace_invop_hdlr_t), KM_SLEEP);
+ hdlr->dtih_func = func;
+ hdlr->dtih_next = dtrace_invop_hdlr;
+ dtrace_invop_hdlr = hdlr;
+}
+
+void
+dtrace_invop_remove(int (*func)(uintptr_t, uintptr_t *, uintptr_t))
+{
+ dtrace_invop_hdlr_t *hdlr = dtrace_invop_hdlr, *prev = NULL;
+
+ for (;;) {
+ if (hdlr == NULL)
+ panic("attempt to remove non-existent invop handler");
+
+ if (hdlr->dtih_func == func)
+ break;
+
+ prev = hdlr;
+ hdlr = hdlr->dtih_next;
+ }
+
+ if (prev == NULL) {
+ ASSERT(dtrace_invop_hdlr == hdlr);
+ dtrace_invop_hdlr = hdlr->dtih_next;
+ } else {
+ ASSERT(dtrace_invop_hdlr != hdlr);
+ prev->dtih_next = hdlr->dtih_next;
+ }
+
+ kmem_free(hdlr, 0);
+}
+
+
+/*ARGSUSED*/
+void
+dtrace_toxic_ranges(void (*func)(uintptr_t base, uintptr_t limit))
+{
+ printf("IMPLEMENT ME: dtrace_toxic_ranges\n");
+}
+
+void
+dtrace_xcall(processorid_t cpu, dtrace_xcall_t func, void *arg)
+{
+ cpuset_t cpus;
+
+ if (cpu == DTRACE_CPUALL)
+ cpus = all_cpus;
+ else
+ CPU_SETOF(cpu, &cpus);
+
+ smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func,
+ smp_no_rendevous_barrier, arg);
+}
+
+static void
+dtrace_sync_func(void)
+{
+}
+
+void
+dtrace_sync(void)
+{
+ dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL);
+}
+
+/*
+ * DTrace needs a high resolution time function which can
+ * be called from a probe context and guaranteed not to have
+ * instrumented with probes itself.
+ *
+ * Returns nanoseconds since boot.
+ */
+uint64_t
+dtrace_gethrtime()
+{
+ struct timespec curtime;
+
+ nanouptime(&curtime);
+
+ return (curtime.tv_sec * 1000000000UL + curtime.tv_nsec);
+
+}
+
+uint64_t
+dtrace_gethrestime(void)
+{
+ struct timespec curtime;
+
+ getnanotime(&curtime);
+
+ return (curtime.tv_sec * 1000000000UL + curtime.tv_nsec);
+}
+
+/* Function to handle DTrace traps during probes. See amd64/amd64/trap.c */
+int
+dtrace_trap(struct trapframe *frame, u_int type)
+{
+ /*
+ * A trap can occur while DTrace executes a probe. Before
+ * executing the probe, DTrace blocks re-scheduling and sets
+ * a flag in it's per-cpu flags to indicate that it doesn't
+ * want to fault. On returning from the probe, the no-fault
+ * flag is cleared and finally re-scheduling is enabled.
+ *
+ * Check if DTrace has enabled 'no-fault' mode:
+ *
+ */
+ if ((cpu_core[curcpu].cpuc_dtrace_flags & CPU_DTRACE_NOFAULT) != 0) {
+ /*
+ * There are only a couple of trap types that are expected.
+ * All the rest will be handled in the usual way.
+ */
+ switch (type) {
+ /* Page fault. */
+ case FAULT_ALIGN:
+ /* Flag a bad address. */
+ cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR;
+ cpu_core[curcpu].cpuc_dtrace_illval = 0;
+
+ /*
+ * Offset the instruction pointer to the instruction
+ * following the one causing the fault.
+ */
+ frame->tf_pc += sizeof(int);
+ return (1);
+ default:
+ /* Handle all other traps in the usual way. */
+ break;
+ }
+ }
+
+ /* Handle the trap in the usual way. */
+ return (0);
+}
+
+void
+dtrace_probe_error(dtrace_state_t *state, dtrace_epid_t epid, int which,
+ int fault, int fltoffs, uintptr_t illval)
+{
+
+ dtrace_probe(dtrace_probeid_error, (uint64_t)(uintptr_t)state,
+ (uintptr_t)epid,
+ (uintptr_t)which, (uintptr_t)fault, (uintptr_t)fltoffs);
+}
+
+static int
+dtrace_invop_start(struct trapframe *frame)
+{
+ printf("IMPLEMENT ME: %s\n", __func__);
+ switch (dtrace_invop(frame->tf_pc, (uintptr_t *)frame, frame->tf_pc)) {
+ case DTRACE_INVOP_PUSHM:
+ // TODO:
+ break;
+ case DTRACE_INVOP_POPM:
+ // TODO:
+ break;
+ case DTRACE_INVOP_B:
+ // TODO
+ break;
+ default:
+ return (-1);
+ break;
+ }
+
+ return (0);
+}
+
+void dtrace_invop_init(void)
+{
+ dtrace_invop_jump_addr = dtrace_invop_start;
+}
+
+void dtrace_invop_uninit(void)
+{
+ dtrace_invop_jump_addr = 0;
+}
diff --git a/sys/cddl/dev/dtrace/arm/regset.h b/sys/cddl/dev/dtrace/arm/regset.h
new file mode 100644
index 0000000..ce9e97e
--- /dev/null
+++ b/sys/cddl/dev/dtrace/arm/regset.h
@@ -0,0 +1,57 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ * $FreeBSD$
+ */
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
+
+/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
+/* All Rights Reserved */
+
+#ifndef _REGSET_H
+#define _REGSET_H
+
+/*
+ * #pragma ident "@(#)regset.h 1.11 05/06/08 SMI"
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if 0
+#define REG_LINK R14
+#define REG_SP R12
+#define REG_PS R0
+#define REG_R0 R0
+#define REG_R1 R1
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _REGSET_H */
diff --git a/sys/cddl/dev/fbt/arm/fbt_isa.c b/sys/cddl/dev/fbt/arm/fbt_isa.c
new file mode 100644
index 0000000..99fe067
--- /dev/null
+++ b/sys/cddl/dev/fbt/arm/fbt_isa.c
@@ -0,0 +1,192 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ * Portions Copyright 2006-2008 John Birrell jb@freebsd.org
+ * Portions Copyright 2013 Justin Hibbits jhibbits@freebsd.org
+ * Portions Copyright 2013 Howard Su howardsu@freebsd.org
+ *
+ * $FreeBSD$
+ *
+ */
+
+/*
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include <sys/cdefs.h>
+#include <sys/param.h>
+
+#include <sys/dtrace.h>
+
+#include "fbt.h"
+
+#define FBT_PATCHVAL 0xe06a0cfe /* illegal instruction */
+
+#define FBT_PUSHM 0xe92d0000
+#define FBT_POPM 0xe8bd0000
+#define FBT_JUMP 0xea000000
+
+#define FBT_ENTRY "entry"
+#define FBT_RETURN "return"
+
+int
+fbt_invop(uintptr_t addr, uintptr_t *stack, uintptr_t rval)
+{
+ struct trapframe *frame = (struct trapframe *)stack;
+ solaris_cpu_t *cpu = &solaris_cpu[curcpu];
+ fbt_probe_t *fbt = fbt_probetab[FBT_ADDR2NDX(addr)];
+
+ for (; fbt != NULL; fbt = fbt->fbtp_hashnext) {
+ if ((uintptr_t)fbt->fbtp_patchpoint == addr) {
+ fbt->fbtp_invop_cnt++;
+ cpu->cpu_dtrace_caller = addr;
+
+ /* TODO: Need 5th parameter from stack */
+ dtrace_probe(fbt->fbtp_id, frame->tf_r0,
+ frame->tf_r1, frame->tf_r2,
+ frame->tf_r3, 0);
+
+ cpu->cpu_dtrace_caller = 0;
+
+ return (fbt->fbtp_rval);
+ }
+ }
+
+ return (0);
+}
+
+void
+fbt_patch_tracepoint(fbt_probe_t *fbt, fbt_patchval_t val)
+{
+
+ *fbt->fbtp_patchpoint = val;
+ cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, 4);
+}
+
+int
+fbt_provide_module_function(linker_file_t lf, int symindx,
+ linker_symval_t *symval, void *opaque)
+{
+ char *modname = opaque;
+ const char *name = symval->name;
+ fbt_probe_t *fbt, *retfbt;
+ uint32_t *instr, *limit;
+ int popm;
+
+ if (strncmp(name, "dtrace_", 7) == 0 &&
+ strncmp(name, "dtrace_safe_", 12) != 0) {
+ /*
+ * Anything beginning with "dtrace_" may be called
+ * from probe context unless it explicitly indicates
+ * that it won't be called from probe context by
+ * using the prefix "dtrace_safe_".
+ */
+ return (0);
+ }
+
+ if (name[0] == '_' && name[1] == '_')
+ return (0);
+
+ instr = (uint32_t *)symval->value;
+ limit = (uint32_t *)(symval->value + symval->size);
+
+ for (; instr < limit; instr++)
+ if ((*instr & 0xffff0000) == FBT_PUSHM &&
+ (*instr & 0x4000) != 0)
+ break;
+
+ if (instr >= limit)
+ return (0);
+
+ fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO);
+ fbt->fbtp_name = name;
+ fbt->fbtp_id = dtrace_probe_create(fbt_id, modname,
+ name, FBT_ENTRY, 3, fbt);
+ fbt->fbtp_patchpoint = instr;
+ fbt->fbtp_ctl = lf;
+ fbt->fbtp_loadcnt = lf->loadcnt;
+ fbt->fbtp_savedval = *instr;
+ fbt->fbtp_patchval = FBT_PATCHVAL;
+ fbt->fbtp_rval = DTRACE_INVOP_PUSHM;
+ fbt->fbtp_symindx = symindx;
+
+ fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)];
+ fbt_probetab[FBT_ADDR2NDX(instr)] = fbt;
+
+ lf->fbt_nentries++;
+
+ popm = FBT_POPM | ((*instr) & 0x3FFF) | 0x8000;
+
+ retfbt = NULL;
+again:
+ for (; instr < limit; instr++) {
+ if (*instr == popm)
+ break;
+ else if ((*instr & 0xff000000) == FBT_JUMP) {
+ uint32_t *target, *start;
+ int offset;
+
+ offset = (*instr & 0xffffff);
+ offset <<= 8;
+ offset /= 64;
+ target = instr + (2 + offset);
+ start = (uint32_t *)symval->value;
+ if (target >= limit || target < start)
+ break;
+ instr++; /* skip delay slot */
+ }
+ }
+
+ if (instr >= limit)
+ return (0);
+
+ /*
+ * We have a winner!
+ */
+ fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO);
+ fbt->fbtp_name = name;
+ if (retfbt == NULL) {
+ fbt->fbtp_id = dtrace_probe_create(fbt_id, modname,
+ name, FBT_RETURN, 5, fbt);
+ } else {
+ retfbt->fbtp_next = fbt;
+ fbt->fbtp_id = retfbt->fbtp_id;
+ }
+ retfbt = fbt;
+
+ fbt->fbtp_patchpoint = instr;
+ fbt->fbtp_ctl = lf;
+ fbt->fbtp_loadcnt = lf->loadcnt;
+ fbt->fbtp_symindx = symindx;
+ if ((*instr & 0xff000000) == FBT_JUMP)
+ fbt->fbtp_rval = DTRACE_INVOP_B;
+ else
+ fbt->fbtp_rval = DTRACE_INVOP_POPM;
+ fbt->fbtp_savedval = *instr;
+ fbt->fbtp_patchval = FBT_PATCHVAL;
+ fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)];
+ fbt_probetab[FBT_ADDR2NDX(instr)] = fbt;
+
+ lf->fbt_nentries++;
+
+ instr++;
+ goto again;
+}
diff --git a/sys/cddl/dev/fbt/arm/fbt_isa.h b/sys/cddl/dev/fbt/arm/fbt_isa.h
new file mode 100644
index 0000000..5552f31
--- /dev/null
+++ b/sys/cddl/dev/fbt/arm/fbt_isa.h
@@ -0,0 +1,30 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ * $FreeBSD$
+ *
+ */
+
+#ifndef _FBT_ISA_H_
+#define _FBT_ISA_H_
+
+typedef uint32_t fbt_patchval_t;
+
+#endif
diff --git a/sys/cddl/dev/lockstat/lockstat.c b/sys/cddl/dev/lockstat/lockstat.c
index b8d12ac..a4e4efd 100644
--- a/sys/cddl/dev/lockstat/lockstat.c
+++ b/sys/cddl/dev/lockstat/lockstat.c
@@ -44,7 +44,8 @@
#include <sys/lockstat.h>
#if defined(__i386__) || defined(__amd64__) || \
- defined(__mips__) || defined(__powerpc__)
+ defined(__mips__) || defined(__powerpc__) || \
+ defined(__arm__)
#define LOCKSTAT_AFRAMES 1
#else
#error "architecture not supported"
diff --git a/sys/cddl/dev/profile/profile.c b/sys/cddl/dev/profile/profile.c
index 5291bb1..51105e2 100644
--- a/sys/cddl/dev/profile/profile.c
+++ b/sys/cddl/dev/profile/profile.c
@@ -128,6 +128,16 @@
struct profile_probe_percpu;
+#ifdef __mips
+/* bogus */
+#define PROF_ARTIFICIAL_FRAMES 3
+#endif
+
+#ifdef __arm__
+/* bogus */
+#define PROF_ARTIFICIAL_FRAMES 3
+#endif
+
typedef struct profile_probe {
char prof_name[PROF_NAMELEN];
dtrace_id_t prof_id;
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 4c167ca..232d88b 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -186,7 +186,7 @@ SYSTEM_DEP+= ${LDSCRIPT}
MKMODULESENV+= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR}
MKMODULESENV+= MACHINE_CPUARCH=${MACHINE_CPUARCH}
MKMODULESENV+= MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH}
-MKMODULESENV+= MODULES_EXTRA=${MODULES_EXTRA} WITHOUT_MODULES=${WITHOUT_MODULES}
+MKMODULESENV+= MODULES_EXTRA="${MODULES_EXTRA}" WITHOUT_MODULES="${WITHOUT_MODULES}"
.if (${KERN_IDENT} == LINT)
MKMODULESENV+= ALL_MODULES=LINT
.endif
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
index f16ef6b..eaabbe2 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
@@ -576,6 +576,9 @@ struct ath_hal_9300 {
u_int8_t ah_tx_chainmask; /* tx chain mask */
u_int8_t ah_rx_chainmask; /* rx chain mask */
+ /* optional tx chainmask */
+ u_int8_t ah_tx_chainmaskopt;
+
u_int8_t ah_tx_cal_chainmask; /* tx cal chain mask */
u_int8_t ah_rx_cal_chainmask; /* rx cal chain mask */
@@ -845,6 +848,7 @@ struct ath_hal_9300 {
HAL_BOOL ah_aic_enabled;
u_int32_t ah_aic_sram[ATH_AIC_MAX_BT_CHANNEL];
#endif
+
#endif /* ATH_SUPPORT_MCI */
u_int8_t ah_cac_quiet_enabled;
#if ATH_WOW_OFFLOAD
@@ -852,6 +856,14 @@ struct ath_hal_9300 {
u_int32_t ah_mcast_filter_u32_set;
#endif
HAL_BOOL ah_reduced_self_gen_mask;
+ HAL_BOOL ah_chip_reset_done;
+ HAL_BOOL ah_abort_txdma_norx;
+ /* store previous passive RX Cal info */
+ HAL_BOOL ah_skip_rx_iq_cal;
+ HAL_BOOL ah_rx_cal_complete; /* previous rx cal completed or not */
+ u_int32_t ah_rx_cal_chan; /* chan on which rx cal is done */
+ u_int32_t ah_rx_cal_chan_flag;
+ u_int32_t ah_rx_cal_corr[AR9300_MAX_CHAINS];
/* Local additions for FreeBSD */
/*
@@ -877,7 +889,6 @@ struct ath_hal_9300 {
struct ar9300NfLimits nf_2GHz;
struct ar9300NfLimits nf_5GHz;
struct ar9300NfLimits *nfp;
-
};
#define AH9300(_ah) ((struct ath_hal_9300 *)(_ah))
@@ -1194,7 +1205,8 @@ extern HAL_BOOL ar9300_get_channel_edges(struct ath_hal *ah,
extern HAL_BOOL ar9300_fill_capability_info(struct ath_hal *ah);
extern void ar9300_beacon_init(struct ath_hal *ah,
- u_int32_t next_beacon, u_int32_t beacon_period, HAL_OPMODE opmode);
+ u_int32_t next_beacon, u_int32_t beacon_period,
+ u_int32_t beacon_period_fraction, HAL_OPMODE opmode);
extern void ar9300_set_sta_beacon_timers(struct ath_hal *ah,
const HAL_BEACON_STATE *);
@@ -1217,12 +1229,19 @@ extern HAL_BOOL ar9300_set_key_cache_entry_mac(struct ath_hal *,
extern HAL_BOOL ar9300_set_key_cache_entry(struct ath_hal *ah, u_int16_t entry,
const HAL_KEYVAL *k, const u_int8_t *mac, int xor_key);
extern HAL_BOOL ar9300_print_keycache(struct ath_hal *ah);
+#if ATH_SUPPORT_KEYPLUMB_WAR
+extern HAL_BOOL ar9300_check_key_cache_entry(struct ath_hal *ah, u_int16_t entry,
+ const HAL_KEYVAL *k, int xorKey);
+#endif
extern void ar9300_get_mac_address(struct ath_hal *ah, u_int8_t *mac);
extern HAL_BOOL ar9300_set_mac_address(struct ath_hal *ah, const u_int8_t *);
extern void ar9300_get_bss_id_mask(struct ath_hal *ah, u_int8_t *mac);
extern HAL_BOOL ar9300_set_bss_id_mask(struct ath_hal *, const u_int8_t *);
extern HAL_STATUS ar9300_select_ant_config(struct ath_hal *ah, u_int32_t cfg);
+extern u_int32_t ar9300_ant_ctrl_common_get(struct ath_hal *ah, HAL_BOOL is_2ghz);
+extern HAL_BOOL ar9300_ant_swcom_sel(struct ath_hal *ah, u_int8_t ops,
+ u_int32_t *common_tbl1, u_int32_t *common_tbl2);
extern HAL_BOOL ar9300_set_regulatory_domain(struct ath_hal *ah,
u_int16_t reg_domain, HAL_STATUS *stats);
extern u_int ar9300_get_wireless_modes(struct ath_hal *ah);
@@ -1397,6 +1416,8 @@ extern HAL_BOOL ar9300_set_tx_power_limit(struct ath_hal *ah, u_int32_t limit,
u_int16_t extra_txpow, u_int16_t tpc_in_db);
extern void ar9300_chain_noise_floor(struct ath_hal *ah, int16_t *nf_buf,
struct ieee80211_channel *chan, int is_scan);
+extern int16_t ar9300_get_nf_from_reg(struct ath_hal *ah, struct ieee80211_channel *chan, int wait_time);
+extern int ar9300_get_rx_nf_offset(struct ath_hal *ah, struct ieee80211_channel *chan, int8_t *nf_pwr, int8_t *nf_cal);
extern HAL_BOOL ar9300_load_nf(struct ath_hal *ah, int16_t nf[]);
extern HAL_RFGAIN ar9300_get_rfgain(struct ath_hal *ah);
@@ -1681,6 +1702,8 @@ extern void ar9300_tx99_start(struct ath_hal *ah, u_int8_t *data);
extern void ar9300_tx99_stop(struct ath_hal *ah);
#endif /* ATH_SUPPORT_HTC */
#endif /* ATH_TX99_DIAG */
+extern HAL_BOOL ar9300_set_ctl_pwr(struct ath_hal *ah, u_int8_t *ctl_array);
+extern void ar9300_set_txchainmaskopt(struct ath_hal *ah, u_int8_t mask);
enum {
AR9300_COEFF_TX_TYPE = 0,
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c
index 80dc2a3..a446f96 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c
@@ -302,6 +302,7 @@ static const struct ath_hal_private ar9300hal = {
ar9300_get_desc_info, /* ah_get_desc_info */
ar9300_select_ant_config, /* ah_select_ant_config */
ar9300_ant_ctrl_common_get, /* ah_ant_ctrl_common_get */
+ ar9300_ant_swcom_sel, /* ah_ant_swcom_sel */
ar9300_enable_tpc, /* ah_enable_tpc */
AH_NULL, /* ah_olpc_temp_compensation */
#if ATH_SUPPORT_CRDC
@@ -319,7 +320,9 @@ static const struct ath_hal_private ar9300hal = {
ar9300_set_key_cache_entry, /* ah_set_key_cache_entry */
ar9300_set_key_cache_entry_mac, /* ah_set_key_cache_entry_mac */
ar9300_print_keycache, /* ah_print_key_cache */
-
+#if ATH_SUPPORT_KEYPLUMB_WAR
+ ar9300_check_key_cache_entry, /* ah_check_key_cache_entry */
+#endif
/* Power Management Functions */
ar9300_set_power_mode, /* ah_set_power_mode */
ar9300_set_sm_power_mode, /* ah_set_sm_ps_mode */
@@ -342,6 +345,8 @@ static const struct ath_hal_private ar9300hal = {
/* Get Channel Noise */
ath_hal_get_chan_noise, /* ah_get_chan_noise */
ar9300_chain_noise_floor, /* ah_get_chain_noise_floor */
+ ar9300_get_nf_from_reg, /* ah_get_nf_from_reg */
+ ar9300_get_rx_nf_offset, /* ah_get_rx_nf_offset */
/* Beacon Functions */
ar9300_beacon_init, /* ah_beacon_init */
@@ -499,11 +504,11 @@ static const struct ath_hal_private ar9300hal = {
#else
AH_NULL,
AH_NULL,
- ar9300TX99TgtChannelPwrUpdate, /* ah_tx99channelpwrupdate */
- ar9300TX99TgtStart, /* ah_tx99start */
- ar9300TX99TgtStop, /* ah_tx99stop */
- ar9300TX99TgtChainmskSetup, /* ah_tx99_chainmsk_setup */
- ar9300TX99SetSingleCarrier, /* ah_tx99_set_single_carrier */
+ ar9300_tx99_channel_pwr_update, /* ah_tx99channelpwrupdate */
+ ar9300_tx99_start, /* ah_tx99start */
+ ar9300_tx99_stop, /* ah_tx99stop */
+ ar9300_tx99_chainmsk_setup, /* ah_tx99_chainmsk_setup */
+ ar9300_tx99_set_single_carrier, /* ah_tx99_set_single_carrier */
#endif
#endif
ar9300_chk_rssi_update_tx_pwr,
@@ -525,6 +530,8 @@ static const struct ath_hal_private ar9300hal = {
ar9300_dump_keycache, /* ah_dump_keycache */
ar9300_is_ani_noise_spur, /* ah_is_ani_noise_spur */
ar9300_set_hw_beacon_proc, /* ah_set_hw_beacon_proc */
+ ar9300_set_ctl_pwr, /* ah_set_ctl_pwr */
+ ar9300_set_txchainmaskopt, /* ah_set_txchainmaskopt */
},
ar9300_get_channel_edges, /* ah_get_channel_edges */
@@ -838,6 +845,18 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st,
/* Enable RIFS */
ahp->ah_rifs_enabled = AH_TRUE;
+ /* by default, stop RX also in abort txdma, due to
+ "Unable to stop TxDMA" msg observed */
+ ahp->ah_abort_txdma_norx = AH_TRUE;
+
+ /* do not use optional tx chainmask by default */
+ ahp->ah_tx_chainmaskopt = 0;
+
+ ahp->ah_skip_rx_iq_cal = AH_FALSE;
+ ahp->ah_rx_cal_complete = AH_FALSE;
+ ahp->ah_rx_cal_chan = 0;
+ ahp->ah_rx_cal_chan_flag = 0;
+
HALDEBUG(ah, HAL_DEBUG_RESET,
"%s: This Mac Chip Rev 0x%02x.%x is \n", __func__,
ahpriv->ah_macVersion,
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c
index 17943a9..a3cca95 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c
@@ -34,7 +34,8 @@ extern u_int32_t ar9300_num_tx_pending(struct ath_hal *ah, u_int q);
*/
void
ar9300_beacon_init(struct ath_hal *ah,
- u_int32_t next_beacon, u_int32_t beacon_period, HAL_OPMODE opmode)
+ u_int32_t next_beacon, u_int32_t beacon_period,
+ u_int32_t beacon_period_fraction, HAL_OPMODE opmode)
{
u_int32_t beacon_period_usec;
@@ -52,6 +53,11 @@ ar9300_beacon_init(struct ath_hal *ah,
beacon_period_usec =
ONE_EIGHTH_TU_TO_USEC(beacon_period & HAL_BEACON_PERIOD_TU8);
+
+ /* Add the fraction adjustment lost due to unit conversions. */
+ beacon_period_usec += beacon_period_fraction;
+
+
OS_REG_WRITE(ah, AR_BEACON_PERIOD, beacon_period_usec);
OS_REG_WRITE(ah, AR_DMA_BEACON_PERIOD, beacon_period_usec);
OS_REG_WRITE(ah, AR_SWBA_PERIOD, beacon_period_usec);
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c
index 669104a..9028ab7 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c
@@ -1200,6 +1200,44 @@ ar9300_noise_floor_cal_or_power_get(struct ath_hal *ah, int32_t frequency,
return nf_use;
}
+/*
+ * Return the Rx NF offset for specific channel.
+ * The values saved in EEPROM/OTP/Flash is converted through the following way:
+ * ((_p) - NOISE_PWR_DATA_OFFSET) << 2
+ * So we need to convert back to the original values.
+ */
+int ar9300_get_rx_nf_offset(struct ath_hal *ah, struct ieee80211_channel *chan, int8_t *nf_pwr, int8_t *nf_cal) {
+ HAL_CHANNEL_INTERNAL *ichan = ath_hal_checkchannel(ah, chan);
+ int8_t rx_nf_pwr, rx_nf_cal;
+ int i;
+ //HALASSERT(ichan);
+
+ /* Fill 0 if valid internal channel is not found */
+ if (ichan == AH_NULL) {
+ OS_MEMZERO(nf_pwr, sizeof(nf_pwr[0])*OSPREY_MAX_CHAINS);
+ OS_MEMZERO(nf_cal, sizeof(nf_cal[0])*OSPREY_MAX_CHAINS);
+ return -1;
+ }
+
+ for (i = 0; i < OSPREY_MAX_CHAINS; i++) {
+ if ((rx_nf_pwr = ar9300_noise_floor_cal_or_power_get(ah, ichan->channel, i, 0)) == 1) {
+ nf_pwr[i] = 0;
+ } else {
+ //printk("%s: raw nf_pwr[%d] = %d\n", __func__, i, rx_nf_pwr);
+ nf_pwr[i] = NOISE_PWR_DBM_2_INT(rx_nf_pwr);
+ }
+
+ if ((rx_nf_cal = ar9300_noise_floor_cal_or_power_get(ah, ichan->channel, i, 1)) == 1) {
+ nf_cal[i] = 0;
+ } else {
+ //printk("%s: raw nf_cal[%d] = %d\n", __func__, i, rx_nf_cal);
+ nf_cal[i] = NOISE_PWR_DBM_2_INT(rx_nf_cal);
+ }
+ }
+
+ return 0;
+}
+
int32_t ar9300_rx_gain_index_get(struct ath_hal *ah)
{
ar9300_eeprom_t *eep = &AH9300(ah)->ah_eeprom;
@@ -1530,6 +1568,61 @@ u_int16_t ar9300_ant_ctrl_chain_get(struct ath_hal *ah, int chain,
return 0;
}
+/*
+ * Select the usage of antenna via the RF switch.
+ * Default values are loaded from eeprom.
+ */
+HAL_BOOL ar9300_ant_swcom_sel(struct ath_hal *ah, u_int8_t ops,
+ u_int32_t *common_tbl1, u_int32_t *common_tbl2)
+{
+ ar9300_eeprom_t *eep = &AH9300(ah)->ah_eeprom;
+ struct ath_hal_private *ap = AH_PRIVATE(ah);
+ const struct ieee80211_channel *curchan = ap->ah_curchan;
+ enum {
+ ANT_SELECT_OPS_GET,
+ ANT_SELECT_OPS_SET,
+ };
+
+ if (AR_SREV_JUPITER(ah) || AR_SREV_SCORPION(ah))
+ return AH_FALSE;
+
+ if (!curchan)
+ return AH_FALSE;
+
+#define AR_SWITCH_TABLE_COM_ALL (0xffff)
+#define AR_SWITCH_TABLE_COM_ALL_S (0)
+#define AR_SWITCH_TABLE_COM2_ALL (0xffffff)
+#define AR_SWITCH_TABLE_COM2_ALL_S (0)
+ switch (ops) {
+ case ANT_SELECT_OPS_GET:
+ *common_tbl1 = OS_REG_READ_FIELD(ah, AR_PHY_SWITCH_COM,
+ AR_SWITCH_TABLE_COM_ALL);
+ *common_tbl2 = OS_REG_READ_FIELD(ah, AR_PHY_SWITCH_COM_2,
+ AR_SWITCH_TABLE_COM2_ALL);
+ break;
+ case ANT_SELECT_OPS_SET:
+ OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,
+ AR_SWITCH_TABLE_COM_ALL, *common_tbl1);
+ OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM_2,
+ AR_SWITCH_TABLE_COM2_ALL, *common_tbl2);
+
+ /* write back to eeprom */
+ if (IEEE80211_IS_CHAN_2GHZ(curchan)) {
+ eep->modal_header_2g.ant_ctrl_common = *common_tbl1;
+ eep->modal_header_2g.ant_ctrl_common2 = *common_tbl2;
+ } else {
+ eep->modal_header_5g.ant_ctrl_common = *common_tbl1;
+ eep->modal_header_5g.ant_ctrl_common2 = *common_tbl2;
+ }
+
+ break;
+ default:
+ break;
+ }
+
+ return AH_TRUE;
+}
+
HAL_BOOL ar9300_ant_ctrl_apply(struct ath_hal *ah, HAL_BOOL is_2ghz)
{
u_int32_t value;
@@ -2412,16 +2505,31 @@ ar9300_eeprom_set_power_per_rate_table(
HAL_CHANNEL_INTERNAL *ichan = ath_hal_checkchannel(ah, chan);
#endif
- tx_chainmask = chainmask ? chainmask : ahp->ah_tx_chainmask;
+ if (chainmask)
+ tx_chainmask = chainmask;
+ else
+ tx_chainmask = ahp->ah_tx_chainmaskopt ?
+ ahp->ah_tx_chainmaskopt :ahp->ah_tx_chainmask;
ar9300_get_channel_centers(ah, chan, &centers);
+#if 1
if (IEEE80211_IS_CHAN_2GHZ(chan)) {
ahp->twice_antenna_gain = p_eep_data->modal_header_2g.antenna_gain;
} else {
ahp->twice_antenna_gain = p_eep_data->modal_header_5g.antenna_gain;
}
+#else
+ if (IEEE80211_IS_CHAN_2GHZ(chan)) {
+ ahp->twice_antenna_gain = AH_MAX(p_eep_data->modal_header_2g.antenna_gain,
+ AH_PRIVATE(ah)->ah_antenna_gain_2g);
+ } else {
+ ahp->twice_antenna_gain = AH_MAX(p_eep_data->modal_header_5g.antenna_gain,
+ AH_PRIVATE(ah)->ah_antenna_gain_5g);
+ }
+#endif
+
/* Save max allowed antenna gain to ease future lookups */
ahp->twice_antenna_reduction = twice_antenna_reduction;
@@ -2958,7 +3066,8 @@ ar9300_eeprom_set_transmit_power(struct ath_hal *ah,
}
max_power_level = target_power_val_t2[i];
/* Adjusting the ah_max_power_level based on chains and antennaGain*/
- switch (ar9300_get_ntxchains(ahp->ah_tx_chainmask))
+ switch (ar9300_get_ntxchains(((ahp->ah_tx_chainmaskopt > 0) ?
+ ahp->ah_tx_chainmaskopt : ahp->ah_tx_chainmask)))
{
case 1:
break;
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c
index 315086c..7a5919e 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c
@@ -606,7 +606,7 @@ ar9300_freebsd_beacon_init(struct ath_hal *ah, uint32_t next_beacon,
uint32_t beacon_period)
{
- ar9300_beacon_init(ah, next_beacon, beacon_period,
+ ar9300_beacon_init(ah, next_beacon, beacon_period, 0,
AH_PRIVATE(ah)->ah_opmode);
}
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h
index f7ddf15..1af621b 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h
@@ -35,6 +35,7 @@
#define ATH_SUPPORT_PAPRD 1
#define ATH_SUPPORT_TxBF 0
#define AH_PRIVATE_DIAG 1
+#define ATH_SUPPORT_KEYPLUMB_WAR 0
/* XXX need to reverify these; they came in with qcamain */
#define ATH_SUPPORT_FAST_CC 0
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c
index 8b9a143..0f4fab9 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c
@@ -436,3 +436,156 @@ void ar9300_dump_keycache(struct ath_hal *ah, int n, u_int32_t *entry)
}
#undef AH_KEY_REG_SIZE
}
+
+#if ATH_SUPPORT_KEYPLUMB_WAR
+/*
+ * Check the contents of the specified key cache entry
+ * and any associated MIC entry.
+ */
+ HAL_BOOL
+ar9300_check_key_cache_entry(struct ath_hal *ah, u_int16_t entry,
+ const HAL_KEYVAL *k, int xorKey)
+{
+ const HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps;
+ u_int32_t key0, key1, key2, key3, key4;
+ u_int32_t keyType;
+ u_int32_t xorMask = xorKey ?
+ (KEY_XOR << 24 | KEY_XOR << 16 | KEY_XOR << 8 | KEY_XOR) : 0;
+ struct ath_hal_9300 *ahp = AH9300(ah);
+
+
+ if (entry >= pCap->hal_key_cache_size) {
+ HALDEBUG(ah, HAL_DEBUG_KEYCACHE,
+ "%s: entry %u out of range\n", __func__, entry);
+ return AH_FALSE;
+ }
+ switch (k->kv_type) {
+ case HAL_CIPHER_AES_OCB:
+ keyType = AR_KEYTABLE_TYPE_AES;
+ break;
+ case HAL_CIPHER_AES_CCM:
+ if (!pCap->hal_cipher_aes_ccm_support) {
+ HALDEBUG(ah, HAL_DEBUG_KEYCACHE, "%s: AES-CCM not supported by "
+ "mac rev 0x%x\n",
+ __func__, AH_PRIVATE(ah)->ah_macRev);
+ return AH_FALSE;
+ }
+ keyType = AR_KEYTABLE_TYPE_CCM;
+ break;
+ case HAL_CIPHER_TKIP:
+ keyType = AR_KEYTABLE_TYPE_TKIP;
+ if (IS_MIC_ENABLED(ah) && entry + 64 >= pCap->hal_key_cache_size) {
+ HALDEBUG(ah, HAL_DEBUG_KEYCACHE,
+ "%s: entry %u inappropriate for TKIP\n",
+ __func__, entry);
+ return AH_FALSE;
+ }
+ break;
+ case HAL_CIPHER_WEP:
+ if (k->kv_len < 40 / NBBY) {
+ HALDEBUG(ah, HAL_DEBUG_KEYCACHE, "%s: WEP key length %u too small\n",
+ __func__, k->kv_len);
+ return AH_FALSE;
+ }
+ if (k->kv_len <= 40 / NBBY) {
+ keyType = AR_KEYTABLE_TYPE_40;
+ } else if (k->kv_len <= 104 / NBBY) {
+ keyType = AR_KEYTABLE_TYPE_104;
+ } else {
+ keyType = AR_KEYTABLE_TYPE_128;
+ }
+ break;
+ case HAL_CIPHER_CLR:
+ keyType = AR_KEYTABLE_TYPE_CLR;
+ return AH_TRUE;
+ default:
+ HALDEBUG(ah, HAL_DEBUG_KEYCACHE, "%s: cipher %u not supported\n",
+ __func__, k->kv_type);
+ return AH_TRUE;
+ }
+
+ key0 = LE_READ_4(k->kv_val + 0) ^ xorMask;
+ key1 = (LE_READ_2(k->kv_val + 4) ^ xorMask) & 0xffff;
+ key2 = LE_READ_4(k->kv_val + 6) ^ xorMask;
+ key3 = (LE_READ_2(k->kv_val + 10) ^ xorMask) & 0xffff;
+ key4 = LE_READ_4(k->kv_val + 12) ^ xorMask;
+ if (k->kv_len <= 104 / NBBY) {
+ key4 &= 0xff;
+ }
+
+ /*
+ * Note: key cache hardware requires that each double-word
+ * pair be written in even/odd order (since the destination is
+ * a 64-bit register). Don't reorder these writes w/o
+ * considering this!
+ */
+ if (keyType == AR_KEYTABLE_TYPE_TKIP && IS_MIC_ENABLED(ah)) {
+ u_int16_t micentry = entry + 64; /* MIC goes at slot+64 */
+
+
+ /*
+ * Invalidate the encrypt/decrypt key until the MIC
+ * key is installed so pending rx frames will fail
+ * with decrypt errors rather than a MIC error.
+ */
+ if ((OS_REG_READ(ah, AR_KEYTABLE_KEY0(entry)) == key0) &&
+ (OS_REG_READ(ah, AR_KEYTABLE_KEY1(entry)) == key1) &&
+ (OS_REG_READ(ah, AR_KEYTABLE_KEY2(entry)) == key2) &&
+ (OS_REG_READ(ah, AR_KEYTABLE_KEY3(entry)) == key3) &&
+ (OS_REG_READ(ah, AR_KEYTABLE_KEY4(entry)) == key4) &&
+ ((OS_REG_READ(ah, AR_KEYTABLE_TYPE(entry)) & AR_KEY_TYPE) == (keyType & AR_KEY_TYPE)))
+ {
+
+ /*
+ * since the AR_MISC_MODE register was written with the contents of
+ * ah_miscMode (if any) in ar9300Attach, just check ah_miscMode and
+ * save a pci read per key set.
+ */
+ if (ahp->ah_misc_mode & AR_PCU_MIC_NEW_LOC_ENA) {
+ u_int32_t mic0,mic1,mic2,mic3,mic4;
+ /*
+ * both RX and TX mic values can be combined into
+ * one cache slot entry.
+ * 8*N + 800 31:0 RX Michael key 0
+ * 8*N + 804 15:0 TX Michael key 0 [31:16]
+ * 8*N + 808 31:0 RX Michael key 1
+ * 8*N + 80C 15:0 TX Michael key 0 [15:0]
+ * 8*N + 810 31:0 TX Michael key 1
+ * 8*N + 814 15:0 reserved
+ * 8*N + 818 31:0 reserved
+ * 8*N + 81C 14:0 reserved
+ * 15 key valid == 0
+ */
+ /* RX mic */
+ mic0 = LE_READ_4(k->kv_mic + 0);
+ mic2 = LE_READ_4(k->kv_mic + 4);
+ /* TX mic */
+ mic1 = LE_READ_2(k->kv_txmic + 2) & 0xffff;
+ mic3 = LE_READ_2(k->kv_txmic + 0) & 0xffff;
+ mic4 = LE_READ_4(k->kv_txmic + 4);
+ if ((OS_REG_READ(ah, AR_KEYTABLE_KEY0(micentry)) == mic0) &&
+ (OS_REG_READ(ah, AR_KEYTABLE_KEY1(micentry)) == mic1) &&
+ (OS_REG_READ(ah, AR_KEYTABLE_KEY2(micentry)) == mic2) &&
+ (OS_REG_READ(ah, AR_KEYTABLE_KEY3(micentry)) == mic3) &&
+ (OS_REG_READ(ah, AR_KEYTABLE_KEY4(micentry)) == mic4) &&
+ ((OS_REG_READ(ah, AR_KEYTABLE_TYPE(micentry)) & AR_KEY_TYPE) == (AR_KEYTABLE_TYPE_CLR & AR_KEY_TYPE))) {
+ return AH_TRUE;
+ }
+
+ } else {
+ return AH_TRUE;
+ }
+ }
+ } else {
+ if ((OS_REG_READ(ah, AR_KEYTABLE_KEY0(entry)) == key0) &&
+ (OS_REG_READ(ah, AR_KEYTABLE_KEY1(entry)) == key1) &&
+ (OS_REG_READ(ah, AR_KEYTABLE_KEY2(entry)) == key2) &&
+ (OS_REG_READ(ah, AR_KEYTABLE_KEY3(entry)) == key3) &&
+ (OS_REG_READ(ah, AR_KEYTABLE_KEY4(entry)) == key4) &&
+ ((OS_REG_READ(ah, AR_KEYTABLE_TYPE(entry)) & AR_KEY_TYPE) == (keyType & AR_KEY_TYPE))) {
+ return AH_TRUE;
+ }
+ }
+ return AH_FALSE;
+}
+#endif
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c
index a0722b7..dbf58f6 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c
@@ -1697,10 +1697,10 @@ ar9300_get_bb_panic_info(struct ath_hal *ah, struct hal_bb_panic_info *bb_panic)
/* Suppress BB Status mesg following signature */
switch (bb_panic->status) {
- case 0x04000539:
- case 0x04008009:
- case 0x04000b09:
- case 0x1300000a:
+ case 0x04000539:
+ case 0x04008009:
+ case 0x04000b09:
+ case 0x1300000a:
return -1;
}
@@ -3718,8 +3718,6 @@ ar9300_tx99_start(struct ath_hal *ah, u_int8_t *data)
/* Disable AGC to A2 */
OS_REG_WRITE(ah, AR_PHY_TEST, (OS_REG_READ(ah, AR_PHY_TEST) | PHY_AGC_CLR));
- OS_REG_WRITE(ah, 0x9864, OS_REG_READ(ah, 0x9864) | 0x7f000);
- OS_REG_WRITE(ah, 0x9924, OS_REG_READ(ah, 0x9924) | 0x7f00fe);
OS_REG_WRITE(ah, AR_DIAG_SW, OS_REG_READ(ah, AR_DIAG_SW) &~ AR_DIAG_RX_DIS);
OS_REG_WRITE(ah, AR_CR, AR_CR_RXD); /* set receive disable */
@@ -3763,3 +3761,47 @@ ar9300SetDfs3StreamFix(struct ath_hal *ah, u_int32_t val)
{
return AH_FALSE;
}
+
+HAL_BOOL
+ar9300_set_ctl_pwr(struct ath_hal *ah, u_int8_t *ctl_array)
+{
+ struct ath_hal_9300 *ahp = AH9300(ah);
+ ar9300_eeprom_t *p_eep_data = &ahp->ah_eeprom;
+ u_int8_t *ctl_index;
+ u_int32_t offset = 0;
+
+ if (!ctl_array)
+ return AH_FALSE;
+
+ /* copy 2G ctl freqbin and power data */
+ ctl_index = p_eep_data->ctl_index_2g;
+ OS_MEMCPY(ctl_index + OSPREY_NUM_CTLS_2G, ctl_array,
+ OSPREY_NUM_CTLS_2G * OSPREY_NUM_BAND_EDGES_2G + /* ctl_freqbin_2G */
+ OSPREY_NUM_CTLS_2G * sizeof(OSP_CAL_CTL_DATA_2G)); /* ctl_power_data_2g */
+ offset = (OSPREY_NUM_CTLS_2G * OSPREY_NUM_BAND_EDGES_2G) +
+ ( OSPREY_NUM_CTLS_2G * sizeof(OSP_CAL_CTL_DATA_2G));
+
+
+ /* copy 2G ctl freqbin and power data */
+ ctl_index = p_eep_data->ctl_index_5g;
+ OS_MEMCPY(ctl_index + OSPREY_NUM_CTLS_5G, ctl_array + offset,
+ OSPREY_NUM_CTLS_5G * OSPREY_NUM_BAND_EDGES_5G + /* ctl_freqbin_5G */
+ OSPREY_NUM_CTLS_5G * sizeof(OSP_CAL_CTL_DATA_5G)); /* ctl_power_data_5g */
+
+ return AH_FALSE;
+}
+
+void
+ar9300_set_txchainmaskopt(struct ath_hal *ah, u_int8_t mask)
+{
+ struct ath_hal_9300 *ahp = AH9300(ah);
+
+ /* optional txchainmask should be subset of primary txchainmask */
+ if ((mask & ahp->ah_tx_chainmask) != mask) {
+ ahp->ah_tx_chainmaskopt = 0;
+ ath_hal_printf(ah, "Error: ah_tx_chainmask=%d, mask=%d\n", ahp->ah_tx_chainmask, mask);
+ return;
+ }
+
+ ahp->ah_tx_chainmaskopt = mask;
+}
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_osprey22.ini b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_osprey22.ini
index 9814dab..fffaf7a 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_osprey22.ini
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_osprey22.ini
@@ -881,7 +881,7 @@ static const u_int32_t ar9300_osprey_2p2_mac_core[][2] = {
{ 0x00008258 , 0x00000000 },
{ 0x0000825c , 0x40000000 },
{ 0x00008260 , 0x00080922 },
- { 0x00008264 , 0x9bc00010 },
+ { 0x00008264 , 0x9d400010 },
{ 0x00008268 , 0xffffffff },
{ 0x0000826c , 0x0000ffff },
{ 0x00008270 , 0x00000000 },
@@ -1171,7 +1171,7 @@ static const u_int32_t ar9300_osprey_2p2_mac_postamble[][5] = {
{ 0x000010b0 , 0x00000e60 , 0x00001cc0 , 0x00007c70 , 0x00003e38 },
{ 0x00008014 , 0x03e803e8 , 0x07d007d0 , 0x10801600 , 0x08400b00 },
{ 0x0000801c , 0x128d8027 , 0x128d804f , 0x12e00057 , 0x12e0002b },
- { 0x00008120 , 0x08f04800 , 0x08f04800 , 0x08f04810 , 0x08f04810 },
+ { 0x00008120 , 0x18f04800 , 0x18f04800 , 0x18f04810 , 0x18f04810 },
{ 0x000081d0 , 0x00003210 , 0x00003210 , 0x0000320a , 0x0000320a },
{ 0x00008318 , 0x00003e80 , 0x00007d00 , 0x00006880 , 0x00003440 },
};
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c
index 5a4623f..2a8f7f8 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c
@@ -469,7 +469,7 @@ u_int32_t ar9300_wow_offload_handshake(struct ath_hal *ah, u_int32_t pattern_ena
OS_REG_SET_BIT(ah, AR_MBOX_CTRL_STATUS, AR_MBOX_WOW_REQ);
OS_REG_SET_BIT(ah, AR_MBOX_CTRL_STATUS, AR_MBOX_INT_EMB_CPU);
- if (!ath_hal_wait(ah, AR_MBOX_CTRL_STATUS, AR_MBOX_WOW_CONF, AR_MBOX_WOW_CONF, bt_handshake_timeout_us)) {
+ if (!ath_hal_waitfor(ah, AR_MBOX_CTRL_STATUS, AR_MBOX_WOW_CONF, AR_MBOX_WOW_CONF, bt_handshake_timeout_us)) {
HALDEBUG(ah, HAL_DEBUG_UNMASKABLE, "%s: WoW offload handshake failed", __func__);
return 0;
}
@@ -678,6 +678,7 @@ ar9300_set_power_mode(struct ath_hal *ah, HAL_POWER_MODE mode, int set_chip)
OS_REG_WRITE(ah, AR_RTC_KEEP_AWAKE, 0x2);
}
#endif
+ ahp->ah_chip_full_sleep = AH_FALSE;
break;
case HAL_PM_FULL_SLEEP:
#if ATH_SUPPORT_MCI
@@ -987,7 +988,7 @@ ar9300_set_power_mode_wow_sleep(struct ath_hal *ah)
OS_REG_SET_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV);
OS_REG_WRITE(ah, AR_CR, AR_CR_RXD); /* Set receive disable bit */
- if (!ath_hal_wait(ah, AR_CR, AR_CR_RXE, 0, AH_WAIT_TIMEOUT)) {
+ if (!ath_hal_waitfor(ah, AR_CR, AR_CR_RXE, 0, AH_WAIT_TIMEOUT)) {
HALDEBUG(ah, HAL_DEBUG_POWER_MGMT, "%s: dma failed to stop in 10ms\n"
"AR_CR=0x%08x\nAR_DIAG_SW=0x%08x\n", __func__,
OS_REG_READ(ah, AR_CR), OS_REG_READ(ah, AR_DIAG_SW));
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c
index a83099e..d4065d8 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c
@@ -68,6 +68,7 @@ ar9300_proc_rx_desc_fast(struct ath_hal *ah, struct ath_desc *ds,
rxs->rs_status = 0;
rxs->rs_flags = 0;
+ rxs->rs_phyerr = 0;
rxs->rs_datalen = rxsp->status2 & AR_data_len;
rxs->rs_tstamp = rxsp->status3;
@@ -129,17 +130,16 @@ ar9300_proc_rx_desc_fast(struct ath_hal *ah, struct ath_desc *ds,
* Consequently we filter them out here so we don't
* confuse and/or complicate drivers.
*/
+
if (rxsp->status11 & AR_crc_err) {
rxs->rs_status |= HAL_RXERR_CRC;
/*
- * ignore CRC flag for spectral phy reports
+ * ignore CRC flag for phy reports
*/
if (rxsp->status11 & AR_phyerr) {
u_int phyerr = MS(rxsp->status11, AR_phy_err_code);
- if (phyerr == HAL_PHYERR_SPECTRAL) {
- rxs->rs_status |= HAL_RXERR_PHY;
- rxs->rs_phyerr = phyerr;
- }
+ rxs->rs_status |= HAL_RXERR_PHY;
+ rxs->rs_phyerr = phyerr;
}
} else if (rxsp->status11 & AR_phyerr) {
u_int phyerr;
@@ -165,7 +165,9 @@ ar9300_proc_rx_desc_fast(struct ath_hal *ah, struct ath_desc *ds,
rxs->rs_status |= HAL_RXERR_MIC;
}
}
-
+#if 0
+ rxs->rs_channel = AH_PRIVATE(ah)->ah_curchan->channel;
+#endif
return HAL_OK;
}
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c
index 51ce195..9ed224c 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c
@@ -31,7 +31,6 @@
#define FIX_NOISE_FLOOR 1
-
/* Additional Time delay to wait after activiting the Base band */
#define BASE_ACTIVATE_DELAY 100 /* usec */
#define RTC_PLL_SETTLE_DELAY 100 /* usec */
@@ -325,6 +324,7 @@ int16_t ar9300_get_min_cca_pwr(struct ath_hal *ah)
int16_t nf;
// struct ath_hal_private *ahpriv = AH_PRIVATE(ah);
+
if ((OS_REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) == 0) {
nf = MS(OS_REG_READ(ah, AR_PHY_CCA_0), AR9280_PHY_MINCCA_PWR);
if (nf & 0x100) {
@@ -402,6 +402,33 @@ void ar9300_chain_noise_floor(struct ath_hal *ah, int16_t *nf_buf,
}
}
+/*
+ * Return the current NF value in register.
+ * If the current NF cal is not completed, return 0.
+ */
+int16_t ar9300_get_nf_from_reg(struct ath_hal *ah, struct ieee80211_channel *chan, int wait_time)
+{
+ int16_t nfarray[HAL_NUM_NF_READINGS] = {0};
+ int is_2g = 0;
+ HAL_CHANNEL_INTERNAL *ichan = NULL;
+
+ ichan = ath_hal_checkchannel(ah, chan);
+ if (ichan == NULL)
+ return (0);
+
+ if (wait_time <= 0) {
+ return 0;
+ }
+
+ if (!ath_hal_waitfor(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF, 0, wait_time)) {
+ ath_hal_printf(ah, "%s: NF cal is not complete in %dus", __func__, wait_time);
+ return 0;
+ }
+ is_2g = !! (IS_CHAN_2GHZ(ichan));
+ ar9300_upload_noise_floor(ah, is_2g, nfarray);
+
+ return nfarray[0];
+}
/*
* Pick up the medium one in the noise floor buffer and update the
@@ -415,6 +442,7 @@ ar9300_get_nf_hist_mid(struct ath_hal *ah, HAL_NFCAL_HIST_FULL *h, int reading,
int16_t sort[HAL_NF_CAL_HIST_LEN_FULL]; /* upper bound for hist_len */
int i, j;
+
for (i = 0; i < hist_len; i++) {
sort[i] = h->nf_cal_buffer[i][reading];
HALDEBUG(ah, HAL_DEBUG_NFCAL,
@@ -451,7 +479,7 @@ ar9300_reset_nf_hist_buff(struct ath_hal *ah, HAL_CHANNEL_INTERNAL *ichan)
HAL_CHAN_NFCAL_HIST *h = &ichan->nf_cal_hist;
HAL_NFCAL_HIST_FULL *home = &AH_PRIVATE(ah)->nf_cal_hist;
int i;
-
+
/*
* Copy the value for the channel in question into the home-channel
* NF history buffer. The channel NF is probably a value filled in by
@@ -538,6 +566,7 @@ get_noise_floor_thresh(struct ath_hal *ah, const HAL_CHANNEL_INTERNAL *chan,
{
struct ath_hal_9300 *ahp = AH9300(ah);
+
switch (chan->channel_flags & CHANNEL_ALL_NOTURBO) {
case CHANNEL_A:
case CHANNEL_A_HT20:
@@ -1609,6 +1638,7 @@ ar9300_set_reset(struct ath_hal *ah, int type)
{
u_int32_t rst_flags;
u_int32_t tmp_reg;
+ struct ath_hal_9300 *ahp = AH9300(ah);
HALASSERT(type == HAL_RESET_WARM || type == HAL_RESET_COLD);
@@ -1802,6 +1832,7 @@ ar9300_set_reset(struct ath_hal *ah, int type)
ar9300_attach_hw_platform(ah);
+ ahp->ah_chip_reset_done = 1;
return AH_TRUE;
}
@@ -2312,10 +2343,22 @@ ar9300_per_calibration(struct ath_hal *ah, HAL_CHANNEL_INTERNAL *ichan,
static void
ar9300_start_nf_cal(struct ath_hal *ah)
{
+ struct ath_hal_9300 *ahp = AH9300(ah);
OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_ENABLE_NF);
OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NO_UPDATE_NF);
OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF);
AH9300(ah)->nf_tsf32 = ar9300_get_tsf32(ah);
+
+/*
+ * We are reading the NF values before we start the NF operation, because
+ * of that we are getting very high values like -45.
+ * This triggers the CW_INT detected and EACS module triggers the channel change
+ * chip_reset_done value is used to fix this issue.
+ * chip_reset_flag is set during the RTC reset.
+ * chip_reset_flag is cleared during the starting NF operation.
+ * if flag is set we will clear the flag and will not read the NF values.
+ */
+ ahp->ah_chip_reset_done = 0;
}
/* ar9300_calibration
@@ -2409,7 +2452,7 @@ ar9300_calibration(struct ath_hal *ah, struct ieee80211_channel *chan, u_int8_t
ar9300_load_nf(ah, nf_buf);
/* start NF calibration, without updating BB NF register*/
- ar9300_start_nf_cal(ah);
+ ar9300_start_nf_cal(ah);
}
}
return AH_TRUE;
@@ -2459,12 +2502,15 @@ ar9300_iq_calibration(struct ath_hal *ah, u_int8_t num_chains)
u_int32_t q_coff_denom, i_coff_denom;
int32_t q_coff, i_coff;
int iq_corr_neg, i;
+ HAL_CHANNEL_INTERNAL *ichan;
static const u_int32_t offset_array[3] = {
AR_PHY_RX_IQCAL_CORR_B0,
AR_PHY_RX_IQCAL_CORR_B1,
AR_PHY_RX_IQCAL_CORR_B2,
};
+ ichan = ath_hal_checkchannel(ah, AH_PRIVATE(ah)->ah_curchan);
+
for (i = 0; i < num_chains; i++) {
power_meas_i = ahp->ah_total_power_meas_i[i];
power_meas_q = ahp->ah_total_power_meas_q[i];
@@ -2537,6 +2583,19 @@ ar9300_iq_calibration(struct ath_hal *ah, u_int8_t num_chains)
OS_REG_RMW_FIELD(ah, offset_array[i],
AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF, q_coff);
+ /* store the RX cal results */
+ if (ichan != NULL) {
+ ahp->ah_rx_cal_corr[i] = OS_REG_READ(ah, offset_array[i]) & 0x7fff;
+ ahp->ah_rx_cal_complete = AH_TRUE;
+ ahp->ah_rx_cal_chan = ichan->channel;
+// ahp->ah_rx_cal_chan_flag = ichan->channel_flags &~ CHANNEL_PASSIVE;
+ ahp->ah_rx_cal_chan_flag = 0; /* XXX */
+ } else {
+ /* XXX? Is this what I should do? */
+ ahp->ah_rx_cal_complete = AH_FALSE;
+
+ }
+
HALDEBUG(ah, HAL_DEBUG_CALIBRATE,
"Register offset (0x%04x) QI COFF (bitfields 0x%08x) "
"after update = 0x%x\n",
@@ -2563,6 +2622,55 @@ ar9300_iq_calibration(struct ath_hal *ah, u_int8_t num_chains)
}
/*
+ * When coming back from offchan, we do not perform RX IQ Cal.
+ * But the chip reset will clear all previous results
+ * We store the previous results and restore here.
+ */
+static void
+ar9300_rx_iq_cal_restore(struct ath_hal *ah)
+{
+ struct ath_hal_9300 *ahp = AH9300(ah);
+ u_int32_t i_coff, q_coff;
+ HAL_BOOL is_restore = AH_FALSE;
+ int i;
+ static const u_int32_t offset_array[3] = {
+ AR_PHY_RX_IQCAL_CORR_B0,
+ AR_PHY_RX_IQCAL_CORR_B1,
+ AR_PHY_RX_IQCAL_CORR_B2,
+ };
+
+ for (i=0; i<AR9300_MAX_CHAINS; i++) {
+ if (ahp->ah_rx_cal_corr[i]) {
+ i_coff = (ahp->ah_rx_cal_corr[i] &
+ AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF) >>
+ AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF_S;
+ q_coff = (ahp->ah_rx_cal_corr[i] &
+ AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF) >>
+ AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF_S;
+
+ OS_REG_RMW_FIELD(ah, offset_array[i],
+ AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF, i_coff);
+ OS_REG_RMW_FIELD(ah, offset_array[i],
+ AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF, q_coff);
+
+ is_restore = AH_TRUE;
+ }
+ }
+
+ if (is_restore)
+ OS_REG_SET_BIT(ah,
+ AR_PHY_RX_IQCAL_CORR_B0, AR_PHY_RX_IQCAL_CORR_IQCORR_ENABLE);
+
+ HALDEBUG(ah, HAL_DEBUG_CALIBRATE,
+ "%s: IQ Cal and Correction (offset 0x%04x) enabled "
+ "(bit position 0x%08x). New Value 0x%08x\n",
+ __func__,
+ (unsigned) (AR_PHY_RX_IQCAL_CORR_B0),
+ AR_PHY_RX_IQCAL_CORR_IQCORR_ENABLE,
+ OS_REG_READ(ah, AR_PHY_RX_IQCAL_CORR_B0));
+}
+
+/*
* Set a limit on the overall output power. Used for dynamic
* transmit power control and the like.
*
@@ -3739,6 +3847,13 @@ ar9300_init_cal_internal(struct ath_hal *ah, struct ieee80211_channel *chan,
#endif
/* end - Init time calibrations */
+ /* Do not do RX cal in case of offchan, or cal data already exists on same channel*/
+ if (ahp->ah_skip_rx_iq_cal) {
+ HALDEBUG(ah, HAL_DEBUG_CALIBRATE,
+ "Skip RX IQ Cal\n");
+ return AH_TRUE;
+ }
+
/* If Cals are supported, add them to list via INIT/INSERT_CAL */
if (AH_TRUE == ar9300_is_cal_supp(ah, chan, IQ_MISMATCH_CAL)) {
INIT_CAL(&ahp->ah_iq_cal_data);
@@ -3839,6 +3954,8 @@ ar9300_set_dma(struct ath_hal *ah)
{
u_int32_t regval;
struct ath_hal_9300 *ahp = AH9300(ah);
+ struct ath_hal_private *ahpriv = AH_PRIVATE(ah);
+ HAL_CAPABILITIES *pCap = &ahpriv->ah_caps;
#if 0
/*
@@ -3898,9 +4015,14 @@ ar9300_set_dma(struct ath_hal *ah)
/*
* Enable HPQ for UAPSD
*/
- if (AH_PRIVATE(ah)->ah_opmode == HAL_M_HOSTAP) {
- OS_REG_WRITE(ah, AR_HP_Q_CONTROL,
- AR_HPQ_ENABLE | AR_HPQ_UAPSD | AR_HPQ_UAPSD_TRIGGER_EN);
+ if (pCap->halHwUapsdTrig == AH_TRUE) {
+ /* Only enable this if HAL capabilities says it is OK */
+ if (AH_PRIVATE(ah)->ah_opmode == HAL_M_HOSTAP) {
+ OS_REG_WRITE(ah, AR_HP_Q_CONTROL,
+ AR_HPQ_ENABLE | AR_HPQ_UAPSD | AR_HPQ_UAPSD_TRIGGER_EN);
+ }
+ } else {
+ /* use default value from ini file - which disable HPQ queue usage */
}
/*
@@ -4319,6 +4441,7 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch
HAL_BOOL stopped, cal_ret;
HAL_BOOL apply_last_iqcorr = AH_FALSE;
+
if (OS_REG_READ(ah, AR_IER) == AR_IER_ENABLE) {
HALDEBUG(AH_NULL, HAL_DEBUG_UNMASKABLE, "** Reset called with WLAN "
"interrupt enabled %08x **\n", ar9300_get_interrupts(ah));
@@ -4347,6 +4470,11 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch
ahp->ah_rx_chainmask = rxchainmask & ap->ah_caps.halRxChainMask;
ahp->ah_tx_cal_chainmask = ap->ah_caps.halTxChainMask;
ahp->ah_rx_cal_chainmask = ap->ah_caps.halRxChainMask;
+
+ /*
+ * Keep the previous optinal txchainmask value
+ */
+
HALASSERT(ar9300_check_op_mode(opmode));
OS_MARK(ah, AH_MARK_RESET, b_channel_change);
@@ -4453,7 +4581,21 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch
#if 0
/* Get the value from the previous NF cal and update history buffer */
if (curchan && (ahp->ah_chip_full_sleep != AH_TRUE)) {
- ar9300_store_new_nf(ah, curchan, is_scan);
+
+ if(ahp->ah_chip_reset_done){
+ ahp->ah_chip_reset_done = 0;
+ } else {
+ /*
+ * is_scan controls updating NF for home channel or off channel.
+ * Home -> Off, update home channel
+ * Off -> Home, update off channel
+ * Home -> Home, uppdate home channel
+ */
+ if (ap->ah_curchan->channel != chan->channel)
+ ar9300_store_new_nf(ah, curchan, !is_scan);
+ else
+ ar9300_store_new_nf(ah, curchan, is_scan);
+ }
}
#endif
@@ -4464,7 +4606,7 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch
AH9300(ah)->nfp = IS_CHAN_2GHZ(ichan) ? &ahp->nf_2GHz : &ahp->nf_5GHz;
/*
- * XXX For now, don't apply the last IQ correction.
+ * XXX FreeBSD For now, don't apply the last IQ correction.
*
* This should be done when scorpion is enabled on FreeBSD; just be
* sure to fix this channel match code so it uses net80211 flags
@@ -4501,6 +4643,31 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch
}
#endif
/*
+ * In case of
+ * - offchan scan, or
+ * - same channel and RX IQ Cal already available
+ * disable RX IQ Cal.
+ */
+ if (is_scan) {
+ ahp->ah_skip_rx_iq_cal = AH_TRUE;
+ HALDEBUG(ah, HAL_DEBUG_CALIBRATE,
+ "Skip RX IQ Cal due to scanning\n");
+ } else {
+#if 0
+ /* XXX FreeBSD: always just do the RX IQ cal */
+ /* XXX I think it's just going to speed things up; I don't think it's to avoid chan bugs */
+ if (ahp->ah_rx_cal_complete &&
+ ahp->ah_rx_cal_chan == ichan->channel &&
+ ahp->ah_rx_cal_chan_flag == chan->channel_flags) {
+ ahp->ah_skip_rx_iq_cal = AH_TRUE;
+ HALDEBUG(ah, HAL_DEBUG_CALIBRATE,
+ "Skip RX IQ Cal due to same channel with completed RX IQ Cal\n");
+ } else
+#endif
+ ahp->ah_skip_rx_iq_cal = AH_FALSE;
+ }
+
+ /*
* Fast channel change (Change synthesizer based on channel freq
* without resetting chip)
* Don't do it when
@@ -4866,6 +5033,23 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch
ar9300_init_bb(ah, chan);
/* BB Step 7: Calibration */
+ /*
+ * Only kick off calibration not on offchan.
+ * If coming back from offchan, restore prevous Cal results
+ * since chip reset will clear existings.
+ */
+ if (!ahp->ah_skip_rx_iq_cal) {
+ int i;
+ /* clear existing RX cal data */
+ for (i=0; i<AR9300_MAX_CHAINS; i++)
+ ahp->ah_rx_cal_corr[i] = 0;
+
+ ahp->ah_rx_cal_complete = AH_FALSE;
+// ahp->ah_rx_cal_chan = chan->channel;
+// ahp->ah_rx_cal_chan_flag = ichan->channel_flags;
+ ahp->ah_rx_cal_chan = 0;
+ ahp->ah_rx_cal_chan_flag = 0; /* XXX FreeBSD */
+ }
ar9300_invalidate_saved_cals(ah, ichan);
cal_ret = ar9300_init_cal(ah, chan, AH_FALSE, apply_last_iqcorr);
@@ -5021,6 +5205,11 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch
nf_hist_buff_reset = 0;
#ifndef ATH_NF_PER_CHAN
if (First_NFCal(ah, ichan, is_scan, chan)){
+ if (ahp->ah_skip_rx_iq_cal && !is_scan) {
+ /* restore RX Cal result if existing */
+ ar9300_rx_iq_cal_restore(ah);
+ ahp->ah_skip_rx_iq_cal = AH_FALSE;
+ }
}
#endif /* ATH_NF_PER_CHAN */
}
@@ -5094,12 +5283,24 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch
ar9300_set_smart_antenna(ah, ahp->ah_smartantenna_enable);
+ if (ahp->ah_skip_rx_iq_cal && !is_scan) {
+ /* restore RX Cal result if existing */
+ ar9300_rx_iq_cal_restore(ah);
+ ahp->ah_skip_rx_iq_cal = AH_FALSE;
+ }
+
return AH_TRUE;
bad:
OS_MARK(ah, AH_MARK_RESET_DONE, ecode);
*status = ecode;
+ if (ahp->ah_skip_rx_iq_cal && !is_scan) {
+ /* restore RX Cal result if existing */
+ ar9300_rx_iq_cal_restore(ah);
+ ahp->ah_skip_rx_iq_cal = AH_FALSE;
+ }
+
return AH_FALSE;
#undef FAIL
}
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c
index ab39284..530b29a 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c
@@ -583,6 +583,14 @@ ar9300_num_tx_pending(struct ath_hal *ah, u_int q)
HAL_BOOL
ar9300_stop_tx_dma(struct ath_hal *ah, u_int q, u_int timeout)
{
+ struct ath_hal_9300 *ahp = AH9300(ah);
+
+ /*
+ * If we call abort txdma instead, no need to stop RX.
+ * Otherwise, the RX logic might not be restarted properly.
+ */
+ ahp->ah_abort_txdma_norx = AH_FALSE;
+
/*
* Directly call abort. It is better, hardware-wise, to stop all
* queues at once than individual ones.
@@ -798,10 +806,40 @@ ar9300_stop_tx_dma_indv_que(struct ath_hal *ah, u_int q, u_int timeout)
*/
#define AR9300_ABORT_LOOPS 1000
#define AR9300_ABORT_WAIT 5
+#define NEXT_TBTT_NOW 10
HAL_BOOL
ar9300_abort_tx_dma(struct ath_hal *ah)
{
+ struct ath_hal_9300 *ahp = AH9300(ah);
int i, q;
+ u_int32_t nexttbtt, nextdba, tsf_tbtt, tbtt, dba;
+ HAL_BOOL stopped;
+ HAL_BOOL status = AH_TRUE;
+
+ if (ahp->ah_abort_txdma_norx) {
+ /*
+ * First of all, make sure RX has been stopped
+ */
+ if (ar9300_get_power_mode(ah) != HAL_PM_FULL_SLEEP) {
+ /* Need to stop RX DMA before reset otherwise chip might hang */
+ stopped = ar9300_set_rx_abort(ah, AH_TRUE); /* abort and disable PCU */
+ ar9300_set_rx_filter(ah, 0);
+ stopped &= ar9300_stop_dma_receive(ah, 0); /* stop and disable RX DMA */
+ if (!stopped) {
+ /*
+ * During the transition from full sleep to reset,
+ * recv DMA regs are not available to be read
+ */
+ HALDEBUG(ah, HAL_DEBUG_UNMASKABLE,
+ "%s[%d]: ar9300_stop_dma_receive failed\n", __func__, __LINE__);
+ //We still continue to stop TX dma
+ //return AH_FALSE;
+ }
+ } else {
+ HALDEBUG(ah, HAL_DEBUG_UNMASKABLE,
+ "%s[%d]: Chip is already in full sleep\n", __func__, __LINE__);
+ }
+ }
/*
* set txd on all queues
@@ -812,13 +850,27 @@ ar9300_abort_tx_dma(struct ath_hal *ah)
* set tx abort bits (also disable rx)
*/
OS_REG_SET_BIT(ah, AR_PCU_MISC, AR_PCU_FORCE_QUIET_COLL | AR_PCU_CLEAR_VMF);
- OS_REG_SET_BIT(ah, AR_DIAG_SW, (AR_DIAG_FORCE_CH_IDLE_HIGH | AR_DIAG_RX_DIS |
- AR_DIAG_RX_ABORT | AR_DIAG_FORCE_RX_CLEAR));
+ /* Add a new receipe from K31 code */
+ OS_REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_CH_IDLE_HIGH | AR_DIAG_RX_DIS |
+ AR_DIAG_RX_ABORT | AR_DIAG_FORCE_RX_CLEAR);
+ /* beacon Q flush */
+ nexttbtt = OS_REG_READ(ah, AR_NEXT_TBTT_TIMER);
+ nextdba = OS_REG_READ(ah, AR_NEXT_DMA_BEACON_ALERT);
+ //printk("%s[%d]:dba: %d, nt: %d \n", __func__, __LINE__, nextdba, nexttbtt);
+ tsf_tbtt = OS_REG_READ(ah, AR_TSF_L32);
+ tbtt = tsf_tbtt + NEXT_TBTT_NOW;
+ dba = tsf_tbtt;
+ OS_REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, dba);
+ OS_REG_WRITE(ah, AR_NEXT_TBTT_TIMER, tbtt);
OS_REG_SET_BIT(ah, AR_D_GBL_IFS_MISC, AR_D_GBL_IFS_MISC_IGNORE_BACKOFF);
- /* Let TXE (all queues) clear before waiting on any pending frames */
- for (i = 0; i < AR9300_ABORT_LOOPS; i++) {
- if (OS_REG_READ(ah, AR_Q_TXE) == 0) {
+ /*
+ * Let TXE (all queues) clear before waiting for any pending frames
+ * This is needed before starting the RF_BUS GRANT sequence other wise causes kernel
+ * panic
+ */
+ for(i = 0; i < AR9300_ABORT_LOOPS; i++) {
+ if(OS_REG_READ(ah, AR_Q_TXE) == 0) {
break;
}
OS_DELAY(AR9300_ABORT_WAIT);
@@ -830,28 +882,38 @@ ar9300_abort_tx_dma(struct ath_hal *ah)
/*
* wait on all tx queues
+ * This need to be checked in the last to gain extra 50 usec. on avg.
+ * Currently checked first since we dont have a previous channel information currently.
+ * Which is needed to revert the rf changes.
*/
- for (q = 0; q < AR_NUM_QCU; q++) {
+ for (q = AR_NUM_QCU - 1; q >= 0; q--) {
for (i = 0; i < AR9300_ABORT_LOOPS; i++) {
- if (!ar9300_num_tx_pending(ah, q)) {
+ if (!(ar9300_num_tx_pending(ah, q))) {
break;
}
OS_DELAY(AR9300_ABORT_WAIT);
}
if (i == AR9300_ABORT_LOOPS) {
- HALDEBUG(ah, HAL_DEBUG_TX,
- "%s[%d] reached max wait on pending tx, q %d\n",
- __func__, __LINE__, q);
- return AH_FALSE;
+ status = AH_FALSE;
+ HALDEBUG(ah, HAL_DEBUG_UNMASKABLE,
+ "ABORT LOOP finsihsed for Q: %d, num_pending: %d \n",
+ q, ar9300_num_tx_pending(ah, q));
+ goto exit;
}
}
+ /* Updating the beacon alert register with correct value */
+ OS_REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, nextdba);
+ OS_REG_WRITE(ah, AR_NEXT_TBTT_TIMER, nexttbtt);
+
+exit:
/*
* clear tx abort bits
*/
OS_REG_CLR_BIT(ah, AR_PCU_MISC, AR_PCU_FORCE_QUIET_COLL | AR_PCU_CLEAR_VMF);
- OS_REG_CLR_BIT(ah, AR_DIAG_SW, (AR_DIAG_FORCE_CH_IDLE_HIGH | AR_DIAG_RX_DIS |
- AR_DIAG_RX_ABORT | AR_DIAG_FORCE_RX_CLEAR));
+ /* Added a new receipe from K31 code */
+ OS_REG_CLR_BIT(ah, AR_DIAG_SW, AR_DIAG_FORCE_CH_IDLE_HIGH | AR_DIAG_RX_DIS |
+ AR_DIAG_RX_ABORT | AR_DIAG_FORCE_RX_CLEAR);
OS_REG_CLR_BIT(ah, AR_D_GBL_IFS_MISC, AR_D_GBL_IFS_MISC_IGNORE_BACKOFF);
/*
@@ -859,7 +921,9 @@ ar9300_abort_tx_dma(struct ath_hal *ah)
*/
OS_REG_WRITE(ah, AR_Q_TXD, 0);
- return AH_TRUE;
+ ahp->ah_abort_txdma_norx = AH_TRUE;
+
+ return status;
}
/*
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9340.ini b/sys/contrib/dev/ath/ath_hal/ar9300/ar9340.ini
index 81894de..ef7dbca 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9340.ini
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9340.ini
@@ -1078,7 +1078,7 @@ static const u_int32_t ar9340_wasp_1p0_mac_postamble[][5] = {
{ 0x0000801c , 0x128d8027 , 0x128d804f , 0x12e00057 , 0x12e0002b },
- { 0x00008120 , 0x08f04800 , 0x08f04800 , 0x08f04810 , 0x08f04810 },
+ { 0x00008120 , 0x18f04800 , 0x18f04800 , 0x18f04810 , 0x18f04810 },
{ 0x000081d0 , 0x00003210 , 0x00003210 , 0x0000320a , 0x0000320a },
@@ -1212,7 +1212,7 @@ static const u_int32_t ar9340_wasp_1p0_baseband_postamble[][5] = {
{ 0x00009e18 , 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 },
- { 0x00009e1c , 0x0001cf9c , 0x0001cf9c , 0x00021f9c , 0x00021f9c },
+ { 0x00009e1c , 0x0001c59c , 0x0001c59c , 0x0002159c , 0x0002159c },
{ 0x00009e20 , 0x000003b5 , 0x000003b5 , 0x000003ce , 0x000003ce },
@@ -1586,10 +1586,14 @@ static const u_int32_t ar9340_wasp_1p0_baseband_postamble_dfs_channel[][3] = {
{ 0x00009824 , 0x5ac668d0 , 0x5ac668d0 },
+ { 0x00009828 , 0x06903080 , 0x06903080 },
+
{ 0x00009e0c , 0x6d4000e2 , 0x6d4000e2 },
{ 0x00009e14 , 0x37b9625e , 0x37b9625e },
+ { 0x00009814 , 0x3400c00f , 0x3400c00f },
+
};
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9580.ini b/sys/contrib/dev/ath/ath_hal/ar9300/ar9580.ini
index 32124db..52b92ff 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9580.ini
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9580.ini
@@ -34,8 +34,10 @@
static const u_int32_t ar9300_ar9580_1p0_baseband_postamble_dfs_channel[][3] = {
/* Addr 5G_HT20 5G_HT40 */
{ 0x00009824 , 0x5ac668d0 , 0x5ac668d0 },
+ { 0x00009828 , 0x06903080 , 0x06903080 },
{ 0x00009e0c , 0x6d4000e2 , 0x6d4000e2 },
{ 0x00009e14 , 0x37b9625e , 0x37b9625e },
+ { 0x00009814 , 0x3400c00f , 0x3400c00f },
};
static const u_int32_t ar9300Modes_fast_clock_ar9580_1p0[][3] = {
@@ -257,7 +259,7 @@ static const u_int32_t ar9300_ar9580_1p0_mac_postamble[][5] = {
{ 0x000010b0 , 0x00000e60 , 0x00001cc0 , 0x00007c70 , 0x00003e38 },
{ 0x00008014 , 0x03e803e8 , 0x07d007d0 , 0x10801600 , 0x08400b00 },
{ 0x0000801c , 0x128d8027 , 0x128d804f , 0x12e00057 , 0x12e0002b },
- { 0x00008120 , 0x08f04800 , 0x08f04800 , 0x08f04810 , 0x08f04810 },
+ { 0x00008120 , 0x18f04800 , 0x18f04800 , 0x18f04810 , 0x18f04810 },
{ 0x000081d0 , 0x00003210 , 0x00003210 , 0x0000320a , 0x0000320a },
{ 0x00008318 , 0x00003e80 , 0x00007d00 , 0x00006880 , 0x00003440 },
};
@@ -1091,7 +1093,7 @@ static const u_int32_t ar9300_ar9580_1p0_mac_core[][2] = {
{ 0x00008258 , 0x00000000 },
{ 0x0000825c , 0x40000000 },
{ 0x00008260 , 0x00080922 },
- { 0x00008264 , 0x9bc00010 },
+ { 0x00008264 , 0x9d400010 },
{ 0x00008268 , 0xffffffff },
{ 0x0000826c , 0x0000ffff },
{ 0x00008270 , 0x00000000 },
@@ -2155,7 +2157,7 @@ static const u_int32_t ar9300_ar9580_1p0_baseband_postamble[][5] = {
{ 0x00009e10 , 0x7ec88d2e , 0x7ec88d2e , 0x7ec84d2e , 0x7ec84d2e },
{ 0x00009e14 , 0x37b95d5e , 0x37b9605e , 0x3379605e , 0x33795d5e },
{ 0x00009e18 , 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 },
- { 0x00009e1c , 0x0001cf9c , 0x0001cf9c , 0x00021f9c , 0x00021f9c },
+ { 0x00009e1c , 0x0001c59c , 0x0001c59c , 0x0002159c , 0x0002159c },
{ 0x00009e20 , 0x000003b5 , 0x000003b5 , 0x000003ce , 0x000003ce },
{ 0x00009e2c , 0x0000001c , 0x0000001c , 0x00000021 , 0x00000021 },
{ 0x00009e3c , 0xcf946220 , 0xcf946220 , 0xcf946222 , 0xcf946222 },
diff --git a/sys/contrib/dev/ral/microcode.h b/sys/contrib/dev/ral/microcode.h
index 9c9adc3..c7109d0 100644
--- a/sys/contrib/dev/ral/microcode.h
+++ b/sys/contrib/dev/ral/microcode.h
@@ -2268,24 +2268,24 @@ static const uint8_t rt2661[] = {
};
static const uint8_t rt2860[] = {
- 0x02, 0x03, 0x5b, 0x02, 0x02, 0xa6, 0x22, 0x22, 0xff, 0xff, 0xff,
+ 0x02, 0x02, 0xa3, 0x02, 0x02, 0x2e, 0x22, 0xff, 0xff, 0xff, 0xff,
0x02, 0x01, 0x2c, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x1e,
0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0xdd, 0xc0, 0xe0, 0xc0,
0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18, 0xc2,
0xaf, 0x30, 0x45, 0x03, 0x12, 0x10, 0x09, 0x90, 0x04, 0x16, 0xe0,
0x30, 0xe3, 0x03, 0x74, 0x08, 0xf0, 0x90, 0x04, 0x14, 0xe0, 0x20,
0xe7, 0x03, 0x02, 0x00, 0xcb, 0x74, 0x80, 0xf0, 0x90, 0x70, 0x12,
- 0xe0, 0xf5, 0x36, 0x90, 0x04, 0x04, 0xe0, 0x24, 0xcf, 0x60, 0x30,
+ 0xe0, 0xf5, 0x24, 0x90, 0x04, 0x04, 0xe0, 0x24, 0xcf, 0x60, 0x30,
0x14, 0x60, 0x42, 0x24, 0xe2, 0x60, 0x47, 0x14, 0x60, 0x55, 0x24,
0x21, 0x70, 0x60, 0xe5, 0x55, 0x24, 0xfe, 0x60, 0x07, 0x14, 0x60,
0x08, 0x24, 0x02, 0x70, 0x08, 0x7d, 0x01, 0x80, 0x28, 0x7d, 0x02,
- 0x80, 0x24, 0x90, 0x70, 0x10, 0xe0, 0xf5, 0x50, 0x85, 0x36, 0x40,
+ 0x80, 0x24, 0x90, 0x70, 0x10, 0xe0, 0xf5, 0x50, 0x85, 0x24, 0x40,
0xd2, 0x01, 0x80, 0x3e, 0xe5, 0x55, 0x64, 0x03, 0x60, 0x04, 0xe5,
- 0x55, 0x70, 0x04, 0x7d, 0x02, 0x80, 0x09, 0x85, 0x36, 0x41, 0xd2,
- 0x02, 0x80, 0x29, 0xad, 0x55, 0xaf, 0x36, 0x12, 0x02, 0x82, 0x80,
+ 0x55, 0x70, 0x04, 0x7d, 0x02, 0x80, 0x09, 0x85, 0x24, 0x41, 0xd2,
+ 0x02, 0x80, 0x29, 0xad, 0x55, 0xaf, 0x24, 0x12, 0x02, 0x0a, 0x80,
0x20, 0x90, 0x70, 0x10, 0xe0, 0xf5, 0x47, 0x90, 0x70, 0x11, 0xe0,
0xf5, 0x44, 0x12, 0x10, 0x25, 0x80, 0x06, 0x90, 0x70, 0x10, 0xe0,
- 0xf5, 0x45, 0xe4, 0xfd, 0xaf, 0x36, 0x12, 0x02, 0x82, 0xd2, 0x04,
+ 0xf5, 0x45, 0xe4, 0xfd, 0xaf, 0x24, 0x12, 0x02, 0x0a, 0xd2, 0x04,
0x90, 0x70, 0x13, 0xe4, 0xf0, 0x90, 0x70, 0x13, 0xe4, 0xf0, 0xd2,
0xaf, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0,
0x32, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0,
@@ -2302,54 +2302,54 @@ static const uint8_t rt2860[] = {
0x15, 0x50, 0x80, 0x02, 0xc2, 0x59, 0xd5, 0x53, 0x07, 0x30, 0x60,
0x04, 0x15, 0x46, 0xd2, 0x04, 0x30, 0x45, 0x03, 0x12, 0x10, 0x0f,
0xc2, 0x8d, 0xd2, 0xaf, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0,
- 0xf0, 0xd0, 0xe0, 0x32, 0x90, 0x70, 0x2a, 0xe0, 0x30, 0xe1, 0x43,
- 0xc2, 0xaf, 0x90, 0x70, 0x28, 0xe0, 0x90, 0x10, 0x1c, 0xf0, 0x90,
- 0x70, 0x29, 0xe0, 0x90, 0x10, 0x1d, 0xf0, 0x90, 0x70, 0x2a, 0xe0,
- 0x90, 0x10, 0x1e, 0xf0, 0x90, 0x10, 0x1c, 0xe0, 0xf5, 0x37, 0x90,
- 0x10, 0x1e, 0xe0, 0x20, 0xe1, 0xf3, 0x90, 0x10, 0x1c, 0xe0, 0x90,
- 0x70, 0x28, 0xf0, 0x90, 0x10, 0x1d, 0xe0, 0x90, 0x70, 0x29, 0xf0,
- 0x90, 0x10, 0x1e, 0xe0, 0x90, 0x70, 0x2a, 0xf0, 0xc2, 0x05, 0xd2,
- 0xaf, 0x22, 0x12, 0x02, 0xc8, 0x30, 0x45, 0x03, 0x12, 0x10, 0x03,
- 0x30, 0x01, 0x06, 0x20, 0x09, 0x03, 0x12, 0x10, 0x1c, 0x30, 0x02,
- 0x06, 0x20, 0x0a, 0x03, 0x12, 0x10, 0x1f, 0x30, 0x03, 0x06, 0x20,
- 0x0b, 0x03, 0x12, 0x10, 0x1f, 0x30, 0x04, 0x06, 0x20, 0x0c, 0x03,
- 0x12, 0x10, 0x22, 0x20, 0x13, 0x09, 0x20, 0x11, 0x06, 0xe5, 0x2b,
- 0x45, 0x2c, 0x60, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0xa9, 0x12,
- 0x03, 0x1c, 0x80, 0xbf, 0xc2, 0x43, 0xd2, 0x45, 0xe4, 0xf5, 0x20,
- 0xf5, 0x21, 0xf5, 0x53, 0xf5, 0x46, 0xf5, 0x2b, 0xf5, 0x2c, 0xc2,
- 0x42, 0xf5, 0x51, 0xf5, 0x52, 0xf5, 0x55, 0x90, 0x04, 0x18, 0x74,
- 0x80, 0xf0, 0x90, 0x04, 0x1a, 0x74, 0x08, 0xf0, 0xc2, 0x1a, 0xc2,
- 0x18, 0xc2, 0x1b, 0x22, 0xc8, 0xef, 0xc8, 0xe6, 0xfa, 0x08, 0xe6,
- 0x4a, 0x60, 0x0c, 0x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xa8, 0x05,
- 0x22, 0xef, 0x60, 0x03, 0x1f, 0x80, 0xfa, 0x22, 0xff, 0xc0, 0x26,
+ 0xf0, 0xd0, 0xe0, 0x32, 0x12, 0x02, 0x50, 0x30, 0x45, 0x03, 0x12,
+ 0x10, 0x03, 0x30, 0x01, 0x06, 0x20, 0x09, 0x03, 0x12, 0x10, 0x1c,
+ 0x30, 0x02, 0x06, 0x20, 0x0a, 0x03, 0x12, 0x10, 0x1f, 0x30, 0x03,
+ 0x06, 0x20, 0x0b, 0x03, 0x12, 0x10, 0x1f, 0x30, 0x04, 0x06, 0x20,
+ 0x0c, 0x03, 0x12, 0x10, 0x22, 0x20, 0x13, 0x09, 0x20, 0x11, 0x06,
+ 0xe5, 0x2b, 0x45, 0x2c, 0x60, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92,
+ 0xa9, 0x12, 0x02, 0x80, 0x80, 0xbf, 0xc2, 0x43, 0xd2, 0x45, 0xe4,
+ 0xf5, 0x20, 0xf5, 0x21, 0xf5, 0x53, 0xf5, 0x46, 0xf5, 0x2b, 0xf5,
+ 0x2c, 0xc2, 0x42, 0xf5, 0x51, 0xf5, 0x52, 0xf5, 0x55, 0x90, 0x04,
+ 0x18, 0x74, 0x80, 0xf0, 0x90, 0x04, 0x1a, 0x74, 0x08, 0xf0, 0x22,
+ 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01,
+ 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5,
+ 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef,
+ 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0xef, 0xf4, 0x60, 0x1f, 0xe4, 0xfe,
+ 0x12, 0x02, 0xaf, 0xe0, 0xb4, 0xff, 0x12, 0x12, 0x02, 0xaf, 0xef,
+ 0xf0, 0x74, 0x1c, 0x2e, 0x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, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x26,
0x74, 0x03, 0xc0, 0xe0, 0xc0, 0x82, 0xc0, 0x83, 0x75, 0x26, 0x0a,
0x22, 0xc0, 0x26, 0x74, 0x03, 0xc0, 0xe0, 0xc0, 0x82, 0xc0, 0x83,
- 0x75, 0x26, 0x18, 0x22, 0x30, 0x45, 0x03, 0x12, 0x10, 0x15, 0xe5,
- 0x20, 0x70, 0x03, 0x20, 0x10, 0x03, 0x30, 0x11, 0x03, 0x43, 0x87,
- 0x01, 0x22, 0xce, 0xef, 0xce, 0xee, 0x60, 0x08, 0x7f, 0xff, 0x12,
- 0x02, 0xf8, 0x1e, 0x80, 0xf5, 0x22, 0xc8, 0xef, 0xc8, 0xe6, 0x60,
- 0x03, 0x16, 0xc3, 0x22, 0xed, 0x14, 0xf6, 0xd3, 0x22, 0xc8, 0xef,
- 0xc8, 0xe6, 0x60, 0x06, 0x16, 0xe6, 0x24, 0xff, 0xb3, 0x22, 0xc3,
- 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x5f, 0x02,
- 0x01, 0xc5, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5,
- 0x83, 0x22, 0xef, 0x90, 0x03, 0x7b, 0x93, 0x90, 0x03, 0x00, 0x73,
- 0x0a, 0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x75, 0x26, 0x18, 0x22, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
@@ -2641,318 +2641,318 @@ static const uint8_t rt2860[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x10, 0x28, 0x02,
- 0x10, 0x3b, 0x02, 0x10, 0x3c, 0x02, 0x13, 0xbc, 0x02, 0x13, 0xbd,
- 0x02, 0x14, 0x72, 0x02, 0x14, 0x73, 0xc3, 0x22, 0xff, 0xff, 0x02,
- 0x19, 0x4a, 0x02, 0x1a, 0xf4, 0x02, 0x15, 0x6c, 0x02, 0x14, 0xa7,
- 0x30, 0x05, 0x06, 0x20, 0x0d, 0x03, 0x12, 0x01, 0x7a, 0x30, 0x06,
- 0x06, 0x20, 0x0e, 0x03, 0x12, 0x1c, 0x2e, 0x22, 0x22, 0x90, 0x04,
- 0x14, 0xe0, 0x20, 0xe7, 0x03, 0x02, 0x13, 0xbb, 0x90, 0x70, 0x12,
- 0xe0, 0xf5, 0x56, 0x90, 0x04, 0x04, 0xe0, 0x12, 0x02, 0x5c, 0x10,
- 0xfb, 0x30, 0x10, 0xd2, 0x31, 0x10, 0x93, 0x33, 0x10, 0xa1, 0x34,
- 0x10, 0xb4, 0x35, 0x10, 0xab, 0x36, 0x11, 0x09, 0x50, 0x11, 0x4e,
- 0x51, 0x11, 0x57, 0x52, 0x11, 0x57, 0x53, 0x11, 0x57, 0x54, 0x11,
- 0x93, 0x55, 0x11, 0xf0, 0x56, 0x12, 0x43, 0x70, 0x12, 0x69, 0x71,
- 0x12, 0x92, 0x72, 0x13, 0x3e, 0x73, 0x13, 0x61, 0x80, 0x13, 0x88,
- 0x83, 0x13, 0xa0, 0x84, 0x00, 0x00, 0x13, 0xbb, 0xd2, 0x18, 0xd2,
- 0x61, 0x75, 0x35, 0x2a, 0x75, 0x32, 0x0b, 0x75, 0x33, 0xb8, 0x22,
- 0xc2, 0x18, 0x90, 0x01, 0x14, 0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x90,
- 0x70, 0x11, 0xe0, 0xf5, 0x3c, 0x02, 0x13, 0xb5, 0xe5, 0x55, 0xb4,
+ 0x10, 0x32, 0x02, 0x10, 0x33, 0x02, 0x14, 0xc2, 0x02, 0x14, 0xc3,
+ 0x02, 0x15, 0x8f, 0x02, 0x15, 0x90, 0xc3, 0x22, 0xff, 0xff, 0x02,
+ 0x1a, 0x6f, 0x02, 0x1b, 0xec, 0x02, 0x16, 0xbc, 0x02, 0x15, 0xf7,
+ 0x30, 0x05, 0x06, 0x20, 0x0d, 0x03, 0x12, 0x1d, 0x19, 0x22, 0x22,
+ 0x90, 0x04, 0x14, 0xe0, 0x20, 0xe7, 0x03, 0x02, 0x14, 0xc1, 0x90,
+ 0x70, 0x12, 0xe0, 0xf5, 0x56, 0x90, 0x04, 0x04, 0xe0, 0x12, 0x01,
+ 0xe4, 0x10, 0xda, 0x30, 0x10, 0xb1, 0x31, 0x10, 0x93, 0x35, 0x10,
+ 0x8a, 0x36, 0x10, 0xe7, 0x40, 0x10, 0xfe, 0x41, 0x11, 0x15, 0x50,
+ 0x11, 0x5a, 0x51, 0x11, 0x63, 0x52, 0x11, 0x63, 0x53, 0x11, 0x63,
+ 0x54, 0x11, 0x9f, 0x55, 0x11, 0xfc, 0x56, 0x12, 0x4f, 0x64, 0x12,
+ 0x6a, 0x72, 0x13, 0x1e, 0x73, 0x13, 0x42, 0x74, 0x14, 0x35, 0x80,
+ 0x14, 0xa5, 0x83, 0x14, 0x5c, 0x91, 0x00, 0x00, 0x14, 0xc1, 0x90,
+ 0x70, 0x11, 0xe0, 0xf5, 0x3c, 0x02, 0x14, 0xbb, 0xe5, 0x55, 0xb4,
0x02, 0x0f, 0xe5, 0x58, 0x30, 0xe0, 0x06, 0x90, 0x01, 0x0d, 0x74,
0x08, 0xf0, 0x7d, 0x01, 0x80, 0x02, 0x7d, 0x02, 0xaf, 0x56, 0x12,
- 0x02, 0x82, 0x02, 0x13, 0xb5, 0x20, 0x02, 0x03, 0x30, 0x03, 0x0a,
- 0x7d, 0x02, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x02, 0x13, 0xb5, 0xe5,
- 0x34, 0xd3, 0x94, 0x01, 0x40, 0x0c, 0x90, 0x01, 0x0c, 0xe0, 0x44,
+ 0x02, 0x0a, 0x02, 0x14, 0xbb, 0x20, 0x02, 0x03, 0x30, 0x03, 0x0a,
+ 0x7d, 0x02, 0xaf, 0x56, 0x12, 0x02, 0x0a, 0x02, 0x14, 0xbb, 0xe5,
+ 0x30, 0xd3, 0x94, 0x01, 0x40, 0x0c, 0x90, 0x01, 0x0c, 0xe0, 0x44,
0x02, 0xf0, 0xa3, 0xe0, 0x44, 0x04, 0xf0, 0x85, 0x56, 0x41, 0xd2,
- 0x02, 0x22, 0x90, 0x70, 0x11, 0xe0, 0xf4, 0x70, 0x03, 0x02, 0x13,
- 0xbb, 0xe0, 0xf5, 0x30, 0x22, 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40,
- 0x07, 0xe5, 0x55, 0x60, 0x03, 0x02, 0x13, 0xbb, 0x90, 0x70, 0x10,
- 0xe0, 0x54, 0x7f, 0xff, 0xbf, 0x0a, 0x0d, 0x90, 0x70, 0x11, 0xe0,
- 0xb4, 0x08, 0x06, 0x75, 0x4e, 0x01, 0x75, 0x4f, 0x84, 0x90, 0x70,
- 0x10, 0xe0, 0x54, 0x7f, 0xff, 0xbf, 0x02, 0x12, 0x90, 0x70, 0x11,
- 0xe0, 0x64, 0x08, 0x60, 0x04, 0xe0, 0xb4, 0x20, 0x06, 0x75, 0x4e,
- 0x03, 0x75, 0x4f, 0x20, 0xe4, 0xf5, 0x27, 0x22, 0x90, 0x70, 0x11,
- 0xe0, 0x24, 0xff, 0x92, 0x47, 0x22, 0xe5, 0x34, 0xd3, 0x94, 0x01,
- 0x40, 0x07, 0xe5, 0x55, 0x60, 0x03, 0x02, 0x13, 0x49, 0x90, 0x04,
- 0x04, 0xe0, 0x25, 0xe0, 0x24, 0x5d, 0xf5, 0x57, 0x90, 0x70, 0x10,
- 0xe0, 0xff, 0x74, 0x47, 0x25, 0x57, 0xf8, 0xc6, 0xef, 0xc6, 0x90,
- 0x70, 0x11, 0xe0, 0xff, 0x74, 0x48, 0x25, 0x57, 0xf8, 0xc6, 0xef,
- 0xc6, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x02, 0x13, 0xb5,
- 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40, 0x07, 0xe5, 0x55, 0x60, 0x03,
- 0x02, 0x13, 0x49, 0xe5, 0x47, 0x64, 0x07, 0x60, 0x1d, 0xe5, 0x47,
- 0x64, 0x08, 0x60, 0x17, 0xe5, 0x47, 0x64, 0x09, 0x60, 0x11, 0xe5,
- 0x47, 0x64, 0x0a, 0x60, 0x0b, 0xe5, 0x47, 0x64, 0x0b, 0x60, 0x05,
- 0xe5, 0x47, 0xb4, 0x0c, 0x08, 0x90, 0x70, 0x11, 0xe0, 0x54, 0x0f,
- 0xf5, 0x3a, 0xe5, 0x47, 0xb4, 0x09, 0x08, 0xe5, 0x3a, 0xb4, 0x03,
- 0x03, 0xe4, 0xf5, 0x46, 0xe5, 0x47, 0xb4, 0x0a, 0x08, 0xe5, 0x3a,
- 0xb4, 0x01, 0x03, 0xe4, 0xf5, 0x46, 0xe4, 0xfd, 0xaf, 0x56, 0x12,
- 0x02, 0x82, 0xd2, 0x04, 0x22, 0x90, 0x70, 0x11, 0xe0, 0xf4, 0xff,
- 0x90, 0x70, 0x10, 0xe0, 0x5f, 0xff, 0x90, 0x70, 0x11, 0xe0, 0x55,
- 0x27, 0x4f, 0x90, 0x70, 0x18, 0xf0, 0x90, 0x70, 0x11, 0xe0, 0x90,
- 0x70, 0x19, 0xf0, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x30,
- 0x15, 0x03, 0xd2, 0x14, 0x22, 0x90, 0x70, 0x18, 0xe0, 0xf5, 0x27,
- 0x90, 0x02, 0x29, 0xe0, 0xff, 0x90, 0x70, 0x19, 0xe0, 0xfe, 0xef,
- 0x5e, 0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80,
- 0x04, 0xe5, 0x27, 0xf4, 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, 0x22,
- 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40, 0x07, 0xe5, 0x55, 0x60, 0x03,
- 0x02, 0x13, 0x49, 0x90, 0x70, 0x10, 0xe0, 0xfe, 0x90, 0x70, 0x11,
- 0xe0, 0xfd, 0xed, 0xf8, 0xe6, 0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12,
- 0x02, 0x82, 0x02, 0x13, 0xb5, 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40,
- 0x07, 0xe5, 0x55, 0x60, 0x03, 0x02, 0x13, 0x49, 0x90, 0x70, 0x10,
- 0xe0, 0xfe, 0x90, 0x70, 0x11, 0xe0, 0xfd, 0xed, 0xf5, 0x82, 0x8e,
- 0x83, 0xe0, 0xf5, 0x57, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x02,
- 0x13, 0xb5, 0x90, 0x10, 0x00, 0xe0, 0xf5, 0x57, 0xe4, 0xf5, 0x58,
- 0xf5, 0x59, 0x90, 0x10, 0x03, 0xe0, 0xb4, 0x28, 0x05, 0x75, 0x58,
- 0x01, 0x80, 0x3c, 0x90, 0x10, 0x03, 0xe0, 0xb4, 0x30, 0x05, 0x75,
- 0x58, 0x02, 0x80, 0x30, 0x90, 0x10, 0x03, 0xe0, 0xb4, 0x33, 0x05,
- 0x75, 0x58, 0x04, 0x80, 0x24, 0x90, 0x10, 0x03, 0xe0, 0xb4, 0x35,
- 0x0c, 0x90, 0x10, 0x02, 0xe0, 0xb4, 0x72, 0x05, 0x75, 0x58, 0x08,
- 0x80, 0x11, 0x90, 0x10, 0x03, 0xe0, 0xb4, 0x35, 0x0a, 0x90, 0x10,
- 0x02, 0xe0, 0xb4, 0x93, 0x03, 0x75, 0x58, 0x10, 0xe5, 0x58, 0x30,
- 0xe1, 0x19, 0x90, 0x05, 0x08, 0xe0, 0x44, 0x01, 0xf0, 0xfd, 0x90,
- 0x05, 0x05, 0xe0, 0x54, 0xfb, 0xf0, 0x44, 0x04, 0xf0, 0xed, 0x54,
- 0xfe, 0x90, 0x05, 0x08, 0xf0, 0xe4, 0xf5, 0x4e, 0xf5, 0x4f, 0x75,
- 0x3a, 0xff, 0xc2, 0x1a, 0xc2, 0x18, 0xc2, 0x1b, 0xf5, 0x34, 0x90,
- 0x05, 0xa4, 0x74, 0x11, 0xf0, 0xa3, 0x74, 0xff, 0xf0, 0xa3, 0x74,
- 0x03, 0xf0, 0xe4, 0xf5, 0x30, 0xc2, 0x19, 0x90, 0x01, 0x0d, 0xe0,
- 0x44, 0x40, 0xf0, 0x75, 0x3c, 0xff, 0xad, 0x57, 0xaf, 0x56, 0x12,
- 0x02, 0x82, 0xe4, 0x90, 0x70, 0x32, 0xf0, 0x80, 0x77, 0xe5, 0x34,
- 0xd3, 0x94, 0x01, 0x40, 0x0b, 0xe5, 0x55, 0x60, 0x07, 0x7d, 0x03,
- 0xaf, 0x56, 0x02, 0x02, 0x82, 0x90, 0x70, 0x10, 0xe0, 0x24, 0xff,
- 0x92, 0x93, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x80, 0x54,
- 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40, 0x0d, 0xe5, 0x55, 0x60, 0x09,
- 0x7d, 0x03, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x80, 0x40, 0x90, 0x70,
- 0x10, 0xe0, 0x24, 0xff, 0x92, 0x4a, 0xd2, 0x05, 0xad, 0x57, 0xaf,
- 0x56, 0x12, 0x02, 0x82, 0x80, 0x2d, 0xe4, 0xf5, 0x34, 0xf5, 0x30,
- 0x90, 0x70, 0x10, 0xe0, 0xf4, 0x60, 0x03, 0xe0, 0xf5, 0x34, 0xad,
- 0x57, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x80, 0x15, 0xd2, 0x19, 0x05,
- 0x2f, 0xe5, 0x2f, 0xb4, 0x1a, 0x03, 0xe4, 0xf5, 0x2f, 0xd2, 0x04,
- 0xad, 0x57, 0xaf, 0x56, 0x12, 0x02, 0x82, 0x90, 0x04, 0x14, 0x74,
- 0x80, 0xf0, 0x22, 0x22, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40, 0x17,
- 0xe5, 0x55, 0xb4, 0x02, 0x12, 0xe5, 0x30, 0x60, 0x0e, 0x30, 0x60,
- 0x0b, 0x74, 0xfd, 0x25, 0x46, 0xf5, 0x46, 0xd2, 0x04, 0xe4, 0xf5,
- 0x53, 0xe5, 0x53, 0x60, 0x03, 0x02, 0x14, 0x71, 0x30, 0x60, 0x21,
- 0xb2, 0x4d, 0x30, 0x4d, 0x1c, 0xe5, 0x34, 0xc3, 0x94, 0x03, 0x40,
- 0x11, 0xe5, 0x55, 0xb4, 0x02, 0x0c, 0xe5, 0x30, 0x60, 0x08, 0x74,
- 0x03, 0x25, 0x46, 0xf5, 0x46, 0x80, 0x02, 0x05, 0x46, 0xc2, 0x04,
- 0xe5, 0x4f, 0x45, 0x4e, 0x60, 0x08, 0xe5, 0x4f, 0x15, 0x4f, 0x70,
- 0x02, 0x15, 0x4e, 0x30, 0x1a, 0x49, 0x7f, 0x32, 0x7d, 0xb8, 0x7c,
- 0x0b, 0x12, 0x02, 0x35, 0x50, 0x06, 0x90, 0x04, 0x10, 0x74, 0x40,
- 0xf0, 0x7f, 0x35, 0x7d, 0x32, 0x12, 0x03, 0x3f, 0x50, 0x09, 0x90,
- 0x10, 0x04, 0xe0, 0x54, 0xf7, 0xf0, 0xd2, 0x06, 0xe5, 0x35, 0xd3,
- 0x94, 0x2d, 0x40, 0x30, 0x30, 0x1b, 0x2d, 0xc2, 0x1b, 0xa2, 0x18,
- 0x92, 0x1a, 0x20, 0x1a, 0x24, 0x90, 0x04, 0x09, 0xe0, 0x54, 0xdd,
- 0xf0, 0x90, 0x10, 0x04, 0xe0, 0x44, 0x08, 0xf0, 0xc2, 0x61, 0xd2,
- 0x03, 0x22, 0xe4, 0xf5, 0x35, 0xa2, 0x18, 0x92, 0x1a, 0x30, 0x1a,
- 0x07, 0x90, 0x04, 0x09, 0xe0, 0x44, 0x22, 0xf0, 0x22, 0x22, 0x30,
- 0x14, 0x30, 0x90, 0x70, 0x19, 0xe0, 0x55, 0x27, 0xff, 0x90, 0x70,
- 0x18, 0xe0, 0x4f, 0xf5, 0x27, 0x90, 0x02, 0x29, 0xe0, 0xff, 0x90,
- 0x70, 0x19, 0xe0, 0xfe, 0xef, 0x5e, 0x90, 0x02, 0x29, 0xf0, 0x30,
- 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, 0x27, 0xf4, 0xff, 0x90,
- 0x02, 0x28, 0xef, 0xf0, 0xc2, 0x14, 0x22, 0xc2, 0x4b, 0xc2, 0x4c,
- 0xe5, 0x44, 0x12, 0x02, 0x5c, 0x14, 0xc9, 0x00, 0x15, 0x57, 0x04,
- 0x15, 0x53, 0x08, 0x15, 0x33, 0x10, 0x14, 0xdd, 0x20, 0x14, 0xfd,
- 0x60, 0x15, 0x0e, 0xa0, 0x00, 0x00, 0x15, 0x59, 0x85, 0x48, 0x43,
- 0x85, 0x4a, 0x42, 0x85, 0x4c, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x60,
- 0x03, 0x02, 0x15, 0x59, 0x80, 0x1b, 0xe5, 0x48, 0xc4, 0x54, 0x0f,
- 0xf5, 0x43, 0xe5, 0x4a, 0xc4, 0x54, 0x0f, 0xf5, 0x42, 0xe5, 0x4c,
- 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x61,
- 0x53, 0x43, 0x0f, 0x80, 0x5c, 0x85, 0x49, 0x43, 0x85, 0x4b, 0x42,
- 0x85, 0x4d, 0x5e, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x4d, 0x80, 0x1b,
- 0xe5, 0x49, 0xc4, 0x54, 0x0f, 0xf5, 0x43, 0xe5, 0x4b, 0xc4, 0x54,
- 0x0f, 0xf5, 0x42, 0xe5, 0x4d, 0xc4, 0x54, 0x0f, 0xf5, 0x5e, 0xe5,
- 0x47, 0x64, 0x06, 0x70, 0x30, 0xe5, 0x43, 0x54, 0x0f, 0x44, 0x10,
- 0xf5, 0x43, 0x80, 0x26, 0xe5, 0x47, 0x64, 0x04, 0x60, 0x05, 0xe5,
- 0x47, 0xb4, 0x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a, 0xb4, 0x01, 0x03, 0xe4, 0xf5, 0x46, 0xe4, 0xfd, 0xaf, 0x56,
+ 0x12, 0x02, 0x0a, 0xd2, 0x04, 0x22, 0x90, 0x70, 0x11, 0xe0, 0xf4,
+ 0xff, 0x90, 0x70, 0x10, 0xe0, 0x5f, 0xff, 0x90, 0x70, 0x11, 0xe0,
+ 0x55, 0x3f, 0x4f, 0x90, 0x70, 0x18, 0xf0, 0x90, 0x70, 0x11, 0xe0,
+ 0x90, 0x70, 0x19, 0xf0, 0xe4, 0xfd, 0xaf, 0x56, 0x12, 0x02, 0x0a,
+ 0x30, 0x15, 0x03, 0xd2, 0x14, 0x22, 0x90, 0x70, 0x18, 0xe0, 0xf5,
+ 0x3f, 0x90, 0x02, 0x29, 0xe0, 0xff, 0x90, 0x70, 0x19, 0xe0, 0xfe,
+ 0xef, 0x5e, 0x90, 0x02, 0x29, 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x3f,
+ 0x80, 0x04, 0xe5, 0x3f, 0xf4, 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0,
+ 0x22, 0x90, 0x70, 0x10, 0xe0, 0x24, 0xff, 0x92, 0x1a, 0x75, 0x32,
+ 0x03, 0x75, 0x33, 0x1f, 0xe4, 0xf5, 0x31, 0xad, 0x57, 0xaf, 0x56,
+ 0x12, 0x02, 0x0a, 0x02, 0x14, 0xbb, 0x90, 0x10, 0x00, 0xe0, 0xf5,
+ 0x57, 0xe4, 0xf5, 0x58, 0xf5, 0x59, 0x90, 0x10, 0x03, 0xe0, 0xb4,
+ 0x28, 0x05, 0x75, 0x58, 0x01, 0x80, 0x3c, 0x90, 0x10, 0x03, 0xe0,
+ 0xb4, 0x30, 0x05, 0x75, 0x58, 0x02, 0x80, 0x30, 0x90, 0x10, 0x03,
+ 0xe0, 0xb4, 0x33, 0x05, 0x75, 0x58, 0x04, 0x80, 0x24, 0x90, 0x10,
+ 0x03, 0xe0, 0xb4, 0x35, 0x0c, 0x90, 0x10, 0x02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57, 0xe0, 0x54, 0x80, 0x90, 0x70, 0x32, 0xf0, 0x90, 0x70,
+ 0x10, 0xe0, 0xff, 0xe5, 0x57, 0xd3, 0x9f, 0x40, 0x43, 0x90, 0x70,
+ 0x33, 0xe5, 0x57, 0xf0, 0x90, 0x70, 0x10, 0xe0, 0xff, 0x90, 0x70,
+ 0x33, 0xe0, 0xc3, 0x9f, 0xd3, 0x94, 0x04, 0x40, 0x73, 0xe0, 0x24,
+ 0xfc, 0xf0, 0xe0, 0xff, 0x90, 0x70, 0x32, 0xe0, 0x4f, 0x90, 0x05,
+ 0x00, 0xf0, 0xe5, 0x58, 0x54, 0x0f, 0x60, 0x04, 0x7f, 0x17, 0x80,
+ 0x02, 0x7f, 0x11, 0x90, 0x05, 0x01, 0xef, 0xf0, 0xa3, 0x74, 0x01,
+ 0xf0, 0x74, 0x03, 0xf0, 0xff, 0x12, 0x02, 0x94, 0x80, 0xc3, 0x90,
+ 0x70, 0x33, 0xe5, 0x57, 0xf0, 0x90, 0x70, 0x33, 0xe0, 0xff, 0x90,
+ 0x70, 0x10, 0xe0, 0xc3, 0x9f, 0xd3, 0x94, 0x04, 0x40, 0x30, 0x90,
+ 0x70, 0x33, 0xe0, 0x24, 0x04, 0xf0, 0xe0, 0xff, 0x90, 0x70, 0x32,
+ 0xe0, 0x4f, 0x90, 0x05, 0x00, 0xf0, 0xe5, 0x58, 0x54, 0x0f, 0x60,
+ 0x04, 0x7f, 0x17, 0x80, 0x02, 0x7f, 0x11, 0x90, 0x05, 0x01, 0xef,
+ 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0x74, 0x03, 0xf0, 0xff, 0x12, 0x02,
+ 0x94, 0x80, 0xc0, 0x90, 0x70, 0x10, 0xe0, 0xff, 0x90, 0x70, 0x32,
+ 0xe0, 0x4f, 0x90, 0x05, 0x00, 0xf0, 0xe5, 0x58, 0x54, 0x0f, 0x60,
+ 0x04, 0x7f, 0x17, 0x80, 0x02, 0x7f, 0x11, 0x90, 0x05,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, 0x7f, 0x00, 0xe5, 0x46, 0x54, 0xf0, 0xfe, 0xbe, 0xf0, 0x04,
- 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0xee, 0x6f, 0x24, 0xff, 0x92,
- 0x71, 0x92, 0x70, 0x90, 0x10, 0x00, 0xe0, 0x90, 0x10, 0x2c, 0xf0,
- 0x90, 0x10, 0x03, 0xe0, 0xc3, 0x94, 0x30, 0x40, 0x14, 0xa2, 0x71,
- 0x92, 0x77, 0xa2, 0x70, 0x92, 0x76, 0xe5, 0x2e, 0x13, 0x13, 0x54,
- 0x3f, 0xf5, 0x2e, 0xc2, 0x77, 0xd2, 0x76, 0x90, 0x10, 0x2f, 0xe5,
- 0x2e, 0xf0, 0xe5, 0x47, 0x64, 0x06, 0x70, 0x39, 0x90, 0x02, 0x29,
- 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x43, 0xc4, 0x54, 0x0f, 0x14, 0x60,
- 0x0c, 0x24, 0xfe, 0x60, 0x0c, 0x24, 0x03, 0x70, 0x13, 0xc2, 0x38,
- 0x80, 0x0f, 0xd2, 0x38, 0x80, 0x0b, 0xe5, 0x46, 0x30, 0xe2, 0x03,
- 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x38, 0x30, 0x47, 0x05, 0xaf, 0x27,
- 0x02, 0x19, 0x0f, 0xe5, 0x27, 0xf4, 0xff, 0x02, 0x19, 0x0f, 0xe5,
- 0x47, 0x64, 0x07, 0x60, 0x0f, 0xe5, 0x47, 0x64, 0x08, 0x60, 0x09,
- 0xe5, 0x47, 0x64, 0x09, 0x60, 0x03, 0x02, 0x18, 0x8e, 0x90, 0x02,
- 0x29, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x22, 0x14,
- 0x60, 0x25, 0x14, 0x60, 0x2d, 0x24, 0xfc, 0x60, 0x49, 0x24, 0xf9,
- 0x60, 0x14, 0x24, 0x0e, 0x70, 0x50, 0xe5, 0x46, 0x13, 0x13, 0x54,
- 0x3f, 0x75, 0xf0, 0x03, 0x84, 0xe5, 0xf0, 0x24, 0xff, 0x80, 0x3a,
- 0xd2, 0x39, 0xc2, 0x38, 0x80, 0x3e, 0xe5, 0x46, 0x30, 0xe2, 0x03,
- 0xd3, 0x80, 0x1d, 0xc3, 0x80, 0x1a, 0xe5, 0x46, 0x30, 0xe2, 0x0d,
- 0x54, 0x38, 0xc3, 0x94, 0x30, 0x50, 0x06, 0x7e, 0x00, 0x7f, 0x01,
- 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0xee, 0x4f, 0x24, 0xff, 0x92,
- 0x38, 0xc2, 0x39, 0x80, 0x13, 0xe5, 0x46, 0x30, 0xe2, 0x03, 0xd3,
- 0x80, 0x01, 0xc3, 0x92, 0x39, 0xc2, 0x38, 0x80, 0x04, 0xc2, 0x38,
- 0xc2, 0x39, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, 0x27,
- 0xf4, 0xff, 0x02, 0x19, 0x0f, 0xe5, 0x47, 0x64, 0x0c, 0x60, 0x06,
- 0xe5, 0x47, 0x64, 0x0b, 0x70, 0x7a, 0x90, 0x02, 0x29, 0xe0, 0x54,
- 0xfd, 0xf0, 0xe5, 0x3a, 0x14, 0x60, 0x20, 0x14, 0x60, 0x21, 0x14,
- 0x60, 0x2b, 0x24, 0xfc, 0x60, 0x45, 0x24, 0xf9, 0x60, 0x12, 0x24,
- 0x0e, 0x70, 0x4a, 0xe5, 0x46, 0x13, 0x13, 0x54, 0x3f, 0x75, 0xf0,
- 0x03, 0x84, 0xe5, 0xf0, 0x80, 0x29, 0xd2, 0x39, 0x80, 0x3a, 0xe5,
- 0x46, 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x39, 0x80,
- 0x2d, 0xe5, 0x46, 0x30, 0xe2, 0x0d, 0x54, 0x38, 0xc3, 0x94, 0x30,
- 0x50, 0x06, 0x7e, 0x00, 0x7f, 0x01, 0x80, 0x04, 0x7e, 0x00, 0x7f,
- 0x00, 0xee, 0x4f, 0x24, 0xff, 0x92, 0x39, 0x80, 0x0f, 0xe5, 0x46,
- 0x30, 0xe2, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x39, 0x80, 0x02,
- 0xc2, 0x39, 0x30, 0x47, 0x04, 0xaf, 0x27, 0x80, 0x04, 0xe5, 0x27,
- 0xf4, 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, 0x22, 0xe5, 0x47, 0xb4,
- 0x0b, 0x10, 0x90, 0x02, 0x29, 0xe0, 0x54, 0xeb, 0xf0, 0xe5, 0x27,
- 0x54, 0xeb, 0x45, 0x45, 0xf5, 0x27, 0x22, 0xe4, 0x90, 0x02, 0x29,
- 0xf0, 0x30, 0x47, 0x04, 0xaf, 0x45, 0x80, 0x04, 0xe5, 0x45, 0xf4,
- 0xff, 0x90, 0x02, 0x28, 0xef, 0xf0, 0x22, 0x8f, 0x50, 0xd2, 0x59,
- 0x22, 0x8f, 0x54, 0xd2, 0x58, 0x22, 0xe4, 0xf5, 0x37, 0xc2, 0xaf,
- 0xe5, 0x51, 0x14, 0x60, 0x4a, 0x14, 0x60, 0x6b, 0x24, 0x02, 0x60,
- 0x03, 0x02, 0x1a, 0xd5, 0xd2, 0x59, 0x75, 0x55, 0x01, 0x20, 0x1a,
- 0x1c, 0x90, 0x02, 0x08, 0xe0, 0x54, 0xfe, 0xf0, 0xe0, 0x20, 0xe1,
- 0x23, 0x90, 0x04, 0x34, 0xe0, 0xb4, 0x02, 0x1c, 0xa3, 0xe0, 0xb4,
- 0x02, 0x17, 0xa3, 0xe0, 0xb4, 0x02, 0x12, 0x7f, 0x20, 0x12, 0x19,
- 0x40, 0x90, 0x10, 0x04, 0xe0, 0x54, 0xf3, 0xf0, 0x75, 0x51, 0x01,
- 0x02, 0x1a, 0xd5, 0xe5, 0x50, 0x70, 0x06, 0x75, 0x37, 0x03, 0x02,
- 0x1a, 0xd5, 0x90, 0x12, 0x00, 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 0xe0, 0x90,
+ 0xf0, 0x7f, 0x01, 0x12, 0x02, 0x94, 0x90, 0x13, 0x28, 0xe0, 0x90,
0x70, 0x1a, 0xf0, 0x90, 0x13, 0x29, 0xe0, 0x90, 0x70, 0x1b, 0xf0,
0x90, 0x13, 0x2b, 0xe0, 0x90, 0x70, 0x22, 0xf0, 0x90, 0x13, 0x28,
0xe0, 0x54, 0xf0, 0xf0, 0xa3, 0xe0, 0x54, 0xf0, 0xf0, 0x90, 0x13,
0x2b, 0xe0, 0x54, 0xcc, 0xf0, 0xe5, 0x58, 0x30, 0xe3, 0x17, 0xe5,
- 0x34, 0x70, 0x13, 0xe5, 0x3c, 0xf4, 0x90, 0x13, 0x2a, 0x60, 0x05,
+ 0x30, 0x70, 0x13, 0xe5, 0x3c, 0xf4, 0x90, 0x13, 0x2a, 0x60, 0x05,
0xe0, 0x54, 0xf3, 0x80, 0x11, 0xe0, 0x54, 0xfb, 0xf0, 0x80, 0x14,
0xe5, 0x3c, 0xf4, 0x90, 0x13, 0x2a, 0x60, 0x08, 0xe0, 0x54, 0xf2,
- 0x45, 0x3c, 0xf0, 0x80, 0x04, 0xe0, 0x54, 0xfa, 0xf0, 0x20, 0x1a,
- 0x07, 0x90, 0x04, 0x01, 0xe0, 0x44, 0x10, 0xf0, 0xe5, 0x34, 0xd3,
- 0x94, 0x01, 0x40, 0x09, 0xe5, 0x30, 0x70, 0x05, 0x75, 0x8c, 0x40,
- 0x80, 0x03, 0x75, 0x8c, 0x80, 0x90, 0x04, 0x01, 0xe0, 0x54, 0xfd,
- 0xf0, 0x20, 0x1a, 0x07, 0x90, 0x12, 0x04, 0xe0, 0x44, 0x04, 0xf0,
- 0xe5, 0x58, 0x30, 0xe0, 0x06, 0x90, 0x01, 0x0d, 0xe0, 0xf5, 0x31,
- 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40, 0x2c, 0x90, 0x01, 0x0d, 0xe0,
- 0x44, 0x01, 0xf0, 0xe5, 0x58, 0x20, 0xe3, 0x0c, 0xe5, 0x34, 0xb4,
- 0x03, 0x07, 0x90, 0x12, 0x04, 0xe0, 0x54, 0xfd, 0xf0, 0x20, 0x02,
- 0x11, 0x20, 0x03, 0x0e, 0x90, 0x01, 0x0d, 0xe0, 0x54, 0xfb, 0xf0,
- 0x90, 0x01, 0x0c, 0xe0, 0x54, 0xfd, 0xf0, 0x75, 0x37, 0x01, 0x75,
- 0x55, 0x02, 0xe4, 0xf5, 0x51, 0x80, 0x09, 0xe5, 0x50, 0x70, 0x05,
- 0x75, 0x37, 0x03, 0xf5, 0x51, 0xe5, 0x37, 0x60, 0x18, 0xc2, 0x01,
- 0xe4, 0xf5, 0x51, 0xc2, 0x59, 0x20, 0x1a, 0x0e, 0xad, 0x37, 0xaf,
- 0x40, 0x12, 0x1b, 0xfa, 0xe5, 0x37, 0xb4, 0x03, 0x02, 0xd2, 0x03,
- 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0x30, 0x01, 0x0e, 0xe4, 0xf5, 0x51,
- 0xc2, 0x59, 0xc2, 0x01, 0x7d, 0x02, 0xaf, 0x40, 0x12, 0x1b, 0xfa,
- 0xe5, 0x52, 0x14, 0x60, 0x56, 0x14, 0x60, 0x33, 0x24, 0x02, 0x60,
- 0x03, 0x02, 0x1b, 0xf7, 0xe5, 0x34, 0xd3, 0x94, 0x01, 0x40, 0x1f,
- 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x02, 0xf0, 0xa3, 0xe0, 0x44, 0x04,
- 0xf0, 0x90, 0x12, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x32, 0x12,
- 0x03, 0x30, 0x90, 0x01, 0x0d, 0xe0, 0x54, 0xfe, 0xf0, 0x75, 0x52,
- 0x02, 0x75, 0x55, 0x03, 0xe5, 0x58, 0x30, 0xe0, 0x06, 0x90, 0x01,
- 0x0d, 0xe5, 0x31, 0xf0, 0x90, 0x12, 0x04, 0xe0, 0x54, 0xfb, 0xf0,
- 0x7f, 0x20, 0x12,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1c, 0xe2, 0xe5,
+ 0x30, 0xd3, 0x94, 0x01, 0x40, 0x11, 0x90, 0x01, 0x0c, 0xe0, 0x44,
+ 0x02, 0xf0, 0xa3, 0xe0, 0x44, 0x04, 0xf0, 0x7f, 0x0a, 0x12, 0x02,
+ 0x94, 0x75, 0x52, 0x02, 0x75, 0x55, 0x03, 0xe5, 0x58, 0x30, 0xe0,
+ 0x06, 0x90, 0x01, 0x0d, 0xe5, 0x2f, 0xf0, 0x90, 0x12, 0x04, 0xe0,
+ 0x54, 0xfb, 0xf0, 0x7f, 0x20, 0x12, 0x1a, 0x6a, 0x75, 0x52, 0x01,
+ 0x75, 0x55, 0x03, 0x02, 0x1c, 0xe2, 0xe5, 0x54, 0x60, 0x03, 0x02,
+ 0x1c, 0xe2, 0x90, 0x04, 0x01, 0xe0, 0x44, 0x0e, 0xf0, 0xe0, 0x54,
0xef, 0xf0, 0xe4, 0xf5, 0x8c, 0xe5, 0x58, 0x54, 0x18, 0x60, 0x1e,
0x90, 0x70, 0x1a, 0xe0, 0x90, 0x13, 0x28, 0xf0, 0x90, 0x70, 0x1b,
0xe0, 0x90, 0x13, 0x29, 0xf0, 0xa3, 0x74, 0x05, 0xf0, 0x90, 0x70,
0x22, 0xe0, 0x90, 0x13, 0x2b, 0xf0, 0x80, 0x11, 0x90, 0x13, 0x28,
0xe0, 0x44, 0x0f, 0xf0, 0xa3, 0xe0, 0x44, 0x0f, 0xf0, 0xa3, 0xe0,
0x44, 0x05, 0xf0, 0x90, 0x12, 0x04, 0x74, 0x03, 0xf0, 0xe5, 0x58,
- 0x30, 0xe3, 0x16, 0x90, 0x05, 0x00, 0x74, 0xe2, 0xf0, 0xa3, 0x74,
- 0x08, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0x74, 0x03, 0xf0, 0x7f, 0x01,
- 0x12, 0x03, 0x30, 0x20, 0x1a, 0x07, 0x90, 0x02, 0x08, 0xe0, 0x44,
- 0x05, 0xf0, 0x90, 0x10, 0x04, 0xe0, 0x44, 0x0c, 0xf0, 0xe4, 0xf5,
- 0x52, 0xf5, 0x55, 0x30, 0x02, 0x09, 0xc2, 0x02, 0x7d, 0x01, 0xaf,
- 0x41, 0x12, 0x1b, 0xfa, 0x30, 0x03, 0x02, 0xc2, 0x03, 0xd2, 0xaf,
- 0x22, 0xef, 0xf4, 0x60, 0x2d, 0xe4, 0xfe, 0x74, 0x14, 0x2e, 0xf5,
- 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xe0, 0xb4, 0xff, 0x19, 0x74,
- 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xef, 0xf0,
- 0x74, 0x1c, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xed,
- 0xf0, 0x22, 0x0e, 0xbe, 0x04, 0xd5, 0x22, 0x22, 0x22, 0x30, 0x1a,
- 0x77, 0x90, 0x04, 0x37, 0xe0, 0x20, 0xe5, 0x6c, 0x90, 0x04, 0x28,
- 0xe0, 0xf5, 0x38, 0xa3, 0xe0, 0xf5, 0x37, 0xf5, 0x39, 0xe4, 0xf5,
- 0x25, 0xe5, 0x39, 0x75, 0xf0, 0x80, 0xa4, 0x24, 0x00, 0xff, 0xe5,
- 0xf0, 0x34, 0x80, 0xfe, 0xe5, 0x37, 0x65, 0x39, 0x70, 0x05, 0xfc,
- 0x7d, 0x28, 0x80, 0x04, 0x7c, 0x00, 0x7d, 0x00, 0xef, 0x2d, 0xff,
- 0xee, 0x3c, 0xfe, 0x12, 0x1c, 0xa9, 0x50, 0x07, 0x90, 0x01, 0x14,
- 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x39, 0x65, 0x38, 0x60, 0x10, 0xe4,
- 0x25, 0x39, 0xff, 0xe4, 0x34, 0x80, 0x8f, 0x82, 0xf5, 0x83, 0xe0,
- 0xf5, 0x39, 0x80, 0xbb, 0x90, 0x04, 0x10, 0x74, 0x01, 0xf0, 0x90,
- 0x04, 0x28, 0xe5, 0x38, 0xf0, 0xa3, 0xe5, 0x37, 0xf0, 0x90, 0x04,
- 0x11, 0x74, 0x01, 0xf0, 0x80, 0x8d, 0xc2, 0x06, 0xd2, 0x1b, 0x22,
- 0xe5, 0x25, 0xc3, 0x94, 0x06, 0x50, 0x19, 0x8f, 0x82, 0x8e, 0x83,
- 0xe0, 0xb4, 0xff, 0x07, 0x05, 0x25, 0xe4, 0xf5, 0x24, 0x80, 0x2e,
- 0xe4, 0xf5, 0x25, 0x8f, 0x82, 0x8e, 0x83, 0xf0, 0x80, 0x24, 0xe5,
- 0x24, 0x75, 0xf0, 0x06, 0x84, 0x74, 0x08, 0x25, 0xf0, 0xf5, 0x82,
- 0xe4, 0x34, 0x10, 0xf5, 0x83, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83,
- 0xe0, 0x6d, 0x70, 0x06, 0x05, 0x25, 0x05, 0x24, 0x80, 0x03, 0xe4,
- 0xf5, 0x25, 0x0f, 0xbf, 0x00, 0x01, 0x0e, 0xef, 0x54, 0x7f, 0x60,
- 0x07, 0xe5, 0x25, 0xc3, 0x94, 0x2a, 0x40, 0xab, 0xe5, 0x25, 0xb4,
- 0x2a, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x22, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x30, 0xe3, 0x1d, 0x90, 0x00, 0x02, 0xe0, 0x30, 0xe0, 0x16, 0x90,
+ 0x05, 0x00, 0x74, 0xe2, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0xa3, 0x74,
+ 0x01, 0xf0, 0x74, 0x03, 0xf0, 0x7f, 0x01, 0x12, 0x02, 0x94, 0x90,
+ 0x02, 0x08, 0xe0, 0x44, 0x05, 0xf0, 0x90, 0x10, 0x04, 0xe0, 0x44,
+ 0x0c, 0xf0, 0xe4, 0xf5, 0x52, 0xf5, 0x55, 0x30, 0x02, 0x09, 0xc2,
+ 0x02, 0x7d, 0x01, 0xaf, 0x41, 0x12, 0x1c, 0xe5, 0x30, 0x03, 0x02,
+ 0xc2, 0x03, 0xd2, 0xaf, 0x22, 0xef, 0xf4, 0x60, 0x2d, 0xe4, 0xfe,
+ 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70, 0xf5, 0x83, 0xe0,
+ 0xb4, 0xff, 0x19, 0x74, 0x14, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x70,
+ 0xf5, 0x83, 0xef, 0xf0, 0x74, 0x1c, 0x2e, 0xf5, 0x82, 0xe4, 0x34,
+ 0x70, 0xf5, 0x83, 0xed, 0xf0, 0x22, 0x0e, 0xbe, 0x04, 0xd5, 0x22,
+ 0x22, 0x22, 0x90, 0x70, 0x2a, 0xe0, 0x30, 0xe1, 0x43, 0xc2, 0xaf,
+ 0x90, 0x70, 0x28, 0xe0, 0x90, 0x10, 0x1c, 0xf0, 0x90, 0x70, 0x29,
+ 0xe0, 0x90, 0x10, 0x1d, 0xf0, 0x90, 0x70, 0x2a, 0xe0, 0x90, 0x10,
+ 0x1e, 0xf0, 0x90, 0x10, 0x1c, 0xe0, 0xf5, 0x25, 0x90, 0x10, 0x1e,
+ 0xe0, 0x20, 0xe1, 0xf3, 0x90, 0x10, 0x1c, 0xe0, 0x90, 0x70, 0x28,
+ 0xf0, 0x90, 0x10, 0x1d, 0xe0, 0x90, 0x70, 0x29, 0xf0, 0x90, 0x10,
+ 0x1e, 0xe0, 0x90, 0x70, 0x2a, 0xf0, 0xc2, 0x05, 0xd2, 0xaf, 0x22,
+ 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -3012,5 +3012,5 @@ static const uint8_t rt2860[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x53, 0x88
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x5b, 0xd2
};
diff --git a/sys/contrib/dev/ral/rt2860.fw.uu b/sys/contrib/dev/ral/rt2860.fw.uu
index ed8c802..2350550 100644
--- a/sys/contrib/dev/ral/rt2860.fw.uu
+++ b/sys/contrib/dev/ral/rt2860.fw.uu
@@ -15,27 +15,24 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
begin 644 rt2860.fw
-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M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
@@ -106,83 +103,86 @@ M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
M____________________________________________________________
-M_____P(0*`(0.P(0/`(3O`(3O0(4<@(4<\,B__\"&4H"&O0"%6P"%*<P!08@
-M#0,2`7HP!@8@#@,2'"XB(I`$%.`@YP,"$[N0<!+@]5:0!`3@$@)<$/LP$-(Q
-M$),S$*$T$+0U$*LV$0E0$4Y1$5=2$5=3$5=4$9-5$?!6$D-P$FEQ$I)R$SYS
-M$V&`$XB#$Z"$```3N](8TF%U-2IU,@MU,[@BPAB0`13@5/WP(I!P$>#U/`(3
-MM>55M`(/Y5@PX`:0`0UT"/!]`8`"?0*O5A("@@(3M2`"`S`#"GT"KU82`H("
-M$[7E--.4`4`,D`$,X$0"\*/@1`3PA59!T@(BD'`1X/1P`P(3N^#U,"+E--.4
-M`4`'Y55@`P(3NY!P$.!4?_^_"@V0<!'@M`@&=4X!=4^$D'`0X%1__[\"$I!P
-M$>!D"&`$X+0@!G5.`W5/(.3U)R*0<!'@)/^21R+E--.4`4`'Y55@`P(329`$
-M!.`EX"1=]5>0<!#@_W1')5?XQN_&D'`1X/]T2"57^,;OQN3]KU82`H("$[7E
-M--.4`4`'Y55@`P(32>5'9`=@'>5'9`A@%^5'9`E@$>5'9`I@"^5'9`M@!>5'
-MM`P(D'`1X%0/]3KE1[0)".4ZM`,#Y/5&Y4>T"@CE.K0!`^3U1N3]KU82`H+2
-M!"*0<!'@]/^0<!#@7_^0<!'@52=/D'`8\)!P$>"0<!GPY/VO5A("@C`5`](4
-M(I!P&.#U)Y`"*>#_D'`9X/[O7I`"*?`P1P2O)X`$Y2?T_Y`"*._P(N4TTY0!
-M0`?E56`#`A-)D'`0X/Z0<!'@_>WXYO57_:]6$@*"`A.UY333E`%`!^558`,"
-M$TF0<!#@_I!P$>#][?6"CH/@]5?]KU82`H("$[60$`#@]5?D]5CU69`0`^"T
-M*`5U6`&`/)`0`^"T,`5U6`*`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8SE6%088!Z0<!K@D!,H\)!P&^"0$RGPHW0%\)!P(N"0
-M$ROP@!&0$RC@1`_PH^!$#_"CX$0%\)`2!'0#\.58,.,6D`4`=.+PHW0(\*-T
-M`?!T`_!_`1(#,"`:!Y`"".!$!?"0$`3@1`SPY/52]54P`@G"`GT!KT$2&_HP
-M`P+"`]*O(N_T8"WD_G04+O6"Y#1P]8/@M/\9=!0N]8+D-'#U@^_P=!PN]8+D
-M-'#U@^WP(@Z^!-4B(B(P&G>0!#?@(.5LD`0HX/4XH^#U-_4YY/4EY3EU\("D
-M)`#_Y?`T@/[E-V4Y<`7\?2B`!'P`?0#O+?_N//X2'*E0!Y`!%.!$`O#E.64X
-M8!#D)3G_Y#2`CX+U@^#U.8"[D`00=`'PD`0HY3CPH^4W\)`$$70!\("-P@;2
-M&R+E)<.4!E`9CX*.@^"T_P<%)>3U)(`NY/4ECX*.@_"`).4D=?`&A'0()?#U
-M@N0T$/6#X/V/@HZ#X&UP!@4E!22``^3U)0^_``$.[U1_8`?E)<.4*D"KY26T
-M*@/3@`'#(@``````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
+M____________________________________________________________
+M____________________________________________________________
+M____________________________________________________________
+M_____P(0*`(0,@(0,P(4P@(4PP(5CP(5D,,B__\"&F\"&^P"%KP"%?<P!08@
+M#0,2'1DB(I`$%.`@YP,"%,&0<!+@]5:0!`3@$@'D$-HP$+$Q$),U$(HV$.=`
+M$/Y!$150$5I1$6-2$6-3$6-4$9]5$?Q6$D]D$FIR$QYS$T)T%#6`%*6#%%R1
+M```4P9!P$>#U/`(4N^55M`(/Y5@PX`:0`0UT"/!]`8`"?0*O5A(""@(4NR`"
+M`S`#"GT"KU82`@H"%+OE,-.4`4`,D`$,X$0"\*/@1`3PA59!T@(BD'`1X+1:
+M`\)/(M)/(N4PTY0!4`,"%,&0`0S@1`+PH^!$!/`BY3#3E`%0`P(4P9`!#.!4
+M_?"CX%3[\"+E,-.4`4`'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`/P?P$2`I20`@C@1`7PD!`$X$0,\.3U4O55,`()
+MP@)]`:]!$ASE,`,"P@/2KR+O]&`MY/YT%"[U@N0T</6#X+3_&704+O6"Y#1P
+M]8/O\'0<+O6"Y#1P]8/M\"(.O@35(B(BD'`JX##A0\*OD'`HX)`0'/"0<"G@
+MD!`=\)!P*N"0$![PD!`<X/4ED!`>X"#A\Y`0'."0<"CPD!`=X)!P*?"0$![@
+MD'`J\,(%TJ\B(@``````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
@@ -196,7 +196,7 @@ M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
-M```````````````````````````````````````````````````````````:
-"4X@`
+M```````````````````````````````````````````````````````````F
+"6](`
`
end
diff --git a/sys/contrib/vchiq/interface/compat/vchi_bsd.h b/sys/contrib/vchiq/interface/compat/vchi_bsd.h
index 2e665b4..9ea3784 100644
--- a/sys/contrib/vchiq/interface/compat/vchi_bsd.h
+++ b/sys/contrib/vchiq/interface/compat/vchi_bsd.h
@@ -151,10 +151,16 @@ struct mutex {
#define lmutex_init(lock) mtx_init(&(lock)->mtx, #lock, NULL, MTX_DEF)
#define lmutex_lock(lock) mtx_lock(&(lock)->mtx)
-#define lmutex_lock_interruptible(lock) (mtx_lock(&(lock)->mtx),0)
#define lmutex_unlock(lock) mtx_unlock(&(lock)->mtx)
#define lmutex_destroy(lock) mtx_destroy(&(lock)->mtx)
+static __inline int
+lmutex_lock_interruptible(struct mutex *lock)
+{
+ mtx_lock(&(lock)->mtx);
+ return 0;
+}
+
/*
* Rwlock API
*/
diff --git a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
index a7c9683..2aa2ecc 100644
--- a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
+++ b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
@@ -353,6 +353,16 @@ vchiq_platform_handle_timeout(VCHIQ_STATE_T *state)
* Local functions
*/
+static void
+pagelist_page_free(vm_page_t pp)
+{
+ vm_page_lock(pp);
+ vm_page_unwire(pp, PQ_INACTIVE);
+ if (pp->wire_count == 0 && pp->object == NULL)
+ vm_page_free(pp);
+ vm_page_unlock(pp);
+}
+
/* There is a potential problem with partial cache lines (pages?)
** at the ends of the block when reading. If the CPU accessed anything in
** the same line (page?) then it may have pulled old data into the cache,
@@ -406,8 +416,6 @@ create_pagelist(char __user *buf, size_t count, unsigned short type,
NULL, NULL, /* lockfunc, lockarg */
&bi->pagelist_dma_tag);
-
-
err = bus_dmamem_alloc(bi->pagelist_dma_tag, (void **)&pagelist,
BUS_DMA_COHERENT | BUS_DMA_WAITOK, &bi->pagelist_dma_map);
if (err) {
@@ -444,6 +452,13 @@ create_pagelist(char __user *buf, size_t count, unsigned short type,
return (-ENOMEM);
}
+ for (i = 0; i < actual_pages; i++) {
+ vm_page_lock(pages[i]);
+ vm_page_wire(pages[i]);
+ vm_page_unhold(pages[i]);
+ vm_page_unlock(pages[i]);
+ }
+
pagelist->length = count;
pagelist->type = type;
pagelist->offset = offset;
@@ -496,9 +511,10 @@ create_pagelist(char __user *buf, size_t count, unsigned short type,
g_fragments_base);
}
- /* XXX: optimize? INV operation for read WBINV for write? */
cpu_dcache_wbinv_range((vm_offset_t)buf, count);
+ bus_dmamap_sync(bi->pagelist_dma_tag, bi->pagelist_dma_map, BUS_DMASYNC_PREWRITE);
+
bi->pagelist = pagelist;
return 0;
@@ -563,12 +579,12 @@ free_pagelist(BULKINFO_T *bi, int actual)
}
for (i = 0; i < num_pages; i++) {
- if (pagelist->type != PAGELIST_WRITE)
+ if (pagelist->type != PAGELIST_WRITE) {
vm_page_dirty(pages[i]);
+ pagelist_page_free(pages[i]);
+ }
}
- vm_page_unhold_pages(pages, num_pages);
-
bus_dmamap_unload(bi->pagelist_dma_tag, bi->pagelist_dma_map);
bus_dmamem_free(bi->pagelist_dma_tag, bi->pagelist, bi->pagelist_dma_map);
bus_dmamap_destroy(bi->pagelist_dma_tag, bi->pagelist_dma_map);
diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c
index aeb98e9..995eff5 100644
--- a/sys/dev/dwc/if_dwc.c
+++ b/sys/dev/dwc/if_dwc.c
@@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$");
#define WRITE4(_sc, _reg, _val) \
bus_write_4((_sc)->res[0], _reg, _val)
+#define MAC_RESET_TIMEOUT 100
#define WATCHDOG_TIMEOUT_SECS 5
#define STATS_HARVEST_INTERVAL 2
#define MII_CLK_VAL 2
@@ -1103,19 +1104,6 @@ dwc_attach(device_t dev)
sc->bst = rman_get_bustag(sc->res[0]);
sc->bsh = rman_get_bushandle(sc->res[0]);
- mtx_init(&sc->mtx, device_get_nameunit(sc->dev),
- MTX_NETWORK_LOCK, MTX_DEF);
-
- callout_init_mtx(&sc->dwc_callout, &sc->mtx, 0);
-
- /* Setup interrupt handler. */
- error = bus_setup_intr(dev, sc->res[1], INTR_TYPE_NET | INTR_MPSAFE,
- NULL, dwc_intr, sc, &sc->intr_cookie);
- if (error != 0) {
- device_printf(dev, "could not setup interrupt handler.\n");
- return (ENXIO);
- }
-
/* Read MAC before reset */
if (dwc_get_hwaddr(sc, macaddr)) {
device_printf(sc->dev, "can't get mac\n");
@@ -1127,12 +1115,12 @@ dwc_attach(device_t dev)
reg |= (BUS_MODE_SWR);
WRITE4(sc, BUS_MODE, reg);
- for (i = 0; i < 100; i++) {
+ for (i = 0; i < MAC_RESET_TIMEOUT; i++) {
if ((READ4(sc, BUS_MODE) & BUS_MODE_SWR) == 0)
break;
DELAY(10);
}
- if (i == 0) {
+ if (i >= MAC_RESET_TIMEOUT) {
device_printf(sc->dev, "Can't reset DWC.\n");
return (ENXIO);
}
@@ -1156,6 +1144,19 @@ dwc_attach(device_t dev)
WRITE4(sc, RX_DESCR_LIST_ADDR, sc->rxdesc_ring_paddr);
WRITE4(sc, TX_DESCR_LIST_ADDR, sc->txdesc_ring_paddr);
+ mtx_init(&sc->mtx, device_get_nameunit(sc->dev),
+ MTX_NETWORK_LOCK, MTX_DEF);
+
+ callout_init_mtx(&sc->dwc_callout, &sc->mtx, 0);
+
+ /* Setup interrupt handler. */
+ error = bus_setup_intr(dev, sc->res[1], INTR_TYPE_NET | INTR_MPSAFE,
+ NULL, dwc_intr, sc, &sc->intr_cookie);
+ if (error != 0) {
+ device_printf(dev, "could not setup interrupt handler.\n");
+ return (ENXIO);
+ }
+
/* Set up the ethernet interface. */
sc->ifp = ifp = if_alloc(IFT_ETHER);
diff --git a/sys/dev/hwpmc/hwpmc_armv7.c b/sys/dev/hwpmc/hwpmc_armv7.c
index d58aca5..d14a990 100644
--- a/sys/dev/hwpmc/hwpmc_armv7.c
+++ b/sys/dev/hwpmc/hwpmc_armv7.c
@@ -555,7 +555,7 @@ armv7_pcpu_init(struct pmc_mdep *md, int cpu)
armv7_pcpu[cpu] = pac = malloc(sizeof(struct armv7_cpu), M_PMC,
M_WAITOK|M_ZERO);
- cpuid = cpu_id();
+ cpuid = cpu_ident();
pac->cortex_ver = (cpuid >> CPU_ID_CORTEX_VER_SHIFT) & \
CPU_ID_CORTEX_VER_MASK;
diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c
index b7e90e9..a3aa04e 100644
--- a/sys/dev/malo/if_malo.c
+++ b/sys/dev/malo/if_malo.c
@@ -165,7 +165,7 @@ static void
malo_bar0_write4(struct malo_softc *sc, bus_size_t off, uint32_t val)
{
DPRINTF(sc, MALO_DEBUG_FW, "%s: off 0x%jx val 0x%x\n",
- __func__, (intmax_t)off, val);
+ __func__, (uintmax_t)off, val);
bus_space_write_4(sc->malo_io0t, sc->malo_io0h, off, val);
}
@@ -510,9 +510,10 @@ malo_desc_setup(struct malo_softc *sc, const char *name,
ds = dd->dd_desc;
memset(ds, 0, dd->dd_desc_len);
- DPRINTF(sc, MALO_DEBUG_RESET, "%s: %s DMA map: %p (%lu) -> %p (%lu)\n",
+ DPRINTF(sc, MALO_DEBUG_RESET,
+ "%s: %s DMA map: %p (%lu) -> 0x%jx (%lu)\n",
__func__, dd->dd_name, ds, (u_long) dd->dd_desc_len,
- (caddr_t) dd->dd_desc_paddr, /*XXX*/ (u_long) dd->dd_desc_len);
+ (uintmax_t) dd->dd_desc_paddr, /*XXX*/ (u_long) dd->dd_desc_len);
return 0;
fail2:
@@ -877,10 +878,9 @@ malo_printrxbuf(const struct malo_rxbuf *bf, u_int ix)
const struct malo_rxdesc *ds = bf->bf_desc;
uint32_t status = le32toh(ds->status);
- printf("R[%2u] (DS.V:%p DS.P:%p) NEXT:%08x DATA:%08x RC:%02x%s\n"
+ printf("R[%2u] (DS.V:%p DS.P:0x%jx) NEXT:%08x DATA:%08x RC:%02x%s\n"
" STAT:%02x LEN:%04x SNR:%02x NF:%02x CHAN:%02x"
- " RATE:%02x QOS:%04x\n",
- ix, ds, (const struct malo_desc *)bf->bf_daddr,
+ " RATE:%02x QOS:%04x\n", ix, ds, (uintmax_t)bf->bf_daddr,
le32toh(ds->physnext), le32toh(ds->physbuffdata),
ds->rxcontrol,
ds->rxcontrol != MALO_RXD_CTRL_DRIVER_OWN ?
@@ -896,8 +896,7 @@ malo_printtxbuf(const struct malo_txbuf *bf, u_int qnum, u_int ix)
uint32_t status = le32toh(ds->status);
printf("Q%u[%3u]", qnum, ix);
- printf(" (DS.V:%p DS.P:%p)\n",
- ds, (const struct malo_txdesc *)bf->bf_daddr);
+ printf(" (DS.V:%p DS.P:0x%jx)\n", ds, (uintmax_t)bf->bf_daddr);
printf(" NEXT:%08x DATA:%08x LEN:%04x STAT:%08x%s\n",
le32toh(ds->physnext),
le32toh(ds->pktptr), le16toh(ds->pktlen), status,
diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c
index 3ea2474..89a39c0 100644
--- a/sys/dev/mwl/if_mwl.c
+++ b/sys/dev/mwl/if_mwl.c
@@ -2056,9 +2056,10 @@ mwl_desc_setup(struct mwl_softc *sc, const char *name,
ds = dd->dd_desc;
memset(ds, 0, dd->dd_desc_len);
- DPRINTF(sc, MWL_DEBUG_RESET, "%s: %s DMA map: %p (%lu) -> %p (%lu)\n",
+ DPRINTF(sc, MWL_DEBUG_RESET,
+ "%s: %s DMA map: %p (%lu) -> 0x%jx (%lu)\n",
__func__, dd->dd_name, ds, (u_long) dd->dd_desc_len,
- (caddr_t) dd->dd_desc_paddr, /*XXX*/ (u_long) dd->dd_desc_len);
+ (uintmax_t) dd->dd_desc_paddr, /*XXX*/ (u_long) dd->dd_desc_len);
return 0;
fail2:
@@ -4688,11 +4689,10 @@ mwl_printrxbuf(const struct mwl_rxbuf *bf, u_int ix)
const struct mwl_rxdesc *ds = bf->bf_desc;
uint32_t status = le32toh(ds->Status);
- printf("R[%2u] (DS.V:%p DS.P:%p) NEXT:%08x DATA:%08x RC:%02x%s\n"
+ printf("R[%2u] (DS.V:%p DS.P:0x%jx) NEXT:%08x DATA:%08x RC:%02x%s\n"
" STAT:%02x LEN:%04x RSSI:%02x CHAN:%02x RATE:%02x QOS:%04x HT:%04x\n",
- ix, ds, (const struct mwl_desc *)bf->bf_daddr,
- le32toh(ds->pPhysNext), le32toh(ds->pPhysBuffData),
- ds->RxControl,
+ ix, ds, (uintmax_t)bf->bf_daddr, le32toh(ds->pPhysNext),
+ le32toh(ds->pPhysBuffData), ds->RxControl,
ds->RxControl != EAGLE_RXD_CTRL_DRIVER_OWN ?
"" : (status & EAGLE_RXD_STATUS_OK) ? " *" : " !",
ds->Status, le16toh(ds->PktLen), ds->RSSI, ds->Channel,
@@ -4706,8 +4706,7 @@ mwl_printtxbuf(const struct mwl_txbuf *bf, u_int qnum, u_int ix)
uint32_t status = le32toh(ds->Status);
printf("Q%u[%3u]", qnum, ix);
- printf(" (DS.V:%p DS.P:%p)\n",
- ds, (const struct mwl_txdesc *)bf->bf_daddr);
+ printf(" (DS.V:%p DS.P:0x%jx)\n", ds, (uintmax_t)bf->bf_daddr);
printf(" NEXT:%08x DATA:%08x LEN:%04x STAT:%08x%s\n",
le32toh(ds->pPhysNext),
le32toh(ds->PktPtr), le16toh(ds->PktLen), status,
diff --git a/sys/dev/oce/oce_mbox.c b/sys/dev/oce/oce_mbox.c
index d3dab2f..01bd4cf 100644
--- a/sys/dev/oce/oce_mbox.c
+++ b/sys/dev/oce/oce_mbox.c
@@ -811,7 +811,6 @@ oce_config_nic_rss(POCE_SOFTC sc, uint32_t if_id, uint16_t enable_rss)
fwcmd->params.req.flush = OCE_FLUSH;
fwcmd->params.req.if_id = LE_32(if_id);
- srandom(arc4random()); /* random entropy seed */
read_random(fwcmd->params.req.hash, sizeof(fwcmd->params.req.hash));
rc = oce_rss_itbl_init(sc, fwcmd);
diff --git a/sys/dev/ral/if_ral_pci.c b/sys/dev/ral/if_ral_pci.c
index d3a2692..519b4ca 100644
--- a/sys/dev/ral/if_ral_pci.c
+++ b/sys/dev/ral/if_ral_pci.c
@@ -93,7 +93,10 @@ static const struct ral_pci_ident ral_pci_ids[] = {
{ 0x1814, 0x3562, "Ralink Technology RT3562" },
{ 0x1814, 0x3592, "Ralink Technology RT3592" },
{ 0x1814, 0x3593, "Ralink Technology RT3593" },
+ { 0x1814, 0x5360, "Ralink Technology RT5390" },
+ { 0x1814, 0x5362, "Ralink Technology RT5392" },
{ 0x1814, 0x5390, "Ralink Technology RT5390" },
+ { 0x1814, 0x5392, "Ralink Technology RT5392" },
{ 0x1814, 0x539a, "Ralink Technology RT5390" },
{ 0x1814, 0x539f, "Ralink Technology RT5390" },
{ 0x1a3b, 0x1059, "AWT RT2890" },
diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c
index 2e68c2e..b29a0eb 100644
--- a/sys/dev/ral/rt2860.c
+++ b/sys/dev/ral/rt2860.c
@@ -21,7 +21,7 @@
__FBSDID("$FreeBSD$");
/*-
- * Ralink Technology RT2860/RT3090/RT3390/RT3562 chipset driver
+ * Ralink Technology RT2860/RT3090/RT3390/RT3562/RT5390/RT5392 chipset driver
* http://www.ralinktech.com/
*/
@@ -142,8 +142,11 @@ static void rt2860_set_channel(struct ieee80211com *);
static void rt2860_select_chan_group(struct rt2860_softc *, int);
static void rt2860_set_chan(struct rt2860_softc *, u_int);
static void rt3090_set_chan(struct rt2860_softc *, u_int);
+static void rt5390_set_chan(struct rt2860_softc *, u_int);
static int rt3090_rf_init(struct rt2860_softc *);
+static void rt5390_rf_init(struct rt2860_softc *);
static void rt3090_rf_wakeup(struct rt2860_softc *);
+static void rt5390_rf_wakeup(struct rt2860_softc *);
static int rt3090_filter_calib(struct rt2860_softc *, uint8_t, uint8_t,
uint8_t *);
static void rt3090_rf_setup(struct rt2860_softc *);
@@ -166,6 +169,7 @@ static const char *rt2860_get_rf(uint8_t);
static int rt2860_read_eeprom(struct rt2860_softc *,
uint8_t macaddr[IEEE80211_ADDR_LEN]);
static int rt2860_bbp_init(struct rt2860_softc *);
+static void rt5390_bbp_init(struct rt2860_softc *);
static int rt2860_txrx_enable(struct rt2860_softc *);
static void rt2860_init(void *);
static void rt2860_init_locked(struct rt2860_softc *);
@@ -194,6 +198,8 @@ static const struct {
uint8_t val;
} rt2860_def_bbp[] = {
RT2860_DEF_BBP
+}, rt5390_def_bbp[] = {
+ RT5390_DEF_BBP
};
static const struct rfprog {
@@ -212,8 +218,12 @@ struct {
static const struct {
uint8_t reg;
uint8_t val;
-} rt3090_def_rf[] = {
+} rt3090_def_rf[] = {
RT3070_DEF_RF
+}, rt5390_def_rf[] = {
+ RT5390_DEF_RF
+}, rt5392_def_rf[] = {
+ RT5392_DEF_RF
};
int
@@ -264,12 +274,10 @@ rt2860_attach(device_t dev, int id)
/* retrieve RF rev. no and various other things from EEPROM */
rt2860_read_eeprom(sc, macaddr);
- if (bootverbose) {
- device_printf(sc->sc_dev, "MAC/BBP RT%X (rev 0x%04X), "
- "RF %s (MIMO %dT%dR), address %6D\n",
- sc->mac_ver, sc->mac_rev, rt2860_get_rf(sc->rf_rev),
- sc->ntxchains, sc->nrxchains, macaddr, ":");
- }
+ device_printf(sc->sc_dev, "MAC/BBP RT%X (rev 0x%04X), "
+ "RF %s (MIMO %dT%dR), address %6D\n",
+ sc->mac_ver, sc->mac_rev, rt2860_get_rf(sc->rf_rev),
+ sc->ntxchains, sc->nrxchains, macaddr, ":");
/*
* Allocate Tx (4 EDCAs + HCCA + Mgt) and Rx rings.
@@ -2082,7 +2090,7 @@ rt2860_mcu_bbp_write(struct rt2860_softc *sc, uint8_t reg, uint8_t val)
}
if (ntries == 100) {
device_printf(sc->sc_dev,
- "could not write to BBP through MCU\n");
+ "could not write to BBP through MCU\n");
return;
}
@@ -2562,10 +2570,110 @@ rt3090_set_chan(struct rt2860_softc *sc, u_int chan)
rt3090_rf_write(sc, 7, rf | RT3070_TUNE);
}
+static void
+rt5390_set_chan(struct rt2860_softc *sc, u_int chan)
+{
+ uint8_t h20mhz, rf, tmp;
+ int8_t txpow1, txpow2;
+ int i;
+
+ /* RT5390 is 2GHz only */
+ KASSERT(chan >= 1 && chan <= 14, ("chan %d not support", chan));
+
+ /* find the settings for this channel (we know it exists) */
+ for (i = 0; rt2860_rf2850[i].chan != chan; i++);
+
+ /* use Tx power values from EEPROM */
+ txpow1 = sc->txpow1[i];
+ txpow2 = sc->txpow2[i];
+
+ rt3090_rf_write(sc, 8, rt3090_freqs[i].n);
+ rt3090_rf_write(sc, 9, rt3090_freqs[i].k & 0x0f);
+ rf = rt3090_rf_read(sc, 11);
+ rf = (rf & ~0x03) | (rt3090_freqs[i].r & 0x03);
+ rt3090_rf_write(sc, 11, rf);
+
+ rf = rt3090_rf_read(sc, 49);
+ rf = (rf & ~0x3f) | (txpow1 & 0x3f);
+ /* the valid range of the RF R49 is 0x00~0x27 */
+ if ((rf & 0x3f) > 0x27)
+ rf = (rf & ~0x3f) | 0x27;
+ rt3090_rf_write(sc, 49, rf);
+ if (sc->mac_ver == 0x5392) {
+ rf = rt3090_rf_read(sc, 50);
+ rf = (rf & ~0x3f) | (txpow2 & 0x3f);
+ /* the valid range of the RF R50 is 0x00~0x27 */
+ if ((rf & 0x3f) > 0x27)
+ rf = (rf & ~0x3f) | 0x27;
+ rt3090_rf_write(sc, 50, rf);
+ }
+
+ rf = rt3090_rf_read(sc, 1);
+ rf |= RT3070_RF_BLOCK | RT3070_PLL_PD | RT3070_RX0_PD | RT3070_TX0_PD;
+ if (sc->mac_ver == 0x5392)
+ rf |= RT3070_RX1_PD | RT3070_TX1_PD;
+ rt3090_rf_write(sc, 1, rf);
+
+ rf = rt3090_rf_read(sc, 2);
+ rt3090_rf_write(sc, 2, rf | RT3593_RESCAL);
+ DELAY(1000);
+ rt3090_rf_write(sc, 2, rf & ~RT3593_RESCAL);
+
+ rf = rt3090_rf_read(sc, 17);
+ tmp = rf;
+ rf = (rf & ~0x7f) | (sc->freq & 0x7f);
+ rf = MIN(rf, 0x5f);
+ if (tmp != rf)
+ rt2860_mcu_cmd(sc, 0x74, (tmp << 8 ) | rf, 0);
+
+ if (sc->mac_ver == 0x5390) {
+ if (chan <= 4)
+ rf = 0x73;
+ else if (chan >= 5 && chan <= 6)
+ rf = 0x63;
+ else if (chan >= 7 && chan <= 10)
+ rf = 0x53;
+ else
+ rf = 43;
+ rt3090_rf_write(sc, 55, rf);
+
+ if (chan == 1)
+ rf = 0x0c;
+ else if (chan == 2)
+ rf = 0x0b;
+ else if (chan == 3)
+ rf = 0x0a;
+ else if (chan >= 4 && chan <= 6)
+ rf = 0x09;
+ else if (chan >= 7 && chan <= 12)
+ rf = 0x08;
+ else if (chan == 13)
+ rf = 0x07;
+ else
+ rf = 0x06;
+ rt3090_rf_write(sc, 59, rf);
+ }
+
+ /* Tx/Rx h20M */
+ h20mhz = (sc->rf24_20mhz & 0x20) >> 5;
+ rf = rt3090_rf_read(sc, 30);
+ rf = (rf & ~0x06) | (h20mhz << 1) | (h20mhz << 2);
+ rt3090_rf_write(sc, 30, rf);
+
+ /* Rx BB filter VCM */
+ rf = rt3090_rf_read(sc, 30);
+ rf = (rf & ~0x18) | 0x10;
+ rt3090_rf_write(sc, 30, rf);
+
+ /* Initiate VCO calibration. */
+ rf = rt3090_rf_read(sc, 3);
+ rf |= RT3593_VCOCAL;
+ rt3090_rf_write(sc, 3, rf);
+}
+
static int
rt3090_rf_init(struct rt2860_softc *sc)
{
-#define N(a) (sizeof (a) / sizeof ((a)[0]))
uint32_t tmp;
uint8_t rf, bbp;
int i;
@@ -2589,7 +2697,7 @@ rt3090_rf_init(struct rt2860_softc *sc)
RAL_WRITE(sc, RT3070_GPIO_SWITCH, tmp & ~0x20);
/* initialize RF registers to default value */
- for (i = 0; i < N(rt3090_def_rf); i++) {
+ for (i = 0; i < nitems(rt3090_def_rf); i++) {
rt3090_rf_write(sc, rt3090_def_rf[i].reg,
rt3090_def_rf[i].val);
}
@@ -2668,11 +2776,79 @@ rt3090_rf_init(struct rt2860_softc *sc)
rf = rt3090_rf_read(sc, 21);
rt3090_rf_write(sc, 21, rf & ~RT3070_RX_LO2);
- return 0;
-#undef N
+ return (0);
}
-void
+static void
+rt5390_rf_init(struct rt2860_softc *sc)
+{
+ uint8_t rf, bbp;
+ int i;
+
+ rf = rt3090_rf_read(sc, 2);
+ /* Toggle RF R2 bit 7. */
+ rt3090_rf_write(sc, 2, rf | RT3593_RESCAL);
+ DELAY(1000);
+ rt3090_rf_write(sc, 2, rf & ~RT3593_RESCAL);
+
+ /* Initialize RF registers to default value. */
+ if (sc->mac_ver == 0x5392) {
+ for (i = 0; i < nitems(rt5392_def_rf); i++) {
+ rt3090_rf_write(sc, rt5392_def_rf[i].reg,
+ rt5392_def_rf[i].val);
+ }
+ } else {
+ for (i = 0; i < nitems(rt5390_def_rf); i++) {
+ rt3090_rf_write(sc, rt5390_def_rf[i].reg,
+ rt5390_def_rf[i].val);
+ }
+ }
+
+ sc->rf24_20mhz = 0x1f;
+ sc->rf24_40mhz = 0x2f;
+
+ if (sc->mac_rev < 0x0211)
+ rt3090_rf_write(sc, 27, 0x03);
+
+ /* Set led open drain enable. */
+ RAL_WRITE(sc, RT3070_OPT_14, RAL_READ(sc, RT3070_OPT_14) | 1);
+
+ RAL_WRITE(sc, RT2860_TX_SW_CFG1, 0);
+ RAL_WRITE(sc, RT2860_TX_SW_CFG2, 0);
+
+ if (sc->mac_ver == 0x5390)
+ rt3090_set_rx_antenna(sc, 0);
+
+ /* Patch RSSI inaccurate issue. */
+ rt2860_mcu_bbp_write(sc, 79, 0x13);
+ rt2860_mcu_bbp_write(sc, 80, 0x05);
+ rt2860_mcu_bbp_write(sc, 81, 0x33);
+
+ /* Enable DC filter. */
+ if (sc->mac_rev >= 0x0211)
+ rt2860_mcu_bbp_write(sc, 103, 0xc0);
+
+ bbp = rt2860_mcu_bbp_read(sc, 138);
+ if (sc->ntxchains == 1)
+ bbp |= 0x20; /* Turn off DAC1. */
+ if (sc->nrxchains == 1)
+ bbp &= ~0x02; /* Turn off ADC1. */
+ rt2860_mcu_bbp_write(sc, 138, bbp);
+
+ /* Enable RX LO1 and LO2. */
+ rt3090_rf_write(sc, 38, rt3090_rf_read(sc, 38) & ~RT5390_RX_LO1);
+ rt3090_rf_write(sc, 39, rt3090_rf_read(sc, 39) & ~RT5390_RX_LO2);
+
+ /* Avoid data lost and CRC error. */
+ rt2860_mcu_bbp_write(sc, 4,
+ rt2860_mcu_bbp_read(sc, 4) | RT5390_MAC_IF_CTRL);
+
+ rf = rt3090_rf_read(sc, 30);
+ rf = (rf & ~0x18) | 0x10;
+ rt3090_rf_write(sc, 30, rf);
+}
+
+static void
rt3090_rf_wakeup(struct rt2860_softc *sc)
{
uint32_t tmp;
@@ -2738,7 +2914,43 @@ rt3090_rf_wakeup(struct rt2860_softc *sc)
}
}
-int
+static void
+rt5390_rf_wakeup(struct rt2860_softc *sc)
+{
+ uint32_t tmp;
+ uint8_t rf;
+
+ rf = rt3090_rf_read(sc, 1);
+ rf |= RT3070_RF_BLOCK | RT3070_PLL_PD | RT3070_RX0_PD |
+ RT3070_TX0_PD;
+ if (sc->mac_ver == 0x5392)
+ rf |= RT3070_RX1_PD | RT3070_TX1_PD;
+ rt3090_rf_write(sc, 1, rf);
+
+ rf = rt3090_rf_read(sc, 6);
+ rf |= RT3593_VCO_IC | RT3593_VCOCAL;
+ if (sc->mac_ver == 0x5390)
+ rf &= ~RT3593_VCO_IC;
+ rt3090_rf_write(sc, 6, rf);
+
+ rt3090_rf_write(sc, 2, rt3090_rf_read(sc, 2) | RT3593_RESCAL);
+
+ rf = rt3090_rf_read(sc, 22);
+ rf = (rf & ~0xe0) | 0x20;
+ rt3090_rf_write(sc, 22, rf);
+
+ rt3090_rf_write(sc, 42, rt3090_rf_read(sc, 42) | RT5390_RX_CTB);
+ rt3090_rf_write(sc, 20, rt3090_rf_read(sc, 20) & ~0x77);
+ rt3090_rf_write(sc, 3, rt3090_rf_read(sc, 3) | RT3593_VCOCAL);
+
+ if (sc->patch_dac && sc->mac_rev < 0x0211) {
+ tmp = RAL_READ(sc, RT3070_LDO_CFG0);
+ tmp = (tmp & ~0x1f000000) | 0x0d000000;
+ RAL_WRITE(sc, RT3070_LDO_CFG0, tmp);
+ }
+}
+
+static int
rt3090_filter_calib(struct rt2860_softc *sc, uint8_t init, uint8_t target,
uint8_t *val)
{
@@ -2767,7 +2979,7 @@ rt3090_filter_calib(struct rt2860_softc *sc, uint8_t init, uint8_t target,
break;
}
if (ntries == 100)
- return ETIMEDOUT;
+ return (ETIMEDOUT);
/* set power and frequency of stopband test tone */
rt2860_mcu_bbp_write(sc, 24, 0x06);
@@ -2800,7 +3012,7 @@ rt3090_filter_calib(struct rt2860_softc *sc, uint8_t init, uint8_t target,
rf22 = rt3090_rf_read(sc, 22);
rt3090_rf_write(sc, 22, rf22 & ~RT3070_BB_LOOPBACK);
- return 0;
+ return (0);
}
static void
@@ -2826,10 +3038,12 @@ rt3090_rf_setup(struct rt2860_softc *sc)
RAL_WRITE(sc, RT2860_TX_SW_CFG2, 0);
/* initialize RF registers from ROM */
- for (i = 0; i < 10; i++) {
- if (sc->rf[i].reg == 0 || sc->rf[i].reg == 0xff)
- continue;
- rt3090_rf_write(sc, sc->rf[i].reg, sc->rf[i].val);
+ if (sc->mac_ver < 0x5390) {
+ for (i = 0; i < 10; i++) {
+ if (sc->rf[i].reg == 0 || sc->rf[i].reg == 0xff)
+ continue;
+ rt3090_rf_write(sc, sc->rf[i].reg, sc->rf[i].val);
+ }
}
}
@@ -3168,6 +3382,7 @@ rt2860_get_rf(uint8_t rev)
case RT3070_RF_3052: return "RT3052";
case RT3070_RF_3320: return "RT3320";
case RT3070_RF_3053: return "RT3053";
+ case RT5390_RF_5390: return "RT5390";
default: return "unknown";
}
}
@@ -3250,7 +3465,12 @@ rt2860_read_eeprom(struct rt2860_softc *sc, uint8_t macaddr[IEEE80211_ADDR_LEN])
val = rt2860_srom_read(sc, RT2860_EEPROM_ANTENNA);
if (val == 0xffff) {
DPRINTF(("invalid EEPROM antenna info, using default\n"));
- if (sc->mac_ver == 0x3593) {
+ if (sc->mac_ver >= 0x5390) {
+ /* default to RF5390 */
+ sc->rf_rev = RT5390_RF_5390;
+ sc->ntxchains = (sc->mac_ver == 0x5392) ? 2 : 1;
+ sc->nrxchains = (sc->mac_ver == 0x5392) ? 2 : 1;
+ } else if (sc->mac_ver == 0x3593) {
/* default to RF3053 3T3R */
sc->rf_rev = RT3070_RF_3053;
sc->ntxchains = 3;
@@ -3268,8 +3488,13 @@ rt2860_read_eeprom(struct rt2860_softc *sc, uint8_t macaddr[IEEE80211_ADDR_LEN])
}
} else {
sc->rf_rev = (val >> 8) & 0xf;
- sc->ntxchains = (val >> 4) & 0xf;
- sc->nrxchains = val & 0xf;
+ if (sc->mac_ver >= 0x5390) {
+ sc->ntxchains = (sc->mac_ver == 0x5392) ? 2 : 1;
+ sc->nrxchains = (sc->mac_ver == 0x5392) ? 2 : 1;
+ } else {
+ sc->ntxchains = (val >> 4) & 0xf;
+ sc->nrxchains = val & 0xf;
+ }
}
DPRINTF(("EEPROM RF rev=0x%02x chains=%dT%dR\n",
sc->rf_rev, sc->ntxchains, sc->nrxchains));
@@ -3307,17 +3532,23 @@ rt2860_read_eeprom(struct rt2860_softc *sc, uint8_t macaddr[IEEE80211_ADDR_LEN])
sc->txpow1[i + 0] = (int8_t)(val & 0xff);
sc->txpow1[i + 1] = (int8_t)(val >> 8);
- val = rt2860_srom_read(sc,
- RT2860_EEPROM_PWR2GHZ_BASE2 + i / 2);
- sc->txpow2[i + 0] = (int8_t)(val & 0xff);
- sc->txpow2[i + 1] = (int8_t)(val >> 8);
+ if (sc->mac_ver != 0x5390) {
+ val = rt2860_srom_read(sc,
+ RT2860_EEPROM_PWR2GHZ_BASE2 + i / 2);
+ sc->txpow2[i + 0] = (int8_t)(val & 0xff);
+ sc->txpow2[i + 1] = (int8_t)(val >> 8);
+ }
}
/* fix broken Tx power entries */
for (i = 0; i < 14; i++) {
- if (sc->txpow1[i] < 0 || sc->txpow1[i] > 31)
+ if (sc->txpow1[i] < 0 ||
+ sc->txpow1[i] > ((sc->mac_ver >= 0x5390) ? 39 : 31))
sc->txpow1[i] = 5;
- if (sc->txpow2[i] < 0 || sc->txpow2[i] > 31)
- sc->txpow2[i] = 5;
+ if (sc->mac_ver != 0x5390) {
+ if (sc->txpow2[i] < 0 ||
+ sc->txpow2[i] > ((sc->mac_ver == 0x5392) ? 39 : 31))
+ sc->txpow2[i] = 5;
+ }
DPRINTF(("chan %d: power1=%d, power2=%d\n",
rt2860_rf2850[i].chan, sc->txpow1[i], sc->txpow2[i]));
}
@@ -3485,10 +3716,9 @@ rt2860_read_eeprom(struct rt2860_softc *sc, uint8_t macaddr[IEEE80211_ADDR_LEN])
return 0;
}
-int
+static int
rt2860_bbp_init(struct rt2860_softc *sc)
{
-#define N(a) (sizeof (a) / sizeof ((a)[0]))
int i, ntries;
/* wait for BBP to wake up */
@@ -3500,13 +3730,17 @@ rt2860_bbp_init(struct rt2860_softc *sc)
if (ntries == 20) {
device_printf(sc->sc_dev,
"timeout waiting for BBP to wake up\n");
- return ETIMEDOUT;
+ return (ETIMEDOUT);
}
/* initialize BBP registers to default values */
- for (i = 0; i < N(rt2860_def_bbp); i++) {
- rt2860_mcu_bbp_write(sc, rt2860_def_bbp[i].reg,
- rt2860_def_bbp[i].val);
+ if (sc->mac_ver >= 0x5390)
+ rt5390_bbp_init(sc);
+ else {
+ for (i = 0; i < nitems(rt2860_def_bbp); i++) {
+ rt2860_mcu_bbp_write(sc, rt2860_def_bbp[i].reg,
+ rt2860_def_bbp[i].val);
+ }
}
/* fix BBP84 for RT2860E */
@@ -3523,7 +3757,44 @@ rt2860_bbp_init(struct rt2860_softc *sc)
}
return 0;
-#undef N
+}
+
+static void
+rt5390_bbp_init(struct rt2860_softc *sc)
+{
+ uint8_t bbp;
+ int i;
+
+ /* Apply maximum likelihood detection for 2 stream case. */
+ if (sc->nrxchains > 1) {
+ bbp = rt2860_mcu_bbp_read(sc, 105);
+ rt2860_mcu_bbp_write(sc, 105, bbp | RT5390_MLD);
+ }
+
+ /* Avoid data lost and CRC error. */
+ bbp = rt2860_mcu_bbp_read(sc, 4);
+ rt2860_mcu_bbp_write(sc, 4, bbp | RT5390_MAC_IF_CTRL);
+
+ for (i = 0; i < nitems(rt5390_def_bbp); i++) {
+ rt2860_mcu_bbp_write(sc, rt5390_def_bbp[i].reg,
+ rt5390_def_bbp[i].val);
+ }
+
+ if (sc->mac_ver == 0x5392) {
+ rt2860_mcu_bbp_write(sc, 84, 0x9a);
+ rt2860_mcu_bbp_write(sc, 95, 0x9a);
+ rt2860_mcu_bbp_write(sc, 98, 0x12);
+ rt2860_mcu_bbp_write(sc, 106, 0x05);
+ rt2860_mcu_bbp_write(sc, 134, 0xd0);
+ rt2860_mcu_bbp_write(sc, 135, 0xf6);
+ }
+
+ bbp = rt2860_mcu_bbp_read(sc, 152);
+ rt2860_mcu_bbp_write(sc, 152, bbp | 0x80);
+
+ /* Disable hardware antenna diversity. */
+ if (sc->mac_ver == 0x5390)
+ rt2860_mcu_bbp_write(sc, 154, 0);
}
static int
@@ -3590,7 +3861,6 @@ rt2860_init(void *arg)
static void
rt2860_init_locked(struct rt2860_softc *sc)
{
-#define N(a) (sizeof (a) / sizeof ((a)[0]))
struct ifnet *ifp = sc->sc_ifp;
struct ieee80211com *ic = ifp->if_l2com;
uint32_t tmp;
@@ -3665,9 +3935,11 @@ rt2860_init_locked(struct rt2860_softc *sc)
RAL_BARRIER_WRITE(sc);
RAL_WRITE(sc, RT2860_MAC_SYS_CTRL, 0);
- for (i = 0; i < N(rt2860_def_mac); i++)
+ for (i = 0; i < nitems(rt2860_def_mac); i++)
RAL_WRITE(sc, rt2860_def_mac[i].reg, rt2860_def_mac[i].val);
- if (sc->mac_ver >= 0x3071) {
+ if (sc->mac_ver >= 0x5390)
+ RAL_WRITE(sc, RT2860_TX_SW_CFG0, 0x00000404);
+ else if (sc->mac_ver >= 0x3071) {
/* set delay of PA_PE assertion to 1us (unit of 0.25us) */
RAL_WRITE(sc, RT2860_TX_SW_CFG0,
4 << RT2860_DLY_PAPE_EN_SHIFT);
@@ -3762,7 +4034,8 @@ rt2860_init_locked(struct rt2860_softc *sc)
/* select Main antenna for 1T1R devices */
if (sc->rf_rev == RT3070_RF_2020 ||
sc->rf_rev == RT3070_RF_3020 ||
- sc->rf_rev == RT3070_RF_3320)
+ sc->rf_rev == RT3070_RF_3320 ||
+ sc->mac_ver == 0x5390)
rt3090_set_rx_antenna(sc, 0);
/* send LEDs operating mode to microcontroller */
@@ -3770,13 +4043,21 @@ rt2860_init_locked(struct rt2860_softc *sc)
rt2860_mcu_cmd(sc, RT2860_MCU_CMD_LED2, sc->led[1], 0);
rt2860_mcu_cmd(sc, RT2860_MCU_CMD_LED3, sc->led[2], 0);
- if (sc->mac_ver >= 0x3071)
- rt3090_rf_init(sc);
+ if (sc->mac_ver >= 0x5390)
+ rt5390_rf_init(sc);
+ else if (sc->mac_ver >= 0x3071) {
+ if ((error = rt3090_rf_init(sc)) != 0) {
+ rt2860_stop_locked(sc);
+ return;
+ }
+ }
rt2860_mcu_cmd(sc, RT2860_MCU_CMD_SLEEP, 0x02ff, 1);
rt2860_mcu_cmd(sc, RT2860_MCU_CMD_WAKEUP, 0, 1);
- if (sc->mac_ver >= 0x3071)
+ if (sc->mac_ver >= 0x5390)
+ rt5390_rf_wakeup(sc);
+ else if (sc->mac_ver >= 0x3071)
rt3090_rf_wakeup(sc);
/* disable non-existing Rx chains */
@@ -3837,7 +4118,6 @@ rt2860_init_locked(struct rt2860_softc *sc)
ifp->if_drv_flags |= IFF_DRV_RUNNING;
callout_reset(&sc->watchdog_ch, hz, rt2860_watchdog, sc);
-#undef N
}
static void
@@ -3988,15 +4268,25 @@ rt3090_set_rx_antenna(struct rt2860_softc *sc, int aux)
uint32_t tmp;
if (aux) {
- tmp = RAL_READ(sc, RT2860_PCI_EECTRL);
- RAL_WRITE(sc, RT2860_PCI_EECTRL, tmp & ~RT2860_C);
- tmp = RAL_READ(sc, RT2860_GPIO_CTRL);
- RAL_WRITE(sc, RT2860_GPIO_CTRL, (tmp & ~0x0808) | 0x08);
+ if (sc->mac_ver == 0x5390) {
+ rt2860_mcu_bbp_write(sc, 152,
+ rt2860_mcu_bbp_read(sc, 152) & ~0x80);
+ } else {
+ tmp = RAL_READ(sc, RT2860_PCI_EECTRL);
+ RAL_WRITE(sc, RT2860_PCI_EECTRL, tmp & ~RT2860_C);
+ tmp = RAL_READ(sc, RT2860_GPIO_CTRL);
+ RAL_WRITE(sc, RT2860_GPIO_CTRL, (tmp & ~0x0808) | 0x08);
+ }
} else {
- tmp = RAL_READ(sc, RT2860_PCI_EECTRL);
- RAL_WRITE(sc, RT2860_PCI_EECTRL, tmp | RT2860_C);
- tmp = RAL_READ(sc, RT2860_GPIO_CTRL);
- RAL_WRITE(sc, RT2860_GPIO_CTRL, tmp & ~0x0808);
+ if (sc->mac_ver == 0x5390) {
+ rt2860_mcu_bbp_write(sc, 152,
+ rt2860_mcu_bbp_read(sc, 152) | 0x80);
+ } else {
+ tmp = RAL_READ(sc, RT2860_PCI_EECTRL);
+ RAL_WRITE(sc, RT2860_PCI_EECTRL, tmp | RT2860_C);
+ tmp = RAL_READ(sc, RT2860_GPIO_CTRL);
+ RAL_WRITE(sc, RT2860_GPIO_CTRL, tmp & ~0x0808);
+ }
}
}
@@ -4011,7 +4301,9 @@ rt2860_switch_chan(struct rt2860_softc *sc, struct ieee80211_channel *c)
if (chan == 0 || chan == IEEE80211_CHAN_ANY)
return;
- if (sc->mac_ver >= 0x3071)
+ if (sc->mac_ver >= 0x5390)
+ rt5390_set_chan(sc, chan);
+ else if (sc->mac_ver >= 0x3071)
rt3090_set_chan(sc, chan);
else
rt2860_set_chan(sc, chan);
@@ -4027,7 +4319,8 @@ rt2860_switch_chan(struct rt2860_softc *sc, struct ieee80211_channel *c)
group = 3;
/* XXX necessary only when group has changed! */
- rt2860_select_chan_group(sc, group);
+ if (sc->mac_ver < 0x5390)
+ rt2860_select_chan_group(sc, group);
DELAY(1000);
}
diff --git a/sys/dev/ral/rt2860reg.h b/sys/dev/ral/rt2860reg.h
index fe9fb4f..3d507be 100644
--- a/sys/dev/ral/rt2860reg.h
+++ b/sys/dev/ral/rt2860reg.h
@@ -699,6 +699,7 @@
/* possible flags for RT3020 RF register 1 */
#define RT3070_RF_BLOCK (1 << 0)
+#define RT3070_PLL_PD (1 << 1)
#define RT3070_RX0_PD (1 << 2)
#define RT3070_TX0_PD (1 << 3)
#define RT3070_RX1_PD (1 << 4)
@@ -750,6 +751,22 @@
#define RT3090_DEF_LNA 10
+/* possible flags for RT5390 RF register 38 */
+#define RT5390_RX_LO1 (1 << 5)
+
+/* possible flags for RT5390 RF register 39 */
+#define RT5390_RX_LO2 (1 << 7)
+
+/* possible flags for RT5390 RF register 42 */
+#define RT5390_RX_CTB (1 << 6)
+
+/* possible flags for RT5390 BBP register 4 */
+#define RT5390_MAC_IF_CTRL (1 << 6)
+
+/* possible flags for RT5390 BBP register 105 */
+#define RT5390_MLD (1 << 2)
+#define RT5390_SIG_MODULATION (1 << 3)
+
/* RT2860 TX descriptor */
struct rt2860_txd {
uint32_t sdp0; /* Segment Data Pointer 0 */
@@ -894,6 +911,7 @@ struct rt2860_rxwi {
#define RT3070_RF_3052 9 /* dual-band 2T2R */
#define RT3070_RF_3320 11 /* 1T1R */
#define RT3070_RF_3053 13 /* dual-band 3T3R */
+#define RT5390_RF_5390 15 /* b/g/n */
/* USB commands for RT2870 only */
#define RT2870_RESET 1
@@ -1006,14 +1024,17 @@ static const struct rt2860_rate {
*/
#define RT2860_DEF_MAC \
{ RT2860_BCN_OFFSET0, 0xf8f0e8e0 }, \
+ { RT2860_BCN_OFFSET1, 0x6f77d0c8 }, \
{ RT2860_LEGACY_BASIC_RATE, 0x0000013f }, \
{ RT2860_HT_BASIC_RATE, 0x00008003 }, \
{ RT2860_MAC_SYS_CTRL, 0x00000000 }, \
+ { RT2860_RX_FILTR_CFG, 0x00017f97 }, \
{ RT2860_BKOFF_SLOT_CFG, 0x00000209 }, \
{ RT2860_TX_SW_CFG0, 0x00000000 }, \
{ RT2860_TX_SW_CFG1, 0x00080606 }, \
{ RT2860_TX_LINK_CFG, 0x00001020 }, \
{ RT2860_TX_TIMEOUT_CFG, 0x000a2090 }, \
+ { RT2860_MAX_LEN_CFG, 0x00001f00 }, \
{ RT2860_LED_CFG, 0x7f031e46 }, \
{ RT2860_WMM_AIFSN_CFG, 0x00002273 }, \
{ RT2860_WMM_CWMIN_CFG, 0x00002344 }, \
@@ -1028,42 +1049,9 @@ static const struct rt2860_rate {
{ RT2860_MM20_PROT_CFG, 0x01744004 }, \
{ RT2860_MM40_PROT_CFG, 0x03f54084 }, \
{ RT2860_TXOP_CTRL_CFG, 0x0000583f }, \
- { RT2860_TXOP_HLDR_ET, 0x00000002 }, \
{ RT2860_TX_RTS_CFG, 0x00092b20 }, \
{ RT2860_EXP_ACK_TIME, 0x002400ca }, \
- { RT2860_XIFS_TIME_CFG, 0x33a41010 }, \
- { RT2860_PWR_PIN_CFG, 0x00000003 }
-
-/* XXX only a few registers differ from above, try to merge? */
-#define RT2870_DEF_MAC \
- { RT2860_BCN_OFFSET0, 0xf8f0e8e0 }, \
- { RT2860_LEGACY_BASIC_RATE, 0x0000013f }, \
- { RT2860_HT_BASIC_RATE, 0x00008003 }, \
- { RT2860_MAC_SYS_CTRL, 0x00000000 }, \
- { RT2860_BKOFF_SLOT_CFG, 0x00000209 }, \
- { RT2860_TX_SW_CFG0, 0x00000000 }, \
- { RT2860_TX_SW_CFG1, 0x00080606 }, \
- { RT2860_TX_LINK_CFG, 0x00001020 }, \
- { RT2860_TX_TIMEOUT_CFG, 0x000a2090 }, \
- { RT2860_LED_CFG, 0x7f031e46 }, \
- { RT2860_WMM_AIFSN_CFG, 0x00002273 }, \
- { RT2860_WMM_CWMIN_CFG, 0x00002344 }, \
- { RT2860_WMM_CWMAX_CFG, 0x000034aa }, \
- { RT2860_MAX_PCNT, 0x1f3fbf9f }, \
- { RT2860_TX_RTY_CFG, 0x47d01f0f }, \
- { RT2860_AUTO_RSP_CFG, 0x00000013 }, \
- { RT2860_CCK_PROT_CFG, 0x05740003 }, \
- { RT2860_OFDM_PROT_CFG, 0x05740003 }, \
- { RT2860_PBF_CFG, 0x00f40006 }, \
- { RT2860_WPDMA_GLO_CFG, 0x00000030 }, \
- { RT2860_GF20_PROT_CFG, 0x01744004 }, \
- { RT2860_GF40_PROT_CFG, 0x03f44084 }, \
- { RT2860_MM20_PROT_CFG, 0x01744004 }, \
- { RT2860_MM40_PROT_CFG, 0x03f44084 }, \
- { RT2860_TXOP_CTRL_CFG, 0x0000583f }, \
{ RT2860_TXOP_HLDR_ET, 0x00000002 }, \
- { RT2860_TX_RTS_CFG, 0x00092b20 }, \
- { RT2860_EXP_ACK_TIME, 0x002400ca }, \
{ RT2860_XIFS_TIME_CFG, 0x33a41010 }, \
{ RT2860_PWR_PIN_CFG, 0x00000003 }
@@ -1073,6 +1061,7 @@ static const struct rt2860_rate {
#define RT2860_DEF_BBP \
{ 65, 0x2c }, \
{ 66, 0x38 }, \
+ { 68, 0x0b }, \
{ 69, 0x12 }, \
{ 70, 0x0a }, \
{ 73, 0x10 }, \
@@ -1087,6 +1076,30 @@ static const struct rt2860_rate {
{ 105, 0x05 }, \
{ 106, 0x35 }
+#define RT5390_DEF_BBP \
+ { 31, 0x08 }, \
+ { 65, 0x2c }, \
+ { 66, 0x38 }, \
+ { 68, 0x0b }, \
+ { 69, 0x12 }, \
+ { 70, 0x0a }, \
+ { 73, 0x13 }, \
+ { 75, 0x46 }, \
+ { 76, 0x28 }, \
+ { 77, 0x59 }, \
+ { 81, 0x37 }, \
+ { 82, 0x62 }, \
+ { 83, 0x7a }, \
+ { 84, 0x19 }, \
+ { 86, 0x38 }, \
+ { 91, 0x04 }, \
+ { 92, 0x02 }, \
+ { 103, 0xc0 }, \
+ { 104, 0x92 }, \
+ { 105, 0x3c }, \
+ { 106, 0x03 }, \
+ { 128, 0x12 }, \
+
/*
* Default settings for RF registers; values derived from the reference driver.
*/
@@ -1204,7 +1217,7 @@ static const struct rt2860_rate {
{ 4, 0x40 }, \
{ 5, 0x03 }, \
{ 6, 0x02 }, \
- { 7, 0x70 }, \
+ { 7, 0x60 }, \
{ 9, 0x0f }, \
{ 10, 0x41 }, \
{ 11, 0x21 }, \
@@ -1221,35 +1234,122 @@ static const struct rt2860_rate {
{ 25, 0x01 }, \
{ 29, 0x1f }
-#define RT3572_DEF_RF \
- { 0, 0x70 }, \
- { 1, 0x81 }, \
- { 2, 0xf1 }, \
- { 3, 0x02 }, \
- { 4, 0x4c }, \
- { 5, 0x05 }, \
- { 6, 0x4a }, \
- { 7, 0xd8 }, \
- { 9, 0xc3 }, \
- { 10, 0xf1 }, \
- { 11, 0xb9 }, \
- { 12, 0x70 }, \
- { 13, 0x65 }, \
- { 14, 0xa0 }, \
- { 15, 0x53 }, \
- { 16, 0x4c }, \
- { 17, 0x23 }, \
- { 18, 0xac }, \
- { 19, 0x93 }, \
- { 20, 0xb3 }, \
- { 21, 0xd0 }, \
- { 22, 0x00 }, \
- { 23, 0x3c }, \
- { 24, 0x16 }, \
- { 25, 0x15 }, \
- { 26, 0x85 }, \
- { 27, 0x00 }, \
+#define RT5390_DEF_RF \
+ { 1, 0x0f }, \
+ { 2, 0x80 }, \
+ { 3, 0x88 }, \
+ { 5, 0x10 }, \
+ { 6, 0xe0 }, \
+ { 7, 0x00 }, \
+ { 10, 0x53 }, \
+ { 11, 0x4a }, \
+ { 12, 0x46 }, \
+ { 13, 0x9f }, \
+ { 14, 0x00 }, \
+ { 15, 0x00 }, \
+ { 16, 0x00 }, \
+ { 18, 0x03 }, \
+ { 19, 0x00 }, \
+ { 20, 0x00 }, \
+ { 21, 0x00 }, \
+ { 22, 0x20 }, \
+ { 23, 0x00 }, \
+ { 24, 0x00 }, \
+ { 25, 0x80 }, \
+ { 26, 0x00 }, \
+ { 27, 0x09 }, \
+ { 28, 0x00 }, \
+ { 29, 0x10 }, \
+ { 30, 0x10 }, \
+ { 31, 0x80 }, \
+ { 32, 0x80 }, \
+ { 33, 0x00 }, \
+ { 34, 0x07 }, \
+ { 35, 0x12 }, \
+ { 36, 0x00 }, \
+ { 37, 0x08 }, \
+ { 38, 0x85 }, \
+ { 39, 0x1b }, \
+ { 40, 0x0b }, \
+ { 41, 0xbb }, \
+ { 42, 0xd2 }, \
+ { 43, 0x9a }, \
+ { 44, 0x0e }, \
+ { 45, 0xa2 }, \
+ { 46, 0x73 }, \
+ { 47, 0x00 }, \
+ { 48, 0x10 }, \
+ { 49, 0x94 }, \
+ { 52, 0x38 }, \
+ { 53, 0x00 }, \
+ { 54, 0x78 }, \
+ { 55, 0x23 }, \
+ { 56, 0x22 }, \
+ { 57, 0x80 }, \
+ { 58, 0x7f }, \
+ { 59, 0x07 }, \
+ { 60, 0x45 }, \
+ { 61, 0xd1 }, \
+ { 62, 0x00 }, \
+ { 63, 0x00 }
+
+#define RT5392_DEF_RF \
+ { 1, 0x17 }, \
+ { 2, 0x80 }, \
+ { 3, 0x88 }, \
+ { 5, 0x10 }, \
+ { 6, 0xe0 }, \
+ { 7, 0x00 }, \
+ { 10, 0x53 }, \
+ { 11, 0x4a }, \
+ { 12, 0x46 }, \
+ { 13, 0x9f }, \
+ { 14, 0x00 }, \
+ { 15, 0x00 }, \
+ { 16, 0x00 }, \
+ { 18, 0x03 }, \
+ { 19, 0x4d }, \
+ { 20, 0x00 }, \
+ { 21, 0x8d }, \
+ { 22, 0x20 }, \
+ { 23, 0x0b }, \
+ { 24, 0x44 }, \
+ { 25, 0x80 }, \
+ { 26, 0x82 }, \
+ { 27, 0x09 }, \
{ 28, 0x00 }, \
- { 29, 0x9b }, \
- { 30, 0x09 }, \
- { 31, 0x10 }
+ { 29, 0x10 }, \
+ { 30, 0x10 }, \
+ { 31, 0x80 }, \
+ { 32, 0x80 }, \
+ { 33, 0xc0 }, \
+ { 34, 0x07 }, \
+ { 35, 0x12 }, \
+ { 36, 0x00 }, \
+ { 37, 0x08 }, \
+ { 38, 0x89 }, \
+ { 39, 0x1b }, \
+ { 40, 0x0f }, \
+ { 41, 0xbb }, \
+ { 42, 0xd5 }, \
+ { 43, 0x9b }, \
+ { 44, 0x0e }, \
+ { 45, 0xa2 }, \
+ { 46, 0x73 }, \
+ { 47, 0x0c }, \
+ { 48, 0x10 }, \
+ { 49, 0x94 }, \
+ { 50, 0x94 }, \
+ { 51, 0x3a }, \
+ { 52, 0x48 }, \
+ { 53, 0x44 }, \
+ { 54, 0x38 }, \
+ { 55, 0x43 }, \
+ { 56, 0xa1 }, \
+ { 57, 0x00 }, \
+ { 58, 0x39 }, \
+ { 59, 0x07 }, \
+ { 60, 0x45 }, \
+ { 61, 0x91 }, \
+ { 62, 0x39 }, \
+ { 63, 0x00 }
diff --git a/sys/dev/smc/if_smc.c b/sys/dev/smc/if_smc.c
index af8a5bd..407482e 100644
--- a/sys/dev/smc/if_smc.c
+++ b/sys/dev/smc/if_smc.c
@@ -527,7 +527,7 @@ smc_start_locked(struct ifnet *ifp)
* Work out how many 256 byte "pages" we need. We have to include the
* control data for the packet in this calculation.
*/
- npages = (len * PKT_CTRL_DATA_LEN) >> 8;
+ npages = (len + PKT_CTRL_DATA_LEN) >> 8;
if (npages == 0)
npages = 1;
@@ -805,12 +805,24 @@ static int
smc_intr(void *context)
{
struct smc_softc *sc;
-
+ uint32_t curbank;
+
sc = (struct smc_softc *)context;
+
+ /*
+ * Save current bank and restore later in this function
+ */
+ curbank = (smc_read_2(sc, BSR) & BSR_BANK_MASK);
+
/*
* Block interrupts in order to let smc_task_intr to kick in
*/
+ smc_select_bank(sc, 2);
smc_write_1(sc, MSK, 0);
+
+ /* Restore bank */
+ smc_select_bank(sc, curbank);
+
taskqueue_enqueue_fast(sc->smc_tq, &sc->smc_intr);
return (FILTER_HANDLED);
}
@@ -844,13 +856,19 @@ smc_task_intr(void *context, int pending)
*/
packet = smc_read_1(sc, FIFO_TX);
if ((packet & FIFO_EMPTY) == 0) {
+ callout_stop(&sc->smc_watchdog);
+ smc_select_bank(sc, 2);
smc_write_1(sc, PNR, packet);
smc_write_2(sc, PTR, 0 | PTR_READ |
PTR_AUTO_INCR);
- tcr = smc_read_2(sc, DATA0);
+ smc_select_bank(sc, 0);
+ tcr = smc_read_2(sc, EPHSR);
+#if 0
if ((tcr & EPHSR_TX_SUC) == 0)
device_printf(sc->smc_dev,
"bad packet\n");
+#endif
+ smc_select_bank(sc, 2);
smc_mmu_wait(sc);
smc_write_2(sc, MMUCR, MMUCR_CMD_RELEASE_PKT);
@@ -921,6 +939,7 @@ smc_task_intr(void *context, int pending)
/*
* Update the interrupt mask.
*/
+ smc_select_bank(sc, 2);
if ((ifp->if_capenable & IFCAP_POLLING) == 0)
smc_write_1(sc, MSK, sc->smc_mask);
diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c
index 1051797..5f11bba 100644
--- a/sys/dev/sound/usb/uaudio.c
+++ b/sys/dev/sound/usb/uaudio.c
@@ -111,6 +111,7 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, default_channels, CTLFLAG_RWTUN,
&uaudio_default_channels, 0, "uaudio default sample channels");
#endif
+#define UAUDIO_IRQS (8000 / UAUDIO_NFRAMES) /* interrupts per second */
#define UAUDIO_NFRAMES 64 /* must be factor of 8 due HS-USB */
#define UAUDIO_NCHANBUFS 2 /* number of outstanding request */
#define UAUDIO_RECURSE_LIMIT 255 /* rounds */
@@ -189,7 +190,6 @@ struct uaudio_chan_alt {
uint8_t iface_index;
uint8_t iface_alt_index;
uint8_t channels;
- uint8_t enable_sync;
};
struct uaudio_chan {
@@ -226,11 +226,12 @@ struct uaudio_chan {
#define CHAN_OP_STOP 2
#define CHAN_OP_DRAIN 3
- uint8_t last_sync_time;
- uint8_t last_sync_state;
-#define UAUDIO_SYNC_NONE 0
-#define UAUDIO_SYNC_MORE 1
-#define UAUDIO_SYNC_LESS 2
+ /* USB audio feedback endpoint state */
+ struct {
+ uint16_t time; /* I/O interrupt count */
+ int16_t constant; /* sample rate adjustment in Hz */
+ int16_t remainder; /* current remainder */
+ } feedback;
};
#define UMIDI_EMB_JACK_MAX 16 /* units */
@@ -1799,14 +1800,6 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, struct usb_device *udev,
chan_alt->iface_index = curidx;
chan_alt->iface_alt_index = alt_index;
- if (UEP_HAS_SYNCADDR(ed1) && ed1->bSynchAddress != 0) {
- DPRINTF("Sync endpoint will be used, if present\n");
- chan_alt->enable_sync = 1;
- } else {
- DPRINTF("Sync endpoint will not be used\n");
- chan_alt->enable_sync = 0;
- }
-
usbd_set_parent_iface(sc->sc_udev, curidx,
sc->sc_mixer_iface_index);
@@ -2016,29 +2009,44 @@ uaudio_chan_play_sync_callback(struct usb_xfer *xfer, usb_error_t error)
if (temp == 0)
break;
- /* correctly scale value */
-
- temp = (temp * 125ULL) - 64;
+ temp *= 125ULL;
/* auto adjust */
-
while (temp < (sample_rate - (sample_rate / 4)))
temp *= 2;
-
+
while (temp > (sample_rate + (sample_rate / 2)))
temp /= 2;
- /* compare */
-
- DPRINTF("Comparing %d < %d\n",
- (int)temp, (int)sample_rate);
+ /*
+ * Some USB audio devices only report a sample rate
+ * different from the nominal one when they want one
+ * more or less sample. Make sure we catch this case
+ * by pulling the sample rate offset slowly towards
+ * zero if the reported value is equal to the sample
+ * rate.
+ */
+ if (temp > sample_rate)
+ ch->feedback.constant += 1;
+ else if (temp < sample_rate)
+ ch->feedback.constant -= 1;
+ else if (ch->feedback.constant > 0)
+ ch->feedback.constant--;
+ else if (ch->feedback.constant < 0)
+ ch->feedback.constant++;
+
+ DPRINTF("Comparing %d Hz :: %d Hz :: %d samples drift\n",
+ (int)temp, (int)sample_rate, (int)ch->feedback.constant);
- if (temp == sample_rate)
- ch->last_sync_state = UAUDIO_SYNC_NONE;
- else if (temp > sample_rate)
- ch->last_sync_state = UAUDIO_SYNC_MORE;
- else
- ch->last_sync_state = UAUDIO_SYNC_LESS;
+ /*
+ * Range check sync constant. We cannot change the
+ * number of samples per second by more than the value
+ * defined by "UAUDIO_IRQS":
+ */
+ if (ch->feedback.constant > UAUDIO_IRQS)
+ ch->feedback.constant = UAUDIO_IRQS;
+ else if (ch->feedback.constant < -UAUDIO_IRQS)
+ ch->feedback.constant = -UAUDIO_IRQS;
break;
case USB_ST_SETUP:
@@ -2082,10 +2090,10 @@ tr_transferred:
}
chn_intr(ch->pcm_ch);
- /* start SYNC transfer, if any */
- if (ch->usb_alt[ch->cur_alt].enable_sync != 0) {
- if ((ch->last_sync_time++ & 7) == 0)
- usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]);
+ /* start the SYNC transfer one time per second, if any */
+ if (++(ch->feedback.time) >= UAUDIO_IRQS) {
+ ch->feedback.time = 0;
+ usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]);
}
case USB_ST_SETUP:
@@ -2120,21 +2128,22 @@ tr_transferred:
}
if (n == (blockcount - 1)) {
- switch (ch->last_sync_state) {
- case UAUDIO_SYNC_MORE:
+ /*
+ * Update sync remainder and check if
+ * we should transmit more or less
+ * data:
+ */
+ ch->feedback.remainder += ch->feedback.constant;
+ if (ch->feedback.remainder >= UAUDIO_IRQS) {
+ ch->feedback.remainder -= UAUDIO_IRQS;
DPRINTFN(6, "sending one sample more\n");
if ((frame_len + sample_size) <= mfl)
frame_len += sample_size;
- ch->last_sync_state = UAUDIO_SYNC_NONE;
- break;
- case UAUDIO_SYNC_LESS:
+ } else if (ch->feedback.remainder <= -UAUDIO_IRQS) {
+ ch->feedback.remainder += UAUDIO_IRQS;
DPRINTFN(6, "sending one sample less\n");
if (frame_len >= sample_size)
frame_len -= sample_size;
- ch->last_sync_state = UAUDIO_SYNC_NONE;
- break;
- default:
- break;
}
}
@@ -2452,6 +2461,9 @@ uaudio_chan_start(struct uaudio_chan *ch)
}
usb_proc_explore_unlock(sc->sc_udev);
+ /* reset feedback endpoint state */
+ memset(&ch->feedback, 0, sizeof(ch->feedback));
+
if (do_start) {
usbd_transfer_start(ch->xfer[0]);
usbd_transfer_start(ch->xfer[1]);
diff --git a/sys/dev/vt/font/vt_mouse_cursor.c b/sys/dev/vt/font/vt_mouse_cursor.c
index 4f12991..5e01215 100644
--- a/sys/dev/vt/font/vt_mouse_cursor.c
+++ b/sys/dev/vt/font/vt_mouse_cursor.c
@@ -35,36 +35,42 @@ __FBSDID("$FreeBSD$");
#ifndef SC_NO_CUTPASTE
struct vt_mouse_cursor vt_default_mouse_pointer = {
.map = {
- 0x00, /* "__ " */
- 0x40, /* "_*_ " */
- 0x60, /* "_**_ " */
- 0x70, /* "_***_ " */
- 0x78, /* "_****_ " */
- 0x7c, /* "_*****_ " */
- 0x7e, /* "_******_" */
- 0x68, /* "_**_****" */
- 0x4c, /* "_*__**_ " */
- 0x0c, /* " _ _**_ " */
- 0x06, /* " _**_" */
- 0x06, /* " _**_" */
- 0x00, /* " ____" */
+ 0x00, 0x00, /* "__ " */
+ 0x40, 0x00, /* "_*_ " */
+ 0x60, 0x00, /* "_**_ " */
+ 0x70, 0x00, /* "_***_ " */
+ 0x78, 0x00, /* "_****_ " */
+ 0x7c, 0x00, /* "_*****_ " */
+ 0x7e, 0x00, /* "_******_ " */
+ 0x7f, 0x00, /* "_*******_ " */
+ 0x7f, 0x80, /* "_********_" */
+ 0x7c, 0x00, /* "_*****____" */
+ 0x6c, 0x00, /* "_**_**_ " */
+ 0x46, 0x00, /* "_*_ _**_ " */
+ 0x06, 0x00, /* "__ _**_ " */
+ 0x03, 0x00, /* " _**_ " */
+ 0x03, 0x00, /* " _**_ " */
+ 0x00, 0x00, /* " __ " */
},
.mask = {
- 0xc0, /* "__ " */
- 0xe0, /* "___ " */
- 0xf0, /* "____ " */
- 0xf8, /* "_____ " */
- 0xfc, /* "______ " */
- 0xfe, /* "_______ " */
- 0xff, /* "________" */
- 0xff, /* "________" */
- 0xfe, /* "_______ " */
- 0x5e, /* " _ ____ " */
- 0x0f, /* " ____" */
- 0x0f, /* " ____" */
- 0x0f, /* " ____" */
+ 0xc0, 0x00, /* "__ " */
+ 0xe0, 0x00, /* "___ " */
+ 0xf0, 0x00, /* "____ " */
+ 0xf8, 0x00, /* "_____ " */
+ 0xfc, 0x00, /* "______ " */
+ 0xfe, 0x00, /* "_______ " */
+ 0xff, 0x00, /* "________ " */
+ 0xff, 0x80, /* "_________ " */
+ 0xff, 0xc0, /* "__________" */
+ 0xff, 0xc0, /* "__________" */
+ 0xfe, 0x00, /* "_______ " */
+ 0xef, 0x00, /* "___ ____ " */
+ 0xcf, 0x00, /* "__ ____ " */
+ 0x07, 0x80, /* " ____ " */
+ 0x07, 0x80, /* " ____ " */
+ 0x03, 0x00, /* " __ " */
},
- .width = 8,
- .height = 13,
+ .width = 10,
+ .height = 16,
};
#endif
diff --git a/sys/fs/autofs/autofs.c b/sys/fs/autofs/autofs.c
index 2e08c3d..c4b1ec3 100644
--- a/sys/fs/autofs/autofs.c
+++ b/sys/fs/autofs/autofs.c
@@ -584,6 +584,34 @@ autofs_ioctl_request(struct autofs_daemon_request *adr)
}
static int
+autofs_ioctl_done_101(struct autofs_daemon_done_101 *add)
+{
+ struct autofs_request *ar;
+
+ sx_xlock(&autofs_softc->sc_lock);
+ TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) {
+ if (ar->ar_id == add->add_id)
+ break;
+ }
+
+ if (ar == NULL) {
+ sx_xunlock(&autofs_softc->sc_lock);
+ AUTOFS_DEBUG("id %d not found", add->add_id);
+ return (ESRCH);
+ }
+
+ ar->ar_error = add->add_error;
+ ar->ar_wildcards = true;
+ ar->ar_done = true;
+ ar->ar_in_progress = false;
+ cv_broadcast(&autofs_softc->sc_cv);
+
+ sx_xunlock(&autofs_softc->sc_lock);
+
+ return (0);
+}
+
+static int
autofs_ioctl_done(struct autofs_daemon_done *add)
{
struct autofs_request *ar;
@@ -658,6 +686,9 @@ autofs_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int mode,
case AUTOFSREQUEST:
return (autofs_ioctl_request(
(struct autofs_daemon_request *)arg));
+ case AUTOFSDONE101:
+ return (autofs_ioctl_done_101(
+ (struct autofs_daemon_done_101 *)arg));
case AUTOFSDONE:
return (autofs_ioctl_done(
(struct autofs_daemon_done *)arg));
diff --git a/sys/fs/autofs/autofs_ioctl.h b/sys/fs/autofs/autofs_ioctl.h
index 328dd9c..92d7314 100644
--- a/sys/fs/autofs/autofs_ioctl.h
+++ b/sys/fs/autofs/autofs_ioctl.h
@@ -71,6 +71,21 @@ struct autofs_daemon_request {
char adr_options[MAXPATHLEN];
};
+/*
+ * Compatibility with 10.1-RELEASE automountd(8).
+ */
+struct autofs_daemon_done_101 {
+ /*
+ * Identifier, copied from adr_id.
+ */
+ int add_id;
+
+ /*
+ * Error number, possibly returned to userland.
+ */
+ int add_error;
+};
+
struct autofs_daemon_done {
/*
* Identifier, copied from adr_id.
@@ -87,9 +102,15 @@ struct autofs_daemon_done {
* Error number, possibly returned to userland.
*/
int add_error;
+
+ /*
+ * Reserved for future use.
+ */
+ int add_spare[7];
};
#define AUTOFSREQUEST _IOR('I', 0x01, struct autofs_daemon_request)
-#define AUTOFSDONE _IOW('I', 0x02, struct autofs_daemon_done)
+#define AUTOFSDONE101 _IOW('I', 0x02, struct autofs_daemon_done_101)
+#define AUTOFSDONE _IOW('I', 0x03, struct autofs_daemon_done)
#endif /* !AUTOFS_IOCTL_H */
diff --git a/sys/i386/i386/db_disasm.c b/sys/i386/i386/db_disasm.c
index db2c20d..901cff1 100644
--- a/sys/i386/i386/db_disasm.c
+++ b/sys/i386/i386/db_disasm.c
@@ -195,6 +195,26 @@ static const struct inst db_inst_0f0x[] = {
/*0f*/ { "", FALSE, NONE, 0, 0 },
};
+static const struct inst db_inst_0f1x[] = {
+/*10*/ { "", FALSE, NONE, 0, 0 },
+/*11*/ { "", FALSE, NONE, 0, 0 },
+/*12*/ { "", FALSE, NONE, 0, 0 },
+/*13*/ { "", FALSE, NONE, 0, 0 },
+/*14*/ { "", FALSE, NONE, 0, 0 },
+/*15*/ { "", FALSE, NONE, 0, 0 },
+/*16*/ { "", FALSE, NONE, 0, 0 },
+/*17*/ { "", FALSE, NONE, 0, 0 },
+
+/*18*/ { "", FALSE, NONE, 0, 0 },
+/*19*/ { "", FALSE, NONE, 0, 0 },
+/*1a*/ { "", FALSE, NONE, 0, 0 },
+/*1b*/ { "", FALSE, NONE, 0, 0 },
+/*1c*/ { "", FALSE, NONE, 0, 0 },
+/*1d*/ { "", FALSE, NONE, 0, 0 },
+/*1e*/ { "", FALSE, NONE, 0, 0 },
+/*1f*/ { "nopl", TRUE, SDEP, 0, "nopw" },
+};
+
static const struct inst db_inst_0f2x[] = {
/*20*/ { "mov", TRUE, LONG, op2(CR,El), 0 },
/*21*/ { "mov", TRUE, LONG, op2(DR,El), 0 },
@@ -356,7 +376,7 @@ static const struct inst db_inst_0fcx[] = {
static const struct inst * const db_inst_0f[] = {
db_inst_0f0x,
- 0,
+ db_inst_0f1x,
db_inst_0f2x,
db_inst_0f3x,
db_inst_0f4x,
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 655866d..41da3dd 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -3225,14 +3225,13 @@ out:
static int
coredump_sanitise_path(const char *path)
{
- size_t len, i;
+ size_t i;
/*
* Only send a subset of ASCII to devd(8) because it
* might pass these strings to sh -c.
*/
- len = strlen(path);
- for (i = 0; i < len; i++)
+ for (i = 0; path[i]; i++)
if (!(isalpha(path[i]) || isdigit(path[i])) &&
path[i] != '/' && path[i] != '.' &&
path[i] != '-')
@@ -3262,9 +3261,11 @@ coredump(struct thread *td)
void *rl_cookie;
off_t limit;
int compress;
- char data[MAXPATHLEN * 2 + 16]; /* space for devctl notification */
+ char *data = NULL;
char *fullpath, *freepath = NULL;
size_t len;
+ static const char comm_name[] = "comm=";
+ static const char core_name[] = "core=";
#ifdef COMPRESS_USER_CORES
compress = compress_user_cores;
@@ -3358,27 +3359,29 @@ close:
*/
if (coredump_devctl == 0)
goto out;
+ len = MAXPATHLEN * 2 + sizeof(comm_name) - 1 +
+ sizeof(' ') + sizeof(core_name) - 1;
+ data = malloc(len, M_TEMP, M_WAITOK);
if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0)
goto out;
if (!coredump_sanitise_path(fullpath))
goto out;
- snprintf(data, sizeof(data), "comm=%s ", fullpath);
+ snprintf(data, len, "%s%s ", comm_name, fullpath);
free(freepath, M_TEMP);
freepath = NULL;
- if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) {
- printf("could not find coredump\n");
+ if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0)
goto out;
- }
if (!coredump_sanitise_path(fullpath))
goto out;
- strlcat(data, "core=", sizeof(data));
- len = strlcat(data, fullpath, sizeof(data));
+ strlcat(data, core_name, len);
+ strlcat(data, fullpath, len);
devctl_notify("kernel", "signal", "coredump", data);
out:
#ifdef AUDIT
audit_proc_coredump(td, name, error);
#endif
free(freepath, M_TEMP);
+ free(data, M_TEMP);
free(name, M_TEMP);
return (error);
}
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index c8eb6d8..a934af7 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -135,7 +135,6 @@ u_int callwheelsize, callwheelmask;
* the migrating callout is already running.
*/
struct cc_exec {
- struct callout *cc_next;
struct callout *cc_curr;
#ifdef SMP
void (*ce_migration_func)(void *);
@@ -155,6 +154,7 @@ struct cc_exec {
struct callout_cpu {
struct mtx_padalign cc_lock;
struct cc_exec cc_exec_entity[2];
+ struct callout *cc_next;
struct callout *cc_callout;
struct callout_list *cc_callwheel;
struct callout_tailq cc_expireq;
@@ -167,7 +167,7 @@ struct callout_cpu {
};
#define cc_exec_curr(cc, dir) cc->cc_exec_entity[dir].cc_curr
-#define cc_exec_next(cc, dir) cc->cc_exec_entity[dir].cc_next
+#define cc_exec_next(cc) cc->cc_next
#define cc_exec_cancel(cc, dir) cc->cc_exec_entity[dir].cc_cancel
#define cc_exec_waiting(cc, dir) cc->cc_exec_entity[dir].cc_waiting
#ifdef SMP
@@ -226,7 +226,6 @@ cc_cce_cleanup(struct callout_cpu *cc, int direct)
{
cc_exec_curr(cc, direct) = NULL;
- cc_exec_next(cc, direct) = NULL;
cc_exec_cancel(cc, direct) = false;
cc_exec_waiting(cc, direct) = false;
#ifdef SMP
@@ -482,7 +481,7 @@ callout_process(sbintime_t now)
#ifdef CALLOUT_PROFILING
++depth_dir;
#endif
- cc_exec_next(cc, 1) =
+ cc_exec_next(cc) =
LIST_NEXT(tmp, c_links.le);
cc->cc_bucket = firstb & callwheelmask;
LIST_REMOVE(tmp, c_links.le);
@@ -491,7 +490,8 @@ callout_process(sbintime_t now)
&mpcalls_dir, &lockcalls_dir, NULL,
#endif
1);
- tmp = cc_exec_next(cc, 1);
+ tmp = cc_exec_next(cc);
+ cc_exec_next(cc) = NULL;
} else {
tmpn = LIST_NEXT(tmp, c_links.le);
LIST_REMOVE(tmp, c_links.le);
@@ -575,7 +575,7 @@ callout_lock(struct callout *c)
static void
callout_cc_add(struct callout *c, struct callout_cpu *cc,
sbintime_t sbt, sbintime_t precision, void (*func)(void *),
- void *arg, int cpu, int flags, int direct)
+ void *arg, int cpu, int flags)
{
int bucket;
@@ -584,8 +584,6 @@ callout_cc_add(struct callout *c, struct callout_cpu *cc,
sbt = cc->cc_lastscan;
c->c_arg = arg;
c->c_flags |= (CALLOUT_ACTIVE | CALLOUT_PENDING);
- if (flags & C_DIRECT_EXEC)
- c->c_flags |= CALLOUT_DIRECT;
c->c_flags &= ~CALLOUT_PROCESSED;
c->c_func = func;
c->c_time = sbt;
@@ -596,7 +594,7 @@ callout_cc_add(struct callout *c, struct callout_cpu *cc,
(u_int)(c->c_precision & 0xffffffff));
LIST_INSERT_HEAD(&cc->cc_callwheel[bucket], c, c_links.le);
if (cc->cc_bucket == bucket)
- cc_exec_next(cc, direct) = c;
+ cc_exec_next(cc) = c;
#ifndef NO_EVENTTIMERS
/*
* Inform the eventtimers(4) subsystem there's a new callout
@@ -790,7 +788,7 @@ skip:
new_cc = callout_cpu_switch(c, cc, new_cpu);
flags = (direct) ? C_DIRECT_EXEC : 0;
callout_cc_add(c, new_cc, new_time, new_prec, new_func,
- new_arg, new_cpu, flags, direct);
+ new_arg, new_cpu, flags);
CC_UNLOCK(new_cc);
CC_LOCK(cc);
#else
@@ -994,6 +992,14 @@ callout_reset_sbt_on(struct callout *c, sbintime_t sbt, sbintime_t precision,
*/
if (c->c_flags & CALLOUT_LOCAL_ALLOC)
cpu = c->c_cpu;
+ /*
+ * This flag used to be added by callout_cc_add, but the
+ * first time you call this we could end up with the
+ * wrong direct flag if we don't do it before we add.
+ */
+ if (flags & C_DIRECT_EXEC) {
+ c->c_flags |= CALLOUT_DIRECT;
+ }
direct = (c->c_flags & CALLOUT_DIRECT) != 0;
KASSERT(!direct || c->c_lock == NULL,
("%s: direct callout %p has lock", __func__, c));
@@ -1039,8 +1045,8 @@ callout_reset_sbt_on(struct callout *c, sbintime_t sbt, sbintime_t precision,
}
if (c->c_flags & CALLOUT_PENDING) {
if ((c->c_flags & CALLOUT_PROCESSED) == 0) {
- if (cc_exec_next(cc, direct) == c)
- cc_exec_next(cc, direct) = LIST_NEXT(c, c_links.le);
+ if (cc_exec_next(cc) == c)
+ cc_exec_next(cc) = LIST_NEXT(c, c_links.le);
LIST_REMOVE(c, c_links.le);
} else
TAILQ_REMOVE(&cc->cc_expireq, c, c_links.tqe);
@@ -1089,7 +1095,7 @@ callout_reset_sbt_on(struct callout *c, sbintime_t sbt, sbintime_t precision,
}
#endif
- callout_cc_add(c, cc, to_sbt, precision, ftn, arg, cpu, flags, direct);
+ callout_cc_add(c, cc, to_sbt, precision, ftn, arg, cpu, flags);
CTR6(KTR_CALLOUT, "%sscheduled %p func %p arg %p in %d.%08x",
cancelled ? "re" : "", c, c->c_func, c->c_arg, (int)(to_sbt >> 32),
(u_int)(to_sbt & 0xffffffff));
@@ -1322,8 +1328,8 @@ again:
c, c->c_func, c->c_arg);
if (not_on_a_list == 0) {
if ((c->c_flags & CALLOUT_PROCESSED) == 0) {
- if (cc_exec_next(cc, direct) == c)
- cc_exec_next(cc, direct) = LIST_NEXT(c, c_links.le);
+ if (cc_exec_next(cc) == c)
+ cc_exec_next(cc) = LIST_NEXT(c, c_links.le);
LIST_REMOVE(c, c_links.le);
} else
TAILQ_REMOVE(&cc->cc_expireq, c, c_links.tqe);
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c
index 15ee910..cbc465a 100644
--- a/sys/kern/sysv_shm.c
+++ b/sys/kern/sysv_shm.c
@@ -706,9 +706,10 @@ shmget_allocate_segment(td, uap, mode)
#endif
return (ENOMEM);
}
+ shm_object->pg_color = 0;
VM_OBJECT_WLOCK(shm_object);
vm_object_clear_flag(shm_object, OBJ_ONEMAPPING);
- vm_object_set_flag(shm_object, OBJ_NOSPLIT);
+ vm_object_set_flag(shm_object, OBJ_COLORED | OBJ_NOSPLIT);
VM_OBJECT_WUNLOCK(shm_object);
shmseg->object = shm_object;
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index b2b4969..09fa7ed 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -888,12 +888,18 @@ vfs_domount_update(
ASSERT_VOP_ELOCKED(vp, __func__);
KASSERT((fsflags & MNT_UPDATE) != 0, ("MNT_UPDATE should be here"));
+ mp = vp->v_mount;
if ((vp->v_vflag & VV_ROOT) == 0) {
+ if (vfs_copyopt(*optlist, "export", &export, sizeof(export))
+ == 0)
+ error = EXDEV;
+ else
+ error = EINVAL;
vput(vp);
- return (EINVAL);
+ return (error);
}
- mp = vp->v_mount;
+
/*
* We only allow the filesystem to be reloaded if it
* is currently mounted read-only.
diff --git a/sys/modules/dtrace/Makefile b/sys/modules/dtrace/Makefile
index 08b6937..94a7a42 100644
--- a/sys/modules/dtrace/Makefile
+++ b/sys/modules/dtrace/Makefile
@@ -22,5 +22,7 @@ SUBDIR+= fbt fasttrap
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64"
SUBDIR+= systrace_freebsd32
.endif
-
+.if ${MACHINE_CPUARCH} == "arm"
+SUBDIR+= fbt
+.endif
.include <bsd.subdir.mk>
diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile
index 5492c6f..417266c 100644
--- a/sys/modules/dtrace/dtrace/Makefile
+++ b/sys/modules/dtrace/dtrace/Makefile
@@ -53,6 +53,11 @@ EXPORT_SYMS= dtrace_register \
dtrace_asm.o: assym.s
+.if ${MACHINE_CPUARCH} == "arm"
+assym.o: assym.s
+ ${AS} -meabi=5 -o assym.o assym.s
+.endif
+
.include <bsd.kmod.mk>
CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index b5e285e..673dc25 100644
--- a/sys/netgraph/ng_base.c
+++ b/sys/netgraph/ng_base.c
@@ -2952,7 +2952,7 @@ uma_zone_t ng_qzone;
uma_zone_t ng_qdzone;
static int numthreads = 0; /* number of queue threads */
static int maxalloc = 4096;/* limit the damage of a leak */
-static int maxdata = 512; /* limit the damage of a DoS */
+static int maxdata = 4096; /* limit the damage of a DoS */
SYSCTL_INT(_net_graph, OID_AUTO, threads, CTLFLAG_RDTUN, &numthreads,
0, "Number of queue processing threads");
diff --git a/sys/ofed/include/linux/gfp.h b/sys/ofed/include/linux/gfp.h
index 3e77302..cb43104 100644
--- a/sys/ofed/include/linux/gfp.h
+++ b/sys/ofed/include/linux/gfp.h
@@ -105,6 +105,13 @@ __free_pages(struct page *m, unsigned int order)
kmem_free(kmem_arena, (vm_offset_t)page_address(m), size);
}
+static inline void free_pages(uintptr_t addr, unsigned int order)
+{
+ if (addr == 0)
+ return;
+ __free_pages(virt_to_page((void *)addr), order);
+}
+
/*
* Alloc pages allocates directly from the buddy allocator on linux so
* order specifies a power of two bucket of pages and the results
@@ -124,6 +131,16 @@ alloc_pages(gfp_t gfp_mask, unsigned int order)
return (virt_to_page(page));
}
+static inline uintptr_t __get_free_pages(gfp_t gfp_mask, unsigned int order)
+{
+ struct page *page;
+
+ page = alloc_pages(gfp_mask, order);
+ if (page == NULL)
+ return (0);
+ return ((uintptr_t)page_address(page));
+}
+
#define alloc_pages_node(node, mask, order) alloc_pages(mask, order)
#define kmalloc_node(chunk, mask, node) kmalloc(chunk, mask)
diff --git a/sys/ofed/include/linux/kernel.h b/sys/ofed/include/linux/kernel.h
index 5d4e50b..2f665c6 100644
--- a/sys/ofed/include/linux/kernel.h
+++ b/sys/ofed/include/linux/kernel.h
@@ -68,6 +68,7 @@
#undef ALIGN
#define ALIGN(x, y) roundup2((x), (y))
#define DIV_ROUND_UP howmany
+#define FIELD_SIZEOF(t, f) sizeof(((t *)0)->f)
#define printk(X...) printf(X)
@@ -175,6 +176,7 @@
#define round_down(x, y) ((x) & ~__round_mask(x, y))
#define num_possible_cpus() mp_ncpus
+#define num_online_cpus() mp_ncpus
typedef struct pm_message {
int event;
diff --git a/sys/ofed/include/linux/kref.h b/sys/ofed/include/linux/kref.h
index ee94cd0..883e1a1 100644
--- a/sys/ofed/include/linux/kref.h
+++ b/sys/ofed/include/linux/kref.h
@@ -29,6 +29,7 @@
#ifndef _LINUX_KREF_H_
#define _LINUX_KREF_H_
+#include <sys/types.h>
#include <sys/refcount.h>
struct kref {
diff --git a/sys/ofed/include/linux/pci.h b/sys/ofed/include/linux/pci.h
index e6b9023..60e1d02 100644
--- a/sys/ofed/include/linux/pci.h
+++ b/sys/ofed/include/linux/pci.h
@@ -270,6 +270,14 @@ pci_set_master(struct pci_dev *pdev)
}
static inline int
+pci_clear_master(struct pci_dev *pdev)
+{
+
+ pci_disable_busmaster(pdev->dev.bsddev);
+ return (0);
+}
+
+static inline int
pci_request_region(struct pci_dev *pdev, int bar, const char *res_name)
{
int rid;
@@ -458,6 +466,30 @@ pci_enable_msix(struct pci_dev *pdev, struct msix_entry *entries, int nreq)
return (0);
}
+#define pci_enable_msix_range linux_pci_enable_msix_range
+static inline int
+pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries,
+ int minvec, int maxvec)
+{
+ int nvec = maxvec;
+ int rc;
+
+ if (maxvec < minvec)
+ return (-ERANGE);
+
+ do {
+ rc = pci_enable_msix(dev, entries, nvec);
+ if (rc < 0) {
+ return (rc);
+ } else if (rc > 0) {
+ if (rc < minvec)
+ return (-ENOSPC);
+ nvec = rc;
+ }
+ } while (rc);
+ return (nvec);
+}
+
static inline int pci_channel_offline(struct pci_dev *pdev)
{
return false;
diff --git a/sys/sys/disk.h b/sys/sys/disk.h
index 2fb957a..5735a4f 100644
--- a/sys/sys/disk.h
+++ b/sys/sys/disk.h
@@ -131,6 +131,7 @@ struct diocgattr_arg {
union {
char str[DISK_IDENT_SIZE];
off_t off;
+ int i;
} value;
};
#define DIOCGATTR _IOWR('d', 142, struct diocgattr_arg)
diff --git a/sys/sys/sockbuf.h b/sys/sys/sockbuf.h
index 5bd9bb5..0e3e172 100644
--- a/sys/sys/sockbuf.h
+++ b/sys/sys/sockbuf.h
@@ -212,7 +212,7 @@ sbused(struct sockbuf *sb)
static inline long
sbspace(struct sockbuf *sb)
{
- long bleft, mleft;
+ int bleft, mleft; /* size should match sockbuf fields */
#if 0
SOCKBUF_LOCK_ASSERT(sb);
diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c
index f20b735..c3df686 100644
--- a/sys/x86/acpica/madt.c
+++ b/sys/x86/acpica/madt.c
@@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/kernel.h>
+#include <sys/limits.h>
#include <sys/malloc.h>
#include <sys/smp.h>
#include <vm/vm.h>
@@ -40,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <machine/intr_machdep.h>
#include <x86/apicvar.h>
#include <machine/md_var.h>
+#include <x86/vmware.h>
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/actables.h>
@@ -130,6 +132,7 @@ madt_setup_local(void)
{
ACPI_TABLE_DMAR *dmartbl;
vm_paddr_t dmartbl_physaddr;
+ u_int p[4];
madt = pmap_mapbios(madt_physaddr, madt_length);
if ((cpu_feature2 & CPUID2_X2APIC) != 0) {
@@ -146,6 +149,16 @@ madt_setup_local(void)
}
acpi_unmap_table(dmartbl);
}
+ if (vm_guest == VM_GUEST_VMWARE) {
+ vmware_hvcall(VMW_HVCMD_GETVCPU_INFO, p);
+ if ((p[0] & VMW_VCPUINFO_VCPU_RESERVED) != 0 ||
+ (p[0] & VMW_VCPUINFO_LEGACY_X2APIC) == 0) {
+ x2apic_mode = 0;
+ if (bootverbose)
+ printf(
+ "x2APIC available but disabled inside VMWare without intr redirection\n");
+ }
+ }
TUNABLE_INT_FETCH("hw.x2apic_enable", &x2apic_mode);
}
diff --git a/sys/x86/include/vmware.h b/sys/x86/include/vmware.h
index c72f48d..d3d7e2d 100644
--- a/sys/x86/include/vmware.h
+++ b/sys/x86/include/vmware.h
@@ -31,8 +31,13 @@
#define VMW_HVMAGIC 0x564d5868
#define VMW_HVPORT 0x5658
+
#define VMW_HVCMD_GETVERSION 10
#define VMW_HVCMD_GETHZ 45
+#define VMW_HVCMD_GETVCPU_INFO 68
+
+#define VMW_VCPUINFO_LEGACY_X2APIC (1 << 3)
+#define VMW_VCPUINFO_VCPU_RESERVED (1 << 31)
static __inline void
vmware_hvcall(u_int cmd, u_int *p)
diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c
index a71c02f..cbec246 100644
--- a/sys/x86/iommu/intel_drv.c
+++ b/sys/x86/iommu/intel_drv.c
@@ -375,7 +375,7 @@ dmar_print_caps(device_t dev, struct dmar_unit *unit,
caphi = unit->hw_cap >> 32;
device_printf(dev, "cap=%b,", (u_int)unit->hw_cap,
"\020\004AFL\005WBF\006PLMR\007PHMR\010CM\027ZLR\030ISOCH");
- printf("%b, ", caphi, "\020\010PSI\027DWD\030DRD");
+ printf("%b, ", caphi, "\020\010PSI\027DWD\030DRD\031FL1GP\034PSI");
printf("ndoms=%d, sagaw=%d, mgaw=%d, fro=%d, nfr=%d, superp=%d",
DMAR_CAP_ND(unit->hw_cap), DMAR_CAP_SAGAW(unit->hw_cap),
DMAR_CAP_MGAW(unit->hw_cap), DMAR_CAP_FRO(unit->hw_cap),
@@ -385,8 +385,9 @@ dmar_print_caps(device_t dev, struct dmar_unit *unit,
printf("\n");
ecaphi = unit->hw_ecap >> 32;
device_printf(dev, "ecap=%b,", (u_int)unit->hw_ecap,
- "\020\001C\002QI\003DI\004IR\005EIM\007PT\010SC");
- printf("%b, ", ecaphi, "\020");
+ "\020\001C\002QI\003DI\004IR\005EIM\007PT\010SC\031ECS\032MTS"
+ "\033NEST\034DIS\035PASID\036PRS\037ERS\040SRS");
+ printf("%b, ", ecaphi, "\020\002NWFS\003EAFS");
printf("mhmw=%d, iro=%d\n", DMAR_ECAP_MHMV(unit->hw_ecap),
DMAR_ECAP_IRO(unit->hw_ecap));
}
diff --git a/sys/x86/iommu/intel_reg.h b/sys/x86/iommu/intel_reg.h
index 18e1f60..ae61802 100644
--- a/sys/x86/iommu/intel_reg.h
+++ b/sys/x86/iommu/intel_reg.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2013 The FreeBSD Foundation
+ * Copyright (c) 2013-2015 The FreeBSD Foundation
* All rights reserved.
*
* This software was developed by Konstantin Belousov <kib@FreeBSD.org>
@@ -79,6 +79,47 @@ typedef struct dmar_pte {
#define DMAR_PTE_ADDR_MASK 0xffffffffff000 /* Address Mask */
#define DMAR_PTE_TM (1ULL << 62) /* Transient Mapping */
+typedef struct dmar_irte {
+ uint64_t irte1;
+ uint64_t irte2;
+} dmar_irte_t;
+/* Source Validation Type */
+#define DMAR_IRTE2_SVT_NONE (0ULL << (82 - 64))
+#define DMAR_IRTE2_SVT_RID (1ULL << (82 - 64))
+#define DMAR_IRTE2_SVT_BUS (2ULL << (82 - 64))
+/* Source-id Qualifier */
+#define DMAR_IRTE2_SQ_RID (0ULL << (80 - 64))
+#define DMAR_IRTE2_SQ_RID_N2 (1ULL << (80 - 64))
+#define DMAR_IRTE2_SQ_RID_N21 (2ULL << (80 - 64))
+#define DMAR_IRTE2_SQ_RID_N210 (3ULL << (80 - 64))
+/* Source Identifier */
+#define DMAR_IRTE2_SID_RID(x) ((uint64_t)(x))
+#define DMAR_IRTE2_SID_BUS(start, end) ((((uint64_t)(start)) << 8) | (end))
+/* Destination Id */
+#define DMAR_IRTE1_DST_xAPIC(x) (((uint64_t)(x)) << 40)
+#define DMAR_IRTE1_DST_x2APIC(x) (((uint64_t)(x)) << 32)
+/* Vector */
+#define DMAR_IRTE1_V(x) (((uint64_t)x) << 16)
+#define DMAR_IRTE1_IM_POSTED (1ULL << 15) /* Posted */
+/* Delivery Mode */
+#define DMAR_IRTE1_DLM_FM (0ULL << 5)
+#define DMAR_IRTE1_DLM_LP (1ULL << 5
+#define DMAR_IRTE1_DLM_SMI (2ULL << 5)
+#define DMAR_IRTE1_DLM_NMI (4ULL << 5)
+#define DMAR_IRTE1_DLM_INIT (5ULL << 5)
+#define DMAR_IRTE1_DLM_ExtINT (7ULL << 5)
+/* Trigger Mode */
+#define DMAR_IRTE1_TM_EDGE (0ULL << 4)
+#define DMAR_IRTE1_TM_LEVEL (1ULL << 4)
+/* Redirection Hint */
+#define DMAR_IRTE1_RH_DIRECT (0ULL << 3)
+#define DMAR_IRTE1_RH_SELECT (1ULL << 3)
+/* Destination Mode */
+#define DMAR_IRTE1_DM_PHYSICAL (0ULL << 2)
+#define DMAR_IRTE1_DM_LOGICAL (1ULL << 2)
+#define DMAR_IRTE1_FPD (1ULL << 1) /* Fault Processing Disable */
+#define DMAR_IRTE1_P (1ULL) /* Present */
+
/* Version register */
#define DMAR_VER_REG 0
#define DMAR_MAJOR_VER(x) (((x) >> 4) & 0xf)
@@ -86,6 +127,8 @@ typedef struct dmar_pte {
/* Capabilities register */
#define DMAR_CAP_REG 0x8
+#define DMAR_CAP_PI (1ULL << 59) /* Posted Interrupts */
+#define DMAR_CAP_FL1GP (1ULL << 56) /* First Level 1GByte Page */
#define DMAR_CAP_DRD (1ULL << 55) /* DMA Read Draining */
#define DMAR_CAP_DWD (1ULL << 54) /* DMA Write Draining */
#define DMAR_CAP_MAMV(x) ((u_int)(((x) >> 48) & 0x3f))
@@ -120,6 +163,17 @@ typedef struct dmar_pte {
/* Extended Capabilities register */
#define DMAR_ECAP_REG 0x10
+#define DMAR_ECAP_PSS(x) (((x) >> 35) & 0xf) /* PASID Size Supported */
+#define DMAR_ECAP_EAFS (1ULL << 34) /* Extended Accessed Flag */
+#define DMAR_ECAP_NWFS (1ULL << 33) /* No Write Flag */
+#define DMAR_ECAP_SRS (1ULL << 31) /* Supervisor Request */
+#define DMAR_ECAP_ERS (1ULL << 30) /* Execute Request */
+#define DMAR_ECAP_PRS (1ULL << 29) /* Page Request */
+#define DMAR_ECAP_PASID (1ULL << 28) /* Process Address Space Id */
+#define DMAR_ECAP_DIS (1ULL << 27) /* Deferred Invalidate */
+#define DMAR_ECAP_NEST (1ULL << 26) /* Nested Translation */
+#define DMAR_ECAP_MTS (1ULL << 25) /* Memory Type */
+#define DMAR_ECAP_ECS (1ULL << 24) /* Extended Context */
#define DMAR_ECAP_MHMV(x) ((u_int)(((x) >> 20) & 0xf))
/* Maximum Handle Mask Value */
#define DMAR_ECAP_IRO(x) ((u_int)(((x) >> 8) & 0x3ff))
@@ -283,6 +337,11 @@ typedef struct dmar_pte {
#define DMAR_IQ_DESCR_IOTLB_DR (1 << 7) /* Drain Reads */
#define DMAR_IQ_DESCR_IOTLB_DID(x) (((uint32_t)(x)) << 16) /* Domain Id */
+#define DMAR_IQ_DESCR_IEC_INV 0x4 /* Invalidate Interrupt Entry Cache */
+#define DMAR_IQ_DESCR_IEC_IDX (1 << 4) /* Index-Selective Invalidation */
+#define DMAR_IQ_DESCR_IEC_IIDX(x) (((uint64_t)x) << 32) /* Interrupt Index */
+#define DMAR_IQ_DESCR_IEC_IM(x) ((x) << 27) /* Index Mask */
+
#define DMAR_IQ_DESCR_WAIT_ID 0x5 /* Invalidation Wait Descriptor */
#define DMAR_IQ_DESCR_WAIT_IF (1 << 4) /* Interrupt Flag */
#define DMAR_IQ_DESCR_WAIT_SW (1 << 5) /* Status Write */
@@ -326,5 +385,8 @@ typedef struct dmar_pte {
/* Interrupt Remapping Table Address register */
#define DMAR_IRTA_REG 0xb8
+#define DMAR_IRTA_EIME (1 << 11) /* Extended Interrupt Mode
+ Enable */
+#define DMAR_IRTA_S_MASK 0xf /* Size Mask */
#endif
diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c
index b19b41c..8dc2f35 100644
--- a/sys/x86/iommu/intel_utils.c
+++ b/sys/x86/iommu/intel_utils.c
@@ -411,11 +411,9 @@ dmar_load_root_entry_ptr(struct dmar_unit *unit)
*/
DMAR_ASSERT_LOCKED(unit);
- /* VM_OBJECT_RLOCK(unit->ctx_obj); */
- VM_OBJECT_WLOCK(unit->ctx_obj);
+ VM_OBJECT_RLOCK(unit->ctx_obj);
root_entry = vm_page_lookup(unit->ctx_obj, 0);
- /* VM_OBJECT_RUNLOCK(unit->ctx_obj); */
- VM_OBJECT_WUNLOCK(unit->ctx_obj);
+ VM_OBJECT_RUNLOCK(unit->ctx_obj);
dmar_write8(unit, DMAR_RTADDR_REG, VM_PAGE_TO_PHYS(root_entry));
dmar_write4(unit, DMAR_GCMD_REG, unit->hw_gcmd | DMAR_GCMD_SRTP);
/* XXXKIB should have a timeout */
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index f779140..ef246a9 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1612,21 +1612,20 @@ OLD_FILES+=usr/share/man/man8/freebsd-update.8.gz
.endif
.if ${MK_GAMES} == no
-OLD_FILES+=usr/games/bcd
-OLD_FILES+=usr/games/caesar
-OLD_FILES+=usr/games/factor
-OLD_FILES+=usr/games/fortune
-OLD_FILES+=usr/games/grdc
-OLD_FILES+=usr/games/morse
-OLD_FILES+=usr/games/number
-OLD_FILES+=usr/games/pom
-OLD_FILES+=usr/games/ppt
-OLD_FILES+=usr/games/primes
-OLD_FILES+=usr/games/random
-OLD_FILES+=usr/games/rot13
-OLD_FILES+=usr/games/strfile
-OLD_FILES+=usr/games/unstr
-OLD_DIRS+=usr/games
+OLD_FILES+=usr/bin/bcd
+OLD_FILES+=usr/bin/caesar
+OLD_FILES+=usr/bin/factor
+OLD_FILES+=usr/bin/fortune
+OLD_FILES+=usr/bin/grdc
+OLD_FILES+=usr/bin/morse
+OLD_FILES+=usr/bin/number
+OLD_FILES+=usr/bin/pom
+OLD_FILES+=usr/bin/ppt
+OLD_FILES+=usr/bin/primes
+OLD_FILES+=usr/bin/random
+OLD_FILES+=usr/bin/rot13
+OLD_FILES+=usr/bin/strfile
+OLD_FILES+=usr/bin/unstr
OLD_FILES+=usr/share/games/fortune/fortunes
OLD_FILES+=usr/share/games/fortune/fortunes.dat
OLD_FILES+=usr/share/games/fortune/freebsd-tips
diff --git a/tools/tools/nanobsd/gateworks/Files/root/.profile b/tools/tools/nanobsd/gateworks/Files/root/.profile
index 83dc9b0..769e267 100644
--- a/tools/tools/nanobsd/gateworks/Files/root/.profile
+++ b/tools/tools/nanobsd/gateworks/Files/root/.profile
@@ -1,6 +1,6 @@
# $FreeBSD: src/etc/root/dot.profile,v 1.21 2007/05/29 06:33:10 dougb Exp $
#
-PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:~/bin
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin
export PATH
HOME=/root; export HOME
TERM=${TERM:-xterm}; export TERM
diff --git a/tools/tools/nanobsd/pcengines/Files/root/.cshrc b/tools/tools/nanobsd/pcengines/Files/root/.cshrc
index 36df9c6..49151c5 100644
--- a/tools/tools/nanobsd/pcengines/Files/root/.cshrc
+++ b/tools/tools/nanobsd/pcengines/Files/root/.cshrc
@@ -14,7 +14,7 @@ alias ll ls -lA
# A righteous umask
umask 22
-set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)
+set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin)
setenv EDITOR vi
setenv PAGER more
diff --git a/tools/tools/nanobsd/pcengines/Files/root/.login b/tools/tools/nanobsd/pcengines/Files/root/.login
index 3032ef9..196a640 100644
--- a/tools/tools/nanobsd/pcengines/Files/root/.login
+++ b/tools/tools/nanobsd/pcengines/Files/root/.login
@@ -6,4 +6,4 @@
#
# Uncomment to display a random cookie each login:
-# [ -x /usr/games/fortune ] && /usr/games/fortune -s
+# [ -x /usr/bin/fortune ] && /usr/bin/fortune -s
diff --git a/tools/tools/nanobsd/rescue/Files/root/.cshrc b/tools/tools/nanobsd/rescue/Files/root/.cshrc
index 5e6d31d..8098c19 100644
--- a/tools/tools/nanobsd/rescue/Files/root/.cshrc
+++ b/tools/tools/nanobsd/rescue/Files/root/.cshrc
@@ -11,7 +11,7 @@
a lm 'll | more'
a m more
-set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin /usr/local/jdk1.6.0/bin /usr/local/jdk1.5.0/bin $HOME/bin)
+set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin /usr/X11R6/bin /usr/local/jdk1.6.0/bin /usr/local/jdk1.5.0/bin $HOME/bin)
setenv MANPATH "/usr/share/man:/usr/X11R6/man:/usr/local/man"
setenv PAGER more
diff --git a/tools/tools/netmap/pkt-gen.c b/tools/tools/netmap/pkt-gen.c
index 6063f04..3afb326 100644
--- a/tools/tools/netmap/pkt-gen.c
+++ b/tools/tools/netmap/pkt-gen.c
@@ -1817,7 +1817,7 @@ main(int arc, char **argv)
}
- if (g.ifname == NULL) {
+ if (strlen(g.ifname) <=0 ) {
D("missing ifname");
usage();
}
diff --git a/usr.bin/svn/svn/Makefile b/usr.bin/svn/svn/Makefile
index cdac81d..b4f76f5 100644
--- a/usr.bin/svn/svn/Makefile
+++ b/usr.bin/svn/svn/Makefile
@@ -54,7 +54,7 @@ DPSRCS+= freebsd-organization.h
CLEANFILES+= freebsd-organization.h
CFLAGS+= -I. -DHAS_ORGANIZATION_NAME
freebsd-organization.h:
- @echo '#define ORGANIZATION_NAME ${ORGANIZATION}' \
+ @echo "#define ORGANIZATION_NAME \"$$(eval echo ${ORGANIZATION})\"" \
> freebsd-organization.h
.endif
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index effd0e3..0889c4c 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -264,7 +264,9 @@ main(int argc, char *argv[])
if (header || wcmd == 0) {
pr_header(&now, nusers);
if (wcmd == 0) {
- xo_close_container("uptime-information");
+ xo_close_container("uptime-information");
+ xo_finish();
+
(void)kvm_close(kd);
exit(0);
}
diff --git a/usr.bin/wc/wc.c b/usr.bin/wc/wc.c
index 79ac4a0..9d51ab2 100644
--- a/usr.bin/wc/wc.c
+++ b/usr.bin/wc/wc.c
@@ -140,12 +140,14 @@ main(int argc, char *argv[])
} while(*++argv);
}
+ xo_close_list("file");
+
if (total > 1) {
xo_open_container("total");
show_cnt("total", tlinect, twordct, tcharct, tlongline);
xo_close_container("total");
}
- xo_close_list("file");
+
xo_close_container("wc");
xo_finish();
exit(errors == 0 ? 0 : 1);
diff --git a/usr.bin/whereis/pathnames.h b/usr.bin/whereis/pathnames.h
index 1668d90..f5d27d1 100644
--- a/usr.bin/whereis/pathnames.h
+++ b/usr.bin/whereis/pathnames.h
@@ -25,9 +25,8 @@
* $FreeBSD$
*/
-/* Where to look for libexec and games */
+/* Where to look for libexec */
#define PATH_LIBEXEC "/usr/libexec"
-#define PATH_GAMES "/usr/games"
/* Where to look for sources. */
#define PATH_SOURCES \
diff --git a/usr.bin/whereis/whereis.1 b/usr.bin/whereis/whereis.1
index a5b2899..e72911c 100644
--- a/usr.bin/whereis/whereis.1
+++ b/usr.bin/whereis/whereis.1
@@ -65,8 +65,7 @@ The default path searched is the string returned by the
utility for the
.Dq user.cs_path
string, with
-.Pa /usr/libexec ,
-.Pa /usr/games
+.Pa /usr/libexec
and the current user's
.Ev $PATH
appended.
diff --git a/usr.bin/whereis/whereis.c b/usr.bin/whereis/whereis.c
index 401461f..ed8d93a 100644
--- a/usr.bin/whereis/whereis.c
+++ b/usr.bin/whereis/whereis.c
@@ -265,7 +265,7 @@ defaults(void)
opt_b = opt_m = opt_s = 1;
/* -b defaults to default path + /usr/libexec +
- * /usr/games + user's path */
+ * user's path */
if (!bindirs) {
if (sysctlbyname("user.cs_path", (void *)NULL, &s,
(void *)NULL, 0) == -1)
@@ -276,11 +276,10 @@ defaults(void)
err(EX_OSERR, "sysctlbyname(\"user.cs_path\")");
nele = 0;
decolonify(b, &bindirs, &nele);
- bindirs = realloc(bindirs, (nele + 3) * sizeof(char *));
+ bindirs = realloc(bindirs, (nele + 2) * sizeof(char *));
if (bindirs == NULL)
abort();
bindirs[nele++] = PATH_LIBEXEC;
- bindirs[nele++] = PATH_GAMES;
bindirs[nele] = NULL;
if ((cp = getenv("PATH")) != NULL) {
/* don't destroy the original environment... */
diff --git a/usr.sbin/bsdconfig/include/messages.subr b/usr.sbin/bsdconfig/include/messages.subr
index 3d6aad0..04f4485 100644
--- a/usr.sbin/bsdconfig/include/messages.subr
+++ b/usr.sbin/bsdconfig/include/messages.subr
@@ -138,7 +138,6 @@ msg_ftp="FTP"
msg_ftp_desc="FTP client and server utilities."
msg_ftp_passive="FTP Passive"
msg_ftp_username="FTP username"
-msg_games_desc="Various games and sundry amusements."
msg_generating_index_from_pkg_database="Generating INDEX from pkg(8) database\n(this can take a while)..."
msg_geography_desc="Geography-related software."
msg_german_desc="Ported software for Germanic countries."
diff --git a/usr.sbin/ctladm/ctladm.8 b/usr.sbin/ctladm/ctladm.8
index 14710c2..7616c24 100644
--- a/usr.sbin/ctladm/ctladm.8
+++ b/usr.sbin/ctladm/ctladm.8
@@ -1035,11 +1035,11 @@ Set to "off" to allow them be issued in parallel.
Parallel issue of consecutive operations may confuse logic of the
backing file system, hurting performance; but it may improve performance
of backing stores without prefetch/write-back.
-.It Va psectorsize
-.It Va psectoroffset
+.It Va pblocksize
+.It Va pblockoffset
Specify physical block size and offset of the device.
-.It Va usectorsize
-.It Va usectoroffset
+.It Va ublocksize
+.It Va ublockoffset
Specify UNMAP block size and offset of the device.
.It Va rpm
.It Va rpm
diff --git a/usr.sbin/ctld/ctl.conf.5 b/usr.sbin/ctld/ctl.conf.5
index c74e291..6854f87 100644
--- a/usr.sbin/ctld/ctl.conf.5
+++ b/usr.sbin/ctld/ctl.conf.5
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 7, 2015
+.Dd February 11, 2015
.Dt CTL.CONF 5
.Os
.Sh NAME
@@ -228,7 +228,7 @@ An IPv4 or IPv6 address and port to listen on for incoming connections.
.\".It Ic listen-iser Ar address
.\"An IPv4 or IPv6 address and port to listen on for incoming connections
.\"using iSER (iSCSI over RDMA) protocol.
-.It Ic redirect Aq Ar address
+.It Ic redirect Ar address
IPv4 or IPv6 address to redirect initiators to.
When configured, all initiators attempting to connect to portal
belonging to this
@@ -326,7 +326,7 @@ If second argument is not specified, target auth group is used.
Assign specified CTL port (such as "isp0") to the target.
On startup ctld configures LUN mapping and enables all assigned ports.
Each port can be assigned to only one target.
-.It Ic redirect Aq Ar address
+.It Ic redirect Ar address
IPv4 or IPv6 address to redirect initiators to.
When configured, all initiators attempting to connect to this target
will get redirected using "Target moved temporarily" login response.
diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c
index 0f62ba3..25a4542 100644
--- a/usr.sbin/ctld/ctld.c
+++ b/usr.sbin/ctld/ctld.c
@@ -1191,8 +1191,11 @@ port_new(struct conf *conf, struct target *target, struct portal_group *pg)
{
struct port *port;
char *name;
+ int ret;
- asprintf(&name, "%s-%s", pg->pg_name, target->t_name);
+ ret = asprintf(&name, "%s-%s", pg->pg_name, target->t_name);
+ if (ret <= 0)
+ log_err(1, "asprintf");
if (port_find(conf, name) != NULL) {
log_warnx("duplicate port \"%s\"", name);
free(name);
@@ -1216,8 +1219,11 @@ port_new_pp(struct conf *conf, struct target *target, struct pport *pp)
{
struct port *port;
char *name;
+ int ret;
- asprintf(&name, "%s-%s", pp->pp_name, target->t_name);
+ ret = asprintf(&name, "%s-%s", pp->pp_name, target->t_name);
+ if (ret <= 0)
+ log_err(1, "asprintf");
if (port_find(conf, name) != NULL) {
log_warnx("duplicate port \"%s\"", name);
free(name);
diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h
index c07c034..36e6bc4 100644
--- a/usr.sbin/ctld/ctld.h
+++ b/usr.sbin/ctld/ctld.h
@@ -416,7 +416,6 @@ void keys_delete(struct keys *keys);
void keys_load(struct keys *keys, const struct pdu *pdu);
void keys_save(struct keys *keys, struct pdu *pdu);
const char *keys_find(struct keys *keys, const char *name);
-int keys_find_int(struct keys *keys, const char *name);
void keys_add(struct keys *keys,
const char *name, const char *value);
void keys_add_int(struct keys *keys,
diff --git a/usr.sbin/ctld/keys.c b/usr.sbin/ctld/keys.c
index 6a9ad02..c8f222d 100644
--- a/usr.sbin/ctld/keys.c
+++ b/usr.sbin/ctld/keys.c
@@ -161,26 +161,6 @@ keys_find(struct keys *keys, const char *name)
return (NULL);
}
-int
-keys_find_int(struct keys *keys, const char *name)
-{
- const char *str;
- char *endptr;
- int num;
-
- str = keys_find(keys, name);
- if (str == NULL)
- return (-1);
-
- num = strtoul(str, &endptr, 10);
- if (*endptr != '\0') {
- log_debugx("invalid numeric value \"%s\"", str);
- return (-1);
- }
-
- return (num);
-}
-
void
keys_add(struct keys *keys, const char *name, const char *value)
{
diff --git a/usr.sbin/flowctl/flowctl.c b/usr.sbin/flowctl/flowctl.c
index 47ddadf..0c7539a 100644
--- a/usr.sbin/flowctl/flowctl.c
+++ b/usr.sbin/flowctl/flowctl.c
@@ -222,12 +222,12 @@ ctl_show(int argc, char **argv)
static void
do_show(int version, void (*func)(struct ngnf_show_header *))
{
+ char buf[SORCVBUF_SIZE];
struct ng_mesg *ng_mesg;
struct ngnf_show_header req, *resp;
int token, nread;
- ng_mesg = alloca(SORCVBUF_SIZE);
-
+ ng_mesg = (struct ng_mesg *)buf;
req.version = version;
req.hash_id = req.list_id = 0;
diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index 3b784c8..c3a7e5f 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -2634,14 +2634,14 @@ backup_kernel_finddir () {
while true ; do
# Pathname does not exist, so it is OK use that name
# for backup directory.
- if [ ! -e $BACKUPKERNELDIR ]; then
+ if [ ! -e $BASEDIR/$BACKUPKERNELDIR ]; then
return 0
fi
# If directory do exist, we only use if it has our
# marker file.
- if [ -d $BACKUPKERNELDIR -a \
- -e $BACKUPKERNELDIR/.freebsd-update ]; then
+ if [ -d $BASEDIR/$BACKUPKERNELDIR -a \
+ -e $BASEDIR/$BACKUPKERNELDIR/.freebsd-update ]; then
return 0
fi
@@ -2649,7 +2649,7 @@ backup_kernel_finddir () {
# the end and try again.
CNT=$((CNT + 1))
if [ $CNT -gt 9 ]; then
- echo "Could not find valid backup dir ($BACKUPKERNELDIR)"
+ echo "Could not find valid backup dir ($BASEDIR/$BACKUPKERNELDIR)"
exit 1
fi
BACKUPKERNELDIR="`echo $BACKUPKERNELDIR | sed -Ee 's/[0-9]\$//'`"
@@ -2676,17 +2676,17 @@ backup_kernel () {
# Remove old kernel backup files. If $BACKUPKERNELDIR was
# "not ours", backup_kernel_finddir would have exited, so
# deleting the directory content is as safe as we can make it.
- if [ -d $BACKUPKERNELDIR ]; then
- rm -fr $BACKUPKERNELDIR
+ if [ -d $BASEDIR/$BACKUPKERNELDIR ]; then
+ rm -fr $BASEDIR/$BACKUPKERNELDIR
fi
# Create directories for backup.
- mkdir -p $BACKUPKERNELDIR
- mtree -cdn -p "${KERNELDIR}" | \
- mtree -Ue -p "${BACKUPKERNELDIR}" > /dev/null
+ mkdir -p $BASEDIR/$BACKUPKERNELDIR
+ mtree -cdn -p "${BASEDIR}/${KERNELDIR}" | \
+ mtree -Ue -p "${BASEDIR}/${BACKUPKERNELDIR}" > /dev/null
# Mark the directory as having been created by freebsd-update.
- touch $BACKUPKERNELDIR/.freebsd-update
+ touch $BASEDIR/$BACKUPKERNELDIR/.freebsd-update
if [ $? -ne 0 ]; then
echo "Could not create kernel backup directory"
exit 1
@@ -2704,8 +2704,8 @@ backup_kernel () {
fi
# Backup all the kernel files using hardlinks.
- (cd $KERNELDIR && find . -type f $FINDFILTER -exec \
- cp -pl '{}' ${BACKUPKERNELDIR}/'{}' \;)
+ (cd ${BASEDIR}/${KERNELDIR} && find . -type f $FINDFILTER -exec \
+ cp -pl '{}' ${BASEDIR}/${BACKUPKERNELDIR}/'{}' \;)
# Re-enable patchname expansion.
set +f
@@ -2803,7 +2803,7 @@ install_files () {
# Update linker.hints if necessary
if [ -s INDEX-OLD -o -s INDEX-NEW ]; then
- kldxref -R /boot/ 2>/dev/null
+ kldxref -R ${BASEDIR}/boot/ 2>/dev/null
fi
# We've finished updating the kernel.
@@ -2854,14 +2854,14 @@ Kernel updates have been installed. Please reboot and run
install_delete INDEX-OLD INDEX-NEW || return 1
# Rebuild /etc/spwd.db and /etc/pwd.db if necessary.
- if [ /etc/master.passwd -nt /etc/spwd.db ] ||
- [ /etc/master.passwd -nt /etc/pwd.db ]; then
- pwd_mkdb /etc/master.passwd
+ if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] ||
+ [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ]; then
+ pwd_mkdb -d ${BASEDIR}/etc ${BASEDIR}/etc/master.passwd
fi
# Rebuild /etc/login.conf.db if necessary.
- if [ /etc/login.conf -nt /etc/login.conf.db ]; then
- cap_mkdb /etc/login.conf
+ if [ ${BASEDIR}/etc/login.conf -nt ${BASEDIR}/etc/login.conf.db ]; then
+ cap_mkdb ${BASEDIR}/etc/login.conf
fi
# We've finished installing the world and deleting old files
diff --git a/usr.sbin/gssd/Makefile b/usr.sbin/gssd/Makefile
index ddc1dfa..4faaf2d 100644
--- a/usr.sbin/gssd/Makefile
+++ b/usr.sbin/gssd/Makefile
@@ -16,7 +16,7 @@ LIBADD+= krb5 roken
CFLAGS+= -DWITHOUT_KERBEROS
.endif
-CLEANFILES= gssd_svc.c gssd.h
+CLEANFILES= gssd_svc.c gssd_xdr.c gssd.h
RPCSRC= ${.CURDIR}/../../sys/kgssapi/gssd.x
RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C -M
diff --git a/usr.sbin/gssd/gssd.c b/usr.sbin/gssd/gssd.c
index 9548b8c..2540161 100644
--- a/usr.sbin/gssd/gssd.c
+++ b/usr.sbin/gssd/gssd.c
@@ -193,7 +193,8 @@ main(int argc, char **argv)
gssd_load_mech();
if (!debug_level) {
- daemon(0, 0);
+ if (daemon(0, 0) != 0)
+ err(1, "Can't daemonize");
signal(SIGINT, SIG_IGN);
signal(SIGQUIT, SIG_IGN);
signal(SIGHUP, SIG_IGN);
@@ -206,7 +207,7 @@ main(int argc, char **argv)
strcpy(sun.sun_path, _PATH_GSSDSOCK);
sun.sun_len = SUN_LEN(&sun);
fd = socket(AF_LOCAL, SOCK_STREAM, 0);
- if (!fd) {
+ if (fd < 0) {
if (debug_level == 0) {
syslog(LOG_ERR, "Can't create local gssd socket");
exit(1);
diff --git a/usr.sbin/iscsid/iscsid.h b/usr.sbin/iscsid/iscsid.h
index 448e9b7..946f927 100644
--- a/usr.sbin/iscsid/iscsid.h
+++ b/usr.sbin/iscsid/iscsid.h
@@ -116,7 +116,6 @@ void keys_delete(struct keys *key);
void keys_load(struct keys *keys, const struct pdu *pdu);
void keys_save(struct keys *keys, struct pdu *pdu);
const char *keys_find(struct keys *keys, const char *name);
-int keys_find_int(struct keys *keys, const char *name);
void keys_add(struct keys *keys,
const char *name, const char *value);
void keys_add_int(struct keys *keys,
diff --git a/usr.sbin/iscsid/keys.c b/usr.sbin/iscsid/keys.c
index bab1ac9..c4b478b 100644
--- a/usr.sbin/iscsid/keys.c
+++ b/usr.sbin/iscsid/keys.c
@@ -162,26 +162,6 @@ keys_find(struct keys *keys, const char *name)
return (NULL);
}
-int
-keys_find_int(struct keys *keys, const char *name)
-{
- const char *str;
- char *endptr;
- int num;
-
- str = keys_find(keys, name);
- if (str == NULL)
- return (-1);
-
- num = strtoul(str, &endptr, 10);
- if (*endptr != '\0') {
- log_debugx("invalid numeric value \"%s\"", str);
- return (-1);
- }
-
- return (num);
-}
-
void
keys_add(struct keys *keys, const char *name, const char *value)
{
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index 87794c3..ad1964e 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -1747,8 +1747,12 @@ get_exportlist(void)
iov[5].iov_len = strlen(fsp->f_mntfromname) + 1;
errmsg[0] = '\0';
+ /*
+ * EXDEV is returned when path exists but is not a
+ * mount point. May happens if raced with unmount.
+ */
if (nmount(iov, iovlen, fsp->f_flags) < 0 &&
- errno != ENOENT && errno != ENOTSUP) {
+ errno != ENOENT && errno != ENOTSUP && errno != EXDEV) {
syslog(LOG_ERR,
"can't delete exports for %s: %m %s",
fsp->f_mntonname, errmsg);
diff --git a/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh b/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh
index fd6556d..a75fad7 100755
--- a/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh
+++ b/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh
@@ -303,7 +303,7 @@ fetch_split_files()
OUTFILE="${FSMNT}/.fetch-${INSFILE}"
fi
- DIRS="base catpages dict doc games info manpages proflibs kernels src"
+ DIRS="base catpages dict doc info manpages proflibs kernels src"
if [ "${FBSD_ARCH}" = "amd64" ]
then
DIRS="${DIRS} lib32"
OpenPOWER on IntegriCloud