summaryrefslogtreecommitdiffstats
path: root/sys/arm
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-10-129-19/+237
|\
| * MFC r303818, r303833, r303941, r304478, r304481, r304483, r304484, r304554,ed2016-10-121-0/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r304555, r304556, r304557, r304558, r304559, r304561, r304563, r304564, r304565, r304615, r304742, r304743, r304744, r304745, r304748, r304886, r304991, r305928, r305938, r305987, r306185: Bring CloudABI support back in sync with HEAD. - Add support for running 32-bit executables on amd64, armv6 and i386. - As these new architectures require the use of the vDSO, merge back vDSO support for 64-bit executables running on amd64 and arm64 as well. This has the advantage that support for vDSO-less execution can be phased out when 11.0 becomes unsupported, as opposed to 11.x. This change has been tested by running the cloudlibc unit tests on all supported architectures, which seems to work fine.
| * MFC r306162:ed2016-10-127-18/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to safely use TPIDRURW from userspace. On amd64, arm64 and i386, we have the possibility to switch between TLS areas in userspace. The nice thing about this is that it makes it easier to do light-weight threading, if we ever feel like doing that. On armv6, let's go into the same direction by making it possible to safely use the TPIDRURW register, which is intended for this purpose. Clean up the ARMv6 code to remove md_tp entirely. Simply add a dedicated field to the PCB to hold the value of TPIDRURW across context switches, like we do for any other register. As userspace currently uses the read-only TPIDRURO register, simply ensure that we keep both values in sync where possible. The system calls for modifying the read-only register will simply write the intended value into both registers, so that it lazily ends up in the PCB during the next context switch. Approved by: andrew Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D7951
| * MFC r306658: Clear GT_CTRL_ENABLE to stop the timer.jmcneill2016-10-091-1/+1
| |
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-10-063-2/+59
|\ \ | |/
| * MFC 303522,303647,303860,303880,304168,304169,304170,304479,304485,305549:jhb2016-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chelsio T4/T5 VF driver. 303522: Various fixes to the t4/5nex character device. - Remove null open/close methods. - Don't set d_flags to 0 explicitly. - Remove t5_cdevsw as the .d_name member isn't really used and doesn't warrant a separate cdevsw just for the name. - Use ENOTTY as the error value for an unknown ioctl request. - Use make_dev_s() to close race with setting si_drv1. 303647: Store the offset of the KDOORBELL and GTS registers in the softc. VF devices use a different register layout than PF devices. Storing the offset in a value in the softc allows code to be shared between the PF and VF drivers. 303860: Reserve an adapter flag IS_VF to mark VF devices vs PF devices. 303880: Track the base absolute ID of ingress and egress queues. Use this to map an absolute queue ID to a logical queue ID in interrupt handlers. For the regular cxgbe/cxl drivers this should be a no-op as the base absolute ID should be zero. VF devices have a non-zero base absolute ID and require this change. While here, export the absolute ID of egress queues via a sysctl. 304168: Make SGE parameter handling more VF-friendly. Add fields to hold the SGE control register and free list buffer sizes to the sge_params structure. Populate these new fields in t4_init_sge_params() for PF devices and change t4_read_chip_settings() to pull these values out of the params structure instead of reading registers directly. This will permit t4_read_chip_settings() to be reused for VF devices which cannot read SGE registers directly. While here, move the call to t4_init_sge_params() to get_params__post_init(). The VF driver will populate the SGE parameters structure via a different method before calling t4_read_chip_settings(). 304169: Update mailbox writes to work with VF devices. - Use alternate register locations for the data and control registers for VFs. - Do a dummy read to force the writes to the mailbox data registers to post before the write to the control register on VFs. - Do not check the PCI-e firmware register for errors on VFs. 304170: Add support for register dumps on VF devices. - Add handling of VF register sets to t4_get_regs_len() and t4_get_regs(). - While here, use t4_get_regs_len() in the ioctl handler for regdump instead of inlining it. 304479: Add structures for VF-specific adapter parameters. While here, mark which parameters are PF-specific and which are VF-specific. 304485: Reorder sysctls so that nodes shared with the VF driver are added first. This permits a single early return for VF devices in the routines that add sysctl nodes. 305549: Chelsio T4/T5 VF driver. The cxgbev/cxlv driver supports Virtual Function devices for Chelsio T4 and T4 adapters. The VF devices share most of their code with the existing PF4 driver (cxgbe/cxl) and as such the VF device driver currently depends on the PF4 driver. Similar to the cxgbe/cxl drivers, the VF driver includes a t4vf/t5vf PCI device driver that attaches to the VF device. It then creates child cxgbev/cxlv devices representing ports assigned to the VF. By default, the PF driver assigns a single port to each VF. t4vf_hw.c contains VF-specific routines from the shared code used to fetch VF-specific parameters from the firmware. t4_vf.c contains the VF-specific PCI device driver and includes its own attach routine. VF devices are required to use a different firmware request when transmitting packets (which in turn requires a different CPL message to encapsulate messages). This alternate firmware request does not permit chaining multiple packets in a single message, so each packet results in a firmware request. In addition, the different CPL message requires more detailed information when enabling hardware checksums, so parse_pkt() on VF devices must examine L2 and L3 headers for all packets (not just TSO packets) for VF devices. Finally, L2 checksums on non-UDP/non-TCP packets do not work reliably (the firmware trashes the IPv4 fragment field), so IPv4 checksums for such packets are calculated in software. Most of the other changes in the non-VF-specific code are to expose various variables and functions private to the PF driver so that they can be used by the VF driver. Note that a limited subset of cxgbetool functions are supported on VF devices including register dumps, scheduler classes, and clearing of statistics. In addition, TOE is not supported on VF devices, only for the PF interfaces. Sponsored by: Chelsio Communications
| * MFC r305213,305319,305398alc2016-10-011-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | As an optimization to the machine-independent layer, change the machine- dependent pmap_ts_referenced() so that it updates the page's dirty field if a modified bit is found while counting reference bits. This opportunistic update can be performed at low cost and can eliminate the need for some future calls to pmap_is_modified() by the machine- independent layer. Replace the number 4 in sparc64's pmap_ts_referenced() by PMAP_TS_REFERENCED_MAX, like we've done elsewhere, e.g., amd64.
| * MFC r306091:kib2016-09-281-0/+37
| | | | | | | | | | | | Add a way for the architecture to specify the calling ABI for methods in the EFI Runtime Services Table. On amd64, the calling conventions are MS.
| * MFC r306050:loos2016-09-271-4/+14
| | | | | | | | | | | | | | | | | | | | | | If present, honor the USB port mode (host or peripheral) set on DTS, if not, keep the beaglebone defaults: USB0 -> peripheral/gadget, USB1 -> host. This is only a workaround as in fact fact this hardware is capable of detect the USB port mode based on type of cable and act according with the detected mode. Unfortunately the driver does not handle that at moment. Sponsored by: Rubicon Communications, LLC (Netgate)
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-09-261-3/+0
|\ \ | |/
| * MFC r305942:kib2016-09-251-3/+0
| | | | | | | | Consolidate four efi_next_descriptor() definitions.
* | Set the both USB ports as host in uFW and uBMC.Luiz Otavio O Souza2016-09-201-2/+2
| |
* | If present, honor the USB port mode (host or peripheral) set on DTS, if not,loos2016-09-201-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | keep the beaglebone defaults: USB0 -> peripheral/gadget, USB1 -> host. This is only a workaround as in fact fact this hardware is capable of detect the USB port mode based on type of cable and act according with the detected mode. Unfortunately the driver does not handle that at moment. MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) (cherry picked from commit 4d828af2f5b1ea01fc109c4267cf54c1b5fe8104)
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-09-206-27/+9
|\ \ | |/
| * MFC r304285:kib2016-09-164-23/+9
| | | | | | | | Implement userspace gettimeofday(2) with HPET timecounter.
| * MFC r303677: Move/add ARM ELF PHDR types to elf_common.hemaste2016-09-151-3/+0
| |
| * MFC r305425:markj2016-09-131-1/+0
| | | | | | | | Remove an unreachable return statement from ARM's minidumpsys().
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-09-1218-44/+454
|\ \ | |/
| * MFC r303891, r303892:pfg2016-09-081-8/+8
| | | | | | | | | | | | | | | | sys: replace comma with semicolon when pertinent. Uses of commas instead of a semicolons can easily go undetected. The comma can serve as a statement separator but this shouldn't be abused when statements are meant to be standalone.
| * MFC r305492: Let knlist_add do the locking partgonzo2016-09-071-3/+1
| | | | | | | | | | | | | | Remove explicit mtx_lock/mtx_unlock around knlist_add and pass 0 as locked parameter so knlist_add does the locking itself Suggested by: kib@
| * MFC r304509manu2016-09-051-7/+23
| | | | | | | | | | | | if_emac: Before generating a random MAC address, try using the SID rootkey to generate one. This is was U-Boot does to generate a random MAC so we end up with the same MAC address as if U-Boot did generate it.
| * MFC r303087manu2016-09-052-1/+76
| | | | | | | | | | | | | | | | | | | | Add support for the SID (Security ID Module) on Allwinner A10 and A20. The rootkey is burnt at production and can't be changed, thus is can be used as a device unique ID or to generate a MAC address (This is was u-boot does). The rootkey is exposed as a sysctl (dev.aw_sid.<unit>.rootkey). Reviewed by: jmcneill Differential Revision: https://reviews.freebsd.org/D6383
| * MFC r304290,r304649manu2016-09-051-1/+3
| | | | | | | | | | | | | | | | | | | | r304290: Only set pud settings if this is a pullup or pulldown configuration. This removes the need to set the MMC pins with pullups in our DTS. Thanks to jmcneill@ for spotting this. r304649: Do not include file from dt-bindings and simply use the already present defines.
| * MFC r304289manu2016-09-051-19/+53
| | | | | | | | | | | | | | | | | | | | | | a10_gpio_get_function now returns the whole function not only GPIO_INPUT/GPIO_OUTPUT. a10_gpio_get_pud now returns the whole pud not only PULLDOWN/PULLUP. Add a10_gpio_get_drv to get the current drive strenght. During fdt pin configure, avoid setting function/drive/pud if it's already in the correct value. Tested on Allwinner H3 and A20
| * MFC r303186manu2016-09-051-1/+1
| | | | | | | | PC5 doesn't have mmc2 function.
| * MFC r302472manu2016-09-0512-1/+271
| | | | | | | | | | | | | | | | Add support for Allwinner A13. Reviewed by: jmcneill Relnotes: yes Differential Revision: https://reviews.freebsd.org/D6809
| * MFC r302470manu2016-09-051-6/+19
| | | | | | | | | | Check that the pin function exists before setting it. This is needed for Allwinner A13 which has gpio pins with only "out" function.
| * MFC r305039:gonzo2016-09-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | Fix TI PRUSS driver panic with INVARIANTS enabled Value passed as islocked argument to knlist_add should be consistent with actual lock state so add lock/unlock calls around knlist_add PR: 212120 Submitted by: Manuel Stuhn
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-08-251-1/+1
|\ \ | |/
| * MFC r304077:manu2016-08-211-1/+1
| | | | | | | | | | | | Correct the size of the softc in a10_ehci Reported by: andrew
* | MFC a single -head change to fix our kernel building. This will be reverted ↵Luiz Otavio O Souza2016-08-211-1/+1
| | | | | | | | on next merge from upstream.
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-08-173-6/+6
|\ \ | |/
| * MFC r303728:manu2016-08-161-4/+4
| | | | | | | | | | | | | | | | We need aw_nmi to be attached which needs GIC so attach a bit later. Also the GPIOC doesn't need to be attach early Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D7082
| * MFC r303145:manu2016-08-161-1/+1
| | | | | | | | | | | | | | axp209 needs aw_nmi so attach a bit earlier Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D7081
| * MFC r303144:manu2016-08-161-1/+1
| | | | | | | | | | | | | | We need the GIC to be attached so attach later at BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D7080
* | Update the uBMC-netboot kernel configuration.Luiz Otavio O Souza2016-08-081-20/+6
| |
* | Update the uBMC and uFW kernels:Luiz Otavio O Souza2016-08-082-42/+14
| | | | | | | | | | | | - most of common options are now in std.armv6; - enable micphy; - disable debug.
* | Enable the build of micphy as part of generic miibus build, but only forloos2016-08-082-2/+0
| | | | | | | | | | | | | | | | FDT enabled systems. Sponsored by: Rubicon Communications (Netgate) (cherry picked from commit 27f9b92c82ee2d5f1c14c151a398cbb0f17f5390)
* | Allow the use of micphy on am335x devices.loos2016-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | The Micrel PHYs reads the optional external delays from DTB. Tested and used by uBMC and uFW. Sponsored by: Rubicon Communications (Netgate) (cherry picked from commit c01e7437eaaa7be717f5530347de406b5b9e3bae)
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-08-081-0/+1
|\ \ | |/
| * MFC r302988:loos2016-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | Fix a random memory overwrite at boot time, simplebus_init() and simplebus_add_device() expect a simplebus_softc structure associated with the device. Add the simplebus_softc as first member in am335x_pwmss_softc structure. Sponsored by: Rubicon Communications (Netgate) Approved by: re (gjb)
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-07-262-48/+0
|\ \ | |/
| * Disable debugging options in arm configurations.ian2016-07-212-48/+0
| | | | | | | | Approved by: re (gjb)
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-07-1951-692/+62
|\ \ | |/
| * MFC r302502, r302505:ian2016-07-1551-692/+62
| | | | | | | | | | | | | | | | Consolidate debugging options from all arm kernel configs to std.arm[v6]. Correct syntax errors that only show up when compiled with INVARIANTS. Approved by: re (gjb)
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2016-07-082-1/+18
|\ \ | |/
| * Fix a lockup in tx path for cspw.loos2016-07-072-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | Sometimes the software loses the race when appending more descriptors to the tx ring and the tx queue stops. This commit detects this condition and restart the tx queue whenever it stall. Tested by: sobomax@, Keith White <kwhite@site.uottawa.ca>, Paul Mather <paul@gromit.dlib.vt.edu> Sponsored by: Rubicon Communications (Netgate) Approved by: re (kib)
* | Merge remote-tracking branch 'origin/master' into devel-11Luiz Otavio O Souza2016-07-023-20/+19
|\ \ | |/
| * Revert the recent armv6 changes to ALIGNED_POINTER(), restoring theian2016-06-211-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fully-pessimized implementation that requires a type to be aligned to its natural size. On armv6+ the compiler might generate load-/store-multiple instructions which require 4-byte alignment even though the source code is only accessing individual uint32_t values in a way that doesn't require any particular alignment at all. The compiler apparently feels free to combine multiple accesses into a single instruction that requires a more-strict alignment, and no set of compiler flags seems to disable this behavior (at least in clang 3.8). This fixes alignment faults on arm systems using wifi adapters. The wifi code uses ALIGNED_POINTER(p, uint32_t) to decide whether it needs to copy-align tcp headers. Because clang is combining several uint32_t accesses into a single ldm instruction, we need to say that accessing a uint32_t requires 4-byte alignment. Approved by: re(gjb)
| * Update comments for the MD functions managing contexts for newkib2016-06-162-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | threads, to make it less confusing and using modern kernel terms. Rename the functions to reflect current use of the functions, instead of the historic KSE conventions: cpu_set_fork_handler -> cpu_fork_kthread_handler (for kthreads) cpu_set_upcall -> cpu_copy_thread (for forks) cpu_set_upcall_kse -> cpu_set_upcall (for new threads creation) Reviewed by: jhb (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (hrs) Differential revision: https://reviews.freebsd.org/D6731
OpenPOWER on IntegriCloud