]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg SmbiosView: Correct some outputs for Type 0/3/10
authorStar Zeng <star.zeng@intel.com>
Thu, 9 Feb 2017 09:06:24 +0000 (17:06 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 10 Feb 2017 08:18:13 +0000 (16:18 +0800)
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 <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni

index 1d6002b92593814532428ac1baf4d799db30f492..50d15ef1758eceb9e3fe004f5101a8dd5eb47a30 100644 (file)
@@ -570,7 +570,8 @@ SmbiosPrintStructure (
       UINTN NumOfDevice;\r
       NumOfDevice = (Struct->Type10->Hdr.Length - sizeof (SMBIOS_STRUCTURE)) / (2 * sizeof (UINT8));\r
       for (Index = 0; Index < NumOfDevice; Index++) {\r
-        DisplayOnboardDeviceTypes (Struct->Type10->Device[Index].DeviceType, Option);\r
+        ShellPrintEx(-1,-1,(((Struct->Type10->Device[Index].DeviceType) & 0x80) != 0) ? L"Device Enabled\n": L"Device Disabled\n");\r
+        DisplayOnboardDeviceTypes ((Struct->Type10->Device[Index].DeviceType) & 0x7F, Option);\r
         ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_DESC_STRING), gShellDebug1HiiHandle);\r
         ShellPrintEx(-1,-1,L"%a\n",LibGetSmbiosString (Struct, Struct->Type10->Device[Index].DescriptionString));\r
       }\r
index 02d9ab1f57b3d246a18765384148a17bb5fb052f..afea429b7aa30f97c5fb54488a2b95b71d425263 100644 (file)
@@ -166,7 +166,7 @@ TABLE_ITEM  SystemEnclosureTypeTable[] = {
   },\r
   {\r
     0x09,\r
-    L"  LapTop"\r
+    L"  Laptop"\r
   },\r
   {\r
     0x0A,\r
index 7d694536dbcded83c164df4c7c06eaa724617be3..2cd682630557e3ab5a8ed5d6261194b78a405447 100644 (file)
 #string STR_SMBIOSVIEW_PRINTINFO_SELECTED_BOOT_SUPPORTED        #language en-US "Selectable Boot is supported\r\n"\r
 #string STR_SMBIOSVIEW_PRINTINFO_BIOS_ROM_SOCKETED              #language en-US "BIOS ROM is socketed\r\n"\r
 #string STR_SMBIOSVIEW_PRINTINFO_BOOT_FROM_PC_CARD              #language en-US "Boot From PC Card(PCMCIA)is supported\r\n"\r
-#string STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER            #language en-US "EDD Enhanced Disk Driver) Specification is supported\r\n"\r
+#string STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER            #language en-US "EDD (Enhanced Disk Driver) Specification is supported\r\n"\r
 #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"\r
 #string STR_SMBIOSVIEW_PRINTINFO_JAPANESE_FLOPPY_TOSHIBA        #language en-US "Int 13h - Japanese Floppy for Toshiba 1.2mn (3.5\", 360 RPM) is supported\r\n"\r
 #string STR_SMBIOSVIEW_PRINTINFO_FLOPPY_SERVICES_SUPPORTED      #language en-US "Int 13h - 5.25\"/360KB Floppy Services are supported\r\n"\r