]>
Commit | Line | Data |
---|---|---|
1d5d0ae9 | 1 | // |
2 | // Copyright (c) 2011, ARM Limited. All rights reserved. | |
3 | // | |
4 | # This program and the accompanying materials | |
5 | # are licensed and made available under the terms and conditions of the BSD License | |
6 | # which accompanies this distribution. The full text of the license may be found at | |
7 | # http://opensource.org/licenses/bsd-license.php | |
8 | # | |
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, | |
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | |
11 | # | |
12 | # | |
13 | ||
14 | #include <AsmMacroIoLib.h> | |
15 | #include <Base.h> | |
16 | #include <AutoGen.h> | |
17 | ||
18 | #start of the code section | |
19 | .text | |
6377d2f1 | 20 | .align 5 |
21 | ||
1d5d0ae9 | 22 | # IMPORT |
23 | GCC_ASM_IMPORT(SecCommonExceptionEntry) | |
24 | ||
25 | # EXPORT | |
26 | GCC_ASM_EXPORT(SecVectorTable) | |
6377d2f1 | 27 | |
1d5d0ae9 | 28 | //============================================================ |
29 | //Default Exception Handlers | |
30 | //============================================================ | |
31 | ||
1d5d0ae9 | 32 | |
33 | ASM_PFX(SecVectorTable): | |
34 | b _DefaultResetHandler | |
35 | b _DefaultUndefined | |
36 | b _DefaultSWI | |
37 | b _DefaultPrefetchAbort | |
38 | b _DefaultDataAbort | |
39 | b _DefaultReserved | |
40 | b _DefaultIrq | |
41 | b _DefaultFiq | |
42 | ||
43 | // | |
44 | // Default Exception handlers: There is no plan to return from any of these exceptions. | |
45 | // No context saving at all. | |
46 | // | |
47 | _DefaultResetHandler: | |
48 | mov r1, lr | |
49 | # Switch to SVC for common stack | |
50 | cps #0x13 | |
51 | mov r0, #0 | |
52 | blx ASM_PFX(SecCommonExceptionEntry) | |
53 | ||
54 | _DefaultUndefined: | |
55 | sub r1, LR, #4 | |
56 | # Switch to SVC for common stack | |
57 | cps #0x13 | |
58 | mov r0, #1 | |
59 | blx ASM_PFX(SecCommonExceptionEntry) | |
60 | ||
61 | _DefaultSWI: | |
62 | sub r1, LR, #4 | |
63 | # Switch to SVC for common stack | |
64 | cps #0x13 | |
65 | mov r0, #2 | |
66 | blx ASM_PFX(SecCommonExceptionEntry) | |
67 | ||
68 | _DefaultPrefetchAbort: | |
69 | sub r1, LR, #4 | |
70 | # Switch to SVC for common stack | |
71 | cps #0x13 | |
72 | mov r0, #3 | |
73 | blx ASM_PFX(SecCommonExceptionEntry) | |
74 | ||
75 | _DefaultDataAbort: | |
76 | sub r1, LR, #8 | |
77 | # Switch to SVC for common stack | |
78 | cps #0x13 | |
79 | mov r0, #4 | |
80 | blx ASM_PFX(SecCommonExceptionEntry) | |
81 | ||
82 | _DefaultReserved: | |
83 | mov r1, lr | |
84 | # Switch to SVC for common stack | |
85 | cps #0x13 | |
86 | mov r0, #5 | |
e77406fa | 87 | blx ASM_PFX(SecCommonExceptionEntry) |
1d5d0ae9 | 88 | |
89 | _DefaultIrq: | |
90 | sub r1, LR, #4 | |
91 | # Switch to SVC for common stack | |
92 | cps #0x13 | |
93 | mov r0, #6 | |
e77406fa | 94 | blx ASM_PFX(SecCommonExceptionEntry) |
1d5d0ae9 | 95 | |
96 | _DefaultFiq: | |
97 | sub r1, LR, #4 | |
98 | # Switch to SVC for common stack | |
99 | cps #0x13 | |
100 | mov r0, #7 | |
e77406fa | 101 | blx ASM_PFX(SecCommonExceptionEntry) |
6377d2f1 | 102 | |
e77406fa | 103 | END |