Index: kernel/arch/arm32/src/mach/gta02/gta02.c
===================================================================
--- kernel/arch/arm32/src/mach/gta02/gta02.c	(revision 7c866dca6d6a65672794e3e3200314306a99f714)
+++ kernel/arch/arm32/src/mach/gta02/gta02.c	(revision d7ef14b00a909e507a2742d2e1d5a3af153b293a)
@@ -36,9 +36,14 @@
 #include <arch/exception.h>
 #include <arch/mach/gta02/gta02.h>
+#include <arch/mm/page.h>
+
+#define GTA02_MEMORY_START	0x30000000	/* physical */
+#define GTA02_MEMORY_SIZE	0x08000000	/* 128 MB */
+#define GTA02_MEMORY_SKIP	0x8000		/* 2 pages */
 
 static void gta02_init(void);
 static void gta02_timer_irq_start(void);
 static void gta02_cpu_halt(void);
-static uintptr_t gta02_get_memory_size(void);
+static void gta02_get_memory_extents(uintptr_t *start, uintptr_t *size);
 static void gta02_irq_exception(unsigned int exc_no, istate_t *istate);
 static void gta02_frame_init(void);
@@ -50,5 +55,5 @@
 	gta02_timer_irq_start,
 	gta02_cpu_halt,
-	gta02_get_memory_size,
+	gta02_get_memory_extents,
 	gta02_irq_exception,
 	gta02_frame_init,
@@ -69,7 +74,13 @@
 }
 
-static uintptr_t gta02_get_memory_size(void)
+/** Get extents of available memory.
+ *
+ * @param start		Place to store memory start address.
+ * @param size		Place to store memory size.
+ */
+static void gta02_get_memory_extents(uintptr_t *start, uintptr_t *size)
 {
-	return 0;
+	*start = PA2KA(GTA02_MEMORY_START) + GTA02_MEMORY_SKIP;
+	*size  = GTA02_MEMORY_SIZE - GTA02_MEMORY_SKIP;
 }
 
Index: kernel/arch/arm32/src/mach/integratorcp/integratorcp.c
===================================================================
--- kernel/arch/arm32/src/mach/integratorcp/integratorcp.c	(revision 7c866dca6d6a65672794e3e3200314306a99f714)
+++ kernel/arch/arm32/src/mach/integratorcp/integratorcp.c	(revision d7ef14b00a909e507a2742d2e1d5a3af153b293a)
@@ -60,5 +60,5 @@
 	icp_timer_irq_start,
 	icp_cpu_halt,
-	icp_get_memory_size,
+	icp_get_memory_extents,
 	icp_irq_exception,
 	icp_frame_init,
@@ -214,16 +214,19 @@
 }
 
-/** Returns the size of emulated memory.
- *
- * @return Size in bytes.
- */
-size_t icp_get_memory_size(void) 
-{
+/** Get extents of available memory.
+ *
+ * @param start		Place to store memory start address.
+ * @param size		Place to store memory size.
+ */
+void icp_get_memory_extents(uintptr_t *start, uintptr_t *size)
+{
+	*start = 0;
+
 	if (hw_map_init_called) {
-		return (sdram[((*(uint32_t *)icp_hw_map.sdramcr & ICP_SDRAM_MASK) >> 2)]);
+		*size = (sdram[((*(uint32_t *)icp_hw_map.sdramcr &
+		    ICP_SDRAM_MASK) >> 2)]);
 	} else {
-		return SDRAM_SIZE;
-	}
-	
+		*size = SDRAM_SIZE;
+	}
 }
 
Index: kernel/arch/arm32/src/mach/testarm/testarm.c
===================================================================
--- kernel/arch/arm32/src/mach/testarm/testarm.c	(revision 7c866dca6d6a65672794e3e3200314306a99f714)
+++ kernel/arch/arm32/src/mach/testarm/testarm.c	(revision d7ef14b00a909e507a2742d2e1d5a3af153b293a)
@@ -60,5 +60,5 @@
 	gxemul_timer_irq_start,
 	gxemul_cpu_halt,
-	gxemul_get_memory_size,
+	gxemul_get_memory_extents,
 	gxemul_irq_exception,
 	gxemul_frame_init,
@@ -185,13 +185,14 @@
 }
 
-/** Returns the size of emulated memory.
- *
- * @return Size in bytes.
- */
-uintptr_t gxemul_get_memory_size(void)
-{
-        return  *((uintptr_t *) (GXEMUL_MP_ADDRESS + GXEMUL_MP_MEMSIZE_OFFSET));
-}
-
+/** Get extents of available memory.
+ *
+ * @param start		Place to store memory start address.
+ * @param size		Place to store memory size.
+ */
+void gxemul_get_memory_size(uintptr_t *start, uintptr_t *size)
+{
+	start = 0;
+        size = *((uintptr_t *) (GXEMUL_MP_ADDRESS + GXEMUL_MP_MEMSIZE_OFFSET));
+}
 
 /** Returns the mask of active interrupts. */
Index: kernel/arch/arm32/src/machine_func.c
===================================================================
--- kernel/arch/arm32/src/machine_func.c	(revision 7c866dca6d6a65672794e3e3200314306a99f714)
+++ kernel/arch/arm32/src/machine_func.c	(revision d7ef14b00a909e507a2742d2e1d5a3af153b293a)
@@ -80,12 +80,12 @@
 }
 
-
-/** Returns size of available memory.
+/** Get extents of available memory.
  *
- *  @return Size of available memory.
+ * @param start		Place to store memory start address.
+ * @param size		Place to store memory size.
  */
-uintptr_t machine_get_memory_size(void)
+void machine_get_memory_extents(uintptr_t *start, uintptr_t *size)
 {
-	return (machine_ops->machine_get_memory_size)();
+	(machine_ops->machine_get_memory_extents)(start, size);
 }
 
Index: kernel/arch/arm32/src/mm/frame.c
===================================================================
--- kernel/arch/arm32/src/mm/frame.c	(revision 7c866dca6d6a65672794e3e3200314306a99f714)
+++ kernel/arch/arm32/src/mm/frame.c	(revision d7ef14b00a909e507a2742d2e1d5a3af153b293a)
@@ -38,4 +38,5 @@
 #include <arch/machine_func.h>
 #include <config.h>
+#include <align.h>
 
 /** Address of the last frame in the memory. */
@@ -45,8 +46,15 @@
 void frame_arch_init(void)
 {
-	last_frame = machine_get_memory_size();
+	uintptr_t mem_start, mem_size;
+	uintptr_t first_frame;
+	uintptr_t num_frames;
+
+	machine_get_memory_extents(&mem_start, &mem_size);
+	first_frame = ALIGN_UP(mem_start, FRAME_SIZE);
+	last_frame = ALIGN_DOWN(mem_start + mem_size, FRAME_SIZE);
+	num_frames = (last_frame - first_frame) >> FRAME_WIDTH;
 	
 	/* All memory as one zone */
-	zone_create(0, ADDR2PFN(last_frame),
+	zone_create(first_frame, num_frames,
 	    BOOT_PAGE_TABLE_START_FRAME + BOOT_PAGE_TABLE_SIZE_IN_FRAMES, 0);
 	
