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