OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-mips64/] [ptrace.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * This file is subject to the terms and conditions of the GNU General Public
3
 * License.  See the file "COPYING" in the main directory of this archive
4
 * for more details.
5
 *
6
 * Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 by Ralf Baechle
7
 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8
 */
9
#ifndef _ASM_PTRACE_H
10
#define _ASM_PTRACE_H
11
 
12
/* 0 - 31 are integer registers, 32 - 63 are fp registers.  */
13
#define FPR_BASE        32
14
#define PC              64
15
#define CAUSE           65
16
#define BADVADDR        66
17
#define MMHI            67
18
#define MMLO            68
19
#define FPC_CSR         69
20
#define FPC_EIR         70
21
 
22
#ifndef __ASSEMBLY__
23
 
24
/*
25
 * This struct defines the way the registers are stored on the stack during a
26
 * system call/exception. As usual the registers k0/k1 aren't being saved.
27
 */
28
struct pt_regs {
29
        /* Pad bytes for argument save space on the stack. */
30
        unsigned long pad0[6];
31
 
32
        /* Saved main processor registers. */
33
        unsigned long regs[32];
34
 
35
        /* Saved special registers. */
36
        unsigned long cp0_status;
37
        unsigned long lo;
38
        unsigned long hi;
39
        unsigned long cp0_badvaddr;
40
        unsigned long cp0_cause;
41
        unsigned long cp0_epc;
42
};
43
 
44
#define __str2(x) #x
45
#define __str(x) __str2(x)
46
 
47
#define save_static_function(symbol)                                    \
48
__asm__ (                                                               \
49
        ".globl\t" #symbol "\n\t"                                       \
50
        ".align\t2\n\t"                                                 \
51
        ".type\t" #symbol ", @function\n\t"                             \
52
        ".ent\t" #symbol ", 0\n"                                        \
53
        #symbol":\n\t"                                                  \
54
        ".frame\t$29, 0, $31\n\t"                                       \
55
        "sd\t$16,"__str(PT_R16)"($29)\t\t\t# save_static_function\n\t"  \
56
        "sd\t$17,"__str(PT_R17)"($29)\n\t"                              \
57
        "sd\t$18,"__str(PT_R18)"($29)\n\t"                              \
58
        "sd\t$19,"__str(PT_R19)"($29)\n\t"                              \
59
        "sd\t$20,"__str(PT_R20)"($29)\n\t"                              \
60
        "sd\t$21,"__str(PT_R21)"($29)\n\t"                              \
61
        "sd\t$22,"__str(PT_R22)"($29)\n\t"                              \
62
        "sd\t$23,"__str(PT_R23)"($29)\n\t"                              \
63
        "sd\t$30,"__str(PT_R30)"($29)\n\t"                              \
64
        ".end\t" #symbol "\n\t"                                         \
65
        ".size\t" #symbol",. - " #symbol)
66
 
67
/* Used in declaration of save_static functions.  */
68
#define static_unused static __attribute__((unused))
69
 
70
#define abi64_no_regargs                                                \
71
        unsigned long __dummy0,                                         \
72
        unsigned long __dummy1,                                         \
73
        unsigned long __dummy2,                                         \
74
        unsigned long __dummy3,                                         \
75
        unsigned long __dummy4,                                         \
76
        unsigned long __dummy5,                                         \
77
        unsigned long __dummy6,                                         \
78
        unsigned long __dummy7
79
 
80
#endif /* !__ASSEMBLY__ */
81
 
82
/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
83
/* #define PTRACE_GETREGS               12 */
84
/* #define PTRACE_SETREGS               13 */
85
/* #define PTRACE_GETFPREGS             14 */
86
/* #define PTRACE_SETFPREGS             15 */
87
/* #define PTRACE_GETFPXREGS            18 */
88
/* #define PTRACE_SETFPXREGS            19 */
89
 
90
#define PTRACE_SETOPTIONS       21
91
 
92
/* options set using PTRACE_SETOPTIONS */
93
#define PTRACE_O_TRACESYSGOOD   0x00000001
94
 
95
#ifdef __ASSEMBLY__
96
#include <asm/offset.h>
97
#endif /* !__ASSEMBLY__ */
98
 
99
#ifdef __KERNEL__
100
 
101
#ifndef __ASSEMBLY__
102
#define instruction_pointer(regs) ((regs)->cp0_epc)
103
 
104
extern void show_regs(struct pt_regs *);
105
#endif /* !__ASSEMBLY__ */
106
 
107
#endif
108
 
109
#endif /* _ASM_PTRACE_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.