1 #ifndef _ARCH_TRAPS_H_ 2 #define _ARCH_TRAPS_H_ 3 4 5 #include <SupportDefs.h> 6 7 8 struct iframe { 9 uint64 ra; 10 uint64 t6; 11 uint64 sp; 12 uint64 gp; 13 uint64 tp; 14 uint64 t0; 15 uint64 t1; 16 uint64 t2; 17 uint64 t5; 18 uint64 s1; 19 uint64 a0; 20 uint64 a1; 21 uint64 a2; 22 uint64 a3; 23 uint64 a4; 24 uint64 a5; 25 uint64 a6; 26 uint64 a7; 27 uint64 s2; 28 uint64 s3; 29 uint64 s4; 30 uint64 s5; 31 uint64 s6; 32 uint64 s7; 33 uint64 s8; 34 uint64 s9; 35 uint64 s10; 36 uint64 s11; 37 uint64 t3; 38 uint64 t4; 39 uint64 fp; 40 uint64 epc; 41 }; 42 43 44 extern "C" { 45 46 void SVec(); 47 void STrap(iframe* frame); 48 49 }; 50 51 52 void arch_traps_init(); 53 54 55 #endif // _ARCH_TRAPS_H_ 56