feat(common): add support for kernel DT handoff convention
TF-A currently supports multiple DT handoff conventions:
1. Firmware Handoff (FH): DT passed in x0, with x1–x3 carrying
additional data.
2. Kernel-compatible handoff (ARM_LINUX_KERNEL_AS_BL33): DT passed in
x0, x1–x3 zeroed.
3. Legacy TF-A convention: DT passed in x1, with x0 used for MPIDR or
NT_FW_CONFIG.
After discussions with folks in EDK2 and U-Boot, it's clear that there
is no strict requirement for placing the DT in x1. Both projects support
x0 for Arm platforms. To standardize behavior and support firmware
handoff migration, this patch introduces USE_KERNEL_DT_CONVENTION as a
configurable build flag. When enabled, the DT will be passed in x0 for
BL33.
This aligns TF-A’s behavior with Linux boot expectations and simplifies
integration across bootloaders.
Change-Id: I6bd7154fe07cb2e16e25c058f7cf862f9ae007e7
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h
index d7c5ed9..8dc0123 100644
--- a/include/plat/common/platform.h
+++ b/include/plat/common/platform.h
@@ -505,6 +505,12 @@
*/
int32_t plat_is_smccc_feature_available(u_register_t fid);
+/*
+ * Optional function to retrieve the base address of hardware DT from the
+ * platform.
+ */
+uintptr_t plat_get_hw_dt_base(void);
+
/*******************************************************************************
* FWU platform specific functions
******************************************************************************/