Author Topic: Reduced CPU speeds.  (Read 2179 times)

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 466
  • New Member
Reduced CPU speeds.
« on: January 22, 2019, 03:21:34 AM »
OS 9 on unsupported 7447a CPU's maybe a little tricky.

It seems on portable models, the CPU multiplier boots in DFS mode, meaning reduced CPU speeds under OS 9, because we have no software to put the CPU in High Performance mode.

Specifically SPR 1009 ( HID1 ) bit 9.

Does anyone know of any OS 9 software that can read or write to SPR's?

Is there a way to set the SPR via Open Firmware?

If we had a way to set/unset this bit under OS 9, we could get the stealth upgrade 1.5 Ghz Mini to operate in DFS mode.

Desktop systems are not affected because the 7447a doesn't support 1/4 multipliers in DFS mode. Meaning if your desktop Mac has a CPU that is x.5 x the bus speed, it wouldn't support DFS, unless you changed the multiplier to be a whole number.

Also, the 1.5Ghz Mini would support DFS as the Multiplier is 9x 167, however it lacks PRIM_Info, so OS X won't show that option in the Energy Saver Control Panel.

Setting the correct bit in the PRIM_Info would make the option appear in OS X and OS 9, however OS 9 lacks any code for the 7447a, so it can't change the Performance Mode of the CPU.

Likely, if we knew more about the Apple CPU Plugin, we could patch it to support DFS on the 7447a.

If you have a 1.5Ghz Mini, running OS X, and you would like to test DFS, install CHUD Tools and use ReggieSE to set/unset bit 9 of HID1.
« Last Edit: January 22, 2019, 03:42:15 AM by darthnVader »

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 466
  • New Member
Re: Reduced CPU speeds.
« Reply #1 on: February 23, 2019, 07:42:36 AM »
Also, I can't say for sure, without digging in the Linux source code, but Portable systems with the 7447a would likely be operating at reduced speeds under Linux.

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 466
  • New Member
Re: Reduced CPU speeds.
« Reply #2 on: March 12, 2019, 12:44:19 PM »
This is now solved, all 7447a portable users under OS 9 can now use the CPU at 100% of it's rated clock speed.

Code: [Select]
dev /cpus/@0
set-dfs-high
bye

or add it to your nvramrc

Code: [Select]
nvedit
dev /cpus/@0
set-dfs-high
Ctrl+C
nvstore
setenv use-nvramrc? true
reset-all

OS 9 now runs 2x as fast at CPU tasks.

Offline Greystash

  • Consistant Contributor
  • ***
  • Posts: 51
  • New Member
Re: Reduced CPU speeds.
« Reply #3 on: March 12, 2019, 03:50:55 PM »
That's fantastic!! Great work :D

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 466
  • New Member
Re: Reduced CPU speeds.
« Reply #4 on: March 12, 2019, 05:48:25 PM »
Here are some benchmarks.

Time to boot 9.2.2, from boot chime to desktop, measured with stop watch.

DSF-Lo: 45 sec.

DFS-Hi: 33 sec.

Cinebench 2003:

Code: [Select]
CINEBENCH 2003 v1
****************************************************

Tester           : DarthnVader

Processor        : iBook G4
MHz              : 667 (DFS-Lo)
Number of CPUs   : 1
Operating System : 9.2.2

Graphics Card    : Radeon 9200 Mobility
Resolution       : 1024x768
Color Depth      : 32bit

****************************************************

Rendering (Single   CPU): 63 CB-CPU
Rendering (Multiple CPU): --- CB-CPU


Shading (CINEMA 4D)                : 81 CB-GFX
Shading (OpenGL Software Lighting) : 222 CB-GFX
Shading (OpenGL Hardware Lighting) : 228 CB-GFX

OpenGL Speedup: 2.82

****************************************************
CINEBENCH 2003 v1
****************************************************

Tester           : DarthnVader

Processor        : iBook G4
MHz              : 1333 (DFS-HI)
Number of CPUs   : 1
Operating System : 9.2.2

Graphics Card    : Radeon 9200 Mobility
Resolution       : 1024x768
Color Depth      : 32bit

****************************************************

Rendering (Single   CPU): 124 CB-CPU
Rendering (Multiple CPU): --- CB-CPU


Shading (CINEMA 4D)                : 146 CB-GFX
Shading (OpenGL Software Lighting) : 389 CB-GFX
Shading (OpenGL Hardware Lighting) : 388 CB-GFX

OpenGL Speedup: 2.67

****************************************************

Mac bench 5.0

Processor 1843 DFS-lo
Processor 3467 DFS-Hi

FPU  1660 DFS-Lo
FPU  3324 DFS-Hi

Altivec Fractional Demo Carbon

DFS-Lo ET 4.8 sec. 2773.7 MegaFlops
DFS-Hi ET 2.4 sec. 5547.5 MegaFlops
« Last Edit: March 12, 2019, 06:00:25 PM by darthnVader »

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 466
  • New Member
Re: Reduced CPU speeds.
« Reply #5 on: March 12, 2019, 08:22:40 PM »
3D game benchmarks:

JKII:

This game has always been CPU very bound on later GFX chips, based on Quake III Engine it should run very well on a Radeon 9200xxx.

Video Mode 1024x786 Full Screen
Geometric Detail High
Texture Detail High
Texture Quality 32-bit
Texture Filter TRILINEAR
Detail Shaders ON

More Video

Video Sync Off
Dynamic Lights On
Wall Marks On
Aniso Filter On


s_initsound 0 ( turn sound off )
snd_restart ( restart the sound subsystem )

timedemo 1
demo jk2ffa

FPS 53.9 ( no sound DFS-Hi )
FPS 41.7 ( Sound on DFS-Hi )

FPS 39.8 ( no sound DFS-Lo )
FPS 31.2 ( sound on DFS-Lo )


Quake III

Graphics:

Video Mode 1024x768 Full Screen
Color Depth 32bit
Lighting Vertex
Geometric Detail High
Texture Detail MAX
Texture Quality 32bit
Texture Filter Trilinear

s_initsound 0
snd_restart

timedemo 1
demo four

FPS 74.2 ( no sound DFS-Lo )
FPS 53.7 ( Sound on DFS-Lo )

FPS 78.2( no sound DFS-Hi )
FPS 71.0 ( Sound on DFS-Hi )

Offline Greystash

  • Consistant Contributor
  • ***
  • Posts: 51
  • New Member
Re: Reduced CPU speeds.
« Reply #6 on: March 15, 2019, 06:32:52 PM »
Hey darth,

Just wondering if you've tried this on a PowerBook G4? I can't seem to find any devices in the device tree that have the set-dfs-high property.
'dev /cpus/@0' doesn't exist on the PowerBook G4 5,2, so I looked in PowerPC,G4@0 and it's children but had no luck.

The only words/methods available for PowerPC,G4@0 are 'translate, modify, unmap, map, release, claim, close, open'

I tried copying the properties of the CPU (e.g. clock-frequeny, bus-frequency, processor-to-bus-ratio*2 etc.) to my boot script thinking that might persist them through boot but that hasn't worked either.

I can't remember how to dump the device tree with properties through OSX terminal and haven't had much luck with telnet so can't offer much more info yet.
Below are my current benchmarks all in comparison with the supported Quicksilver (which beats them all)

Maybe it's not possible on this model?

Offline Daniel

  • Silver Member
  • ****
  • Posts: 220
  • Programmer, Hacker, Thinker
Re: Reduced CPU speeds.
« Reply #7 on: March 15, 2019, 07:44:35 PM »
How's this?
Code: [Select]
code hid1@
969ffffc , \ stwu r20 -4(r31)
7e91faa6 , \ mfspr r20,1009
4e800020 , \ blr
end-code

code hid1!
7e91fba6 , \ mtspr 1009,r20
869f0004 , \ lwzu r20, 4(r31)
4e800020 , \ blr
end-code

: set-dfs-high
hid1@ 400000 or hid1!
;

I believe this will work, but I suggest being careful with it.

Here is the forum post where I was told the OF register assignments.
http://macos9lives.com/smforum/index.php/topic,3884.msg26861.html#msg26861

Offline Greystash

  • Consistant Contributor
  • ***
  • Posts: 51
  • New Member
Re: Reduced CPU speeds.
« Reply #8 on: March 16, 2019, 12:38:06 AM »
Doesn't seem to be doing anything, I've tried entering this directly into OFW then booting, pasting into my boot script, and adding to the nvram but haven't had any luck. Is there a different way I'm supposed to be entering this?

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 466
  • New Member
Re: Reduced CPU speeds.
« Reply #9 on: March 16, 2019, 01:22:45 AM »
Hey darth,

Just wondering if you've tried this on a PowerBook G4? I can't seem to find any devices in the device tree that have the set-dfs-high property.
'dev /cpus/@0' doesn't exist on the PowerBook G4 5,2, so I looked in PowerPC,G4@0 and it's children but had no luck.

The only words/methods available for PowerPC,G4@0 are 'translate, modify, unmap, map, release, claim, close, open'

I tried copying the properties of the CPU (e.g. clock-frequeny, bus-frequency, processor-to-bus-ratio*2 etc.) to my boot script thinking that might persist them through boot but that hasn't worked either.

I can't remember how to dump the device tree with properties through OSX terminal and haven't had much luck with telnet so can't offer much more info yet.
Below are my current benchmarks all in comparison with the supported Quicksilver (which beats them all)

Maybe it's not possible on this model?

The Powerbook5,2 and also the PowerBook5,3 use the mpc7447, not the mpc7447a, only the 7447a and 7448 support Dynamic frequency switching.

Your Powerbook with the 1.83Ghz G4 should be a 7447a @11x167mhz, it is likely booting in DFS mode, 5.5x167mhz.

Enter a telnet session and give us the results of:

Code: [Select]
Trying 10.1.2.3...
Connected to 10.1.2.3.
Escape character is '^]'.
 ok
0 > dev /cpus/@0  ok
0 > .properties
name                    PowerPC,G4
                         
device_type             cpu
reg                     00000000 
cpu-version             80030102
state                   running
clock-frequency         4f790d52
bus-frequency           07f010eb
config-bus-frequency    07e8fe70
timebase-frequency      01194000
reservation-granule-size00000020
tlb-sets                00000040
tlb-size                00000080
d-cache-size            00008000
i-cache-size            00008000
d-cache-sets            00000080
i-cache-sets            00000080
i-cache-block-size      00000020
d-cache-block-size      00000020
graphics               
performance-monitor       
altivec                 
data-streams           
dcba                   
dcbz                    00000020
l2-cache                ff893288
l2cr                    80000000
processor-to-bus-ratio*200000014
rounded-clock-frequency 4f64b500
recalced-clock-frequency4f60a92e
dynamic-power-step     
existing                00000000 80000000 80000000 80000000
available               00003000 7fffd000 d0000000 20000000
translations            00000000 00003000 00000000 00000010 80000000 00080000
                        80000000 00000028 80081000 00001000 80081000 00000028
                        80082000 00001000 80082000 00000028 80083000 00001000
                        80083000 00000028 f0000000 00010000 f0000000 00000028
                        f0800000 00001000 f0800000 00000028 f0c00000 00001000
                        f0c00000 00000028 f2000000 00010000 f2000000 00000028
                        f2800000 00001000 f2800000 00000028 f2c00000 00001000
                        f2c00000 00000028 f4000000 00010000 f4000000 00000028
                        f4800000 00001000 f4800000 00000028 f4c00000 00001000
                        f4c00000 00000028 f5000000 00001000 f5000000 00000028
                        f5200000 00200000 f5200000 00000028
                        ... 00000160 bytes total
cpu-info                8410c0bc 80000000 80030102 00000000 00000000 00000000
                        00000000 00000000
soft-reset              0000005b

 ok
0 > spd 70  pll-ratio*2 = 20  HID1 = 80015c80  DelayAACK = 0  GPIO1 = 7 BusClk = 133173483  ok
0 > words

translate       modify          unmap           map             release
claim           set-dfs-low     set-dfs-high    spd             close
open  ok
« Last Edit: March 16, 2019, 01:42:07 AM by darthnVader »

Offline Daniel

  • Silver Member
  • ****
  • Posts: 220
  • Programmer, Hacker, Thinker
Re: Reduced CPU speeds.
« Reply #10 on: March 16, 2019, 05:36:24 AM »
Having my code not work because it is impossible to do it, that's the best way to fail.

Just out of curiosity, would it have actually worked on a real 7447a?

This is the first time I have tried to actually use custom assembly in OF.

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 466
  • New Member
Re: Reduced CPU speeds.
« Reply #11 on: March 16, 2019, 07:33:39 AM »
Having my code not work because it is impossible to do it, that's the best way to fail.

Just out of curiosity, would it have actually worked on a real 7447a?

This is the first time I have tried to actually use custom assembly in OF.

Doesn't appear to work.

Code: [Select]
Trying 10.1.2.3...
Connected to 10.1.2.3.
Escape character is '^]'.
 ok
0 > dev /cpus/@0  ok
0 > code hid1@  ok
0 > 969ffffc , \ stwu r20 -4(r31)  ok
0 > 7e91faa6 , \ mfspr r20,1009  ok
0 > 4e800020 , \ blr  ok
0 > end-code  ok
0 >   ok
0 > code hid1!  ok
0 > 7e91fba6 , \ mtspr 1009,r20  ok
0 > 869f0004 , \ lwzu r20, 4(r31)  ok
0 > 4e800020 , \ blr  ok
0 > end-code  ok
0 >   ok
0 > : set-dfs-hi  ok
0 ] hid1@ 400000 or hid1!  ok
0 ] ;  ok
0 > spd 140  pll-ratio*2 = 10  HID1 = 80416c80  DelayAACK = 0  GPIO1 = 4 BusClk = 133173712  ok
0 > set-dfs-hi  ok
0 > spd 139  pll-ratio*2 = 10  HID1 = 80416c80  DelayAACK = 0  GPIO1 = 4 BusClk = 133173712  ok
0 > words

set-dfs-hi      hid1!           hid1@           translate       modify
unmap           map             release         claim           set-dfs-low
set-dfs-high    spd             close           open  ok
0 > see set-dfs-hi
:
set-dfs-hi               
  hid1@ 400000 or hid1! ; ok
0 >

As apposed to:

Code: [Select]
0 > see set-dfs-high
:
set-dfs-high             
  pvr@ 10 rshift 8003 <> if
    exit
    else
    5 1 gpio! 1 ms hid1@ 1 1f 9 - lshift andc hid1!
    then
  ; ok
0 >

This works tho:

Code: [Select]
: set-dfs-higher  ok
6 ] pvr@ 10 rshift 8003 <> if  ok
7 ] exit  ok
7 ] else  ok
7 ] 5 1 gpio! 1 ms hid1@ 1 1f 9 - lshift andc hid1!  ok
7 ] then  ok
6 ] ;  ok
6 > words

set-dfs-higher  set-dfs-hi      hid1!           hid1@           translate
modify          unmap           map             release         claim
set-dfs-low     set-dfs-high    spd             close           open  ok
6 > spd 70  pll-ratio*2 = 20  HID1 = 80015c80  DelayAACK = 0  GPIO1 = 7 BusClk = 133173712  ok
6 > set-dfs-higher  ok
6 > spd 70  pll-ratio*2 = 20  HID1 = 80015c80  DelayAACK = 0  GPIO1 = 7 BusClk = 133173712  ok
6 > set-dfs-low  ok
6 > spd 139  pll-ratio*2 = 10  HID1 = 80416c80  DelayAACK = 0  GPIO1 = 4 BusClk = 133173712  ok
6 > set-dfs-higher  ok
6 > spd 69  pll-ratio*2 = 20  HID1 = 80015c80  DelayAACK = 0  GPIO1 = 7 BusClk = 133173712  ok
6 >

Offline Daniel

  • Silver Member
  • ****
  • Posts: 220
  • Programmer, Hacker, Thinker
Re: Reduced CPU speeds.
« Reply #12 on: March 16, 2019, 09:44:13 AM »
That's why it didn't work. Setting bit 9 slows the processor down. I needed to clear it.
Code: [Select]
code hid1@
969ffffc , \ stwu r20 -4(r31)
7e91faa6 , \ mfspr r20,1009
4e800020 , \ blr
end-code

code hid1!
7e91fba6 , \ mtspr 1009,r20
869f0004 , \ lwzu r20, 4(r31)
4e800020 , \ blr
end-code

: set-dfs-high
hid1@ 400000 andc hid1!
;
: set-dfs-low
hid1@ 400000 or hid1!
;
This is why I should really have looked up hid1 bit 9 before I wrote the code snippet  :-[

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 466
  • New Member
Re: Reduced CPU speeds.
« Reply #13 on: March 16, 2019, 01:29:33 PM »
That's why it didn't work. Setting bit 9 slows the processor down. I needed to clear it.
Code: [Select]
code hid1@
969ffffc , \ stwu r20 -4(r31)
7e91faa6 , \ mfspr r20,1009
4e800020 , \ blr
end-code

code hid1!
7e91fba6 , \ mtspr 1009,r20
869f0004 , \ lwzu r20, 4(r31)
4e800020 , \ blr
end-code

: set-dfs-high
hid1@ 400000 andc hid1!
;
: set-dfs-low
hid1@ 400000 or hid1!
;
This is why I should really have looked up hid1 bit 9 before I wrote the code snippet  :-[

Nope, set-dfs-high locks up the system.

It may help to add a 1 ms delay?
« Last Edit: March 16, 2019, 02:43:36 PM by darthnVader »

Offline Greystash

  • Consistant Contributor
  • ***
  • Posts: 51
  • New Member
Re: Reduced CPU speeds.
« Reply #14 on: March 16, 2019, 03:29:01 PM »
I've tried adding both of these solutions but haven't had any luck. Daniel - booting after your script everything works ok but there is no difference in speed/benchmarks. darthnVader - everything works until I get to the following line:
Code: [Select]
spd 70  pll-ratio*2 = 20  HID1 = 80015c80  DelayAACK = 0  GPIO1 = 7 BusClk = 133173712 I get the result:
Code: [Select]
spd, unknown word
Both methods result in the set-dfs-high methods being added to the CPU package but there is no effect after invoking them and booting.

Here's the CPU properties of my machine:

Code: [Select]
0 > dev /cpus/@0  ok
0 > .properties
name                    PowerPC,G4
                         
device_type             cpu
reg                       
                        00000000 
cpu-version               
                        80020101
state                   running
clock-frequency           
                        3b9ac9fc
bus-frequency             
                        09ef21aa
config-bus-frequency     
                        09ef21aa
timebase-frequency       
                        01194000
reservation-granule-size 
                        00000020
tlb-sets                 
                        00000040
tlb-size                 
                        00000080
d-cache-size             
                        00008000
i-cache-size             
                        00008000
d-cache-sets             
                        00000080
i-cache-sets             
                        00000080
i-cache-block-size       
                        00000020
d-cache-block-size       
                        00000020
graphics                 
performance-monitor       
altivec                   
data-streams             
dcba                     
dcbz                     
                        00000020
l2-cache                 
                        ff8871f8
l2cr                     
                        80000000
bus-frequencies           
                        09ef21aa
                        06146580
processor-to-bus-ratio*2 
                        0000000c
rounded-clock-frequency   
                        3b9aca00
recalced-clock-frequency 
                        3b9ac9fc
dynamic-power-step       
existing                 
                        00000000 80000000 80000000 80000000
available                 
                        00003000 7fffd000 d0000000 20000000
translations             
                        00000000  00003000 00000000 00000010 80000000 00080000
                        80000000 00000028 8ffff000 00001000 8ffff000 00000028
                        a0002000 00001000 a0002000 00000028  a0003000 00001000
                        a0003000 00000028 a0004000 00001000 a0004000 00000028
                        f0000000 00010000 f0000000 00000028 f0800000 00001000
                        f0800000 00000028 f0c00000 00001000 f0c00000 00000028
                        f2000000 00010000 f2000000 00000028 f2800000 00001000
                        f2800000 00000028 f2c00000 00001000 f2c00000 00000028
                        f4000000 00010000 f4000000 00000028 f4800000 00001000
                        f4800000 00000028 f4c00000 00001000 f4c00000 00000028
                        f5000000 00001000 f5000000 00000028
                        ... 00000160 bytes total
cpu-info                 
                        8410c09c 80000000 80020101 00000000 00000000 00000000
                        00000000 00000000



0 > spd 70  pll-ratio*2 = 20  HID1 = 80015c80  DelayAACK = 0  GPIO1 = 7 BusClk = 133173483
spd, unknown word
 ok

0 > words

translate                 modify                    unmap                     map                       release                   
claim                     close                     open

Offline Daniel

  • Silver Member
  • ****
  • Posts: 220
  • Programmer, Hacker, Thinker
Re: Reduced CPU speeds.
« Reply #15 on: March 16, 2019, 04:21:11 PM »
That's why it didn't work. Setting bit 9 slows the processor down. I needed to clear it.
Code: [Select]
code hid1@
969ffffc , \ stwu r20 -4(r31)
7e91faa6 , \ mfspr r20,1009
4e800020 , \ blr
end-code

code hid1!
7e91fba6 , \ mtspr 1009,r20
869f0004 , \ lwzu r20, 4(r31)
4e800020 , \ blr
end-code

: set-dfs-high
hid1@ 400000 andc hid1!
;
: set-dfs-low
hid1@ 400000 or hid1!
;
This is why I should really have looked up hid1 bit 9 before I wrote the code snippet  :-[

Nope, set-dfs-high locks up the system.

It may help to add a 1 ms delay?
So that gpio stuff is important?
Code: [Select]
5 1 gpio!There are several ways those stack values could be interpreted.
Some day I want to just disassemble the OF rom into buildable forth source. It would make a lot of stuff clearer.

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 466
  • New Member
Re: Reduced CPU speeds.
« Reply #16 on: March 16, 2019, 05:30:31 PM »
I've tried adding both of these solutions but haven't had any luck. Daniel - booting after your script everything works ok but there is no difference in speed/benchmarks. darthnVader - everything works until I get to the following line:
Code: [Select]
spd 70  pll-ratio*2 = 20  HID1 = 80015c80  DelayAACK = 0  GPIO1 = 7 BusClk = 133173712 I get the result:
Code: [Select]
spd, unknown word
Both methods result in the set-dfs-high methods being added to the CPU package but there is no effect after invoking them and booting.

Here's the CPU properties of my machine:

Code: [Select]
0 > dev /cpus/@0  ok
0 > .properties
name                    PowerPC,G4
                         
device_type             cpu
reg                       
                        00000000 
cpu-version               
                        80020101
state                   running
clock-frequency           
                        3b9ac9fc
bus-frequency             
                        09ef21aa
config-bus-frequency     
                        09ef21aa
timebase-frequency       
                        01194000
reservation-granule-size 
                        00000020
tlb-sets                 
                        00000040
tlb-size                 
                        00000080
d-cache-size             
                        00008000
i-cache-size             
                        00008000
d-cache-sets             
                        00000080
i-cache-sets             
                        00000080
i-cache-block-size       
                        00000020
d-cache-block-size       
                        00000020
graphics                 
performance-monitor       
altivec                   
data-streams             
dcba                     
dcbz                     
                        00000020
l2-cache                 
                        ff8871f8
l2cr                     
                        80000000
bus-frequencies           
                        09ef21aa
                        06146580
processor-to-bus-ratio*2 
                        0000000c
rounded-clock-frequency   
                        3b9aca00
recalced-clock-frequency 
                        3b9ac9fc
dynamic-power-step       
existing                 
                        00000000 80000000 80000000 80000000
available                 
                        00003000 7fffd000 d0000000 20000000
translations             
                        00000000  00003000 00000000 00000010 80000000 00080000
                        80000000 00000028 8ffff000 00001000 8ffff000 00000028
                        a0002000 00001000 a0002000 00000028  a0003000 00001000
                        a0003000 00000028 a0004000 00001000 a0004000 00000028
                        f0000000 00010000 f0000000 00000028 f0800000 00001000
                        f0800000 00000028 f0c00000 00001000 f0c00000 00000028
                        f2000000 00010000 f2000000 00000028 f2800000 00001000
                        f2800000 00000028 f2c00000 00001000 f2c00000 00000028
                        f4000000 00010000 f4000000 00000028 f4800000 00001000
                        f4800000 00000028 f4c00000 00001000 f4c00000 00000028
                        f5000000 00001000 f5000000 00000028
                        ... 00000160 bytes total
cpu-info                 
                        8410c09c 80000000 80020101 00000000 00000000 00000000
                        00000000 00000000



0 > spd 70  pll-ratio*2 = 20  HID1 = 80015c80  DelayAACK = 0  GPIO1 = 7 BusClk = 133173483
spd, unknown word
 ok

0 > words

translate                 modify                    unmap                     map                       release                   
claim                     close                     open

That's not the PVR of a 7447a, code is never going to work for that CPU.

Offline darthnVader

  • Gold Member
  • *****
  • Posts: 466
  • New Member
Re: Reduced CPU speeds.
« Reply #17 on: March 16, 2019, 05:32:10 PM »
That's why it didn't work. Setting bit 9 slows the processor down. I needed to clear it.
Code: [Select]
code hid1@
969ffffc , \ stwu r20 -4(r31)
7e91faa6 , \ mfspr r20,1009
4e800020 , \ blr
end-code

code hid1!
7e91fba6 , \ mtspr 1009,r20
869f0004 , \ lwzu r20, 4(r31)
4e800020 , \ blr
end-code

: set-dfs-high
hid1@ 400000 andc hid1!
;
: set-dfs-low
hid1@ 400000 or hid1!
;
This is why I should really have looked up hid1 bit 9 before I wrote the code snippet  :-[

Nope, set-dfs-high locks up the system.

It may help to add a 1 ms delay?
So that gpio stuff is important?
Code: [Select]
5 1 gpio!There are several ways those stack values could be interpreted.
Some day I want to just disassemble the OF rom into buildable forth source. It would make a lot of stuff clearer.

Must have something to do with the GPIO code, but I'm not sure what it does.

Offline Greystash

  • Consistant Contributor
  • ***
  • Posts: 51
  • New Member
Re: Reduced CPU speeds.
« Reply #18 on: March 17, 2019, 01:37:44 PM »

The Powerbook5,2 and also the PowerBook5,3 use the mpc7447, not the mpc7447a, only the 7447a and 7448 support Dynamic frequency switching.

Your Powerbook with the 1.83Ghz G4 should be a 7447a @11x167mhz, it is likely booting in DFS mode, 5.5x167mhz.

Ah bugger, sorry I misread this..

I'll keep this bookmarked anyway in case we get trackpad support for these models in the future. Thanks for trying!