mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
For data and instruction prefetch aborts, call the same handler in the C
code, passing a 0/1 flag that indicates which type of abort it was. This sets the stage for unifying the handling of page faults in a single routine. Submitted by: Svatopluk Kraus <onwahe@gmail.com>, Michal Meloun <meloun@miracle.cz
This commit is contained in:
parent
b05d247e35
commit
26659812e2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276206
@ -320,7 +320,8 @@ ASENTRY_NP(prefetch_abort_entry)
|
||||
PUSHFRAMEINSVC /* mode stack, build trapframe there. */
|
||||
adr lr, exception_exit /* Return from handler via standard */
|
||||
mov r0, sp /* exception exit routine. Pass the */
|
||||
b prefetch_abort_handler /* trapframe to the handler. */
|
||||
mov r1, #1 /* Type flag */
|
||||
b _C_LABEL(abort_handler)
|
||||
END(prefetch_abort_entry)
|
||||
|
||||
/*
|
||||
@ -337,9 +338,10 @@ ASENTRY_NP(data_abort_entry)
|
||||
#endif
|
||||
sub lr, lr, #8 /* Adjust the lr. Transition to scv32 */
|
||||
PUSHFRAMEINSVC /* mode stack, build trapframe there. */
|
||||
adr lr, exception_exit /* Return from handler via standard */
|
||||
mov r0, sp /* exception exit routine. Pass the */
|
||||
b data_abort_handler /* trapframe to the handler. */
|
||||
adr lr, exception_exit /* Exception exit routine */
|
||||
mov r0, sp /* Trapframe to the handler */
|
||||
mov r1, #0 /* Type flag */
|
||||
b _C_LABEL(abort_handler)
|
||||
END(data_abort_entry)
|
||||
|
||||
/*
|
||||
|
@ -127,6 +127,7 @@ static int dab_align(struct trapframe *, u_int, u_int, struct thread *,
|
||||
struct ksig *);
|
||||
static int dab_buserr(struct trapframe *, u_int, u_int, struct thread *,
|
||||
struct ksig *);
|
||||
static void prefetch_abort_handler(struct trapframe *);
|
||||
|
||||
static const struct data_abort data_aborts[] = {
|
||||
{dab_fatal, "Vector Exception"},
|
||||
@ -171,7 +172,7 @@ call_trapsignal(struct thread *td, int sig, u_long code)
|
||||
}
|
||||
|
||||
void
|
||||
data_abort_handler(struct trapframe *tf)
|
||||
abort_handler(struct trapframe *tf, int type)
|
||||
{
|
||||
struct vm_map *map;
|
||||
struct pcb *pcb;
|
||||
@ -184,6 +185,8 @@ data_abort_handler(struct trapframe *tf)
|
||||
struct ksig ksig;
|
||||
struct proc *p;
|
||||
|
||||
if (type == 1)
|
||||
return (prefetch_abort_handler(tf));
|
||||
|
||||
/* Grab FAR/FSR before enabling interrupts */
|
||||
far = cpu_faultaddress();
|
||||
@ -605,7 +608,7 @@ dab_buserr(struct trapframe *tf, u_int fsr, u_int far, struct thread *td,
|
||||
* does no have read permission so send it a signal.
|
||||
* Otherwise fault the page in and try again.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
prefetch_abort_handler(struct trapframe *tf)
|
||||
{
|
||||
struct thread *td;
|
||||
|
@ -20,8 +20,7 @@ struct trapframe;
|
||||
void arm_lock_cache_line(vm_offset_t);
|
||||
void init_proc0(vm_offset_t kstack);
|
||||
void halt(void);
|
||||
void data_abort_handler(struct trapframe *);
|
||||
void prefetch_abort_handler(struct trapframe *);
|
||||
void abort_handler(struct trapframe *, int );
|
||||
void set_stackptrs(int cpu);
|
||||
void undefinedinstruction_bounce(struct trapframe *);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user