Index: arch/ia64/include/mm/frame.h
===================================================================
--- arch/ia64/include/mm/frame.h	(revision 4be51c827829994656191029ec0e27e8d6fb1eaa)
+++ arch/ia64/include/mm/frame.h	(revision fd537a0cf2e16cbe3ba7fd32bbae4ad8307c10da)
@@ -30,5 +30,6 @@
 #define __ia64_FRAME_H__
 
-#define FRAME_SIZE		(16*1024)
+#define FRAME_WIDTH   14
+#define FRAME_SIZE		(1<<FRAME_WIDTH)
 
 extern void frame_arch_init(void);
Index: arch/ia64/include/mm/page.h
===================================================================
--- arch/ia64/include/mm/page.h	(revision 4be51c827829994656191029ec0e27e8d6fb1eaa)
+++ arch/ia64/include/mm/page.h	(revision fd537a0cf2e16cbe3ba7fd32bbae4ad8307c10da)
@@ -34,4 +34,5 @@
 
 #define PAGE_SIZE	FRAME_SIZE
+#define PAGE_WIDTH	FRAME_WIDTH
 
 #define KA2PA(x)	((__address) (x))
@@ -48,4 +49,13 @@
 #define HT_SET_NEXT_ARCH(t, s)
 #define HT_SET_RECORD_ARCH(t, page, asid, frame, flags)
+
+#define REGION_RID_MAIN 0
+#define REGION_RID_FIRST_INVALID 16
+#define REGION_REGISTERS 8
+
+#define VHPT_WIDTH 16         /*64kB*/
+#define VHPT_SIZE (1<<VHPT_WIDTH)
+
+#define VHPT_BASE 0           /* Must be aligned to VHPT_SIZE */
 
 struct VHPT_tag_info
@@ -87,5 +97,5 @@
                             /* But I'm almost sure we nead access to whole word so there are both possibilities*/
 	/* Word 3 */													
-	unsigned long long next :64;
+	unsigned long long next :64; /* This ignored field will be (in my hopes ;-) ) used as pointer in link list of entries with same hash value*/
 	
 }__attribute__ ((packed));
@@ -108,5 +118,5 @@
                             /* But I'm almost sure we nead access to whole word so there are both possibilities*/
 	/* Word 3 */													
-	unsigned long long next :64;
+	unsigned long long next :64; /* This ignored field will be (in my hopes ;-) ) used as pointer in link list of entries with same hash value*/
 	
 }__attribute__ ((packed));
@@ -120,3 +130,38 @@
 extern void page_arch_init(void);
 
+
+struct region_register_map
+{
+  unsigned ve            : 1;
+	unsigned r0            : 1;
+	unsigned ps            : 6;
+	unsigned rid           :24;
+	unsigned r1            :32;
+}__attribute__ ((packed));
+
+
+typedef union region_register
+{
+	struct region_register_map   map;
+	unsigned long long           word;
+}region_register;
+
+struct PTA_register_map
+{
+  unsigned ve            : 1;
+	unsigned r0            : 1;
+	unsigned size          : 6;
+	unsigned vf            : 1;
+	unsigned r1            : 6;
+	unsigned long long base:49;
+}__attribute__ ((packed));
+
+
+typedef union PTA_register
+{
+	struct PTA_register_map   map;
+	unsigned long long        word;
+}PTA_register;
+
+
 #endif
Index: arch/ia64/src/mm/page.c
===================================================================
--- arch/ia64/src/mm/page.c	(revision 4be51c827829994656191029ec0e27e8d6fb1eaa)
+++ arch/ia64/src/mm/page.c	(revision fd537a0cf2e16cbe3ba7fd32bbae4ad8307c10da)
@@ -33,6 +33,63 @@
 #include <panic.h>
 
+
+static void set_VHPT_environment(void)
+{
+	/*
+	TODO:
+	*/
+	
+	int i;
+	
+	/* First set up REGION REGISTER 0 */
+	
+	region_register rr;
+	rr.map.ve=0;                  /*Disable Walker*/
+	rr.map.ps=PAGE_WIDTH;
+	rr.map.rid=REGION_RID_MAIN;
+	
+	asm
+	(
+		"mov rr[r0]=%0;;"
+		:
+		:"r"(rr.word)
+	);
+		
+	/* And Invalidate the rest of REGION REGISTERS */
+	
+	for(i=1;i<REGION_REGISTERS;i++)
+	{
+		rr.map.rid=REGION_RID_FIRST_INVALID+i-1;
+		asm
+		(
+			"mov r8=%1;;"
+			"mov rr[r8]=%0;;"
+			:
+			:"r"(rr.word),"r"(i)
+			:"r8"
+		);
+	};
+
+	PTA_register pta;
+	pta.map.ve=0;                   /*Disable Walker*/
+	pta.map.vf=1;                   /*Large entry format*/
+	pta.map.size=VHPT_WIDTH;
+	pta.map.base=VHPT_BASE;
+	
+	
+	/*Write PTA*/
+	asm
+	(
+		"mov cr8=%0;;"
+		:
+		:"r"(pta.word)
+	);	
+	
+}	
+
+
 void page_arch_init(void)
 {
 	page_operations = &page_ht_operations;
+	set_VHPT_environment();
 }
