14480 Commits

Author SHA1 Message Date
Maxim Konovalov 09d81767e3 freebsd-base.7: style 2026-05-07 01:50:45 +00:00
Alexander Ziaee c4af3f13a4 freebsd-base.7: Document adding a local repo
MFC after:		1 day
Discussed with:		bcr, ivy, kevans, ngie
Differential Revision:	https://reviews.freebsd.org/D56608
2026-05-06 17:25:26 -04:00
Hans Rosenfeld 84a9574180 sys/cdefs.h: Introduce __maybe_unused attribute
The __maybe_unused attribute should be used for variables which may or
may not be used, such as when their only use is in an assertion. This
attribute is functionally identical to __unused, suppressing compiler
warnings for particular variable if it remains unused.

Reviewed by:	Minsoo Choo <minsoo@minsoo.io>, imp
Differential Revision:	https://reviews.freebsd.org/D56517
2026-05-06 15:51:46 -04:00
Mateusz Piotrowski c295f02637 zone.9: Add a missing newline
MFC after:	3 days
2026-05-04 20:29:48 +02:00
Abdelkader Boudih 36b399f55e asmc: rename wol sysctl to auto_poweron
Older SMC firmware exposed AUPO as a Wake-on-LAN control. On updated
firmware, the key controls automatic power-on when AC power is restored
after a power loss; WoL is handled by the GBE controller instead.
Rename the sysctl to reflect the current semantics. No compatibility
alias is provided as the sysctl has not appeared in any release.

Reviewed by:	ziaee, adrian
Differential Revision:	https://reviews.freebsd.org/D56747
2026-05-04 07:26:44 -07:00
Alexander Ziaee dd97c3d83f ocs_fc.4: Cleanup
+ more consistent document description
+ enumerate available options in synopsis in vt.4 style
+ tag spdx
+ tweak list rendering
+ cleanup HARDWARE
+ reflow excessively long lines silencing linter warnings
+ fix link macros

MFC after:		3 days
Reported by:		michaelo (hardware notes)
Differential Revision:	https://reviews.freebsd.org/D56753
2026-05-03 14:29:43 -04:00
Alexander Ziaee 28deec9b7e ports.7/FILES: Expand and refactor into 3 tables
Add make.conf, CHANGES, CONTRIBUTING.Md, UPDATING, and Tools/scripts.
Refactor the FILES section of the ports reference manual into a bigger
table with three sections separated by root directory. Remove preceeding
article from all but "the big Kahuna", and root dirs where reasonable.

MFC after:              3 days
Relnotes:		yes
Reported by:            adamw, arrowd, linimon
Differential Revision:	https://reviews.freebsd.org/D55441
2026-05-03 13:29:06 -04:00
Artem Bunichev 0ed292531e debug.sh.8: Add FILES section
Which contains only the source code file.

While here, remove trailing empty lines in the end of the page.

Reviewed by:	mhorne
Differential Revision:	https://reviews.freebsd.org/D56659
2026-04-30 10:49:52 -03:00
Mitchell Horne 16dd592982 ddb.4: add 'show preload' entry
For the recently added command.

Fixes:	b683fd0b32 ("preload: add "show preload" DDB command")
2026-04-30 10:24:04 -03:00
Jean-Sébastien Pédron eebb643bb3 sx: Add sx_has_waiters() macro
This macro will return non-zero if there are threads waiting for this
lock; otherwise, it will return zero.

The function assumes (but does not assert) that the caller already holds
the lock and that it is interested in other threads waiting for it to
release the lock.

The motivation to add this is the implementation of
`rwsem_is_contended()` in linuxkpi.

This Linux function indicates the same thing to the caller: if other
threads are waiting for this semaphore.

The amdgpu DRM driver started to use `rwsem_is_contended()` in Linux
6.12.

Reviewed by:	bz, olce
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56443
2026-04-30 13:40:05 +02:00
Maxim Konovalov d5db883af2 group.7: spell priority 2026-04-28 17:44:40 +00:00
Alexander Ziaee ab98fd3234 build.7: Explain update-packages repo signing
MFC after:		3 days
Reported by:		kevans
Reviewed by:		kevans, ngie
Differential Revision:	https://reviews.freebsd.org/D56607
2026-04-28 12:56:45 -04:00
Alexander Ziaee 0f91468c04 intro.7: Reference groups.7
PR:		264966
MFC after:	3 days
2026-04-28 09:56:49 -04:00
Artem Bunichev e09104dfb7 groups.7: New manual page of standard group names
Import groups(7) from NetBSD, with tweaks for our system. The group
list is sorted by GID. All the group names from /usr/src/etc/group
are described, except "uucp". The FILES section was added on top of
the original manual page.

PR:			264966
Relnotes:		yes
MFC after:		3 days
Obtained from:		NetBSD
Reviewed by:		des, ziaee
Differential Revision:	https://reviews.freebsd.org/D54114
2026-04-28 09:53:39 -04:00
Timo Völker 1bfd392b9e vtnet: remove loader tunable fixup_needs_csum
Removes the deprecated loader tunable fixup_needs_csum. Removes also
the sysctl counter rx_csum_bad_offset that is no longer in use.

Reviewed by:		tuexen
Event:			Wiesbaden Hackathon 2026
Differential Revision:	https://reviews.freebsd.org/D55588
2026-04-26 11:42:38 +02:00
Enji Cooper af864dd4a2 hosts.equiv.5: correct nits to fix mandoc -T lint issues
- Rename `.Nm .rhosts` to `.Nm rhosts` to match the MLINK for the
  manpage.
- Use `.Pa` instead of `.Nm` when discussing the paths for `.rhosts` and
  `hosts.equiv.5` for explicitness and clarity.

Bump .Dd for the change.

MFC after:	1 week
2026-04-24 13:45:14 -07:00
Enji Cooper 573a9e5764 security(7): fix mandoc -T lint complaints
- Add `.Nm` section for securelevel(7) to match corresponding MLINKS entry.
- Fix the spelling for mac(4) (the actual subsystem manpage is spelled out in
  lowercase.

MFC after:	1 week
2026-04-24 13:45:14 -07:00
Warner Losh 334adacbc1 cam: Document kern.cam.max_high_power.
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D56463
2026-04-24 12:32:42 -06:00
Ali Mashtizadeh 70ae0c4524 i386: Remove perfmon performance monitoring facility
Remove the perfmon performance monitoring facility that was for Intel
Pentium and Pentium Pro processors.

Reviewed by: imp,mhorne,emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/2155
2026-04-24 10:23:05 -06:00
Kyle Evans b675ff8eed mac_seeotheruids: allow specificgid to be a list of groups
The specificgid functionality has historically allowed only a single
group to be exempt, but in practice one might want a few services to
be exempt for reasons.  From a security perspective, we probably don't
want to encourage unrelated users to be grouped together solely for
this purpose, as that creates one point of shared access that could be
used for nefarious purposes.

Normalize the group list as we do cr_groups to allow for linear matching
rather than quadratic, we just need to account for the differences in
FreeBSD 15.0+ where cr_groups is entirely supplementary groups vs.
earlier versions, where cr_groups[0] is the egid and the rest is
sorted.

Reviewed by:	csjp, des (earlier version)
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D56592
2026-04-23 16:13:11 -05:00
R. Christian McDonald 4578c15ab9 pf: Document broadcast/multicast forwarding through route-to
pf_route() and pf_route6() forward broadcast and multicast traffic
when a route-to rule matches, without any check against the output
interface's broadcast domain. This is a deliberate property of the
route option code path, but it is not documented and the workaround
is non-obvious.

Document the behavior in pf.conf(5) with example block-out rules on
the target interface, scoped with the received-on qualifier so that
only forwarded traffic is dropped while the router's own broadcast
and multicast traffic continues to pass.

Add regression tests covering the full broadcast/multicast and
forwarded/local matrix on both IPv4 and IPv6.

Reviewed by:	glebius, kp
Approved by:	kp (mentor)
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D56559
2026-04-23 15:23:59 -04:00
~Not Toby c0e26f7b29 hkbd/ukbd: sysctls to swap macbook kbd modifiers
Many applications, desktop environments, window managers & text editors
favor the usage of Alt or Ctrl over Super (Cmd). On a Macbook it is
quite annoying that the Super (Cmd) key gets pride of place by the spacebar.

The standard MacBook Cmd key location only really makes sense for macOS
or maybe in some tiling wm if Mod4/Super is your main modifier.
For most mainstream desktops and window managers, having Alt or Ctrl
in that location makes much much more sense.

This patch adds two sysctls for swapping either Opt(Alt) or Ctrl with Cmd(Super).

Linux has similar sysctls to this; allowing a user to make an Apple
keyboard more "orthodox"/useful at a level that takes effect independent
of typing context - ie) tty, Xorg and/or wayland.

Having a sysctl to do these swaps means that a user doesn't have to faff
about with both creating a custom vt keymap AND figure out which magic
setxkbmap incantation one needs to make one's keyboard behave as desired
across environments.

Signed-off-by: ~Not Toby <0x2b@0xff.art>

Reviewed by:	wulf
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2141
2026-04-23 08:10:05 +03:00
Alexander Ziaee 886610c100 freebsd-base.7: Add a caveat about dev branches
MFC after:		3 days (to 15)
Discussed with:		bapt, emaste, ivy
Differential Revision:	https://reviews.freebsd.org/D56389
2026-04-22 13:59:26 -04:00
Alexander Ziaee b183dae4a9 build.7: Explain specifying multiple KERNCONFs
MFC after:		3 days
Reviewed by:		ivy, mhorne
Differential Revision:	https://reviews.freebsd.org/D56281
2026-04-22 13:31:04 -04:00
Alexander Ziaee 1bcd2e2f83 build.7: Explain packaging a custom kernel
MFC after:		3 days (to 15 only)
Requested by:		vermaden
Discussed with:		emaste, ivy, Mark Millard <markmi_dsl-only.net>
Differential Revision:	https://reviews.freebsd.org/D56217
2026-04-22 13:26:46 -04:00
Alexander Ziaee 1d69c8e4ac build.7: Improve make delete-old example
Be more explicit that deleting old files and libraries needs to be
really after you're rebooted a third time and you're really actually
sure your applications aren't using old libs, following irc discussion.

Also adjust an example slightly to fit on 80 character console.

MFC after:		3 days
Discussed with:		emaste, fuz, jhb
Differential Revision:	https://reviews.freebsd.org/D54079
2026-04-22 13:24:39 -04:00
Pierre Pronchery 57db556be4 src.conf(5): rebuild after introduction of WITHOUT_PKGCONF
Sponsored by:	The FreeBSD Foundation
Reviewed by:	bapt, philip
Approved by:	philip (mentor)
2026-04-22 15:43:20 +02:00
Dag-Erling Smørgrav 3d00db6b8b tests.7: Provide better examples
Previous authors appear to have prioritized brevity over clarity.  This
unfortunately resulted in a manual page that left its reader with the
false impression that Kyua is difficult to use.  Attempt to correct
this by providing more and simpler examples with longer explanations.

While here, correct outdated information about where Kyua stores its
logs and results.

MFC after:	1 week
Reviewed by:	ziaee, ngie
Differential Revision:	https://reviews.freebsd.org/D56475
2026-04-22 10:19:32 +02:00
Warner Losh e8156a7e5f src.conf.5: Regenerate
Last time I generated this, there were many copies of WITH_CASPER for
reasons unknown.

Sponsored by:		Netflix
2026-04-21 09:30:31 -06:00
Warner Losh 4ed20e0236 kshim/usb: Add build option.
Add WITH{,OUT}_LOADER_USB to build the kshim usb library. Nothing
in-tree uses it, but this will make it easier to keep building. Updated
src.conf.5 with a few extra changes...

Sponsored by:		Netflix
2026-04-17 20:41:43 -06:00
Alexander Ziaee b2aea7a042 e6000sw.4: Mention MV88E6171
Fixes:	680e6e30c0 (etherswitch: Add minimal support for mv88e6170)
Reviewed by:		jhibbits
Differential Revision:	https://reviews.freebsd.org/D56455
2026-04-17 11:21:13 -04:00
Christos Longros 4390c37b5c rge: add disable_aspm tunable for PCIe power management
Add a per-interface loader tunable dev.rge.%d.disable_aspm to
disable PCIe ASPM (L0s/L1) and ECPM on the RTL8125/8126/8127.

Disabling ASPM reduces latency at the cost of higher power
consumption. Default is off (ASPM left as configured by BIOS).

Signed-off-by: Christos Longros <chris.longros@gmail.com>

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D56103
2026-04-16 19:34:55 -07:00
Mitchell Horne 47b0ac1cad OF_getprop.9: update OF_hasprop() signature
The return type has been converted to a bool.

Reported by:	manu
Sponsored by:	The FreeBSD Foundation
Fixes:		b60cd486a6 ("ofw: bool-ify OF_hasprop()")
2026-04-16 13:15:40 -03:00
Christos Margiolis a3094f522f rc.conf.5: Document virtual_oss(8)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56225
2026-04-16 16:51:06 +02:00
Abdelkader Boudih a85c4ab626 appleir: Add Apple IR receiver driver
HID driver for Apple IR receivers (USB HID, vendor 0x05ac).
Supports Apple Remote and generic IR remotes using NEC protocol.

Supported hardware:
- Apple IR Receiver (0x8240, 0x8241, 0x8242, 0x8243, 0x1440)

Apple Remote protocol (proprietary 5-byte HID reports):
- Key down/repeat/battery-low detection
- 17-key mapping with two-packet command support
- Synthesized key-up via 125ms callout timer

Generic IR remotes (NEC protocol):
- Format: [0x26][0x7f][0x80][code][~code]
- Checksum: code + ~code = 0xFF
- Default keymap with 8 common codes
- See: https://techdocs.altium.com/display/FPGA/NEC+Infrared+Transmission+Protocol

Output via evdev with standard KEY_* codes.
Raw HID access available at /dev/hidraw0 for custom remapping.

Based on protocol reverse-engineering by James McKenzie et al.
Reference: drivers/hid/hid-appleir.c (Linux)

Tested on Mac Mini 2011 (0x05ac:0x8242).

Differential Revision:	https://reviews.freebsd.org/D55472
2026-04-15 15:36:17 -07:00
Abdelkader Boudih 3e27114a7f asmc: add raw SMC key read/write interface
This patch adds a debugging interface to read and write arbitrary
Apple SMC keys by name through sysctl, enabling hardware exploration
 and control of undocumented features.

The interface provides four sysctls under dev.asmc.0.raw.*:
  - key - Set the 4-character SMC key name (e.g., "AUPO")
  - value - Read/write key value as a hex string
  - len - Auto-detected key value length (can be overridden)
  - type - Read-only 4-character type string (e.g., "ui8", "flt")

Implementation includes a new asmc_key_getinfo() function using SMC
command 0x13 to query key metadata. The interface automatically
detects key lengths and types, uses hex string encoding for
arbitrary binary values, and is safe for concurrent access via
CTLFLAG_NEEDGIANT.

This interface was essential for discovering that the AUPO key
enables Wake-on-LAN from S5 state, and for mapping all 297 SMC keys
on Mac Mini 5,1.

Reviewed by:	ngie, adrian, markj
Differential Revision:	https://reviews.freebsd.org/D54441
2026-04-14 21:21:46 -07:00
Alexander Ziaee 998d501ae6 freebsd-base.7: Add an example for unregistering
MFC after:		3 days
Reviewed by:		ivy, emaste
Discussed with:		bapt, des, emaste, ivy, phk, pi
Differential Revision:	https://reviews.freebsd.org/D55458
2026-04-14 09:22:15 -04:00
Alexander Ziaee 5f922bd20d freebsd-base.7: Break examples into subsections
Break the examples into subsections, so that we can have multi-step
examples.

MFC after:		3 days (to 15 only)
Discussed with:		ivy
Differential Revision:	https://reviews.freebsd.org/D55526
2026-04-14 09:21:05 -04:00
Michael Osipov 54f5d20492 ciss.4: List all devices supported by ciss(4)
PR:		285744
Reviewed by:	ziaee
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D56285
2026-04-14 09:39:02 +02:00
Pouria Mousavizadeh Tehrani adecd4c4cd geneve.4: Add geneve manual
Reviewed by: ziaee, adrian
Differential Revision: https://reviews.freebsd.org/D55182
2026-04-13 17:45:05 +03:30
Gleb Smirnoff abf68d1cf0 hash(9): introduce hashalloc()/hashfree() KPI
This is a more extendable version than traditional hashinit(9).  It allows
different kinds of slot headers with optional locks.

Implement traditional hashinit()/hashdestroy() on top of it.

Reviewed by:		pouria, gallatin
Differential Revision:	https://reviews.freebsd.org/D55904
2026-04-12 10:25:51 -07:00
Pouria Mousavizadeh Tehrani 87bea33a67 nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG and EXPERIMENTAL options
The draft-ietf-6man-ipv6only-flag has been obsoleted by RFC 8925.
Remove the EXPERIMENTAL compile option from the kernel and remove
DRAFT_IETF_6MAN_IPV6ONLY_FLAG from userland.
This compile option was not enabled by default.
Also regenerate src.conf.5.

Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D56228
2026-04-10 23:42:09 +03:30
Christos Longros fc68534a9a rge: add Wake-on-LAN support for magic packet
Advertise IFCAP_WOL_MAGIC when PCI power management is available
and enable it by default.  On suspend or shutdown, rge_setwol()
enables the WOL_MAGIC and WOL_LANWAKE bits in CFG3/CFG5, disables
the RXDV gate, and enables PM so the NIC stays powered to watch
for magic packets.

Move hardware-specific WOL register configuration into
rge_wol_config() in if_rge_hw.c to keep hardware-specific
functions in sync with OpenBSD.

Update rge.4 to document WoL support.

Tested on FreeBSD 16.0-CURRENT bare metal with Realtek RTL8125
on a Gigabyte B650 Gaming X AX motherboard.

Signed-off-by: Christos Longros <chris.longros@gmail.com>

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D56259
2026-04-10 10:31:38 -07:00
Alexander Ziaee ff32dbb1d1 arcmsr.4: Improve HARDWARE introductory sentence
MFC after:	3 days
2026-04-10 11:26:45 -04:00
Bhosale, Yogesh 6b58d10fc6 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@intel.com>
Co-developed-by: Krzysztof Galazka <krzysztof.galazka@intel.com>

Reviewed by:	ziaee, kbowling
Tested by:      Mateusz Moga <mateusz.moga@intel.com>
MFC after:      1 weeks
Sponsored by:   Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D53973
2026-04-09 20:43:43 +02:00
Baptiste Daroussin 72d701eb1d nlsysevent: add manpage
Reviewed by:	des
2026-04-09 19:39:28 +02:00
Alice Cariboni f916091241 tuning.7: Fix suds typo in manual pages
MFC after:		3 days
Fixes:			fc32c80215 Add two new manual pages
Differential Revision:	https://reviews.freebsd.org/D55814
2026-04-09 17:57:32 +02:00
Timo Völker 0b39d72d04 virtio: use modern mode for transitional device by default
This patch changes the default value of the loader tunable
hw.virtio.pci.transitional to 1. This means, virtio uses the
modern mode for transitional devices by default.

The return values of vtpci_modern_probe() and vtpci_legacy_probei()
were chosen to prefer modern mode, but hw.virtio.pci.transitional=0
prevents modern mode.
Setting hw.virtio.pci.transitional to 1 by default seems a better fit.

Reviewed by:		tuexen
Differential Revision:	https://reviews.freebsd.org/D55894
2026-04-04 16:49:54 +02:00
Timo Völker 39c44fc55f virtio.4: fix typo
Reviewed by:	tuexen
Fixes:		c70755bc0d ("virtio: add loader tunables to sysctl")
MFC after:	3 days
2026-04-04 16:46:25 +02:00
Lexi Winter ab9257599a Remove WITHOUT_BZIP2, WITHOUT_BZIP2_SUPPORT
WITHOUT_BZIP2_SUPPORT only affects a single binary, gzip(1); it doesn't
remove bzip2 support from other bits (e.g., libarchive) and there are
no similar options for gzip, xz or zstd.

WITHOUT_BZIP2 has not done anything at all since it was first added
in 2007.

MFC after:	never
Discussed on:	arch@
Reviewed by:	imp, des, adrian, delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D56148
Sponsored by:		https://www.patreon.com/bsdivy
2026-04-03 14:50:09 +01:00