File indexing completed on 2025-05-11 08:23:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef _LIBCPU_RAW_EXCEPTION_H
0027 #define _LIBCPU_RAW_EXCEPTION_H
0028
0029 #include <libcpu/vectors.h>
0030
0031
0032
0033
0034
0035 #define ASM_RESET_VECTOR 0x01
0036 #define ASM_MACH_VECTOR 0x02
0037
0038 #define ASM_EXT_VECTOR 0x05
0039 #define ASM_ALIGN_VECTOR 0x06
0040 #define ASM_PROG_VECTOR 0x07
0041 #define ASM_FLOAT_VECTOR 0x08
0042 #define ASM_DEC_VECTOR 0x09
0043
0044 #define ASM_SYS_VECTOR 0x0C
0045 #define ASM_TRACE_VECTOR 0x0D
0046 #define ASM_FLOATASSIST_VECTOR 0x0E
0047
0048 #define ASM_SOFTEMUL_VECTOR 0x10
0049
0050 #define ASM_IPROT_VECTOR 0x13
0051 #define ASM_DPROT_VECTOR 0x14
0052
0053 #define ASM_DBREAK_VECTOR 0x1C
0054 #define ASM_IBREAK_VECTOR 0x1D
0055 #define ASM_MEBREAK_VECTOR 0x1E
0056 #define ASM_NMEBREAK_VECTOR 0x1F
0057
0058 #ifndef ASM
0059
0060
0061
0062
0063
0064 typedef unsigned char rtems_vector;
0065 struct __rtems_raw_except_connect_data__;
0066 typedef unsigned char rtems_raw_except_hdl_size;
0067
0068 typedef struct {
0069 rtems_vector vector;
0070 rtems_exception_handler_t* raw_hdl;
0071 }rtems_raw_except_hdl;
0072
0073 typedef void (*rtems_raw_except_enable) (const struct __rtems_raw_except_connect_data__*);
0074 typedef void (*rtems_raw_except_disable) (const struct __rtems_raw_except_connect_data__*);
0075 typedef int (*rtems_raw_except_is_enabled) (const struct __rtems_raw_except_connect_data__*);
0076
0077 typedef struct __rtems_raw_except_connect_data__{
0078
0079
0080
0081 rtems_vector exceptIndex;
0082
0083
0084
0085 rtems_raw_except_hdl hdl;
0086
0087
0088
0089
0090
0091
0092
0093
0094 rtems_raw_except_enable on;
0095
0096
0097
0098
0099
0100
0101
0102
0103 rtems_raw_except_disable off;
0104
0105
0106
0107 rtems_raw_except_is_enabled isOn;
0108 }rtems_raw_except_connect_data;
0109
0110 typedef struct {
0111
0112
0113
0114 unsigned int exceptSize;
0115
0116
0117
0118 rtems_raw_except_connect_data defaultRawEntry;
0119
0120
0121
0122 rtems_raw_except_connect_data* rawExceptHdlTbl;
0123 }rtems_raw_except_global_settings;
0124
0125
0126
0127
0128 extern int mpc5xx_set_exception (const rtems_raw_except_connect_data*);
0129
0130
0131
0132
0133 extern int mpc5xx_get_current_exception (rtems_raw_except_connect_data*);
0134
0135
0136
0137
0138 extern int mpc5xx_delete_exception (const rtems_raw_except_connect_data*);
0139
0140
0141
0142
0143 extern int mpc5xx_vector_is_valid(rtems_vector vector);
0144
0145 inline static void* mpc5xx_get_vector_addr(rtems_vector vector)
0146 {
0147 return ((void*) (((unsigned) vector) << 8));
0148 }
0149
0150
0151
0152 extern int mpc5xx_init_exceptions (rtems_raw_except_global_settings* config);
0153 extern int mpc5xx_get_exception_config (rtems_raw_except_global_settings** config);
0154
0155 # endif
0156
0157 #define SIZEOF_
0158
0159 #endif