Changeset 2806 in vbox for trunk/include/VBox
- Timestamp:
- May 23, 2007 2:20:35 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/x86.h
r2104 r2806 1763 1763 1764 1764 1765 /** 1766 * System descriptor table entry (64 bits) 1767 */ 1768 #pragma pack(1) 1769 typedef 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. */ 1808 typedef X86DESC64SYSTEM *PX86DESC64SYSTEM; 1809 /** Pointer to a const generic descriptor entry. */ 1810 typedef const X86DESC64SYSTEM *PCX86DESC64SYSTEM; 1811 1812 1813 /** 1814 * Descriptor table entry. 1815 */ 1816 #pragma pack(1) 1817 typedef 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. */ 1834 typedef X86DESC64 *PX86DESC64; 1835 /** Pointer to const descriptor table entry. */ 1836 typedef const X86DESC64 *PCX86DESC64; 1837 1838 1765 1839 /** @name Selector Descriptor Types. 1766 1840 * @{ … … 1822 1896 * @{ */ 1823 1897 /** Undefined system selector type. */ 1824 #define X86_SEL_TYPE_SYS_UNDEFINED 01898 #define X86_SEL_TYPE_SYS_UNDEFINED 0 1825 1899 /** 286 TSS selector. */ 1826 #define X86_SEL_TYPE_SYS_286_TSS_AVAIL 11900 #define X86_SEL_TYPE_SYS_286_TSS_AVAIL 1 1827 1901 /** LDT selector. */ 1828 #define X86_SEL_TYPE_SYS_LDT 21902 #define X86_SEL_TYPE_SYS_LDT 2 1829 1903 /** 286 TSS selector - Busy. */ 1830 #define X86_SEL_TYPE_SYS_286_TSS_BUSY 31904 #define X86_SEL_TYPE_SYS_286_TSS_BUSY 3 1831 1905 /** 286 Callgate selector. */ 1832 #define X86_SEL_TYPE_SYS_286_CALL_GATE 41906 #define X86_SEL_TYPE_SYS_286_CALL_GATE 4 1833 1907 /** Taskgate selector. */ 1834 #define X86_SEL_TYPE_SYS_TASK_GATE 51908 #define X86_SEL_TYPE_SYS_TASK_GATE 5 1835 1909 /** 286 Interrupt gate selector. */ 1836 #define X86_SEL_TYPE_SYS_286_INT_GATE 61910 #define X86_SEL_TYPE_SYS_286_INT_GATE 6 1837 1911 /** 286 Trapgate selector. */ 1838 #define X86_SEL_TYPE_SYS_286_TRAP_GATE 71912 #define X86_SEL_TYPE_SYS_286_TRAP_GATE 7 1839 1913 /** Undefined system selector. */ 1840 #define X86_SEL_TYPE_SYS_UNDEFINED2 81914 #define X86_SEL_TYPE_SYS_UNDEFINED2 8 1841 1915 /** 386 TSS selector. */ 1842 #define X86_SEL_TYPE_SYS_386_TSS_AVAIL 91916 #define X86_SEL_TYPE_SYS_386_TSS_AVAIL 9 1843 1917 /** Undefined system selector. */ 1844 #define X86_SEL_TYPE_SYS_UNDEFINED3 0xA1918 #define X86_SEL_TYPE_SYS_UNDEFINED3 0xA 1845 1919 /** 386 TSS selector - Busy. */ 1846 #define X86_SEL_TYPE_SYS_386_TSS_BUSY 0xB1920 #define X86_SEL_TYPE_SYS_386_TSS_BUSY 0xB 1847 1921 /** 386 Callgate selector. */ 1848 #define X86_SEL_TYPE_SYS_386_CALL_GATE 0xC1922 #define X86_SEL_TYPE_SYS_386_CALL_GATE 0xC 1849 1923 /** Undefined system selector. */ 1850 #define X86_SEL_TYPE_SYS_UNDEFINED4 0xD1924 #define X86_SEL_TYPE_SYS_UNDEFINED4 0xD 1851 1925 /** 386 Interruptgate selector. */ 1852 #define X86_SEL_TYPE_SYS_386_INT_GATE 0xE1926 #define X86_SEL_TYPE_SYS_386_INT_GATE 0xE 1853 1927 /** 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 1855 1944 /** @} */ 1856 1945
Note:
See TracChangeset
for help on using the changeset viewer.