/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/*2* This file is subject to the terms and conditions of the GNU General Public3* License. See the file "COPYING" in the main directory of this archive4* for more details.5*6* Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 by Ralf Baechle7* Copyright (C) 1999, 2000 Silicon Graphics, Inc.8*/9#ifndef _UAPI_ASM_PTRACE_H10#define _UAPI_ASM_PTRACE_H1112#include <linux/types.h>1314/* 0 - 31 are integer registers, 32 - 63 are fp registers. */15#define FPR_BASE 3216#define PC 6417#define CAUSE 6518#define BADVADDR 6619#define MMHI 6720#define MMLO 6821#define FPC_CSR 6922#define FPC_EIR 7023#define DSP_BASE 71 /* 3 more hi / lo register pairs */24#define DSP_CONTROL 7725#define ACX 782627/*28* This struct defines the registers as used by PTRACE_{GET,SET}REGS. The29* format is the same for both 32- and 64-bit processes. Registers for 32-bit30* processes are sign extended.31*/32#ifdef __KERNEL__33struct user_pt_regs {34#else35struct pt_regs {36#endif37/* Saved main processor registers. */38__u64 regs[32];3940/* Saved special registers. */41__u64 lo;42__u64 hi;43__u64 cp0_epc;44__u64 cp0_badvaddr;45__u64 cp0_status;46__u64 cp0_cause;47} __attribute__ ((aligned (8)));4849/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */50#define PTRACE_GETREGS 1251#define PTRACE_SETREGS 1352#define PTRACE_GETFPREGS 1453#define PTRACE_SETFPREGS 1554/* #define PTRACE_GETFPXREGS 18 */55/* #define PTRACE_SETFPXREGS 19 */5657#define PTRACE_OLDSETOPTIONS 215859#define PTRACE_GET_THREAD_AREA 2560#define PTRACE_SET_THREAD_AREA 266162/* Calls to trace a 64bit program from a 32bit program. */63#define PTRACE_PEEKTEXT_3264 0xc064#define PTRACE_PEEKDATA_3264 0xc165#define PTRACE_POKETEXT_3264 0xc266#define PTRACE_POKEDATA_3264 0xc367#define PTRACE_GET_THREAD_AREA_3264 0xc46869/* Read and write watchpoint registers. */70enum pt_watch_style {71pt_watch_style_mips32,72pt_watch_style_mips6473};74struct mips32_watch_regs {75unsigned int watchlo[8];76/* Lower 16 bits of watchhi. */77unsigned short watchhi[8];78/* Valid mask and I R W bits.79* bit 0 -- 1 if W bit is usable.80* bit 1 -- 1 if R bit is usable.81* bit 2 -- 1 if I bit is usable.82* bits 3 - 11 -- Valid watchhi mask bits.83*/84unsigned short watch_masks[8];85/* The number of valid watch register pairs. */86unsigned int num_valid;87} __attribute__((aligned(8)));8889struct mips64_watch_regs {90unsigned long long watchlo[8];91unsigned short watchhi[8];92unsigned short watch_masks[8];93unsigned int num_valid;94} __attribute__((aligned(8)));9596struct pt_watch_regs {97enum pt_watch_style style;98union {99struct mips32_watch_regs mips32;100struct mips64_watch_regs mips64;101};102};103104#define PTRACE_GET_WATCH_REGS 0xd0105#define PTRACE_SET_WATCH_REGS 0xd1106107108#endif /* _UAPI_ASM_PTRACE_H */109110111