Skip to content

Commit aa55225

Browse files
xen0nchenhuacai
authored andcommitted
LoongArch: Define regular names for BCE/WATCH/HVC/GSPR exceptions
Define them according to the ISA manual, in order to enable matching the sub-exceptions for humanization purposes later. Signed-off-by: WANG Xuerui <git@xen0n.name> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 9e36fa4 commit aa55225

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

arch/loongarch/include/asm/loongarch.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ __BUILD_CSR_OP(tlbidx)
13971397
#define EXSUBCODE_ADEF 0 /* Fetch Instruction */
13981398
#define EXSUBCODE_ADEM 1 /* Access Memory*/
13991399
#define EXCCODE_ALE 9 /* Unalign Access */
1400-
#define EXCCODE_OOB 10 /* Out of bounds */
1400+
#define EXCCODE_BCE 10 /* Bounds Check Error */
14011401
#define EXCCODE_SYS 11 /* System call */
14021402
#define EXCCODE_BP 12 /* Breakpoint */
14031403
#define EXCCODE_INE 13 /* Inst. Not Exist */
@@ -1408,11 +1408,13 @@ __BUILD_CSR_OP(tlbidx)
14081408
#define EXCCODE_FPE 18 /* Floating Point Exception */
14091409
#define EXCSUBCODE_FPE 0 /* Floating Point Exception */
14101410
#define EXCSUBCODE_VFPE 1 /* Vector Exception */
1411-
#define EXCCODE_WATCH 19 /* Watch address reference */
1411+
#define EXCCODE_WATCH 19 /* WatchPoint Exception */
1412+
#define EXCSUBCODE_WPEF 0 /* ... on Instruction Fetch */
1413+
#define EXCSUBCODE_WPEM 1 /* ... on Memory Accesses */
14121414
#define EXCCODE_BTDIS 20 /* Binary Trans. Disabled */
14131415
#define EXCCODE_BTE 21 /* Binary Trans. Exception */
1414-
#define EXCCODE_PSI 22 /* Guest Privileged Error */
1415-
#define EXCCODE_HYP 23 /* Hypercall */
1416+
#define EXCCODE_GSPR 22 /* Guest Privileged Error */
1417+
#define EXCCODE_HVC 23 /* Hypercall */
14161418
#define EXCCODE_GCM 24 /* Guest CSR modified */
14171419
#define EXCSUBCODE_GCSC 0 /* Software caused */
14181420
#define EXCSUBCODE_GCHC 1 /* Hardware caused */

0 commit comments

Comments
 (0)