]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Sec/Exception.S
Add more exact SMM check in SmmFaultTolerantWriteHandler.
[mirror_edk2.git] / ArmPlatformPkg / Sec / 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 <AutoGen.h>
16 #include "SecInternal.h"
17
18 .text
19 .align 5
20
21 GCC_ASM_IMPORT(SecCommonExceptionEntry)
22 GCC_ASM_EXPORT(SecVectorTable)
23
24 //============================================================
25 // Default Exception Handlers
26 //============================================================
27
28
29 ASM_PFX(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
39 //
40 // Default Exception handlers: There is no plan to return from any of these exceptions.
41 // No context saving at all.
42 //
43 _DefaultResetHandler:
44 mov r1, lr
45 # Switch to SVC for common stack
46 cps #0x13
47 mov r0, #0
48 blx ASM_PFX(SecCommonExceptionEntry)
49
50 _DefaultUndefined:
51 sub r1, LR, #4
52 # Switch to SVC for common stack
53 cps #0x13
54 mov r0, #1
55 blx ASM_PFX(SecCommonExceptionEntry)
56
57 _DefaultSWI:
58 sub r1, LR, #4
59 # Switch to SVC for common stack
60 cps #0x13
61 mov r0, #2
62 blx ASM_PFX(SecCommonExceptionEntry)
63
64 _DefaultPrefetchAbort:
65 sub r1, LR, #4
66 # Switch to SVC for common stack
67 cps #0x13
68 mov r0, #3
69 blx ASM_PFX(SecCommonExceptionEntry)
70
71 _DefaultDataAbort:
72 sub r1, LR, #8
73 # Switch to SVC for common stack
74 cps #0x13
75 mov r0, #4
76 blx ASM_PFX(SecCommonExceptionEntry)
77
78 _DefaultReserved:
79 mov r1, lr
80 # Switch to SVC for common stack
81 cps #0x13
82 mov r0, #5
83 blx ASM_PFX(SecCommonExceptionEntry)
84
85 _DefaultIrq:
86 sub r1, LR, #4
87 # Switch to SVC for common stack
88 cps #0x13
89 mov r0, #6
90 blx ASM_PFX(SecCommonExceptionEntry)
91
92 _DefaultFiq:
93 sub r1, LR, #4
94 # Switch to SVC for common stack
95 cps #0x13
96 mov r0, #7
97 blx ASM_PFX(SecCommonExceptionEntry)
98