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 _ASM_RISCV_SIGCONTEXT_H
7#define _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 RISCV_ZICFISS_MAGIC 0x9487
14#define END_MAGIC 0x0
15
16/* The size of END signal context header. */
17#define END_HDR_SIZE 0x0
18
19#ifndef __ASSEMBLER__
20
21struct __sc_riscv_v_state {
22 struct __riscv_v_ext_state v_state;
23} __attribute__((aligned(16)));
24
25/*
26 * Signal context structure
27 *
28 * This contains the context saved before a signal handler is invoked;
29 * it is restored by sys_rt_sigreturn.
30 */
31struct sigcontext {
32 struct user_regs_struct sc_regs;
33 union {
34 union __riscv_fp_state sc_fpregs;
35 struct __riscv_extra_ext_header sc_extdesc;
36 };
37};
38
39#endif /*!__ASSEMBLER__*/
40
41#endif /* _ASM_RISCV_SIGCONTEXT_H */