blob: d7a743d8e847a37563251c7f2a7d93219697252f [file] [log] [blame]
Zelalem Aweke13dc8f12021-07-09 14:20:03 -05001/*
2 * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef RMMD_INITIAL_CONTEXT_H
8#define RMMD_INITIAL_CONTEXT_H
9
10#include <arch.h>
11
12/*
13 * SPSR_EL2
14 * M=0x9 (0b1001 EL2h)
15 * M[4]=0
16 * DAIF=0xF Exceptions masked on entry.
17 * BTYPE=0 BTI not yet supported.
18 * SSBS=0 Not yet supported.
19 * IL=0 Not an illegal exception return.
20 * SS=0 Not single stepping.
21 * PAN=1 RMM shouldn't access realm memory.
22 * UAO=0
23 * DIT=0
24 * TCO=0
25 * NZCV=0
26 */
27#define REALM_SPSR_EL2 ( \
28 SPSR_M_EL2H | \
29 (0xF << SPSR_DAIF_SHIFT) | \
30 SPSR_PAN_BIT \
31 )
32
33#endif /* RMMD_INITIAL_CONTEXT_H */