From nobody Mon Apr 29 13:07:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+70647+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70647+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=phoenix.com ARC-Seal: i=1; a=rsa-sha256; t=1611236945; cv=none; d=zohomail.com; s=zohoarc; b=bZpWTgzXzCnU7jyBWS/ZXFdyD7mzAhUJyOcDPBYLsvotxTOA9+khAzB4wi8Cfvqks+OmgkOnL/1Z8OjSV62wuFbFWyh4PKBSxHQ7s5D1nzqWvDNoEma9SLwrQ7UOEC0o6SaXFV0NMW9L86CjoH5mL62t40Yq3hqmAu+wS44oc80= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611236945; h=Content-Type:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=vaRGwJ2WtV6+3Zp0Zh80hZ9aSKku+zGaA0PbYWZnRSk=; b=gbSYTt9AbIdNIYnq8UWbdvXZZw9iWDr1t8qQOGrnjCKmm1sxE78qiF0qfTW+rI5HIXAOS1GooRlLrqpe4xBTUgsi5hd7Q+3Z+Jy3x2shN8ucV8dJtUhA6SawJZyOr3FGwvf+qktO/vdR9+10miMux8xl814y4EhTFFnFj7I/lBM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70647+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1611236945347800.7266255758248; Thu, 21 Jan 2021 05:49:05 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id lFCiYY1788612xLZsThbvBNN; Thu, 21 Jan 2021 05:49:04 -0800 X-Received: from us-smtp-delivery-170.mimecast.com (us-smtp-delivery-170.mimecast.com [63.128.21.170]) by mx.groups.io with SMTP id smtpd.web12.1689.1611197100591371697 for ; Wed, 20 Jan 2021 18:45:00 -0800 X-Received: from TWN-EXCHMB-13.phoenix.com (123.51.168.5 [123.51.168.5]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-320-1ArQw71kMG67T1JweZAlDA-1; Wed, 20 Jan 2021 21:44:56 -0500 X-MC-Unique: 1ArQw71kMG67T1JweZAlDA-1 X-CrossPremisesHeadersFilteredBySendConnector: TWN-EXCHMB-13.phoenix.com X-Received: from TWN-EXCHMB-13.phoenix.com (2607:f0dc:5001:ff01:3897:a901:3564:6014) by TWN-EXCHMB-13.phoenix.com (2607:f0dc:5001:ff01:3897:a901:3564:6014) with Microsoft SMTP Server (TLS) id 15.0.1156.6; Thu, 21 Jan 2021 10:44:50 +0800 X-Received: from Mars-t490.phoenix.com (10.122.169.52) by TWN-EXCHMB-13.phoenix.com (10.122.170.118) with Microsoft SMTP Server id 15.0.1156.6 via Frontend Transport; Thu, 21 Jan 2021 10:44:50 +0800 From: Mars CC Lin To: CC: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ray Ni , Zhichao Gao Subject: [edk2-devel] [PATCH] * ShellPkg: add the support to show Contained Element Count, Contained Element Record Length and Contained Elements Date: Thu, 21 Jan 2021 10:44:48 +0800 Message-ID: <20210121024448.624-1-mars_cc_lin@phoenix.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: TWN-EXCHMB-13.phoenix.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: phoenix.com Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mars_cc_lin@phoenix.com X-Gm-Message-State: hloQKxw4jRuWs5bSJ8VuQefAx1787277AA= Content-Type: multipart/alternative; boundary="MCBoundary=_12101202144580631" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1611236944; bh=ukAOPQ7CPCLXoyYI1r2raGS5MXJqu0Aqd3QsmaQVUbU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=jZk+AweKcmbtXd2xk3+g+CL2VFtROo+aTNE1awMyn8Eo6mmWeMkW9YF4NEzELL7qcZw qWFDSecMuZqcgnG47eLdvfeBubs4FnIjNj9VLjJNbjQeIbuKIIkwIVD8mi8HQq5jCRCJz sXC4Uy7/pyqe+X1QwSXpEU1g0hDnDbvLxG4= X-ZohoMail-DKIM: pass (identity @groups.io) --MCBoundary=_12101202144580631 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Cc: Philippe Mathieu-Daud=C3=A9 Cc: Ray Ni Cc: Zhichao Gao Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3177 Signed-off-by: Mars CC Lin --- .../SmbiosView/PrintInfo.c | 16 ++++++++++++++++ .../SmbiosView/SmbiosViewStrings.uni | 1 + 2 files changed, 17 insertions(+) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn= fo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index a3dc7b68c4..36c743d45b 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -404,6 +404,22 @@ SmbiosPrintStructure ( if (Struct->Hdr->Length > 0x12) { PRINT_STRUCT_VALUE (Struct, Type3, NumberofPowerCords); } + if (Struct->Hdr->Length > 0x13) { + PRINT_STRUCT_VALUE (Struct, Type3, ContainedElementCount); + } + if (Struct->Hdr->Length > 0x14) { + PRINT_STRUCT_VALUE (Struct, Type3, ContainedElementRecordLength); + } + for (Index =3D 0;Index < Struct->Type3->ContainedElementCount;Index+= +) { + UINT8 Index2 =3D 0; + + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_= CONTAINED_ELEMENT), gShellDebug1HiiHandle, Index+1); + for (Index2 =3D 0;Index2Type3->ContainedElementRecordLeng= th;Index2++) { + Print (L"%02X ", Buffer[0x15 + (Index * Struct->Type3->Contained= ElementRecordLength) + Index2]); + } + Print (L"\n"); + } + } if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0x13)) { if (Struct->Hdr->Length > (0x15 + (Struct->Type3->ContainedElementCo= unt * Struct->Type3->ContainedElementRecordLength))) { diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosV= iewStrings.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/Smb= iosViewStrings.uni index 8bcba7ccf7..9433e8a25f 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStri= ngs.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStri= ngs.uni @@ -93,6 +93,7 @@ #string STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_STATE #language = en-US "Power Supply State " #string STR_SMBIOSVIEW_PRINTINFO_THERMAL_STATE #language = en-US "Thermal state " #string STR_SMBIOSVIEW_PRINTINFO_SECURITY_STATUS #language = en-US "Security Status " +#string STR_SMBIOSVIEW_PRINTINFO_CONTAINED_ELEMENT #language = en-US "Contained Element %d: " #string STR_SMBIOSVIEW_PRINTINFO_SUPOPRT #language = en-US "Support " #string STR_SMBIOSVIEW_PRINTINFO_CURRENT #language = en-US "Current " #string STR_SMBIOSVIEW_PRINTINFO_INSTALLED #language = en-US "Installed " --=20 2.29.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#70647): https://edk2.groups.io/g/devel/message/70647 Mute This Topic: https://groups.io/mt/80003667/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --MCBoundary=_12101202144580631 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3177 Signed-off-by: Mars CC Lin <mars_cc_lin@phoenix.com>
---
.../SmbiosView/PrintInfo.c | 16 ++++++++++++++++ .../SmbiosView/SmbiosViewStrings.uni | 1 +
2 files changed, 17 insertions(+)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintI= nfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c<= BR> index a3dc7b68c4..36c743d45b 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -404,6 +404,22 @@ SmbiosPrintStructure (
if (Struct->Hdr->Length > 0x12) {

PRINT_STRUCT_VALUE (Struct, Type3, NumberofPowerCords);

}

+ if (Struct->Hdr->Length > 0x13) {

+ PRINT_STRUCT_VALUE (Struct, Type3, ContainedElementCount);

+ }

+ if (Struct->Hdr->Length > 0x14) {

+ PRINT_STRUCT_VALUE (Struct, Type3, ContainedElementRecordLength);=

+ }

+ for (Index =3D 0;Index < Struct->Type3->ContainedElementCo= unt;Index++) {

+ UINT8 Index2 =3D 0;

+

+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO= _CONTAINED_ELEMENT), gShellDebug1HiiHandle, Index+1);

+ for (Index2 =3D 0;Index2<Struct->Type3->ContainedElement= RecordLength;Index2++) {

+ Print (L"%02X ", Buffer[0x15 + (Index * Struct->Ty= pe3->ContainedElementRecordLength) + Index2]);

+ }

+ Print (L"\n");

+ }

+

}

if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Lengt= h > 0x13)) {

if (Struct->Hdr->Length > (0x15 + (Struct->Type3->Co= ntainedElementCount * Struct->Type3->ContainedElementRecordLength))) = {

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/Smbios= ViewStrings.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/Sm= biosViewStrings.uni
index 8bcba7ccf7..9433e8a25f 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStr= ings.uni
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStr= ings.uni
@@ -93,6 +93,7 @@
#string STR_SMBIOSVIEW_PRINTINFO_POWER_SUPPLY_STATE #language= en-US "Power Supply State "

#string STR_SMBIOSVIEW_PRINTINFO_THERMAL_STATE #language= en-US "Thermal state "

#string STR_SMBIOSVIEW_PRINTINFO_SECURITY_STATUS #language= en-US "Security Status "

+#string STR_SMBIOSVIEW_PRINTINFO_CONTAINED_ELEMENT #language= en-US "Contained Element %d: "

#string STR_SMBIOSVIEW_PRINTINFO_SUPOPRT #language= en-US "Support "

#string STR_SMBIOSVIEW_PRINTINFO_CURRENT #language= en-US "Current "

#string STR_SMBIOSVIEW_PRINTINFO_INSTALLED #language= en-US "Installed "

--
2.29.1.windows.1
_._,_._,_

Gr= oups.io Links:

You receive all messages sent to this group.

Vie= w/Reply Online (#70647) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [importer@patchew.org]

_._,_._,_
=20 --MCBoundary=_12101202144580631--