diff --git a/lib/sw_apps/zynqmp_fsbl/src/lscript.ld b/lib/sw_apps/zynqmp_fsbl/src/lscript.ld index 31232449..03bcc4f2 100644 --- a/lib/sw_apps/zynqmp_fsbl/src/lscript.ld +++ b/lib/sw_apps/zynqmp_fsbl/src/lscript.ld @@ -49,8 +49,9 @@ _UNDEF_STACK_SIZE = DEFINED(_UNDEF_STACK_SIZE) ? _UNDEF_STACK_SIZE : 1024; MEMORY { - psu_ram_0_S_AXI_BASEADDR : ORIGIN = 0xfffc0000, LENGTH = 0x0002FF00 - psu_ram_1_S_AXI_BASEADDR : ORIGIN = 0xffff0040, LENGTH = 0x0000FE00 + psu_ram_0_S_AXI_BASEADDR : ORIGIN = 0xFFFC0000, LENGTH = 0x0002FF00 + psu_ram_1_S_AXI_BASEADDR : ORIGIN = 0xFFFF0040, LENGTH = 0x0000FDC0 + psu_ram_2_S_AXI_BASEADDR : ORIGIN = 0xFFFFFE00, LENGTH = 0x00000200 } /* Specify the default entry point to the program */ @@ -307,5 +308,10 @@ _SDA2_BASE_ = __sdata2_start + ((__sbss2_end - __sdata2_start) / 2 ); __undef_stack = .; } > psu_ram_1_S_AXI_BASEADDR +.handoff_params (NOLOAD) : { + . = ALIGN(512); + *(.handoff_params) +} > psu_ram_2_S_AXI_BASEADDR + _end = .; } diff --git a/lib/sw_apps/zynqmp_fsbl/src/lscript_a53.ld b/lib/sw_apps/zynqmp_fsbl/src/lscript_a53.ld index 054b6b42..9b66d67e 100644 --- a/lib/sw_apps/zynqmp_fsbl/src/lscript_a53.ld +++ b/lib/sw_apps/zynqmp_fsbl/src/lscript_a53.ld @@ -48,7 +48,8 @@ _EL3_STACK_SIZE = DEFINED(_FIQ_STACK_SIZE) ? _FIQ_STACK_SIZE : 1024; MEMORY { psu_ocm_ram_0_S_AXI_BASEADDR : ORIGIN = 0xFFFC0000, LENGTH = 0x0002FF00 - psu_ocm_ram_1_S_AXI_BASEADDR : ORIGIN = 0xFFFF0040, LENGTH = 0x0000FE00 + psu_ocm_ram_1_S_AXI_BASEADDR : ORIGIN = 0xFFFF0040, LENGTH = 0x0000FDC0 + psu_ocm_ram_2_S_AXI_BASEADDR : ORIGIN = 0xFFFFFE00, LENGTH = 0x00000200 } /* Specify the default entry point to the program */ @@ -329,5 +330,10 @@ _SDA2_BASE_ = __sdata2_start + ((__sbss2_end - __sdata2_start) / 2 ); __el0_stack = .; } > psu_ocm_ram_1_S_AXI_BASEADDR +.handoff_params (NOLOAD) : { + . = ALIGN(512); + *(.handoff_params) +} > psu_ocm_ram_2_S_AXI_BASEADDR + _end = .; } diff --git a/lib/sw_apps/zynqmp_fsbl/src/xfsbl_image_header.c b/lib/sw_apps/zynqmp_fsbl/src/xfsbl_image_header.c index b5d1a7a6..38328930 100644 --- a/lib/sw_apps/zynqmp_fsbl/src/xfsbl_image_header.c +++ b/lib/sw_apps/zynqmp_fsbl/src/xfsbl_image_header.c @@ -120,7 +120,9 @@ static void XFsbl_SetATFHandoffParameters( XFsblPs_PartitionHeader *PartitionHeader, u32 EntryCount); /************************** Variable Definitions *****************************/ -XFsblPs_ATFHandoffParams ATFHandoffParams; +/* Store this data structure at a fixed location for ATF to pick */ +XFsblPs_ATFHandoffParams ATFHandoffParams + __attribute__((section (".handoff_params"))); /****************************************************************************/ /** @@ -420,11 +422,9 @@ u32 XFsbl_ReadImageHeader(XFsblPs_ImageHeader * ImageHeader, /** * After setting handoff parameters of all partitions to ATF, - * Store lower address of the structure at Persistent register 4 - * and higher address at Persistent register 5 + * Store address of the structure at Persistent register 4 */ - XFsbl_Out32(LPD_SLCR_PERSISTENT4,(u32)(((PTRSIZE)(&ATFHandoffParams)) & 0xFFFFFFFF)); - XFsbl_Out32(LPD_SLCR_PERSISTENT5, (u32)(((PTRSIZE)(&ATFHandoffParams)) >> 32)); + XFsbl_Out32(LPD_SLCR_PERSISTENT4, (u32)((PTRSIZE) &ATFHandoffParams)); END: return Status;