Skip to content

Commit

Permalink
[AArch64] Display the big.LITTLE technology
Browse files Browse the repository at this point in the history
* Export Hybrid state and per CPU' Part Number
  • Loading branch information
cyring committed Feb 14, 2024
1 parent 94000d9 commit e31cb0b
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 2 deletions.
4 changes: 4 additions & 0 deletions aarch64/corefreq-cli-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions aarch64/corefreq-cli-rsc-en.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
1 change: 1 addition & 0 deletions aarch64/corefreq-cli-rsc-fr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions aarch64/corefreq-cli-rsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions aarch64/corefreq-cli-rsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 11 additions & 1 deletion aarch64/corefreq-cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion aarch64/corefreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions aarch64/corefreqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e31cb0b

Please sign in to comment.