1*566034fcSSoby Mathew /* 2*566034fcSSoby Mathew * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. 3*566034fcSSoby Mathew * 4*566034fcSSoby Mathew * SPDX-License-Identifier: BSD-3-Clause 5*566034fcSSoby Mathew */ 6*566034fcSSoby Mathew 7*566034fcSSoby Mathew #include <arch_helpers.h> 8*566034fcSSoby Mathew #include <assert.h> 9*566034fcSSoby Mathew #include <bl_common.h> 10*566034fcSSoby Mathew #include <debug.h> 11*566034fcSSoby Mathew #include <errno.h> 12*566034fcSSoby Mathew 13*566034fcSSoby Mathew /* 14*566034fcSSoby Mathew * The following platform functions are weakly defined. The Platforms 15*566034fcSSoby Mathew * may redefine with strong definition. 16*566034fcSSoby Mathew */ 17*566034fcSSoby Mathew #pragma weak bl2_el3_plat_prepare_exit 18*566034fcSSoby Mathew #pragma weak plat_error_handler 19*566034fcSSoby Mathew #pragma weak bl2_plat_preload_setup 20*566034fcSSoby Mathew #pragma weak bl2_plat_handle_pre_image_load 21*566034fcSSoby Mathew #pragma weak bl2_plat_handle_post_image_load 22*566034fcSSoby Mathew #pragma weak plat_try_next_boot_source 23*566034fcSSoby Mathew 24*566034fcSSoby Mathew void bl2_el3_plat_prepare_exit(void) 25*566034fcSSoby Mathew { 26*566034fcSSoby Mathew } 27*566034fcSSoby Mathew 28*566034fcSSoby Mathew void __dead2 plat_error_handler(int err) 29*566034fcSSoby Mathew { 30*566034fcSSoby Mathew while (1) 31*566034fcSSoby Mathew wfi(); 32*566034fcSSoby Mathew } 33*566034fcSSoby Mathew 34*566034fcSSoby Mathew void bl2_plat_preload_setup(void) 35*566034fcSSoby Mathew { 36*566034fcSSoby Mathew } 37*566034fcSSoby Mathew 38*566034fcSSoby Mathew int bl2_plat_handle_pre_image_load(unsigned int image_id) 39*566034fcSSoby Mathew { 40*566034fcSSoby Mathew return 0; 41*566034fcSSoby Mathew } 42*566034fcSSoby Mathew 43*566034fcSSoby Mathew int bl2_plat_handle_post_image_load(unsigned int image_id) 44*566034fcSSoby Mathew { 45*566034fcSSoby Mathew return 0; 46*566034fcSSoby Mathew } 47*566034fcSSoby Mathew 48*566034fcSSoby Mathew int plat_try_next_boot_source(void) 49*566034fcSSoby Mathew { 50*566034fcSSoby Mathew return 0; 51*566034fcSSoby Mathew } 52