repo.or.cz
/
qemu
/
ar7.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
lsi53c895a: check message length value is valid
[qemu/ar7.git]
/
tests
/
tcg
/
xtensa
/
test_phys_mem.S
blob
aae0a793a7184be65f7f5bd87b6f0c57a859b543
1
#include "macros.inc"
2
3
test_suite phys_mem
4
5
.purgem test_init
6
7
.macro test_init
8
movi a2, 0xc0000003 /* PPN */
9
movi a3, 0xc0000004 /* VPN */
10
wdtlb a2, a3
11
witlb a2, a3
12
movi a2, 0xc0000000
13
wsr a2, ptevaddr
14
.endm
15
16
test inst_fetch_get_pte_no_phys
17
set_vector kernel, 2f
18
19
movi a2, 0x20000000
20
jx a2
21
2:
22
movi a2, 0x20000000
23
rsr a3, excvaddr
24
assert eq, a2, a3
25
rsr a3, epc1
26
assert eq, a2, a3
27
rsr a3, exccause
28
movi a2, 16
29
assert eq, a2, a3
30
test_end
31
32
test read_get_pte_no_phys
33
set_vector kernel, 2f
34
35
movi a2, 0x20000000
36
1:
37
l32i a3, a2, 0
38
test_fail
39
2:
40
movi a2, 0x20000000
41
rsr a3, excvaddr
42
assert eq, a2, a3
43
movi a2, 1b
44
rsr a3, epc1
45
assert eq, a2, a3
46
rsr a3, exccause
47
movi a2, 24
48
assert eq, a2, a3
49
test_end
50
51
test write_get_pte_no_phys
52
set_vector kernel, 2f
53
54
movi a2, 0x20000000
55
1:
56
s32i a3, a2, 0
57
test_fail
58
2:
59
movi a2, 0x20000000
60
rsr a3, excvaddr
61
assert eq, a2, a3
62
movi a2, 1b
63
rsr a3, epc1
64
assert eq, a2, a3
65
rsr a3, exccause
66
movi a2, 24
67
assert eq, a2, a3
68
test_end
69
70
test inst_fetch_no_phys
71
set_vector kernel, 2f
72
73
movi a2, 0xc0000000
74
jx a2
75
2:
76
movi a2, 0xc0000000
77
rsr a3, excvaddr
78
assert eq, a2, a3
79
rsr a3, epc1
80
assert eq, a2, a3
81
rsr a3, exccause
82
movi a2, 14
83
assert eq, a2, a3
84
test_end
85
86
test read_no_phys
87
set_vector kernel, 2f
88
89
movi a2, 0xc0000000
90
1:
91
l32i a3, a2, 0
92
test_fail
93
2:
94
movi a2, 0xc0000000
95
rsr a3, excvaddr
96
assert eq, a2, a3
97
movi a2, 1b
98
rsr a3, epc1
99
assert eq, a2, a3
100
rsr a3, exccause
101
movi a2, 15
102
assert eq, a2, a3
103
test_end
104
105
test write_no_phys
106
set_vector kernel, 2f
107
108
movi a2, 0xc0000000
109
1:
110
s32i a3, a2, 0
111
test_fail
112
2:
113
movi a2, 0xc0000000
114
rsr a3, excvaddr
115
assert eq, a2, a3
116
movi a2, 1b
117
rsr a3, epc1
118
assert eq, a2, a3
119
rsr a3, exccause
120
movi a2, 15
121
assert eq, a2, a3
122
test_end
123
124
test_suite_end