summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r261252, r261279, r261304, r261305, r261322, r261336, r261337, r261338,ian2014-05-1554-117/+97
| | | | | | | | | | | | | | | | | r261353 Fix the name of the dts file for the HL201... When mapping an address, the bsh needs the same offset we do for other things. Add explicit depends on bus_if.h and device_if.h to avoid a chicken and egg problem in some compilation environments. Switch to using PAs rather than VAs for the addresses we map for devices. This is a nop, except for what's reported by atmelbus for the resources. Comment cleanups. Move things around for diff reduction against FDT work.
* MFC r266092loos2014-05-152-4/+4
| | | | gpioiic.4 and gpioled.4 will first appear in 10.1-RELEASE.
* MFC r258046, r258047, r258050, r259035, r259036, r259037, r261842, r261843,loos2014-05-1520-37/+711
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r261844, r261845, r261846, r262194, r262522, r262559 r258046: Fix a typo on a comment in ofw_bus_if.m, the default method will return -1 when a node doesn't exist. r258047: Move the KASSERT() check to the point before the increase of number of pins. r258050: Fix gpiobus to return BUS_PROBE_GENERIC insted of BUS_PROBE_SPECIFIC (0) so it can be overriden by its OFW/FDT version. Give a chance for GPIO devices that implement the device_identify method to attach. r259035: Remove unnecessary includes and an unused softc variable. While here apply two minor style(9) fixes. r259036: Move the GPIOBUS_SET_PINFLAGS(..., ..., pin, GPIO_PIN_OUTPUT) to led(4) control callback function. This makes gpioled(4) works even if the pin is accidentally set to an input. r259037: Fix the pin value reading on AM335x. Because of the inverted logic it was always returning '0' for all the reads, even for the outputs. It is now known to work with gpioiic(4) and gpioled(4). r261842: Add an OFW GPIO compatible bus. This allows the use of the DTS files to describe GPIO bindings in the system. Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between the OFW and the non OFW versions of GPIO bus. Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus. r261843: Add OFW support to the in tree gpio compatible devices: gpioiic(4) and gpioled(4). Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for the I2C tests). It was also verified for regressions on RSPRO (MIPS/ar71xx) used as reference for a non OFW-based system. Update the gpioled(4) and gpioiic(4) man pages with some details and examples about the FDT/OFW support. Some compatibility details pointed out by imp@ will follow in subsequent commits. r261844: Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems. This change makes ofw_iicbus attach to iicbb(4) controllers in addition to the already supported i2c host bridges (iichb). On iicbb(4) allow the direct access of the OFW parent node by its children, so they can be directly attached to iicbb(4) node on the DTS without the need of describing the i2c bus. r261845: Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio. With this change the gpio children can be described as directly connected to the GPIO controller without the need of describing the OFW GPIO bus itself on the DTS file. With this commit the OFW GPIO bus is fully functional on BBB and RPi. GPIO controllers which want to use the OFW GPIO bus will need similar changes. r261846: Make the gpioled(4) work out of the box on BBB. Add gpioled(4) to BEAGLEBONE kernel and add the description of the four on-board leds of beaglebone-black to its DTS file. r262194: Remove an unnecessary header. r262522: Fix make depend for iicbus. r262559: Inspired by r262522, fix make depend. This fixes the build of gpio modules.
* MFC r262665:markj2014-05-153-3/+14
| | | | | | | Expose a few DTrace parameters as sysctls under kern.dtrace and add descriptions for several existing sysctls. PR: 187027
* MFC r258209, r258210, r261211,ian2014-05-144-0/+662
| | | | | | | | Add a driver for the Texas Instruments Mailbox hardware. Add a driver for the TI Programmable Realtime Unit Subsystem. fix args to mtx_init
* MFC r260886, r261165, r261171, r261172, r261214ian2014-05-144-9/+108
| | | | | | | | | | | | | | | | | | Fix gcc with -Wstrict-prototypes by telling it bi_emac takes no parameters. Bus space handles need to be the VA of the requested resource, not the rounded page VA. Correct so the DBGU device can be mapped for FDT console since it isn't on a page boundary. Make early printf output nicer by inserting a carriage return before any linefeeds that are output. Before resetting the USART, delay a bit to allow the transmitter to finish the current character to drain to avoid glitching. Also, simplify the code a smidge. Remove extra parens to silence clang warning.
* MFC r258044, r258679, r263990loos2014-05-145-49/+200
| | | | | | | | Adds gpioiic.4 and gpioled.4 man pages. Moves some of the information that was previously available on gpio.4 to their respectives pages. Add the cross references on gpioctl.8. Add gpiobus(4) as a link to gpio(4).
* MFC r261083, r261092, r261126, r261127, r261128, r261129, r261130, r261131ian2014-05-1411-18/+21
| | | | | | | | | | | | | | Add Atmel serial drivers. uart clock-frequency is a FreeBSD-specific extention. Make it optional and allow the client uart drivers to decide if a frequency is required. Remove redundant declaration for uart devclass. Commit some unrelated, but harmless, FDT ifdefs. Add at91 NAND support, Fix comment. Remove obsolete options and fix comments
* MFC r261038, r261039, r261040, r261041ian2014-05-147-23/+71
| | | | Implement generic support for early printf.
* MFC r260921: Add nand to arm NOTESian2014-05-141-0/+1
|
* MFC r260893: Free dma memory from the dma map before destroying the map.ian2014-05-141-1/+1
|
* MFC r259728, r260752ian2014-05-142-1/+348
| | | | Add Freescale i.MX515 vt(9) driver.
* MFC r260695, r260696, r260884, r260885, r260886, r260887ian2014-05-1415-18/+648
| | | | | | | | | | | | | | | Provide a simplified way to specify GPIO pins for the Atmel port. Add at91 data so we can convert a PIO unit number into a base address. Add at91 standard memory controller helper functions. Generalize AT91 NAND support a bit. Connect NAND for the SAM9260EK eval board, as well as the HotE HL-201. Add nand device and NANDFS into the mix for those at91 boards that have support for it at the moment.
* MFC r260440, r260441, r260447, r260490, r260493ian2014-05-1441-5/+89
| | | | | | | | Add option USB_HOST_ALIGN to configs that contain 'device usb'. Update dts files of Cubieboard1,2 to use 1GB memory. Add a function to print the contents of the static device mapping table,
* MFC r256839, r256948, r256950, r257299, r257414, r258057, r259090ian2014-05-1428-9/+4023
| | | | | | | | | | | | | | | Add configuration for the Freescale i.MX53 Quick Start Board. Add the Raspberry Pi BSC (I2C compliant) controller driver. Add Radxa Rock board (by radxa.com) support. Digi-CCWMX53: enable ffec and uart, USB. Add support for Freescale Vybrid Family VF600 Move and rename dwc otg driver to more generic one as it appears to work for rk3188 SoC based board too.
* MFC r257738, r259202, r258410, r260288, r260292, r260294, r260320, r260323,ian2014-05-1439-576/+479
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r260326, r260327, r260331, r260333, r260340, r260371, r260372, r260373, r260374, r260375 Add common bus_space tag definition shared for most supported ARMv6/v7 SoCs. Correct license statements to reflect the fact that these files were all derived from sys/arm/mv/bus_space.c. In pmap_unmapdev(), remember the size, and use that as an argument to kva_free(), or we'd end up always passing it a size of 0 In pmap_mapdev(), first check whether a static mapping exists, Convert TI static device mapping to use the new arm_devmap_add_entry(), Use the common armv6 fdt_bus_tag defintion for tegra instead of a local copy. Eliminate use of fdt_immr_addr(), it's not needed for tegra Convert lpc from using fdt_immr style to arm_devmap_add_entry() to make static device mappings. Retire machine/fdt.h as a header used by MI code, as its function is now obsolete. This involves the following pieces: - Remove it entirely on PowerPC, where it is not used by MD code either - Remove all references to machine/fdt.h in non-architecture-specific code (aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat non-arch-specific). - Fix code relying on header pollution from machine/fdt.h includes - Legacy fdtbus.c (still used on x86 FDT systems) now passes resource requests to its parent (nexus). This allows x86 FDT devices to allocate both memory and IO requests and removes the last notionally MI use of fdtbus_bs_tag. - On those architectures that retain a machine/fdt.h, unused bits like FDT_MAP_IRQ and FDT_INTR_MAX have been removed. Add #include <machine/fdt.h> to a few files that used to get it via pollution Enable the mv cesa security/crypto device by providing the required property in the dts source, and adding the right devices to the kernel config. Remove dev/fdt/fdt_pci.c, which was code specific to Marvell ARM SoCs, related to setting up static device mappings. Since it was only used by arm/mv/mv_pci.c, it's now just static functions within that file, plus one public function that gets called only from arm/mv/mv_machdep.c. Switch RPi to using arm_devmap_add_entry() to set up static device mapping. Allow 'no static device mappings' to potentially work. Don't try to find a static mapping before calling pmap_mapdev(), that logic is now part of pmap_mapdev() and doesn't need to be duplicated here. Switch a10 to using arm_devmap_add_entry() to set up static device mapping.
* MFC r260281, r260282, r260283, r260285ian2014-05-147-241/+104
| | | | | | | | | | | | | Implement OFW_BUS_MAP_INTR() in terms of the FDT PIC table Reimplement fdt_intr_to_rl() in terms of OFW_BUS_MAP_INTR() and OFW_BUS_CONFIG_INTR(). Use bus_space_map() rather than pmap_mapdev() in nexus_activate_resource(), when running on FDT systems. Unmap memory in nexus_deactivate_resource(). Remove fdt_pic_table code from MIPS, PowerPC, and x86, as it is no longer used by anything.
* MFC r260161, r260163, r260165, r260166, r260189ian2014-05-146-17/+130
| | | | | | | | | | Add polarity and level support to ARM GIC Do not attach to PCI bridges in AHCI driver Use only mapped BIOs on ARM Fix race condition in DELAY for SP804 timer.
* MFC r260092, r260093, r260121, r260180,ian2014-05-144-2/+5
| | | | | | | | | | Allow AT91_MCI_ALLOW_OVERCLOCK to be an option in kernel config files. Set the SoC name for the atmelbus name. Add support for Samsung K9F2G08U0A (256MiB SLC) NAND Comment updates.
* MFC r260118ian2014-05-141-4/+2
| | | | | | Delete echoed doesn't rub out the previous character, so always use <backspace> <space> <backspace> instead. This fixes hitting DELETE instead of BACKSPACE at mountroot> prompt.
* MFC r258359, r258742, r258845, r259936, r259640ian2014-05-1413-34/+47
| | | | | | | | | | | Apply access flags for managed and unmanaged pages properly on ARMv6/v7 Set the PGA_WRITEABLE flag when the protections indicate write access, not just when the current access is a write. Enable missing Access Flag for secondary cores on ARMv6/v7 Add identification and necessary type checks for Krait CPU cores.
* MFC r256707, r256708, r257291, r258358ian2014-05-143-12/+25
| | | | | | | | | | | | | | | | | Switch to use WBWA mappings for page tables on armv6, this is needed for SMP. Fix PTE_SYNC() for PIPT L2 caches, using the virtual address wasn't so useful. Use PTE_SYNC() for >= armv6 Spell cpu_l2cache_wb_range correctly. Fix condition that determines PMAP_NEEDS_PTE_SYNC value for ARM Use values of the correct defines to determine statement's result. ARM_ARCH_ symbols are always defined, hence only values are relevant. Avoid clearing EXEC permission bit when setting the page RW on ARMv6/v7 When emulating modified bit the executable attribute was cleared by mistake when calling pmap_set_prot().
* MFC r257170, r257171, r257172, r257240, r257278, r257279, r257280, r257281,ian2014-05-1417-282/+141
| | | | | | | | | | | | | | | | | | | | | | | | | r257282, r257332 Wait for DesignWare UART transfers completion before accessing line control Enable UART busy detection handling for Armada XP - based board Enable SATA interface on Armada XP Run mvs SATA driver on Armada XP instead of old mv_sata Retire arm_remap_nocache() and the data and constants associated with it. Remove hard-coded mappings related to Armada XP support Fix-up DTB for Armada XP registers' base according to the actual settings Change Armada XP kernel load address to the u-boot's end address Remove not working and deprecated PJ4Bv6 support Switch off explicit broadcasting of the TLB flush operations for PJ4B CPU Add missing ARMv6 CPU functions to ARM Makefile
* MFC: r265535marius2014-05-141-98/+90
| | | | | | | | | - Sprinkle const and static as appropriate. - Fix whitespace bugs. - Remove pointless returns in void functions. - Nuke pointless switch cases mirroring the default. Sponsored by: Bally Wulff Games & Entertainment GmbH
* MFC: r256561marius2014-05-141-7/+10
| | | | | | Prevent an unlikely, but real double free issue in gvinum(8). Coverity ID: 1018965
* MFC r265072:bdrewery2014-05-141-1/+0
| | | | Remove redundant include
* MFC r264499:bdrewery2014-05-141-2/+3
| | | | Make g_access() KASSERT() more useful.
* MFC r264918:bdrewery2014-05-141-1/+1
| | | | Fix spelling error.
* MFC r264465:bdrewery2014-05-142-7/+9
| | | | Prefer /etc/login.conf for some of these environment values.
* MFC r264795:bdrewery2014-05-141-2/+1
| | | | Fix grammar error and trailing newline.
* MFC r264385:bdrewery2014-05-141-1/+1
| | | | Use proper MFSNAMELEN for fs type.
* MFC r259517, r259518ian2014-05-143-1/+319
| | | | Add vt support for RPi. (No early stage yet.)
* MFC r258800, r258802, r258805, r258806, r258807, r258851, r258857,ian2014-05-1429-754/+388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r259199, r259484, r259513, r259514, r259516 The kernel stack guard pages are only below the stack pointer, not above. Remove unnecessary double-setting of the thread's onfault state in copyinstr(). Open Firmware mandates that certain cross-references, in particular those in /chosen, be ihandles. The ePAPR spec makes those cross-reference phandles, since FDT has no concept of ihandles. Have the OF FDT CI module interpret queries about ihandles as cross-reference phandles. Real OF systems have an ihandle under /chosen/stdout, not a phandle. Use the right type. Rearchitect platform memory map parsing to make it less Open Firmware-centric. Remove fdtbus_bs_tag definition, which is now obsolete. The remainder of this file is also slated for future demolition. Return the correct IEEE 1275 code for "nextprop". Use the common Open Firmware PCI interrupt routing code instead of the duplicate version in dev/fdt. Configure interrupt sense based on device tree information. Simplify the ofw_bus_lookup_imap() API slightly: make it allocate maskbuf internally instead of requiring the caller to allocate it.
* MFC r258268, r258271, r258272, r258274, r258275, r258427, r258694, r258696,ian2014-05-1411-179/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | r258697, r258757 Do not assume a value for #address-cells when parsing the OF translations map. This allows the kernel to get farther with OpenBIOS on 64-bit CPUs. Actually look up #address-cells instead of assuming it is correlated with the Uninorth version number. #interrupt-cells belongs to the iparent, not the device parent. Add a sysctl to allow disabling resetting the OF syscons. For PCI<->PCI bridges, #address-cells may be 3. Make RTAS calls, which call setfault() to recover from machine checks, preserve any existing fault buffer. badaddr() is used only in the grackle PCI driver, so move its definition there. Clean up a spurious setfault() declaration as well. This [phyp_console] driver doesn't need the /options node, so don't check for it. Use the Open Firmware-based CPU frequency determination as a generic fallback if we can't measure CPU frequency. This is also useful on a variety of embedded systems using FDT.
* MFC: r265362brueffer2014-05-141-0/+3
| | | | Mention the axge(4) driver in the hardware notes.
* MFC: r265454marius2014-05-142-21/+36
| | | | | | | | | - Allow foot shooting with the resetconfig command via the -f option. - Fix typos preventing -f to actually work with the create command. - Initialize flags to zero rather than using stack garbage when handling the grow command. Sponsored by: Bally Wulff Games & Entertainment GmbH
* MFC r265149smh2014-05-141-92/+100
| | | | | | | Make uninteresting PCI devices with no attached drivers only print out on a verbose boot. Sponsored by: Multiplay
* MFC r258259, r258798, r259010ian2014-05-147-77/+144
| | | | | | | | | Unify handling of illegal instruction faults between AIM and Book-E. Make uart_cpu_powerpc work on both FDT and OFW systems. Fix debug printfs in FPU_EMU to compile on powerpc64 and enable it for powerpc64.
* MFC r258247, r258250, r258257ian2014-05-149-40/+41
| | | | | | | | | | | Remove a pointless #ifdef AIM. This is just PPC64 specific, including 64-bit Book-E. Make single precision floating point arithmetic actually work Split the function of the PCB_FPU flags into two: PCB_FPU now indicates that the actual FPU is enabled, while PCB_FPREGS indicates that the FPU state structure in the PCB is valid.
* MFC r257995, r258244, r258246,ian2014-05-148-236/+422
| | | | | | | | | Rename the "bare" platform "mpc85xx" Also turn "bare" into a truly bare platform Move CCSR discovery into the platform module There is no reason Book-E needs to save XER and CTR on context switches.
* MFC r258002, r258024, r258027, r258051, r258052, r258243, r258244, r258002,ian2014-05-1412-524/+131
| | | | | | | | | | | | | | | | | r258024, r258027, r258051, r258052, r258243, Follow up r223485, which made AIM use the ABI thread pointer instead of PCPU fields for curthread, by doing the same to Book-E. Use the same implementation of copyinout.c for both AIM and Book-E. Actually add IOMMU domain to the list of known mappings. Following the approach with ACPI DMAR on x86, split IOMMU handling into a variant PCI bus instead of trying to shoehorn it into the PCI host bridge adapter. Make sure that TLB1 mappings are aligned correctly.
* MFC r257702, r257745, r257746, r257747, r257751, r257791, r257793,ian2014-05-1414-221/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r257794, r257795, r257992 Teach nexus(4) about Open Firmware (e.g. FDT) on ARM and MIPS, retiring fdtbus in most cases. Make OF_nextprop() work correctly for FDT by using the libfdt fdt_next_property_offset() API. Do not panic if pmap_mincore() is called. An addendum: it is possible, though of questionable utility, for a node to have no properties at all. Add definition for the Atheros 8021 gigabit PHY. Consolidate Apple firmware hacks and improve them by switching on the presence of mac-io devices in the tree, which uniquely identifies Apple hardware. Allow OF_decode_addr() to also be able to map resources on big-endian devices. Make tsec work with the device tree present on the RB800. Be more flexible about which compatible strings to accept. This brings up the PCI Express bus on the RB800 using the firmware device tree. Rename the "bare" platform "mpc85xx", which is what it actually is, and add actual platform probing based on PVR.
* MFC r257334, r257336, r257337, r257338, r257341, r257342, r257343, r257370,ian2014-05-1446-49/+53
| | | | | | | r257368, r257416 Hints-only devices should return BUS_PROBE_NOWILDCARD from their probe methods.
* MFC r257180, r257195, r257196, r257198, r257209, r257295ian2014-05-146-29/+54
| | | | | | | | | | | | Add some extra sanity checking and checks to printf format specifiers. Try even harder to find a console before giving up. Make devices with registers into the KVA region work reliably. Turn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC. Return NOKEY instead of 0 if there are no more key presses queued.
* MFC r257161, r257169, r257178, r257190, r257191ian2014-05-1411-60/+223
| | | | | | | | | | | | | | | | | | | | | | | | | Add pmap_mapdev_attr() and pmap_kenter_attr() interfaces. Fix concurrency issues with TLB1 updates and make pmap_kextract() search TLB1 mappings as well Interrelated improvements to early boot mappings: - Remove explicit requirement that the SOC registers be found except as an optimization (although the MPC85XX LAW drivers still require they be found externally, which should change). - Remove magic CCSRBAR_VA value. - Allow bus_machdep.c's early-boot code to handle non 1:1 mappings and systems not in real-mode or global 1:1 maps in early boot. - Allow pmap_mapdev() on Book-E to reissue previous addresses if the area is already mapped. Additionally have it check all mappings, not just the CCSR area. Add some extra sanity checking and checks to printf format specifiers. Bump initial TLB size. The kernel is not necessarily less than 16 MB Handle (in a slightly ugly way) ePAPR-type loaders that just place a device tree into r3.
* Fix OpenSSL NULL pointer deference vulnerability.delphij2014-05-131-0/+4
| | | | | | Obtained from: OpenBSD Security: FreeBSD-SA-14:09.openssl Security: CVE-2014-0198
* Document r265922, mrsas(4) merge.gjb2014-05-131-0/+16
| | | | Sponsored by: The FreeBSD Foundation
* MFC of tzdata2014cedwin2014-05-133-16/+47
| | | | - Egypt will go into DST in 15 May 2014
* MFC r257162, r257175ian2014-05-136-195/+128
| | | | | | | The old trap.h (then trap_aim.h) actually had trap ID codes for Book-E CPUs. Use it universally. Book-E traps may also need revisiting due to the introduction of fixed-offset traps and the deprecation of IVORs in POWER ISA 2.06, but that's very much an issue for another day.
* MFC r257111, r257144, r257157, r257183ian2014-05-131-11/+33
| | | | | | | | | | Test UARTs physical address instead of virtual. Be a bit more flexible in how we find the console from the properties on /chosen, following the list of allowed console properties in ePAPR. Also do not require that stdin be defined and equal to stdout: stdin is nonstandard (for ePAPR) and console in an unexpected place is after all better than no console.
OpenPOWER on IntegriCloud