File tree Expand file tree Collapse file tree 4 files changed +2
-114
lines changed
Expand file tree Collapse file tree 4 files changed +2
-114
lines changed Original file line number Diff line number Diff line change 2525#include <string.h>
2626
2727#include "hal.h"
28- #include "hal_otp.h"
2928#include "hal/stm32h5.h"
3029#include "hal/armv8m_tz.h"
3130
@@ -765,7 +764,7 @@ void hal_prepare_boot(void)
765764int hal_flash_otp_set_readonly (uint32_t flashAddress , uint16_t length )
766765{
767766 uint32_t start_block = (flashAddress - FLASH_OTP_BASE ) / FLASH_OTP_BLOCK_SIZE ;
768- uint32_t count = hal_otp_blocks_for_length (length , FLASH_OTP_BLOCK_SIZE ) ;
767+ uint32_t count = (length + FLASH_OTP_BLOCK_SIZE - 1U ) / FLASH_OTP_BLOCK_SIZE ;
769768 uint32_t bmap = 0 ;
770769 unsigned int i ;
771770 if (start_block + count > 32 )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ TESTS:=unit-parser unit-fdt unit-extflash unit-string unit-spi-flash unit-aes128
4949 unit-update-flash-enc unit-update-ram unit-pkcs11_store unit-psa_store unit-disk \
5050 unit-update-disk unit-multiboot unit-boot-x86-fsp unit-qspi-flash unit-tpm-rsa-exp \
5151 unit-image-nopart unit-image-sha384 unit-image-sha3-384 unit-store-sbrk \
52- unit-tpm-blob unit-policy-sign unit-rot-auth unit-sdhci-response-bits unit-hal-otp
52+ unit-tpm-blob unit-policy-sign unit-rot-auth unit-sdhci-response-bits
5353TESTS+ =unit-tpm-check-rot-auth
5454
5555all : $(TESTS )
@@ -167,9 +167,6 @@ unit-sdhci-response-bits: ../../include/target.h unit-sdhci-response-bits.c
167167 gcc -o $@ $^ $(CFLAGS ) -ffunction-sections -fdata-sections $(LDFLAGS ) \
168168 -Wl,--gc-sections
169169
170- unit-hal-otp : ../../include/target.h unit-hal-otp.c
171- gcc -o $@ $^ $(CFLAGS ) $(LDFLAGS )
172-
173170unit-aes128 : ../../include/target.h unit-extflash.c
174171 gcc -o $@ $^ $(CFLAGS ) $(LDFLAGS )
175172
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments