]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/PrePi/Exception.S
ArmPlatformPkg: Change the memory model for the ARM Platform components
[mirror_edk2.git] / ArmPlatformPkg / PrePi / Exception.S
CommitLineData
d269095b 1//\r
2// Copyright (c) 2011, ARM Limited. All rights reserved.\r
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 <AsmMacroIoLib.h>\r
15#include <Base.h>\r
16#include <AutoGen.h>\r
17\r
18#start of the code section\r
19.text\r
20.align 5\r
21\r
22# IMPORT\r
23GCC_ASM_IMPORT(PrePiCommonExceptionEntry)\r
24\r
25# EXPORT\r
26GCC_ASM_EXPORT(PrePiVectorTable)\r
27\r
28//============================================================\r
29//Default Exception Handlers\r
30//============================================================\r
31 \r
32ASM_PFX(PrePiVectorTable):\r
33 b _DefaultResetHandler\r
34 b _DefaultUndefined\r
35 b _DefaultSWI\r
36 b _DefaultPrefetchAbort\r
37 b _DefaultDataAbort\r
38 b _DefaultReserved\r
39 b _DefaultIrq\r
40 b _DefaultFiq\r
41\r
42//\r
43// Default Exception handlers: There is no plan to return from any of these exceptions.\r
44// No context saving at all.\r
45//\r
46_DefaultResetHandler:\r
47 mov r1, lr\r
48 # Switch to SVC for common stack\r
49 cps #0x13\r
50 mov r0, #0\r
51 blx ASM_PFX(PrePiCommonExceptionEntry)\r
52\r
53_DefaultUndefined:\r
54 sub r1, LR, #4\r
55 # Switch to SVC for common stack\r
56 cps #0x13\r
57 mov r0, #1\r
58 blx ASM_PFX(PrePiCommonExceptionEntry)\r
59\r
60_DefaultSWI:\r
61 sub r1, LR, #4\r
62 # Switch to SVC for common stack\r
63 cps #0x13\r
64 mov r0, #2\r
65 blx ASM_PFX(PrePiCommonExceptionEntry)\r
66\r
67_DefaultPrefetchAbort:\r
68 sub r1, LR, #4\r
69 # Switch to SVC for common stack\r
70 cps #0x13\r
71 mov r0, #3\r
72 blx ASM_PFX(PrePiCommonExceptionEntry)\r
73\r
74_DefaultDataAbort:\r
75 sub r1, LR, #8\r
76 # Switch to SVC for common stack\r
77 cps #0x13\r
78 mov r0, #4\r
79 blx ASM_PFX(PrePiCommonExceptionEntry)\r
80\r
81_DefaultReserved:\r
82 mov r1, lr\r
83 # Switch to SVC for common stack\r
84 cps #0x13\r
85 mov r0, #5\r
86 blx ASM_PFX(PrePiCommonExceptionEntry)\r
87\r
88_DefaultIrq:\r
89 sub r1, LR, #4\r
90 # Switch to SVC for common stack\r
91 cps #0x13\r
92 mov r0, #6\r
93 blx ASM_PFX(PrePiCommonExceptionEntry)\r
94\r
95_DefaultFiq:\r
96 sub r1, LR, #4\r
97 # Switch to SVC for common stack\r
98 cps #0x13\r
99 mov r0, #7\r
100 blx ASM_PFX(PrePiCommonExceptionEntry)\r
101\r