i.MX6UL: Adding bootcount support
Fabio Estevam
festevam at gmail.com
Tue Jul 8 03:36:49 CEST 2025
Hi Heiko,
Thanks for your email.
On Mon, Jul 7, 2025 at 1:30 AM Heiko Schocher <hs at denx.de> wrote:
> Have you checked if CONFIG_SYS_BOOTCOUNT_ADDR address is stable over
> reset? May someone overwrites it...
When I inspect via md.l, it is always zero.
> I had it working on imx6ull
>
> CONFIG_BOOTCOUNT_BOOTLIMIT=3
> CONFIG_SYS_BOOTCOUNT_ADDR=0x20d8024
> CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y
> CONFIG_BOOTCOUNT_LIMIT=y
I tried these changes, but they did not help.
Do you happen to remember which U-Boot version you used?
> I did not needed
>
> > +CONFIG_SYS_BOOTCOUNT_MAGIC=0xB0C4000
> > +CONFIG_SYS_BOOTCOUNT_BE=y
>
> but may because I have an older base...
>
> Hmm.. your register seems fine ... I read in RM:
> """
> For backward compatibility with earlier
> versions of SNVS LPGPR0 is aliased at its original offset of 68h.The GPR will be
> automatically zeroized when a tamper event occurs, unless GPR zeroization is disabled
> via the GPR_Z_DIS bit in the LP Control Register.
> """
>
> May try 0x20b00090 ... just a try...
Also, tried, but it also stays at 0.
> May tamper event occurs? And the register is in "low power domain" ... may
> there is a problem... so no real idea here from my side, just speculation...
It seems that I am missing something to get the LPGPR register to increment.
Regards,
Fabio Estevam
More information about the U-Boot
mailing list