1*7baff11fSYatharth Kochar /* 2*7baff11fSYatharth Kochar * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. 3*7baff11fSYatharth Kochar * 4*7baff11fSYatharth Kochar * Redistribution and use in source and binary forms, with or without 5*7baff11fSYatharth Kochar * modification, are permitted provided that the following conditions are met: 6*7baff11fSYatharth Kochar * 7*7baff11fSYatharth Kochar * Redistributions of source code must retain the above copyright notice, this 8*7baff11fSYatharth Kochar * list of conditions and the following disclaimer. 9*7baff11fSYatharth Kochar * 10*7baff11fSYatharth Kochar * Redistributions in binary form must reproduce the above copyright notice, 11*7baff11fSYatharth Kochar * this list of conditions and the following disclaimer in the documentation 12*7baff11fSYatharth Kochar * and/or other materials provided with the distribution. 13*7baff11fSYatharth Kochar * 14*7baff11fSYatharth Kochar * Neither the name of ARM nor the names of its contributors may be used 15*7baff11fSYatharth Kochar * to endorse or promote products derived from this software without specific 16*7baff11fSYatharth Kochar * prior written permission. 17*7baff11fSYatharth Kochar * 18*7baff11fSYatharth Kochar * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19*7baff11fSYatharth Kochar * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20*7baff11fSYatharth Kochar * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21*7baff11fSYatharth Kochar * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22*7baff11fSYatharth Kochar * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23*7baff11fSYatharth Kochar * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24*7baff11fSYatharth Kochar * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25*7baff11fSYatharth Kochar * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26*7baff11fSYatharth Kochar * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27*7baff11fSYatharth Kochar * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28*7baff11fSYatharth Kochar * POSSIBILITY OF SUCH DAMAGE. 29*7baff11fSYatharth Kochar */ 30*7baff11fSYatharth Kochar #include <bl_common.h> 31*7baff11fSYatharth Kochar #include <debug.h> 32*7baff11fSYatharth Kochar #include <platform_def.h> 33*7baff11fSYatharth Kochar 34*7baff11fSYatharth Kochar /* 35*7baff11fSYatharth Kochar * The following platform functions are weakly defined. They 36*7baff11fSYatharth Kochar * are default implementations that allow BL1 compile in 37*7baff11fSYatharth Kochar * absence of real definitions. The Platforms may override 38*7baff11fSYatharth Kochar * with more complex definitions. 39*7baff11fSYatharth Kochar */ 40*7baff11fSYatharth Kochar #pragma weak bl1_plat_get_next_image_id 41*7baff11fSYatharth Kochar #pragma weak bl1_plat_set_ep_info 42*7baff11fSYatharth Kochar #pragma weak bl1_plat_get_image_desc 43*7baff11fSYatharth Kochar 44*7baff11fSYatharth Kochar 45*7baff11fSYatharth Kochar unsigned int bl1_plat_get_next_image_id(void) 46*7baff11fSYatharth Kochar { 47*7baff11fSYatharth Kochar /* BL2 load will be done by default. */ 48*7baff11fSYatharth Kochar return BL2_IMAGE_ID; 49*7baff11fSYatharth Kochar } 50*7baff11fSYatharth Kochar 51*7baff11fSYatharth Kochar void bl1_plat_set_ep_info(unsigned int image_id, 52*7baff11fSYatharth Kochar entry_point_info_t *ep_info) 53*7baff11fSYatharth Kochar { 54*7baff11fSYatharth Kochar 55*7baff11fSYatharth Kochar } 56*7baff11fSYatharth Kochar 57*7baff11fSYatharth Kochar /* 58*7baff11fSYatharth Kochar * Following is the default definition that always 59*7baff11fSYatharth Kochar * returns BL2 image details. 60*7baff11fSYatharth Kochar */ 61*7baff11fSYatharth Kochar image_desc_t *bl1_plat_get_image_desc(unsigned int image_id) 62*7baff11fSYatharth Kochar { 63*7baff11fSYatharth Kochar static image_desc_t bl2_img_desc = BL2_IMAGE_DESC; 64*7baff11fSYatharth Kochar return &bl2_img_desc; 65*7baff11fSYatharth Kochar } 66