def col_str(self): """return a 4 string column for this region [name, range, size, meta]""" meta_str = (str(self.meta), '')[self.meta is None] return [ self.name, ': %08x %08x' % (self.adr, self.end), util.memsize(self.size), meta_str ]
def cmd_map(self, ui, args): """display memory map""" clist = [] for p in self.peripheral_list(): start = p.address size = p.size if size is None: region = ': %08x' % start else: region = ': %08x %08x %s' % (start, start + size - 1, util.memsize(size)) clist.append([p.name, region, p.description]) ui.put('%s\n' % util.display_cols(clist, [0,0,0]))
def cmd_map(self, ui, args): """display memory map""" clist = [] for p in self.peripheral_list(): start = p.address size = p.size if size is None: region = ': %08x' % start else: region = ': %08x %08x %s' % (start, start + size - 1, util.memsize(size)) clist.append([p.name, region, p.description]) ui.put('%s\n' % util.display_cols(clist, [0, 0, 0]))
def _bootprot_fmt(x): return '%s' % util.memsize((1 << (15 - x), 0)[x == 7])
def _eeprom_fmt(x): return '%s' % util.memsize((1 << (14 - x), 0)[x == 7])
def _tcmcr_SZ_format(x): return (util.memsize((4 << 10) << (x - 3)), 'No TCM implemented')[x == 0]
def _bootprot_fmt(x): return '%s' % util.memsize((1 << (15-x),0)[x == 7])
def _eeprom_fmt(x): return '%s' % util.memsize((1 << (14-x),0)[x == 7])
def col_str(self): """return a 4 string column for this region [name, range, size, meta]""" meta_str = (str(self.meta), '')[self.meta is None] return [self.name, ': %08x %08x' % (self.adr, self.end), util.memsize(self.size), meta_str]
def _ncb_size_format(x): return '(%s)' % util.memsize(x)
def _boot_data_length_format(x): return '(%s)' % util.memsize(x)