diff --git a/sys/powerpc/wii/platform_wii.c b/sys/powerpc/wii/platform_wii.c index 78784ed1dc4..dcf1fc019a8 100644 --- a/sys/powerpc/wii/platform_wii.c +++ b/sys/powerpc/wii/platform_wii.c @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "platform_if.h" @@ -113,7 +114,7 @@ wii_mem_regions(platform_t plat, struct mem_region **phys, int *physsz, { /* 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 mem_region **phys, int *physsz, 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;