| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
The K1 user manual lists three separate SDHCI devices but the
upstream DTS file only defines the eMMC device.
Create a temporary overlay to allow the BananaPi-F3 to boot from the
SD card until this is addressed upstream.
Differential Revision: https://reviews.freebsd.org/D57177
Reviewed by: mhorne
|
| |
|
|
|
| |
Reviewed by: mhorne
Differential Revision: https://reviews.freebsd.org/D57175
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bridge the Linux memory protection key syscalls to FreeBSD's native
MPK support instead of returning ENOSYS. Modern Linux software
probes these at startup: Chromium-based browsers (found via
www/linux-brave) use protection keys for V8's heap and JIT
sandboxing, and glibc >= 2.27 exposes the full API.
pkey_alloc() allocates from a per-process bitmap kept in the process
emuldata (key 0 implicitly allocated, matching Linux's
mm_pkey_allocation_map; ENOSPC once keys 1..15 are exhausted or when
PKU is absent, as Linux returns on such hardware) and applies the
requested initial access rights to the calling thread's PKRU, located
in the XSAVE area via xsave_area_offset(). pkey_free() is
bookkeeping only: as on Linux, freeing neither untags pages nor
updates PKRU. pkey_mprotect() performs the protection change and
tags the range through amd64_pkru_update(), factored out of
sysarch(2)'s AMD64_SET_PKRU/AMD64_CLEAR_PKRU implementation so that
both share the same argument checking and map read lock
synchronization with a parallel pmap_vmspace_copy() on fork; tags die
with the mapping, matching Linux VMA semantics. A pkey of -1
degrades to plain mprotect.
The allocation map is inherited on fork and reset on exec. At exec
the Linux sysvecs initialize PKRU to 0x55555554, Linux's init_pkru
default (access disabled for keys 1..15), so memory tagged with a
not yet allocated key is inaccessible to threads that were never
granted rights -- the property V8's thread isolation relies on.
Setting PKRU at exec initializes the user FPU state slightly earlier
than the lazy first-use path; the state would be initialized moments
later in rtld/libc startup regardless. Protection key faults
already deliver SEGV_PKUERR through the existing siginfo
translation.
The common code carries no architecture ifdefs. Machine-dependent
state lives in struct linux_pemuldata_md, embedded in the process
emuldata in the manner of struct mdthread, and common code calls
per-arch lifecycle hooks (linux_pemuldata_init_md/_exec_md) and pkey
back ends after performing the parameter validation Linux applies
regardless of hardware support. On amd64 the implementation lives
in sys/amd64/linux/linux_pkru.c, compiled into linux_common and
serving both the 64-bit and 32-bit Linux ABIs. Elsewhere (arm64,
i386) linux_emul_md.c provides stubs returning what Linux returns on
hardware without protection keys (ENOSPC from pkey_alloc;
pkey_mprotect with a pkey of -1 acts as plain mprotect), so
applications take their normal no-PKU fallback instead of the ENOSYS
path.
PR: 297427
MFC after: 1 month
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D58782
|
| |
|
|
|
|
|
|
| |
Replaced the monolithic cdevsw implementation with the video(4)
framework.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D58369
|
| |
|
|
|
|
|
|
| |
Replaced the monolithic cdevsw implementation with the video(4)
framework.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D58368
|
| |
|
|
|
|
|
|
|
|
| |
Add a new video(4) framework that provides /dev/videoN, buffer
management, mmap lifetime, and V4L2 ioctl dispatch for video capture
drivers. Hardware drivers implement struct video_hw_ops callbacks
and use video_buf_acquire/write/done to deliver frames.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D58367
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a GPIO driver for the Intel Tiger Lake-H platform based on the generic
intelgpio framework. The driver defines five GPIO communities with pad groups
GPP_A through GPP_K, vGPIO and JTAG, and matches ACPI hardware ID INT34C6.
The kernel module build infrastructure and the wiring into files.x86 are
included.
Reviewed by: vexeduxr
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Pull Request: https://github.com/freebsd/freebsd-src/pull/2205
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a GPIO driver for the Intel Alder Lake-N platform based on the generic
intelgpio framework. The driver provides pad group definitions for four GPIO
communities covering groups GPP_A through GPP_T, vGPIO and HVCMOS, and matches
ACPI hardware IDs INTC1056, INTC1057 and INTC1085. The kernel module build
infrastructure and the wiring into files.x86 are included.
Reviewed by: vexeduxr
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Pull Request: https://github.com/freebsd/freebsd-src/pull/2205
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Give igb virtual functions a separate ifdi method table and move
VF-specific attach, reset, queue, interrupt, and diagnostic policy to
if_igbv.c. Keep shared descriptor-ring mechanisms in if_em.c.
Derive VF identity from IFLIB_IS_VF and assert that hardware
identification agrees. Under INVARIANTS, validate normal VF CSR
accesses against the sparse 82576 and I350 VF register maps.
Stop shared setup from accessing PF-only controls. Require MSI-X and
defer VF sysctls until attach succeeds so failed attachment cannot
leave handlers pointing at freed driver state.
Advertise only VF capabilities, run adaptive moderation without the
PF receive-buffer guard, enable SRRCTL.DROP_EN, and provide a VF-safe
diagnostic register view.
The moved implementation is the existing FreeBSD code. Register model
was cross-checked against the Intel datasheets and other Intel drivers.
Sponsored by: BBOX.io
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the PCI IOV schema and PF control plane for up to seven VFs with
one hardware queue per pool. Implement VF mailbox handling, MAC and
VLAN assignment, multicast filtering, promiscuity policy,
anti-spoofing, malicious-driver recovery, reset replay, and queue
lifecycle management.
The basic SR-IOV and VMDq PF implementation follows DPDK Intel e1000
code, including PF pool selection, one queue per pool, mailbox
dispatch, and VF enablement. Intel FreeBSD igb-2.5.31 supplies the
older driver baseline. Linux igb and the Intel SDMs clear up lifecycle,
isolation, reset, and family-specific details absent from DPDK.
Enabling IOV requires the PF to attach with one TX and RX queue.
Systems whose defaults select RSS queues must set the documented iflib
queue override tunables before attach.
Only 82576 and I350 support SR-IOV in silicon. The series has been
extensively tested on I350, including thowing boundaries at the PCI BAR
that shipping drivers will never. Still, think carefully before
reaching for this in critical environments.
Relnotes: yes
Sponsored by: BBOX.io
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Register the 82576 and I350 VF PCI IDs under a separate igbv driver
while continuing to share the igb datapath implementation.
Follow the ixv driver split and give the VF context IFLIB_IS_VF so
iflib does not apply the PF SR-IOV detach guard to a child VF. Program
VTIVAR_MISC in the VF low byte so mailbox and reset notifications reach
the VF admin vector.
The split will become increasingly obvious as bug fixes land, trying to
bias everything with if (sc->vf_ifp) everywhere is error prone in two
directions.
This breaks existing naming/configurations and cannot be MFCed as-is.
I have no plans of adapting it to prior branches at the moment but it
may be possible.
Relnotes: yes
Sponsored by: BBOX.io
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nexus-attached driver that discovers and parses coreboot's LBIO tables
from physical memory. Exposes firmware metadata (version, build info,
mainboard, serial config, TSC frequency, CBMEM entries) via sysctl
hw.coreboot.*, the firmware console ring buffer via /dev/coreboot_console,
and structured CBMEM entry access via /dev/cbmem ioctl interface.
Tested on:
- Qotom Q535G6 (Kabylake)
- Intel NUC D54250WYK (Haswell)
- Intel NUC D33217GKE (Ivy Bridge)
- Dell 3100 2-in-1 (Gabbiter)
- Dell 3100 (Fleex)
- Lenovo IdeaPad 320s
- Lenovo ThinkPad T480
- HP Chromebook 11 G4
- HP Chromebook 11 G5
- HP Chromebook 11 G6 EE
- HP Chromebook 14 G4
- HP Chromebook 14 G5
- HP Chromebook x360 11 G1 EE
- HP Chromebook x360 11 G2 EE
- HP Chromebook x360 14 G1
- Acer C720
- Acer Chromebook 11
- Lenovo N22
Reviewed by: ngie, kib, adrian
Differential Revision: https://reviews.freebsd.org/D55649
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add hwpmc_rapl.c/.h implementing PMC_CLASS_RAPL, a read-only
system-scope class modeled on TSC and wired into x86 AMD and Intel MD
init. A per-vendor MSR table covers AMD/Hygon and Intel; energy is
reported in microjoules, with the Intel server 2^-16 J DRAM unit
handled and 32-bit wraps recovered into a 64-bit accumulator.
The overflow guard follows the PMC lifetime: armed on the first
allocated PMC, callout_drain()d on the last release, and each tick only
rendezvouses CPUs holding one. Per-CPU spin locks guard the accumulator
against torn reads on i386. PMC_CAP_DOMWIDE lets pmcstat(8) allocate
one counter per NUMA domain instead of per CPU.
Reviewed by: mhorne, Ali Mashtizadeh <ali@mashtizadeh.com>
Sponsored by: AMD
Differential Revision: https://reviews.freebsd.org/D58028
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This module has several source files, with many conditional on the
platform architecture. Make it easier to read, and better for future
diffs against these lists.
- Convert to one SRC per line
- Simplify arm/armv7 condition
- Remove now-empty header comment
- Minor formatting
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split implementation out from the header files.
This "page pool" is the very minimalistic version we need in order to
support packets on mt76.
We allocate the page pool in order to have the meta data available of
which we only make limited use.
This implementation does no pooling, it does no page fragments for now,
it always hands out a full page and frees it upon return.
It is written in a way that it can be in the tree before the 'struct page'
work it depends on has landed in order to reduce friction for people who
want to try mt7921 (or others later) upfront. We use the same #ifdef
as in the struct page work for that reason so one knob will turn everything
on or off.
Once the struct page work has landed and settled we can start filling this
with more complexity.
In the unlikely event that in the mean time any other consumer would start
showing up they will have to be aware that the current code as-is
essentially is a NOP without the 'struct page' work. A WARN_ONCE() will
notify them.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for the Marvell Atlantic 2 (AQC113/114/115/116) controllers,
a new chip generation that is not register-compatible with the Atlantic 1
parts aq(4) supports today. Adapted from the OpenBSD/NetBSD if_aq driver.
Register and device definitions (aq2_hw.h): the firmware handshake
(MIF_BOOT / MCP_HOST_REQ_INT / MIF_HOST_FINISHED), the 0x12000/0x13000
firmware interface windows, and the action-resolver table (ART) that
replaces Atlantic 1's discrete RX filters, plus the Atlantic 2 PCI device
ids and the aq_is_atlantic2() helper. Reserve a chip-feature bit
(AQ_HW_CHIP_ATLANTIC2) and add the aq_hw fields the firmware fills at boot
(ART base index, statistics interface version A0/B0). The per-VLAN-filter
resolver-tag field comes from the Linux driver; the BSD sources never
write it.
Firmware operations (aq_fwa2.c): Atlantic 2 talks to the management CPU
through the 0x12000/0x13000 register windows plus the boot handshake,
rather than Atlantic 1's mailbox in shared RAM. Implement that as a third
aq_firmware_ops vtable (reset, set_mode, get_mode, get_mac_addr,
get_stats); aq_fwa2_reboot() boots the firmware, selects the A2 ops, and
reads the version and ART base index, failing fast on the
crash-init / boot-failed bits. fwa2_set_mode advertises full duplex only
(the media model exposes no half-duplex types) and writes and acks the
link options before raising ACTIVE mode, so a forced media change does not
begin negotiation with a stale rate mask. enum aq_fw_link_speed gains
aq_fw_10M, which Atlantic 2 supports and Atlantic 1 does not.
Probe and attach: list the device ids with their media types and link
speeds (all copper; AQC113* up to 10G, AQC116C to 1G), populate
hw->device_id, and tag the generation with AQ_HW_CHIP_ATLANTIC2 so
IS_CHIP_FEATURE() recognises it uniformly. Branch firmware bring-up and
reset on the generation: aq_hw_init_ucp() and aq_hw_reset() reboot the MCP
instead of the Atlantic 1 RBL/FLB reset -- without a real datapath reset
every stop/init cycle reprograms the rings on a live, desynced RX DMA
engine and the receive path stays dead. aq_hw_init() programs the
Atlantic 2 launch-time clock ratio in place of the Atlantic 1
MRRS / TX-DMA request-limit clamp. Add an AQ_LINK_10M capability bit
(Atlantic 2 links at 10M, Atlantic 1 cannot), offer 10baseT media, and map
IFM_10_T to aq_fw_10M.
With every supported media type now present, replace the per-speed switch
statements in aq_media.c with a single {link bit, fw rate, IFM_* subtype,
Mbit/s} table -- one source of truth for the supported link speeds.
With this an Atlantic 2 card probes, brings up its firmware, reads its
MAC, and negotiates link; the RX action-resolver datapath comes next.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D58141
|
| |
|
|
|
|
|
|
|
| |
Until D57524 is not reviewed and committed we will have a missing
function declaration which prevents us to compile (in) debugfs for
mt76 core and mt7921. Temporary disable debugfs again.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
| |
This is included via acpivar.h so needs to be in SRCS to be generated.
Reported by: bz
Fixes: bc49842769bd ("acpi_einj: Support for ACPI error injection")
Sponsored by: Arm Ltd
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The debugfs options between the various modules (core and chipsets)
are not 100% de-coupled. This means we may run into unresolveable
symbols at load time of the modules if we enable certain options
generally or for core but not for the chipset.
For now: always build the core module with debugfs support.
Migrate the CONFIG_MAC80211_DEBUGFS flag into the Makefile of each
chipset so we can individually turn it on.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Wacom ExpressKey Remote (ACK-411050) is a wireless button pad
with 18 programmable buttons and a touch ring, used as a companion
device with Wacom tablets.
It communicates via a USB wireless receiver (0x056a:0x0331) using a
vendor-specific HID report (ID 0x11).
This driver exposes the device via evdev:
- 18 buttons: BTN_0–BTN_Z, BTN_BASE, BTN_BASE2
- Touch ring position via ABS_WHEEL (0–71; reports 0 on release)
- Pad activity marker via ABS_MISC (set to 15/PAD_DEVICE_ID when
any input is active, 0 when idle that matches Linux wacom driver
convention)
- Remote serial number via MSC_SERIAL (for userland per-remote
identification)
Battery level, charging state, and touch ring mode (3 LEDs, values 0–2)
are exposed as per-device sysctls (dev.hidwacom.0.battery, .charging,
.ring_mode) rather than overloading evdev misc codes. The ring mode
sysctl is preserved across device idle periods.
Protocol was decoded from USB traffic analysis and cross-referenced
against the Linux wacom_remote_irq() implementation in
drivers/hid/wacom_wac.c.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D56729
Discussed with: ziaee
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add fwdv(4) driver for DV video capture from FireWire camcorders
using AV/C protocol and isochronous streaming.
Supports AV/C tape transport commands (play, stop, ff, rewind, pause,
record, eject) with NTSC/PAL auto-detection and read(2) interface
for frame capture.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D58122
|
| |
|
|
|
|
|
|
| |
-I${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz isn't used, and
.PATH: ${SRCTOP}/sys/contrib/xz-embedded/freebsd isn't used either.
Remove them both to simplify things a little.
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This driver only reports the RFKILL button presses.
This is needed for the "airplane" key on some Framework laptops.
Reviewed by: wulf, ziaee
Event: Halifax Hackathon 202606
Location: vishwin@'s car
Co-authored-by: Daniel Shaefer
Sponsored by: Framework Computer Inc
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57838
|
| |
|
|
|
|
|
|
|
|
|
| |
Expose audio capture from Apple FireWire devices as a standard
pcm(4)/dsp(4) device via the newpcm framework.
(adrian: I've tested this on an isight camera and looped
it back to USB speakers via "sox -t oss /dev/dsp3 -t oss /dev/dsp4")
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D58109
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This driver parses the ACPI EINJ table and builds a list of
instructions associated with known actions. It then exports ioctls to
fetch the set of supported errors and inject system errors by
executing specific sequences of actions. This can be used to test
error reporting facilities for events such as ECC errors.
Reviewed by: gallatin
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D58025
|
| |
|
|
|
|
|
|
|
|
| |
Move vgic, timer and trapframe registers into sys_regs to handle them
in the same way as all the other registers.
Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D56556
|
| |
|
|
|
|
|
|
| |
This reverts commit cd61eb4f6681b13d98b6a7be252500ad30f05f74.
Some people report module load failure due to undefined symbol.
I don't have those problems myself, so it might be a question of
full rebuild. But I don't have time right now, so just revert.
|
| |
|
|
|
|
| |
FreeBSD main just got the CPUID_STDEXT4_SHA512 define.
OpenZFS PR #18732
|
| |
|
|
|
|
|
|
|
|
|
| |
Depend on clknode_if.h in the module Makefile, so that it gets
explicitly built for the module. Also, reduce the #if guards to only
the new clock output code, and gate them on all powerpc, not just
powerpc64.
Fixes: 6b77d34f("HYM8563: Add support for clock output.")
Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D57795
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Notable upstream pull request merges:
#18509 f16b3744d zstream: refactor common functions
#18573 -multiple Persist z_seq across znode eviction
s18611 eb0c674c2 zfs_ioctl: fix EBUSY race between quota queries and mount
#18637 77e64d86e Fix self-deadlock when setting the "allocating"/"path"
vdev property
#18645 e3082b923 freebsd: set mnt_time on the rootfs at mountroot time
#18652 50d012b2a zbookmark_compare: handle "marker" bookmarks with negative
levels
#18664 520eeeaa6 Improve performance of "zpool offline" for log devices
#18668 6b8f79877 Avoid more abd_t allocations in RAIDZ/dRAID
#18669 99ab859c3 Optimize metaslab_set_selected_txg()
#18673 97b9ba7a9 delegate: add 'send:encrypted' permission
#18687 2ea519c2a Avoid lookup overhead for nonexistent xattr directories
#18688 87593ea2b Fix handling of _PC_HAS_HIDDENSYSTEM for FreeBSD
#18693 0483a8e0c Clean up embedded slog metaslab across txgs
#18695 41311c665 RAIDZ: Optimize single data column writes
#18706 37af89948 ddt_log: Fix refcount tagging for begin/commit
Obtained from: OpenZFS
OpenZFS commit: 37af899488652c55c456d3f160fb8b295db2ec70
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add fwcam(4), a driver for IIDC v1.30 (TA Document 1999023) digital
cameras over IEEE 1394.
Supports Format_0 (VGA) video modes with isochronous receive DMA,
feature control (brightness, exposure, gain, shutter, white balance,
focus, etc.), poll/kqueue, and hot-plug via bus reset handling.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D57685
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Port the uvideo(4) driver from OpenBSD. This provides
native USB Video Class (UVC) support for webcams and video capture
devices.
The main changes are adaptation for:
- USB transfer callback model
- isoc data extraction via usbd_copy_out(),
- V4L2 struct alignment for ABI compatibility with v4l_compat.
Note that this implementation can coexist with webcamd.
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D56960
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support for DDR-based firmware coredump memory handling.
It detects firmware coredump capability, allocates host DDR (DMA) memory
for crash dumps, and programs the firmware with the allocated memory during
attach. The allocated memory is released during driver detach.
Also, This patch adds functions to retrieve crash dump data from host DDR
memory. The implementation handles data copying from page tables and
checks dump availability. Main function bnxt_get_coredump() copies
stored crash dump data from DDR memory to the application buffer.
MFC after: 2 weeks
Reviewed by: gallatin, ssaxena
Differential Revision: https://reviews.freebsd.org/D56684
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a logging module which helps to log and collect the driver`s
various events and state of device data structures.
APIs help modules like l2, RoCE etc. to register and
add logs into thg buffers. A segment header is added to the
data available in buffers.
The final log messages are arranged in following fashion
|SegHeader0|Data0|SegHeader1|Data1|
Logging module provides two different kinds of buffers:
a) A large contiguous memory chunk is used to form circular buffers.
Module need to provide a number of buffers while registering to
the logging module.Please note that, since memory for the
buffers remains with the module as long as it is registered, memory
footprints of the driver could be higher so the modules should
allocate an appropriate number of buffers. Also, due to limited
space, modules should only log important events/messages into
the buffer.
Modules must use bnxt_log_add_mssg() to add the message into the
list.
b) Live buffer - They are allocated during coredump retrieval and
freed after the coredump data is returned to the user. This helps
to collect live data from the driver. Modules must use the
bnxt_log_live() function to add the log messages.
When coredump is retrieved all the messages available in above buffers are
copied into the coredump buffer.
Test Plan:
Generate the coredump using below niccli command
./niccli.freebsd -i 1 debug --coredump
and then verify the coredump contents using the Broadcom's Coredump decoder.
MFC after: 2 weeks
Reviewed by: gallatin, ssaxena
Differential Revision: https://reviews.freebsd.org/D56682
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add the missing MODULE_DEPEND() calls for lindebugfs.
It is unfortunate that they are shared code between various bus
implementations. Ideally we would leave the MODULE_DEPEND() calls
in the debugfs.c file instead of adding extra #ifdef guards to the
bus attachment files.
Turn debugfs support on for mt76(core) and the mt7921 module for now.
Sponsonred by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements a VHCI driver on top of the BCE transport:
- Virtual USB bus registration via usb_controller
- Port discovery and device enumeration
- Control, interrupt, and bulk endpoint support
- Firmware event handling with taskqueue
- Suspend/resume via BCE mailbox
Provides keyboard, trackpad, and Touch Bar access on T2 Macs.
Tested-on: MacBookPro16,2 (A2251), Mac mini 8,1 (A1993)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D57089
|
| |
|
|
|
|
|
|
|
|
|
| |
DMA ring transport between the host and the T2 coprocessor.
Provides mailbox handshake, queue setup, and firmware keepalive
for higher-level T2 services (VHCI, audio, etc.).
Tested-on: MacBookPro16,2 (A2251), Mac mini 8,1 (A1993)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D57088
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Notable upstream pull request merges:
#18372 eaaea55b6 Consistently encode DRR_BEGIN packed nvlist payloads with
NV_ENCODE_XDR
#18410 891e379d0 Fix failfast default and usage
#18470 a2d053329 zdb: Add some more file layout output, triggered by -v
#18472 d50f5b6d0 dsl_dir: avoid dd_lock during snapshots_changed updates
#18493 d65015938 Vdev allocation bias/class change
#18497 8fdc86675 zfs: annotate nested dd_lock in reservation sync
accounting
#18494 956deba27 zdb: detect BRT and DDT leaks during block traversal
#18499 c7cfe0805 zarcstat: detect attached L2ARC device with no data
#18503 439b802e7 sa: fix sa_add_projid lock ordering
#18508 968f4db03 zpool-attach.8: add EXAMPLES section
#18513 45dddc452 zfs.4: Fix documentation of zfs_arc_dnode_reduce_percent
#18516 8ff64005a zap: split implementation out into more files
#18520 181e1b522 Fix double free for blocks cloned after DDT prune
#18535 -multiple zstream: fix crashes when refcount tracking enabled
#18536 -multiple refcount tag fixups
#18541 a65ed7afd zpool/zfs: accept --help and -? after a subcommand
#18544 6fb72fda0 zio_ddt_write: compute have_dvas after taking dde_io_lock
#18546 -multiple zap: internal locking uplift
#18550 40a87651d zap_impl: use flex array field for mzap_phys_t.mz_chunks
#18551 -multiple zap: make the _by_dnode() op variants be the primary
implementation
#18570 112b0131b zpl_xattr: stop heap-allocating prefixed xattr names
#18578 4bc8c39b6 zed: Prefer dRAID distributed spares to regular ones
#18596 e30ab5fa4 FreeBSD: Make it possible to build openzfs.ko with
sanitizers
#18597 472ddca11 zed: Prefer spares with matching rotational and size
#18599 c90dc2808 enforce exact decompressed length for lz4, gzip, and zstd
#18603 -multiple zap: add zap_cursor_init_by_dnode; cursor unit tests;
mock dnode refcounts
#18604 59dc88602 nvpair: Check for un-terminated strings in packed nvlist
#18606 ef6f26145 When reading a vdev label skip libzfs_core_init()
#18613 0aa4088dc sharenfs: Check for invalid characters
#18615 80fb85b80 Fix the integer type in zfs_ioc_userspace_many()
#18616 e199f6d98 Fix uninitialized variable warning in vdev_prop_get()
#18617 7de42602c Extend dataset zfs_ioc_set_prop() secpolicy
#18622 5fea0c838 Parallelize metaslab_sync_done() calls
#18623 cab50d5ad Add additional verification of size fields and strings
#18630 -multiple zap: misc function removal / uplift / tests
#18633 a8ef128da Fix uninitialized variable warning in zil_parse()
Obtained from: OpenZFS
OpenZFS commit: a170134febea405c6b6f5ed51724cdcfb6d8e726
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
T2 Macs (2018+) expose the SMC via memory-mapped registers instead of
I/O ports. Add asmcmmio.c/asmcmmio.h implementing the MMIO transport:
key read/write, getinfo, getbyindex, and a poll-based wait with
exponential backoff.
The driver probes for MMIO at attach time by checking the LDKN firmware
version key; if MMIO is available it is used, otherwise the standard
I/O port backend is used.
T2 fan speeds use IEEE 754 floats instead of fpe2 fixed-point.
Per-fan manual mode uses F%dMd keys instead of the FS! bitmask.
Battery charge limit is exposed via dev.asmc.N.battery_charge_limit.
Tested on:
MacBookPro16,2 (A2251, iBridge2,10)
MacBookPro15,4 (A2159, iBridge2,8)
MacBookAir8,2 (A1932, iBridge2,5)
Mac mini 8,1 (A1993, iBridge2,7)
iMac20,2 (A2115, iBridge2,16)
iMacPro1,1 (A1862, iBridge1,1)
MFC after: 2 weeks
Reviewed by: ngie, adrian
Differential Revision: https://reviews.freebsd.org/D57086
|
| |
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57038
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The driver implements the ntsync interface as specified in the Linux
7.0-rc3 document Documentation/userspace-api/ntsync.rst. Only the
documentation and the userspace tests (Linux'
tools/testing/selftests/drivers/ntsync/ntsync.c) were used for
reference. When the documentation contradicted the tests, tests
behavior was implemented.
One quirk is that Linux API needs to return an error from ioctl() and to
copyout the modified ioctl() argument. Our generic ioctl() is not flexible
enough to implement this, so the ntsync_ioctl_copyout() hack allows to
copyout the ioctl parameter directly from the ioctl method, instead of
relying on the ioctl infra.
The FreeBSD port of the tests, that can be compiled both on FreeBSD and
Linux, is available at https://github.com/kostikbel/freebsd-ntsync-test.
The Linux binary compiled with the Linux test harness, cannot be run
under linuxolator due to unimplemented syscalls, but the shims in
freebsd-ntsync-test can be compiled on Linux and resulting Linux/glibc
binary run on linuxolator to test linux compat.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57038
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert 88a53301e19 and d1ca01059d5 . They removed padlock_rng from the
amd64 build under the mistaken belief that this device was available on
32-bit processors only. But it's also available on the 64-bit Via Nano,
Nano X2, and some Zhaoxin CPUs.
PR: 295517
Fixes: 88a53301e19 ("padlock.4: only install on i386")
Fixes: d1ca01059d5 ("padlock(4)/nehemiah: move i386-only entropy")
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D57215
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for automatic suspend/resume as we know it for wireless.
The problem is that the PCI driver which would normally gets the code
is the LinuxKPI PCI framework/Linux wireless driver, which we cannot
ammend or generally add extra suspend/resume code to.
A further problem is that with growing support, the LinuxKPI 802.11
(mac80211) layer also is involved in suspend/resume for WoWLAN (not
yet supported) meaning that we need to hook the suspend/resume
framework into that as well. Unlike Linux we do not have a general
suspend/resume "hook" we can hang into and we need to tie this one
to the hardware so cannot indepedently (after the driver one) run it.
The solution for FreeBSD, in order to not mangle the Linux native
drivers and get extra maintanace overhead, is to add a bus child
which inherits the general framework and thus is 2 lines + #includes
for each driver extra to add to.
The general suspend/resume framework lives in LinuxKPI (linuxkpi_80211_pm)
and imitates the normal suspend/resume path overloading it (there is
a slight code/logic duplication from the PCI code).
Given we are passed the LinuxKPI p(ci)dev, we can go and peel out the
net80211 ic from the native bsddev and that way get access to the
wireless stack. We then call into LinuxKPI 802.11 in order to do
the suspend/resume dance there, and, if needed also call the
official suspend/resume routine from the device driver after
(reverse for resume).
If any in this fails, suspend will be blocked as we will return the
error (no different to any native driver could do).
The LinuxKPI 802.11 suspend/resume code has the initial code for
doing a WoWLAN suspend (one could change the sysctl) but other bits
like access to ifnet flags etc. has to be sorted out before we can
go and support that.
The default code path calles into net80211 to clear everything
like native wireless drivers do. The one thing we need to do in
addition is to remove the vif devices from the firmware and restore
them prior to net80211 resume.
We also check for a possible HW SCAN to still be runinng on resume
and warn as that may cause problems though the scan should be stopped
before suspend (we may still get a callback). You can easily see
these problems if you suspend/resume without stopping the wlan.
Enable the PM framework for iwlwifi in the module Makefile to
be able to use all this; others can follow as tested.
In case anyone has problems with this, they can change the sysctl
back to 0 until we can figure out any further problems.
The linuxkpi_wlan.4 man page got adjusted to document this.
Sponsored by: The FreeBSD Foundation
Tested on: Dell XPS 13 (AX200), Lenovo TP X270 (AX210)
MFC after: 3 days
PR: 263632
|
| |
|
|
|
|
|
|
|
| |
This file implements a set of EL2 hypercall handlers and is used to
switch between guests and the host kernel when VHE is not in use. There
is no SSP runtime available there.
Reported by: Jenkins
Fixes: 8deebce931fa ("kernel: Enable -fstack-protector-strong by default")
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Winbond/Nuvoton W83793G system monitor chip includes many features
not currently supported by this driver. The following are currently
supported:
* Up to 6 temperature sensors, 4 of which have 10-bit resolution
(8.2),two with 8-bit resolution (no decimal component)
* Up to 12 fans
- Fans 0-4 (1-5 on the datasheet) are always enabled. The remaining 7
fans are individually enabled.
* Multiple voltage sensors, reading up to 10 voltage sources. Sysctls
are labeled to match the datasheet.
* Chassis open detection.
The W83793AG is a feature-reduced version, which lacks 3 thermal diodes
and 2 voltage monitors. Since there is no way to tell the difference
between the W83793AG and W83793G programmatically, sensors reported on
the W83793AG will report strange values.
Temperature sensors and 7 of the fans can be individually enabled on the
chip, but currently not configured by this driver. The driver only
reports what was configured by the firmware. Additionally, this driver
numbers the sensors and fans according to the datasheet, so even if, for
instance, fan 8 is disabled, it would skip from fan 7 to fan 9, it does
not renumber. This makes it easier to follow for hardware debugging
purposes.
Missing features:
* Smart Fan support
* Fan PWM control
* ASF (Alert Standard Format)
Only Bank 0 registers are used at this time.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D56776
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Notable upstream pull request merges:
#18473 b8d959640 Fix rare cksum errors after rebuild
#18477 e78a51dd6 Fix off-by-one in PREVIOUSLY_REDACTED handler that drops
last block
#18482 d5099c330 Initialize vr_last_txg for rebuild
#18483 872f01019 Zstd: rework ZSTD_isError symbol renaming
#18489 366b1f9a3 Fix long POSIX_FADV_DONTNEED for single block files
Obtained from: OpenZFS
OpenZFS commit: a12c6ed62fcd06093b95616515e4716b0b0bc038
|
| |
|
|
|
|
|
| |
Reviewed by: bz
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56693
|
| |
|
|
|
| |
This RTC chip supports 2 alarm timers in addition to RTC functionality,
but this driver only supports the RTC at this time.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Notable upstream pull request merges:
#18387 656285140 Handle raidz errors <= nparity rather than ignoring
#18401 1cebe8a38 libzfs: report invalid permission name in zfs allow
#18430 513710ed2 Fix "panic: cache_vop_rename: lingering negative entry"
#18440 37e3a260f dmu_direct: avoid UAF in dmu_write_direct_done()
#18445 2eee4ac1e Fix: draid autopkgtests fail on s390x architecture
#18448 8da472973 key lookup failure should always return EACCES
#18456 4a58ab8ce zfs.4: document five missing module parameters
Obtained from: OpenZFS
OpenZFS commit: 84ffe564dff1b7f69d397817ef292cbe2c5ebad3
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce the foundational building blocks for SR-IOV Virtual Function
support on Broadcom NetXtreme-C/E adapters.
* Add bnxt_sriov.h: defines the extended bnxt_vf_info structure (per-VF
firmware FID, MAC addresses, VLAN, flags, DMA command buffers, resource
counts), the bnxt_resc_map helper, flag macros (BNXT_VF_TRUST,
BNXT_VF_SPOOFCHK, etc.), and prototypes for all SR-IOV functions.
* Add bnxt_sriov.c: implements the SR-IOV attachment sequence
(bnxt_sriov_attach), the iflib IOV callbacks (bnxt_iov_init,
bnxt_iov_uninit, bnxt_iov_vf_add), VF resource allocation and
firmware configuration helpers (bnxt_alloc_vf_resources,
bnxt_cfg_hw_sriov, bnxt_hwrm_func_vf_resc_cfg, bnxt_hwrm_func_buf_rgtr,
bnxt_hwrm_func_vf_resource_free), and the per-VF parameter helper.
* Extend bnxt.h: include bnxt_sriov.h; extend bnxt_pf_info with VF-
tracking fields (vf array, firmware FID/MAC, resource-reservation
strategy, DMA page management, sysctl context); replace the upstream
bnxt_vf_info stub with the full definition from bnxt_sriov.h; extend
bnxt_func_qcfg with allocation counters required by the VF resource
configuration path; add vf_resc_cfg_input and sriov_lock to bnxt_softc.
* Update Makefile to build bnxt_sriov.c and include bnxt_sriov.h.
* Wire up PCI-IOV device methods (pci_iov_init / pci_iov_uninit /
pci_iov_add_vf) and iflib IOV callbacks (ifdi_iov_init / ifdi_iov_uninit
/ ifdi_iov_vf_add) in if_bnxt.c; call bnxt_sriov_attach() from
bnxt_attach_post() on P5+ Physical Functions.
MFC after: 1 month
Reviewed by: ssaxena
Differential Revision: https://reviews.freebsd.org/D56197
|