From nobody Mon Apr 29 07:16:50 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1486632246969329.27454100303896; Thu, 9 Feb 2017 01:24:06 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B999881F91; Thu, 9 Feb 2017 01:24:05 -0800 (PST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7BCE881F81 for ; Thu, 9 Feb 2017 01:24:04 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP; 09 Feb 2017 01:24:04 -0800 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.9.22]) by fmsmga005.fm.intel.com with ESMTP; 09 Feb 2017 01:24:03 -0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,349,1484035200"; d="scan'208";a="63003188" From: Star Zeng To: edk2-devel@lists.01.org Date: Thu, 9 Feb 2017 17:24:01 +0800 Message-Id: <1486632241-43792-1-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 Subject: [edk2] [PATCH] ShellPkg SmbiosView: Correct some outputs for Type 0/3/10 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ruiyu Ni , Jaben Carsey , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Type 0: Update "EDD Enhanced Disk Driver)..." to "EDD (Enhanced Disk Driver)..." for STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER Type 3: Use L" Laptop" instead of L" LapTop" in SystemEnclosureTypeTable to match SMBIOS spec. Type 10: The BIT7 of Device Type is representing the status of device whether it is enabled or disabled. But current code is not considering the BIT7 and will print "Undefined Value" for enabled device. Type 41 has same definition of Device Type, the code is correct and will be applied to Type 10 by this patch. Cc: Ruiyu Ni Cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Jaben Carsey --- ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c | 3= ++- ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c | 2= +- .../UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni | 2= +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn= fo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index 1d6002b92593..50d15ef1758e 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -570,7 +570,8 @@ SmbiosPrintStructure ( UINTN NumOfDevice; NumOfDevice =3D (Struct->Type10->Hdr.Length - sizeof (SMBIOS_STRUCTU= RE)) / (2 * sizeof (UINT8)); for (Index =3D 0; Index < NumOfDevice; Index++) { - DisplayOnboardDeviceTypes (Struct->Type10->Device[Index].DeviceTyp= e, Option); + ShellPrintEx(-1,-1,(((Struct->Type10->Device[Index].DeviceType) & = 0x80) !=3D 0) ? L"Device Enabled\n": L"Device Disabled\n"); + DisplayOnboardDeviceTypes ((Struct->Type10->Device[Index].DeviceTy= pe) & 0x7F, Option); ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_= DESC_STRING), gShellDebug1HiiHandle); ShellPrintEx(-1,-1,L"%a\n",LibGetSmbiosString (Struct, Struct->Typ= e10->Device[Index].DescriptionString)); } diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTa= ble.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c index 02d9ab1f57b3..afea429b7aa3 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c @@ -166,7 +166,7 @@ TABLE_ITEM SystemEnclosureTypeTable[] =3D { }, { 0x09, - L" LapTop" + L" Laptop" }, { 0x0A, diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosV= iewStrings.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/Smb= iosViewStrings.uni index 7d694536dbcd..2cd682630557 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStri= ngs.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStri= ngs.uni @@ -133,7 +133,7 @@ #string STR_SMBIOSVIEW_PRINTINFO_SELECTED_BOOT_SUPPORTED #language = en-US "Selectable Boot is supported\r\n" #string STR_SMBIOSVIEW_PRINTINFO_BIOS_ROM_SOCKETED #language = en-US "BIOS ROM is socketed\r\n" #string STR_SMBIOSVIEW_PRINTINFO_BOOT_FROM_PC_CARD #language = en-US "Boot From PC Card(PCMCIA)is supported\r\n" -#string STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER #language = en-US "EDD Enhanced Disk Driver) Specification is supported\r\n" +#string STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER #language = en-US "EDD (Enhanced Disk Driver) Specification is supported\r\n" #string STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_NEC #language = en-US "Int 13h - Japanese Floppy for NEC 9800 1.2mb (3.5\",1k Bytes/Sector,= 360 RPM) is supported\r\n" #string STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_TOSHIBA #language = en-US "Int 13h - Japanese Floppy for Toshiba 1.2mn (3.5\", 360 RPM) is supp= orted\r\n" #string STR_SMBIOSVIEW_PRINTINFO_FLOPPY_SERVICES_SUPPORTED #language = en-US "Int 13h - 5.25\"/360KB Floppy Services are supported\r\n" --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel