VirtualBox

Changeset 15631 in vbox


Ignore:
Timestamp:
Dec 17, 2008 2:29:21 PM (16 years ago)
Author:
vboxsync
Message:

Added X86TSS32 & X86TSS64.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/x86.h

    r14800 r15631  
    3737
    3838#include <VBox/types.h>
     39#include <iprt/assert.h>
    3940
    4041/* Workaround for Solaris sys/regset.h defining CS, DS */
     
    22932294/** @} */
    22942295
     2296/** @name Task segment.
     2297 * @{
     2298 */
     2299#pragma pack(1)
     2300typedef struct X86TSS32
     2301{
     2302    /** Back link to previous task. (static) */
     2303    RTSEL       selPrev;
     2304    uint16_t    padding1;
     2305    /** Ring-0 stack pointer. (static) */
     2306    uint32_t    esp0;
     2307    /** Ring-0 stack segment. (static) */
     2308    RTSEL       ss0;
     2309    uint16_t    padding_ss0;
     2310    /** Ring-1 stack pointer. (static) */
     2311    uint32_t    esp1;
     2312    /** Ring-1 stack segment. (static) */
     2313    RTSEL       ss1;
     2314    uint16_t    padding_ss1;
     2315    /** Ring-2 stack pointer. (static) */
     2316    uint32_t    esp2;
     2317    /** Ring-2 stack segment. (static) */
     2318    RTSEL       ss2;
     2319    uint16_t    padding_ss2;
     2320    /** Page directory for the task. (static) */
     2321    uint32_t    cr3;
     2322    /** EIP before task switch. */
     2323    uint32_t    eip;
     2324    /** EFLAGS before task switch. */
     2325    uint32_t    eflags;
     2326    /** EAX before task switch. */
     2327    uint32_t    eax;
     2328    /** ECX before task switch. */
     2329    uint32_t    ecx;
     2330    /** EDX before task switch. */
     2331    uint32_t    edx;
     2332    /** EBX before task switch. */
     2333    uint32_t    ebx;
     2334    /** ESP before task switch. */
     2335    uint32_t    esp;
     2336    /** EBP before task switch. */
     2337    uint32_t    ebp;
     2338    /** ESI before task switch. */
     2339    uint32_t    esi;
     2340    /** EDI before task switch. */
     2341    uint32_t    edi;
     2342    /** ES before task switch. */
     2343    RTSEL       es;
     2344    uint16_t    padding_es;
     2345    /** CS before task switch. */
     2346    RTSEL       cs;
     2347    uint16_t    padding_cs;
     2348    /** SS before task switch. */
     2349    RTSEL       ss;
     2350    uint16_t    padding_ss;
     2351    /** DS before task switch. */
     2352    RTSEL       ds;
     2353    uint16_t    padding_ds;
     2354    /** FS before task switch. */
     2355    RTSEL       fs;
     2356    uint16_t    padding_fs;
     2357    /** GS before task switch. */
     2358    RTSEL       gs;
     2359    uint16_t    padding_gs;
     2360    /** LDTR before task switch. */
     2361    RTSEL       selLdt;
     2362    uint16_t    padding_ldt;
     2363    /** Debug trap flag */
     2364    uint16_t    fDebugTrap;
     2365    /** Offset relative to the TSS of the start of the I/O Bitmap
     2366     * and the end of the interrupt redirection bitmap. */
     2367    uint16_t    offIoBitmap;
     2368    /** 32 bytes for the virtual interrupt redirection bitmap. (VME) */
     2369    uint8_t     IntRedirBitmap[32];
     2370} X86TSS32;
     2371#pragma pack()
     2372/** Pointer to task segment. */
     2373typedef X86TSS32 *PX86TSS32;
     2374/** Pointer to const task segment. */
     2375typedef const X86TSS32 *PCX86TSS32;
     2376/** @} */
     2377
     2378
     2379/** @name 64 bits Task segment.
     2380 * @{
     2381 */
     2382#pragma pack(1)
     2383typedef struct X86TSS64
     2384{
     2385    /** Reserved. */
     2386    uint32_t    u32Reserved;
     2387    /** Ring-0 stack pointer. (static) */
     2388    uint64_t    rsp0;
     2389    /** Ring-1 stack pointer. (static) */
     2390    uint64_t    rsp1;
     2391    /** Ring-2 stack pointer. (static) */
     2392    uint64_t    rsp2;
     2393    /** Reserved. */
     2394    uint32_t    u32Reserved2[2];
     2395    /* IST */
     2396    uint64_t    ist1;
     2397    uint64_t    ist2;
     2398    uint64_t    ist3;
     2399    uint64_t    ist4;
     2400    uint64_t    ist5;
     2401    uint64_t    ist6;
     2402    uint64_t    ist7;
     2403    /* Reserved. */
     2404    uint16_t    u16Reserved[5];
     2405    /** Offset relative to the TSS of the start of the I/O Bitmap
     2406     * and the end of the interrupt redirection bitmap. */
     2407    uint16_t    offIoBitmap;
     2408    /** 32 bytes for the virtual interrupt redirection bitmap. (VME) */
     2409    uint8_t     IntRedirBitmap[32];
     2410} X86TSS64;
     2411#pragma pack()
     2412/** Pointer to task segment. */
     2413typedef X86TSS64 *PX86TSS64;
     2414/** Pointer to const task segment. */
     2415typedef const X86TSS64 *PCX86TSS64;
     2416AssertCompileSize(X86TSS64, 136);
     2417
     2418/** @} */
     2419
    22952420
    22962421/** @name Selectors.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette