diff mbox series

[1/2] spl: atf: Enable option to rewrite bl2_plat_get_bl31_params()

Message ID 355bdcbad2691d0928d5797ca569cbc3783f4c38.1576776717.git.michal.simek@xilinx.com
State Accepted
Commit 5c03c990d1fb928048bf76f2fc03ee70276d4c4a
Delegated to: Michal Simek
Headers show
Series Enable private ATF handoff structure | expand

Commit Message

Michal Simek Dec. 19, 2019, 5:31 p.m. UTC
Xilinx ZynqMP platform is passing information to ATF in private format and
ATF bl31 parameters are not used. That's why enable option to rewrite this
function by platform specific implementation.

The patch also move and update kernel-doc format with missing parameters.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 common/spl/spl_atf.c | 15 +--------------
 include/spl.h        | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index 24fd35ed85f4..702367b2a23c 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -18,20 +18,7 @@ 
 static struct bl2_to_bl31_params_mem bl31_params_mem;
 static struct bl31_params *bl2_to_bl31_params;
 
-/**
- * bl2_plat_get_bl31_params() - prepare params for bl31.
- *
- * This function assigns a pointer to the memory that the platform has kept
- * aside to pass platform specific and trusted firmware related information
- * to BL31. This memory is allocated by allocating memory to
- * bl2_to_bl31_params_mem structure which is a superset of all the
- * structure whose information is passed to BL31
- * NOTE: This function should be called only once and should be done
- * before generating params to BL31
- *
- * @return bl31 params structure pointer
- */
-static struct bl31_params *bl2_plat_get_bl31_params(uintptr_t bl32_entry,
+__weak struct bl31_params *bl2_plat_get_bl31_params(uintptr_t bl32_entry,
 						    uintptr_t bl33_entry,
 						    uintptr_t fdt_addr)
 {
diff --git a/include/spl.h b/include/spl.h
index 08ffddac29f2..90162f2e36a1 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -442,6 +442,26 @@  int spl_ymodem_load_image(struct spl_image_info *spl_image,
  */
 void spl_invoke_atf(struct spl_image_info *spl_image);
 
+/**
+ * bl2_plat_get_bl31_params() - prepare params for bl31.
+ * @bl32_entry	address of BL32 executable (secure)
+ * @bl33_entry	address of BL33 executable (non secure)
+ * @fdt_addr	address of Flat Device Tree
+ *
+ * This function assigns a pointer to the memory that the platform has kept
+ * aside to pass platform specific and trusted firmware related information
+ * to BL31. This memory is allocated by allocating memory to
+ * bl2_to_bl31_params_mem structure which is a superset of all the
+ * structure whose information is passed to BL31
+ * NOTE: This function should be called only once and should be done
+ * before generating params to BL31
+ *
+ * @return bl31 params structure pointer
+ */
+struct bl31_params *bl2_plat_get_bl31_params(uintptr_t bl32_entry,
+					     uintptr_t bl33_entry,
+					     uintptr_t fdt_addr);
+
 /**
  * spl_optee_entry - entry function for optee
  *