1 /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
3 * Copyright (C) 2012 Regents of the University of California
6 #ifndef _UAPI_ASM_RISCV_PTRACE_H
7 #define _UAPI_ASM_RISCV_PTRACE_H
11 #include <linux/types.h>
13 #define PTRACE_GETFDPIC 33
15 #define PTRACE_GETFDPIC_EXEC 0
16 #define PTRACE_GETFDPIC_INTERP 1
19 * User-mode register state for core dumps, ptrace, sigcontext
21 * This decouples struct pt_regs from the userspace ABI.
22 * struct user_regs_struct must form a prefix of struct pt_regs.
24 struct user_regs_struct
{
59 struct __riscv_f_ext_state
{
64 struct __riscv_d_ext_state
{
69 struct __riscv_q_ext_state
{
70 __u64 f
[64] __attribute__((aligned(16)));
73 * Reserved for expansion of sigcontext structure. Currently zeroed
74 * upon signal, and must be zero upon sigreturn.
79 struct __riscv_ctx_hdr
{
84 struct __riscv_extra_ext_header
{
85 __u32 __padding
[129] __attribute__((aligned(16)));
87 * Reserved for expansion of sigcontext structure. Currently zeroed
88 * upon signal, and must be zero upon sigreturn.
91 struct __riscv_ctx_hdr hdr
;
94 union __riscv_fp_state
{
95 struct __riscv_f_ext_state f
;
96 struct __riscv_d_ext_state d
;
97 struct __riscv_q_ext_state q
;
100 struct __riscv_v_ext_state
{
101 unsigned long vstart
;
108 * In signal handler, datap will be set a correct user stack offset
109 * and vector registers will be copied to the address of datap
114 struct __riscv_v_regset_state
{
115 unsigned long vstart
;
124 * According to spec: The number of bits in a single vector register,
125 * VLEN >= ELEN, which must be a power of 2, and must be no greater than
126 * 2^16 = 65536bits = 8192bytes
128 #define RISCV_MAX_VLENB (8192)
130 #endif /* __ASSEMBLY__ */
132 #endif /* _UAPI_ASM_RISCV_PTRACE_H */