Skip to content
Snippets Groups Projects
Commit ad035dec authored by Soumen Ghosh's avatar Soumen Ghosh Committed by Gerrit - the friendly Code Review server
Browse files

lrdp_v2:changes for getting serial number

   This changes to fetch serila number of HW from dump

Change-Id: I93ee37feafd9e407fe380761c0e6469fabe40f7d
parent a79f153b
No related branches found
No related tags found
No related merge requests found
......@@ -804,6 +804,23 @@ class RamDump():
print_out_str('!!! Could not lookup saved command line address')
return False
def print_socinfo(self):
content_socinfo = hex(self.read_pointer('socinfo'))
content_socinfo = content_socinfo.strip('L')
sernum_offset = self.field_offset('struct socinfo_v10', 'serial_number')
if sernum_offset is None:
sernum_offset = self.field_offset('struct socinfo_v0_10', 'serial_number')
if sernum_offset is None:
print_out_str("No serial number information available")
return False
addr_of_sernum = hex(int(content_socinfo, 16) + sernum_offset)
addr_of_sernum = addr_of_sernum.strip('L')
serial_number = self.read_u32(int(addr_of_sernum, 16))
if serial_number is not None:
print_out_str('Serial number %s' % hex(serial_number))
return True
return False
def auto_parse(self, file_path):
for cls in sorted(AutoDumpInfo.__subclasses__(),
key=lambda x: x.priority, reverse=True):
......
......@@ -349,6 +349,9 @@ if __name__ == '__main__':
print_out_str('!!! Exiting now...')
sys.exit(1)
if not dump.print_socinfo():
print_out_str('!!! No serial number information available.')
if options.qdss:
print_out_str('!!! --parse-qdss is now deprecated')
print_out_str(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment