Commit graph

9428 commits

Author SHA1 Message Date
Gordon Tetlow
97415dba25 Add UPDATING entries and bump version
Approved by:	so
2025-02-21 17:07:19 +01:00
Mark Johnston
7c445da3ba Add UPDATING entries and bump version
Approved by:	so
2025-01-30 07:25:28 +01:00
Doug Rabson
4aa850d6cb Add an implementation of the 9P filesystem
This is derived from swills@ fork of the Juniper virtfs with many
changes by me including bug fixes, style improvements, clearer layering
and more consistent logging. The filesystem is renamed to p9fs to better
reflect its function and to prevent possible future confusion with
virtio-fs.

Several updates and fixes from Juniper have been integrated into this
version by Val Packett and these contributions along with the original
Juniper authors are credited below.

To use this with bhyve, add 'virtio_p9fs_load=YES' to loader.conf. The
bhyve virtio-9p device allows access from the guest to files on the host
by mapping a 'sharename' to a host path. It is possible to use p9fs as a
root filesystem by adding this to /boot/loader.conf:

	vfs.root.mountfrom="p9fs:sharename"

for non-root filesystems add something like this to /etc/fstab:

	sharename /mnt p9fs rw 0 0

In both examples, substitute the share name used on the bhyve command
line.

The 9P filesystem protocol relies on stateful file opens which map
protocol-level FIDs to host file descriptors. The FreeBSD vnode
interface doesn't really support this and we use heuristics to guess the
right FID to use for file operations.  This can be confused by privilege
lowering and does not guarantee that the FID created for a given file
open is always used for file operations, even if the calling process is
using the file descriptor from the original open call. Improving this
would involve changes to the vnode interface which is out-of-scope for
this import.

Differential Revision: https://reviews.freebsd.org/D41844
Reviewed by: kib, emaste, dch
MFC after: 3 months
Co-authored-by: Val Packett <val@packett.cool>
Co-authored-by: Ka Ho Ng <kahon@juniper.net>
Co-authored-by: joyu <joyul@juniper.net>
Co-authored-by: Kumara Babu Narayanaswamy <bkumara@juniper.net>
2025-01-10 10:30:32 +01:00
Chuck Silvers
8d280d9144 x86/ucode: add support for early loading of CPU ucode on AMD.
Sponsored by:	Netflix
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D43318
2024-12-11 13:34:58 +01:00
Xavier Beaudouin
eac0f46922 Add UDP encapsulation of ESP in IPv6
This patch provides UDP encapsulation of ESP packets over IPv6.
Ports the IPv4 code to IPv6 and adds support for IPv6 in udpencap.c
As required by the RFC and unlike in IPv4 encapsulation,
UDP checksums are calculated.

Co-authored-by:	Aurelien Cazuc <aurelien.cazuc.external@stormshield.eu>
Sponsored-by:	Stormshield
Sponsored-by:	Wiktel
Sponsored-by:	Klara, Inc.

Fix KASSERT in 80044c78 causing build failures

Move the KASSERT to where struct ip6_hdr is populated

Fixes:		80044c785cb040a2cf73779d23f9e1e81a00c6c3
Reported-by:	bapt
Reviewed-by:	markj
Sponsored-by:	Klara, Inc.
2024-12-11 13:34:57 +01:00
Colin Percival
c8918d6c74 Update in preparation for 14.2-RELEASE
- Bump BRANCH to RELEASE
- Add the anticipated RELEASE announcement date
- Set a static __FreeBSD_version

Approved by:	re (implicit)
Sponsored by:	Amazon
2024-11-29 00:00:00 +00:00
Colin Percival
5395ddd7aa 14.2: Update to RC1
Approved by:	re (implicit)
Sponsored by:	Amazon
2024-11-21 15:48:17 -08:00
Colin Percival
bcd5f95735 14.2: Update to BETA3
Approved by:	re (implicit)
Sponsored by:	Amazon
2024-11-15 15:23:22 -08:00
Colin Percival
0ff73c7796 14.2: Update to BETA2
Approved by:	re (implicit)
Sponsored by:	Amazon
2024-11-07 16:00:01 -08:00
Colin Percival
1db6ffb2a4 GPIO: Add ACPI _AEI support
Changes to acpi_gpiobus.c handle discovering and parsing the _AEI
objects and storing necessary data in device ivars.  A new gpioaei.c
file implements the device, which simply requests an interrupt when
the pin is triggered and invokes the appropriate _Exx or _Lxx ACPI
method.

This makes the GPIO "power button" work on arm64 Graviton systems,
allowing EC2 "Stop"/"Reboot" instance calls to be handled cleanly.
(Prior to this change, those requests would time out after 4 minutes
and the instance would be forcibly killed.)

Reviewed by:	imp, andrew, Ahmad Khalifa
Approved by:	re (kib)
MFC after:	3 days
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D47253
Co-authored-by:	Andrew Turner <andrew@FreeBSD.org>

(cherry picked from commit 9709bda03cd0f20eba0ba4276fc3c2e06354a54f)
(cherry picked from commit c2cd78d944)
2024-11-03 08:15:39 -08:00
Ahmad Khalifa
ce99ca6967 gpiobus(4): Add an acpi variant of gpiobus
This currently only implements the address space handler and attempts to
configure pins with flags obtained from ACPI.

Reviewed by:	wulf
Approved by:	re (kib)
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1359

(cherry picked from commit 92adaa5862d5ea94318a011e0618622d0fb72521)
(cherry picked from commit 14887d2c86)
2024-11-03 08:14:33 -08:00
Colin Percival
603608e520 14.2: create releng/14.2 branch
Update from PRERELEASE to BETA1
Switch pkg(8) configuration to use the quarterly repository
Bump __FreeBSD_version

Approved by:	re (implicit)
Sponsored by:	Amazon
2024-10-31 17:02:35 -07:00
Eric Joyner
a9d78bb714
ice_ddp: Update to 1.3.41.0
Primarily adds support for E830 devices, unlocking all of their
functionality.

As well, update the README and remove the non-FreeBSD sections
from it.

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

Sponsored by:	Intel Corporation

(cherry picked from commit f9a039060e834e89e0b2de1e8a442d78bd5c083d)
2024-10-30 13:51:47 -07:00
Andrew Turner
11b099f803 Add an Armv8 rndr random number provider
Armv8.5 adds an optional random number generator. This is implemented
as two special registers one to read a random number, the other to
re-seed the entropy pool before reading a random number. Both registers
will set the condition flags to tell the caller they can't produce a
random number in a reasonable amount of time.

Without a signal to reseed the entropy pool use the latter register
to provide random numbers to the kernel pool. If at a later time we
had a way to tell the provider if it needs to reseed or not we could
use the former.

On an Amazon AWS Graviton3 VM this never failed, however this may not
be the case on low end CPUs so retry reading the random number 10 times
before returning an error.

Reviewed by:	imp, delphij (csprng)
Sponsored by:	The FreeBSD Foundation
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D35411

(cherry picked from commit 9eecef052155646fbc5f8f533b952b372572d06a)
2024-10-21 15:03:26 +00:00
Colin Percival
e38b4c031c 14.2: Update stable/14 to -PRERELEASE
This marks the start of the FreeBSD 14.2 release cycle; the stable/14
tree is now in "code slush".

Developers are encouraged to prioritize fixing bugs (and/or merging bug
fixes from HEAD) over new features at this time.  Commit approval from
re@ is not required but if new features introduce problems they may be
removed from the release.

Approved by:	re (implicit)
Sponsored by:	Amazon
2024-10-17 17:07:44 -07:00
Bjoern A. Zeeb
20fe7e889f LinuxKPI: always include linux/kconfig.h
Always include linux/kconfig.h which seems to match Linux behaviour
and avoid errors compiling code expected from that file but never
included.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	emaste, imp
Differential Revision: https://reviews.freebsd.org/D46801

(cherry picked from commit 41283b454b7abd3de251ec8234d19b67dbca3916)
2024-10-16 21:49:45 +00:00
Kristof Provost
0d4081ed69 sys: add conf/std.debug, generic debugging options
The new sys/conf/std.debug contains the list of debugging options
enabled by default in -CURRENT, so they don't need to be listed
individually in every kernel config.

Introduce *-DEBUG variants of the major kernel configs.

(cherry picked and modified from commit 4f8f9d708e6a4143f3b178bfab10d0a9b75ba2fe)

Reviewed by:	markj, imp, olce (previous version)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46871
2024-10-09 10:44:35 +02:00
Zhenlei Huang
bb5f701614 kernel: Add defination of .init_array and .fini_array for all other platforms
Currently these sections are not used but defined only for amd64 and
i386. Added them for all other platforms to keep all platforms in sync.
There should be no functional change.

This change is extracted from a bigger patch [1] of hselasky, with
additional fix for the order of .fini_array section.

1. https://reviews.freebsd.org/D40467

Obtained from:	hselasky
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45214

(cherry picked from commit 3e76d05231b0aa77d922bdbc9abf62d9747a91ab)
2024-09-22 22:45:36 +08:00
Zhenlei Huang
1d94490aee kernel: Fix defining of .init_array and .fini_array sections
These input sections can have decimal numbers as the priority suffix.
Clang emits the '%u' form, while SORT is an alias for SORT_BY_NAME,
hence will result in wrong order of constructors / destructors in
output sections. Fix by using the correct sorting command
SORT_BY_INIT_PRIORITY instead [1].

The functions referenced by section .fini_array is in the normal order,
but been executed in the reverse order. The order is same with
.init_array section.

Currently these sections are not used, there should be no functional
change.

Note: As for the .ctors and .dtors sections, both Clang and GCC emit
the priority suffix in the form of '%05u', so there is no semantic
difference between SORT_BY_NAME and SORT_BY_INIT_PRIORITY for those
sections [2].

This fix is extracted from a bigger patch [3] of hselasky, with
additional fix for .fini_array section.

1. https://sourceware.org/binutils/docs/ld/Input-Section-Wildcards.html
2. https://reviews.llvm.org/D91187
3. https://reviews.freebsd.org/D40467

Reviewed by:	imp (previous version)
Obtained from:	hselasky
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45194

(cherry picked from commit e15b5ba77d693609c9a452d1b0a1cdd5eb29350d)
2024-09-22 22:45:36 +08:00
Zhenlei Huang
497f577f46 kernel: Make some compile time constant variables const
Those variables are not going to be changed at runtime. Make them const
to avoid potential overwriting. This will also help spotting accidental
global variables shadowing, since the variable's name such as `version`
is short and commonly used.

This change was inspired by reviewing khng's work D44760.

No functional change intended.

MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D45227

(cherry picked from commit 356be1348dac94ba0d2dc1f479bc1f8a2ebaa03a)
2024-09-20 18:04:02 +08:00
Jessica Clarke
5985c87b96 riscv: Convert local interrupt controller to a newbus PIC
Currently the local interrupt controller implementation is based on
pre-INTRNG arm/arm64 code, using hand-rolled event code rather than
INTRNG. This then interacts weirdly with the PLIC, and other future
interrupt controllers like the APLIC and IMSICs in the upcoming AIA
specification, since they become the root PIC despite not being the
logical root. Instead, use a real newbus device for it and register
it as the root PIC.

This also adapts the IPI code to make use of the newly-added INTRNG
generic IPI handling framework, adding a new sbi_ipi as the PIC. In
future there will be alternative devices for sending IPIs that will
register with higher priorities, such as the proposed AIA IMSIC and
ACLINT SSWI.

Reviewed by:	mhorne
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D35901

(cherry picked from commit 6ec8bf9f3d17b712d657c42f74fba936dd284d04)
2024-09-07 01:00:28 +01:00
Andrew Turner
a194eabe08 arm64: Use store-pair to zero the kernel bss
While this won't be noticed by most users the time to zero the bss
while using instruction tracing in the Arm FVP models (simulators) is
noticeable.

Reduce this time by using a store-pair instruction to double the size
of memory we zero on each iteration of the loop.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42733

(cherry picked from commit f1bc3750cf9a6623b0c0861984ef2a8ac966a4e3)
2024-09-02 08:49:38 +00:00
Mark Johnston
096cb89033 dtrace: Avoid including dtrace_isa.c directly into dtrace.c
This was done in the original DTrace import, presumably because that
made it a bit easier to handle includes.  However, this can cause
dtrace_getpcstack() to be inlined into dtrace_probe(), resulting in a
missing frame in stack traces since dtrace_getpcstack() takes care to
bump "aframes" to account for its own stack frame.

To avoid this, compile dtrace_isa.c separately on all platforms.  Add
requisite includes.

MFC after:	2 weeks
Sponsored by:	Innovate UK

(cherry picked from commit 82283cad12a417abfb1469d899b2d7cfb1d38f77)
2024-08-08 15:53:50 +00:00
Dimitry Andric
2b05d46dc3 Fix incorrect -I option in sys/conf/Makefile.arm
In commit 8e53cd7099 the intent was to add sys/dts/include to the
compiler include path, but this was spelled incorrectly, leading to an
error with clang 19:

  cc: error: no such include directory: '$/dts/include' [-Werror,-Wmissing-include-dirs]

Use the spelling -I$S/dts/include instead.

MFC after:	3 days

(cherry picked from commit 8ce3e489a5eec1b41bc5e08f43c5e95aa8115b93)
2024-08-04 12:21:10 +02:00
Dag-Erling Smørgrav
2495f56913 filemon: Document how to build into the kernel.
MFC after:	3 days
Reviewed by:	olce, imp
Differential Revision:	https://reviews.freebsd.org/D46184

(cherry picked from commit 057453ffdf57bdfcbadb5d1834d425812e01ff43)

filemon: Not an option.

MFC after:	3 days

(cherry picked from commit b4e4512d4669267fb220b7c1a2844c506673a3ce)
2024-08-01 18:15:58 +02:00
Emmanuel Vadot
8e908fab6c conf: Add usbhid and hidbus to GENERIC* kernel configs
Include the new unified HID stack by default in generic.
This will allow us to migrate to the multi-stack hkbd and hms instead of
relying on the older ukbd and ums which only work with USB.
To test those drivers just add hw.usb.usbhid.enable=1 in loader.conf

Differential Revision:	https://reviews.freebsd.org/D45658
Reviewed by:	emaste, imp, wulf (all older version)
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 13d00a43cba4c35fcc9e0ab567baf530126a6348)

conf: hidmap is always needed for hms

So bring it in when hms is in the kernel config

Fixes:	13d00a43cba4 ("conf: Add usbhid and hidbus to GENERIC* kernel configs")
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 5ed91e788f0b97c9e6c544671ffef71fad7cad27)

conf: powerpc: Add evdev to some kernel configs

Fixes:	13d00a43cba4 ("conf: Add usbhid and hidbus to GENERIC* kernel configs")
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 43a62df0b464e60895084c7f9d9eddf70906fda3)
2024-07-29 18:36:42 +02:00
John Baldwin
4ecd329b73 sys: Retire the ISCSI_INITIATOR_DEBUG option
This was used by the old iSCSI initiator, not the current one.

Reported by:	trasz

(cherry picked from commit f3f04c4027a71421b38094bb22e3aa4710ddcc38)
2024-07-18 13:33:23 -04:00
John Baldwin
d1c97c1871 NOTES: Move ENABLE_ALART option to MI NOTES next to intpm device
This option is for this driver.

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

(cherry picked from commit 5ea0b89242dbc1e4d4bac16983291a7c3803f88e)
2024-07-18 13:33:03 -04:00
John Baldwin
65e871e7c1 i386: Use DEV_HYPERV to enable HyperV APIC vector
This avoids requiring both 'device hyperv' and 'options HYPERV' for
kernel configs.  Instead, just 'device hyperv' can now be used
matching the kernel configuration used for amd64.

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

(cherry picked from commit e045163cce955c32332a02a8eb9a48f3c2cd3c3f)
2024-07-18 13:31:50 -04:00
John Baldwin
c0e4d94873 NOTES: Move the VirtIO entries to the MI NOTES file
While here, add virtio_gpu

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D44782

(cherry picked from commit 1f678b6ba215aad01a1610772c77af653a981601)
2024-07-18 13:30:41 -04:00
John Baldwin
e1d29e6b12 files: Sort the VirtIO device entries
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44781

(cherry picked from commit 1d51575980bd246c1583cd02df47278aac5b6f4c)
2024-07-18 13:24:57 -04:00
John Baldwin
97d1a0cde1 NOTES: Move safe(4) to the MI NOTES file
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44780

(cherry picked from commit ff3569be6fe01839affdefa14f55cc03a1f4f9d0)
2024-07-18 13:20:58 -04:00
John Baldwin
c68dcc0781 NOTES: Move IEEE80211_DEBUG_REFCNT to the MI NOTES file
This option is not specific to amd64

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

(cherry picked from commit 9c3fd2c1c7b8887d2ffaf14c61b04c55657d68bf)
2024-07-18 13:20:50 -04:00
John Baldwin
ff74083a6c files.x86: Pull in some more duplicate lines from files.{amd64,i386}
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44759

(cherry picked from commit b9c6fa339d9c7c90a1c0f9ebc000ecbde8873508)
2024-07-18 13:20:41 -04:00
John Baldwin
9f756367a0 NOTES: Move NVMe entries to MI file
While here, adjust the sample setting for NVME_USE_NVD to use a
non-default setting as is typical in entries in NOTES.

Discussed with:	imp
Reviewed by:	manu
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44691

(cherry picked from commit 8f7105a20697d47060dbedc966cf085a64aeced6)
2024-07-18 13:20:12 -04:00
John Baldwin
15e2ffbbfa NOTES: Tidy entries for SATA controllers
- Add typical comments after device entries (copied from amd64
  GENERIC)

- Add an entry for 'device ada'.  Normally this is pulled in via
  'device sd', but is documented in ada(4) and can be used to include
  ATA/SATA disk support in a kernel without SCSI disk support.

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44689

(cherry picked from commit a508f5d92a93cda11b0c68084dbb181f97e7f5f7)
2024-07-18 13:14:22 -04:00
John Baldwin
d6f503b781 NOTES: Add devices for iSCSI support
Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44688

(cherry picked from commit 76f22e353f66d9ec1c1bea1d72eeec56078d4728)
2024-07-18 13:14:08 -04:00
John Baldwin
41302e9e78 iser: Add kernel build glue
'device iser' is documented in iser(4) but not supported.  Hook it up
to the build.

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44687

(cherry picked from commit 60bb979b3c3224f01e96f7e3c92a270977d2587b)
2024-07-18 13:14:00 -04:00
John Baldwin
422911ca58 NOTES: Move OFED options to MI NOTES
Disable in armv7 NOTES to match sys/modules/Makefile

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44686

(cherry picked from commit 973d3a82096bc135f6c230e348e2f33c382096bc)
2024-07-18 13:06:06 -04:00
Andrew Turner
5b1f4e679d arm64: Disable outling atomics
We don't have the symbols for this. The virtio randon number driver
uses a C11 atomic operation. With inline atomics this is translated to
an Armv8.0 atomic operation, with outling atomics this becomes a
function call to a handler. As we don't have the needed function the
kernel fails to link.

Fix by disabling outline atomics for now.

Reviewed by:	brooks, imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45301

(cherry picked from commit 361da40536d7f6fc6c06d54b261c299d170ccf2f)
2024-07-15 12:30:02 +00:00
Andrew Turner
8ecef12113 sys: Build arm64 per-thread SSP with GCC
It has been supported since GCC 9. It is unlikely anything older than
that will build the kernel so mark it as supported by GCC.

Reviewed by:	brooks, jhb
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45267

(cherry picked from commit c2628accc029a07eb8ff73b6df7f7d6af194ca2d)
2024-07-15 12:27:54 +00:00
Souradeep Chakrabarti
7ece5993b7 Hyper-V: TLB flush enlightment using hypercall
Currently FreeBSD uses IPI based TLB flushing for remote
TLB flushing. Hyper-V allows hypercalls to flush local and
remote TLB. The use of Hyper-V hypercalls gives significant
performance improvement in TLB operations.

This patch set during test has shown near to 40 percent
TLB performance improvement.

Also this patch adds rep hypercall implementation as well.

Reviewed by:	whu, kib
Tested by:	whu
Authored-by:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Co-Authored-by:	Erni Sri Satya Vennela <ernis@microsoft.com>
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D45521

(cherry picked from commit 2b887687edc25bb4553f0d8a1183f454a85d413d)
2024-07-01 13:21:14 +00:00
Joshua Kinard
030596bfe4 kern: Remove leftover saf1761otg bits
Almost all code related to the saf1761 driver was removed in commit
44796b7e82, except for two small bits related to saf1761otg support.
This patch completes the removal.

PR:		279302
Signed-off-by:	Joshua Kinard <freebsd@kumba.dev>
Reviewed by:	mhorne
MFC after:	3 days
Fixes:		44796b7e82 ("mips: remove saf1761")

(cherry picked from commit 80828c6fab0292b5c5a34a63558d837cb9308fbd)
2024-06-06 11:23:01 -03:00
Warner Losh
2e7991d038 Fix bnxt build in LINT
LINT includes bnxt_re driver. Adjust the path in files, add missing
files and add a new BNXT_C to build (which thinly wraps OFED version
with bnxt specicif stuff).

Sponsored by:		Netflix
Fixes: acd884dec99a ("RDMA/bnxt_re: Add bnxt_re RoCE driver")

(cherry picked from commit 175b2c00a6bcb0c8c1f6b76b6da9bf4879a5848e)
2024-06-03 13:23:15 -06:00
Konstantin Belousov
339b47f019 x86/iommu: extract useful utilities into x86_iommu.c
(cherry picked from commit 40d951bc5932deb87635f5c1780a6706d0c7c012)
2024-06-01 12:24:24 +03:00
Christos Margiolis
ad677fb457 sound: Retire unit.*
The unit.* code is largely obsolete and imposes limits that are no
longer needed nowadays.

- Capping the maximum allowed soundcards in a given machine. By default,
  the limit is 512 (snd_max_u() in unit.c), and the maximum possible is
  2048 (SND_UNIT_UMAX in unit.h). It can also be tuned through the
  hw.snd.maxunit loader(8) tunable. Even though these limits are large
  enough that they should never cause problems, there is no need for
  this limit to exist in the first place.
- Capping the available device/channel types. By default, this is 32
  (snd_max_d() in unit.c). However, these types are pre-defined in
  pcm/sound.h (see SND_DEV_*), so the cap is unnecessary when we know
  that their number is constant.
- Capping the number of channels per-device. By default, the limit 1024
  (snd_max_c() in unit.c). This is probably the most problematic of the
  limits mentioned, because this limit can never be reached, as the
  maximum is hard-capped at either hw.snd.maxautovchans (16 by default),
  or SND_MAXHWCHAN and SND_MAXVCHANS.

These limtits are encoded in masks (see SND_U_MASK, SND_D_MASK,
SND_C_MASK in unit.h) and are used to construct a bitfield of the form
[dsp_unit, type, channel_unit] in snd_mkunit() which is assigned to
pcm_channel->unit.

This patch gets rid of everything unit.*-related and makes a slightly
different use of the "unit" field to only contain the channel unit
number. The channel type is stored in a new pcm_channel->type field, and
the DSP unit number need not be stored at all, since we can fetch it
from device_get_unit(pcm_channel->dev). This change has the effect that
we no longer need to impose caps on the number of soundcards,
device/channel types and per-device channels. As a result the code is
noticeably simplified and more readable.

Apart from the fact that the hw.snd.maxunit loader(8) tunable is also
retired as a side-effect of this patch, sound(4)'s behavior remains the
same.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D44912

(cherry picked from commit 25723d66369fe6786e9e4f5f77381b944755f267)
2024-05-17 21:30:25 +02:00
Ed Maste
3a8e15354e Enable kernel reproducible builds on stable branch
When the stable/13 branch was created the userland knob (in
share/mk/src.opts.mk) was changed to default to yes, but the kernel
default was not changed.  These two should always have the same default.
Regenerate src.conf.5, as the differing defaults previously confused
`makeman`.

Fixes: bfd1570515 ("Create the stable/13 branch")
Sponsored by: The FreeBSD Foundation
MFS from:	stable/13
MFS to:		releng/14.1

(cherry picked from commit d8644a5d2458588dd7d8e44bd23c6cacaead19b7)
2024-05-03 15:22:16 -07:00
Colin Percival
7b082bdf72 Post-14.1-branch updates
Rename stable/14 to -STABLE

Bump __FreeBSD_version

Approved by:	re (implicit)
Sponsored by:	https://www.patreon.com/cperciva
2024-05-02 23:16:57 -07:00
Eric Joyner
eafd6c26f9
ice_ddp: Update package to 1.3.36.0
This is intended to be used with the upcoming ice 1.39.13-k
driver update, but is still backwards compatible with
previous versions of the driver.

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

Sponsored by:	Intel Corporation

(cherry picked from commit 768329961dc0c041f7647f1c4549944a2ca168aa)
2024-04-24 15:14:48 -07:00
Gordon Bergling
0744d3268e NOTES: Remove a double word in comment
- s/of of/of/

(cherry picked from commit 1ff65c57e337ddb1681af5f98da0fa757cefc5ad)
2024-04-23 07:24:09 +02:00