VirtualBox

Changeset 59238 in vbox


Ignore:
Timestamp:
Jan 1, 2016 1:48:46 AM (9 years ago)
Author:
vboxsync
Message:

iprt/x86.h: Bitfield fix for 16-bit compilers.

File:
1 edited

Legend:

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

    r59019 r59238  
    15061506    uint32_t    u20PageNo : 20;
    15071507} X86PTEBITS;
     1508#ifndef VBOX_FOR_DTRACE_LIB
     1509AssertCompileSize(X86PTEBITS, 4);
     1510#endif
    15081511/** Pointer to a page table entry. */
    15091512typedef X86PTEBITS *PX86PTEBITS;
     
    15271530    uint8_t         au8[4];
    15281531} X86PTE;
     1532#ifndef VBOX_FOR_DTRACE_LIB
     1533AssertCompileSize(X86PTE, 4);
     1534#endif
    15291535/** Pointer to a page table entry. */
    15301536typedef X86PTE *PX86PTE;
     
    15691575    uint32_t    u1NoExecute : 1;
    15701576} X86PTEPAEBITS;
     1577#ifndef VBOX_FOR_DTRACE_LIB
     1578AssertCompileSize(X86PTEPAEBITS, 8);
     1579#endif
    15711580/** Pointer to a page table entry. */
    15721581typedef X86PTEPAEBITS *PX86PTEPAEBITS;
     
    15901599    uint8_t         au8[8];
    15911600} X86PTEPAE;
     1601#ifndef VBOX_FOR_DTRACE_LIB
     1602AssertCompileSize(X86PTEPAE, 8);
     1603#endif
    15921604/** Pointer to a PAE page table entry. */
    15931605typedef X86PTEPAE *PX86PTEPAE;
     
    16041616    X86PTE     a[X86_PG_ENTRIES];
    16051617} X86PT;
     1618#ifndef VBOX_FOR_DTRACE_LIB
     1619AssertCompileSize(X86PT, 4096);
     1620#endif
    16061621/** Pointer to a page table. */
    16071622typedef X86PT *PX86PT;
     
    16231638    X86PTEPAE  a[X86_PG_PAE_ENTRIES];
    16241639} X86PTPAE;
     1640#ifndef VBOX_FOR_DTRACE_LIB
     1641AssertCompileSize(X86PTPAE, 4096);
     1642#endif
    16251643/** Pointer to a page table. */
    16261644typedef X86PTPAE *PX86PTPAE;
     
    16991717    uint32_t    u20PageNo : 20;
    17001718} X86PDEBITS;
     1719#ifndef VBOX_FOR_DTRACE_LIB
     1720AssertCompileSize(X86PDEBITS, 4);
     1721#endif
    17011722/** Pointer to a page directory entry. */
    17021723typedef X86PDEBITS *PX86PDEBITS;
     
    17401761    uint32_t    u1NoExecute : 1;
    17411762} X86PDEPAEBITS;
     1763#ifndef VBOX_FOR_DTRACE_LIB
     1764AssertCompileSize(X86PDEPAEBITS, 8);
     1765#endif
    17421766/** Pointer to a page directory entry. */
    17431767typedef X86PDEPAEBITS *PX86PDEPAEBITS;
     
    18041828{
    18051829    /** Flags whether(=1) or not the page is present. */
    1806     unsigned    u1Present : 1;
     1830    uint32_t    u1Present : 1;
    18071831    /** Read(=0) / Write(=1) flag. */
    1808     unsigned    u1Write : 1;
     1832    uint32_t    u1Write : 1;
    18091833    /** User(=1) / Supervisor (=0) flag. */
    1810     unsigned    u1User : 1;
     1834    uint32_t    u1User : 1;
    18111835    /** Write Thru flag. If PAT enabled, bit 0 of the index. */
    1812     unsigned    u1WriteThru : 1;
     1836    uint32_t    u1WriteThru : 1;
    18131837    /** Cache disabled flag. If PAT enabled, bit 1 of the index. */
    1814     unsigned    u1CacheDisable : 1;
     1838    uint32_t    u1CacheDisable : 1;
    18151839    /** Accessed flag.
    18161840     * Indicates that the page have been read or written to. */
    1817     unsigned    u1Accessed : 1;
     1841    uint32_t    u1Accessed : 1;
    18181842    /** Dirty flag.
    18191843     * Indicates that the page has been written to. */
    1820     unsigned    u1Dirty : 1;
     1844    uint32_t    u1Dirty : 1;
    18211845    /** Page size flag - always 1 for 4MB entries. */
    1822     unsigned    u1Size : 1;
     1846    uint32_t    u1Size : 1;
    18231847    /** Global flag.  */
    1824     unsigned    u1Global : 1;
     1848    uint32_t    u1Global : 1;
    18251849    /** Available for use to system software. */
    1826     unsigned    u3Available : 3;
     1850    uint32_t    u3Available : 3;
    18271851    /** Reserved / If PAT enabled, bit 2 of the index.  */
    1828     unsigned    u1PAT : 1;
     1852    uint32_t    u1PAT : 1;
    18291853    /** Bits 32-39 of the page number on AMD64.
    18301854     * This AMD64 hack allows accessing 40bits of physical memory without PAE. */
    1831     unsigned    u8PageNoHigh : 8;
     1855    uint32_t    u8PageNoHigh : 8;
    18321856    /** Reserved. */
    1833     unsigned    u1Reserved : 1;
     1857    uint32_t    u1Reserved : 1;
    18341858    /** Physical Page number of the page. */
    1835     unsigned    u10PageNo : 10;
     1859    uint32_t    u10PageNo : 10;
    18361860} X86PDE4MBITS;
     1861#ifndef VBOX_FOR_DTRACE_LIB
     1862AssertCompileSize(X86PDE4MBITS, 4);
     1863#endif
    18371864/** Pointer to a page table entry. */
    18381865typedef X86PDE4MBITS *PX86PDE4MBITS;
     
    18811908    uint32_t    u1NoExecute : 1;
    18821909} X86PDE2MPAEBITS;
     1910#ifndef VBOX_FOR_DTRACE_LIB
     1911AssertCompileSize(X86PDE2MPAEBITS, 8);
     1912#endif
    18831913/** Pointer to a 2MB PAE page table entry. */
    18841914typedef X86PDE2MPAEBITS *PX86PDE2MPAEBITS;
     
    19061936    uint32_t        au32[1];
    19071937} X86PDE;
     1938#ifndef VBOX_FOR_DTRACE_LIB
     1939AssertCompileSize(X86PDE, 4);
     1940#endif
    19081941/** Pointer to a page directory entry. */
    19091942typedef X86PDE *PX86PDE;
     
    19291962    uint32_t        au32[2];
    19301963} X86PDEPAE;
     1964#ifndef VBOX_FOR_DTRACE_LIB
     1965AssertCompileSize(X86PDEPAE, 8);
     1966#endif
    19311967/** Pointer to a page directory entry. */
    19321968typedef X86PDEPAE *PX86PDEPAE;
     
    19421978    X86PDE      a[X86_PG_ENTRIES];
    19431979} X86PD;
     1980#ifndef VBOX_FOR_DTRACE_LIB
     1981AssertCompileSize(X86PD, 4096);
     1982#endif
    19441983/** Pointer to a page directory. */
    19451984typedef X86PD *PX86PD;
     
    19612000    X86PDEPAE   a[X86_PG_PAE_ENTRIES];
    19622001} X86PDPAE;
     2002#ifndef VBOX_FOR_DTRACE_LIB
     2003AssertCompileSize(X86PDPAE, 4096);
     2004#endif
    19632005/** Pointer to a PAE page directory. */
    19642006typedef X86PDPAE *PX86PDPAE;
     
    20312073    uint32_t    u12Reserved : 12;
    20322074} X86PDPEBITS;
     2075#ifndef VBOX_FOR_DTRACE_LIB
     2076AssertCompileSize(X86PDPEBITS, 8);
     2077#endif
    20332078/** Pointer to a page directory pointer table entry. */
    20342079typedef X86PDPEBITS *PX86PTPEBITS;
     
    20672112    uint32_t    u1NoExecute : 1;
    20682113} X86PDPEAMD64BITS;
     2114#ifndef VBOX_FOR_DTRACE_LIB
     2115AssertCompileSize(X86PDPEAMD64BITS, 8);
     2116#endif
    20692117/** Pointer to a page directory pointer table entry. */
    20702118typedef X86PDPEAMD64BITS *PX86PDPEAMD64BITS;
     
    20902138    uint32_t        au32[2];
    20912139} X86PDPE;
     2140#ifndef VBOX_FOR_DTRACE_LIB
     2141AssertCompileSize(X86PDPE, 8);
     2142#endif
    20922143/** Pointer to a page directory pointer table entry. */
    20932144typedef X86PDPE *PX86PDPE;
     
    21042155    X86PDPE         a[X86_PG_AMD64_PDPE_ENTRIES];
    21052156} X86PDPT;
     2157#ifndef VBOX_FOR_DTRACE_LIB
     2158AssertCompileSize(X86PDPT, 4096);
     2159#endif
    21062160/** Pointer to a page directory pointer table. */
    21072161typedef X86PDPT *PX86PDPT;
     
    21762230    uint32_t    u1NoExecute : 1;
    21772231} X86PML4EBITS;
     2232#ifndef VBOX_FOR_DTRACE_LIB
     2233AssertCompileSize(X86PML4EBITS, 8);
     2234#endif
    21782235/** Pointer to a page map level-4 entry. */
    21792236typedef X86PML4EBITS *PX86PML4EBITS;
     
    21972254    uint32_t        au32[2];
    21982255} X86PML4E;
     2256#ifndef VBOX_FOR_DTRACE_LIB
     2257AssertCompileSize(X86PML4E, 8);
     2258#endif
    21992259/** Pointer to a page map level-4 entry. */
    22002260typedef X86PML4E *PX86PML4E;
     
    22112271    X86PML4E        a[X86_PG_PAE_ENTRIES];
    22122272} X86PML4;
     2273#ifndef VBOX_FOR_DTRACE_LIB
     2274AssertCompileSize(X86PML4, 4096);
     2275#endif
    22132276/** Pointer to a page map level-4. */
    22142277typedef X86PML4 *PX86PML4;
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