Deleted Added
full compact
trap-v4.c (292260) trap-v4.c (295267)
1/* $NetBSD: fault.c,v 1.45 2003/11/20 14:44:36 scw Exp $ */
2
3/*-
4 * Copyright 2004 Olivier Houchard
5 * Copyright 2003 Wasabi Systems, Inc.
6 * All rights reserved.
7 *
8 * Written by Steve C. Woodford for Wasabi Systems, Inc.

--- 65 unchanged lines hidden (view full) ---

74 * fault.c
75 *
76 * Fault handlers
77 *
78 * Created : 28/11/94
79 */
80
81#include <sys/cdefs.h>
1/* $NetBSD: fault.c,v 1.45 2003/11/20 14:44:36 scw Exp $ */
2
3/*-
4 * Copyright 2004 Olivier Houchard
5 * Copyright 2003 Wasabi Systems, Inc.
6 * All rights reserved.
7 *
8 * Written by Steve C. Woodford for Wasabi Systems, Inc.

--- 65 unchanged lines hidden (view full) ---

74 * fault.c
75 *
76 * Fault handlers
77 *
78 * Created : 28/11/94
79 */
80
81#include <sys/cdefs.h>
82__FBSDID("$FreeBSD: head/sys/arm/arm/trap.c 292260 2015-12-15 12:52:45Z mmel $");
82__FBSDID("$FreeBSD: head/sys/arm/arm/trap.c 295267 2016-02-04 17:01:38Z mmel $");
83
84#include <sys/param.h>
85#include <sys/systm.h>
86#include <sys/proc.h>
87#include <sys/lock.h>
88#include <sys/mutex.h>
89#include <sys/signalvar.h>
90

--- 15 unchanged lines hidden (view full) ---

106#endif
107
108#ifdef KDTRACE_HOOKS
109#include <sys/dtrace_bsd.h>
110#endif
111
112#define ReadWord(a) (*((volatile unsigned int *)(a)))
113
83
84#include <sys/param.h>
85#include <sys/systm.h>
86#include <sys/proc.h>
87#include <sys/lock.h>
88#include <sys/mutex.h>
89#include <sys/signalvar.h>
90

--- 15 unchanged lines hidden (view full) ---

106#endif
107
108#ifdef KDTRACE_HOOKS
109#include <sys/dtrace_bsd.h>
110#endif
111
112#define ReadWord(a) (*((volatile unsigned int *)(a)))
113
114extern char fusubailout[];
115
116#ifdef DEBUG
117int last_fault_code; /* For the benefit of pmap_fault_fixup() */
118#endif
119
120struct ksig {
121 int signb;
122 u_long code;
123};

--- 126 unchanged lines hidden (view full) ---

250 * FAULT_DOMAIN_P - Domain -- Page
251 * FAULT_PERM_S - Permission -- Section
252 * FAULT_PERM_P - Permission -- Page
253 *
254 * These are the main virtual memory-related faults signalled by
255 * the MMU.
256 */
257
114#ifdef DEBUG
115int last_fault_code; /* For the benefit of pmap_fault_fixup() */
116#endif
117
118struct ksig {
119 int signb;
120 u_long code;
121};

--- 126 unchanged lines hidden (view full) ---

248 * FAULT_DOMAIN_P - Domain -- Page
249 * FAULT_PERM_S - Permission -- Section
250 * FAULT_PERM_P - Permission -- Page
251 *
252 * These are the main virtual memory-related faults signalled by
253 * the MMU.
254 */
255
258 /* fusubailout is used by [fs]uswintr to avoid page faulting */
259 if (__predict_false(pcb->pcb_onfault == fusubailout)) {
260 tf->tf_r0 = EFAULT;
261 tf->tf_pc = (register_t)(intptr_t) pcb->pcb_onfault;
262 return;
263 }
264
265 /*
266 * Make sure the Program Counter is sane. We could fall foul of
267 * someone executing Thumb code, in which case the PC might not
268 * be word-aligned. This would cause a kernel alignment fault
269 * further down if we have to decode the current instruction.
270 * XXX: It would be nice to be able to support Thumb at some point.
271 */
272 if (__predict_false((tf->tf_pc & 3) != 0)) {

--- 474 unchanged lines hidden ---
256 /*
257 * Make sure the Program Counter is sane. We could fall foul of
258 * someone executing Thumb code, in which case the PC might not
259 * be word-aligned. This would cause a kernel alignment fault
260 * further down if we have to decode the current instruction.
261 * XXX: It would be nice to be able to support Thumb at some point.
262 */
263 if (__predict_false((tf->tf_pc & 3) != 0)) {

--- 474 unchanged lines hidden ---