trap-v6.c (295255) | trap-v6.c (295267) |
---|---|
1/*- 2 * Copyright 2014 Olivier Houchard <cognet@FreeBSD.org> 3 * Copyright 2014 Svatopluk Kraus <onwahe@gmail.com> 4 * Copyright 2014 Michal Meloun <meloun@miracle.cz> 5 * Copyright 2014 Andrew Turner <andrew@FreeBSD.org> 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include "opt_ktrace.h" 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright 2014 Olivier Houchard <cognet@FreeBSD.org> 3 * Copyright 2014 Svatopluk Kraus <onwahe@gmail.com> 4 * Copyright 2014 Michal Meloun <meloun@miracle.cz> 5 * Copyright 2014 Andrew Turner <andrew@FreeBSD.org> 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include "opt_ktrace.h" 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/arm/arm/trap-v6.c 295255 2016-02-04 13:35:40Z skra $"); | 33__FBSDID("$FreeBSD: head/sys/arm/arm/trap-v6.c 295267 2016-02-04 17:01:38Z mmel $"); |
34 35#include <sys/param.h> 36#include <sys/bus.h> 37#include <sys/systm.h> 38#include <sys/proc.h> 39#include <sys/kernel.h> 40#include <sys/lock.h> 41#include <sys/mutex.h> --- 23 unchanged lines hidden (view full) --- 65#include <sys/kdb.h> 66#include <machine/db_machdep.h> 67#endif 68 69#ifdef KDTRACE_HOOKS 70#include <sys/dtrace_bsd.h> 71#endif 72 | 34 35#include <sys/param.h> 36#include <sys/bus.h> 37#include <sys/systm.h> 38#include <sys/proc.h> 39#include <sys/kernel.h> 40#include <sys/lock.h> 41#include <sys/mutex.h> --- 23 unchanged lines hidden (view full) --- 65#include <sys/kdb.h> 66#include <machine/db_machdep.h> 67#endif 68 69#ifdef KDTRACE_HOOKS 70#include <sys/dtrace_bsd.h> 71#endif 72 |
73extern char fusubailout[]; | |
74extern char cachebailout[]; 75 76#ifdef DEBUG 77int last_fault_code; /* For the benefit of pmap_fault_fixup() */ 78#endif 79 80struct ksig { 81 int sig; --- 358 unchanged lines hidden (view full) --- 440 441 /* Handle remaining I-cache aborts. */ 442 if (idx == FAULT_ICACHE) { 443 if (abort_icache(tf, idx, fsr, far, prefetch, td, &ksig)) 444 goto do_trapsignal; 445 goto out; 446 } 447 | 73extern char cachebailout[]; 74 75#ifdef DEBUG 76int last_fault_code; /* For the benefit of pmap_fault_fixup() */ 77#endif 78 79struct ksig { 80 int sig; --- 358 unchanged lines hidden (view full) --- 439 440 /* Handle remaining I-cache aborts. */ 441 if (idx == FAULT_ICACHE) { 442 if (abort_icache(tf, idx, fsr, far, prefetch, td, &ksig)) 443 goto do_trapsignal; 444 goto out; 445 } 446 |
448 /* fusubailout is used by [fs]uswintr to avoid page faulting. */ 449 if (__predict_false(pcb->pcb_onfault == fusubailout)) { 450 tf->tf_r0 = EFAULT; 451 tf->tf_pc = (register_t)pcb->pcb_onfault; 452 return; 453 } 454 | |
455 va = trunc_page(far); 456 if (va >= KERNBASE) { 457 /* 458 * Don't allow user-mode faults in kernel address space. 459 */ 460 if (usermode) 461 goto nogo; 462 --- 195 unchanged lines hidden --- | 447 va = trunc_page(far); 448 if (va >= KERNBASE) { 449 /* 450 * Don't allow user-mode faults in kernel address space. 451 */ 452 if (usermode) 453 goto nogo; 454 --- 195 unchanged lines hidden --- |