162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci/* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg 362306a36Sopenharmony_ci** Copyright (C) 2000 Grant Grundler, Hewlett-Packard 462306a36Sopenharmony_ci*/ 562306a36Sopenharmony_ci#ifndef _UAPI_PARISC_PTRACE_H 662306a36Sopenharmony_ci#define _UAPI_PARISC_PTRACE_H 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#include <linux/types.h> 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci/* This struct defines the way the registers are stored on the 1262306a36Sopenharmony_ci * stack during a system call. 1362306a36Sopenharmony_ci * 1462306a36Sopenharmony_ci * N.B. gdb/strace care about the size and offsets within this 1562306a36Sopenharmony_ci * structure. If you change things, you may break object compatibility 1662306a36Sopenharmony_ci * for those applications. 1762306a36Sopenharmony_ci * 1862306a36Sopenharmony_ci * Please do NOT use this structure for future programs, but use 1962306a36Sopenharmony_ci * user_regs_struct (see below) instead. 2062306a36Sopenharmony_ci * 2162306a36Sopenharmony_ci * It can be accessed through PTRACE_PEEKUSR/PTRACE_POKEUSR only. 2262306a36Sopenharmony_ci */ 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_cistruct pt_regs { 2562306a36Sopenharmony_ci unsigned long gr[32]; /* PSW is in gr[0] */ 2662306a36Sopenharmony_ci __u64 fr[32]; 2762306a36Sopenharmony_ci unsigned long sr[ 8]; 2862306a36Sopenharmony_ci unsigned long iasq[2]; 2962306a36Sopenharmony_ci unsigned long iaoq[2]; 3062306a36Sopenharmony_ci unsigned long cr27; 3162306a36Sopenharmony_ci unsigned long pad0; /* available for other uses */ 3262306a36Sopenharmony_ci unsigned long orig_r28; 3362306a36Sopenharmony_ci unsigned long ksp; 3462306a36Sopenharmony_ci unsigned long kpc; 3562306a36Sopenharmony_ci unsigned long sar; /* CR11 */ 3662306a36Sopenharmony_ci unsigned long iir; /* CR19 */ 3762306a36Sopenharmony_ci unsigned long isr; /* CR20 */ 3862306a36Sopenharmony_ci unsigned long ior; /* CR21 */ 3962306a36Sopenharmony_ci unsigned long ipsw; /* CR22 */ 4062306a36Sopenharmony_ci}; 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci/** 4362306a36Sopenharmony_ci * struct user_regs_struct - User general purpose registers 4462306a36Sopenharmony_ci * 4562306a36Sopenharmony_ci * This is the user-visible general purpose register state structure 4662306a36Sopenharmony_ci * which is used to define the elf_gregset_t. 4762306a36Sopenharmony_ci * 4862306a36Sopenharmony_ci * It can be accessed through PTRACE_GETREGSET with NT_PRSTATUS 4962306a36Sopenharmony_ci * and through PTRACE_GETREGS. 5062306a36Sopenharmony_ci */ 5162306a36Sopenharmony_cistruct user_regs_struct { 5262306a36Sopenharmony_ci unsigned long gr[32]; /* PSW is in gr[0] */ 5362306a36Sopenharmony_ci unsigned long sr[8]; 5462306a36Sopenharmony_ci unsigned long iaoq[2]; 5562306a36Sopenharmony_ci unsigned long iasq[2]; 5662306a36Sopenharmony_ci unsigned long sar; /* CR11 */ 5762306a36Sopenharmony_ci unsigned long iir; /* CR19 */ 5862306a36Sopenharmony_ci unsigned long isr; /* CR20 */ 5962306a36Sopenharmony_ci unsigned long ior; /* CR21 */ 6062306a36Sopenharmony_ci unsigned long ipsw; /* CR22 */ 6162306a36Sopenharmony_ci unsigned long cr0; 6262306a36Sopenharmony_ci unsigned long cr24, cr25, cr26, cr27, cr28, cr29, cr30, cr31; 6362306a36Sopenharmony_ci unsigned long cr8, cr9, cr12, cr13, cr10, cr15; 6462306a36Sopenharmony_ci unsigned long _pad[80-64]; /* pad to ELF_NGREG (80) */ 6562306a36Sopenharmony_ci}; 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci/** 6862306a36Sopenharmony_ci * struct user_fp_struct - User floating point registers 6962306a36Sopenharmony_ci * 7062306a36Sopenharmony_ci * This is the user-visible floating point register state structure. 7162306a36Sopenharmony_ci * It uses the same layout and size as elf_fpregset_t. 7262306a36Sopenharmony_ci * 7362306a36Sopenharmony_ci * It can be accessed through PTRACE_GETREGSET with NT_PRFPREG 7462306a36Sopenharmony_ci * and through PTRACE_GETFPREGS. 7562306a36Sopenharmony_ci */ 7662306a36Sopenharmony_cistruct user_fp_struct { 7762306a36Sopenharmony_ci __u64 fr[32]; 7862306a36Sopenharmony_ci}; 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci/* 8262306a36Sopenharmony_ci * The numbers chosen here are somewhat arbitrary but absolutely MUST 8362306a36Sopenharmony_ci * not overlap with any of the number assigned in <linux/ptrace.h>. 8462306a36Sopenharmony_ci * 8562306a36Sopenharmony_ci * These ones are taken from IA-64 on the assumption that theirs are 8662306a36Sopenharmony_ci * the most correct (and we also want to support PTRACE_SINGLEBLOCK 8762306a36Sopenharmony_ci * since we have taken branch traps too) 8862306a36Sopenharmony_ci */ 8962306a36Sopenharmony_ci#define PTRACE_SINGLEBLOCK 12 /* resume execution until next branch */ 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci#define PTRACE_GETREGS 18 9262306a36Sopenharmony_ci#define PTRACE_SETREGS 19 9362306a36Sopenharmony_ci#define PTRACE_GETFPREGS 14 9462306a36Sopenharmony_ci#define PTRACE_SETFPREGS 15 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci#endif /* _UAPI_PARISC_PTRACE_H */ 97