blob: aaeb93c1ac6c70b2035f6a38865dd5339cb7634c [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001/*
2 * Copyright (c) 2018, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <arch.h>
8#include <asm_macros.S>
9#include <tftf.h>
10
11 .globl tftf_vector
12
13vector_base tftf_vector
14 b tftf_entrypoint
Sandrine Bailleuxa43b0032019-01-14 14:04:32 +010015 b crash_dump /* Undef */
16 b crash_dump /* Syscall */
17 b crash_dump /* Prefetch abort */
18 b crash_dump /* Data abort */
19 b crash_dump /* Hyp trap */
20 b tftf_intr_handle /* IRQ */
21 b crash_dump /* FIQ */
22
23func crash_dump
24 /* Save SP and general-purpose registers on the stack. */
25 push {sp}
26 push {r0-r12, lr}
27
28 /* Print the saved CPU context on the UART. */
29 mov r0, sp
30 b print_exception
31endfunc crash_dump
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020032
33/* ----------------------------------------------------------------------------
34 * The IRQ exception handler
35 * ----------------------------------------------------------------------------
36 */
37func tftf_intr_handle
38 push {r0 - r3, lr}
39 bl tftf_irq_handler_dispatcher
40 pop {r0 - r3, lr}
41 eret
42endfunc tftf_intr_handle