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