build: Retire LLVM_COV src.conf knob
I introduced it in commit 1b49115a40ad ("Promote llvm-cov to a
standalone option"). llvm-cov was previously enabled as part of the
CLANG_EXTRAS option. I made it a standalone, default-enabled option for
parity with the tools provided by the GCC-based toolchain.
We no longer provide an in-tree GCC toolchain. Now, just build llvm-cov
along with Clang to simplify build infrastructure.
Reviewed by: dim
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58155
beinstall: Avoid chrooting into new world
The new world may use system calls that are not in the currently-running
kernel, so we cannot chroot into the new environment to run `make
installworld`, `etcupdate`, etc. Partially revert commit 16702050ac95
("beinstall: perform pre-installworld steps") and switch back to using
DESTDIR for installworld and so on.
Reported by: olivier
Reviewed by: olivier
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50682
git-mfc: Cherry-pick all commits in one git command
This allows one to resume from a conflict with a plain
`git cherry-pick --continue`, whereas before one would have to re-run
the original git-mfc command after resolving the conflict and running
`git cherry-pick --continue`.
Suggested by: des
Reviewed by: des
Differential Revision: https://reviews.freebsd.org/D58129
git-mfc: Filter pending and dangling commits by committer
Previously we searched commits based on the author email address, but
this isn't really right: if I commit something from a contributor, I'm
still responsible for MFCing it, so really we should be filtering on the
committer.
Add a new --committer option to filter results by committer email
address, defaulting to the user.email value in the git config.
Keep the --author option, but don't filter by author unless the option
is explicitly specified.
Reported by: des
Reviewed by: des
Differential Revision: https://reviews.freebsd.org/D58126
ix(4): Add support for firmware logging for E610 adapters
This is part 3 of the support for the new Intel Ethernet E610
family of devices
The ix driver now enables firmware logging on Intel E610 devices
for debugging with Customer Support. Logs are enabled by default
and generated in binary format that requires decoding by support
teams. The collected data is firmware and hardware related for
debugging purposes only.
When the driver loads, it creates a fw_log sysctl node under the
debug section. Events are organized into categories (modules) for
targeted logging, and users can adjust verbosity levels as needed.
This adds sysctl support for the firmware logging feature and
updates the ix(4) manual page with documentation.
Signed-off-by: Yogesh Bhosale <yogesh.bhosale at intel.com>
[8 lines not shown]
ix(4): Add EEE support for E610 adapters
The ix driver now supports Energy Efficient Ethernet (EEE) on Intel
E610 devices. EEE allows the network interface to enter low-power
states during periods of low link utilization, reducing power
consumption while maintaining full performance when needed.
E610 adapters provide EEE support through BASE-T PHY functionality.
Due to this PHY-based implementation, EEE is supported only
on 2.5Gb speeds and above.
Signed-off-by: Yogesh Bhosale <yogesh.bhosale at intel.com>
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
Authored-by: Yogesh Bhosale <yogesh.bhosale at intel.com>
Approved by: kbowling (mentor)
Tested by: Mateusz Moga <mateusz.moga at intel.com>
Sponsored by: Intel Corporation
[3 lines not shown]
ice(4): Fix link speed after changing cable type
When interface was connected to a link partner with a cable
type limitting maximum supported speed, e.g. SFP+ cable
in 25G port, driver incorrectly saved a supported speed
as the user configured speed. This prevented interface
from using all supported speeds after switching cable to SFP28.
Link was established at 10G as supported by previously used
SFP+ cable. Don't set user requested speed unless actually
configured by an user, to allow automatic selection of highest
available speed. Only when user sets custom config
using advertise_speed sysctl save it and try
to apply after cable is changed.
Also don't save initial supported speeds if FW supports
reporting default PHY config.
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
[5 lines not shown]
ice(4): Add support for new E810-XXV-2 adapters
Add two new subdevice IDs for E810-XXV-2 and E810-XXV-2 for OCP 3.0.
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
Reviewed by: kbowling, erj, mateusz.moga_intel.com
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D54069
(cherry picked from commit bea6f7d02dfbef8f8209f0ca5f1d76877d549f46)
vmimage.subr: Add ability to install src in VM image
In some cases having a src tree in a VM image is convenient
for development or debugging. Add a WITH_SRC variable,
which, when set, will cause the vm-release target to include
FreeBSD-set-src in the list of packages installed in an image.
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
Sponsored by: Intel Corporation
Reviewed by: cperciva
Differential Revision: https://reviews.freebsd.org/D57143
(cherry picked from commit 4ea4116f8d2069194563c8692c1f28d88c319ca8)
XZ kernel build cleanup
-I${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz isn't used, and
.PATH: ${SRCTOP}/sys/contrib/xz-embedded/freebsd isn't used either.
Remove them both to simplify things a little.
Sponsored by: Netflix
kldxref: Add -m filag to print info about modules in one file
kldxref -m <file> will print the same data that the '-d' flag produces,
except restrict the output to one file. This should be the full path to
the file, and the directory name to process is omitted.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57902
loader: Add two new build knobs for x86 BIOS loaders
We have two sets of BIOS loaders: One that lives in stand/i386 and one
that lives in stand/userboot. Add knows to turn these on/off, with the
default being on. These often aren't needed when creating a minimal UEFI
system, so add knobs to turn them off. Given light-weight VMs have
created a new use cases for these loaders, there's no plans at all to
eliminate them.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58072
Revert "loader.efi: Trim ZFS searching for other booting options"
This reverts commit 3e3fd1fde8e168910edc538966111c0b5f03cd5f.
This appears to break chainbooting with boot1.efi and similar scenarios
with Root-on-ZFS scenarios. Revert until it's better understood.
PR: 296309
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58071
loader.efi: Fix off by one error in size of the virtual disk
The end address is the final byte in the array, not one byte past the
end of the array, so we need to add 1 to get the full length.
Fixes: 59219fc76a4b ("loader.efi: efiblk_memdisk_preload passes the VirtualDisks to FreeBSD")
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58069
laoder.efi: Fix error in download protcol
The download protocol calls download_data with FileOffset and
BufferLength of 0 first to start the download (no data yet
available). Calls it again with BufferLength == 0 and FileOffset the
size of the download (again, no data). It then starts calling with
BufferLength != 0 and FileOffset == 0 to start the download. The
heuristic I used to detect the start was wrong, so we'd allocate the
buffer twice. Fix that by being more explicit and not using the
heuristic that was bogus.
Fixes: afee781523e4 ("loader.efi: Recognize new memdisk=<url> and memcd=<url> options")
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58068
loader.efi: Simplify the code for null decompression a little
This code is simpler when we spell it the Unix way. Also, add sanity
checks to make sure the offset is where we think it is.
Fixes: afee781523e4 ("loader.efi: Recognize new memdisk=<url> and memcd=<url> options")
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58070
MINIMAL: Add device md
This can't be a loadable module, so add it to MINIMAL
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58067
libcxxrt: Fix diagnostics for derived classes
In terminate_with_diagnostics the cast_to arguments were swapped, so it
always failed. The diagnostic handler produced output like "Terminating
due to uncaught exception 0x24891e08000 of type std::runtime_error".
Now, e->what() will actually be included in the output, e.g.
"Terminating due to uncaught exception 0x2bba49208000 'Model file
doesn't exist' of type std::runtime_error".
Reviewed by: dim
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57822
(cherry picked from commit 3a5c2899fc7bd0865b5aacccc3465e46e9bc6df3)
(cherry picked from commit ab1af7bd2f425147e658a32f128a56176b1de059)
vtfontcvt: Return error from write_fnt_source
Previously write_fnt_source always returned 0, silently discarding
errors. Return rv so that errors set vtfontcvt's shell exit
appropriately.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit f05fb5157ba1291ee5019bacece8d1e98ea95b35)
(cherry picked from commit a00f80731213e03bf3d0b9028a93d0be4c0df756)
libcxxrt: Fix diagnostics for derived classes
In terminate_with_diagnostics the cast_to arguments were swapped, so it
always failed. The diagnostic handler produced output like "Terminating
due to uncaught exception 0x24891e08000 of type std::runtime_error".
Now, e->what() will actually be included in the output, e.g.
"Terminating due to uncaught exception 0x2bba49208000 'Model file
doesn't exist' of type std::runtime_error".
Reviewed by: dim
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57822
(cherry picked from commit 3a5c2899fc7bd0865b5aacccc3465e46e9bc6df3)
linuxkpi: Add `usleep_range_state()`
It takes a task state as its last argument. We enforce that this state
is `TASK_UNINTERRUPTIBLE` for the time being because other states are
not interpreted.
Change `usleep_range()` to call `usleep_range_state()` with the state
set to `TASK_UNINTERRUPTIBLE`, which is what Linux does too.
The amdgpu DRM driver starte to use `usleep_range_state()` in Linux
6.13.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57579
linuxkpi: Add `to_acpi_device_node()` and `ACPI_COMPANION()`
The former is called by the latter. We return NULL because linuxkpi does
not implement ACPI (pseudo?) devices associated to regular devices.
The amdgpu DRM driver started to use `ACPI_COMPANION()` in Linux 6.13.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57577
generic_ehci_fdt: fix driver softc size
This subclass declares its own softc structure adding necessary members
after the embedded ehci_softc_t. The full size of the struct must be
included in the driver declaration, otherwise the allocation backing the
softc is not guaranteed to be large enough.
Reported by: KASAN
Reviewed by: jrtc27, manu
Fixes: 7a58744fd0f1 ("Split out the attachment from the generic-ehci driver")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57951
(cherry picked from commit d5332d3a904242cb82e7dbf35e4aeec7c2df4402)
stand/libofw: make OF_hasprop() part of the library
Currently it is only needed by powerpc ofwfdt.c, and defined statically
there. Make it available as part of libofw, mirroring what we have in
the kernel.
Two small tweaks are made to the implementation:
1. Return type is changed to bool
2. Return 'true' when OF_getproplen() == 0. This matches the expected
semantics of the kernel version, described in OF_hasprop(9).
Reviewed by: manu, imp, adrian
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56429
(cherry picked from commit 48a05f833c7d0c089d37522cc234039ec823edf4)
raspberry_virtgpio: fix OF_hasprop() usage
The function returns a bool. This driver was merged recently (by me) and
I missed this instance.
While here, adjust the ofw_bus_status_okay() call similarly. This
function still returns an int, but this usage is more widely used in our
drivers.
No functional change intended.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Fixes: b60cd486a652 ("ofw: bool-ify OF_hasprop()")
(cherry picked from commit ce6b4973ba8c6503d3b6dc12d9e6b42ce274d912)