source: umon/main/cpu/arm/except_arm.c @ 87db514

Last change on this file since 87db514 was 87db514, checked in by Amar Takhar <amar@…>, on 04/16/15 at 19:26:21

Initial commit of the umon repository.

Prior to this three changes were made:

  • Remove umon_ prefix from parent directories.
  • Collapse main/target/ into main/
  • Remove ports/template/flashtest.scr.ucon script.
  • Property mode set to 100644
File size: 2.2 KB
Line 
1/**************************************************************************
2 *
3 * Copyright (c) 2013 Alcatel-Lucent
4 *
5 * Alcatel Lucent licenses this file to You under the Apache License,
6 * Version 2.0 (the "License"); you may not use this file except in
7 * compliance with the License.  A copy of the License is contained the
8 * file LICENSE at the top level of this repository.
9 * You may also obtain a copy of the License at:
10 *
11 *      http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 **************************************************************************
20 *
21 * FILENAME_HERE
22 *
23 * DESCRIPTION_HERE
24 *
25 * Original author:     Ed Sutter (ed.sutter@alcatel-lucent.com)
26 *
27 */
28
29#include "config.h"
30#include "arm.h"
31#include "stddefs.h"
32#include "genlib.h"
33#include "warmstart.h"
34
35ulong   ExceptionAddr;
36int     ExceptionType;
37
38/***********************************************************************
39 *
40 * umon_exception()
41 * Default exception handler used by the low level code in vectors_arm.S.
42 */
43void
44umon_exception(ulong addr, ulong type)
45{
46        ExceptionAddr = addr;
47        ExceptionType = type;
48        monrestart(EXCEPTION);
49}
50
51/***********************************************************************
52 *
53 * ExceptionType2String():
54 * This function simply returns a string that verbosely describes
55 * the incoming exception type (vector number).
56 */
57char *
58ExceptionType2String(int type)
59{
60        char *string;
61
62        switch(type) {
63                case EXCTYPE_UNDEF:
64                        string = "Undefined instruction";
65                        break;
66                case EXCTYPE_ABORTP:
67                        string = "Abort prefetch";
68                        break;
69                case EXCTYPE_ABORTD:
70                        string = "Abort data";
71                        break;
72                case EXCTYPE_IRQ:
73                        string = "IRQ";
74                        break;
75                case EXCTYPE_FIRQ:
76                        string = "Fast IRQ";
77                        break;
78                case EXCTYPE_NOTASSGN:
79                        string = "Not assigned";
80                        break;
81                case EXCTYPE_SWI:
82                        string = "Software Interrupt";
83                        break;
84                default:
85                        string = "???";
86                        break;
87        }
88        return(string);
89}
90
91void
92vinit(void)
93{
94}
Note: See TracBrowser for help on using the repository browser.