Skip to content
Snippets Groups Projects
Commit 0e7e22cf authored by Mitchel Humpherys's avatar Mitchel Humpherys
Browse files

lrdp-v2: quiet down roareadiff

If a zillion billion differences are found in the RO area, just print to
the log once to notify the operator of that fact, instead of printing a
zillion billion times.

Change-Id: Ie61afe5b8bd2cb207f594b8ee46ebac1af95a08a
parent aed440e0
No related branches found
No related tags found
No related merge requests found
# Copyright (c) 2013, The Linux Foundation. All rights reserved. # Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License version 2 and
...@@ -53,6 +53,7 @@ class ROData(RamParser): ...@@ -53,6 +53,7 @@ class ROData(RamParser):
if not prgheader.flags & PF_W: if not prgheader.flags & PF_W:
count = prgheader.vaddr count = prgheader.vaddr
detect = 0 detect = 0
printed_once = False
while count < prgheader.vaddr + prgheader.memsz: while count < prgheader.vaddr + prgheader.memsz:
fd.seek(prgheader.offset + (count - prgheader.vaddr)) fd.seek(prgheader.offset + (count - prgheader.vaddr))
ram_value = self.ramdump.read_word(count) ram_value = self.ramdump.read_word(count)
...@@ -61,8 +62,10 @@ class ROData(RamParser): ...@@ -61,8 +62,10 @@ class ROData(RamParser):
break break
if detect == 0 and vm_value != ram_value: if detect == 0 and vm_value != ram_value:
print_out_str( if not printed_once:
'Differences found! Differences written to roareadiff.txt') print_out_str(
'Differences found! Differences written to roareadiff.txt')
printed_once = True
ddr_str = 'detect RO area differences between vmlinux and DDR at 0x{0:0>8x}\n'.format( ddr_str = 'detect RO area differences between vmlinux and DDR at 0x{0:0>8x}\n'.format(
count) count)
ddr_str += 'from DDR:\n' ddr_str += 'from DDR:\n'
......
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