Changeset View
Changeset View
Standalone View
Standalone View
share/man/man4/apex.4
- This file was added.
| .\" | |||||||||||||||||||||||
| .\" Copyright (c) 2026 Abdelkader Boudih <freebsd@seuros.com> | |||||||||||||||||||||||
| .\" | |||||||||||||||||||||||
| .\" SPDX-License-Identifier: BSD-2-Clause | |||||||||||||||||||||||
| .\" | |||||||||||||||||||||||
| .Dd July 30, 2026 | |||||||||||||||||||||||
| .Dt APEX 4 | |||||||||||||||||||||||
| .Os | |||||||||||||||||||||||
ziaee: Am I correct in understanding that this only works on amd64 for now? If so, please specify in… | |||||||||||||||||||||||
| .Sh NAME | |||||||||||||||||||||||
| .Nm apex | |||||||||||||||||||||||
| .Nd Google Coral Edge TPU accelerator driver | |||||||||||||||||||||||
| .Sh SYNOPSIS | |||||||||||||||||||||||
| To compile this driver into the kernel, | |||||||||||||||||||||||
| place the following lines in your | |||||||||||||||||||||||
| kernel configuration file: | |||||||||||||||||||||||
| .Bd -ragged -offset indent | |||||||||||||||||||||||
| .Cd "device gasket" | |||||||||||||||||||||||
| .Cd "device apex" | |||||||||||||||||||||||
| .Ed | |||||||||||||||||||||||
| .Pp | |||||||||||||||||||||||
| Alternatively, to load the driver as a | |||||||||||||||||||||||
| module at boot time, place the following line in | |||||||||||||||||||||||
| .Xr loader.conf 5 : | |||||||||||||||||||||||
| .Bd -literal -offset indent | |||||||||||||||||||||||
| apex_load="YES" | |||||||||||||||||||||||
| .Ed | |||||||||||||||||||||||
ziaeeUnsubmitted Done Inline Actions
can also add tunables and sysctls if you want, see share/examples/mdoc/example.4 ziaee: can also add tunables and sysctls if you want, see share/examples/mdoc/example.4 | |||||||||||||||||||||||
| .Sh DESCRIPTION | |||||||||||||||||||||||
| The | |||||||||||||||||||||||
| .Nm | |||||||||||||||||||||||
| driver supports the Google Edge TPU, the inference accelerator on Coral | |||||||||||||||||||||||
| PCI Express and M.2 modules. | |||||||||||||||||||||||
| It attaches through the | |||||||||||||||||||||||
| .Xr gasket 4 | |||||||||||||||||||||||
| framework and creates | |||||||||||||||||||||||
| .Pa /dev/apex0 , | |||||||||||||||||||||||
| which an Edge TPU runtime in user space opens to run a model. | |||||||||||||||||||||||
| .Pp | |||||||||||||||||||||||
| The core is held in reset while nothing has the device open, and a kernel | |||||||||||||||||||||||
| task divides its clock as the die warms. | |||||||||||||||||||||||
| .Sh HARDWARE | |||||||||||||||||||||||
| The | |||||||||||||||||||||||
| .Nm | |||||||||||||||||||||||
| driver supports the following devices: | |||||||||||||||||||||||
ziaeeUnsubmitted Done Inline Actions
see share/man/man5/style.mdoc.5 ziaee: see share/man/man5/style.mdoc.5 | |||||||||||||||||||||||
ziaeeUnsubmitted Done Inline ActionsThis is not done, and it is specified in the style guide I linked. ziaee: This is not done, and it is specified in the style guide I linked. | |||||||||||||||||||||||
| .Pp | |||||||||||||||||||||||
| .Bl -bullet -compact | |||||||||||||||||||||||
| .It | |||||||||||||||||||||||
| Coral M.2 Accelerator A+E key | |||||||||||||||||||||||
| .It | |||||||||||||||||||||||
| Coral M.2 Accelerator B+M key | |||||||||||||||||||||||
| .It | |||||||||||||||||||||||
| Coral Mini PCIe Accelerator | |||||||||||||||||||||||
| .El | |||||||||||||||||||||||
| .Sh LOADER TUNABLES | |||||||||||||||||||||||
| Read once at attach, settable in | |||||||||||||||||||||||
| .Xr loader.conf 5 : | |||||||||||||||||||||||
| .Bl -tag -width indent | |||||||||||||||||||||||
| .It Va hw.apex.temp_poll_interval | |||||||||||||||||||||||
| Sampling interval in milliseconds, 5000 by default; zero disables throttling. | |||||||||||||||||||||||
| .It Va hw.apex.hw_temp_warn1 | |||||||||||||||||||||||
| .It Va hw.apex.hw_temp_warn2 | |||||||||||||||||||||||
| Hardware warning thresholds in milli-degrees C, both 100000 by default. | |||||||||||||||||||||||
| .It Va hw.apex.hw_temp_warn1_en | |||||||||||||||||||||||
| Drive INTR on the first threshold, off by default. | |||||||||||||||||||||||
| .It Va hw.apex.hw_temp_warn2_en | |||||||||||||||||||||||
| Drive SD_ALARM on the second, on by default. | |||||||||||||||||||||||
| .El | |||||||||||||||||||||||
| .Sh SYSCTL VARIABLES | |||||||||||||||||||||||
| .Bl -tag -width indent | |||||||||||||||||||||||
| .It Va hw.apex.allow_power_save | |||||||||||||||||||||||
| Enter the low power state on last close, on by default. | |||||||||||||||||||||||
| The core is held in reset either way. | |||||||||||||||||||||||
| .It Va hw.apex.allow_hw_clock_gating | |||||||||||||||||||||||
Done Inline Actions
This is not a sentence so is not traditionally capitalized/punctuated, see intro(5) ziaee: This is not a sentence so is not traditionally capitalized/punctuated, see intro(5) | |||||||||||||||||||||||
| Let the hardware gate the clock when idle, on by default. | |||||||||||||||||||||||
| .It Va hw.apex.allow_sw_clock_gating | |||||||||||||||||||||||
| Honor clock gating requests from user space, off by default. | |||||||||||||||||||||||
| .El | |||||||||||||||||||||||
| .Pp | |||||||||||||||||||||||
| Read-only per-device state is under | |||||||||||||||||||||||
| .Va dev.apex.%d . | |||||||||||||||||||||||
| .Sh FILES | |||||||||||||||||||||||
| .Bl -tag -width indent | |||||||||||||||||||||||
| .It Pa /dev/apex%d | |||||||||||||||||||||||
| Accelerator control device. | |||||||||||||||||||||||
| .El | |||||||||||||||||||||||
| .Sh SEE ALSO | |||||||||||||||||||||||
| .Xr gasket 4 , | |||||||||||||||||||||||
| .Xr pci 4 | |||||||||||||||||||||||
| .Sh HISTORY | |||||||||||||||||||||||
| The | |||||||||||||||||||||||
| .Nm | |||||||||||||||||||||||
| driver first appeared in | |||||||||||||||||||||||
| .Fx 16.0 . | |||||||||||||||||||||||
| .Sh AUTHORS | |||||||||||||||||||||||
| .An Abdelkader Boudih Aq Mt freebsd@seuros.com | |||||||||||||||||||||||
| .Sh CAVEATS | |||||||||||||||||||||||
| Suspend and detach fail with | |||||||||||||||||||||||
| .Er EBUSY | |||||||||||||||||||||||
| while a consumer holds the device open or mapped, since both clear the on-chip | |||||||||||||||||||||||
| page table. | |||||||||||||||||||||||
| .Pp | |||||||||||||||||||||||
| The ioctl numbers use native | |||||||||||||||||||||||
| .Fx | |||||||||||||||||||||||
| encoding, so a library written against the Linux driver needs more than a | |||||||||||||||||||||||
| recompile. | |||||||||||||||||||||||
Am I correct in understanding that this only works on amd64 for now? If so, please specify in the manpage. There is an optional architectural specifier here where you can do that.