FreeBSD/src 5e1c786sys/dev/vt vt_core.c vt.h

vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE

VT_SETMODE ioctl currently checks the provided signal numbers with its
own ISSIGVALID macro that uses NSIG (32) as a maximum, although the code
that will actually send the signal in sys/kern/kern_sig.c uses
_SIG_VALID which allows up to _SIG_MAXSIG (128).

This change aligns the vt code with the kernel internals and enables the
use of higher signal numbers so that applications are not limited to
SIGUSR1 and SIGUSR2 for vt release and acquire signals.

Signed-off-by:  Quentin Thébault <quentin.thebault at defenso.fr>
Reviewed by:    emaste, imp, kevans
Differential Revision:  https://reviews.freebsd.org/D53615
DeltaFile
+3-3sys/dev/vt/vt_core.c
+0-1sys/dev/vt/vt.h
+3-42 files

FreeBSD/src 38f941dsys/x86/include intr_machdep.h, sys/x86/x86 intr_machdep.c

x86: Add intr_enable_src()

Function to enable specific IRQ source.

This will be used by the s2idle code to enable just SCIs on x86 to break
the CPU out of idle.

Reviewed by:    olce
Approved by:    olce
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48734
DeltaFile
+9-0sys/x86/x86/intr_machdep.c
+1-0sys/x86/include/intr_machdep.h
+10-02 files

FreeBSD/src 7669cbdsys/dev/acpica acpi.c

acpi: Suspend-to-idle support (s2idle)

Implement STYPE_SUSPEND_TO_IDLE sleep type added in c43473dc9b83
("sys/power: Generic sleep types").

This is a prerequisite for the firmware to enter the S0ix states. When
suspending to idle, the system stays in an ACPI S0 state, but the CPUs
are idled and devices are suspended/resumed before and after this as
they would be when entering any other sleep type (except for AWAKE and
POWEROFF).

Factor out do_standby, do_sleep, and add a new do_idle function for
idling the CPU (a future patch will make this an idle loop and not just
a simple cpu_idle() call). In do_idle, SCIs (interrupt 9) are enabled to
allow wake events to break the CPU out of idle.

Record all the steps made instead of just the last one in slp_state,
which allows for more flexible unwinding (will be useful to not have to
goto breakout if the SPMC entry call fails when that is committed).

    [10 lines not shown]
DeltaFile
+185-93sys/dev/acpica/acpi.c
+185-931 files

FreeBSD/src e8348e2sys/net if_enc.c

enc: create an interface at SI_SUB_PROTO_IF stage

Creation of enc0 before SI_SUB_PROTO_MC mangles the MLD list as well as
encounters IGMP mutex not initialized yet.

Reported & tested by:   mjg

NB: the enc(4) is not a true interface indeed.  In a perfect world the
module shall not create a cloner, shall not enter if_attach(), shall not
trigger ifnet_arrival_event, neither shall have any protocol attached to
it. The enc0 exists for two purposes: 1) create a bpf(9) tap; 2) to allow
injection packets in the middle of ipsec(4) processing temporarily
rewriting m_pkthdr.rcvif to point at enc0.  While the problem 1 is already
solved with a recent divorce between bpf(9) and ifnet(9), the problem 2 is
harder to solve without breaking packet filter rules that use "via enc0".
DeltaFile
+1-1sys/net/if_enc.c
+1-11 files

FreeBSD/src c1376acsys/netpfil/ipfw ip_fw_table.c

ipfw: find_tentry method is defined for any table algorithm

The error path is never taken.  Also the path was leaking a lock.

Noticed by:     ae
DeltaFile
+1-7sys/netpfil/ipfw/ip_fw_table.c
+1-71 files

FreeBSD/src 34c94bestand/efi/loader main.c

loader.efi: Only use SPCR if enabled.

SerialPort in the SPCR is zeroed when serial redirection is disabled,
rather than the SPCR being omitted from the ACPI tables ony many
systems. Check to see that SerialPort.Address is non-zero before using.

FreeBSD would fail to boot on systems that could have a serial port
redireciton, but don't have it enabled because the loader would create a
bogus hw.uart.console. While one could unset this value to boot, you
couldn't do that automatically very easily. Instead, don't even look
at the SPCR table if the SerialPort is zero'd.

PR: 292206
MFC After: 3 days
Sponsored by: Netflix
Co-authored-by: Warner Losh <imp at FreeBSD.org>
Closes:  https://github.com/freebsd/freebsd-src/pull/1948

(cherry picked from commit d82698ac68c23d856716dc9f6524b9ef363d7eba)
DeltaFile
+9-5stand/efi/loader/main.c
+9-51 files

FreeBSD/src efa7807stand/common disk.c

stand: Try to parse vdisk correctly

PR:                     289306
Sponsored by:           Netflix
Reviewed by:            dab
MFC After:              5 days
Differential Revision:  https://reviews.freebsd.org/D52500

(cherry picked from commit d18ed8e19c3cb264340987bdc191615108d8413a)
DeltaFile
+12-1stand/common/disk.c
+12-11 files

FreeBSD/src 66eedcbsys/cddl/dev/sdt sdt.c, sys/sys param.h sdt.h

sdt: Fix the probe ID type in struct sdt_probe

This is supposed to be a dtrace_id_t, which is a uint32_t, while id_t is
a uint64_t.  sdt.h avoids depending on dtrace.h so we can't use
dtrace_id_t directly.

Bump __FreeBSD_version since the layout of structures in the SDT probe
linker set has changed.

Sponsored by:   NetApp, Inc.
Sponsored by:   Klara, Inc.
DeltaFile
+3-0sys/cddl/dev/sdt/sdt.c
+1-1sys/sys/param.h
+1-1sys/sys/sdt.h
+5-23 files

FreeBSD/src acb7182sys/vm vm_map.c

vm_map_entry_delete(): fix the calculation of swap release

Reported and tested by: andrew
Fixes:  d160447129fe060b28bcd6ba429d17afdf494ff2
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-1sys/vm/vm_map.c
+1-11 files

FreeBSD/src 41ccf82lib/libc/aarch64/string memset_resolver.c memcpy_resolver.c

libc/aarch64: Use MOPS implementations of memcpy/memmove/memset where availble

Reviewed by:    andrew
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54560
DeltaFile
+42-0lib/libc/aarch64/string/memset_resolver.c
+42-0lib/libc/aarch64/string/memcpy_resolver.c
+42-0lib/libc/aarch64/string/memmove_resolver.c
+9-4lib/libc/aarch64/string/Makefile.inc
+2-2lib/libc/aarch64/string/memcpy.S
+2-0lib/libc/aarch64/string/memset.S
+139-66 files

FreeBSD/src 449339bsys/arm64/include ifunc.h

arm64: Provide ifunc HWCAP structure definitions

IFUNC structure is based on Section 9.4.1 "GNU C Library IFUNC interface"
from "System V ABI for the Arm 64-bit Architecture (AArch64)", 2025Q1.
(https://github.com/ARM-software/abi-aa/releases/download/2025Q1/sysvabi64.pdf)

Reviewed by:    andrew
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54598
DeltaFile
+23-5sys/arm64/include/ifunc.h
+23-51 files

FreeBSD/src 5eec353lib/libc/csu/aarch64 reloc.c

libc/csu: Pass HWCAP flags to ifunc resolver functions

Function arguments are based on Section 9.4.1 "GNU C Library IFUNC interface"
from "System V ABI for the Arm 64-bit Architecture (AArch64)", 2025Q1.
(https://github.com/ARM-software/abi-aa/releases/download/2025Q1/sysvabi64.pdf)

Reviewed by:    andrew
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54599
DeltaFile
+28-3lib/libc/csu/aarch64/reloc.c
+28-31 files

FreeBSD/src bdaa120sys/arm64/include armreg.h

arm64: Fix MAIR_ATTR_MASK

Use the correct value when calculating the mask.

(commit message by andrew@)

Sponsored by:   Arm Ltd
DeltaFile
+1-1sys/arm64/include/armreg.h
+1-11 files

FreeBSD/src 2708369sys/crypto/sha2 sha512c.c sha256c.c

crypto: Update sha256 and sha512 ifuncs to use passed HWCAP flags

Reviewed by:    andrew
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54600
DeltaFile
+2-7sys/crypto/sha2/sha512c.c
+2-6sys/crypto/sha2/sha256c.c
+4-132 files

FreeBSD/src a652357libexec/rtld-elf/aarch64 reloc.c rtld_machdep.h

rtld-elf: Pass HWCAP flags to ifunc resolver functions

Function arguments are based on Section 9.4.1 "GNU C Library IFUNC interface"
from "System V ABI for the Arm 64-bit Architecture (AArch64)", 2025Q1.
(https://github.com/ARM-software/abi-aa/releases/download/2025Q1/sysvabi64.pdf)

Reviewed by:    kib, andrew
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54559
DeltaFile
+14-3libexec/rtld-elf/aarch64/reloc.c
+7-3libexec/rtld-elf/aarch64/rtld_machdep.h
+21-62 files

FreeBSD/src 591c7a0sys/arm64/arm64 trap.c machdep.c

arm64: Enable MOPS in userspace

Detect presence of FEAT_MOPS, and enable instruction set and set HWCAP2 flag
if present.

Add handler for MOE exceptions.

Reviewed by:    andrew
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54558
DeltaFile
+64-0sys/arm64/arm64/trap.c
+35-0sys/arm64/arm64/machdep.c
+7-1sys/arm64/arm64/identcpu.c
+106-13 files

FreeBSD/src 0685fc4sys/arm64/include armreg.h

arm64: Add FEAT_MOPS register fields

(commit message by andrew@)

Reviewed by:    andrew
Sponsored by:   Arm Ltd
DeltaFile
+25-1sys/arm64/include/armreg.h
+25-11 files

FreeBSD/src 113dc9elib/csu/common notes.h

csu: Remove unused constant

This is no longer used after commit
99282790b7d01ec3c4072621d46a0d7302517ad4 moved ELF notes from C to
assembly.

Reviewed by:    kib
Fixes:          99282790b7d0 ("Remove the sed hack for ABI tag notes.")
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D54506
DeltaFile
+0-2lib/csu/common/notes.h
+0-21 files

FreeBSD/src 683decfsys/arm64/arm64 exec_machdep.c

arm64: Correctly align the SVE signal context

The SVE signal context needs to be correctly aligned. Fix this by
creating a new macro to calculate the needed size to provide this
alignment, and use it when setting and checking the saved SVE signal
context.

Reported by:    cperciva
Reviewed by:    cperciva, markj
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54396

(cherry picked from commit a9e77eb7016df70723c208fc09fbd01ec23a732d)
DeltaFile
+9-5sys/arm64/arm64/exec_machdep.c
+9-51 files

FreeBSD/src 6042a26sys/arm/arm gic.c

arm: Handle GIC_IVAR_VGIC in the gic driver

We don't have a GICv2 vgic so can just return 0.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D53662

(cherry picked from commit 262fadda370001eed2fd1a72592d79dbd533c650)
DeltaFile
+3-0sys/arm/arm/gic.c
+3-01 files

FreeBSD/src eb633cesys/arm64/arm64 gicv3_its.c

arm64: Switch to gic_get_support_lpis in gicv3_its

The old gicv3_get_support_lpis will be removed.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D53664

(cherry picked from commit 3ef673e98af669b5cf4e496bb2a1aab9020c480d)
DeltaFile
+2-2sys/arm64/arm64/gicv3_its.c
+2-21 files

FreeBSD/src 19d538csys/arm/arm gic.c gic_common.h, sys/arm64/arm64 gic_v3.c

arm/gic: Make GICV3_IVAR_SUPPORT_LPIS generic

GICv5 will need this too, so move to the GIC_IVAR namespace.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D53663

(cherry picked from commit 8178a4e3c13241804bb9625b2ef4c1b3fea3c7d9)
DeltaFile
+3-0sys/arm/arm/gic.c
+2-0sys/arm/arm/gic_common.h
+1-0sys/arm64/arm64/gic_v3.c
+6-03 files

FreeBSD/src 37491bcsys/dev/ofw ofw_cpu.c

dev/ofw: Move ofw_cpu earlier

Move ofw_cpu to BUS_PASS_CPU + BUS_PASS_ORDER_MIDDLE so it can be used
by other devices.

Reviewed by:    jhibbits
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D53328

(cherry picked from commit 87cea227e1945a8aa808b72d210f9a391be9b234)
DeltaFile
+4-2sys/dev/ofw/ofw_cpu.c
+4-21 files

FreeBSD/src bbd57dcsys/arm64/include _armreg.h armreg.h

arm64: Split out accessing special registers

We shouldn't need to include armreg.h just to access special registers
that are not defined in this file. Split out the parts that should be
common with arm64.h and hypervisor.h.

Reviewed by:    emaste
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D53324

(cherry picked from commit b57a571a001958febec042e15c571c5074ce44ce)
DeltaFile
+56-0sys/arm64/include/_armreg.h
+2-18sys/arm64/include/armreg.h
+2-0sys/arm64/include/hypervisor.h
+60-183 files

FreeBSD/src c28fea6sys/dev/fdt simplebus.c

dev/fdt: Add support for non-PCI MSI interrupts

Some non-PCI devices can send interrupts, e.g. the Arm SMMU or GICv5
Interrupt Wire Bridge. Add support for these by implementing pci_get_id
and pci_alloc_msi and the MSI/MSI-X parts of the PCIB interface.

Only the MSI parts of the PCI interface are added as that is all I am
able to test.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D53330

(cherry picked from commit 68e6422c6c91170a615e77028683a157e8e39d05)
DeltaFile
+134-0sys/dev/fdt/simplebus.c
+134-01 files

FreeBSD/src 6e890c4sys/arm64/include hypervisor.h

arm64: Add a define for MDCR_EL2_E2PB_EL1_0_NO_TRAP

This will be used by the SPE driver.

(commit message by andrew@)

Reviewed by:    andrew
Sponsored by:   Arm Ltd

(cherry picked from commit be0ded8d64e3e8c7bf6bf59b236a086f6a98e7b6)
DeltaFile
+1-0sys/arm64/include/hypervisor.h
+1-01 files

FreeBSD/src 474d800sys/arm64/include armreg.h

arm64: Add the PMBSR_MSS_BSC_BUFFER_FILLED define

This will be used by the SPE driver.

(commit message by andrew@)

Reviewed by:    andrew
Sponsored by:   Arm Ltd

(cherry picked from commit 736b7ec362a3db58007361ecbbb62dfb4bb3031e)
DeltaFile
+1-0sys/arm64/include/armreg.h
+1-01 files

FreeBSD/src dd4dcf6sys/dev/ofw ofw_cpu.c

dev/ofw: Register the ofw_cpu xref

This allows it to be referenced by other devices.

Reviewed by:    jhibbits
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D53329

(cherry picked from commit d539f2d9d2ce88f295567578d0e7a3b49d45544b)
DeltaFile
+1-0sys/dev/ofw/ofw_cpu.c
+1-01 files

FreeBSD/src 28bb4a9sys/arm64/include cpu.h _armreg.h

arm64: Use _armreg.h in cpu.h

We only needed armreg.h for the *_SPECIALREG macros. Use the new
_armreg.h directly.

Reviewed by:    emaste
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D53325

(cherry picked from commit 95a5bfcee07cf522edab72388decc4d6e27d341d)
DeltaFile
+1-1sys/arm64/include/cpu.h
+1-0sys/arm64/include/_armreg.h
+2-12 files

FreeBSD/src 4f3be1esys/arm64/arm64 nexus.c

arm64: Add non-PCI MSI support

Add the arm64 parts to support for non-PCI MSI and MSI-X interrupts.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D53331

(cherry picked from commit 4713f54013176fc73ada29cf094016fd3b328c80)
DeltaFile
+85-0sys/arm64/arm64/nexus.c
+85-01 files