diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 105a9f3..ad2b4ee 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1363,11 +1363,11 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn)
      * but the real video RAM instead
      */
     if (info->ChipFamily >= CHIP_FAMILY_R600) {
-	mem_size = INREG(R600_CONFIG_MEMSIZE);
-	aper_size = INREG(R600_CONFIG_APER_SIZE);
+	mem_size = INREG(R600_CONFIG_MEMSIZE) & 0xffffffff;
+	aper_size = INREG(R600_CONFIG_APER_SIZE) & 0xffffffff;
     } else {
-	mem_size = INREG(RADEON_CONFIG_MEMSIZE);
-	aper_size = INREG(RADEON_CONFIG_APER_SIZE);
+	mem_size = INREG(RADEON_CONFIG_MEMSIZE) & 0xffffffff;
+	aper_size = INREG(RADEON_CONFIG_APER_SIZE) & 0xffffffff;
     }
 
     if (mem_size == 0)
@@ -1405,9 +1405,9 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn)
 	    uint64_t aper0_base;
 
 	    if (info->ChipFamily >= CHIP_FAMILY_R600) {
-		aper0_base = INREG(R600_CONFIG_F0_BASE);
+		aper0_base = INREG(R600_CONFIG_F0_BASE) & 0xffffffff;
 	    } else {
-		aper0_base = INREG(RADEON_CONFIG_APER_0_BASE);
+		aper0_base = INREG(RADEON_CONFIG_APER_0_BASE) & 0xffffffff;
 	    }
 
 	    /* Recent chips have an "issue" with the memory controller, the
@@ -1428,12 +1428,12 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn)
 	    if (info->ChipFamily >= CHIP_FAMILY_R600) {
 		uint64_t mc_fb = ((aper0_base >> 24) & 0xffff) |
 		    (((aper0_base + mem_size - 1) >> 8) & 0xffff0000);
-		info->mc_fb_location = mc_fb & 0xffffffff;
+		info->mc_fb_location = (uint32_t)mc_fb & 0xffffffff;
 		ErrorF("mc fb loc is %08x\n", (unsigned int)info->mc_fb_location);
 	    } else {
 		uint64_t mc_fb = ((aper0_base >> 16) & 0xffff) |
 		    ((aper0_base + mem_size - 1) & 0xffff0000U);
-		info->mc_fb_location = mc_fb & 0xffffffff;
+		info->mc_fb_location = (uint32_t)mc_fb & 0xffffffff;
 	    }
 	}
     }
