195725 Commits

Author SHA1 Message Date
ian
91085f1756 MFC 264428:
Improve the i.MX53 / Digi DTS:

  * Fix the IPU address.
  * Fix the PATA definition.
  * Add another I2C.
  * Add more UARTs.
  * Add SATA.
2014-05-17 22:02:26 +00:00
ian
28cd5d043b MFC 264389: Fix the style of ata_interrupt_locked(). 2014-05-17 22:01:17 +00:00
ian
38a9e433e4 MFC 264251: Updates to i.MX53:
* Define support for the SDHCI driver, although it doesn't work yet
  * Fix the memory mappings for IPU
2014-05-17 22:00:10 +00:00
ian
886ceaae25 MFC 264230: Move dts files accidentally placed in arm dir to powerpc dir. 2014-05-17 21:55:00 +00:00
ian
48984a3aa1 MFC 264219: Move sys/arm/econa to sys/arm/cavium/cns11xx. 2014-05-17 21:53:34 +00:00
ian
9d16e04a2f MFC 264203, 264204, 264206, 264218:
Tell VM we now have ARM platforms with physically discontiguous memory.

  Define the full 1024M of ram on the imx51 and imx53 boards.

  Use a more professional uart device description.
2014-05-17 21:46:25 +00:00
ian
60aa355ac4 MFC 264190:
Mark __fixdfdi/__aeabi_d2lz with COMPILER_RT_ABI so it uses the correct
  calling convention for __aeabi_* functions.
2014-05-17 21:35:26 +00:00
ian
9aa7e8141a MFC 264180, 264181, 264182:
Follow files.imx51 and add vt support for imx53.

  Add fsl,imx53 compatible string.

  Need to include machine/fdt.h in vt_early_fb.c
2014-05-17 21:31:58 +00:00
ian
cc062c3699 MFC 264160: Remove code under PMAP_CACHE_VIVT, not compiled on armv6. 2014-05-17 21:28:49 +00:00
ian
02b507755f MFC 264150: Exynos: Correct the end address of the video frame buffer. 2014-05-17 21:26:33 +00:00
ian
ff070b2a91 MFC 264183: Add a couple more required TLB flushes. 2014-05-17 21:23:46 +00:00
ian
a1c815496e MFC 264137: Switch wandboards over to the common IMX6 kernel config, which
has SMP enabled.  Also switch IMX6 to use SCHED_ULE.
2014-05-17 21:19:44 +00:00
ian
3d46da424d MFC 264137: Switch wandboards over to the common IMX6 kernel config, which
has SMP enabled.  Also switch IMX6 to use SCHED_ULE.
2014-05-17 21:18:08 +00:00
ian
c44f8aab13 MFC 264128, 264129, 264130, 264135,
Fix TTB set operation for armv7. Perform sychronization (by "isb" barrier)
  after TTB is set.

  Fix TLB maintenance issues for armv6 and armv7.

    - Add cpu_cpwait to comply with the convention.
    - Add missing TLB invalidations, especially in pmap_kenter & pmap_kremove
      with distinguishing between D and ID pages.
    - Modify pmap init/bootstrap invalidations to ID, just to be safe.
    - Fix TLB-inv and PTE_SYNC ordering.

  Allocate per-cpu resources for doing pmap_zero_page() and pmap_copy_page().
  This is performance enhancement rather than bugfix.

  We don't support any ARM systems with an ISA bus and don't need a freelist
  of memory to support ISA addressing limitations.
2014-05-17 21:07:54 +00:00
ian
941a79bd10 MFC 264052, 264057, 264065, 264094, 264103, 264120
Actually save the mpcore clock frequency retrieved from fdt data.

  imx6..
  - Don't call sdhci_init_slot() until after handling the FDT properties
    related to detecting card presence.
  - Flag several sysctl variables as tunables.
  - Rework the cpu frequency management code for imx6 to add "operating
    points" and min/max frequency controls.

  generic timer...
  - Setup both secure and non-secure timer IRQs.
    We don't know our ARM security state, so one of them will operate.
  - Don't set frequency, since it's unpossible in non-secure state.
    Only rely on DTS clock-frequency value or get clock from timer.
2014-05-17 20:52:10 +00:00
ian
e111203de4 MFC 264054, 264056
Switch imx6 to using the mpcore per-cpu event timers, but continue to use
  the GPT timer, which is fixed-frequency, as a timecounter.

  Change NO_EVENTTIMERS from an arm-specific to an MI option, so that it can
  be used in MI code.
2014-05-17 20:22:22 +00:00
ian
9f4d42e0d5 MFC 264019, 264041, 264048, 264049, 264050, 264051
Add support for event timers whose clock frequency can change while running.

  Apparently all ARM configs build kern_et.c, but only a few of them also
  build kern_clocksource.c, un-break the build by not referencing functions in
  kern_clocksource if NO_EVENTTIMERS is defined.

  Add variable-frequency support to the arm mpcore eventtimer driver.

  mpcore_timer: Disable the timer and clear any pending bit, then setup the
  new counter register values, then restart the timer.  Also re-nest the parens
  properly for casting the result of converting time and frequency to a count.
2014-05-17 20:10:12 +00:00
gjb
aa723a2c5a Document r266165, power management bug with Intel Turbo Boost.
Sponsored by:	The FreeBSD Foundation
2014-05-17 19:45:40 +00:00
ian
ac96a624ae MFC 263910, 263913, 263914, 263933, 263934, 263935, 263936, 263981, 263982,
Add more flags for the fpexc register from the ARM1176JZF-S Manual

  Initialise fpscr to a sane value when we create the pcb. This sets NaNs to
  be the default NaN and for denormalised numbers to be flushed to zero.

  VFP fixes/cleanups for ARM11:
   * Save the required VFP registers on context switch. If the exception bit
     is set we need to save and restore the FPINST register, and if the fp2v
     bit is also set we need to save and restore FPINST2.
   * Move saving and restoring the floating point control registers to C.
   * Clear the fpexc exception and fp2v flags on a floating-point exception.
   * Signal a SIGFPE if the fpexc exception flag is set on an undefined
     instruction. This is how the ARM core signals to software there is a
     floating-point exception.

  Add Cortex-A15 cpu id revisions.

  Exynos/Arndale...
  - Merge SoC-common parts
  - Enable iicbus device
  - Directly call kmem_alloc_contig to allocate framebuffer memory
    and pass VM_MEMATTR_UNCACHEABLE (no-cache, no-buffer).
    This fixes screen refreshing problem when data is updated too slowly.
  - Add support for keyboard used in Samsung Chromebook (ARM machine)
    Support covers device drivers for:
    - Interrupt Combiner
    - gpio/pad, External Interrupts Controller (pad)
    - I2C Interface
    - Chrome Embedded Controller
    - Chrome Keyboard
  - Use new gpio dev class in EHCI driver
  - Expand device tree information
  - Release i2c bus on detach.
2014-05-17 19:37:04 +00:00
loos
91f6841891 MFC r265013
Revert r258678.  Make the led gpio-specifier match again the #gpio-cells
settings from the GPIO controller, which i had broken in r258678.  Restore
the active-low flag.
2014-05-17 19:16:45 +00:00
jhb
bbf655f9b4 MFC 259641,259863,259924,259937,259961,259978,260380,260383,260410,260466,
260531,260532,260550,260619,261170,261453,261621,263280,263290,264516:
Add support for local APIC hardware-assist.
- Restructure vlapic access and register handling to support hardware-assist
  for the local APIC.
- Use the 'Virtual Interrupt Delivery' and 'Posted Interrupt Processing'
  feature of Intel VT-x if supported by hardware.
- Add an API to rendezvous all active vcpus in a virtual machine and use
  it to support level triggered interrupts with VT-x 'Virtual Interrupt
  Delivery'.
- Use a cheaper IPI handler than IPI_AST for nested page table shootdowns
  and avoid doing unnecessary nested TLB invalidations.

Reviewed by:	neel
2014-05-17 19:11:08 +00:00
loos
7e79287631 Adds the ADC driver for TI AM3xxx SoC family.
The ADC has a 12bit resolution and its raw output can be read via sysctl(8)
interface.

The driver allows the setup of ADC clock, samples average and open delay
(the number of clock cycles to wait before start the conversion).

The TSC_ADC module is set in the general purpose mode (no touchscreen
support).

Tested on Beaglebone-black.

Written based on AM335x TRM.
2014-05-17 19:06:46 +00:00
ian
1253f26158 MFC 263631, 263637, 263664, 263676, 263679, 263698, 263711,
Implement __flt_rounds for ARMv6 hard-float. The fpscr register stores the
  current rounding mode used by the VFP unit.

  Simplify how we build MACHINE_ARCH. There are 3 options that may be set
  however only arm, armeb, armv6, and soon armv6hf will be used.

  Add the llvm/clang patch for r263619.

  Reorder the pmap macros so "ARM_MMU_V6 + ARM_MMU_V7" is first. As they are
  identical this allows us to build for both v6 and v7 together.

  Add code for enabling second CPU core for A20 SoC.
  Enable SMP on Cubieboard2.

  Switch to freebsd.org emal address in copyright.
2014-05-17 18:53:36 +00:00
ian
52cdf0b123 MFC 263250, 263251, 263424, 263425, 263426, 263427, 263430, 263431
Use the same cache terminology as the ARM docs in comments. No
  functional changes.

  Use armv7 TLB flush code, not arm11, for cortex-a processors.

  Exynos/ Arndale...
  - Disable debugging by default.
  - Add display-related and clk devices to the tree
  - Prevent resources intersection with EHCI driver
  - Add display-related and clk devices to the tree
  - Prevent resources intersection with EHCI driver
  - Add driver for Display Controller.
  - Add support for Samsung Chromebook (ARM Cortex A15 machine).
  - Rename mct and ehci drivers files to match common naming.
2014-05-17 17:54:38 +00:00
ian
4c5f4bdec5 MFC 263301
In kernel config files, it is supposed to be 'options<space><tab>' not
  'options<tab><tab>', per long standing (but recently not so strictly
  enforced) convention.
2014-05-17 17:34:37 +00:00
ian
ee5c0f266a MFC 261357, 261358, 261421:
Enable SCHED_ULE for ppc book-e.

  Add driver for the ADT7460/ADT7467 fan controller found in
  later PowerBooks and iBooks.
2014-05-17 17:18:35 +00:00
ian
d7afc2b3b0 MFC 263246: Align all comments in config files on same column. 2014-05-17 16:57:17 +00:00
ian
820c78aea7 MFC 263245: Make all the comments '# ' and align to same column. 2014-05-17 16:46:15 +00:00
alc
a7358720d6 MFC r265850
About 9% of the pmap_protect() calls being performed by
  vm_map_copy_entry() are unnecessary.
  Eliminate the unnecessary calls.
2014-05-17 14:35:18 +00:00
ian
ad5edf36f1 MFC 262989, 263210, 263230, 263231, 263239, 263242, 263243,
Export _libc_arm_fpu_present as a private symbol to be used by other
  system libraries, for example libm.

  On armv6 access both the softfloat and, when available, the vfp to get and
  set the floating-point environment.

  Build fenv-vfp.c with the softfp float abi. Without this gcc generates an
  incorrect assembly file that doesn't allow for vfp instructions.

  Only build the vfp/softfp switching code on armv6 as we don't support vfp
  on anything earlier than this. This should fix the armeb and arm builds
  when using gcc.

  Add an optimised version of the float and double helper functions.
2014-05-17 14:22:37 +00:00
ian
de23cf51fe MFC 263199, 263207
Fix error mesasge in dtc.

  Add tmpfs, mbr, and bsdlabel options back to wandboard kernel config.
2014-05-17 14:03:46 +00:00
ian
3724a25461 MFC 263036, 263059: delete advertising clause in licenses, renumber. 2014-05-17 13:59:11 +00:00
ian
f51629e24e MFC 262952, 262958, 262966, 262979, 262980, 262986, 262987, 262995, 262997,
263030, 263033, 263034, 263056, 263057,

  Remove all the redundant external declarations of exception vectors and
  runtime setting of the pointers that's scattered around various places.

  Remove all traces of support for ARM chips prior to the arm9 series.

  Make the default exception handler vectors point to where I thought they
  were already pointing: the default handlers (not a panic that says there
  is no default handler).

  Eliminate irq_dispatch.S.  Move the data items it contained into
  arm/intr.c and the functionality it provided into arm/exception.S.

  Move the exception vector table (so-called "page0" data) into exception.S
  and eliminate vectors.S.

  Change the way the asm GET_CURTHREAD_PTR() macro is defined so that code
  using it doesn't have to have an "AST_LOCALS" macro somewhere in the file.

  Arrange for arm fork_trampoline() to return to userland via the standard
  swi_exit code in exception.S instead of having its own inline expansion
  of the DO_AST and PULLFRAME macros.

  Now that the PUSHFRAME and PULLFRAME macros are used only in the swi
  entry/exit code, they don't need to be macros.  Except that didn't work
  and the whole change was reverted.

  Remove some unnecessary indirection and jump right to the handler functions.

  Use panic rather than printf to "handle" an arm26 address exception
  (should never happen on arm32).

  Remove the unreferenced DATA() macro.

  Remove #include <machine/asmacros.h> from files that don't need it.
2014-05-17 13:53:38 +00:00
dim
6341a2d92b MFC r266053:
Use the new -d option that was added to tblgen between llvm/clang 3.3
and 3.4 to generate dependency files for the '.inc.h' files generated
from .td files, and .sinclude those dependency files in clang.build.mk.

This will make future incremental builds of lib/clang and usr.bin/clang
work correctly, whenever any of the .td files get modified.

Note that this will not fix any problems with incremental builds from
*before* this revision, since there will not yet be any generated
dependency files.  A quick workaround is to run the following:

  find /usr/obj -type f -name '*.inc.h' | xargs rm

and then a regular incremental buildworld (e.g. with -DNO_CLEAN).
2014-05-17 12:47:11 +00:00
kib
de734013ee MFC r265847:
Fix sem_unlink(3) to properly invalidate the semaphores name cache.

PR:	standards/189353
2014-05-17 11:43:14 +00:00
kib
0bc598bf79 MFC r265845:
Style.
2014-05-17 11:38:26 +00:00
kib
ac64c61f5e MFC r265843:
For the upgrade case in vm_fault_copy_entry(), when the entry does not
need COW and is writeable, do not create a new backing object for the entry.

MFC r265887:
Fix locking.
2014-05-17 11:36:31 +00:00
kib
60f375b2c7 MFC r265825:
When printing the map with the ddb 'show procvm' command, do not dump
page queues for the backing objects.
2014-05-17 11:29:32 +00:00
kib
44661f3f1d MFC r265824:
Print the entry address in addition to the object.
2014-05-17 11:24:29 +00:00
dteske
938242c727 MFC r264841: Update zfsboot to coincide with MFC of r264840
adding GEOM support.
2014-05-17 03:59:01 +00:00
dteske
5dd59bc6ac MFC r264840: Implement GEOM based media device classification. 2014-05-17 03:28:43 +00:00
bdrewery
0f7f48b5f9 MFC r265267:
Fix width/alignment of JID column. Make it support up to the maximum 7-wide
  JIDs. On a system using jails for common tasks the JID can quickly increase.
2014-05-17 02:45:59 +00:00
bdrewery
7b44e09267 MFC r265249,r265250,r265251:
- Add -J command/flag to filter by jail name/jid. This will automatically
      display the JID as well (the -j command/flag).
    - Add a hint for 'u' and 'J' command that '+' displays all.
    - Add J command to help.
2014-05-17 02:39:20 +00:00
bdrewery
a0f7dc4feb MFC r265229,r265239:
Add -J to filter by matching jail IDs and names.
2014-05-17 02:32:47 +00:00
ian
a8f1dca86b MFC 257774, 256760, 262916, 262905, 262918, 262919, 262920, 262921, 262924,
262925, 262929, 262932, 262935, 262940, 262941, 262942, 262948, 262949,
    262950

  Strip arm/conf/DEFAULTS down to just items that are mandatory for running
  the architecture.

  Move all the files named foo/common.c to foo/foo_common.c

  Initial cut for DTS on the hl201 board.

  Add commented out dts for sam9260ek as well as early printf support.

  Make clock optional on uart nodes, then back it out ("I don't know what I
  was thinking, but it is lame.")

  Set the baud rate if it isn't 0

  Make at91_soc_id() public.

  Properly round at91 resource on unmapping.

  Move AT91 AIC related stuff to own file.

  Fix another bug in multicast filtering.  i.MX uses 6 bits from MSB in
  LE CRC32 for the hash value, not the lowest 6 bits in BE CRC32.

  Follow r262916 with one more config file that references a renamed common.c

  Remove bogus AT91 define that causes compile errors.  Most of the defines
  for SAM9X are going away soonish anyway (once FDT works), but until
  then...

  Remove all dregs of a per-thread undefined-exception-mode stack.

  Rework the VFP code that handles demand-based save and restore of state.

  Always call vfp_discard() on thread death.

  When a thread begins life it doesn't own the VFP hardware state on any cpu.

  Make undefined exception entry MP-safe.
2014-05-17 00:53:12 +00:00
ian
690d060e37 MFC 258211, 257775, 258096,
Add mbox and pruss drivers to ti build.

  Use common bus_space-v6 instead of local copies.
2014-05-16 23:49:40 +00:00
ian
8c5245706f MFC 262695, 262708, 262709, 262710, 262711, 262728, 262870, 262877, 262880,
262885, 262891, 262903,

  imx6: Add a tunable to set the number of active cores, enable SMP by default.

  ffec: Fix multicast filtering.

  Allwinner a10/a20...
  - Add gpio and clock bits for A10/A20's EMAC ethernet controller driver
    - EMAC gpio configuration
    - EMAC clock activation
  - Add Static Random Access Memory controller driver for A10/A20.
      A10/A20's SRAM is used by devices, such as CPU, EMAC,
      for extra fast memory or as cache.
  - Add EMAC 10/100 Ethernet controller driver for A10/A20.
      It is available mostly in A10 devices like Hackberry, Marsboard,
      Mele A1000, A2000, A100 HTPC, cubieboard1 and A20 device
      like cubieboard2.
      TX performance can be improved using both channels 0 and 1.
      RX performance is poor and needs improvement with the assistance of
      external DMA controller in case there
  - Add EMAC and SRAM controller entries to FDT.
  - Add EMAC device to kernel config files and enable EMAC, SRAM drivers.

  OMAP: When calculating the MPU freq, make sure not to overflow.

  Vybrid:
  - Add driver for Port control and interrupts (PORT).
  - Export panel info to DTS
  - Reset all the layers before setup first one
  - Enable display

  nandfs: Slight code reordering to make error branch last.

  Add option TMPFS to arm/conf/DEFAULTS, remove it from the few configs
  that have it individually.  Concensus on freebsd-arm@ is that it should
  be included in all ARM kernels.

  Fix the arm sys_sigreturn(): its argument is a struct ucontext, not a
  struct sigframe containing the struct ucontext.
2014-05-16 23:27:18 +00:00
ian
3fad78482e MFC 264304: Really only allow IMGACT_BINMISC for amd64/i386 builds. 2014-05-16 22:55:01 +00:00
sbruno
ebb52114cf MFC r264269, r264282, r264280, r264291, r264276, r264314
Merge sson's binmiscctl and image activator features to stable/10

Submitted by:	sson@freebsd.org
2014-05-16 21:56:33 +00:00
hselasky
81a04e5982 MFC r265779:
Fix for NULL pointer.
2014-05-16 16:11:14 +00:00