TSS的定义

/* author: mik
 * project: pm_simulation (一个保护模式行为模拟器)
 *
 * tss.h 这个文件描述TSS块
 */
 
 
#ifndef __TSS__
#define __TSS__
 
 
/* 定义 TSS  */
typedef struct TASK_STATE_SEG {
    unsigned link : 16;          /* TSS selector link */
    unsigned : 16;               /* reserved */
    unsigned esp0;               /* 0 privilege-level stack pointer */
    unsigned ss0 : 16;           /* 0 privilege-level stack ss register */
    unsigned : 16;               /* reserved */
    unsigned esp1;               /* 1 privilege-level stack pointer */
    unsigned ss1 : 16;           /* 1 privilege-level stack ss register */
    unsigned : 16;               /* reserved */
    unsigned esp2;               /* 2 privilege-level stack pointer */
    unsigned ss2 : 16;           /* 2 privilege-level stack ss register */
    unsigned : 16;               /* reserved */
    unsigned cr3;                /* CR3 register */
    unsigned eip;                /* EIP register */
    unsigned eflags;             /* EFLAGS register */
    unsinged eax;                /* EAX register */
    unsigned ecx;                /* ECX register */
    unsinged edx;                /* EDX register */
    unsigned ebx;                /* EBX register */
    unsigned esp;                /* ESP register */
    unsigned ebp;                /* EBP register */
    unsigned esi;                /* ESI register */
    unsigned edi;                /* EDI register */
    unsigned es : 16;            /* ES segment register */
    unsigned : 16;               /* reserved */
    unsigned cs : 16;            /* CS segment register */
    unsigned : 16;               /* reserved */
    unsigned ss : 16;            /* SS segment register */
    unsigned : 16;               /* reserved */
    unsigned ds : 16;            /* DS segment register */
    unsigned : 16;               /* reserved */
    unsigned fs : 16;            /* FS segment register */
    unsigned : 16;               /* reserved */
    unsigned gs : 16;            /* GS segment register */
    unsigned : 16;               /* reserved */

    unsigned t : 1;              /* T filed */
    unsigned : 15;               /* reserved */
    unsigned iomap_base : 16;    /* i/o bitmap base address */
   
} __attribute__((packed)) TSS;
 
#endif
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值