summaryrefslogtreecommitdiff
path: root/arch/arm/lib/vectors_m.S
blob: cf14a34ca6313ea3f789456a870deef07d16fac0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
 * (C) Copyright 2015
 * Kamil Lulko, <kamil.lulko@gmail.com>
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#include <config.h>
#include <asm/armv7m.h>
#include <linux/linkage.h>

.type __hard_fault_entry, %function
__hard_fault_entry:
	mov	r0, sp	@ pass auto-saved registers as argument
	b	do_hard_fault

.type __mm_fault_entry, %function
__mm_fault_entry:
	mov	r0, sp	@ pass auto-saved registers as argument
	b	do_mm_fault

.type __bus_fault_entry, %function
__bus_fault_entry:
	mov	r0, sp	@ pass auto-saved registers as argument
	b	do_bus_fault

.type __usage_fault_entry, %function
__usage_fault_entry:
	mov	r0, sp	@ pass auto-saved registers as argument
	b	do_usage_fault

.type __invalid_entry, %function
__invalid_entry:
	mov	r0, sp	@ pass auto-saved registers as argument
	b	do_invalid_entry

   .section  .vectors
ENTRY(_start)
	.long	CONFIG_SYS_INIT_SP_ADDR		@ 0 - Reset stack pointer
	.long	reset				@ 1 - Reset
	.long	__invalid_entry			@ 2 - NMI
	.long	__hard_fault_entry		@ 3 - HardFault
	.long	__mm_fault_entry		@ 4 - MemManage
	.long	__bus_fault_entry		@ 5 - BusFault
	.long	__usage_fault_entry		@ 6 - UsageFault
	.long	__invalid_entry			@ 7 - Reserved
	.long	__invalid_entry			@ 8 - Reserved
	.long	__invalid_entry			@ 9 - Reserved
	.long	__invalid_entry			@ 10 - Reserved
	.long	__invalid_entry			@ 11 - SVCall
	.long	__invalid_entry			@ 12 - Debug Monitor
	.long	__invalid_entry			@ 13 - Reserved
	.long	__invalid_entry			@ 14 - PendSV
	.long	__invalid_entry			@ 15 - SysTick
	.rept	255 - 16
	.long	__invalid_entry			@ 16..255 - External Interrupts
	.endr