-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregs.h
52 lines (49 loc) · 1.01 KB
/
regs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//******************************************************************************
// Copyright (c) 2018, The Regents of the University of California (Regents).
// All Rights Reserved. See LICENSE for license details.
//------------------------------------------------------------------------------
#ifndef _REGS_H_
#define _REGS_H_
#include <stdint.h>
struct regs {
uintptr_t sepc; // use this slot as sepc
uintptr_t ra;
uintptr_t sp;
uintptr_t gp;
uintptr_t tp;
uintptr_t t0;
uintptr_t t1;
uintptr_t t2;
uintptr_t s0;
uintptr_t s1;
uintptr_t a0;
uintptr_t a1;
uintptr_t a2;
uintptr_t a3;
uintptr_t a4;
uintptr_t a5;
uintptr_t a6;
uintptr_t a7;
uintptr_t s2;
uintptr_t s3;
uintptr_t s4;
uintptr_t s5;
uintptr_t s6;
uintptr_t s7;
uintptr_t s8;
uintptr_t s9;
uintptr_t s10;
uintptr_t s11;
uintptr_t t3;
uintptr_t t4;
uintptr_t t5;
uintptr_t t6;
};
struct encl_ctx {
struct regs regs;
/* Supervisor CSRs */
uintptr_t sstatus;//32
uintptr_t sbadaddr;//33
uintptr_t scause;//34
};
#endif /* _REGS_H_ */