1/*
2 * Copyright 2018, 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 GNU General Public License version 2. Note that NO WARRANTY is provided.
8 * See "LICENSE_GPLv2.txt" for details.
9 *
10 * @TAG(DATA61_GPL)
11 */
12
13/*
14 *
15 * Copyright 2016, 2017 Hesham Almatary, Data61/CSIRO <hesham.almatary@data61.csiro.au>
16 * Copyright 2015, 2016 Hesham Almatary <heshamelmatary@gmail.com>
17 */
18
19#ifndef __LIBSEL4_ARCH_TYPES_H
20#define __LIBSEL4_ARCH_TYPES_H
21
22#include <autoconf.h>
23#include <sel4/simple_types.h>
24#include <sel4/sel4_arch/types.h>
25
26typedef seL4_Word seL4_CPtr;
27
28typedef seL4_CPtr seL4_RISCV_Page;
29typedef seL4_CPtr seL4_RISCV_PageTable;
30typedef seL4_CPtr seL4_RISCV_ASIDControl;
31typedef seL4_CPtr seL4_RISCV_ASIDPool;
32
33typedef seL4_Word seL4_NodeId;
34typedef seL4_Word seL4_PAddr;
35typedef seL4_Word seL4_Domain;
36
37#define seL4_EndpointBits     4
38/* User context as used by seL4_TCB_ReadRegisters / seL4_TCB_WriteRegisters */
39
40typedef struct seL4_UserContext_ {
41    seL4_Word pc;
42    seL4_Word ra;
43    seL4_Word sp;
44    seL4_Word gp;
45    seL4_Word tp;
46    seL4_Word t0;
47    seL4_Word t1;
48    seL4_Word t2;
49    seL4_Word s0;
50    seL4_Word s1;
51    seL4_Word a0;
52    seL4_Word a1;
53    seL4_Word a2;
54    seL4_Word a3;
55    seL4_Word a4;
56    seL4_Word a5;
57    seL4_Word a6;
58} seL4_UserContext;
59
60typedef enum {
61    seL4_RISCV_ExecuteNever = 0x1,
62    seL4_RISCV_Default_VMAttributes = 0,
63    SEL4_FORCE_LONG_ENUM(seL4_RISCV_VMAttributes)
64} seL4_RISCV_VMAttributes;
65
66#endif
67