Skip to content

Commit 117b8c0

Browse files
committed
[AArch64] Features PFAR, DF2, SEL2, ECBHB added
* Define MTE up to version 4 * French translation revised
1 parent 9a4afcd commit 117b8c0

File tree

8 files changed

+159
-24
lines changed

8 files changed

+159
-24
lines changed

aarch64/corefreq-cli-json.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,8 @@ void JsonSysInfo(RO(SHM_STRUCT) *RO(Shm))
589589
json_key(&s, "MMFR1");
590590
{
591591
json_start_object(&s);
592+
json_key(&s, "ECBHB");
593+
json_literal(&s, "%u", (unsigned) RO(Shm)->Proc.Features.ECBHB);
592594
json_key(&s, "PAN");
593595
json_literal(&s, "%u", (unsigned) RO(Shm)->Proc.Features.PAN);
594596
json_key(&s, "VHE");
@@ -629,6 +631,8 @@ void JsonSysInfo(RO(SHM_STRUCT) *RO(Shm))
629631
json_literal(&s, "%u", (unsigned) RO(Shm)->Proc.Features.AMU_frac);
630632
json_key(&s, "RME");
631633
json_literal(&s, "%u", (unsigned) RO(Shm)->Proc.Features.RME);
634+
json_key(&s, "SEL2");
635+
json_literal(&s, "%u", (unsigned) RO(Shm)->Proc.Features.SEL2);
632636
json_end_object(&s);
633637
}
634638
json_key(&s, "PFR1");
@@ -652,6 +656,10 @@ void JsonSysInfo(RO(SHM_STRUCT) *RO(Shm))
652656
json_literal(&s, "%u", (unsigned) RO(Shm)->Proc.Features.MPAM_frac);
653657
json_key(&s, "THE");
654658
json_literal(&s, "%u", (unsigned) RO(Shm)->Proc.Features.THE);
659+
json_key(&s, "DF2");
660+
json_literal(&s, "%u", (unsigned) RO(Shm)->Proc.Features.DF2);
661+
json_key(&s, "PFAR");
662+
json_literal(&s, "%u", (unsigned) RO(Shm)->Proc.Features.PFAR);
655663
json_end_object(&s);
656664
}
657665
json_key(&s, "ZFR0");

aarch64/corefreq-cli-rsc-en.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,10 +867,15 @@
867867
#define RSC_FEATURES_BIG_END_CODE_EN "Mixed-Endianness"
868868
#define RSC_FEATURES_BTI_CODE_EN "Branch Target Identification"
869869
#define RSC_FEATURES_EBEP_CODE_EN "Exception-based event profiling"
870+
#define RSC_FEATURES_ECBHB_CODE_EN \
871+
"Exploitative Control w/ Branch History Buffer"
872+
870873
#define RSC_FEATURES_ECV_CODE_EN "Enhanced Counter Virtualization"
874+
#define RSC_FEATURES_DF2_CODE_EN "Double Fault Extension"
871875
#define RSC_FEATURES_DIT_CODE_EN "Data Independent Timing"
872876
#define RSC_FEATURES_EXS_CODE_EN "Context Synchronization & Exception Handling"
873877
#define RSC_FEATURES_FGT_CODE_EN "Fine-Grained Trap controls"
878+
#define RSC_FEATURES_PFAR_CODE_EN "Physical Fault Address Registers"
874879
#define RSC_FEATURES_GCS_CODE_EN "Guarded Control Stack"
875880
#define RSC_FEATURES_GIC_CODE_EN "Generic Interrupt Controller"
876881
#define RSC_FEATURES_MPAM_CODE_EN "Memory Partitioning and Monitoring"
@@ -880,6 +885,7 @@
880885
#define RSC_FEATURES_PAN_CODE_EN "Privileged Access Never"
881886
#define RSC_FEATURES_RAS_CODE_EN "Reliability Availability & Serviceability"
882887
#define RSC_FEATURES_RME_CODE_EN "Realm Management Extension"
888+
#define RSC_FEATURES_SEL2_CODE_EN "Secure EL2 Implementation"
883889
#define RSC_FEATURES_THE_CODE_EN "Translation Hardening Extension"
884890
#define RSC_FEATURES_TLB_CODE_EN "TLB maintenance instructions"
885891
#define RSC_FEATURES_TME_CODE_EN "Transactional Memory Extension"

aarch64/corefreq-cli-rsc-fr.h

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -530,30 +530,45 @@ do echo -en "$h$l\t""\xc3""\x$h$l""\t"; done; done;echo
530530
#define RSC_INVARIANT_CODE_FR "Invariant"
531531

532532
#define RSC_FEATURES_ACPI_CODE_FR \
533-
"Configuration avanc""\xa9""e et interface d'alimentation"
533+
"Configuration Avanc""\xa9""e & Interface d'Alimentation"
534534

535535
#define RSC_FEATURES_AMU_CODE_FR \
536536
"Unit""\xa9"" de surveillance de l'activit""\xa9"
537537

538-
#define RSC_FEATURES_BIG_END_CODE_FR RSC_FEATURES_BIG_END_CODE_EN
538+
#define RSC_FEATURES_BIG_END_CODE_FR "Endianisme Mixte"
539539
#define RSC_FEATURES_BTI_CODE_FR "Validation des cibles de branche"
540540

541541
#define RSC_FEATURES_EBEP_CODE_FR \
542-
"Profilage d'""\xa9""v""\xa9""nements en fonction des exceptions"
542+
"Profilage d'""\xa9""v""\xa9""nements bas""\xa9"" sur les exceptions"
543+
544+
#define RSC_FEATURES_ECBHB_CODE_FR \
545+
"Contr. Exploit. avec Tampon Hist. Branchement"
543546

544547
#define RSC_FEATURES_ECV_CODE_FR \
545-
"Virtualisation am""\xa9""lior""\xa9""e des compteurs"
548+
"Virtualisation am""\xa9""lior""\xa9""e des compteurs"
549+
550+
#define RSC_FEATURES_DF2_CODE_FR "Extension de Double D""\xa9""faut"
551+
#define RSC_FEATURES_DIT_CODE_FR \
552+
"Chronom""\xa9""trage Ind""\xa9""pendant des Donn""\xa9""es"
546553

547-
#define RSC_FEATURES_DIT_CODE_FR RSC_FEATURES_DIT_CODE_EN
548554
#define RSC_FEATURES_EXS_CODE_FR \
549-
"Synchronisation du contexte & gestion d'exceptions"
555+
"Sync. de Contexte & Gestion d'Exceptions"
556+
557+
#define RSC_FEATURES_FGT_CODE_FR \
558+
"Contr""\xb4""les de Pi""\xa8""ges ""\xa0"" Granularit""\xa9"" Fine"
559+
560+
#define RSC_FEATURES_PFAR_CODE_FR \
561+
"Registres de D""\xa9""faut d'Adresse Physique"
562+
563+
#define RSC_FEATURES_GCS_CODE_FR \
564+
"Pile de Contr""\xb4""le Prot""\xa9""g""\xa9""e"
550565

551-
#define RSC_FEATURES_FGT_CODE_FR RSC_FEATURES_FGT_CODE_EN
552-
#define RSC_FEATURES_GCS_CODE_FR RSC_FEATURES_GCS_CODE_EN
553566
#define RSC_FEATURES_GIC_CODE_FR \
554567
"Contr""\xb4""leur d'interruption g""\xa9""n""\xa9""rique"
555568

556-
#define RSC_FEATURES_MTE_CODE_FR "Extension de marquage de m""\xa9""moire"
569+
#define RSC_FEATURES_MTE_CODE_FR \
570+
"Extension de marquage de m""\xa9""moire"
571+
557572
#define RSC_FEATURES_MPAM_CODE_FR \
558573
"Partitionnement et supervision de la m""\xa9""moire"
559574

@@ -563,14 +578,25 @@ do echo -en "$h$l\t""\xc3""\x$h$l""\t"; done; done;echo
563578
#define RSC_FEATURES_RAS_CODE_FR \
564579
"Fiabilit""\xa9"" Disponibilit""\xa9"" et Durabilit""\xa9"
565580

566-
#define RSC_FEATURES_RME_CODE_FR RSC_FEATURES_RME_CODE_EN
567-
#define RSC_FEATURES_THE_CODE_FR RSC_FEATURES_THE_CODE_EN
581+
#define RSC_FEATURES_RME_CODE_FR "Extension de Gestion de Domaine"
582+
#define RSC_FEATURES_SEL2_CODE_FR \
583+
"Impl""\xa9""mentation S""\xa9""curis""\xa9""e de l'EL2"
584+
585+
#define RSC_FEATURES_THE_CODE_FR \
586+
"Endurcissement ""\x89""tendu de la Translation"
587+
568588
#define RSC_FEATURES_TLB_CODE_FR "Instructions de gestion TLB"
569-
#define RSC_FEATURES_TME_CODE_FR "Extension de m""\xa9""moire transactionnelle"
589+
#define RSC_FEATURES_TME_CODE_FR \
590+
"Extension de m""\xa9""moire transactionnelle"
591+
570592
#define RSC_FEATURES_TSC_CODE_FR "Compteur d'horodatage"
571-
#define RSC_FEATURES_UAO_CODE_FR "Surcharge de l'acc""\xa8""s utilisateur"
593+
#define RSC_FEATURES_UAO_CODE_FR \
594+
"Surcharge de l'acc""\xa8""s utilisateur"
595+
572596
#define RSC_FEATURES_VA_CODE_FR "Plage d'adressage virtuel"
573-
#define RSC_FEATURES_VHE_CODE_FR "Extensions d'H""\xb4""te de Virtualisation"
597+
#define RSC_FEATURES_VHE_CODE_FR \
598+
"Extensions d'H""\xb4""te de Virtualisation"
599+
574600
#define RSC_FEAT_SECTION_MECH_CODE_FR "M""\xa9""canismes d'att""\xa9""nuation"
575601
#define RSC_FEAT_SECTION_SEC_CODE_FR "Fonctions de s""\xa9""curit""\xa9"
576602

@@ -1264,10 +1290,10 @@ do echo -en "$h$l\t""\xc3""\x$h$l""\t"; done; done;echo
12641290
#define RSC_MECH_CLRBHB_CODE_FR "Effacement de l'historique de branche"
12651291

12661292
#define RSC_MECH_SSBD_CODE_FR \
1267-
"Contournement du rangement sp""\xa9""culatif d""\xa9""sactiv""\xa9"
1293+
"Contournement Sp""\xa9""culatif de Magasin d""\xa9""sactiv""\xa9"
12681294

12691295
#define RSC_MECH_SSBS_CODE_FR \
1270-
"Contournement s""\xbb""r du rangement sp""\xa9""culatif"
1296+
"Contournement Sp""\xa9""culatif de Magasin Prot""\xa9""g""\xa9"
12711297

12721298
#define RSC_CREATE_SELECT_AUTO_TURBO_CODE_FR " %3s Processeur " \
12731299
" %s %c%4u %c "

aarch64/corefreq-cli-rsc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,10 +828,13 @@ RESOURCE_ST Resource[] = {
828828
LDT(RSC_FEATURES_BIG_END),
829829
LDT(RSC_FEATURES_BTI),
830830
LDT(RSC_FEATURES_EBEP),
831+
LDT(RSC_FEATURES_ECBHB),
831832
LDT(RSC_FEATURES_ECV),
833+
LDT(RSC_FEATURES_DF2),
832834
LDT(RSC_FEATURES_DIT),
833835
LDT(RSC_FEATURES_EXS),
834836
LDT(RSC_FEATURES_FGT),
837+
LDT(RSC_FEATURES_PFAR),
835838
LDT(RSC_FEATURES_GCS),
836839
LDT(RSC_FEATURES_GIC),
837840
LDT(RSC_FEATURES_MPAM),
@@ -841,6 +844,7 @@ RESOURCE_ST Resource[] = {
841844
LDT(RSC_FEATURES_PAN),
842845
LDT(RSC_FEATURES_RAS),
843846
LDT(RSC_FEATURES_RME),
847+
LDT(RSC_FEATURES_SEL2),
844848
LDT(RSC_FEATURES_THE),
845849
LDT(RSC_FEATURES_TLB),
846850
LDT(RSC_FEATURES_TME),

aarch64/corefreq-cli-rsc.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,10 +651,13 @@ enum {
651651
RSC_FEATURES_BIG_END,
652652
RSC_FEATURES_BTI,
653653
RSC_FEATURES_EBEP,
654+
RSC_FEATURES_ECBHB,
654655
RSC_FEATURES_ECV,
656+
RSC_FEATURES_DF2,
655657
RSC_FEATURES_DIT,
656658
RSC_FEATURES_EXS,
657659
RSC_FEATURES_FGT,
660+
RSC_FEATURES_PFAR,
658661
RSC_FEATURES_GCS,
659662
RSC_FEATURES_GIC,
660663
RSC_FEATURES_MPAM,
@@ -664,6 +667,7 @@ enum {
664667
RSC_FEATURES_PAN,
665668
RSC_FEATURES_RAS,
666669
RSC_FEATURES_RME,
670+
RSC_FEATURES_SEL2,
667671
RSC_FEATURES_THE,
668672
RSC_FEATURES_TLB,
669673
RSC_FEATURES_TME,

aarch64/corefreq-cli.c

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,6 +2268,14 @@ REASON_CODE SysInfoFeatures( Window *win,
22682268
width - 18 - RSZ(FEATURES_ECV),
22692269
NULL
22702270
},
2271+
{
2272+
NULL,
2273+
RO(Shm)->Proc.Features.DF2 == 1,
2274+
attr_Feat,
2275+
2, "%s%.*sDF2 [%7s]", RSC(FEATURES_DF2).CODE(),
2276+
width - 18 - RSZ(FEATURES_DF2),
2277+
NULL
2278+
},
22712279
{
22722280
NULL,
22732281
RO(Shm)->Proc.Features.DIT == 1,
@@ -2300,6 +2308,14 @@ REASON_CODE SysInfoFeatures( Window *win,
23002308
width - 19 - RSZ(FEATURES_FGT),
23012309
NULL
23022310
},
2311+
{
2312+
NULL,
2313+
RO(Shm)->Proc.Features.PFAR == 1,
2314+
attr_Feat,
2315+
2, "%s%.*sPFAR [%7s]", RSC(FEATURES_PFAR).CODE(),
2316+
width - 19 - RSZ(FEATURES_PFAR),
2317+
NULL
2318+
},
23032319
{
23042320
NULL,
23052321
( RO(Shm)->Proc.Features.GIC_vers
@@ -2330,10 +2346,14 @@ REASON_CODE SysInfoFeatures( Window *win,
23302346
NULL,
23312347
RO(Shm)->Proc.Features.MTE > 0,
23322348
attr_Feat,
2333-
2, RO(Shm)->Proc.Features.MTE == 3 ?
2349+
2, RO(Shm)->Proc.Features.MTE == 4 ?
2350+
"%s v4%.*sMTE [%7s]"
2351+
: RO(Shm)->Proc.Features.MTE == 3 ?
23342352
"%s v3%.*sMTE [%7s]"
23352353
: RO(Shm)->Proc.Features.MTE == 2 ?
2336-
"%s v2%.*sMTE [%7s]" : "%s %.*sMTE [%7s]",
2354+
"%s v2%.*sMTE [%7s]"
2355+
: RO(Shm)->Proc.Features.MTE == 1 ?
2356+
"%s v1%.*sMTE [%7s]" : "%s %.*sMTE [%7s]",
23372357
RSC(FEATURES_MTE).CODE(), width - 21 - RSZ(FEATURES_MTE),
23382358
NULL
23392359
},
@@ -2503,6 +2523,14 @@ REASON_CODE SysInfoFeatures( Window *win,
25032523
width - 19 - RSZ(MECH_SSBD),
25042524
MECH
25052525
},
2526+
{
2527+
NULL,
2528+
RO(Shm)->Proc.Features.ECBHB == 1,
2529+
attr_Feat,
2530+
2, "%s%.*sECBHB [%7s]", RSC(FEATURES_ECBHB).CODE(),
2531+
width - 20 - RSZ(FEATURES_ECBHB),
2532+
MECH
2533+
},
25062534
{
25072535
NULL,
25082536
RO(Shm)->Proc.Mechanisms.SSBS,
@@ -2544,6 +2572,14 @@ REASON_CODE SysInfoFeatures( Window *win,
25442572
width - 18 - RSZ(FEATURES_RME),
25452573
NULL
25462574
},
2575+
{
2576+
NULL,
2577+
RO(Shm)->Proc.Features.SEL2 == 1,
2578+
attr_Feat,
2579+
2, "%s%.*sSEL2 [%7s]", RSC(FEATURES_SEL2).CODE(),
2580+
width - 19 - RSZ(FEATURES_SEL2),
2581+
NULL
2582+
},
25472583
{
25482584
NULL,
25492585
RO(Shm)->Proc.Features.THE == 1,

aarch64/corefreqk.c

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,7 @@ static void Query_Features(void *pArg)
10571057
iArg->Features->CONSTPACFIELD = 0;
10581058
break;
10591059
}
1060+
10601061
switch (mmfr0.ECV) {
10611062
case 0b0010:
10621063
case 0b0001:
@@ -1129,6 +1130,16 @@ static void Query_Features(void *pArg)
11291130
iArg->Features->PAN = 0;
11301131
break;
11311132
}
1133+
switch (mmfr1.ECBHB) {
1134+
case 0b0001:
1135+
iArg->Features->ECBHB = 1;
1136+
break;
1137+
case 0b0000:
1138+
default:
1139+
iArg->Features->ECBHB = 0;
1140+
break;
1141+
}
1142+
11321143
switch (mmfr2.UAO) {
11331144
case 0b0001:
11341145
iArg->Features->UAO = 1;
@@ -1143,6 +1154,7 @@ static void Query_Features(void *pArg)
11431154
} else {
11441155
iArg->Features->VARange = 0b11;
11451156
}
1157+
11461158
switch (pfr0.FP) {
11471159
case 0b0000:
11481160
case 0b0001:
@@ -1266,6 +1278,15 @@ static void Query_Features(void *pArg)
12661278
iArg->Features->RME = 0;
12671279
break;
12681280
}
1281+
switch (pfr0.SEL2) {
1282+
case 0b0001:
1283+
iArg->Features->SEL2 = 1;
1284+
break;
1285+
case 0b0000:
1286+
default:
1287+
iArg->Features->SEL2 = 0;
1288+
break;
1289+
}
12691290

12701291
switch (pfr1.BT) {
12711292
case 0b0001:
@@ -1293,14 +1314,22 @@ static void Query_Features(void *pArg)
12931314
break;
12941315
}
12951316
break;
1317+
case 0b0011:
1318+
default:
1319+
switch (pfr1.MTEX) {
1320+
case 0b0001:
1321+
iArg->Features->MTE = 4;
1322+
break;
1323+
case 0b0000:
1324+
default:
1325+
iArg->Features->MTE = 3;
1326+
break;
1327+
}
1328+
break;
12961329
case 0b0001:
12971330
iArg->Features->MTE = 1;
12981331
break;
1299-
case 0b0011:
1300-
iArg->Features->MTE = 3;
1301-
break;
13021332
case 0b0000:
1303-
default:
13041333
iArg->Features->MTE = 0;
13051334
break;
13061335
}
@@ -1353,6 +1382,24 @@ static void Query_Features(void *pArg)
13531382
iArg->Features->THE = 0;
13541383
break;
13551384
}
1385+
switch (pfr1.DF2) {
1386+
case 0b0001:
1387+
iArg->Features->DF2 = 1;
1388+
break;
1389+
case 0b0000:
1390+
default:
1391+
iArg->Features->DF2 = 0;
1392+
break;
1393+
}
1394+
switch (pfr1.PFAR) {
1395+
case 0b0001:
1396+
iArg->Features->PFAR = 1;
1397+
break;
1398+
case 0b0000:
1399+
default:
1400+
iArg->Features->PFAR = 0;
1401+
break;
1402+
}
13561403
if (iArg->Features->SVE | iArg->Features->SME)
13571404
{
13581405
volatile AA64ZFR0 zfr0 = {.value = SysRegRead(ID_AA64ZFR0_EL1)};

aarch64/coretypes.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,8 @@ typedef struct /* BSP features. */
854854
AMU_vers : 19-18,
855855
AMU_frac : 20-19,
856856
RME : 21-20,
857-
MTE : 23-21,
857+
SEL2 : 22-21,
858+
ECBHB : 23-22,
858859
GCS : 24-23,
859860
THE : 25-24,
860861
SVE_F64MM : 26-25,
@@ -911,7 +912,10 @@ typedef struct /* BSP features. */
911912
ATS1A : 12-11,
912913
CONSTPACFIELD : 13-12,
913914
RNG_TRAP : 14-13,
914-
_Unused1_ : 64-14;
915+
MTE : 17-14,
916+
DF2 : 18-17,
917+
PFAR : 19-18,
918+
_Unused1_ : 64-19;
915919

916920
Bit64 InvariantTSC : 8-0,
917921
HyperThreading : 9-8,

0 commit comments

Comments
 (0)