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
76934a74
Commit
76934a74
authored
7 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "lrdp: iommu: fix page table parsing"
parents
31aca22c
137cd66a
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/iommulib.py
+7
-11
7 additions, 11 deletions
linux-ramdump-parser-v2/iommulib.py
linux-ramdump-parser-v2/mm.py
+11
-1
11 additions, 1 deletion
linux-ramdump-parser-v2/mm.py
with
18 additions
and
12 deletions
linux-ramdump-parser-v2/iommulib.py
+
7
−
11
View file @
76934a74
...
...
@@ -11,6 +11,7 @@
import
rb_tree
import
linux_list
as
llist
from
mm
import
phys_to_virt
ARM_SMMU_DOMAIN
=
0
MSM_SMMU_DOMAIN
=
1
...
...
@@ -112,30 +113,25 @@ class IommuLib(object):
if
pgtbl_ops_ptr
is
None
or
pgtbl_ops_ptr
==
0
:
return
pg_table
=
0
level
=
0
fn
=
self
.
ramdump
.
read_structure_field
(
pgtbl_ops_ptr
,
'
struct io_pgtable_ops
'
,
'
map
'
)
if
fn
==
self
.
ramdump
.
address_of
(
'
av8l_fast_map
'
):
av8l_fast_io_pgtable_ptr
=
self
.
ramdump
.
container_of
(
pgtbl_ops_ptr
,
'
struct av8l_fast_io_pgtable
'
,
'
iop.ops
'
)
pg_table
=
self
.
ramdump
.
read_structure_field
(
av8l_fast_io_pgtable_ptr
,
'
struct av8l_fast_io_pgtable
'
,
'
pgd
'
)
level
=
3
else
:
arm_lpae_io_pgtable_ptr
=
self
.
ramdump
.
container_of
(
pgtbl_ops_ptr
,
'
struct arm_lpae_io_pgtable
'
,
'
iop.ops
'
)
pg_table
=
self
.
ramdump
.
read_structure_field
(
arm_lpae_io_pgtable_ptr
,
'
struct arm_lpae_io_pgtable
'
,
'
pgd
'
)
level
=
self
.
ramdump
.
read_structure_field
(
arm_lpae_io_pgtable_ptr
,
'
struct arm_lpae_io_pgtable
'
,
'
levels
'
)
pg_table
=
self
.
ramdump
.
read_structure_field
(
arm_smmu_domain_ptr
,
'
struct arm_smmu_domain
'
,
'
pgtbl_cfg.arm_lpae_s1_cfg.ttbr[0]
'
)
pg_table
=
phys_to_virt
(
self
.
ramdump
,
pg_table
)
domain_create
=
Domain
(
pg_table
,
0
,
[],
client_name
,
ARM_SMMU_DOMAIN
,
level
)
domain_list
.
append
(
domain_create
)
...
...
This diff is collapsed.
Click to expand it.
linux-ramdump-parser-v2/mm.py
+
11
−
1
View file @
76934a74
# Copyright (c) 2013-201
7
, The Linux Foundation. All rights reserved.
# Copyright (c) 2013-201
8
, 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
...
...
@@ -309,6 +309,16 @@ def page_address(ramdump, page):
if
pam
==
start
:
return
None
def
phys_to_virt
(
ramdump
,
phys
):
if
not
ramdump
.
arm64
:
return
phys
-
ramdump
.
phys_offset
+
ramdump
.
page_offset
if
ramdump
.
kernel_version
<
(
4
,
4
,
0
):
return
None
memstart_addr
=
ramdump
.
read_s64
(
'
memstart_addr
'
)
val
=
(
phys
-
memstart_addr
)
|
ramdump
.
page_offset
return
val
def
for_each_pfn
(
ramdump
):
"""
creates a generator for looping through valid pfn
...
...
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