1/*
2 * Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 */
6
7#pragma once
8
9#include <autoconf.h>
10
11#include <sel4/sel4_arch/mapping.h>
12
13#define SEL4_MAPPING_LOOKUP_LEVEL 2
14
15LIBSEL4_INLINE_FUNC seL4_Word seL4_MappingFailedLookupLevel()
16{
17    return seL4_GetMR(SEL4_MAPPING_LOOKUP_LEVEL);
18}
19
20#if CONFIG_PT_LEVELS == 2
21#define SEL4_MAPPING_LOOKUP_NO_PT 22
22#else
23#error "Only 2-level PTs are supported for RV32"
24#endif
25