]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/PrePeiCore/Arm/Exception.S
BaseTools/Capsule: Do not support -o with --dump-info
[mirror_edk2.git] / ArmPlatformPkg / PrePeiCore / Arm / Exception.S
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(PeiCommonExceptionEntry)
24
25 # EXPORT
26 GCC_ASM_EXPORT(PeiVectorTable)
27
28 //============================================================
29 //Default Exception Handlers
30 //============================================================
31
32
33 ASM_PFX(PeiVectorTable):
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(PeiCommonExceptionEntry)
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(PeiCommonExceptionEntry)
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(PeiCommonExceptionEntry)
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(PeiCommonExceptionEntry)
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(PeiCommonExceptionEntry)
81
82 _DefaultReserved:
83 mov r1, lr
84 # Switch to SVC for common stack
85 cps #0x13
86 mov r0, #5
87 blx ASM_PFX(PeiCommonExceptionEntry)
88
89 _DefaultIrq:
90 sub r1, LR, #4
91 # Switch to SVC for common stack
92 cps #0x13
93 mov r0, #6
94 blx ASM_PFX(PeiCommonExceptionEntry)
95
96 _DefaultFiq:
97 sub r1, LR, #4
98 # Switch to SVC for common stack
99 cps #0x13
100 mov r0, #7
101 blx ASM_PFX(PeiCommonExceptionEntry)
102