[PATCH v12 3/7] soc: ti: Add IOMMU-like PVU driver
Nishanth Menon
nm at ti.com
Tue Jul 29 05:22:46 PDT 2025
On 10:36-20250728, huaqian.li at siemens.com wrote:
> From: Jan Kiszka <jan.kiszka at siemens.com>
>
> The TI Peripheral Virtualization Unit (PVU) permits to define a limited
> set of mappings for DMA requests on the system memory. Unlike with an
> IOMMU, there is no fallback to a memory-backed page table, only a fixed
> set of register-backed TLBs. Emulating an IOMMU behavior appears to be
> the more fragile the more fragmentation of pending requests occur.
>
> Therefore, this driver does not expose the PVU as an IOMMU. It rather
> introduces a simple, static interface to devices that are under
> restricted-dma-pool constraints. They can register their pools with the
> PVUs, enabling only those pools to work for DMA. As also MSI is issued
> as DMA, the PVU already register the related translator region of the
> AM654 as valid DMA target.
>
> This driver is the essential building block for limiting DMA from
> untrusted devices to clearly defined memory regions in the absence of a
> real IOMMU (SMMU).
>
> Co-developed-by: Diogo Ivo <diogo.ivo at siemens.com>
> Signed-off-by: Diogo Ivo <diogo.ivo at siemens.com>
> Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
> Signed-off-by: Li Hua Qian <huaqian.li at siemens.com>
> ---
> drivers/soc/ti/Kconfig | 4 +
> drivers/soc/ti/Makefile | 1 +
> drivers/soc/ti/ti-pvu.c | 500 ++++++++++++++++++++++++++++++++++++++++
> include/linux/ti-pvu.h | 32 +++
> 4 files changed, 537 insertions(+)
> create mode 100644 drivers/soc/ti/ti-pvu.c
> create mode 100644 include/linux/ti-pvu.h
>
> diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig
> index 1a93001c9e36..af7173ad84de 100644
> --- a/drivers/soc/ti/Kconfig
> +++ b/drivers/soc/ti/Kconfig
> @@ -82,6 +82,10 @@ config TI_PRUSS
> processors on various TI SoCs. It's safe to say N here if you're
> not interested in the PRU or if you are unsure.
>
> +config TI_PVU
> + bool "TI Peripheral Virtualization Unit driver"
tristate please? Prefer to make this as a module.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
https://ti.com/opensource
More information about the linux-arm-kernel
mailing list