blob: a55176a7418e4b29dbb5921e4926f65eb806976f [file] [log] [blame]
Nariman Poushinc703f902018-03-07 10:29:57 +00001/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <bl_common.h>
8#include <debug.h>
9#include <plat_arm.h>
10#include <sgm_plat_config.h>
11
12void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
13 u_register_t arg2, u_register_t arg3)
14{
15 uint32_t plat_version;
16 bl_params_node_t *bl_params;
17
18 bl_params = ((bl_params_t *)arg0)->head;
19
20 /* Initialize the platform configuration structure */
21 plat_config_init();
22
23 while (bl_params) {
24 if (bl_params->image_id == BL33_IMAGE_ID) {
25 plat_version = mmio_read_32(SSC_VERSION);
26 bl_params->ep_info->args.arg2 = plat_version;
27 break;
28 }
29
30 bl_params = bl_params->next_params_info;
31 }
32
33 arm_bl31_early_platform_setup((void *)arg0, arg1, arg2, (void *)arg3);
34}