Now that LinuxKPI supports the lower case Linux ACPI spellings under
LINUXKPI_WANT_LINUX_ACPI we only need to provide the debug macro to
allow us to compile in ACPI support.
This ties into regulatory and will be used, e.g., for 11ax, 11be,
and Per Platform Antenna Gain (PPAG) settings.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Now that LinuxKPI supports the lower case Linux ACPI spellings under
LINUXKPI_WANT_LINUX_ACPI remove the #ifdef around the code and compile in
ACPI support.
Sponsored by: The FreeBSD Foundation
MFC after; 3 days
The HWT framework provides infrastructure for hardware-assisted tracing. It
collects detailed information about software execution and records it as
"events" in highly compressed format into DRAM. The events cover information
about control flow changes of a program, whether branches taken or not,
exceptions taken, timing information, cycles elapsed and more. This allows
to reconstruct entire program flow of a given application.
This comes with separate machine-dependent tracing backends for trace
collection, trace decoder libraries and an instrumentation tool.
Reviewed by: kib (sys/kern bits)
Sponsored by: UKRI
Differential Revision: https://reviews.freebsd.org/D40466
Notable upstream pull request merges:
#1746348ce292ea Clarify and restrict dmu_tx_assign() errors
#17484d461a67d0 Ensure that gang_copies is always at least as large
as copies
#174860a2163d19 FreeBSD: Ensure that z_pflags is initialized for
new znodes
#17488ea076d692 vdev_raidz_asize_to_psize: return psize, not asize
#1749069ee01aa4 Fix bug caused by rounding in vdev_raidz_asize_to_psize
Obtained from: OpenZFS
OpenZFS commit: 69ee01aa4b
This file is already included in cam.ko which nvme.ko depends on
unconditionally.
Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D50705
This commit adds a storage driver that supports the Universal Flash
Storage Host Controller Interface (UFSHCI) on FreeBSD.
Universal Flash Storage (UFS) is a flash-based mobile storage device
that replaces eMMC, aiming for high performance with low power. The UFS
Host Controller Interface (UFSHCI) is the host side controller and
connects UFS device to a system bus, such as PCIe.
The code targets the latest standards:
- UFS 4.1: https://www.jedec.org/standards-documents/docs/jesd220g
- UFSHCI 4.1: https://www.jedec.org/standards-documents/docs/jesd223f
The ufshci(4) driver implements controller/device initialization,
interrupt, single-doorbell(SDB) queue based IO requests. Support for
multi-queue (MCQ) IO requests is planned for a later commit.
Implemented features:
- PCIe bus support
- legacy(INTx) Interrupt Handling
- UIC command support
- UTP Transfer Request (UTR) support
- UTP Task Management Request (UTMR) support
- single doorbell queue (SDB) with multiple queue depth
- SCSI command set support
- sysctl
Work in progress:
- multi-Circular Queue (per-CPU IO queues)
- MSI-X interrupt Support
- write booster
- write Protect
- Host Performance Booster (HPB)
- interrupt aggregation
- ARM based system bus support
- ufs-utils port
Tests were performed on QEMU and an Intel-based laptop.
Since QEMU has an emulated UFS device, I tested on QEMU.
How to test on QEMU:
1. Run QEMU
$ qemu-system-x86_64 ... -device ufs -drive file=blk1g.bin,format=raw,if=none,id=luimg -device ufs-lu,drive=luimg,lun=0
2. Loading/unloading the ufshci module on QEMU
$ kldload /usr/obj/usr/src/amd64.amd64/sys/modules/ufshci/ufshci.ko
$ kldunload ufshci
Testing on real hardware:
- Samsung Galaxy Book S (Intel Lakefield) with UFS 3.0
- Lenovo duet 3 11ian8 (Intel N100) with UFS 2.1
Sponsored by: Samsung Electronics
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D50370
Moved handling of debugfs entries to a separate file.
In addition, it will allow to consolidate the addition of
debugfs entries to a single location in the code.
This implementation adds infrastructure to create (and remove)
debugfs entries at two different stages.
- Done when a device is probed, allows to keep debugfs entries
persistent between a transition in device state (up to down or
vice versa).
- Done after the initialization phase, allows to have debugfs
entries that are accessible only when the device is up.
In addition, moved the creation of debugfs entries for configuration
of the newly created function adf_dbgfs_init() and replace symbolic
permissions with octal permissions when creating the debugfs files.
Added sysctl oids storage for proper cleanup on device down.
Reviewed by: markj, ziaee
MFC after: 2 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D50379
Build and sysctl configuration modes are introduced for QAT SPR
devices to disable safe dc mode. A new QAT driver build option
‘QAT_DISABLE_SAFE_DC_MODE’ is required to build the QAT driver
with code that allows a request to be sent to FW to override the
‘History Buffer’ mitigation. Default QAT driver builds do not
include this ‘QAT_DISABLE_SAFE_DC_MODE’ build option. Even if the
QAT driver was built with code that allows a request to be sent to
FW to override the ‘History Buffer’ mitigation, the QAT driver must
still be configured using sysctl to request an override of the
‘History Buffer’ mitigation if desired. The default QAT driver
configuration option sysctl dev.qat.X.disable_safe_dc_mode does not
allow override of the mitigation. The new sysctl attribute
disable_safe_dc_mode is to be set to 1 for overriding the history
buffer mitigation. Firmware for qat_4xxx is updated for this change.
If this mode is enabled, decompression throughput increases but may
result in a data leak if num_user_processes is more than 1.
This option is to be enabled only if your system is not prone to
user data leaks.
Reviewed by: markj, ziaee
MFC after: 2 weeks
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D50379
Notable upstream pull request merges:
#14876b048bfa9c Allow opt-in of zvol blocks in special class
#16486b6916f995 ARC: parallel eviction
#171691a8f5ad3b zvol: Enable zvol threading functionality on FreeBSD
#17209c17bdc491 More aggressively assert that db_mtx protects db.db_data
#17218734eba251 Wire O_DIRECT also to Uncached I/O
#1724649fbdd453 Introduce zfs rewrite subcommand
#17255b1ccab172 ARC: Avoid overflows in arc_evict_adj()
#17280848794503 zcp: get_prop: fix encryptionroot and encryption
#17301086105f4c Cause zpool scan resume commands to get logged in history
#17306246e5883b zfs_valstr: update zio_flag strings for
ZIO_FLAG_PREALLOCATED
#1730978628a5c1 FreeBSD: Use new SYSCTL_SIZEOF()
#1731489a8a9158 ARC: Notify dbuf cache about target size reduction
#173198b9c4e643 spa: clear checkpoint information during retry
#17339d5616ad34 Increase meta-dnode redundancy in "some" mode
#17340ea74cdedd Fix 2 bugs in non-raw send with encryption
#17342e55225be3 Add explicit DMU_DIRECTIO checks
#17343d8a33bc0a icp: Use explicit_memset() exclusively in gcm_clear_ctx()
#17344 -multiple libzfs_core: add ZFS_IOC_TRACE envvar to enable ioctl
tracing
#17348f0baaa329 arcstat: prevent ZeroDivisionError when L2ARC becomes
empty
#1735383fa80a55 dmu_objset_hold_flags() should call
dsl_dataset_rele_flags() on error
#17355 -multiple Allow txg_wait_synced_flags() and dmu_tx_assign()
to return when the pool suspends
#173615c30b2438 Fix null dereference in spa_vdev_remove_cancel_sync()
#17363ddf28f27c Fix off-by-one bug in range tree code
#1736706fa8f3f6 zfs_cmd: reorganise zfs_cmd_t to match original size
#173682a91d577b Expose dataset encryption status via fast stat path
#17372c464f1d01 Only interrupt active disk I/Os in failmode=continue
#173739d76950d6 ZIL: Improve write log size accounting
#17377 -multiple tunables: general code cleanup
#17379fa697b94e FreeBSD: Add posix_fadvise(POSIX_FADV_WILLNEED) support
#173843dfa98d01 ZVOL: Make zvol_inhibit_dev module parameter
platform-independent
Obtained from: OpenZFS
OpenZFS commit: 3084336ae4
They are used by the i915 DRM driver in Linux 6.6 (although this change
was only backported with Linux 6.7 DRM drivers).
`struct folio` simply wraps `struct page` for now.
`struct folio_batch` is the same as `struct pagevec` but it works with
`struct folio` instead of `struct page` directly.
Reviewed by: bz, kib, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48743
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
38fec10eb60d687e30c8c6b5420d86e8149f7557 ( tag: v6.14 ).
Sponsored by: The FreeBSD Foundation
Notable upstream pull request merges:
#17111246e5883b Implement allocation size ranges and use for gang leaves
#171235f5321eff Handle interaction between gang blocks, copies, and FDT
#17130 -multiple Implement default user/group/project quotas
#17164301da593a Fix lock reversal on device removal cancel
#17183367d34b3a Fix dspace underflow bug
#1718730cc2331f zed: Ensure spare activation after kernel-initiated device
removal
#1719111ca12dbd simd_powerpc.h: enable FPU on FreeBSD
#171925b29e70ae Remove mg_allocators
#17204a497c5fc8 Improve L2 caching control for prefetched indirects
#17205b14b3e398 Fix FDT rollback to not overwrite unnecessary fields
#172067be9fa259 Fix nonrot property being incorrectly unset
#1720809fc7bb47 Fix memory leaks in pool properties handling
#1721378a7c78bd Added fix for zpool get state segfaults with two or more
vdevs
#17228131df3bbf vdev_to_nvlist_iter: ignore draid parameters when matching
names
#17231f40ab9e39 Fix double spares for failed vdev
#1726427f3d9494 Sort the blocking snapshots lis
#17269f86d9af16 Fix race between resilver wait and offline/detach
#17273c8fa39b46 cred: properly pass and test creds on other threads
#17284a7de203c8 txg: generalise txg_wait_synced_sig() to
txg_wait_synced_flags()
Obtained from: OpenZFS
OpenZFS commit: 246e5883bb
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
38fec10eb60d687e30c8c6b5420d86e8149f7557 ( tag: v6.14 ).
Sponsored by: The FreeBSD Foundation
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
38fec10eb60d687e30c8c6b5420d86e8149f7557 ( tag: v6.14 ).
Sponsored by: The FreeBSD Foundation
This function is used by the i915 DRM driver starting with Linux 6.8.
Reviewed by: bz, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49067
Following the example of rtw88 and rtw89 only ship iwlwifi firmware
from ports/packages. Users are asked to run fwget(8) to install the
firmware needed for their system or build it from ports
(see also UPDATING).
This is the end of a long story adding wireless support to fwget(8),
migrating the firmware for multiple branches into ports, splitting them
up into flavors, and updating some install media and the installer to
provide firmware.
The overall amount for new firmware amongst all drivers would have
added more than 100M of binary blobs to src.git for the first import,
ignoring future updates which (along with some duplication between
multiple drivers) was considered too much.
While maintenance within the src tree certainly would have been
easier in the longer term this seems to be the better solution and
I would like to thank everyone who helped along the path to get there.
The iwlwififw.4 man page is to stay (for now) and will likely point
at the appropriate firmware package flavor in the future as well
so people may find it easier to transition. In the long term this
information is likely not needed anymore.
Sponsored by: The FreeBSD Foundation
Requested by: core (Oct 2022)
Reviewed by: thj, jrm (earlier)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D49713
This is used by the t14s for FDT support.
.. which definitely doesn't work yet, but having it in the build is good.
Differential Revision: https://reviews.freebsd.org/D49690
Reviewed by: manu, phk
This driver originates from OpenBSD and was ported to FreeBSD by Future
Crew LLC who kindly provided a source release.
iwx supports many recent Intel WiFi card and this driver should support running
these cards with legacy, HT and VHT rates. There are some issues remaining in
the port, but at this point wider testing is sought.
To avoid breaking deployed WiFi configurations iwx probes with a lower
priority than iwlwifi. This can be changed by blocking iwlwifi with
devmatch.
Reviewed by: adrian
Obtained from: Future Crew LLC
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49259
- Fix maximal keyboard backlight level, Although Linux source code
comment says that backlight level is encoded in 3 bits of data,
actual code limits maximum level to 3.
- Add backlight(9) support for keyboard
- Turn off/on keyboard backlight on suspend/resume
Sponsored by: Future Crew LLC
MFC after: 1 month
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D48983
This adds initial AES-GCMP crypto support. It registers for both
128 and 256 bit support, although the 256 bit support will not work
without extending the net80211/ioctl keylength.
This is not yet enabled by default; drivers will need to opt-in
to supporting it in either hardware or software.
The AES-GCMP code is BSD licenced code from hostapd.git release 2.11.
Differential Revision: https://reviews.freebsd.org/D49161
Notable upstream pull request merges:
#17042ece35e0e6 zpool: allow relative vdev paths
#17046c43df8bbb vdev_file: unify FreeBSD and Linux implementations
#17064ee8803adc vdev_file: make FLUSH and TRIM asynchronous
#17066ecc44c45c include: move zio_priority_t into zfs.h
#17071ab3db6d15 arc: avoid possible deadlock in arc_read
#17079682c5f6a0 Fix wrong free function in arc_hdr_decrypt
#17080701093c44 Don't try to get mg of hole vdev in removal
#17081d7d274471 Better fill empty metaslabs
#17088a5fb5c55b spa: fix signature mismatch for spa_boot_init as
eventhandler required
#170897f05fface gcm_avx_init: zero the ghash state after hashing the IV
#17122fe674998b Check portable objset MAC even if local is zeroed
Obtained from: OpenZFS
OpenZFS commit: fe674998bb
Notable upstream pull request merges:
#16857387ed5ca4 Add recursive dataset mounting and unmounting support
to pam_zfs_key
#16929c2458ba92 optimize recv_fix_encryption_hierarchy()
#1698012f0baf34 Make the vfs.zfs.vdev.raidz_impl sysctl cross-platform
#1698640496514b Expand fragmentation table to reflect larger possibile
allocation sizes
#1700388020b993 Add kstats tracking gang allocations
#1701321205f648 Avoid ARC buffer transfrom operations in prefetch
#17016390f6c119 zio: lock parent zios when updating wait counts on
reexecute
#17029b8c73ab78 zio: do no-op injections just before handing off to vdevs
#170376a2f7b384 Fix metaslab group fragmentation math
#17040b901d4a0b Update the dataset name in handle after zfs_rename
Obtained from: OpenZFS
OpenZFS commit: 6a2f7b3844
On all three platforms supported by vmm, we have mostly duplicated code
to manage guest physical memory regions. Deduplicate much of this code
and move it into sys/dev/vmm/vmm_mem.c.
To avoid exporting struct vm outside of machdep vmm.c, add a new
struct vm_mem to contain the memory segment descriptors, and add a
vm_mem() accessor, akin to vm_vmspace(). This way vmm_mem.c can
implement its routines without needing to see the layout of struct vm.
The handling of the per-VM vmspace is also duplicated but will be moved
to vmm_mem.c in a follow-up patch.
On amd64, move the ppt_is_mmio() check out of vm_mem_allocated() to keep
the code MI, as PPT is only implemented on amd64. There are only a
couple of callers, so this is not unreasonable.
No functional change intended.
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D48270
Note that this requires marking efi_rt_fault as a non-preemptible
local symbol.
Co-authored-by: Jessica Clarke <jrtc27@FreeBSD.org>
Reviewed by: imp, andrew
Obtained from: CheriBSD
Fixes: d7f930b80e ("arm64: Implement efi_rt_arch_call")
Differential Revision: https://reviews.freebsd.org/D48715
Added ht20 mode, based on if_run from FreeBSD, and if_mtw.c
from OpenBSD.
PR: 247545
Approved by: adrian, wireless
Differential Revision: https://reviews.freebsd.org/D45179
This shall be the official transport to connect kernel side RPC clients
to userland side RPC servers. All current kernel side clients that
hijack unix(4) sockets will be converted to it. Some implementation
details are available inside new clnt_nl.c.
The complementary RPC server over netlink(4) coming in next commit.
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D48549
The arm64 vmm_nvhe* files depend on a vmm_hyp file to provide most of
the implementation. As these are built with custom rules the normal
generated dependency information is not used, even if generated.
Add a dependency between these two sets of files to ensure when the
implementation is updated the file will be rebuilt.
Sponsored by: Arm Ltd