From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from msmail.insydesw.com.tw (ms.insydesw.com [211.75.113.220]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2057381EEA for ; Mon, 23 Jan 2017 14:02:50 -0800 (PST) Received: from msmail.insydesw.com.tw ([fe80::74f7:f173:f4aa:9a05]) by msmail.insydesw.com.tw ([fe80::74f7:f173:f4aa:9a05%11]) with mapi id 14.01.0438.000; Tue, 24 Jan 2017 06:02:47 +0800 From: Tim Lewis To: "Carsey, Jaben" , "Ni, Ruiyu" , "Zeng, Star" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1 Thread-Index: AQHSdI2RjzxaN7lLCkOX84h+smSD7aFDs5AAgAAGzACAAhYbAIAAuvAw//+A1ICAAIY70P//gvaAgACGmGD//3ymgAAQzqsQ Date: Mon, 23 Jan 2017 22:02:46 +0000 Message-ID: <7236196A5DF6C040855A6D96F556A53F424BE8@msmail.insydesw.com.tw> References: <1485073063-211620-1-git-send-email-star.zeng@intel.com> <1485073063-211620-4-git-send-email-star.zeng@intel.com> <734D49CCEBEEF84792F5B80ED585239D5B886249@SHSMSX104.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B818FBB@shsmsx102.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5B8862A7@SHSMSX104.ccr.corp.intel.com> <7236196A5DF6C040855A6D96F556A53F424B32@msmail.insydesw.com.tw> <7236196A5DF6C040855A6D96F556A53F424B80@msmail.insydesw.com.tw> <7236196A5DF6C040855A6D96F556A53F424BC7@msmail.insydesw.com.tw> In-Reply-To: Accept-Language: en-US, zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.100.111] MIME-Version: 1.0 Subject: Re: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1 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: , X-List-Received-Date: Mon, 23 Jan 2017 22:02:51 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable In our case, the main firmware is multi-lingual, but the shell is mono-ling= ual, and they are built together. The reason is: setup users require more u= ser-friendly than shell users in our experience. Tim -----Original Message----- From: Carsey, Jaben [mailto:jaben.carsey@intel.com]=20 Sent: Monday, January 23, 2017 1:59 PM To: Tim Lewis ; Ni, Ruiyu ; Zeng,= Star ; edk2-devel@lists.01.org Cc: Carsey, Jaben Subject: RE: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3= .1.1 I was wondering if some replaced version of HiiLib could use the StrDefs.h = differently and save the overhead if only one language is present... -Jaben > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of=20 > Tim Lewis > Sent: Monday, January 23, 2017 1:57 PM > To: Carsey, Jaben ; Ni, Ruiyu=20 > ; Zeng, Star ;=20 > edk2-devel@lists.01.org > Subject: Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of=20 > SMBIOS spec 3.1.1 > Importance: High >=20 > We have not found a good solution for handling this automatically,=20 > although we have toyed with alternate ways to process the .uni file to=20 > create string literals with the StrDefs.h #defines and alternate=20 > versions of the ShellLib functions that use them. >=20 > Tim >=20 > -----Original Message----- > From: Carsey, Jaben [mailto:jaben.carsey@intel.com] > Sent: Monday, January 23, 2017 1:48 PM > To: Tim Lewis ; Ni, Ruiyu ;=20 > Zeng, Star ; edk2-devel@lists.01.org > Cc: Carsey, Jaben > Subject: RE: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS=20 > spec > 3.1.1 >=20 > Tim, >=20 > I meant some customers do localize the shell and we don't want to=20 > arbitrarily restrict that. >=20 > Do you have any ideas on how to remove the overhead when localization=20 > is not required? >=20 > -Jaben >=20 > > -----Original Message----- > > From: Tim Lewis [mailto:tim.lewis@insyde.com] > > Sent: Monday, January 23, 2017 1:25 PM > > To: Carsey, Jaben ; Ni, Ruiyu=20 > > ; Zeng, Star ;=20 > > edk2-devel@lists.01.org > > Subject: RE: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS=20 > > spec > > 3.1.1 > > Importance: High > > > > Jaben -- > > > > I don't know exactly what you mean by each "compiler of the shell".=20 > > I do know that HII strings and HII string handling add the largest=20 > > discretionary, non-spec- required overhead to the Shell executable=20 > > (based on our production mini- shell vs. the EDK2 shell) even=20 > > without any second language. I understand it as a design goal of=20 > > the EDK2 shell to allow localization (although it does not actually=20 > > do any itself). I also understand that it is easier to enforce the=20 > > strings- in-uni rule as an absolute. But it does come with a cost=20 > > for those who want > to use a fully functional shell in a much more restricted environment. > > > > > > Tim > > > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf=20 > > Of Carsey, Jaben > > Sent: Monday, January 23, 2017 1:15 PM > > To: Tim Lewis ; Ni, Ruiyu=20 > > ; Zeng, Star ;=20 > > edk2-devel@lists.01.org > > Cc: Carsey, Jaben > > Subject: Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of=20 > > SMBIOS spec 3.1.1 > > > > Tim, > > > > I agree that some strings are directly from SMBIOS or UEFI=20 > > specifications and are not needed to be localized. > > > > Is there a disadvantage to allowing each compiler of the shell to=20 > > make that an individual decision? > > > > In either case, it might be worthwhile to verify that all of the=20 > > embedded strings meet that criterion. > > > > -Jaben > > > > > -----Original Message----- > > > From: Tim Lewis [mailto:tim.lewis@insyde.com] > > > Sent: Monday, January 23, 2017 12:52 PM > > > To: Carsey, Jaben ; Ni, Ruiyu=20 > > > ; Zeng, Star ; edk2-=20 > > > devel@lists.01.org > > > Subject: RE: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of=20 > > > SMBIOS spec 3.1.1 > > > Importance: High > > > > > > Also, in some cases, the text is taken directly from the specificatio= n. > > > Introducing HII strings in order to make these translatable when=20 > > > the source material is normative doesn't help, IMO. > > > > > > Tim > > > > > > -----Original Message----- > > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On=20 > > > Behalf Of Carsey, Jaben > > > Sent: Monday, January 23, 2017 9:41 AM > > > To: Ni, Ruiyu ; Zeng, Star=20 > > > ; > > > edk2- devel@lists.01.org > > > Cc: Carsey, Jaben > > > Subject: Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding=20 > > > of SMBIOS spec 3.1.1 > > > > > > Reviewed-by: Jaben Carsey > > > > > > I think that string mixed use existed in the EDK version of the=20 > > > command and was just never removed. > > > > > > -Jaben > > > > > > > -----Original Message----- > > > > From: Ni, Ruiyu > > > > Sent: Sunday, January 22, 2017 1:49 AM > > > > To: Zeng, Star ; edk2-devel@lists.01.org > > > > Cc: Carsey, Jaben > > > > Subject: RE: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of=20 > > > > SMBIOS spec 3.1.1 > > > > Importance: High > > > > > > > > Reviewed-by: Ruiyu Ni > > > > > > > > Thanks/Ray > > > > > > > > > -----Original Message----- > > > > > From: Zeng, Star > > > > > Sent: Sunday, January 22, 2017 5:25 PM > > > > > To: Ni, Ruiyu ; edk2-devel@lists.01.org > > > > > Cc: Carsey, Jaben ; Zeng, Star=20 > > > > > > > > > > Subject: RE: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of=20 > > > > > SMBIOS spec 3.1.1 > > > > > > > > > > Ray & Jaben, > > > > > > > > > > I am not so sure about the rule. > > > > > The mixed using of strings in c code and strings in uni file=20 > > > > > has been there since it was created. > > > > > > > > > > > > > > > Thanks, > > > > > Star > > > > > -----Original Message----- > > > > > From: Ni, Ruiyu > > > > > Sent: Sunday, January 22, 2017 4:56 PM > > > > > To: Zeng, Star ; edk2-devel@lists.01.org > > > > > Cc: Carsey, Jaben > > > > > Subject: RE: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of=20 > > > > > SMBIOS spec 3.1.1 > > > > > > > > > > Star, > > > > > Why some strings are hardcoded in C file while some are=20 > > > > > defined in UNI > > > > file? > > > > > What's the rule? > > > > > > > > > > Thanks/Ray > > > > > > > > > > > -----Original Message----- > > > > > > From: Zeng, Star > > > > > > Sent: Sunday, January 22, 2017 4:18 PM > > > > > > To: edk2-devel@lists.01.org > > > > > > Cc: Zeng, Star ; Ni, Ruiyu=20 > > > > > > ; Carsey, Jaben > > > > > > Subject: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of=20 > > > > > > SMBIOS > > > > spec > > > > > > 3.1.1 > > > > > > > > > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D349 > > > > > > > > > > > > Cc: Ruiyu Ni > > > > > > Cc: Jaben Carsey > > > > > > Contributed-under: TianoCore Contribution Agreement 1.0 > > > > > > Signed-off-by: Star Zeng > > > > > > --- > > > > > > .../SmbiosView/PrintInfo.c | 6 +++- > > > > > > .../SmbiosView/QueryTable.c | 37 > > > > ++++++++++++++++++++++ > > > > > > .../SmbiosView/QueryTable.h | 14 ++++++= +- > > > > > > .../SmbiosView/SmbiosViewStrings.uni | 3 +- > > > > > > 4 files changed, 57 insertions(+), 3 deletions(-) > > > > > > > > > > > > diff --git > > > > > > > > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn > > > > fo > > > > .c > > > > > > > > > > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > > > > > > index ecb8e2492453..1d6002b92593 100644 > > > > > > --- > > > > > > > > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintIn > > > > fo > > > > .c > > > > > > +++ > > > > > > > > > > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > > > > > > @@ -1106,7 +1106,7 @@ SmbiosPrintStructure ( > > > > > > // Management Controller Host Interface (Type 42) > > > > > > // > > > > > > case 42: > > > > > > - PRINT_STRUCT_VALUE_H (Struct, Type42, InterfaceType); > > > > > > + DisplayMCHostInterfaceType=20 > > > > > > + (Struct->Type42->InterfaceType, Option); > > > > > > break; > > > > > > > > > > > > // > > > > > > @@ -1818,6 +1818,10 @@ DisplayProcessorFamily ( > > > > > > Print (L"AMD Opteron(TM) X3000 Series APU\n"); > > > > > > break; > > > > > > > > > > > > + case 0x6B: > > > > > > + Print (L"AMD Zen Processor Family\n"); > > > > > > + break; > > > > > > + > > > > > > case 0x70: > > > > > > ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > > > > > > (STR_SMBIOSVIEW_PRINTINFO_HOBBIT_FAMILY), > > > > gShellDebug1HiiHandle); > > > > > > break; > > > > > > diff --git > > > > > > > > > > > > > > > > > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > > > > > c > > > > > > > > > > > > > > > > > > > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > > > > > c > > > > > > index 4a06c12e3b2b..282ba584c8c9 100644 > > > > > > --- > > > > > > > > > > > > > > > > > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > > > > > c > > > > > > +++ > > > > > > > > > > > > > > > > > > > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > > > > > +++ c > > > > > > @@ -575,6 +575,10 @@ TABLE_ITEM ProcessorUpgradeTable[] =3D { > > > > > > { > > > > > > 0x37, > > > > > > L"Socket SP3" > > > > > > + }, > > > > > > + { > > > > > > + 0x38, > > > > > > + L"Socket SP3r2" > > > > > > } > > > > > > }; > > > > > > > > > > > > @@ -3156,6 +3160,22 @@ TABLE_ITEM > > > IPMIDIBMCInterfaceTypeTable[] > > > > =3D > > > > > { > > > > > > }, > > > > > > }; > > > > > > > > > > > > +TABLE_ITEM MCHostInterfaceTypeTable[] =3D { > > > > > > + { > > > > > > + 0x3F00, > > > > > > + L" MCTP Host Interface " > > > > > > + }, > > > > > > + { > > > > > > + 0x40, > > > > > > + L" Network Host Interface " > > > > > > + }, > > > > > > + { > > > > > > + 0xF0, > > > > > > + L" OEM defined " > > > > > > + }, > > > > > > +}; > > > > > > + > > > > > > + > > > > > > TABLE_ITEM StructureTypeInfoTable[] =3D { > > > > > > { > > > > > > 0, > > > > > > @@ -4525,6 +4545,23 @@ DisplayIPMIDIBMCInterfaceType ( } > > > > > > > > > > > > /** > > > > > > + Display Management Controller Host Interface (Type 42) > > information. > > > > > > + > > > > > > + @param[in] Key The key of the structure. > > > > > > + @param[in] Option The optional information. > > > > > > +**/ > > > > > > +VOID > > > > > > +DisplayMCHostInterfaceType ( > > > > > > + IN UINT8 Key, > > > > > > + IN UINT8 Option > > > > > > + ) > > > > > > +{ > > > > > > + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > > > > > > +(STR_SMBIOSVIEW_QUERYTABLE_MC_HOST_INTERFACE_TYPE), > > > > > > +gShellDebug1HiiHandle); > > > > > > + PRINT_INFO_OPTION (Key, Option); > > > > > > + PRINT_TABLE_ITEM (MCHostInterfaceTypeTable, Key); } > > > > > > + > > > > > > +/** > > > > > > Display the structure type information. > > > > > > > > > > > > @param[in] Key The key of the structure. > > > > > > diff --git > > > > > > > > > > > > > > > > > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > > > > > h > > > > > > > > > > > > > > > > > > > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > > > > > h > > > > > > index 9cae7094fb19..bd9e6898d40a 100644 > > > > > > --- > > > > > > > > > > > > > > > > > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > > > > > h > > > > > > +++ > > > > > > > > > > > > > > > > > > > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > > > > > +++ h > > > > > > @@ -2,7 +2,7 @@ > > > > > > Build a table, each item is (key, info) pair. > > > > > > and give a interface of query a string out of a table. > > > > > > > > > > > > - Copyright (c) 2005 - 2012, Intel Corporation. All rights=20 > > > > > > reserved.
> > > > > > + Copyright (c) 2005 - 2017, Intel Corporation. All rights=20 > > > > > > + reserved.
> > > > > > This program and the accompanying materials > > > > > > are licensed and made available under the terms and=20 > > > > > > conditions of the BSD License > > > > > > which accompanies this distribution. The full text of=20 > > > > > > the license may be found at @@ -779,4 +779,16 @@ > > > > DisplayIPMIDIBMCInterfaceType ( > > > > > > IN UINT8 Option > > > > > > ); > > > > > > > > > > > > +/** > > > > > > + Display Management Controller Host Interface (Type 42) > > information. > > > > > > + > > > > > > + @param[in] Key The key of the structure. > > > > > > + @param[in] Option The optional information. > > > > > > +**/ > > > > > > +VOID > > > > > > +DisplayMCHostInterfaceType ( > > > > > > + IN UINT8 Key, > > > > > > + IN UINT8 Option > > > > > > + ); > > > > > > + > > > > > > #endif > > > > > > diff --git > > > > > > > > > > > > > > > > > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView > > > > > > Strings.uni > > > > > > > > > > > > > > > > > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView > > > > > > Strings.uni > > > > > > index b9032df076d2..7d694536dbcd 100644 > > > > > > --- > > > > > > > > > > > > > > > > > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView > > > > > > Strings.uni > > > > > > +++ > > > > > > > > > > > > > > > > > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView > > > > > > S > > > > > > +++ trings.uni > > > > > > @@ -1,6 +1,6 @@ > > > > > > // /** > > > > > > // > > > > > > -// Copyright (c) 2005 - 2015, Intel Corporation. All rights=20 > > > > > > reserved.
> > > > > > +// Copyright (c) 2005 - 2017, Intel Corporation. All rights=20 > > > > > > +reserved.
> > > > > > // (C) Copyright 2014-2015 Hewlett-Packard Development=20 > > > > > > Company, L.P.
// (C) Copyright 2015-2017 Hewlett Packard=20 > > > > > > Enterprise Development LP
// This program and the=20 > > > > > > accompanying materials > > > > @@ > > > > > > -444,6 +444,7 @@ #string > > > > > > STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_ADDR_TYPE > > > > > > #language en-US "Management Device - Address Type:" > > > > > > #string STR_SMBIOSVIEW_QUERYTABLE_MEM_CHANNEL_TYPE > > > > > > #language en-US "Memory Channel Type:" > > > > > > #string STR_SMBIOSVIEW_QUERYTABLE_BMC_INTERFACE_TYPE > > > > > > #language en-US "BMC Interface Type:" > > > > > > +#string > > STR_SMBIOSVIEW_QUERYTABLE_MC_HOST_INTERFACE_TYPE > > > > > > #language en-US "MC Host Interface Type:" > > > > > > #string STR_SMBIOSVIEW_QUERYTABLE_STRUCT_TYPE > > > > #language > > > > > > en-US "Structure Type:" > > > > > > #string STR_SMBIOSVIEW_SMBIOSVIEW_ONE_VAR_ARGV > > > > > > #language en-US "%s " > > > > > > #string STR_SMBIOSVIEW_SMBIOSVIEW_QUERY_STRUCT_COND > > > > > > #language en-US "Query Structure, conditions are:\r\n" > > > > > > -- > > > > > > 2.7.0.windows.1 > > > > > > _______________________________________________ > > > edk2-devel mailing list > > > edk2-devel@lists.01.org > > > https://lists.01.org/mailman/listinfo/edk2-devel > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel