Page MenuHomeFreeBSD

gasket: add a framework for Google accelerator ASICs
Needs ReviewPublic

Authored by seuros on Jul 30 2026, 7:10 PM.
Referenced Files
F171823761: D58561.id186602.diff
Sun, Sep 13, 8:04 PM
F171798596: D58561.diff
Sun, Sep 13, 2:53 PM
Unknown Object (File)
Thu, Sep 10, 6:58 PM
Unknown Object (File)
Tue, Sep 8, 12:51 AM
Unknown Object (File)
Mon, Sep 7, 9:52 PM
Unknown Object (File)
Mon, Sep 7, 5:10 PM
Unknown Object (File)
Sat, Sep 5, 12:22 PM
Unknown Object (File)
Sat, Sep 5, 12:18 PM
Subscribers

Details

Reviewers
adrian
ziaee
Group Reviewers
manpages
Summary

Gasket is Google's name for the layer their accelerator drivers share:
Google ASIC Software, Kernel Extensions, and Tools. The chips differ,
but they present the same shape to the host. A control register BAR
with a few windows user space may map, an on-chip page table the host
fills in so the device can reach host memory, and a block of MSI-X
vectors.

Test Plan

amd64 only for now, and host mappings are refused under KMSAN.
only the m2 cards were tested.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 75309
Build 72192: arc lint + arc unit

Event Timeline

Interesting! A lot of this is mmap / dmabuf style stuff. I don't want to block landing this on waiting for freebsd native dmabuf, but i wonder if this would be another user of native freebsd dmabuf at some point.

share/man/man4/gasket.4
53

heh update email address

sys/dev/gasket/gasket.h
94

do we need bus_* barriers anywhere? this may be mostly fine on x86 but eg arm/riscv it may need explicit barriers?

sys/dev/gasket/gasket_core.c
736

so are all of these devices fine with 64 bit DMA?

871

This means the consumer needs to do two mmaps, right? One for data and one for control/registers, so the correct memory attributes are used?

1009

I think this function in particular deserves a doxygen style comment on what it does and entry/exit values.

sys/dev/gasket/gasket_if.m
56

I think all of the methods here deserve documenting what they do, even if it is brief.

ziaee requested changes to this revision.Sun, Sep 13, 12:22 AM
ziaee added a reviewer: manpages.
ziaee added inline comments.
share/man/man4/gasket.4
13–18

can also list sysctl, see share/examples/mdoc/example.4

28
This revision now requires changes to proceed.Sun, Sep 13, 12:22 AM

refactor/split/document driver