Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display aarch64 CPU info #293

Open
daniejstriata opened this issue Sep 26, 2023 · 3 comments
Open

Display aarch64 CPU info #293

daniejstriata opened this issue Sep 26, 2023 · 3 comments
Labels
area/fetching Has something to do with the fetched information. type/enhancement Not a bug, not a feature, but an enhancement (of some sort).

Comments

@daniejstriata
Copy link

The aarch64 CPU cannot be queried with /proc/cpuinfo as the CPU name is not in there. Version 6.1.8 is not getting the CPU name correctly on my host.
image
You can see there is a space pushing the core count (2) out.

$ cat /proc/cpuinfo
processor	: 0
BogoMIPS	: 243.75
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x3
CPU part	: 0xd0c
CPU revision	: 1

processor	: 1
BogoMIPS	: 243.75
Features	: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x3
CPU part	: 0xd0c
CPU revision	: 1

lscpu has more info:

Architecture:           aarch64
  CPU op-mode(s):       32-bit, 64-bit
  Byte Order:           Little Endian
CPU(s):                 2
  On-line CPU(s) list:  0,1
Vendor ID:              ARM
  Model name:           Neoverse-N1
    Model:              1
    Thread(s) per core: 1
    Core(s) per socket: 2
    Socket(s):          1
    Stepping:           r3p1
    BogoMIPS:           243.75
    Flags:              fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
Caches (sum of all):    
  L1d:                  128 KiB (2 instances)
  L1i:                  128 KiB (2 instances)
  L2:                   2 MiB (2 instances)
  L3:                   32 MiB (1 instance)
NUMA:                   
  NUMA node(s):         1
  NUMA node0 CPU(s):    0,1
Vulnerabilities:        
  Gather data sampling: Not affected
  Itlb multihit:        Not affected
  L1tf:                 Not affected
  Mds:                  Not affected
  Meltdown:             Not affected
  Mmio stale data:      Not affected
  Retbleed:             Not affected
  Spec rstack overflow: Not affected
  Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:           Mitigation; __user pointer sanitization
  Spectre v2:           Mitigation; CSV2, BHB
  Srbds:                Not affected
  Tsx async abort:      Not affected

To Reproduce
Steps to reproduce the behavior:
1.
2.
3.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

macchina --doctor output
Add a screenshot or copy and paste the output of --doctor if an element you're supposed to be seeing isn't showing up.

System Information
You don't have to provide this information if you're not comfortable doing so, but it'll help us solve the issue a lot faster.

  • Distribution: [e.g. Pop!_OS]
  • Desktop Environment [e.g. Plasma]
  • Operating System [e.g. macOS]
  • Terminal [e.g. Alacritty]
  • Macchina's version [e.g. 0.5.9]
@grtcdr
Copy link
Member

grtcdr commented Mar 1, 2024

I'm surprised to see such an edge case. I suspect this issue is due to manufacturer negligence. I wonder what else lspcu could be querying besides /proc/cpuinfo which has been extremely reliable up until this point.

@daniejstriata
Copy link
Author

similar issue was resolved in FastFetch here:
fastfetch-cli/fastfetch#567
Use lscpu to detect CPU name for ARM CPUs (CPU, Linux)

@grtcdr
Copy link
Member

grtcdr commented Mar 2, 2024

I don't think this is a good solution. There are many instances where we shell out to some command-line tool, but I'd like to see that number decrease, not the other way around.

If you have the free time to study the other workarounds that lscpu implements in their code base to be able to show the proper information, and the know-how to port it over to Rust, I'd be more than happy to review and get it merged.

@grtcdr grtcdr added type/enhancement Not a bug, not a feature, but an enhancement (of some sort). area/fetching Has something to do with the fetched information. labels May 13, 2024
@grtcdr grtcdr changed the title [BUG] - Display aarch64 CPU info Display aarch64 CPU info May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fetching Has something to do with the fetched information. type/enhancement Not a bug, not a feature, but an enhancement (of some sort).
Development

No branches or pull requests

2 participants