[PATCH] Fix running in G4 mode


Subject: [PATCH] Fix running in G4 mode
From: Benjamin Herrenschmidt (benh@kernel.crashing.org)
Date: Sat Nov 24 2001 - 09:20:48 MST


Hi Samuel !

I noticed that MOL .61 is always running in G3 mode (no altivec). I tracked
that down to a bug in molcpu loop for matching against the current PVR which
will always stop on entry 0.

MOL is running fine in G4 mode on my 7450 (I didn't try letting macos know
it's a 7450, I only expose a 7400 for now).

Here's a patch:

===== emulation/molcpu.c 1.14 vs edited =====
--- 1.14/emulation/molcpu.c Sun Jun 24 18:24:14 2001
+++ edited/emulation/molcpu.c Sat Nov 24 17:15:52 2001
@@ -184,9 +184,9 @@
         // Don't clear mregs here. Some fields (in particular mregs->interrupt)
         // are already in use at this point.
 
- mregs->no_altivec = get_bool_res("disable_altivec")==1;
+ mregs->no_altivec = (get_bool_res("disable_altivec")==1);
         for(ci=&cpu_info[0]; ci->id && ci->id != pvr; ci++ )
- break;
+ ;
         if( ci->id )
                 mregs->no_altivec |= !ci->altivec;
         else {
@@ -236,6 +236,7 @@
                 {8, "ppc750_cpu"},
                 {0xc, "ppc7400_cpu"},
                 {0x800c,"ppc7410_cpu"},
+ {0x8000,"ppc7450_cpu"},
                 {0,NULL}
         }, *ci;
         mol_device_node_t *hw_dn, *dn, *par;



This archive was generated by hypermail 2a24 : Sat Nov 24 2001 - 09:34:03 MST