]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lscpu: add bios_family
authorHuang Shijie <shijie@os.amperecomputing.com>
Tue, 15 Jun 2021 10:06:39 +0000 (10:06 +0000)
committerKarel Zak <kzak@redhat.com>
Wed, 16 Jun 2021 09:12:14 +0000 (11:12 +0200)
commit4cae2104ec88890e649b950283fe20af91e9c642
treee0515172322e08fc90a9b5c2013f79ba72961407
parenta772d7c493afcec32f0123fc947013f74db6e45d
lscpu: add bios_family

In the arm platform, we do not have the "CPU family" as X86.
In the linux kernel, it is hardcode to set the "CPU architecuture:8"
which should be changed for arm v9 in future.

This patch adds "bios_family" field, which we can get from the DMI table.
In the ampere Altra platform, we can get the new lscpu output:
    ----------------------------------------------------------------
Architecture:                    aarch64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
CPU(s):                          160
On-line CPU(s) list:             0-159
Vendor ID:                       ARM
BIOS Vendor ID:                  Ampere(R)
Model name:                      Neoverse-N1
BIOS Model name:                 Ampere(R) Altra(R) Processor Q00-00 CPU @ 3.0GHz
BIOS CPU family:                 257
Model:                           1
Thread(s) per core:              1
    ----------------------------------------------------------------

[kzak@redhat.com: - s/sprintf/snprintf/]

Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lscpu-cputype.c
sys-utils/lscpu-dmi.c
sys-utils/lscpu.c
sys-utils/lscpu.h