Skip to content
Snippets Groups Projects
Commit 1ee144eb authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "lrdp_v2: Print NS Watchdog related info"

parents 60c93de2 cfb61009
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,7 @@ import re ...@@ -15,6 +15,7 @@ import re
from scandump_reader import Scandump_v2 from scandump_reader import Scandump_v2
from print_out import print_out_str from print_out import print_out_str
from bitops import is_set from bitops import is_set
from parser_util import register_parser, RamParser
# name from tz dump, corresponding T32 register, whether or not to # name from tz dump, corresponding T32 register, whether or not to
# print_out_str (the function name) # print_out_str (the function name)
...@@ -836,3 +837,48 @@ class TZRegDump_v2(): ...@@ -836,3 +837,48 @@ class TZRegDump_v2():
self.sec_regs = TZCpuCtx_v2(self.version, sc_secure, self.sec_regs = TZCpuCtx_v2(self.version, sc_secure,
self.neon_regs, ram_dump) self.neon_regs, ram_dump)
return True return True
@register_parser('--watchdog', 'Extracts NS Watchdog related info')
class Watchdog(RamParser):
def parse(self):
get_wdog_timing(self.ramdump)
def get_wdog_timing(ramdump):
jiffies = ramdump.read_word('jiffies')
last_jiffies_update = ramdump.read_word('last_jiffies_update')
tick_do_timer_cpu = ramdump.read_word('tick_do_timer_cpu')
wdog_data_addr = ramdump.read_word('wdog_data')
pet_timer_off = ramdump.field_offset(
'struct msm_watchdog_data', 'pet_timer')
timer_expires_off = ramdump.field_offset('struct timer_list', 'expires')
pet_timer_expires = ramdump.read_word(
wdog_data_addr + pet_timer_off + timer_expires_off)
last_pet_off = ramdump.field_offset('struct msm_watchdog_data', 'last_pet')
wdog_last_pet = ramdump.read_word(wdog_data_addr + last_pet_off)
timer_expired_off = ramdump.field_offset(
'struct msm_watchdog_data', 'timer_expired')
pet_timer_expired = ramdump.read_word(wdog_data_addr + timer_expired_off)
pet_time_off = ramdump.field_offset('struct msm_watchdog_data', 'pet_time')
bark_time_off = ramdump.field_offset(
'struct msm_watchdog_data', 'bark_time')
pet_time = ramdump.read_int(wdog_data_addr + pet_time_off)
bark_time = ramdump.read_int(wdog_data_addr + bark_time_off)
print_out_str('Non-secure Watchdog data')
print_out_str('Pet time: {0}s'.format(pet_time/1000.0))
print_out_str('Bark time: {0}s'.format(bark_time/1000.0))
print_out_str('Watchdog last pet: {0}'.format(wdog_last_pet/1000000000.0))
if pet_timer_expired == 1:
print_out_str('Watchdog pet timer expired')
else:
print_out_str('Watchdog pet timer not expired')
if jiffies > pet_timer_expires:
print_out_str('Current jiffies crossed pet_timer expires jiffies')
print_out_str('pet_timer_expires: {0}'.format(pet_timer_expires))
print_out_str('Current jiffies : {0}'.format(jiffies))
print_out_str(
'Timestamp of last timer interrupt(last_jiffies_update): {0}'.format(
last_jiffies_update/1000000000.0))
print_out_str('Core which updates jiffies(tick_do_timer_cpu): {0}'.format(
tick_do_timer_cpu))
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