stdlibc: \!perror()
[meinos.git] / kernel2 / include / tss.h
blobd0ced503c66e8605757c80ecf9b094f473e3c07b
1 /*
2 meinOS - A unix-like x86 microkernel operating system
3 Copyright (C) 2008 Janosch Gräf <janosch.graef@gmx.net>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef _TSS_H_
20 #define _TSS_H_
22 #include <stdint.h>
24 #define TSS_IOPB_SIZE 2048
26 typedef struct {
27 uint32_t backlink;
28 uint32_t esp0;
29 uint32_t ss0;
30 uint32_t esp1;
31 uint32_t ss1;
32 uint32_t esp2;
33 uint32_t ss2;
34 uint32_t cr3;
35 uint32_t eip;
36 uint32_t efl;
37 uint32_t eax;
38 uint32_t ecx;
39 uint32_t edx;
40 uint32_t ebx;
41 uint32_t esp;
42 uint32_t ebp;
43 uint32_t esi;
44 uint32_t edi;
45 uint32_t es;
46 uint32_t cs;
47 uint32_t ss;
48 uint32_t ds;
49 uint32_t fs;
50 uint32_t gs;
51 uint32_t ldtr;
52 uint16_t res;
53 uint16_t iopb_offset;
54 uint32_t iopb[TSS_IOPB_SIZE];
55 } __attribute__ ((packed)) tss_t;
57 int tss_init();
59 #endif