Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 1 | /* |
| 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 | |
| 13 | vector_base tftf_vector |
| 14 | b tftf_entrypoint |
Sandrine Bailleux | a43b003 | 2019-01-14 14:04:32 +0100 | [diff] [blame] | 15 | 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 | |
| 23 | func 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 |
| 31 | endfunc crash_dump |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 32 | |
| 33 | /* ---------------------------------------------------------------------------- |
| 34 | * The IRQ exception handler |
| 35 | * ---------------------------------------------------------------------------- |
| 36 | */ |
| 37 | func tftf_intr_handle |
| 38 | push {r0 - r3, lr} |
| 39 | bl tftf_irq_handler_dispatcher |
| 40 | pop {r0 - r3, lr} |
| 41 | eret |
| 42 | endfunc tftf_intr_handle |