]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Do not flush cache for PCIe config window.
authorkib <kib@FreeBSD.org>
Thu, 18 Oct 2018 20:49:16 +0000 (20:49 +0000)
committerkib <kib@FreeBSD.org>
Thu, 18 Oct 2018 20:49:16 +0000 (20:49 +0000)
commit09e567544d4344f9784a22e7642b0d0615820f4a
tree7d48b9a02d69fb495fce3c36fedd0259a5ab7164
parent635949fea76f7e1f6293992f3c87d506458c01b5
Do not flush cache for PCIe config window.

Apparently AMD machines cannot tolerate this. This was uncovered by
r339386, 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 and tested by: mjg, Mike Tancsa <mike@sentex.net>
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D17612
sys/amd64/amd64/pmap.c
sys/amd64/include/pmap.h
sys/amd64/pci/pci_cfgreg.c