arm-trusted-firmware/common
Andre Przywara 42488064e1 fix(fdt): reserved memory: detect existing region
When fdt_add_reserved_memory() is called to add a memory region, we
unconditionally add a node for that region. However there might be an
existing region node in the DT already, or there might be an overlapping
region. The Linux kernel will complain in those cases.

Cover the simple case of the region already existing in the DT, as this
is what we actually see on the Allwinner H616: The mainline DT contains
a node reserving the memory for TF-A, in case the DT changed by TF-A
itself is not given to the kernel. Our code always adds a region, making
the kernel complain - albeit without further consequences.

Covering all cases of overlapping regions would blow up the generic DT
code too much, so just add a simple check for an existing region
completely containing the to-be-added region, simply bailing out in this
case.

This prevents the kernel warning for the Allwinner H616.

This code requires a function from fdt_wrappers.c, so we have to include
that file for platforms that use the fdt_add_reserved_memory() function
(rpi4 and versal2).

Change-Id: I98404889163316addbb42130d7177f1a21c8be06
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2024-08-30 11:14:55 +02:00
..
aarch32 refactor(aarch64): rename do_panic and el3_panic 2023-02-21 17:26:01 +00:00
aarch64 refactor(bl31): use elx_panic for sysreg_handler64 2023-02-22 17:24:17 +00:00
backtrace fix(debug): decouple "get_el_str()" from backtrace 2022-11-08 10:10:19 +00:00
bl_common.c feat(bl): add plat handler for image loading 2024-06-13 11:30:29 +02:00
desc_image_load.c SPMD: extract SPMC DTB header size from SPMD 2020-05-13 08:08:39 +02:00
fdt_fixup.c fix(fdt): reserved memory: detect existing region 2024-08-30 11:14:55 +02:00
fdt_wrappers.c fix(fdt-wrappers): use correct prototypes 2023-01-10 18:59:58 +01:00
fdt_wrappers.mk build(fdt-wrappers): introduce FDT wrappers makefile 2021-10-26 12:14:28 +01:00
feat_detect.c feat(fgt2): add support for FEAT_FGT2 2024-07-18 13:49:43 -05:00
image_decompress.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
runtime_svc.c Remove support for the SMC Calling Convention 2.0 2019-01-30 16:01:49 +00:00
tf_crc32.c refactor(hw_crc32): renamed hw_crc32 to tf_crc32 2021-08-02 17:15:41 +01:00
tf_log.c feat(common/debug): add new macro ERROR_NL() to print just a newline 2021-07-21 00:01:06 +02:00
uuid.c fix(uuid): add missing #include directives 2023-04-17 16:13:16 +01:00