HardenedBSD/src a8aca62. README.md

HBSD: Document rejection of AI/LLM/etc generated works

HardenedBSD is disinterested in navigating potential copyright issues.

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+5-0README.md
+5-01 files

LLVM/project 6c81b99llvm/lib/Target/RISCV RISCVInstrInfoP.td RISCVISelLowering.cpp

[RISCV][P-ext] Custom lower v8i8 mulh* on RV64. NFC (#218160)

Assisted-by: Claude
DeltaFile
+44-2llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+28-13llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+72-152 files

LLVM/project 994a5ffllvm/utils/TableGen/Common CodeGenDAGPatterns.cpp CodeGenDAGPatterns.h

[TableGen] Simplify PtrAddrSpace handling in TypeSetByHwMode. NFC (#218564)

The PtrAddrSpace field was previously unused and I think it always has
been. The AddrSpace field used to be vector, but was made a single value
in 83507644ed1c59d76ca0b1ffc3e837fcb3677e41.

Replace AddrSpace with PtrAddrSpace for clarity.

Remove unnecessary conversions to ValueTypeByHwMode to get the pointer
address space. The conversion copies the PtrAddrSpace directly from the
TypeSetByHwMode without modification.
DeltaFile
+4-3llvm/utils/TableGen/Common/CodeGenDAGPatterns.h
+2-2llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
+6-52 files

LLVM/project aa9a5edllvm/utils/TableGen AsmMatcherEmitter.cpp

[TableGen] Fix non-deterministic output from emitGetRegClassFromMatchKindFunc. (#218560)

We were iterating a std::map that uses a pointer for the key which isn't
deterministic.

To fix, dereference the pointer and use operator< from the class.
DeltaFile
+2-1llvm/utils/TableGen/AsmMatcherEmitter.cpp
+2-11 files

FreeBSD/src 132e609sys/dev/igc if_igc.h

igc: Restore the watchdog event counter

The MFC of the fatal memory-error recovery dropped watchdog_events from
the softc.  The driver still increments it, includes it in
IFCOUNTER_OERRORS, and exports it as the watchdog_timeouts sysctl.

Fixes: ee9bbfca423f ("igc: Recover from fatal internal memory errors")
DeltaFile
+1-0sys/dev/igc/if_igc.h
+1-01 files

FreeBSD/src 87b9783sys/net iflib.c ifdi_if.m

iflib: Allow conditional LED device support

A driver class may implement LED control even though the capability is
not available on every device or firmware version it supports.  Add an
optional capability method and consult it before creating the led(4)
device.  Default to supported so existing providers are unchanged.

This will be used by bnxt which blends PF and VF in the same driver.

(cherry picked from commit 2519e19f05e0c3e5925bf81b729b4c28f2ad1af6)
DeltaFile
+10-0sys/net/ifdi_if.m
+1-1sys/net/iflib.c
+11-12 files

FreeBSD/src b730642sys/dev/igc if_igc.h if_igc.c

igc: Report corrected internal ECC errors

I225 and I226 do not interrupt for corrected internal ECC errors.
Instead, the DMA packet buffer and PCIe memories expose sticky status
bits in PBECCSTS and PCIEECCSTS.

Sample these bits with the regular hardware statistics update, preserve
the PBECCSTS ECC enable state while clearing its RW1C indication, and
expose separate counters for the DMA packet buffer, PCIe transmit-data
memory, and PCIe retry buffer.

These counters represent observed indications rather than an exact error
count because multiple corrections between samples collapse into one
sticky status bit.

Hardware validation used an I225-IT (rev 3) and a debug kernel that
wrote only the documented self-clearing injection bits.  Each test
armed the injector, exercised the owning RAM with traffic, and compared
the corresponding counter before and after.

    [15 lines not shown]
DeltaFile
+40-0sys/dev/igc/if_igc.c
+3-0sys/dev/igc/if_igc.h
+43-02 files

FreeBSD/src 7b48d8dsys/dev/igc igc_regs.h if_igc.h

igc: Recover from fatal internal memory errors

I225 and I226 report uncorrectable internal memory errors through
ICR.FER and identify the affected region in PEIND.  Depending on the
region, hardware stops transmit or all PCIe and DMA traffic until the
port is reset and reinitialized.

Enable the fatal error interrupt and capture its read clear status in
the interrupt filter.  Mask the cause while an iflib reset is pending,
report the affected memory regions, and expose per region indication
counters.

PCIe region parity failures require a different recovery order from a
normal reset: assert DEV_RST, wait at least 3 ms, disable PCIe master
requests, clear PCIEERRSTS, and then reinitialize the port.  Follow that
sequence before entering the normal reset path and clear the remaining
LAN status afterward.

The I225/I226 PBECCSTS layout is unrelated to the PCH layout previously

    [21 lines not shown]
DeltaFile
+221-5sys/dev/igc/if_igc.c
+20-5sys/dev/igc/igc_defines.h
+10-0sys/dev/igc/if_igc.h
+7-2sys/dev/igc/igc_regs.h
+258-124 files

FreeBSD/src 7ac83b9sys/dev/ixgbe ixgbe.h if_ix.c

ixgbe: Defer E610 thermal shutdown to iflib

The E610 firmware event handler invoked ixgbe_if_stop() directly from
IFDI_UPDATE_ADMIN_STATUS().  This reset the device without the iflib
queue lifecycle and left the interface marked running after its hardware
was stopped.

Request an iflib reset instead.  Fail the automatic initialization once
so the reset transaction stops the interface and publishes that state.
A later operator-requested initialization remains possible, matching the
previous recovery policy without bypassing iflib.

(cherry picked from commit 3aac283613bd3fd0228a06d6c854ca0bf190ecfb)
DeltaFile
+14-5sys/dev/ixgbe/if_ix.c
+1-0sys/dev/ixgbe/ixgbe.h
+15-52 files

FreeBSD/src f89ea9esys/dev/ixgbe if_ix.c

ixgbe: Defer firmware recovery transitions to iflib

The firmware-mode callout invoked ixgbe_if_stop() directly.  This
performed a full device reset without the iflib context lock or the
iflib queue lifecycle.  It could also poll the E610 firmware command
interface from callout context while identification was active.

Request an iflib reset from the callout instead.  Reject initialization
while firmware recovery remains active.  This leaves the interface
stopped and lets iflib publish that state.  Request initialization when
firmware exits recovery so an administratively-up interface can recover
without operator intervention.

(cherry picked from commit 43aa553ef45a4345bdfabadae40d811730151144)
DeltaFile
+12-4sys/dev/ixgbe/if_ix.c
+12-41 files

FreeBSD/src 16b31a1sys/dev/ixgbe ixgbe_type.h ixgbe.h

ixgbe: Defer ECC recovery to iflib

The link interrupt filter performed a full hardware reset in interrupt
context.  This bypassed iflib stop and initialization, including queue
quiescence and restoration of temporary LED state.

Record the ECC event in the administrative request mask and ask iflib
to perform the reset from its taskqueue.  Keep the ECC cause masked
until reset so the intermediate admin pass cannot re-enable a sticky
condition.  Handle ECC independently of Flow Director and in legacy
interrupt mode.

Remove the redundant EICR write; the filter has already cleared the
reported causes.  Also remove the accompanying complement-mask update
of mac.flags.  It set every flag except DOUBLE_RESET_REQUIRED and had
no place in ECC recovery.

(cherry picked from commit c28f2c551daf07345ac78b74459efe1014c49464)
DeltaFile
+40-14sys/dev/ixgbe/if_ix.c
+1-0sys/dev/ixgbe/ixgbe_type.h
+1-0sys/dev/ixgbe/ixgbe.h
+42-143 files

FreeBSD/src 553667cshare/man/man4 ixl.4, sys/dev/ixl ixl_pf_iflib.c ixl_pf.h

ixl: Add led(4) identification support

Expose each physical port identification LED through /dev/led/ixl*.
Use the existing GPIO LED helpers for most devices and the PHY
provisioning interface for X710 10GBASE-T adapters.

Preserve and restore the original GPIO or PHY indication mode,
including before the interface is stopped.

(cherry picked from commit 8b2e75970c0328e7397290417cc06e9d9c763d2a)
DeltaFile
+77-1sys/dev/ixl/if_ixl.c
+6-1share/man/man4/ixl.4
+5-0sys/dev/ixl/ixl_pf.h
+2-0sys/dev/ixl/ixl_pf_iflib.c
+90-24 files

FreeBSD/src d7bed48share/man/man4 ix.4, sys/dev/ixgbe ixgbe.h if_ix.c

ixgbe: Add led(4) identification support

Expose the physical port identification LED through /dev/led/ix*.
Save and restore the NVM-selected LEDCTL value around each request.
The X550 operations also clear their PHY manual override before the
register is restored.

Use the dedicated firmware port-identification command on E610.  Its
interface selects between firmware blinking and the original mode
rather than directly controlling LEDCTL.

Restore the normal indication before a device stop or reset.

(cherry picked from commit fb7e249ce4fd03fe53e4407efe661f9e94852bb6)
DeltaFile
+54-0sys/dev/ixgbe/if_ix.c
+6-1share/man/man4/ix.4
+2-0sys/dev/ixgbe/ixgbe.h
+62-13 files

FreeBSD/src 9fbf429sys/dev/igc if_igc.c

igc: Remove invalid debug ring pointer iteration

The debug routine reads queue registers by queue index.  It also
advanced unused pointers to rings embedded in queue structures.  Those
pointers had the wrong stride and could proceed beyond the ring object.

Remove the unused pointer arithmetic.

(cherry picked from commit 423927d6c3dc87628fc2a19f25b5b5c07b3b73e2)
DeltaFile
+2-4sys/dev/igc/if_igc.c
+2-41 files

FreeBSD/src b06e426sys/dev/e1000 if_em.c

e1000: Fix the multiqueue debug register dump

The debug routine advanced ring pointers as if rings were contiguous.
They are embedded in queue structures, so rings beyond queue zero had
the wrong stride.  The bogus queue index could cause an invalid MMIO
read and panic the machine.

Index the queue arrays first and then select the embedded ring.

(cherry picked from commit 7dd826171b69a01c234ba6e9117917398ba2705e)
DeltaFile
+6-4sys/dev/e1000/if_em.c
+6-41 files

FreeBSD/src 9d5a148sys/dev/e1000 if_em.c

e1000: Identify SerDes adapters with LED blink

The generic LED on and off operations do not handle internal SerDes
media, leaving the led(4) device ineffective on my I210 fiber port.

Use the hardware blink operation for the on phase on internal SerDes.
The off phase restores the saved OEM LED configuration as before.

(cherry picked from commit 28f96cc3748fc46408cc6ab6172f09bc2182cad7)
DeltaFile
+4-1sys/dev/e1000/if_em.c
+4-11 files

FreeBSD/src 34817fashare/man/man4 igc.4, sys/dev/igc if_igc.h igc_defines.h

igc: Add led(4) identification support

I225 and I226 expose three programmable LED outputs.  Use LED1 for
adapter identification, following the convention in DPDK.  Preserve the
OEM configuration across identification requests.

Restore the OEM configuration before a device reset so an active led(4)
pattern cannot leave the output overridden across stop or detach.

The LED mode values follow the Intel I225 Software User Manual.

(cherry picked from commit 19f75b38199b9d30e85fab83e61ff36b0b9ed015)
DeltaFile
+45-0sys/dev/igc/if_igc.c
+9-1share/man/man4/igc.4
+5-2sys/dev/igc/igc_defines.h
+2-2sys/dev/igc/if_igc.h
+61-54 files

FreeBSD/src 618cd9fshare/man/man4 em.4

igb(4): Document identification LED device nodes

The shared em(4) manual page lists only the em device-node name.
Document the /dev/led/igb* name as well.

(cherry picked from commit fc0e6adb9d26f94616db5357afcbb585e4176c6d)
DeltaFile
+3-3share/man/man4/em.4
+3-31 files

FreeBSD/src 95cf012sys/dev/ixgbe if_ix.c

ixgbe: Defer firmware recovery transitions to iflib

The firmware-mode callout invoked ixgbe_if_stop() directly.  This
performed a full device reset without the iflib context lock or the
iflib queue lifecycle.  It could also poll the E610 firmware command
interface from callout context while identification was active.

Request an iflib reset from the callout instead.  Reject initialization
while firmware recovery remains active.  This leaves the interface
stopped and lets iflib publish that state.  Request initialization when
firmware exits recovery so an administratively-up interface can recover
without operator intervention.

(cherry picked from commit 43aa553ef45a4345bdfabadae40d811730151144)
DeltaFile
+12-4sys/dev/ixgbe/if_ix.c
+12-41 files

FreeBSD/src ee9bbfcsys/dev/igc igc_regs.h if_igc.h

igc: Recover from fatal internal memory errors

I225 and I226 report uncorrectable internal memory errors through
ICR.FER and identify the affected region in PEIND.  Depending on the
region, hardware stops transmit or all PCIe and DMA traffic until the
port is reset and reinitialized.

Enable the fatal error interrupt and capture its read clear status in
the interrupt filter.  Mask the cause while an iflib reset is pending,
report the affected memory regions, and expose per region indication
counters.

PCIe region parity failures require a different recovery order from a
normal reset: assert DEV_RST, wait at least 3 ms, disable PCIe master
requests, clear PCIEERRSTS, and then reinitialize the port.  Follow that
sequence before entering the normal reset path and clear the remaining
LAN status afterward.

The I225/I226 PBECCSTS layout is unrelated to the PCH layout previously

    [21 lines not shown]
DeltaFile
+221-5sys/dev/igc/if_igc.c
+20-5sys/dev/igc/igc_defines.h
+10-1sys/dev/igc/if_igc.h
+7-2sys/dev/igc/igc_regs.h
+258-134 files

FreeBSD/src 12a27f8sys/dev/igc if_igc.h if_igc.c

igc: Report corrected internal ECC errors

I225 and I226 do not interrupt for corrected internal ECC errors.
Instead, the DMA packet buffer and PCIe memories expose sticky status
bits in PBECCSTS and PCIEECCSTS.

Sample these bits with the regular hardware statistics update, preserve
the PBECCSTS ECC enable state while clearing its RW1C indication, and
expose separate counters for the DMA packet buffer, PCIe transmit-data
memory, and PCIe retry buffer.

These counters represent observed indications rather than an exact error
count because multiple corrections between samples collapse into one
sticky status bit.

Hardware validation used an I225-IT (rev 3) and a debug kernel that
wrote only the documented self-clearing injection bits.  Each test
armed the injector, exercised the owning RAM with traffic, and compared
the corresponding counter before and after.

    [15 lines not shown]
DeltaFile
+40-0sys/dev/igc/if_igc.c
+3-0sys/dev/igc/if_igc.h
+43-02 files

FreeBSD/src 1dc515bsys/dev/ixgbe ixgbe.h if_ix.c

ixgbe: Defer E610 thermal shutdown to iflib

The E610 firmware event handler invoked ixgbe_if_stop() directly from
IFDI_UPDATE_ADMIN_STATUS().  This reset the device without the iflib
queue lifecycle and left the interface marked running after its hardware
was stopped.

Request an iflib reset instead.  Fail the automatic initialization once
so the reset transaction stops the interface and publishes that state.
A later operator-requested initialization remains possible, matching the
previous recovery policy without bypassing iflib.

(cherry picked from commit 3aac283613bd3fd0228a06d6c854ca0bf190ecfb)
DeltaFile
+14-5sys/dev/ixgbe/if_ix.c
+1-0sys/dev/ixgbe/ixgbe.h
+15-52 files

FreeBSD/src e54458csys/net iflib.c ifdi_if.m

iflib: Allow conditional LED device support

A driver class may implement LED control even though the capability is
not available on every device or firmware version it supports.  Add an
optional capability method and consult it before creating the led(4)
device.  Default to supported so existing providers are unchanged.

This will be used by bnxt which blends PF and VF in the same driver.

(cherry picked from commit 2519e19f05e0c3e5925bf81b729b4c28f2ad1af6)
DeltaFile
+10-0sys/net/ifdi_if.m
+1-1sys/net/iflib.c
+11-12 files

FreeBSD/src 63d7823sys/dev/igc if_igc.c

igc: Remove invalid debug ring pointer iteration

The debug routine reads queue registers by queue index.  It also
advanced unused pointers to rings embedded in queue structures.  Those
pointers had the wrong stride and could proceed beyond the ring object.

Remove the unused pointer arithmetic.

(cherry picked from commit 423927d6c3dc87628fc2a19f25b5b5c07b3b73e2)
DeltaFile
+2-4sys/dev/igc/if_igc.c
+2-41 files

FreeBSD/src 37f1ac5share/man/man4 igc.4, sys/dev/igc if_igc.h igc_defines.h

igc: Add led(4) identification support

I225 and I226 expose three programmable LED outputs.  Use LED1 for
adapter identification, following the convention in DPDK.  Preserve the
OEM configuration across identification requests.

Restore the OEM configuration before a device reset so an active led(4)
pattern cannot leave the output overridden across stop or detach.

The LED mode values follow the Intel I225 Software User Manual.

(cherry picked from commit 19f75b38199b9d30e85fab83e61ff36b0b9ed015)
DeltaFile
+45-0sys/dev/igc/if_igc.c
+9-1share/man/man4/igc.4
+5-2sys/dev/igc/igc_defines.h
+2-2sys/dev/igc/if_igc.h
+61-54 files

FreeBSD/src ce44f0bshare/man/man4 em.4

igb(4): Document identification LED device nodes

The shared em(4) manual page lists only the em device-node name.
Document the /dev/led/igb* name as well.

(cherry picked from commit fc0e6adb9d26f94616db5357afcbb585e4176c6d)
DeltaFile
+3-3share/man/man4/em.4
+3-31 files

FreeBSD/src c43037fsys/dev/e1000 if_em.c

e1000: Identify SerDes adapters with LED blink

The generic LED on and off operations do not handle internal SerDes
media, leaving the led(4) device ineffective on my I210 fiber port.

Use the hardware blink operation for the on phase on internal SerDes.
The off phase restores the saved OEM LED configuration as before.

(cherry picked from commit 28f96cc3748fc46408cc6ab6172f09bc2182cad7)
DeltaFile
+4-1sys/dev/e1000/if_em.c
+4-11 files

FreeBSD/src 5122a61sys/dev/e1000 if_em.c

e1000: Fix the multiqueue debug register dump

The debug routine advanced ring pointers as if rings were contiguous.
They are embedded in queue structures, so rings beyond queue zero had
the wrong stride.  The bogus queue index could cause an invalid MMIO
read and panic the machine.

Index the queue arrays first and then select the embedded ring.

(cherry picked from commit 7dd826171b69a01c234ba6e9117917398ba2705e)
DeltaFile
+6-4sys/dev/e1000/if_em.c
+6-41 files

FreeBSD/src 7ebe1e3sys/dev/ixgbe ixgbe_type.h ixgbe.h

ixgbe: Defer ECC recovery to iflib

The link interrupt filter performed a full hardware reset in interrupt
context.  This bypassed iflib stop and initialization, including queue
quiescence and restoration of temporary LED state.

Record the ECC event in the administrative request mask and ask iflib
to perform the reset from its taskqueue.  Keep the ECC cause masked
until reset so the intermediate admin pass cannot re-enable a sticky
condition.  Handle ECC independently of Flow Director and in legacy
interrupt mode.

Remove the redundant EICR write; the filter has already cleared the
reported causes.  Also remove the accompanying complement-mask update
of mac.flags.  It set every flag except DOUBLE_RESET_REQUIRED and had
no place in ECC recovery.

(cherry picked from commit c28f2c551daf07345ac78b74459efe1014c49464)
DeltaFile
+40-14sys/dev/ixgbe/if_ix.c
+1-0sys/dev/ixgbe/ixgbe_type.h
+1-0sys/dev/ixgbe/ixgbe.h
+42-143 files

FreeBSD/src ddee18ashare/man/man4 ixl.4, sys/dev/ixl ixl_pf_iflib.c ixl_pf.h

ixl: Add led(4) identification support

Expose each physical port identification LED through /dev/led/ixl*.
Use the existing GPIO LED helpers for most devices and the PHY
provisioning interface for X710 10GBASE-T adapters.

Preserve and restore the original GPIO or PHY indication mode,
including before the interface is stopped.

(cherry picked from commit 8b2e75970c0328e7397290417cc06e9d9c763d2a)
DeltaFile
+77-1sys/dev/ixl/if_ixl.c
+6-1share/man/man4/ixl.4
+5-0sys/dev/ixl/ixl_pf.h
+2-0sys/dev/ixl/ixl_pf_iflib.c
+90-24 files