xref: /openbmc/linux/arch/arm/mm/fsr-2level.c (revision f1575595)
1 // SPDX-License-Identifier: GPL-2.0
2 static struct fsr_info fsr_info[] = {
3 	/*
4 	 * The following are the standard ARMv3 and ARMv4 aborts.  ARMv5
5 	 * defines these to be "precise" aborts.
6 	 */
7 	{ do_bad,		SIGSEGV, 0,		"vector exception"		   },
8 	{ do_bad,		SIGBUS,	 BUS_ADRALN,	"alignment exception"		   },
9 	{ do_bad,		SIGKILL, 0,		"terminal exception"		   },
10 	{ do_bad,		SIGBUS,	 BUS_ADRALN,	"alignment exception"		   },
11 	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
12 	{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"section translation fault"	   },
13 	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
14 	{ do_page_fault,	SIGSEGV, SEGV_MAPERR,	"page translation fault"	   },
15 	{ do_bad,		SIGBUS,	 0,		"external abort on non-linefetch"  },
16 	{ do_bad,		SIGSEGV, SEGV_ACCERR,	"section domain fault"		   },
17 	{ do_bad,		SIGBUS,	 0,		"external abort on non-linefetch"  },
18 	{ do_bad,		SIGSEGV, SEGV_ACCERR,	"page domain fault"		   },
19 	{ do_bad,		SIGBUS,	 0,		"external abort on translation"	   },
20 	{ do_sect_fault,	SIGSEGV, SEGV_ACCERR,	"section permission fault"	   },
21 	{ do_bad,		SIGBUS,	 0,		"external abort on translation"	   },
22 	{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"page permission fault"		   },
23 	/*
24 	 * The following are "imprecise" aborts, which are signalled by bit
25 	 * 10 of the FSR, and may not be recoverable.  These are only
26 	 * supported if the CPU abort handler supports bit 10.
27 	 */
28 	{ do_bad,		SIGBUS,  0,		"unknown 16"			   },
29 	{ do_bad,		SIGBUS,  0,		"unknown 17"			   },
30 	{ do_bad,		SIGBUS,  0,		"unknown 18"			   },
31 	{ do_bad,		SIGBUS,  0,		"unknown 19"			   },
32 	{ do_bad,		SIGBUS,  0,		"lock abort"			   }, /* xscale */
33 	{ do_bad,		SIGBUS,  0,		"unknown 21"			   },
34 	{ do_bad,		SIGBUS,  BUS_OBJERR,	"imprecise external abort"	   }, /* xscale */
35 	{ do_bad,		SIGBUS,  0,		"unknown 23"			   },
36 	{ do_bad,		SIGBUS,  0,		"dcache parity error"		   }, /* xscale */
37 	{ do_bad,		SIGBUS,  0,		"unknown 25"			   },
38 	{ do_bad,		SIGBUS,  0,		"unknown 26"			   },
39 	{ do_bad,		SIGBUS,  0,		"unknown 27"			   },
40 	{ do_bad,		SIGBUS,  0,		"unknown 28"			   },
41 	{ do_bad,		SIGBUS,  0,		"unknown 29"			   },
42 	{ do_bad,		SIGBUS,  0,		"unknown 30"			   },
43 	{ do_bad,		SIGBUS,  0,		"unknown 31"			   },
44 };
45 
46 static struct fsr_info ifsr_info[] = {
47 	{ do_bad,		SIGBUS,  0,		"unknown 0"			   },
48 	{ do_bad,		SIGBUS,  0,		"unknown 1"			   },
49 	{ do_bad,		SIGBUS,  0,		"debug event"			   },
50 	{ do_bad,		SIGSEGV, SEGV_ACCERR,	"section access flag fault"	   },
51 	{ do_bad,		SIGBUS,  0,		"unknown 4"			   },
52 	{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"section translation fault"	   },
53 	{ do_bad,		SIGSEGV, SEGV_ACCERR,	"page access flag fault"	   },
54 	{ do_page_fault,	SIGSEGV, SEGV_MAPERR,	"page translation fault"	   },
55 	{ do_bad,		SIGBUS,	 0,		"external abort on non-linefetch"  },
56 	{ do_bad,		SIGSEGV, SEGV_ACCERR,	"section domain fault"		   },
57 	{ do_bad,		SIGBUS,  0,		"unknown 10"			   },
58 	{ do_bad,		SIGSEGV, SEGV_ACCERR,	"page domain fault"		   },
59 	{ do_bad,		SIGBUS,	 0,		"external abort on translation"	   },
60 	{ do_sect_fault,	SIGSEGV, SEGV_ACCERR,	"section permission fault"	   },
61 	{ do_bad,		SIGBUS,	 0,		"external abort on translation"	   },
62 	{ do_page_fault,	SIGSEGV, SEGV_ACCERR,	"page permission fault"		   },
63 	{ do_bad,		SIGBUS,  0,		"unknown 16"			   },
64 	{ do_bad,		SIGBUS,  0,		"unknown 17"			   },
65 	{ do_bad,		SIGBUS,  0,		"unknown 18"			   },
66 	{ do_bad,		SIGBUS,  0,		"unknown 19"			   },
67 	{ do_bad,		SIGBUS,  0,		"unknown 20"			   },
68 	{ do_bad,		SIGBUS,  0,		"unknown 21"			   },
69 	{ do_bad,		SIGBUS,  0,		"unknown 22"			   },
70 	{ do_bad,		SIGBUS,  0,		"unknown 23"			   },
71 	{ do_bad,		SIGBUS,  0,		"unknown 24"			   },
72 	{ do_bad,		SIGBUS,  0,		"unknown 25"			   },
73 	{ do_bad,		SIGBUS,  0,		"unknown 26"			   },
74 	{ do_bad,		SIGBUS,  0,		"unknown 27"			   },
75 	{ do_bad,		SIGBUS,  0,		"unknown 28"			   },
76 	{ do_bad,		SIGBUS,  0,		"unknown 29"			   },
77 	{ do_bad,		SIGBUS,  0,		"unknown 30"			   },
78 	{ do_bad,		SIGBUS,  0,		"unknown 31"			   },
79 };
80