Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tools
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
vendor
qcom-opensource
tools
Commits
1ee144eb
Commit
1ee144eb
authored
8 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge "lrdp_v2: Print NS Watchdog related info"
parents
60c93de2
cfb61009
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
linux-ramdump-parser-v2/watchdog_v2.py
+46
-0
46 additions, 0 deletions
linux-ramdump-parser-v2/watchdog_v2.py
with
46 additions
and
0 deletions
linux-ramdump-parser-v2/watchdog_v2.py
+
46
−
0
View file @
1ee144eb
...
@@ -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
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment