]> git.dujemihanovic.xyz Git - u-boot.git/commit
stm32mp1: read auth stats and boot_partition from tamp
authorIgor Opaniuk <igor.opaniuk@foundries.io>
Mon, 6 Nov 2023 10:41:52 +0000 (11:41 +0100)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 10 Nov 2023 12:34:10 +0000 (13:34 +0100)
commitc205fe979ebc1961cf28555c00e24a9004761366
treea401e196a6a67fd8fc65c844c64c61088fd121ce
parent6d84f6bc75a30214534966efae022cfbb9e8097b
stm32mp1: read auth stats and boot_partition from tamp

Obtain from TAMP backup register information about image authorization
status and partition id used for booting. Store this info in
environmental variables ("boot_auth" and "boot_part" correspondingly).

Image authorization supported values:
0x0 - No authentication done
0x1 - Authentication done and failed
0x2 - Authentication done and succeeded

These values are stored to TAMP backup register by Trusted Firmware-A [1].

Testing:
STM32MP> print boot_part
boot_part=1
STM32MP> print boot_auth
boot_auth=2

[1] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?h=refs/heads/integration&id=ab2b325c1ab895e626d4e11a9f26b9e7c968f8d8

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
arch/arm/mach-stm32mp/cpu.c
arch/arm/mach-stm32mp/include/mach/stm32.h
arch/arm/mach-stm32mp/include/mach/sys_proto.h