Page MenuHomeFreeBSD

Do not flush cache for PCIe config window.
ClosedPublic

Authored by kib on Oct 18 2018, 6:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 3:55 AM
Unknown Object (File)
Mar 4 2024, 8:53 AM
Unknown Object (File)
Feb 16 2024, 6:32 PM
Unknown Object (File)
Feb 5 2024, 1:07 AM
Unknown Object (File)
Jan 14 2024, 5:22 AM
Unknown Object (File)
Jan 11 2024, 11:25 PM
Unknown Object (File)
Jan 9 2024, 6:55 AM
Unknown Object (File)
Jan 9 2024, 6:55 AM
Subscribers

Details

Summary

Apparently AMD machines cannot tolerate this. This was uncovered by r33938, where cache flush started really flushing the requested range.

Introduce pmap_mapdev_pciecfg(), which simply does not flush cache comparing with pmap_mapdev(). It assumes that the MCFG region was never accessed through the cacheable mapping, which is most likely true for machine to boot at all.

Note that i386 does not need the change, since the architecture handles access per-page due to the KVA shortage, and page remapping already does not flush the cache.

Reported by: mjg, Mike Tancsa <mike@sentex.net>
Tested by: mjg

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

alc added inline comments.
sys/amd64/amd64/pmap.c
7103 ↗(On Diff #49294)

Please anything besides _attr1. :-) Perhaps, pmap_mapdev_attr_flags(), pmap_mapdev_flags(), or pmap_mapdev_internal()?

7137 ↗(On Diff #49294)

As an aside, this snippet appears to violate the architectural mandate that all mappings have the same mode. :-(

This revision is now accepted and ready to land.Oct 18 2018, 8:18 PM
This revision was automatically updated to reflect the committed changes.