[PATCH 1/7][SRU][Noble] platform/x86/amd/pmf: Differentiate PMF ACPI versions
You-Sheng Yang
vicamo.yang at canonical.com
Tue Jun 25 06:43:15 UTC 2024
From: Shyam Sundar S K <Shyam-sundar.S-k at amd.com>
BugLink: https://bugs.launchpad.net/bugs/2058330
For family 1AH, certain PMF features have been enhanced - leading to a
newer APMF (AMD PMF) spec (BIOS and PMF driver interface) called v2.
This information would be fed into the if_version field of the
verify_interface method of the APMF call from the BIOS.
Use this information to store the version number to differentiate
between v1 or v2 and also store the information into the PMF private
data structure, as this information would be required for further code
branching to support the latest silicon.
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy at linux.intel.com>
Co-developed-by: Patil Rajesh Reddy <Patil.Reddy at amd.com>
Signed-off-by: Patil Rajesh Reddy <Patil.Reddy at amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k at amd.com>
Link: https://lore.kernel.org/r/20240306114415.3267603-2-Shyam-sundar.S-k@amd.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen at linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen at linux.intel.com>
(cherry picked from commit a33e9e106601b5271561e7d79a3d3c4e7e84f07f)
Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
drivers/platform/x86/amd/pmf/acpi.c | 6 ++++--
drivers/platform/x86/amd/pmf/pmf.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/amd/pmf/acpi.c b/drivers/platform/x86/amd/pmf/acpi.c
index f2eb07ef855a..1f287a147c57 100644
--- a/drivers/platform/x86/amd/pmf/acpi.c
+++ b/drivers/platform/x86/amd/pmf/acpi.c
@@ -218,8 +218,10 @@ static int apmf_if_verify_interface(struct amd_pmf_dev *pdev)
return err;
pdev->supported_func = output.supported_functions;
- dev_dbg(pdev->dev, "supported functions:0x%x notifications:0x%x\n",
- output.supported_functions, output.notification_mask);
+ dev_dbg(pdev->dev, "supported functions:0x%x notifications:0x%x version:%u\n",
+ output.supported_functions, output.notification_mask, output.version);
+
+ pdev->pmf_if_version = output.version;
return 0;
}
diff --git a/drivers/platform/x86/amd/pmf/pmf.h b/drivers/platform/x86/amd/pmf/pmf.h
index 66cae1cca73c..e51ac981af73 100644
--- a/drivers/platform/x86/amd/pmf/pmf.h
+++ b/drivers/platform/x86/amd/pmf/pmf.h
@@ -231,6 +231,7 @@ struct amd_pmf_dev {
u64 policy_addr;
void *policy_base;
bool smart_pc_enabled;
+ u16 pmf_if_version;
};
struct apmf_sps_prop_granular {
--
2.43.0
More information about the kernel-team
mailing list