Xen Test Framework
x86-tss.c
Go to the documentation of this file.
1 
6 #include <xtf/console.h>
7 
8 #include <arch/x86-tss.h>
9 
10 void dump_x86_tss32(const struct x86_tss32 *t)
11 {
12  printk("Dump x86_tss32 at %p {\n"
13  " link %04x\n"
14  " r0 %04x:%08x\n"
15  " r1 %04x:%08x\n"
16  " r2 %04x:%08x\n"
17  " cr3 %08x\n"
18  " eip %08x, eflags %08x\n"
19  " eax %08x, ecx %08x\n"
20  " edx %08x, ebx %08x\n"
21  " esp %08x, ebp %08x\n"
22  " esi %08x, edi %08x\n"
23  " es %04x, cs %04x, ss %04x\n"
24  " ds %04x, fs %04x, gs %04x\n"
25  " ldtr %04x, trace %u, iobp %04x\n"
26  "}\n",
27  t,
28  t->link,
29  t->ss0, t->esp0,
30  t->ss1, t->esp1,
31  t->ss2, t->esp2,
32  t->cr3,
33  t->eip, t->eflags,
34  t->eax, t->ecx,
35  t->edx, t->ebx,
36  t->esp, t->ebp,
37  t->esi, t->edi,
38  t->es, t->cs, t->ss,
39  t->ds, t->fs, t->gs,
40  t->ldtr, t->trace, t->iopb);
41 }
42 
43 void dump_x86_tss64(const struct x86_tss64 *t)
44 {
45  printk("Dump x86_tss64 at %p {\n"
46  " rsp0 %016"PRIx64", rsp1 %016"PRIx64"\n"
47  " rsp2 %016"PRIx64", ist1 %016"PRIx64"\n"
48  " ist2 %016"PRIx64", ist3 %016"PRIx64"\n"
49  " ist4 %016"PRIx64", ist5 %016"PRIx64"\n"
50  " ist6 %016"PRIx64", ist7 %016"PRIx64"\n"
51  " trace %u, iobp %04x\n"
52  "}\n",
53  t,
54  t->rsp0, t->rsp1,
55  t->rsp2, t->ist[0],
56  t->ist[1], t->ist[2],
57  t->ist[3], t->ist[4],
58  t->ist[5], t->ist[6],
59  t->trace, t->iopb);
60 }
61 
62 /*
63  * Local variables:
64  * mode: C
65  * c-file-style: "BSD"
66  * c-basic-offset: 4
67  * tab-width: 4
68  * indent-tabs-mode: nil
69  * End:
70  */
uint16_t fs
Definition: x86-tss.h:41
uint16_t trace
Definition: x86-tss.h:62
uint32_t ecx
Definition: x86-tss.h:29
uint64_t rsp2
Definition: x86-tss.h:54
uint32_t eip
Definition: x86-tss.h:26
void dump_x86_tss64(const struct x86_tss64 *t)
Definition: x86-tss.c:43
uint64_t rsp0
Definition: x86-tss.h:52
uint16_t ss2
Definition: x86-tss.h:23
void dump_x86_tss32(const struct x86_tss32 *t)
Definition: x86-tss.c:10
uint16_t ss
Definition: x86-tss.h:39
uint16_t es
Definition: x86-tss.h:37
uint32_t eax
Definition: x86-tss.h:28
uint16_t link
Definition: x86-tss.h:14
void printk(const char *fmt,...)
Definition: console.c:134
uint16_t uint16_t iopb
Definition: x86-tss.h:62
uint32_t ebp
Definition: x86-tss.h:33
#define PRIx64
Definition: inttypes.h:18
uint32_t eflags
Definition: x86-tss.h:27
uint16_t ldtr
Definition: x86-tss.h:43
uint16_t cs
Definition: x86-tss.h:38
uint16_t ss0
Definition: x86-tss.h:17
uint16_t gs
Definition: x86-tss.h:42
uint16_t ss1
Definition: x86-tss.h:20
x86 Task State Segment infrastructure.
uint32_t esp
Definition: x86-tss.h:32
uint64_t ist[7]
Definition: x86-tss.h:58
uint32_t esp0
Definition: x86-tss.h:16
uint32_t esp1
Definition: x86-tss.h:19
uint64_t rsp1
Definition: x86-tss.h:53
uint16_t ds
Definition: x86-tss.h:40
uint32_t esp2
Definition: x86-tss.h:22
uint16_t trace
Definition: x86-tss.h:45
uint32_t edx
Definition: x86-tss.h:30
uint32_t esi
Definition: x86-tss.h:34
uint32_t ebx
Definition: x86-tss.h:31
uint32_t edi
Definition: x86-tss.h:35
uint32_t cr3
Definition: x86-tss.h:25
uint16_t uint16_t iopb
Definition: x86-tss.h:45