2010-08-09 11:47:51 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2010 Stefan Lankes, Chair for Operating Systems,
|
|
|
|
* RWTH Aachen University
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*
|
|
|
|
* This file is part of MetalSVM.
|
|
|
|
*/
|
|
|
|
|
2011-04-04 18:12:08 +02:00
|
|
|
/**
|
|
|
|
* @author Stefan Lankes
|
|
|
|
* @file arch/x86/include/asm/tss.h
|
|
|
|
* @brief Task state segment structure definition
|
|
|
|
*/
|
|
|
|
|
2010-08-09 11:47:51 +00:00
|
|
|
#ifndef __ARCH_TSS_H__
|
|
|
|
#define __ARCH_TSS_H__
|
|
|
|
|
2010-08-10 09:10:48 +00:00
|
|
|
#include <metalsvm/stddef.h>
|
2010-08-09 11:47:51 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2011-04-04 18:12:08 +02:00
|
|
|
/** @brief The tast state segment structure
|
|
|
|
*/
|
2010-08-09 11:47:51 +00:00
|
|
|
typedef struct {
|
2012-06-10 08:05:24 +02:00
|
|
|
#ifdef CONFIG_X86_32
|
2010-08-09 11:47:51 +00:00
|
|
|
uint16_t backlink, __blh;
|
|
|
|
uint32_t esp0;
|
|
|
|
uint16_t ss0, __ss0h;
|
|
|
|
uint32_t esp1;
|
|
|
|
uint16_t ss1, __ss1h;
|
|
|
|
uint32_t esp2;
|
|
|
|
uint16_t ss2, __ss2h;
|
|
|
|
uint32_t cr3;
|
|
|
|
uint32_t eip;
|
|
|
|
uint32_t eflags;
|
|
|
|
uint32_t eax, ecx, edx, ebx;
|
|
|
|
uint32_t esp, ebp, esi, edi;
|
|
|
|
uint16_t es, __esh;
|
|
|
|
uint16_t cs, __csh;
|
|
|
|
uint16_t ss, __ssh;
|
|
|
|
uint16_t ds, __dsh;
|
|
|
|
uint16_t fs, __fsh;
|
|
|
|
uint16_t gs, __gsh;
|
|
|
|
uint16_t ldt, __ldth;
|
|
|
|
uint16_t trace, bitmap;
|
2012-06-10 08:05:24 +02:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_X86_64
|
|
|
|
uint16_t res0, res1; // reserved entries
|
|
|
|
uint64_t rsp0;
|
|
|
|
uint64_t rsp1;
|
|
|
|
uint64_t rsp2;
|
|
|
|
uint32_t res2, res3; // reserved entries
|
|
|
|
uint64_t ist_rsp1;
|
|
|
|
uint64_t ist_rsp2;
|
|
|
|
uint64_t ist_rsp3;
|
|
|
|
uint64_t ist_rsp4;
|
|
|
|
uint64_t ist_rsp5;
|
|
|
|
uint64_t ist_rsp6;
|
|
|
|
uint64_t ist_rsp7;
|
2012-06-11 16:16:35 +02:00
|
|
|
uint32_t res4, res5; // reserved entries
|
2012-06-10 08:05:24 +02:00
|
|
|
uint16_t res6, bitmap;
|
|
|
|
#endif
|
2010-08-09 11:47:51 +00:00
|
|
|
} __attribute__ ((packed)) tss_t;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|