Author Topic: Building a custom Mac OS ROM.  (Read 12311 times)

Offline ELN

  • Gold Member
  • *****
  • Posts: 295
  • new to the forums
Re: Building a custom Mac OS ROM.
« Reply #20 on: January 18, 2019, 04:54:39 AM »
Looks like Tanzania. Any match with a known cpup binary?

Offline darthnVader

  • Platinum Member
  • *****
  • Posts: 679
  • New Member
Re: Building a custom Mac OS ROM.
« Reply #21 on: March 06, 2021, 04:47:15 AM »
Code: [Select]
kPMHasVStepSpeedChangeMask   = (1<<17), // 1=machine supports processor voltage/clock change
0x202D607

On the iBook, this bit is set, an causing the Apple CPU Plugin to lock up our system, not surprising as Mac OS 9 doesn't know how to treat the DFS modes of the 7447a, but disabling this bit should not change sleep behavior for OS 9 on our iBook G4( 7447a ), it just allows the CPU Plugin to load correctly.

I have the iBook entering sleep, but crashing coming out of sleep.




Offline darthnVader

  • Platinum Member
  • *****
  • Posts: 679
  • New Member
Re: Building a custom Mac OS ROM.
« Reply #22 on: March 07, 2021, 02:55:59 AM »
This last little 24 bit word in the prim-info has me confused( 101400 ), we don't know what it does, but why is it only 24bits, and how do we write it to the " prim-info" property as a 24bit word?

Code: [Select]
/pci@f2000000/mac-io@17/via-pmu@16000/power-mgt/prim-info
    0000000: 000000ff 00000060 00003e80 00017fb5 0202d607 00000000 00011300 46000220  .......`..>.................F..
    0000020: 101400       

Writing 101400 as encode-int just makes it a 32bit word 00101400?

Offline Daniel

  • Gold Member
  • *****
  • Posts: 300
  • Programmer, Hacker, Thinker
Re: Building a custom Mac OS ROM.
« Reply #23 on: March 07, 2021, 07:23:52 AM »
Yeah, OF doesn't provide tools to directly encode things smaller than 32-bits. You have to use quoted strings and encode-bytes.

Code: [Select]
" "(000000ff 00000060 00003e80 00017fb5 0202d607 00000000 00011300 46000220 101400)" encode-bytes

If you want one 32-bit value in particular to be done with encode-int, you can.

Code: [Select]
true if 0202d607 else 0200d607 then
" "(000000ff 00000060 00003e80 00017fb5)" encode-bytes
rot encode-int encode+
" "(00000000 00011300 46000220 101400)" encode-bytes encode+

Offline darthnVader

  • Platinum Member
  • *****
  • Posts: 679
  • New Member
Re: Building a custom Mac OS ROM.
« Reply #24 on: March 08, 2021, 04:22:39 AM »
Yeah, OF doesn't provide tools to directly encode things smaller than 32-bits. You have to use quoted strings and encode-bytes.

Code: [Select]
" "(000000ff 00000060 00003e80 00017fb5 0202d607 00000000 00011300 46000220 101400)" encode-bytes

If you want one 32-bit value in particular to be done with encode-int, you can.

Code: [Select]
true if 0202d607 else 0200d607 then
" "(000000ff 00000060 00003e80 00017fb5)" encode-bytes
rot encode-int encode+
" "(00000000 00011300 46000220 101400)" encode-bytes encode+

Thanks Daniel,

That worked just fine.

I found that bit 17 can be enabled if we disable bit 4 of the PUBLIC power management features:

Code: [Select]
kPMHasReducedSpeedMask       = (1<<4),  // 1=supports reduced processor speed
That makes sense as OS 9's CPU Plugin doesn't know what to do with DFS mode, but I also found that this bit is enabled for the 7455 on a PowerBook G4 867Mhz 7455:

Code: [Select]
prim-info               000000ff 00000060 00003e80 00017fb5 0002d607 00000000
                        00011300 46000220

I don't understand that, as the 7455 doesn't really support reduced processor speeds, the only thing I can think of is this somehow has to do with disabling the CPU's PLL for deep sleep, and that may explain why we are crashing on sleep exit on the 7447a as the PLL should also be disabled when we are in deep sleep, tho I'm not sure the deference between "sleep" and deep sleep from the data sheets of the 7455 and 7474a.

It looks like to me that both need the PLL disabled for deep sleep and both need the PLL re-enabled the same way, could someone with a little more knowledge look at the data sheets and see if the 7447a and 7455 both share the same routines for entry and exit of deep sleep?

 


Offline MacTron

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2116
  • keep it simple
Re: Building a custom Mac OS ROM.
« Reply #25 on: March 13, 2021, 06:30:43 AM »

On the iBook, this bit is set, an causing the Apple CPU Plugin to lock up our system, not surprising as Mac OS 9 doesn't know how to treat the DFS modes of the 7447a, but disabling this bit should not change sleep behavior for OS 9 on our iBook G4( 7447a ), it just allows the CPU Plugin to load correctly.

I have the iBook entering sleep, but crashing coming out of sleep.

Any luck with this?
Aside the sleep management, solving the Apple CPU Plugin compatibility issues with 7447 and 7448 probably will fix dual CPUs support.
« Last Edit: March 13, 2021, 08:23:10 AM by MacTron »
Please don't PM about things that are not private.

Offline Jubadub

  • Gold Member
  • *****
  • Posts: 326
  • New Member
Re: Building a custom Mac OS ROM.
« Reply #26 on: March 13, 2021, 01:42:43 PM »

On the iBook, this bit is set, an causing the Apple CPU Plugin to lock up our system, not surprising as Mac OS 9 doesn't know how to treat the DFS modes of the 7447a, but disabling this bit should not change sleep behavior for OS 9 on our iBook G4( 7447a ), it just allows the CPU Plugin to load correctly.

I have the iBook entering sleep, but crashing coming out of sleep.

Any luck with this?
Aside the sleep management, solving the Apple CPU Plugin compatibility issues with 7447 and 7448 probably will fix dual CPUs support.
Do you know if this dual CPU issue also applies to the 7457, @MacTron?

But yes, it would be great to have this fixed.

Offline darthnVader

  • Platinum Member
  • *****
  • Posts: 679
  • New Member
Re: Building a custom Mac OS ROM.
« Reply #27 on: March 14, 2021, 03:12:32 AM »

On the iBook, this bit is set, an causing the Apple CPU Plugin to lock up our system, not surprising as Mac OS 9 doesn't know how to treat the DFS modes of the 7447a, but disabling this bit should not change sleep behavior for OS 9 on our iBook G4( 7447a ), it just allows the CPU Plugin to load correctly.

I have the iBook entering sleep, but crashing coming out of sleep.

Any luck with this?
Aside the sleep management, solving the Apple CPU Plugin compatibility issues with 7447 and 7448 probably will fix dual CPUs support.

Daystar made a dual 7457 for tower AGP G4's, and also there is the XLR8 CPU Plugin, we're going to have to compare the Sonnet CPU Plugin, the XLR8, and the Apple one and see if there is anything we can learn without trying to reverse the source code.

Offline MacTron

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2116
  • keep it simple
Re: Building a custom Mac OS ROM.
« Reply #28 on: March 14, 2021, 08:53:01 AM »
Do you know if this dual CPU issue also applies to the 7457, @MacTron?
Yes, I'm pretty sure.

Daystar made a dual 7457 for tower AGP G4's, and also there is the XLR8 CPU Plugin, we're going to have to compare the Sonnet CPU Plugin, the XLR8, and the Apple one and see if there is anything we can learn without trying to reverse the source code.
Yes, that's a good starting point. There is some rumors that Sonnet pacht the Apple CPU plugin to fix 7447 dual compatibility. But I couldn't find any evidence of this. May be they patch ohter System or ROM resources...
I had tried all cpu software I could find (XLR8, Sonnet, Apple...) but I couldn't make my dual 7448 work as dual in Mac Os 9.
Please don't PM about things that are not private.