Commit Graph

3777 Commits

Author SHA1 Message Date
Ian Lepore
a0fd233964 Add a SPI driver for imx5 and imx6.
It can be compiled into the kernel with "device imx_spi" or loaded as a
module, which is also named "imx_spi".
2018-02-26 02:28:32 +00:00
Ian Lepore
f0a2d31ab1 Instead of building ofw_iicbus as a separate module, just compile it in to
the iicbus module for FDT-based systems.

The primary motivation for this is that host controller drivers which
declare DRIVER_MODULE(ofw_iicbus, thisdriver, etc, etc) now only need a
single MODULE_DEPEND(thisdriver, ofw_iicbus) for runtime linking to resolve
all the symbols.  With ofw_iicbus and iicbus in separate modules, drivers
would need to declare a MODULE_DEPEND() on both, because symbol lookup is
non-recursive through the dependency chain.  Requiring a driver to have
MODULE_DEPENDS() on both amounts to requiring the drivers to understand the
kobj inheritence details of how ofw_iicbus is implemented, which seems like
something they shouldn't have to know (and could even change some day).

Also, this is somewhat analogous to how the drivers get built when compiled
into the kernel.  You don't have to ask for ofw_iicbus separately, it just
gets built in along with iicbus when option FDT is in effect.
2018-02-25 18:26:50 +00:00
Ravi Pokala
dcd935dfd1 jedec_dimm(4): report asset info and temperatures for DDR3 and DDR4 DIMMs
A super-set of the functionality of jedec_ts(4). jedec_dimm(4) reports asset
information (Part Number, Serial Number) encoded in the "Serial Presence
Detect" (SPD) data on JEDEC DDR3 and DDR4 DIMMs. It also calculates and
reports the memory capacity of the DIMM, in megabytes. If the DIMM includes
a "Thermal Sensor On DIMM" (TSOD), the temperature is also reported.

Reviewed by:	cem
MFC after:	1 week
Relnotes:	yes
Sponsored by:	Panasas
Differential Revision:	https://reviews.freebsd.org/D14392
Discussed with:	avg, cem
Tested by:	avg, cem (previous version, no semantic changes)
2018-02-22 23:18:46 +00:00
Ian Lepore
363b2c7fd2 Add a missing line continuation.
How many commits does it take to get a simple module makefile working?
Apparently at least three.

Pointy hat to:  ian
2018-02-22 22:25:26 +00:00
Oleksandr Tymoshenko
94b8a54ae6 [chvgpio] add GPIO driver for Intel Z8xxx SoC family
Add chvgpio(4) driver for Intel Z8xxx SoC family. This product
was formerly known as Cherry Trail but Linux and OpenBSD drivers
refer to it as Cherry View. This driver is derived from OpenBSD
one so the name is kept for alignment with another BSD system.

Submitted by:	Tom Jones <tj@enoti.me>
Reviewed by:	gonzo, wblock(man page)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D13086
2018-02-22 19:12:32 +00:00
Ian Lepore
94d7be6551 Add required header files.
Reported by:	andreast@
2018-02-21 16:36:44 +00:00
Ian Lepore
3982006ed5 Remove some files that snuck in via cut and paste.
Having these compiled into the module causes the kobj method descriptors
to be resolved incorrectly (by the compile-time linker instead of the
kernel linker), which then leads to hours of frustrating debugging.
2018-02-21 16:34:04 +00:00
Ian Lepore
eb69d1f144 Build at45d and mx25l SPI flash drivers as modules. 2018-02-19 01:49:19 +00:00
Ian Lepore
63cdf4affb Add ofw_bus_if.h to SRCS. 2018-02-19 01:39:02 +00:00
Ian Lepore
2aa5d9c4c8 Add modules/spi as a gathering point for SPI-related modules, analagous to
modules/i2c for i2c/iicbus modules.  Build spibus as a module.
2018-02-19 01:32:27 +00:00
Ian Lepore
a7e31772e7 Build ofw_iicbus as a module if OPT_FDT is defined. 2018-02-19 00:47:03 +00:00
Ian Lepore
adddeaadc4 Add iic_recover_bus.c, now part of iicbus. This should have been added
as part of r320463.
2018-02-18 22:57:04 +00:00
Ian Lepore
c99321621c Arrange SRCS= as 1 file per line, alphabetical, so it's easier to maintain.
Whitespace only, no functional changes.
2018-02-18 22:54:19 +00:00
Ian Lepore
f82eace5b3 Build modules specific to imx5/imx6 only when building those kernels.
This adds sys/modules/imx with a SUBDIR makefile to make the whole
collection of modules that are specific to these SoCs.  Initially, that
"whole collection" consists of the if_ffec and imx_i2c drivers.

The if_ffec driver is referenced in its existing home in ../ffec rather
than moving it into the imx directory, because it's used by powerpc too,
but it is no longer built for all armv6/7 systems.

The imx_i2c driver is newly added as a module.
2018-02-18 02:48:54 +00:00
Hans Petter Selasky
33ec1ccbae Import the mthca kernel side infiniband driver from Linux 4.9 and fix
compilation under FreeBSD. The mthca driver was temporarily removed as
part of the Linux 4.9 RoCE/infinband upgrade.

Top commit in Linux source tree:
69973b830859bc6529a7a0468ba0d80ee5117826

Sponsored by:	Mellanox Technologies
2018-02-13 17:04:34 +00:00
Landon J. Fuller
e8a81142ab bwn(4): Fix outstanding bug in PHY-G tssi2dbm table generation caught by
-Wconstant-conversion, and remove now unnecessary warning suppression
flags.
2018-02-12 22:21:11 +00:00
Andrey V. Elsukov
b99a682320 Rework ipfw dynamic states implementation to be lockless on fast path.
o added struct ipfw_dyn_info that keeps all needed for ipfw_chk and
  for dynamic states implementation information;
o added DYN_LOOKUP_NEEDED() macro that can be used to determine the
  need of new lookup of dynamic states;
o ipfw_dyn_rule now becomes obsolete. Currently it used to pass
  information from kernel to userland only.
o IPv4 and IPv6 states now described by different structures
  dyn_ipv4_state and dyn_ipv6_state;
o IPv6 scope zones support is added;
o ipfw(4) now depends from Concurrency Kit;
o states are linked with "entry" field using CK_SLIST. This allows
  lockless lookup and protected by mutex modifications.
o the "expired" SLIST field is used for states expiring.
o struct dyn_data is used to keep generic information for both IPv4
  and IPv6;
o struct dyn_parent is used to keep O_LIMIT_PARENT information;
o IPv4 and IPv6 states are stored in different hash tables;
o O_LIMIT_PARENT states now are kept separately from O_LIMIT and
  O_KEEP_STATE states;
o per-cpu dyn_hp pointers are used to implement hazard pointers and they
  prevent freeing states that are locklessly used by lookup threads;
o mutexes to protect modification of lists in hash tables now kept in
  separate arrays. 65535 limit to maximum number of hash buckets now
  removed.
o Separate lookup and install functions added for IPv4 and IPv6 states
  and for parent states.
o By default now is used Jenkinks hash function.

Obtained from:	Yandex LLC
MFC after:	42 days
Sponsored by:	Yandex LLC
Differential Revision:	https://reviews.freebsd.org/D12685
2018-02-07 18:59:54 +00:00
Kyle Evans
a123333f3a dtb/allwinner: Add sun7i-a20-lamobo-r1.dts (Banana Pi R1)
FreeBSD boots on this board, but the ethernet switch is not currently
supported, resulting in no ethernet.

A U-Boot port will be added once the ethernet switch is at least basically
supported, but we add its DTS to the build here to lower the barrier-to-boot
while work is underway.
2018-02-06 14:57:03 +00:00
Landon J. Fuller
d177c19903 bwn(4): migrate bwn(4) to the native bhnd(9) interface, and drop siba_bwn.
- Remove the shim interface that allowed bwn(4) to use either siba_bwn or
  bhnd(4), replacing all siba_bwn calls with their bhnd(4) bus equivalents.
- Drop the legay, now-unused siba_bwn bus driver.
- Clean up bhnd(4) board flag defines referenced by bwn(4).

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13518
2018-02-05 23:38:15 +00:00
Ed Maste
85059bc4ad Move assym.s to DPSRCS in linux modules
assym.s exists only to be included by other .s files, and should not
actually be assembled by itself.

Sponsored by:	Turing Robotic Industries Inc.
2018-02-05 14:53:18 +00:00
Ed Maste
48bc159f28 Correct MD patch in linux64 module Makefile
Reviewed by:	imp
Sponsored by:	Turing Robotic Industries Inc.
Differential Revision:	https://reviews.freebsd.org/D14061
2018-01-29 01:59:04 +00:00
Li-Wen Hsu
78b42ee37c Fix LINT build.
Approved by:	delphij
2018-01-26 06:21:24 +00:00
Warner Losh
d85487b732 Add new opt_da.h for stand-alone build.
Sponsored by: Netflix
2018-01-25 21:48:07 +00:00
Emmanuel Vadot
09ac343759 arm: lpc: Remove support
Code hasn't been touch this it's original commit in 2012 beside api changes.

Reviewed by:	ian
Differential Revision:	https://reviews.freebsd.org/D13625
Discussed with:		freebsd-arm@freebsd.org (no reply)
2018-01-24 22:04:16 +00:00
Poul-Henning Kamp
67e8bb2f5e Forgot to add the skeleton BCM283x Clock Manager
Reminded by:	lwhsu
2018-01-22 08:33:59 +00:00
Poul-Henning Kamp
fc62b7e5de Add a skeleton Clock Manager for RPi2/3, and use that from pwm
instead of frobbing the registers directly.

As a hack the bcm2835_pwm kmod presently ignores the 'status="disabled"'
in the RPI3 DTB, assuming that if you load the kld you probably
want the PWM to work.
2018-01-22 07:10:30 +00:00
Poul-Henning Kamp
137a344c63 Rename rpi_pwm to bcm283x_pwm, and build it on armv[67] and arm64.
Truncate ratio if period is lowered.

Tested on Rpi2 and Rpi3.

Rpi3 requires DTB->DTS->edit->DTB hack
2018-01-21 21:27:41 +00:00
Conrad Meyer
d3f8974a32 Unbreak i386 build
The logical result of a right shift >= the width of a type is zero, but our
compiler decides this is a warning (and thus, error).  Just remove ccp(4)
from i386.

Reported by:	cy
Sponsored by:	Dell EMC Isilon
2018-01-19 04:34:06 +00:00
Conrad Meyer
844d9543dc Add ccp(4): experimental driver for AMD Crypto Co-Processor
* Registers TRNG source for random(4)
* Finds available queues, LSBs; allocates static objects
* Allocates a shared MSI-X for all queues.  The hardware does not have
  separate interrupts per queue.  Working interrupt mode driver.
* Computes SHA hashes, HMAC.  Passes cryptotest.py, cryptocheck tests.
* Does AES-CBC, CTR mode, and XTS.  cryptotest.py and cryptocheck pass.
* Support for "authenc" (AES + HMAC).  (SHA1 seems to result in
  "unaligned" cleartext inputs from cryptocheck -- which the engine
  cannot handle.  SHA2 seems to work fine.)
* GCM passes for block-multiple AAD, input lengths

Largely based on ccr(4), part of cxgbe(4).

Rough performance averages on AMD Ryzen 1950X (4kB buffer):
aesni:      SHA1: ~8300 Mb/s    SHA256: ~8000 Mb/s
ccp:               ~630 Mb/s    SHA256:  ~660 Mb/s  SHA512:  ~700 Mb/s
cryptosoft:       ~1800 Mb/s    SHA256: ~1800 Mb/s  SHA512: ~2700 Mb/s

As you can see, performance is poor in comparison to aesni(4) and even
cryptosoft (due to high setup cost).  At a larger buffer size (128kB),
throughput is a little better (but still worse than aesni(4)):

aesni:      SHA1:~10400 Mb/s    SHA256: ~9950 Mb/s
ccp:              ~2200 Mb/s    SHA256: ~2600 Mb/s  SHA512: ~3800 Mb/s
cryptosoft:       ~1750 Mb/s    SHA256: ~1800 Mb/s  SHA512: ~2700 Mb/s

AES performance has a similar story:

aesni:      4kB: ~11250 Mb/s    128kB: ~11250 Mb/s
ccp:               ~350 Mb/s    128kB:  ~4600 Mb/s
cryptosoft:       ~1750 Mb/s    128kB:  ~1700 Mb/s

This driver is EXPERIMENTAL.  You should verify cryptographic results on
typical and corner case inputs from your application against a known- good
implementation.

Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12723
2018-01-18 22:01:30 +00:00
Poul-Henning Kamp
9eec64c0aa Add a rudimentary PWM driver for the RaspberryPi.
Control is through sysctl, only GPIO12 supported.

bootverbose creates sysctls for direct mangling of relevant registers.

Only tested on RPI2
2018-01-14 20:36:21 +00:00
Li-Wen Hsu
4f23702a7a - Fix make in sys/modules
Reviewed by:	gonzo, landonf, br
Differential Revision:	https://reviews.freebsd.org/D13856
2018-01-12 12:14:14 +00:00
Michael Tuexen
05f08f2978 Build systrace_freebsd32 on arm64.
Since r326501 which added COMPAT_FREEBSD32 to the GENERIC config for arm64,
we need to build systrace_freebsd32, since dtraceall depends on it.

Reviewed by:		ed, gnn
Differential Revision:	https://reviews.freebsd.org/D13670
2018-01-11 21:17:05 +00:00
Justin Hibbits
f1a48eaf0d Add missing file to gpiobus module
ofw_gpiobus.c is needed when FDT is used.

MFC after:	2 weeks
2018-01-07 20:28:17 +00:00
Konstantin Belousov
abbfe9e5d1 Move i386/isa/elink.[hc] to dev/ep.
The ep(4) driver is the only consumer of the two functions from
elink.c.  I removed the standalone module as well, and most likely,
the module metadata is not needed anywhere, but this is for later
cleanup.

Discussed with:	imp, jhb
Sponsored by:	The FreeBSD Foundation
2017-12-30 11:42:49 +00:00
Eric Joyner
c19c7afee3 ixgbe(4): Convert driver to use iflib
Initial update to the ixgbe PF and VF drivers to support the iflib interface.

The PF driver version is bumped to 4.0.0, and the VF driver version is bumped to 2.0.0.

Special thanks to sbruno@ for the support in helping make this conversion happen.

Submitted by:	Jeb Cramer <cramerj@intel.com>, Krzysztof Galazka (Chris) <krzysztof.galazka@intel.com>, Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Reviewed by:	sbruno@, shurd@, #IntelNetworking
Tested by:	Jeffrey Pieper <jeffrey.e.pieper@intel.com>, Sergey Kozlov <kozlov.sergey.404@gmail.com>
Sponsored by:	Limelight Networks, Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D11727
2017-12-20 18:15:06 +00:00
Kyle Evans
35fbacb461 dtb/allwinner: Restore a83t/BananaPi-M3 DTS after r342822
sinovoip-bpi-m3.dts was disconnected from the build in r324822. Since then,
a CCU driver has been added and several other changes have been made to
make us compatible with upstream DTS for this board.

Add links for older DTB that might be used: our u-boot port was expecting
sinovoip-bpi-m3.dtb up until ports r455629, and our u-boot will not be
switching to the upstream name (sun8i-a83t-bananapi-m3) quite yet.

Discussed with:	manu
2017-12-05 22:05:10 +00:00
Bryan Drewery
488adf43d4 Fix cyclic dependency after r326552.
The OBJS_DEPEND_GUESS mechanism was making vmx_genassym.o depend
on all headers along with vmx_assym.h, though vmx_assym.h depends
on having vmx_genassym.o present to generate.  Moving the headers
to DPSRCS is enough to resolve the issue as they will no longer
be implicit dependencies for all objects.  Because of this we
need explicit OBJS_DEPEND_GUESS entries to ensure the headers
are generated when needed for the *_support.o files that need
them.

X-MFC-With:	r326552
MFC after:	2 weeks
Sponsored by:	Dell EMC
2017-12-05 17:23:33 +00:00
Landon J. Fuller
8d14ca9c99 Introduce bwn(4) support for the bhnd(4) bus.
Currently, bwn(4) relies on the siba_bwn(4) bus driver to provide support
for the on-chip SSB interconnect found in Broadcom's older PCI(e) Wi-Fi
adapters. Non-PCI Wi-Fi adapters, as well as the newer BCMA interconnect
found in post-2009 Broadcom Wi-Fi hardware, are not supported by
siba_bwn(4).

The bhnd(4) bus driver (also used by the FreeBSD/MIPS Broadcom port)
provides a unified kernel interface to a superset of the hardware supported
by siba_bwn; by attaching bwn(4) via bhnd(4), we can support both modern
PCI(e) Wi-Fi devices based on the BCMA backplane interconnect, as well as
Broadcom MIPS WiSoCs that include a D11 MAC core directly attached to their
SSB or BCMA backplane.

This diff introduces opt-in bwn(4) support for bhnd(4) by providing:

 - A small bwn(4) driver subclass, if_bwn_bhnd, that attaches via
   bhnd(4) instead of siba_bwn(4).
 - A bhndb(4)-based PCI host bridge driver, if_bwn_pci, that optionally
   probes at a higher priority than the siba_bwn(4) PCI driver.
 - A set of compatibility shims that perform translation of bwn(4)'s
   siba_bwn function calls into their bhnd(9) API equivalents when bwn(4)
   is attached via a bhnd(4) bus parent. When bwn(4) is attached via
   siba_bwn(4), all siba_bwn function calls are simply passed through to
   their original implementations.

To test bwn(4) with bhnd(4), place the following lines in loader.conf(5):

  hw.bwn_pci.preferred="1"

  if_bwn_pci_load="YES
  bwn_v4_ucode_load="YES"
  bwn_v4_lp_ucode_load="YES"

To verify that bwn(4) is using bhnd(4), you can check dmesg:

  bwn0: <Broadcom 802.11 MAC/PHY/Radio, rev 15> ... on bhnd0

... or devinfo(8):

pcib2
  pci2
    bwn_pci0
      bhndb0
        bhnd0
          bwn0
          ...

bwn(4)/bhnd(4) has been tested for regressions with most chipsets currently
supported by bwn(4), including:

  - BCM4312
  - BCM4318
  - BCM4321

With minimal changes to the DMA code (not included in this commit), I was
also able to test support for newer BCMA devices by bringing up basic
working Wi-Fi on two previously unsupported, BCMA-based N-PHY chipsets:

  - BCM43224
  - BCM43225

Approved by:	adrian (mentor, implicit)
Sponsored by:	The FreeBSD Foundation & Plausible Labs
Differential Revision:	https://reviews.freebsd.org/D13041
2017-12-02 02:21:27 +00:00
Ed Schouten
aea6d042a9 Port cloudabi32.ko to FreeBSD/arm64.
This change adds an implementation of a sysent for running CloudABI
armv6 and armv7 binaries on FreeBSD/arm64. It is a somewhat literal copy
of the armv6 version, except that it's been patched up to use the proper
registers.

Just like for cloudabi32.ko on FreeBSD/amd64, we make use of a vDSO that
automatically pads system call parameters to 64-bit value. These are
stored in a buffer on the stack, meaning we need to use copyin() and
copyout() unconditionally.
2017-11-30 17:58:48 +00:00
Scott Long
c15269ccb8 It's time to retire AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT from
the standard kernels.  They are still available as custom compile
options.
2017-11-29 23:41:49 +00:00
Landon J. Fuller
802cb4229e siba(4): Add support for devices have neither PMU nor PWRCTL support.
Very early BHND Wi-Fi devices (e.g. BCM4318) do not support any form of
dynamic clock control; on these devices, any PMU requests that cannot be
met by the device's fixed clock state will return an appropriate error
code.

Approved by:	adrian (mentor, implicit)
Sponsored by:	The FreeBSD Foundation
2017-11-28 00:42:44 +00:00
Pedro F. Giffuni
fe267a5590 sys: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:23:17 +00:00
Mark Johnston
8bb47d1432 Don't redefine _KERNEL.
MFC after:	1 week
2017-11-24 19:08:54 +00:00
Landon J. Fuller
f8e61edaa1 bhnd(4): Add missing dependency on ofw_bus_if.h
Reported by:	wma
Approved by:	adrian (mentor, implicit)
2017-11-24 19:01:14 +00:00
Hans Petter Selasky
87181516ef RoCE/infiniband upgrade to Linux v4.9 for kernel and userspace.
This commit merges projects/bsd_rdma_4_9 to head.

List of kernel sources used:
============================

1) kernel sources were cloned from git://github.com/torvalds/linux.git
Top commit 69973b830859bc6529a7a0468ba0d80ee5117826 - tag: v4.9, linux-4.9

2) krping was cloned from https://github.com/larrystevenwise/krping
Top commit 292a2f1abf0348285e678a82264740d52e4dcfe4

List of userspace sources used:
===============================

1) rdma-core was cloned from https://github.com/linux-rdma/rdma-core.git
Top commit d65138ef93af30b3ea249f3a84aa6a24ba7f8a75

2) OpenSM was cloned from git://git.openfabrics.org/~halr/opensm.git
Top commit 85f841cf209f791c89a075048a907020e924528d

3) libibmad was cloned from git://git.openfabrics.org/~iraweiny/libibmad.git
Tag 1.3.13 with some additional patches from Mellanox.

4) infiniband-diags was cloned from git://git.openfabrics.org/~iraweiny/infiniband-diags.git
Tag 1.6.7 with some additional patches from Mellanox.

NOTES:
======

1) The mthca driver has been removed in kernel and in userspace.
2) All GPLv2 only sources have been removed and where applicable
   rewritten from scratch under a BSD license.
3) List of fully supported drivers in userspace and kernel:
   a) iw_cxgbe (Chelsio)
   b) mlx4ib (Mellanox)
   c) mlx5ib (Mellanox)
4) WITH_OFED=YES is still required by make in order to build
   OFED userspace and kernel code.
5) Full support has been added for routable RoCE, RoCE v2.

Sponsored by:	Mellanox Technologies
2017-11-24 14:50:28 +00:00
Ed Schouten
39202638bc Pick the right vDSO file/linker flags when building cloudabi32.ko on ARM64.
The recently imported cloudabi_vdso_armv6_on_64bit.S should be the vDSO
for 32-bit processes when being run on FreeBSD/arm64. This vDSO ensures
that all system call arguments are padded to 64 bits, so that they can
be used by the kernel to call into most of the native implementations
directly.
2017-11-24 14:02:32 +00:00
Hans Petter Selasky
82725ba9bf Merge ^/head r325999 through r326131. 2017-11-23 14:28:14 +00:00
Landon J. Fuller
2f909a9f74 bhnd(4): Add a basic ChipCommon GPIO driver sufficient to support bwn(4)
The driver is functional on both BHND Wi-Fi adapters and MIPS SoCs, but
does not currently include support for features not required by bwn(4),
including GPIO interrupt handling.

Approved by:	adrian (mentor, implicit)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D12708
2017-11-22 23:10:20 +00:00
Landon J. Fuller
4e96bf3a37 bhnd(4): extend the PMU APIs to support bwn(4)
The bwn(4) driver requires a number of extensions to the bhnd(4) PMU
interface to support external configuration of PLLs, LDOs, and other
parameters that require chipset or PHY-specific workarounds.

These changes add support for:

- Writing raw voltage register values to PHY-specific LDO regulator
  registers (required by LP-PHY).
- Enabling/disabling PHY-specific LDOs (required by LP-PHY)
- Writing to arbitrary PMU chipctrl registers (required for common PHY PLL
  reset support).
- Requesting chipset/PLL-specific spurious signal avoidance modes.
- Querying clock frequency and latency.

Additionally, rather than updating legacy PWRCTL support to conform to the
new PMU interface:

- PWRCTL API is now provided by a bhnd_pwrctl_if.m interface.
- Since PWRCTL is only found in older SSB-based chipsets, translation from
  bhnd(4) bus APIs to corresponding PWRCTL operations is now handled
  entirely within the siba(4) driver.
- The PWRCTL-specific host bridge clock gating APIs in bhnd_bus_if.m have
  been lifted out into a standalone bhnd_pwrctl_hostb_if.m interface.

Approved by:	adrian (mentor, implicit)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D12664
2017-11-22 20:27:46 +00:00
Andrew Turner
a3dff126f9 Add a driver for the EFI RTC. This uses the EFI Runtime Services to query
the system time.

As we seem to only read this time on boot, and this is the only source of
time on many arm64 machines we need to enable this by default there. As
this is not always the case with U-Boot firmware, or when we have been
booted from a non-UEFI environment we only enable the device driver when
the Runtime Services are present and reading the time doesn't result in an
error.

PR:		212185
Reviewed by:	imp, kib
Tested by:	emaste
Relnotes:	yes
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12650
2017-11-21 17:23:16 +00:00