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