ia64/xen-unstable

view extras/mini-os/include/x86/traps.h @ 16838:945820bfedb6

minios: POSIX fixes
Fixes some functions which are POSIX. Also make them ifndef HAVE_LIBC.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jan 22 14:20:22 2008 +0000 (2008-01-22)
parents 420f98121491
children f4135a620f59
line source
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 */
17 #ifndef _TRAPS_H_
18 #define _TRAPS_H_
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__
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 };
69 #endif
71 void dump_regs(struct pt_regs *regs);
73 #define TRAP_PF_PROT 0x1
74 #define TRAP_PF_WRITE 0x2
75 #define TRAP_PF_USER 0x4
77 #endif /* _TRAPS_H_ */