]>
Commit | Line | Data |
---|---|---|
cd872e40 | 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 | |
20 | .align 5 | |
21 | ||
22 | # IMPORT | |
23 | GCC_ASM_IMPORT(PrePiCommonExceptionEntry) | |
24 | ||
25 | # EXPORT | |
26 | GCC_ASM_EXPORT(PrePiVectorTable) | |
27 | ||
28 | //============================================================ | |
29 | //Default Exception Handlers | |
30 | //============================================================ | |
31 | ||
cd872e40 | 32 | ASM_PFX(PrePiVectorTable): |
33 | b _DefaultResetHandler | |
34 | b _DefaultUndefined | |
35 | b _DefaultSWI | |
36 | b _DefaultPrefetchAbort | |
37 | b _DefaultDataAbort | |
38 | b _DefaultReserved | |
39 | b _DefaultIrq | |
40 | b _DefaultFiq | |
41 | ||
42 | // | |
43 | // Default Exception handlers: There is no plan to return from any of these exceptions. | |
44 | // No context saving at all. | |
45 | // | |
46 | _DefaultResetHandler: | |
47 | mov r1, lr | |
48 | # Switch to SVC for common stack | |
49 | cps #0x13 | |
50 | mov r0, #0 | |
51 | blx ASM_PFX(PrePiCommonExceptionEntry) | |
52 | ||
53 | _DefaultUndefined: | |
54 | sub r1, LR, #4 | |
55 | # Switch to SVC for common stack | |
56 | cps #0x13 | |
57 | mov r0, #1 | |
58 | blx ASM_PFX(PrePiCommonExceptionEntry) | |
59 | ||
60 | _DefaultSWI: | |
61 | sub r1, LR, #4 | |
62 | # Switch to SVC for common stack | |
63 | cps #0x13 | |
64 | mov r0, #2 | |
65 | blx ASM_PFX(PrePiCommonExceptionEntry) | |
66 | ||
67 | _DefaultPrefetchAbort: | |
68 | sub r1, LR, #4 | |
69 | # Switch to SVC for common stack | |
70 | cps #0x13 | |
71 | mov r0, #3 | |
72 | blx ASM_PFX(PrePiCommonExceptionEntry) | |
73 | ||
74 | _DefaultDataAbort: | |
75 | sub r1, LR, #8 | |
76 | # Switch to SVC for common stack | |
77 | cps #0x13 | |
78 | mov r0, #4 | |
79 | blx ASM_PFX(PrePiCommonExceptionEntry) | |
80 | ||
81 | _DefaultReserved: | |
82 | mov r1, lr | |
83 | # Switch to SVC for common stack | |
84 | cps #0x13 | |
85 | mov r0, #5 | |
86 | blx ASM_PFX(PrePiCommonExceptionEntry) | |
87 | ||
88 | _DefaultIrq: | |
89 | sub r1, LR, #4 | |
90 | # Switch to SVC for common stack | |
91 | cps #0x13 | |
92 | mov r0, #6 | |
93 | blx ASM_PFX(PrePiCommonExceptionEntry) | |
94 | ||
95 | _DefaultFiq: | |
96 | sub r1, LR, #4 | |
97 | # Switch to SVC for common stack | |
98 | cps #0x13 | |
99 | mov r0, #7 | |
100 | blx ASM_PFX(PrePiCommonExceptionEntry) | |
101 |