sw_apps:zynqmp_fsbl: Fix to avoid conflict with ATF Handoff parameters location
This fix stores FSBL's ATF Handoff parameters at fixed address towards end of OCM so that ATF can avoid conflict with its sections. Signed-off-by: Sarat Chand Savitala <saratcha@xilinx.com>
This commit is contained in:
parent
04f120953b
commit
9083a0a512
3 changed files with 20 additions and 8 deletions
|
@ -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 = .;
|
||||
}
|
||||
|
|
|
@ -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 = .;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue