Dr-Noob / cpufetch

Simple yet fancy CPU architecture fetching tool
GNU General Public License v2.0
1.82k stars 99 forks source link

Support Apple Silicon virtualized processor #229

Open pthariensflame opened 4 months ago

pthariensflame commented 4 months ago

Running in a Fedora VM under macOS (via UTM in Virtualization.framework mode) results in the following output:

ERROR]: Unknown microarchitecture detected: IM=0x61 P=0x0 V=0x0 R=0x0
[VERSION]: cpufetch v1.05 (Linux ARM build)
Please, create a new issue with this error message, your smartphone/computer model, the output of 'cpufetch --verbose' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues

                                                            SoC:                 Unknown
                                                            Technology:          Unknown
                                                            Microarchitecture:   Unknown
                                                            Max Frequency:       Unknown
                                                            Cores:               12 cores
                                                            Features:            NEON,SHA1,SHA2,AES,CRC32
                                                            Peak Performance:    Unknown

cpufetch --verbose:

[WARNING]: Could not open '/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq'
[WARNING]: Unable to fetch max frequency for core 0. This is probably because the core is offline
[WARNING]: Could not open '/sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_max_freq'
[WARNING]: Unable to fetch max frequency for core 1. This is probably because the core is offline
[WARNING]: Could not open '/sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_max_freq'
[WARNING]: Unable to fetch max frequency for core 2. This is probably because the core is offline
[WARNING]: Could not open '/sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_max_freq'
[WARNING]: Unable to fetch max frequency for core 3. This is probably because the core is offline
[WARNING]: Could not open '/sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_max_freq'
[WARNING]: Unable to fetch max frequency for core 4. This is probably because the core is offline
[WARNING]: Could not open '/sys/devices/system/cpu/cpu5/cpufreq/cpuinfo_max_freq'
[WARNING]: Unable to fetch max frequency for core 5. This is probably because the core is offline
[WARNING]: Could not open '/sys/devices/system/cpu/cpu6/cpufreq/cpuinfo_max_freq'
[WARNING]: Unable to fetch max frequency for core 6. This is probably because the core is offline
[WARNING]: Could not open '/sys/devices/system/cpu/cpu7/cpufreq/cpuinfo_max_freq'
[WARNING]: Unable to fetch max frequency for core 7. This is probably because the core is offline
[WARNING]: Could not open '/sys/devices/system/cpu/cpu8/cpufreq/cpuinfo_max_freq'
[WARNING]: Unable to fetch max frequency for core 8. This is probably because the core is offline
[WARNING]: Could not open '/sys/devices/system/cpu/cpu9/cpufreq/cpuinfo_max_freq'
[WARNING]: Unable to fetch max frequency for core 9. This is probably because the core is offline
[WARNING]: Could not open '/sys/devices/system/cpu/cpu10/cpufreq/cpuinfo_max_freq'
[WARNING]: Unable to fetch max frequency for core 10. This is probably because the core is offline
[WARNING]: Could not open '/sys/devices/system/cpu/cpu11/cpufreq/cpuinfo_max_freq'
[WARNING]: Unable to fetch max frequency for core 11. This is probably because the core is offline
[ERROR]: Unknown microarchitecture detected: IM=0x61 P=0x0 V=0x0 R=0x0
[VERSION]: cpufetch v1.05 (Linux ARM build)
Please, create a new issue with this error message, your smartphone/computer model, the output of 'cpufetch --verbose' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues
[WARNING]: Could not open '/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq'
[WARNING]: SoC detection failed using /proc/cpuinfo: No string found
[WARNING]: read_file: /sys/bus/nvmem/devices/rockchip-efuse0/nvmem: No such file or directory
[WARNING]: read_file: /sys/bus/nvmem/devices/rockchip-otp0/nvmem: No such file or directory

                                                            SoC:                 Unknown
                                                            Technology:          Unknown
                                                            Microarchitecture:   Unknown
                                                            Max Frequency:       Unknown
                                                            Cores:               12 cores
                                                            Features:            NEON,SHA1,SHA2,AES,CRC32
                                                            Peak Performance:    Unknown

cpufetch --debug:

[ERROR]: Unknown microarchitecture detected: IM=0x61 P=0x0 V=0x0 R=0x0
[VERSION]: cpufetch v1.05 (Linux ARM build)
Please, create a new issue with this error message, your smartphone/computer model, the output of 'cpufetch --verbose' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues
cpufetch v1.05 (Linux ARM build)
[Core 0] 0x610F0000 -1 MHz
[Core 1] 0x610F0000 -1 MHz
[Core 2] 0x610F0000 -1 MHz
[Core 3] 0x610F0000 -1 MHz
[Core 4] 0x610F0000 -1 MHz
[Core 5] 0x610F0000 -1 MHz
[Core 6] 0x610F0000 -1 MHz
[Core 7] 0x610F0000 -1 MHz
[Core 8] 0x610F0000 -1 MHz
[Core 9] 0x610F0000 -1 MHz
[Core 10] 0x610F0000 -1 MHz
[Core 11] 0x610F0000 -1 MHz

This could probably be described as "Apple Silicon Virtual CPU" or similar.

ThomasKaiser commented 3 months ago

This could probably be described as "Apple Silicon Virtual CPU" or similar.

@pthariensflame is your host Mac running a M3 variant? Since in my testings (M1/M2 only so far) the Virtualization framework set the relevant MIDR_EL1 bits all to 0 but in your output the vendor info ( IM=0x61) points to Apple. In case your host is M3 based please also paste /proc/cpuinfo contents from within Fedora to compare features/flags.

pthariensflame commented 3 months ago

This could probably be described as "Apple Silicon Virtual CPU" or similar.

@pthariensflame is your host Mac running a M3 variant? Since in my testings (M1/M2 only so far) the Virtualization framework set the relevant MIDR_EL1 bits all to 0 but in your output the vendor info ( IM=0x61) points to Apple. In case your host is M3 based please also paste /proc/cpuinfo contents from within Fedora to compare features/flags.

It is indeed; it's an M3 Max.

Here is /proc/cpuinfo:

processor       : 0
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x000
CPU revision    : 0

processor       : 1
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x000
CPU revision    : 0

processor       : 2
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x000
CPU revision    : 0

processor       : 3
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x000
CPU revision    : 0

processor       : 4
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x000
CPU revision    : 0

processor       : 5
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x000
CPU revision    : 0

processor       : 6
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x000
CPU revision    : 0

processor       : 7
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x000
CPU revision    : 0

processor       : 8
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x000
CPU revision    : 0

processor       : 9
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x000
CPU revision    : 0

processor       : 10
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x000
CPU revision    : 0

processor       : 11
BogoMIPS        : 48.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x61
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x000
CPU revision    : 0