Commit | Line | Data |
---|---|---|
4bd1c0bf WN |
1 | /*- |
2 | * Copyright (c) 1990 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * This code is derived from software contributed to Berkeley by | |
6 | * William Jolitz. | |
7 | * | |
8 | * %sccs.include.noredist.c% | |
9 | * | |
10 | * @(#)frame.h 5.1 (Berkeley) %G% | |
11 | */ | |
12 | ||
13 | /* | |
14 | * System stack frames. | |
15 | */ | |
6879f5b7 BJ |
16 | |
17 | /* | |
4bd1c0bf | 18 | * Exception/Trap Stack Frame |
6879f5b7 | 19 | */ |
4bd1c0bf WN |
20 | |
21 | struct trapframe { | |
22 | int tf_es; | |
23 | int tf_ds; | |
24 | int tf_edi; | |
25 | int tf_esi; | |
26 | int tf_ebp; | |
27 | int tf_isp; | |
28 | int tf_ebx; | |
29 | int tf_edx; | |
30 | int tf_ecx; | |
31 | int tf_eax; | |
32 | int tf_trapno; | |
33 | /* below portion defined in 386 hardware */ | |
34 | int tf_err; | |
35 | int tf_eip; | |
36 | int tf_cs; | |
37 | int tf_eflags; | |
38 | /* below only when transitting rings (e.g. user to kernel) */ | |
39 | int tf_esp; | |
40 | int tf_ss; | |
41 | }; | |
42 | ||
43 | /* Interrupt stack frame */ | |
44 | ||
45 | struct intrframe { | |
46 | int if_vec; | |
47 | int if_ppl; | |
48 | int if_es; | |
49 | int if_ds; | |
50 | int if_edi; | |
51 | int if_esi; | |
52 | int if_ebp; | |
53 | int :32; | |
54 | int if_ebx; | |
55 | int if_edx; | |
56 | int if_ecx; | |
57 | int if_eax; | |
58 | int :32; /* for compat with trap frame - trapno */ | |
59 | int :32; /* for compat with trap frame - err */ | |
60 | /* below portion defined in 386 hardware */ | |
61 | int if_eip; | |
62 | int if_cs; | |
63 | int if_eflags; | |
64 | /* below only when transitting rings (e.g. user to kernel) */ | |
65 | int if_esp; | |
66 | int if_ss; | |
67 | }; | |
68 | ||
69 | /* | |
70 | * Call Gate/System Call Stack Frame | |
71 | */ | |
72 | ||
73 | struct syscframe { | |
74 | int sf_edi; | |
75 | int sf_esi; | |
76 | int sf_ebp; | |
77 | int :32; /* redundant save of isp */ | |
78 | int sf_ebx; | |
79 | int sf_edx; | |
80 | int sf_ecx; | |
81 | int sf_eax; | |
82 | int sf_eflags; | |
83 | /* below portion defined in 386 hardware */ | |
84 | /* int sf_args[N]; /* if call gate copy args enabled!*/ | |
85 | int sf_eip; | |
86 | int sf_cs; | |
87 | /* below only when transitting rings (e.g. user to kernel) */ | |
88 | int sf_esp; | |
89 | int sf_ss; | |
6879f5b7 | 90 | }; |