Page MenuHomeFreeBSD

pci_dw: Support modern "unroll" iATU mode
ClosedPublic

Authored by jrtc27 on Jul 5 2021, 12:09 AM.

Details

Summary

This supersedes the old legacy mode where a viewport register was used
to mux multiple regions behind a single set of registers, and is used on
the SiFive FU740.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

On correctly implemented systems, reading from an unimplemented device register will cause an exception (external asynchronous interrupt on arm64), on real systems it will return an arbitrary value.
Therefore, pci_dw_detect_atu_unroll() should only be called for modern core versions (which have the DW_IATU_VIEWPORT register implemented) - so we should check the core version first.
Otherwise looks good to me.

Please, ignore my previous comment - I overlooked register name :(

Tested on MACCHIATObin and HoneyComb LX2.

This revision is now accepted and ready to land.Jul 10 2021, 11:46 AM
This revision was automatically updated to reflect the committed changes.