summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorManish Pandey <manish.pandey2@arm.com>2026-09-07 21:33:45 +0000
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2026-09-07 21:33:45 +0000
commit38269bb73d34b4a31100adf208a27e4c28e7d611 (patch)
tree0d383dafca63c22ef6cc475ce347a76c641cca50 /lib
parent58f4fe3a0b8b97fd097aff2ec884cc77ac535650 (diff)
parentd7135a7214e49c6364ba518cdac343aa595a8db8 (diff)
downloadarm-trusted-firmware-master.tar.gz
arm-trusted-firmware-master.zip
Merge changes I716e0539,I6c327584,I38509b94,I5ff3c402,I44591e4b, ... into integrationHEADmaster
* changes: feat(st): enable some warning flags feat(build): enable -Wundef for C files if W >= 1 refactor(zlib): move zlib to a lib refactor(compiler-rt): move compiler_rt to a lib feat(build): introduce BL_FLAGS fix(st-usb): staticize dwc3_dev_init fix(st): staticize verify_signature fix(stm32mp1): manage all flags for PKA algos refactor(st-clock): remove STM32MP_M33_TDCID flag fix(xlat): check definition of PLAT_XLAT_TABLES_DYNAMIC flag fix(el3-runtime): add some missing prototypes fix(scmi): remove scmi_msg_get_voltage_handler fix(io): correct SIZE_MAX management fix(libc): define __BSD_VISIBLE to 0 fix(build): move FIRME_SUPPORT flags to Makefile
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler-rt/compiler-rt.mk6
-rw-r--r--lib/xlat_tables_v2/xlat_tables_context.c4
-rw-r--r--lib/xlat_tables_v2/xlat_tables_core.c12
-rw-r--r--lib/xlat_tables_v2/xlat_tables_private.h2
-rw-r--r--lib/xlat_tables_v2/xlat_tables_utils.c2
-rw-r--r--lib/zlib/zlib.mk8
6 files changed, 18 insertions, 16 deletions
diff --git a/lib/compiler-rt/compiler-rt.mk b/lib/compiler-rt/compiler-rt.mk
index 2b16504bf..0f9abde53 100644
--- a/lib/compiler-rt/compiler-rt.mk
+++ b/lib/compiler-rt/compiler-rt.mk
@@ -28,11 +28,11 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-COMPILER_RT_SRCS := lib/compiler-rt/builtins/popcountdi2.c \
+LIBCOMPILER_RT_SRCS := lib/compiler-rt/builtins/popcountdi2.c \
lib/compiler-rt/builtins/popcountsi2.c
ifeq (${ARCH},aarch32)
-COMPILER_RT_SRCS += lib/compiler-rt/builtins/arm/aeabi_ldivmod.S \
+LIBCOMPILER_RT_SRCS += lib/compiler-rt/builtins/arm/aeabi_ldivmod.S \
lib/compiler-rt/builtins/arm/aeabi_uldivmod.S \
lib/compiler-rt/builtins/arm/aeabi_memcpy.S \
lib/compiler-rt/builtins/arm/aeabi_memset.S \
@@ -42,3 +42,5 @@ COMPILER_RT_SRCS += lib/compiler-rt/builtins/arm/aeabi_ldivmod.S \
lib/compiler-rt/builtins/lshrdi3.c \
lib/compiler-rt/builtins/udivmoddi4.c
endif
+
+$(eval $(call MAKE_LIB,compiler_rt))
diff --git a/lib/xlat_tables_v2/xlat_tables_context.c b/lib/xlat_tables_v2/xlat_tables_context.c
index a648dd97a..56166988b 100644
--- a/lib/xlat_tables_v2/xlat_tables_context.c
+++ b/lib/xlat_tables_v2/xlat_tables_context.c
@@ -60,7 +60,7 @@ void mmap_add_alloc_va(mmap_region_t *mm)
}
}
-#if PLAT_XLAT_TABLES_DYNAMIC
+#if defined(PLAT_XLAT_TABLES_DYNAMIC) && PLAT_XLAT_TABLES_DYNAMIC
int mmap_add_dynamic_region(unsigned long long base_pa, uintptr_t base_va,
size_t size, unsigned int attr)
@@ -207,7 +207,7 @@ int xlat_make_tables_readonly(void)
* region. Therefore, in this case we have to assume that the whole address
* space size might be mapped.
*/
-#if PLAT_XLAT_TABLES_DYNAMIC
+#if defined(PLAT_XLAT_TABLES_DYNAMIC) && PLAT_XLAT_TABLES_DYNAMIC
#define MAX_PHYS_ADDR tf_xlat_ctx.pa_max_address
#else
#define MAX_PHYS_ADDR tf_xlat_ctx.max_pa
diff --git a/lib/xlat_tables_v2/xlat_tables_core.c b/lib/xlat_tables_v2/xlat_tables_core.c
index 023b7c890..c36bfbdd2 100644
--- a/lib/xlat_tables_v2/xlat_tables_core.c
+++ b/lib/xlat_tables_v2/xlat_tables_core.c
@@ -30,7 +30,7 @@ static inline __attribute__((unused)) void xlat_clean_dcache_range(uintptr_t add
}
}
-#if PLAT_XLAT_TABLES_DYNAMIC
+#if defined(PLAT_XLAT_TABLES_DYNAMIC) && PLAT_XLAT_TABLES_DYNAMIC
/*
* The following functions assume that they will be called using subtables only.
@@ -290,7 +290,7 @@ static inline unsigned int xlat_tables_va_to_index(const uintptr_t table_base_v
return (unsigned int)((va - table_base_va) >> XLAT_ADDR_SHIFT(level));
}
-#if PLAT_XLAT_TABLES_DYNAMIC
+#if defined(PLAT_XLAT_TABLES_DYNAMIC) && PLAT_XLAT_TABLES_DYNAMIC
/*
* From the given arguments, it decides which action to take when unmapping the
@@ -608,7 +608,7 @@ static uintptr_t xlat_tables_map_region(xlat_ctx_t *ctx, mmap_region_t *mm,
table_idx_va = xlat_tables_find_start_va(mm, table_base_va, level);
table_idx = xlat_tables_va_to_index(table_base_va, table_idx_va, level);
-#if PLAT_XLAT_TABLES_DYNAMIC
+#if defined(PLAT_XLAT_TABLES_DYNAMIC) && PLAT_XLAT_TABLES_DYNAMIC
if (level > ctx->base_level)
xlat_table_inc_regions_count(ctx, table_base);
#endif
@@ -768,7 +768,7 @@ static int mmap_add_region_check(const xlat_ctx_t *ctx, const mmap_region_t *mm)
*/
if (fully_overlapped_va) {
-#if PLAT_XLAT_TABLES_DYNAMIC
+#if defined(PLAT_XLAT_TABLES_DYNAMIC) && PLAT_XLAT_TABLES_DYNAMIC
if (((mm->attr & MT_DYNAMIC) != 0U) ||
((mm_cursor->attr & MT_DYNAMIC) != 0U)) {
return -EPERM;
@@ -989,7 +989,7 @@ void mmap_add_ctx(xlat_ctx_t *ctx, const mmap_region_t *mm)
}
}
-#if PLAT_XLAT_TABLES_DYNAMIC
+#if defined(PLAT_XLAT_TABLES_DYNAMIC) && PLAT_XLAT_TABLES_DYNAMIC
int mmap_add_dynamic_region_ctx(xlat_ctx_t *ctx, mmap_region_t *mm)
{
@@ -1248,7 +1248,7 @@ void __init init_xlat_tables_ctx(xlat_ctx_t *ctx)
/* All tables must be zeroed before mapping any region. */
zeromem(ctx->base_table, ctx->base_table_entries * sizeof(uint64_t));
-#if PLAT_XLAT_TABLES_DYNAMIC
+#if defined(PLAT_XLAT_TABLES_DYNAMIC) && PLAT_XLAT_TABLES_DYNAMIC
zeromem(ctx->tables_mapped_regions, ctx->tables_num * sizeof(uint32_t));
#endif
for (int i = 0; i < ctx->tables_num; i++) {
diff --git a/lib/xlat_tables_v2/xlat_tables_private.h b/lib/xlat_tables_v2/xlat_tables_private.h
index 4bfe73b29..920e263b6 100644
--- a/lib/xlat_tables_v2/xlat_tables_private.h
+++ b/lib/xlat_tables_v2/xlat_tables_private.h
@@ -13,7 +13,7 @@
#include <lib/xlat_tables/xlat_tables_defs.h>
-#if PLAT_XLAT_TABLES_DYNAMIC
+#if defined(PLAT_XLAT_TABLES_DYNAMIC) && PLAT_XLAT_TABLES_DYNAMIC
/*
* Private shifts and masks to access fields of an mmap attribute
*/
diff --git a/lib/xlat_tables_v2/xlat_tables_utils.c b/lib/xlat_tables_v2/xlat_tables_utils.c
index 582019071..8153297b5 100644
--- a/lib/xlat_tables_v2/xlat_tables_utils.c
+++ b/lib/xlat_tables_v2/xlat_tables_utils.c
@@ -270,7 +270,7 @@ void xlat_tables_print(xlat_ctx_t *ctx)
VERBOSE(" Entries @initial lookup level: %u\n",
ctx->base_table_entries);
-#if PLAT_XLAT_TABLES_DYNAMIC
+#if defined(PLAT_XLAT_TABLES_DYNAMIC) && PLAT_XLAT_TABLES_DYNAMIC
used_page_tables = 0;
for (int i = 0; i < ctx->tables_num; ++i) {
if (ctx->tables_mapped_regions[i] != 0)
diff --git a/lib/zlib/zlib.mk b/lib/zlib/zlib.mk
index a8937a776..9c0458fad 100644
--- a/lib/zlib/zlib.mk
+++ b/lib/zlib/zlib.mk
@@ -7,7 +7,7 @@
ZLIB_PATH := lib/zlib
# Imported from zlib 1.2.11 (do not modify them)
-ZLIB_SOURCES := $(addprefix $(ZLIB_PATH)/, \
+LIBZLIB_SRCS := $(addprefix $(ZLIB_PATH)/, \
adler32.c \
crc32.c \
inffast.c \
@@ -16,10 +16,10 @@ ZLIB_SOURCES := $(addprefix $(ZLIB_PATH)/, \
zutil.c)
# Implemented for TF
-ZLIB_SOURCES += $(addprefix $(ZLIB_PATH)/, \
+LIBZLIB_SRCS += $(addprefix $(ZLIB_PATH)/, \
tf_gunzip.c)
INCLUDES += -Iinclude/lib/zlib
-# REVISIT: the following flags need not be given globally
-TF_CFLAGS += -DZ_SOLO -DDEF_WBITS=31
+LIBZLIB_CFLAGS := -DZ_SOLO -DDEF_WBITS=31
+$(eval $(call MAKE_LIB,zlib))