All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
	hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org, Patil.Reddy@amd.com
Subject: Re: [PATCH v3 5/5] platform/x86/amd/pmf: Add PMF driver changes to make compatible with PMF-TA
Date: Wed, 23 Oct 2024 19:59:22 +0530	[thread overview]
Message-ID: <84fe3b9b-cf98-4f49-ae2b-ec1a8759af4f@amd.com> (raw)
In-Reply-To: <733dbf68-a1a7-43d8-acc2-7f1b8d222427@amd.com>



On 10/23/2024 19:41, Mario Limonciello wrote:
> On 10/23/2024 01:32, Shyam Sundar S K wrote:
>> The PMF driver will allocate shared buffer memory using the
>> tee_shm_alloc_kernel_buf(). This allocated memory is located in the
>> secure world and is used for communication with the PMF-TA.
>>
>> The latest PMF-TA version introduces new structures with OEM debug
>> information and additional policy input conditions for evaluating the
>> policy binary. Consequently, the shared memory size must be
>> increased to
>> ensure compatibility between the PMF driver and the updated PMF-TA.
>>
>> Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
>> Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
>> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> 
> How does this present to a user?  From what you describe it seems to
> me like this means a new TA will fail on older kernel in some way.

Newer TA will not fail on older systems. This change is just about the
increase in TA reserved memory that is presented as "shared memory",
as TA needs the additional memory for its own debug data structures.

From user standpoint, always be on latest FW, irrespective of the
platform. At this point in time, I don't see a need for FW versioning
name (in the future, if there is a need for having a limited support
to older platforms, we can carve out a logic to do versioning stuff).

> Some ideas:
> 
> 1) Should there be header version check on the TA and dynamically
> allocate the structure size based on the version of the F/W?
> 

This can be done, when the TA versioning upgrade happens, like from
1.3 to 1.4, apart from that there is no header stuff association.

> 2) Or is there a command to the TA that can query the expected output
> size?
> 

No, this is just the initial shared memory that the driver allocates
to pass the inputs and the commands to TA.

> 3) Or should the new TA filename be versioned, and the driver has a
> fallback policy?
> 
> Whatever the outcome is; I think it's best that if possible this
> change goes back to stable to try to minimize regressions to users as
> distros update linux-firmware.  For example Fedora updates this
> monthly, but also tracks stable kernels.
> 

Advisory to distros should be to pick the latest PMF TA (note that, I
have not still submitted to new TA FW).

Thanks,
Shyam

>> ---
>>   drivers/platform/x86/amd/pmf/pmf.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/platform/x86/amd/pmf/pmf.h
>> b/drivers/platform/x86/amd/pmf/pmf.h
>> index a79808fda1d8..18f12aad46a9 100644
>> --- a/drivers/platform/x86/amd/pmf/pmf.h
>> +++ b/drivers/platform/x86/amd/pmf/pmf.h
>> @@ -106,7 +106,7 @@ struct cookie_header {
>>   #define PMF_TA_IF_VERSION_MAJOR                1
>>   #define TA_PMF_ACTION_MAX                    32
>>   #define TA_PMF_UNDO_MAX                        8
>> -#define TA_OUTPUT_RESERVED_MEM                906
>> +#define TA_OUTPUT_RESERVED_MEM                922
>>   #define MAX_OPERATION_PARAMS                    4
>>     #define PMF_IF_V1        1
> 

  reply	other threads:[~2024-10-23 14:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-23  6:32 [PATCH v3 0/5] platform/x86/amd/pmf: Updates to AMD PMF driver Shyam Sundar S K
2024-10-23  6:32 ` [PATCH v3 1/5] platform/x86/amd/pmf: Add SMU metrics table support for 1Ah family 60h model Shyam Sundar S K
2024-10-23 14:05   ` Mario Limonciello
2024-11-04  9:56   ` Hans de Goede
2024-10-23  6:32 ` [PATCH v3 2/5] platform/x86/amd/pmf: Use dev_err_probe() to simplify error handling Shyam Sundar S K
2024-10-23 14:05   ` Mario Limonciello
2024-10-23  6:32 ` [PATCH v3 3/5] MAINTAINERS: Change AMD PMF driver status to "Supported" Shyam Sundar S K
2024-10-23 14:05   ` Mario Limonciello
2024-10-23  6:32 ` [PATCH v3 4/5] platform/x86/amd/pmf: Switch to platform_get_resource() and devm_ioremap_resource() Shyam Sundar S K
2024-10-23 14:05   ` Mario Limonciello
2024-10-23 14:37     ` Shyam Sundar S K
2024-10-23 14:50       ` Mario Limonciello
2024-10-23 15:14         ` Shyam Sundar S K
2024-10-23 15:20           ` Mario Limonciello
2024-10-23  6:32 ` [PATCH v3 5/5] platform/x86/amd/pmf: Add PMF driver changes to make compatible with PMF-TA Shyam Sundar S K
2024-10-23 14:11   ` Mario Limonciello
2024-10-23 14:29     ` Shyam Sundar S K [this message]
2024-10-23 14:34       ` Mario Limonciello
2024-10-23 15:32         ` Shyam Sundar S K
2024-10-23 15:40           ` Mario Limonciello
2024-10-23 15:52             ` Shyam Sundar S K
2024-10-23 16:20               ` Mario Limonciello
2024-10-29 14:07                 ` Ilpo Järvinen
2024-10-30 14:00                   ` Hans de Goede
2024-10-30 16:03                     ` Shyam Sundar S K
2024-10-30 16:08                       ` Mario Limonciello
2024-10-30 16:23                         ` Shyam Sundar S K
2024-10-30 16:38                           ` Mario Limonciello
2024-10-30 17:19                             ` Hans de Goede
2024-10-31 10:57                       ` Ilpo Järvinen

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=84fe3b9b-cf98-4f49-ae2b-ec1a8759af4f@amd.com \
    --to=shyam-sundar.s-k@amd.com \
    --cc=Patil.Reddy@amd.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=mario.limonciello@amd.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.