Line | |
---|
1 | /* |
---|
2 | **************************************************************************** |
---|
3 | * (C) 2005 - Grzegorz Milos - Intel Reseach Cambridge |
---|
4 | **************************************************************************** |
---|
5 | * |
---|
6 | * File: traps.h |
---|
7 | * Author: Grzegorz Milos (gm281@cam.ac.uk) |
---|
8 | * |
---|
9 | * Date: Jun 2005 |
---|
10 | * |
---|
11 | * Environment: Xen Minimal OS |
---|
12 | * Description: Deals with traps |
---|
13 | * |
---|
14 | **************************************************************************** |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef _TRAPS_H_ |
---|
18 | #define _TRAPS_H_ |
---|
19 | |
---|
20 | #ifdef __i386__ |
---|
21 | struct pt_regs { |
---|
22 | long ebx; |
---|
23 | long ecx; |
---|
24 | long edx; |
---|
25 | long esi; |
---|
26 | long edi; |
---|
27 | long ebp; |
---|
28 | long eax; |
---|
29 | int xds; |
---|
30 | int xes; |
---|
31 | long orig_eax; |
---|
32 | long eip; |
---|
33 | int xcs; |
---|
34 | long eflags; |
---|
35 | long esp; |
---|
36 | int xss; |
---|
37 | }; |
---|
38 | #elif __x86_64__ |
---|
39 | |
---|
40 | struct pt_regs { |
---|
41 | unsigned long r15; |
---|
42 | unsigned long r14; |
---|
43 | unsigned long r13; |
---|
44 | unsigned long r12; |
---|
45 | unsigned long rbp; |
---|
46 | unsigned long rbx; |
---|
47 | /* arguments: non interrupts/non tracing syscalls only save upto here*/ |
---|
48 | unsigned long r11; |
---|
49 | unsigned long r10; |
---|
50 | unsigned long r9; |
---|
51 | unsigned long r8; |
---|
52 | unsigned long rax; |
---|
53 | unsigned long rcx; |
---|
54 | unsigned long rdx; |
---|
55 | unsigned long rsi; |
---|
56 | unsigned long rdi; |
---|
57 | unsigned long orig_rax; |
---|
58 | /* end of arguments */ |
---|
59 | /* cpu exception frame or undefined */ |
---|
60 | unsigned long rip; |
---|
61 | unsigned long cs; |
---|
62 | unsigned long eflags; |
---|
63 | unsigned long rsp; |
---|
64 | unsigned long ss; |
---|
65 | /* top of stack page */ |
---|
66 | }; |
---|
67 | |
---|
68 | |
---|
69 | #endif |
---|
70 | |
---|
71 | void dump_regs(struct pt_regs *regs); |
---|
72 | |
---|
73 | #endif /* _TRAPS_H_ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.