-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocessor_structs.h
More file actions
52 lines (44 loc) · 1.63 KB
/
processor_structs.h
File metadata and controls
52 lines (44 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef __PROCESSOR_STRUCTS_H__
#define __PROCESSOR_STRUCTS_H__
#define GDT_ENTRIES 8192
#include "segment.h"
#define IDT_ENTRIES 256
#ifndef ASSEMBLER
struct x86_tss {
int back_link; /* segment number of previous task,
if nested */
int esp0; /* initial stack pointer ... */
int ss0; /* and segment for ring 0 */
int esp1; /* initial stack pointer ... */
int ss1; /* and segment for ring 1 */
int esp2; /* initial stack pointer ... */
int ss2; /* and segment for ring 2 */
int cr3; /* CR3 - page table directory
physical address */
int eip;
int eflags;
int eax;
int ecx;
int edx;
int ebx;
int esp; /* current stack pointer */
int ebp;
int esi;
int edi;
int es;
int cs;
int ss; /* current stack segment */
int ds;
int fs;
int gs;
int ldt; /* local descriptor table segment */
unsigned short trace_trap; /* trap on switch to this task */
unsigned short io_bit_map_offset;
/* offset to start of IO permission
bit map */
};
extern unsigned long long gdt[GDT_ENTRIES];
extern unsigned long long idt[IDT_ENTRIES];
extern struct x86_tss tss;
#endif
#endif