FreeBSD/src d4d735bsys/netinet sctp_cc_functions.c

sctp: Use __sdt_used for variables only used by SDT probes

Previously this used a home-rolled version.

Reviewed by:    tuexen, imp, markj
Differential Revision:  https://reviews.freebsd.org/D55165
DeltaFile
+9-15sys/netinet/sctp_cc_functions.c
+9-151 files

FreeBSD/src 83e5b79sys/fs/ext2fs ext2_extents.c

ext2fs: Use __sdt_used for variables only used by SDT probes

Reviewed by:    imp, markj
Differential Revision:  https://reviews.freebsd.org/D55164
DeltaFile
+1-5sys/fs/ext2fs/ext2_extents.c
+1-51 files

FreeBSD/src 3f18463sys/dev/sdhci sdhci_fdt_rockchip.c

sdhci_fdt_rockchip: Don't return 0 from probe routine

The only write to the softc is a no-op (softcs are initialized to all
zeroes), so remove that and just use BUS_PROBE_DEFAULT.

Reviewed by:    bnovkov
Differential Revision:  https://reviews.freebsd.org/D55159
DeltaFile
+1-4sys/dev/sdhci/sdhci_fdt_rockchip.c
+1-41 files

FreeBSD/src efdd30csys/dev/sdhci sdhci_fdt_rockchip.c

sdhci_fdt_rockchip: Move ofw_bus_status_okay check

This fixes a warning from GCC:

sys/dev/sdhci/sdhci_fdt_rockchip.c: In function 'sdhci_fdt_rockchip_probe':
sys/dev/sdhci/sdhci_fdt_rockchip.c:120:14: error: statement will never be executed [-Werror=switch-unreachable]
  120 |         if (!ofw_bus_status_okay(dev))
      |              ^~~~~~~~~~~~~~~~~~~~~~~~

Reviewed by:    bnovkov, imp, emaste
Differential Revision:  https://reviews.freebsd.org/D55158
DeltaFile
+2-1sys/dev/sdhci/sdhci_fdt_rockchip.c
+2-11 files

FreeBSD/src ee73475lib/clang/libclang Makefile, lib/clang/liblldb Makefile

llvm: Link private LLVM libraries against compiler_rt for aarch64

This is required for GCC which uses libcalls for outlined atomics.

Reviewed by:    dim
Differential Revision:  https://reviews.freebsd.org/D55157
DeltaFile
+4-0lib/clang/libclang/Makefile
+4-0lib/clang/liblldb/Makefile
+4-0lib/clang/libllvm/Makefile
+12-03 files

FreeBSD/src 244f498lib/libmd/aarch64 md5block.S

libmd aarch64: Use ands instead of bics to round down the length

GNU as does not accept bics with two register operands but instead
requires three register operands.  However, clang assembles the bics
instruction to ands anyway, so just use ands directly.

Reviewed by:    fuz
Differential Revision:  https://reviews.freebsd.org/D55155
DeltaFile
+1-1lib/libmd/aarch64/md5block.S
+1-11 files

FreeBSD/src ec5d466sys/arm/allwinner aw_mmc.c aw_mmc.h

aw_mmc: Reset card

On H616 (and I think H6, but this isn't verified) we need to reset the
card to have a functioning device.

With this commit all my pending patches for H616 are in tree. We run
well on my test device (Orange Pi Zero3), however there is an
uninvestigated issue with ethernet and graphics are an open question.

Reviewed by:    manu, adrian
MFC After:      1 week
Relnotes:       yes
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55097
DeltaFile
+8-0sys/arm/allwinner/aw_mmc.c
+4-0sys/arm/allwinner/aw_mmc.h
+12-02 files

FreeBSD/src 97beb0c. CONTRIBUTING.md

CONTRIBUTING.md: Clarify GitHub pull requests

Make the guidelines more prescriptive (while remaining clear that Pull
Requests are merely one, not-preferred method for submitting changes).

Reviewed by:    imp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55089
DeltaFile
+85-54CONTRIBUTING.md
+85-541 files

FreeBSD/src c98aa51sys/arm64/vmm vmm_arm64.c arm64.h

arm64/vmm: Add HYP_FEAT_FGT{,2}

Add the macros and detection for Fine-grained traps (FEAT_FGT and
FEAT_FGT2).

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

(cherry picked from commit 095a7871f4320e7667a644e6e34a27e1f526b053)
DeltaFile
+12-0sys/arm64/vmm/vmm_arm64.c
+2-0sys/arm64/vmm/arm64.h
+14-02 files

FreeBSD/src 067250elib/libc/aarch64/string memset_resolver.c memset_zva64.S

libc/aarch64: Add memset for a 64 byte dc zva

On arm64 we can use the "dc zva" instruction to zero memory. The CPU
tells software if the instruction is implemented, and if so the size
and alignment it will use.

When the size is 64-bytes the Arm Optimized Routines implementation of
memset can use dc zva to zero memory, and has a build flag to skip
checking.

Use this flag to build a version of memset that will be used when this
assumption is true.

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

(cherry picked from commit 32d1f18865abe94d351a6f178a93b7195595ec69)
DeltaFile
+13-0lib/libc/aarch64/string/memset_resolver.c
+4-0lib/libc/aarch64/string/memset_zva64.S
+3-1lib/libc/aarch64/string/Makefile.inc
+20-13 files

FreeBSD/src e0fdcb8sys/arm64/vmm vmm_reset.c vmm_hyp.c

arm64/vmm: Set and use the fine-grained traps

Set the Fine-grained trap registers to trap any features we don't
support. These are expected to be more useful when we support nested
virtualisation, so for now just the base features and GICv3 are not
trapped.

As nested virtualisation will require VHE we only set the fine-grained
trap registers when VHE is used.

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

(cherry picked from commit a4f0e93c514280bfd0ff3897e5171ec7bbe4796b)
DeltaFile
+405-0sys/arm64/vmm/vmm_reset.c
+22-0sys/arm64/vmm/vmm_hyp.c
+16-0sys/arm64/vmm/arm64.h
+443-03 files

FreeBSD/src 6bea105sys/dev/virtio/p9fs virtio_p9fs.c

virtio_p9fs: Use VIRTIO_SIMPLE_PNPINFO

This allows us to also use the common VIRTIO_SIMPLE_PROBE and to have
devmatch load the driver when detected.

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

(cherry picked from commit 2f3f5055e7f69567f7aaca2f5b77655df34c4bb0)
DeltaFile
+3-7sys/dev/virtio/p9fs/virtio_p9fs.c
+3-71 files

FreeBSD/src 89776cesys/arm64/include hypervisor.h

arm64: Add the Fine-Grained Trap registers

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

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

FreeBSD/src db96d49lib/libc/aarch64/string Makefile.inc memcpy.S

libc/aarch64: Split out the MOPS functions

This allows static binaries to only include the functions they
reference.

Reviewed by:    imp
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54775

(cherry picked from commit f0516ed4652cfb7435f8c5a16b46dc067779a1a8)
DeltaFile
+14-0lib/libc/aarch64/string/Makefile.inc
+0-2lib/libc/aarch64/string/memcpy.S
+0-1lib/libc/aarch64/string/memset.S
+14-33 files

FreeBSD/src 93ba7dcsys/arm64/arm64 gic_v3_fdt.c

arm64: Attach the vgic even if there is no ITS

If there is no ITS device so no memory resources the gicv3 driver would
exit attaching early. This caused the vgic driver to also not be
attached, even if it could.

Reported by:    novel@
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54791

(cherry picked from commit c12d6cc326b70326d776324067bdf07e4fa328aa)
DeltaFile
+30-27sys/arm64/arm64/gic_v3_fdt.c
+30-271 files

FreeBSD/src bcb8b26sys/arm/arm gic.c

arm/gic: Detect broken configurations

Some virtualization platforms provide broken configurations. There
is a GIC interrupt controller, however accessing the CPU interface
registers leads to an external data abort. As these are needed to
handle interrupts we are unable to boot further.

Detect this misconfiguration and panic to tell the user the issue.

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

(cherry picked from commit 6c5fdba45a63d66984e15ddc6996f5e88a55f22c)
DeltaFile
+14-1sys/arm/arm/gic.c
+14-11 files

FreeBSD/src b0d8e99sys/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

(cherry picked from commit 27083693955d563f836fd1b6b1bc4e1a249d3b6b)
DeltaFile
+2-7sys/crypto/sha2/sha512c.c
+2-6sys/crypto/sha2/sha256c.c
+4-132 files

FreeBSD/src c70a68bsys/arm64/arm64 vfp.c

arm64: Fix kernel panic in get_arm64_sve during core dump

The coredump logic calls get_arm64_sve twice: once to get the note size,
and once to get the data. The note size calculation depended on the
volatile `PCB_FP_SVEVALID` flag. If this flag was cleared between the
two calls (e.g., due to a context switch clearing the flag to comply
with the ABI), the second call would expect a smaller buffer size than
the first, triggering a KASSERT panic ("invalid size").

Fix this by ensuring the SVE state is saved to the PCB before we decide
whether to use SVE or VFP.

PR: 292195
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D54532

(cherry picked from commit 93d3ac1daa0ef3ac54ffcd5cc64a14638d04bd60)
DeltaFile
+3-3sys/arm64/arm64/vfp.c
+3-31 files

FreeBSD/src 50144c0lib/libc/aarch64/string Makefile.inc

libc/aarch64: Add a Makefile.inc dependency

If we update Makefile.inc it may be to change the contents of these
files.

Reviewed by:    imp
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D54774

(cherry picked from commit 00f68392130cf597c7c76669c63dab26b31630c1)
DeltaFile
+2-2lib/libc/aarch64/string/Makefile.inc
+2-21 files

FreeBSD/src 5b818d9sys/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

(cherry picked from commit bdaa120b30006d7ef841a966414795416ce93eea)
DeltaFile
+1-1sys/arm64/include/armreg.h
+1-11 files

FreeBSD/src d8e700flib/libc/aarch64/string memset_resolver.c memmove_resolver.c, tools/build depend-cleanup.sh

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

(cherry picked from commit 41ccf82b29f3b16fcd1ccb4987569c851222ef8d)
(cherry picked from commit fb96702a034c663adb4a1b44299af01fa71e29fd)
DeltaFile
+42-0lib/libc/aarch64/string/memset_resolver.c
+42-0lib/libc/aarch64/string/memmove_resolver.c
+42-0lib/libc/aarch64/string/memcpy_resolver.c
+9-4lib/libc/aarch64/string/Makefile.inc
+6-0tools/build/depend-cleanup.sh
+2-2lib/libc/aarch64/string/memcpy.S
+143-61 files not shown
+145-67 files

FreeBSD/src dd80750libexec/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

(cherry picked from commit a652357fb59f03bee85d61814002f9c60ea52340)
DeltaFile
+14-3libexec/rtld-elf/aarch64/reloc.c
+7-3libexec/rtld-elf/aarch64/rtld_machdep.h
+21-62 files

FreeBSD/src 2a9a92bsys/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

(cherry picked from commit 591c7a08bf8addce4b047ef9c8033c33099e4688)
DeltaFile
+64-0sys/arm64/arm64/trap.c
+35-0sys/arm64/arm64/machdep.c
+7-1sys/arm64/arm64/identcpu.c
+106-13 files

FreeBSD/src dee5c26lib/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

(cherry picked from commit 5eec3531204bd93426642a9c45b0c292a01447e4)
DeltaFile
+28-3lib/libc/csu/aarch64/reloc.c
+28-31 files

FreeBSD/src d8d8be5sys/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

(cherry picked from commit 449339bdba2470eded4d55c41b084cfc8f5ef73a)
DeltaFile
+23-5sys/arm64/include/ifunc.h
+23-51 files

FreeBSD/src 565f47esys/arm64/include armreg.h

arm64: Add FEAT_MOPS register fields

(commit message by andrew@)

Reviewed by:    andrew
Sponsored by:   Arm Ltd

(cherry picked from commit 0685fc435c2b6750762d50985bc6876dede5fbe2)
DeltaFile
+25-1sys/arm64/include/armreg.h
+25-11 files

FreeBSD/src bb0734c. ObsoleteFiles.inc

ObsoleteFiles: remove the shar(1) manpage as well

Fixes:  3fde39073c ("shar: remove from the tree [...]")
DeltaFile
+1-0ObsoleteFiles.inc
+1-01 files

FreeBSD/src 5ca05e5sys/arm64/arm64 locore.S

arm64: Fix jump to wrong label in case of 0 entries

Broke qemu-system-aarch6 boot with VIRT kernconf

PR:             292156
Fixes:          ea8dc498aa8e ("arm64: Create an L3 table to limit permissions")
Signed-off-by:  Marian Cingel <cingel.marian at gmail.com>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1943

(cherry picked from commit a9f2f92322f211921b955b13b088624efe7f901a)
DeltaFile
+2-2sys/arm64/arm64/locore.S
+2-21 files

FreeBSD/src 6a0ab05tools/boot universe.sh

tools: fix WITHOUT_LOADER_GELI typo in universe.sh

Signed-off-by:  Quentin Thébault <quentin.thebault at defenso.fr>
Reviewed by:    emaste
Sponsored by:   Defenso
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2011
DeltaFile
+1-1tools/boot/universe.sh
+1-11 files

FreeBSD/src b6824febin/chio defs.h pathnames.h

chio: Add SPDX-License-Identifier tags

Some BSD-4-Clause files under bin/chio were missing the
SPDX-License-Identifier-tag.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55193
DeltaFile
+2-0bin/chio/defs.h
+2-0bin/chio/pathnames.h
+2-0bin/chio/chio.c
+6-03 files