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