projects
/
soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7680df
)
add rpte bitfields valid and leaf
author
Tobias Platen
<tplaten@posteo.de>
Mon, 15 Mar 2021 18:49:44 +0000
(19:49 +0100)
committer
Tobias Platen
<tplaten@posteo.de>
Mon, 15 Mar 2021 18:49:44 +0000
(19:49 +0100)
src/soc/decoder/isa/radixmmu.py
patch
|
blob
|
history
diff --git
a/src/soc/decoder/isa/radixmmu.py
b/src/soc/decoder/isa/radixmmu.py
index 8b716aa55355713dad482a64cba8376dfd151f52..34e5d4bbd8f362e57b358c41adf1ee0efbf153c7 100644
(file)
--- a/
src/soc/decoder/isa/radixmmu.py
+++ b/
src/soc/decoder/isa/radixmmu.py
@@
-31,6
+31,18
@@
def genmask(shift, size):
res[size-1-i] = SelectableInt(1, 1)
return res
+# NOTE: POWER 3.0B annotation order! see p4 1.3.2
+# MSB is indexed **LOWEST** (sigh)
+# from gem5 radixwalk.hh
+# Bitfield<63> valid; 64 - (63 + 1) = 0
+# Bitfield<62> leaf; 64 - (62 + 1) = 1
+
+def rpte_valid(r):
+ return bool(r[0])
+
+def rpte_leaf(r):
+ return bool(r[1])
+
"""
Get Root Page