From nobody Thu May 2 09:36:18 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+72099+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+72099+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=LwIdMVIN42KfuQnnCERE9KHurgUdGZLn/T2hpwlTMVPQke4rl5q7kJb/cZX4oa7G/AUzDDwZh7oof+TvUlGshpYxCYrU4693hBRlnZKeB1LxlBvxW6dp+B5IZov0uOD0T3leEwNOiZgHHtPus6C8bHcxeVjHAEUJpusBTDGOiwM= 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=sBuVvugcVP+Az1eEy8uDRMEuoRV14npiwzwJ6an4vtk=; b=b+esw2HZ1YFjRsWJsod4juwEhAr+Th6MpTTjZ1roqVXiihKB5xfD9y1Rnm2TuDsaeQ1MD7aJT24jEYlgWOOcFUNSmBvp9nay7G4SLG+9rWNWVid9fsGMz33SyKihIddW74ylSyGpvr51lpeBq2oDlPaXr6wrBdCD45wuCA8iiMA= 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+72099+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 1614102022514435.7789635315072; Tue, 23 Feb 2021 09:40:22 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id s13zYY1788612xiVI0x7Vb0a; Tue, 23 Feb 2021 09:40:22 -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.web08.7173.1614068978238259009 for ; Tue, 23 Feb 2021 00:29:38 -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-15-rffVh0oXNbuk9PS21inmZQ-1; Tue, 23 Feb 2021 03:29:34 -0500 X-MC-Unique: rffVh0oXNbuk9PS21inmZQ-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:29:29 +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:29:28 +0800 From: "Mars CC Lin" To: CC: , Zhichao Gao , Philippe Mathieu-Daude , Liming Gao Subject: [edk2-devel] [PATCH v2] ShellPkg: add more items for smbiosview -t 3 . Date: Tue, 23 Feb 2021 16:29:25 +0800 Message-ID: <20210223082925.2006-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: CfyYYn64FgrBAZsATeyjvh9Rx1787277AA= Content-Type: multipart/alternative; boundary="MCBoundary=_12102230329360571" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1614102022; bh=8KMyGsOxYHtKMkybQWkRQAlv2jaXuq8j/vY2omZ18L8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=J1pbau+qN7kRsfMfS/k0rY9ewEBmOdudtvY5kqUhqp3MpAcUub/0sqc/+HG2ce/Ognw kZoF1IDY0+Br3JVuXFzvHm14GknKZgq9YFTV+cJrcf+8KnrXQSqktfnKDipUwGSTdemVn 5H+Q4RZgOMzoOYrR9xR1Yeq5NG4+eN8uHT4= X-ZohoMail-DKIM: pass (identity @groups.io) --MCBoundary=_12102230329360571 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 --- .../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..4be6cf2df4 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++) { + 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 (#72099): https://edk2.groups.io/g/devel/message/72099 Mute This Topic: https://groups.io/mt/80856947/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=_12102230329360571 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 | 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..4be6cf2df4 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 (#72099) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [importer@patchew.org]

_._,_._,_
=20 --MCBoundary=_12102230329360571--