-Subproject commit 59c4a072402ffaf98cb43fc2a33084e7bf1f1a6b
+Subproject commit bde364f71cf05e81b1e6adecad777d187b6c31da
pte = self._walk_tree(addr, pgbase, mode, mbits, shift, priv)
- # use pte to caclculate phys address
- return self.mem.ld(address, width, swap, check_in_mem)
+ # use pte to load from phys address
+ return self.mem.ld(pte.value, width, swap, check_in_mem)
# XXX set SPRs on error
(shift, mbits, pgbase) = self._decode_prte(addr)
pte = self._walk_tree(addr, pgbase, mode, mbits, shift, priv)
- # use pte to caclculate phys address (addr)
- return self.mem.st(addr.value, v, width, swap)
+ # use pte to store at phys address
+ return self.mem.st(pte.value, v, width, swap)
# XXX set SPRs on error
def _next_level(self, addr, entry_width, swap, check_in_mem):
# implement read access to mmu mem here
+ # DO NOT perform byte-swapping: load 8 bytes (that's the entry size)
value = self.mem.ld(addr.value, 8, False, check_in_mem)
assert(value is not None, "address lookup %x not found" % addr.value)
# <!-- line 1 comment -->
# <!-- line 2 comment -->
if l.startswith('<!--'):
- print ("skipping comment", l)
+ # print ("skipping comment", l)
+ l = lines.pop(0).rstrip() # get first line
continue
+
+ # Ignore blank lines before the first #
+ if len(l.strip()) == 0:
+ continue
+
# expect get heading
assert l.startswith('#'), ("# not found in line %s" % l)
while lines:
l = lines.pop(0).rstrip()
rewrite.append(l)
- if len(l) != 0:
+ if len(l) != 0 and not l.startswith('<!--'):
break
return rewrite
l = lines.pop(0).rstrip() # get first line
while lines:
print(l)
+ # look for HTML comment, if starting, skip line.
+ # XXX this is braindead! it doesn't look for the end
+ # so please put ending of comments on one line:
+ # <!-- line 1 comment -->
+ # <!-- line 2 comment -->
+ if l.startswith('<!--'):
+ # print ("skipping comment", l)
+ l = lines.pop(0).rstrip() # get next line
+ continue
+
+ # Ignore blank lines before the first #
+ if len(l) == 0:
+ l = lines.pop(0).rstrip() # get next line
+ continue
+
# expect get heading
- assert l.startswith('#'), ("# not found in line %s" % l)
+ assert l.startswith('#'), ("# not found in line '%s'" % l)
d['desc'] = l[1:].strip()
# whitespace expected
# expect and drop whitespace
while lines:
l = lines.pop(0).rstrip()
- if len(l) != 0:
+ if len(l) != 0 and not l.startswith('<!--'):
break
def add_op(self, o, d):