1877cf3ffSSoby Mathew/* 2*801cf93cSAntonio Nino Diaz * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. 3877cf3ffSSoby Mathew * 4877cf3ffSSoby Mathew * Redistribution and use in source and binary forms, with or without 5877cf3ffSSoby Mathew * modification, are permitted provided that the following conditions are met: 6877cf3ffSSoby Mathew * 7877cf3ffSSoby Mathew * Redistributions of source code must retain the above copyright notice, this 8877cf3ffSSoby Mathew * list of conditions and the following disclaimer. 9877cf3ffSSoby Mathew * 10877cf3ffSSoby Mathew * Redistributions in binary form must reproduce the above copyright notice, 11877cf3ffSSoby Mathew * this list of conditions and the following disclaimer in the documentation 12877cf3ffSSoby Mathew * and/or other materials provided with the distribution. 13877cf3ffSSoby Mathew * 14877cf3ffSSoby Mathew * Neither the name of ARM nor the names of its contributors may be used 15877cf3ffSSoby Mathew * to endorse or promote products derived from this software without specific 16877cf3ffSSoby Mathew * prior written permission. 17877cf3ffSSoby Mathew * 18877cf3ffSSoby Mathew * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19877cf3ffSSoby Mathew * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20877cf3ffSSoby Mathew * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21877cf3ffSSoby Mathew * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22877cf3ffSSoby Mathew * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23877cf3ffSSoby Mathew * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24877cf3ffSSoby Mathew * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25877cf3ffSSoby Mathew * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26877cf3ffSSoby Mathew * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27877cf3ffSSoby Mathew * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28877cf3ffSSoby Mathew * POSSIBILITY OF SUCH DAMAGE. 29877cf3ffSSoby Mathew */ 30877cf3ffSSoby Mathew 31877cf3ffSSoby Mathew#include <arch.h> 32877cf3ffSSoby Mathew#include <asm_macros.S> 33877cf3ffSSoby Mathew 34*801cf93cSAntonio Nino Diaz .weak plat_crash_console_init 35*801cf93cSAntonio Nino Diaz .weak plat_crash_console_putc 36*801cf93cSAntonio Nino Diaz .weak plat_crash_console_flush 37877cf3ffSSoby Mathew .weak plat_reset_handler 381a0a3f06SYatharth Kochar .weak plat_disable_acp 39877cf3ffSSoby Mathew .weak platform_mem_init 40877cf3ffSSoby Mathew .weak plat_panic_handler 41877cf3ffSSoby Mathew 42877cf3ffSSoby Mathew /* ----------------------------------------------------- 43877cf3ffSSoby Mathew * Placeholder function which should be redefined by 44877cf3ffSSoby Mathew * each platform. 45877cf3ffSSoby Mathew * ----------------------------------------------------- 46877cf3ffSSoby Mathew */ 47*801cf93cSAntonio Nino Diazfunc plat_crash_console_init 48*801cf93cSAntonio Nino Diaz mov r0, #0 49*801cf93cSAntonio Nino Diaz bx lr 50*801cf93cSAntonio Nino Diazendfunc plat_crash_console_init 51*801cf93cSAntonio Nino Diaz 52*801cf93cSAntonio Nino Diaz /* ----------------------------------------------------- 53*801cf93cSAntonio Nino Diaz * Placeholder function which should be redefined by 54*801cf93cSAntonio Nino Diaz * each platform. 55*801cf93cSAntonio Nino Diaz * ----------------------------------------------------- 56*801cf93cSAntonio Nino Diaz */ 57*801cf93cSAntonio Nino Diazfunc plat_crash_console_putc 58*801cf93cSAntonio Nino Diaz bx lr 59*801cf93cSAntonio Nino Diazendfunc plat_crash_console_putc 60*801cf93cSAntonio Nino Diaz 61*801cf93cSAntonio Nino Diaz /* ----------------------------------------------------- 62*801cf93cSAntonio Nino Diaz * Placeholder function which should be redefined by 63*801cf93cSAntonio Nino Diaz * each platform. 64*801cf93cSAntonio Nino Diaz * ----------------------------------------------------- 65*801cf93cSAntonio Nino Diaz */ 66*801cf93cSAntonio Nino Diazfunc plat_crash_console_flush 67*801cf93cSAntonio Nino Diaz mov r0, #0 68*801cf93cSAntonio Nino Diaz bx lr 69*801cf93cSAntonio Nino Diazendfunc plat_crash_console_flush 70*801cf93cSAntonio Nino Diaz 71*801cf93cSAntonio Nino Diaz /* ----------------------------------------------------- 72*801cf93cSAntonio Nino Diaz * Placeholder function which should be redefined by 73*801cf93cSAntonio Nino Diaz * each platform. 74*801cf93cSAntonio Nino Diaz * ----------------------------------------------------- 75*801cf93cSAntonio Nino Diaz */ 76877cf3ffSSoby Mathewfunc plat_reset_handler 77877cf3ffSSoby Mathew bx lr 78877cf3ffSSoby Mathewendfunc plat_reset_handler 79877cf3ffSSoby Mathew 801a0a3f06SYatharth Kochar /* ----------------------------------------------------- 811a0a3f06SYatharth Kochar * Placeholder function which should be redefined by 821a0a3f06SYatharth Kochar * each platform. 831a0a3f06SYatharth Kochar * ----------------------------------------------------- 841a0a3f06SYatharth Kochar */ 851a0a3f06SYatharth Kocharfunc plat_disable_acp 861a0a3f06SYatharth Kochar bx lr 871a0a3f06SYatharth Kocharendfunc plat_disable_acp 881a0a3f06SYatharth Kochar 89877cf3ffSSoby Mathew /* --------------------------------------------------------------------- 90877cf3ffSSoby Mathew * Placeholder function which should be redefined by 91877cf3ffSSoby Mathew * each platform. 92877cf3ffSSoby Mathew * --------------------------------------------------------------------- 93877cf3ffSSoby Mathew */ 94877cf3ffSSoby Mathewfunc platform_mem_init 95877cf3ffSSoby Mathew bx lr 96877cf3ffSSoby Mathewendfunc platform_mem_init 97877cf3ffSSoby Mathew 98877cf3ffSSoby Mathew /* ----------------------------------------------------- 99877cf3ffSSoby Mathew * void plat_panic_handler(void) __dead2; 100877cf3ffSSoby Mathew * Endless loop by default. 101877cf3ffSSoby Mathew * ----------------------------------------------------- 102877cf3ffSSoby Mathew */ 103877cf3ffSSoby Mathewfunc plat_panic_handler 104877cf3ffSSoby Mathew b plat_panic_handler 105877cf3ffSSoby Mathewendfunc plat_panic_handler 106