]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/PrePeiCore/Arm/Exception.asm
ArmPlatformPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / ArmPlatformPkg / PrePeiCore / Arm / Exception.asm
CommitLineData
1d5d0ae9 1//\r
2// Copyright (c) 2011, ARM Limited. All rights reserved.\r
1d5d0ae9 3//\r
f4dfad05 4// SPDX-License-Identifier: BSD-2-Clause-Patent\r
1d5d0ae9 5//\r
6//\r
7\r
1d5d0ae9 8#include <AutoGen.h>\r
9\r
10 IMPORT PeiCommonExceptionEntry\r
11 EXPORT PeiVectorTable\r
3402aac7 12\r
1d5d0ae9 13 PRESERVE8\r
14 AREA PrePeiCoreException, CODE, READONLY, CODEALIGN, ALIGN=5\r
15\r
a6caee65 16//============================================================\r
17//Default Exception Handlers\r
18//============================================================\r
3402aac7
RC
19\r
20\r
a6caee65 21PeiVectorTable\r
22 b _DefaultResetHandler\r
23 b _DefaultUndefined\r
24 b _DefaultSWI\r
25 b _DefaultPrefetchAbort\r
26 b _DefaultDataAbort\r
27 b _DefaultReserved\r
28 b _DefaultIrq\r
29 b _DefaultFiq\r
30\r
1d5d0ae9 31//\r
32// Default Exception handlers: There is no plan to return from any of these exceptions.\r
a6caee65 33// No context saving at all.\r
1d5d0ae9 34//\r
a6caee65 35_DefaultResetHandler\r
1d5d0ae9 36 mov r1, lr\r
a6caee65 37 cps #0x13 ; Switch to SVC for common stack\r
38 mov r0, #0\r
39 blx PeiCommonExceptionEntry\r
40\r
41_DefaultUndefined\r
1d5d0ae9 42 sub r1, LR, #4\r
a6caee65 43 cps #0x13 ; Switch to SVC for common stack\r
44 mov r0, #1\r
45 blx PeiCommonExceptionEntry\r
46\r
47_DefaultSWI\r
1d5d0ae9 48 sub r1, LR, #4\r
a6caee65 49 cps #0x13 ; Switch to SVC for common stack\r
50 mov r0, #2\r
51 blx PeiCommonExceptionEntry\r
52\r
53_DefaultPrefetchAbort\r
1d5d0ae9 54 sub r1, LR, #4\r
a6caee65 55 cps #0x13 ; Switch to SVC for common stack\r
56 mov r0, #3\r
57 blx PeiCommonExceptionEntry\r
58\r
59_DefaultDataAbort\r
1d5d0ae9 60 sub r1, LR, #8\r
a6caee65 61 cps #0x13 ; Switch to SVC for common stack\r
62 mov r0, #4\r
63 blx PeiCommonExceptionEntry\r
64\r
65_DefaultReserved\r
1d5d0ae9 66 mov r1, lr\r
a6caee65 67 cps #0x13 ; Switch to SVC for common stack\r
68 mov r0, #5\r
69 blx PeiCommonExceptionEntry\r
3402aac7 70\r
a6caee65 71_DefaultIrq\r
1d5d0ae9 72 sub r1, LR, #4\r
a6caee65 73 cps #0x13 ; Switch to SVC for common stack\r
74 mov r0, #6\r
75 blx PeiCommonExceptionEntry\r
76\r
77_DefaultFiq\r
1d5d0ae9 78 sub r1, LR, #4\r
a6caee65 79 cps #0x13 ; Switch to SVC for common stack\r
80 mov r0, #7\r
81 blx PeiCommonExceptionEntry\r
1d5d0ae9 82\r
83 END\r