u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH] kontron-sl-mx8mm: Let CONFIG_SPL_FIT_IMAGE_TINY be selected
@ 2022-08-24  1:09 Fabio Estevam
  2022-08-24 10:08 ` Frieder Schrempf
  2022-09-22 13:33 ` sbabic
  0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2022-08-24  1:09 UTC (permalink / raw)
  To: sbabic; +Cc: frieder.schrempf, u-boot, Fabio Estevam

When CONFIG_IMX_HAB is selected the 'hab_status' command reports several
error events, indicating that the BootROM failed to authenticate the SPL.

After inspecting the content of the memory location that corresponds to
the DTB load address, the content did not match with the DTB binary,
showing that some kind of memory corruption/overlap occurred.

Letting the CONFIG_SPL_FIT_IMAGE_TINY option to be selected causes the
DTB to be properly placed into RAM and no more overlap occurs.

With this change, the 'hab_status' command returns no more error events,
which indicates that the BootROM succeeded to authenticate the SPL.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 configs/kontron-sl-mx8mm_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configs/kontron-sl-mx8mm_defconfig b/configs/kontron-sl-mx8mm_defconfig
index 5387f65926f6..f8589b010cce 100644
--- a/configs/kontron-sl-mx8mm_defconfig
+++ b/configs/kontron-sl-mx8mm_defconfig
@@ -39,7 +39,6 @@ CONFIG_CUSTOM_SYS_SPL_MALLOC_ADDR=0x42200000
 CONFIG_SYS_SPL_MALLOC_SIZE=0x80000
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300
-# CONFIG_SPL_FIT_IMAGE_TINY is not set
 CONFIG_SPL_I2C=y
 CONFIG_SPL_DM_SPI_FLASH=y
 CONFIG_SPL_POWER=y
-- 
2.25.1


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

* Re: [PATCH] kontron-sl-mx8mm: Let CONFIG_SPL_FIT_IMAGE_TINY be selected
  2022-08-24  1:09 [PATCH] kontron-sl-mx8mm: Let CONFIG_SPL_FIT_IMAGE_TINY be selected Fabio Estevam
@ 2022-08-24 10:08 ` Frieder Schrempf
  2022-09-20 18:48   ` Fabio Estevam
  2022-09-22 13:33 ` sbabic
  1 sibling, 1 reply; 4+ messages in thread
From: Frieder Schrempf @ 2022-08-24 10:08 UTC (permalink / raw)
  To: Fabio Estevam, sbabic; +Cc: u-boot

Hi Fabio,

Am 24.08.22 um 03:09 schrieb Fabio Estevam:
> When CONFIG_IMX_HAB is selected the 'hab_status' command reports several
> error events, indicating that the BootROM failed to authenticate the SPL.
> 
> After inspecting the content of the memory location that corresponds to
> the DTB load address, the content did not match with the DTB binary,
> showing that some kind of memory corruption/overlap occurred.
> 
> Letting the CONFIG_SPL_FIT_IMAGE_TINY option to be selected causes the
> DTB to be properly placed into RAM and no more overlap occurs.
> 
> With this change, the 'hab_status' command returns no more error events,
> which indicates that the BootROM succeeded to authenticate the SPL.
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>

Thanks for debugging!

I remember that enabling CONFIG_SPL_FIT_IMAGE_TINY resulted in aliases
from the devicetree not being available anymore. This in turn caused the
indexing of some devices to not be consistent between SPL, U-Boot proper
and kernel. But I don't remember which exact problems were caused by this.

I tried this on top of my patchset [1] and at first glance I don't see
any obvious problems, so I hope whatever I have in the back of my mind
is not an issue anymore.

Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>

[1]
https://patchwork.ozlabs.org/project/uboot/cover/20220801103027.96820-1-frieder@fris.de/

Thanks
Frieder

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

* Re: [PATCH] kontron-sl-mx8mm: Let CONFIG_SPL_FIT_IMAGE_TINY be selected
  2022-08-24 10:08 ` Frieder Schrempf
@ 2022-09-20 18:48   ` Fabio Estevam
  0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2022-09-20 18:48 UTC (permalink / raw)
  To: sbabic, Tom Rini; +Cc: Fabio Estevam, u-boot, Frieder Schrempf

Hi Stefano and Tom,

On Wed, Aug 24, 2022 at 7:09 AM Frieder Schrempf
<frieder.schrempf@kontron.de> wrote:
>
> Hi Fabio,
>
> Am 24.08.22 um 03:09 schrieb Fabio Estevam:
> > When CONFIG_IMX_HAB is selected the 'hab_status' command reports several
> > error events, indicating that the BootROM failed to authenticate the SPL.
> >
> > After inspecting the content of the memory location that corresponds to
> > the DTB load address, the content did not match with the DTB binary,
> > showing that some kind of memory corruption/overlap occurred.
> >
> > Letting the CONFIG_SPL_FIT_IMAGE_TINY option to be selected causes the
> > DTB to be properly placed into RAM and no more overlap occurs.
> >
> > With this change, the 'hab_status' command returns no more error events,
> > which indicates that the BootROM succeeded to authenticate the SPL.
> >
> > Signed-off-by: Fabio Estevam <festevam@denx.de>
>
> Thanks for debugging!
>
> I remember that enabling CONFIG_SPL_FIT_IMAGE_TINY resulted in aliases
> from the devicetree not being available anymore. This in turn caused the
> indexing of some devices to not be consistent between SPL, U-Boot proper
> and kernel. But I don't remember which exact problems were caused by this.
>
> I tried this on top of my patchset [1] and at first glance I don't see
> any obvious problems, so I hope whatever I have in the back of my mind
> is not an issue anymore.
>
> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>

Could you please consider applying this one as a fix to 2022.10?

Thanks

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

* [PATCH] kontron-sl-mx8mm: Let CONFIG_SPL_FIT_IMAGE_TINY be selected
  2022-08-24  1:09 [PATCH] kontron-sl-mx8mm: Let CONFIG_SPL_FIT_IMAGE_TINY be selected Fabio Estevam
  2022-08-24 10:08 ` Frieder Schrempf
@ 2022-09-22 13:33 ` sbabic
  1 sibling, 0 replies; 4+ messages in thread
From: sbabic @ 2022-09-22 13:33 UTC (permalink / raw)
  To: Fabio Estevam, u-boot

> When CONFIG_IMX_HAB is selected the 'hab_status' command reports several
> error events, indicating that the BootROM failed to authenticate the SPL.
> After inspecting the content of the memory location that corresponds to
> the DTB load address, the content did not match with the DTB binary,
> showing that some kind of memory corruption/overlap occurred.
> Letting the CONFIG_SPL_FIT_IMAGE_TINY option to be selected causes the
> DTB to be properly placed into RAM and no more overlap occurs.
> With this change, the 'hab_status' command returns no more error events,
> which indicates that the BootROM succeeded to authenticate the SPL.
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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@denx.de
=====================================================================

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

end of thread, other threads:[~2022-09-22 13:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24  1:09 [PATCH] kontron-sl-mx8mm: Let CONFIG_SPL_FIT_IMAGE_TINY be selected Fabio Estevam
2022-08-24 10:08 ` Frieder Schrempf
2022-09-20 18:48   ` Fabio Estevam
2022-09-22 13:33 ` sbabic

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).