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