]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/PrePeiCore/AArch64/Exception.S
ARM Packages: use GCC_ASM_EXPORT to export functions
[mirror_edk2.git] / ArmPlatformPkg / PrePeiCore / AArch64 / Exception.S
1 #
2 # Copyright (c) 2011-2014, 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 <AsmMacroIoLibV8.h>
15 #include <Base.h>
16 #include <AutoGen.h>
17
18 .text
19 .align 11
20
21 GCC_ASM_EXPORT(PeiVectorTable)
22
23 //============================================================
24 //Default Exception Handlers
25 //============================================================
26
27 ASM_PFX(PeiVectorTable):
28
29
30 #define TO_HANDLER \
31 EL1_OR_EL2(x1) \
32 1: mrs x1, elr_el1 /* EL1 Exception Link Register */ ;\
33 b 3f ;\
34 2: mrs x1, elr_el2 /* EL2 Exception Link Register */ ;\
35 3: bl ASM_PFX(PeiCommonExceptionEntry) ;
36
37
38 //
39 // Default Exception handlers: There is no plan to return from any of these exceptions.
40 // No context saving at all.
41 //
42
43 .align 7
44 _DefaultSyncExceptHandler_t:
45 mov x0, #EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS
46 TO_HANDLER
47
48 .align 7
49 _DefaultIrq_t:
50 mov x0, #EXCEPT_AARCH64_IRQ
51 TO_HANDLER
52
53 .align 7
54 _DefaultFiq_t:
55 mov x0, #EXCEPT_AARCH64_FIQ
56 TO_HANDLER
57
58 .align 7
59 _DefaultSError_t:
60 mov x0, #EXCEPT_AARCH64_SERROR
61 TO_HANDLER
62
63 .align 7
64 _DefaultSyncExceptHandler_h:
65 mov x0, #EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS
66 TO_HANDLER
67
68 .align 7
69 _DefaultIrq_h:
70 mov x0, #EXCEPT_AARCH64_IRQ
71 TO_HANDLER
72
73 .align 7
74 _DefaultFiq_h:
75 mov x0, #EXCEPT_AARCH64_FIQ
76 TO_HANDLER
77
78 .align 7
79 _DefaultSError_h:
80 mov x0, #EXCEPT_AARCH64_SERROR
81 TO_HANDLER