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
Kirill Smelkov
linux
Commits
a83b9c3b
Commit
a83b9c3b
authored
Mar 30, 2004
by
Keith M. Wesolowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC32]: Display useful information in the event of a bad trap
parent
0efc3c5c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
arch/sparc/kernel/entry.S
arch/sparc/kernel/entry.S
+2
-3
arch/sparc/kernel/traps.c
arch/sparc/kernel/traps.c
+5
-5
No files found.
arch/sparc/kernel/entry.S
View file @
a83b9c3b
...
@@ -288,10 +288,9 @@ bad_trap_handler:
...
@@ -288,10 +288,9 @@ bad_trap_handler:
wr
%
l0
,
PSR_ET
,
%
psr
wr
%
l0
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
mov
%
l7
,
%
o0
!
trap
number
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
pt_regs
mov
%
l0
,
%
o1
!
psr
call
do_hw_interrupt
call
do_hw_interrupt
mov
%
l
1
,
%
o2
!
pc
mov
%
l
7
,
%
o1
!
trap
number
RESTORE_ALL
RESTORE_ALL
...
...
arch/sparc/kernel/traps.c
View file @
a83b9c3b
...
@@ -131,23 +131,23 @@ void die_if_kernel(char *str, struct pt_regs *regs)
...
@@ -131,23 +131,23 @@ void die_if_kernel(char *str, struct pt_regs *regs)
do_exit
(
SIGSEGV
);
do_exit
(
SIGSEGV
);
}
}
void
do_hw_interrupt
(
unsigned
long
type
,
unsigned
long
psr
,
unsigned
long
pc
)
void
do_hw_interrupt
(
struct
pt_regs
*
regs
,
unsigned
long
type
)
{
{
siginfo_t
info
;
siginfo_t
info
;
if
(
type
<
0x80
)
{
if
(
type
<
0x80
)
{
/* Sun OS's puke from bad traps, Linux survives! */
/* Sun OS's puke from bad traps, Linux survives! */
printk
(
"Unimplemented Sparc TRAP, type = %02lx
\n
"
,
type
);
printk
(
"Unimplemented Sparc TRAP, type = %02lx
\n
"
,
type
);
die_if_kernel
(
"Whee... Hello Mr. Penguin"
,
current
->
thread
.
k
regs
);
die_if_kernel
(
"Whee... Hello Mr. Penguin"
,
regs
);
}
}
if
(
psr
&
PSR_PS
)
if
(
regs
->
psr
&
PSR_PS
)
die_if_kernel
(
"Kernel bad trap"
,
current
->
thread
.
k
regs
);
die_if_kernel
(
"Kernel bad trap"
,
regs
);
info
.
si_signo
=
SIGILL
;
info
.
si_signo
=
SIGILL
;
info
.
si_errno
=
0
;
info
.
si_errno
=
0
;
info
.
si_code
=
ILL_ILLTRP
;
info
.
si_code
=
ILL_ILLTRP
;
info
.
si_addr
=
(
void
*
)
pc
;
info
.
si_addr
=
(
void
*
)
regs
->
pc
;
info
.
si_trapno
=
type
-
0x80
;
info
.
si_trapno
=
type
-
0x80
;
force_sig_info
(
SIGILL
,
&
info
,
current
);
force_sig_info
(
SIGILL
,
&
info
,
current
);
}
}
...
...
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