Appendix · reference

Rockchip IOMMU

Per-master IOMMUs for VOP, ISP0/1, RGA, and VPU-L/R

Identity

PartRockchip IOMMU (six instances on RK3399)
RoleDMA-address translation and isolation for the display, ISP, RGA, and VPU masters; protects the rest of the system from buggy/hostile DMA
Bus / addressper-master MMIO; for example VOP-L IOMMU at 0xff8f3f00 sitting just above the VOP-Lit register bank; ISP0/1, RGA, VPU-L/R each have their own
GPIO / IRQone GIC SPI per IOMMU instance
DatasheetRK3399 TRM Part 1 chapter 12 (IOMMU)
Pine64 wikiPinePhone Pro main page
Schematicon-SoC (no external schematic)

Status — · not started

There is no Rockchip IOMMU driver in the FreeBSD tree. The PinePhone Pro currently runs without it: VOP and panfrost issue DMA against physical addresses, which works on this SoC because the masters can address all of DDR directly. The cost is loss of isolation — a panfrost job-shader bug can scribble anywhere in physical memory — and lack of scatter-gather support for buffers that the GPU/VPU would otherwise have to refuse. Mainline Linux requires the IOMMU for the upstream panfrost path; we currently sit in a panfrost mode that bypasses it.

Driver

The Linux IOMMU framework is significantly different in shape from FreeBSD’s, so the port is not a line-for-line translation; the hardware sequencing is direct, but the consumer API mapping is where the work is.

Open work