Date: Tue, 23 Jul 2013 16:17:46 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r253579 - in user/attilio/vmobj-fullread: contrib/libstdc++/include/c_std contrib/openbsm/m4 lib/libc/sys release sbin/etherswitchcfg share/man/man4 share/mk sys/cam sys/compat/freebsd3... Message-ID: <201307231617.r6NGHkBl074226@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: attilio Date: Tue Jul 23 16:17:46 2013 New Revision: 253579 URL: http://svnweb.freebsd.org/changeset/base/253579 Log: MFC Added: user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch_vlans.c - copied unchanged from r253578, user/attilio/vmobj-readlock/sys/dev/etherswitch/arswitch/arswitch_vlans.c user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch_vlans.h - copied unchanged from r253578, user/attilio/vmobj-readlock/sys/dev/etherswitch/arswitch/arswitch_vlans.h user/attilio/vmobj-fullread/sys/dev/usb/gadget/ - copied from r253578, user/attilio/vmobj-readlock/sys/dev/usb/gadget/ user/attilio/vmobj-fullread/sys/modules/usb/g_audio/ - copied from r253578, user/attilio/vmobj-readlock/sys/modules/usb/g_audio/ user/attilio/vmobj-fullread/sys/modules/usb/g_keyboard/ - copied from r253578, user/attilio/vmobj-readlock/sys/modules/usb/g_keyboard/ user/attilio/vmobj-fullread/sys/modules/usb/g_modem/ - copied from r253578, user/attilio/vmobj-readlock/sys/modules/usb/g_modem/ user/attilio/vmobj-fullread/sys/modules/usb/g_mouse/ - copied from r253578, user/attilio/vmobj-readlock/sys/modules/usb/g_mouse/ Deleted: user/attilio/vmobj-fullread/contrib/openbsm/m4/lt~obsolete.m4 Modified: user/attilio/vmobj-fullread/contrib/libstdc++/include/c_std/std_cmath.h user/attilio/vmobj-fullread/lib/libc/sys/ptrace.2 user/attilio/vmobj-fullread/release/Makefile user/attilio/vmobj-fullread/sbin/etherswitchcfg/etherswitchcfg.c user/attilio/vmobj-fullread/share/man/man4/ath_hal.4 user/attilio/vmobj-fullread/share/mk/bsd.own.mk user/attilio/vmobj-fullread/sys/cam/cam_ccb.h user/attilio/vmobj-fullread/sys/cam/cam_xpt.c user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32.h user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_misc.c user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_proto.h user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_signal.h user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_syscall.h user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_syscalls.c user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_sysent.c user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_systrace_args.c user/attilio/vmobj-fullread/sys/compat/freebsd32/syscalls.master user/attilio/vmobj-fullread/sys/conf/files user/attilio/vmobj-fullread/sys/dev/bge/if_bge.c user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch.c user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch_7240.c user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch_8216.c user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch_8226.c user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch_8316.c user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch_phy.c user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch_reg.c user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch_reg.h user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitchreg.h user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitchvar.h user/attilio/vmobj-fullread/sys/dev/etherswitch/etherswitch.h user/attilio/vmobj-fullread/sys/dev/etherswitch/ip17x/ip175c.c user/attilio/vmobj-fullread/sys/dev/etherswitch/ip17x/ip175d.c user/attilio/vmobj-fullread/sys/dev/etherswitch/ip17x/ip17x_vlans.c user/attilio/vmobj-fullread/sys/dev/etherswitch/rtl8366/rtl8366rb.c user/attilio/vmobj-fullread/sys/dev/mps/mps.c user/attilio/vmobj-fullread/sys/dev/mps/mps_config.c user/attilio/vmobj-fullread/sys/dev/mps/mps_mapping.c user/attilio/vmobj-fullread/sys/dev/mps/mps_sas.c user/attilio/vmobj-fullread/sys/dev/mps/mps_sas.h user/attilio/vmobj-fullread/sys/dev/mps/mps_sas_lsi.c user/attilio/vmobj-fullread/sys/dev/mps/mps_user.c user/attilio/vmobj-fullread/sys/dev/mps/mpsvar.h user/attilio/vmobj-fullread/sys/dev/usb/controller/xhci.c user/attilio/vmobj-fullread/sys/fs/tmpfs/tmpfs_vfsops.c user/attilio/vmobj-fullread/sys/ia64/ia64/mca.c user/attilio/vmobj-fullread/sys/ia64/ia64/pmap.c user/attilio/vmobj-fullread/sys/ia64/pci/pci_cfgreg.c user/attilio/vmobj-fullread/sys/kern/kern_exit.c user/attilio/vmobj-fullread/sys/kern/kern_sig.c user/attilio/vmobj-fullread/sys/kern/kern_time.c user/attilio/vmobj-fullread/sys/kern/subr_counter.c user/attilio/vmobj-fullread/sys/kern/uipc_mqueue.c user/attilio/vmobj-fullread/sys/kern/vfs_aio.c user/attilio/vmobj-fullread/sys/mips/cavium/std.octeon1 user/attilio/vmobj-fullread/sys/modules/usb/Makefile user/attilio/vmobj-fullread/sys/netgraph/ng_pppoe.c user/attilio/vmobj-fullread/sys/netgraph/ng_pppoe.h user/attilio/vmobj-fullread/sys/netinet/sctp_input.c user/attilio/vmobj-fullread/sys/netinet/tcp_input.c user/attilio/vmobj-fullread/sys/netinet/udp_usrreq.c user/attilio/vmobj-fullread/sys/netinet6/ip6_forward.c user/attilio/vmobj-fullread/sys/netinet6/raw_ip6.c user/attilio/vmobj-fullread/sys/netinet6/udp6_usrreq.c user/attilio/vmobj-fullread/sys/netipsec/ipsec.h user/attilio/vmobj-fullread/sys/sys/param.h user/attilio/vmobj-fullread/sys/sys/syscallsubr.h user/attilio/vmobj-fullread/sys/vm/uma_core.c user/attilio/vmobj-fullread/sys/vm/vm_mmap.c user/attilio/vmobj-fullread/tools/regression/aio/aiotest/aiotest.c user/attilio/vmobj-fullread/usr.bin/netstat/ipsec.c user/attilio/vmobj-fullread/usr.sbin/bsdconfig/include/messages.subr user/attilio/vmobj-fullread/usr.sbin/bsdconfig/share/media/ftp.subr user/attilio/vmobj-fullread/usr.sbin/bsdinstall/scripts/mirrorselect Directory Properties: user/attilio/vmobj-fullread/ (props changed) user/attilio/vmobj-fullread/contrib/libstdc++/ (props changed) user/attilio/vmobj-fullread/contrib/openbsm/ (props changed) user/attilio/vmobj-fullread/lib/libc/ (props changed) user/attilio/vmobj-fullread/sbin/ (props changed) user/attilio/vmobj-fullread/share/man/man4/ (props changed) user/attilio/vmobj-fullread/sys/ (props changed) user/attilio/vmobj-fullread/sys/conf/ (props changed) Modified: user/attilio/vmobj-fullread/contrib/libstdc++/include/c_std/std_cmath.h ============================================================================== --- user/attilio/vmobj-fullread/contrib/libstdc++/include/c_std/std_cmath.h Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/contrib/libstdc++/include/c_std/std_cmath.h Tue Jul 23 16:17:46 2013 (r253579) @@ -589,6 +589,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { return ::__gnu_cxx::__capture_isunordered(__f1, __f2); } _GLIBCXX_END_NAMESPACE +using std::isnan; +using std::isinf; #endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */ #endif Modified: user/attilio/vmobj-fullread/lib/libc/sys/ptrace.2 ============================================================================== --- user/attilio/vmobj-fullread/lib/libc/sys/ptrace.2 Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/lib/libc/sys/ptrace.2 Tue Jul 23 16:17:46 2013 (r253579) @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd February 7, 2013 +.Dd July 22, 2013 .Dt PTRACE 2 .Os .Sh NAME @@ -556,6 +556,14 @@ was attempted on a process with no valid was given an invalid value for .Fa pve_entry . This can also be caused by changes to the VM map of the process. +.It +The size (in +.Fa data ) +provided to +.Dv PT_LWPINFO +was less than or equal to zero, or larger than the +.Vt ptrace_lwpinfo +structure known to the kernel. .El .It Bq Er EBUSY .Bl -bullet -compact Modified: user/attilio/vmobj-fullread/release/Makefile ============================================================================== --- user/attilio/vmobj-fullread/release/Makefile Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/release/Makefile Tue Jul 23 16:17:46 2013 (r253579) @@ -3,7 +3,7 @@ # Makefile for building releases and release media. # # User-driven targets: -# cdrom: Builds release CD-ROM media (release.iso) +# cdrom: Builds release CD-ROM media (disc1.iso) # memstick: Builds memory stick image (memstick.img) # ftp: Sets up FTP distribution area (ftp) # release: Build all media and FTP distribution area @@ -70,7 +70,7 @@ RELEASE_TARGETS= ftp IMAGES= .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) RELEASE_TARGETS+= cdrom -IMAGES+= release.iso bootonly.iso +IMAGES+= disc1.iso bootonly.iso .endif .if exists(${.CURDIR}/${TARGET}/make-memstick.sh) RELEASE_TARGETS+= memstick.img @@ -161,7 +161,8 @@ bootonly: packagesystem echo hostid_enable=\"NO\" >> bootonly/etc/rc.conf cp ${.CURDIR}/rc.local bootonly/etc -release.iso: system +release.iso: disc1.iso +disc1.iso: system sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} release bootonly.iso: bootonly @@ -175,7 +176,7 @@ packagesystem: base.txz kernel.txz ${EXT sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST touch ${.TARGET} -cdrom: release.iso bootonly.iso +cdrom: disc1.iso bootonly.iso ftp: packagesystem rm -rf ftp mkdir -p ftp @@ -192,7 +193,7 @@ clean: rm -f *.txz MANIFEST rm -f system rm -rf release bootonly - rm -f release.iso bootonly.iso memstick.img + rm -f disc1.iso bootonly.iso memstick.img install: .if defined(DESTDIR) && !empty(DESTDIR) Modified: user/attilio/vmobj-fullread/sbin/etherswitchcfg/etherswitchcfg.c ============================================================================== --- user/attilio/vmobj-fullread/sbin/etherswitchcfg/etherswitchcfg.c Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sbin/etherswitchcfg/etherswitchcfg.c Tue Jul 23 16:17:46 2013 (r253579) @@ -471,8 +471,9 @@ print_vlangroup(struct cfg *cfg, int vla vg.es_vlangroup = vlangroup; if (ioctl(cfg->fd, IOETHERSWITCHGETVLANGROUP, &vg) != 0) err(EX_OSERR, "ioctl(IOETHERSWITCHGETVLANGROUP)"); - if (vg.es_vid == 0 && vg.es_member_ports == 0) + if ((vg.es_vid & ETHERSWITCH_VID_VALID) == 0) return; + vg.es_vid &= ETHERSWITCH_VID_MASK; printf("vlangroup%d:\n", vlangroup); if (cfg->conf.vlan_mode == ETHERSWITCH_VLAN_PORT) printf("\tport: %d\n", vg.es_vid); @@ -626,7 +627,9 @@ main(int argc, char *argv[]) newmode(&cfg, MODE_PORT); } else if (sscanf(argv[0], "vlangroup%d", &cfg.unit) == 1) { if (cfg.unit < 0 || cfg.unit >= cfg.info.es_nvlangroups) - errx(EX_USAGE, "port unit must be between 0 and %d", cfg.info.es_nvlangroups); + errx(EX_USAGE, + "vlangroup unit must be between 0 and %d", + cfg.info.es_nvlangroups - 1); newmode(&cfg, MODE_VLANGROUP); } else if (strcmp(argv[0], "config") == 0) { newmode(&cfg, MODE_CONFIG); Modified: user/attilio/vmobj-fullread/share/man/man4/ath_hal.4 ============================================================================== --- user/attilio/vmobj-fullread/share/man/man4/ath_hal.4 Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/share/man/man4/ath_hal.4 Tue Jul 23 16:17:46 2013 (r253579) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\"/ -.Dd August 28, 2011 +.Dd July 22, 2013 .Dt ATH_HAL 4 .Os .Sh NAME @@ -56,11 +56,13 @@ or .Cd "device ath_ar9280" .Cd "device ath_ar9285" .Cd "device ath_ar9287" +.Cd "device ath_ar9300" .Cd "options AH_SUPPORT_AR5416" .Sh DESCRIPTION The hal provides hardware support for wireless network adapters based on the Atheros AR5210, AR5211, AR5212, AR5213, AR2413, AR2417, AR2425, -AR5413, AR5416, AR5418, AR5424, AR9160, AR9220, AR9280, AR9285 and AR9287 +AR5413, AR5416, AR5418, AR5424, AR9160, AR9220, AR9280, AR9285, AR9287, +AR9380, AR9390, AR9580, AR9590, AR9562 and QCA9565 chips (and companion RF/baseband parts). This code is part of the .Xr ath 4 @@ -128,6 +130,7 @@ module: .It "Sony PCWA-C300S AR5212 Cardbus b/g" .It "Sony PCWA-C500 AR5210 Cardbus a" .It "3Com 3CRPAG175 AR5212 CardBus a/b/g" +.It "TP-LINK TL-WDN4800 AR9380 PCIe a/b/g/n" .El .Sh SEE ALSO .Xr ath 4 Modified: user/attilio/vmobj-fullread/share/mk/bsd.own.mk ============================================================================== --- user/attilio/vmobj-fullread/share/mk/bsd.own.mk Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/share/mk/bsd.own.mk Tue Jul 23 16:17:46 2013 (r253579) @@ -385,7 +385,8 @@ __DEFAULT_NO_OPTIONS = \ OFED \ OPENSSH_NONE_CIPHER \ SHARED_TOOLCHAIN \ - SVN + SVN \ + USB_GADGET_EXAMPLES # # Default behaviour of some options depends on the architecture. Unfortunately Modified: user/attilio/vmobj-fullread/sys/cam/cam_ccb.h ============================================================================== --- user/attilio/vmobj-fullread/sys/cam/cam_ccb.h Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/cam/cam_ccb.h Tue Jul 23 16:17:46 2013 (r253579) @@ -571,6 +571,7 @@ typedef enum { PIM_NO_6_BYTE = 0x08, /* Do not send 6-byte commands */ PIM_SEQSCAN = 0x04, /* Do bus scans sequentially, not in parallel */ PIM_UNMAPPED = 0x02, + PIM_NOSCAN = 0x01 /* SIM does its own scanning */ } pi_miscflag; /* Path Inquiry CCB */ Modified: user/attilio/vmobj-fullread/sys/cam/cam_xpt.c ============================================================================== --- user/attilio/vmobj-fullread/sys/cam/cam_xpt.c Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/cam/cam_xpt.c Tue Jul 23 16:17:46 2013 (r253579) @@ -3895,18 +3895,23 @@ xpt_bus_register(struct cam_sim *sim, de /* Notify interested parties */ if (sim->path_id != CAM_XPT_PATH_ID) { - union ccb *scan_ccb; xpt_async(AC_PATH_REGISTERED, path, &cpi); - /* Initiate bus rescan. */ - scan_ccb = xpt_alloc_ccb_nowait(); - if (scan_ccb != NULL) { - scan_ccb->ccb_h.path = path; - scan_ccb->ccb_h.func_code = XPT_SCAN_BUS; - scan_ccb->crcn.flags = 0; - xpt_rescan(scan_ccb); + if ((cpi.hba_misc & PIM_NOSCAN) == 0) { + union ccb *scan_ccb; + + /* Initiate bus rescan. */ + scan_ccb = xpt_alloc_ccb_nowait(); + if (scan_ccb != NULL) { + scan_ccb->ccb_h.path = path; + scan_ccb->ccb_h.func_code = XPT_SCAN_BUS; + scan_ccb->crcn.flags = 0; + xpt_rescan(scan_ccb); + } else + xpt_print(path, + "Can't allocate CCB to scan bus\n"); } else - xpt_print(path, "Can't allocate CCB to scan bus\n"); + xpt_free_path(path); } else xpt_free_path(path); return (CAM_SUCCESS); Modified: user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32.h ============================================================================== --- user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32.h Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32.h Tue Jul 23 16:17:46 2013 (r253579) @@ -69,6 +69,15 @@ struct timespec32 { CP((src).fld,(dst).fld,tv_nsec); \ } while (0) +struct itimerspec32 { + struct timespec32 it_interval; + struct timespec32 it_value; +}; +#define ITS_CP(src, dst) do { \ + TS_CP((src), (dst), it_interval); \ + TS_CP((src), (dst), it_value); \ +} while (0) + struct rusage32 { struct timeval32 ru_utime; struct timeval32 ru_stime; Modified: user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_misc.c Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_misc.c Tue Jul 23 16:17:46 2013 (r253579) @@ -2331,6 +2331,70 @@ freebsd32_clock_getres(struct thread *td return (error); } +int freebsd32_ktimer_create(struct thread *td, + struct freebsd32_ktimer_create_args *uap) +{ + struct sigevent32 ev32; + struct sigevent ev, *evp; + int error, id; + + if (uap->evp == NULL) { + evp = NULL; + } else { + evp = &ev; + error = copyin(uap->evp, &ev32, sizeof(ev32)); + if (error != 0) + return (error); + error = convert_sigevent32(&ev32, &ev); + if (error != 0) + return (error); + } + error = kern_ktimer_create(td, uap->clock_id, evp, &id, -1); + if (error == 0) { + error = copyout(&id, uap->timerid, sizeof(int)); + if (error != 0) + kern_ktimer_delete(td, id); + } + return (error); +} + +int +freebsd32_ktimer_settime(struct thread *td, + struct freebsd32_ktimer_settime_args *uap) +{ + struct itimerspec32 val32, oval32; + struct itimerspec val, oval, *ovalp; + int error; + + error = copyin(uap->value, &val32, sizeof(val32)); + if (error != 0) + return (error); + ITS_CP(val32, val); + ovalp = uap->ovalue != NULL ? &oval : NULL; + error = kern_ktimer_settime(td, uap->timerid, uap->flags, &val, ovalp); + if (error == 0 && uap->ovalue != NULL) { + ITS_CP(oval, oval32); + error = copyout(&oval32, uap->ovalue, sizeof(oval32)); + } + return (error); +} + +int +freebsd32_ktimer_gettime(struct thread *td, + struct freebsd32_ktimer_gettime_args *uap) +{ + struct itimerspec32 val32; + struct itimerspec val; + int error; + + error = kern_ktimer_gettime(td, uap->timerid, &val); + if (error == 0) { + ITS_CP(val, val32); + error = copyout(&val32, uap->value, sizeof(val32)); + } + return (error); +} + int freebsd32_clock_getcpuclockid2(struct thread *td, struct freebsd32_clock_getcpuclockid2_args *uap) @@ -2410,7 +2474,7 @@ siginfo_to_siginfo32(const siginfo_t *sr dst->si_uid = src->si_uid; dst->si_status = src->si_status; dst->si_addr = (uintptr_t)src->si_addr; - dst->si_value.sigval_int = src->si_value.sival_int; + dst->si_value.sival_int = src->si_value.sival_int; dst->si_timerid = src->si_timerid; dst->si_overrun = src->si_overrun; } @@ -2912,3 +2976,29 @@ freebsd32_posix_fadvise(struct thread *t return (kern_posix_fadvise(td, uap->fd, PAIR32TO64(off_t, uap->offset), PAIR32TO64(off_t, uap->len), uap->advice)); } + +int +convert_sigevent32(struct sigevent32 *sig32, struct sigevent *sig) +{ + + CP(*sig32, *sig, sigev_notify); + switch (sig->sigev_notify) { + case SIGEV_NONE: + break; + case SIGEV_THREAD_ID: + CP(*sig32, *sig, sigev_notify_thread_id); + /* FALLTHROUGH */ + case SIGEV_SIGNAL: + CP(*sig32, *sig, sigev_signo); + PTRIN_CP(*sig32, *sig, sigev_value.sival_ptr); + break; + case SIGEV_KEVENT: + CP(*sig32, *sig, sigev_notify_kqueue); + CP(*sig32, *sig, sigev_notify_kevent_flags); + PTRIN_CP(*sig32, *sig, sigev_value.sival_ptr); + break; + default: + return (EINVAL); + } + return (0); +} Modified: user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_proto.h Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_proto.h Tue Jul 23 16:17:46 2013 (r253579) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 253494 2013-07-20 13:39:41Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 253530 2013-07-21 19:43:52Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -208,6 +208,21 @@ struct freebsd32_clock_getres_args { char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; char tp_l_[PADL_(struct timespec32 *)]; struct timespec32 * tp; char tp_r_[PADR_(struct timespec32 *)]; }; +struct freebsd32_ktimer_create_args { + char clock_id_l_[PADL_(clockid_t)]; clockid_t clock_id; char clock_id_r_[PADR_(clockid_t)]; + char evp_l_[PADL_(struct sigevent32 *)]; struct sigevent32 * evp; char evp_r_[PADR_(struct sigevent32 *)]; + char timerid_l_[PADL_(int *)]; int * timerid; char timerid_r_[PADR_(int *)]; +}; +struct freebsd32_ktimer_settime_args { + char timerid_l_[PADL_(int)]; int timerid; char timerid_r_[PADR_(int)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char value_l_[PADL_(const struct itimerspec32 *)]; const struct itimerspec32 * value; char value_r_[PADR_(const struct itimerspec32 *)]; + char ovalue_l_[PADL_(struct itimerspec32 *)]; struct itimerspec32 * ovalue; char ovalue_r_[PADR_(struct itimerspec32 *)]; +}; +struct freebsd32_ktimer_gettime_args { + char timerid_l_[PADL_(int)]; int timerid; char timerid_r_[PADR_(int)]; + char value_l_[PADL_(struct itimerspec32 *)]; struct itimerspec32 * value; char value_r_[PADR_(struct itimerspec32 *)]; +}; struct freebsd32_nanosleep_args { char rqtp_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * rqtp; char rqtp_r_[PADR_(const struct timespec32 *)]; char rmtp_l_[PADL_(struct timespec32 *)]; struct timespec32 * rmtp; char rmtp_r_[PADR_(struct timespec32 *)]; @@ -228,7 +243,7 @@ struct freebsd32_lio_listio_args { char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; char acb_list_l_[PADL_(struct aiocb32 *const *)]; struct aiocb32 *const * acb_list; char acb_list_r_[PADR_(struct aiocb32 *const *)]; char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; - char sig_l_[PADL_(struct sigevent *)]; struct sigevent * sig; char sig_r_[PADR_(struct sigevent *)]; + char sig_l_[PADL_(struct sigevent32 *)]; struct sigevent32 * sig; char sig_r_[PADR_(struct sigevent32 *)]; }; struct freebsd32_lutimes_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; @@ -400,6 +415,10 @@ struct freebsd32_kmq_timedsend_args { char msg_prio_l_[PADL_(unsigned)]; unsigned msg_prio; char msg_prio_r_[PADR_(unsigned)]; char abs_timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * abs_timeout; char abs_timeout_r_[PADR_(const struct timespec32 *)]; }; +struct freebsd32_kmq_notify_args { + char mqd_l_[PADL_(int)]; int mqd; char mqd_r_[PADR_(int)]; + char sigev_l_[PADL_(const struct sigevent32 *)]; const struct sigevent32 * sigev; char sigev_r_[PADR_(const struct sigevent32 *)]; +}; struct freebsd32_aio_fsync_args { char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; @@ -673,6 +692,9 @@ int freebsd32_msgrcv(struct thread *, st int freebsd32_clock_gettime(struct thread *, struct freebsd32_clock_gettime_args *); int freebsd32_clock_settime(struct thread *, struct freebsd32_clock_settime_args *); int freebsd32_clock_getres(struct thread *, struct freebsd32_clock_getres_args *); +int freebsd32_ktimer_create(struct thread *, struct freebsd32_ktimer_create_args *); +int freebsd32_ktimer_settime(struct thread *, struct freebsd32_ktimer_settime_args *); +int freebsd32_ktimer_gettime(struct thread *, struct freebsd32_ktimer_gettime_args *); int freebsd32_nanosleep(struct thread *, struct freebsd32_nanosleep_args *); int freebsd32_clock_getcpuclockid2(struct thread *, struct freebsd32_clock_getcpuclockid2_args *); int freebsd32_aio_read(struct thread *, struct freebsd32_aio_read_args *); @@ -714,6 +736,7 @@ int freebsd32_kmq_open(struct thread *, int freebsd32_kmq_setattr(struct thread *, struct freebsd32_kmq_setattr_args *); int freebsd32_kmq_timedreceive(struct thread *, struct freebsd32_kmq_timedreceive_args *); int freebsd32_kmq_timedsend(struct thread *, struct freebsd32_kmq_timedsend_args *); +int freebsd32_kmq_notify(struct thread *, struct freebsd32_kmq_notify_args *); int freebsd32_aio_fsync(struct thread *, struct freebsd32_aio_fsync_args *); #ifdef PAD64_REQUIRED int freebsd32_pread(struct thread *, struct freebsd32_pread_args *); @@ -1072,6 +1095,9 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_clock_gettime AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_clock_settime AUE_CLOCK_SETTIME #define FREEBSD32_SYS_AUE_freebsd32_clock_getres AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_ktimer_create AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_ktimer_settime AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_ktimer_gettime AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_nanosleep AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_clock_getcpuclockid2 AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_aio_read AUE_NULL @@ -1117,6 +1143,7 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_kmq_setattr AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kmq_timedreceive AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kmq_timedsend AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_kmq_notify AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_aio_fsync AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_pread AUE_PREAD #define FREEBSD32_SYS_AUE_freebsd32_pwrite AUE_PWRITE Modified: user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_signal.h ============================================================================== --- user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_signal.h Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_signal.h Tue Jul 23 16:17:46 2013 (r253579) @@ -97,6 +97,8 @@ struct sigevent32 { } _sigev_un; }; +struct sigevent; +int convert_sigevent32(struct sigevent32 *sig32, struct sigevent *sig); void siginfo_to_siginfo32(const siginfo_t *src, struct siginfo32 *dst); #endif /* !_COMPAT_FREEBSD32_SIGNAL_H_ */ Modified: user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_syscall.h Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_syscall.h Tue Jul 23 16:17:46 2013 (r253579) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 253494 2013-07-20 13:39:41Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 253530 2013-07-21 19:43:52Z kib */ #define FREEBSD32_SYS_syscall 0 @@ -206,6 +206,11 @@ #define FREEBSD32_SYS_freebsd32_clock_gettime 232 #define FREEBSD32_SYS_freebsd32_clock_settime 233 #define FREEBSD32_SYS_freebsd32_clock_getres 234 +#define FREEBSD32_SYS_freebsd32_ktimer_create 235 +#define FREEBSD32_SYS_ktimer_delete 236 +#define FREEBSD32_SYS_freebsd32_ktimer_settime 237 +#define FREEBSD32_SYS_freebsd32_ktimer_gettime 238 +#define FREEBSD32_SYS_ktimer_getoverrun 239 #define FREEBSD32_SYS_freebsd32_nanosleep 240 #define FREEBSD32_SYS_ffclock_getcounter 241 #define FREEBSD32_SYS_ffclock_setestimate 242 @@ -360,7 +365,7 @@ #define FREEBSD32_SYS_freebsd32_kmq_setattr 458 #define FREEBSD32_SYS_freebsd32_kmq_timedreceive 459 #define FREEBSD32_SYS_freebsd32_kmq_timedsend 460 -#define FREEBSD32_SYS_kmq_notify 461 +#define FREEBSD32_SYS_freebsd32_kmq_notify 461 #define FREEBSD32_SYS_kmq_unlink 462 #define FREEBSD32_SYS_abort2 463 #define FREEBSD32_SYS_thr_set_name 464 Modified: user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_syscalls.c Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_syscalls.c Tue Jul 23 16:17:46 2013 (r253579) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 253494 2013-07-20 13:39:41Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 253530 2013-07-21 19:43:52Z kib */ const char *freebsd32_syscallnames[] = { @@ -245,11 +245,11 @@ const char *freebsd32_syscallnames[] = { "freebsd32_clock_gettime", /* 232 = freebsd32_clock_gettime */ "freebsd32_clock_settime", /* 233 = freebsd32_clock_settime */ "freebsd32_clock_getres", /* 234 = freebsd32_clock_getres */ - "#235", /* 235 = timer_create */ - "#236", /* 236 = timer_delete */ - "#237", /* 237 = timer_settime */ - "#238", /* 238 = timer_gettime */ - "#239", /* 239 = timer_getoverrun */ + "freebsd32_ktimer_create", /* 235 = freebsd32_ktimer_create */ + "ktimer_delete", /* 236 = ktimer_delete */ + "freebsd32_ktimer_settime", /* 237 = freebsd32_ktimer_settime */ + "freebsd32_ktimer_gettime", /* 238 = freebsd32_ktimer_gettime */ + "ktimer_getoverrun", /* 239 = ktimer_getoverrun */ "freebsd32_nanosleep", /* 240 = freebsd32_nanosleep */ "ffclock_getcounter", /* 241 = ffclock_getcounter */ "ffclock_setestimate", /* 242 = ffclock_setestimate */ @@ -471,7 +471,7 @@ const char *freebsd32_syscallnames[] = { "freebsd32_kmq_setattr", /* 458 = freebsd32_kmq_setattr */ "freebsd32_kmq_timedreceive", /* 459 = freebsd32_kmq_timedreceive */ "freebsd32_kmq_timedsend", /* 460 = freebsd32_kmq_timedsend */ - "kmq_notify", /* 461 = kmq_notify */ + "freebsd32_kmq_notify", /* 461 = freebsd32_kmq_notify */ "kmq_unlink", /* 462 = kmq_unlink */ "abort2", /* 463 = abort2 */ "thr_set_name", /* 464 = thr_set_name */ Modified: user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_sysent.c Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_sysent.c Tue Jul 23 16:17:46 2013 (r253579) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 253494 2013-07-20 13:39:41Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 253530 2013-07-21 19:43:52Z kib */ #include "opt_compat.h" @@ -282,11 +282,11 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_clock_gettime_args), (sy_call_t *)freebsd32_clock_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 232 = freebsd32_clock_gettime */ { AS(freebsd32_clock_settime_args), (sy_call_t *)freebsd32_clock_settime, AUE_CLOCK_SETTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 233 = freebsd32_clock_settime */ { AS(freebsd32_clock_getres_args), (sy_call_t *)freebsd32_clock_getres, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 234 = freebsd32_clock_getres */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 235 = timer_create */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 236 = timer_delete */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 237 = timer_settime */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 238 = timer_gettime */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 239 = timer_getoverrun */ + { AS(freebsd32_ktimer_create_args), (sy_call_t *)freebsd32_ktimer_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 235 = freebsd32_ktimer_create */ + { AS(ktimer_delete_args), (sy_call_t *)sys_ktimer_delete, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 236 = ktimer_delete */ + { AS(freebsd32_ktimer_settime_args), (sy_call_t *)freebsd32_ktimer_settime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 237 = freebsd32_ktimer_settime */ + { AS(freebsd32_ktimer_gettime_args), (sy_call_t *)freebsd32_ktimer_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 238 = freebsd32_ktimer_gettime */ + { AS(ktimer_getoverrun_args), (sy_call_t *)sys_ktimer_getoverrun, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 239 = ktimer_getoverrun */ { AS(freebsd32_nanosleep_args), (sy_call_t *)freebsd32_nanosleep, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 240 = freebsd32_nanosleep */ { AS(ffclock_getcounter_args), (sy_call_t *)sys_ffclock_getcounter, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 241 = ffclock_getcounter */ { AS(ffclock_setestimate_args), (sy_call_t *)sys_ffclock_setestimate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 242 = ffclock_setestimate */ @@ -508,7 +508,7 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 458 = freebsd32_kmq_setattr */ { AS(freebsd32_kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 459 = freebsd32_kmq_timedreceive */ { AS(freebsd32_kmq_timedsend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 460 = freebsd32_kmq_timedsend */ - { AS(kmq_notify_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 461 = kmq_notify */ + { AS(freebsd32_kmq_notify_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 461 = freebsd32_kmq_notify */ { AS(kmq_unlink_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 462 = kmq_unlink */ { AS(abort2_args), (sy_call_t *)sys_abort2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 463 = abort2 */ { AS(thr_set_name_args), (sy_call_t *)sys_thr_set_name, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 464 = thr_set_name */ Modified: user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_systrace_args.c Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/compat/freebsd32/freebsd32_systrace_args.c Tue Jul 23 16:17:46 2013 (r253579) @@ -1195,6 +1195,47 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } + /* freebsd32_ktimer_create */ + case 235: { + struct freebsd32_ktimer_create_args *p = params; + iarg[0] = p->clock_id; /* clockid_t */ + uarg[1] = (intptr_t) p->evp; /* struct sigevent32 * */ + uarg[2] = (intptr_t) p->timerid; /* int * */ + *n_args = 3; + break; + } + /* ktimer_delete */ + case 236: { + struct ktimer_delete_args *p = params; + iarg[0] = p->timerid; /* int */ + *n_args = 1; + break; + } + /* freebsd32_ktimer_settime */ + case 237: { + struct freebsd32_ktimer_settime_args *p = params; + iarg[0] = p->timerid; /* int */ + iarg[1] = p->flags; /* int */ + uarg[2] = (intptr_t) p->value; /* const struct itimerspec32 * */ + uarg[3] = (intptr_t) p->ovalue; /* struct itimerspec32 * */ + *n_args = 4; + break; + } + /* freebsd32_ktimer_gettime */ + case 238: { + struct freebsd32_ktimer_gettime_args *p = params; + iarg[0] = p->timerid; /* int */ + uarg[1] = (intptr_t) p->value; /* struct itimerspec32 * */ + *n_args = 2; + break; + } + /* ktimer_getoverrun */ + case 239: { + struct ktimer_getoverrun_args *p = params; + iarg[0] = p->timerid; /* int */ + *n_args = 1; + break; + } /* freebsd32_nanosleep */ case 240: { struct freebsd32_nanosleep_args *p = params; @@ -1293,7 +1334,7 @@ systrace_args(int sysnum, void *params, iarg[0] = p->mode; /* int */ uarg[1] = (intptr_t) p->acb_list; /* struct aiocb32 *const * */ iarg[2] = p->nent; /* int */ - uarg[3] = (intptr_t) p->sig; /* struct sigevent * */ + uarg[3] = (intptr_t) p->sig; /* struct sigevent32 * */ *n_args = 4; break; } @@ -2406,11 +2447,11 @@ systrace_args(int sysnum, void *params, *n_args = 5; break; } - /* kmq_notify */ + /* freebsd32_kmq_notify */ case 461: { - struct kmq_notify_args *p = params; + struct freebsd32_kmq_notify_args *p = params; iarg[0] = p->mqd; /* int */ - uarg[1] = (intptr_t) p->sigev; /* const struct sigevent * */ + uarg[1] = (intptr_t) p->sigev; /* const struct sigevent32 * */ *n_args = 2; break; } @@ -5110,6 +5151,74 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* freebsd32_ktimer_create */ + case 235: + switch(ndx) { + case 0: + p = "clockid_t"; + break; + case 1: + p = "struct sigevent32 *"; + break; + case 2: + p = "int *"; + break; + default: + break; + }; + break; + /* ktimer_delete */ + case 236: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* freebsd32_ktimer_settime */ + case 237: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "const struct itimerspec32 *"; + break; + case 3: + p = "struct itimerspec32 *"; + break; + default: + break; + }; + break; + /* freebsd32_ktimer_gettime */ + case 238: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct itimerspec32 *"; + break; + default: + break; + }; + break; + /* ktimer_getoverrun */ + case 239: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; /* freebsd32_nanosleep */ case 240: switch(ndx) { @@ -5266,7 +5375,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 3: - p = "struct sigevent *"; + p = "struct sigevent32 *"; break; default: break; @@ -7121,14 +7230,14 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* kmq_notify */ + /* freebsd32_kmq_notify */ case 461: switch(ndx) { case 0: p = "int"; break; case 1: - p = "const struct sigevent *"; + p = "const struct sigevent32 *"; break; default: break; @@ -9336,6 +9445,31 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* freebsd32_ktimer_create */ + case 235: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* ktimer_delete */ + case 236: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* freebsd32_ktimer_settime */ + case 237: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* freebsd32_ktimer_gettime */ + case 238: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* ktimer_getoverrun */ + case 239: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* freebsd32_nanosleep */ case 240: if (ndx == 0 || ndx == 1) @@ -10056,7 +10190,7 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* kmq_notify */ + /* freebsd32_kmq_notify */ case 461: if (ndx == 0 || ndx == 1) p = "int"; Modified: user/attilio/vmobj-fullread/sys/compat/freebsd32/syscalls.master ============================================================================== --- user/attilio/vmobj-fullread/sys/compat/freebsd32/syscalls.master Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/compat/freebsd32/syscalls.master Tue Jul 23 16:17:46 2013 (r253579) @@ -441,11 +441,17 @@ const struct timespec32 *tp); } 234 AUE_NULL STD { int freebsd32_clock_getres(clockid_t clock_id, \ struct timespec32 *tp); } -235 AUE_NULL UNIMPL timer_create -236 AUE_NULL UNIMPL timer_delete -237 AUE_NULL UNIMPL timer_settime -238 AUE_NULL UNIMPL timer_gettime -239 AUE_NULL UNIMPL timer_getoverrun +235 AUE_NULL STD { int freebsd32_ktimer_create(\ + clockid_t clock_id, \ + struct sigevent32 *evp, int *timerid); } +236 AUE_NULL NOPROTO { int ktimer_delete(int timerid); } +237 AUE_NULL STD { int freebsd32_ktimer_settime(int timerid,\ + int flags, \ + const struct itimerspec32 *value, \ + struct itimerspec32 *ovalue); } +238 AUE_NULL STD { int freebsd32_ktimer_gettime(int timerid,\ + struct itimerspec32 *value); } +239 AUE_NULL NOPROTO { int ktimer_getoverrun(int timerid); } 240 AUE_NULL STD { int freebsd32_nanosleep( \ const struct timespec32 *rqtp, \ struct timespec32 *rmtp); } @@ -476,7 +482,7 @@ struct aiocb32 *aiocbp); } 257 AUE_NULL NOSTD { int freebsd32_lio_listio(int mode, \ struct aiocb32 * const *acb_list, \ - int nent, struct sigevent *sig); } + int nent, struct sigevent32 *sig); } 258 AUE_NULL UNIMPL nosys 259 AUE_NULL UNIMPL nosys 260 AUE_NULL UNIMPL nosys @@ -825,8 +831,8 @@ const char *msg_ptr, size_t msg_len,\ unsigned msg_prio, \ const struct timespec32 *abs_timeout);} -461 AUE_NULL NOPROTO|NOSTD { int kmq_notify(int mqd, \ - const struct sigevent *sigev); } +461 AUE_NULL NOSTD { int freebsd32_kmq_notify(int mqd, \ + const struct sigevent32 *sigev); } 462 AUE_NULL NOPROTO|NOSTD { int kmq_unlink(const char *path); } 463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, void **args); } 464 AUE_NULL NOPROTO { int thr_set_name(long id, const char *name); } Modified: user/attilio/vmobj-fullread/sys/conf/files ============================================================================== --- user/attilio/vmobj-fullread/sys/conf/files Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/conf/files Tue Jul 23 16:17:46 2013 (r253579) @@ -1368,6 +1368,7 @@ dev/etherswitch/arswitch/arswitch_8216.c dev/etherswitch/arswitch/arswitch_8226.c optional arswitch dev/etherswitch/arswitch/arswitch_8316.c optional arswitch dev/etherswitch/arswitch/arswitch_7240.c optional arswitch +dev/etherswitch/arswitch/arswitch_vlans.c optional arswitch dev/etherswitch/etherswitch.c optional etherswitch dev/etherswitch/etherswitch_if.m optional etherswitch dev/etherswitch/ip17x/ip17x.c optional ip17x Modified: user/attilio/vmobj-fullread/sys/dev/bge/if_bge.c ============================================================================== --- user/attilio/vmobj-fullread/sys/dev/bge/if_bge.c Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/dev/bge/if_bge.c Tue Jul 23 16:17:46 2013 (r253579) @@ -5257,17 +5257,51 @@ bge_encap(struct bge_softc *sc, struct m csum_flags |= BGE_TXBDFLAG_VLAN_TAG; vlan_tag = m->m_pkthdr.ether_vtag; } - for (i = 0; ; i++) { - d = &sc->bge_ldata.bge_tx_ring[idx]; - d->bge_addr.bge_addr_lo = BGE_ADDR_LO(segs[i].ds_addr); - d->bge_addr.bge_addr_hi = BGE_ADDR_HI(segs[i].ds_addr); - d->bge_len = segs[i].ds_len; - d->bge_flags = csum_flags; - d->bge_vlan_tag = vlan_tag; - d->bge_mss = mss; - if (i == nsegs - 1) - break; - BGE_INC(idx, BGE_TX_RING_CNT); + + if (sc->bge_asicrev == BGE_ASICREV_BCM5762 && + (m->m_pkthdr.csum_flags & CSUM_TSO) != 0) { + /* + * 5725 family of devices corrupts TSO packets when TSO DMA + * buffers cross into regions which are within MSS bytes of + * a 4GB boundary. If we encounter the condition, drop the + * packet. + */ + for (i = 0; ; i++) { + d = &sc->bge_ldata.bge_tx_ring[idx]; + d->bge_addr.bge_addr_lo = BGE_ADDR_LO(segs[i].ds_addr); + d->bge_addr.bge_addr_hi = BGE_ADDR_HI(segs[i].ds_addr); + d->bge_len = segs[i].ds_len; + if (d->bge_addr.bge_addr_lo + segs[i].ds_len + mss < + d->bge_addr.bge_addr_lo) + break; + d->bge_flags = csum_flags; + d->bge_vlan_tag = vlan_tag; + d->bge_mss = mss; + if (i == nsegs - 1) + break; + BGE_INC(idx, BGE_TX_RING_CNT); + } + if (i != nsegs - 1) { + bus_dmamap_sync(sc->bge_cdata.bge_tx_mtag, map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->bge_cdata.bge_tx_mtag, map); + m_freem(*m_head); + *m_head = NULL; + return (EIO); + } + } else { + for (i = 0; ; i++) { + d = &sc->bge_ldata.bge_tx_ring[idx]; + d->bge_addr.bge_addr_lo = BGE_ADDR_LO(segs[i].ds_addr); + d->bge_addr.bge_addr_hi = BGE_ADDR_HI(segs[i].ds_addr); + d->bge_len = segs[i].ds_len; + d->bge_flags = csum_flags; + d->bge_vlan_tag = vlan_tag; + d->bge_mss = mss; + if (i == nsegs - 1) + break; + BGE_INC(idx, BGE_TX_RING_CNT); + } } /* Mark the last segment as end of packet... */ Modified: user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch.c ============================================================================== --- user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch.c Tue Jul 23 16:11:26 2013 (r253578) +++ user/attilio/vmobj-fullread/sys/dev/etherswitch/arswitch/arswitch.c Tue Jul 23 16:17:46 2013 (r253579) @@ -58,6 +58,7 @@ #include <dev/etherswitch/arswitch/arswitchvar.h> #include <dev/etherswitch/arswitch/arswitch_reg.h> #include <dev/etherswitch/arswitch/arswitch_phy.h> +#include <dev/etherswitch/arswitch/arswitch_vlans.h> #include <dev/etherswitch/arswitch/arswitch_7240.h> #include <dev/etherswitch/arswitch/arswitch_8216.h> @@ -162,6 +163,74 @@ arswitch_attach_phys(struct arswitch_sof } static int +arswitch_reset(device_t dev) +{ + + arswitch_writereg(dev, AR8X16_REG_MASK_CTRL, + AR8X16_MASK_CTRL_SOFT_RESET); + DELAY(1000); + if (arswitch_readreg(dev, AR8X16_REG_MASK_CTRL) & + AR8X16_MASK_CTRL_SOFT_RESET) { + device_printf(dev, "unable to reset switch\n"); + return (-1); + } + return (0); +} + +static int +arswitch_set_vlan_mode(struct arswitch_softc *sc, uint32_t mode) +{ + + /* Check for invalid modes. */ + if ((mode & sc->info.es_vlan_caps) != mode) + return (EINVAL); + + switch (mode) { + case ETHERSWITCH_VLAN_DOT1Q: + sc->vlan_mode = ETHERSWITCH_VLAN_DOT1Q; + break; + case ETHERSWITCH_VLAN_PORT: + sc->vlan_mode = ETHERSWITCH_VLAN_PORT; + break; + default: + sc->vlan_mode = 0; + }; + + /* Reset VLANs. */ + arswitch_reset_vlans(sc); + + return (0); +} + +static void +arswitch_ports_init(struct arswitch_softc *sc) +{ + int port; + + /* Port0 - CPU */ + arswitch_writereg(sc->sc_dev, AR8X16_REG_PORT_STS(0), + (AR8X16_IS_SWITCH(sc, AR8216) ? + AR8X16_PORT_STS_SPEED_100 : AR8X16_PORT_STS_SPEED_1000) | + (AR8X16_IS_SWITCH(sc, AR8216) ? 0 : AR8X16_PORT_STS_RXFLOW) | + (AR8X16_IS_SWITCH(sc, AR8216) ? 0 : AR8X16_PORT_STS_TXFLOW) | + AR8X16_PORT_STS_RXMAC | + AR8X16_PORT_STS_TXMAC | + AR8X16_PORT_STS_DUPLEX); + arswitch_writereg(sc->sc_dev, AR8X16_REG_PORT_CTRL(0), + arswitch_readreg(sc->sc_dev, AR8X16_REG_PORT_CTRL(0)) & + ~AR8X16_PORT_CTRL_HEADER); + + for (port = 1; port <= sc->numphys; port++) { + /* Set ports to auto negotiation. */ + arswitch_writereg(sc->sc_dev, AR8X16_REG_PORT_STS(port), + AR8X16_PORT_STS_LINK_AUTO); + arswitch_writereg(sc->sc_dev, AR8X16_REG_PORT_CTRL(port), + arswitch_readreg(sc->sc_dev, AR8X16_REG_PORT_CTRL(port)) & + ~AR8X16_PORT_CTRL_HEADER); + } +} + +static int arswitch_attach(device_t dev) { struct arswitch_softc *sc; @@ -190,11 +259,8 @@ arswitch_attach(device_t dev) else return (ENXIO); - /* - * XXX these two should be part of the switch attach function - */ + /* Common defaults. */ sc->info.es_nports = 5; /* XXX technically 6, but 6th not used */ - sc->info.es_nvlangroups = 16; /* XXX Defaults for externally connected AR8316 */ sc->numphys = 4; @@ -211,34 +277,20 @@ arswitch_attach(device_t dev) (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "is_gmii", &sc->is_gmii); - /* - * This requires much more setup depending upon each chip, including: - * - * + Proper reinitialisation of the PHYs; - * + Initialising the VLAN table; - * + Initialising the port access table and CPU flood/broadcast - * configuration; - * + Other things I haven't yet thought of. - */ -#ifdef NOTYET - arswitch_writereg(dev, AR8X16_REG_MASK_CTRL, - AR8X16_MASK_CTRL_SOFT_RESET); - DELAY(1000); - if (arswitch_readreg(dev, AR8X16_REG_MASK_CTRL) & - AR8X16_MASK_CTRL_SOFT_RESET) { - device_printf(dev, "unable to reset switch\n"); - return (ENXIO); - } -#endif + if (sc->numphys > AR8X16_NUM_PHYS) + sc->numphys = AR8X16_NUM_PHYS; - err = sc->hal.arswitch_hw_setup(sc); - if (err != 0) - return (err); + /* Reset the switch. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307231617.r6NGHkBl074226>