mps(4): add support for hostboot
If the mps/mpr(4) device has corrupted or missing firmware then
it will fail to attach.
Add an interface to use firmware(9) to load the firmware at boot.
Loosely based on https://github.com/marcan/lsirec/
Assisted-by: Claude Code (Opus 5)
Reviewed by: imp
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D59854
nuageinit: Skip ssh keys if default user adduser fails
Commit d9fa6016011e ("nuageinit; Skip SSH keys and doas/sudo if adduser
fails") handled nil return from a failing adduser when adding secondary
users, but the same issue also existed in the default user handling.
Reported by: llm-postcr
Reviewed by: dtxdf
Supported by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61511
science/*: restrict some pre-requisites of Code_Aster to amd64
These ports fail on non-amd64 for various reasons. Some of these errors
could surely be fixed, but that’s of no interest.
Mk/bsd.licenses.db.mk: Register real SPDX License List identifiers
Add _LICENSE_NAME_/_LICENSE_GROUPS_ entries for SPDX ids independently
detected across the tree with no framework entry to represent them,
surfacde by an ongoing SPDX-compliance audit of LICENSE= declarations.
Kept in their own _LICENSE_SPDX_LIST var, appended to _LICENSE_LIST
exactly once, so a token's SPDX-ness can later be recovreed with a
single variable-expansion match instead of re-deriving the legacy-vs-
SPDX split by hand.
Also relocates the tokens that were already spelled corerctly before
this change (the Creative Commons family, CPAL-1.0, ClAtristic, MIT,
NCSA, OpenSSL, PostgreSQL, WTFPL) into _LICENSE_SPDX_LIST too, so the
var is a complete answer across the whole file.
Deliberately excludes every id that is itself a deprecated SPDX
identifier (GPL-2.0=, GPL-3.0+, LGPL-3.0, bare GPL-1.0/GPL-3.0/AGPL-3.0,
BSD-2-Clause-NetBSD, StandardML-NJ); only the modern replacement
spelling is registered where one was indepenedntly detected.
[3 lines not shown]
tcp bbr: improve handling of retransmissions in LAST-ACK
When performing a timer based retransmission, clear the
BBR_RWND_COLLAPSED flag. If it sticks, t_rxtshift is never incremented
resulting in unlimited retransmissions in the LAST-ACK state.
Reported by: Illia Vynohradov
Reviewed by: Peter Lei
MFC after: 3 days
MFC to: stable/15
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D61586
asmc: make asmc_sysctl_add_system() void
Its only caller already discarded the return value with (void). Match
the other sysctl subtree builders.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D61537
asmc: do not report absent sensors as a temperature
A key can exist for a sensor the model was never built with; the SMC
answers those with a fixed sentinel instead of an error. Return ENXIO
for the sentinel instead of publishing it as a reading.
MFC after: 3 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D61489
asmc: report temperatures in deciKelvin
The handler returned the raw key's high byte, dropping the sign and
fraction of the sp78 encoding, and published -1 on a failed read.
Read through asmc_sensor_read() instead, convert to deciKelvin, and
register the leaves as "IK". Changes the unit of dev.asmc.N.temp.*.
MFC after: 3 days
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D61487
asmc.4: fix the unterminated SYNOPSIS and FILES blocks
The SYNOPSIS .Bd and the FILES .Bl were both left open, producing two
mandoc block-nesting errors. Reduce SYNOPSIS to the .Cd line man4
style calls for, and close the FILES list.
MFC after: 3 days
Reviewed by: ziaee, ngie
Differential Revision: https://reviews.freebsd.org/D61486
asmc: propagate sysctl read and write errors
Several handlers discarded the key transport's result: fan speed, SMS
and ambient light handlers published a value regardless of read
success; a rejected fan speed or keyboard backlight write reported success;
fan id returned EPERM on an unreadable key instead of ENXIO.
asmc_fan_getvalue()/asmc_fan_setvalue() now return the error and pass
the speed out by reference instead of returning -1 for failure.
MFC after: 3 days
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D61485
asmc: register the fan id sysctl with a string format
Every fan sysctl was registered with a hardcoded "I" format, but id
is CTLTYPE_STRING. Carry the format in the table instead.
MFC after: 3 days
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D61484
asmc: clear the sensor counts in detach
The key arrays are freed but the counts were left set, leaving the
softc describing freed memory. Reachable via the attach error path,
which calls detach directly.
MFC after: 3 days
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D61483
asmc: do not drop shutdown notification when the system node fails
asmc_attach() registered the MBSS shutdown-cause handler
(EVENTHANDLER_REGISTER(shutdown_pre_sync, asmc_shutdown, ...))
after attempting to add the dev.asmc.N.system sysctl subtree. If that
subtree registration failed, the error path took goto nosms, jumping clean
over the shutdown-handler registration. On T2 Macs this silently drops
the only thing standing between a clean shutdown and bridgeOS's
watchdog power-cycling the machine.
MFC after: 3 days
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D61482
asmc: remove the unused sc_dev softc field
It was never assigned or read. legacy code.
MFC after: 3 days
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D61481
asmc: print the last field of the SMC revision correctly
Use be16dec() at the correct offset instead of an unaligned,
off-by-two-bytes read through a cast pointer.
MFC after: 3 days
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D61479
asmc: restore SMC state across suspend/resume
Reinit the SMS interrupt mask, motion thresholds, and shock window on
resume. Guard the backlight rewrite on sc_has_light. Add
device_suspend to release manual fan control before sleep and restore
it on resume.
MFC after: 3 days
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D61478