FreeBSD/src 9ed1713 — sys/dev/bnxt/bnxt_en bnxt.h if_bnxt.c

bnxt: add 400GBase-FR4 support

Support 400GBase-FR4 optics, allowing the driver to report
"Ethernet autoselect (400GBase-FR4 <full-duplex>)"  for FR4
media.

Differential Revision: https://reviews.freebsd.org/D61135
Reviewed by: sumit.saxena_broadcom.com
Sponsored by: Netflix
DeltaFile
+10-0sys/dev/bnxt/bnxt_en/if_bnxt.c
+1-0sys/dev/bnxt/bnxt_en/bnxt.h
+11-02 files

FreeBSD/src dc5a7d9 — sys/netinet/tcp_stacks rack.c

Broadcom tester's were able to trigger a KASSERT in rack due to an accounting issue.

The recently added code to rack to help minimize reordering issues had a KASSERT for protection of its counting field. This
was consistently. Triggered in broadcom's testing lab. They came up with a partial solution.. but one of their fixes was
also incorrect causing the counter to increase incorrectly as well. I worked with them to give them an updated patch (the one
attached in this review). They have tested that in their same repro environment and confirm this fixes the issue.

Reviewed by:tuexen, nickbanks_netflix.com
Differential Revision:  <https://reviews.freebsd.org/D61136>
DeltaFile
+33-1sys/netinet/tcp_stacks/rack.c
+33-11 files

FreeBSD/src 662deb4 — sys/dev/hwpmc hwpmc_amd.c

hwpmc/amd: prime UMC perfmon block before programming counter registers

UMC counter register writes do not take effect while no counter in the
channel is enabled. Reserve the last counter slot of each UMC channel
and keep it enabled with EventSelect=0 so writes to the remaining slots
take effect. Reserved slots are not exposed to MI code.

UMC perfmon MSRs are package-scoped. A per-socket reference count arms
the reserved slots on the first amd_pcpu_init() for a socket and
disarms them on the last amd_pcpu_fini().

Reviewed by:    mhorne
Sponsored by:   AMD
Signed-off-by:  Osvaldo Janeri Filho <ojanerif at amd.com>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2422
DeltaFile
+110-10sys/dev/hwpmc/hwpmc_amd.c
+110-101 files

FreeBSD/src 4b8e4e6 — sys/riscv/riscv locore.S

riscv: Map the DTB when it is outside the kernel's 1GB region

When the kernel is started directly by SBI firmware, locore.S maps only
the 1GB region that contains the kernel, and initriscv() reads the DTB
through that mapping at the physical address passed in a1.  If the
firmware put the DTB in another 1GB region, as QEMU does with more than
1GB of RAM, fake_preload_metadata() faults before the console is up and
the kernel hangs.

Also map the 1GB region that contains the DTB.

This fixes direct kernel booting without FreeBSD loader(8).

PR:             299088
Reviewed by:    mhorne
Fixes:          bfb857546984 ("riscv: Construct an identity map in locore.S")
MFC after:      1 week
Signed-off-by:  Rick Richard <rick at sloservers.com>

(cherry picked from commit 509d65fae512c24fc755d6a8b3b41bb967e6c5e1)
DeltaFile
+15-3sys/riscv/riscv/locore.S
+15-31 files

FreeBSD/src 80c954a — contrib/libarchive/libarchive archive_read_support_format_iso9660.c archive_read.c, contrib/libarchive/libarchive/test test_read_format_zip_streamable_skip.c test_archive_write_close_callback.c

libarchive: merge from vendor branch

libarchive 3.8.11

ChangeLog:
https://github.com/libarchive/libarchive/compare/v3.8.10...v3.8.11

Obtained from:  libarchive
Vendor commit:  03036ffa409a2aa1c5bbad35be2202641a040fda
MFC after:      3 days

(cherry picked from commit 322d4227521380a61850b3d4f2ebd2b42343a254)
DeltaFile
+170-0contrib/libarchive/libarchive/test/test_write_format_pax_mac_meta.c
+65-98contrib/libarchive/tar/creation_set.c
+98-48contrib/libarchive/libarchive/archive_read.c
+106-0contrib/libarchive/libarchive/test/test_archive_write_close_callback.c
+60-43contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
+99-0contrib/libarchive/libarchive/test/test_read_format_zip_streamable_skip.c
+598-18988 files not shown
+2,556-46994 files

FreeBSD/src 3dba72d — lib/libpmc libpmc_pmu_util.c, lib/libpmc/pmu-events jevents.c

libpmc: Fix AMD L3 counter parameter parsing

Fix two small bugs affecting the event parsing of AMD L3 counters.
AMD's manual and JSON disagree about the naming scheme on recent
processors.  I use the naming scheme present in the recent PPRs to be
consistent, so in the JSON parser we rename 'allslices' to 'allsources'
just as we already do with sliceid and sourceid.  Also ensure that we
parse the 0x prefix present in the newer JSON files.

Reviewed by:    mhorne
Sponsored by:   Netflix
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2180

(cherry picked from commit d38b3a5ead0d3507080da5321144219b13d43aa9)
DeltaFile
+8-1lib/libpmc/pmu-events/jevents.c
+4-4lib/libpmc/libpmc_pmu_util.c
+12-52 files

FreeBSD/src 8f1f763 — lib/libpmc/pmu-events jevents.c

jevents: include file path in whitelist error message

A small enhancement.

Reviewed by:    Ali Mashtizadeh <ali at mashtizadeh.com>
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55830

(cherry picked from commit f0e0c4c52971f58d41a89690d402520500d286bd)
DeltaFile
+1-1lib/libpmc/pmu-events/jevents.c
+1-11 files

FreeBSD/src e7c7fed — lib/libpmc/pmu-events pmu-events.h jevents.c

libpmc/pmu-events: Add support for new json fields

This change adds support for three new Intel fields to jevents.c:
 - MetricThreshold
 - MetricgroupNoGroup
 - DefaultMetricgroupName

Reviewed by:    ali_mashtizadeh.com, mhorne
Differential Revision:  https://reviews.freebsd.org/D56017
MFC after:      1 week

(cherry picked from commit 6ad94d549eb2286d791abd5634400d8ef36d8259)
DeltaFile
+24-0lib/libpmc/pmu-events/jevents.c
+3-0lib/libpmc/pmu-events/pmu-events.h
+27-02 files

FreeBSD/src 60edd11 — lib/libpmc libpmc.c libpmc_pmu_util.c, lib/libpmc/pmu-events jevents.c

libpmc: Explicitly whitelist json fields

Adds all missing Intel fields and turns jevents.c into an explicit white
list mechanism so that we no longer ignore important fields that often
invalidate the counter.  The json event parser must now parse every
field on each architecture that we support.  This has been tested by
running tinderbox and manually running jevent against our current json
repository.  As a bonus I fixed spelling errors in the AMD JSON
definitions.

Sponsored by: Netflix

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2055

(cherry picked from commit bfb2fd5f66183454cfe8771595df09c0f23c7efb)
DeltaFile
+100-29lib/libpmc/pmu-events/jevents.c
+19-0lib/libpmc/libpmc_pmu_util.c
+4-1lib/libpmc/libpmc.c
+1-1lib/libpmc/pmu-events/arch/x86/amdzen6/load-store.json
+1-1lib/libpmc/pmu-events/arch/x86/amdzen5/load-store.json
+1-1lib/libpmc/pmu-events/arch/x86/amdzen4/cache.json
+126-336 files

FreeBSD/src 8b55ee6 — lib/libpmc/pmu-events/arch/x86/amdzen6 l3-cache.json execution.json

libpmc: Import AMD Zen 6 PMU events.

Sponsored by: Netflix

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2049

(cherry picked from commit 178d0b5b8da7480f455273aedf40dd8f1e785d3f)
DeltaFile
+1,106-0lib/libpmc/pmu-events/arch/x86/amdzen6/floating-point.json
+523-0lib/libpmc/pmu-events/arch/x86/amdzen6/load-store.json
+339-0lib/libpmc/pmu-events/arch/x86/amdzen6/recommended.json
+326-0lib/libpmc/pmu-events/arch/x86/amdzen6/l2-cache.json
+192-0lib/libpmc/pmu-events/arch/x86/amdzen6/execution.json
+177-0lib/libpmc/pmu-events/arch/x86/amdzen6/l3-cache.json
+2,663-06 files not shown
+3,217-112 files

FreeBSD/src 58d080e — lib/libpmc/pmu-events/arch/x86/amdzen5 l3-cache.json l2-cache.json

libpmc: Import AMD Zen 5 PMU events.

Sponsored by:           Netflix

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1954

(cherry picked from commit bae832487038b2c8778dc6f52700b4353175ccec)
DeltaFile
+1,634-0lib/libpmc/pmu-events/arch/x86/amdzen5/data-fabric.json
+812-0lib/libpmc/pmu-events/arch/x86/amdzen5/floating-point.json
+517-0lib/libpmc/pmu-events/arch/x86/amdzen5/load-store.json
+457-0lib/libpmc/pmu-events/arch/x86/amdzen5/recommended.json
+266-0lib/libpmc/pmu-events/arch/x86/amdzen5/l2-cache.json
+177-0lib/libpmc/pmu-events/arch/x86/amdzen5/l3-cache.json
+3,863-07 files not shown
+4,518-013 files

FreeBSD/src 2321b3d — sbin/hastd/tests hastd_test.sh

hastd: Add full lifecycle test

Add a test case that creates and starts two nodes, has one assume the
primary role and the other the secondary role, writes to the device,
verifies that the data is synced to both nodes, then switches the roles,
and finally shuts both nodes down and compares their backing stores.

Differential Revision:  https://reviews.freebsd.org/D59676
DeltaFile
+133-1sbin/hastd/tests/hastd_test.sh
+133-11 files

FreeBSD/src a4c5803 — sbin/hastctl hastctl.8 hastctl.c, sbin/hastd hast.h hastd.8

hastd: Allow overriding the node name

Normally, hastd will use the hostname, hostuuid, or hostid as node name.
Allow overriding this with a new -n command-line option.  The argument
is treated as a replacement for the hostname, but also disables the
hostuuid and hostid logic.  This allows running multiple nodes on the
same system, which is useful for testing.

Differential Revision:  https://reviews.freebsd.org/D59675
DeltaFile
+39-7sbin/hastd/parse.y
+18-12sbin/hastctl/hastctl.c
+11-1sbin/hastctl/hastctl.8
+8-3sbin/hastd/hastd.c
+7-1sbin/hastd/hastd.8
+2-0sbin/hastd/hast.h
+85-246 files

FreeBSD/src e495998 — sys/dev/clk clk_fixed.h clk_fixed.c

FDT, clk_fixed: add gated-fixed-clock support and deferred initialization

- Add CLK_TYPE_GATED_FIXED with GPIO-based gate control.
- Support optional vdd-supply regulator.
- Delay clknode registration until parent clock and other dependencies
  are present (via new_pass).

While I'm in, switch license header to the new SPDX format.

MFC after:      2 weeks
Reviewed by:    manu
Differential Revision:  https://reviews.freebsd.org/D58103
DeltaFile
+335-81sys/dev/clk/clk_fixed.c
+5-22sys/dev/clk/clk_fixed.h
+340-1032 files

FreeBSD/src 06e5b04 — tests/sys/sound sndstat.c mmap.c

sound tests: Check the return value of close(2)

While here, remove two munmap(2) calls on mappings the tests require to
have failed, since they are practically dead.

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60800

(cherry picked from commit eb36c35ccf83ea94d46a3bcb282c01ceeaeb3bab)
DeltaFile
+5-5tests/sys/sound/polling.c
+2-6tests/sys/sound/mmap.c
+2-2tests/sys/sound/sndstat.c
+9-133 files

FreeBSD/src 1f94158 — sys/dev/sound/pcm sound.h dsp.c

sound: Let pcm_unregister() tear down a partially initialized device

Since 3107b952f534 ("sound: Merge PCM_ALIVE() with PCM_REGISTERED()"),
pcm_unregister() is gated on PCM_REGISTERED(), so it cannot run unless
pcm_register() has already succeeded, which means drivers will leak
resources if a failure happened prior to this.

Reintroduce PCM_ALIVE(), but test dev rather than the lock. pcm_init()
assigns dev before anything else, so it can tell us whether pcm_init()
has run or not. Make sure to clear it in pcm_unregister() so that a
second call to pcm_unregister() cannot double-free.

While here, publish to sndstat(4) only once pcm_register() has
succeeded.

Reported by:    jah
Fixes:          3107b952f534 ("sound: Merge PCM_ALIVE() with PCM_REGISTERED()")
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation

    [4 lines not shown]
DeltaFile
+6-4sys/dev/sound/pcm/sound.c
+8-1sys/dev/sound/pcm/dsp.c
+2-2sys/dev/sound/pcm/sound.h
+16-73 files

FreeBSD/src 9291bb1 — sys/dev/virtio/network if_vtnetvar.h if_vtnet.c

virtio_net: Use bus_dma for command/ack buffers

(cherry picked from commit ea130fa32099ea7e0c03702efdec28e745ea6ef1)
DeltaFile
+285-65sys/dev/virtio/network/if_vtnet.c
+6-0sys/dev/virtio/network/if_vtnetvar.h
+291-652 files

FreeBSD/src 87bba0a — sys/amd64/amd64 trap.c

amd64 FRED: enable interrupts after user EXTINTs and NMIs

(cherry picked from commit 91d9fbb6e1537009c35ec0c1c37ca09b28c0b31d)
DeltaFile
+3-3sys/amd64/amd64/trap.c
+3-31 files

FreeBSD/src 6695c6b — sys/dev/virtio/network if_vtnetvar.h if_vtnet.c

virtio_net: Use bus_dma for rxq/txq buffers

(cherry picked from commit 8193fa3b8e1a9425bd8ac8b707cab565816b8584)
DeltaFile
+281-17sys/dev/virtio/network/if_vtnet.c
+10-0sys/dev/virtio/network/if_vtnetvar.h
+291-172 files

FreeBSD/src d3040b1 — sys/amd64/amd64 genassym.c exception.S

amd64 FRED: use symbolic constant for the NMI unblocking bit for ERETS

(cherry picked from commit 614b6597e7025b5b1dd23f058e53e8c28dc28efe)
DeltaFile
+2-1sys/amd64/amd64/exception.S
+1-0sys/amd64/amd64/genassym.c
+3-12 files

FreeBSD/src 4604502 — sys/amd64/amd64 genassym.c exception.S, sys/cddl/dev/dtrace/amd64 dtrace_asm.S

amd64 FRED: fix dtrace fbt

(cherry picked from commit cf4ff7bd369e42fb0a1c6f5cf2dc4fa7a990158e)
DeltaFile
+12-6sys/cddl/dev/dtrace/amd64/dtrace_asm.S
+12-0sys/amd64/amd64/exception.S
+4-0sys/amd64/amd64/genassym.c
+28-63 files

FreeBSD/src eb91ae9 — sys/amd64/amd64 trap.c

amd64 FRED: get out of NMI blocking mode unconditionally

(cherry picked from commit 880d2991661de74e1f800db867dc9d0eda7b1bc9)
DeltaFile
+1-1sys/amd64/amd64/trap.c
+1-11 files

FreeBSD/src a9a3c58 — sys/amd64/amd64 trap.c

amd64 FRED: handle INT 3, INT 4, and INT 0x92 same as for IDT

(cherry picked from commit 32b9c967e07c7af2b6e421969d0e7ba1cc9b9425)
DeltaFile
+16-0sys/amd64/amd64/trap.c
+16-01 files

FreeBSD/src c393a13 — sys/amd64/amd64 trap.c

amd64 FRED: fix handling of ATPIC IRQ range when no atpic is configured

(cherry picked from commit bf074ee97407f24c200613470b3b7a24ce5a5242)
DeltaFile
+4-4sys/amd64/amd64/trap.c
+4-41 files

FreeBSD/src 94816f6 — sys/amd64/amd64 trap.c

amd64: add helpers to set up thread state on trap

(cherry picked from commit 7f49a62e3c5ff15d87afcce9ab7fe787319a3f7f)
DeltaFile
+17-8sys/amd64/amd64/trap.c
+17-81 files

FreeBSD/src 5a87d01 — sys/amd64/amd64 trap.c

amd64 FRED: re-wrap the comment

(cherry picked from commit 0213bd5e5639e855d4039212f0f3f6ad89c6d65a)
DeltaFile
+3-3sys/amd64/amd64/trap.c
+3-31 files

FreeBSD/src 0ecc788 — sys/amd64/amd64 exception.S

amd64 FRED: explain why %rax is saved early

(cherry picked from commit 6105e8589b2cd7f9001df045392c30fc86900633)
DeltaFile
+4-0sys/amd64/amd64/exception.S
+4-01 files

FreeBSD/src 2c85ff5 — sys/amd64/amd64 machdep.c

amd64 FRED: normalize the user-provided 'fred' knob value

(cherry picked from commit 78962f9b66d1f84b957ddac3f528f184ba1f4739)
DeltaFile
+2-0sys/amd64/amd64/machdep.c
+2-01 files

FreeBSD/src 7dc8a9b — sys/amd64/amd64 db_trace.c

amd64 db_nextframe(): classify user_fred_syscall frame as SYSCALL

(cherry picked from commit b2767c7b022a8d7c03af8ee1b0fcd20d855d5433)
DeltaFile
+2-2sys/amd64/amd64/db_trace.c
+2-21 files

FreeBSD/src ab2a454 — sys/amd64/amd64 trap.c

amd64 FRED: mark trap frame as initialized for KASAN/KMSAN

(cherry picked from commit 1c25a7f1cb2986901957cc1cdf7a0c0f99748a35)
DeltaFile
+6-0sys/amd64/amd64/trap.c
+6-01 files