1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/arch/arm/kernel/traps.c
5 * Copyright (C) 1995-2009 Russell King
6 * Fragments that appear the same as linux/arch/i386/kernel/traps.c (C) Linus Torvalds
8 * 'traps.c' handles hardware exceptions after we have saved some state in
9 * 'linux/arch/arm/lib/traps.S'. Mostly a debugging aid, but will probably
10 * kill the offending process.
12 #include <linux/signal.h>
13 #include <linux/personality.h>
14 #include <linux/kallsyms.h>
15 #include <linux/spinlock.h>
16 #include <linux/uaccess.h>
17 #include <linux/hardirq.h>
18 #include <linux/kdebug.h>
19 #include <linux/kprobes.h>
20 #include <linux/module.h>
21 #include <linux/kexec.h>
22 #include <linux/bug.h>
23 #include <linux/delay.h>
24 #include <linux/init.h>
25 #include <linux/sched/signal.h>
26 #include <linux/sched/debug.h>
27 #include <linux/sched/task_stack.h>
28 #include <linux/irq.h>
30 #include <linux/atomic.h>
31 #include <asm/cacheflush.h>
32 #include <asm/exception.h>
33 #include <asm/spectre.h>
34 #include <asm/unistd.h>
35 #include <asm/traps.h>
36 #include <asm/ptrace.h>
37 #include <asm/unwind.h>
39 #include <asm/system_misc.h>
40 #include <asm/opcodes.h>
43 static const char *handler
[]= {
48 "undefined instruction",
53 #ifdef CONFIG_DEBUG_USER
54 unsigned int user_debug
;
56 static int __init
user_debug_setup(char *str
)
58 get_option(&str
, &user_debug
);
61 __setup("user_debug=", user_debug_setup
);
64 static void dump_mem(const char *, const char *, unsigned long, unsigned long);
66 void dump_backtrace_entry(unsigned long where
, unsigned long from
,
67 unsigned long frame
, const char *loglvl
)
69 unsigned long end
= frame
+ 4 + sizeof(struct pt_regs
);
71 #ifdef CONFIG_KALLSYMS
72 printk("%s[<%08lx>] (%ps) from [<%08lx>] (%pS)\n",
73 loglvl
, where
, (void *)where
, from
, (void *)from
);
75 printk("%sFunction entered at [<%08lx>] from [<%08lx>]\n",
79 if (in_entry_text(from
) && end
<= ALIGN(frame
, THREAD_SIZE
))
80 dump_mem(loglvl
, "Exception stack", frame
+ 4, end
);
83 void dump_backtrace_stm(u32
*stack
, u32 instruction
, const char *loglvl
)
89 for (reg
= 10, x
= 0, p
= str
; reg
>= 0; reg
--) {
90 if (instruction
& BIT(reg
)) {
91 p
+= sprintf(p
, " r%d:%08x", reg
, *stack
--);
95 printk("%s%s\n", loglvl
, str
);
100 printk("%s%s\n", loglvl
, str
);
103 #ifndef CONFIG_ARM_UNWIND
105 * Stack pointers should always be within the kernels view of
106 * physical memory. If it is not there, then we can't dump
107 * out any information relating to the stack.
109 static int verify_stack(unsigned long sp
)
111 if (sp
< PAGE_OFFSET
||
112 (sp
> (unsigned long)high_memory
&& high_memory
!= NULL
))
120 * Dump out the contents of some memory nicely...
122 static void dump_mem(const char *lvl
, const char *str
, unsigned long bottom
,
128 printk("%s%s(0x%08lx to 0x%08lx)\n", lvl
, str
, bottom
, top
);
130 for (first
= bottom
& ~31; first
< top
; first
+= 32) {
132 char str
[sizeof(" 12345678") * 8 + 1];
134 memset(str
, ' ', sizeof(str
));
135 str
[sizeof(str
) - 1] = '\0';
137 for (p
= first
, i
= 0; i
< 8 && p
< top
; i
++, p
+= 4) {
138 if (p
>= bottom
&& p
< top
) {
140 if (!get_kernel_nofault(val
, (unsigned long *)p
))
141 sprintf(str
+ i
* 9, " %08lx", val
);
143 sprintf(str
+ i
* 9, " ????????");
146 printk("%s%04lx:%s\n", lvl
, first
& 0xffff, str
);
150 static void dump_instr(const char *lvl
, struct pt_regs
*regs
)
152 unsigned long addr
= instruction_pointer(regs
);
153 const int thumb
= thumb_mode(regs
);
154 const int width
= thumb
? 4 : 8;
155 char str
[sizeof("00000000 ") * 5 + 2 + 1], *p
= str
;
159 * Note that we now dump the code first, just in case the backtrace
163 for (i
= -4; i
< 1 + !!thumb
; i
++) {
164 unsigned int val
, bad
;
166 if (!user_mode(regs
)) {
169 bad
= get_kernel_nofault(val16
, &((u16
*)addr
)[i
]);
172 bad
= get_kernel_nofault(val
, &((u32
*)addr
)[i
]);
176 bad
= get_user(val
, &((u16
*)addr
)[i
]);
178 bad
= get_user(val
, &((u32
*)addr
)[i
]);
182 p
+= sprintf(p
, i
== 0 ? "(%0*x) " : "%0*x ",
185 p
+= sprintf(p
, "bad PC value");
189 printk("%sCode: %s\n", lvl
, str
);
192 #ifdef CONFIG_ARM_UNWIND
193 static inline void dump_backtrace(struct pt_regs
*regs
, struct task_struct
*tsk
,
196 unwind_backtrace(regs
, tsk
, loglvl
);
199 static void dump_backtrace(struct pt_regs
*regs
, struct task_struct
*tsk
,
202 unsigned int fp
, mode
;
205 printk("%sBacktrace: ", loglvl
);
211 fp
= frame_pointer(regs
);
212 mode
= processor_mode(regs
);
213 } else if (tsk
!= current
) {
214 fp
= thread_saved_fp(tsk
);
217 asm("mov %0, fp" : "=r" (fp
) : : "cc");
222 pr_cont("no frame pointer");
224 } else if (verify_stack(fp
)) {
225 pr_cont("invalid frame pointer 0x%08x", fp
);
227 } else if (fp
< (unsigned long)end_of_stack(tsk
))
228 pr_cont("frame pointer underflow");
232 c_backtrace(fp
, mode
, loglvl
);
236 void show_stack(struct task_struct
*tsk
, unsigned long *sp
, const char *loglvl
)
238 dump_backtrace(NULL
, tsk
, loglvl
);
242 #ifdef CONFIG_PREEMPT
243 #define S_PREEMPT " PREEMPT"
244 #elif defined(CONFIG_PREEMPT_RT)
245 #define S_PREEMPT " PREEMPT_RT"
254 #ifdef CONFIG_THUMB2_KERNEL
255 #define S_ISA " THUMB2"
260 static int __die(const char *str
, int err
, struct pt_regs
*regs
)
262 struct task_struct
*tsk
= current
;
263 static int die_counter
;
266 pr_emerg("Internal error: %s: %x [#%d]" S_PREEMPT S_SMP S_ISA
"\n",
267 str
, err
, ++die_counter
);
269 /* trap and error numbers are mostly meaningless on ARM */
270 ret
= notify_die(DIE_OOPS
, str
, regs
, err
, tsk
->thread
.trap_no
, SIGSEGV
);
271 if (ret
== NOTIFY_STOP
)
276 __show_regs_alloc_free(regs
);
277 pr_emerg("Process %.*s (pid: %d, stack limit = 0x%p)\n",
278 TASK_COMM_LEN
, tsk
->comm
, task_pid_nr(tsk
), end_of_stack(tsk
));
280 if (!user_mode(regs
) || in_interrupt()) {
281 dump_mem(KERN_EMERG
, "Stack: ", regs
->ARM_sp
,
282 THREAD_SIZE
+ (unsigned long)task_stack_page(tsk
));
283 dump_backtrace(regs
, tsk
, KERN_EMERG
);
284 dump_instr(KERN_EMERG
, regs
);
290 static arch_spinlock_t die_lock
= __ARCH_SPIN_LOCK_UNLOCKED
;
291 static int die_owner
= -1;
292 static unsigned int die_nest_count
;
294 static unsigned long oops_begin(void)
301 /* racy, but better than risking deadlock. */
302 raw_local_irq_save(flags
);
303 cpu
= smp_processor_id();
304 if (!arch_spin_trylock(&die_lock
)) {
305 if (cpu
== die_owner
)
306 /* nested oops. should stop eventually */;
308 arch_spin_lock(&die_lock
);
317 static void oops_end(unsigned long flags
, struct pt_regs
*regs
, int signr
)
319 if (regs
&& kexec_should_crash(current
))
324 add_taint(TAINT_DIE
, LOCKDEP_NOW_UNRELIABLE
);
327 /* Nest count reaches zero, release the lock. */
328 arch_spin_unlock(&die_lock
);
329 raw_local_irq_restore(flags
);
333 panic("Fatal exception in interrupt");
335 panic("Fatal exception");
341 * This function is protected against re-entrancy.
343 void die(const char *str
, struct pt_regs
*regs
, int err
)
345 enum bug_trap_type bug_type
= BUG_TRAP_TYPE_NONE
;
346 unsigned long flags
= oops_begin();
349 if (!user_mode(regs
))
350 bug_type
= report_bug(regs
->ARM_pc
, regs
);
351 if (bug_type
!= BUG_TRAP_TYPE_NONE
)
354 if (__die(str
, err
, regs
))
357 oops_end(flags
, regs
, sig
);
360 void arm_notify_die(const char *str
, struct pt_regs
*regs
,
361 int signo
, int si_code
, void __user
*addr
,
362 unsigned long err
, unsigned long trap
)
364 if (user_mode(regs
)) {
365 current
->thread
.error_code
= err
;
366 current
->thread
.trap_no
= trap
;
368 force_sig_fault(signo
, si_code
, addr
);
374 #ifdef CONFIG_GENERIC_BUG
376 int is_valid_bugaddr(unsigned long pc
)
378 #ifdef CONFIG_THUMB2_KERNEL
380 u16 insn
= __opcode_to_mem_thumb16(BUG_INSTR_VALUE
);
383 u32 insn
= __opcode_to_mem_arm(BUG_INSTR_VALUE
);
386 if (get_kernel_nofault(bkpt
, (void *)pc
))
394 static LIST_HEAD(undef_hook
);
395 static DEFINE_RAW_SPINLOCK(undef_lock
);
397 void register_undef_hook(struct undef_hook
*hook
)
401 raw_spin_lock_irqsave(&undef_lock
, flags
);
402 list_add(&hook
->node
, &undef_hook
);
403 raw_spin_unlock_irqrestore(&undef_lock
, flags
);
406 void unregister_undef_hook(struct undef_hook
*hook
)
410 raw_spin_lock_irqsave(&undef_lock
, flags
);
411 list_del(&hook
->node
);
412 raw_spin_unlock_irqrestore(&undef_lock
, flags
);
415 static nokprobe_inline
416 int call_undef_hook(struct pt_regs
*regs
, unsigned int instr
)
418 struct undef_hook
*hook
;
420 int (*fn
)(struct pt_regs
*regs
, unsigned int instr
) = NULL
;
422 raw_spin_lock_irqsave(&undef_lock
, flags
);
423 list_for_each_entry(hook
, &undef_hook
, node
)
424 if ((instr
& hook
->instr_mask
) == hook
->instr_val
&&
425 (regs
->ARM_cpsr
& hook
->cpsr_mask
) == hook
->cpsr_val
)
427 raw_spin_unlock_irqrestore(&undef_lock
, flags
);
429 return fn
? fn(regs
, instr
) : 1;
432 asmlinkage
void do_undefinstr(struct pt_regs
*regs
)
437 pc
= (void __user
*)instruction_pointer(regs
);
439 if (processor_mode(regs
) == SVC_MODE
) {
440 #ifdef CONFIG_THUMB2_KERNEL
441 if (thumb_mode(regs
)) {
442 instr
= __mem_to_opcode_thumb16(((u16
*)pc
)[0]);
443 if (is_wide_instruction(instr
)) {
445 inst2
= __mem_to_opcode_thumb16(((u16
*)pc
)[1]);
446 instr
= __opcode_thumb32_compose(instr
, inst2
);
450 instr
= __mem_to_opcode_arm(*(u32
*) pc
);
451 } else if (thumb_mode(regs
)) {
452 if (get_user(instr
, (u16 __user
*)pc
))
454 instr
= __mem_to_opcode_thumb16(instr
);
455 if (is_wide_instruction(instr
)) {
457 if (get_user(instr2
, (u16 __user
*)pc
+1))
459 instr2
= __mem_to_opcode_thumb16(instr2
);
460 instr
= __opcode_thumb32_compose(instr
, instr2
);
463 if (get_user(instr
, (u32 __user
*)pc
))
465 instr
= __mem_to_opcode_arm(instr
);
468 if (call_undef_hook(regs
, instr
) == 0)
472 #ifdef CONFIG_DEBUG_USER
473 if (user_debug
& UDBG_UNDEFINED
) {
474 pr_info("%s (%d): undefined instruction: pc=%p\n",
475 current
->comm
, task_pid_nr(current
), pc
);
477 dump_instr(KERN_INFO
, regs
);
480 arm_notify_die("Oops - undefined instruction", regs
,
481 SIGILL
, ILL_ILLOPC
, pc
, 0, 6);
483 NOKPROBE_SYMBOL(do_undefinstr
)
486 * Handle FIQ similarly to NMI on x86 systems.
488 * The runtime environment for NMIs is extremely restrictive
489 * (NMIs can pre-empt critical sections meaning almost all locking is
490 * forbidden) meaning this default FIQ handling must only be used in
491 * circumstances where non-maskability improves robustness, such as
492 * watchdog or debug logic.
494 * This handler is not appropriate for general purpose use in drivers
495 * platform code and can be overrideen using set_fiq_handler.
497 asmlinkage
void __exception_irq_entry
handle_fiq_as_nmi(struct pt_regs
*regs
)
499 struct pt_regs
*old_regs
= set_irq_regs(regs
);
503 /* nop. FIQ handlers for special arch/arm features can be added here. */
507 set_irq_regs(old_regs
);
511 * bad_mode handles the impossible case in the vectors. If you see one of
512 * these, then it's extremely serious, and could mean you have buggy hardware.
513 * It never returns, and never tries to sync. We hope that we can at least
514 * dump out some state information...
516 asmlinkage
void bad_mode(struct pt_regs
*regs
, int reason
)
520 pr_crit("Bad mode in %s handler detected\n", handler
[reason
]);
522 die("Oops - bad mode", regs
, 0);
527 static int bad_syscall(int n
, struct pt_regs
*regs
)
529 if ((current
->personality
& PER_MASK
) != PER_LINUX
) {
530 send_sig(SIGSEGV
, current
, 1);
534 #ifdef CONFIG_DEBUG_USER
535 if (user_debug
& UDBG_SYSCALL
) {
536 pr_err("[%d] %s: obsolete system call %08x.\n",
537 task_pid_nr(current
), current
->comm
, n
);
538 dump_instr(KERN_ERR
, regs
);
542 arm_notify_die("Oops - bad syscall", regs
, SIGILL
, ILL_ILLTRP
,
543 (void __user
*)instruction_pointer(regs
) -
544 (thumb_mode(regs
) ? 2 : 4),
551 __do_cache_op(unsigned long start
, unsigned long end
)
556 unsigned long chunk
= min(PAGE_SIZE
, end
- start
);
558 if (fatal_signal_pending(current
))
561 ret
= flush_icache_user_range(start
, start
+ chunk
);
567 } while (start
< end
);
573 do_cache_op(unsigned long start
, unsigned long end
, int flags
)
575 if (end
< start
|| flags
)
578 if (!access_ok((void __user
*)start
, end
- start
))
581 return __do_cache_op(start
, end
);
585 * Handle all unrecognised system calls.
586 * 0x9f0000 - 0x9fffff are some more esoteric system calls
588 #define NR(x) ((__ARM_NR_##x) - __ARM_NR_BASE)
589 asmlinkage
int arm_syscall(int no
, struct pt_regs
*regs
)
591 if ((no
>> 16) != (__ARM_NR_BASE
>> 16))
592 return bad_syscall(no
, regs
);
594 switch (no
& 0xffff) {
595 case 0: /* branch through 0 */
596 arm_notify_die("branch through zero", regs
,
597 SIGSEGV
, SEGV_MAPERR
, NULL
, 0, 0);
600 case NR(breakpoint
): /* SWI BREAK_POINT */
601 regs
->ARM_pc
-= thumb_mode(regs
) ? 2 : 4;
606 * Flush a region from virtual address 'r0' to virtual address 'r1'
607 * _exclusive_. There is no alignment requirement on either address;
608 * user space does not need to know the hardware cache layout.
610 * r2 contains flags. It should ALWAYS be passed as ZERO until it
611 * is defined to be something else. For now we ignore it, but may
612 * the fires of hell burn in your belly if you break this rule. ;)
614 * (at a later date, we may want to allow this call to not flush
615 * various aspects of the cache. Passing '0' will guarantee that
616 * everything necessary gets flushed to maintain consistency in
617 * the specified region).
620 return do_cache_op(regs
->ARM_r0
, regs
->ARM_r1
, regs
->ARM_r2
);
623 if (!(elf_hwcap
& HWCAP_26BIT
))
625 regs
->ARM_cpsr
&= ~MODE32_BIT
;
629 if (!(elf_hwcap
& HWCAP_26BIT
))
631 regs
->ARM_cpsr
|= MODE32_BIT
;
635 set_tls(regs
->ARM_r0
);
639 return current_thread_info()->tp_value
[0];
642 /* Calls 9f00xx..9f07ff are defined to return -ENOSYS
643 if not implemented, rather than raising SIGILL. This
644 way the calling program can gracefully determine whether
645 a feature is supported. */
646 if ((no
& 0xffff) <= 0x7ff)
650 #ifdef CONFIG_DEBUG_USER
652 * experience shows that these seem to indicate that
653 * something catastrophic has happened
655 if (user_debug
& UDBG_SYSCALL
) {
656 pr_err("[%d] %s: arm syscall %d\n",
657 task_pid_nr(current
), current
->comm
, no
);
658 dump_instr(KERN_ERR
, regs
);
659 if (user_mode(regs
)) {
661 c_backtrace(frame_pointer(regs
), processor_mode(regs
), KERN_ERR
);
665 arm_notify_die("Oops - bad syscall(2)", regs
, SIGILL
, ILL_ILLTRP
,
666 (void __user
*)instruction_pointer(regs
) -
667 (thumb_mode(regs
) ? 2 : 4),
672 #ifdef CONFIG_TLS_REG_EMUL
675 * We might be running on an ARMv6+ processor which should have the TLS
676 * register but for some reason we can't use it, or maybe an SMP system
677 * using a pre-ARMv6 processor (there are apparently a few prototypes like
678 * that in existence) and therefore access to that register must be
682 static int get_tp_trap(struct pt_regs
*regs
, unsigned int instr
)
684 int reg
= (instr
>> 12) & 15;
687 regs
->uregs
[reg
] = current_thread_info()->tp_value
[0];
692 static struct undef_hook arm_mrc_hook
= {
693 .instr_mask
= 0x0fff0fff,
694 .instr_val
= 0x0e1d0f70,
695 .cpsr_mask
= PSR_T_BIT
,
700 static int __init
arm_mrc_hook_init(void)
702 register_undef_hook(&arm_mrc_hook
);
706 late_initcall(arm_mrc_hook_init
);
711 * A data abort trap was taken, but we did not handle the instruction.
712 * Try to abort the user program, or panic if it was the kernel.
715 baddataabort(int code
, unsigned long instr
, struct pt_regs
*regs
)
717 unsigned long addr
= instruction_pointer(regs
);
719 #ifdef CONFIG_DEBUG_USER
720 if (user_debug
& UDBG_BADABORT
) {
721 pr_err("8<--- cut here ---\n");
722 pr_err("[%d] %s: bad data abort: code %d instr 0x%08lx\n",
723 task_pid_nr(current
), current
->comm
, code
, instr
);
724 dump_instr(KERN_ERR
, regs
);
725 show_pte(KERN_ERR
, current
->mm
, addr
);
729 arm_notify_die("unknown data abort code", regs
,
730 SIGILL
, ILL_ILLOPC
, (void __user
*)addr
, instr
, 0);
733 void __readwrite_bug(const char *fn
)
735 pr_err("%s called, but not implemented\n", fn
);
738 EXPORT_SYMBOL(__readwrite_bug
);
740 void __pte_error(const char *file
, int line
, pte_t pte
)
742 pr_err("%s:%d: bad pte %08llx.\n", file
, line
, (long long)pte_val(pte
));
745 void __pmd_error(const char *file
, int line
, pmd_t pmd
)
747 pr_err("%s:%d: bad pmd %08llx.\n", file
, line
, (long long)pmd_val(pmd
));
750 void __pgd_error(const char *file
, int line
, pgd_t pgd
)
752 pr_err("%s:%d: bad pgd %08llx.\n", file
, line
, (long long)pgd_val(pgd
));
755 asmlinkage
void __div0(void)
757 pr_err("Division by zero in kernel.\n");
760 EXPORT_SYMBOL(__div0
);
766 /* if that doesn't kill us, halt */
767 panic("Oops failed to kill thread");
770 #ifdef CONFIG_KUSER_HELPERS
771 static void __init
kuser_init(void *vectors
)
773 extern char __kuser_helper_start
[], __kuser_helper_end
[];
774 int kuser_sz
= __kuser_helper_end
- __kuser_helper_start
;
776 memcpy(vectors
+ 0x1000 - kuser_sz
, __kuser_helper_start
, kuser_sz
);
779 * vectors + 0xfe0 = __kuser_get_tls
780 * vectors + 0xfe8 = hardware TLS instruction at 0xffff0fe8
782 if (tls_emu
|| has_tls_reg
)
783 memcpy(vectors
+ 0xfe0, vectors
+ 0xfe8, 4);
786 static inline void __init
kuser_init(void *vectors
)
791 #ifndef CONFIG_CPU_V7M
792 static void copy_from_lma(void *vma
, void *lma_start
, void *lma_end
)
794 memcpy(vma
, lma_start
, lma_end
- lma_start
);
797 static void flush_vectors(void *vma
, size_t offset
, size_t size
)
799 unsigned long start
= (unsigned long)vma
+ offset
;
800 unsigned long end
= start
+ size
;
802 flush_icache_range(start
, end
);
805 #ifdef CONFIG_HARDEN_BRANCH_HISTORY
806 int spectre_bhb_update_vectors(unsigned int method
)
808 extern char __vectors_bhb_bpiall_start
[], __vectors_bhb_bpiall_end
[];
809 extern char __vectors_bhb_loop8_start
[], __vectors_bhb_loop8_end
[];
810 void *vec_start
, *vec_end
;
812 if (system_state
> SYSTEM_SCHEDULING
) {
813 pr_err("CPU%u: Spectre BHB workaround too late - system vulnerable\n",
815 return SPECTRE_VULNERABLE
;
819 case SPECTRE_V2_METHOD_LOOP8
:
820 vec_start
= __vectors_bhb_loop8_start
;
821 vec_end
= __vectors_bhb_loop8_end
;
824 case SPECTRE_V2_METHOD_BPIALL
:
825 vec_start
= __vectors_bhb_bpiall_start
;
826 vec_end
= __vectors_bhb_bpiall_end
;
830 pr_err("CPU%u: unknown Spectre BHB state %d\n",
831 smp_processor_id(), method
);
832 return SPECTRE_VULNERABLE
;
835 copy_from_lma(vectors_page
, vec_start
, vec_end
);
836 flush_vectors(vectors_page
, 0, vec_end
- vec_start
);
838 return SPECTRE_MITIGATED
;
842 void __init
early_trap_init(void *vectors_base
)
844 extern char __stubs_start
[], __stubs_end
[];
845 extern char __vectors_start
[], __vectors_end
[];
848 vectors_page
= vectors_base
;
851 * Poison the vectors page with an undefined instruction. This
852 * instruction is chosen to be undefined for both ARM and Thumb
853 * ISAs. The Thumb version is an undefined instruction with a
854 * branch back to the undefined instruction.
856 for (i
= 0; i
< PAGE_SIZE
/ sizeof(u32
); i
++)
857 ((u32
*)vectors_base
)[i
] = 0xe7fddef1;
860 * Copy the vectors, stubs and kuser helpers (in entry-armv.S)
861 * into the vector page, mapped at 0xffff0000, and ensure these
862 * are visible to the instruction stream.
864 copy_from_lma(vectors_base
, __vectors_start
, __vectors_end
);
865 copy_from_lma(vectors_base
+ 0x1000, __stubs_start
, __stubs_end
);
867 kuser_init(vectors_base
);
869 flush_vectors(vectors_base
, 0, PAGE_SIZE
* 2);
871 #else /* ifndef CONFIG_CPU_V7M */
872 void __init
early_trap_init(void *vectors_base
)
875 * on V7-M there is no need to copy the vector table to a dedicated
876 * memory area. The address is configurable and so a table in the kernel