xref: /rk3399_ARM-atf/plat/arm/board/fvp/fvp_lfa.c (revision f647f56123002e14eaf3d2c1b127431ee376a141)
1 /*
2  * Copyright (c) 2025, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <errno.h>
8 #include <plat/common/platform.h>
9 #include <tools_share/firmware_image_package.h>
10 
11 #include <fvp_lfa_components.h>
12 
13 /* Keep this array consistent with enum fvp_lfa_component_id_t */
14 static plat_lfa_component_info_t fvp_lfa_components[LFA_MAX_DEFINED_COMPONENTS] = {
15 	[LFA_BL31_COMPONENT] = {LFA_BL31_COMPONENT, UUID_EL3_RUNTIME_FIRMWARE_BL31},
16 #if BL32_BASE
17 	[LFA_BL32_COMPONENT] = {LFA_BL32_COMPONENT, UUID_SECURE_PAYLOAD_BL32},
18 #endif /* BL32_BASE */
19 	[LFA_BL33_COMPONENT] = {LFA_BL33_COMPONENT, UUID_NON_TRUSTED_FIRMWARE_BL33},
20 #if ENABLE_RME
21 	[LFA_RMM_COMPONENT]  = {LFA_RMM_COMPONENT, UUID_REALM_MONITOR_MGMT_FIRMWARE},
22 #endif /* ENABLE_RME */
23 };
24 
25 uint32_t plat_lfa_get_components(plat_lfa_component_info_t **components)
26 {
27 	if (components == NULL) {
28 		return -EINVAL;
29 	}
30 
31 	*components = fvp_lfa_components;
32 	return LFA_MAX_DEFINED_COMPONENTS;
33 }
34