Page MenuHomeFreeBSD

sys: Make the iommu xref uintptr_t
ClosedPublic

Authored by andrew on Jan 30 2025, 2:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 2, 12:25 PM
Unknown Object (File)
Tue, Dec 2, 11:19 AM
Unknown Object (File)
Thu, Nov 27, 8:21 AM
Unknown Object (File)
Tue, Nov 25, 8:08 PM
Unknown Object (File)
Sun, Nov 16, 8:40 PM
Unknown Object (File)
Nov 5 2025, 4:52 AM
Unknown Object (File)
Nov 4 2025, 2:39 AM
Unknown Object (File)
Nov 3 2025, 3:26 AM
Subscribers

Details

Summary

On arm64 we use the iommu base address as an xref. This fails when
the address has the lower 32-bits in common with another iommu as
they will share an xref.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 62271
Build 59155: arc lint + arc unit

Event Timeline

sys/arm64/iommu/smmu.c
1784

So why is it uintptr_t * and not uint64_t *?

sys/arm64/iommu/smmu.c
1784

pci_id_ofw_iommu.xref is the wrong type, it should be a uintptr_t. The intention is for it to be generic where it may vary on different architectures and different busses. As such I was copying the INTRNG use of using an integer type that can contain a pointer.

Fix the type for pci_id_ofw_iommu.xref

At least the patch looks consistent to me. I have no idea about the fdt code.

This revision is now accepted and ready to land.Feb 4 2025, 10:14 PM

Fix the xref type in acpi_iort_map_named_smmuv3

This revision now requires review to proceed.Feb 5 2025, 10:50 AM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 8 2025, 10:49 AM
This revision was automatically updated to reflect the committed changes.