On Wed, 2015-08-26 at 07:58 +1000, Benjamin Herrenschmidt wrote: > Another one is the UFS Host Controller protocol though it's local to > EDK2 thankfully and not part of the spec. Here too, the protocol > definition and underlying implementation rely on direct access. > > I understand the worry with letting direct access to BARs. The > semantics and ordering especially can be very platform/architecture > dependent. Memory barriers might be needed for accesses. > > It might make sense, if we provide a direct "map" API to define that > it > is weakly ordered and have an explicit barrier callback as well in > there. Additionally it might make sense to also restrict it to > prefetchable BARs.
Another approach, less clean than a new protocol but probably easier would be to define a new BAR attribute "CPU mapped" which a driver can set. As a result of that, a subsequent GetBarAttributes() would return a processor physical address. Cheers, Ben. _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

