summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2024-02-16 19:41:06 -0600
committerHans de Goede <hdegoede@redhat.com>2024-02-19 13:39:40 +0100
commit20545af302bb1f6a67c0348b64032c11ecfa77ba (patch)
tree62031f2064116e9c829f374da344b03bcb8c4881
parentb2b6fa6f5c57848c95ca7bf1f0a7d1bb340c3460 (diff)
downloadlinux-stable-20545af302bb1f6a67c0348b64032c11ecfa77ba.tar.gz
linux-stable-20545af302bb1f6a67c0348b64032c11ecfa77ba.tar.bz2
linux-stable-20545af302bb1f6a67c0348b64032c11ecfa77ba.zip
platform/x86/amd/pmf: Add debugging message for missing policy data
If a machine advertises Smart PC support but is missing policy data show a debugging message to help clarify why Smart PC wasn't enabled. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20240217014107.113749-2-mario.limonciello@amd.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--drivers/platform/x86/amd/pmf/tee-if.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c
index 8b7e3f87702e..1359ab340f7c 100644
--- a/drivers/platform/x86/amd/pmf/tee-if.c
+++ b/drivers/platform/x86/amd/pmf/tee-if.c
@@ -252,8 +252,10 @@ static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev)
cookie = readl(dev->policy_buf + POLICY_COOKIE_OFFSET);
length = readl(dev->policy_buf + POLICY_COOKIE_LEN);
- if (cookie != POLICY_SIGN_COOKIE || !length)
+ if (cookie != POLICY_SIGN_COOKIE || !length) {
+ dev_dbg(dev->dev, "cookie doesn't match\n");
return -EINVAL;
+ }
/* Update the actual length */
dev->policy_sz = length + 512;