summaryrefslogtreecommitdiffstats
path: root/sys/contrib
Commit message (Collapse)AuthorAgeFilesLines
* Import Annapurna Labs Alpine HAL to sys/contrib/zbb2015-07-2816-0/+13941
| | | | | | | | | Import from vendor-sys/alpine-hal/2.7 SVN rev.: 285432 HAL version: 2.7 Obtained from: Semihalf Sponsored by: Annapurna Labs
* Sync in latest upstream system call definitions.ed2015-07-272-8/+3
| | | | | | Futex object scopes have been renamed from using their own constants to simply reusing the existing CLOUDABI_MAP_{PRIVATE,SHARED} flags, as they are more accurate in this context.
* Merge ACPICA 20150717.jkim2015-07-2286-1295/+2897
|\
* | Import upstream changes to the system call definitions.ed2015-07-222-0/+11
| | | | | | | | | | Support has been added for providing the scope of a futex operation, whether the futex is local to the process or shared between processes.
* | Implement CloudABI memory management system calls.ed2015-07-171-0/+3
| | | | | | | | | | | | | | | | | | | | Add support for the <sys/mman.h> functions by wrapping around our own implementations. There are no kern_*() variants of these system calls, but we also don't need them in this case. It is sufficient to just call into the sys_*() functions. Differential Revision: https://reviews.freebsd.org/D3033 Reviewed by: brooks
* | Add a sysentvec for CloudABI on x86-64.ed2015-07-162-23/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For CloudABI we need to put two things on the stack of new processes: the argument data (a binary blob; not strings) and a startup data structure. The startup data structure contains interesting things such as a pointer to the ELF program header, the thread ID of the initial thread, a stack smashing protection canary, and a pointer to the argument data. Fetching system call arguments and setting the return value is similar to FreeBSD. The only differences are that system call 0 does not exist and that we call into cloudabi_convert_errno() to convert the error code. We also need this function in a couple of other places, so we'd better reuse it here. Reviewers: dchagin, kib Reviewed By: kib Subscribers: imp Differential Revision: https://reviews.freebsd.org/D3098
* | Import the CloudABI datatypes and create a system call table.ed2015-07-092-0/+712
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CloudABI is a pure capability-based runtime environment for UNIX. It works similar to Capsicum, except that processes already run in capabilities mode on startup. All functionality that conflicts with this model has been omitted, making it a compact binary interface that can be supported by other operating systems without too much effort. CloudABI is 'secure by default'; the idea is that it should be safe to run arbitrary third-party binaries without requiring any explicit hardware virtualization (Bhyve) or namespace virtualization (Jails). The rights of an application are purely determined by the set of file descriptors that you grant it on startup. The datatypes and constants used by CloudABI's C library (cloudlibc) are defined in separate files called syscalldefs_mi.h (pointer size independent) and syscalldefs_md.h (pointer size dependent). We import these files in sys/contrib/cloudabi and wrap around them in cloudabi*_syscalldefs.h. We then add stubs for all of the system calls in sys/compat/cloudabi or sys/compat/cloudabi64, depending on whether the system call depends on the pointer size. We only have nine system calls that depend on the pointer size. If we ever want to support 32-bit binaries, we can simply add sys/compat/cloudabi32 and implement these nine system calls again. The next step is to send in code reviews for the individual system call implementations, but also add a sysentvec, to allow CloudABI executabled to be started through execve(). More information about CloudABI: - GitHub: https://github.com/NuxiNL/cloudlibc - Talk at BSDCan: https://www.youtube.com/watch?v=SVdF84x1EdA Differential Revision: https://reviews.freebsd.org/D2848 Reviewed by: emaste, brooks Obtained from: https://github.com/NuxiNL/freebsd
* | Move the nvlist source and private includes from sys/kern to seperateoshogbo2015-07-046-0/+2955
| | | | | | | | | | | | | | | | | | directory sys/contrib/libnv. The goal of this operation is to NOT install header files which shouldn't be used outside the nvlist library. Approved by: pjd (mentor)
* | Quieten the scorpion SoC/WMAC reset path. Stuff the non-error stuffadrian2015-07-041-3/+3
| | | | | | | | under HALDEBUG().
* | Merge ACPICA 20150619.jkim2015-06-18146-782/+1645
|\ \ | |/
* | MFV: r283965jkim2015-06-032-47/+73
| | | | | | | | | | | | - Update GUIDs for new NFIT tables. - Fix ill-formed GUID strings for NFIT tables. - Fix a possible fault when performing a UUID search.
* | Add support for the tuning cap for Hornet/AR9331 boards.adrian2015-05-231-1/+9
| | | | | | | | | | | | | | | | | | | | | | This dramatically improves RX sensitivity and behaviour on the AR9331 hardware I have, including the Carambola 2. Tested: * AR9331, Carambola 2 board Submitted by: Zilvinas Valinskas <zilvinas.valinskas@gmail.com>
* | CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenjkim2015-05-222-3/+3
| | | | | | | | | | | | | | | | | | | | years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent. Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks
* | Merge ACPICA 20150515.jkim2015-05-1854-391/+3759
|\ \ | |/
* | Move ALTQ from contrib to net/altq. The ALTQ code is for many yearsglebius2015-04-1621-14646/+0
| | | | | | | | | | | | | | | | | | discontinued by its initial authors. In FreeBSD the code was already slightly edited during the pf(4) SMP project. It is about to be edited more in the projects/ifnet. Moving out of contrib also allows to remove several hacks to the make glue. Reviewed by: net@
* | Sync with OpenBSD: Use volatile instead of __volatile__.delphij2015-04-131-2/+2
| | | | | | | | MFC after: 2 weeks
* | Merge ACPICA 20150410.jkim2015-04-1178-1118/+1488
| |
* | In ipfilter(4) there is the ipftest(1) program, that compiles half of theglebius2015-04-071-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | ipfilter code as userland application. To reduce kernel structure knowledge include if_var.h only if a file is compiled with _KERNEL defined. In !_KERNEL case, provide our own definition of struct ifnet, that will satisfy ipftest(1). This was already done earlier to struct ifaddr in r279029. Protect the definition with _NET_IF_VAR_H_, since kernel part of ipfilter may include if_var.h and ip_compat.h. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* | o Use new function ip_fillid() in all places throughout the kernel,glebius2015-04-014-36/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | where we want to create a new IP datagram. o Add support for RFC6864, which allows to set IP ID for atomic IP datagrams to any value, to improve performance. The behaviour is controlled by net.inet.ip.rfc6864 sysctl knob, which is enabled by default. o In case if we generate IP ID, use counter(9) to improve performance. o Gather all code related to IP ID into ip_id.c. Differential Revision: https://reviews.freebsd.org/D2177 Reviewed by: adrian, cy, rpaulo Tested by: Emeric POUPON <emeric.poupon stormshield.eu> Sponsored by: Netflix Sponsored by: Nginx, Inc. Relnotes: yes
* | Expose the ANI state / statistics using the public ANI function, rather thanadrian2015-04-013-4/+29
| | | | | | | | | | | | | | the ar9300_* definitions. .. which of course don't match, and athstats was reading garbage ANI data.
* | Add initial support for the HAL channel survey support to the AR9300 HAL.adrian2015-03-294-6/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used by the 'athsurvey' command to print out channel survey statistics - % busy times transmit, receive and airtime. It's as buggy and incomplete as the rest of the HAL survey support - notably, tying into the ANI code to read channel stats and occasionally getting garbage counters isn't very nice. It also doesn't (yet!) get channel survey information during a scan. But it's good enough for basic air-time debugging, which is why I'm committing it in this state. Tested: * AR9380, STA mode
* | Quieten some of the log spam from AR9300 sysctl tree walk and chip setup/resetadrian2015-03-211-2/+31
| | | | | | | | | | | | | | | | | | | | | | path. * For now there's no exposed control over classic / LNA antenna diversity, so just stub them out. Adding this will take quite a bit of time. * Add a function to fetch the CTS timeout. PR: kern/198558
* | Use the dsb macro to use the correct instruction when building for ARMv7.andrew2015-03-191-1/+1
| |
* | Merge ACPICA 20141107 and 20150204.jkim2015-02-18315-984/+4265
|\ \ | |/
* | Update the infiniband stack to Mellanox's OFED version 2.1.hselasky2015-02-171-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Highlights: - Multiple verbs API updates - Support for RoCE, RDMA over ethernet All hardware drivers depending on the common infiniband stack has been updated aswell. Discussed with: np @ Sponsored by: Mellanox Technologies MFC after: 1 month
* | Add initial support to the AR9300 HAL to support FreeBSD's intmit API.adrian2015-02-151-0/+50
| | | | | | | | | | | | | | | | | | | | | | I don't like having it in this function; I may migrate it to ar9300_freebsd.c at some point to keep the HAL code pollution down. This allows ANI to be disabled via a sysctl. Tested: * AR9331, STA/TDMA modes
* | Add ath_hal_setbeacontimers() to the AR9300 HAL.adrian2015-02-152-2/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a custom FreeBSD HAL method that is used by the TDMA code to program the beacon timers directly without any guesswork/assumptions by the HAL. This brings up basic TDMA master/slave support on the AR9380 HAL, however there are other issues preventing it from being stable. (I'm seeing beacon interval instability, which may be due to busy 2GHz air, but also may be due to some HAL configuration issues with regards to ANI, or hardware timer programming, etc.) Tested: * AR9331 (Carambola2), STA, AP, adhoc and TDMA master mode.
* | Comment out a double declaration of this particular function name.adrian2015-02-141-0/+2
| | | | | | | | | | | | It trips up gcc builds. Pointy-hat-from: jenkins, kib
* | Quieten a clang warning.adrian2015-02-141-1/+1
| |
* | Remove the reserved pin 11 from the HAL check.adrian2015-02-141-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | The QCA9565 can have RFKILL on GPIO Pin 11, and thus we need to configure it up correctly or the NIC may not function. I'm not sure why the AR9382 can't use GPIO 8 / GPIO 11 ; it's likely hooked up to some external LNA or filter. The real solution is to make it only block pin 8 / pin 11 for AR9382, but the AR9382 probes like an AR9380. Sigh. Submitted by: Anthony Jenkins <scoobi_doo@yahoo.com>
* | Update the AR9300 HAL to the latest public available HAL from QCA.adrian2015-02-1415-55/+682
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've been sitting on this for a year or so now; I've finally tested it on enough devices to be reasonably sure it won't cause too much drama. But, if you see issues, please email me. Tested (all STA mode): PCIe: * AR9380 * AR9390 * AR9580 * AR9462 * AR9485 SoC: * QCA9550 * AR9331 * AR9342
* | Fix build without INVARIANTS/INVARIANT_SUPPORT:gonzo2015-02-131-1/+7
| | | | | | | | | | | | | | - Replace "emulation" of return in lmutex_lock_interruptible macros by proper static/inline function. Submitted by: Guy Yur
* | - Perform bus_dmamap_sync on pagelist structuregonzo2015-02-121-6/+22
| | | | | | | | - Wire pages of bulk transfer buffer when preparing pagelist
* | Add preliminary support for the Ralink RT5390 and RT5392 chipsets.kevlo2015-02-112-443/+443
| | | | | | | | Committed over the D-Link DWA-525 rev A2 on amd64 with WPA.
* | Add x2APIC support. Enable it by default if CPU is capable. Thekib2015-02-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hw.x2apic_enable tunable allows disabling it from the loader prompt. To closely repeat effects of the uncached memory ops when accessing registers in the xAPIC mode, the x2APIC writes to MSRs are preceeded by mfence, except for the EOI notifications. This is probably too strict, only ICR writes to send IPI require serialization to ensure that other CPUs see the previous actions when IPI is delivered. This may be changed later. In vmm justreturn IPI handler, call doreti_iret instead of doing iretd inline, to handle corner conditions. Note that the patch only switches LAPICs into x2APIC mode. It does not enables FreeBSD to support > 255 CPUs, which requires parsing x2APIC MADT entries and doing interrupts remapping, but is the required step on the way. Reviewed by: neel Tested by: pho (real hardware), neel (on bhyve) Discussed with: jhb, grehan Sponsored by: The FreeBSD Foundation MFC after: 2 months
* | Do not mark shared structures as __packed, it leads to race conditiongonzo2015-02-091-3/+3
| | | | | | | | | | | | | | | | If structure packed as __packed clang (and probably gcc) generates code that loads word fields (e.g. tx_pos) byte-by-byte and if it's modified by VideoCore in the same time as ARM loads the value result is going to be mixed combination of bytes from previous value and new one.
* | Remove unused variablesgonzo2015-02-092-3/+0
| |
* | Act as a bus in attach method: probe and attach devicesgonzo2015-02-081-0/+3
| |
* | Fix a number of -Wcast-qual warnings in ath's ar9300_attach.c, by makingdim2015-02-071-2/+2
| | | | | | | | | | | | | | | | | | the ia_array field of struct ar9300_ini_array const, and removing the const-dropping casts. No functional change. Reviewed by: adrian MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D1725
* | Import VCHI driver for Broadcom's VideoCore IV GPUgonzo2015-02-0532-0/+13579
| | | | | | | | Differential Revision: D1753
* | Add missing linuxapi module dependencies and always use the FreeBSDhselasky2015-01-191-0/+2
| | | | | | | | | | | | | | | | | | "MODULE_VERSION" macro definition. Remove the redefinition of the "MODULE_VERSION" macro from the Linux kernel compatibility API. MFC after: 1 month Reported by: np@ Sponsored by: Mellanox Technologies
* | Oops - use the correct argument order for ar9300_set_beacon().adrian2015-01-181-2/+2
| | | | | | | | (It's only an issue in AP/adhoc modes. But, still. Grr.)
* | Correct the descriptor length for AR9462/AR9565 and set the final fieldadrian2015-01-172-4/+10
| | | | | | | | | | | | | | | | | | | | to zero - TX drops are otherwise reported. Tested: * AR9462 (WB222), STA mode Obtained from: Linux ath9k
* | Skip the OFDM weak signal threshold detection programming foradrian2015-01-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | AR9462/AR9565. This and some upcoming changes to the HAL for these chips should address some of the signal sensitivity reported by users. Tested: * AR9462 (WB222), STA mode Obtained from: Linux ath9k
* | Override the bt enable/disable methods for AR9462 (jupiter) andadrian2015-01-171-0/+5
| | | | | | | | | | | | | | | | | | AR9565 (Aphrodite.) These need to use the MCI routines, not the legacy 2-wire / 3-wire bluetooth coexistence methods. Tested: * AR9462 (WB222); STA mode
* | Tie in the MCI bluetooth coexistence functions into the HAL.adrian2015-01-161-0/+7
| | | | | | | | | | | | Tested: * AR9462 (WB222)
* | In order to reduce use of M_EXT outside of the mbuf allocator andrwatson2015-01-061-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | socket-buffer implementations, introduce a return value for MCLGET() (and m_cljget() that underlies it) to allow the caller to avoid testing M_EXT itself. Update all callers to use the return value. With this change, very few network device drivers remain aware of M_EXT; the primary exceptions lie in mbuf-chain pretty printers for debugging, and in a few cases, custom mbuf and cluster allocation implementations. NB: This is a difficult-to-test change as it touches many drivers for which I don't have physical devices. Instead we've gone for intensive review, but further post-commit review would definitely be appreciated to spot errors where changes could not easily be made mechanically, but were largely mechanical in nature. Differential Revision: https://reviews.freebsd.org/D1440 Reviewed by: adrian, bz, gnn Sponsored by: EMC / Isilon Storage Division
* | Glue to suck in the QCA9550 HAL support if AH_SUPPORT_QCA9550 is defined.adrian2015-01-061-1/+3
| |
* | Use the same 6000 series g2{a,b} firmware versions when embedding thesemarius2014-12-272-15961/+0
| | | | | | | | | | | | | | images into the kernel as currently included into iwn6000g2{a,b}fw.ko and delete the old files, missed in r254199 and r259135 respectively. MFC after: 3 days
* | Correctly define constants.cy2014-11-282-2/+2
| | | | | | | | MFC after: 1 week
OpenPOWER on IntegriCloud