Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
platform/x86/amd/pmf: Add debugging message for missing policy data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
superm1 authored and jwrdegoede committed Feb 19, 2024
1 parent b2b6fa6 commit 20545af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/platform/x86/amd/pmf/tee-if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 20545af

Please sign in to comment.