Index: kernel/arch/arm32/src/mm/frame.c
===================================================================
--- kernel/arch/arm32/src/mm/frame.c	(revision 5ac77cc96d78ca645a458a91b3c210a0a31dc894)
+++ 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);
 	
