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
82e6d834
Commit
82e6d834
authored
10 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "linux-ramdump-parser-v2: Parse socinfo only if needed"
parents
2ba094e2
7b0aaff3
No related branches found
Branches containing commit
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/ramdump.py
+21
-14
21 additions, 14 deletions
linux-ramdump-parser-v2/ramdump.py
with
21 additions
and
14 deletions
linux-ramdump-parser-v2/ramdump.py
+
21
−
14
View file @
82e6d834
# Copyright (c) 2012-201
4
, The Linux Foundation. All rights reserved.
# Copyright (c) 2012-201
5
, 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
...
@@ -500,7 +500,14 @@ class RamDump():
...
@@ -500,7 +500,14 @@ class RamDump():
# extra 4k is needed for LPAE. If it's 0x5000 below
# extra 4k is needed for LPAE. If it's 0x5000 below
# PAGE_OFFSET + TEXT_OFFSET then we know we're using LPAE. For
# PAGE_OFFSET + TEXT_OFFSET then we know we're using LPAE. For
# non-LPAE it should be 0x4000 below PAGE_OFFSET + TEXT_OFFSET
# non-LPAE it should be 0x4000 below PAGE_OFFSET + TEXT_OFFSET
self
.
swapper_pg_dir_addr
=
self
.
addr_lookup
(
'
swapper_pg_dir
'
)
-
self
.
page_offset
swapper_pg_dir
=
self
.
addr_lookup
(
'
swapper_pg_dir
'
)
if
swapper_pg_dir
is
None
:
print_out_str
(
'
!!! Could not get the swapper page directory!
'
)
print_out_str
(
'
!!! Your vmlinux is probably wrong for these dumps
'
)
print_out_str
(
'
!!! Exiting now
'
)
sys
.
exit
(
1
)
self
.
swapper_pg_dir_addr
=
swapper_pg_dir
-
self
.
page_offset
self
.
kernel_text_offset
=
self
.
addr_lookup
(
'
stext
'
)
-
self
.
page_offset
self
.
kernel_text_offset
=
self
.
addr_lookup
(
'
stext
'
)
-
self
.
page_offset
pg_dir_size
=
self
.
kernel_text_offset
-
self
.
swapper_pg_dir_addr
pg_dir_size
=
self
.
kernel_text_offset
-
self
.
swapper_pg_dir_addr
if
self
.
arm64
:
if
self
.
arm64
:
...
@@ -845,18 +852,6 @@ class RamDump():
...
@@ -845,18 +852,6 @@ class RamDump():
return
self
.
read_word
(
self
.
tz_addr
,
False
)
return
self
.
read_word
(
self
.
tz_addr
,
False
)
def
get_hw_id
(
self
,
add_offset
=
True
):
def
get_hw_id
(
self
,
add_offset
=
True
):
heap_toc_offset
=
self
.
field_offset
(
'
struct smem_shared
'
,
'
heap_toc
'
)
if
heap_toc_offset
is
None
:
print_out_str
(
'
!!!! Could not get a necessary offset for auto detection!
'
)
print_out_str
(
'
!!!! Please check the gdb path which is used for offsets!
'
)
print_out_str
(
'
!!!! Also check that the vmlinux is not stripped
'
)
print_out_str
(
'
!!!! Exiting...
'
)
sys
.
exit
(
1
)
smem_heap_entry_size
=
self
.
sizeof
(
'
struct smem_heap_entry
'
)
offset_offset
=
self
.
field_offset
(
'
struct smem_heap_entry
'
,
'
offset
'
)
socinfo_format
=
-
1
socinfo_format
=
-
1
socinfo_id
=
-
1
socinfo_id
=
-
1
socinfo_version
=
0
socinfo_version
=
0
...
@@ -866,6 +861,18 @@ class RamDump():
...
@@ -866,6 +861,18 @@ class RamDump():
boards
=
get_supported_boards
()
boards
=
get_supported_boards
()
if
(
self
.
hw_id
is
None
):
if
(
self
.
hw_id
is
None
):
heap_toc_offset
=
self
.
field_offset
(
'
struct smem_shared
'
,
'
heap_toc
'
)
if
heap_toc_offset
is
None
:
print_out_str
(
'
!!!! Could not get a necessary offset for auto detection!
'
)
print_out_str
(
'
!!!! Please check the gdb path which is used for offsets!
'
)
print_out_str
(
'
!!!! Also check that the vmlinux is not stripped
'
)
print_out_str
(
'
!!!! Exiting...
'
)
sys
.
exit
(
1
)
smem_heap_entry_size
=
self
.
sizeof
(
'
struct smem_heap_entry
'
)
offset_offset
=
self
.
field_offset
(
'
struct smem_heap_entry
'
,
'
offset
'
)
for
board
in
boards
:
for
board
in
boards
:
trace
=
board
.
trace_soc
trace
=
board
.
trace_soc
if
trace
:
if
trace
:
...
...
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