fvp_bl1_setup.c 1.23 KB
Newer Older
1
/*
Roberto Vargas's avatar
Roberto Vargas committed
2
 * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
3
 *
dp-arm's avatar
dp-arm committed
4
 * SPDX-License-Identifier: BSD-3-Clause
5
6
 */

7
#include <plat_arm.h>
Roberto Vargas's avatar
Roberto Vargas committed
8
#include <platform.h>
9
#include <tbbr_img_def.h>
10
#include "fvp_private.h"
11
12
13
14
15
16
17


/*******************************************************************************
 * Perform any BL1 specific platform actions.
 ******************************************************************************/
void bl1_early_platform_setup(void)
{
18
	arm_bl1_early_platform_setup();
19

20
	/* Initialize the platform config for future decision making */
21
	fvp_config_setup();
22

23
	/*
24
	 * Initialize Interconnect for this cluster during cold boot.
25
26
	 * No need for locks as no other CPU is active.
	 */
27
	fvp_interconnect_init();
28
	/*
29
	 * Enable coherency in Interconnect for the primary CPU's cluster.
30
	 */
31
	fvp_interconnect_enable();
32
}
33
34
35
36
37
38
39
40
41
42
43
44
45

/*******************************************************************************
 * The following function checks if Firmware update is needed,
 * by checking if TOC in FIP image is valid or not.
 ******************************************************************************/
unsigned int bl1_plat_get_next_image_id(void)
{
	if (!arm_io_is_toc_valid())
		return NS_BL1U_IMAGE_ID;

	return BL2_IMAGE_ID;
}