Commit Graph

6743 Commits

Author SHA1 Message Date
trasz
e8d76f86d2 MFC r270096:
Bring in the new automounter, similar to what's provided in most other
UNIX systems, eg. MacOS X and Solaris.  It uses Sun-compatible map format,
has proper kernel support, and LDAP integration.

There are still a few outstanding problems; they will be fixed shortly.

Reviewed by:	allanjude@, emaste@, kib@, wblock@ (earlier versions)
Phabric:	D523
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2014-08-31 21:18:23 +00:00
gjb
05de13180a - Update stable/10 to 10.1-PRERELEASE now that the
code slush is in effect.  (Forgotten on the 22nd.)
- Set the 10.1 as the .Fx mdoc(7) default.
- Update the TARGET_TRIPLE and BUILD_TRIPLE for clang(1)
  to reflect 10.1.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2014-08-26 15:31:56 +00:00
jfv
c988cfb907 MFC of the Intel Base driver for the Intel XL710 Ethernet Controller Family
- It was decided to change the driver name to if_ixl for FreeBSD
	- This release adds the VF Driver to the tree, it can be built into
	  the kernel or as the if_ixlv module
	- The VF driver is independent for the first time, this will be
	  desireable when full SRIOV capability is added to the OS.

Submitted by:	jack.vogel@intel.com and eric.joyner@intel.com
2014-08-25 22:04:29 +00:00
tuexen
9db28b75f0 MFC r269945:
Add support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUS
socket options. This includes managing the correspoing stat counters.
Add the SCTP_DETAILED_STR_STATS kernel option to control per policy
counters on every stream. The default is off and only an aggregated
counter is available. This is sufficient for the RTCWeb usecase.
2014-08-22 20:26:20 +00:00
np
9e6f3aa5f7 MFC r266571, r266757, r268536, r269076, r269364, r269366, r269411,
r269413, r269428, r269440, r269537, r269644, r269731, and the cxgbe
portion of r270063.

r266571:
cxgbe(4): Remove stray if_up from the code that creates the tracing ifnet.

r266757:
cxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards.
Netmap gets its own hardware-assisted virtual interface and won't take
over or disrupt the "normal" interface in any way.  You can use both
simultaneously.

For kernels with DEV_NETMAP, cxgbe(4) carves out an ncxl<N> interface
(note the 'n' prefix) in the hardware to accompany each cxl<N>
interface.  These two ifnet's per port share the same wire but really
are separate interfaces in the hardware and software.  Each gets its own
L2 MAC addresses (unicast and multicast), MTU, checksum caps, etc.  You
should run netmap on the 'n' interfaces only, that's what they are for.

With this, pkt-gen is able to transmit > 45Mpps out of a single 40G port
of a T580 card.  2 port tx is at ~56Mpps total (28M + 28M) as of now.
Single port receive is at 33Mpps but this is very much a work in
progress.  I expect it to be closer to 40Mpps once done.  In any case
the current effort can already saturate multiple 10G ports of a T5 card
at the smallest legal packet size.  T4 gear is totally untested.

trantor:~# ./pkt-gen -i ncxl0 -f tx -D 00:07:43🆎cd:ef
881.952141 main [1621] interface is ncxl0
881.952250 extract_ip_range [275] range is 10.0.0.1:0 to 10.0.0.1:0
881.952253 extract_ip_range [275] range is 10.1.0.1:0 to 10.1.0.1:0
881.962540 main [1804] mapped 334980KB at 0x801dff000
Sending on netmap:ncxl0: 4 queues, 1 threads and 1 cpus.
10.0.0.1 -> 10.1.0.1 (00:00:00:00:00:00 -> 00:07:43🆎cd:ef)
881.962562 main [1882] Sending 512 packets every  0.000000000 s
881.962563 main [1884] Wait 2 secs for phy reset
884.088516 main [1886] Ready...
884.088535 nm_open [457] overriding ifname ncxl0 ringid 0x0 flags 0x1
884.088607 sender_body [996] start
884.093246 sender_body [1064] drop copy
885.090435 main_thread [1418] 45206353 pps (45289533 pkts in 1001840 usec)
886.091600 main_thread [1418] 45322792 pps (45375593 pkts in 1001165 usec)
887.092435 main_thread [1418] 45313992 pps (45351784 pkts in 1000834 usec)
888.094434 main_thread [1418] 45315765 pps (45406397 pkts in 1002000 usec)
889.095434 main_thread [1418] 45333218 pps (45378551 pkts in 1001000 usec)
890.097434 main_thread [1418] 45315247 pps (45405877 pkts in 1002000 usec)
891.099434 main_thread [1418] 45326515 pps (45417168 pkts in 1002000 usec)
892.101434 main_thread [1418] 45333039 pps (45423705 pkts in 1002000 usec)
893.103434 main_thread [1418] 45324105 pps (45414708 pkts in 1001999 usec)
894.105434 main_thread [1418] 45318042 pps (45408723 pkts in 1002001 usec)
895.106434 main_thread [1418] 45332430 pps (45377762 pkts in 1001000 usec)
896.107434 main_thread [1418] 45338072 pps (45383410 pkts in 1001000 usec)
...

r268536:
cxgbe(4): Add an iSCSI softc to the adapter structure.

r269076:
Some hooks in cxgbe(4) for the offloaded iSCSI driver.

r269364:
Improve compliance with style.Makefile(5).

r269366:
List one file per line in the Makefiles.  This makes it easier to read
diffs when a file is added or removed.

r269411:
cxgbe(4): minor optimizations in ingress queue processing.

Reorganize struct sge_iq.  Make the iq entry size a compile time
constant.  While here, eliminate RX_FL_ESIZE and use EQ_ESIZE directly.

r269413:
cxgbe(4):  Fix an off by one error when looking for the BAR2 doorbell
address of an egress queue.

r269428:
cxgbe(4):  some optimizations in freelist handling.

r269440:
cxgbe(4): Remove an unused version of t4_enable_vi.

r269537:
cxgbe(4): Do not run any sleepable code in the SIOCSIFFLAGS handler when
IFF_PROMISC or IFF_ALLMULTI is being flipped.  bpf(4) holds its global
mutex around ifpromisc in at least the bpf_dtor path.

r269644:
cxgbe(4):  Let caller specify whether it's ok to sleep in
t4_sched_config and t4_sched_params.

r269731:
cxgbe(4): Do not poke T4-only registers on a T5 (and vice versa).

Relnotes:	Yes (native netmap support for Chelsio T4/T5 cards)
2014-08-21 19:54:02 +00:00
ian
b7f4763aaf MFC r260401
Remove aicasm as a build dependency.  It made sense when the ahc and ahd
  drivers and their firmware were under active development, but those days
  have passed.  The firmware now exists in pre-compiled form, no longer
  dependent on it's sources or on aicasm.  If you wish to rebuild the
  firmware from source, the glue still exists under the 'make firmware'
  target in sys/modules/aic7xxx.

  This also fixes the problem introduced with r257777 et al with building
  kernels the old fashioned way in sys/$arch/compile/$CONFIG when the
  ahc/ahd drivers were included.
2014-08-21 17:18:21 +00:00
ian
febf3f5203 MFC r257637, r257730, r257734, r257777, r257825, r257838, r257873:
Changes to how the aicasm tool is built.  This series of changes results
in the aicasm tool being built as part of the tools stages of world and
kernel builds.

Most of these changes will ultimately be undone when r260401 is MFC'd,
but it will leave in place the new kernel-build-tool machinery (KTMAKE
stuff) in case a new special kernel tool ever comes along.
2014-08-21 14:56:57 +00:00
luigi
223d76dc50 MFC 270063: update of netmap code
(vtnet and cxgbe not merged yet because we need some other mfc first)
2014-08-20 23:34:36 +00:00
ian
2cc6abb7fb MFC r269594, r269596, r269597, r269598, r269605, r269606:
Set ofwbus and simplebus to attach during BUS_PASS_BUS.

  Define names that drivers can use to adjust their position relative to
  other drivers within a BUS_PASS

  Adjust ofwbus and simplebus to attach at BUS_PASS_ORDER_MIDDLE, so that
  a platform can attach some other bus first if necessary.

  Set the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU.

  Attach arm generic interrupt and timer drivers in the middle of
  BUS_PASS_INTERRUPT and BUS_PASS_TIMER, respectively.

  Add an arm option, ARM_DEVICE_MULTIPASS, used to opt-in to multi-pass
  device attachment on arm platforms.  If this is defined, nexus attaches
  early in BUS_PASS_BUS, and other busses and devices attach later, in the
  pass number they are set up for.  Without it defined, nexus attaches in
  BUS_PASS_DEFAULT and thus so does everything else, which is status quo.
2014-08-17 01:28:03 +00:00
hselasky
0f8aee9425 MFC r269567:
Add new USB phone descriptor template for USB device side mode.
2014-08-13 08:21:52 +00:00
rmacklem
50867d802b MFC: r268115
Merge the NFSv4.1 server code in projects/nfsv4.1-server over
into head. The code is not believed to have any effect
on the semantics of non-NFSv4.1 server behaviour.
It is a rather large merge, but I am hoping that there will
not be any regressions for the NFS server.
2014-08-01 21:10:41 +00:00
mav
dd34ac0859 MFC r268767:
Add support for VMWare dialect of EXTENDED COPY command, aka VAAI Clone.

This allows to clone VMs and move them between LUNs inside one storage
host without generating extra network traffic to the initiator and back,
and without being limited by network bandwidth.

LUNs participating in copy operation should have UNIQUE NAA or EUI IDs set.
For LUNs without these IDs VMWare will use traditional copy operations.

Beware: the above LUN IDs explicitly set to values non-unique from the VM
cluster point of view may cause data corruption if wrong LUN is addressed!

Sponsored by:	iXsystems, Inc.
2014-07-30 07:18:32 +00:00
jhb
cf1a222326 MFC 260847,264055,264867:
- Add a very simple virtio_random(4) driver for FreeBSD guests to harvest
  entropy from hypervisors.
- Add support to bhyve for the virtio RNG entropy-source device to provide
  entry to bhyve guests.
2014-07-21 00:21:56 +00:00
dim
7c6dab81e9 MFC r268774:
After r261991, clang warnings about unused functions in the kernel were
completely silenced.  Make sure these warnings appear again, so there is
some incentive to fix them, but do not error out the whole kernel build
for them.

Noticed by:	steven@pyro.eu.org
PR:		191867
2014-07-19 18:33:09 +00:00
imp
07bb5d08f3 MFC r263749,267146:
>r267146 | imp | 2014-06-05 22:08:55 -0600 (Thu, 05 Jun 2014) | 4 lines
>Restore comments accidentally removed.

>r263749 | imp | 2014-03-25 16:08:31 -0600 (Tue, 25 Mar 2014) | 18 lines
>Rather than require a makeoptions DEBUG to get debug correct,
>add it in kern.mk, but only if we're using clang. While this
>option is supported by both clang and gcc, in the future there
>may be changes to clang which change the defaults that require
>a tweak to build our kernel such that other tools in our tree
>will work. Set a good example by forcing -gdwarf-2 only for
>clang builds, and only if the user hasn't specified another
>dwarf level already. Update UPDATING to reflect the changed
>state of affairs. This also keeps us from having to update
>all the ARM kernels to add this, and also keeps us from
>in the future having to update all the MIPS kernels and is
>one less place the user will have to know to do something
>special for clang and one less thing developers will need
>to do when moving an architecture to clang.
2014-07-17 22:31:46 +00:00
delphij
9d1dc5bcc9 MFC r268075: MFV r267565:
4757 ZFS embedded-data block pointers ("zero block compression")
4913 zfs release should not be subject to space checks
2014-07-15 04:53:34 +00:00
emaste
7726cf3ff3 MFC r268059: Add missing VT_ kernel config knobs 2014-07-08 09:47:52 +00:00
ray
b0f591b2a3 MFC of r263873.
Pointed by:     Ivan Klymenko <fidaj@ukr.net>

Sponsored by:	The FreeBSD Foundation
2014-07-07 19:31:02 +00:00
ray
74b8e10dc8 267622 Log:
Rename vt(4) vga module to dismiss interference with syscons(4) vga module.
267623 Log:
  Remove stale link to deleted vt(4) xboxfb driver.
267624 Log:
  syscons(4) and vt(4) can be built together now.
267625 Log:
  Allow to disable syscons(4) if "hw.syscons.disable" kenv is set.
267626 Log:
  Suspend vt(4) initialization if "kern.vt.disable" kenv is set.
267965 by emaste@ Log:
  Use a common tunable to choose between vt(4)/sc(4)
  With this change and previous work from ray@ it will be possible to put
  both in GENERIC, and have one enabled by default, but allow the other to
  be selected via the loader.
  (The previous implementation had separate kern.vt.disable and
  hw.syscons.disable tunables, and would panic if both drivers were
  compiled in and neither was explicitly disabled.)
268175 by emaste@ Log:
  Fix vt(4) detection in kbdcontrol and vidcontrol
  As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence
  of a vt(4) sysctl is not sufficient to determine that vt(4) is in use.
  Reported by:  Trond Endrestøl
268045 by emaste@ Log:
  Add vt(4) to GENERIC and retire the separate VT config
  vt(4) and sc(4) can now coexist in the same kernel.  To choose the vt
  driver, set the loader tunable kern.vty=vt .

Sponsored by:	The FreeBSD Foundation
2014-07-07 14:16:05 +00:00
marcel
67e9cbff48 MFC r263323: Fix and improve exception tracing. 2014-07-02 23:47:43 +00:00
ae
b6530ab0a7 MFC r267355:
Add UUIDs for DragonFlyBSD's partition types.

MFC r267356:
  Add DragonFlyBSD's Hammer FS types and type names.

MFC r267357:
  Add aliases for DragonFlyBSD's partition types.

MFC r267358:
  Allow dumping to DragonFlyBSD's swap partition.

MFC r267359:
  Add disklabel64 support to GEOM_PART class.

  This partitioning scheme is used in DragonFlyBSD. It is similar to
  BSD disklabel, but has the following improvements:
  * metadata has own dedicated place and isn't accessible through partitions;
  * all offsets are 64-bit;
  * supports 16 partitions by default (has reserved place for more);
  * has reserved place for backup label (but not yet implemented);
  * has UUIDs for partitions and partition types;

MFC r267360:
  Add disklabel64 support

Relnotes:	yes
2014-07-01 13:29:17 +00:00
marius
618ac05759 MFC: r267978
In order to get vt(4) a bit closer to the feature set provided by sc(4),
implement options TERMINAL_{KERN,NORM}_ATTR. These are aliased to
SC_{KERNEL_CONS,NORM}_ATTR and like these latter, allow to change the
default colors of normal and kernel text respectively.
Note on the naming: Although affecting the output of vt(4), technically
kern/subr_terminal.c is primarily concerned with changing default colors
so it would be inconsistent to term these options VT_{KERN,NORM}_ATTR.
Actually, if the architecture and abstraction of terminal+teken+vt would
be perfect, dev/vt/* wouldn't be touched by this commit at all.

Reviewed by:	emaste
Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-06-30 09:59:23 +00:00
np
810c9620cc MFC r267757:
cxgbe(4): Update the bundled T4 and T5 firmwares to versions 1.11.27.0

Obtained from:	Chelsio
2014-06-25 02:14:55 +00:00
tuexen
6b3b15bb3a MFC r267329:
Add support for the SCTP_LOCAL_TRACE_BUF options.
While there, fix some whitespaces.
2014-06-22 16:58:29 +00:00
kib
249e790152 MFC r267226:
Initialize the pbuf counter for directio using SYSINIT.
Mark ffs_rawread.c as requiring both ffs and directio options to be
compiled into the kernel.  Add ffs_rawread.c to the list of ufs.ko
module' sources.
2014-06-15 05:15:38 +00:00
lwhsu
818690b07d MFC r266335:
Add axge(4) to LINT

Approved by:	kevlo
2014-06-04 03:03:34 +00:00
hselasky
2975fdd0c2 MFC r257543, r264912, r264972, r264982 and r266472:
- Add preliminary support for the Realtek RTL8188EUS and RTL8188ETV chipsets.
- Add device ID for 'Sanoxy 802.11N' USB
- Initialize rssi variable.
- Fix gcc build, initialize off variable.
- The DELAY() should not be used in USB drivers.
- The usb_pause_mtx() function takes ticks and not milliseconds as last argument.
2014-05-23 06:47:47 +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
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
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
ian
6c4033c89f MFC 262614, 262625, 262626, 262627, 262682, 262714, 262725, 262736
Integrate device-tree upstream files into the build process:
  (1) Invoke cpp to bring in files via #include (although the old
      /include/ stuff is supported still).
  (2) bring in files from either vendor tree or freebsd-custom files
      when building.
  (3) move all dts* files from sys/boot/fdt/dts to
      sys/boot/fdt/dts/${MACHINE} as appropriate.
  (4) encode all the magic to do the build in sys/tools/fdt/make_dtb.sh
      so that the different places in the tree use the exact same logic.
  (5) switch back to gpl dtc by default. the bsdl one in the tree has
      significant issues not easily addressed by those unfamiliar with
      the code.

  Only try to build the static dtb when we're building a static dtb.

  Use proper include path for dtc as well as cpp.

  Fix syntax errors (missing ; other minor glitches) in existing dts files.
2014-05-16 15:56:34 +00:00
ian
1cfdd47296 MFC r261643, r261646, r261648, r261649, r261651, r261656, r261657, r261663,
r261676, r261677, r261698, r261778

  Consolidate code related to setting up physical memory configuration into
  a new physmem.c file.

  Replace compile-time constant KERNPHYSADDR with abp_physaddr

  Calculate the kernel's load address from the PC in the elf / gzip
  trampoline instead of relying on KERNPHYSADDR as a compile-time constant.

  It turns out a global variable is the only straightforward way to
  communicate the kernel's physical load address from where it's known in
  initarm() into cpu_mp_start() which is called from non-arm code and
  takes no parameters.

  Remove the now unused MMU_INIT macro.

  Use vm_paddr_t, not vm_offset_t, when dealing with physical addresses.

  No need to set physmem in each initarm() instance anymore, it's handled
  in common code now.

  Pass the pagetable used from locore.S to initarm to allow it to map data
  in as required.

  Fix the physmem exclude-region clipping logic for the edge-trim case.

  Add some extra debugging output when DEBUG is defined.

  Update legacy platforms to use new arm_physmem helper routines.
2014-05-15 20:58:23 +00:00
ian
24fc8c91c2 MFC r257549, r261642
Don't create a distinct free page pool for segregating allocations that are
accessed through the direct map unless the kernel configuration actually
includes a direct map.  Only a few configurations do, and for the rest the
unnecessary free page pool is a small pessimization.

Remove the ARM_USE_SMALL_ALLOC option and code related to it.
2014-05-15 19:09:31 +00:00
ian
1e3130abad MFC r261423, r261424, r261516, r261513, r261562, r261563, r261564, r261565,
r261596, r261606

  Add the imx sdhci controller.

  Move Open Firmware device root on PowerPC, ARM, and MIPS systems to
  a sub-node of nexus (ofwbus) rather than direct attach under nexus. This
  fixes FDT on x86 and will make coexistence with ACPI on ARM systems easier.
  SPARC is unchanged.

  Add the missing ')' at end of sentence.  Reword it to use a more common idiom.

  Pass the kernel physical address to initarm through the boot param struct.

  Make functions only used in vfp.c static, and remove vfp_enable.

  Fix __syscall on armeb EABI. As it returns a 64-bit value it needs to
  place 32-bit data in r1, not r0. 64-bit data is already packed correctly.

  Use abp_physaddr for the physical address over KERNPHYSADDR. This helps us
  remove the need to load the kernel at a fixed address.

  Remove references to PHYSADDR where it's used only in debugging output.

  Dynamically generate the page table. This will allow us to detect the
  physical address we are loaded at to change the mapping.
2014-05-15 17:30:16 +00:00
ian
27f0a13f0a MFC r261351, r261352, r261355, r261396, r261397, r261398, r261403, r261404,
r261405

  Open Firmware interrupt specifiers can consist of arbitrary-length byte
  strings and include arbitrary information (IRQ line/domain/sense). When the
  ofw_bus_map_intr() API was introduced, it assumed that, as on most systems,
  these were either 1 cell, containing an interrupt line, or 2, containing
  a line number plus a sense code. It turns out a non-negligible number of
  ARM systems use 3 (or even 4!) cells for interrupts, so make this more
  general.

  Provide a simpler and more standards-compliant simplebus implementation to
  get the Routerboard 800 up and running with the vendor device tree. This
  does not implement some BERI-specific features (which hopefully won't be
  necessary soon), so move the old code to mips/beri, with a higher attach
  priority when built, until MIPS interrupt domain support is rearranged.

  Allow nesting of simplebuses.

  Add a set of helpers (ofw_bus_get_status() and ofw_bus_status_okay()) to
  process "status" properties of OF nodes.

  Fix one remnant endian flaw in nexus.
2014-05-15 14:26:11 +00:00
ian
25ba02d795 MFC r261252, r261279, r261304, r261305, r261322, r261336, r261337, r261338,
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.
2014-05-15 02:41:23 +00:00
loos
5a10856167 MFC r258046, r258047, r258050, r259035, r259036, r259037, r261842, r261843,
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.
2014-05-15 01:27:53 +00:00
ian
393ed120ae MFC r261038, r261039, r261040, r261041
Implement generic support for early printf.
2014-05-14 22:52:16 +00:00
ian
057c745287 MFC r257738, r259202, r258410, r260288, r260292, r260294, r260320, r260323,
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.
2014-05-14 19:18:58 +00:00
ian
0fce07b314 MFC r260092, r260093, r260121, r260180,
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.
2014-05-14 18:16:32 +00:00
ian
3c96028205 MFC r258359, r258742, r258845, r259936, r259640
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.
2014-05-14 17:40:18 +00:00
ian
13afdc288f MFC r257170, r257171, r257172, r257240, r257278, r257279, r257280, r257281,
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
2014-05-14 16:32:27 +00:00
ian
4a602a8957 MFC r258259, r258798, r259010
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.
2014-05-14 04:57:55 +00:00
ian
9277bb1a2b MFC r258247, r258250, r258257
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.
2014-05-14 04:42:38 +00:00
ian
d168d59495 MFC r257995, r258244, r258246,
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.
2014-05-14 04:14:58 +00:00
ian
f7cf17218e MFC r258002, r258024, r258027, r258051, r258052, r258243, r258244, r258002,
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.
2014-05-14 03:09:37 +00:00
ian
14106897a1 MFC r257702, r257745, r257746, r257747, r257751, r257791, r257793,
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.
2014-05-14 01:53:20 +00:00
ian
7efcec8976 MFC r257115, r257116, r257117
Remove dead and duplicated code.
2014-05-13 18:24:02 +00:00
ian
df87ef4409 MFC r257114, r257118
Use common OFW root code to set up fdtbus. This is an almost purely
  negative diff that should improve reliability somewhat. There should be
  no differences in behavior -- please report any that crop up. This has been
  tested on ARM and PPC systems.

  Make sure to get the right node when looking up #interrupt-cells.
2014-05-13 18:14:31 +00:00