[rv]信号处理进入用户态前恢复gp (#9072)
* [rv/virt/stackframe.h]添加GP寄存器保存偏移量宏 * 【rv/c906/stackframe.h]定义GP寄存器存储偏移量 * [rv]信号处理切换到用户态前恢复gp
This commit is contained in:
parent
af5bd68c58
commit
06ad67d549
|
@ -174,6 +174,9 @@ arch_thread_signal_enter:
|
|||
/* dummy a2 */
|
||||
mv a2, a1
|
||||
|
||||
/* restore user GP */
|
||||
LOAD gp, FRAME_OFF_GP(s3)
|
||||
|
||||
/**
|
||||
* handler(signo, psi, ucontext);
|
||||
*/
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#define BYTES(idx) ((idx) * REGBYTES)
|
||||
#define FRAME_OFF_SSTATUS BYTES(2)
|
||||
#define FRAME_OFF_SP BYTES(32)
|
||||
#define FRAME_OFF_GP BYTES(3)
|
||||
|
||||
#include "cpuport.h"
|
||||
#include "encoding.h"
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#define BYTES(idx) ((idx) * REGBYTES)
|
||||
#define FRAME_OFF_SSTATUS BYTES(2)
|
||||
#define FRAME_OFF_SP BYTES(32)
|
||||
#define FRAME_OFF_GP BYTES(3)
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
|
|
Loading…
Reference in New Issue