Index: kernel/generic/include/align.h
===================================================================
--- kernel/generic/include/align.h	(revision 5f0f29ce3c25993ee100bdb9354b66dc6b762ae7)
+++ kernel/generic/include/align.h	(revision c43b1db2edde4d557f57179bffa715c2a6aac1ae)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @ingroup others
  * @{
@@ -33,5 +33,5 @@
 /**
  * @file
- * @brief	Macros for making values and addresses aligned.
+ * @brief Macros for making values and addresses aligned.
  */
 
@@ -44,5 +44,5 @@
  * @param a Size of alignment, must be power of 2.
  */
-#define ALIGN_DOWN(s, a)	((s) & ~((a) - 1))
+#define ALIGN_DOWN(s, a)  ((s) & ~((a) - 1))
 
 
@@ -52,5 +52,5 @@
  * @param a Size of alignment, must be power of 2.
  */
-#define ALIGN_UP(s, a)		(((s) + ((a) - 1)) & ~((a) - 1))
+#define ALIGN_UP(s, a)  (((s) + ((a) - 1)) & ~((a) - 1))
 
 #endif
Index: kernel/generic/include/mm/frame.h
===================================================================
--- kernel/generic/include/mm/frame.h	(revision 5f0f29ce3c25993ee100bdb9354b66dc6b762ae7)
+++ kernel/generic/include/mm/frame.h	(revision c43b1db2edde4d557f57179bffa715c2a6aac1ae)
@@ -40,4 +40,5 @@
 #include <adt/list.h>
 #include <mm/buddy.h>
+#include <synch/spinlock.h>
 #include <arch/mm/page.h>
 #include <arch/mm/frame.h>
@@ -68,12 +69,49 @@
 typedef uint8_t zone_flags_t;
 
+/** Available zone (free for allocation) */
+#define ZONE_AVAILABLE  0x00
 /** Zone is reserved (not available for allocation) */
-#define ZONE_RESERVED  0x08
+#define ZONE_RESERVED   0x08
 /** Zone is used by firmware (not available for allocation) */
-#define ZONE_FIRMWARE  0x10
+#define ZONE_FIRMWARE   0x10
 
 /** Currently there is no equivalent zone flags
     for frame flags */
 #define FRAME_TO_ZONE_FLAGS(frame_flags)  0
+
+typedef struct {
+	count_t refcount;     /**< Tracking of shared frames */
+	uint8_t buddy_order;  /**< Buddy system block order */
+	link_t buddy_link;    /**< Link to the next free block inside
+                               one order */
+	void *parent;         /**< If allocated by slab, this points there */
+} frame_t;
+
+typedef struct {
+	pfn_t base;                    /**< Frame_no of the first frame
+                                        in the frames array */
+	count_t count;                 /**< Size of zone */
+	count_t free_count;            /**< Number of free frame_t
+                                        structures */
+	count_t busy_count;            /**< Number of busy frame_t
+                                        structures */
+	zone_flags_t flags;            /**< Type of the zone */
+	
+	frame_t *frames;               /**< Array of frame_t structures
+                                        in this zone */
+	buddy_system_t *buddy_system;  /**< Buddy system for the zone */
+} zone_t;
+
+/*
+ * The zoneinfo.lock must be locked when accessing zoneinfo structure.
+ * Some of the attributes in zone_t structures are 'read-only'
+ */
+typedef struct {
+	SPINLOCK_DECLARE(lock);
+	count_t count;
+	zone_t info[ZONES_MAX];
+} zones_t;
+
+extern zones_t zones;
 
 static inline uintptr_t PFN2ADDR(pfn_t frame)
@@ -99,4 +137,9 @@
 }
 
+static inline bool zone_flags_available(zone_flags_t flags)
+{
+	return ((flags & (ZONE_RESERVED | ZONE_FIRMWARE)) == 0);
+}
+
 #define IS_BUDDY_ORDER_OK(index, order) \
     ((~(((unative_t) -1) << (order)) & (index)) == 0)
@@ -118,4 +161,5 @@
 extern void frame_reference_add(pfn_t);
 
+extern count_t find_zone(pfn_t frame, count_t count, count_t hint);
 extern count_t zone_create(pfn_t, count_t, pfn_t, zone_flags_t);
 extern void *frame_get_parent(pfn_t, count_t);
Index: kernel/generic/include/mm/page.h
===================================================================
--- kernel/generic/include/mm/page.h	(revision 5f0f29ce3c25993ee100bdb9354b66dc6b762ae7)
+++ kernel/generic/include/mm/page.h	(revision c43b1db2edde4d557f57179bffa715c2a6aac1ae)
@@ -62,5 +62,4 @@
 
 extern uintptr_t hw_map(uintptr_t physaddr, size_t size);
-extern void hw_area(void);
 
 #endif
