Index: kernel/arch/ia64/include/bootinfo.h
===================================================================
--- kernel/arch/ia64/include/bootinfo.h	(revision 849ed54afbef3ad0ec3af831e93a1353f9eaaf0f)
+++ kernel/arch/ia64/include/bootinfo.h	(revision 08c88b8417ff45cba6767f098910f4feecc24b6b)
@@ -32,5 +32,5 @@
 #define BOOTINFO_ADDRESS 0x4401000
 
-#define CONFIG_INIT_TASKS	32
+#define TASKMAP_MAX_RECORDS  32
 
 #define MEMMAP_ITEMS 128
@@ -44,12 +44,12 @@
 
 typedef struct {
-	void *addr; 
-	unsigned long size;
+	void *addr;
+	size_t size;
 	char name[BOOTINFO_TASK_NAME_BUFLEN];
 } binit_task_t;
 	
 typedef struct {
-	unsigned long count;
-	binit_task_t tasks[CONFIG_INIT_TASKS];
+	size_t cnt;
+	binit_task_t tasks[TASKMAP_MAX_RECORDS];
 } binit_t;
 
@@ -58,13 +58,12 @@
 	unsigned long base;
 	unsigned long size;
-}efi_memmap_item_t;
-
+} efi_memmap_item_t;
 
 typedef struct {
 	binit_t taskmap;
-
+	
 	efi_memmap_item_t memmap[MEMMAP_ITEMS];
 	unsigned int memmap_items;
-
+	
 	unative_t *sapic;
 	unsigned long sys_freq;
Index: kernel/arch/ia64/src/ia64.c
===================================================================
--- kernel/arch/ia64/src/ia64.c	(revision 849ed54afbef3ad0ec3af831e93a1353f9eaaf0f)
+++ kernel/arch/ia64/src/ia64.c	(revision 08c88b8417ff45cba6767f098910f4feecc24b6b)
@@ -47,4 +47,5 @@
 #include <mm/as.h>
 #include <config.h>
+#include <macros.h>
 #include <userspace.h>
 #include <console/console.h>
@@ -78,10 +79,6 @@
 void arch_pre_main(void)
 {
-	/* Setup usermode init tasks. */
-
-	unsigned int i;
-	
-	init.cnt = bootinfo->taskmap.count;
-	
+	init.cnt = min3(bootinfo->taskmap.cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS);
+	size_t i;
 	for (i = 0; i < init.cnt; i++) {
 		init.tasks[i].addr =
