parameter conatain Phandle but BSA expecting offset. line 750 iommu_node = fdt32_to_cpu(Preg_val[1]);
This look wrong expectation. This need to replace line with
iommu_node = fdt_node_offset_by_phandle((void *)dt_ptr, fdt32_to_cpu(Preg_val[1]););
So suggestion is
like 750
-- iommu_node = fdt32_to_cpu(Preg_val[1]);
++iommu_node = fdt_node_offset_by_phandle((void *)dt_ptr, fdt32_to_cpu(Preg_val[1]);
so first we grab phandle then get offset.
https://github.com/ARM-software/bsa-acs/blob/main/pal/uefi_dt/bsa/src/pal_iovirt.c#L751
As per DT schema https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/pci/pci-iommu.yaml#L55
parameter conatain Phandle but BSA expecting offset. line 750 iommu_node = fdt32_to_cpu(Preg_val[1]); This look wrong expectation. This need to replace line with iommu_node = fdt_node_offset_by_phandle((void *)dt_ptr, fdt32_to_cpu(Preg_val[1]););
So suggestion is
like 750 -- iommu_node = fdt32_to_cpu(Preg_val[1]); ++iommu_node = fdt_node_offset_by_phandle((void *)dt_ptr, fdt32_to_cpu(Preg_val[1]); so first we grab phandle then get offset.
above is working. please review and change code.