Hi Tim,

The flags definition in VFR spec is used to compatible with framework code, but 
VfrCompile is generate code base on the UEFI spec, which means if the flag 
value belongs to question, it will set it to the question's flag filed. Example 
shows below, the RESET_REQUIRED flag is saved in the flag field of question's 
instead of the option's.
    oneof varid  = MyIfrNVData.QuestionAboutTreeHugging,
>0000030D: 05 91 1F 00 20 00 08 00 34 12 D3 00 10 10 00 03 00
      prompt      = STRING_TOKEN(0x001F),
      help        = STRING_TOKEN(0x0020),
      option text = STRING_TOKEN(0x0021), value = 0, flags = RESET_REQUIRED;
>0000031E: 09 07 21 00 00 00 00
      option text = STRING_TOKEN(0x0022), value = 1, flags = DEFAULT | 
RESET_REQUIRED;
>00000325: 09 07 22 00 10 00 01
      option text = STRING_TOKEN(0x0023), value = 0x03, flags = RESET_REQUIRED;
>0000032C: 09 07 23 00 00 00 03
    endoneof;
>00000333: 29 02

Also I will follow up to clean the DriverSampleDxe, remove the old code style 
used for framework. Just like the above sample, will update code like  below 
format:
    oneof varid  = MyIfrNVData.QuestionAboutTreeHugging,
      prompt      = STRING_TOKEN(0x001F),
      help           = STRING_TOKEN(0x0020),
      flags           = RESET_REQUIRED,
      option text = STRING_TOKEN(0x0021), value = 0, flags = 0;
      option text = STRING_TOKEN(0x0022), value = 1, flags = DEFAULT;
      option text = STRING_TOKEN(0x0023), value = 0x03, flags = 0;
endoneof;

Thanks,
Eric
From: Tim Lewis [mailto:tim.le...@insyde.com]
Sent: Friday, August 22, 2014 12:31 AM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] HII ONE_OF_OPTIONS flags

The current DriverSampleDxe has the following item for the orderedlist:

                option text = STRING_TOKEN(0x006F), value = 2, flags = 
RESET_REQUIRED;
                option text = STRING_TOKEN(0x006E), value = 1, flags = 
RESET_REQUIRED;
                option text = STRING_TOKEN(0x0070), value = 3, flags = 
RESET_REQUIRED;

The VFR specification lists both RESET_REQUIRED and INTERACTIVE for the 
"option" flags field.

But the UEFI specification says:

FlagsSpecifies the flags associated with the current option. See 
EFI_IFR_OPTION_x.


#define EFI_IFR_OPTION_DEFAULT 0x10
#define EFI_IFR_OPTION_DEFAULT_MFG 0x20

The VFR specification then goes on to say:

Therefore, the options' flags are treated as question flags and can accept all 
values of question flags.

What is not clear is: do these flags enable some extension to the UEFI 
specification? (since theses flags are not in the specification) or are these 
flags, in effect, promoted so that the question's Flags field bit will be set 
IF any option has the field bit set?

Tim
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to