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
cca1fb11
Commit
cca1fb11
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: Add support to extract kaslr-offset from imem"
parents
c8e9ac5f
348f98e6
No related branches found
Branches containing commit
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/boards.py
+1
-0
1 addition, 0 deletions
linux-ramdump-parser-v2/boards.py
linux-ramdump-parser-v2/ramdump.py
+19
-0
19 additions, 0 deletions
linux-ramdump-parser-v2/ramdump.py
with
20 additions
and
0 deletions
linux-ramdump-parser-v2/boards.py
+
1
−
0
View file @
cca1fb11
...
...
@@ -411,6 +411,7 @@ class BoardCobalt(Board):
self
.
smem_addr
=
0x6000000
self
.
phys_offset
=
0x80000000
self
.
imem_start
=
0x14680000
self
.
kaslr_addr
=
0x146bf6d0
self
.
wdog_addr
=
0x146BF658
self
.
imem_file_name
=
'
OCIMEM.BIN
'
...
...
This diff is collapsed.
Click to expand it.
linux-ramdump-parser-v2/ramdump.py
+
19
−
0
View file @
cca1fb11
...
...
@@ -547,6 +547,12 @@ class RamDump():
self
.
ebi_start
=
self
.
ebi_files
[
0
][
1
]
if
self
.
phys_offset
is
None
:
self
.
get_hw_id
()
if
self
.
kaslr_offset
is
None
:
self
.
get_kaslr_offset
()
if
self
.
kaslr_offset
is
not
None
:
self
.
gdbmi
.
kaslr_offset
=
self
.
kaslr_offset
if
options
.
phys_offset
is
not
None
:
print_out_str
(
'
[!!!] Phys offset was set to {0:x}
'
.
format
(
\
...
...
@@ -968,6 +974,18 @@ class RamDump():
else
:
return
self
.
read_word
(
self
.
tz_addr
,
False
)
def
get_kaslr_offset
(
self
):
if
(
self
.
kaslr_addr
is
None
):
print_out_str
(
'
!!!! Kaslr addr is not provided.
'
)
else
:
kaslr_magic
=
self
.
read_u32
(
self
.
kaslr_addr
,
False
)
if
kaslr_magic
!=
0xdead4ead
:
print_out_str
(
'
!!!! Kaslr magic does not match.
'
)
self
.
kaslr_offset
=
None
else
:
self
.
kaslr_offset
=
self
.
read_u64
(
self
.
kaslr_addr
+
4
,
False
)
print_out_str
(
"
The kaslr_offset extracted is:
"
+
str
(
hex
(
self
.
kaslr_offset
)))
def
get_hw_id
(
self
,
add_offset
=
True
):
socinfo_format
=
-
1
socinfo_id
=
-
1
...
...
@@ -1054,6 +1072,7 @@ class RamDump():
self
.
hw_id
=
board
.
board_num
self
.
cpu_type
=
board
.
cpu
self
.
imem_fname
=
board
.
imem_file_name
self
.
kaslr_addr
=
board
.
kaslr_addr
return
True
def
resolve_virt
(
self
,
virt_or_name
):
...
...
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