Select Git revision
Soumen Ghosh authored
As DCC is not going to be enabled on secure device, SDI would dump required registers in standard dcc dumping format. So extend ramparser’s DCC parsing support for <address><value> format. The KMISC section would contain all registers address value pair as mentioned below. Parse the data and generate the “dcc_captured_data.xml” and it should be same as actual dcc dump parsed xml. Change-Id: Ib042ebc6895f0594f5784600174087a979e8709f
sysregs.py 1.09 KiB
# Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 and
# only version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
import struct
import os
from print_out import print_out_str
from ramparse import VERSION
class SysRegDump():
def __init__(self, start, end):
self.start_addr = start
self.end_addr = end
def dump_sysreg_img(self,ram_dump):
if self.start_addr >= self.end_addr:
return False
rsz = self.end_addr - self.start_addr
sysregfile = ram_dump.open_file('sysdbg_regs.bin')
for i in range(0, rsz):
val = ram_dump.read_byte(self.start_addr + i, False)
sysregfile.write(struct.pack('<B', val))
sysregfile.close()