From e783526b3c7da30e59005859654c0cfdd9ee847b Mon Sep 17 00:00:00 2001 From: Tobias Platen Date: Wed, 14 Apr 2021 20:16:00 +0200 Subject: [PATCH] radixmmu: handle badtree --- src/soc/decoder/isa/radixmmu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.30.2