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
5400f10b
Commit
5400f10b
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 "lrdp-v2: iommu: use sizes module"
parents
0d45afa1
e8e68cb9
No related branches found
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/parsers/iommu.py
+2
-20
2 additions, 20 deletions
linux-ramdump-parser-v2/parsers/iommu.py
with
2 additions
and
20 deletions
linux-ramdump-parser-v2/parsers/iommu.py
+
2
−
20
View file @
5400f10b
...
...
@@ -15,28 +15,10 @@ import rb_tree
import
linux_list
as
llist
from
print_out
import
print_out_str
from
parser_util
import
register_parser
,
RamParser
from
sizes
import
SZ_4K
,
SZ_64K
,
SZ_1M
,
SZ_16M
,
get_order
,
order_size_strings
IOMMU_DOMAIN_VAR
=
'
domain_root
'
SZ_4K
=
0x1000
SZ_64K
=
0x10000
SZ_1M
=
0x100000
SZ_16M
=
0x1000000
MAP_SIZE_STR
=
[
'
4K
'
,
'
8K
'
,
'
16K
'
,
'
32K
'
,
'
64K
'
,
'
128K
'
,
'
256K
'
,
'
512K
'
,
'
1M
'
,
'
2M
'
,
'
4M
'
,
'
8M
'
,
'
16M
'
]
def
get_order
(
size
):
order
=
math
.
log
(
size
,
2
)
if
(
order
%
1.0
)
!=
0.0
:
print
'
ERROR: Number is not a power of 2: %x
'
%
(
size
)
order
=
0
else
:
order
-=
math
.
log
(
SZ_4K
,
2
)
return
int
(
order
)
@register_parser
(
'
--print-iommu-pg-tables
'
,
'
Print IOMMU page tables
'
)
class
IOMMU
(
RamParser
):
...
...
@@ -427,7 +409,7 @@ class IOMMU(RamParser):
self
.
out_file
.
write
(
'
0x%08x--0x%08x [0x%08x] A:0x%08x--0x%08x [0x%08x] %s[%s]
\n
'
%
(
mapping
.
virt_start
,
mapping
.
virt_end
,
mapping
.
virt_size
(),
mapping
.
phys_start
,
mapping
.
phys_end
,
mapping
.
phys_size
(),
mapping
.
mapping_type
,
MAP_SIZE_STR
[
get_order
(
mapping
.
mapping_size
)]))
mapping
.
phys_size
(),
mapping
.
mapping_type
,
order_size_strings
[
get_order
(
mapping
.
mapping_size
)]))
else
:
self
.
out_file
.
write
(
'
0x%08x--0x%08x [0x%08x] [UNMAPPED]
\n
'
%
(
mapping
.
virt_start
,
mapping
.
virt_end
,
mapping
.
virt_size
()))
...
...
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