From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
markgross@kernel.org, basavaraj.natikar@amd.com,
jikos@kernel.org, benjamin.tissoires@redhat.com,
alexander.deucher@amd.com, christian.koenig@amd.com,
Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch,
Patil.Reddy@amd.com, mario.limonciello@amd.com,
platform-driver-x86@vger.kernel.org, linux-input@vger.kernel.org,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 11/16] platform/x86/amd/pmf: dump policy binary data
Date: Tue, 10 Oct 2023 17:03:27 +0300 (EEST) [thread overview]
Message-ID: <7118d392-f29b-a8b-6b46-a32bd1fc56c@linux.intel.com> (raw)
In-Reply-To: <c9d53b05-68d0-4244-86cb-cb110c2c4af7@amd.com>
[-- Attachment #1: Type: text/plain, Size: 2332 bytes --]
On Tue, 10 Oct 2023, Shyam Sundar S K wrote:
> On 10/10/2023 6:38 PM, Ilpo Järvinen wrote:
> > On Tue, 10 Oct 2023, Shyam Sundar S K wrote:
> >
> >> Sometimes policy binary retrieved from the BIOS maybe incorrect that can
> >> end up in failing to enable the Smart PC solution feature.
> >>
> >> Use print_hex_dump_debug() to dump the policy binary in hex, so that we
> >> debug the issues related to the binary even before sending that to TA.
> >>
> >> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> >> ---
> >> drivers/platform/x86/amd/pmf/tee-if.c | 9 +++++++++
> >> 1 file changed, 9 insertions(+)
> >>
> >> diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c
> >> index 994daf945795..e4386f503ad0 100644
> >> --- a/drivers/platform/x86/amd/pmf/tee-if.c
> >> +++ b/drivers/platform/x86/amd/pmf/tee-if.c
> >> @@ -275,6 +275,12 @@ static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev)
> >> }
> >>
> >> #ifdef CONFIG_AMD_PMF_DEBUG
> >> +static void amd_pmf_hex_dump_pb(struct amd_pmf_dev *dev)
> >> +{
> >> + print_hex_dump_debug("(pb): ", DUMP_PREFIX_OFFSET, 16, 1, dev->policy_buf,
> >> + dev->policy_sz, false);
> >> +}
> >> +
> >
> > You forgot to add the empty version of amd_pmf_hex_dump_pb function into
> > #else part (so the compile fails if CONFIG_AMD_PMF_DEBUG is not set).
> >
>
> It's there (see below). I have just grouped the functions that come
> under #ifdef CONFIG_AMD_PMF_DEBUG and #else so that's more readable.
>
> >> static ssize_t amd_pmf_get_pb_data(struct file *filp, const char __user *buf,
> >> size_t length, loff_t *pos)
> >> {
> >> @@ -289,6 +295,7 @@ static ssize_t amd_pmf_get_pb_data(struct file *filp, const char __user *buf,
> >> if (copy_from_user(dev->policy_buf, buf, dev->policy_sz))
> >> return -EFAULT;
> >>
> >> + amd_pmf_hex_dump_pb(dev);
> >> ret = amd_pmf_start_policy_engine(dev);
> >> if (ret)
> >> return -EINVAL;
> >> @@ -327,6 +334,7 @@ static int amd_pmf_open_pb(struct amd_pmf_dev *dev, struct dentry *debugfs_root)
> >> }
> >>
> >> static void amd_pmf_remove_pb(struct amd_pmf_dev *dev) {}
> >> +static void amd_pmf_hex_dump_pb(struct amd_pmf_dev *dev) {}
>
> Here is the empty amd_pmf_hex_dump_pb().
Ah, sorry. I was confused by the intermediate change.
--
i.
next prev parent reply other threads:[~2023-10-10 14:06 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 12:59 [PATCH v3 00/16] Introduce PMF Smart PC Solution Builder Feature Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 01/16] platform/x86/amd/pmf: Add PMF TEE interface Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 02/16] platform/x86/amd/pmf: Add support PMF-TA interaction Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 03/16] platform/x86/amd/pmf: Change return type of amd_pmf_set_dram_addr() Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 04/16] platform/x86/amd/pmf: Add support for PMF Policy Binary Shyam Sundar S K
2023-10-10 16:26 ` Mario Limonciello
2023-10-11 3:17 ` Shyam Sundar S K
2023-10-13 6:13 ` Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 05/16] platform/x86/amd/pmf: change amd_pmf_init_features() call sequence Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 06/16] platform/x86/amd/pmf: Add support to get inputs from other subsystems Shyam Sundar S K
2023-10-13 12:08 ` Ilpo Järvinen
2023-10-10 12:59 ` [PATCH v3 07/16] platform/x86/amd/pmf: Add support update p3t limit Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 08/16] platform/x86/amd/pmf: Add support to update system state Shyam Sundar S K
2023-10-10 16:03 ` Mario Limonciello
2023-10-11 3:05 ` Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 09/16] platform/x86/amd/pmf: Add facility to dump TA inputs Shyam Sundar S K
2023-10-14 4:16 ` kernel test robot
2023-10-15 10:05 ` kernel test robot
2023-10-10 12:59 ` [PATCH v3 10/16] platform/x86/amd/pmf: Add capability to sideload of policy binary Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 11/16] platform/x86/amd/pmf: dump policy binary data Shyam Sundar S K
2023-10-10 13:08 ` Ilpo Järvinen
2023-10-10 13:38 ` Shyam Sundar S K
2023-10-10 14:03 ` Ilpo Järvinen [this message]
2023-10-10 16:00 ` Mario Limonciello
2023-10-10 12:59 ` [PATCH v3 12/16] platform/x86/amd/pmf: Add PMF-AMDGPU get interface Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 13/16] platform/x86/amd/pmf: Add PMF-AMDGPU set interface Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 14/16] HID: amd_sfh: rename float_to_int() to amd_sfh_float_to_int() Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 15/16] platform/x86/amd/pmf: Add PMF-AMDSFH interface for HPD Shyam Sundar S K
2023-10-10 12:59 ` [PATCH v3 16/16] platform/x86/amd/pmf: Add PMF-AMDSFH interface for ALS Shyam Sundar S K
2023-10-10 15:59 ` Mario Limonciello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7118d392-f29b-a8b-6b46-a32bd1fc56c@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Patil.Reddy@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=basavaraj.natikar@amd.com \
--cc=benjamin.tissoires@redhat.com \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).