2 * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
7 #include <common/bl_common.h>
8 #include <common/debug.h>
9 #include <plat/common/platform.h>
13 #include "../drivers/scp/css_scp.h"
15 /* Weak definition may be overridden in specific CSS based platform */
16 #pragma weak bl2u_plat_handle_scp_bl2u
18 /* Data structure which holds the SCP_BL2U image info for BL2U */
19 static image_info_t scp_bl2u_image_info
;
21 /*******************************************************************************
22 * BL1 can pass platform dependent information to BL2U in x1.
23 * In case of ARM CSS platforms x1 contains SCP_BL2U image info.
24 * In case of ARM FVP platforms x1 is not used.
25 * In both cases, x0 contains the extents of the memory available to BL2U
26 ******************************************************************************/
27 void bl2u_early_platform_setup(meminfo_t
*mem_layout
, void *plat_info
)
32 arm_bl2u_early_platform_setup(mem_layout
, plat_info
);
34 scp_bl2u_image_info
= *(image_info_t
*)plat_info
;
37 /*******************************************************************************
38 * Transfer SCP_BL2U from Trusted RAM using the SCP Download protocol.
39 ******************************************************************************/
40 int bl2u_plat_handle_scp_bl2u(void)
44 INFO("BL2U: Initiating SCP_BL2U transfer to SCP\n");
46 ret
= css_scp_boot_image_xfer((void *)scp_bl2u_image_info
.image_base
,
47 scp_bl2u_image_info
.image_size
);
50 ret
= css_scp_boot_ready();
53 INFO("BL2U: SCP_BL2U transferred to SCP\n");
55 ERROR("BL2U: SCP_BL2U transfer failure\n");