1/*
2 * Copyright 2017, Data61
3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4 * ABN 41 687 119 230.
5 *
6 * This software may be distributed and modified according to the terms of
7 * the BSD 2-Clause license. Note that NO WARRANTY is provided.
8 * See "LICENSE_BSD2.txt" for details.
9 *
10 * @TAG(DATA61_BSD)
11 */
12
13#ifndef __LIBSEL4_SEL4_ARCH_MAPPING
14#define __LIBSEL4_SEL4_ARCH_MAPPING
15
16#ifdef HAVE_AUTOCONF
17#include <autoconf.h>
18#endif
19
20#define SEL4_MAPPING_LOOKUP_LEVEL 2
21
22#ifdef CONFIG_ARM_HYPERVISOR_SUPPORT
23#define SEL4_MAPPING_LOOKUP_NO_PT 21
24#else
25#define SEL4_MAPPING_LOOKUP_NO_PT 20
26#endif
27
28LIBSEL4_INLINE_FUNC seL4_Word seL4_MappingFailedLookupLevel(void)
29{
30    return seL4_GetMR(SEL4_MAPPING_LOOKUP_LEVEL);
31}
32
33#endif
34