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_helpers.h> |
| 8 | #include <debug.h> |
| 9 | #include <tftf.h> |
| 10 | |
| 11 | |
| 12 | void tftf_arch_setup(void) |
| 13 | { |
| 14 | if (!IS_IN_HYP()) |
| 15 | panic(); |
| 16 | |
Sandrine Bailleux | dddec6b | 2018-12-18 15:45:01 +0100 | [diff] [blame^] | 17 | /* |
| 18 | * Route physical interrupts to Hyp mode regardless of the value of the |
| 19 | * IMO/FMO bits. Without this, interrupts would not be taken and would |
| 20 | * remain pending, regardless of the PSTATE.{A, I, F} interrupt masks. |
| 21 | */ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 22 | write_hcr(HCR_TGE_BIT); |
| 23 | } |