public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Marcin Juszkiewicz" <marcin.juszkiewicz@linaro.org>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	Rebecca Cran <rebecca@bsdio.com>,
	Sami Mujawar <sami.mujawar@arm.com>,
	Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Subject: [PATCH 1/7] ArmPkg: fix reading of first nibbles in ArmCpuInfo
Date: Thu,  4 May 2023 15:24:34 +0100	[thread overview]
Message-ID: <20230504142440.827531-2-marcin.juszkiewicz@linaro.org> (raw)
In-Reply-To: <20230504142440.827531-1-marcin.juszkiewicz@linaro.org>

First nibbles of DFR0/ISAR1/ISAR2/MMRF2/PFR0 system registers were read
in wrong way -- second one was used instead.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
 ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c b/ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c
index deea90fbdfbf..3f0a49649790 100644
--- a/ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c
+++ b/ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c
@@ -107,7 +107,7 @@ HandleAa64Dfr0 (
   CONST CHAR8         *Bits;
 
   Bits  = "3:0 ";
-  Value = (Aa64Dfr0 >>  4) & 0xf;
+  Value = Aa64Dfr0 & 0xf;
   switch (Value) {
     case b0110:
       Description = "Armv8 debug architecture";
@@ -637,7 +637,7 @@ HandleAa64Isar1 (
   CONST CHAR8         *Bits;
 
   Bits  = "3:0 ";
-  Value = (Aa64Isar1 >>  4) & 0xf;
+  Value = Aa64Isar1 & 0xf;
   switch (Value) {
     case b0000:
       Description = "DC CVAP not implemented.";
@@ -954,7 +954,7 @@ HandleAa64Isar2 (
   CONST CHAR8         *Bits;
 
   Bits  = "3:0 ";
-  Value = (Aa64Isar2 >>  4) & 0xf;
+  Value = Aa64Isar2 & 0xf;
   switch (Value) {
     case b0000:
       Description = "FEAT_WFxT not implemented.";
@@ -1637,7 +1637,7 @@ HandleAa64Mmfr2 (
   CONST CHAR8         *Bits;
 
   Bits  = "3:0 ";
-  Value = (Aa64Mmfr2)       & 0xf;
+  Value = Aa64Mmfr2 & 0xf;
   switch (Value) {
     case b0000:
       Description = "FEAT_TTCNP not implemented.";
@@ -1906,7 +1906,7 @@ HandleAa64Pfr0 (
   CONST CHAR8         *Bits;
 
   Bits  = "3:0 ";
-  Value = (Aa64Pfr0)       & 0xf;
+  Value = Aa64Pfr0 & 0xf;
   switch (Value) {
     case b0001:
       Description = "EL0 in AArch64 only";
-- 
2.40.1


  reply	other threads:[~2023-05-04 14:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04 14:24 [PATCH 0/7] ArmCpuInfo improvements Marcin Juszkiewicz
2023-05-04 14:24 ` Marcin Juszkiewicz [this message]
2023-05-04 14:24 ` [PATCH 2/7] ArmPkg: shorten register field in ArmCpuInfo Marcin Juszkiewicz
2023-05-04 14:24 ` [PATCH 3/7] ArmPkg: add functions to read SVE/SME info Marcin Juszkiewicz
2023-05-04 14:24 ` [PATCH 4/7] ArmPkg: skip empty system registers in ArmCpuInfo Marcin Juszkiewicz
2023-05-04 14:24 ` [PATCH 5/7] ArmPkg: format output in one place " Marcin Juszkiewicz
2023-05-04 14:24 ` [PATCH 6/7] ArmPkg: handle SVE/SME " Marcin Juszkiewicz
2023-05-04 14:24 ` [PATCH 7/7] ArmPkg: cleaning output of ArmCpuInfo Marcin Juszkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230504142440.827531-2-marcin.juszkiewicz@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox