Hi Mike,

I'm nearly certain that APU (Family 16h Models 00-0Fh aka Kabini) didn't have a usable IOMMU.  It was fused away.

So: after 15h - which had IOMMU...

FWIW, not all Family 15h did either.  That's the type of feature that could be specified or removed for different SKUs.  For example in Trinity, IIRC, consumer products in mobile packages had their IOMMUs fused off because of the power they'd sip.  IOMMU wasn't considered a compelling feature for mobile products at that time.  Any Trinity in a desktop package allowed them to be enabled.  And, unfortunately reading the BKDG doesn't give you that level of granularity -- it explains the highest level of functionality available, and sometimes more.

My wild guess is that AMD
needed some time to remake IOMMU for 16h to function together with AMD
PSP (Platform Security Processor), and maybe they intended to
implement PSP at early 16h as well - but it wasn't ready in time for
early 16h so they removed IOMMU from it too.

Without getting into how features are developed or considered for POR, let me just end with that's definitely not how I remember the discussions for either of those two features.

Thanks,
Marshall


On Thu, Jun 20, 2019 at 11:21 AM Mike Banon <mikebdp2@gmail.com> wrote:
I tried force enabling IOMMU for ASUS AM1I-A by changing
" #define BLDCFG_IOMMU_SUPPORT                      FALSE "
to TRUE at ./src/mainboard/asus/am1i-a/buildOpts.c and adding
" device pci 0.2 on  end  # IOMMU "
line to ./src/mainboard/asus/am1i-a/devicetree.cb :
  device domain 0 on
        subsystemid 0x1043 0x8623 inherit
        chip northbridge/amd/agesa/family16kb
            device pci 0.0 on  end  # Root Complex
            device pci 0.2 on  end  # IOMMU
- because that's usually where AMD IOMMU PCI device resides.

However, even after doing that, I got " PCI: Static device PCI:
00:00.2 not found, disabling it. " Googling for other people's lspci
did not give any results for IOMMU at 16h Jaguar platforms. Then I
checked the datasheets at
https://en.wikipedia.org/wiki/Puma_(microarchitecture)#External_links
- and discovered that Puma's datasheet contains a lot of IOMMU
references, while Jaguar's - only a few.

So: after 15h - which had IOMMU - this IOMMU has been temporarily
removed from early 16h Jaguar (except from a few related bits as
accidental leftovers), before being returned with late 16h Puma -
together with the appearance of AMD PSP! My wild guess is that AMD
needed some time to remake IOMMU for 16h to function together with AMD
PSP (Platform Security Processor), and maybe they intended to
implement PSP at early 16h as well - but it wasn't ready in time for
early 16h so they removed IOMMU from it too.

In any case, it seems that IOMMU is impossible at AM1I-A because it is
16h Jaguar. And I tested this on the latest available CPU for AM1
socket, ultra rare Athlon 5370 (slightly faster than Athlon 5350 but
no major differences). Hope this report helps to save some of your
time.

Best regards,
Mike Banon
_______________________________________________
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-leave@coreboot.org