Home | History | Annotate | Download | only in conf
History log of /src/sys/arch/evbarm/conf/GENERIC64
RevisionDateAuthorComments
 1.229  09-Oct-2025  skrll Add the beginnings of a GENERIC_V5 kernel that targets armv5 boards and
uses FDT.

In this first iteration some support is added for OLinuXino boards.

Thanks to Yuri Honegger for doing the vast majority of the work.
 1.228  05-Aug-2025  skrll Add Amlogic Meson I2C.
 1.227  04-Aug-2025  skrll Add a port of the FreeBSD driver for the VMware PV SCSI controller found
in VMware's ESXi product.

Tested on ESXi/Arm such that an installation from ISO succeeds and boots.
 1.226  04-Jul-2025  andvar branches: 1.226.2;
s/Cryptograhic/Cryptographic/ in comment.
 1.225  03-Jun-2025  rjs Add disabled entries for USB-C on RK3399.
 1.224  27-Mar-2025  riastradh evbarm/GENERIC64: Enable vio9p(4).

Tested under qemu.

PR kern/59211: vio9p(4): missing from various GENERICs and MAKEDEVs
 1.223  27-Mar-2025  riastradh virtio(4): Consolidate kernel configs.

No functional change intended.

Leave `# XXX ?' comments where I don't know why the driver in
question is excluded. (Typical reason is that PAGE_SIZE is not 4096
but I didn't investigate -- if you do investigate, please either
update the comment if you determine a reason, or enable the driver if
you don't.)

PR kern/59211: vio9p(4): missing from various GENERICs and MAKEDEVs
 1.222  30-Dec-2024  jmcneill arm64: Add support for Snapdragon X1E battery and charger sensors.

This is a port of a set of drivers from OpenBSD, adapted to use ACPI
instead of FDT bindings. These drivers are required to boot firmware on
the application DSP which is required to read sensors. This is an impressive
collection of work on the OpenBSD side -- big thank you to Patrick for writing
this code and his help with this porting effort.

Firmware is signed and as a result may be board specific. The qcompas(4)
driver looks for firmware files in qcompas/<subsystem> where <subsystem> is
the string returned by the _SUB method on the ADSP device node. For example,
on Lenovo ThinkPad T14s Gen 6 the subsystem ID is "233817AA".

The files "qcadsp8380.mbn" and "adsp_dtbs.elf" must be placed in
this directory to read sensor data. These files can be obtained by
downloading the appropriate OEM drivers for Windows.

When everything is online, the sensors are reported by sysmon_envsys and
the charger creates a sysmon_pswitch of type PSWITCH_TYPE_ACADAPTER. The
goal is to match the acpiacad(4) and acpibat(4) behaviour as much as possible.

XXX Firmware loading sometimes fails, still looking into this. When this
happens, sensors are not registered.

[battery]
design voltage: 0.000 V
voltage: 12.980 V
design cap: 58.000 Wh
last full cap: 59.810 Wh
charge: 59.740 2.000% 8.998% Wh (99.88%)
charge rate: N/A
discharge rate: N/A
charging: FALSE
charge state: NORMAL
discharge cycles: 4 0 0 0 0 none
temperature: 30.230 degC
[charger]
connected: TRUE
 1.221  09-Dec-2024  jmcneill enable ikbd(4)
 1.220  08-Dec-2024  jmcneill arm64: Add qcomiic, qcomgpio, ihidev, ims
 1.219  27-Aug-2024  riastradh amd64, evbarm, i386: Add acpivmgenid(4) to GENERIC.

PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork
 1.218  16-Jul-2024  riastradh viocon(4): Add to various kernel configs.
 1.217  30-Jun-2024  jmcneill Add example EARLYCONS entry for Ampere Altra/Altra Max
 1.216  17-May-2024  nia branches: 1.216.2;
Add some "simpler" PCI audio devices to aarch64's GENERIC64

These serve as alternatives to hdaudio. Tested in QEMU.
 1.215  09-May-2024  pho port-arm/58194: Resurrect vmt(4) from bitrot

On this architecture vmt(4) used to search for a node "/hypervisor" in the
FDT and probed the VMware hypervisor call only when the node was
found. However, things appear to have changed and VMware no longer provides
the FDT node.

Since vmt(4) doesn't actually need to read anything from FDT, and the
hypervisor call logically resides in virtual CPUs themselves, it would be
better to attach it directly to cpu, just like how it's probed on x86.
 1.214  11-Oct-2023  rin aarch64/GENERIC64: Add ixl(4)

Works just fine for little-endian on LX2K with UEFI firmware.

Not tested for big-endian yet; attach fails on ROCKPro64 due to
host controller problem.

OK yamaguchi@
 1.213  04-Oct-2023  rin igc(4): Added to kernel config files for tested platforms

I.e., aarch64, amd64, and evbppc/DHT, at the moment.

Please feel free to add to other config files, and report us back
if you find problems :)
 1.212  15-Jul-2023  riastradh evbarm: Enable HEARTBEAT option in GENERIC and GENERIC64 kernels.
 1.211  16-Apr-2023  jmcneill DesignWare watchdog ACPI attach glue
 1.210  25-Feb-2023  skrll Restore the ability to have EARLYCONS work for the QEMU virt after
SOC_VIRT got removed.
 1.209  11-Feb-2023  mrg add siisata(4). been running for ages on a rockpro64.
 1.208  09-Feb-2023  abs Adjust _all_ cinclude of *.local files

- Ensure always at end
- Use tab rather than spaces
- Add consistent comment
"Pull in optional local configuration - always at end"

The only functional change is that a local file which tried to
override an existing setting (eg with "no foo") would have failed
in some cases before, but now will work
 1.207  24-Dec-2022  nia PR port-arm/57044 allow vcaudio on RPI 4 to attach when booting with EFI
 1.206  29-Oct-2022  jmcneill branches: 1.206.2;
No need for SOC_VIRT, the default arm platform will take care of things.
 1.205  23-Aug-2022  ryo add eqos(4) for RK3588
 1.204  23-Aug-2022  ryo Add initial support for RK3588 SoC (CRU and IOMUX)
 1.203  20-Aug-2022  martin config cosmetics (avoid a warning from config(1):
no need to repeat COMPAT_NETBSD32, we get that from GENERIC.common
already (where it is used for aout support, but here it means elf32
support). Add a comment explaining what goes on.
 1.202  13-Aug-2022  jmcneill aarch64: Add tpm driver to GENERIC64 kernel.
 1.201  10-May-2022  skrll Add a driver for the Apple RTKit based System Management Controller
found on M1 SoCs. From OpenBSD.
 1.200  10-May-2022  skrll Add a driver for the Apple M1 I2C controller. From OpenBSD.
 1.199  07-May-2022  skrll Add support for Apple silicon NVME. Ported from OpenBSD.
 1.198  27-Apr-2022  skrll Add support for the mailbox that provides a communications channel with
additional cores integrated in Apple Silicon.

Also, add an implementation for the protocol to communicate with
coprocessors running firmware based Apple's RTKit OS.

From OpenBSD.
 1.197  27-Apr-2022  skrll Add a driver for the Apple GPIO controller found in Apple silicon.

Derived from the OpenBSD driver.
 1.196  27-Apr-2022  skrll Add support for the power domain controller found in Apple silicon
machines.
 1.195  21-Mar-2022  jmcneill hdaudio: Obsolete HDAUDIO_ENABLE_DISPLAYPORT and HDAUDIO_ENABLE_HDMI

Enable display port and HDMI devices by default rather than making this
a compile time option.
 1.194  31-Jan-2022  ryo add support Hardware updates to Access flag and Dirty state (FEAT_HAFDBS)

- The DBM bit of the PTE is now used to determine if it is writable, and
the AF bit is treated entirely as a reference bit. A valid PTE is always
treated as readable. There can be no valid PTE that is not readable.
- LX_BLKPAG_OS_{READ,WRITE} are used only for debugging purposes,
and has been superseded by LX_BLKPAG_AF and LX_BLKPAG_DBM.
- Improve comment

The need for reference/modify emulation has been eliminated,
and access/permission faults have been reduced, however,
there has been little change in overall performance.
 1.193  28-Jan-2022  jakllsch drop WSDISPLAY_CUSTOM_BORDER, it's currently only used by vga(4) which isn't used on evbarm
 1.192  27-Jan-2022  jakllsch enable WSDISPLAY_CUSTOM_BORDER and WSDISPLAY_CUSTOM_OUTPUT to match i386 GENERIC
 1.191  09-Jan-2022  jmcneill dwcmmc: Add ACPI attach support
 1.190  03-Jan-2022  jmcneill Add driver for DesignWare Ethernet Quality-of-Service controller.
 1.189  24-Dec-2021  jmcneill Add ohci at acpi bindings. No known PNP IDs for this, so match using _CLS
and the PCI class/subclass/interface codes. Maybe this will take off.
 1.188  27-Nov-2021  ryo add options COMPAT_LINUX32 (commented out)
 1.187  10-Oct-2021  jmcneill efi: Add /dev/efi character device

Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.
 1.186  23-Sep-2021  ryo add support COMPAT_LINUX for aarch64
 1.185  13-Sep-2021  jmcneill Add support for Apple M1 debug UART.
 1.184  07-Sep-2021  msaitoh space+tab
 1.183  30-Aug-2021  jmcneill Add initial support for Apple M1.

Currently supported devices:
- Interrupt controller
- IOMMU
- PCIe (USB3 and ethernet)
- Reboot via watchdog
- Framebuffer console
 1.182  26-Aug-2021  thorpej Add dsrtc* at iic?
 1.181  19-Aug-2021  msaitoh Indent.
 1.180  18-Aug-2021  msaitoh It's time to add ixg(4) and ixv(4).
 1.179  26-Jun-2021  nia move pad to GENERIC.common
 1.178  26-Jun-2021  nia Add pad(4) to arm kernels
 1.177  01-Mar-2021  jakllsch branches: 1.177.4;
enable rge(4) on x86 and evbarm64
 1.176  27-Jan-2021  skrll Add verbose output options commented out.
 1.175  24-Jan-2021  jmcneill Add support for NXP Layerscape I2C controllers.
 1.174  21-Jan-2021  nia add vcaudio (intentionally this time)

gives working audio output on rpi3 without needing to run a 32-bit image.
 1.173  21-Jan-2021  nia remove accidental additions
 1.172  21-Jan-2021  nia add a commented out compat_ossaudio wherever there's compat_linux

requested by mrg
 1.171  10-Jan-2021  jmcneill Disable nouveau for now. It can cause long pauses at boot and sometimes
fails to initialize the display at all.
 1.170  01-Jan-2021  ryo Add support for Amlogic S922X(meson-g12b) SoCs
 1.169  29-Dec-2020  thorpej Add pcaiicmux.
 1.168  23-Dec-2020  thorpej Add support for i2c-mux-gpio and i2c-mux-pinctrl I2C mux virtual
controllers.
 1.167  13-Dec-2020  jmcneill SBBR says that the CPPC interface should be used on AArch64 instead of
P-states and T-states. Enable acpipcc and acpicppc, and disable acpicpu.
 1.166  07-Dec-2020  jmcneill acpicpu: Add support for ACPI P-states and T-states on Arm.
 1.165  28-Oct-2020  rin branches: 1.165.2;
Add smscphy(4) found on some RPI models.
 1.164  27-Oct-2020  ryo move vmt(4) from MD to MI, and add support vmt on aarch64. tested on ESXi-Arm Fling

- move from sys/arch/x86/x86/{vmt.c,vmtreg.h,vmtvar.h} to sys/dev/vmt/{vmt_subr.c,vmtreg.h,vmtvar.h},
and split the attach part of the cpufeaturebus and fdt
- add aarch64 vmware backdoor op
- add include guard to vmt{reg,var}.h
- Yet there is still some little-endian dependency. it needs to be fixed in order to work properly on aarch64eb
 1.163  15-Oct-2020  ryo add vmx(4) driver. tested on ESXi-Arm
 1.162  29-Sep-2020  jmcneill Collapse all CPU_CORTEXA<n> options into CPU_CORTEX and do runtime
detection instead of ifdefs where required.
 1.161  02-Aug-2020  maxv Add support for Privileged Access Never (ARMv8.1-PAN).

PAN provides the same functionality as SMAP on x86: it forbids kernel
access to userland pages when PSTATE.PAN=1, and allows such accesses when
PSTATE.PAN=0.

We clear SCTLR_SPAN, to guarantee that PAN=1 each time the kernel is
entered. We catch PAN faults and panic right away without further
processing. In copyin, copyout, etc, we temporarily authorize access to
userland pages.

PAN is a very useful exploit mitigation. Reviewed by ryo@, thanks. Tested
on Qemu. Enabled by default.
 1.160  16-Jul-2020  skrll pmapboot_enter simplication
- bootpage_alloc in asm becomes pmapboot_pagealloc in C
- PMAPBOOT_ENTER_NOBLOCK is removed as it's not used
- PMAPBOOT_ENTER_NOOVERWRITE is removed as it's now always on
- physpage_allocator argument is removed as it's always
pmapboot_pagealloc
- Support for EARLYCONS without CONSADDR is removed so that the identity
map for CONSADDR is always known.

For the assembly files:
2 files changed, 40 insertions(+), 89 deletions(-)

LGTM ryo
 1.159  18-May-2020  jmcneill Separate devicetree .dts -> .dtb building from kernel builds. They are now
part of a separate set, "dtb.tgz", and only built when MKDTB=yes. This
defaults to yes for earmv[67]* and aarch64, and no everywhere else.
 1.158  17-May-2020  riastradh Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.

There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.
 1.157  13-May-2020  jmcneill Enable nouveaufb
 1.156  25-Apr-2020  jmcneill Add (commented out) nouveaufb
 1.155  25-Apr-2020  jmcneill Add acpiacad, acpibat, acpifan, acpitz
 1.154  18-Apr-2020  skrll PMAP_DEBUG has been deleted on arm
 1.153  18-Apr-2020  skrll Trailing whitespace
 1.152  13-Apr-2020  maxv Add KUBSAN.
 1.151  13-Apr-2020  maxv Add support for Branch Target Identification (BTI).

On the executable pages that have the GP (Guarded Page) bit, the semantic
of the "br" and "blr" instructions is changed: the CPU expects the first
instruction of the jump/call target to be "bti", and faults if it isn't.

We add the GP bit on the kernel .text pages (and incidentally the .rodata
pages, but we don't care). The compiler adds a "bti c" instruction at the
beginning of each C function. We modify the ENTRY() macros to manually add
"bti c" in the asm functions.

cpuswitch.S needs a specific change: with "br x27" the CPU expects "bti j",
which is bad because the functions begin with "bti c"; switch to "br x16",
for the CPU to accept "bti c".

BTI helps defend against JOP/COP. Tested on Qemu.
 1.150  12-Apr-2020  maxv Add support for Pointer Authentication (PAC).

We use the "pac-ret" option, to sign the return instruction pointer on
function entry, and authenticate it on function exit. This acts as a
mitigation against ROP.

The authentication uses a per-lwp (secret) I-A key stored in the 128bit
APIAKey register and part of the lwp context. During lwp creation, the
kernel generates a random key, and during context switches, it installs
the key of the target lwp on the CPU.

Userland cannot read the APIAKey register directly. However, it can sign
its pointers with it, because the register is architecturally shared
between userland and the kernel. Although part of the CPU design, it is
a bit of an undesired behavior, because it allows to forge valid kernel
pointers from userland. To avoid that, we don't share the key with
userland, and rather switch it in EL0<->EL1 transitions. This means that
when userland executes, a different key is loaded in APIAKey than the one
the kernel uses. For now the userland key is a fixed 128bit zero value.

The DDB stack unwinder is changed to strip the authentication code from
the pointers in lr.

Two problems are known:

* Currently the idlelwps' keys are not really secret. This is because
the RNG is not yet available when we spawn these lwps. Not overly
important, but would be nice to fix with UEFI RNG.
* The key switching in EL0<->EL1 transitions is not the most optimized
code on the planet. Instead of checking aarch64_pac_enabled, it would
be better to hot-patch the code at boot time, but there currently is
no hot-patch support on aarch64.

Tested on Qemu.
 1.149  31-Mar-2020  jmcneill branches: 1.149.2;
Add ACPI support.
 1.148  28-Mar-2020  isaki Reduce default AUDIO_BLK_MS from 40msec to 10msec on all platform except m68k
(m68k uses 40msec default as before). And remove the option from GENERIC.
- It's not good idea to set such parameter in individual GENERICs.
- 4msec is (probably no problem for most modern real hardware but)
too aggressive to be default.
- 10msec is too severe for antique machines but it's hard to draw a line.
 1.147  27-Mar-2020  thorpej Attach sunxirtc in pass4; it's required by mmcpwrseq on some boards.
 1.146  18-Mar-2020  jmcneill Add radeon, radeondrmkmsfb
 1.145  18-Mar-2020  nisimura sort Ethernet devices for ease to read
 1.144  18-Mar-2020  nisimura add SC2A11 sniemmc and sniiic devices
 1.143  18-Mar-2020  nisimura add ACPI attachment glue
 1.142  16-Mar-2020  nisimura redo the commit correctly
 1.141  16-Mar-2020  nisimura include files.sociox for generic64
 1.140  22-Feb-2020  jmcneill Add brgphy
 1.139  22-Feb-2020  jmcneill Add ACPI glue for Broadcom GENETv5
 1.138  22-Feb-2020  jmcneill Add support for Broadcom GENET v5 ethernet controller as found on the
Raspberry Pi 4 (BCM2711).
 1.137  20-Feb-2020  jmcneill Attach bcmgpio before devices that may need it
 1.136  06-Feb-2020  mrg add MIDI sequencer device. now midiplay works on usb midi devices.
 1.135  26-Jan-2020  mrg enable bwfm at sdio.

known to now work on pinebook pro and banana pi m2 zero.
 1.134  25-Jan-2020  jmcneill Follow amd64 and set AUDIO_BLK_MS=4 by default
 1.133  15-Jan-2020  jmcneill Add imxi2c
 1.132  15-Jan-2020  jmcneill Add support for NXP i.MX 8M Dual/8M QuadLite/8M Quad family SoCs.
 1.131  12-Jan-2020  riastradh Enable sun8icrypto in GENERIC64.

But set its entropy estimate to zero until we have a better idea of
how it works. Can't really hurt this way unless sun8icrypto is
maliciously dependent on all other inputs to the entropy pool, which
seems unlikely.
 1.130  04-Jan-2020  skrll branches: 1.130.2;
Add DTS files for new boards for the SOCs we support
 1.129  04-Jan-2020  skrll Sort DTS
 1.128  04-Jan-2020  jmcneill Attach psci as early as possible. This allows other power controllers to
register their own poweroff / reset callbacks with a higher preference.
 1.127  04-Jan-2020  skrll Add bcm2711-rpi-4-b.dts
 1.126  03-Jan-2020  jmcneill add cwfg
 1.125  02-Jan-2020  ryo add aq(4). tested on rockpro64.
 1.124  02-Jan-2020  jmcneill add es8316, simpleamp
 1.123  01-Jan-2020  jmcneill Attach mmcpwrseq resource earlier
 1.122  01-Jan-2020  jmcneill + rk3399-pinebook-pro.dts
 1.121  30-Dec-2019  jmcneill Add bcmmbox at acpi
 1.120  29-Dec-2019  jmcneill Add sdhc at acpi
 1.119  25-Dec-2019  skrll Add EARLYCONS=bcm2711 example (commented out)
 1.118  19-Dec-2019  jakllsch enable panel at fdt drivers
 1.117  19-Dec-2019  jakllsch add anxdp(4)
 1.116  09-Dec-2019  riastradh Draft driver for Allwinner Crypto Engine.

Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic. I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.

(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)
 1.115  17-Nov-2019  jmcneill Add sun6ispi
 1.114  17-Nov-2019  jmcneill Add spdiftx
 1.113  16-Nov-2019  jmcneill Add rki2s
 1.112  14-Nov-2019  jmcneill Enable Rockchip display support
 1.111  10-Nov-2019  mrg add mpt(4) SCSI controller support (seen plugged into a rockpro64.)
 1.110  09-Nov-2019  jmcneill Add (commented out) Rockchip display support
 1.109  19-Oct-2019  tnn evbarm: add dwcwdt(4) to GENERIC64
 1.108  01-Oct-2019  jmcneill Increase maxusers to 64 for 64-bit kernels
 1.107  21-Sep-2019  jmcneill Add support for Mellanox 5th generation ethernet devices. This driver
supports the ConnectX-4 Lx EN, ConnectX-4 EN, ConnectX-5 EN, and
ConnectX-6 EN adapters.

Driver ported from OpenBSD.
 1.106  02-Sep-2019  skrll Add (commented out) UVMHIST options
 1.105  13-Aug-2019  tnn include the spiflash driver in the stock 64-bit kernel

As it can be attached via fdt now. For Rockpro64.
 1.104  05-Aug-2019  tnn rkspi* at fdt?
 1.103  25-Jul-2019  jmcneill branches: 1.103.2;
Replace the HDAUDIO_32BIT_ACCESS option with a runtime option. Set it for
tegra_hdaudio, but not for the pci attachment. Add hdaudio@pci to GENERIC64
 1.102  16-Jul-2019  jmcneill Add wm(4)
 1.101  12-Jul-2019  skrll Add a couple of spaces to do the <space><tab> thing
 1.100  22-Jun-2019  skrll Rename watchdog -> bcmpmwdog and sdhost to bcmsdhost
 1.99  15-Jun-2019  maxv Add KASAN_PANIC, an option to turn KASAN warning into kernel panics,
requested by Siddharth. While here clarify a little.
 1.98  13-Jun-2019  jmcneill add ahcisata at pci
 1.97  12-Jun-2019  jmcneill Add rkpcie, rkpciephy
 1.96  06-Jun-2019  jmcneill Attach sunxi dma controllers earlier.
 1.95  31-May-2019  jmcneill Comment out VERBOSE_INIT_ARM
 1.94  26-May-2019  jmcneill Increase I2C_MAX_ADDR to 0xfff for sunxi RSB
 1.93  25-May-2019  jmcneill Add bcm2837-rpi-3-a-plus.dts, meson-gxl-s805x-libretech-ac.dts,
meson-gxl-s905d-phicomm-n1.dts, rk3399-gru-scarlet-inx.dts,
rk3399-gru-scarlet-kd.dts, rk3399-nanopc-t4.dts, rk3399-nanopi-m4.dts,
rk3399-rock-pi-4.dts, sun50i-a64-amarula-relic.dts,
sun50i-a64-pine64-lts.dts, sun50i-h5-emlid-neutis-n5-devboard.dts,
sun50i-h6-orangepi-lite2.dts, tegra210-p2894-0050-a08.dts.
 1.92  01-May-2019  jmcneill Add rkpwm and pwmfan
 1.91  26-Apr-2019  mrg implement TSADC driver for rockchip RK3328 and RK3399. so far, only
tested on RK3399 but the RK3328 looks mostly the same and has a good
chance of working too.

add clock entries for "clk_tsadc" and "pclk_tsadc" to cru.

exports "CPU" and "GPU" temp sensors. these currently limited to 5
degC resolution but can be reduced to sub 1 degC resolution with some
interpolation.

todo list:

- handle setting various temp values
- add interpolation between the 5degC intervals in sample data
- handle DT trips/temp value defaults
- interrupts aren't triggered (test by lowering warn/crit values),
and once they work, make the interrupt do something
- test on RK3328, and port to other rockchips (will require moving
some part into per-chipset sections, such as code<->temp tables)


thanks to jmcneill for help.
 1.90  21-Apr-2019  jmcneill Add mesonrng
 1.89  21-Apr-2019  jmcneill Add driver for Meson GX EE-domain watchdog timer.
 1.88  21-Apr-2019  jmcneill Add support for Meson GXL internal PHY.
 1.87  19-Apr-2019  jmcneill Remove qsphy(4), this 20+ year old PHY driver accidentally attaches to the Meson GXL internal PHY
 1.86  19-Apr-2019  jmcneill Add support for Amlogic Meson GXL family SoCs.
 1.85  07-Apr-2019  jmcneill Explicitly include bold8x16 and bold16x32 fonts
 1.84  17-Mar-2019  skrll G/C
 1.83  10-Mar-2019  jmcneill Add support for Rockchip eMMC PHY
 1.82  06-Mar-2019  jakllsch Enable WSDISPLAY_SCROLLSUPPORT in evbarm GENERICs.
 1.81  05-Mar-2019  jmcneill Add bcm2837-rpi-cm3-io3.dts, rk3399-ficus.dts, rk3399-gru-bob.dts, rk3399-roc-pc.dts, rk3399-rock960.dts, sun50i-h5-bananapi-m2-plus-v1.2.dts, sun50i-h5-bananapi-m2-plus.dts, sun50i-h6-orangepi-one-plus.dts
 1.80  25-Feb-2019  jmcneill Add support for Amlogic S905 (Meson GXBB) SoCs.
 1.79  08-Feb-2019  macallan move sunxide2ccu to pass 3, now it works on my H5
from jmcneill@
 1.78  03-Feb-2019  jmcneill Add anxedp
 1.77  30-Jan-2019  jmcneill Enable Allwinner A64 display pipeline
 1.76  30-Jan-2019  jmcneill Add Allwinner A64 display pipeline drivers (commented out for now)
 1.75  22-Jan-2019  jmcneill Add drivers for DE2 bus and clock controllers.
 1.74  22-Jan-2019  jmcneill Add sunxisramc
 1.73  03-Jan-2019  jmcneill Attach sunxirsb earlier so axppmic regulators are available for usbphy
 1.72  30-Dec-2018  skrll Disable DEBUG by default.

Comment out DIAGNOSTIC while where are it's already defined by
GENERIC.common
 1.71  28-Dec-2018  mrg turn on INCLUDE_CONFIG_FILE.
 1.70  21-Dec-2018  jmcneill Add com at acpi
 1.69  30-Nov-2018  jmcneill Add ena at pci
 1.68  30-Nov-2018  jmcneill Add puc at pci and com at puc
 1.67  29-Nov-2018  jmcneill Add nvme at pci
 1.66  23-Nov-2018  skrll Enable CPU_THUNDERX
 1.65  18-Nov-2018  jmcneill Add virtio at pci, scsibus at scsi, and sd at scsibus
 1.64  18-Nov-2018  skrll Add CPU_THUNDERX which sets COHERENCY_UNIT and CACHE_LINE_SIZE to 128
 1.63  18-Nov-2018  skrll Trailing whitespace
 1.62  01-Nov-2018  maxv Add kASan support for aarch64. Stack tracking needs more investigation
and will come in a separate commit.

Reviewed by ryo@ jmcneill@ skrll@.
 1.61  28-Oct-2018  jmcneill Add support for EFI runtime services on aarch64.
 1.60  26-Oct-2018  jmcneill Add xhci at acpi
 1.59  26-Oct-2018  jmcneill Add ehci at acpi
 1.58  24-Oct-2018  jmcneill Add sbsawdt at acpi
 1.57  22-Oct-2018  jmcneill Add acpiged at acpi
 1.56  21-Oct-2018  jmcneill Add gicvthree at acpi
 1.55  21-Oct-2018  jmcneill Add acpibut at acpi, acpilid at acpi
 1.54  21-Oct-2018  jmcneill Add virtio at acpi
 1.53  21-Oct-2018  jmcneill Add qemufwcfg at acpi
 1.52  19-Oct-2018  jakllsch Add amdccp(4) driver for AMD Cryptographic Coprocessor, as found on the
A11xx Opterons. Driver currently provides RNG service only.
 1.51  17-Oct-2018  jmcneill Add dwiic at acpi
 1.50  16-Oct-2018  skrll Add SOC_THUNDERX (commented out for now as it changes COHERENCY_UNIT)
 1.49  15-Oct-2018  jmcneill Add plgpio at acpi
 1.48  15-Oct-2018  jmcneill Rename pl061gpio to plgpio and split the device logic from the FDT glue.
 1.47  15-Oct-2018  jmcneill Add acpipchb
 1.46  12-Oct-2018  jmcneill Add ahcisata at acpi
 1.45  12-Oct-2018  jmcneill Add basic ACPI support
 1.44  12-Oct-2018  ryo add initial support of COMPAT_NETBSD32 on AArch64.
arm ELF32 EABI binaries could be execute in AArch32 state on AArch64. A32 THUMB mode is not supported yet.
 1.43  03-Oct-2018  skrll Sort the SOC_ list
 1.42  03-Oct-2018  skrll Add commented out Cavium CN88XX ThunderX EARLYCONS and CONSADDR
 1.41  30-Sep-2018  jmcneill Add qemufwcfg
 1.40  30-Sep-2018  jmcneill Add plrtc
 1.39  29-Sep-2018  jmcneill Add virtio
 1.38  26-Sep-2018  jakllsch Add dwiic(4) and spdmem(4).
 1.37  15-Sep-2018  jmcneill Enable msk(4)
 1.36  15-Sep-2018  jmcneill Enable WSDISPLAY_MULTICONS
 1.35  08-Sep-2018  jmcneill Add pl061gpio, pcihost, mskc/msk (commented out), ehci@pci, ohci@pci, and xhci@pci
 1.34  02-Sep-2018  jmcneill Add rkpmic
 1.33  29-Aug-2018  jmcneill Add (commented out) EARLYCONS entry for rk3399
 1.32  29-Aug-2018  jmcneill Add fan53555reg
 1.31  12-Aug-2018  jmcneill Add rk3399-rockpro64.dts
 1.30  12-Aug-2018  jmcneill Enable support for GICv3 and Rockchip RK3399
 1.29  15-Jul-2018  jmcneill add pseudo-device tprof (fix build)
 1.28  15-Jul-2018  jmcneill Add armpmu
 1.27  14-Jul-2018  maxv Remove "options IPKDB", and the other associated options, from the config
files.

ipkdb is being retired. Its code is really old, and hasn't kept pace with
today's expectations: IPv6, SMP, modern NICs. The associated code for x86
was already removed because it was too incorrect to stay.

There are plans to rewrite a similar feature from scratch.

ok kamil christos
 1.26  09-Jul-2018  jmcneill Enable options MULTIPROCESSOR
 1.25  01-Jul-2018  jmcneill Add rkiic
 1.24  01-Jul-2018  skrll Add bcm2835-rpi-zero-w.dts and bcm2837-rpi-3-b-plus.dts as appropriate

PR/53284 - Support RPI3B+,RPI0W,RPI2-1.2
 1.23  30-Jun-2018  jmcneill Attach simplebus on pass 0
 1.22  30-Jun-2018  jmcneill cpus: use fdt_add_bus
 1.21  30-Jun-2018  jmcneill Allow nodes to attach child devices using the same sorting rules as used
by the simplebus driver.
 1.20  30-Jun-2018  jmcneill add syscon
 1.19  27-Jun-2018  jmcneill branches: 1.19.2;
dts: add sun50i-h5-libretech-all-h3-cc.dts
 1.18  16-Jun-2018  jmcneill Comment out EARLYCONS
 1.17  16-Jun-2018  jmcneill Add initial support for Rockchip RK3328 SoC.
 1.16  14-Jun-2018  jmcneill Add support for QEMU ARM Virtual Machine ("virt").
 1.15  10-May-2018  jmcneill Add ausoc, sun8icodec, a64codec, sunxii2s
 1.14  10-May-2018  jmcneill whitespace fix
 1.13  06-May-2018  jmcneill Add sunxipwm, pwmbacklight
 1.12  05-May-2018  jmcneill Add sun50ia64rccu
 1.11  04-May-2018  jmcneill Rename axp806pmic to axppmic, and add support for AXP803.
 1.10  03-May-2018  jmcneill Add axp806pmic, axp806reg
 1.9  02-May-2018  jmcneill Add sunxinmi
 1.8  02-May-2018  jmcneill Add sun50ih6rccu
 1.7  02-May-2018  jmcneill add pcf8563rtc
 1.6  02-May-2018  jmcneill Add sunxiusb3phy
 1.5  01-May-2018  jmcneill Enable Allwinner H6 support
 1.4  28-Apr-2018  jmcneill Enable motg
 1.3  28-Apr-2018  jmcneill Enable Allwinner SID and thermal sensor controller
 1.2  28-Apr-2018  jmcneill Add sun50i-a64-teres-i.dts, sun50i-h5-orangepi-zero-plus.dts
 1.1  01-Apr-2018  ryo branches: 1.1.2;
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
 1.1.2.13  26-Jan-2019  pgoyette Sync with HEAD
 1.1.2.12  18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.11  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1.2.10  26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.1.2.9  20-Oct-2018  pgoyette Sync with head
 1.1.2.8  30-Sep-2018  pgoyette Ssync with HEAD
 1.1.2.7  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.1.2.6  28-Jul-2018  pgoyette Sync with HEAD
 1.1.2.5  25-Jun-2018  pgoyette Sync with HEAD
 1.1.2.4  21-May-2018  pgoyette Sync with HEAD
 1.1.2.3  02-May-2018  pgoyette Synch with HEAD
 1.1.2.2  07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.1.2.1  01-Apr-2018  pgoyette file GENERIC64 was added on branch pgoyette-compat on 2018-04-07 04:12:12 +0000
 1.19.2.3  21-Apr-2020  martin Sync with HEAD
 1.19.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.19.2.1  10-Jun-2019  christos Sync with HEAD
 1.103.2.13  07-Jul-2020  martin Pull up following revision(s) (requested by jmcneill in ticket #980):

sys/dev/pci/if_aq.c: revision 1.4
sys/dev/pci/if_aq.c: revision 1.5
sys/arch/amd64/conf/GENERIC: revision 1.553
sys/dev/pci/files.pci: revision 1.419
sys/arch/amd64/conf/XEN3_DOM0: revision 1.170
sys/dev/pci/if_aq.c: revision 1.9
share/man/man4/Makefile: revision 1.693
sys/dev/pci/pcidevs: revision 1.1411
share/man/man4/aq.4: revision 1.1
share/man/man4/aq.4: revision 1.3
sys/arch/i386/conf/ALL: revision 1.479
share/man/man4/aq.4: revision 1.4
sys/dev/pci/if_aq.c: revision 1.10
sys/dev/pci/files.pci: revision 1.421
sys/dev/pci/if_aq.c: revision 1.11
sys/dev/pci/if_aq.c: revision 1.12
sys/dev/pci/if_aq.c: revision 1.13
sys/dev/pci/if_aq.c: revision 1.14
sys/dev/pci/if_aq.c: revision 1.15
sys/dev/pci/if_aq.c: revision 1.16
sys/dev/pci/pcidevs: revision 1.1408
sys/arch/amd64/conf/ALL: revision 1.135
sys/net/ethertypes.h: revision 1.19
sys/arch/i386/conf/GENERIC: revision 1.1218
distrib/sets/lists/man/mi: revision 1.1668
sys/dev/pci/if_aq.c: revision 1.1
sys/dev/pci/if_aq.c: revision 1.2
sys/dev/pci/pcidevs: revision 1.1395
sys/dev/pci/if_aq.c: revision 1.3
sys/arch/evbarm/conf/GENERIC64: revision 1.125

Add the ETHERTYPE_QINQ for 802.1ad VLAN stacking

add Aquantia AQC 10G network adapters
add support Aquantia AQC seriese 10G network adapters.

this driver is based on the FreeBSD version https://github.com/Aquantia/aqtion-freebsd ,
but drastically rewritten for NetBSD.

add aq(4)

Add Aquantia AQC100, AQC100S and D100.

add support VLAN HW filter

set/clear IFF_OACTIVE flag only on txring 0

make counters per queue

support internal PHY temperature sensor

Found by kUBSan:
- Use unsigned to avoid undefined behavior in aq_hw_init().
- Cast to unsigned to avoid undefined behavior in aq_set_mac_addr().

fix descriptions of register map in comment

return the ifmedia active status correctly even while the link is not up after attach.
pointed out by msaitoh@. thanks.

On FIBRE devices, there are times when linkstat interrupt doesn't occur?
reported from Andrius V. thanks.
- use polling instead of linkstat interrupt when FIBRE
- add AQ_FORCE_POLL_LINKSTAT options (not by default)

sort product table, and tabify

add support AQC100S and D100.
not tested, but they are probably the same as the AQC100.
 1.103.2.12  18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #913):

sys/arch/arm/dts/rk3399-crypto.dtsi: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.1
sys/arch/arm/rockchip/rk_v1crypto.c: revision 1.2 (plus patch)
sys/arch/arm/rockchip/rk_v1crypto.h: revision 1.1
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.3
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.20
sys/arch/evbarm/conf/GENERIC64: revision 1.158
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.11
sys/arch/arm/rockchip/files.rockchip: revision 1.24

Rockchip crypto engine RNG driver.

As found on the rk3288 and rk3399. This driver only supports the
TRNG, not the rest of the crypto engine, although it uses the AES unit
to do a self-test at attach time to verify that the engine works.
There seem to be two versions of the Rockchip crypto engine, v1 and
v2; this one is for v1. Can't name a driver `rkcryptov1' so we'll
clumsily call it `rkv1crypto' instead to leave room for `rkv2crypto'
later on.

The crypto binding derived from the Rockchip BSP Linux kernel, in the
location it appears on the rk3399, is in rk3399-crypto.dtsi, since
there doesn't seem to be a better place to put it at the moment among
this twisty maze of inclusions, all different.

Use rnd_add_data_sync from the callback.

(Doesn't make a difference in HEAD but this is the stated API
contract and it matters if we want to pull this up.)

Prime the pool on attach.
 1.103.2.11  18-May-2020  martin Pull up following revision(s) (requested by riastradh in ticket #912):

sys/arch/arm/dts/sun50i-a64.dtsi: revision 1.14
sys/arch/evbarm/conf/GENERIC64: revision 1.116
sys/arch/evbarm/conf/GENERIC64: revision 1.131
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.21
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.22
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.10
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.11
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.12
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.2
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.3
sys/arch/arm/sunxi/sun8i_crypto.h: revision 1.1
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.4
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.5
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.6
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.7
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.8
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.9
sys/arch/arm/sunxi/files.sunxi: revision 1.67

Add crypto engine clock

Add SUNXI_CCU_NM_ROUND_DOWN to CE clock, fix pll parents to use 2X outputs

Add crypto engine block.

Draft driver for Allwinner Crypto Engine.
Found on, e.g., the Pinebook.

Only used for TRNG at the moment, but hooking it up to opencrypto(9)
shouldn't be too hard if anyone still cares about that these days.

The distribution of the alleged TRNG is very nonuniform distributed
seems to alternate between toward runs with exceptionally high
fractions of 0 bits and runs with exceptionally high fractions of 1
bits -- initially all my samples were mostly 0's, and then all my
samples were mostly 1's, and now I'm seeing more oscillation between
these runs.

So I've wired it up as RND_TYPE_UNKNOWN, not RND_TYPE_RNG (it will
immediately flunk our rngtest and be disabled), and I estimated it to
provide at most one bit of entropy per byte of data -- which may
still be optimistic. I also added a sysctl node hw.sun8icryptoN.rng
to read out 1024-byte samples for analysis, and I left the driver
commented out in GENERIC64 for now.
(If anyone has contacts at Allwinner who can tell us about how the
alleged TRNG is supposed to work, please let me know!)

Reduce some duplicated bus_dma clutter.

Factor out some of the self-test logic used for debugging.

Add missing bus_dmamap_sync(POSTWRITE) while here.

Make sure ERESTART doesn't come flying out to userland.
I picked ERESTART to mean `all channels are occupied' because that's
what opencrypto(9) uses to decide whether to queue a request, but
it's not appropriate for sysctl(2) to return that.

Avoid a race between interruption and reacquisition of lock.
Otherwise, we would have leaked the memory in this case.

Tidy up comments.

Oops -- forgot to kmem_free.

Fix typo -- acknowledge interrupts _and_ errors.

Reduce entropy estimate for sun8icrypto TRNG.

NIST's SP800-90B entropy estimation tools put it at no more than .08
bits of entropy per byte of data(!), so estimate 100 bits of data per
bit of entropy. This is probably not conservative enough -- the NIST
tools were written without knowledge of how this alleged TRNG works!
Knowledge of the physics of how the TRNG is supposed to work could
probably enable a better job at predicting the outputs.
While here, bump the size of data we can sample directly with sysctl
to 4096 bytes.

Enable sun8icrypto in GENERIC64.

But set its entropy estimate to zero until we have a better idea of
how it works. Can't really hurt this way unless sun8icrypto is
maliciously dependent on all other inputs to the entropy pool, which
seems unlikely.

Fix (presently harmless) psato.

Don't overwrite cy_root_node; use cy_trng_node as intended.

Fix previous brainfart.

Don't use the uninitialized trng node as the root node -- derp.
Instead, use the root node as the root node, and initialize the trng
node here.
 1.103.2.10  18-May-2020  martin Pull up following revision(s) (requested by isaki in ticket #911):

sys/dev/audio/audiodef.h: revision 1.13
sys/dev/audio/audiodef.h: revision 1.14
sys/arch/sparc/include/param.h: revision 1.74
sys/arch/evbarm/conf/GENERIC64: revision 1.148
sys/arch/sh3/include/param.h: revision 1.25
sys/arch/evbarm/conf/GENERIC: revision 1.75
sys/arch/m68k/include/param.h: revision 1.23
sys/arch/amd64/conf/GENERIC: revision 1.564
sys/arch/hppa/include/param.h: revision 1.27
sys/dev/audio/audio.c: revision 1.68
sys/arch/vax/include/param.h: revision 1.63
sys/dev/audio/audio.c: revision 1.69

Reduce default AUDIO_BLK_MS from 40msec to 10msec on all platform except m68k
(m68k uses 40msec default as before). And remove the option from GENERIC.

- It's not good idea to set such parameter in individual GENERICs.
- 4msec is (probably no problem for most modern real hardware but)
too aggressive to be default.
- 10msec is too severe for antique machines but it's hard to draw a line.

Set AUDIO_BLK_MS 40 msec on other old(slow) architectures not only m68k.

Thanks tsutsui@ for comment about architecture choice.
And move it from audiodef.h to audio.c as suggested by joerg@.


Move machine dependent AUDIO_BLK_MS default value to <machine/param.h>.
If the port has __AUDIO_BLK_MS in <machine/param.h>, it will be used.

Otherwise the default value (currently 10 msec) defined in audio.c will
be used. This mechanism is for very old ports which cannot satisfactorily
handle 10 msec block. Currently hppa, m68k, sh3, sparc(!64) and vax are.

For port maintainers, if general models in your port cannot satisfactorily
handle 10 msec block, please consider to define your suitable longer period
(40 msec would be a good first choice).

But please don't be eager to make the default value shorter.
<machine/param.h> was discussed in source-changes-d. It's better than
ifdef storm, or adding 60+ new header files in every arch/*/include/
directories for this. Thanks mrg@, ad@, and everyone.
http://mail-index.netbsd.org/source-changes-d/2020/05/01/msg012572.html
 1.103.2.9  02-Apr-2020  martin Pull up following revision(s) (requested by mrg in ticket #817):

sys/arch/evbarm/conf/GENERIC: revision 1.73
sys/arch/evbarm/conf/GENERIC64: revision 1.136

add MIDI sequencer device. now midiplay works on usb midi devices.
 1.103.2.8  27-Jan-2020  martin Pull up following revision(s) (requested by nia in ticket #657):

sys/dev/files.audio: revision 1.13
sys/dev/files.audio: revision 1.14
sys/arch/amd64/conf/GENERIC: revision 1.559
sys/arch/evbarm/conf/GENERIC: revision 1.71
sys/arch/evbarm/conf/GENERIC64: revision 1.134
sys/dev/audio/audiodef.h: revision 1.8

Set AUDIO_BLK_MS=4 - unlikely to cause significant overhead on non-m68k.

Several of us have been setting this in /etc/sysctl.conf for months, to
get better performance from applications that require synced audio, etc.
It's also mentioned as a good value with low overhead on most archs here:
href="https://mail-index.netbsd.org/tech-kern/2019/12/07/msg025830.html

We could probably go lower, but this is low enough to make most/all
software run well, removing frame drops. It's also low enough to get
emulators/mednafen to stop complaining in the console.

defopt AUDIO_BLK_MS

Follow amd64 and set AUDIO_BLK_MS=4 by default

defopt -> defparam (oops)
 1.103.2.7  21-Jan-2020  martin Pull up following revision(s) (requested by mrg in ticket #616):

sys/dev/ic/anx_dp.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.126
sys/dev/ic/anx_dp.h: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.128
sys/dev/ic/anx_dp.h: revision 1.2
sys/dev/fdt/dwcmmc_fdt.c: revision 1.9
sys/dev/i2c/cwfg.c: revision 1.1
sys/conf/files: revision 1.1247
sys/dev/fdt/pwm_backlight.c: revision 1.5
sys/dev/fdt/pwm_backlight.c: revision 1.6
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.14
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.15
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.16
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.17
sys/dev/ic/dwc_mmc.c: revision 1.20
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.18
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.19
sys/dev/usb/usbdevs: revision 1.775
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.4
sys/dev/fdt/simple_amplifier.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.105
sys/arch/evbarm/conf/GENERIC64: revision 1.117
sys/arch/evbarm/conf/GENERIC64: revision 1.118
sys/dev/i2c/files.i2c: revision 1.107
sys/dev/fdt/files.fdt: revision 1.49
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.1
sys/dev/ic/dwc_mmc_var.h: revision 1.9
sys/dev/i2c/rkpmic.c: revision 1.4
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.2
sys/dev/i2c/rkpmic.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.6
sys/arch/arm/rockchip/rk_vop.c: revision 1.4
sys/arch/arm/rockchip/rk_vop.c: revision 1.5
sys/dev/i2c/rkpmic.c: revision 1.8
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.1
sys/dev/usb/ums.c: revision 1.96 (via patch)
sys/arch/arm/rockchip/rk_pwm.c: revision 1.3
sys/arch/arm/dts/rk3399-pinebook-pro.dts: revision 1.2
sys/dev/i2c/es8316ac.c: revision 1.1
sys/dev/fdt/dwcmmc_fdt.c: revision 1.10
sys/dev/i2c/es8316ac.c: revision 1.2
sys/dev/fdt/fdt_panel.c: revision 1.1
sys/dev/ic/dwc_mmc.c: revision 1.18
sys/dev/fdt/fdt_panel.c: revision 1.2
sys/dev/ic/dwc_mmc.c: revision 1.19
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.5
sys/dev/ic/dwc_mmc_var.h: revision 1.10
sys/dev/fdt/fdt_port.c: revision 1.6
sys/arch/evbarm/conf/GENERIC64: revision 1.122
sys/dev/ic/dwc_mmc_var.h: revision 1.11
sys/dev/fdt/files.fdt: revision 1.50
sys/arch/evbarm/conf/GENERIC64: revision 1.123
sys/arch/arm/rockchip/rk_i2s.c: revision 1.2
sys/arch/arm/rockchip/files.rockchip: revision 1.23
sys/arch/evbarm/conf/GENERIC64: revision 1.124
sys/dev/ic/anx_dp.c: revision 1.1

rkpmic: add RTC support; register w/ todr(9)
rkpmic: correct delay
Add support for SDIO interrupts.
fix copy/paste error in mux_pll_src_cpll_gpll_ppll_parents[]
add RK3399 eDP clocks
add RK3399 DisplayPort clocks
style fix/KNF
rk3399_cru: implement dclk_vop0_frac and dclk_vop1_frac
Move drm_encoder from rkvop(4) to the SoC-layer output pipe drivers (rk_dwhdmi).
rkvop: set stride using virtual framebuffer width instead of display mode
rk3399_cru: Reparent dclk_vop[01] to gpll via dclk_vop[01]_frac.
The previous source of dclk_vop[01] was vpll via dclk_vop[01]_div.
vpll is apparently used directly as a pixel clock source for the
HDMI PHY, and we don't want the other VOP's dclk changing out from
under it because we can't handle finding a replacement clock source
with the right rate yet.
gpll happens to run at 594MHz, which works well as a basis for pixel
clocks.
Linux suggests that the source clock of the fractional divider needs
to be more than twenty times greater than the resulting clock (or some
intermediate clock?) for output stability. This may not be the case
with 594MHz and the common pixel clocks I see used by displays in my
area of the wild, but it works for now.
add Analogix DisplayPort core driver
add Rockchip (RK3399) glue for Analogix DisplayPort core
add anxdp(4)
Add another panel@fdt driver, this time for DRM-style panels.
To do: migrate away from other panel driver.
enable panel at fdt drivers
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work
add template bits for optional eDP panel on RockPro64
Abort panel driver attach if required regulator is missing.
Add clk provider
Add Pinebook Pro dts, from Manjaro Linux.
https://gitlab.manjaro.org/tsys/linux-pinebook-pro/blob/877ca0e7283596f37845de50dc36bff5b88b91e1/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+ rk3399-pinebook-pro.dts
Attach mmcpwrseq resource earlier
dwcmmc improvements:
- Use mmcpwrseq resources if available
- Only set 4- or 8-bit mode if specified in the dt properties
- Add quirk for implementations with inverted power enable logic
- Support switching signal voltage between 1.8V and 3.3V
- Fix a clock divider issue on Rockchip SoCs
Fix performance regression with previous
Quiet chatty printfs
No need to print all supported levels at attach, print the range and total number of steps
Disable SPI for now (rkspi driver hangs at boot)
Add driver for simple-audio-amplifier binding
Add driver for Everest Semi ES8316 Low Power Audio CODEC
add es8316, simpleamp
Avoid sleeping while the audio intr lock is held.
If the rockchip,system-power-controller property is present, try to power off with the PMIC
Add HAILUCK keyboard (product 1e)
Add a quirk for the HAILUCK USB keyboard / touchpad device with product 1e.
The keyboard does not function properly unless the touchpad's intr endpoint
is active.
Add driver for CellWise CW2015 Fuel Gauge IC.
add cwfg
Emit PMFE_DISPLAY_{ON,OFF} events in response to DPMS requests.
If the backlight node does not have an enable gpio, set the lowest duty
cycle to turn the display off instead.
Attach psci as early as possible. This allows other power controllers to
register their own poweroff / reset callbacks with a higher preference.
Add 2000 MHz to available armclkb rates
Remove debug printfs
 1.103.2.6  20-Nov-2019  martin Pull up following revision(s) (requested by tnn in ticket #458):

sys/arch/arm/rockchip/rk3399_cru.c: revision 1.9
sys/arch/arm/rockchip/rk_spi.c: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.104
sys/arch/arm/rockchip/files.rockchip: revision 1.20

rk3399_cru: add definitions for SPI clocks

rk_spi: Rockchip SPI driver

Match only on RK3399 for now, but should work on RK3328 as well with
the proper CRU support. If you can, please test and enable for RK3328.

rkspi* at fdt?
 1.103.2.5  18-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #439):

sys/arch/evbarm/conf/GENERIC64: revision 1.115
sys/arch/arm/sunxi/sun50i_a64_ccu.c: revision 1.15

Add SPI clocks
Add sun6ispi
 1.103.2.4  18-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #438):

sys/dev/fdt/spdif_tx.c: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.114
sys/dev/fdt/files.fdt: revision 1.48

Add driver for dummy spdif transmitter bindings.
Add spdiftx
 1.103.2.3  16-Nov-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #427):

sys/dev/ic/dw_hdmi_phy.c: revision 1.2
sys/dev/ic/dw_hdmi.c: revision 1.4
sys/dev/fdt/ausoc.c: revision 1.5
sys/dev/ic/dw_hdmi.h: revision 1.2
sys/dev/ic/dw_hdmi.h: revision 1.3
sys/dev/ic/dw_hdmi.h: revision 1.4
sys/conf/files: revision 1.1242
sys/dev/fdt/fdtvar.h: revision 1.57
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.11
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.12
sys/arch/arm/rockchip/rk3399_cru.c: revision 1.13
sys/arch/evbarm/conf/GENERIC64: revision 1.110
sys/arch/arm/rockchip/rk_drm.c: revision 1.1
sys/arch/arm/rockchip/rk_drm.c: revision 1.2
sys/arch/evbarm/conf/GENERIC64: revision 1.112
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.1
sys/dev/fdt/fdt_clock.c: revision 1.10
sys/arch/evbarm/conf/GENERIC64: revision 1.113
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.2
sys/arch/arm/rockchip/rk_drm.h: revision 1.1
sys/arch/arm/rockchip/rk_dwhdmi.c: revision 1.3
sys/arch/arm/rockchip/rk_fb.c: revision 1.1
sys/arch/arm/dts/rk3399-rockpro64.dts: revision 1.9
sys/arch/arm/rockchip/rk_vop.c: revision 1.1
sys/arch/arm/rockchip/rk_vop.c: revision 1.2
sys/arch/arm/rockchip/rk_i2c.c: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.6
sys/arch/arm/rockchip/rk_cru.h: revision 1.7
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.4
sys/arch/arm/rockchip/rk_cru_composite.c: revision 1.5
sys/arch/arm/rockchip/files.rockchip: revision 1.21
sys/arch/arm/rockchip/rk_i2s.c: revision 1.1
sys/arch/arm/rockchip/files.rockchip: revision 1.22
sys/dev/ic/dw_hdmi.c: revision 1.2
sys/dev/ic/dw_hdmi_phy.c: revision 1.1
sys/dev/ic/dw_hdmi.c: revision 1.3

Support reads of more than 32 bytes in a single xfer.

Add support for internal DesignWare HDMI PHYs

Add fdtbus_clock_enable and fdtbus_clock_enable_index shortcuts

Add HDMI and VOP clocks

WIP display driver for Rockchip RK3399

Add (commented out) Rockchip display support

Select the correct MPLL and PHY settings for the requested pixel clock
Force DCLK_VOP0/1 dividers to 1 and select closest match when setting PLL
rates.

Fix typo in phy config table

Fix a few swapped fields

Remove debug output

Enable Rockchip display support

Set sysclk rate at set_format time, so the link set_format callback can read the new sysclk

Add I2S audio input support.
Add software volume controls.
Add support for I2S clocks.
Add driver for Rockchip I2S/PCM controller.
Enable HDMI audio on ROCKPro64
Add rki2s
Add audio support
 1.103.2.2  03-Oct-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #273):

sys/arch/evbarm/conf/files.evbarm: revision 1.33
sys/arch/evbarm/conf/GENERIC64: revision 1.108

Increase maxusers to 64 for 64-bit kernels
 1.103.2.1  23-Sep-2019  martin Pull up following revision(s) (requested by jmcneill in ticket #230):

sys/dev/pci/files.pci: revision 1.415
distrib/sets/lists/man/mi: revision 1.1655
sys/dev/pci/if_mcx.c: revision 1.1
share/man/man4/Makefile: revision 1.683
share/man/man4/mcx.4: revision 1.1
sys/arch/evbarm/conf/GENERIC64: revision 1.107
sys/dev/pci/files.pci: revision 1.414

Add support for Mellanox 5th generation ethernet devices. This driver
supports the ConnectX-4 Lx EN, ConnectX-4 EN, ConnectX-5 EN, and
ConnectX-6 EN adapters.

Driver ported from OpenBSD.

add mcx attachment.

Correct mcx comment, drop mii dependency
 1.130.2.3  29-Feb-2020  ad Sync with head.
 1.130.2.2  25-Jan-2020  ad Sync with head.
 1.130.2.1  17-Jan-2020  ad Sync with head.
 1.149.2.1  20-Apr-2020  bouyer Sync with HEAD
 1.165.2.3  03-Apr-2021  thorpej Sync with HEAD.
 1.165.2.2  03-Jan-2021  thorpej Sync w/ HEAD.
 1.165.2.1  14-Dec-2020  thorpej Sync w/ HEAD.
 1.177.4.1  01-Aug-2021  thorpej Sync with HEAD.
 1.206.2.6  08-Aug-2025  martin Pull up following revision(s) (requested by skrll in ticket #1148):

sys/arch/evbarm/conf/GENERIC64: revision 1.227
sys/dev/pci/files.pci: revision 1.451
sys/dev/pci/pvscsi.c: revision 1.1
sys/dev/pci/pvscsi.c: revision 1.2
sys/dev/pci/pvscsi.h: revision 1.1
sys/arch/amd64/conf/GENERIC: revision 1.617

Add a port of the FreeBSD driver for the VMware PV SCSI controller found
in VMware's ESXi product.

Tested on ESXi/Arm such that an installation from ISO succeeds and boots.

Add the barrier that a comment describes.
 1.206.2.5  09-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #939):

distrib/sets/lists/debug/module.md.amd64: revision 1.18
sys/modules/Makefile: revision 1.292
lib/libc/gen/arc4random.c: revision 1.34
lib/libc/gen/arc4random.c: revision 1.35
lib/libc/gen/arc4random.c: revision 1.36
lib/libc/gen/arc4random.c: revision 1.37
sys/kern/kern_entropy.c: revision 1.70
lib/libc/gen/arc4random.c: revision 1.38
sys/kern/kern_entropy.c: revision 1.71
lib/libc/gen/getentropy.3: revision 1.8
distrib/sets/lists/modules/md.amd64: revision 1.103
share/man/man4/rnd.4: revision 1.42
share/man/man4/rnd.4: revision 1.44
lib/libc/include/arc4random.h: revision 1.1
distrib/sets/lists/man/mi: revision 1.1786
sys/arch/i386/conf/GENERIC: revision 1.1258
sys/modules/acpivmgenid/acpivmgenid.ioconf: revision 1.1
sys/arch/amd64/conf/ALL: revision 1.190
distrib/sets/lists/debug/mi: revision 1.446
sys/arch/i386/conf/ALL: revision 1.521
lib/libc/gen/Makefile.inc: revision 1.219
distrib/sets/lists/debug/module.md.i386: revision 1.12
sys/dev/acpi/acpi_vmgenid.c: revision 1.1
sys/dev/acpi/acpi_vmgenid.c: revision 1.2
lib/libc/include/reentrant.h: revision 1.22
sys/arch/evbarm/conf/GENERIC64: revision 1.219
share/man/man4/Makefile: revision 1.735
distrib/sets/lists/modules/md.i386: revision 1.100
distrib/sets/lists/tests/mi: revision 1.1334
lib/libc/gen/arc4random.3: revision 1.22
sys/dev/acpi/files.acpi: revision 1.133
lib/libc/gen/arc4random.3: revision 1.23
tests/lib/libc/gen/t_arc4random.c: revision 1.1
sys/sys/entropy.h: revision 1.6
sys/arch/amd64/conf/GENERIC: revision 1.614
sys/modules/acpivmgenid/Makefile: revision 1.1
share/man/man4/acpivmgenid.4: revision 1.1
lib/libc/gen/Makefile.inc: revision 1.220
tests/lib/libc/gen/Makefile: revision 1.56
share/man/man4/acpivmgenid.4: revision 1.2
share/man/man4/acpivmgenid.4: revision 1.3

(all via patch)

Catch up with all the lint warnings since exit on warning was disabled.

Disable 'missing header declaration' and 'nested extern' warnings for now.
acpivmgenid(4): New driver for virtual machine generation ID.

Added to amd64/ALL and i386/ALL kernel configurations, and made
available as a loadable module acpivmgenid.kmod on x86, for now.
TBD: Add to all ACPI-supporting GENERIC kernels.
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

entropy(9): Factor out subroutines to reset and gather entropy.
`Reset' means we keep the data in the pool, but assume it had zero
entropy. `Gather' means we request samples from all on-demand
sources and wait for the synchronous ones to complete.

No functional change intended, other than to expose new symbols --
just preparation to expose these to acpivmgenid(4), so it can use
these when the VM host notifies us that we, the guest, have been
cloned.
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

acpivmgenid(4): Reset and gather entropy on VM clone notification.
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

arc4random(3): Reseed if system entropy epoch changes.
This can happen, for example, if the system is a VM instance, and the
VM is cloned.

This incurs the cost of a system call on every arc4random call, which
is unfortunate, but
1. we don't currently have a (machine-independent) mechanism for
exposing a read-only page to userland shared by the kernel to
enable a cheaper access path to the entropy epoch; and
2. the algorithm here -- a simple application of ChaCha -- is likely
also a bottleneck and could be much cheaper by
(a) using sys/crypto/chacha for machine-dependent vectorized
ChaCha code, and
(b) filling a buffer (somewhere between a cipher block and a page)
in a batch at a time, instead of running ChaCha to generate
only 32 bytes at a time.
So although this might be a performance hit, the security benefit is
worthwhile and we have a clear path to do better than reversing the
performance hit later.
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

acpivmgenid(4): Nix BUGS that have been squashed.
Reference kern.entropy.epoch for the remaining bug (which is a
performance issue, not a security issue).
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

entropy(9): Allow unprivileged reads of sysctl kern.entropy.epoch.

Applications need this in order to know when to reseed. (We should
also expose it through a page shared read-only with userland for
cheaper access, but until we do, let's let applications get at it
through sysctl.)
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

arc4random.c: Fix test program.

This isn't wired up anywhere, but let's reduce the bitrot. It was
helpful in reminding me that kern.entropy.epoch was, for reasons I
can't remember, restricted to privileged access.
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

amd64, evbarm, i386: Add acpivmgenid(4) to GENERIC.
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

rnd(4): Document kern.entropy.epoch is unprivileged and elaborate.
Cross-reference acpivmgenid(4).
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

arc4random(3): Note that arc4random respects kern.entropy.epoch.
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork
Add debug info for new acpivmgenid module

arc4random(3): Add automatic tests.

This verifies that:
- arc4random zeroes its state and reseeds itself on fork
- arc4random reseeds itself on entropy consolidation (e.g., VM clone)
- arc4random falls back to global state if it can't allocate local
state because address space limits cause mmap to fail

NOTE: This adds a new libc symbol __arc4random_global, but it's in
the reserved namespace and only used by t_arc4random, so no libc
minor bump.
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

getentropy(3): Note intent to reseed on VM clone, and caveats.

Tidy markup and pacify some mandoc -Tlint complaints while here.
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

Bump dates on man pages recently updated to mention VM clones.
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

arc4random(3): Pacify some of lint's complaints.
PR kern/58632: getentropy(2) and arc4random(3) do not reseed on VM
fork

arc4random: suppress another lint warning
 1.206.2.4  17-Jun-2024  martin Pull up following revision(s) (requested by nia in ticket #698):

sys/arch/evbarm/conf/GENERIC64: revision 1.216

Add some "simpler" PCI audio devices to aarch64's GENERIC64

These serve as alternatives to hdaudio. Tested in QEMU.
 1.206.2.3  14-Oct-2023  martin Pull up following revision(s) (requested by yamaguchi in ticket #409):

sys/dev/pci/if_ixl.c: revision 1.90
sys/dev/pci/if_ixl.c: revision 1.91
sys/dev/pci/if_ixl.c: revision 1.92
sys/dev/pci/if_ixl.c: revision 1.93
sys/arch/evbarm/conf/GENERIC64: revision 1.214

ixl(4): skip getting link status if the last command is running

ixl(4): use cv_broadcast to wakeup ioctl and workqueue context.
Commands may be issued at the same time from the both context.

ixl(4): update link status in workqueue

ixl(4): Print device info on attach
Without PCIVERBOSE option:
ixl0 at pci1 dev 0 function 0: vendor 8086 product 1572 (rev. 0x01)
With PCIVERBOSE option:
ixl0 at pci1 dev 0 function 0: Intel XL710 SFP+ Ethernet (SFI) (rev. 0x01)
OK yamaguchi@

aarch64/GENERIC64: Add ixl(4)
Works just fine for little-endian on LX2K with UEFI firmware.
Not tested for big-endian yet; attach fails on ROCKPro64 due to
host controller problem.
OK yamaguchi@
 1.206.2.2  08-Oct-2023  martin Pull up following revision(s) (requested by rin in ticket #393):

sys/dev/pci/igc/if_igc.c up to 1.3
sys/dev/pci/igc/if_igc.h up to 1.2
sys/dev/pci/igc/igc_api.c up to 1.2
sys/dev/pci/igc/igc_api.h up to 1.2
sys/dev/pci/igc/igc_base.c up to 1.2
sys/dev/pci/igc/igc_base.h up to 1.2
sys/dev/pci/igc/igc_defines.h up to 1.2
sys/dev/pci/igc/igc_evcnt.h up to 1.1
sys/dev/pci/igc/igc_hw.h up to 1.2
sys/dev/pci/igc/igc_i225.c up to 1.2
sys/dev/pci/igc/igc_i225.h up to 1.2
sys/dev/pci/igc/igc_mac.c up to 1.2
sys/dev/pci/igc/igc_mac.h up to 1.2
sys/dev/pci/igc/igc_nvm.c up to 1.2
sys/dev/pci/igc/igc_nvm.h up to 1.2
sys/dev/pci/igc/igc_phy.c up to 1.2
sys/dev/pci/igc/igc_phy.h up to 1.2
sys/dev/pci/igc/igc_regs.h up to 1.2
distrib/sets/lists/man/mi: revision 1.1766
sys/arch/amd64/conf/GENERIC: revision 1.606
sys/arch/evbppc/conf/DHT: revision 1.5
sys/arch/evbarm/conf/GENERIC64: revision 1.213
share/man/man4/Makefile: revision 1.733
sys/arch/amd64/conf/ALL: revision 1.181
share/man/man4/igc.4: revision 1.1
sys/dev/pci/files.pci: revision 1.447
sys/arch/amd64/conf/XEN3_DOM0: revision 1.200
doc/CHANGES (apply patch)

Add igc(4) for Intel I225/I226 series ethernet devices
 1.206.2.1  26-Dec-2022  martin Pull up following revision(s) (requested by nia in ticket #23):

sys/arch/evbarm/conf/GENERIC64: revision 1.207

PR port-arm/57044 allow vcaudio on RPI 4 to attach when booting with EFI
 1.216.2.2  02-Aug-2025  perseant Sync with HEAD
 1.216.2.1  01-Jul-2024  perseant Sync with HEAD.
 1.226.2.1  08-Aug-2025  martin Pull up following revision(s) (requested by skrll in ticket #6):

sys/arch/evbarm/conf/GENERIC64: revision 1.227
sys/dev/pci/files.pci: revision 1.451
sys/dev/pci/pvscsi.c: revision 1.1
sys/dev/pci/pvscsi.c: revision 1.2
sys/dev/pci/pvscsi.h: revision 1.1
sys/arch/amd64/conf/GENERIC: revision 1.617

Add a port of the FreeBSD driver for the VMware PV SCSI controller found
in VMware's ESXi product.

Tested on ESXi/Arm such that an installation from ISO succeeds and boots.

Add the barrier that a comment describes.

RSS XML Feed