flash/stm32l4x: probe tzen and rdp values

introduction of 'enum stm32l4_rdp' enumerating possible RDP levels for
devices with and without TrustZone.

also in 'stm32l4_flash_bank' structure we added and rdp and tzen members
to store read values by the helper 'stm32l4_sync_rdp_tzen'

these new members are used to display security and protection status
while probing the flash.

Change-Id: Icf883189715278a3323fe210d295047678b16592
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/5541
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
Tarek BOCHKATI
2020-11-03 01:22:53 +01:00
committed by Tomas Vanek
parent 88fa831839
commit 6405d35f32
2 changed files with 60 additions and 11 deletions

View File

@@ -56,9 +56,9 @@
#define OPTKEY1 0x08192A3B
#define OPTKEY2 0x4C5D6E7F
#define RDP_LEVEL_0 0xAA
#define RDP_LEVEL_1 0xBB
#define RDP_LEVEL_2 0xCC
/* FLASH_OPTR register bits */
#define FLASH_RDP_MASK 0xFF
#define FLASH_TZEN (1 << 31)
/* other registers */
#define DBGMCU_IDCODE_G0 0x40015800