FreeBSD/src 73df5f2share/man/man4 Makefile

man: Do glob expansion with echo instead of ls

echo is a shell builtin, and always present. While ls usually works,
some upgrade scenarios need to have ls be a build to to work
correctly. Rather than add it as a build tool, use echo instead which is
always safe because sh is a build tool.

Sponsored by:           Netflix
DeltaFile
+1-1share/man/man4/Makefile
+1-11 files

FreeBSD/src 3579336sbin/nvmecontrol nvmecontrol.8 power.c

nvmecontrol: Add APST feature support

Add -a, -d and -m options to the power subcommand to manage APST,
along with additional status output when invoked without args.

Signed-off-by: Alexey Sukhoguzov <sap at eseipi.net>
Reviewed-by: imp
DeltaFile
+158-9sbin/nvmecontrol/power.c
+20-1sbin/nvmecontrol/nvmecontrol.8
+178-102 files

FreeBSD/src c4c7909share/man/man4 dtrace_cam.4, sys/cam cam_periph.c

dtrace: Instrument more of the CAM device lifecycle

cam::periph:error, cam::{,a,n,sd}da:error
        Trace the error evolution for I/O errors the periph encounters

cam::periph:recovery, cam::{,a,n,sd}da:recovery
        Trace the result of the error sorting

cam::periph:invalidate
        Trace device invalidations

cam::periph:hold-boot
cam::periph:release-boot
cam::xpt:hold-boot
cam::xpt:release-boot
        Trace boot holds and releases at different levels

cam::xpt:bus-register
        Trace new busses added

    [9 lines not shown]
DeltaFile
+136-4share/man/man4/dtrace_cam.4
+12-2sys/cam/scsi/scsi_da.c
+14-0sys/cam/cam_periph.c
+11-1sys/cam/nvme/nvme_da.c
+11-1sys/cam/mmc/mmc_da.c
+11-1sys/cam/ata/ata_da.c
+195-92 files not shown
+210-108 files

FreeBSD/src afb6089usr.sbin/mpsutil mpsutil.8 mps_show.c

mpsutil: Add Show Discovery command

Prints the current discovry tables for the driver.

Sponsored by:           Netflix
Assisted by:            Claude (sonet-5)
Differential Revision:  https://reviews.freebsd.org/D58528
DeltaFile
+205-0usr.sbin/mpsutil/mps_show.c
+14-0usr.sbin/mpsutil/mpsutil.8
+219-02 files

FreeBSD/src d04083dsbin/devd devd.conf.5, sys/cam cam_periph.c

cam: Add devctl message for invalidation of a periph.

Report serial number, if available, otherwise report the path of the
device invalidated.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D58527
DeltaFile
+22-3sys/cam/cam_periph.c
+3-1sbin/devd/devd.conf.5
+25-42 files

FreeBSD/src a67354fsys/cam cam_periph.c

cam: Refactor cam_periph_devctl_notify init/fini bits

To be able to create other kinds of devctl notifications that don't flow
through cam_periph_devctl_notify, refactor out the header / trailers we
do and the sbuf life cycle management. No functional change.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D58526
DeltaFile
+54-20sys/cam/cam_periph.c
+54-201 files

FreeBSD/src e2bcab5sys/cam/scsi scsi_da.c

da: Fix logic error

Apply de-morgan's law correctly to force only 4/2 to go to the
invalidate stage for that ASC/ASCQ.

Fixes: d78d04b17cb24
Sponsored by:           Netflix
MFC After: 1 week
Reviewed by:    ali_mashtizadeh.com, mav
Differential Revision:  https://reviews.freebsd.org/D58525
DeltaFile
+1-1sys/cam/scsi/scsi_da.c
+1-11 files

FreeBSD/src 0bc6c92sys/cam/scsi scsi_da.c

da: Stop the probing when periph invalidated in dadone_proberc

When READ CAPACITY fails, we call cam_periph_invalidate() for some
hopeless ASC/ASCQ combinations and then fall through to test the cache
state. This results in excess commands to the abandoned device that may
take a while to timeout and/or report confusing errors. Instead, call
daprobedone() when the periph is invalid to terminate the probe.

Fixes: d78d04b17cb24
Sponsored by:           Netflix
MFC After: 1 week
Differential Revision:  https://reviews.freebsd.org/D58524
DeltaFile
+6-0sys/cam/scsi/scsi_da.c
+6-01 files

FreeBSD/src d48e9bfstand/efi/loader loader_efi.h memdisk.c

loader.efi: fetch initmd specified by DHCP

Configure net0, read the DHCP-provided initmd URL, and download it
through the file API so directly booted loader.efi can construct its
root memory disk.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D59432
DeltaFile
+31-0stand/efi/loader/memdisk.c
+1-0stand/efi/loader/loader_efi.h
+32-02 files

FreeBSD/src 8821d42stand/efi/loader memdisk.c

loader.efi: Allow downloading of ramdisk or md to be aborted

Hitting <ESC> will now allow one to abort a (possibly mistaken)
download.

Sponsored by:           Netflix
DeltaFile
+39-3stand/efi/loader/memdisk.c
+39-31 files

FreeBSD/src 0ca1204stand/efi/loader main.c

loader.efi: Eat the character used to break to OK

When we can't find root, we give the user a chance to drop to the boot
loader OK prompt. We should eat the character that's pressed to not
interfere with the interactive session.

Sponsored by:           Netflix
DeltaFile
+3-1stand/efi/loader/main.c
+3-11 files

FreeBSD/src 08265d5stand/efi/loader memdisk.c

loader: Fix starting typo

Fixes:                  a22fa5ec74e0 ("laoder.efi: Fix error in download protcol")
Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D59434
DeltaFile
+1-1stand/efi/loader/memdisk.c
+1-11 files

FreeBSD/src 25b58ebstand/efi/loader loader_efi.h memdisk.c

loader.efi: download md images through file API

Feed the existing decompressor from loader file descriptors as well as
iPXE callbacks, allowing arbitrary HTTP filesystem URLs to become
kernel-exportable memory disks.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D59431
DeltaFile
+87-15stand/efi/loader/memdisk.c
+1-0stand/efi/loader/loader_efi.h
+88-152 files

FreeBSD/src 6de311dstand/efi/loader loader_efi.h main.c

loader.efi: download DHCP initmd specified image

When we haven't downloaded an image via mem{disk,cd} and ipxe, try any
image specified by the FreeBSD-specific initmd dhcp option. This allows
direct booting of loader.efi with a detached root ramdisk filesystem.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D59433
DeltaFile
+13-10stand/efi/loader/memdisk.c
+4-2stand/efi/loader/main.c
+1-1stand/efi/loader/loader_efi.h
+18-133 files

FreeBSD/src 5bbd617stand/efi/libefi efinet.c

loader.efi: release SNP after network configuration

Close the exclusively opened SNP protocol after loader networking
finishes so the firmware network stack can reconnect the controller and
service a subsequent HTTP request.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D59430
DeltaFile
+4-0stand/efi/libefi/efinet.c
+4-01 files

FreeBSD/src e6b997cstand/common dev_net.h dev_net.c

loader: add standalone network configuration

Allow callers to obtain DHCP configuration without opening a network
file, enabling loader.efi to discover an initmd URL before handing the
interface back to firmware HTTP.

Differential Revision:  https://reviews.freebsd.org/D59429
Sponsored by:           Netflix
DeltaFile
+56-27stand/common/dev_net.c
+1-0stand/common/dev_net.h
+57-272 files

FreeBSD/src a098fd0stand/libsa bootp.h bootp.c

loader: request DHCP initmd option

Request FreeBSD RFC 3925 PEM 2238 DHCP 125 option. Use suboption 1 to
specify a ramdisk image to load and use to load the kernel and as the
root file system.

Differential Revision:  https://reviews.freebsd.org/D59428
Sponsored by:           Netflix
DeltaFile
+58-1stand/libsa/bootp.c
+5-0stand/libsa/bootp.h
+63-12 files

FreeBSD/src 6788e42stand/efi/libefi efihttp.c

stand/efihttp: Support arbitrary http[N]://host[:port]/path devspecs

Until now, the "http" device only worked when firmware itself booted
loader.efi via EFI HTTP Boot: efihttp_dev_init() required a URI node on
the loader's own boot device path, and every fetch went to that same
server. Add a second form, using the parse_uri() helper from libsa/dev.c,
that works anywhere: http[N]://host[:port]/path (N is a network interface
unit, defaulting to 0). This lets a devspec like this be used as rootdev,
in loader.conf, or interactively, independent of how loader.efi itself
was booted.

Network configuration is shared, loader-wide state (the myip/netmask/
gateip/nameip globals from net.h): if something has already configured
them (e.g. tftp/nfs via net_open()), the http device just reuses those
values, applying them to EFI_IP4_CONFIG2_PROTOCOL as a static address. If
nothing has, it drives IP4Config2's own DHCP directly instead of calling
netdev's net_open(): net_open() opens the NIC's SNP
EFI_OPEN_PROTOCOL_EXCLUSIVE, which would disconnect the Mnp/Ip4/.../
HttpDxe driver chain this code depends on. That chain is also commonly

    [8 lines not shown]
DeltaFile
+342-2stand/efi/libefi/efihttp.c
+342-21 files

FreeBSD/src 7208b3bstand/libsa stand.h dev.c

libsa: Add a generic URI-syntax devspec parser

Add parse_uri(), a helper for devices whose devspec can take a
"[N]://host[:port][/path]" form in addition to the traditional "N:path"
form. It returns EINVAL when devspec doesn't match that pattern, so a
caller's own dv_parsedev can fall back to the traditional form.

Un-static default_parsedev() so it can serve as that fallback.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D59422
DeltaFile
+64-1stand/libsa/dev.c
+2-0stand/libsa/stand.h
+66-12 files

FreeBSD/src f1163b9stand/efi/loader memdisk.c

loader.efi: For ipxe booting, fall back to md when ramdisk fails

Some UEFI firmwares do not contain the RamDisk protocol. When this
happens, load the file into a md disk instead. This is less desireable
than the RamDisk (since that allows better chain-booting options), but
sufficient to boot an image as a md device for FreeBSD. While most
severs have the RamDisk protocol enabled in their builds, I have two
IoT class boards from different manufacturers that do not. Since it
works just fine with this fallback, that's preferable.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D59421
DeltaFile
+41-7stand/efi/loader/memdisk.c
+41-71 files

FreeBSD/src 4f7475astand loader.mk, stand/efi/loader Makefile

loader: Small tweak to how md is configured

Only the EFI loader supports the md devices (as the moment). Create
LOADER_MD_SUPPORT and only try to compile md when that's true. For the
moment, also allow it when only MD_IMAGE_SIZE is defined, but that
will be dropped since LOADER_MD_SUPPORT is a superset.

Sponsored by:           Netflix
Reviewed by:            tsoome
Differential Revision:  https://reviews.freebsd.org/D59416
DeltaFile
+4-1stand/loader.mk
+1-0stand/efi/loader/Makefile
+5-12 files

FreeBSD/src 752bde7stand/common bootstrap.h md.c

loader: Allow dynmaic creation of MD disks

Augment the md device to allow creation of md devices. This is useful
when UEFI doesn't support RamDisk and in other cases where we have a
handy initrd-like image we want to use.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D59418
DeltaFile
+97-32stand/common/md.c
+4-0stand/common/bootstrap.h
+101-322 files

FreeBSD/src 8fae929stand/common md.c

loader: Allow this to compile w/o MD_IMAGE_SIZE defined

Slight tweak to allow md.c to be compiled when MD_IMAGE_SIZE isn't
defined.

Sponsored by:           Netflix
Reviewed by:            olivier, tsoome
Differential Revision:  https://reviews.freebsd.org/D59415
DeltaFile
+3-3stand/common/md.c
+3-31 files

FreeBSD/src 96b1e04stand/i386/loader conf.c

loader: Add md support

Allow md devices like efi allows them.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D59420
DeltaFile
+3-0stand/i386/loader/conf.c
+3-01 files

FreeBSD/src 7055aa7stand/common bootstrap.h md.c, stand/efi/libefi efipart.c

loader: Move ramdisk export to md.c

Move the common routine to md.c and use it where we do memdisks today.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D59417
DeltaFile
+19-0stand/common/md.c
+2-9stand/i386/libi386/biosmemdisk.c
+1-7stand/efi/libefi/efipart.c
+3-0stand/common/bootstrap.h
+1-0stand/i386/loader/Makefile
+26-165 files

FreeBSD/src 69d1595stand/efi/loader conf.c main.c

loader.efi: Move probing the md up to before doing bootmgr

When someone has loaded a ram disk, that's a stronger hint about what to
boot than the UEFI boot manager. Prefer it and rework a little the #ifdefs
to reduce their number.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D59419
DeltaFile
+11-14stand/efi/loader/main.c
+1-5stand/efi/loader/conf.c
+12-192 files

FreeBSD/src 39cc57alib/libsys pdfork.2

pdfork.2: document kern.pdfork_implicit_nowaitpid

(cherry picked from commit 661d1135e4ed12d6017220ea654ae67a6956dc73)
DeltaFile
+11-0lib/libsys/pdfork.2
+11-01 files

FreeBSD/src f2307ecsys/kern kern_fork.c

kern_fork.c: add kern.pdfork_implicit_nowaitpid sysctl

(cherry picked from commit 24d3cbaaf5ad45b53e15d4729961fc8a8b385562)
DeltaFile
+7-1sys/kern/kern_fork.c
+7-11 files

FreeBSD/src 6b0060dsys/dev/ntsync ntsync.c

ntsync(4): do not double-free the alert event when a dup was detected for WAIT_ALL

(cherry picked from commit c0c7b56d3039a75a01315d610e386a5e9eda704c)
DeltaFile
+2-0sys/dev/ntsync/ntsync.c
+2-01 files

FreeBSD/src 8c95ec1lib/libcasper/libcasper zygote.c libcasper.c

libcasper: reap zombies without requiring waitpid(2)

(cherry picked from commit 1a296762b3d093e1fed4e74f9251206102f68355)
DeltaFile
+1-1lib/libcasper/libcasper/zygote.c
+1-1lib/libcasper/libcasper/libcasper.c
+2-22 files