From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 0E1DD2095AE79 for ; Fri, 25 Aug 2017 07:56:14 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Aug 2017 07:58:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,426,1498546800"; d="scan'208";a="1166110745" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 25 Aug 2017 07:58:43 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 Aug 2017 07:58:42 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 Aug 2017 07:58:42 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.183]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.117]) with mapi id 14.03.0319.002; Fri, 25 Aug 2017 22:58:40 +0800 From: "Bi, Dandan" To: Wim Vervoorn , "edk2-devel@lists.01.org" Thread-Topic: HiiSetToDefaults behavior Thread-Index: AdMdeQr9ye2D90TlRY+Njw5NLMjVMAABOHbwAADeNfAADAGYMA== Date: Fri, 25 Aug 2017 14:58:39 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3B956DD6@shsmsx102.ccr.corp.intel.com> References: <3C0D5C461C9E904E8F62152F6274C0BB3B956C2A@shsmsx102.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: HiiSetToDefaults behavior X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2017 14:56:14 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Wim Vervoorn, Yes, it's correct for some Questions like oneof, numeric, if they don't hav= e default value, this call will take first option value, minimum value as = their default value. But for Question like String opcode, if it doesn't hav= e default, the value of this question will be untouched with this call. Thanks, Dandan -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Wim = Vervoorn Sent: Friday, August 25, 2017 5:08 PM To: Bi, Dandan ; edk2-devel@lists.01.org Subject: Re: [edk2] HiiSetToDefaults behavior Hello Dandan, Thanks for the clarification. So I assume there is no way that will cause this call to leave certain fiel= ds as they are. Is this correct? Best Regards, Wim Vervoorn Eltan B.V. Ambachtstraat 23 5481 SM Schijndel The Netherlands T : +31-(0)73-594 46 64 E : wvervoorn@eltan.com W : http://www.eltan.com "THIS MESSAGE CONTAINS CONFIDENTIAL INFORMATION. UNLESS YOU ARE THE INTENDE= D RECIPIENT OF THIS MESSAGE, ANY USE OF THIS MESSAGE IS STRICTLY PROHIBITED= . IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE IMMEDIATELY NOTIFY THE= SENDER BY TELEPHONE +31-(0)73-5944664 OR REPLY EMAIL, AND IMMEDIATELY DELE= TE THIS MESSAGE AND ALL COPIES."=A0 -----Original Message----- From: Bi, Dandan [mailto:dandan.bi@intel.com]=20 Sent: Friday, August 25, 2017 10:57 AM To: Wim Vervoorn ; edk2-devel@lists.01.org Subject: RE: HiiSetToDefaults behavior Hi Wim Vervoorn, Current behavior of HiiSetToDefaults(): 1. For Question has the specified type default value, will set the default = value to storage for the Question. 2. For Question without the specified type default, other type default val= ue can be shared.(such as: standard default doesn't exit, but Manufacturing= Default exits, Manufacturing Default value can =20 be shared with standard default) 3. For Question without any types of default value, current implementation = will=20 (a) set first option value as the default value of oneof (b) set minimum value as the default value of numeric .... Thanks, Dandan =20 -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Wim = Vervoorn Sent: Friday, August 25, 2017 4:13 PM To: edk2-devel@lists.01.org Subject: [edk2] HiiSetToDefaults behavior Hello, I have a question about the expect behavior of HiiSetToDefaults(). So far I= haven't been able to find a clear definition of what this should do. What I expect is that this call would only touch the items that have a defa= ult defined. So what I would think is that Test2OfValue below would become = 1 and Test1OfValue would be untouched as long as it's value is either 0 or = 1 and become 1 if this is not the case. What seems to happen is that for Test1OfValue the first item is used as the= default. oneof name =3D Test1OneOf, // Define referenc= e name for Question varid =3D lIfrNVData.Test1OfValue, = // Use "DataStructure.Member" to reference Buffer Storage prompt =3D STRING_TOKEN(STR_TEST1_PROMPT), help =3D STRING_TOKEN(STR_TEST1_HELP), // // Define an option (EFI_IFR_ONE_OF_OPTION) // option text =3D STRING_TOKEN(STR_ENABLE), value =3D 1, flags =3D 0; option text =3D STRING_TOKEN(STR_DISABLE), value =3D 0, flags =3D 0; = endoneof; oneof name =3D Test2OneOf, // Define referenc= e name for Question varid =3D lIfrNVData.Test2OfValue, = // Use "DataStructure.Member" to reference Buffer Storage prompt =3D STRING_TOKEN(STR_TEST2_PROMPT), help =3D STRING_TOKEN(STR_TEST2_HELP), // // Define an option (EFI_IFR_ONE_OF_OPTION) // option text =3D STRING_TOKEN(STR_ENABLE), value =3D 1, flags =3D DEFA= ULT; option text =3D STRING_TOKEN(STR_DISABLE), value =3D 0, flags =3D 0; = endoneof; Best Regards, Wim Vervoorn Eltan B.V. Ambachtstraat 23 5481 SM Schijndel The Netherlands T : +31-(0)73-594 46 64 E : wvervoorn@eltan.com W : http://www.eltan.com "THIS MESSAGE CONTAINS CONFIDENTIAL INFORMATION. UNLESS YOU ARE THE INTENDE= D RECIPIENT OF THIS MESSAGE, ANY USE OF THIS MESSAGE IS STRICTLY PROHIBITED= . IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE IMMEDIATELY NOTIFY THE= SENDER BY TELEPHONE +31-(0)73-5944664 OR REPLY EMAIL, AND IMMEDIATELY DELE= TE THIS MESSAGE AND ALL COPIES." _______________________________________________ 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