Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
1846193b
Commit
1846193b
authored
Jul 07, 2016
by
Michael Ellerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
powerpc/xmon: Dump ISA 2.06 SPRs
Signed-off-by:
Michael Ellerman
<
mpe@ellerman.id.au
>
parent
56346ad8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
arch/powerpc/xmon/xmon.c
arch/powerpc/xmon/xmon.c
+31
-0
No files found.
arch/powerpc/xmon/xmon.c
View file @
1846193b
...
@@ -1682,6 +1682,35 @@ write_spr(int n, unsigned long val)
...
@@ -1682,6 +1682,35 @@ write_spr(int n, unsigned long val)
catch_spr_faults
=
0
;
catch_spr_faults
=
0
;
}
}
static
void
dump_206_sprs
(
void
)
{
#ifdef CONFIG_PPC64
if
(
!
cpu_has_feature
(
CPU_FTR_ARCH_206
))
return
;
/* Actually some of these pre-date 2.06, but whatevs */
printf
(
"srr0 = %.16x srr1 = %.16x dsisr = %.8x
\n
"
,
mfspr
(
SPRN_SRR0
),
mfspr
(
SPRN_SRR1
),
mfspr
(
SPRN_DSISR
));
printf
(
"dscr = %.16x ppr = %.16x pir = %.8x
\n
"
,
mfspr
(
SPRN_DSCR
),
mfspr
(
SPRN_PPR
),
mfspr
(
SPRN_PIR
));
if
(
!
(
mfmsr
()
&
MSR_HV
))
return
;
printf
(
"sdr1 = %.16x hdar = %.16x hdsisr = %.8x
\n
"
,
mfspr
(
SPRN_SDR1
),
mfspr
(
SPRN_HDAR
),
mfspr
(
SPRN_HDSISR
));
printf
(
"hsrr0 = %.16x hsrr1 = %.16x hdec = %.8x
\n
"
,
mfspr
(
SPRN_HSRR0
),
mfspr
(
SPRN_HSRR1
),
mfspr
(
SPRN_HDEC
));
printf
(
"lpcr = %.16x pcr = %.16x lpidr = %.8x
\n
"
,
mfspr
(
SPRN_LPCR
),
mfspr
(
SPRN_PCR
),
mfspr
(
SPRN_LPID
));
printf
(
"hsprg0 = %.16x hsprg1 = %.16x
\n
"
,
mfspr
(
SPRN_HSPRG0
),
mfspr
(
SPRN_HSPRG1
));
printf
(
"dabr = %.16x dabrx = %.16x
\n
"
,
mfspr
(
SPRN_DABR
),
mfspr
(
SPRN_DABRX
));
#endif
}
static
void
dump_one_spr
(
int
spr
,
bool
show_unimplemented
)
static
void
dump_one_spr
(
int
spr
,
bool
show_unimplemented
)
{
{
...
@@ -1734,6 +1763,8 @@ static void super_regs(void)
...
@@ -1734,6 +1763,8 @@ static void super_regs(void)
printf
(
"sp = "
REG
" sprg3 = "
REG
"
\n
"
,
sp
,
mfspr
(
SPRN_SPRG3
));
printf
(
"sp = "
REG
" sprg3 = "
REG
"
\n
"
,
sp
,
mfspr
(
SPRN_SPRG3
));
printf
(
"toc = "
REG
" dar = "
REG
"
\n
"
,
toc
,
mfspr
(
SPRN_DAR
));
printf
(
"toc = "
REG
" dar = "
REG
"
\n
"
,
toc
,
mfspr
(
SPRN_DAR
));
dump_206_sprs
();
return
;
return
;
}
}
case
'w'
:
{
case
'w'
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment