Skip to content

Commit d51edf0

Browse files
Grolleau-BenjaminAnton-TF
authored andcommitted
platform: b_u585i_iot02a: demote provisioning logs from ERR to WARN
During the first boot, the auto-provisioning mechanism detects that Option Bytes are in an open state (due to regression) and reconfigures them to match the security policy. These logs were previously marked as ERROR. However, since the system successfully sets the correct values and continues the boot process without exiting, they are more accurately described as WARNINGS. Change-Id: I91da9bad1a03d35816a398cc68ef69f2509d8e80 Signed-off-by: Benjamin Grolleau <benjamin.grolleau@outlook.com>
1 parent 7fb282e commit d51edf0

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

platform/ext/target/stm/common/stm32u5xx/bl2/low_level_security.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ void LL_SECU_CheckStaticProtections(void)
672672
BOOT_LOG_ERR("Unexpected value for secure flash protection");
673673
Error_Handler();
674674
#else
675-
BOOT_LOG_ERR("Unexpected value for secure flash protection: set wmsec1");
675+
BOOT_LOG_WRN("Unexpected value for secure flash protection: set wmsec1");
676676
flash_option_bytes_bank1.WMSecStartPage = start;
677677
flash_option_bytes_bank1.WMSecEndPage = end;
678678
flash_option_bytes_bank1.OptionType |= OPTIONBYTE_WMSEC;
@@ -695,7 +695,7 @@ void LL_SECU_CheckStaticProtections(void)
695695
BOOT_LOG_ERR("Unexpected value for secure flash protection");
696696
Error_Handler();
697697
#else
698-
BOOT_LOG_ERR("Unexpected value for secure flash protection : set wmsec2");
698+
BOOT_LOG_WRN("Unexpected value for secure flash protection : set wmsec2");
699699
flash_option_bytes_bank2.WMSecStartPage = start;
700700
flash_option_bytes_bank2.WMSecEndPage = end;
701701
flash_option_bytes_bank2.OptionType = OPTIONBYTE_WMSEC;
@@ -712,7 +712,7 @@ void LL_SECU_CheckStaticProtections(void)
712712
BOOT_LOG_ERR("Unexpected value for secure flash protection");
713713
Error_Handler();
714714
#else
715-
BOOT_LOG_ERR("Unexpected value for secure flash protection : set wmsec2");
715+
BOOT_LOG_WRN("Unexpected value for secure flash protection : set wmsec2");
716716
/* bank is not unsecured , modify option bytes */
717717
flash_option_bytes_bank2.WMSecStartPage = 127;
718718
flash_option_bytes_bank2.WMSecEndPage = 0;
@@ -737,11 +737,10 @@ void LL_SECU_CheckStaticProtections(void)
737737
BOOT_LOG_ERR("Unexpected value for write protection ");
738738
Error_Handler();
739739
#else
740+
BOOT_LOG_WRN("Unexpected value for write protection : set wrp1");
740741
flash_option_bytes_bank1.WRPStartOffset = start;
741742
flash_option_bytes_bank1.WRPEndOffset = end;
742743
flash_option_bytes_bank1.WRPArea |= OB_WRPAREA_BANK1_AREAA;
743-
744-
BOOT_LOG_ERR("Unexpected value for write protection : set wrp1");
745744
flash_option_bytes_bank1.OptionType |= OPTIONBYTE_WRP;
746745
#endif /* TFM_ENABLE_SET_OB */
747746
}
@@ -770,11 +769,10 @@ void LL_SECU_CheckStaticProtections(void)
770769
BOOT_LOG_ERR("Unexpected value for write protection ");
771770
Error_Handler();
772771
#else
772+
BOOT_LOG_WRN("Unexpected value for write protection : set wrp2");
773773
flash_option_bytes_bank2.WRPStartOffset = start;
774774
flash_option_bytes_bank2.WRPEndOffset = end;
775775
flash_option_bytes_bank2.WRPArea |= OB_WRPAREA_BANK2_AREAA;
776-
777-
BOOT_LOG_ERR("Unexpected value for write protection : set wrp2");
778776
flash_option_bytes_bank2.OptionType |= OPTIONBYTE_WRP;
779777
#endif /* TFM_ENABLE_SET_OB */
780778
}
@@ -809,7 +807,7 @@ void LL_SECU_CheckStaticProtections(void)
809807
BOOT_LOG_ERR("Unexpected value for secure user flash protection");
810808
Error_Handler();
811809
#else
812-
BOOT_LOG_ERR("Unexpected value for secure user flash protection : set hdp1");
810+
BOOT_LOG_WRN("Unexpected value for secure user flash protection : set hdp1");
813811
flash_option_bytes_bank1.WMSecStartPage = start;
814812
flash_option_bytes_bank1.WMHDPEndPage = end;
815813
flash_option_bytes_bank1.OptionType |= OPTIONBYTE_WMSEC;

0 commit comments

Comments
 (0)