Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intpm: use MMIO for AMD EFCH CPUs #1437

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brian90013
Copy link

I observed an issue when attempting to use SMBus devices on an AMD Zen3 7443P CPU where running smbmsg -p found no devices. Previously I used a Zen2 7702P CPU in the same chassis/motherboard and had no issue finding or accessing SMBus devices. Debugging the intsmb driver (source file intpm.c) showed all the PMIO reads were returning 0xff on Zen3.

A comment in the Linux i2c-piix4.c source pointed me to the root cause:

cd6h/cd7h port I/O accesses can be disabled on AMD processors
w/ SMBus PCI revision ID 0x51 or greater. MMIO is supported on
the same processors and is the recommended access method.

Indeed, the revision ID of both the Zen2 and Zen3 CPUs is 0x61. I added a test for this condition and when true, set and allocate resources using MMIO instead of PMIO. I now see valid results from smbmsg -p and am able to use SMBus devices on both the Zen2 and Zen3 CPUs using MMIO.

Recent AMD CPUs (SMBus PCI revision ID >= 0x51) can disable port-mapped
IO and only support memory-mapped IO. In practice this was observed on a
Zen 3 CPU where PMIO reads all returned 0xff. Update the driver to use
MMIO for these processors while continuing to use PMIO by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant