blob: 2d023cd6bbaa73baca468cd1f3af846ce6adccff [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_helpers.h>
8#include <debug.h>
9#include <tftf.h>
10
11
12void tftf_arch_setup(void)
13{
14 if (!IS_IN_HYP())
15 panic();
16
Sandrine Bailleuxdddec6b2018-12-18 15:45:01 +010017 /*
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 Bailleux3cd87d72018-10-09 11:12:55 +020022 write_hcr(HCR_TGE_BIT);
23}