diff -Naurd silo-1.4.10.orig/first-isofs/crt0.S silo-1.4.10/first-isofs/crt0.S
--- silo-1.4.10.orig/first-isofs/crt0.S	2006-04-19 12:16:06.000000000 +0200
+++ silo-1.4.10/first-isofs/crt0.S	2006-04-19 12:16:19.000000000 +0200
@@ -112,6 +112,25 @@
 	tst	%i4			/* quit unless it's Sun4u */
 	be	0f
 	 nop
+
+	/* Careful, we cannot read the %ver register on sun4v because
+	 * there that register is hyperprivileged and we are executing
+	 * in privileged mode.
+	 *
+	 * This early on it's difficult to portably detect sun4v as
+	 * that requires OBP calls.  So do this super-ugly trick of
+	 * trying to set the PSTATE_AG bit in %pstate which will read
+	 * back as zero on sun4u.
+	 */
+	rdpr	%pstate, %l0
+	or	%l0, 0x1, %l1
+	wrpr	%l1, %pstate
+	rdpr	%pstate, %l1
+	wrpr	%l0, %pstate
+	andcc	%l1, 0x1, %g0
+	be,pn	%xcc, 0f
+	 nop
+
 	rdpr	%ver, %l0
 	srlx	%l0, (32 + 16), %l1
 	cmp	%l1, 0x3e
diff -Naurd silo-1.4.10.orig/second/crt0.S silo-1.4.10/second/crt0.S
--- silo-1.4.10.orig/second/crt0.S	2006-04-19 12:16:06.000000000 +0200
+++ silo-1.4.10/second/crt0.S	2006-04-19 12:16:19.000000000 +0200
@@ -183,6 +183,25 @@
 	tst	%i4			/* quit unless it's Sun4u */
 	be	0f
 	 nop
+
+	/* Careful, we cannot read the %ver register on sun4v because
+	 * there that register is hyperprivileged and we are executing
+	 * in privileged mode.
+	 *
+	 * This early on it's difficult to portably detect sun4v as
+	 * that requires OBP calls.  So do this super-ugly trick of
+	 * trying to set the PSTATE_AG bit in %pstate which will read
+	 * back as zero on sun4u.
+	 */
+	rdpr	%pstate, %l0
+	or	%l0, 0x1, %l1
+	wrpr	%l1, %pstate
+	rdpr	%pstate, %l1
+	wrpr	%l0, %pstate
+	andcc	%l1, 0x1, %g0
+	be,pn	%xcc, 0f
+	 nop
+
 	rdpr	%ver, %l0
 	srlx	%l0, (32 + 16), %l1
 	cmp	%l1, 0x3e
diff -Naurd silo-1.4.10.orig/second/memory.c silo-1.4.10/second/memory.c
--- silo-1.4.10.orig/second/memory.c	2006-04-19 12:16:06.000000000 +0200
+++ silo-1.4.10/second/memory.c	2006-04-19 12:16:19.000000000 +0200
@@ -21,9 +21,6 @@
 
 #include <silo.h>
 
-#define IMAGE_TLB_ENTRY		61
-#define INITRD_TLB_ENTRY	60
-
 #define INITRD_VIRT_ADDR	0x40c00000
 #define IMAGE_VIRT_ADDR		0x40000000
 
@@ -198,20 +195,6 @@
 	"sta %0, [%1] 32\n\t" : : "r" (set), "r" (l));
 }
 
-#ifndef TLB_TAG_ACCESS
-#define TLB_TAG_ACCESS 		0x30
-#endif
-
-#ifndef ASI_DMMU
-#define ASI_DMMU 		0x58
-#define ASI_DTLB_DATA_ACCESS	0x5d
-#endif
-
-#ifndef ASI_IMMU
-#define ASI_IMMU		0x50
-#define ASI_ITLB_DATA_ACCESS	0x55
-#endif
-
 unsigned long long initrd_phys;
 
 unsigned long sun4m_initrd_pa;
@@ -300,21 +283,12 @@
 		unsigned long long size;
 	} *p = (struct p1275_mem *)0;
 	unsigned int virt = (is_kernel ? IMAGE_VIRT_ADDR : INITRD_VIRT_ADDR);
-	unsigned int tlb_entry = (is_kernel ? IMAGE_TLB_ENTRY : INITRD_TLB_ENTRY);
 	unsigned long long phys = 0, phys_base;
 
 	p = (struct p1275_mem *)malloc(2048);
 
 	node = prom_finddevice("/memory");
 
-	if (prom_getproperty(node, "reg", (char *)p, 2048) == -1) {
-		free (p);
-		printf("Could not get reg property\n");
-		return (char *)0;
-	}
-
-	phys_base = p[0].phys;
-
 	n = prom_getproplen(node, "available");
 
 	if (!n || n == -1 || prom_getproperty(node, "available", (char *)p, 2048) == -1) {
@@ -326,6 +300,12 @@
 	phys = 0;
         n /= sizeof(*p);
 
+	phys_base = ~(unsigned long long)0;
+	for (i = 0; i < n; i++) {
+		if (p[i].phys < phys_base)
+			phys_base = p[i].phys;
+	}
+
 	for (i = 0; i < n; i++) {
 		/* Do not mess with first 4 Megs of memory */
 		if (p[i].phys == phys_base) {
@@ -390,7 +370,6 @@
 static void sun4u_memory_release(int is_kernel)
 {
 	unsigned long long virt, len;
-	unsigned int tlb_entry = (is_kernel ? IMAGE_TLB_ENTRY : INITRD_TLB_ENTRY);
 
 	if (is_kernel) {
 		virt = sun4u_image_virt;
@@ -406,32 +385,6 @@
 
 	prom_unmap(len, virt);
 
-        __asm __volatile("\n\
-            rdpr %%pil, %%g1\n\
-            wrpr 15, %%pil\n\
-            stxa %%g0, [%0] %1\n\
-            membar #Sync\n\
-            stxa %%g0, [%2] %3\n\
-            membar #Sync\n\
-            wrpr %%g1, %%pil\n\
-        " : : "r" (TLB_TAG_ACCESS), "i" (ASI_DMMU),
-              "r" (tlb_entry << 3),
-              "i" (ASI_DTLB_DATA_ACCESS) : "g1");
-
-	if (is_kernel) {
-	        __asm __volatile("\n\
-        	    rdpr %%pil, %%g1\n\
-	            wrpr 15, %%pil\n\
-        	    stxa %%g0, [%0] %1\n\
-		    membar #Sync\n\
-        	    stxa %%g0, [%2] %3\n\
-	            membar #Sync\n\
-        	    wrpr %%g1, %%pil\n\
-	        " : : "r" (TLB_TAG_ACCESS), "i" (ASI_IMMU),
-        	      "r" (tlb_entry << 3),
-	              "i" (ASI_ITLB_DATA_ACCESS) : "g1");
-	}
-
 	if (is_kernel)
 		sun4u_image_len = 0;
 	else
diff -Naurd silo-1.4.10.orig/second/misc.c silo-1.4.10/second/misc.c
--- silo-1.4.10.orig/second/misc.c	2006-04-19 12:16:06.000000000 +0200
+++ silo-1.4.10/second/misc.c	2006-04-19 12:16:19.000000000 +0200
@@ -518,6 +518,7 @@
     case 'e':
 	return sun4e;
     case 'u':
+    case 'v':
 	return sun4u;
     default:
     	for(i = 0; i < NUM_SUN_MACHINES; i++)
diff -Naurd silo-1.4.10.orig/second/timer.c silo-1.4.10/second/timer.c
--- silo-1.4.10.orig/second/timer.c	2001-08-10 05:50:27.000000000 +0200
+++ silo-1.4.10/second/timer.c	2006-04-19 12:16:30.000000000 +0200
@@ -40,8 +40,6 @@
 static volatile struct sun4c_timer_info *sun4c_timer;
 static unsigned char *addr_to_free = 0;
 static int len_to_free;
-static unsigned long long sun4u_tickcmpr;
-static int sun4u_notimer = 0;
 static struct mostek48t02 *mregs;
 static long clock_frequency;
 
@@ -156,16 +154,6 @@
     }
     if (!foundcpu || !clock_frequency)
         clock_frequency = prom_getint(prom_root_node, "clock-frequency") / 100;
-    if (notimer) {
-        sun4u_notimer = 1;
-        __asm__ __volatile__ ("\t"
-        	"rd	%%tick_cmpr, %%g1\n\t"
-        	"stx	%%g1, [%0]\n\t"
-        	"mov	1, %%g1\n\t"
-        	"sllx    %%g1, 63, %%g1\n\t"
-        	"wr      %%g1, 0, %%tick_cmpr"
-        	: : "r" (&sun4u_tickcmpr) : "g1");
-    }
     return 0;
 }
 
@@ -206,13 +194,6 @@
 
 void close_timer ()
 {
-    if (sun4u_notimer) {
-        __asm__ __volatile__("\t"
-        	"ldx	[%0], %%g1\n\t"
-        	"wrpr	%%g0, 0, %%tick\n\t"
-        	"wr	%%g1, 0, %%tick_cmpr"
-        	: : "r" (&sun4u_tickcmpr) : "g1");
-    }
     if (addr_to_free) {
         if (addr_to_free == (unsigned char *)0xffffffff)
             sun4c_unmapio (TICKER_VIRTUAL);
