From e31cb0b1d55fa08e4bbfaabf8beaa30ce4bb7a45 Mon Sep 17 00:00:00 2001 From: CyrIng Date: Wed, 14 Feb 2024 09:18:37 +0100 Subject: [PATCH] [AArch64] Display the big.LITTLE technology * Export Hybrid state and per CPU' Part Number --- aarch64/corefreq-cli-json.c | 4 ++++ aarch64/corefreq-cli-rsc-en.h | 1 + aarch64/corefreq-cli-rsc-fr.h | 1 + aarch64/corefreq-cli-rsc.c | 1 + aarch64/corefreq-cli-rsc.h | 1 + aarch64/corefreq-cli.c | 12 +++++++++++- aarch64/corefreq.h | 5 ++++- aarch64/corefreqd.c | 1 + 8 files changed, 24 insertions(+), 2 deletions(-) diff --git a/aarch64/corefreq-cli-json.c b/aarch64/corefreq-cli-json.c index bfdfb3f8..6640c88b 100644 --- a/aarch64/corefreq-cli-json.c +++ b/aarch64/corefreq-cli-json.c @@ -775,6 +775,8 @@ void JsonSysInfo(RO(SHM_STRUCT) *RO(Shm)) json_key(&s, "Technology"); { json_start_object(&s); + json_key(&s, "Hybrid"); + json_literal(&s, "%llu", RO(Shm)->Proc.Features.Hybrid); json_key(&s, "VM"); json_literal(&s, "%llu", RO(Shm)->Proc.Technology.VM); json_key(&s, "IOMMU"); @@ -1056,6 +1058,8 @@ void JsonSysInfo(RO(SHM_STRUCT) *RO(Shm)) json_key(&s, "Topology"); { json_start_object(&s); + json_key(&s, "PN"); + json_literal(&s, "%d", RO(Shm)->Cpu[cpu].Topology.PN); json_key(&s, "BSP"); json_literal(&s, "%d", RO(Shm)->Cpu[cpu].Topology.BSP); json_key(&s, "MPID"); diff --git a/aarch64/corefreq-cli-rsc-en.h b/aarch64/corefreq-cli-rsc-en.h index 33a61500..62a3319a 100644 --- a/aarch64/corefreq-cli-rsc-en.h +++ b/aarch64/corefreq-cli-rsc-en.h @@ -847,6 +847,7 @@ #define RSC_TECHNOLOGIES_VM_CODE_EN "Virtualization" #define RSC_TECHNOLOGIES_IOMMU_CODE_EN "I/O MMU" #define RSC_TECHNOLOGIES_SMT_CODE_EN "Simultaneous Multithreading" +#define RSC_TECHNOLOGIES_HYBRID_CODE_EN "big.LITTLE technology" #define RSC_TECHNOLOGIES_HYPERV_CODE_EN "Hypervisor" #define RSC_TECHNOLOGIES_VM_COMM_CODE_EN " Virtual Machine Hypervisor " #define RSC_TECHNOLOGIES_IOMMU_COMM_CODE_EN " I/O MMU virtualization " diff --git a/aarch64/corefreq-cli-rsc-fr.h b/aarch64/corefreq-cli-rsc-fr.h index f6474ff7..427d5df9 100644 --- a/aarch64/corefreq-cli-rsc-fr.h +++ b/aarch64/corefreq-cli-rsc-fr.h @@ -548,6 +548,7 @@ do echo -en "$h$l\t""\xc3""\x$h$l""\t"; done; done;echo #define RSC_TECHNOLOGIES_VM_CODE_FR "Virtualisation" #define RSC_TECHNOLOGIES_IOMMU_CODE_FR "MMU E/S" #define RSC_TECHNOLOGIES_SMT_CODE_FR "Multithreading simultan""\xa9" +#define RSC_TECHNOLOGIES_HYBRID_CODE_FR "Technologie big.LITTLE" #define RSC_TECHNOLOGIES_HYPERV_CODE_FR "Hyperviseur" #define RSC_TECHNOLOGIES_VM_COMM_CODE_FR RSC_TECHNOLOGIES_VM_COMM_CODE_EN #define RSC_TECHNOLOGIES_IOMMU_COMM_CODE_FR RSC_TECHNOLOGIES_IOMMU_COMM_CODE_EN diff --git a/aarch64/corefreq-cli-rsc.c b/aarch64/corefreq-cli-rsc.c index beb27d61..a78152d4 100644 --- a/aarch64/corefreq-cli-rsc.c +++ b/aarch64/corefreq-cli-rsc.c @@ -804,6 +804,7 @@ RESOURCE_ST Resource[] = { LDT(RSC_TECHNOLOGIES_IOMMU), LDT(RSC_TECHNOLOGIES_IOMMU_COMM), LDT(RSC_TECHNOLOGIES_SMT), + LDT(RSC_TECHNOLOGIES_HYBRID), LDT(RSC_TECHNOLOGIES_HYPERV), LDQ(RSC_TECH_HYPERV_NONE), LDQ(RSC_TECH_BARE_METAL), diff --git a/aarch64/corefreq-cli-rsc.h b/aarch64/corefreq-cli-rsc.h index fe4e283b..f3bb1168 100644 --- a/aarch64/corefreq-cli-rsc.h +++ b/aarch64/corefreq-cli-rsc.h @@ -627,6 +627,7 @@ enum { RSC_TECHNOLOGIES_IOMMU, RSC_TECHNOLOGIES_IOMMU_COMM, RSC_TECHNOLOGIES_SMT, + RSC_TECHNOLOGIES_HYBRID, RSC_TECHNOLOGIES_HYPERV, RSC_TECH_HYPERV_NONE, RSC_TECH_BARE_METAL, diff --git a/aarch64/corefreq-cli.c b/aarch64/corefreq-cli.c index a6f5face..6b25bb7b 100644 --- a/aarch64/corefreq-cli.c +++ b/aarch64/corefreq-cli.c @@ -2332,6 +2332,16 @@ REASON_CODE SysInfoTech(Window *win, SCANKEY_NULL, NULL }, + { + NULL, + RO(Shm)->Proc.Features.Hybrid == 1, + 2, "%s%.*sHYBRID [%3s]", + RSC(TECHNOLOGIES_HYBRID).CODE(), NULL, + width - 17 - RSZ(TECHNOLOGIES_HYBRID), + NULL, + SCANKEY_NULL, + NULL + }, { NULL, RO(Shm)->Cpu[RO(Shm)->Proc.Service.Core].Query.CStateBaseAddr != 0, @@ -6757,7 +6767,7 @@ Window *CreateSysInfo(unsigned long long id) case SCANKEY_t: { winOrigin.col = 23; - matrixSize.hth = 9; + matrixSize.hth = 10; winOrigin.row = TOP_HEADER_ROW + 5; winWidth = 60; SysInfoFunc = SysInfoTech; diff --git a/aarch64/corefreq.h b/aarch64/corefreq.h index fb20bea2..b5f43d58 100644 --- a/aarch64/corefreq.h +++ b/aarch64/corefreq.h @@ -46,7 +46,10 @@ typedef struct } Query; struct { - unsigned int BSP; + struct { + unsigned int PN : 12-0, + BSP : 32-12; + }; signed int MPID, CoreID, ThreadID, diff --git a/aarch64/corefreqd.c b/aarch64/corefreqd.c index 0009b83e..36f8ae65 100644 --- a/aarch64/corefreqd.c +++ b/aarch64/corefreqd.c @@ -729,6 +729,7 @@ void Topology(RO(SHM_STRUCT) *RO(Shm), RO(PROC) *RO(Proc), RO(CORE) **RO(Core), { unsigned int level; /* Copy each Core topology. */ + RO(Shm)->Cpu[cpu].Topology.PN = RO(Core, AT(cpu))->T.PN; RO(Shm)->Cpu[cpu].Topology.BSP = RO(Core, AT(cpu))->T.BSP ? 1:0; RO(Shm)->Cpu[cpu].Topology.MPID = RO(Core, AT(cpu))->T.MPID; RO(Shm)->Cpu[cpu].Topology.CoreID = RO(Core, AT(cpu))->T.CoreID;