From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 141E1740038 for ; Mon, 12 Aug 2024 05:22:20 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ddA8KEHj3NS0qA4kyOapNqofDH8qU76RTHReDb+tbEE=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1723440140; v=1; b=vF9HmyiWxoBaHUwcJyQJ4y07RB9GZo8qUpd1gQg3MzHnnJFxzxHHTeSf9k9LmVu15DI1cWpZ qoOW9lj/VNkT+1wZ/CbWDfDsN+6ZRpzWdqB6PTfX403OoEJ5egwvTbnQZk2sFPX2ZG6oBAdohqK z5pufS66Fpkts6zOeadvP6AbTs7uhQRPL12oWpgmnw/MM9lZo6QiSXBxYtg/0ytmkVbBx7a+co0 T7gtVj2BZopUAOzzZBBELoGVows/h6AImw3Eu4uYZnFEPQRkH/eAUjq8eLA4m/Q7SNUdLhwn7lr G3SJ4rMomEejMR2dPkQgEUGP65dlvsmLKvWq3QBWqrS/g== X-Received: by 127.0.0.2 with SMTP id kFu1YY7687511xw6MQioEYqN; Sun, 11 Aug 2024 22:22:19 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by mx.groups.io with SMTP id smtpd.web10.39532.1723440133667233135 for ; Sun, 11 Aug 2024 22:22:13 -0700 X-CSE-ConnectionGUID: tQVRUWAfTuG21u/6kkYViA== X-CSE-MsgGUID: XRcGKziKTOGdS5c4W0Q6/w== X-IronPort-AV: E=McAfee;i="6700,10204,11161"; a="32152585" X-IronPort-AV: E=Sophos;i="6.09,282,1716274800"; d="scan'208";a="32152585" X-Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2024 22:22:13 -0700 X-CSE-ConnectionGUID: fzQLp8dySMmuFVS/u4/ClA== X-CSE-MsgGUID: 2IWvoWejR4e+kSFpfmyFiw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,282,1716274800"; d="scan'208";a="62991234" X-Received: from liencx-desk.gar.corp.intel.com ([10.225.34.86]) by orviesa005.jf.intel.com with ESMTP; 11 Aug 2024 22:22:12 -0700 From: "Lien, HoraceX" To: devel@edk2.groups.io Cc: HoraceX Lien , Liming Gao Subject: [edk2-devel] [PATCH] ShellPkg: Correct smbiosview strings and conditions for SMBIOS Type9 Date: Mon, 12 Aug 2024 13:22:00 +0800 Message-ID: <20240812052200.418-1-horacex.lien@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Sun, 11 Aug 2024 22:22:13 -0700 Resent-From: horacex.lien@intel.com Reply-To: devel@edk2.groups.io,horacex.lien@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: RoEM2ugo58tw4iSaZpW0U3Ovx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=vF9HmyiW; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io From: HoraceX Lien REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4826 Using smbiosview to dump SMBIOS Type9, some code condition and string are incorrect. Signed-off-by: HoraceX Lien Cc: Liming Gao --- ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c | 19 += ++++++++---------- ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn= fo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index 5c4413cbe3..a31f823304 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -3173,7 +3173,7 @@ DisplaySystemSlotId ( //=0D case 0x04:=0D ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINF= O_LOGICAL_MICRO_CHAN), gShellDebug1HiiHandle);=0D - if ((SlotId > 0) && (SlotId < 15)) {=0D + if ((SlotId > 0) && (SlotId <=3D 15)) {=0D ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTI= NFO_ONE_VAR_D), gShellDebug1HiiHandle, SlotId);=0D } else {=0D ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTI= NFO_ERROR_NOT_1_15), gShellDebug1HiiHandle);=0D @@ -3182,11 +3182,11 @@ DisplaySystemSlotId ( break;=0D =0D //=0D - // EISA=0D + // Slot Type: EISA=0D //=0D case 0x05:=0D ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINF= O_LOGICAL_EISA_NUM), gShellDebug1HiiHandle);=0D - if ((SlotId > 0) && (SlotId < 15)) {=0D + if ((SlotId > 0) && (SlotId <=3D 15)) {=0D ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTI= NFO_ONE_VAR_D), gShellDebug1HiiHandle, SlotId);=0D } else {=0D ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTI= NFO_ERROR_NOT_1_15), gShellDebug1HiiHandle);=0D @@ -3202,21 +3202,20 @@ DisplaySystemSlotId ( break;=0D =0D //=0D - // PCMCIA=0D + // Slot Type: PCMCIA=0D //=0D case 0x07:=0D ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINF= O_IDENTIFIES_ADAPTER_NUM), gShellDebug1HiiHandle, SlotId);=0D break;=0D =0D //=0D - // Slot Type: PCI-E=0D + // Slot Type: PCI 66MHz Capable, AGP, PCI-E, etc=0D //=0D - case 0xA5:=0D - ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTINF= O_VALUE_PRESENT), gShellDebug1HiiHandle, SlotId);=0D - break;=0D -=0D default:=0D - if (((SlotType >=3D 0x0E) && (SlotType <=3D 0x12)) || ((SlotType >= =3D 0xA6) && (SlotType <=3D 0xC4))) {=0D + if (((SlotType >=3D 0x0E) && (SlotType <=3D 0x13)) ||=0D + ((SlotType >=3D 0x1F) && (SlotType <=3D 0x25)) ||=0D + ((SlotType >=3D 0xA5) && (SlotType <=3D 0xC6)))=0D + {=0D ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTI= NFO_VALUE_PRESENT), gShellDebug1HiiHandle, SlotId);=0D } else {=0D ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_SMBIOSVIEW_PRINTI= NFO_UNDEFINED_SLOT_ID), gShellDebug1HiiHandle);=0D diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTa= ble.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c index 36f8739d6c..0db28b66de 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c @@ -1924,7 +1924,7 @@ TABLE_ITEM SystemSlotHeightTable[] =3D { },=0D {=0D 0x02,=0D - L" Unkown"=0D + L" Unknown"=0D },=0D {=0D 0x03,=0D --=20 2.43.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120316): https://edk2.groups.io/g/devel/message/120316 Mute This Topic: https://groups.io/mt/107851928/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-