From nobody Mon May 6 12:31:07 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+72377+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+72377+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=phoenix.com ARC-Seal: i=1; a=rsa-sha256; t=1614756515; cv=none; d=zohomail.com; s=zohoarc; b=mrV0LRpB8CZ6MQHXS6KfaVbNR/EYTHM4vHBsWi4dVH9bCQtOCN0Mjkug81muqtkbIKz4idWIDRzS/1fLQtaiuYvHhxZN04NHIiXcrC+i7NkmVzcmU8Noqe/tmVrk/WxplFLZGDaAOUq5dYnHXJYWmamhTA3C/1eXOlKvoLDjrN0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614756515; h=Content-Type:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=mCTRiGMeD1XLVWg1WLEmqOtXv4Q0tAGYuWjRwdgTJA4=; b=j7kyGmVYnQ2G/h3MOZ+O3rG/g0i7SUxt3rpKJX2EoD2cc1CTaB3lJtzVFXbrKp6Yen31K2gdx006RACa5YM/nffybju0crnoN5dkYgMU1h08LdhHaPDnjZWwuizA6q8mJTAwZtiQUe2VV7baKLL11wTNephZD9ZOnoiTLDqi4ek= 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+72377+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 1614756515359813.1272551838557; Tue, 2 Mar 2021 23:28:35 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 37sPYY1788612xl5h3iCCwyD; Tue, 02 Mar 2021 23:28:34 -0800 X-Received: from us-smtp-delivery-170.mimecast.com (us-smtp-delivery-170.mimecast.com [216.205.24.170]) by mx.groups.io with SMTP id smtpd.web12.3715.1614756509315068262 for ; Tue, 02 Mar 2021 23:28:29 -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-423-y1sqgQkaOeawl8PtEfofog-1; Wed, 03 Mar 2021 02:28:25 -0500 X-MC-Unique: y1sqgQkaOeawl8PtEfofog-1 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; Wed, 3 Mar 2021 15:28:20 +0800 X-Received: from Mars-t490.phoenix.com (10.122.168.184) by TWN-EXCHMB-13.phoenix.com (10.122.170.118) with Microsoft SMTP Server id 15.0.1156.6 via Frontend Transport; Wed, 3 Mar 2021 15:28:20 +0800 From: "Mars CC Lin" To: CC: Zhichao Gao , Philippe Mathieu-Daude , Liming Gao Subject: [edk2-devel] [PATCH V5] ShellPkg: add more items for smbiosview -t 3 . Date: Wed, 3 Mar 2021 15:28:10 +0800 Message-ID: <20210303072810.942-1-mars_cc_lin@phoenix.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: TWN-EXCHMB-13.phoenix.com X-CrossPremisesHeadersFilteredBySendConnector: 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: 67mByhilISy1J85PHQLDAMwKx1787277AA= Content-Type: multipart/alternative; boundary="MCBoundary=_12103030228270761" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1614756514; bh=zrPUTmBDVSTk4pBKwFGg6CYcsvE1wxM2MU8rqUzvATI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=azK3zMz1mbMFZayuQIUGHruZzsWPHqmNnUeWLCS0PAfQjbCAnQMXUxz0RxBCBb8wCfW HElCbV8o6Pa868Y5qrYOI21yTsnHLTMPg4LwyWkTzudnUUAAYN5oXuaD0Uzgby0ihQL+b B42WKw/mValg6TPujZGXvLjjiV1yi5fJwdw= X-ZohoMail-DKIM: pass (identity @groups.io) --MCBoundary=_12103030228270761 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D3177 Add ContainedElementCount, ContainedElementRecordLength and ContainedElements for smbiosview type 3. Signed-off-by: Mars CC Lin Cc: Zhichao Gao Cc: Philippe Mathieu-Daude Cc: Liming Gao Reviewed-by: Zhichao Gao --- .../SmbiosView/PrintInfo.c | 15 +++++++++++++++ .../SmbiosView/SmbiosViewStrings.uni | 1 + 2 files changed, 16 insertions(+) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn= fo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index 478f63078a..04e4882272 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -404,6 +404,21 @@ 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); + } + if (Struct->Hdr->Length > 0x15) { + for (Index =3D 0; Index < Struct->Type3->ContainedElementCount; In= dex++) { + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINF= O_CONTAINED_ELEMENT), gShellDebug1HiiHandle, Index+1); + for (Index2 =3D 0; Index2< Struct->Type3->ContainedElementRecord= Length; Index2++) { + Print (L"%02X ", Buffer[0x15 + (Index * Struct->Type3->Contain= edElementRecordLength) + 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 97e1d54fcf..20a556a175 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 (#72377): https://edk2.groups.io/g/devel/message/72377 Mute This Topic: https://groups.io/mt/81047033/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=_12103030228270761 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=WINDOWS-1252 https://bugzilla.tianocore.org/show_bug.cgi?id=3D3177<= /a>
Add ContainedElementCount, ContainedElementRecordLength and
ContainedElements for smbiosview type 3.

Signed-off-by: Mars CC Lin <mars_cc_lin@phoenix.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Philippe Mathieu-Daude <philmd@redhat.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
---
.../SmbiosView/PrintInfo.c | 15 +++++++++++++++ .../SmbiosView/SmbiosViewStrings.uni | 1 +
2 files changed, 16 insertions(+)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintI= nfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c<= BR> index 478f63078a..04e4882272 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -404,6 +404,21 @@ 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);=
+ }
+ if (Struct->Hdr->Length > 0x15) {
+ for (Index =3D 0; Index < Struct->Type3->ContainedElemen= tCount; Index++) {
+ ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTIN= FO_CONTAINED_ELEMENT), gShellDebug1HiiHandle, Index+1);
+ for (Index2 =3D 0; Index2< Struct->Type3->ContainedEle= mentRecordLength; Index2++) {
+ Print (L"%02X ", Buffer[0x15 + (Index * Struct->= Type3->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 97e1d54fcf..20a556a175 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 (#72377) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [importer@patchew.org]

_._,_._,_
=20 --MCBoundary=_12103030228270761--