]>
Commit | Line | Data |
---|---|---|
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 | ||
28 | //FIXME: One of the EDK2 tool is broken. It does not look to respect the alignment. Even, if we specify 32-byte alignment for this file. | |
29 | Dummy1 DCD 0\r | |
30 | Dummy2 DCD 0\r | |
31 | ||
32 | SecVectorTable | |
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 | \r | |
42 | // | |
43 | // Default Exception handlers: There is no plan to return from any of these exceptions.\r | |
44 | // No context saving at all.\r | |
45 | // | |
46 | _DefaultResetHandler | |
47 | mov r1, lr\r | |
48 | cps #0x13 ; Switch to SVC for common stack | |
49 | mov r0, #0 | |
50 | blx SecCommonExceptionEntry | |
51 | ||
52 | _DefaultUndefined | |
53 | sub r1, LR\r | |
54 | cps #0x13 ; Switch to SVC for common stack | |
55 | mov r0, #1 | |
56 | blx SecCommonExceptionEntry | |
57 | ||
58 | _DefaultSWI | |
59 | sub r1, LR, #4\r | |
60 | cps #0x13 ; Switch to SVC for common stack | |
61 | mov r0, #2 | |
62 | blx SecCommonExceptionEntry | |
63 | ||
64 | _DefaultPrefetchAbort | |
65 | sub r1, LR, #4\r | |
66 | cps #0x13 ; Switch to SVC for common stack | |
67 | mov r0, #3 | |
68 | blx SecCommonExceptionEntry | |
69 | ||
70 | _DefaultDataAbort | |
71 | sub r1, LR, #8\r | |
72 | cps #0x13 ; Switch to SVC for common stack | |
73 | mov r0, #4 | |
74 | blx SecCommonExceptionEntry | |
75 | ||
76 | _DefaultReserved | |
77 | mov r1, lr\r | |
78 | cps #0x13 ; Switch to SVC for common stack | |
79 | mov r0, #5 | |
80 | blx SecCommonExceptionEntry | |
81 | ||
82 | _DefaultIrq | |
83 | sub r1, LR, #4\r | |
84 | cps #0x13 ; Switch to SVC for common stack | |
85 | mov r0, #6 | |
86 | blx SecCommonExceptionEntry | |
87 | ||
88 | _DefaultFiq | |
89 | sub r1, LR, #4\r | |
90 | cps #0x13 ; Switch to SVC for common stack | |
91 | mov r0, #7 | |
92 | blx SecCommonExceptionEntry | |
93 | \r | |
94 | END\r |