Kernel/x86 - Added SSE/FPU state saving, not fully tested
[tpg/acess2.git] / Kernel / arch / x86 / include / proc.h
1 /*
2  * AcessOS Microkernel Version
3  * proc.h
4  */
5 #ifndef _PROC_H
6 #define _PROC_H
7
8 // === TYPES ==
9 typedef struct sTSS {
10         Uint32  Link;
11         Uint32  ESP0, SS0;
12         Uint32  ESP1, SS1;
13         Uint32  ESP2, SS2;
14         Uint32  CR3;
15         Uint32  EIP;
16         Uint32  EFLAGS;
17         Uint32  EAX, ECX, EDX, EBX;
18         Uint32  ESP, EBP, ESI, EDI;
19         Uint32  ES, CS, DS, SS, FS, GS;
20         Uint32  LDTR;
21         Uint16  Resvd, IOPB;    // IO Permissions Bitmap
22 } __attribute__((packed)) tTSS;
23
24 typedef struct {
25         #if USE_PAE
26         Uint    PDPT[4];
27         #else
28         Uint32  CR3;
29         #endif
30 } tMemoryState;
31
32 // 512 bytes, 16 byte aligned
33 typedef struct sSSEState
34 {
35         char    data[512];
36 } tSSEState;
37
38 typedef struct {
39         Uint    EIP, ESP;
40         Uint32  UserCS, UserEIP;
41         tSSEState       *SSE;
42          int    bSSEModified;
43 } tTaskState;
44
45 #include <threads_int.h>
46
47 #define USER_MAX        KERNEL_BASE
48
49 #endif

UCC git Repository :: git.ucc.asn.au