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