1 /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 /* 3 * Copyright (C) 2012 Regents of the University of California 4 */ 5 6 #ifndef _UAPI_ASM_RISCV_SIGCONTEXT_H 7 #define _UAPI_ASM_RISCV_SIGCONTEXT_H 8 9 #include <asm/ptrace.h> 10 11 /* The Magic number for signal context frame header. */ 12 #define RISCV_V_MAGIC 0x53465457 13 #define END_MAGIC 0x0 14 15 /* The size of END signal context header. */ 16 #define END_HDR_SIZE 0x0 17 18 #ifndef __ASSEMBLY__ 19 20 struct __sc_riscv_v_state { 21 struct __riscv_v_ext_state v_state; 22 } __attribute__((aligned(16))); 23 24 /* 25 * Signal context structure 26 * 27 * This contains the context saved before a signal handler is invoked; 28 * it is restored by sys_rt_sigreturn. 29 */ 30 struct sigcontext { 31 struct user_regs_struct sc_regs; 32 union { 33 union __riscv_fp_state sc_fpregs; 34 struct __riscv_extra_ext_header sc_extdesc; 35 }; 36 }; 37 38 #endif /*!__ASSEMBLY__*/ 39 40 #endif /* _UAPI_ASM_RISCV_SIGCONTEXT_H */ 41