2 # Copyright (c) 2011-2014, ARM Limited. All rights reserved.
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
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.
14 #include <Chipset/AArch64.h>
15 #include <AsmMacroIoLibV8.h>
21 //============================================================
22 //Default Exception Handlers
23 //============================================================
27 1: mrs x1, elr_el1 /* EL1 Exception Link Register */ ;\
29 2: mrs x1, elr_el2 /* EL2 Exception Link Register */ ;\
30 3: bl ASM_PFX(PeiCommonExceptionEntry) ;
34 // Default Exception handlers: There is no plan to return from any of these exceptions.
35 // No context saving at all.
38 VECTOR_BASE(PeiVectorTable)
40 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_CUR_SP0_SYNC)
41 _DefaultSyncExceptHandler_t:
42 mov x0, #EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS
45 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_CUR_SP0_IRQ)
47 mov x0, #EXCEPT_AARCH64_IRQ
50 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_CUR_SP0_FIQ)
52 mov x0, #EXCEPT_AARCH64_FIQ
55 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_CUR_SP0_SERR)
57 mov x0, #EXCEPT_AARCH64_SERROR
60 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_CUR_SPx_SYNC)
61 _DefaultSyncExceptHandler_h:
62 mov x0, #EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS
65 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_CUR_SPx_IRQ)
67 mov x0, #EXCEPT_AARCH64_IRQ
70 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_CUR_SPx_FIQ)
72 mov x0, #EXCEPT_AARCH64_FIQ
75 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_CUR_SPx_SERR)
77 mov x0, #EXCEPT_AARCH64_SERROR
80 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_LOW_A64_SYNC)
81 _DefaultSyncExceptHandler_LowerA64:
82 mov x0, #EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS
85 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_LOW_A64_IRQ)
87 mov x0, #EXCEPT_AARCH64_IRQ
90 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_LOW_A64_FIQ)
92 mov x0, #EXCEPT_AARCH64_FIQ
95 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_LOW_A64_SERR)
96 _DefaultSError_LowerA64:
97 mov x0, #EXCEPT_AARCH64_SERROR
100 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_LOW_A32_SYNC)
101 _DefaultSyncExceptHandler_LowerA32:
102 mov x0, #EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS
105 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_LOW_A32_IRQ)
106 _DefaultIrq_LowerA32:
107 mov x0, #EXCEPT_AARCH64_IRQ
110 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_LOW_A32_FIQ)
111 _DefaultFiq_LowerA32:
112 mov x0, #EXCEPT_AARCH64_FIQ
115 VECTOR_ENTRY(PeiVectorTable, ARM_VECTOR_LOW_A32_SERR)
116 _DefaultSError_LowerA32:
117 mov x0, #EXCEPT_AARCH64_SERROR
120 VECTOR_END(PeiVectorTable)