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
d40948ea
Commit
d40948ea
authored
9 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "ldrpv2: Clean up cachedump library for 8992"
parents
a71f4967
29cd88a1
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/cachedumplib.py
+29
-11
29 additions, 11 deletions
linux-ramdump-parser-v2/cachedumplib.py
with
29 additions
and
11 deletions
linux-ramdump-parser-v2/cachedumplib.py
+
29
−
11
View file @
d40948ea
...
...
@@ -95,7 +95,8 @@ class CacheDumpType_v1(CacheDump):
self
.
tableformat
.
addColumn
(
'
Set
'
,
'
{0:03x}
'
)
self
.
ramdump
=
None
self
.
linefmt
=
None
self
.
HACK_HEADER_OFFSET
=
-
1
# used for headers not matching CacheDumpType_v1 format
self
.
unsupported_header_offset
=
-
1
for
key
in
CacheDumpKeys_v1
:
setattr
(
self
,
key
,
None
)
...
...
@@ -119,8 +120,8 @@ class CacheDumpType_v1(CacheDump):
"""
add the information from the header to this object. Returns
number of bytes read
"""
if
self
.
HACK_HEADER_OFFSET
>=
0
:
return
self
.
HACK_HEADER_OFFSET
if
self
.
unsupported_header_offset
>=
0
:
return
self
.
unsupported_header_offset
items
=
self
.
ramdump
.
read_string
(
start
,
CacheDumpFormatStr_v1
,
virtual
=
False
)
if
items
is
None
:
...
...
@@ -169,7 +170,7 @@ class L1_DCache_A53(CacheDumpType_v1):
self
.
tableformat
.
addColumn
(
'
DC
'
,
'
{0:02b}
'
)
self
.
tableformat
.
addColumn
(
'
0A
'
,
'
{0:02b}
'
)
self
.
tableformat
.
addColumn
(
'
0S
'
,
'
{0:02b}
'
)
self
.
HACK_HEADER_OFFSET
=
0
self
.
unsupported_header_offset
=
0
self
.
TagSize
=
2
self
.
LineSize
=
16
self
.
NumSets
=
0x80
...
...
@@ -219,7 +220,7 @@ class L1_DCache_A57(CacheDumpType_v1):
self
.
tableformat
.
addColumn
(
'
RAW_MESI
'
,
'
{0:02}
'
)
self
.
tableformat
.
addColumn
(
'
N
'
)
self
.
tableformat
.
addColumn
(
'
PA [43:14]
'
,
'
{0:016x}
'
,
16
)
self
.
HACK_HEADER_OFFSET
=
0x
C
self
.
unsupported_header_offset
=
0x
0
self
.
TagSize
=
2
self
.
LineSize
=
16
self
.
NumSets
=
0x100
...
...
@@ -258,7 +259,7 @@ class L1_ICache_A57(CacheDumpType_v1):
self
.
tableformat
.
addColumn
(
'
VALID
'
)
self
.
tableformat
.
addColumn
(
'
N
'
)
self
.
tableformat
.
addColumn
(
'
PA [43:12]
'
,
'
{0:016x}
'
,
16
)
self
.
HACK_HEADER_OFFSET
=
0
self
.
unsupported_header_offset
=
0
self
.
TagSize
=
2
self
.
LineSize
=
16
self
.
NumSets
=
0x100
...
...
@@ -279,16 +280,16 @@ class L1_ICache_A57(CacheDumpType_v1):
class
L2_Cache_A57
(
CacheDumpType_v1
):
"""
Refer to ARM documentation:cortex_a57_trm
"""
def
__init__
(
self
):
def
__init__
(
self
,
numsets
):
super
(
L2_Cache_A57
,
self
).
__init__
()
self
.
tableformat
.
addColumn
(
'
MESI
'
)
self
.
tableformat
.
addColumn
(
'
Raw MESI
'
,
'
{0:02}
'
)
self
.
tableformat
.
addColumn
(
'
N
'
)
self
.
tableformat
.
addColumn
(
'
PA [43:15]
'
,
'
{0:016x}
'
,
16
)
self
.
HACK_HEADER_OFFSET
=
0
self
.
unsupported_header_offset
=
0
self
.
TagSize
=
4
self
.
LineSize
=
16
self
.
NumSets
=
0x800
self
.
NumSets
=
numsets
self
.
NumWays
=
0x10
def
MOESI_to_string
(
self
,
num
):
...
...
@@ -333,7 +334,24 @@ lookuptable[(8994, 0x65, 0)] = L1_ICache_A57()
lookuptable
[(
8994
,
0x66
,
0
)]
=
L1_ICache_A57
()
lookuptable
[(
8994
,
0x67
,
0
)]
=
L1_ICache_A57
()
lookuptable
[(
8994
,
0xC1
,
0
)]
=
L2_Cache_A57
()
lookuptable
[(
8994
,
0xC1
,
0
)]
=
L2_Cache_A57
(
numsets
=
0x800
)
lookuptable
[(
8994
,
0x80
,
0x100
)]
=
L1_DCache_A53
()
lookuptable
[(
8994
,
0x81
,
0x100
)]
=
L1_DCache_A53
()
lookuptable
[(
8994
,
0x82
,
0x100
)]
=
L1_DCache_A53
()
lookuptable
[(
8994
,
0x83
,
0x100
)]
=
L1_DCache_A53
()
lookuptable
[(
8994
,
0x84
,
0x100
)]
=
L1_DCache_A57
()
lookuptable
[(
8994
,
0x85
,
0x100
)]
=
L1_DCache_A57
()
lookuptable
[(
8994
,
0x86
,
0x100
)]
=
L1_DCache_A57
()
lookuptable
[(
8994
,
0x87
,
0x100
)]
=
L1_DCache_A57
()
lookuptable
[(
8994
,
0x64
,
0x100
)]
=
L1_ICache_A57
()
lookuptable
[(
8994
,
0x65
,
0x100
)]
=
L1_ICache_A57
()
lookuptable
[(
8994
,
0x66
,
0x100
)]
=
L1_ICache_A57
()
lookuptable
[(
8994
,
0x67
,
0x100
)]
=
L1_ICache_A57
()
lookuptable
[(
8994
,
0xC1
,
0x100
)]
=
L2_Cache_A57
(
numsets
=
0x800
)
#8992
lookuptable
[(
8992
,
0x80
,
0x100
)]
=
L1_DCache_A53
()
...
...
@@ -346,4 +364,4 @@ lookuptable[(8992, 0x85, 0x100)] = L1_DCache_A57()
lookuptable
[(
8992
,
0x64
,
0x100
)]
=
L1_ICache_A57
()
lookuptable
[(
8992
,
0x65
,
0x100
)]
=
L1_ICache_A57
()
lookuptable
[(
8992
,
0xC1
,
0x100
)]
=
L2_Cache_A57
()
lookuptable
[(
8992
,
0xC1
,
0x100
)]
=
L2_Cache_A57
(
numsets
=
0x400
)
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