From nobody Mon May 20 01:44:53 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+72098+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+72098+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=phoenix.com ARC-Seal: i=1; a=rsa-sha256; t=1614102022; cv=none; d=zohomail.com; s=zohoarc; b=ApyD15ICHIw2gliLM6IwmlqPNdNv7KbgeATNIq8yZ2//kYobQT3yBtCfEhfGuZzUUoYivPj/FriYKRaGNjjN1eyqJPQlGTjdOsfT8QD8m2wQd7chcRfBqlkmQg1t6j8CdkUh4B0YBbQrLDiX0JliqLfADGqueWP65PQPvuVWj4U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614102022; h=Content-Type:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=1KWce6ITQM3cz3rKSp0ArERj7ierwCpHtl02mJTwkvQ=; b=GADGjRYsoa6xmbuLKrwy0QSmbWuZGLUd7UbcXng4SdI02L+OXTyM8ccJ9sb25Ue1y8Jvf/uIjxqArFM+qxjNFbABcIj5ubdZt/prVsO8o8pG8S3uPP3didDScdczovn2+niShZAvVLTrVkIWYoueFkFm3zGT/BUEump9xy+rrwY= 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+72098+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 161410202170722.33910686325828; Tue, 23 Feb 2021 09:40:21 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id CPiRYY1788612xuFsxl8c3Kq; Tue, 23 Feb 2021 09:40:21 -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.web10.7154.1614068452100297112 for ; Tue, 23 Feb 2021 00:20:52 -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-221-vD0ZuYKGNRWMBo04s2GVfQ-1; Tue, 23 Feb 2021 03:20:48 -0500 X-MC-Unique: vD0ZuYKGNRWMBo04s2GVfQ-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; Tue, 23 Feb 2021 16:20:43 +0800 X-Received: from Mars-t490.phoenix.com (10.122.169.87) by TWN-EXCHMB-13.phoenix.com (10.122.170.118) with Microsoft SMTP Server id 15.0.1156.6 via Frontend Transport; Tue, 23 Feb 2021 16:20:43 +0800 From: "Mars CC Lin" To: CC: , Zhichao Gao , Philippe Mathieu-Daude , Liming Gao Subject: [edk2-devel] [PATCH] ShellPkg: add more items for smbiosview -t 3 . Date: Tue, 23 Feb 2021 16:20:46 +0800 Message-ID: <20210223082046.1953-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: jaltqcYjAey33PYnrCxeyp4cx1787277AA= Content-Type: multipart/alternative; boundary="MCBoundary=_12102230320500561" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1614102021; bh=WLj663F8sNQtg/FS6lYak5gedIx8wpHkQlQO78Dm+Z4=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=hbSZf08Q5aQy/8YtU/ResxV2GQPorEIhrINGrE2d78kkSx5dCsLdvHriYJ6gnYaW/Kj jxbO6Wd1YKfLgEy3KRiMg9DVR5m0cNI0zCnTUtgiTPrHd+rCiamLv3xECpxaO7vOMJ47A zlHQeipMc6z6QaWb/3iZcipWtLVReVNvW3w= X-ZohoMail-DKIM: pass (identity @groups.io) --MCBoundary=_12102230320500561 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 ContainedElemen= ts for smbiosview type 3. Signed-off-by: Mars CC Lin Cc: Zhichao Gao Cc: Philippe Mathieu-Daude Cc: Liming Gao --- .../SmbiosView/PrintInfo.c | 14 ++++++++++++++ .../SmbiosView/SmbiosViewStrings.uni | 1 + 2 files changed, 15 insertions(+) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn= fo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index a3dc7b68c4..8224b8e002 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -280,6 +280,7 @@ SmbiosPrintStructure ( ) { UINT8 Index; + UINT8 Index2 =3D 0; UINT8 *Buffer; =20 if (Struct =3D=3D NULL) { @@ -404,6 +405,19 @@ 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; Inde= x++) { =20 + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_= CONTAINED_ELEMENT), gShellDebug1HiiHandle, Index+1); + for (Index2 =3D 0; Index2< Struct->Type3->ContainedElementRecordLe= ngth; 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 (#72098): https://edk2.groups.io/g/devel/message/72098 Mute This Topic: https://groups.io/mt/80856945/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=_12102230320500561 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 ContainedEleme= nts 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 | 14 ++++++++++++++ .../SmbiosView/SmbiosViewStrings.uni | 1 +
2 files changed, 15 insertions(+)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintI= nfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c<= BR> index a3dc7b68c4..8224b8e002 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -280,6 +280,7 @@ SmbiosPrintStructure (
)

{

UINT8 Index;

+ UINT8 Index2 =3D 0;

UINT8 *Buffer;



if (Struct =3D=3D NULL) {

@@ -404,6 +405,19 @@ 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->ContainedElementC= ount; Index++) {

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

+ for (Index2 =3D 0; Index2< Struct->Type3->ContainedEleme= ntRecordLength; 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 (#72098) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [importer@patchew.org]

_._,_._,_
=20 --MCBoundary=_12102230320500561--