[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[patch] Re: Installing on a Dual CPU G5 Powermac?



    "Sven" == Sven Luther <sven.luther@wanadoo.fr> writes:

    Sven> We worked out some missing patches in the debian kernel for
    Sven> support of newer kernels with benh, well, benh sent me the
    Sven> needed patches, and i added it to the debian upcoming

Hi Sven,

Thanks for the update. I'll be happy to assist in testing if you need
a volunteer with a PowerMac7,3 dual G5.  I'm looking forward to
testing the new d-i for my final installation.

I debootstrap'ed a Debian install on my G5 yesterday using a Gentoo
livecd, and I could run Sarge in a chroot so I could work on a patch
myself.  Paddy de Burca gave me the confirmation that the problem was
related to the 970FX on the PowerMac7.3 platform of my new hardware.

So, though you've probably got it all from benh, here is what is
working for me right now. This is a patch against the clean Debian
2.6.8-10 kernel source package, which I then compiled with
kernel-package using the debian 2.6.8-10 kernel and 2.6.8-6 powerpc
patches using the power4-smp config (after fighting off #220389 in
kernel-package for a whole afternoon, but that is a different story).

I'm sure you will recognize each patch (I think all three are from
benh) so I'm not describing them.

I have not compiled a kernel in 3+ years, and it's been 5+ years since
I worked on ppc firmware, so I'm feeling quite pumped up even if all I
did was copy patches in a chrooted sarge install ;-) And my new
Christmas present is now running *Debian* on all CPUs <grins>

Cheers!
Shyamal

--- kernel-source-2.6.8-2.6.8/arch/ppc/kernel/cpu_setup_power4.S	2004-08-13 22:37:37.000000000 -0700
+++ kernel-source-2.6.8-custom.1.0/arch/ppc/kernel/cpu_setup_power4.S	2004-12-26 17:33:16.341931632 -0800
@@ -109,10 +109,12 @@
 	lis	r5,cpu_state_storage@h
 	ori	r5,r5,cpu_state_storage@l
 
-	/* We only deal with 970 for now */
+	/* Deal with both 970 and 970FX */
 	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 */
@@ -141,10 +143,12 @@
 	lis	r5,(cpu_state_storage-KERNELBASE)@h
 	ori	r5,r5,cpu_state_storage@l
 
-	/* We only deal with 970 for now */
+	/* Deal with both 970 and 970FX */
 	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 */
--- kernel-source-2.6.8-2.6.8/arch/ppc/kernel/cputable.c	2004-08-13 22:36:58.000000000 -0700
+++ kernel-source-2.6.8-custom.1.0/arch/ppc/kernel/cputable.c	2004-12-26 17:29:20.956715624 -0800
@@ -445,6 +445,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 */
--- kernel-source-2.6.8-2.6.8/arch/ppc/platforms/pmac_feature.c	2004-08-13 22:37:41.000000000 -0700
+++ kernel-source-2.6.8-custom.1.0/arch/ppc/platforms/pmac_feature.c	2004-12-26 16:14:34.000000000 -0800
@@ -2169,6 +2169,10 @@
 		PMAC_TYPE_POWERMAC_G5,		g5_features,
 		0,
 	},
+	{	"PowerMac7,3",			"PowerMac G5",
+		PMAC_TYPE_POWERMAC_G5,		g5_features,
+		0,
+	},
 #endif /* CONFIG_POWER4 */
 };
 



Reply to: