Re: [PATCH v4 0/5] Add support for Broadcom BCM2712 IOMMU driver (Raspberry Pi 5)
From: Jim Quinlan
Date: Wed Sep 16 2026 - 17:41:51 EST
On Sat, Sep 5, 2026 at 3:25 PM Daniel Drake <dan@xxxxxxxxxxxxxxx> wrote:
>
> On 03/09/2026 19:14, Jim Quinlan wrote:
> > I wish you had kept the dma-iova offset hack but I understand why you
> > did not.
>
>
> Well, having an initial iommu driver upstream will provide a good base
> on top of which we can work on that specific problem. It'll need some
> consideration/discussion to be done in a way that is not regarded as a
> hack. I might come back to this later, time permitting.
Yes, I plan on submitting an RFC on how to do this, assuming you don't
solve it first :-).
FWIW, I had to do the following to get your driver working on our 7712
PCIe IOMMU:
o force the aperture to start at SZ_4G
o change pt_full_va_prefix() to return SZ_4G (but it should really
return an offset derived from the dma-ranges prop of the PCIe node)
o modify bcm2712_iommu_shootdown_range() and
bcm2712_iommu_sync_range() to subtract SZ_4G from the iova.
Regards,
Jim Quinlan
Broadcom CM/STB
>
> > I've built and successfully tested your driver on the> Broadcom
> sister chip of the RpI 5. I am mostly interested in the
> > iommu attached to the PCIe controller. I tested this by running
> > multiple tests where 10MiB is sent by a Wifi chip. Data integrity was
> > validated of course.
> >
> > I did not use the driver code as is. I tried merely decrementing the
> > MMMU_PT_PA_BASE value for the 4GB iova-offset required for our
> > configuration, but that did not work for some reason. So I just
> > hacked in some iova conversions and got it working.
>
> Thanks for the review and testing! I'll send an updated version that
> removes the blocking domain, hopefully that will be ready for inclusion.
>
> Daniel
>
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature