From: Tobias Platen Date: Wed, 14 Apr 2021 18:16:00 +0000 (+0200) Subject: radixmmu: handle badtree X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e783526b3c7da30e59005859654c0cfdd9ee847b;p=soc.git radixmmu: handle badtree --- diff --git a/src/soc/decoder/isa/radixmmu.py b/src/soc/decoder/isa/radixmmu.py index 22a84a3a..2e92bf44 100644 --- a/src/soc/decoder/isa/radixmmu.py +++ b/src/soc/decoder/isa/radixmmu.py @@ -502,7 +502,7 @@ class RADIX: return ok # return the error code else: newlookup = self._new_lookup(data, shift) - if newlookup == 'badtree': + if type(newlookup) == str: return newlookup shift, mask, pgbase = newlookup print (" next level", shift, mask, pgbase) @@ -588,7 +588,7 @@ class RADIX: return "segerror" limit = shift + (31 - 12) if mbits.value < 5 or mbits.value > 16 or mbits.value > limit.value: - return "badtree mbits="+str(mbits.value)+" limit="+str(limit.value) + return "badtree" new_shift = shift + (31 - 12) - mbits # TODO verify that returned result is correct return new_shift