summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Gautier <yann.gautier@st.com>2026-05-27 17:38:39 +0200
committerYann Gautier <yann.gautier@st.com>2026-06-23 18:06:40 +0200
commit43a605dc8d0f8e0524a92c9153a968f4da5e020a (patch)
tree8164cdb53b689d80775abacbcf9739174a01b3c0
parentc69734c36f503f99b3b8ba7453891f26404debad (diff)
downloadarm-trusted-firmware-43a605dc8d0f8e0524a92c9153a968f4da5e020a.tar.gz
arm-trusted-firmware-43a605dc8d0f8e0524a92c9153a968f4da5e020a.zip
fix(errata-abi): update management of REPORT_ERRATA
For BL2, or when compiling libc, REPORT_ERRATA will not be defined. To avoid warnings when enabling -Wundef flag, force REPORT_ERRATA to 0 for BL2. For libc, when compiling setjmp.S, the issue is that it cannot be defined the same way. As REPORT_ERRATA will only be enabled for BL1, BL31 or BL32, rework the cpu_ops.h file to always check one of those images is used before checking REPORT_ERRATA. Change-Id: Ie4b708cfbb7f8eee9db3254069f179b148c5db6d Signed-off-by: Yann Gautier <yann.gautier@st.com>
-rw-r--r--include/lib/cpus/cpu_ops.h14
-rw-r--r--make_helpers/cflags.mk1
2 files changed, 8 insertions, 7 deletions
diff --git a/include/lib/cpus/cpu_ops.h b/include/lib/cpus/cpu_ops.h
index 2e7457e7f..cf910ec29 100644
--- a/include/lib/cpus/cpu_ops.h
+++ b/include/lib/cpus/cpu_ops.h
@@ -49,22 +49,22 @@
#define CPU_ERRATA_LIST_START_SIZE CPU_WORD_SIZE
#define CPU_ERRATA_LIST_END_SIZE CPU_WORD_SIZE
+
/* Fields required to print errata status */
-#if REPORT_ERRATA
+#if (defined(IMAGE_BL31) || defined(IMAGE_BL32)) && REPORT_ERRATA
#define CPU_CPU_STR_SIZE CPU_WORD_SIZE
-/* BL1 doesn't require mutual exclusion and printed flag. */
-#if defined(IMAGE_BL31) || defined(IMAGE_BL32)
#define CPU_ERRATA_LOCK_SIZE CPU_WORD_SIZE
#define CPU_ERRATA_PRINTED_SIZE CPU_WORD_SIZE
-#else
+#elif defined(IMAGE_BL1) && REPORT_ERRATA
+/* BL1 doesn't require mutual exclusion and printed flag. */
+#define CPU_CPU_STR_SIZE CPU_WORD_SIZE
#define CPU_ERRATA_LOCK_SIZE 0
#define CPU_ERRATA_PRINTED_SIZE 0
-#endif /* defined(IMAGE_BL31) || defined(IMAGE_BL32) */
-#else
+#else /* (defined(IMAGE_BL31) || defined(IMAGE_BL32)) && REPORT_ERRATA */
#define CPU_CPU_STR_SIZE 0
#define CPU_ERRATA_LOCK_SIZE 0
#define CPU_ERRATA_PRINTED_SIZE 0
-#endif /* REPORT_ERRATA */
+#endif /* (defined(IMAGE_BL31) || defined(IMAGE_BL32)) && REPORT_ERRATA */
#if defined(IMAGE_BL31) && CRASH_REPORTING
#define CPU_REG_DUMP_SIZE CPU_WORD_SIZE
diff --git a/make_helpers/cflags.mk b/make_helpers/cflags.mk
index 680567396..58ecf38d6 100644
--- a/make_helpers/cflags.mk
+++ b/make_helpers/cflags.mk
@@ -242,6 +242,7 @@ ifeq ($(ENABLE_PIE),1)
endif #(ENABLE_PIE)
BL1_CPPFLAGS += -DREPORT_ERRATA=${DEBUG}
+BL2_CPPFLAGS += -DREPORT_ERRATA=0
BL31_CPPFLAGS += -DREPORT_ERRATA=${DEBUG}
BL32_CPPFLAGS += -DREPORT_ERRATA=${DEBUG}