early_exceptions.S 3.27 KB
Newer Older
1
/*
2
 * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved.
3
 *
dp-arm's avatar
dp-arm committed
4
 * SPDX-License-Identifier: BSD-3-Clause
5
6
 */

7
#include <asm_macros.S>
8
#include <bl_common.h>
9

10
11
12
13
14
/* -----------------------------------------------------------------------------
 * Very simple stackless exception handlers used by BL2 and BL31 stages.
 * BL31 uses them before stacks are setup. BL2 uses them throughout.
 * -----------------------------------------------------------------------------
 */
15
16
	.globl	early_exceptions

17
vector_base early_exceptions
18
19

	/* -----------------------------------------------------
20
	 * Current EL with SP0 : 0x0 - 0x200
21
22
	 * -----------------------------------------------------
	 */
23
vector_entry SynchronousExceptionSP0
24
25
	mov	x0, #SYNC_EXCEPTION_SP_EL0
	bl	plat_report_exception
26
	no_ret	plat_panic_handler
27
	check_vector_size SynchronousExceptionSP0
28

29
vector_entry IrqSP0
30
31
	mov	x0, #IRQ_SP_EL0
	bl	plat_report_exception
32
	no_ret	plat_panic_handler
33
	check_vector_size IrqSP0
34

35
vector_entry FiqSP0
36
37
	mov	x0, #FIQ_SP_EL0
	bl	plat_report_exception
38
	no_ret	plat_panic_handler
39
	check_vector_size FiqSP0
40

41
vector_entry SErrorSP0
42
43
	mov	x0, #SERROR_SP_EL0
	bl	plat_report_exception
44
	no_ret	plat_panic_handler
45
	check_vector_size SErrorSP0
46
47

	/* -----------------------------------------------------
48
	 * Current EL with SPx: 0x200 - 0x400
49
50
	 * -----------------------------------------------------
	 */
51
vector_entry SynchronousExceptionSPx
52
53
	mov	x0, #SYNC_EXCEPTION_SP_ELX
	bl	plat_report_exception
54
	no_ret	plat_panic_handler
55
	check_vector_size SynchronousExceptionSPx
56

57
vector_entry IrqSPx
58
59
	mov	x0, #IRQ_SP_ELX
	bl	plat_report_exception
60
	no_ret	plat_panic_handler
61
	check_vector_size IrqSPx
62

63
vector_entry FiqSPx
64
65
	mov	x0, #FIQ_SP_ELX
	bl	plat_report_exception
66
	no_ret	plat_panic_handler
67
	check_vector_size FiqSPx
68

69
vector_entry SErrorSPx
70
71
	mov	x0, #SERROR_SP_ELX
	bl	plat_report_exception
72
	no_ret	plat_panic_handler
73
	check_vector_size SErrorSPx
74
75

	/* -----------------------------------------------------
76
	 * Lower EL using AArch64 : 0x400 - 0x600
77
78
	 * -----------------------------------------------------
	 */
79
vector_entry SynchronousExceptionA64
80
81
	mov	x0, #SYNC_EXCEPTION_AARCH64
	bl	plat_report_exception
82
	no_ret	plat_panic_handler
83
	check_vector_size SynchronousExceptionA64
84

85
vector_entry IrqA64
86
87
	mov	x0, #IRQ_AARCH64
	bl	plat_report_exception
88
	no_ret	plat_panic_handler
89
	check_vector_size IrqA64
90

91
vector_entry FiqA64
92
93
	mov	x0, #FIQ_AARCH64
	bl	plat_report_exception
94
	no_ret	plat_panic_handler
95
	check_vector_size FiqA64
96

97
vector_entry SErrorA64
98
99
	mov	x0, #SERROR_AARCH64
	bl	plat_report_exception
100
	no_ret	plat_panic_handler
101
	check_vector_size SErrorA64
102
103

	/* -----------------------------------------------------
104
	 * Lower EL using AArch32 : 0x600 - 0x800
105
106
	 * -----------------------------------------------------
	 */
107
vector_entry SynchronousExceptionA32
108
109
	mov	x0, #SYNC_EXCEPTION_AARCH32
	bl	plat_report_exception
110
	no_ret	plat_panic_handler
111
	check_vector_size SynchronousExceptionA32
112

113
vector_entry IrqA32
114
115
	mov	x0, #IRQ_AARCH32
	bl	plat_report_exception
116
	no_ret	plat_panic_handler
117
	check_vector_size IrqA32
118

119
vector_entry FiqA32
120
121
	mov	x0, #FIQ_AARCH32
	bl	plat_report_exception
122
	no_ret	plat_panic_handler
123
	check_vector_size FiqA32
124

125
vector_entry SErrorA32
126
127
	mov	x0, #SERROR_AARCH32
	bl	plat_report_exception
128
	no_ret	plat_panic_handler
129
	check_vector_size SErrorA32