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
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab 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
2ab0052f
Commit
2ab0052f
authored
8 years ago
by
lnx build
Committed by
Gerrit - the friendly Code Review server
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge "lrdp-v2: iommu: Fix broken iommulib.py" into opensource-tools.lnx.1.0
parents
7c75c014
028170c6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
linux-ramdump-parser-v2/aarch64iommulib.py
+3
-5
3 additions, 5 deletions
linux-ramdump-parser-v2/aarch64iommulib.py
linux-ramdump-parser-v2/iommulib.py
+19
-8
19 additions, 8 deletions
linux-ramdump-parser-v2/iommulib.py
with
22 additions
and
13 deletions
linux-ramdump-parser-v2/aarch64iommulib.py
+
3
−
5
View file @
2ab0052f
...
@@ -154,6 +154,7 @@ def add_flat_mapping(mappings, fl_idx, sl_idx, tl_idx, ll_idx, phy_addr,
...
@@ -154,6 +154,7 @@ def add_flat_mapping(mappings, fl_idx, sl_idx, tl_idx, ll_idx, phy_addr,
elif
map_type
==
LL_AP_PR_RO
:
elif
map_type
==
LL_AP_PR_RO
:
map_type_str
=
'
[P RO]
'
map_type_str
=
'
[P RO]
'
shareability_str
=
'
N/A
'
if
shareability
!=
-
1
:
if
shareability
!=
-
1
:
if
shareability
==
SH_NON_SHARE
:
if
shareability
==
SH_NON_SHARE
:
shareability_str
=
'
Non-Shareable
'
shareability_str
=
'
Non-Shareable
'
...
@@ -163,9 +164,8 @@ def add_flat_mapping(mappings, fl_idx, sl_idx, tl_idx, ll_idx, phy_addr,
...
@@ -163,9 +164,8 @@ def add_flat_mapping(mappings, fl_idx, sl_idx, tl_idx, ll_idx, phy_addr,
shareability_str
=
'
Outer-Shareable
'
shareability_str
=
'
Outer-Shareable
'
if
shareability
==
SH_INNER_SHARE
:
if
shareability
==
SH_INNER_SHARE
:
shareability_str
=
'
Inner-Shareable
'
shareability_str
=
'
Inner-Shareable
'
else
:
shareability_str
=
'
N/A
'
attr_indx_str
=
'
N/A
'
if
attr_indx
!=
-
1
:
if
attr_indx
!=
-
1
:
if
attr_indx
==
ATTR_IDX_NONCACHED
:
if
attr_indx
==
ATTR_IDX_NONCACHED
:
attr_indx_str
=
'
Non-Cached
'
attr_indx_str
=
'
Non-Cached
'
...
@@ -173,8 +173,6 @@ def add_flat_mapping(mappings, fl_idx, sl_idx, tl_idx, ll_idx, phy_addr,
...
@@ -173,8 +173,6 @@ def add_flat_mapping(mappings, fl_idx, sl_idx, tl_idx, ll_idx, phy_addr,
attr_indx_str
=
'
Cached
'
attr_indx_str
=
'
Cached
'
if
attr_indx
==
ATTR_IDX_DEV
:
if
attr_indx
==
ATTR_IDX_DEV
:
attr_indx_str
=
'
Device
'
attr_indx_str
=
'
Device
'
else
:
attr_indx_str
=
'
N/A
'
if
xn_bit
==
1
:
if
xn_bit
==
1
:
execute_never_str
=
'
True
'
execute_never_str
=
'
True
'
...
@@ -431,7 +429,7 @@ def parse_aarch64_tables(ramdump, d, domain_num):
...
@@ -431,7 +429,7 @@ def parse_aarch64_tables(ramdump, d, domain_num):
iommu_context
=
iommu_context
or
'
None attached
'
iommu_context
=
iommu_context
or
'
None attached
'
outfile
.
write
(
outfile
.
write
(
'
IOMMU Context
ttt
: %s. Domain: %s
'
'
IOMMU Context: %s. Domain: %s
'
'
[L2 cache redirect for page tables is %s]
\n
'
%
(
'
[L2 cache redirect for page tables is %s]
\n
'
%
(
iommu_context
,
d
.
client_name
,
redirect
))
iommu_context
,
d
.
client_name
,
redirect
))
outfile
.
write
(
outfile
.
write
(
...
...
This diff is collapsed.
Click to expand it.
linux-ramdump-parser-v2/iommulib.py
+
19
−
8
View file @
2ab0052f
# Copyright (c) 2014-201
6
, The Linux Foundation. All rights reserved.
# Copyright (c) 2014-201
7
, 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
...
@@ -76,11 +76,22 @@ class IommuLib(object):
...
@@ -76,11 +76,22 @@ class IommuLib(object):
arm_smmu_ops
=
self
.
ramdump
.
address_of
(
'
arm_smmu_ops
'
)
arm_smmu_ops
=
self
.
ramdump
.
address_of
(
'
arm_smmu_ops
'
)
dev_ptr
=
self
.
ramdump
.
read_structure_field
(
ptr
=
self
.
ramdump
.
read_structure_field
(
node
,
'
struct iommu_debug_attachment
'
,
'
group
'
)
if
ptr
is
not
None
:
dev_list
=
ptr
+
self
.
ramdump
.
field_offset
(
'
struct iommu_group
'
,
'
devices
'
)
dev
=
self
.
ramdump
.
read_structure_field
(
dev_list
,
'
struct list_head
'
,
'
next
'
)
client_name
=
self
.
ramdump
.
read_structure_cstring
(
dev
,
'
struct iommu_device
'
,
'
name
'
)
else
:
"""
Older kernel versions have the field
'
dev
'
instead of
'
iommu_group
'
.
"""
ptr
=
self
.
ramdump
.
read_structure_field
(
node
,
'
struct iommu_debug_attachment
'
,
'
dev
'
)
node
,
'
struct iommu_debug_attachment
'
,
'
dev
'
)
kobj_ptr
=
ptr
+
self
.
ramdump
.
field_offset
(
'
struct device
'
,
'
kobj
'
)
kobj_ptr
=
dev_ptr
+
self
.
ramdump
.
field_offset
(
'
struct device
'
,
'
kobj
'
)
client_name
=
self
.
ramdump
.
read_structure_cstring
(
client_name
=
self
.
ramdump
.
read_structure_cstring
(
kobj_ptr
,
'
struct kobject
'
,
'
name
'
)
kobj_ptr
,
'
struct kobject
'
,
'
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