Attest: Remove LEGACY_TFM_TLV_HEADER support

The boot record is shared between bootloader and
runtime firmware in the structure of TLV data.
The header of the TLV fields are filled differently
by original MCUboot and its TF-M fork. The config
option LEGACY_TFM_TLV_HEADER was meant to make the
distinction. Since the forked version of MCUboot is
going to be removed therefore this differentiation
could also be deleted.

Signed-off-by: Balint Matyi <Balint.Matyi@arm.com>
Change-Id: Ie3904996eb0f1006eaa67c324dfbbb21a9e146ab
diff --git a/secure_fw/spm/CMakeLists.txt b/secure_fw/spm/CMakeLists.txt
index 2caf429..0ed262f 100644
--- a/secure_fw/spm/CMakeLists.txt
+++ b/secure_fw/spm/CMakeLists.txt
@@ -77,7 +77,6 @@
     PRIVATE
         $<$<CONFIG:Debug>:TFM_CORE_DEBUG>
         $<$<AND:$<BOOL:${BL2}>,$<BOOL:${MCUBOOT_MEASURED_BOOT}>>:BOOT_DATA_AVAILABLE>
-        $<$<BOOL:${TFM_INTERNAL_MCUBOOT}>:LEGACY_TFM_TLV_HEADER>
 )
 
 # With constant optimizations on tfm_nspc_func emits a symbol that the linker
diff --git a/secure_fw/spm/common/tfm_boot_data.c b/secure_fw/spm/common/tfm_boot_data.c
index 901d43e..fe77002 100644
--- a/secure_fw/spm/common/tfm_boot_data.c
+++ b/secure_fw/spm/common/tfm_boot_data.c
@@ -220,11 +220,9 @@
         /* Create local copy to avoid unaligned access */
         (void)spm_memcpy(&tlv_entry, (const void *)offset,
                          SHARED_DATA_ENTRY_HEADER_SIZE);
-#ifdef LEGACY_TFM_TLV_HEADER
-        next_tlv_offset = tlv_entry.tlv_len;
-#else
+
         next_tlv_offset = SHARED_DATA_ENTRY_HEADER_SIZE + tlv_entry.tlv_len;
-#endif
+
         if (GET_MAJOR(tlv_entry.tlv_type) == tlv_major) {
             /* Check buffer overflow */
             if (((ptr - buf_start) + next_tlv_offset) > buf_size) {