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