Commit graph

9352 commits

Author SHA1 Message Date
John Baldwin
fd3190c2da sys: Disable -Walloc-size-larger-than for GCC 9+
By default this warns about sizes larger than PTRDIFF_MAX passed to
malloc (rather than SIZE_MAX).  This doesn't trigger
deterministically, but it does trigger for kmalloc() of struct_size()
in iwlwifi's iwl_configure_rxq even when struct_size() is changed to
use PTRDIFF_MAX.  NB: struct_size() in Linux caps the size at
SIZE_MAX, not PTRDIFF_MAX via size_mul().

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D42587

(cherry picked from commit ede077bf2a259c23923d1ab1231dc8c4577e6672)
2024-01-03 09:43:48 -08:00
Rick Macklem
b9410313c6 nfscl/kgssapi: Fix Kerberized NFS mounts to pNFS servers
During recent testing related to the IETF NFSv4 Bakeathon, it was
discovered that Kerberized NFSv4.1/4.2 mounts to pNFS servers
(sec=krb5[ip],pnfs mount options) was broken.
The FreeBSD client was using the "service principal" for
the MDS to try and establish a rpcsec_gss credential for a DS,
which is incorrect. (A "service principal" looks like
"nfs@<fqdn-of-server>" and the <fqdn-of-server> for the DS is not
the same as the MDS for most pNFS servers.)

To fix this, the rpcsec_gss code needs to be able to do a
reverse DNS lookup of the DS's IP address.  A new kgssapi upcall
to the gssd(8) daemon is added by this patch to do the reverse DNS
along with a new rpcsec_gss function to generate the "service
principal".

A separate patch to the gssd(8) will be committed, so that this
patch will fix the problem.  Without the gssd(8) patch, the new
upcall fails and current/incorrect behaviour remains.

This bug only affects the rare case of a Kerberized (sec=krb5[ip],pnfs)
mount using pNFS.

This patch changes the internal KAPI between the kgssapi and
nfscl modules, but since I did a version bump a few days ago,
I will not do one this time.

(cherry picked from commit dd7d42a1fae5a4879b62689a165238082421f343)
2023-12-23 17:03:58 -08:00
Mark Johnston
c976896db7 arm: Compile vfp.c conditionally rather than using an ifdef
No functional change intended.

MFC after:	1 week

(cherry picked from commit 96465c789a5ff2619c5d49305517b35db9754ffb)
2023-12-17 21:07:45 -05:00
Konstantin Belousov
8645e7c83d Set installed kernel and driver files access modes using KMODMODE var
(cherry picked from commit d3849ec3c9e700956a8a1d03f7755d586934f225)
2023-12-02 03:14:52 +02:00
Konstantin Belousov
22584860f2 mlx5_core: add new files to the static files list
(cherry picked from commit 6eda49b7bfd3a5e013bef54262dddf9a54a3be07)
2023-11-22 03:40:29 +02:00
Mark Johnston
c89523d1c4 kmsan: Set -fno-sanitize-memory-param-retval for now
As of LLVM 16, -fsanitize-memory-param-retval is the default.  It yields
significantly smaller code, but the KMSAN runtime interceptors need to
be updated to stop checking shadow state of parameters.  Apply a minimal
workaround for now.

MFC after:	3 days
Sponsored by:	Klara, Inc.
Sponsored by:	Juniper Networks, Inc.

(cherry picked from commit b6c653c9746342b373af01979319b3cb123b2872)
2023-10-20 12:02:05 -04:00
Emmanuel Vadot
b4cd14485a i2c: Add Microcrystal RV3032 RTC driver
This is a simple RTC driver for the rv3032 from Microcrystal.
Just the basic functionality is implemented (no timer, alarm etc ..).

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41995

(cherry picked from commit 1d6a6a524409662992ca96bc91ae69b2a2a5ff35)
2023-10-18 16:32:19 +02:00
Emmanuel Vadot
7b824791e7 i2c: Add cadence iic driver
This IP is found in Xilinx SoC, it only been tested on ZynqMP (arm64)
so only enable it there for now.

Differential Revision:	https://reviews.freebsd.org/D41994

(cherry picked from commit 137b58e4d2044adc200d13c8989d3746a0a4bd7f)
2023-10-18 16:32:17 +02:00
Emmanuel Vadot
c133589105 iicbus: Move opencores i2c driver into controller subdirectory
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41914

(cherry picked from commit 125f5c5b48b1fdccf364b821ce48bfdbd9687ed1)
2023-10-18 16:32:15 +02:00
Emmanuel Vadot
96edbfe36b iicbus: Move i2c sensors drivers into new sensor subdirectory
No reason that they should live directly under iicbus

Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41913

(cherry picked from commit 7c569caa0a6fffa7e1cc0a7f61e986dbc7c59074)
2023-10-18 16:32:14 +02:00
Emmanuel Vadot
83dcc494a7 iicbus: conf: Fix pcf8574 entry
It lives in the gpio subdirectory

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41912

(cherry picked from commit 918a10c9f792d2c2f78b75626f7bf2abc85a0fff)
2023-10-18 16:32:12 +02:00
Emmanuel Vadot
cd2f6226e7 iicbus: Move ADC drivers into a new adc subfolder
No reason that they should live directly under iicbus

Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41911

(cherry picked from commit 06589d6e029c6ff64a7816d743e0a508abe6193b)
2023-10-18 16:32:11 +02:00
Emmanuel Vadot
26dd10a4f3 iicbus: Move adm1030 and adt746x to new pwm subdirectory
Those are (mainly) pwm controller so move it under a new subdirectory.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41910

(cherry picked from commit 22d7dd834bc5cd189810e414701e3ad1e98102e4)
2023-10-18 16:32:10 +02:00
Emmanuel Vadot
8d715e2f49 iicbus: Move Silergy pmic/regulators under pmic/silergy subdirectory
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41909

(cherry picked from commit 062944cc4227e7bd002e4de2be48ec9b710bfaa5)
2023-10-18 16:32:08 +02:00
Emmanuel Vadot
5e25c410bd iicbus: Move remaining rtc driver into rtc subfolder
No reason that they should live directly under iicbus

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41908

(cherry picked from commit 2f16049c985a364e2bd2b256f5bef9af17e10c62)
2023-10-18 16:32:07 +02:00
Emmanuel Vadot
a5b3cbe6cc iicbus: Move twsi under a new controller subdirectory
The folder is a mess so start moving stuff into sub-directories.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41907

(cherry picked from commit 580d00f42fdd94ce43583cc45fe3f1d9fdff47d4)
2023-10-18 16:32:05 +02:00
Emmanuel Vadot
20d6c796fa arm64: zynqmp: Add clock driver
Add clock and reset drivers for the ZynqMP SoC.
The clocks are discovered by talking to the firmware as the topology isn't
fixed on this SoC.

Differential Revision:	https://reviews.freebsd.org/D41812
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 4e579ad047720775ab580b74192c7de8a3386fea)
2023-10-18 16:31:03 +02:00
Emmanuel Vadot
ab8f34675a arm64: zynqmp: Add firmware driver
The ZynqMP SoC have a MCU running a firmware to control clocks, resets,
fpga loading etc ...
Add a driver that can be use to communicate with it.
For now only the clock and reset part are implemented.

Differential Revision:	https://reviews.freebsd.org/D41811
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 9e88711f28dc9afa7d68ae8dd027d2399a2a290b)
2023-10-18 16:31:01 +02:00
Kristof Provost
ff15498894 netlink: move NETLINK define to opt_global.h
Move the NETLINK define into opt_global.h so we can rely on it being
set correctly, without having to remember to include opt_netlink.h.
This ensures that the NETLINK define is correctly set. If not we
may end up with unloadable modules, due to missing symbols (such as
nlmsg_get_group_writer).

PR:		274306
Reviewed by:	imp, markj
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42179

(cherry picked from commit ab393e9548f8cc0ee28499c411963b798ebb38a5)
2023-10-16 09:42:33 +02:00
Ed Maste
f6fa4749f7 newvers: remove references to svnliteversion
svnliteversion was provided by the base system copy of subversion,
which was disabled in a2bc17474b ("Disable building svnlite(1) by
default.")

Reviewed by:	zlei
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42034

(cherry picked from commit 826d1446791816fcaa9be59aedc7295ffbc8d5bb)
2023-10-13 10:13:14 -04:00
Alexander Motin
2ed56a7bfe Untie strchrnul() from gdb.
MFC after:	10 days

(cherry picked from commit 2373e704aa1a5dcb7609badfdb0be4ceb4966d74)
2023-10-03 09:57:16 -04:00
Ed Maste
803f088147 kernel: remove unused HWPMC_MIPS_BACKTRACE option
MIPS was removed after FreeBSD 13.

Reported by:	andrew

(cherry picked from commit 5b732ae8332b2bad256016569c0ead6d918bdf79)
2023-09-29 08:26:22 -04:00
Eric Joyner
65d0d78073
ice_ddp: Update to 1.3.35.0
This is intended to be used with the upcoming updated ice(4) version
1.38.16-k.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Sponsored by:	Intel Corporation

(cherry picked from commit e04c4b4a369df3f1dcbebbdf726193f02af60801)
2023-09-22 13:37:17 -07:00
Dag-Erling Smørgrav
f92a598782 newvers.sh: Avoid picking up stray envars.
89f361f742 added a mechanism to allow arbitrary overrides from the
command line.  Unfortunately, it also had the (likely unintended)
effect of allowing RELEASE and VERSION to be passed in from the
environment, and Makefile.inc1 happens to define VERSION for the
benefit of pkgbase.  To restore the status quo, unset RELEASE and
VERSION at the top of the script.

Fixes:		89f361f742
MFC after:	3 days
Reviewed by:	gallatin, sjg, emaste
Differential Revision:	https://reviews.freebsd.org/D41845

(cherry picked from commit 9f16abf8d3561cb1a2c459eb6cb8fce06223c9b3)
2023-09-14 08:56:45 +00:00
Glen Barber
edbd9c3c32 release: update __FreeBSD_version after branching releng/14.0
Rename from ALPHA to STABLE following the branch.

Approved by:	re (implicit)
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd
2023-09-07 20:06:07 -04:00
Glen Barber
4c3f144478 release: update stable/14 to ALPHA4
Approved by:	re (implicit)
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd
2023-08-31 19:57:10 -04:00
Glen Barber
2af9390e54 release: update stable/14 to ALPHA3
Approved by:	re (implicit)
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd
2023-08-24 19:59:16 -04:00
John Hall
7ea28254ec smartpqi: update to version 4410.0.2005
This updates the smartpqi driver to Microsemi's latest code. This will
be the driver for FreeBSD 14 (with updates), but no MFC is planned.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D41550
2023-08-24 15:25:09 -06:00
Jake Freeland
af93fea710 timerfd: Move implementation from linux compat to sys/kern
Move the timerfd impelemntation from linux compat code to sys/kern. Use
it to implement the new system calls for timerfd. Add a hook to kern_tc
to allow timerfd to know when the system time has stepped. Add kqueue
support to timerfd. Adjust a few names to be less Linux centric.

RelNotes: YES
Reviewed by: markj (on irc), imp, kib (with reservations), jhb (slack)
Differential Revision: https://reviews.freebsd.org/D38459
2023-08-24 14:28:56 -06:00
Emmanuel Vadot
0fd310c83c arm64: Remove duplicate fdt build option
Reported by:	andrew
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2023-08-23 20:18:38 +02:00
Emmanuel Vadot
29bfcb3a28 arm64: xilinx: Add glue driver for usb3 controller
Like other dwc3 controller, on Xilinx ZynqMP the base node is just here
to provide resets, the main dwc3 controller node is a child node.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
2023-08-23 09:00:05 +02:00
Konstantin Belousov
4a69fc16a5 Add membarrier(2)
This is an attempt at clean-room implementation of the Linux'
membarrier(2) syscall.  For documentation, you would need to read
both membarrier(2) Linux man page, the comments in Linux
kernel/sched/membarrier.c implementation and possibly look at
actual uses.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D32360
2023-08-23 03:02:21 +03:00
Val Packett
64fbda90da Add atopcase, the Apple HID over SPI input driver
The driver provides support for Human Interface Devices (HID) on
Serial Peripheral Interface (SPI) buses on Apple Intel Macs
produced in 2015-2018.

The driver appears to work more stable after installation of Darwin OSI
in acpi(4) driver.
To install Darwin OSI insert following lines into /boot/loader.conf:

hw.acpi.install_interface="Darwin"
hw.acpi.remove_interface="Windows 2009, Windows 2012"

Reviewed by:	wulf
Differential revision:	https://reviews.freebsd.org/D39863
2023-08-20 12:53:32 +03:00
Dmitry Salychev
58983e4b02
dpaa2: Clean up channels in separate tasks
Each channel gets its own DMA resources, cleanup and "bufferpool"
tasks, and a separate cleanup taskqueue to isolate channels operation
as much as possible to avoid various kernel panics under heavy network
load.

As a side-effect of this work, dpaa2_buf structure is simplified and
all of the functions to re-seed those buffers are gathered now in
dpaa2_buf.h and .c files; functions to work with channels are
extracted into dpaa2_channel.h and .c files as well.

Reported by:		dch
Reviewed by:		bz
Approved by:		bz (mentor)
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D41296
2023-08-20 10:17:26 +02:00
Konstantin Belousov
4318843250 std.nodebug: remove DIAGNOSTIC from debug configs
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-08-18 16:39:22 +03:00
Dmitry Salychev
2a9021898c
sff: Add SFP driver (fdt-based draft)
This basic version of the driver obtains properties of the "sff,sfp"
compatible devices and implements a simple interface to provide an I2C
bus device for the rest of the drivers (e.g. to implement SIOCGI2C).

Both of the interface and driver are subjects for a further
generalization to be used in case of non-FDT and non-arm64 platforms.

Reviewed by:		bz, manu
Approved by:		bz (mentor)
MFC after:		3 weeks
Differential Revision:	https://reviews.freebsd.org/D41440
2023-08-18 12:40:11 +02:00
Glen Barber
77013f29d0 release: update main to ALPHA2
Due to an issue being investigated, the branch of stable/14 will
be delayed a week.  This should not impact the rest of the schedule
for this cycle.

Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd
2023-08-17 20:08:32 -04:00
Andrew Turner
02f2706606 Add a virtio-gpu 2D driver
Add a driver to connect vt to the VirtIO GPU device in 2D mode. This
provides a output on the display when a qemu virtio gpu device is
added, e.g. with -device virtio-gpu-pci.

Tested on qemu using UTM, and a Hetzner arm64 VM instance.

Reviewed by:	bryanv (earlier version)
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D40094
2023-08-17 12:26:57 +01:00
Warner Losh
031beb4e23 sys: Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:58 -06:00
Warner Losh
71625ec9ad sys: Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
2023-08-16 11:54:24 -06:00
Warner Losh
95ee2897e9 sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:11 -06:00
Navdeep Parhar
8a2e880ab0 cxgbe(4): Update firmwares to 1.27.4.0
This is the list of changes since last release, taken from the release
notes of Chelsio Unified Wire 3.18.0.1.

Version : 1.27.4.0
Date    : 07/05/2023
=======================================
Fixes
-----

BASE:
- Handle 40G to 100G cable change.
- Avoid unnecessary i2c read.
=======================================

Obtained from:	Chelsio Communications
Sponsored by:	Chelsio Communications
MFC after:	1 week
2023-08-16 08:43:43 -07:00
Andrew Turner
9d09051e26 arm64: Add a driver for the Arm PL031 RTC
It is a simple RTC found in some Arm SoCs, e.g. the Arm Juno.

Reviewed by:	manu
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D41267
2023-08-15 13:13:39 +01:00
Bjoern A. Zeeb
bfed2417f4 qcom: fix panic in qcom_mdio_ipq4018 implementation
Fix a boot-time panic in qcom_mdio_ipq4018 due to a missing bus function
and hook the file up to the build so that it will not rot away.

Test booted on an ipq807x in 2022.
X-Differential Revision: extracted from D37882
2023-08-11 02:12:55 +00:00
Glen Barber
136fc49561 release: update main to ALPHA1
Update CURRENT to ALPHA1 as part of the 14.0-RELEASE cycle.

Approved by:	re (implicit)
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd
2023-08-10 20:02:11 -04:00
Emmanuel Vadot
c15106da82 arm64: xilinx: gpio: Add support for ZynqMP SoC
Add support for the gpio controller found in the ZynqMP SoC.
The registers are the same as the Zynq 7000, just the number of
banks/pins per banks differs.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
MFC after:	2 weeks
2023-08-10 09:21:55 +02:00
Marius Strobl
8f5dbc22e5 arswitch(4): Remove support for AR{7240,9340} found in MIPS SoCs only
With the general removal of MIPS support there's no longer a need to
support these integrated switches.

Approved by:	adrian
Differential Revision:	https://reviews.freebsd.org/D41394
2023-08-09 18:22:13 +02:00
Marius Strobl
077ef5b445 ath(4): Remove MIPS SoC build glue and AR9130 from FreeBSD HAL
All of these are obsoleted by the general removal of MIPS support.

Actually, corresponding to the removed AH_SUPPORT_x, there is more
superfluous support sprinkled across the HAL source. However, that
code is left in place for now in order to ease a sync to NetBSD.

Reviewed by:	emaste (w/ man page fix)
Approved by:	adrian
Differential Revision:	https://reviews.freebsd.org/D41355
2023-08-09 17:44:46 +02:00
Marius Strobl
37c8ee8847 ath(4): Remove MIPS AHB frontend and join PCI one w/ main support again
Following the removal of general MIPS support, there's no longer a need
to have the AHB bus-frontend in place, which according to Linux sources
also isn't used with any non-MIPS SoCs. For simplicity, PCI bus support
is only made conditional on the main one again, i. e. device ath_pci is
removed, and built into the main module, i. e. if_ath_pci.ko obsoleted,
respectively.
Effectively, this reverts the following commits and associated changes:
dba9c85977
e849bb3ecb

Approved by:	adrian
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D41354
2023-08-08 22:30:13 +02:00
Emmanuel Vadot
4b5f5fe78f arm64: intel: Remove firmware driver
This is now covered by ofw_firmware.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D37613
2023-08-08 15:13:33 +02:00