Skip to content

Commit 20545af

Browse files
superm1jwrdegoede
authored andcommitted
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>
1 parent b2b6fa6 commit 20545af

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/platform/x86/amd/pmf/tee-if.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,10 @@ static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev)
252252
cookie = readl(dev->policy_buf + POLICY_COOKIE_OFFSET);
253253
length = readl(dev->policy_buf + POLICY_COOKIE_LEN);
254254

255-
if (cookie != POLICY_SIGN_COOKIE || !length)
255+
if (cookie != POLICY_SIGN_COOKIE || !length) {
256+
dev_dbg(dev->dev, "cookie doesn't match\n");
256257
return -EINVAL;
258+
}
257259

258260
/* Update the actual length */
259261
dev->policy_sz = length + 512;

0 commit comments

Comments
 (0)