VirtualBox

Changeset 42407 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Jul 26, 2012 11:41:35 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
79503
Message:

VMM: Futher work on dealing with hidden segment register, esp. when going stale.

File:
1 edited

Legend:

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

    r42337 r42407  
    23852385 * Return the base address of a descriptor.
    23862386 */
    2387 #define X86DESC_BASE(desc) /*ASM-NOINC*/ \
    2388         (  ((uint32_t)((desc).Gen.u8BaseHigh2) << 24) \
    2389          | (           (desc).Gen.u8BaseHigh1  << 16) \
    2390          | (           (desc).Gen.u16BaseLow        ) )
     2387#define X86DESC_BASE(a_pDesc) /*ASM-NOINC*/ \
     2388        (  ((uint32_t)((a_pDesc)->Gen.u8BaseHigh2) << 24) \
     2389         | (           (a_pDesc)->Gen.u8BaseHigh1  << 16) \
     2390         | (           (a_pDesc)->Gen.u16BaseLow        ) )
    23912391
    23922392/** @def X86DESC_LIMIT
    23932393 * Return the limit of a descriptor.
    23942394 */
    2395 #define X86DESC_LIMIT(desc) /*ASM-NOINC*/ \
    2396         (  ((uint32_t)((desc).Gen.u4LimitHigh) << 16) \
    2397          | (           (desc).Gen.u16LimitLow       ) )
     2395#define X86DESC_LIMIT(a_pDesc) /*ASM-NOINC*/ \
     2396        (  ((uint32_t)((a_pDesc)->Gen.u4LimitHigh) << 16) \
     2397         | (           (a_pDesc)->Gen.u16LimitLow       ) )
     2398
     2399/** @def X86DESC_LIMIT_G
     2400 * Return the limit of a descriptor with the granularity bit taken into account.
     2401 * @returns Selector limit (uint32_t).
     2402 * @param   a_pDesc     Pointer to the descriptor.
     2403 */
     2404#define X86DESC_LIMIT_G(a_pDesc) /*ASM-NOINC*/ \
     2405        ( (a_pDesc)->Gen.u1Granularity \
     2406         ? ( ( ((uint32_t)(a_pDesc)->Gen.u4LimitHigh << 16) | (a_pDesc)->Gen.u16LimitLow ) << 12 ) | UINT32_C(0xfff) \
     2407         :     ((uint32_t)(a_pDesc)->Gen.u4LimitHigh << 16) | (a_pDesc)->Gen.u16LimitLow \
     2408        )
    23982409
    23992410/** @def X86DESC_GET_HID_ATTR
    24002411 * Get the descriptor attributes for the hidden register.
    24012412 */
    2402 #define X86DESC_GET_HID_ATTR(desc) /*ASM-NOINC*/ \
    2403         ( (desc.u >> (16+16+8)) & UINT32_C(0xf0ff) ) /** @todo do we have a define for 0xf0ff? */
     2413#define X86DESC_GET_HID_ATTR(a_pDesc) /*ASM-NOINC*/ \
     2414        ( ((a_pDesc)->u >> (16+16+8)) & UINT32_C(0xf0ff) ) /** @todo do we have a define for 0xf0ff? */
    24042415
    24052416#ifndef VBOX_FOR_DTRACE_LIB
     
    25782589 * Return the base of a 64-bit descriptor.
    25792590 */
    2580 #define X86DESC64_BASE(desc) /*ASM-NOINC*/ \
    2581         (  ((uint64_t)((desc).Gen.u32BaseHigh3) << 32) \
    2582          | ((uint32_t)((desc).Gen.u8BaseHigh2)  << 24) \
    2583          | (           (desc).Gen.u8BaseHigh1   << 16) \
    2584          | (           (desc).Gen.u16BaseLow         ) )
     2591#define X86DESC64_BASE(a_pDesc) /*ASM-NOINC*/ \
     2592        (  ((uint64_t)((a_pDesc)->Gen.u32BaseHigh3) << 32) \
     2593         | ((uint32_t)((a_pDesc)->Gen.u8BaseHigh2)  << 24) \
     2594         | (           (a_pDesc)->Gen.u8BaseHigh1   << 16) \
     2595         | (           (a_pDesc)->Gen.u16BaseLow         ) )
    25852596
    25862597
     
    29472958
    29482959/**
    2949  * The mask used to mask off the table indicator and CPL of an selector.
     2960 * The mask used to mask off the table indicator and RPL of an selector.
    29502961 */
    29512962#define X86_SEL_MASK        0xfff8U
     2963
     2964/**
     2965 * The mask used to mask off the RPL of an selector.
     2966 */
     2967#define X86_SEL_MASK_RPL    0xfffcU
    29522968
    29532969/**
Note: See TracChangeset for help on using the changeset viewer.

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