blob: 39971cdabb5116377cb72cc78b2a88f4b8482a38 [file] [log] [blame]
Borislav Petkovb70ef012009-06-25 19:32:38 +02001#define ERROR_CODE(x) ((x) & 0xffff)
2#define EXT_ERROR_CODE(x) (((x) >> 16) & 0x1f)
Borislav Petkov5110dbd2009-06-25 19:51:04 +02003#define EXT_ERR_MSG(x) ext_msgs[EXT_ERROR_CODE(x)]
4
Borislav Petkovb70ef012009-06-25 19:32:38 +02005#define LOW_SYNDROME(x) (((x) >> 15) & 0xff)
6#define HIGH_SYNDROME(x) (((x) >> 24) & 0xff)
7
8#define TLB_ERROR(x) (((x) & 0xFFF0) == 0x0010)
9#define MEM_ERROR(x) (((x) & 0xFF00) == 0x0100)
10#define BUS_ERROR(x) (((x) & 0xF800) == 0x0800)
11
12#define TT(x) (((x) >> 2) & 0x3)
13#define TT_MSG(x) tt_msgs[TT(x)]
14#define II(x) (((x) >> 2) & 0x3)
15#define II_MSG(x) ii_msgs[II(x)]
16#define LL(x) (((x) >> 0) & 0x3)
17#define LL_MSG(x) ll_msgs[LL(x)]
18#define RRRR(x) (((x) >> 4) & 0xf)
19#define RRRR_MSG(x) rrrr_msgs[RRRR(x)]
20#define TO(x) (((x) >> 8) & 0x1)
21#define TO_MSG(x) to_msgs[TO(x)]
22#define PP(x) (((x) >> 9) & 0x3)
23#define PP_MSG(x) pp_msgs[PP(x)]
24
25extern const char *tt_msgs[];
26extern const char *ll_msgs[];
27extern const char *rrrr_msgs[];
28extern const char *pp_msgs[];
29extern const char *to_msgs[];
30extern const char *ii_msgs[];
31extern const char *ext_msgs[];