VirtualBox

Changeset 7072 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 21, 2008 2:06:23 PM (17 years ago)
Author:
vboxsync
Message:

Make our devices use the RTGCPHYS32 type & backed out the alignment changes
Added SSMR3PutGCPhys32 & SSMR3GetGCPhys32
Removed obsolete VBOX types

Location:
trunk/src/VBox
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxService/VBoxClipboard.cpp

    r5999 r7072  
    149149    pParm->type                    = VMMDevHGCMParmType_LinAddr;
    150150    pParm->u.Pointer.size          = cb;
    151     pParm->u.Pointer.u.linearAddr  = (VBOXGCPTR)pv;
     151    pParm->u.Pointer.u.linearAddr  = (RTGCPTR)pv;
    152152}
    153153
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxCalls.c

    r5999 r7072  
    125125    data.mappings.type                   = VMMDevHGCMParmType_LinAddr;
    126126    data.mappings.u.Pointer.size         = sizeof (SHFLMAPPING) * *pcMappings;
    127     data.mappings.u.Pointer.u.linearAddr = (VBOXGCPTR)&paMappings[0];
     127    data.mappings.u.Pointer.u.linearAddr = (RTGCPTR)&paMappings[0];
    128128
    129129/*    Log(("VBOXSF: in ifs difference %d\n",
     
    162162    data.name.type                   = VMMDevHGCMParmType_LinAddr;
    163163    data.name.u.Pointer.size         = size;
    164     data.name.u.Pointer.u.linearAddr = (VBOXGCPTR)pString;
     164    data.name.u.Pointer.u.linearAddr = (RTGCPTR)pString;
    165165
    166166    rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data));
     
    188188    data.path.type                    = VMMDevHGCMParmType_LinAddr;
    189189    data.path.u.Pointer.size          = ShflStringSizeOfBuffer (szFolderName);
    190     data.path.u.Pointer.u.linearAddr  = (VBOXGCPTR)szFolderName;
     190    data.path.u.Pointer.u.linearAddr  = (RTGCPTR)szFolderName;
    191191
    192192    data.root.type                    = VMMDevHGCMParmType_32bit;
     
    223223        data.path.type                    = VMMDevHGCMParmType_LinAddr;
    224224        data.path.u.Pointer.size          = ShflStringSizeOfBuffer (szFolderName);
    225         data.path.u.Pointer.u.linearAddr  = (VBOXGCPTR)szFolderName;
     225        data.path.u.Pointer.u.linearAddr  = (RTGCPTR)szFolderName;
    226226
    227227        data.root.type                    = VMMDevHGCMParmType_32bit;
     
    280280    data.path.type                    = VMMDevHGCMParmType_LinAddr;
    281281    data.path.u.Pointer.size          = ShflStringSizeOfBuffer (pParsedPath);
    282     data.path.u.Pointer.u.linearAddr  = (VBOXGCPTR)pParsedPath;
     282    data.path.u.Pointer.u.linearAddr  = (RTGCPTR)pParsedPath;
    283283
    284284    data.parms.type                   = VMMDevHGCMParmType_LinAddr;
    285285    data.parms.u.Pointer.size         = sizeof (SHFLCREATEPARMS);
    286     data.parms.u.Pointer.u.linearAddr = (VBOXGCPTR)pCreateParms;
     286    data.parms.u.Pointer.u.linearAddr = (RTGCPTR)pCreateParms;
    287287
    288288    rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data));
     
    339339    data.path.type                      = VMMDevHGCMParmType_LinAddr_In;
    340340    data.path.u.Pointer.size            = ShflStringSizeOfBuffer (pParsedPath);
    341     data.path.u.Pointer.u.linearAddr    = (VBOXGCPTR)pParsedPath;
     341    data.path.u.Pointer.u.linearAddr    = (RTGCPTR)pParsedPath;
    342342
    343343    data.flags.type                     = VMMDevHGCMParmType_32bit;
     
    371371    data.src.type                       = VMMDevHGCMParmType_LinAddr_In;
    372372    data.src.u.Pointer.size             = ShflStringSizeOfBuffer (pSrcPath);
    373     data.src.u.Pointer.u.linearAddr     = (VBOXGCPTR)pSrcPath;
     373    data.src.u.Pointer.u.linearAddr     = (RTGCPTR)pSrcPath;
    374374
    375375    data.dest.type                      = VMMDevHGCMParmType_LinAddr_In;
    376376    data.dest.u.Pointer.size            = ShflStringSizeOfBuffer (pDestPath);
    377     data.dest.u.Pointer.u.linearAddr    = (VBOXGCPTR)pDestPath;
     377    data.dest.u.Pointer.u.linearAddr    = (RTGCPTR)pDestPath;
    378378
    379379    data.flags.type                     = VMMDevHGCMParmType_32bit;
     
    412412    data.buffer.type                    = (fLocked) ? VMMDevHGCMParmType_LinAddr_Locked_Out : VMMDevHGCMParmType_LinAddr_Out;
    413413    data.buffer.u.Pointer.size          = *pcbBuffer;
    414     data.buffer.u.Pointer.u.linearAddr  = (VBOXGCPTR)pBuffer;
     414    data.buffer.u.Pointer.u.linearAddr  = (RTGCPTR)pBuffer;
    415415
    416416    rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data));
     
    447447    data.buffer.type                    = (fLocked) ? VMMDevHGCMParmType_LinAddr_Locked_In : VMMDevHGCMParmType_LinAddr_In;
    448448    data.buffer.u.Pointer.size          = *pcbBuffer;
    449     data.buffer.u.Pointer.u.linearAddr  = (VBOXGCPTR)pBuffer;
     449    data.buffer.u.Pointer.u.linearAddr  = (RTGCPTR)pBuffer;
    450450
    451451    rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data));
     
    517517    data.path.u.Pointer.size            =
    518518        (ParsedPath) ? ShflStringSizeOfBuffer(ParsedPath) : 0;
    519     data.path.u.Pointer.u.linearAddr    = (VBOXGCPTR) ParsedPath;
     519    data.path.u.Pointer.u.linearAddr    = (RTGCPTR) ParsedPath;
    520520
    521521    data.buffer.type                    = VMMDevHGCMParmType_LinAddr_Out;
    522522    data.buffer.u.Pointer.size          = *pcbBuffer;
    523     data.buffer.u.Pointer.u.linearAddr  = (VBOXGCPTR)pBuffer;
     523    data.buffer.u.Pointer.u.linearAddr  = (RTGCPTR)pBuffer;
    524524
    525525    data.resumePoint.type               = VMMDevHGCMParmType_32bit;
     
    562562    data.info.type                      = VMMDevHGCMParmType_LinAddr;
    563563    data.info.u.Pointer.size            = *pcbBuffer;
    564     data.info.u.Pointer.u.linearAddr    = (VBOXGCPTR)pBuffer;
     564    data.info.u.Pointer.u.linearAddr    = (RTGCPTR)pBuffer;
    565565
    566566    rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data));
  • trunk/src/VBox/Devices/Bus/DevPCI.cpp

    r7045 r7072  
    109109    uint32_t            pci_irq_levels[4][PCI_IRQ_WORDS];
    110110    /** The base address for PCI assigned MMIO addresses. */
    111     RTGCPHYS            pci_mem_base;
     111    RTGCPHYS32          pci_mem_base;
    112112    /** The next I/O port address which the PCI BIOS will use. */
    113113    uint32_t            pci_bios_io_addr;
    114114    /** The next MMIO address which the PCI BIOS will use. */
    115115    uint32_t            pci_bios_mem_addr;
    116     uint32_t            u32Padding; /**< Alignment padding. */
    117 
    118116    /** I/O APIC usage flag */
    119117    bool                fUseIoApic;
     
    288286#else /* less strict check */
    289287                        AssertMsg(VBOX_SUCCESS(rc) || rc == VERR_IOM_MMIO_RANGE_NOT_FOUND, ("rc=%Vrc d=%s\n", rc, d->name)); NOREF(rc);
    290 #endif
     288#endif 
    291289                    }
    292290                }
     
    774772    {
    775773    case 0x0101:
    776         if (vendor_id == 0x8086 &&
     774        if (vendor_id == 0x8086 && 
    777775            (device_id == 0x7010 || device_id == 0x7111)) {
    778776            /* PIIX3 or PIIX4 IDE */
     
    10851083            if (pData->devices[i])
    10861084            {
    1087                 LogRel(("New device in slot %#x, %s (vendor=%#06x device=%#06x)\n", i, pData->devices[i]->name,
     1085                LogRel(("New device in slot %#x, %s (vendor=%#06x device=%#06x)\n", i, pData->devices[i]->name, 
    10881086                        PCIDevGetVendorId(pData->devices[i]), PCIDevGetDeviceId(pData->devices[i])));
    10891087                if (SSMR3HandleGetAfter(pSSMHandle) != SSMAFTER_DEBUG_IT)
     
    11021100        if (!pDev)
    11031101        {
    1104             LogRel(("Device in slot %#x has been removed! vendor=%#06x device=%#06x\n", i,
     1102            LogRel(("Device in slot %#x has been removed! vendor=%#06x device=%#06x\n", i, 
    11051103                    PCIDevGetVendorId(&DevTmp), PCIDevGetDeviceId(&DevTmp)));
    11061104            if (SSMR3HandleGetAfter(pSSMHandle) != SSMAFTER_DEBUG_IT)
     
    11201118        /* commit the loaded device config. */
    11211119        memcpy(pDev->config, DevTmp.config, sizeof(pDev->config));
    1122         if (DevTmp.Int.s.iIrq >= PCI_DEVICES_MAX)
     1120        if (DevTmp.Int.s.iIrq >= PCI_DEVICES_MAX) 
    11231121        {
    11241122            LogRel(("Device %s: Too many devices %d (max=%d)\n", pDev->name, DevTmp.Int.s.iIrq, PCI_DEVICES_MAX));
     
    13281326
    13291327
    1330 /**
     1328/** 
    13311329 * @copydoc PDMPCIBUSREG::pfnSetConfigCallbacksHC
    13321330 */
    1333 static DECLCALLBACK(void) pciSetConfigCallbacks(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PFNPCICONFIGREAD pfnRead, PPFNPCICONFIGREAD ppfnReadOld,
     1331static DECLCALLBACK(void) pciSetConfigCallbacks(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PFNPCICONFIGREAD pfnRead, PPFNPCICONFIGREAD ppfnReadOld, 
    13341332                                                PFNPCICONFIGWRITE pfnWrite, PPFNPCICONFIGWRITE ppfnWriteOld)
    13351333{
  • trunk/src/VBox/Devices/Graphics/DevVGA.h

    r7057 r7072  
    242242    VGA_STATE_COMMON
    243243#ifdef VBOX
    244     /** end-of-common-state-marker + alignment. */
     244    /** end-of-common-state-marker */
    245245    uint32_t                    u32Marker;
    246246    /** The physical address the VRAM was assigned. */
    247     RTGCPHYS                    GCPhysVRAM;
     247    RTGCPHYS32                  GCPhysVRAM;
    248248    /** Pointer to GC vram mapping. */
    249249    GCPTRTYPE(uint8_t *)        vram_ptrGC;
     250/** @todo r=bird: bool not RTUINT (my fault I guess). */
    250251    /** LFB was updated flag. */
    251     bool                        fLFBUpdated;
     252    RTUINT                      fLFBUpdated;
    252253    /** Indicates if the GC extensions are enabled or not. */
    253     bool                        fGCEnabled;
     254    RTUINT                      fGCEnabled;
    254255    /** Indicates if the R0 extensions are enabled or not. */
    255     bool                        fR0Enabled;
     256    RTUINT                      fR0Enabled;
     257    /** Pointer to vgaGCLFBAccessHandler(). */
     258    RTGCPTR                     GCPtrLFBHandler;
    256259    /** Flag indicating that there are dirty bits. This is used to optimize the handler resetting. */
    257260    bool                        fHaveDirtyBits;
    258     /** Pointer to vgaGCLFBAccessHandler(). */
    259     RTGCPTR                     GCPtrLFBHandler;
    260261    /** Bitmap tracking dirty pages. */
    261262    uint32_t                    au32DirtyBitmap[VGA_VRAM_MAX / PAGE_SIZE / 32];
     
    281282    uint32_t                    fRenderVRAM;
    282283
     284#if HC_ARCH_BITS == 32
     285    uint32_t                    Padding10;
     286#endif
    283287    /** The PCI device. */
    284288    PCIDEVICE                   Dev;
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r7066 r7072  
    142142    uint32_t                            u32Lnkst;
    143143    /** Address of the RX descriptor table (ring). Loaded at init. */
    144     RTGCPHYS                            GCRDRA;
     144    RTGCPHYS32                          GCRDRA;
    145145    /** Address of the TX descriptor table (ring). Loaded at init. */
    146     RTGCPHYS                            GCTDRA;
     146    RTGCPHYS32                          GCTDRA;
    147147    uint8_t                             aPROM[16];
    148148    uint16_t                            aCSR[CSR_MAX_REG];
     
    167167    int                                 iLog2DescSize;
    168168    /** Bits 16..23 in 16-bit mode */
    169     RTGCPHYS                            GCUpperPhys;
     169    RTGCPHYS32                          GCUpperPhys;
    170170
    171171    /** Transmit signaller */
     172    GCPTRTYPE(PPDMQUEUE)                pXmitQueueGC;
    172173    R3R0PTRTYPE(PPDMQUEUE)              pXmitQueueHC;
    173     GCPTRTYPE(PPDMQUEUE)                pXmitQueueGC;
    174174
    175175    /** Receive signaller */
     176    R3R0PTRTYPE(PPDMQUEUE)              pCanRxQueueHC;
    176177    GCPTRTYPE(PPDMQUEUE)                pCanRxQueueGC;
    177     R3R0PTRTYPE(PPDMQUEUE)              pCanRxQueueHC;
     178    /** Pointer to the device instance. */
     179    GCPTRTYPE(PPDMDEVINS)               pDevInsGC;
    178180    /** Pointer to the device instance. */
    179181    R3R0PTRTYPE(PPDMDEVINS)             pDevInsHC;
    180     /** Pointer to the device instance. */
    181     GCPTRTYPE(PPDMDEVINS)               pDevInsGC;
    182     /** Alignment padding. */
    183     RTGCPTR                             GCPtrAlignment0;
    184182    /** Restore timer.
    185183     *  This is used to disconnect and reconnect the link after a restore. */
     
    196194    PDMINETWORKCONFIG                   INetworkConfig;
    197195    /** Base address of the MMIO region. */
    198     RTGCPHYS                            MMIOBase;
     196    RTGCPHYS32                          MMIOBase;
    199197    /** Base port of the I/O space region. */
    200198    RTIOPORT                            IOPortBase;
     
    214212    PDMMAC                              MacConfigured;
    215213
    216 #if HC_ARCH_BITS == 64
    217     uint32_t                            u32Alignment0; /** Alignment padding. */
    218 #endif
    219214    /** The LED. */
    220215    PDMLED                              Led;
     
    233228
    234229#ifdef PCNET_NO_POLLING
    235     RTGCPHYS                            TDRAPhysOld;
     230    RTGCPHYS32                          TDRAPhysOld;
    236231    uint32_t                            cbTDRAOld;
    237232
    238     RTGCPHYS                            RDRAPhysOld;
     233    RTGCPHYS32                          RDRAPhysOld;
    239234    uint32_t                            cbRDRAOld;
    240235
     
    582577 * Make sure we read the own flag first.
    583578 */
    584 DECLINLINE(void) pcnetTmdLoad(PCNetState *pData, TMD *tmd, RTGCPHYS addr)
     579DECLINLINE(void) pcnetTmdLoad(PCNetState *pData, TMD *tmd, RTGCPHYS32 addr)
    585580{
    586581    PPDMDEVINS pDevIns = PCNETSTATE_2_DEVINS(pData);
     
    626621 * Make sure that all data are transmitted before we clear the own flag.
    627622 */
    628 DECLINLINE(void) pcnetTmdStorePassHost(PCNetState *pData, TMD *tmd, RTGCPHYS addr)
     623DECLINLINE(void) pcnetTmdStorePassHost(PCNetState *pData, TMD *tmd, RTGCPHYS32 addr)
    629624{
    630625    STAM_PROFILE_ADV_START(&pData->CTXSUFF(StatTmdStore), a);
     
    668663 * Make sure we read the own flag first.
    669664 */
    670 DECLINLINE(void) pcnetRmdLoad(PCNetState *pData, RMD *rmd, RTGCPHYS addr)
     665DECLINLINE(void) pcnetRmdLoad(PCNetState *pData, RMD *rmd, RTGCPHYS32 addr)
    671666{
    672667    PPDMDEVINS pDevIns = PCNETSTATE_2_DEVINS(pData);
     
    711706 * Make sure that all data are transmitted before we clear the own flag.
    712707 */
    713 DECLINLINE(void) pcnetRmdStorePassHost(PCNetState *pData, RMD *rmd, RTGCPHYS addr)
     708DECLINLINE(void) pcnetRmdStorePassHost(PCNetState *pData, RMD *rmd, RTGCPHYS32 addr)
    714709{
    715710    PPDMDEVINS pDevIns = PCNETSTATE_2_DEVINS(pData);
     
    971966 * Get the receive descriptor ring address with a given index.
    972967 */
    973 DECLINLINE(RTGCPHYS) pcnetRdraAddr(PCNetState *pData, int idx)
     968DECLINLINE(RTGCPHYS32) pcnetRdraAddr(PCNetState *pData, int idx)
    974969{
    975970    return pData->GCRDRA + ((CSR_RCVRL(pData) - idx) << pData->iLog2DescSize);
     
    979974 * Get the transmit descriptor ring address with a given index.
    980975 */
    981 DECLINLINE(RTGCPHYS) pcnetTdraAddr(PCNetState *pData, int idx)
     976DECLINLINE(RTGCPHYS32) pcnetTdraAddr(PCNetState *pData, int idx)
    982977{
    983978    return pData->GCTDRA + ((CSR_XMTRL(pData) - idx) << pData->iLog2DescSize);
     
    13031298     * 3) TDRA & RDRA overlap partly with different physical pages
    13041299     */
    1305     RTGCPHYS RDRAPageStart = pData->GCRDRA & ~PAGE_OFFSET_MASK;
    1306     RTGCPHYS RDRAPageEnd   = (pcnetRdraAddr(pData, 0) - 1) & ~PAGE_OFFSET_MASK;
    1307     RTGCPHYS TDRAPageStart = pData->GCTDRA & ~PAGE_OFFSET_MASK;
    1308     RTGCPHYS TDRAPageEnd   = (pcnetTdraAddr(pData, 0) - 1) & ~PAGE_OFFSET_MASK;
     1300    RTGCPHYS32 RDRAPageStart = pData->GCRDRA & ~PAGE_OFFSET_MASK;
     1301    RTGCPHYS32 RDRAPageEnd   = (pcnetRdraAddr(pData, 0) - 1) & ~PAGE_OFFSET_MASK;
     1302    RTGCPHYS32 TDRAPageStart = pData->GCTDRA & ~PAGE_OFFSET_MASK;
     1303    RTGCPHYS32 TDRAPageEnd   = (pcnetTdraAddr(pData, 0) - 1) & ~PAGE_OFFSET_MASK;
    13091304
    13101305    if (    RDRAPageStart > TDRAPageEnd
     
    14741469         * The current receive message descriptor.
    14751470         */
    1476         RMD      rmd;
    1477         int      i = CSR_RCVRC(pData);
    1478         RTGCPHYS addr;
     1471        RMD        rmd;
     1472        int        i = CSR_RCVRC(pData);
     1473        RTGCPHYS32 addr;
    14791474
    14801475        if (i < 1)
     
    15681563    if (RT_LIKELY(pData->GCTDRA))
    15691564    {
    1570         RTGCPHYS cxda = pcnetTdraAddr(pData, CSR_XMTRC(pData));
     1565        RTGCPHYS32 cxda = pcnetTdraAddr(pData, CSR_XMTRC(pData));
    15711566
    15721567        pcnetTmdLoad(pData, tmd, PHYSADDR(pData, cxda));
     
    16701665            /* Dump the status of all RX descriptors */
    16711666            const unsigned  cb = 1 << pData->iLog2DescSize;
    1672             RTGCPHYS        GCPhys = pData->GCRDRA;
     1667            RTGCPHYS32      GCPhys = pData->GCRDRA;
    16731668            i = CSR_RCVRL(pData);
    16741669            while (i-- > 0)
     
    16841679        else
    16851680        {
    1686             uint8_t *src = &pData->abRecvBuf[8];
    1687             RTGCPHYS crda = CSR_CRDA(pData);
    1688             RTGCPHYS next_crda;
     1681            uint8_t   *src = &pData->abRecvBuf[8];
     1682            RTGCPHYS32 crda = CSR_CRDA(pData);
     1683            RTGCPHYS32 next_crda;
    16891684            RMD      rmd, next_rmd;
    16901685            int      pktcount = 0;
     
    17151710
    17161711            int count = RT_MIN(4096 - (int)rmd.rmd1.bcnt, size);
    1717             RTGCPHYS rbadr = PHYSADDR(pData, rmd.rmd0.rbadr);
     1712            RTGCPHYS32 rbadr = PHYSADDR(pData, rmd.rmd0.rbadr);
    17181713            PDMDevHlpPhysWrite(pDevIns, rbadr, src, count);
    17191714            src  += count;
     
    18601855 * Reads the first part of a frame
    18611856 */
    1862 DECLINLINE(void) pcnetXmitRead1st(PCNetState *pData, RTGCPHYS GCPhysFrame, const unsigned cbFrame)
     1857DECLINLINE(void) pcnetXmitRead1st(PCNetState *pData, RTGCPHYS32 GCPhysFrame, const unsigned cbFrame)
    18631858{
    18641859    Assert(cbFrame < sizeof(pData->abSendBuf));
     
    18751870 * Reads more into the current frame.
    18761871 */
    1877 DECLINLINE(void) pcnetXmitReadMore(PCNetState *pData, RTGCPHYS GCPhysFrame, const unsigned cbFrame)
     1872DECLINLINE(void) pcnetXmitReadMore(PCNetState *pData, RTGCPHYS32 GCPhysFrame, const unsigned cbFrame)
    18781873{
    18791874    Assert(pData->SendFrame.cb + cbFrame < sizeof(pData->abSendBuf));
     
    27862781        case 2:
    27872782            /* PHY identifier 1. */
    2788             val = 0x22;     /* Am79C874 PHY */
     2783            val = 0x22;     /* Am79C874 PHY */ 
    27892784            break;
    27902785
    27912786        case 3:
    27922787            /* PHY identifier 2. */
    2793             val = 0x561b;   /* Am79C874 PHY */
     2788            val = 0x561b;   /* Am79C874 PHY */ 
    27942789            break;
    27952790
     
    27992794#if 0
    28002795                // Advertising flow control is a) not the default, and b) confuses
    2801                 // the link speed detection routine in Windows PCnet driver
     2796                // the link speed detection routine in Windows PCnet driver 
    28022797                  | 0x0400  /* Try flow control. */
    28032798#endif
     
    37823777    {
    37833778        const unsigned  cb = 1 << pData->iLog2DescSize;
    3784         RTGCPHYS        GCPhys = pData->GCRDRA;
     3779        RTGCPHYS32      GCPhys = pData->GCRDRA;
    37853780        unsigned        i = CSR_RCVRL(pData);
    37863781        while (i-- > 0)
     
    38223817    {
    38233818        const unsigned  cb = 1 << pData->iLog2DescSize;
    3824         RTGCPHYS        GCPhys = pData->GCTDRA;
     3819        RTGCPHYS32      GCPhys = pData->GCTDRA;
    38253820        unsigned        i = CSR_XMTRL(pData);
    38263821        while (i-- > 0)
     
    39033898    SSMR3PutS32(pSSMHandle, pData->iISR);
    39043899    SSMR3PutU32(pSSMHandle, pData->u32Lnkst);
    3905     SSMR3PutGCPhys(pSSMHandle, pData->GCRDRA);
    3906     SSMR3PutGCPhys(pSSMHandle, pData->GCTDRA);
     3900    SSMR3PutGCPhys32(pSSMHandle, pData->GCRDRA);
     3901    SSMR3PutGCPhys32(pSSMHandle, pData->GCTDRA);
    39073902    SSMR3PutMem(pSSMHandle, pData->aPROM, sizeof(pData->aPROM));
    39083903    SSMR3PutMem(pSSMHandle, pData->aCSR, sizeof(pData->aCSR));
     
    39653960    SSMR3GetS32(pSSMHandle, &pData->iISR);
    39663961    SSMR3GetU32(pSSMHandle, &pData->u32Lnkst);
    3967     SSMR3GetGCPhys(pSSMHandle, &pData->GCRDRA);
    3968     SSMR3GetGCPhys(pSSMHandle, &pData->GCTDRA);
     3962    SSMR3GetGCPhys32(pSSMHandle, &pData->GCRDRA);
     3963    SSMR3GetGCPhys32(pSSMHandle, &pData->GCTDRA);
    39693964    SSMR3GetMem(pSSMHandle, &pData->aPROM, sizeof(pData->aPROM));
    39703965    SSMR3GetMem(pSSMHandle, &pData->aCSR, sizeof(pData->aCSR));
  • trunk/src/VBox/Devices/PC/DevACPI.cpp

    r6852 r7072  
    470470}
    471471
    472 static void acpiPhyscpy (ACPIState *s, RTGCPHYS dst, const void * const src, size_t size)
     472static void acpiPhyscpy (ACPIState *s, RTGCPHYS32 dst, const void * const src, size_t size)
    473473{
    474474    PDMDevHlpPhysWrite (s->pDevIns, dst, src, size);
     
    476476
    477477/* Differentiated System Description Table (DSDT) */
    478 static void acpiSetupDSDT (ACPIState *s, RTGCPHYS addr)
     478static void acpiSetupDSDT (ACPIState *s, RTGCPHYS32 addr)
    479479{
    480480    acpiPhyscpy (s, addr, AmlCode, sizeof(AmlCode));
     
    482482
    483483/* Firmware ACPI Control Structure (FACS) */
    484 static void acpiSetupFACS (ACPIState *s, RTGCPHYS addr)
     484static void acpiSetupFACS (ACPIState *s, RTGCPHYS32 addr)
    485485{
    486486    ACPITBLFACS facs;
     
    500500
    501501/* Fixed ACPI Description Table (FADT aka FACP) */
    502 static void acpiSetupFADT (ACPIState *s, RTGCPHYS addr, uint32_t facs_addr, uint32_t dsdt_addr)
     502static void acpiSetupFADT (ACPIState *s, RTGCPHYS32 addr, uint32_t facs_addr, uint32_t dsdt_addr)
    503503{
    504504    ACPITBLFADT fadt;
     
    567567 * addresses for description headers. RSDT is for ACPI 1.0. XSDT for ACPI 2.0 and up.
    568568 */
    569 static int acpiSetupRSDT (ACPIState *s, RTGCPHYS addr, unsigned int nb_entries, uint32_t *addrs)
     569static int acpiSetupRSDT (ACPIState *s, RTGCPHYS32 addr, unsigned int nb_entries, uint32_t *addrs)
    570570{
    571571    ACPITBLRSDT *rsdt;
     
    589589
    590590/* Extended System Description Table. */
    591 static int acpiSetupXSDT (ACPIState *s, RTGCPHYS addr, unsigned int nb_entries, uint32_t *addrs)
     591static int acpiSetupXSDT (ACPIState *s, RTGCPHYS32 addr, unsigned int nb_entries, uint32_t *addrs)
    592592{
    593593    ACPITBLXSDT *xsdt;
     
    631631/** @todo All hardcoded, should set this up based on the actual VM config!!!!! */
    632632/** @note APIC without IO-APIC hangs Windows Vista therefore we setup both */
    633 static void acpiSetupMADT (ACPIState *s, RTGCPHYS addr)
     633static void acpiSetupMADT (ACPIState *s, RTGCPHYS32 addr)
    634634{
    635635    ACPITBLMADT madt;
     
    14561456static int acpiPlantTables (ACPIState *s)
    14571457{
    1458     int      rc;
    1459     uint32_t rsdt_addr, xsdt_addr, fadt_addr, facs_addr, dsdt_addr, last_addr, apic_addr = 0;
    1460     uint32_t addend = 0;
    1461     uint32_t rsdt_addrs[4];
    1462     uint32_t cAddr;
    1463     size_t   rsdt_tbl_len = sizeof(ACPITBLHEADER);
    1464     size_t   xsdt_tbl_len = sizeof(ACPITBLHEADER);
     1458    int        rc;
     1459    RTGCPHYS32 rsdt_addr, xsdt_addr, fadt_addr, facs_addr, dsdt_addr, last_addr, apic_addr = 0;
     1460    uint32_t   addend = 0;
     1461    RTGCPHYS32 rsdt_addrs[4];
     1462    uint32_t   cAddr;
     1463    size_t     rsdt_tbl_len = sizeof(ACPITBLHEADER);
     1464    size_t     xsdt_tbl_len = sizeof(ACPITBLHEADER);
    14651465
    14661466    cAddr = 1;           /* FADT */
  • trunk/src/VBox/Devices/PC/DevPcBios.cpp

    r6890 r7072  
    11211121    /* the low ROM mapping. */
    11221122    unsigned cb = RT_MIN(cbPcBiosBinary, 128 * _1K);
    1123     RTGCPHYS GCPhys = 0x00100000 - cb;
     1123    RTGCPHYS32 GCPhys = 0x00100000 - cb;
    11241124    const uint8_t *pbVirgin = &pu8PcBiosBinary[cbPcBiosBinary - cb];
    11251125    while (GCPhys < 0x00100000)
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r7060 r7072  
    321321    /** The BusMaster DMA state. */
    322322    BMDMAState  BmDma;
    323     /** (32 bit) GC phys pointer to first DMA descriptor. */
    324     uint32_t    pFirstDMADesc;
    325     /** (32 bit) GC phys pointer to last DMA descriptor. */
    326     uint32_t    pLastDMADesc;
    327     /** (32 bit) GC phys pointer to current DMA buffer (for redo operations). */
    328     uint32_t    pRedoDMABuffer;
     323    /** Pointer to first DMA descriptor. */
     324    RTGCPHYS32  pFirstDMADesc;
     325    /** Pointer to last DMA descriptor. */
     326    RTGCPHYS32  pLastDMADesc;
     327    /** Pointer to current DMA buffer (for redo operations). */
     328    RTGCPHYS32  pRedoDMABuffer;
    329329    /** Size of current DMA buffer (for redo operations). */
    330330    uint32_t    cbRedoDMABuffer;
     
    39093909    ATADevState *s = &pCtl->aIfs[pCtl->iAIOIf];
    39103910    bool fRedo;
    3911     uint32_t pDesc;
     3911    RTGCPHYS32 pDesc;
    39123912    uint32_t cbTotalTransfer, cbElementaryTransfer;
    39133913    uint32_t iIOBufferCur, iIOBufferEnd;
     
    39393939    {
    39403940        BMDMADesc DMADesc;
    3941         uint32_t pBuffer;
     3941        RTGCPHYS32 pBuffer;
    39423942        uint32_t cbBuffer;
    39433943
     
    39673967                dmalen = RT_MIN(cbBuffer, iIOBufferEnd - iIOBufferCur);
    39683968                Log2(("%s: DMA desc %#010x: addr=%#010x size=%#010x\n", __FUNCTION__,
    3969                        pDesc, pBuffer, cbBuffer));
     3969                       (int)pDesc, pBuffer, cbBuffer));
    39703970                if (uTxDir == PDMBLOCKTXDIR_FROM_DEVICE)
    39713971                    PDMDevHlpPhysWrite(pDevIns, pBuffer, s->CTXSUFF(pbIOBuffer) + iIOBufferCur, dmalen);
     
    56235623        SSMR3PutBool(pSSMHandle, pData->aCts[i].fRedoDMALastDesc);
    56245624        SSMR3PutMem(pSSMHandle, &pData->aCts[i].BmDma, sizeof(pData->aCts[i].BmDma));
    5625         SSMR3PutU32(pSSMHandle, pData->aCts[i].pFirstDMADesc);
    5626         SSMR3PutU32(pSSMHandle, pData->aCts[i].pLastDMADesc);
    5627         SSMR3PutU32(pSSMHandle, pData->aCts[i].pRedoDMABuffer);
     5625        SSMR3PutGCPhys32(pSSMHandle, pData->aCts[i].pFirstDMADesc);
     5626        SSMR3PutGCPhys32(pSSMHandle, pData->aCts[i].pLastDMADesc);
     5627        SSMR3PutGCPhys32(pSSMHandle, pData->aCts[i].pRedoDMABuffer);
    56285628        SSMR3PutU32(pSSMHandle, pData->aCts[i].cbRedoDMABuffer);
    56295629
     
    57285728        SSMR3GetBool(pSSMHandle, (bool *)&pData->aCts[i].fRedoDMALastDesc);
    57295729        SSMR3GetMem(pSSMHandle, &pData->aCts[i].BmDma, sizeof(pData->aCts[i].BmDma));
    5730         SSMR3GetU32(pSSMHandle, &pData->aCts[i].pFirstDMADesc);
    5731         SSMR3GetU32(pSSMHandle, &pData->aCts[i].pLastDMADesc);
    5732         SSMR3GetU32(pSSMHandle, &pData->aCts[i].pRedoDMABuffer);
     5730        SSMR3GetGCPhys32(pSSMHandle, &pData->aCts[i].pFirstDMADesc);
     5731        SSMR3GetGCPhys32(pSSMHandle, &pData->aCts[i].pLastDMADesc);
     5732        SSMR3GetGCPhys32(pSSMHandle, &pData->aCts[i].pRedoDMABuffer);
    57335733        SSMR3GetU32(pSSMHandle, &pData->aCts[i].cbRedoDMABuffer);
    57345734
  • trunk/src/VBox/Devices/Storage/PIIX3ATABmDma.h

    r7060 r7072  
    5252/** PIIX3 Bus Master DMA unit state. */
    5353typedef struct BMDMAState {
    54     /** Address of the MMIO region in the guest's memory space. */
    55     uint32_t pvAddr;
    5654    /** Command register. */
    5755    uint8_t u8Cmd;
    5856    /** Status register. */
    5957    uint8_t u8Status;
     58    /** Address of the MMIO region in the guest's memory space. */
     59    RTGCPHYS32 pvAddr;
    6060} BMDMAState;
    6161
     
    6464typedef struct BMDMADesc {
    6565    /** Address of the DMA source/target buffer. */
    66     uint32_t pBuffer;
     66    RTGCPHYS32 pBuffer;
    6767    /** Size of the DMA source/target buffer. */
    6868    uint32_t cbBuffer;
  • trunk/src/VBox/Devices/VMMDev/VMMDevState.h

    r5999 r7072  
    8585    VMMDevMemory *pVMMDevRAMHC;
    8686    /** GC physical address of VMMDev RAM area */
    87     RTGCPHYS GCPhysVMMDevRAM;
     87    RTGCPHYS32 GCPhysVMMDevRAM;
    8888
    8989    /** Information reported by guest via VMMDevReportGuestInfo generic request.
  • trunk/src/VBox/Devices/vl_vbox.h

    r5999 r7072  
    7070 * Misc types.
    7171 */
    72 typedef RTGCPHYS                target_phys_addr_t;
     72typedef RTGCPHYS32              target_phys_addr_t;
    7373typedef PCIDEVICE               PCIDevice;
    7474typedef RTGCUINTREG             target_ulong;
  • trunk/src/VBox/VMM/PGM.cpp

    r6927 r7072  
    566566
    567567/** Saved state data unit version. */
    568 #define PGM_SAVED_STATE_VERSION     5
     568#define PGM_SAVED_STATE_VERSION     6
    569569
    570570/*******************************************************************************
  • trunk/src/VBox/VMM/SSM.cpp

    r5999 r7072  
    22362236
    22372237/**
     2238 * Saves a 32 bits GC physical address item to the current data unit.
     2239 *
     2240 * @returns VBox status.
     2241 * @param   pSSM            SSM operation handle.
     2242 * @param   GCPhys          The item to save
     2243 */
     2244SSMR3DECL(int) SSMR3PutGCPhys32(PSSMHANDLE pSSM, RTGCPHYS32 GCPhys)
     2245{
     2246    if (pSSM->enmOp == SSMSTATE_SAVE_EXEC)
     2247        return ssmr3Write(pSSM, &GCPhys, sizeof(GCPhys));
     2248    AssertMsgFailed(("Invalid state %d\n", pSSM->enmOp));
     2249    return VERR_SSM_INVALID_STATE;
     2250}
     2251
     2252/**
    22382253 * Saves a GC physical address item to the current data unit.
    22392254 *
     
    27572772    if (pSSM->enmOp == SSMSTATE_LOAD_EXEC || pSSM->enmOp == SSMSTATE_OPEN_READ)
    27582773        return ssmr3Read(pSSM, pi, sizeof(*pi));
     2774    AssertMsgFailed(("Invalid state %d\n", pSSM->enmOp));
     2775    return VERR_SSM_INVALID_STATE;
     2776}
     2777
     2778/**
     2779 * Loads a 32 bits GC physical address item from the current data unit.
     2780 *
     2781 * @returns VBox status.
     2782 * @param   pSSM            SSM operation handle.
     2783 * @param   pGCPhys         Where to store the GC physical address.
     2784 */
     2785SSMR3DECL(int) SSMR3GetGCPhys32(PSSMHANDLE pSSM, PRTGCPHYS32 pGCPhys)
     2786{
     2787    if (pSSM->enmOp == SSMSTATE_LOAD_EXEC || pSSM->enmOp == SSMSTATE_OPEN_READ)
     2788        return ssmr3Read(pSSM, pGCPhys, sizeof(*pGCPhys));
    27592789    AssertMsgFailed(("Invalid state %d\n", pSSM->enmOp));
    27602790    return VERR_SSM_INVALID_STATE;
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