Index: kernel/arch/amd64/include/cpu.h
===================================================================
--- kernel/arch/amd64/include/cpu.h	(revision c00589d744b4c2f8becc2dd1223b865d10f1e238)
+++ kernel/arch/amd64/include/cpu.h	(revision 080ad7fcf59dd514b2dceeb65a63f76c705addac)
@@ -65,5 +65,5 @@
 	tss_t *tss;
 	
-	count_t iomapver_copy;  /** Copy of TASK's I/O Permission bitmap generation count. */
+	size_t iomapver_copy;  /** Copy of TASK's I/O Permission bitmap generation count. */
 } cpu_arch_t;
 
Index: kernel/arch/amd64/include/mm/page.h
===================================================================
--- kernel/arch/amd64/include/mm/page.h	(revision c00589d744b4c2f8becc2dd1223b865d10f1e238)
+++ kernel/arch/amd64/include/mm/page.h	(revision 080ad7fcf59dd514b2dceeb65a63f76c705addac)
@@ -113,31 +113,31 @@
 	(write_cr3((uintptr_t) (ptl0)))
 #define SET_PTL1_ADDRESS_ARCH(ptl0, i, a) \
-	set_pt_addr((pte_t *) (ptl0), (index_t) (i), a)
+	set_pt_addr((pte_t *) (ptl0), (size_t) (i), a)
 #define SET_PTL2_ADDRESS_ARCH(ptl1, i, a) \
-	set_pt_addr((pte_t *) (ptl1), (index_t) (i), a)
+	set_pt_addr((pte_t *) (ptl1), (size_t) (i), a)
 #define SET_PTL3_ADDRESS_ARCH(ptl2, i, a) \
-	set_pt_addr((pte_t *) (ptl2), (index_t) (i), a)
+	set_pt_addr((pte_t *) (ptl2), (size_t) (i), a)
 #define SET_FRAME_ADDRESS_ARCH(ptl3, i, a) \
-	set_pt_addr((pte_t *) (ptl3), (index_t) (i), a)
+	set_pt_addr((pte_t *) (ptl3), (size_t) (i), a)
 
 /* Get PTE flags accessors for each level. */
 #define GET_PTL1_FLAGS_ARCH(ptl0, i) \
-	get_pt_flags((pte_t *) (ptl0), (index_t) (i))
+	get_pt_flags((pte_t *) (ptl0), (size_t) (i))
 #define GET_PTL2_FLAGS_ARCH(ptl1, i) \
-	get_pt_flags((pte_t *) (ptl1), (index_t) (i))
+	get_pt_flags((pte_t *) (ptl1), (size_t) (i))
 #define GET_PTL3_FLAGS_ARCH(ptl2, i) \
-	get_pt_flags((pte_t *) (ptl2), (index_t) (i))
+	get_pt_flags((pte_t *) (ptl2), (size_t) (i))
 #define GET_FRAME_FLAGS_ARCH(ptl3, i) \
-	get_pt_flags((pte_t *) (ptl3), (index_t) (i))
+	get_pt_flags((pte_t *) (ptl3), (size_t) (i))
 
 /* Set PTE flags accessors for each level. */
 #define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \
-	set_pt_flags((pte_t *) (ptl0), (index_t) (i), (x))
+	set_pt_flags((pte_t *) (ptl0), (size_t) (i), (x))
 #define SET_PTL2_FLAGS_ARCH(ptl1, i, x) \
-	set_pt_flags((pte_t *) (ptl1), (index_t) (i), (x))
+	set_pt_flags((pte_t *) (ptl1), (size_t) (i), (x))
 #define SET_PTL3_FLAGS_ARCH(ptl2, i, x) \
-	set_pt_flags((pte_t *) (ptl2), (index_t) (i), (x))
+	set_pt_flags((pte_t *) (ptl2), (size_t) (i), (x))
 #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \
-	set_pt_flags((pte_t *) (ptl3), (index_t) (i), (x))
+	set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x))
 
 /* Macros for querying the last-level PTE entries. */
@@ -177,5 +177,5 @@
 #define PFERR_CODE_ID		(1 << 4)
 
-static inline int get_pt_flags(pte_t *pt, index_t i)
+static inline int get_pt_flags(pte_t *pt, size_t i)
 {
 	pte_t *p = &pt[i];
@@ -190,5 +190,5 @@
 }
 
-static inline void set_pt_addr(pte_t *pt, index_t i, uintptr_t a)
+static inline void set_pt_addr(pte_t *pt, size_t i, uintptr_t a)
 {
 	pte_t *p = &pt[i];
@@ -198,5 +198,5 @@
 }
 
-static inline void set_pt_flags(pte_t *pt, index_t i, int flags)
+static inline void set_pt_flags(pte_t *pt, size_t i, int flags)
 {
 	pte_t *p = &pt[i];
Index: kernel/arch/amd64/include/proc/task.h
===================================================================
--- kernel/arch/amd64/include/proc/task.h	(revision c00589d744b4c2f8becc2dd1223b865d10f1e238)
+++ kernel/arch/amd64/include/proc/task.h	(revision 080ad7fcf59dd514b2dceeb65a63f76c705addac)
@@ -41,5 +41,5 @@
 typedef struct {
 	/** I/O Permission bitmap Generation counter. */
-	count_t iomapver;
+	size_t iomapver;
 	/** I/O Permission bitmap. */
 	bitmap_t iomap;
Index: kernel/arch/amd64/include/types.h
===================================================================
--- kernel/arch/amd64/include/types.h	(revision c00589d744b4c2f8becc2dd1223b865d10f1e238)
+++ kernel/arch/amd64/include/types.h	(revision 080ad7fcf59dd514b2dceeb65a63f76c705addac)
@@ -47,6 +47,4 @@
 
 typedef uint64_t size_t;
-typedef uint64_t count_t;
-typedef uint64_t index_t;
 
 typedef uint64_t uintptr_t;
@@ -61,9 +59,7 @@
 } fncptr_t;
 
-/**< Formats for uintptr_t, size_t, count_t and index_t */
+/**< Formats for uintptr_t, size_t */
 #define PRIp "llx"
 #define PRIs "llu"
-#define PRIc "llu"
-#define PRIi "llu"
 
 /**< Formats for (u)int8_t, (u)int16_t, (u)int32_t, (u)int64_t and (u)native_t */
Index: kernel/arch/amd64/src/ddi/ddi.c
===================================================================
--- kernel/arch/amd64/src/ddi/ddi.c	(revision c00589d744b4c2f8becc2dd1223b865d10f1e238)
+++ kernel/arch/amd64/src/ddi/ddi.c	(revision 080ad7fcf59dd514b2dceeb65a63f76c705addac)
@@ -57,5 +57,5 @@
 int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size)
 {
-	count_t bits;
+	size_t bits;
 	
 	bits = ioaddr + size;
@@ -99,5 +99,5 @@
 	 * Enable the range and we are done.
 	 */
-	bitmap_clear_range(&task->arch.iomap, (index_t) ioaddr, (count_t) size);
+	bitmap_clear_range(&task->arch.iomap, (size_t) ioaddr, (size_t) size);
 	
 	/*
@@ -118,9 +118,9 @@
 void io_perm_bitmap_install(void)
 {
-	count_t bits;
+	size_t bits;
 	ptr_16_64_t cpugdtr;
 	descriptor_t *gdt_p;
 	tss_descriptor_t *tss_desc;
-	count_t ver;
+	size_t ver;
 	
 	/* First, copy the I/O Permission Bitmap. */
Index: kernel/arch/amd64/src/interrupt.c
===================================================================
--- kernel/arch/amd64/src/interrupt.c	(revision c00589d744b4c2f8becc2dd1223b865d10f1e238)
+++ kernel/arch/amd64/src/interrupt.c	(revision 080ad7fcf59dd514b2dceeb65a63f76c705addac)
@@ -102,5 +102,5 @@
 {
 	if (TASK) {
-		count_t ver;
+		size_t ver;
 
 		spinlock_lock(&TASK->lock);
