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
17f3324c
Commit
17f3324c
authored
May 26, 2009
by
Michal Simek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
microblaze_mmu_v2: Traps MMU update
Signed-off-by:
Michal Simek
<
monstr@monstr.eu
>
parent
65504a47
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
16 deletions
+42
-16
arch/microblaze/include/asm/exceptions.h
arch/microblaze/include/asm/exceptions.h
+8
-16
arch/microblaze/kernel/traps.c
arch/microblaze/kernel/traps.c
+34
-0
No files found.
arch/microblaze/include/asm/exceptions.h
View file @
17f3324c
/*
/*
* Preliminary support for HW exception handing for Microblaze
* Preliminary support for HW exception handing for Microblaze
*
*
* Copyright (C) 2008
Michal Simek
* Copyright (C) 2008
-2009 Michal Simek <monstr@monstr.eu>
* Copyright (C) 2008 PetaLogix
* Copyright (C) 2008
-2009
PetaLogix
* Copyright (C) 2005 John Williams <jwilliams@itee.uq.edu.au>
* Copyright (C) 2005 John Williams <jwilliams@itee.uq.edu.au>
*
*
* This file is subject to the terms and conditions of the GNU General
* This file is subject to the terms and conditions of the GNU General
...
@@ -64,21 +64,13 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
...
@@ -64,21 +64,13 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
void
die
(
const
char
*
str
,
struct
pt_regs
*
fp
,
long
err
);
void
die
(
const
char
*
str
,
struct
pt_regs
*
fp
,
long
err
);
void
_exception
(
int
signr
,
struct
pt_regs
*
regs
,
int
code
,
unsigned
long
addr
);
void
_exception
(
int
signr
,
struct
pt_regs
*
regs
,
int
code
,
unsigned
long
addr
);
#if defined(CONFIG_XMON)
#ifdef CONFIG_MMU
extern
void
xmon
(
struct
pt_regs
*
regs
);
void
__bug
(
const
char
*
file
,
int
line
,
void
*
data
);
extern
int
xmon_bpt
(
struct
pt_regs
*
regs
);
int
bad_trap
(
int
trap_num
,
struct
pt_regs
*
regs
);
extern
int
xmon_sstep
(
struct
pt_regs
*
regs
);
int
debug_trap
(
struct
pt_regs
*
regs
);
extern
int
xmon_iabr_match
(
struct
pt_regs
*
regs
);
#endif
/* CONFIG_MMU */
extern
int
xmon_dabr_match
(
struct
pt_regs
*
regs
);
extern
void
(
*
xmon_fault_handler
)(
struct
pt_regs
*
regs
);
void
(
*
debugger
)(
struct
pt_regs
*
regs
)
=
xmon
;
#if defined(CONFIG_KGDB)
int
(
*
debugger_bpt
)(
struct
pt_regs
*
regs
)
=
xmon_bpt
;
int
(
*
debugger_sstep
)(
struct
pt_regs
*
regs
)
=
xmon_sstep
;
int
(
*
debugger_iabr_match
)(
struct
pt_regs
*
regs
)
=
xmon_iabr_match
;
int
(
*
debugger_dabr_match
)(
struct
pt_regs
*
regs
)
=
xmon_dabr_match
;
void
(
*
debugger_fault_handler
)(
struct
pt_regs
*
regs
);
#elif defined(CONFIG_KGDB)
void
(
*
debugger
)(
struct
pt_regs
*
regs
);
void
(
*
debugger
)(
struct
pt_regs
*
regs
);
int
(
*
debugger_bpt
)(
struct
pt_regs
*
regs
);
int
(
*
debugger_bpt
)(
struct
pt_regs
*
regs
);
int
(
*
debugger_sstep
)(
struct
pt_regs
*
regs
);
int
(
*
debugger_sstep
)(
struct
pt_regs
*
regs
);
...
...
arch/microblaze/kernel/traps.c
View file @
17f3324c
...
@@ -97,3 +97,37 @@ void dump_stack(void)
...
@@ -97,3 +97,37 @@ void dump_stack(void)
show_stack
(
NULL
,
NULL
);
show_stack
(
NULL
,
NULL
);
}
}
EXPORT_SYMBOL
(
dump_stack
);
EXPORT_SYMBOL
(
dump_stack
);
#ifdef CONFIG_MMU
void
__bug
(
const
char
*
file
,
int
line
,
void
*
data
)
{
if
(
data
)
printk
(
KERN_CRIT
"kernel BUG at %s:%d (data = %p)!
\n
"
,
file
,
line
,
data
);
else
printk
(
KERN_CRIT
"kernel BUG at %s:%d!
\n
"
,
file
,
line
);
machine_halt
();
}
int
bad_trap
(
int
trap_num
,
struct
pt_regs
*
regs
)
{
printk
(
KERN_CRIT
"unimplemented trap %d called at 0x%08lx, pid %d!
\n
"
,
trap_num
,
regs
->
pc
,
current
->
pid
);
return
-
ENOSYS
;
}
int
debug_trap
(
struct
pt_regs
*
regs
)
{
int
i
;
printk
(
KERN_CRIT
"debug trap
\n
"
);
for
(
i
=
0
;
i
<
32
;
i
++
)
{
/* printk("r%i:%08X\t",i,regs->gpr[i]); */
if
((
i
%
4
)
==
3
)
printk
(
KERN_CRIT
"
\n
"
);
}
printk
(
KERN_CRIT
"pc:%08lX
\t
msr:%08lX
\n
"
,
regs
->
pc
,
regs
->
msr
);
return
-
ENOSYS
;
}
#endif
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