You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Apple silicon, use machdep.cpu.brand_string in preference to decoding hw.machine
This functionality was implemented in #65 ("Updated package.name to also
query machdep.cpu.brand_string if decode of hw.machine fails"), but then it was
omitted from the subsequent #100, probably inadvertently.
Adding that functionality back here, so that the package/device name can be
shown correctly on recent devices and macOS/iOS versions. I have reversed
the order so that `machdep.cpu.brand_string` is checked before attempting to
decode `hw.machine`, since the former appears to be more future-proof.
Before this change, on a recent MacBook Pro:
$ cpu-info
...
Debug (cpuinfo): hw.machine: arm64
Warning in cpuinfo: parsing "hw.machine" failed: Undefined error: 0
...
Packages:
0:
After this change:
$ cpu-info
...
Debug (cpuinfo): machdep.cpu.brand_string: Apple M2 Pro
...
Packages:
0: Apple M2 Pro
0 commit comments