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

Subversion Repositories or1k_soc_on_altera_embedded_dev_kit

[/] [or1k_soc_on_altera_embedded_dev_kit/] [trunk/] [linux-2.6/] [linux-2.6.24/] [include/] [asm-or32/] [ptrace.h] - Blame information for rev 7

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 xianfeng
#ifndef _OR32_PTRACE_H
2
#define _OR32_PTRACE_H
3
 
4
#include <asm/spr_defs.h>
5
/*
6
 * This struct defines the way the registers are stored on the
7
 * kernel stack during a system call or other kernel entry.
8
 *
9
 * this should only contain volatile regs
10
 * since we can keep non-volatile in the thread_struct
11
 * should set this up when only volatiles are saved
12
 * by intr code.
13
 *
14
 * Since this is going on the stack, *CARE MUST BE TAKEN* to insure
15
 * that the overall structure is a multiple of 16 bytes in length.
16
 *
17
 * Note that the offsets of the fields in this struct correspond with
18
 * the values below.
19
 */
20
 
21
#ifndef __ASSEMBLY__
22
 
23
struct pt_regs {
24
        long  pc;
25
        long  sr;
26
        long  sp;
27
        long  gprs[30];
28
        long  orig_gpr3;  /* Used for restarting system calls */
29
        long  result;     /* Result of a system call */
30
        long  syscallno;  /* Syscall no. (used by strace) */
31
};
32
#endif /* __ASSEMBLY__ */
33
 
34
#ifdef __KERNEL__
35
#define STACK_FRAME_OVERHEAD  0  /* size of minimum stack frame */
36
 
37
/* Size of stack frame allocated when calling signal handler. */
38
#define __SIGNAL_FRAMESIZE  64
39
 
40
#define instruction_pointer(regs) ((regs)->pc)
41
#define user_mode(regs) (((regs)->sr & SPR_SR_SM) == 0)
42
#define profile_pc(regs) instruction_pointer(regs)
43
 
44
#endif /* __KERNEL__ */
45
 
46
/*
47
 * Offsets used by 'ptrace' system call interface.
48
 */
49
#define PC        0
50
#define SR        4
51
#define SP        8
52
#define GPR2      12
53
#define GPR3      16
54
#define GPR4      20
55
#define GPR5      24
56
#define GPR6      28
57
#define GPR7      32
58
#define GPR8      36
59
#define GPR9      40
60
#define GPR10     44
61
#define GPR11     48
62
#define GPR12     52
63
#define GPR13     56
64
#define GPR14     60
65
#define GPR15     64
66
#define GPR16     68
67
#define GPR17     72
68
#define GPR18     76
69
#define GPR19     80
70
#define GPR20     84
71
#define GPR21     88
72
#define GPR22     92
73
#define GPR23     96
74
#define GPR24     100
75
#define GPR25     104
76
#define GPR26     108
77
#define GPR27     112
78
#define GPR28     116
79
#define GPR29     120
80
#define GPR30     124
81
#define GPR31     128
82
#define ORIG_GPR3 132
83
#define RESULT    136
84
#define SYSCALLNO 140
85
 
86
#endif /* _OR32_PTRACE_H */

powered by: WebSVN 2.1.0

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