From ebe37337daa7d6823c42ca0d17cf3bfe4f37b640 Mon Sep 17 00:00:00 2001 From: Tobias Platen Date: Mon, 15 Mar 2021 19:49:44 +0100 Subject: [PATCH] add rpte bitfields valid and leaf --- src/soc/decoder/isa/radixmmu.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/soc/decoder/isa/radixmmu.py b/src/soc/decoder/isa/radixmmu.py index 8b716aa5..34e5d4bb 100644 --- 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 -- 2.30.2