Index: /trunk/include/VBox/VBoxGuest.h
===================================================================
--- /trunk/include/VBox/VBoxGuest.h	(revision 7071)
+++ /trunk/include/VBox/VBoxGuest.h	(revision 7072)
@@ -40,7 +40,7 @@
 
 /** Hypervisor linear pointer size type */
-typedef uint32_t vmmDevHypPtr;
+typedef RTGCPTR vmmDevHypPtr;
 /** Hypervisor physical pointer size type */
-typedef uint32_t vmmDevHypPhys;
+typedef RTGCPHYS32 vmmDevHypPhys;
 
 #if defined(RT_OS_LINUX)
Index: /trunk/include/VBox/pci.h
===================================================================
--- /trunk/include/VBox/pci.h	(revision 7071)
+++ /trunk/include/VBox/pci.h	(revision 7072)
@@ -53,4 +53,8 @@
  * PCI Address space specification.
  * This is used when registering a I/O region.
+ */
+/** Note: There are all sorts of dirty dependencies on the values in the
+ *  pci device. Be careful when changing this.
+ *  @todo we should introduce 32 & 64 bits physical address types
  */
 typedef enum PCIADDRESSSPACE
Index: /trunk/include/VBox/ssm.h
===================================================================
--- /trunk/include/VBox/ssm.h	(revision 7071)
+++ /trunk/include/VBox/ssm.h	(revision 7072)
@@ -769,4 +769,13 @@
 
 /**
+ * Saves a 32 bits GC physical address item to the current data unit.
+ *
+ * @returns VBox status.
+ * @param   pSSM            SSM operation handle.
+ * @param   GCPhys          The item to save
+ */
+SSMR3DECL(int) SSMR3PutGCPhys32(PSSMHANDLE pSSM, RTGCPHYS32 GCPhys);
+
+/**
  * Saves a GC physical address item to the current data unit.
  *
@@ -1011,4 +1020,13 @@
  * @param   pGCPhys         Where to store the GC physical address.
  */
+SSMR3DECL(int) SSMR3GetGCPhys32(PSSMHANDLE pSSM, PRTGCPHYS32 pGCPhys);
+
+/**
+ * Loads a GC physical address item from the current data unit.
+ *
+ * @returns VBox status.
+ * @param   pSSM            SSM operation handle.
+ * @param   pGCPhys         Where to store the GC physical address.
+ */
 SSMR3DECL(int) SSMR3GetGCPhys(PSSMHANDLE pSSM, PRTGCPHYS pGCPhys);
 
Index: /trunk/include/VBox/types.h
===================================================================
--- /trunk/include/VBox/types.h	(revision 7071)
+++ /trunk/include/VBox/types.h	(revision 7072)
@@ -63,13 +63,4 @@
  * @{
  */
-
-/** @deprecated
- * @{ */
-typedef RTGCPHYS    VBOXGCPHYS;
-typedef VBOXGCPHYS *PVBOXGCPHYS;
-#define NILVBOXGCPHYS NIL_RTGCPHYS
-typedef RTGCPTR     VBOXGCPTR;
-typedef VBOXGCPTR  *PVBOXGCPTR;
-/** @} */
 
 /** @} */
Index: /trunk/src/VBox/Additions/WINNT/VBoxService/VBoxClipboard.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/VBoxService/VBoxClipboard.cpp	(revision 7071)
+++ /trunk/src/VBox/Additions/WINNT/VBoxService/VBoxClipboard.cpp	(revision 7072)
@@ -149,5 +149,5 @@
     pParm->type                    = VMMDevHGCMParmType_LinAddr;
     pParm->u.Pointer.size          = cb;
-    pParm->u.Pointer.u.linearAddr  = (VBOXGCPTR)pv;
+    pParm->u.Pointer.u.linearAddr  = (RTGCPTR)pv;
 }
 
Index: /trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxCalls.c
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxCalls.c	(revision 7071)
+++ /trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxCalls.c	(revision 7072)
@@ -125,5 +125,5 @@
     data.mappings.type                   = VMMDevHGCMParmType_LinAddr;
     data.mappings.u.Pointer.size         = sizeof (SHFLMAPPING) * *pcMappings;
-    data.mappings.u.Pointer.u.linearAddr = (VBOXGCPTR)&paMappings[0];
+    data.mappings.u.Pointer.u.linearAddr = (RTGCPTR)&paMappings[0];
 
 /*    Log(("VBOXSF: in ifs difference %d\n",
@@ -162,5 +162,5 @@
     data.name.type                   = VMMDevHGCMParmType_LinAddr;
     data.name.u.Pointer.size         = size;
-    data.name.u.Pointer.u.linearAddr = (VBOXGCPTR)pString;
+    data.name.u.Pointer.u.linearAddr = (RTGCPTR)pString;
 
     rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data));
@@ -188,5 +188,5 @@
     data.path.type                    = VMMDevHGCMParmType_LinAddr;
     data.path.u.Pointer.size          = ShflStringSizeOfBuffer (szFolderName);
-    data.path.u.Pointer.u.linearAddr  = (VBOXGCPTR)szFolderName;
+    data.path.u.Pointer.u.linearAddr  = (RTGCPTR)szFolderName;
 
     data.root.type                    = VMMDevHGCMParmType_32bit;
@@ -223,5 +223,5 @@
         data.path.type                    = VMMDevHGCMParmType_LinAddr;
         data.path.u.Pointer.size          = ShflStringSizeOfBuffer (szFolderName);
-        data.path.u.Pointer.u.linearAddr  = (VBOXGCPTR)szFolderName;
+        data.path.u.Pointer.u.linearAddr  = (RTGCPTR)szFolderName;
 
         data.root.type                    = VMMDevHGCMParmType_32bit;
@@ -280,9 +280,9 @@
     data.path.type                    = VMMDevHGCMParmType_LinAddr;
     data.path.u.Pointer.size          = ShflStringSizeOfBuffer (pParsedPath);
-    data.path.u.Pointer.u.linearAddr  = (VBOXGCPTR)pParsedPath;
+    data.path.u.Pointer.u.linearAddr  = (RTGCPTR)pParsedPath;
 
     data.parms.type                   = VMMDevHGCMParmType_LinAddr;
     data.parms.u.Pointer.size         = sizeof (SHFLCREATEPARMS);
-    data.parms.u.Pointer.u.linearAddr = (VBOXGCPTR)pCreateParms;
+    data.parms.u.Pointer.u.linearAddr = (RTGCPTR)pCreateParms;
 
     rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data));
@@ -339,5 +339,5 @@
     data.path.type                      = VMMDevHGCMParmType_LinAddr_In;
     data.path.u.Pointer.size            = ShflStringSizeOfBuffer (pParsedPath);
-    data.path.u.Pointer.u.linearAddr    = (VBOXGCPTR)pParsedPath;
+    data.path.u.Pointer.u.linearAddr    = (RTGCPTR)pParsedPath;
 
     data.flags.type                     = VMMDevHGCMParmType_32bit;
@@ -371,9 +371,9 @@
     data.src.type                       = VMMDevHGCMParmType_LinAddr_In;
     data.src.u.Pointer.size             = ShflStringSizeOfBuffer (pSrcPath);
-    data.src.u.Pointer.u.linearAddr     = (VBOXGCPTR)pSrcPath;
+    data.src.u.Pointer.u.linearAddr     = (RTGCPTR)pSrcPath;
 
     data.dest.type                      = VMMDevHGCMParmType_LinAddr_In;
     data.dest.u.Pointer.size            = ShflStringSizeOfBuffer (pDestPath);
-    data.dest.u.Pointer.u.linearAddr    = (VBOXGCPTR)pDestPath;
+    data.dest.u.Pointer.u.linearAddr    = (RTGCPTR)pDestPath;
 
     data.flags.type                     = VMMDevHGCMParmType_32bit;
@@ -412,5 +412,5 @@
     data.buffer.type                    = (fLocked) ? VMMDevHGCMParmType_LinAddr_Locked_Out : VMMDevHGCMParmType_LinAddr_Out;
     data.buffer.u.Pointer.size          = *pcbBuffer;
-    data.buffer.u.Pointer.u.linearAddr  = (VBOXGCPTR)pBuffer;
+    data.buffer.u.Pointer.u.linearAddr  = (RTGCPTR)pBuffer;
 
     rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data));
@@ -447,5 +447,5 @@
     data.buffer.type                    = (fLocked) ? VMMDevHGCMParmType_LinAddr_Locked_In : VMMDevHGCMParmType_LinAddr_In;
     data.buffer.u.Pointer.size          = *pcbBuffer;
-    data.buffer.u.Pointer.u.linearAddr  = (VBOXGCPTR)pBuffer;
+    data.buffer.u.Pointer.u.linearAddr  = (RTGCPTR)pBuffer;
 
     rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data));
@@ -517,9 +517,9 @@
     data.path.u.Pointer.size            =
         (ParsedPath) ? ShflStringSizeOfBuffer(ParsedPath) : 0;
-    data.path.u.Pointer.u.linearAddr    = (VBOXGCPTR) ParsedPath;
+    data.path.u.Pointer.u.linearAddr    = (RTGCPTR) ParsedPath;
 
     data.buffer.type                    = VMMDevHGCMParmType_LinAddr_Out;
     data.buffer.u.Pointer.size          = *pcbBuffer;
-    data.buffer.u.Pointer.u.linearAddr  = (VBOXGCPTR)pBuffer;
+    data.buffer.u.Pointer.u.linearAddr  = (RTGCPTR)pBuffer;
 
     data.resumePoint.type               = VMMDevHGCMParmType_32bit;
@@ -562,5 +562,5 @@
     data.info.type                      = VMMDevHGCMParmType_LinAddr;
     data.info.u.Pointer.size            = *pcbBuffer;
-    data.info.u.Pointer.u.linearAddr    = (VBOXGCPTR)pBuffer;
+    data.info.u.Pointer.u.linearAddr    = (RTGCPTR)pBuffer;
 
     rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data));
Index: /trunk/src/VBox/Devices/Bus/DevPCI.cpp
===================================================================
--- /trunk/src/VBox/Devices/Bus/DevPCI.cpp	(revision 7071)
+++ /trunk/src/VBox/Devices/Bus/DevPCI.cpp	(revision 7072)
@@ -109,11 +109,9 @@
     uint32_t            pci_irq_levels[4][PCI_IRQ_WORDS];
     /** The base address for PCI assigned MMIO addresses. */
-    RTGCPHYS            pci_mem_base;
+    RTGCPHYS32          pci_mem_base;
     /** The next I/O port address which the PCI BIOS will use. */
     uint32_t            pci_bios_io_addr;
     /** The next MMIO address which the PCI BIOS will use. */
     uint32_t            pci_bios_mem_addr;
-    uint32_t            u32Padding; /**< Alignment padding. */
-
     /** I/O APIC usage flag */
     bool                fUseIoApic;
@@ -288,5 +286,5 @@
 #else /* less strict check */
                         AssertMsg(VBOX_SUCCESS(rc) || rc == VERR_IOM_MMIO_RANGE_NOT_FOUND, ("rc=%Vrc d=%s\n", rc, d->name)); NOREF(rc);
-#endif
+#endif 
                     }
                 }
@@ -774,5 +772,5 @@
     {
     case 0x0101:
-        if (vendor_id == 0x8086 &&
+        if (vendor_id == 0x8086 && 
             (device_id == 0x7010 || device_id == 0x7111)) {
             /* PIIX3 or PIIX4 IDE */
@@ -1085,5 +1083,5 @@
             if (pData->devices[i])
             {
-                LogRel(("New device in slot %#x, %s (vendor=%#06x device=%#06x)\n", i, pData->devices[i]->name,
+                LogRel(("New device in slot %#x, %s (vendor=%#06x device=%#06x)\n", i, pData->devices[i]->name, 
                         PCIDevGetVendorId(pData->devices[i]), PCIDevGetDeviceId(pData->devices[i])));
                 if (SSMR3HandleGetAfter(pSSMHandle) != SSMAFTER_DEBUG_IT)
@@ -1102,5 +1100,5 @@
         if (!pDev)
         {
-            LogRel(("Device in slot %#x has been removed! vendor=%#06x device=%#06x\n", i,
+            LogRel(("Device in slot %#x has been removed! vendor=%#06x device=%#06x\n", i, 
                     PCIDevGetVendorId(&DevTmp), PCIDevGetDeviceId(&DevTmp)));
             if (SSMR3HandleGetAfter(pSSMHandle) != SSMAFTER_DEBUG_IT)
@@ -1120,5 +1118,5 @@
         /* commit the loaded device config. */
         memcpy(pDev->config, DevTmp.config, sizeof(pDev->config));
-        if (DevTmp.Int.s.iIrq >= PCI_DEVICES_MAX)
+        if (DevTmp.Int.s.iIrq >= PCI_DEVICES_MAX) 
         {
             LogRel(("Device %s: Too many devices %d (max=%d)\n", pDev->name, DevTmp.Int.s.iIrq, PCI_DEVICES_MAX));
@@ -1328,8 +1326,8 @@
 
 
-/**
+/** 
  * @copydoc PDMPCIBUSREG::pfnSetConfigCallbacksHC
  */
-static DECLCALLBACK(void) pciSetConfigCallbacks(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PFNPCICONFIGREAD pfnRead, PPFNPCICONFIGREAD ppfnReadOld,
+static DECLCALLBACK(void) pciSetConfigCallbacks(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PFNPCICONFIGREAD pfnRead, PPFNPCICONFIGREAD ppfnReadOld, 
                                                 PFNPCICONFIGWRITE pfnWrite, PPFNPCICONFIGWRITE ppfnWriteOld)
 {
Index: /trunk/src/VBox/Devices/Graphics/DevVGA.h
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA.h	(revision 7071)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA.h	(revision 7072)
@@ -242,20 +242,21 @@
     VGA_STATE_COMMON
 #ifdef VBOX
-    /** end-of-common-state-marker + alignment. */
+    /** end-of-common-state-marker */
     uint32_t                    u32Marker;
     /** The physical address the VRAM was assigned. */
-    RTGCPHYS                    GCPhysVRAM;
+    RTGCPHYS32                  GCPhysVRAM;
     /** Pointer to GC vram mapping. */
     GCPTRTYPE(uint8_t *)        vram_ptrGC;
+/** @todo r=bird: bool not RTUINT (my fault I guess). */
     /** LFB was updated flag. */
-    bool                        fLFBUpdated;
+    RTUINT                      fLFBUpdated;
     /** Indicates if the GC extensions are enabled or not. */
-    bool                        fGCEnabled;
+    RTUINT                      fGCEnabled;
     /** Indicates if the R0 extensions are enabled or not. */
-    bool                        fR0Enabled;
+    RTUINT                      fR0Enabled;
+    /** Pointer to vgaGCLFBAccessHandler(). */
+    RTGCPTR                     GCPtrLFBHandler;
     /** Flag indicating that there are dirty bits. This is used to optimize the handler resetting. */
     bool                        fHaveDirtyBits;
-    /** Pointer to vgaGCLFBAccessHandler(). */
-    RTGCPTR                     GCPtrLFBHandler;
     /** Bitmap tracking dirty pages. */
     uint32_t                    au32DirtyBitmap[VGA_VRAM_MAX / PAGE_SIZE / 32];
@@ -281,4 +282,7 @@
     uint32_t                    fRenderVRAM;
 
+#if HC_ARCH_BITS == 32
+    uint32_t                    Padding10;
+#endif
     /** The PCI device. */
     PCIDEVICE                   Dev;
Index: /trunk/src/VBox/Devices/Network/DevPCNet.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DevPCNet.cpp	(revision 7071)
+++ /trunk/src/VBox/Devices/Network/DevPCNet.cpp	(revision 7072)
@@ -142,7 +142,7 @@
     uint32_t                            u32Lnkst;
     /** Address of the RX descriptor table (ring). Loaded at init. */
-    RTGCPHYS                            GCRDRA;
+    RTGCPHYS32                          GCRDRA;
     /** Address of the TX descriptor table (ring). Loaded at init. */
-    RTGCPHYS                            GCTDRA;
+    RTGCPHYS32                          GCTDRA;
     uint8_t                             aPROM[16];
     uint16_t                            aCSR[CSR_MAX_REG];
@@ -167,19 +167,17 @@
     int                                 iLog2DescSize;
     /** Bits 16..23 in 16-bit mode */
-    RTGCPHYS                            GCUpperPhys;
+    RTGCPHYS32                          GCUpperPhys;
 
     /** Transmit signaller */
+    GCPTRTYPE(PPDMQUEUE)                pXmitQueueGC;
     R3R0PTRTYPE(PPDMQUEUE)              pXmitQueueHC;
-    GCPTRTYPE(PPDMQUEUE)                pXmitQueueGC;
 
     /** Receive signaller */
+    R3R0PTRTYPE(PPDMQUEUE)              pCanRxQueueHC;
     GCPTRTYPE(PPDMQUEUE)                pCanRxQueueGC;
-    R3R0PTRTYPE(PPDMQUEUE)              pCanRxQueueHC;
+    /** Pointer to the device instance. */
+    GCPTRTYPE(PPDMDEVINS)               pDevInsGC;
     /** Pointer to the device instance. */
     R3R0PTRTYPE(PPDMDEVINS)             pDevInsHC;
-    /** Pointer to the device instance. */
-    GCPTRTYPE(PPDMDEVINS)               pDevInsGC;
-    /** Alignment padding. */
-    RTGCPTR                             GCPtrAlignment0;
     /** Restore timer.
      *  This is used to disconnect and reconnect the link after a restore. */
@@ -196,5 +194,5 @@
     PDMINETWORKCONFIG                   INetworkConfig;
     /** Base address of the MMIO region. */
-    RTGCPHYS                            MMIOBase;
+    RTGCPHYS32                          MMIOBase;
     /** Base port of the I/O space region. */
     RTIOPORT                            IOPortBase;
@@ -214,7 +212,4 @@
     PDMMAC                              MacConfigured;
 
-#if HC_ARCH_BITS == 64
-    uint32_t                            u32Alignment0; /** Alignment padding. */
-#endif
     /** The LED. */
     PDMLED                              Led;
@@ -233,8 +228,8 @@
 
 #ifdef PCNET_NO_POLLING
-    RTGCPHYS                            TDRAPhysOld;
+    RTGCPHYS32                          TDRAPhysOld;
     uint32_t                            cbTDRAOld;
 
-    RTGCPHYS                            RDRAPhysOld;
+    RTGCPHYS32                          RDRAPhysOld;
     uint32_t                            cbRDRAOld;
 
@@ -582,5 +577,5 @@
  * Make sure we read the own flag first.
  */
-DECLINLINE(void) pcnetTmdLoad(PCNetState *pData, TMD *tmd, RTGCPHYS addr)
+DECLINLINE(void) pcnetTmdLoad(PCNetState *pData, TMD *tmd, RTGCPHYS32 addr)
 {
     PPDMDEVINS pDevIns = PCNETSTATE_2_DEVINS(pData);
@@ -626,5 +621,5 @@
  * Make sure that all data are transmitted before we clear the own flag.
  */
-DECLINLINE(void) pcnetTmdStorePassHost(PCNetState *pData, TMD *tmd, RTGCPHYS addr)
+DECLINLINE(void) pcnetTmdStorePassHost(PCNetState *pData, TMD *tmd, RTGCPHYS32 addr)
 {
     STAM_PROFILE_ADV_START(&pData->CTXSUFF(StatTmdStore), a);
@@ -668,5 +663,5 @@
  * Make sure we read the own flag first.
  */
-DECLINLINE(void) pcnetRmdLoad(PCNetState *pData, RMD *rmd, RTGCPHYS addr)
+DECLINLINE(void) pcnetRmdLoad(PCNetState *pData, RMD *rmd, RTGCPHYS32 addr)
 {
     PPDMDEVINS pDevIns = PCNETSTATE_2_DEVINS(pData);
@@ -711,5 +706,5 @@
  * Make sure that all data are transmitted before we clear the own flag.
  */
-DECLINLINE(void) pcnetRmdStorePassHost(PCNetState *pData, RMD *rmd, RTGCPHYS addr)
+DECLINLINE(void) pcnetRmdStorePassHost(PCNetState *pData, RMD *rmd, RTGCPHYS32 addr)
 {
     PPDMDEVINS pDevIns = PCNETSTATE_2_DEVINS(pData);
@@ -971,5 +966,5 @@
  * Get the receive descriptor ring address with a given index.
  */
-DECLINLINE(RTGCPHYS) pcnetRdraAddr(PCNetState *pData, int idx)
+DECLINLINE(RTGCPHYS32) pcnetRdraAddr(PCNetState *pData, int idx)
 {
     return pData->GCRDRA + ((CSR_RCVRL(pData) - idx) << pData->iLog2DescSize);
@@ -979,5 +974,5 @@
  * Get the transmit descriptor ring address with a given index.
  */
-DECLINLINE(RTGCPHYS) pcnetTdraAddr(PCNetState *pData, int idx)
+DECLINLINE(RTGCPHYS32) pcnetTdraAddr(PCNetState *pData, int idx)
 {
     return pData->GCTDRA + ((CSR_XMTRL(pData) - idx) << pData->iLog2DescSize);
@@ -1303,8 +1298,8 @@
      * 3) TDRA & RDRA overlap partly with different physical pages
      */
-    RTGCPHYS RDRAPageStart = pData->GCRDRA & ~PAGE_OFFSET_MASK;
-    RTGCPHYS RDRAPageEnd   = (pcnetRdraAddr(pData, 0) - 1) & ~PAGE_OFFSET_MASK;
-    RTGCPHYS TDRAPageStart = pData->GCTDRA & ~PAGE_OFFSET_MASK;
-    RTGCPHYS TDRAPageEnd   = (pcnetTdraAddr(pData, 0) - 1) & ~PAGE_OFFSET_MASK;
+    RTGCPHYS32 RDRAPageStart = pData->GCRDRA & ~PAGE_OFFSET_MASK;
+    RTGCPHYS32 RDRAPageEnd   = (pcnetRdraAddr(pData, 0) - 1) & ~PAGE_OFFSET_MASK;
+    RTGCPHYS32 TDRAPageStart = pData->GCTDRA & ~PAGE_OFFSET_MASK;
+    RTGCPHYS32 TDRAPageEnd   = (pcnetTdraAddr(pData, 0) - 1) & ~PAGE_OFFSET_MASK;
 
     if (    RDRAPageStart > TDRAPageEnd
@@ -1474,7 +1469,7 @@
          * The current receive message descriptor.
          */
-        RMD      rmd;
-        int      i = CSR_RCVRC(pData);
-        RTGCPHYS addr;
+        RMD        rmd;
+        int        i = CSR_RCVRC(pData);
+        RTGCPHYS32 addr;
 
         if (i < 1)
@@ -1568,5 +1563,5 @@
     if (RT_LIKELY(pData->GCTDRA))
     {
-        RTGCPHYS cxda = pcnetTdraAddr(pData, CSR_XMTRC(pData));
+        RTGCPHYS32 cxda = pcnetTdraAddr(pData, CSR_XMTRC(pData));
 
         pcnetTmdLoad(pData, tmd, PHYSADDR(pData, cxda));
@@ -1670,5 +1665,5 @@
             /* Dump the status of all RX descriptors */
             const unsigned  cb = 1 << pData->iLog2DescSize;
-            RTGCPHYS        GCPhys = pData->GCRDRA;
+            RTGCPHYS32      GCPhys = pData->GCRDRA;
             i = CSR_RCVRL(pData);
             while (i-- > 0)
@@ -1684,7 +1679,7 @@
         else
         {
-            uint8_t *src = &pData->abRecvBuf[8];
-            RTGCPHYS crda = CSR_CRDA(pData);
-            RTGCPHYS next_crda;
+            uint8_t   *src = &pData->abRecvBuf[8];
+            RTGCPHYS32 crda = CSR_CRDA(pData);
+            RTGCPHYS32 next_crda;
             RMD      rmd, next_rmd;
             int      pktcount = 0;
@@ -1715,5 +1710,5 @@
 
             int count = RT_MIN(4096 - (int)rmd.rmd1.bcnt, size);
-            RTGCPHYS rbadr = PHYSADDR(pData, rmd.rmd0.rbadr);
+            RTGCPHYS32 rbadr = PHYSADDR(pData, rmd.rmd0.rbadr);
             PDMDevHlpPhysWrite(pDevIns, rbadr, src, count);
             src  += count;
@@ -1860,5 +1855,5 @@
  * Reads the first part of a frame
  */
-DECLINLINE(void) pcnetXmitRead1st(PCNetState *pData, RTGCPHYS GCPhysFrame, const unsigned cbFrame)
+DECLINLINE(void) pcnetXmitRead1st(PCNetState *pData, RTGCPHYS32 GCPhysFrame, const unsigned cbFrame)
 {
     Assert(cbFrame < sizeof(pData->abSendBuf));
@@ -1875,5 +1870,5 @@
  * Reads more into the current frame.
  */
-DECLINLINE(void) pcnetXmitReadMore(PCNetState *pData, RTGCPHYS GCPhysFrame, const unsigned cbFrame)
+DECLINLINE(void) pcnetXmitReadMore(PCNetState *pData, RTGCPHYS32 GCPhysFrame, const unsigned cbFrame)
 {
     Assert(pData->SendFrame.cb + cbFrame < sizeof(pData->abSendBuf));
@@ -2786,10 +2781,10 @@
         case 2:
             /* PHY identifier 1. */
-            val = 0x22;     /* Am79C874 PHY */
+            val = 0x22;     /* Am79C874 PHY */ 
             break;
 
         case 3:
             /* PHY identifier 2. */
-            val = 0x561b;   /* Am79C874 PHY */
+            val = 0x561b;   /* Am79C874 PHY */  
             break;
 
@@ -2799,5 +2794,5 @@
 #if 0
                 // Advertising flow control is a) not the default, and b) confuses
-                // the link speed detection routine in Windows PCnet driver
+                // the link speed detection routine in Windows PCnet driver 
                   | 0x0400  /* Try flow control. */
 #endif
@@ -3782,5 +3777,5 @@
     {
         const unsigned  cb = 1 << pData->iLog2DescSize;
-        RTGCPHYS        GCPhys = pData->GCRDRA;
+        RTGCPHYS32      GCPhys = pData->GCRDRA;
         unsigned        i = CSR_RCVRL(pData);
         while (i-- > 0)
@@ -3822,5 +3817,5 @@
     {
         const unsigned  cb = 1 << pData->iLog2DescSize;
-        RTGCPHYS        GCPhys = pData->GCTDRA;
+        RTGCPHYS32      GCPhys = pData->GCTDRA;
         unsigned        i = CSR_XMTRL(pData);
         while (i-- > 0)
@@ -3903,6 +3898,6 @@
     SSMR3PutS32(pSSMHandle, pData->iISR);
     SSMR3PutU32(pSSMHandle, pData->u32Lnkst);
-    SSMR3PutGCPhys(pSSMHandle, pData->GCRDRA);
-    SSMR3PutGCPhys(pSSMHandle, pData->GCTDRA);
+    SSMR3PutGCPhys32(pSSMHandle, pData->GCRDRA);
+    SSMR3PutGCPhys32(pSSMHandle, pData->GCTDRA);
     SSMR3PutMem(pSSMHandle, pData->aPROM, sizeof(pData->aPROM));
     SSMR3PutMem(pSSMHandle, pData->aCSR, sizeof(pData->aCSR));
@@ -3965,6 +3960,6 @@
     SSMR3GetS32(pSSMHandle, &pData->iISR);
     SSMR3GetU32(pSSMHandle, &pData->u32Lnkst);
-    SSMR3GetGCPhys(pSSMHandle, &pData->GCRDRA);
-    SSMR3GetGCPhys(pSSMHandle, &pData->GCTDRA);
+    SSMR3GetGCPhys32(pSSMHandle, &pData->GCRDRA);
+    SSMR3GetGCPhys32(pSSMHandle, &pData->GCTDRA);
     SSMR3GetMem(pSSMHandle, &pData->aPROM, sizeof(pData->aPROM));
     SSMR3GetMem(pSSMHandle, &pData->aCSR, sizeof(pData->aCSR));
Index: /trunk/src/VBox/Devices/PC/DevACPI.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevACPI.cpp	(revision 7071)
+++ /trunk/src/VBox/Devices/PC/DevACPI.cpp	(revision 7072)
@@ -470,5 +470,5 @@
 }
 
-static void acpiPhyscpy (ACPIState *s, RTGCPHYS dst, const void * const src, size_t size)
+static void acpiPhyscpy (ACPIState *s, RTGCPHYS32 dst, const void * const src, size_t size)
 {
     PDMDevHlpPhysWrite (s->pDevIns, dst, src, size);
@@ -476,5 +476,5 @@
 
 /* Differentiated System Description Table (DSDT) */
-static void acpiSetupDSDT (ACPIState *s, RTGCPHYS addr)
+static void acpiSetupDSDT (ACPIState *s, RTGCPHYS32 addr)
 {
     acpiPhyscpy (s, addr, AmlCode, sizeof(AmlCode));
@@ -482,5 +482,5 @@
 
 /* Firmware ACPI Control Structure (FACS) */
-static void acpiSetupFACS (ACPIState *s, RTGCPHYS addr)
+static void acpiSetupFACS (ACPIState *s, RTGCPHYS32 addr)
 {
     ACPITBLFACS facs;
@@ -500,5 +500,5 @@
 
 /* Fixed ACPI Description Table (FADT aka FACP) */
-static void acpiSetupFADT (ACPIState *s, RTGCPHYS addr, uint32_t facs_addr, uint32_t dsdt_addr)
+static void acpiSetupFADT (ACPIState *s, RTGCPHYS32 addr, uint32_t facs_addr, uint32_t dsdt_addr)
 {
     ACPITBLFADT fadt;
@@ -567,5 +567,5 @@
  * addresses for description headers. RSDT is for ACPI 1.0. XSDT for ACPI 2.0 and up.
  */
-static int acpiSetupRSDT (ACPIState *s, RTGCPHYS addr, unsigned int nb_entries, uint32_t *addrs)
+static int acpiSetupRSDT (ACPIState *s, RTGCPHYS32 addr, unsigned int nb_entries, uint32_t *addrs)
 {
     ACPITBLRSDT *rsdt;
@@ -589,5 +589,5 @@
 
 /* Extended System Description Table. */
-static int acpiSetupXSDT (ACPIState *s, RTGCPHYS addr, unsigned int nb_entries, uint32_t *addrs)
+static int acpiSetupXSDT (ACPIState *s, RTGCPHYS32 addr, unsigned int nb_entries, uint32_t *addrs)
 {
     ACPITBLXSDT *xsdt;
@@ -631,5 +631,5 @@
 /** @todo All hardcoded, should set this up based on the actual VM config!!!!! */
 /** @note APIC without IO-APIC hangs Windows Vista therefore we setup both */
-static void acpiSetupMADT (ACPIState *s, RTGCPHYS addr)
+static void acpiSetupMADT (ACPIState *s, RTGCPHYS32 addr)
 {
     ACPITBLMADT madt;
@@ -1456,11 +1456,11 @@
 static int acpiPlantTables (ACPIState *s)
 {
-    int      rc;
-    uint32_t rsdt_addr, xsdt_addr, fadt_addr, facs_addr, dsdt_addr, last_addr, apic_addr = 0;
-    uint32_t addend = 0;
-    uint32_t rsdt_addrs[4];
-    uint32_t cAddr;
-    size_t   rsdt_tbl_len = sizeof(ACPITBLHEADER);
-    size_t   xsdt_tbl_len = sizeof(ACPITBLHEADER);
+    int        rc;
+    RTGCPHYS32 rsdt_addr, xsdt_addr, fadt_addr, facs_addr, dsdt_addr, last_addr, apic_addr = 0;
+    uint32_t   addend = 0;
+    RTGCPHYS32 rsdt_addrs[4];
+    uint32_t   cAddr;
+    size_t     rsdt_tbl_len = sizeof(ACPITBLHEADER);
+    size_t     xsdt_tbl_len = sizeof(ACPITBLHEADER);
 
     cAddr = 1;           /* FADT */
Index: /trunk/src/VBox/Devices/PC/DevPcBios.cpp
===================================================================
--- /trunk/src/VBox/Devices/PC/DevPcBios.cpp	(revision 7071)
+++ /trunk/src/VBox/Devices/PC/DevPcBios.cpp	(revision 7072)
@@ -1121,5 +1121,5 @@
     /* the low ROM mapping. */
     unsigned cb = RT_MIN(cbPcBiosBinary, 128 * _1K);
-    RTGCPHYS GCPhys = 0x00100000 - cb;
+    RTGCPHYS32 GCPhys = 0x00100000 - cb;
     const uint8_t *pbVirgin = &pu8PcBiosBinary[cbPcBiosBinary - cb];
     while (GCPhys < 0x00100000)
Index: /trunk/src/VBox/Devices/Storage/DevATA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 7071)
+++ /trunk/src/VBox/Devices/Storage/DevATA.cpp	(revision 7072)
@@ -321,10 +321,10 @@
     /** The BusMaster DMA state. */
     BMDMAState  BmDma;
-    /** (32 bit) GC phys pointer to first DMA descriptor. */
-    uint32_t    pFirstDMADesc;
-    /** (32 bit) GC phys pointer to last DMA descriptor. */
-    uint32_t    pLastDMADesc;
-    /** (32 bit) GC phys pointer to current DMA buffer (for redo operations). */
-    uint32_t    pRedoDMABuffer;
+    /** Pointer to first DMA descriptor. */
+    RTGCPHYS32  pFirstDMADesc;
+    /** Pointer to last DMA descriptor. */
+    RTGCPHYS32  pLastDMADesc;
+    /** Pointer to current DMA buffer (for redo operations). */
+    RTGCPHYS32  pRedoDMABuffer;
     /** Size of current DMA buffer (for redo operations). */
     uint32_t    cbRedoDMABuffer;
@@ -3909,5 +3909,5 @@
     ATADevState *s = &pCtl->aIfs[pCtl->iAIOIf];
     bool fRedo;
-    uint32_t pDesc;
+    RTGCPHYS32 pDesc;
     uint32_t cbTotalTransfer, cbElementaryTransfer;
     uint32_t iIOBufferCur, iIOBufferEnd;
@@ -3939,5 +3939,5 @@
     {
         BMDMADesc DMADesc;
-        uint32_t pBuffer;
+        RTGCPHYS32 pBuffer;
         uint32_t cbBuffer;
 
@@ -3967,5 +3967,5 @@
                 dmalen = RT_MIN(cbBuffer, iIOBufferEnd - iIOBufferCur);
                 Log2(("%s: DMA desc %#010x: addr=%#010x size=%#010x\n", __FUNCTION__,
-                       pDesc, pBuffer, cbBuffer));
+                       (int)pDesc, pBuffer, cbBuffer));
                 if (uTxDir == PDMBLOCKTXDIR_FROM_DEVICE)
                     PDMDevHlpPhysWrite(pDevIns, pBuffer, s->CTXSUFF(pbIOBuffer) + iIOBufferCur, dmalen);
@@ -5623,7 +5623,7 @@
         SSMR3PutBool(pSSMHandle, pData->aCts[i].fRedoDMALastDesc);
         SSMR3PutMem(pSSMHandle, &pData->aCts[i].BmDma, sizeof(pData->aCts[i].BmDma));
-        SSMR3PutU32(pSSMHandle, pData->aCts[i].pFirstDMADesc);
-        SSMR3PutU32(pSSMHandle, pData->aCts[i].pLastDMADesc);
-        SSMR3PutU32(pSSMHandle, pData->aCts[i].pRedoDMABuffer);
+        SSMR3PutGCPhys32(pSSMHandle, pData->aCts[i].pFirstDMADesc);
+        SSMR3PutGCPhys32(pSSMHandle, pData->aCts[i].pLastDMADesc);
+        SSMR3PutGCPhys32(pSSMHandle, pData->aCts[i].pRedoDMABuffer);
         SSMR3PutU32(pSSMHandle, pData->aCts[i].cbRedoDMABuffer);
 
@@ -5728,7 +5728,7 @@
         SSMR3GetBool(pSSMHandle, (bool *)&pData->aCts[i].fRedoDMALastDesc);
         SSMR3GetMem(pSSMHandle, &pData->aCts[i].BmDma, sizeof(pData->aCts[i].BmDma));
-        SSMR3GetU32(pSSMHandle, &pData->aCts[i].pFirstDMADesc);
-        SSMR3GetU32(pSSMHandle, &pData->aCts[i].pLastDMADesc);
-        SSMR3GetU32(pSSMHandle, &pData->aCts[i].pRedoDMABuffer);
+        SSMR3GetGCPhys32(pSSMHandle, &pData->aCts[i].pFirstDMADesc);
+        SSMR3GetGCPhys32(pSSMHandle, &pData->aCts[i].pLastDMADesc);
+        SSMR3GetGCPhys32(pSSMHandle, &pData->aCts[i].pRedoDMABuffer);
         SSMR3GetU32(pSSMHandle, &pData->aCts[i].cbRedoDMABuffer);
 
Index: /trunk/src/VBox/Devices/Storage/PIIX3ATABmDma.h
===================================================================
--- /trunk/src/VBox/Devices/Storage/PIIX3ATABmDma.h	(revision 7071)
+++ /trunk/src/VBox/Devices/Storage/PIIX3ATABmDma.h	(revision 7072)
@@ -52,10 +52,10 @@
 /** PIIX3 Bus Master DMA unit state. */
 typedef struct BMDMAState {
-    /** Address of the MMIO region in the guest's memory space. */
-    uint32_t pvAddr;
     /** Command register. */
     uint8_t u8Cmd;
     /** Status register. */
     uint8_t u8Status;
+    /** Address of the MMIO region in the guest's memory space. */
+    RTGCPHYS32 pvAddr;
 } BMDMAState;
 
@@ -64,5 +64,5 @@
 typedef struct BMDMADesc {
     /** Address of the DMA source/target buffer. */
-    uint32_t pBuffer;
+    RTGCPHYS32 pBuffer;
     /** Size of the DMA source/target buffer. */
     uint32_t cbBuffer;
Index: /trunk/src/VBox/Devices/VMMDev/VMMDevState.h
===================================================================
--- /trunk/src/VBox/Devices/VMMDev/VMMDevState.h	(revision 7071)
+++ /trunk/src/VBox/Devices/VMMDev/VMMDevState.h	(revision 7072)
@@ -85,5 +85,5 @@
     VMMDevMemory *pVMMDevRAMHC;
     /** GC physical address of VMMDev RAM area */
-    RTGCPHYS GCPhysVMMDevRAM;
+    RTGCPHYS32 GCPhysVMMDevRAM;
 
     /** Information reported by guest via VMMDevReportGuestInfo generic request.
Index: /trunk/src/VBox/Devices/vl_vbox.h
===================================================================
--- /trunk/src/VBox/Devices/vl_vbox.h	(revision 7071)
+++ /trunk/src/VBox/Devices/vl_vbox.h	(revision 7072)
@@ -70,5 +70,5 @@
  * Misc types.
  */
-typedef RTGCPHYS                target_phys_addr_t;
+typedef RTGCPHYS32              target_phys_addr_t;
 typedef PCIDEVICE               PCIDevice;
 typedef RTGCUINTREG             target_ulong;
Index: /trunk/src/VBox/VMM/PGM.cpp
===================================================================
--- /trunk/src/VBox/VMM/PGM.cpp	(revision 7071)
+++ /trunk/src/VBox/VMM/PGM.cpp	(revision 7072)
@@ -566,5 +566,5 @@
 
 /** Saved state data unit version. */
-#define PGM_SAVED_STATE_VERSION     5
+#define PGM_SAVED_STATE_VERSION     6
 
 /*******************************************************************************
Index: /trunk/src/VBox/VMM/SSM.cpp
===================================================================
--- /trunk/src/VBox/VMM/SSM.cpp	(revision 7071)
+++ /trunk/src/VBox/VMM/SSM.cpp	(revision 7072)
@@ -2236,4 +2236,19 @@
 
 /**
+ * Saves a 32 bits GC physical address item to the current data unit.
+ *
+ * @returns VBox status.
+ * @param   pSSM            SSM operation handle.
+ * @param   GCPhys          The item to save
+ */
+SSMR3DECL(int) SSMR3PutGCPhys32(PSSMHANDLE pSSM, RTGCPHYS32 GCPhys)
+{
+    if (pSSM->enmOp == SSMSTATE_SAVE_EXEC)
+        return ssmr3Write(pSSM, &GCPhys, sizeof(GCPhys));
+    AssertMsgFailed(("Invalid state %d\n", pSSM->enmOp));
+    return VERR_SSM_INVALID_STATE;
+}
+
+/**
  * Saves a GC physical address item to the current data unit.
  *
@@ -2757,4 +2772,19 @@
     if (pSSM->enmOp == SSMSTATE_LOAD_EXEC || pSSM->enmOp == SSMSTATE_OPEN_READ)
         return ssmr3Read(pSSM, pi, sizeof(*pi));
+    AssertMsgFailed(("Invalid state %d\n", pSSM->enmOp));
+    return VERR_SSM_INVALID_STATE;
+}
+
+/**
+ * Loads a 32 bits GC physical address item from the current data unit.
+ *
+ * @returns VBox status.
+ * @param   pSSM            SSM operation handle.
+ * @param   pGCPhys         Where to store the GC physical address.
+ */
+SSMR3DECL(int) SSMR3GetGCPhys32(PSSMHANDLE pSSM, PRTGCPHYS32 pGCPhys)
+{
+    if (pSSM->enmOp == SSMSTATE_LOAD_EXEC || pSSM->enmOp == SSMSTATE_OPEN_READ)
+        return ssmr3Read(pSSM, pGCPhys, sizeof(*pGCPhys));
     AssertMsgFailed(("Invalid state %d\n", pSSM->enmOp));
     return VERR_SSM_INVALID_STATE;
