blob: 0928b83b7676db05cff5bd662829392ce00e53e6 [file] [log] [blame]
Nariman Poushin0ece80f2018-02-26 06:52:04 +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 <sgi_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}