All of lore.kernel.org
 help / color / mirror / Atom feed
* Habv4 on imx8m
@ 2021-01-12 15:03 Stefano Babic
  2021-01-12 15:21 ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Stefano Babic @ 2021-01-12 15:03 UTC (permalink / raw)
  To: u-boot

Hi Peng, Fabio,

I accidental saw this code:

arch/arm/mach-imx/imx8m/soc.c:#if defined(CONFIG_IMX_HAB)

but then arch/arm/mach-imx/Kconfig  :

config IMX_HAB
         bool "Support i.MX HAB features"
         depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5

this does not match. As I understand from manual, Habv4 is the same as
in mx6. Should we simply enable HAB for imx8m, too ?

Regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

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

* Habv4 on imx8m
  2021-01-12 15:03 Habv4 on imx8m Stefano Babic
@ 2021-01-12 15:21 ` Fabio Estevam
  2021-01-12 16:06   ` Stefano Babic
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2021-01-12 15:21 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

On Tue, Jan 12, 2021 at 12:03 PM Stefano Babic <sbabic@denx.de> wrote:
>
> Hi Peng, Fabio,
>
> I accidental saw this code:
>
> arch/arm/mach-imx/imx8m/soc.c:#if defined(CONFIG_IMX_HAB)
>
> but then arch/arm/mach-imx/Kconfig  :
>
> config IMX_HAB
>          bool "Support i.MX HAB features"
>          depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5
>
> this does not match. As I understand from manual, Habv4 is the same as
> in mx6. Should we simply enable HAB for imx8m, too ?

You are right. This should be enabled for i.MX8M too.

The vendor U-Boot code does like this:

config IMX_HAB
bool "Support i.MX HAB features"
depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5 || ARCH_MX7ULP || ARCH_IMX8M

I can submit a patch adding mx7ulp and imx8m if you want.

Thanks

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

* Habv4 on imx8m
  2021-01-12 15:21 ` Fabio Estevam
@ 2021-01-12 16:06   ` Stefano Babic
  2021-03-04  8:23     ` Frieder Schrempf
  0 siblings, 1 reply; 9+ messages in thread
From: Stefano Babic @ 2021-01-12 16:06 UTC (permalink / raw)
  To: u-boot

On 12.01.21 16:21, Fabio Estevam wrote:
> Hi Stefano,
> 
> On Tue, Jan 12, 2021 at 12:03 PM Stefano Babic <sbabic@denx.de> wrote:
>>
>> Hi Peng, Fabio,
>>
>> I accidental saw this code:
>>
>> arch/arm/mach-imx/imx8m/soc.c:#if defined(CONFIG_IMX_HAB)
>>
>> but then arch/arm/mach-imx/Kconfig  :
>>
>> config IMX_HAB
>>          bool "Support i.MX HAB features"
>>          depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5
>>
>> this does not match. As I understand from manual, Habv4 is the same as
>> in mx6. Should we simply enable HAB for imx8m, too ?
> 
> You are right. This should be enabled for i.MX8M too.
> 
> The vendor U-Boot code does like this:
> 
> config IMX_HAB
> bool "Support i.MX HAB features"
> depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5 || ARCH_MX7ULP || ARCH_IMX8M
> 
> I can submit a patch adding mx7ulp and imx8m if you want.
> 

Nice, thanks !

Stefano
> Thanks
> 


-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

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

* Habv4 on imx8m
  2021-01-12 16:06   ` Stefano Babic
@ 2021-03-04  8:23     ` Frieder Schrempf
  2021-03-04 11:18       ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Frieder Schrempf @ 2021-03-04  8:23 UTC (permalink / raw)
  To: u-boot

Hi Fabio,

On 12.01.21 17:06, Stefano Babic wrote:
> On 12.01.21 16:21, Fabio Estevam wrote:
>> Hi Stefano,
>>
>> On Tue, Jan 12, 2021 at 12:03 PM Stefano Babic <sbabic@denx.de> wrote:
>>>
>>> Hi Peng, Fabio,
>>>
>>> I accidental saw this code:
>>>
>>> arch/arm/mach-imx/imx8m/soc.c:#if defined(CONFIG_IMX_HAB)
>>>
>>> but then arch/arm/mach-imx/Kconfig  :
>>>
>>> config IMX_HAB
>>>           bool "Support i.MX HAB features"
>>>           depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5
>>>
>>> this does not match. As I understand from manual, Habv4 is the same as
>>> in mx6. Should we simply enable HAB for imx8m, too ?
>>
>> You are right. This should be enabled for i.MX8M too.
>>
>> The vendor U-Boot code does like this:
>>
>> config IMX_HAB
>> bool "Support i.MX HAB features"
>> depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5 || ARCH_MX7ULP || ARCH_IMX8M
>>
>> I can submit a patch adding mx7ulp and imx8m if you want.

Is this still on your list?
It would be great if you could send a patch for this.

Thanks
Frieder

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

* Habv4 on imx8m
  2021-03-04  8:23     ` Frieder Schrempf
@ 2021-03-04 11:18       ` Fabio Estevam
  2021-03-04 11:24         ` Stefano Babic
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2021-03-04 11:18 UTC (permalink / raw)
  To: u-boot

Hi Frieder,

On Thu, Mar 4, 2021 at 5:23 AM Frieder Schrempf
<frieder.schrempf@kontron.de> wrote:

> Is this still on your list?
> It would be great if you could send a patch for this.

Thanks for the reminder. I have just sent the patch.

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

* Habv4 on imx8m
  2021-03-04 11:18       ` Fabio Estevam
@ 2021-03-04 11:24         ` Stefano Babic
  2021-03-07 11:05           ` Florian Mayer
  0 siblings, 1 reply; 9+ messages in thread
From: Stefano Babic @ 2021-03-04 11:24 UTC (permalink / raw)
  To: u-boot

On 04.03.21 12:18, Fabio Estevam wrote:
> Hi Frieder,
> 
> On Thu, Mar 4, 2021 at 5:23 AM Frieder Schrempf
> <frieder.schrempf@kontron.de> wrote:
> 
>> Is this still on your list?
>> It would be great if you could send a patch for this.
> 
> Thanks for the reminder. I have just sent the patch.
> 

I forgot it as well, it is just to extend the defconfig. I pick up 
Fabio's patch, it will be merged into 2021.04

Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

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

* Habv4 on imx8m
  2021-03-04 11:24         ` Stefano Babic
@ 2021-03-07 11:05           ` Florian Mayer
  2021-03-08 11:07             ` Frieder Schrempf
  0 siblings, 1 reply; 9+ messages in thread
From: Florian Mayer @ 2021-03-07 11:05 UTC (permalink / raw)
  To: u-boot

Hi all,

On 04.03.2021 12:24, Stefano Babic wrote:
> On 04.03.21 12:18, Fabio Estevam wrote:
>> Hi Frieder,
>> 
>> On Thu, Mar 4, 2021 at 5:23 AM Frieder Schrempf
>> <frieder.schrempf@kontron.de> wrote:
>> 
>>> Is this still on your list?
>>> It would be great if you could send a patch for this.
>> 
>> Thanks for the reminder. I have just sent the patch.
>> 
> 
> I forgot it as well, it is just to extend the defconfig. I pick up
> Fabio's patch, it will be merged into 2021.04
> 
> Stefano

I tested the patch with CONFIG_IMX_HAB=y for an IMX8m and I got some 
compiler errors.

A part of the output (in german):
...
   CC      drivers/crypto/fsl/sec.o
   CC      drivers/crypto/fsl/jr.o
drivers/crypto/fsl/jr.c:28:21: Fehler: ?CONFIG_SYS_FSL_MAX_NUM_OF_SEC? 
ist hier nicht deklariert (nicht in einer Funktion)
    28 | uint32_t sec_offset[CONFIG_SYS_FSL_MAX_NUM_OF_SEC] = {
       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/crypto/fsl/jr.c: In Funktion ?start_jr0?:
drivers/crypto/fsl/jr.c:47:2: Fehler: unbekannter Typname: ?ccsr_sec_t?
    47 |  ccsr_sec_t *sec = (void *)SEC_ADDR(sec_idx);
       |  ^~~~~~~~~~
drivers/crypto/fsl/jr.c:37:4: Fehler: ?CONFIG_SYS_FSL_SEC_ADDR? nicht 
deklariert (erstmalige Verwendung in dieser Funktion); meinten Sie 
?CONFIG_SYS_FSL_ESDHC_ADDR??
    37 |  ((CONFIG_SYS_FSL_SEC_ADDR + sec_offset[idx]))
       |    ^~~~~~~~~~~~~~~~~~~~~~~
...
The list is long and mostly the compiler cannot found some defines:
CONFIG_SYS_FSL_SEC_ADDR
CONFIG_SYS_FSL_JR0_OFFSET
CONFIG_SYS_FSL_SEC_OFFSET

RDSTA_SKVN
RTSDCTL_ENT_DLY_MIN
RTSDCTL_ENT_DLY_MAX

And this type: ccsr_sec_t

I used for the test:
- Das U-Boot master branch
- Cross compiler: aarch64-linux-gnu-
- This documentation: 
https://github.com/u-boot/u-boot/blob/master/doc/board/freescale/imx8mm_evk.rst
- I enable in the menuconfig CONFIG_IMX_HAB and SYS_FSL_SEC_LE

Florian

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

* Habv4 on imx8m
  2021-03-07 11:05           ` Florian Mayer
@ 2021-03-08 11:07             ` Frieder Schrempf
  2021-03-08 11:28               ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Frieder Schrempf @ 2021-03-08 11:07 UTC (permalink / raw)
  To: u-boot

On 07.03.21 12:05, Florian Mayer wrote:
> Hi all,
> 
> On 04.03.2021 12:24, Stefano Babic wrote:
>> On 04.03.21 12:18, Fabio Estevam wrote:
>>> Hi Frieder,
>>>
>>> On Thu, Mar 4, 2021 at 5:23 AM Frieder Schrempf
>>> <frieder.schrempf@kontron.de> wrote:
>>>
>>>> Is this still on your list?
>>>> It would be great if you could send a patch for this.
>>>
>>> Thanks for the reminder. I have just sent the patch.
>>>
>>
>> I forgot it as well, it is just to extend the defconfig. I pick up
>> Fabio's patch, it will be merged into 2021.04
>>
>> Stefano
> 
> I tested the patch with CONFIG_IMX_HAB=y for an IMX8m and I got some 
> compiler errors.
> 

There are still multiple issues with HAB and CAAM for ARM64/i.MX8M. I 
did some quick fixups for the most obvious ones here: [1].

There are still warnings for pointer size mismatches in the drivers as 
they apparently haven't been made ready for 64-bit archs yet.

And there might be more issues. I don't have time to work on this more 
at the moment, so I hope someone can add the missing bits and do some tests.

[1] https://git.kontron-electronics.de/linux/u-boot/-/commits/caam_hab_mx8m

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

* Habv4 on imx8m
  2021-03-08 11:07             ` Frieder Schrempf
@ 2021-03-08 11:28               ` Fabio Estevam
  0 siblings, 0 replies; 9+ messages in thread
From: Fabio Estevam @ 2021-03-08 11:28 UTC (permalink / raw)
  To: u-boot

Hi Frieder,

On Mon, Mar 8, 2021 at 8:07 AM Frieder Schrempf
<frieder.schrempf@kontron.de> wrote:

> There are still multiple issues with HAB and CAAM for ARM64/i.MX8M. I
> did some quick fixups for the most obvious ones here: [1].
>
> There are still warnings for pointer size mismatches in the drivers as
> they apparently haven't been made ready for 64-bit archs yet.
>
> And there might be more issues. I don't have time to work on this more
> at the moment, so I hope someone can add the missing bits and do some tests.
>
> [1] https://git.kontron-electronics.de/linux/u-boot/-/commits/caam_hab_mx8m

Yes, it seems that someone needs to take a look at the NXP U-Boot
implementation and upstream the CAAM support for i.MX8M.

For example:
https://source.codeaurora.org/external/imx/uboot-imx/commit/?h=imx_v2020.04_5.4.70_2.3.0&id=337b9a92acf07a47cfdc9caa30050dbcee6d37c8

Regards,

Fabio Estevam

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

end of thread, other threads:[~2021-03-08 11:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 15:03 Habv4 on imx8m Stefano Babic
2021-01-12 15:21 ` Fabio Estevam
2021-01-12 16:06   ` Stefano Babic
2021-03-04  8:23     ` Frieder Schrempf
2021-03-04 11:18       ` Fabio Estevam
2021-03-04 11:24         ` Stefano Babic
2021-03-07 11:05           ` Florian Mayer
2021-03-08 11:07             ` Frieder Schrempf
2021-03-08 11:28               ` Fabio Estevam

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.