Skip to contentSkip to conversation

ppc32 support for Apple Xserve G5s

PATCH New Colin Watson 1 participant 1 message Jul 19, 2004 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc32 support for Apple Xserve G5s

Hi,

The following patch makes ppc32 work on Xserve G5 systems (ppc64 support was already there, I just backported a few bits).

http://powerpc.no-name-yet.com/patches/xserve-g5.diff

arch/ppc/kernel/cpu_setup_power4.S +6 -2
diff -ru kernel-source-2.6.7.orig/arch/ppc/kernel/cpu_setup_power4.S kernel-source-2.6.7/arch/ppc/kernel/cpu_setup_power4.S
@@ -112,7 +112,9 @@
 	/* We only deal with 970 for now */
 	mfspr	r0,SPRN_PVR
 	srwi	r0,r0,16
-	cmpwi	r0,0x39
+	cmpwi	cr0,r0,0x39
+	cmpwi	cr1,r0,0x3c
+	cror	4*cr0+eq,4*cr0+eq,4*cr1+eq
 	bne	1f
 
 	/* Save HID0,1,4 and 5 */
@@ -144,7 +146,9 @@
 	/* We only deal with 970 for now */
 	mfspr	r0,SPRN_PVR
 	srwi	r0,r0,16
-	cmpwi	r0,0x39
+	cmpwi	cr0,r0,0x39
+	cmpwi	cr1,r0,0x3c
+	cror	4*cr0+eq,4*cr0+eq,4*cr1+eq
 	bne	1f
 
 	/* Clear interrupt prefix */
arch/ppc/kernel/cputable.c +9 -0
diff -ru kernel-source-2.6.7.orig/arch/ppc/kernel/cputable.c kernel-source-2.6.7/arch/ppc/kernel/cputable.c
@@ -419,6 +419,15 @@
 	128, 128,
 	__setup_cpu_ppc970
     },
+    {	/* PPC970FX */
+	0xffff0000, 0x003c0000, "PPC970FX",
+	CPU_FTR_COMMON |
+	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
+	CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP,
+	COMMON_PPC | PPC_FEATURE_64 | PPC_FEATURE_ALTIVEC_COMP,
+	128, 128,
+	__setup_cpu_ppc970
+    },
 #endif /* CONFIG_POWER4 */
 #ifdef CONFIG_8xx
     {	/* 8xx */
arch/ppc/platforms/pmac_feature.c +4 -0
diff -ru kernel-source-2.6.7.orig/arch/ppc/platforms/pmac_feature.c kernel-source-2.6.7/arch/ppc/platforms/pmac_feature.c
@@ -2137,6 +2137,10 @@
 		PMAC_TYPE_POWERMAC_G5,		g5_features,
 		0,
 	},
+	{       "RackMac3,1",                   "XServe G5",
+		PMAC_TYPE_POWERMAC_G5,          g5_features,
+		0,
+	},
 #endif /* CONFIG_POWER4 */
 };
 

Our system didn't have a video card, only a serial console, so I had to apply the following to get any feedback at all. Other people in a similar situation might find it useful. However, I've no idea why it was disabled in the first place, so I'm not asking for this to be applied, merely curious ...

arch/ppc/kernel/head.S +1 -1
diff -ru kernel-source-2.6.7.orig/arch/ppc/kernel/head.S kernel-source-2.6.7/arch/ppc/kernel/head.S
@@ -1617,7 +1617,7 @@
 	lis	r4,0x2000		/* set pseudo-segment reg 12 */
 	ori	r5,r4,0x0ccc
 	mtsr	12,r5
-#if 0
+#if 1
 	ori	r5,r4,0x0888		/* set pseudo-segment reg 8 */
 	mtsr	8,r5			/* (for access to serial port) */
 #endif

Thanks,

Signature · 1 line
Colin Watson                                  [[email protected]]