2 Copyright (C) 2008 Mathias Gottschlag
4 Permission is hereby granted, free of charge, to any person obtaining a copy of
5 this software and associated documentation files (the "Software"), to deal in the
6 Software without restriction, including without limitation the rights to use,
7 copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
8 Software, and to permit persons to whom the Software is furnished to do so,
9 subject to the following conditions:
11 The above copyright notice and this permission notice shall be included in all
12 copies or substantial portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
16 PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
17 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
19 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 #ifndef KE_GDT_H_INCLUDED
23 #define KE_GDT_H_INCLUDED
25 typedef struct GDTEntry
27 unsigned short limit_low
;
28 unsigned short base_low
;
29 unsigned char base_middle
;
31 unsigned char granularity
;
32 unsigned char base_high
;
33 } __attribute__((packed
)) GDTEntry
;
39 } __attribute__((packed
)) GDTPtr
;
42 unsigned int back_link
;
43 unsigned int esp0
, ss0
;
44 unsigned int esp1
, ss1
;
45 unsigned int esp2
, ss2
;
49 unsigned int eax
,ecx
,edx
,ebx
;
50 unsigned int esp
, ebp
;
51 unsigned int esi
, edi
;
52 unsigned int es
, cs
, ss
, ds
, fs
, gs
;
54 unsigned int trace_bitmap
;
55 unsigned char iobitmap
[8192];
60 void keFlushGDT(void);
61 void keInstallStartupGDT(void);
62 void keInstallGDT(void);