1*1841c533SNishanth Menon /* 2*1841c533SNishanth Menon * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. 3*1841c533SNishanth Menon * 4*1841c533SNishanth Menon * SPDX-License-Identifier: BSD-3-Clause 5*1841c533SNishanth Menon */ 6*1841c533SNishanth Menon 7*1841c533SNishanth Menon #include <arch.h> 8*1841c533SNishanth Menon #include <arch_helpers.h> 9*1841c533SNishanth Menon #include <assert.h> 10*1841c533SNishanth Menon #include <bl_common.h> 11*1841c533SNishanth Menon #include <debug.h> 12*1841c533SNishanth Menon #include <platform_def.h> 13*1841c533SNishanth Menon #include <string.h> 14*1841c533SNishanth Menon 15*1841c533SNishanth Menon /******************************************************************************* 16*1841c533SNishanth Menon * Perform any BL3-1 early platform setup, such as console init and deciding on 17*1841c533SNishanth Menon * memory layout. 18*1841c533SNishanth Menon ******************************************************************************/ 19*1841c533SNishanth Menon void bl31_early_platform_setup(bl31_params_t *from_bl2, 20*1841c533SNishanth Menon void *plat_params_from_bl2) 21*1841c533SNishanth Menon { 22*1841c533SNishanth Menon /* There are no parameters from BL2 if BL31 is a reset vector */ 23*1841c533SNishanth Menon assert(from_bl2 == NULL); 24*1841c533SNishanth Menon assert(plat_params_from_bl2 == NULL); 25*1841c533SNishanth Menon } 26*1841c533SNishanth Menon 27*1841c533SNishanth Menon void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, 28*1841c533SNishanth Menon u_register_t arg2, u_register_t arg3) 29*1841c533SNishanth Menon { 30*1841c533SNishanth Menon bl31_early_platform_setup((void *)arg0, (void *)arg1); 31*1841c533SNishanth Menon } 32*1841c533SNishanth Menon 33*1841c533SNishanth Menon void bl31_plat_arch_setup(void) 34*1841c533SNishanth Menon { 35*1841c533SNishanth Menon /* TODO: Initialize the MMU tables */ 36*1841c533SNishanth Menon } 37*1841c533SNishanth Menon 38*1841c533SNishanth Menon void bl31_platform_setup(void) 39*1841c533SNishanth Menon { 40*1841c533SNishanth Menon /* TODO: Initialize the GIC CPU and distributor interfaces */ 41*1841c533SNishanth Menon } 42*1841c533SNishanth Menon 43*1841c533SNishanth Menon void platform_mem_init(void) 44*1841c533SNishanth Menon { 45*1841c533SNishanth Menon /* Do nothing for now... */ 46*1841c533SNishanth Menon } 47*1841c533SNishanth Menon 48*1841c533SNishanth Menon /* 49*1841c533SNishanth Menon * Empty function to prevent the console from being uninitialized after BL33 is 50*1841c533SNishanth Menon * started and allow us to see messages from BL31. 51*1841c533SNishanth Menon */ 52*1841c533SNishanth Menon void bl31_plat_runtime_setup(void) 53*1841c533SNishanth Menon { 54*1841c533SNishanth Menon } 55*1841c533SNishanth Menon 56*1841c533SNishanth Menon /******************************************************************************* 57*1841c533SNishanth Menon * Return a pointer to the 'entry_point_info' structure of the next image 58*1841c533SNishanth Menon * for the security state specified. BL3-3 corresponds to the non-secure 59*1841c533SNishanth Menon * image type while BL3-2 corresponds to the secure image type. A NULL 60*1841c533SNishanth Menon * pointer is returned if the image does not exist. 61*1841c533SNishanth Menon ******************************************************************************/ 62*1841c533SNishanth Menon entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type) 63*1841c533SNishanth Menon { 64*1841c533SNishanth Menon return NULL; 65*1841c533SNishanth Menon } 66