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.1408.1685947078509780112 for ; Sun, 04 Jun 2023 23:37:58 -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 1E2E1260B30; Mon, 5 Jun 2023 08:37:56 +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 leClSJBfo2QF; Mon, 5 Jun 2023 08:37:54 +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 B14E1260B3C; Mon, 5 Jun 2023 08:37:51 +0200 (CEST) From: "Marcin Juszkiewicz" To: devel@edk2.groups.io Cc: Sami Mujawar , Ard Biesheuvel , Leif Lindholm , Marcin Juszkiewicz Subject: [PATCH v2 4/8] ArmPkg: skip empty system registers in ArmCpuInfo Date: Mon, 5 Jun 2023 08:37:39 +0200 Message-Id: <20230605063743.405487-6-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 If system register is empty (value =3D=3D 0) then do not display informat= ion from it. Signed-off-by: Marcin Juszkiewicz --- ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c | 35 +++++++++++++++------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c b/ArmPkg/Applicat= ion/ArmCpuInfo/ArmCpuInfo.c index 982714ef6ca0..9d0d164774ff 100644 --- a/ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c +++ b/ArmPkg/Application/ArmCpuInfo/ArmCpuInfo.c @@ -2407,23 +2407,38 @@ UefiMain ( =20 HandleAa64Mmfr0 (Aa64Mmfr0); PrintSpacer (); - HandleAa64Mmfr1 (Aa64Mmfr1, Aa64Pfr0); - PrintSpacer (); - HandleAa64Mmfr2 (Aa64Mmfr2); =20 - PrintSpacer (); + if (Aa64Mmfr1) { + HandleAa64Mmfr1 (Aa64Mmfr1, Aa64Pfr0); + PrintSpacer (); + } + + if (Aa64Mmfr2) { + HandleAa64Mmfr2 (Aa64Mmfr2); + PrintSpacer (); + } + HandleAa64Pfr0 (Aa64Pfr0, Aa64Pfr1); PrintSpacer (); - HandleAa64Pfr1 (Aa64Pfr1); =20 - PrintSpacer (); + if (Aa64Pfr1) { + HandleAa64Pfr1 (Aa64Pfr1); + PrintSpacer (); + } + HandleAa64Isar0 (Aa64Isar0); PrintSpacer (); - HandleAa64Isar1 (Aa64Isar1); - PrintSpacer (); - HandleAa64Isar2 (Aa64Isar2); =20 - PrintSpacer (); + if (Aa64Isar1) { + HandleAa64Isar1 (Aa64Isar1); + PrintSpacer (); + } + + if (Aa64Isar2) { + HandleAa64Isar2 (Aa64Isar2); + PrintSpacer (); + } + HandleAa64Dfr0 (Aa64Dfr0); =20 return EFI_SUCCESS; --=20 2.40.1