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