Xen Test Framework
arch
x86
include
arch
x86-tss.h
Go to the documentation of this file.
1
7
#ifndef XTF_X86_TSS_H
8
#define XTF_X86_TSS_H
9
10
#include <
xtf/types.h
>
11
#include <
xtf/compiler.h
>
12
13
struct
__packed
x86_tss32
{
14
uint16_t
link;
uint16_t
:16;
15
16
uint32_t
esp0
;
17
uint16_t
ss0;
uint16_t
:16;
18
19
uint32_t
esp1
;
20
uint16_t
ss1;
uint16_t
:16;
21
22
uint32_t
esp2
;
23
uint16_t
ss2;
uint16_t
:16;
24
25
uint32_t
cr3
;
26
uint32_t
eip
;
27
uint32_t
eflags
;
28
uint32_t
eax
;
29
uint32_t
ecx
;
30
uint32_t
edx
;
31
uint32_t
ebx
;
32
uint32_t
esp
;
33
uint32_t
ebp
;
34
uint32_t
esi
;
35
uint32_t
edi
;
36
37
uint16_t
es;
uint16_t
:16;
38
uint16_t
cs;
uint16_t
:16;
39
uint16_t
ss;
uint16_t
:16;
40
uint16_t
ds;
uint16_t
:16;
41
uint16_t
fs;
uint16_t
:16;
42
uint16_t
gs;
uint16_t
:16;
43
uint16_t
ldtr;
uint16_t
:16;
44
45
uint16_t
trace
:1, :15;
46
uint16_t
iopb
;
47
};
48
49
struct
__packed
x86_tss64
{
50
uint32_t
:32;
51
52
uint64_t
rsp0
;
53
uint64_t
rsp1
;
54
uint64_t
rsp2
;
55
56
uint64_t
:64;
57
58
uint64_t
ist[7];
/* 1-based structure */
59
60
uint64_t
:64;
61
62
uint16_t
trace
:1, :15;
63
uint16_t
iopb
;
64
};
65
66
#define X86_TSS_INVALID_IO_BITMAP 0x8000
67
68
void
dump_x86_tss32
(
const
struct
x86_tss32
*t);
69
void
dump_x86_tss64
(
const
struct
x86_tss64
*t);
70
71
#if defined(__x86_64__)
72
73
typedef
struct
x86_tss64
env_tss;
74
75
static
inline
void
dump_env_tss(
const
env_tss *t)
76
{
77
dump_x86_tss64
(t);
78
}
79
80
#elif defined(__i386__)
81
82
typedef
struct
x86_tss32
env_tss;
83
84
static
inline
void
dump_env_tss(
const
env_tss *t)
85
{
86
dump_x86_tss32
(t);
87
}
88
89
#else
90
# error Bad architecture for TSS infrastructure
91
#endif
92
93
#endif
/* XTF_X86_TSS_H */
94
95
/*
96
* Local variables:
97
* mode: C
98
* c-file-style: "BSD"
99
* c-basic-offset: 4
100
* tab-width: 4
101
* indent-tabs-mode: nil
102
* End:
103
*/
compiler.h
__packed
#define __packed
Definition:
compiler.h:11
uint32_t
__UINT32_TYPE__ uint32_t
Definition:
stdint.h:16
uint64_t
__UINT64_TYPE__ uint64_t
Definition:
stdint.h:17
uint16_t
__UINT16_TYPE__ uint16_t
Definition:
stdint.h:15
x86_tss32
Definition:
x86-tss.h:13
x86_tss32::eip
uint32_t eip
Definition:
x86-tss.h:26
x86_tss32::esp2
uint32_t esp2
Definition:
x86-tss.h:22
x86_tss32::edi
uint32_t edi
Definition:
x86-tss.h:35
x86_tss32::trace
uint16_t trace
Definition:
x86-tss.h:45
x86_tss32::esp
uint32_t esp
Definition:
x86-tss.h:32
x86_tss32::esp1
uint32_t esp1
Definition:
x86-tss.h:19
x86_tss32::eax
uint32_t eax
Definition:
x86-tss.h:28
x86_tss32::iopb
uint16_t uint16_t iopb
Definition:
x86-tss.h:46
x86_tss32::cr3
uint32_t cr3
Definition:
x86-tss.h:25
x86_tss32::ebp
uint32_t ebp
Definition:
x86-tss.h:33
x86_tss32::esp0
uint32_t esp0
Definition:
x86-tss.h:16
x86_tss32::esi
uint32_t esi
Definition:
x86-tss.h:34
x86_tss32::edx
uint32_t edx
Definition:
x86-tss.h:30
x86_tss32::ebx
uint32_t ebx
Definition:
x86-tss.h:31
x86_tss32::eflags
uint32_t eflags
Definition:
x86-tss.h:27
x86_tss32::ecx
uint32_t ecx
Definition:
x86-tss.h:29
x86_tss64
Definition:
x86-tss.h:49
x86_tss64::rsp1
uint64_t rsp1
Definition:
x86-tss.h:53
x86_tss64::rsp2
uint64_t rsp2
Definition:
x86-tss.h:54
x86_tss64::trace
uint16_t trace
Definition:
x86-tss.h:62
x86_tss64::rsp0
uint64_t rsp0
Definition:
x86-tss.h:52
x86_tss64::iopb
uint16_t uint16_t iopb
Definition:
x86-tss.h:63
types.h
Common declarations for all tests.
dump_x86_tss32
void dump_x86_tss32(const struct x86_tss32 *t)
Definition:
x86-tss.c:10
dump_x86_tss64
void dump_x86_tss64(const struct x86_tss64 *t)
Definition:
x86-tss.c:43
Generated by
1.9.4