return
elif e.args[0] == 'invalid': # invalid
# run a Trap but set DAR first
- log ("RADIX MMU memory invalid error")
+ log ("RADIX MMU memory invalid error, mode %s" % e.mode)
self.call_trap(0x300, PIb.PRIV) # 0x300, privileged
return
# not supported yet:
def ld(self, address, width=8, swap=True, check_in_mem=False,
instr_fetch=False):
- print("RADIX: ld from addr 0x%x width %d" % (address, width))
-
- priv = ~(self.msr[MSRb.PR].value) # problem-state ==> privileged
if instr_fetch:
mode = 'EXECUTE'
else:
mode = 'LOAD'
+ print("RADIX: ld from addr 0x%x width %d mode %s" % \
+ (address, width, mode))
+
+ priv = ~(self.msr[MSRb.PR].value) # problem-state ==> privileged
addr = SelectableInt(address, 64)
pte = self._walk_tree(addr, mode, priv)
# WIP
if mbits == 0:
- raise MemException("invalid")
+ exc = MemException("invalid")
+ exc.mode = mode
+ raise exc
# mask_size := mbits(4 downto 0);
mask_size = mbits[0:5]
print(" valid, leaf", valid, leaf)
if not valid:
- raise MemException("invalid")
+ exc = MemException("invalid")
+ exc.mode = mode
+ raise exc
if leaf:
print ("is leaf, checking perms")
ok = self._check_perms(data, priv, mode)