From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from muminek.juszkiewicz.com.pl (muminek.juszkiewicz.com.pl [213.251.184.221]) by mx.groups.io with SMTP id smtpd.web11.1410.1685947081044866376 for ; Sun, 04 Jun 2023 23:38:01 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=softfail (domain: linaro.org, ip: 213.251.184.221, mailfrom: marcin.juszkiewicz@linaro.org) Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id A5E92260B91; Mon, 5 Jun 2023 08:37:59 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at juszkiewicz.com.pl Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uWj0ppzTSk1c; Mon, 5 Jun 2023 08:37:58 +0200 (CEST) Received: from applejack.lan (83.21.93.182.ipv4.supernova.orange.pl [83.21.93.182]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 799C5260BC3; Mon, 5 Jun 2023 08:37:53 +0200 (CEST) From: "Marcin Juszkiewicz" To: devel@edk2.groups.io Cc: Sami Mujawar , Ard Biesheuvel , Leif Lindholm , Marcin Juszkiewicz Subject: [PATCH v2 8/8] ArmPkg: show stage2 granule support on Neoverse-N1 Date: Mon, 5 Jun 2023 08:37:43 +0200 Message-Id: <20230605063743.405487-10-marcin.juszkiewicz@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230605063743.405487-1-marcin.juszkiewicz@linaro.org> References: <20230605063743.405487-1-marcin.juszkiewicz@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable N1 uses '0000' values which mean: Support for 4KB granule at stage 2 is identified in the ID_AA64MMFR0_EL1.TGran{4,16,64} field. Signed-off-by: Marcin Juszkiewicz --- ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c b/ArmPkg/Applicat= ion/ArmCpuInfo/ArmCpuInfo.c index caaab4ec4313..a97236f59352 100644 --- a/ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c +++ b/ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c @@ -1210,6 +1210,13 @@ HandleAa64Mmfr0 ( Bits =3D "43:40"; Value =3D (Aa64Mmfr0 >> 40) & 0xf; switch (Value) { + case b0000: + if (((Aa64Mmfr0 >> 28) & 0xf) =3D=3D b0000) { + Description =3D " 4KB granule supported at stage 2."; + } else { + Description =3D "unknown"; + } + break; case b0001: Description =3D " 4KB granule not supported at stage 2."; break; @@ -1248,6 +1255,13 @@ HandleAa64Mmfr0 ( Bits =3D "35:32"; Value =3D (Aa64Mmfr0 >> 32) & 0xf; switch (Value) { + case b0000: + if (((Aa64Mmfr0 >> 20) & 0xf) =3D=3D b0001) { + Description =3D "16KB granule supported at stage 2."; + } else { + Description =3D "unknown"; + } + break; case b0001: Description =3D "16KB granule not supported at stage 2."; break; @@ -1283,6 +1297,13 @@ HandleAa64Mmfr0 ( Bits =3D "39:36"; Value =3D (Aa64Mmfr0 >> 36) & 0xf; switch (Value) { + case b0000: + if (((Aa64Mmfr0 >> 24) & 0xf) =3D=3D b0000) { + Description =3D "64KB granule supported at stage 2."; + } else { + Description =3D "unknown"; + } + break; case b0001: Description =3D "64KB granule not supported at stage 2."; break; --=20 2.40.1