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
32820ffe
Commit
32820ffe
authored
9 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "linux-ramdump-parser-v2: add vsens data parsing support"
parents
f3314e4e
be9ec682
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
linux-ramdump-parser-v2/debug_image_v2.py
+15
-1
15 additions, 1 deletion
linux-ramdump-parser-v2/debug_image_v2.py
linux-ramdump-parser-v2/vsens.py
+85
-0
85 additions, 0 deletions
linux-ramdump-parser-v2/vsens.py
with
100 additions
and
1 deletion
linux-ramdump-parser-v2/debug_image_v2.py
+
15
−
1
View file @
32820ffe
...
...
@@ -24,7 +24,7 @@ from print_out import print_out_str, print_out_exception
from
qdss
import
QDSSDump
from
watchdog_v2
import
TZRegDump_v2
from
cachedumplib
import
lookup_cache_type
from
vsens
import
VsensData
MEMDUMPV2_MAGIC
=
0x42445953
MAX_NUM_ENTRIES
=
0x130
...
...
@@ -41,6 +41,7 @@ class client(object):
MSM_DUMP_DATA_L3_CACHE
=
0xD0
MSM_DUMP_DATA_OCMEM
=
0xE0
MSM_DUMP_DATA_DBGUI_REG
=
0xE5
MSM_DUMP_DATA_VSENSE
=
0xE9
MSM_DUMP_DATA_TMC_ETF
=
0xF0
MSM_DUMP_DATA_TMC_REG
=
0x100
MSM_DUMP_DATA_TMC_ETF_REG
=
0x101
...
...
@@ -59,6 +60,7 @@ client_table = {
'
MSM_DUMP_DATA_L3_CACHE
'
:
'
parse_l3_cache
'
,
'
MSM_DUMP_DATA_OCMEM
'
:
'
parse_ocmem
'
,
'
MSM_DUMP_DATA_DBGUI_REG
'
:
'
parse_qdss_common
'
,
'
MSM_DUMP_DATA_VSENSE
'
:
'
parse_vsens
'
,
'
MSM_DUMP_DATA_PMIC
'
:
'
parse_pmic
'
,
'
MSM_DUMP_DATA_DCC_REG
'
:
'
parse_dcc_reg
'
,
'
MSM_DUMP_DATA_DCC_SRAM
'
:
'
parse_dcc_sram
'
,
...
...
@@ -134,6 +136,18 @@ class DebugImage_v2():
ram_dump
.
dcc
=
True
return
def
parse_vsens
(
self
,
version
,
start
,
end
,
client_id
,
ram_dump
):
client_name
=
self
.
dump_data_id_lookup_table
[
client_id
]
print_out_str
(
'
Parsing {0} context start {1:x} end {2:x}
'
.
format
(
client_name
,
start
,
end
))
regs
=
VsensData
()
if
regs
.
init_dump_regs
(
start
,
end
,
ram_dump
)
is
False
:
print_out_str
(
'
!!! Could not get registers from Vsens Dump
'
)
return
regs
.
print_vsens_regs
(
ram_dump
)
def
parse_qdss_common
(
self
,
version
,
start
,
end
,
client_id
,
ram_dump
):
client_name
=
self
.
dump_data_id_lookup_table
[
client_id
]
...
...
This diff is collapsed.
Click to expand it.
linux-ramdump-parser-v2/vsens.py
0 → 100755
+
85
−
0
View file @
32820ffe
# Copyright (c) 2015, 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
from
print_out
import
print_out_str
MAX_FIFO_SIZE
=
64
VSENS_ID_MAX
=
6
sysdbg_vsens_idx_name
=
[
'
VSENS_ID_CX
'
,
'
VSENS_ID_MX
'
,
'
VSENS_ID_APC0
'
,
'
VSENS_ID_APC1
'
,
'
VSENS_ID_GFX
'
,
'
VSENS_ID_EBI
'
,
]
sysdbg_vsens_dump_name
=
[
'
ID
'
,
'
CONFIG_REG0
'
,
'
CONFIG_REG1
'
,
'
STATUS_REG
'
,
]
sysdbg_vsens_dump_type
=
''
.
join
([
'
I
'
,
#id
'
I
'
,
#config_reg_0
'
I
'
,
#config_reg_1
'
I
'
,
#status_reg
])
class
VsensDumpType
():
def
__init__
(
self
,
idx
,
regs
,
fifo
):
self
.
idx
=
idx
self
.
regs
=
regs
self
.
fifo
=
fifo
def
print_regs
(
self
,
outfile
,
ramdump
):
outfile
.
write
(
'
Voltage Sensor type: [{0}]
\n
'
.
format
(
sysdbg_vsens_idx_name
[
self
.
idx
]))
for
i
in
range
(
0
,
4
):
outfile
.
write
(
'
{0} = {1:x}
\n
'
.
format
(
sysdbg_vsens_dump_name
[
i
],
self
.
regs
[
i
]))
outfile
.
write
(
'
FIFO DATA =
\n
'
)
for
i
in
range
(
0
,
MAX_FIFO_SIZE
):
if
(
i
%
16
)
==
0
:
outfile
.
write
(
'
\n
'
)
outfile
.
write
(
'
{0:x}
'
.
format
(
self
.
fifo
[
i
]))
outfile
.
write
(
'
\n\n\n\n
'
)
class
VsensData
():
def
__init__
(
self
):
self
.
vsens_regs
=
[]
self
.
size
=
struct
.
calcsize
(
sysdbg_vsens_dump_type
)
def
print_vsens_regs
(
self
,
ram_dump
):
vsens_file
=
ram_dump
.
open_file
(
'
vsens.txt
'
)
for
idx
in
range
(
0
,
VSENS_ID_MAX
):
self
.
vsens_regs
[
idx
].
print_regs
(
vsens_file
,
ram_dump
)
vsens_file
.
close
()
def
init_dump_regs
(
self
,
start_addr
,
end_addr
,
ram_dump
):
self
.
start_addr
=
start_addr
self
.
end_addr
=
end_addr
for
i
in
range
(
0
,
VSENS_ID_MAX
):
regs
=
ram_dump
.
read_string
(
self
.
start_addr
,
sysdbg_vsens_dump_type
,
False
)
self
.
start_addr
+=
self
.
size
fifo
=
ram_dump
.
read_string
(
self
.
start_addr
,
'
B
'
*
MAX_FIFO_SIZE
,
False
)
self
.
start_addr
+=
struct
.
calcsize
(
'
B
'
*
MAX_FIFO_SIZE
)
self
.
vsens_regs
.
append
(
VsensDumpType
(
i
,
regs
,
fifo
))
return
True
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