freebsd-skq/sys/conf
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
..
config.mk Revert r319053 due to lack of sence. As pointed out by kib@ opt_global.h 2017-06-04 18:24:41 +00:00
dtb.mk Move sys/boot/fdt/dts to sys/dts and adjust scripts. 2017-11-14 21:03:57 +00:00
files Introduce bwn(4) support for the bhnd(4) bus. 2017-12-02 02:21:27 +00:00
files.amd64 To prepare for adding EFI runtime services support on arm64 move the 2017-10-01 19:52:47 +00:00
files.arm Tag all armv7 kernels as such in their machine config line. 2017-10-05 23:01:50 +00:00
files.arm64 Port cloudabi32.ko to FreeBSD/arm64. 2017-11-30 17:58:48 +00:00
files.i386 Remove i386 XBOX support. 2017-11-16 14:27:02 +00:00
files.mips Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
files.powerpc Add Freescale QorIQ SATA controller support. 2017-11-05 02:47:46 +00:00
files.riscv Support for v1.10 (latest) of RISC-V privilege specification. 2017-08-10 14:18:09 +00:00
files.sparc64 Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
kern.mk Automatically use the ELFv2 ABI on powerpc64 if supported by the compiler. 2017-11-25 21:44:23 +00:00
kern.opts.mk Support armv7 builds for userland 2017-10-05 23:01:33 +00:00
kern.post.mk Fix PORTS_MODULES+'make reinstallkernel' trying to run bogus 'make redeinstall'. 2017-11-18 20:01:05 +00:00
kern.pre.mk Merge ^/head r325842 through r325998. 2017-11-19 12:36:03 +00:00
kmod_syms_prefix.awk Add the infrastructure to support loading multiple versions of TCP 2017-06-08 20:41:28 +00:00
kmod_syms.awk
kmod.mk Remove build system support for lint. 2017-11-17 18:16:46 +00:00
ldscript.amd64 Introduce __read_frequently 2017-09-06 20:32:49 +00:00
ldscript.arm remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.arm64 Explicitly include all .rodata.* sections in the kernel .rodata. This 2016-09-03 17:23:24 +00:00
ldscript.i386 use INT3 instead of NOP for x86 binary padding 2017-03-19 00:22:13 +00:00
ldscript.mips remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.mips.cfe remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.mips.mips64 remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.mips.octeon1 remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.powerpc remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
ldscript.powerpc64 Avoid emitting a PT_INTERP section for powerpc64 kernels and arrange for 2017-11-25 21:45:51 +00:00
ldscript.powerpcspe Create a new MACHINE_ARCH for Freescale PowerPC e500v2 2016-10-22 01:57:15 +00:00
ldscript.riscv o Remove operation in machine mode. 2016-08-10 12:41:36 +00:00
ldscript.sparc64 remove CONSTRUCTORS from kernel linker scripts 2016-07-28 13:54:46 +00:00
Makefile.amd64
Makefile.arm Support armv7 builds for userland 2017-10-05 23:01:33 +00:00
Makefile.arm64
Makefile.i386
Makefile.mips Compile trampoline with soft-float on MIPS, to match the rest of the kernel 2016-11-16 03:24:20 +00:00
Makefile.powerpc Don't pass -Wa,-many through clang, the integrated as doesn't support it. 2017-01-22 06:00:05 +00:00
Makefile.riscv Support for v1.10 (latest) of RISC-V privilege specification. 2017-08-10 14:18:09 +00:00
Makefile.sparc64
makeLINT.mk Rework r325568 so all 'make LINT' targets work. 2017-11-13 20:49:08 +00:00
makeLINT.sed
newvers.sh Indent protection and some other oops from the prvious commits. 2017-11-20 19:56:11 +00:00
NOTES With r181803 on 2008-08-17 23:27:27Z the first VIMAGE commit went into 2017-10-20 21:40:59 +00:00
options Introduce bwn(4) support for the bhnd(4) bus. 2017-12-02 02:21:27 +00:00
options.amd64 Remove SVR4 (System V Release 4) binary compatibility support. 2017-02-28 05:14:42 +00:00
options.arm Tag all armv7 kernels as such in their machine config line. 2017-10-05 23:01:50 +00:00
options.arm64 Add rudimentary support for building FreeBSD/arm64 with COMPAT_FREEBSD32. 2017-11-24 13:50:53 +00:00
options.i386 Remove SVR4 (System V Release 4) binary compatibility support. 2017-02-28 05:14:42 +00:00
options.mips Remove CPU_HAVEFPU. 2017-10-18 17:23:16 +00:00
options.powerpc Create a new MACHINE_ARCH for Freescale PowerPC e500v2 2016-10-22 01:57:15 +00:00
options.riscv Add full softfloat and hardfloat support for RISC-V. 2016-11-16 15:21:32 +00:00
options.sparc64
systags.sh sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
WITHOUT_SOURCELESS
WITHOUT_SOURCELESS_HOST
WITHOUT_SOURCELESS_UCODE rtwn(4), urtwn(4): merge common code, add support for 11ac devices. 2016-10-17 20:38:24 +00:00