svn commit: r241861 - head/sys/powerpc/wii

Rui Paulo rpaulo at FreeBSD.org
Mon Oct 22 03:45:38 UTC 2012


Author: rpaulo
Date: Mon Oct 22 03:45:37 2012
New Revision: 241861
URL: http://svn.freebsd.org/changeset/base/241861

Log:
  Fix the memory regions to include the 64MB DDR3 memory slot.

Modified:
  head/sys/powerpc/wii/platform_wii.c

Modified: head/sys/powerpc/wii/platform_wii.c
==============================================================================
--- head/sys/powerpc/wii/platform_wii.c	Mon Oct 22 03:44:12 2012	(r241860)
+++ head/sys/powerpc/wii/platform_wii.c	Mon Oct 22 03:45:37 2012	(r241861)
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
 #include <machine/vmparam.h>
 
 #include <powerpc/wii/wii_fbreg.h>
+#include <powerpc/wii/wii_ipcreg.h>
 
 #include "platform_if.h"
 
@@ -113,7 +114,7 @@ wii_mem_regions(platform_t plat, struct 
 {
 	/* 24MB 1T-SRAM */
 	avail_regions[0].mr_start = 0x00000000;
-	avail_regions[0].mr_size  = 0x01800000 - 0x0004000;
+	avail_regions[0].mr_size  = 0x01800000;
 
 	/*
 	 * Reserve space for the framebuffer which is located
@@ -122,12 +123,19 @@ wii_mem_regions(platform_t plat, struct 
 	avail_regions[0].mr_size -= WIIFB_FB_LEN;
 
 	/* 64MB GDDR3 SDRAM */
-	avail_regions[1].mr_start = 0x10000000 + 0x0004000;
-	avail_regions[1].mr_size  = 0x04000000 - 0x0004000;
+	avail_regions[1].mr_start = 0x10000000;
+	avail_regions[1].mr_size  = 0x04000000;
 
-	/* XXX for now only use the first memory region */
-#undef MEM_REGIONS
-#define MEM_REGIONS 1
+	/*
+	 * Reserve space for the DSP.
+	 */
+	avail_regions[1].mr_start += 0x4000;
+	avail_regions[1].mr_size -= 0x4000;
+
+	/*
+	 * Reserve space for the IOS I/O memory.
+	 */
+	avail_regions[1].mr_size -= WIIIPC_IOH_LEN + 1;
 
 	*phys = *avail = avail_regions;
 	*physsz = *availsz = MEM_REGIONS;


More information about the svn-src-all mailing list