From: Michal Simek <michal.simek@amd.com>
To: Ronak Jain <ronak.jain@amd.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firmware: xilinx: fix feature check logic for TF-A specific APIs
Date: Wed, 2 Oct 2024 12:56:05 +0200 [thread overview]
Message-ID: <dfc5cace-cfaf-4c51-9df4-5ba82017ef5c@amd.com> (raw)
In-Reply-To: <20240920055546.2658783-1-ronak.jain@amd.com>
On 9/20/24 07:55, Ronak Jain wrote:
> Currently, Linux is passing only API ID for feature of TF-A specific
> APIs but for feature check of TF-A specific APIs, TF-A is checking
> for Module ID + API ID as a result incorrect version is received for
> all TF-A specific APIs. So, fix feature check logic to pass valid
> arguments to get correct version.
>
> Signed-off-by: Ronak Jain <ronak.jain@amd.com>
> Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
> ---
> drivers/firmware/xilinx/zynqmp.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
> index 5ab0dfb2b225..0b2ad46c8bce 100644
> --- a/drivers/firmware/xilinx/zynqmp.c
> +++ b/drivers/firmware/xilinx/zynqmp.c
> @@ -225,11 +225,14 @@ static int __do_feature_check_call(const u32 api_id, u32 *ret_payload)
> * Feature check of TF-A APIs is done in the TF-A layer and it expects for
> * MODULE_ID_MASK bits of SMC's arg[0] to be the same as PM_MODULE_ID.
> */
> - if (module_id == TF_A_MODULE_ID)
> + if (module_id == TF_A_MODULE_ID) {
> module_id = PM_MODULE_ID;
> + smc_arg[1] = api_id;
> + } else {
> + smc_arg[1] = (api_id & API_ID_MASK);
> + }
>
> smc_arg[0] = PM_SIP_SVC | FIELD_PREP(MODULE_ID_MASK, module_id) | feature_check_api_id;
> - smc_arg[1] = (api_id & API_ID_MASK);
>
> ret = do_fw_call(ret_payload, 2, smc_arg[0], smc_arg[1]);
> if (ret)
Applied.
M
prev parent reply other threads:[~2024-10-02 10:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 5:55 Ronak Jain
2024-10-02 10:56 ` Michal Simek [this message]
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=dfc5cace-cfaf-4c51-9df4-5ba82017ef5c@amd.com \
--to=michal.simek@amd.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ronak.jain@amd.com \
/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
all inboxes | Powered by JetHome®