/* Copyright (C) 2008 Emmanuel Varoquaux This file is part of XOS. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _SYSTEM_STRUCTS_H #define _SYSTEM_STRUCTS_H struct __attribute__ ((packed)) descr_struct { union { struct { /* segment */ unsigned short limit1; unsigned short base1; unsigned char base2; unsigned char flags1; unsigned char limit2_flags2; unsigned char base3; }; struct { /* gate */ unsigned short offset1; unsigned short selector; unsigned char dword_count; unsigned char flags; unsigned short offset2; }; }; }; struct __attribute__ ((packed)) tss_struct { unsigned short previous; unsigned short res1; unsigned long esp0; unsigned short ss0; unsigned short res2; unsigned long esp1; unsigned short ss1; unsigned short res3; unsigned long esp2; unsigned short ss2; unsigned short res4; unsigned long cr3; unsigned long eip; unsigned long eflags; unsigned long eax; unsigned long ecx; unsigned long edx; unsigned long ebx; unsigned long esp; unsigned long ebp; unsigned long esi; unsigned long edi; unsigned short es; unsigned short res5; unsigned short cs; unsigned short res6; unsigned short ss; unsigned short res7; unsigned short ds; unsigned short res8; unsigned short fs; unsigned short res9; unsigned short gs; unsigned short res10; unsigned short ldt; unsigned short res11; unsigned short trap_res12; unsigned short iomap_base; }; #endif