public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* HiiSetToDefaults behavior
@ 2017-08-25  8:13 Wim Vervoorn
  2017-08-25  8:57 ` Bi, Dandan
  0 siblings, 1 reply; 4+ messages in thread
From: Wim Vervoorn @ 2017-08-25  8:13 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

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 default 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 = Test1OneOf,                               // Define reference name for Question
      varid   = lIfrNVData.Test1OfValue,                                      // Use "DataStructure.Member" to reference Buffer Storage
      prompt  = STRING_TOKEN(STR_TEST1_PROMPT),
      help    = STRING_TOKEN(STR_TEST1_HELP),
      //
      // Define an option (EFI_IFR_ONE_OF_OPTION)
      //
      option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = 0;
      option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = 0;
endoneof;

oneof name = Test2OneOf,                               // Define reference name for Question
      varid   = lIfrNVData.Test2OfValue,                                      // Use "DataStructure.Member" to reference Buffer Storage
      prompt  = STRING_TOKEN(STR_TEST2_PROMPT),
      help    = STRING_TOKEN(STR_TEST2_HELP),
      //
      // Define an option (EFI_IFR_ONE_OF_OPTION)
      //
      option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT;
      option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = 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<http://www.eltan.com/>
"THIS MESSAGE CONTAINS CONFIDENTIAL INFORMATION. UNLESS YOU ARE THE INTENDED 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 DELETE THIS MESSAGE AND ALL COPIES."





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: HiiSetToDefaults behavior
  2017-08-25  8:13 HiiSetToDefaults behavior Wim Vervoorn
@ 2017-08-25  8:57 ` Bi, Dandan
  2017-08-25  9:07   ` Wim Vervoorn
  0 siblings, 1 reply; 4+ messages in thread
From: Bi, Dandan @ 2017-08-25  8:57 UTC (permalink / raw)
  To: Wim Vervoorn, edk2-devel@lists.01.org

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 value can be shared.(such as: standard default doesn't exit, but Manufacturing Default exits, Manufacturing Default value can    
     be shared with standard default)
3. For Question without any types of default value, current implementation will 
    (a) set first option value as the default value of oneof
    (b) set minimum value as the default value of numeric
     ....


Thanks,
Dandan
  

-----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 default 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 = Test1OneOf,                               // Define reference name for Question
      varid   = lIfrNVData.Test1OfValue,                                      // Use "DataStructure.Member" to reference Buffer Storage
      prompt  = STRING_TOKEN(STR_TEST1_PROMPT),
      help    = STRING_TOKEN(STR_TEST1_HELP),
      //
      // Define an option (EFI_IFR_ONE_OF_OPTION)
      //
      option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = 0;
      option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = 0; endoneof;

oneof name = Test2OneOf,                               // Define reference name for Question
      varid   = lIfrNVData.Test2OfValue,                                      // Use "DataStructure.Member" to reference Buffer Storage
      prompt  = STRING_TOKEN(STR_TEST2_PROMPT),
      help    = STRING_TOKEN(STR_TEST2_HELP),
      //
      // Define an option (EFI_IFR_ONE_OF_OPTION)
      //
      option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT;
      option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = 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<http://www.eltan.com/>
"THIS MESSAGE CONTAINS CONFIDENTIAL INFORMATION. UNLESS YOU ARE THE INTENDED 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 DELETE THIS MESSAGE AND ALL COPIES."



_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: HiiSetToDefaults behavior
  2017-08-25  8:57 ` Bi, Dandan
@ 2017-08-25  9:07   ` Wim Vervoorn
  2017-08-25 14:58     ` Bi, Dandan
  0 siblings, 1 reply; 4+ messages in thread
From: Wim Vervoorn @ 2017-08-25  9:07 UTC (permalink / raw)
  To: Bi, Dandan, edk2-devel@lists.01.org

Hello Dandan,

Thanks for the clarification.

So I assume there is no way that will cause this call to leave certain fields 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 INTENDED 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 DELETE THIS MESSAGE AND ALL COPIES." 




-----Original Message-----
From: Bi, Dandan [mailto:dandan.bi@intel.com] 
Sent: Friday, August 25, 2017 10:57 AM
To: Wim Vervoorn <wvervoorn@eltan.com>; 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 value can be shared.(such as: standard default doesn't exit, but Manufacturing Default exits, Manufacturing Default value can    
     be shared with standard default)
3. For Question without any types of default value, current implementation will 
    (a) set first option value as the default value of oneof
    (b) set minimum value as the default value of numeric
     ....


Thanks,
Dandan
  

-----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 default 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 = Test1OneOf,                               // Define reference name for Question
      varid   = lIfrNVData.Test1OfValue,                                      // Use "DataStructure.Member" to reference Buffer Storage
      prompt  = STRING_TOKEN(STR_TEST1_PROMPT),
      help    = STRING_TOKEN(STR_TEST1_HELP),
      //
      // Define an option (EFI_IFR_ONE_OF_OPTION)
      //
      option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = 0;
      option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = 0; endoneof;

oneof name = Test2OneOf,                               // Define reference name for Question
      varid   = lIfrNVData.Test2OfValue,                                      // Use "DataStructure.Member" to reference Buffer Storage
      prompt  = STRING_TOKEN(STR_TEST2_PROMPT),
      help    = STRING_TOKEN(STR_TEST2_HELP),
      //
      // Define an option (EFI_IFR_ONE_OF_OPTION)
      //
      option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT;
      option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = 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<http://www.eltan.com/>
"THIS MESSAGE CONTAINS CONFIDENTIAL INFORMATION. UNLESS YOU ARE THE INTENDED 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 DELETE THIS MESSAGE AND ALL COPIES."



_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: HiiSetToDefaults behavior
  2017-08-25  9:07   ` Wim Vervoorn
@ 2017-08-25 14:58     ` Bi, Dandan
  0 siblings, 0 replies; 4+ messages in thread
From: Bi, Dandan @ 2017-08-25 14:58 UTC (permalink / raw)
  To: Wim Vervoorn, edk2-devel@lists.01.org

Hi Wim Vervoorn,

Yes, it's correct for some Questions like oneof, numeric, if they don't have 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 have 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 <dandan.bi@intel.com>; 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 fields 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 INTENDED 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 DELETE THIS MESSAGE AND ALL COPIES." 




-----Original Message-----
From: Bi, Dandan [mailto:dandan.bi@intel.com] 
Sent: Friday, August 25, 2017 10:57 AM
To: Wim Vervoorn <wvervoorn@eltan.com>; 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 value can be shared.(such as: standard default doesn't exit, but Manufacturing Default exits, Manufacturing Default value can    
     be shared with standard default)
3. For Question without any types of default value, current implementation will 
    (a) set first option value as the default value of oneof
    (b) set minimum value as the default value of numeric
     ....


Thanks,
Dandan
  

-----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 default 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 = Test1OneOf,                               // Define reference name for Question
      varid   = lIfrNVData.Test1OfValue,                                      // Use "DataStructure.Member" to reference Buffer Storage
      prompt  = STRING_TOKEN(STR_TEST1_PROMPT),
      help    = STRING_TOKEN(STR_TEST1_HELP),
      //
      // Define an option (EFI_IFR_ONE_OF_OPTION)
      //
      option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = 0;
      option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = 0; endoneof;

oneof name = Test2OneOf,                               // Define reference name for Question
      varid   = lIfrNVData.Test2OfValue,                                      // Use "DataStructure.Member" to reference Buffer Storage
      prompt  = STRING_TOKEN(STR_TEST2_PROMPT),
      help    = STRING_TOKEN(STR_TEST2_HELP),
      //
      // Define an option (EFI_IFR_ONE_OF_OPTION)
      //
      option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT;
      option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = 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<http://www.eltan.com/>
"THIS MESSAGE CONTAINS CONFIDENTIAL INFORMATION. UNLESS YOU ARE THE INTENDED 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 DELETE 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-25 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-25  8:13 HiiSetToDefaults behavior Wim Vervoorn
2017-08-25  8:57 ` Bi, Dandan
2017-08-25  9:07   ` Wim Vervoorn
2017-08-25 14:58     ` Bi, Dandan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox