Date: Wed, 14 Sep 2016 14:05:31 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r305809 - in projects/mips64-clang: . etc/mtree include lib/libstand release/arm share/man/man9 share/mk sys/amd64/amd64 sys/arm/conf sys/arm/ti sys/arm64/arm64 sys/arm64/include sys/bo... Message-ID: <201609141405.u8EE5VuL047323@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Wed Sep 14 14:05:31 2016 New Revision: 305809 URL: https://svnweb.freebsd.org/changeset/base/305809 Log: MFC 305808 Added: projects/mips64-clang/sys/dev/evdev/ - copied from r305808, head/sys/dev/evdev/ Deleted: projects/mips64-clang/sys/arm/conf/CUBIEBOARD Modified: projects/mips64-clang/ObsoleteFiles.inc projects/mips64-clang/etc/mtree/BSD.include.dist projects/mips64-clang/include/Makefile projects/mips64-clang/lib/libstand/net.h projects/mips64-clang/release/arm/CUBIEBOARD.conf projects/mips64-clang/share/man/man9/device_quiet.9 projects/mips64-clang/share/mk/meta.sys.mk projects/mips64-clang/sys/amd64/amd64/trap.c projects/mips64-clang/sys/arm/conf/BEAGLEBONE projects/mips64-clang/sys/arm/ti/ti_adc.c projects/mips64-clang/sys/arm/ti/ti_adcreg.h projects/mips64-clang/sys/arm/ti/ti_adcvar.h projects/mips64-clang/sys/arm/ti/ti_cpuid.c projects/mips64-clang/sys/arm64/arm64/db_trace.c projects/mips64-clang/sys/arm64/arm64/debug_monitor.c projects/mips64-clang/sys/arm64/arm64/identcpu.c projects/mips64-clang/sys/arm64/include/debug_monitor.h projects/mips64-clang/sys/boot/common/dev_net.c projects/mips64-clang/sys/boot/kshim/bsd_kernel.c projects/mips64-clang/sys/boot/kshim/bsd_kernel.h projects/mips64-clang/sys/conf/NOTES projects/mips64-clang/sys/conf/files projects/mips64-clang/sys/conf/files.arm64 projects/mips64-clang/sys/conf/options projects/mips64-clang/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c projects/mips64-clang/sys/dev/ath/if_ath_tx.c projects/mips64-clang/sys/dev/ath/if_ath_tx_edma.c projects/mips64-clang/sys/dev/cxgbe/adapter.h projects/mips64-clang/sys/dev/cxgbe/common/t4_hw.c projects/mips64-clang/sys/dev/cxgbe/firmware/t4fw_interface.h projects/mips64-clang/sys/dev/cxgbe/t4_iov.c projects/mips64-clang/sys/dev/cxgbe/t4_main.c projects/mips64-clang/sys/dev/hyperv/netvsc/hv_net_vsc.c projects/mips64-clang/sys/dev/hyperv/netvsc/hv_net_vsc.h projects/mips64-clang/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c projects/mips64-clang/sys/dev/hyperv/netvsc/hv_rndis_filter.c projects/mips64-clang/sys/dev/hyperv/netvsc/hv_rndis_filter.h projects/mips64-clang/sys/dev/hyperv/netvsc/if_hnvar.h projects/mips64-clang/sys/dev/hyperv/vmbus/vmbus_chan.c projects/mips64-clang/sys/dev/ioat/ioat.c projects/mips64-clang/sys/dev/urtwn/if_urtwn.c projects/mips64-clang/sys/dev/usb/input/ukbd.c projects/mips64-clang/sys/dev/usb/quirk/usb_quirk.c projects/mips64-clang/sys/dev/usb/serial/usb_serial.c projects/mips64-clang/sys/dev/usb/serial/usb_serial.h projects/mips64-clang/sys/dev/usb/storage/umass.c projects/mips64-clang/sys/dev/usb/usb_busdma.c projects/mips64-clang/sys/dev/usb/usb_core.c projects/mips64-clang/sys/dev/usb/usb_core.h projects/mips64-clang/sys/dev/usb/usb_dev.c projects/mips64-clang/sys/dev/usb/usb_device.c projects/mips64-clang/sys/dev/usb/usb_freebsd.h projects/mips64-clang/sys/dev/usb/usb_freebsd_loader.h projects/mips64-clang/sys/dev/usb/usb_generic.c projects/mips64-clang/sys/dev/usb/usb_hub.c projects/mips64-clang/sys/dev/usb/usb_msctest.c projects/mips64-clang/sys/dev/usb/usb_process.c projects/mips64-clang/sys/dev/usb/usb_request.c projects/mips64-clang/sys/dev/usb/usb_transfer.c projects/mips64-clang/sys/dev/usb/usbdi.h projects/mips64-clang/sys/i386/i386/db_trace.c projects/mips64-clang/sys/i386/i386/trap.c projects/mips64-clang/sys/kern/kern_descrip.c projects/mips64-clang/sys/kern/subr_bus.c projects/mips64-clang/sys/mips/malta/asm_malta.S projects/mips64-clang/sys/mips/malta/malta_mp.c projects/mips64-clang/sys/mips/mips/locore.S projects/mips64-clang/sys/net80211/ieee80211_adhoc.c projects/mips64-clang/sys/net80211/ieee80211_hostap.c projects/mips64-clang/sys/netpfil/ipfw/ip_fw_table.c projects/mips64-clang/sys/sys/filedesc.h projects/mips64-clang/sys/x86/include/frame.h projects/mips64-clang/sys/x86/x86/identcpu.c projects/mips64-clang/sys/x86/x86/intr_machdep.c projects/mips64-clang/usr.bin/bsdiff/bspatch/bspatch.c projects/mips64-clang/usr.sbin/amd/amd/Makefile projects/mips64-clang/usr.sbin/amd/amq/Makefile projects/mips64-clang/usr.sbin/amd/fixmount/Makefile projects/mips64-clang/usr.sbin/amd/fsinfo/Makefile projects/mips64-clang/usr.sbin/amd/hlfsd/Makefile projects/mips64-clang/usr.sbin/amd/include/Makefile projects/mips64-clang/usr.sbin/amd/libamu/Makefile projects/mips64-clang/usr.sbin/amd/mk-amd-map/Makefile projects/mips64-clang/usr.sbin/amd/pawd/Makefile projects/mips64-clang/usr.sbin/amd/scripts/Makefile projects/mips64-clang/usr.sbin/amd/wire-test/Makefile projects/mips64-clang/usr.sbin/autofs/automountd.c projects/mips64-clang/usr.sbin/autofs/autounmountd.c projects/mips64-clang/usr.sbin/autofs/defined.c projects/mips64-clang/usr.sbin/pw/pw.8 projects/mips64-clang/usr.sbin/syslogd/syslogd.c Directory Properties: projects/mips64-clang/ (props changed) Modified: projects/mips64-clang/ObsoleteFiles.inc ============================================================================== --- projects/mips64-clang/ObsoleteFiles.inc Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/ObsoleteFiles.inc Wed Sep 14 14:05:31 2016 (r305809) @@ -41,6 +41,8 @@ # 20160906: libkqueue tests moved to /usr/tests/sys/kqueue/libkqueue OLD_FILES+=usr/tests/sys/kqueue/kqtest OLD_FILES+=usr/tests/sys/kqueue/kqueue_test +# 20160903: idle page zeroing support removed +OLD_FILES+=usr/share/man/man9/pmap_zero_idle.9.gz # 20160901: Remove digi(4) OLD_FILES+=usr/share/man/man4/digi.4.gz # 20160819: Remove ie(4) @@ -59,6 +61,8 @@ OLD_FILES+=usr/share/man/man8/sicontrol. OLD_FILES+=usr/share/man/man4/scd.4.gz # 20160815: Remove mcd(4) OLD_FILES+=usr/share/man/man4/mcd.4.gz +# 20160805: lockmgr_waiters(9) removed +OLD_FILES+=usr/share/man/man9/lockmgr_waiters.9.gz # 20160703: POSIXify locales with variants OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_COLLATE OLD_FILES+=usr/share/locale/zh_Hant_TW.UTF-8/LC_CTYPE @@ -213,18 +217,23 @@ OLD_LIBS+=usr/lib32/pam_unix.so.5 OLD_FILES+=usr/include/altq/altq_codel.h OLD_FILES+=usr/include/altq/altq_fairq.h # 20160519: remove DTrace Toolkit from base +OLD_FILES+=usr/sbin/dtruss OLD_FILES+=usr/share/dtrace/toolkit/execsnoop OLD_FILES+=usr/share/dtrace/toolkit/hotkernel OLD_FILES+=usr/share/dtrace/toolkit/hotuser OLD_FILES+=usr/share/dtrace/toolkit/opensnoop OLD_FILES+=usr/share/dtrace/toolkit/procsystime OLD_DIRS+=usr/share/dtrace/toolkit +OLD_FILES+=usr/share/man/man1/dtruss.1.gz # 20160519: stale MLINK removed OLD_FILES+=usr/share/man/man9/rman_await_resource.9.gz # 20160517: ReiserFS removed OLD_FILES+=usr/share/man/man5/reiserfs.5.gz +# 20160504: tests rework +OLD_FILES+=usr/tests/lib/libc/regex/data/README # 20160430: kvm_getfiles(3) removed from kvm(3) OLD_LIBS+=lib/libkvm.so.6 +OLD_LIBS+=usr/lib32/libkvm.so.6 OLD_FILES+=usr/share/man/man3/kvm_getfiles.3.gz # 20160423: remove mroute6d OLD_FILES+=etc/rc.d/mroute6d @@ -372,12 +381,18 @@ OLD_LIBS+=usr/lib32/libcapsicum.so.0 OLD_FILES+=usr/lib32/libcapsicum_p.a # 20160223: functionality from mkulzma(1) merged into mkuzip(1) OLD_FILES+=usr/bin/mkulzma +OLD_FILES+=usr/share/man/man4/geom_uncompress.4.gz +OLD_FILES+=usr/share/man/man8/mkulzma.8.gz # 20160211: Remove obsolete unbound-control-setup OLD_FILES+=usr/sbin/unbound-control-setup +# 20160121: cc.h moved +OLD_FILES+=usr/include/netinet/cc.h # 20160116: Update mandoc to cvs snapshot 20160116 OLD_FILES+=usr/share/mdocml/example.style.css OLD_FILES+=usr/share/mdocml/style.css OLD_DIRS+=usr/share/mdocml +# 20160114: SA-16:06.snmpd +OLD_FILES+=usr/share/examples/etc/snmpd.config # 20151225: new clang import which bumps version from 3.7.0 to 3.7.1. OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/asan_interface.h @@ -462,6 +477,9 @@ OLD_FILES+=usr/lib/clang/3.7.0/lib/freeb OLD_DIRS+=usr/lib/clang/3.7.0/lib/freebsd OLD_DIRS+=usr/lib/clang/3.7.0/lib OLD_DIRS+=usr/lib/clang/3.7.0 +# 20151201: mqueue tests 3 and 4 disabled +OLD_FILES+=usr/tests/sys/mqueue/mqtest3 +OLD_FILES+=usr/tests/sys/mqueue/mqtest4 # 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406) OLD_LIBS+=usr/lib/libelf.so.2 # 20151115: Fox bad upgrade scheme @@ -596,6 +614,8 @@ OLD_LIBS+=lib/libcrypto.so.7 OLD_LIBS+=usr/lib/libssl.so.7 OLD_LIBS+=usr/lib32/libcrypto.so.7 OLD_LIBS+=usr/lib32/libssl.so.7 +# 20151029: LinuxKPI moved to sys/compat/linuxkpi +OLD_FILES+=usr/include/dev/usb/usb_compat_linux.h # 20151015: test symbols moved to /usr/lib/debug OLD_DIRS+=usr/tests/lib/atf/libatf-c++/.debug OLD_FILES+=usr/tests/lib/atf/libatf-c++/.debug/atf_c++_test.debug Modified: projects/mips64-clang/etc/mtree/BSD.include.dist ============================================================================== --- projects/mips64-clang/etc/mtree/BSD.include.dist Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/etc/mtree/BSD.include.dist Wed Sep 14 14:05:31 2016 (r305809) @@ -110,6 +110,8 @@ .. ciss .. + evdev + .. filemon .. firewire Modified: projects/mips64-clang/include/Makefile ============================================================================== --- projects/mips64-clang/include/Makefile Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/include/Makefile Wed Sep 14 14:05:31 2016 (r305809) @@ -154,7 +154,7 @@ copies: .PHONY .META done; \ fi .endfor -.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS} +.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS} cd ${.CURDIR}/../sys; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ ${DESTDIR}${INCLUDEDIR}/$i @@ -177,6 +177,13 @@ copies: .PHONY .META ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 nand_dev.h \ ${DESTDIR}${INCLUDEDIR}/dev/nand .endif + cd ${.CURDIR}/../sys/dev/evdev; \ + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input.h \ + ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 input-event-codes.h \ + ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 uinput.h \ + ${DESTDIR}${INCLUDEDIR}/dev/evdev cd ${.CURDIR}/../sys/dev/pci; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \ ${DESTDIR}${INCLUDEDIR}/dev/pci @@ -238,7 +245,7 @@ symlinks: .PHONY .META ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ done .endfor -.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/nand:Ndev/pci} +.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/nand:Ndev/pci} cd ${.CURDIR}/../sys/$i; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ @@ -266,6 +273,11 @@ symlinks: .PHONY .META ${DESTDIR}${INCLUDEDIR}/dev/nand; \ done .endif + cd ${.CURDIR}/../sys/dev/evdev; \ + for h in input.h input-event-codes.h uinput.h; do \ + ln -fs ../../../../sys/dev/evdev/$$h \ + ${DESTDIR}${INCLUDEDIR}/dev/evdev; \ + done cd ${.CURDIR}/../sys/dev/pci; \ for h in pcireg.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/pci/$$h \ Modified: projects/mips64-clang/lib/libstand/net.h ============================================================================== --- projects/mips64-clang/lib/libstand/net.h Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/lib/libstand/net.h Wed Sep 14 14:05:31 2016 (r305809) @@ -130,4 +130,4 @@ n_long inet_addr(char *); /* Machine-dependent functions: */ time_t getsecs(void); -#endif +#endif /* ! _STAND_NET_H */ Modified: projects/mips64-clang/release/arm/CUBIEBOARD.conf ============================================================================== --- projects/mips64-clang/release/arm/CUBIEBOARD.conf Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/release/arm/CUBIEBOARD.conf Wed Sep 14 14:05:31 2016 (r305809) @@ -7,7 +7,7 @@ EMBEDDEDBUILD=1 EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-cubieboard" -KERNEL="CUBIEBOARD" +KERNEL="ALLWINNER_UP" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x42000000" IMAGE_SIZE="1G" PART_SCHEME="MBR" Modified: projects/mips64-clang/share/man/man9/device_quiet.9 ============================================================================== --- projects/mips64-clang/share/man/man9/device_quiet.9 Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/share/man/man9/device_quiet.9 Wed Sep 14 14:05:31 2016 (r305809) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 21, 1999 +.Dd September 12, 2016 .Dt DEVICE_QUIET 9 .Os .Sh NAME @@ -49,16 +49,18 @@ Each device has a quiet flag associated with it. A device is verbose by default when it is created but may be quieted to prevent -the device identification string to be printed during probe. +printing of the device identification string during attach +and printing of a message during detach. To quiet a device, call -.Fn device_quiet , -to re-enable to probe message (to make the message appear again, for -example after a -.Xr device_detach 9 ) +.Fn device_quiet +during a device driver probe routine. +To re-enable probe messages, call .Fn device_verbose . To test to see if a device is quieted, call .Fn device_is_quiet . +.Pp +Devices are implicitly marked verbose after a driver detaches. .Sh SEE ALSO .Xr device 9 .Sh AUTHORS Modified: projects/mips64-clang/share/mk/meta.sys.mk ============================================================================== --- projects/mips64-clang/share/mk/meta.sys.mk Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/share/mk/meta.sys.mk Wed Sep 14 14:05:31 2016 (r305809) @@ -114,16 +114,13 @@ _metaError: .NOMETA .NOTMAIN .endif -META_COOKIE_TOUCH= -# some targets need to be .PHONY in non-meta mode -META_NOPHONY= .PHONY # Are we, after all, in meta mode? .if ${.MAKE.MODE:Uno:Mmeta*} != "" MKDEP_MK = meta.autodep.mk # we can afford to use cookies to prevent some targets # re-running needlessly -META_COOKIE_TOUCH= touch ${COOKIE.${.TARGET}:U${.OBJDIR}/${.TARGET:T}} +META_COOKIE_TOUCH?= touch ${COOKIE.${.TARGET}:U${.OBJDIR}/${.TARGET:T}} META_NOPHONY= # some targets involve old pre-built targets @@ -159,5 +156,9 @@ BUILD_AT_LEVEL0 ?= no .endif .endif +.else +META_COOKIE_TOUCH= +# some targets need to be .PHONY in non-meta mode +META_NOPHONY= .PHONY .endif .endif Modified: projects/mips64-clang/sys/amd64/amd64/trap.c ============================================================================== --- projects/mips64-clang/sys/amd64/amd64/trap.c Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/amd64/amd64/trap.c Wed Sep 14 14:05:31 2016 (r305809) @@ -236,7 +236,7 @@ trap(struct trapframe *frame) * interrupts disabled until they are accidentally * enabled later. */ - if (ISPL(frame->tf_cs) == SEL_UPL) + if (TRAPF_USERMODE(frame)) uprintf( "pid %ld (%s): trap %d with interrupts disabled\n", (long)curproc->p_pid, curthread->td_name, type); @@ -260,7 +260,7 @@ trap(struct trapframe *frame) code = frame->tf_err; - if (ISPL(frame->tf_cs) == SEL_UPL) { + if (TRAPF_USERMODE(frame)) { /* user trap */ td->td_pticks = 0; @@ -787,7 +787,7 @@ trap_fatal(frame, eva) else msg = "UNKNOWN"; printf("\n\nFatal trap %d: %s while in %s mode\n", type, msg, - ISPL(frame->tf_cs) == SEL_UPL ? "user" : "kernel"); + TRAPF_USERMODE(frame) ? "user" : "kernel"); #ifdef SMP /* two separate prints in case of a trap on an unmapped page */ printf("cpuid = %d; ", PCPU_GET(cpuid)); @@ -804,7 +804,7 @@ trap_fatal(frame, eva) } printf("instruction pointer = 0x%lx:0x%lx\n", frame->tf_cs & 0xffff, frame->tf_rip); - if (ISPL(frame->tf_cs) == SEL_UPL) { + if (TF_HAS_STACKREGS(frame)) { ss = frame->tf_ss & 0xffff; esp = frame->tf_rsp; } else { @@ -934,7 +934,7 @@ amd64_syscall(struct thread *td, int tra ksiginfo_t ksi; #ifdef DIAGNOSTIC - if (ISPL(td->td_frame->tf_cs) != SEL_UPL) { + if (!TRAPF_USERMODE(frame)) { panic("syscall"); /* NOT REACHED */ } Modified: projects/mips64-clang/sys/arm/conf/BEAGLEBONE ============================================================================== --- projects/mips64-clang/sys/arm/conf/BEAGLEBONE Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/arm/conf/BEAGLEBONE Wed Sep 14 14:05:31 2016 (r305809) @@ -131,3 +131,6 @@ device hdmi device ums device ukbd device kbdmux + +# Uncomment to enable evdev support for ti_adc +# options EVDEV Modified: projects/mips64-clang/sys/arm/ti/ti_adc.c ============================================================================== --- projects/mips64-clang/sys/arm/ti/ti_adc.c Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/arm/ti/ti_adc.c Wed Sep 14 14:05:31 2016 (r305809) @@ -27,6 +27,8 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_evdev.h" + #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -52,6 +54,11 @@ __FBSDID("$FreeBSD$"); #include <dev/ofw/ofw_bus.h> #include <dev/ofw/ofw_bus_subr.h> +#ifdef EVDEV +#include <dev/evdev/input.h> +#include <dev/evdev/evdev.h> +#endif + #include <arm/ti/ti_prcm.h> #include <arm/ti/ti_adcreg.h> #include <arm/ti/ti_adcvar.h> @@ -80,6 +87,20 @@ static struct ti_adc_input ti_adc_inputs static int ti_adc_samples[5] = { 0, 2, 4, 8, 16 }; +static int ti_adc_detach(device_t dev); + +#ifdef EVDEV +static void +ti_adc_ev_report(struct ti_adc_softc *sc) +{ + + evdev_push_event(sc->sc_evdev, EV_ABS, ABS_X, sc->sc_x); + evdev_push_event(sc->sc_evdev, EV_ABS, ABS_Y, sc->sc_y); + evdev_push_event(sc->sc_evdev, EV_KEY, BTN_TOUCH, sc->sc_pen_down); + evdev_sync(sc->sc_evdev); +} +#endif /* EVDEV */ + static void ti_adc_enable(struct ti_adc_softc *sc) { @@ -450,7 +471,14 @@ ti_adc_tsc_read_data(struct ti_adc_softc #ifdef DEBUG_TSC device_printf(sc->sc_dev, "touchscreen x: %d, y: %d\n", x, y); #endif - /* TODO: That's where actual event reporting should take place */ + +#ifdef EVDEV + if ((sc->sc_x != x) || (sc->sc_y != y)) { + sc->sc_x = x; + sc->sc_y = y; + ti_adc_ev_report(sc); + } +#endif } static void @@ -488,11 +516,17 @@ ti_adc_intr(void *arg) status |= ADC_IRQ_HW_PEN_ASYNC; ADC_WRITE4(sc, ADC_IRQENABLE_CLR, ADC_IRQ_HW_PEN_ASYNC); +#ifdef EVDEV + ti_adc_ev_report(sc); +#endif } if (rawstatus & ADC_IRQ_PEN_UP) { sc->sc_pen_down = 0; status |= ADC_IRQ_PEN_UP; +#ifdef EVDEV + ti_adc_ev_report(sc); +#endif } if (status & ADC_IRQ_FIFO0_THRES) @@ -840,6 +874,38 @@ ti_adc_attach(device_t dev) ti_adc_setup(sc); TI_ADC_UNLOCK(sc); +#ifdef EVDEV + if (sc->sc_tsc_wires > 0) { + sc->sc_evdev = evdev_alloc(); + evdev_set_name(sc->sc_evdev, device_get_desc(dev)); + evdev_set_phys(sc->sc_evdev, device_get_nameunit(dev)); + evdev_set_id(sc->sc_evdev, BUS_VIRTUAL, 0, 0, 0); + evdev_support_prop(sc->sc_evdev, INPUT_PROP_DIRECT); + evdev_support_event(sc->sc_evdev, EV_SYN); + evdev_support_event(sc->sc_evdev, EV_ABS); + evdev_support_event(sc->sc_evdev, EV_KEY); + + evdev_support_abs(sc->sc_evdev, ABS_X, 0, 0, + ADC_MAX_VALUE, 0, 0, 0); + evdev_support_abs(sc->sc_evdev, ABS_Y, 0, 0, + ADC_MAX_VALUE, 0, 0, 0); + + evdev_support_key(sc->sc_evdev, BTN_TOUCH); + + err = evdev_register(sc->sc_evdev); + if (err) { + device_printf(dev, + "failed to register evdev: error=%d\n", err); + ti_adc_detach(dev); + return (err); + } + + sc->sc_pen_down = 0; + sc->sc_x = -1; + sc->sc_y = -1; + } +#endif /* EVDEV */ + return (0); } @@ -854,6 +920,11 @@ ti_adc_detach(device_t dev) TI_ADC_LOCK(sc); ti_adc_reset(sc); ti_adc_setup(sc); + +#ifdef EVDEV + evdev_free(sc->sc_evdev); +#endif + TI_ADC_UNLOCK(sc); TI_ADC_LOCK_DESTROY(sc); Modified: projects/mips64-clang/sys/arm/ti/ti_adcreg.h ============================================================================== --- projects/mips64-clang/sys/arm/ti/ti_adcreg.h Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/arm/ti/ti_adcreg.h Wed Sep 14 14:05:31 2016 (r305809) @@ -122,5 +122,6 @@ #define ADC_FIFO_STEP_ID_MSK 0x000f0000 #define ADC_FIFO_STEP_ID_SHIFT 16 #define ADC_FIFO_DATA_MSK 0x00000fff +#define ADC_MAX_VALUE 0xfff #endif /* _TI_ADCREG_H_ */ Modified: projects/mips64-clang/sys/arm/ti/ti_adcvar.h ============================================================================== --- projects/mips64-clang/sys/arm/ti/ti_adcvar.h Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/arm/ti/ti_adcvar.h Wed Sep 14 14:05:31 2016 (r305809) @@ -55,6 +55,11 @@ struct ti_adc_softc { int sc_yn_bit, sc_yn_inp; uint32_t sc_tsc_enabled; int sc_pen_down; +#ifdef EVDEV + int sc_x; + int sc_y; + struct evdev_dev *sc_evdev; +#endif }; struct ti_adc_input { Modified: projects/mips64-clang/sys/arm/ti/ti_cpuid.c ============================================================================== --- projects/mips64-clang/sys/arm/ti/ti_cpuid.c Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/arm/ti/ti_cpuid.c Wed Sep 14 14:05:31 2016 (r305809) @@ -201,8 +201,10 @@ static void am335x_get_revision(void) { uint32_t dev_feature; - uint8_t cpu_last_char; + char cpu_last_char; bus_space_handle_t bsh; + int major; + int minor; bus_space_map(fdtbus_bs_tag, AM335X_CONTROL_BASE, AM335X_CONTROL_SIZE, 0, &bsh); chip_revision = bus_space_read_4(fdtbus_bs_tag, bsh, AM335X_CONTROL_DEVICE_ID); @@ -232,8 +234,26 @@ am335x_get_revision(void) cpu_last_char='x'; } - printf("Texas Instruments AM335%c Processor, Revision ES1.%u\n", - cpu_last_char, AM335X_DEVREV(chip_revision)); + switch(AM335X_DEVREV(chip_revision)) { + case 0: + major = 1; + minor = 0; + break; + case 1: + major = 2; + minor = 0; + break; + case 2: + major = 2; + minor = 1; + break; + default: + major = 0; + minor = AM335X_DEVREV(chip_revision); + break; + } + printf("Texas Instruments AM335%c Processor, Revision ES%u.%u\n", + cpu_last_char, major, minor); } /** Modified: projects/mips64-clang/sys/arm64/arm64/db_trace.c ============================================================================== --- projects/mips64-clang/sys/arm64/arm64/db_trace.c Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/arm64/arm64/db_trace.c Wed Sep 14 14:05:31 2016 (r305809) @@ -27,6 +27,8 @@ * SUCH DAMAGE. */ +#include "opt_ddb.h" + #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #include <sys/param.h> Modified: projects/mips64-clang/sys/arm64/arm64/debug_monitor.c ============================================================================== --- projects/mips64-clang/sys/arm64/arm64/debug_monitor.c Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/arm64/arm64/debug_monitor.c Wed Sep 14 14:05:31 2016 (r305809) @@ -27,6 +27,8 @@ * SUCH DAMAGE. */ +#include "opt_ddb.h" + #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); Modified: projects/mips64-clang/sys/arm64/arm64/identcpu.c ============================================================================== --- projects/mips64-clang/sys/arm64/arm64/identcpu.c Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/arm64/arm64/identcpu.c Wed Sep 14 14:05:31 2016 (r305809) @@ -179,6 +179,28 @@ print_cpu_features(u_int cpu) } printf("\n"); + /* + * There is a hardware errata where, if one CPU is performing a TLB + * invalidation while another is performing a store-exclusive the + * store-exclusive may return the wrong status. A workaround seems + * to be to use an IPI to invalidate on each CPU, however given the + * limited number of affected units (pass 1.1 is the evaluation + * hardware revision), and the lack of information from Cavium + * this has not been implemented. + * + * At the time of writing this the only information is from: + * https://lkml.org/lkml/2016/8/4/722 + */ + /* + * XXX: CPU_MATCH_ERRATA_CAVIUM_THUNDER_1_1 on it's own also + * triggers on pass 2.0+. + */ + if (cpu == 0 && CPU_VAR(PCPU_GET(midr)) == 0 && + CPU_MATCH_ERRATA_CAVIUM_THUNDER_1_1) + printf("WARNING: ThunderX Pass 1.1 detected.\nThis has known " + "hardware bugs that may cause the incorrect operation of " + "atomic operations.\n"); + if (cpu != 0 && cpu_print_regs == 0) return; Modified: projects/mips64-clang/sys/arm64/include/debug_monitor.h ============================================================================== --- projects/mips64-clang/sys/arm64/include/debug_monitor.h Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/arm64/include/debug_monitor.h Wed Sep 14 14:05:31 2016 (r305809) @@ -32,7 +32,7 @@ #ifndef _MACHINE_DEBUG_MONITOR_H_ #define _MACHINE_DEBUG_MONITOR_H_ -#ifdef KDB +#ifdef DDB #include <machine/db_machdep.h> Modified: projects/mips64-clang/sys/boot/common/dev_net.c ============================================================================== --- projects/mips64-clang/sys/boot/common/dev_net.c Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/boot/common/dev_net.c Wed Sep 14 14:05:31 2016 (r305809) @@ -368,7 +368,7 @@ net_print(int verbose) uint32_t net_parse_rootpath() { - int i, ipstart; + int i; n_long addr = INADDR_NONE; netproto = NET_NFS; @@ -383,7 +383,7 @@ net_parse_rootpath() break; if (i && i != FNAME_SIZE && rootpath[i] == ':') { rootpath[i++] = '\0'; - addr = inet_addr(&rootpath[ipstart]); + addr = inet_addr(&rootpath[0]); bcopy(&rootpath[i], rootpath, strlen(&rootpath[i])+1); } Modified: projects/mips64-clang/sys/boot/kshim/bsd_kernel.c ============================================================================== --- projects/mips64-clang/sys/boot/kshim/bsd_kernel.c Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/boot/kshim/bsd_kernel.c Wed Sep 14 14:05:31 2016 (r305809) @@ -432,8 +432,8 @@ callout_callback(struct callout *c) } mtx_unlock(&mtx_callout); - if (c->func) - (c->func) (c->arg); + if (c->c_func != NULL) + (c->c_func) (c->c_arg); if (!(c->flags & CALLOUT_RETURNUNLOCKED)) mtx_unlock(c->mtx); @@ -487,8 +487,8 @@ callout_reset(struct callout *c, int to_ { callout_stop(c); - c->func = func; - c->arg = arg; + c->c_func = func; + c->c_arg = arg; c->timeout = ticks + to_ticks; mtx_lock(&mtx_callout); @@ -507,8 +507,8 @@ callout_stop(struct callout *c) } mtx_unlock(&mtx_callout); - c->func = NULL; - c->arg = NULL; + c->c_func = NULL; + c->c_arg = NULL; } void Modified: projects/mips64-clang/sys/boot/kshim/bsd_kernel.h ============================================================================== --- projects/mips64-clang/sys/boot/kshim/bsd_kernel.h Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/boot/kshim/bsd_kernel.h Wed Sep 14 14:05:31 2016 (r305809) @@ -299,8 +299,8 @@ extern volatile int ticks; struct callout { LIST_ENTRY(callout) entry; - callout_fn_t *func; - void *arg; + callout_fn_t *c_func; + void *c_arg; struct mtx *mtx; int flags; int timeout; Modified: projects/mips64-clang/sys/conf/NOTES ============================================================================== --- projects/mips64-clang/sys/conf/NOTES Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/conf/NOTES Wed Sep 14 14:05:31 2016 (r305809) @@ -3052,3 +3052,8 @@ options GZIO # BHND(4) drivers options BHND_LOGLEVEL # Logging threshold level + +# evdev interface +options EVDEV +options EVDEV_DEBUG +options UINPUT_DEBUG Modified: projects/mips64-clang/sys/conf/files ============================================================================== --- projects/mips64-clang/sys/conf/files Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/conf/files Wed Sep 14 14:05:31 2016 (r305809) @@ -1501,6 +1501,11 @@ dev/etherswitch/ip17x/ip17x_vlans.c opti dev/etherswitch/miiproxy.c optional miiproxy dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb dev/etherswitch/ukswitch/ukswitch.c optional ukswitch +dev/evdev/cdev.c optional evdev +dev/evdev/evdev.c optional evdev +dev/evdev/evdev_mt.c optional evdev +dev/evdev/evdev_utils.c optional evdev +dev/evdev/uinput.c optional evdev uinput dev/ex/if_ex.c optional ex dev/ex/if_ex_isa.c optional ex isa dev/ex/if_ex_pccard.c optional ex pccard Modified: projects/mips64-clang/sys/conf/files.arm64 ============================================================================== --- projects/mips64-clang/sys/conf/files.arm64 Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/conf/files.arm64 Wed Sep 14 14:05:31 2016 (r305809) @@ -62,7 +62,7 @@ arm64/arm64/cpufunc_asm.S standard arm64/arm64/db_disasm.c optional ddb arm64/arm64/db_interface.c optional ddb arm64/arm64/db_trace.c optional ddb -arm64/arm64/debug_monitor.c optional kdb +arm64/arm64/debug_monitor.c optional ddb arm64/arm64/disassem.c optional ddb arm64/arm64/dump_machdep.c standard arm64/arm64/elf_machdep.c standard Modified: projects/mips64-clang/sys/conf/options ============================================================================== --- projects/mips64-clang/sys/conf/options Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/conf/options Wed Sep 14 14:05:31 2016 (r305809) @@ -987,3 +987,8 @@ BHND_LOGLEVEL opt_global.h # GPIO and child devices GPIO_SPI_DEBUG opt_gpio.h + +# evdev protocol support +EVDEV opt_evdev.h +EVDEV_DEBUG opt_evdev.h +UINPUT_DEBUG opt_evdev.h Modified: projects/mips64-clang/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c ============================================================================== --- projects/mips64-clang/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Wed Sep 14 14:05:31 2016 (r305809) @@ -2339,7 +2339,9 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC } else { ar9300_disable_pcie_phy(ah); } +#if 0 ath_hal_printf(ah, "%s: calling ar9300_hw_attach\n", __func__); +#endif ecode = ar9300_hw_attach(ah); if (ecode != HAL_OK) { goto bad; @@ -3234,7 +3236,9 @@ ar9300_hw_attach(struct ath_hal *ah) return HAL_ESELFTEST; } +#if 0 ath_hal_printf(ah, "%s: calling ar9300_eeprom_attach\n", __func__); +#endif ecode = ar9300_eeprom_attach(ah); ath_hal_printf(ah, "%s: ar9300_eeprom_attach returned %d\n", __func__, ecode); if (ecode != HAL_OK) { Modified: projects/mips64-clang/sys/dev/ath/if_ath_tx.c ============================================================================== --- projects/mips64-clang/sys/dev/ath/if_ath_tx.c Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/dev/ath/if_ath_tx.c Wed Sep 14 14:05:31 2016 (r305809) @@ -1042,6 +1042,14 @@ ath_tx_calc_protection(struct ath_softc shortPreamble = bf->bf_state.bfs_shpream; wh = mtod(bf->bf_m, struct ieee80211_frame *); + /* Disable frame protection for TOA probe frames */ + if (bf->bf_flags & ATH_BUF_TOA_PROBE) { + /* XXX count */ + flags &= ~(HAL_TXDESC_CTSENA | HAL_TXDESC_RTSENA); + bf->bf_state.bfs_doprot = 0; + goto finish; + } + /* * If 802.11g protection is enabled, determine whether * to use RTS/CTS or just CTS. Note that this is only @@ -1081,6 +1089,8 @@ ath_tx_calc_protection(struct ath_softc flags |= HAL_TXDESC_RTSENA; sc->sc_stats.ast_tx_htprotect++; } + +finish: bf->bf_state.bfs_txflags = flags; } @@ -1739,6 +1749,34 @@ ath_tx_normal_setup(struct ath_softc *sc } #endif + /* + * If it's a frame to do location reporting on, + * communicate it to the HAL. + */ + if (ieee80211_get_toa_params(m0, NULL)) { + device_printf(sc->sc_dev, + "%s: setting TX positioning bit\n", __func__); + flags |= HAL_TXDESC_POS; + + /* + * Note: The hardware reports timestamps for + * each of the RX'ed packets as part of the packet + * exchange. So this means things like RTS/CTS + * exchanges, as well as the final ACK. + * + * So, if you send a RTS-protected NULL data frame, + * you'll get an RX report for the RTS response, then + * an RX report for the NULL frame, and then the TX + * completion at the end. + * + * NOTE: it doesn't work right for CCK frames; + * there's no channel info data provided unless + * it's OFDM or HT. Will have to dig into it. + */ + flags &= ~(HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); + bf->bf_flags |= ATH_BUF_TOA_PROBE; + } + #if 0 /* * Placeholder: if you want to transmit with the azimuth @@ -2175,6 +2213,18 @@ ath_tx_raw_start(struct ath_softc *sc, s try0 = ATH_TXMAXTRY; /* XXX?too many? */ } + /* + * If it's a frame to do location reporting on, + * communicate it to the HAL. + */ + if (ieee80211_get_toa_params(m0, NULL)) { + device_printf(sc->sc_dev, + "%s: setting TX positioning bit\n", __func__); + flags |= HAL_TXDESC_POS; + flags &= ~(HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA); + bf->bf_flags |= ATH_BUF_TOA_PROBE; + } + txrate = rt->info[rix].rateCode; if (params->ibp_flags & IEEE80211_BPF_SHORTPRE) txrate |= rt->info[rix].shortPreamble; Modified: projects/mips64-clang/sys/dev/ath/if_ath_tx_edma.c ============================================================================== --- projects/mips64-clang/sys/dev/ath/if_ath_tx_edma.c Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/dev/ath/if_ath_tx_edma.c Wed Sep 14 14:05:31 2016 (r305809) @@ -268,7 +268,7 @@ ath_tx_edma_push_staging_list(struct ath /* Bump FIFO queue */ txq->axq_fifo_depth++; - DPRINTF(sc, ATH_DEBUG_XMIT, + DPRINTF(sc, ATH_DEBUG_XMIT | ATH_DEBUG_TX_PROC, "%s: queued %d packets; depth=%d, fifo depth=%d\n", __func__, sqdepth, txq->fifo.axq_depth, txq->axq_fifo_depth); @@ -296,16 +296,21 @@ ath_edma_tx_fifo_fill(struct ath_softc * ATH_TXQ_LOCK_ASSERT(txq); - DPRINTF(sc, ATH_DEBUG_TX_PROC, "%s: Q%d: called\n", + DPRINTF(sc, ATH_DEBUG_TX_PROC, + "%s: Q%d: called; fifo.depth=%d, fifo depth=%d, depth=%d, aggr_depth=%d\n", __func__, - txq->axq_qnum); + txq->axq_qnum, + txq->fifo.axq_depth, + txq->axq_fifo_depth, + txq->axq_depth, + txq->axq_aggr_depth); /* - * For now, push up to 4 frames per TX FIFO slot. + * For now, push up to 32 frames per TX FIFO slot. * If more are in the hardware queue then they'll * get populated when we try to send another frame * or complete a frame - so at most there'll be - * 32 non-AMPDU frames per TXQ. + * 32 non-AMPDU frames per node/TID anyway. * * Note that the hardware staging queue will limit * how many frames in total we will have pushed into @@ -811,10 +816,11 @@ ath_edma_tx_processq(struct ath_softc *s } #if defined(ATH_DEBUG_ALQ) && defined(ATH_DEBUG) - if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_EDMA_TXSTATUS)) + if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_EDMA_TXSTATUS)) { if_ath_alq_post(&sc->sc_alq, ATH_ALQ_EDMA_TXSTATUS, sc->sc_tx_statuslen, (char *) txstatus); + } #endif /* ATH_DEBUG_ALQ */ /* Modified: projects/mips64-clang/sys/dev/cxgbe/adapter.h ============================================================================== --- projects/mips64-clang/sys/dev/cxgbe/adapter.h Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/dev/cxgbe/adapter.h Wed Sep 14 14:05:31 2016 (r305809) @@ -835,7 +835,7 @@ struct adapter { uint16_t niccaps; uint16_t toecaps; uint16_t rdmacaps; - uint16_t tlscaps; + uint16_t cryptocaps; uint16_t iscsicaps; uint16_t fcoecaps; @@ -1040,12 +1040,26 @@ is_10G_port(const struct port_info *pi) } static inline bool +is_25G_port(const struct port_info *pi) +{ + + return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G) != 0); +} + +static inline bool is_40G_port(const struct port_info *pi) { return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) != 0); } +static inline bool +is_100G_port(const struct port_info *pi) +{ + + return ((pi->link_cfg.supported & FW_PORT_CAP_SPEED_100G) != 0); +} + static inline int port_top_speed(const struct port_info *pi) { @@ -1054,6 +1068,8 @@ port_top_speed(const struct port_info *p return (100); if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) return (40); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G) + return (25); if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) return (10); if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G) Modified: projects/mips64-clang/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- projects/mips64-clang/sys/dev/cxgbe/common/t4_hw.c Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/dev/cxgbe/common/t4_hw.c Wed Sep 14 14:05:31 2016 (r305809) @@ -3669,8 +3669,9 @@ void t4_ulprx_read_la(struct adapter *ad } #define ADVERT_MASK (FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G |\ - FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_40G | \ - FW_PORT_CAP_SPEED_100G | FW_PORT_CAP_ANEG) + FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_25G | \ + FW_PORT_CAP_SPEED_40G | FW_PORT_CAP_SPEED_100G | \ + FW_PORT_CAP_ANEG) /** * t4_link_l1cfg - apply link configuration to MAC/PHY @@ -5775,6 +5776,11 @@ const char *t4_get_port_type_description "QSA", "QSFP", "BP40_BA", + "KR4_100G", + "CR4_QSFP", + "CR_QSFP", + "CR2_QSFP", + "SFP28", }; if (port_type < ARRAY_SIZE(port_type_description)) @@ -7462,8 +7468,12 @@ int t4_handle_fw_rpl(struct adapter *ada speed = 1000; else if (stat & V_FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_10G)) speed = 10000; + else if (stat & V_FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_25G)) + speed = 25000; else if (stat & V_FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_40G)) speed = 40000; + else if (stat & V_FW_PORT_CMD_LSPEED(FW_PORT_CAP_SPEED_100G)) + speed = 100000; for_each_port(adap, i) { pi = adap2pinfo(adap, i); Modified: projects/mips64-clang/sys/dev/cxgbe/firmware/t4fw_interface.h ============================================================================== --- projects/mips64-clang/sys/dev/cxgbe/firmware/t4fw_interface.h Wed Sep 14 13:59:18 2016 (r305808) +++ projects/mips64-clang/sys/dev/cxgbe/firmware/t4fw_interface.h Wed Sep 14 14:05:31 2016 (r305809) @@ -135,7 +135,9 @@ enum fw_wr_opcodes { FW_POFCOE_ULPTX_WR = 0x43, FW_ISCSI_TX_DATA_WR = 0x45, FW_PTP_TX_PKT_WR = 0x46, - FW_SEC_LOOKASIDE_LPBK_WR= 0x6d, + FW_TLSTX_DATA_WR = 0x68, + FW_TLS_KEYCTX_TX_WR = 0x69, + FW_CRYPTO_LOOKASIDE_WR = 0x6d, FW_COiSCSI_TGT_WR = 0x70, FW_COiSCSI_TGT_CONN_WR = 0x71, FW_COiSCSI_TGT_XMIT_WR = 0x72, @@ -3384,8 +3386,429 @@ struct fw_pi_error { #define G_FW_PI_ERROR_ERR_TYPE(x) \ (((x) >> S_FW_PI_ERROR_ERR_TYPE) & M_FW_PI_ERROR_ERR_TYPE) +struct fw_tlstx_data_wr { + __be32 op_to_immdlen; + __be32 flowid_len16; + __be32 plen; + __be32 lsodisable_to_flags; + __be32 ddraddr; + __be32 ctxloc_to_exp; + __be16 mfs; + __u8 r6[6]; +}; + +#define S_FW_TLSTX_DATA_WR_COMPL 21 +#define M_FW_TLSTX_DATA_WR_COMPL 0x1 +#define V_FW_TLSTX_DATA_WR_COMPL(x) ((x) << S_FW_TLSTX_DATA_WR_COMPL) +#define G_FW_TLSTX_DATA_WR_COMPL(x) \ + (((x) >> S_FW_TLSTX_DATA_WR_COMPL) & M_FW_TLSTX_DATA_WR_COMPL) +#define F_FW_TLSTX_DATA_WR_COMPL V_FW_TLSTX_DATA_WR_COMPL(1U) + +#define S_FW_TLSTX_DATA_WR_IMMDLEN 0 +#define M_FW_TLSTX_DATA_WR_IMMDLEN 0xff +#define V_FW_TLSTX_DATA_WR_IMMDLEN(x) ((x) << S_FW_TLSTX_DATA_WR_IMMDLEN) +#define G_FW_TLSTX_DATA_WR_IMMDLEN(x) \ + (((x) >> S_FW_TLSTX_DATA_WR_IMMDLEN) & M_FW_TLSTX_DATA_WR_IMMDLEN) + +#define S_FW_TLSTX_DATA_WR_FLOWID 8 +#define M_FW_TLSTX_DATA_WR_FLOWID 0xfffff +#define V_FW_TLSTX_DATA_WR_FLOWID(x) ((x) << S_FW_TLSTX_DATA_WR_FLOWID) +#define G_FW_TLSTX_DATA_WR_FLOWID(x) \ + (((x) >> S_FW_TLSTX_DATA_WR_FLOWID) & M_FW_TLSTX_DATA_WR_FLOWID) + +#define S_FW_TLSTX_DATA_WR_LEN16 0 +#define M_FW_TLSTX_DATA_WR_LEN16 0xff +#define V_FW_TLSTX_DATA_WR_LEN16(x) ((x) << S_FW_TLSTX_DATA_WR_LEN16) +#define G_FW_TLSTX_DATA_WR_LEN16(x) \ + (((x) >> S_FW_TLSTX_DATA_WR_LEN16) & M_FW_TLSTX_DATA_WR_LEN16) + +#define S_FW_TLSTX_DATA_WR_LSODISABLE 31 +#define M_FW_TLSTX_DATA_WR_LSODISABLE 0x1 +#define V_FW_TLSTX_DATA_WR_LSODISABLE(x) \ + ((x) << S_FW_TLSTX_DATA_WR_LSODISABLE) +#define G_FW_TLSTX_DATA_WR_LSODISABLE(x) \ + (((x) >> S_FW_TLSTX_DATA_WR_LSODISABLE) & M_FW_TLSTX_DATA_WR_LSODISABLE) +#define F_FW_TLSTX_DATA_WR_LSODISABLE V_FW_TLSTX_DATA_WR_LSODISABLE(1U) + +#define S_FW_TLSTX_DATA_WR_ALIGNPLD 30 +#define M_FW_TLSTX_DATA_WR_ALIGNPLD 0x1 +#define V_FW_TLSTX_DATA_WR_ALIGNPLD(x) ((x) << S_FW_TLSTX_DATA_WR_ALIGNPLD) +#define G_FW_TLSTX_DATA_WR_ALIGNPLD(x) \ + (((x) >> S_FW_TLSTX_DATA_WR_ALIGNPLD) & M_FW_TLSTX_DATA_WR_ALIGNPLD) +#define F_FW_TLSTX_DATA_WR_ALIGNPLD V_FW_TLSTX_DATA_WR_ALIGNPLD(1U) + +#define S_FW_TLSTX_DATA_WR_ALIGNPLDSHOVE 29 +#define M_FW_TLSTX_DATA_WR_ALIGNPLDSHOVE 0x1 +#define V_FW_TLSTX_DATA_WR_ALIGNPLDSHOVE(x) \ + ((x) << S_FW_TLSTX_DATA_WR_ALIGNPLDSHOVE) +#define G_FW_TLSTX_DATA_WR_ALIGNPLDSHOVE(x) \ + (((x) >> S_FW_TLSTX_DATA_WR_ALIGNPLDSHOVE) & \ + M_FW_TLSTX_DATA_WR_ALIGNPLDSHOVE) +#define F_FW_TLSTX_DATA_WR_ALIGNPLDSHOVE V_FW_TLSTX_DATA_WR_ALIGNPLDSHOVE(1U) + +#define S_FW_TLSTX_DATA_WR_FLAGS 0 +#define M_FW_TLSTX_DATA_WR_FLAGS 0xfffffff +#define V_FW_TLSTX_DATA_WR_FLAGS(x) ((x) << S_FW_TLSTX_DATA_WR_FLAGS) +#define G_FW_TLSTX_DATA_WR_FLAGS(x) \ + (((x) >> S_FW_TLSTX_DATA_WR_FLAGS) & M_FW_TLSTX_DATA_WR_FLAGS) + +#define S_FW_TLSTX_DATA_WR_CTXLOC 30 +#define M_FW_TLSTX_DATA_WR_CTXLOC 0x3 +#define V_FW_TLSTX_DATA_WR_CTXLOC(x) ((x) << S_FW_TLSTX_DATA_WR_CTXLOC) +#define G_FW_TLSTX_DATA_WR_CTXLOC(x) \ + (((x) >> S_FW_TLSTX_DATA_WR_CTXLOC) & M_FW_TLSTX_DATA_WR_CTXLOC) + +#define S_FW_TLSTX_DATA_WR_IVDSGL 29 +#define M_FW_TLSTX_DATA_WR_IVDSGL 0x1 +#define V_FW_TLSTX_DATA_WR_IVDSGL(x) ((x) << S_FW_TLSTX_DATA_WR_IVDSGL) +#define G_FW_TLSTX_DATA_WR_IVDSGL(x) \ + (((x) >> S_FW_TLSTX_DATA_WR_IVDSGL) & M_FW_TLSTX_DATA_WR_IVDSGL) +#define F_FW_TLSTX_DATA_WR_IVDSGL V_FW_TLSTX_DATA_WR_IVDSGL(1U) + +#define S_FW_TLSTX_DATA_WR_KEYSIZE 24 +#define M_FW_TLSTX_DATA_WR_KEYSIZE 0x1f +#define V_FW_TLSTX_DATA_WR_KEYSIZE(x) ((x) << S_FW_TLSTX_DATA_WR_KEYSIZE) +#define G_FW_TLSTX_DATA_WR_KEYSIZE(x) \ + (((x) >> S_FW_TLSTX_DATA_WR_KEYSIZE) & M_FW_TLSTX_DATA_WR_KEYSIZE) + +#define S_FW_TLSTX_DATA_WR_NUMIVS 14 +#define M_FW_TLSTX_DATA_WR_NUMIVS 0xff +#define V_FW_TLSTX_DATA_WR_NUMIVS(x) ((x) << S_FW_TLSTX_DATA_WR_NUMIVS) +#define G_FW_TLSTX_DATA_WR_NUMIVS(x) \ + (((x) >> S_FW_TLSTX_DATA_WR_NUMIVS) & M_FW_TLSTX_DATA_WR_NUMIVS) + +#define S_FW_TLSTX_DATA_WR_EXP 0 *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609141405.u8EE5VuL047323>