HomeFreeBSD

riscv: Print less CPU info

Description

riscv: Print less CPU info

Change the reporting strategy to more closely follow what arm64
implements:

  • Always print the one-line CPU summary when a core comes online
  • Only print the additional fields (e.g. ISA) when they differ from the CPU before it

In the common case of identical CPUs this results in informative but
non-repetitive output. For example, in QEMU:

CPU 0  : Vendor=Unspecified Core=Unknown (Hart 0)
  marchid=0x80032, mimpid=0x80032
  MMU: 0x7<Sv39,Sv48,Sv57>
  ISA: 0x112d<Atomic,Compressed,Double,Float,Mult/Div>
real memory  = 8589934592 (8192 MB)
avail memory = 8332300288 (7946 MB)
FreeBSD/SMP: Multiprocessor System Detected: 6 CPUs
CPU 1  : Vendor=Unspecified Core=Unknown (Hart 1)
CPU 2  : Vendor=Unspecified Core=Unknown (Hart 2)
CPU 3  : Vendor=Unspecified Core=Unknown (Hart 3)

Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40024

(cherry picked from commit 940e6d36de1ef010f731e290c9b2b08535fff424)

Details

Provenance
mhorneAuthored on May 22 2023, 11:54 PM
Reviewer
markj
Differential Revision
D40024: riscv: rework CPU identification [7/7]
Parents
rGc48ea7b4953e: riscv: MMU detection
Branches
Unknown
Tags
Unknown