mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: i.MX8M: don't print TF-A version
@ 2023-09-11 10:12 Ahmad Fatoum
  2023-09-11 10:33 ` Marco Felsch
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2023-09-11 10:12 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

In usual configurations, TF-A already prints its version on startup, so
printing it in barebox again is unnecessary and less informational than
the TF-A print and complicates running barebox without TF-A.
Thus just drop it.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/mach-imx/imx8m.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
index af44b089e08a..c7c799c64bc4 100644
--- a/arch/arm/mach-imx/imx8m.c
+++ b/arch/arm/mach-imx/imx8m.c
@@ -56,7 +56,6 @@ u64 imx8m_uid(void)
 static int imx8m_init(const char *cputypestr)
 {
 	void __iomem *src = IOMEM(MX8M_SRC_BASE_ADDR);
-	struct arm_smccc_res res;
 
 	genpd_activate();
 
@@ -66,16 +65,6 @@ static int imx8m_init(const char *cputypestr)
 	imx_set_reset_reason(src + IMX7_SRC_SRSR, imx7_reset_reasons);
 	pr_info("%s unique ID: %llx\n", cputypestr, imx8m_uid());
 
-	if (IS_ENABLED(CONFIG_ARM_SMCCC) &&
-	    IS_ENABLED(CONFIG_FIRMWARE_IMX8MQ_ATF)) {
-		arm_smccc_smc(IMX_SIP_BUILDINFO,
-			      IMX_SIP_BUILDINFO_GET_COMMITHASH,
-			      0, 0, 0, 0, 0, 0, &res);
-
-		if (res.a0 > 0)
-			pr_info("i.MX ARM Trusted Firmware: %s\n", (char *)&res.a0);
-	}
-
 	if (IS_ENABLED(CONFIG_PBL_OPTEE) && tzc380_is_enabled() &&
 	    !of_find_node_by_path_from(NULL, "/firmware/optee")) {
 		static struct of_optee_fixup_data optee_fixup_data = {
-- 
2.39.2




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: i.MX8M: don't print TF-A version
  2023-09-11 10:12 [PATCH] ARM: i.MX8M: don't print TF-A version Ahmad Fatoum
@ 2023-09-11 10:33 ` Marco Felsch
  2023-09-12  9:25 ` Sascha Hauer
  2023-09-26 11:39 ` Sascha Hauer
  2 siblings, 0 replies; 5+ messages in thread
From: Marco Felsch @ 2023-09-11 10:33 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On 23-09-11, Ahmad Fatoum wrote:
> In usual configurations, TF-A already prints its version on startup, so
> printing it in barebox again is unnecessary and less informational than
> the TF-A print and complicates running barebox without TF-A.
> Thus just drop it.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>

> ---
>  arch/arm/mach-imx/imx8m.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
> index af44b089e08a..c7c799c64bc4 100644
> --- a/arch/arm/mach-imx/imx8m.c
> +++ b/arch/arm/mach-imx/imx8m.c
> @@ -56,7 +56,6 @@ u64 imx8m_uid(void)
>  static int imx8m_init(const char *cputypestr)
>  {
>  	void __iomem *src = IOMEM(MX8M_SRC_BASE_ADDR);
> -	struct arm_smccc_res res;
>  
>  	genpd_activate();
>  
> @@ -66,16 +65,6 @@ static int imx8m_init(const char *cputypestr)
>  	imx_set_reset_reason(src + IMX7_SRC_SRSR, imx7_reset_reasons);
>  	pr_info("%s unique ID: %llx\n", cputypestr, imx8m_uid());
>  
> -	if (IS_ENABLED(CONFIG_ARM_SMCCC) &&
> -	    IS_ENABLED(CONFIG_FIRMWARE_IMX8MQ_ATF)) {
> -		arm_smccc_smc(IMX_SIP_BUILDINFO,
> -			      IMX_SIP_BUILDINFO_GET_COMMITHASH,
> -			      0, 0, 0, 0, 0, 0, &res);
> -
> -		if (res.a0 > 0)
> -			pr_info("i.MX ARM Trusted Firmware: %s\n", (char *)&res.a0);
> -	}
> -
>  	if (IS_ENABLED(CONFIG_PBL_OPTEE) && tzc380_is_enabled() &&
>  	    !of_find_node_by_path_from(NULL, "/firmware/optee")) {
>  		static struct of_optee_fixup_data optee_fixup_data = {
> -- 
> 2.39.2
> 
> 
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: i.MX8M: don't print TF-A version
  2023-09-11 10:12 [PATCH] ARM: i.MX8M: don't print TF-A version Ahmad Fatoum
  2023-09-11 10:33 ` Marco Felsch
@ 2023-09-12  9:25 ` Sascha Hauer
  2023-09-18 15:38   ` Ahmad Fatoum
  2023-09-26 11:39 ` Sascha Hauer
  2 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2023-09-12  9:25 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Mon, Sep 11, 2023 at 12:12:19PM +0200, Ahmad Fatoum wrote:
> In usual configurations, TF-A already prints its version on startup, so
> printing it in barebox again is unnecessary and less informational than
> the TF-A print and complicates running barebox without TF-A.
> Thus just drop it.

I agree the information is not very useful. Also we currently only check
for CONFIG_FIRMWARE_IMX8MQ_ATF, but not the other i.MX8M variants, so
the current code is wrong anyway.

However, would it be useful to do a arm_smccc_smc() call somewhere to
verify the TF-A is generally working as expected?

Sascha

> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  arch/arm/mach-imx/imx8m.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
> index af44b089e08a..c7c799c64bc4 100644
> --- a/arch/arm/mach-imx/imx8m.c
> +++ b/arch/arm/mach-imx/imx8m.c
> @@ -56,7 +56,6 @@ u64 imx8m_uid(void)
>  static int imx8m_init(const char *cputypestr)
>  {
>  	void __iomem *src = IOMEM(MX8M_SRC_BASE_ADDR);
> -	struct arm_smccc_res res;
>  
>  	genpd_activate();
>  
> @@ -66,16 +65,6 @@ static int imx8m_init(const char *cputypestr)
>  	imx_set_reset_reason(src + IMX7_SRC_SRSR, imx7_reset_reasons);
>  	pr_info("%s unique ID: %llx\n", cputypestr, imx8m_uid());
>  
> -	if (IS_ENABLED(CONFIG_ARM_SMCCC) &&
> -	    IS_ENABLED(CONFIG_FIRMWARE_IMX8MQ_ATF)) {
> -		arm_smccc_smc(IMX_SIP_BUILDINFO,
> -			      IMX_SIP_BUILDINFO_GET_COMMITHASH,
> -			      0, 0, 0, 0, 0, 0, &res);
> -
> -		if (res.a0 > 0)
> -			pr_info("i.MX ARM Trusted Firmware: %s\n", (char *)&res.a0);
> -	}
> -
>  	if (IS_ENABLED(CONFIG_PBL_OPTEE) && tzc380_is_enabled() &&
>  	    !of_find_node_by_path_from(NULL, "/firmware/optee")) {
>  		static struct of_optee_fixup_data optee_fixup_data = {
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: i.MX8M: don't print TF-A version
  2023-09-12  9:25 ` Sascha Hauer
@ 2023-09-18 15:38   ` Ahmad Fatoum
  0 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2023-09-18 15:38 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hello Sascha,

On 12.09.23 11:25, Sascha Hauer wrote:
> On Mon, Sep 11, 2023 at 12:12:19PM +0200, Ahmad Fatoum wrote:
>> In usual configurations, TF-A already prints its version on startup, so
>> printing it in barebox again is unnecessary and less informational than
>> the TF-A print and complicates running barebox without TF-A.
>> Thus just drop it.
> 
> I agree the information is not very useful. Also we currently only check
> for CONFIG_FIRMWARE_IMX8MQ_ATF, but not the other i.MX8M variants, so
> the current code is wrong anyway.

current_el() < 3 would be the alternative should we keep this code.

> However, would it be useful to do a arm_smccc_smc() call somewhere to
> verify the TF-A is generally working as expected?

There's the smc command, which can be used for debugging. I see no need
to unconditionally do a SMC on every boot.

Cheers,
Ahmad

> 
> Sascha
> 
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---
>>  arch/arm/mach-imx/imx8m.c | 11 -----------
>>  1 file changed, 11 deletions(-)
>>
>> diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
>> index af44b089e08a..c7c799c64bc4 100644
>> --- a/arch/arm/mach-imx/imx8m.c
>> +++ b/arch/arm/mach-imx/imx8m.c
>> @@ -56,7 +56,6 @@ u64 imx8m_uid(void)
>>  static int imx8m_init(const char *cputypestr)
>>  {
>>  	void __iomem *src = IOMEM(MX8M_SRC_BASE_ADDR);
>> -	struct arm_smccc_res res;
>>  
>>  	genpd_activate();
>>  
>> @@ -66,16 +65,6 @@ static int imx8m_init(const char *cputypestr)
>>  	imx_set_reset_reason(src + IMX7_SRC_SRSR, imx7_reset_reasons);
>>  	pr_info("%s unique ID: %llx\n", cputypestr, imx8m_uid());
>>  
>> -	if (IS_ENABLED(CONFIG_ARM_SMCCC) &&
>> -	    IS_ENABLED(CONFIG_FIRMWARE_IMX8MQ_ATF)) {
>> -		arm_smccc_smc(IMX_SIP_BUILDINFO,
>> -			      IMX_SIP_BUILDINFO_GET_COMMITHASH,
>> -			      0, 0, 0, 0, 0, 0, &res);
>> -
>> -		if (res.a0 > 0)
>> -			pr_info("i.MX ARM Trusted Firmware: %s\n", (char *)&res.a0);
>> -	}
>> -
>>  	if (IS_ENABLED(CONFIG_PBL_OPTEE) && tzc380_is_enabled() &&
>>  	    !of_find_node_by_path_from(NULL, "/firmware/optee")) {
>>  		static struct of_optee_fixup_data optee_fixup_data = {
>> -- 
>> 2.39.2
>>
>>
>>
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: i.MX8M: don't print TF-A version
  2023-09-11 10:12 [PATCH] ARM: i.MX8M: don't print TF-A version Ahmad Fatoum
  2023-09-11 10:33 ` Marco Felsch
  2023-09-12  9:25 ` Sascha Hauer
@ 2023-09-26 11:39 ` Sascha Hauer
  2 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2023-09-26 11:39 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Mon, Sep 11, 2023 at 12:12:19PM +0200, Ahmad Fatoum wrote:
> In usual configurations, TF-A already prints its version on startup, so
> printing it in barebox again is unnecessary and less informational than
> the TF-A print and complicates running barebox without TF-A.
> Thus just drop it.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  arch/arm/mach-imx/imx8m.c | 11 -----------
>  1 file changed, 11 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
> index af44b089e08a..c7c799c64bc4 100644
> --- a/arch/arm/mach-imx/imx8m.c
> +++ b/arch/arm/mach-imx/imx8m.c
> @@ -56,7 +56,6 @@ u64 imx8m_uid(void)
>  static int imx8m_init(const char *cputypestr)
>  {
>  	void __iomem *src = IOMEM(MX8M_SRC_BASE_ADDR);
> -	struct arm_smccc_res res;
>  
>  	genpd_activate();
>  
> @@ -66,16 +65,6 @@ static int imx8m_init(const char *cputypestr)
>  	imx_set_reset_reason(src + IMX7_SRC_SRSR, imx7_reset_reasons);
>  	pr_info("%s unique ID: %llx\n", cputypestr, imx8m_uid());
>  
> -	if (IS_ENABLED(CONFIG_ARM_SMCCC) &&
> -	    IS_ENABLED(CONFIG_FIRMWARE_IMX8MQ_ATF)) {
> -		arm_smccc_smc(IMX_SIP_BUILDINFO,
> -			      IMX_SIP_BUILDINFO_GET_COMMITHASH,
> -			      0, 0, 0, 0, 0, 0, &res);
> -
> -		if (res.a0 > 0)
> -			pr_info("i.MX ARM Trusted Firmware: %s\n", (char *)&res.a0);
> -	}
> -
>  	if (IS_ENABLED(CONFIG_PBL_OPTEE) && tzc380_is_enabled() &&
>  	    !of_find_node_by_path_from(NULL, "/firmware/optee")) {
>  		static struct of_optee_fixup_data optee_fixup_data = {
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-26 11:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 10:12 [PATCH] ARM: i.MX8M: don't print TF-A version Ahmad Fatoum
2023-09-11 10:33 ` Marco Felsch
2023-09-12  9:25 ` Sascha Hauer
2023-09-18 15:38   ` Ahmad Fatoum
2023-09-26 11:39 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox