VirtualBox

Changeset 2806 in vbox


Ignore:
Timestamp:
May 23, 2007 2:20:35 PM (18 years ago)
Author:
vboxsync
Message:

Added 64 bits descriptor type.

File:
1 edited

Legend:

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

    r2104 r2806  
    17631763
    17641764
     1765/**
     1766 * System descriptor table entry (64 bits)
     1767 */
     1768#pragma pack(1)
     1769typedef struct X86DESC64SYSTEM
     1770{
     1771    /** Limit - Low word. */
     1772    unsigned    u16LimitLow     : 16;
     1773    /** Base address - lowe word.
     1774     * Don't try set this to 24 because MSC is doing studing things then. */
     1775    unsigned    u16BaseLow      : 16;
     1776    /** Base address - first 8 bits of high word. */
     1777    unsigned    u8BaseHigh1     : 8;
     1778    /** Segment Type. */
     1779    unsigned    u4Type          : 4;
     1780    /** Descriptor Type. System(=0) or code/data selector */
     1781    unsigned    u1DescType      : 1;
     1782    /** Descriptor Privelege level. */
     1783    unsigned    u2Dpl :          2;
     1784    /** Flags selector present(=1) or not. */
     1785    unsigned    u1Present       : 1;
     1786    /** Segment limit 16-19. */
     1787    unsigned    u4LimitHigh     : 4;
     1788    /** Available for system software. */
     1789    unsigned    u1Available     : 1;
     1790    /** Reserved - 0. */
     1791    unsigned    u1Reserved      : 1;
     1792    /** This flags meaning depends on the segment type. Try make sense out
     1793     * of the intel manual yourself.  */
     1794    unsigned    u1DefBig        : 1;
     1795    /** Granularity of the limit. If set 4KB granularity is used, if
     1796     * clear byte. */
     1797    unsigned    u1Granularity   : 1;
     1798    /** Base address - bits 31-24. */
     1799    unsigned    u8BaseHigh2     : 8;
     1800    /** Base address - bits 63-32. */
     1801    unsigned    u32BaseHigh3    : 32;
     1802    unsigned    u8Reserved      : 8;
     1803    unsigned    u5Zeros         : 5;
     1804    unsigned    u19Reserved     : 19;
     1805} X86DESC64SYSTEM;
     1806#pragma pack()
     1807/** Pointer to a generic descriptor entry. */
     1808typedef X86DESC64SYSTEM *PX86DESC64SYSTEM;
     1809/** Pointer to a const generic descriptor entry. */
     1810typedef const X86DESC64SYSTEM *PCX86DESC64SYSTEM;
     1811
     1812
     1813/**
     1814 * Descriptor table entry.
     1815 */
     1816#pragma pack(1)
     1817typedef union X86DESC64
     1818{
     1819    /** Generic descriptor view. */
     1820    X86DESC64SYSTEM System;
     1821#if 0
     1822    X86DESC64GATE   Gate;
     1823#endif
     1824
     1825    /** 8 bit unsigned interger view. */
     1826    uint8_t         au8[16];
     1827    /** 16 bit unsigned interger view. */
     1828    uint16_t        au16[8];
     1829    /** 32 bit unsigned interger view. */
     1830    uint32_t        au32[4];
     1831} X86DESC64;
     1832#pragma pack()
     1833/** Pointer to descriptor table entry. */
     1834typedef X86DESC64 *PX86DESC64;
     1835/** Pointer to const descriptor table entry. */
     1836typedef const X86DESC64 *PCX86DESC64;
     1837
     1838
    17651839/** @name Selector Descriptor Types.
    17661840 * @{
     
    18221896 * @{ */
    18231897/** Undefined system selector type. */
    1824 #define X86_SEL_TYPE_SYS_UNDEFINED         0
     1898#define X86_SEL_TYPE_SYS_UNDEFINED          0
    18251899/** 286 TSS selector. */
    1826 #define X86_SEL_TYPE_SYS_286_TSS_AVAIL     1
     1900#define X86_SEL_TYPE_SYS_286_TSS_AVAIL      1
    18271901/** LDT selector. */
    1828 #define X86_SEL_TYPE_SYS_LDT               2
     1902#define X86_SEL_TYPE_SYS_LDT                2
    18291903/** 286 TSS selector - Busy. */
    1830 #define X86_SEL_TYPE_SYS_286_TSS_BUSY      3
     1904#define X86_SEL_TYPE_SYS_286_TSS_BUSY       3
    18311905/** 286 Callgate selector. */
    1832 #define X86_SEL_TYPE_SYS_286_CALL_GATE     4
     1906#define X86_SEL_TYPE_SYS_286_CALL_GATE      4
    18331907/** Taskgate selector. */
    1834 #define X86_SEL_TYPE_SYS_TASK_GATE         5
     1908#define X86_SEL_TYPE_SYS_TASK_GATE          5
    18351909/** 286 Interrupt gate selector. */
    1836 #define X86_SEL_TYPE_SYS_286_INT_GATE      6
     1910#define X86_SEL_TYPE_SYS_286_INT_GATE       6
    18371911/** 286 Trapgate selector. */
    1838 #define X86_SEL_TYPE_SYS_286_TRAP_GATE     7
     1912#define X86_SEL_TYPE_SYS_286_TRAP_GATE      7
    18391913/** Undefined system selector. */
    1840 #define X86_SEL_TYPE_SYS_UNDEFINED2        8
     1914#define X86_SEL_TYPE_SYS_UNDEFINED2         8
    18411915/** 386 TSS selector. */
    1842 #define X86_SEL_TYPE_SYS_386_TSS_AVAIL     9
     1916#define X86_SEL_TYPE_SYS_386_TSS_AVAIL      9
    18431917/** Undefined system selector. */
    1844 #define X86_SEL_TYPE_SYS_UNDEFINED3        0xA
     1918#define X86_SEL_TYPE_SYS_UNDEFINED3         0xA
    18451919/** 386 TSS selector - Busy. */
    1846 #define X86_SEL_TYPE_SYS_386_TSS_BUSY      0xB
     1920#define X86_SEL_TYPE_SYS_386_TSS_BUSY       0xB
    18471921/** 386 Callgate selector. */
    1848 #define X86_SEL_TYPE_SYS_386_CALL_GATE     0xC
     1922#define X86_SEL_TYPE_SYS_386_CALL_GATE      0xC
    18491923/** Undefined system selector. */
    1850 #define X86_SEL_TYPE_SYS_UNDEFINED4        0xD
     1924#define X86_SEL_TYPE_SYS_UNDEFINED4         0xD
    18511925/** 386 Interruptgate selector. */
    1852 #define X86_SEL_TYPE_SYS_386_INT_GATE      0xE
     1926#define X86_SEL_TYPE_SYS_386_INT_GATE       0xE
    18531927/** 386 Trapgate selector. */
    1854 #define X86_SEL_TYPE_SYS_386_TRAP_GATE     0xF
     1928#define X86_SEL_TYPE_SYS_386_TRAP_GATE      0xF
     1929/** @} */
     1930
     1931/** @name AMD64 System Selector Types.
     1932 * @{ */
     1933#define AMD64_SEL_TYPE_SYS_LDT              2
     1934/** 286 TSS selector - Busy. */
     1935#define AMD64_SEL_TYPE_SYS_TSS_AVAIL        9
     1936/** 386 TSS selector - Busy. */
     1937#define AMD64_SEL_TYPE_SYS_TSS_BUSY         0xB
     1938/** 386 Callgate selector. */
     1939#define AMD64_SEL_TYPE_SYS_CALL_GATE        0xC
     1940/** 386 Interruptgate selector. */
     1941#define AMD64_SEL_TYPE_SYS_INT_GATE         0xE
     1942/** 386 Trapgate selector. */
     1943#define AMD64_SEL_TYPE_SYS_TRAP_GATE        0xF
    18551944/** @} */
    18561945
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