/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ /* * Copyright (C) 2001 PPC64 Team, IBM Corp * * This struct defines the way the registers are stored on the * kernel stack during a system call or other kernel entry. * * this should only contain volatile regs * since we can keep non-volatile in the thread_struct * should set this up when only volatiles are saved * by intr code. * * Since this is going on the stack, *CARE MUST BE TAKEN* to insure * that the overall structure is a multiple of 16 bytes in length. * * Note that the offsets of the fields in this struct correspond with * the PT_* values below. This simplifies arch/powerpc/kernel/ptrace.c. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version.
*/ #ifndef _UAPI_ASM_POWERPC_PTRACE_H #define _UAPI_ASM_POWERPC_PTRACE_H
#include <linux/types.h>
#ifndef __ASSEMBLY__
#ifdef __KERNEL__ struct user_pt_regs #else struct pt_regs #endif
{ unsignedlong gpr[32]; unsignedlong nip; unsignedlong msr; unsignedlong orig_gpr3; /* Used for restarting system calls */ unsignedlong ctr; unsignedlong link; unsignedlong xer; unsignedlong ccr; #ifdef __powerpc64__ unsignedlong softe; /* Soft enabled/disabled */ #else unsignedlong mq; /* 601 only (not used at present) */ /* Used on APUS to hold IPL value. */ #endif unsignedlong trap; /* Reason for being here */ /* N.B. for critical exceptions on 4xx, the dar and dsisr
fields are overloaded to hold srr0 and srr1. */ unsignedlong dar; /* Fault registers */ unsignedlong dsisr; /* on 4xx/Book-E used for ESR */ unsignedlong result; /* Result of a system call */
};
/* * Only store first 32 VSRs here. The second 32 VSRs in VR0-31
*/ #define PT_VSR0 150 /* each VSR reg occupies 2 slots in 64-bit */ #define PT_VSR31 (PT_VSR0 + 2*31) #endif/* __powerpc64__ */
/* * Get/set all the altivec registers v0..v31, vscr, vrsave, in one go. * The transfer totals 34 quadword. Quadwords 0-31 contain the * corresponding vector registers. Quadword 32 contains the vscr as the * last word (offset 12) within that quadword. Quadword 33 contains the * vrsave as the first word (offset 0) within the quadword. * * This definition of the VMX state is compatible with the current PPC32 * ptrace interface. This allows signal handling and ptrace to use the same * structures. This also simplifies the implementation of a bi-arch * (combined (32- and 64-bit) gdb.
*/ #define PTRACE_GETVRREGS 0x12 #define PTRACE_SETVRREGS 0x13
/* Get/set all the upper 32-bits of the SPE registers, accumulator, and
* spefscr, in one go */ #define PTRACE_GETEVRREGS 0x14 #define PTRACE_SETEVRREGS 0x15
/* Get the first 32 128bit VSX registers */ #define PTRACE_GETVSRREGS 0x1b #define PTRACE_SETVSRREGS 0x1c
/* * Get or set a debug register. The first 16 are DABR registers and the * second 16 are IABR registers.
*/ #define PTRACE_GET_DEBUGREG 0x19 #define PTRACE_SET_DEBUGREG 0x1a
/* (new) PTRACE requests using the same numbers as x86 and the same * argument ordering. Additionally, they support more registers too
*/ #define PTRACE_GETREGS 0xc #define PTRACE_SETREGS 0xd #define PTRACE_GETFPREGS 0xe #define PTRACE_SETFPREGS 0xf #define PTRACE_GETREGS64 0x16 #define PTRACE_SETREGS64 0x17
/* Calls to trace a 64bit program from a 32bit program */ #define PPC_PTRACE_PEEKTEXT_3264 0x95 #define PPC_PTRACE_PEEKDATA_3264 0x94 #define PPC_PTRACE_POKETEXT_3264 0x93 #define PPC_PTRACE_POKEDATA_3264 0x92 #define PPC_PTRACE_PEEKUSR_3264 0x91 #define PPC_PTRACE_POKEUSR_3264 0x90
#define PTRACE_SINGLEBLOCK 0x100 /* resume execution until next branch */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.