1/* 2 * Copyright (c) Linaro 2018-2019 Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7#include <arch.h> 8#include <asm_macros.S> 9#include <assert_macros.S> 10#include <platform_def.h> 11#include <imx_hab.h> 12 13 .globl platform_mem_init 14 .globl plat_get_my_entrypoint 15 .globl plat_crash_console_init 16 .globl plat_crash_console_putc 17 .globl plat_crash_console_flush 18 .globl plat_panic_handler 19 20 /* --------------------------------------------- 21 * int plat_mem_init(void) 22 * Function to initialize memory. 23 * The HAB hands off the DDR controller already 24 * setup and ready to use. 25 * Implement the mandatory function as a NOP 26 * --------------------------------------------- 27 */ 28func platform_mem_init 29 bx lr 30endfunc platform_mem_init 31 32func plat_get_my_entrypoint 33 mov r0, #0 34 bx lr 35endfunc plat_get_my_entrypoint 36 37func plat_crash_console_init 38 mov_imm r0, PLAT_IMX7_BOOT_UART_BASE 39 mov_imm r1, PLAT_IMX7_BOOT_UART_CLK_IN_HZ 40 mov_imm r2, PLAT_IMX7_CONSOLE_BAUDRATE 41 b imx_crash_uart_init 42endfunc plat_crash_console_init 43 44func plat_crash_console_putc 45 mov_imm r1, PLAT_IMX7_BOOT_UART_BASE 46 b imx_crash_uart_putc 47endfunc plat_crash_console_putc 48 49func plat_crash_console_flush 50 /* Placeholder */ 51 mov r0, #0 52 bx lr 53endfunc plat_crash_console_flush 54 55func plat_panic_handler 56 mov r3, #HAB_ROM_VECTOR_TABLE_FAILSAFE 57 ldr r3, [r3, #0] 58 blx r3 59endfunc plat_panic_handler 60