VirtualBox

Changeset 492 in vbox for trunk/src


Ignore:
Timestamp:
Jan 31, 2007 11:27:18 PM (18 years ago)
Author:
vboxsync
Message:

64-bit alignment. Klaus, could you quickly verify that I didn't break anything in the saved state here...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r471 r492  
    9393    /** LCHS disk geometry. */
    9494    uint32_t cCHSCylinders, cCHSHeads, cCHSSectors;
     95    /** Total number of sectors on this disk. */
     96    uint64_t cTotalSectors;
    9597    /** Number of sectors to transfer per IRQ. */
    9698    uint32_t cSectorsPerIRQ;
    97     /** Total number of sectors on this disk. */
    98     uint64_t cTotalSectors;
    9999
    100100    /** ATA/ATAPI register 1: feature (write-only). */
     
    178178    /** Pointer to the I/O buffer. */
    179179    GCPTRTYPE(uint8_t *) pbIOBufferGC;
     180#if HC_ARCH_BITS == 64 && GC_ARCH_BITS != 64
     181    RTGCPTR Aligmnent0; /**< Align the statistics at an 8-byte boundrary. */
     182#endif
    180183
    181184    /*
     
    219222    /** The LUN #. */
    220223    RTUINT                          iLUN;
     224#if HC_ARCH_BITS == 64
     225    RTUINT                          Alignment2; /**< Align pDevInsHC correctly. */
     226#endif
    221227    /** Pointer to device instance. */
    222228    HCPTRTYPE(PPDMDEVINS)           pDevInsHC;
     229    /** Pointer to controller instance. */
     230    HCPTRTYPE(struct ATACONTROLLER *) pControllerHC;
    223231    /** Pointer to device instance. */
    224232    GCPTRTYPE(PPDMDEVINS)           pDevInsGC;
    225233    /** Pointer to controller instance. */
    226     HCPTRTYPE(struct ATACONTROLLER *)pControllerHC;
    227     /** Pointer to controller instance. */
    228     GCPTRTYPE(struct ATACONTROLLER *)pControllerGC;
     234    GCPTRTYPE(struct ATACONTROLLER *) pControllerGC;
    229235} ATADevState;
    230236
     
    333339    /** The position at which to get a new request for the AIO thread. */
    334340    uint8_t             AsyncIOReqTail;
     341    uint8_t             Alignment3[2]; /** Explicit padding of the 2 byte gap. */
     342    /** Magic delay before triggering interrupts in DMA mode. */
     343    uint32_t            DelayIRQMillies;
    335344    /** The mutex protecting the request queue. */
    336345    RTSEMMUTEX          AsyncIORequestMutex;
    337346    /** The event semaphore the thread is waiting on during suspended I/O. */
    338347    RTSEMEVENT          SuspendIOSem;
    339     /** Magic delay before triggering interrupts in DMA mode. */
    340     uint32_t            DelayIRQMillies;
     348#if HC_ARCH_BITS == 32
     349    uint32_t            Alignment0;
     350#endif
    341351
    342352    /* Statistics */
     
    354364    ATACONTROLLER       aCts[2];
    355365    /** Pointer to device instance. */
    356     PPDMDEVINS          pDevIns;
     366    PPDMDEVINSR3        pDevIns;
    357367    /** Status Port - Base interface. */
    358368    PDMIBASE            IBase;
     
    360370    PDMILEDPORTS        ILeds;
    361371    /** Partner of ILeds. */
    362     PPDMILEDCONNECTORS  pLedsConnector;
     372    R3PTRTYPE(PPDMILEDCONNECTORS)   pLedsConnector;
    363373    /** Flag whether GC is enabled. */
    364374    bool                fGCEnabled;
    365375    /** Flag whether R0 is enabled. */
    366376    bool                fR0Enabled;
     377    bool                Alignment0[HC_ARCH_BITS == 64 ? 6 : 2]; /**< Align the struct size. */
    367378} PCIATAState;
    368379
     
    381392
    382393
     394#ifndef VBOX_DEVICE_STRUCT_TESTCASE
    383395/*******************************************************************************
    384396 *  Internal Functions                                                         *
     
    59125924};
    59135925#endif /* IN_RING3 */
     5926#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
     5927
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