* TinkerDifferent *
Retro Computing Community
Home | Forums | What's New | Search | Settings
Tool to read the complete CPU type (PPC)?

Forums > Vintage Apple > Software & Operating Systems

ApfelKlassik.de
New Tinkerer
--------
Joined: Nov 7, 2022
Posts: 28
Likes: 7
Mar 22, 2023 - #1
Hi folks,

is there a way to actually read the complete CPU type from the OS (and prevent disassembling machines to the CPU level ...)?

hw.cputype and cpusubtype only get down to eg. PowerPC - 7400, what about "reading" e.g. 7447a?

(In case you ask "why"? There are conflicting entries on different sources matching machines with "full cpu type" ...)

Thanks!

joevt
Tinkerer
--------
Joined: Mar 5, 2023
Posts: 218
Likes: 85
Mar 22, 2023 - #2
The pvr (Processor Version Register) of the PowerPC CPU has the info.
https://pearpc.sourceforge.net/pvr.html

I think reading directly from the pvr in OS X or OS 9 requires a supervisor mode instruction which is difficult to do so I get the value from the registry instead. Open Firmware reads the pvr and stores it as a property named cpu-version in the CPU device. You can get the value from the IO Registry in OS X or NameRegistry in OS 9.

I added some code to my fork of XPostFacto to do that. I haven't checked in all my updates yet so I wouldn't try compiling it.
https://github.com/joevt/XPostFacto/blob/master/XPostFacto/Model/Device/CPUDevice.cpp
https://github.com/joevt/XPostFacto...f856/XPostFacto/Model/MountedVolume.cpp#L1547

Is there a sysctl -a result that looks like the cpu-version value?

Liked by Kai Robinson

Certificate of Excellence
Active Tinkerer
United Sates
--------
Joined: Nov 1, 2021
Posts: 765
Likes: 530
Mar 22, 2023 - #3
I use hostinfo in terminal


or machine to find cpu type.
Attachments:
hostinfo Terminal1.jpg [View]

ApfelKlassik.de
New Tinkerer
--------
Joined: Nov 7, 2022
Posts: 28
Likes: 7
Mar 22, 2023 - #4
Thanks folks!

@Certificate of Excellence hostinfo does only give a translation of "subtype" ... so 7400 - even if it's a 7447a. Will have a look at machine.
@joevt great! Will have a look at the code.
And thanks a lot for the link to the PVR list - the Rev. shown in there actually corresponds with the "number" shown in the system profiler - so case solved from that angle.

ApfelKlassik.de
New Tinkerer
--------
Joined: Nov 7, 2022
Posts: 28
Likes: 7
Mar 22, 2023 - #5

Certificate of Excellence
Active Tinkerer
United Sates
--------
Joined: Nov 1, 2021
Posts: 765
Likes: 530
Mar 22, 2023 - #6
>> ApfelKlassik.de said:
Thanks folks! @Certificate of Excellence hostinfo does only give a translation of "subtype" ... so 7400 - even if it's a 7447a. Will have a look at machine. @joevt great! Will have a look at the code. And thanks a lot for the link to the PVR list - the Rev. shown in there actually corresponds with the "number" shown in the system profiler - so case solved from that angle. Click to expand...
Yep, my suggestions fall short of what you are looking for. Best of luck to you. :)

ApfelKlassik.de
New Tinkerer
--------
Joined: Nov 7, 2022
Posts: 28
Likes: 7
Mar 23, 2023 - #7
And here comes the on-board solution:

ioreg -l | grep cpu-version Click to expand...

So I guess I will make a poll to collect actual information calling all G4 users to submit information which I collect and then publish.

Example ... my G4 Ti-Book (A1001, EMC1913, 667MHz) does report 0x80010201, which makes it a PPC 7445 (v2.1)

Mactracker incorrectly states 7455 (v2.1) (even if there might have been issues using 7455, the number would be 3.2/3/4)
Everymac incorrectly states 7451

Page 1 of 1

Home | Forums | What's New | Search | Bookmarks | RSS | Original | Settings
XenForo Retro Proxy by TinkerDifferent.com