Elliott Mitchell [Sun, 19 Jun 2022 15:05:20 +0000 (08:05 -0700)]
intr: move MAX_STRAY_LOG to interrupt.h
The two interrupt controllers which implement squelching of reports
after a maximum use the same limit. Move the limit to interrupt.h, the
better to encourage other interrupt controllers to implement the same.
James McLaughlin [Thu, 17 Aug 2023 19:57:17 +0000 (22:57 +0300)]
linux(4): Add sendfile fallback for non-socket fds
Before Linux 2.6.33, out_fd must refer to a socket. Since Linux 2.6.33
it can be any file.
The patch was originally provided by James McLaughlin and adapted by me
for copy_file_range.
Marius Strobl [Wed, 16 Aug 2023 16:49:34 +0000 (18:49 +0200)]
iflib drivers: Constify PCI ID LUTs
Since d49e83eac3baf16a22b1c5d42e8438b68b17e6f9, iflib(9) is ready
for this change.
While at it, make isc_driver_version strings (static) const where
not apparently un-const on purpose, too.
This reduces the size of the amd64 GENERIC by about 10 KiB.
John Baldwin [Thu, 17 Aug 2023 18:30:50 +0000 (11:30 -0700)]
bhyve: Store the FreeBSD OUI in little-endian in the controller data
Section 7.10.3 of the NVME 1.4b specification states that the IEEE OUI
in the identify controller structure is stored in little-endian format
(unlike the embedded OUI in EUI64 identifiers).
Ed Maste [Thu, 17 Aug 2023 17:43:39 +0000 (13:43 -0400)]
share/examples: clarify BOOT_COMCONSOLE_SPEED
Give an example of why one may want to override BOOT_COMCONSOLE_SPEED so
that it's clear why the default (in a comment) and the commented-out
example setting have different values.
Reported by: otis Fixes: 4722ceb7d53e ("Use 115200 bps by default for serial communication")
Mateusz Pacuszka [Thu, 17 Aug 2023 11:30:54 +0000 (13:30 +0200)]
ixl: fix multicast filters handling
Summary:
Hardware supports up to 128 entries of multicast filters. If there is more,
filters should be removed and multicast promiscuous enabled. In case
user deletes the multicast address and overall count is less than 128,
multicast promiscuous mode should be disabled and all the filters
reapplied into the HW.
Currently driver only enables multicast promiscuous mode and deletes
the entries without any information to the user and it's not capable of
reapplying the filters once count is less than 128.
Address that by:
1. Add logging
2. Add logic in case multicast promiscuous is enabled and user lowers
the number of multicast entries to <128.
3. Fix a bug where driver removes different MAC entries along with the one
that's being deleted by the user.
Andrew Turner [Thu, 17 Aug 2023 11:26:57 +0000 (12:26 +0100)]
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.
Ed Maste [Wed, 16 Aug 2023 20:26:49 +0000 (16:26 -0400)]
Cirrus-CI: temporarily disable amd64-gcc12 build/test on main
The amd64-gcc12 job is failing at present. Unfortunately Cirrus-CI
appears to have a 100MB log limit and we exceed this before the error
is reported. Disable the job for now until we can address the log
length issue.
See also https://github.com/cirruslabs/cirrus-ci-docs/issues/1176.
Brooks Davis [Wed, 16 Aug 2023 18:16:51 +0000 (19:16 +0100)]
libc: regoranize malloc build
Create a stdlib/malloc to hold the definition of the malloc interface
(e.g., the Symbol.map file) and make jemalloc a subdirectory. This will
make it easier to integrate alternative allocators such as snmalloc
while making it clear that the current jemalloc symbols are the FreeBSD
API/ABI (for better or worse).
Dimitry Andric [Tue, 15 Aug 2023 21:14:26 +0000 (23:14 +0200)]
Fix incremental builds after GoogleTest update
At the moment, several Makefiles under tests/ do not correctly generate
.depend files, which can lead to link errors when doing incremental
(e.g. WITHOUT_CLEAN) builds:
ld: error: undefined symbol: testing::internal::g_linked_ptr_mutex
>>> referenced by gtest-port.h:2137 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-port.h:2137)
>>> mockfs.o:(testing::internal::linked_ptr_internal::depart())
>>> referenced by gtest-port.h:2139 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-port.h:2139)
>>> mockfs.o:(testing::internal::linked_ptr_internal::depart())
>>> referenced by gtest-port.h:2139 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-port.h:2139)
>>> mockfs.o:(testing::internal::linked_ptr_internal::depart())
>>> referenced 3 more times
For the time being, put in a depend-cleanup.sh workaround for this.
John Baldwin [Wed, 16 Aug 2023 16:49:17 +0000 (09:49 -0700)]
RELNOTES: Note the deprecation of 32-bit platforms for 15.0.
This draws a line in the sand of removing support for 32-bit worlds
and kernels aside from COMPAT_FREEBSD32 and lib32 support. The
project may choose to alter this approach when 15.0 is released by
extending some level of 32-bit support in 15.0 or later.
In particular, at present there is a fair bit of interest in retaining
armv7 support in 15.0 at least.
John Baldwin [Wed, 16 Aug 2023 16:48:51 +0000 (09:48 -0700)]
sys: Add a deprecation warning for 32-bit kernels.
Per recent discussions on arch@ and at the BSDCan developer summit, we
are considering removing support for 32-bit platforms (in some form)
for 15.0 (at the earliest). A final decision on what will ship in
15.0 will be made closer to the release of 15.0. However, we should
communicate the potential deprecation in 14.0 to provide notice to
users.
This commit adds a warning during boot on 32-bit kernels that they are
deprecated and may be removed in 15.0. More details will be included
in a followup commit to RELNOTES.
Warner Losh [Wed, 16 Aug 2023 07:42:14 +0000 (01:42 -0600)]
glob.h: Remove $FreeBSD$
This likely documented where this file was copied, but the $FreeBSD$
tag was lost as soon as it was committed. Just remove it. Also remove
the one that looked like it was intended to track versions. That will
simplify the MFC.
Bjoern A. Zeeb [Sun, 13 Aug 2023 21:33:48 +0000 (21:33 +0000)]
devmatch: introduce quiet command line option
In setups without hints whatsoever one can get a long list of
"Can't read linker hints file" error messages during boot.
Add a -q/--quiet option which would suppress the noise and leave
space for more essential information.
While here switch to a pre-defined exit code from sysexits.
Ed Maste [Tue, 15 Aug 2023 22:42:22 +0000 (18:42 -0400)]
boot0: add a note about BIOS-supported serial rates
We plan to increase the default serial rate to 115200 (see review
D36295) but early boot components that use BIOS interfaces do not
support higher rates. Add a note to that effect.
Reported by: imp
Sponsored by: The FreeBSD Foundation
Kevin Bowling [Tue, 15 Aug 2023 21:37:43 +0000 (14:37 -0700)]
e1000: Fix off by one ipcse
This has been off by one in the FreeBSD drivers as far back as I've
looked. Emperically HW and SW emulations I have available don't seem to
mind. Noticed while debugging other issues.
During the life-cycle of the patch that landed as 0bc26e325450, the
variable names changed and I missed that in the rebase. Use the proper
TARGET_TRIPLE_ABI.
Ed Maste [Tue, 15 Aug 2023 15:54:09 +0000 (11:54 -0400)]
ssh: Remove note about memory leak now resolved upstream
OpenSSH 9.4p1 (updated in commit 535af610a4fd) includes the memory leak
fix that we originally applied in 69c72a57af84 ("sftp: avoid leaking
path arg in calls to make_absolute_pwd_glob.").
Ed Maste [Thu, 3 Aug 2023 21:47:06 +0000 (17:47 -0400)]
arm64: increase MAXCPU to 1024, following amd64
As in commit 9051987e40c5 for amd64, support up to 1024 CPU cores.
arm64 hardware with more than 256 CPU cores is currently available and
will become increasingly common over FreeBSD 14's lifetime.
PR: 269572
Reviewed by: andrew
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41319
Emmanuel Vadot [Tue, 15 Aug 2023 05:59:09 +0000 (07:59 +0200)]
ofw_firmware: Return BUS_PROBE_GENERIC instead of 0
While here make it only probe if the node is directly under the root
one. If it's not it's likely a device node named 'firmware' and not the
firmware group we're interested in.
Ed Maste [Mon, 14 Aug 2023 20:35:34 +0000 (16:35 -0400)]
pci: return 0 for pci_remap_intr_method MSI-X non-error case
When remapping a MSI-X vector, we would always return ENOENT, even if
successful. This didn't really matter, as the sole caller of
BUS_REMAP_INTR also didn't check for errors.
Return 0 if there's no error, so that we can start handling (or at least
warning about) actual failures.
Reviewed by: jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41449
Ed Maste [Mon, 7 Aug 2023 21:49:57 +0000 (17:49 -0400)]
x86: move EARLY_AP_STARTUP into DEFAULTS
EARLY_AP_STARTUP was introduced in 2016 (commit fdce57a04219) with note:
As a transition aid, the new behavior is moved under a new
kernel option (EARLY_AP_STARTUP). This will allow the option
to be turned off if need be during initial testing. I hope to
enable this on x86 by default in a followup commit ...
It was enabled by default, but became effectively mandatory (on x86)
some time later. Move it to DEFAULTS to avoid an unbootable system if
the option is left out of a custom kernel configuration file.
Reported by: wollman
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41352
Gleb Smirnoff [Mon, 14 Aug 2023 19:56:07 +0000 (12:56 -0700)]
sockets: on accept(2) don't copy all of so_options to new socket
As uncovered by e3ba0d6adde3 we are copying lots of irrelevant options
from the listener to an accepted socket, even those that aren't relevant
to a non-listener, e.g. SO_REUSE*, SO_ACCEPTFILTER. Stop doing that
and provide a fixed opt-in list for options to be inherited. Ideally
we shall not inherit anything at all. For compatibility inherit a set
of options that are meaningful for a non-listening socket of a protocol
that can listen(2).