Pip
Architecture-dependent parts of Pip: MAL, IAL and boot
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
x86int.h
Go to the documentation of this file.
1 /*******************************************************************************/
2 /* © Université de Lille, The Pip Development Team (2015-2021) */
3 /* */
4 /* This software is a computer program whose purpose is to run a minimal, */
5 /* hypervisor relying on proven properties such as memory isolation. */
6 /* */
7 /* This software is governed by the CeCILL license under French law and */
8 /* abiding by the rules of distribution of free software. You can use, */
9 /* modify and/ or redistribute the software under the terms of the CeCILL */
10 /* license as circulated by CEA, CNRS and INRIA at the following URL */
11 /* "http://www.cecill.info". */
12 /* */
13 /* As a counterpart to the access to the source code and rights to copy, */
14 /* modify and redistribute granted by the license, users are provided only */
15 /* with a limited warranty and the software's author, the holder of the */
16 /* economic rights, and the successive licensors have only limited */
17 /* liability. */
18 /* */
19 /* In this respect, the user's attention is drawn to the risks associated */
20 /* with loading, using, modifying and/or developing or reproducing the */
21 /* software by the user in light of its specific status of free software, */
22 /* that may mean that it is complicated to manipulate, and that also */
23 /* therefore means that it is reserved for developers and experienced */
24 /* professionals having in-depth computer knowledge. Users are therefore */
25 /* encouraged to load and test the software's suitability as regards their */
26 /* requirements in conditions enabling the security of their systems and/or */
27 /* data to be ensured and, more generally, to use and operate it in the */
28 /* same conditions as regards security. */
29 /* */
30 /* The fact that you are presently reading this means that you have had */
31 /* knowledge of the CeCILL license and that you accept its terms. */
32 /*******************************************************************************/
33 
39 #ifndef IAL_STRUCT_H
40 #define IAL_STRUCT_H
41 
42 #include <stdint.h>
43 
48 typedef struct pushad_regs_s
49 {
50  uint32_t edi;
51  uint32_t esi;
52  uint32_t ebp;
53  uint32_t esp;
54  uint32_t ebx;
55  uint32_t edx;
56  uint32_t ecx;
57  uint32_t eax;
59 
64 typedef struct int_ctx_s
65 {
67  uint32_t int_no;
68  uint32_t err_code;
69  uint32_t eip;
70  uint32_t cs;
71  uint32_t eflags;
72  /* only present when we're coming from userland */
73  uint32_t useresp;
74  uint32_t ss;
75 } int_ctx_t ;
76 
77 typedef struct iret_ctx_s
78 {
79  uint32_t eip;
80  uint32_t cs;
81  uint32_t eflags;
82  uint32_t useresp;
83  uint32_t ss;
84 } iret_ctx_t;
85 
90 typedef struct gate_ctx_s
91 {
93  uint32_t eip;
94  uint32_t cs;
95  uint32_t eflags;
96  uint32_t useresp;
97  uint32_t ss;
98 } gate_ctx_t;
99 
104 typedef struct user_ctx_s
105 {
106  uint32_t eip;
107  uint32_t pipflags;
108  uint32_t eflags;
110  uint32_t valid;
111  uint32_t nfu[4];
112 } user_ctx_t;
113 
141 
167  CPUID_FEAT_EDX_SS = 1 << 27,
172 };
173 
179 
185 };
186 
187 #endif
struct pushad_regs_s pushad_regs_t
User saved context.
Definition: context.h:72
cpuid_features
Definition: x86int.h:114
Definition: x86int.h:167
uint32_t ss
Stack segment.
Definition: x86int.h:74
Definition: x86int.h:175
Definition: x86int.h:146
struct int_ctx_s int_ctx_t
uint32_t ebx
General register EBX.
Definition: x86int.h:54
Definition: x86int.h:180
Definition: x86int.h:137
Definition: x86int.h:159
Definition: x86int.h:142
uint32_t err_code
Interrupt error code.
Definition: x86int.h:68
Definition: x86int.h:162
Definition: x86int.h:161
Definition: x86int.h:124
uint32_t eip
Definition: x86int.h:93
uint32_t edi
General register EDI.
Definition: x86int.h:50
Definition: context.h:62
Definition: x86int.h:120
uint32_t esp
Stack pointer.
Definition: x86int.h:53
uint32_t useresp
User-mode ESP.
Definition: x86int.h:73
Definition: x86int.h:144
Definition: x86int.h:170
Definition: x86int.h:164
uint32_t int_no
Interrupt number.
Definition: x86int.h:67
Definition: x86int.h:132
cpuid_requests
Definition: x86int.h:174
Definition: x86int.h:143
Definition: x86int.h:163
Definition: x86int.h:134
Definition: x86int.h:119
uint32_t useresp
Definition: x86int.h:96
Definition: x86int.h:126
Definition: x86int.h:166
uint32_t eip
Definition: x86int.h:106
Definition: x86int.h:154
struct iret_ctx_s iret_ctx_t
uint32_t ebp
EBP.
Definition: x86int.h:52
Definition: x86int.h:140
Definition: x86int.h:183
uint32_t cs
Definition: x86int.h:94
Definition: x86int.h:176
Definition: x86int.h:136
Definition: x86int.h:117
pushad_regs_t regs
Definition: x86int.h:109
Definition: x86int.h:125
Definition: x86int.h:150
Definition: x86int.h:148
uint32_t eax
General register EAX.
Definition: x86int.h:57
Definition: x86int.h:118
pushad_regs_t regs
Interrupt handler saved regs.
Definition: x86int.h:66
Definition: x86int.h:169
Definition: x86int.h:138
Definition: x86int.h:130
Definition: x86int.h:149
uint32_t ss
Definition: x86int.h:97
Definition: x86int.h:139
Definition: x86int.h:135
pushad_regs_t regs
Definition: x86int.h:92
uint32_t cs
Code segment.
Definition: x86int.h:70
uint32_t edx
General register EDX.
Definition: x86int.h:55
Definition: x86int.h:181
uint32_t eip
Definition: x86int.h:79
uint32_t eflags
Definition: x86int.h:81
Definition: x86int.h:128
Definition: x86int.h:153
Definition: x86int.h:178
Definition: x86int.h:133
Definition: x86int.h:152
Definition: x86int.h:165
Definition: x86int.h:184
Definition: x86int.h:122
uint32_t eip
Execution pointer.
Definition: x86int.h:69
Definition: x86int.h:48
uint32_t eflags
Definition: x86int.h:108
uint32_t esi
General register ESI.
Definition: x86int.h:51
Definition: x86int.h:121
Definition: x86int.h:155
uint32_t cs
Definition: x86int.h:80
Definition: x86int.h:77
uint32_t eflags
CPU flags.
Definition: x86int.h:71
Definition: x86int.h:156
Definition: x86int.h:131
uint32_t useresp
Definition: x86int.h:82
Definition: x86int.h:129
struct user_ctx_s user_ctx_t
Definition: x86int.h:123
Definition: x86int.h:177
Definition: x86int.h:64
Definition: x86int.h:115
uint32_t ecx
General register ECX.
Definition: x86int.h:56
Definition: x86int.h:182
Definition: x86int.h:157
Definition: x86int.h:158
Definition: x86int.h:151
uint32_t eflags
Definition: x86int.h:95
Definition: x86int.h:127
Definition: x86int.h:116
Definition: x86int.h:160
Definition: x86int.h:168
struct gate_ctx_s gate_ctx_t
Definition: x86int.h:145
uint32_t ss
Definition: x86int.h:83
Definition: x86int.h:171
Definition: x86int.h:147