Hi Tim,

Add my comments below.

Thanks,
Eric
From: Tim Lewis [mailto:[email protected]]
Sent: Friday, August 22, 2014 12:40 AM
To: [email protected]
Subject: [edk2] HII ORDERED_LIST support

In DriverSampleDxe, the boot order item is listed in storage as:

  UINT16  BootOrder[8];

And here is the ordered list which manipulates this item:

      orderedlist
                varid       = MyIfrNVData.BootOrder,
                prompt      = STRING_TOKEN(0x006D),
                help        = STRING_TOKEN(0x0059),
                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;
              suppressif ideqval MyIfrNVData.BootOrderLarge == 0;
                option text = STRING_TOKEN(0x0071), value = 4, flags = 
RESET_REQUIRED;
              endif
      endlist;

This leads to a number of questions:


1)      The BootOrder is defined as UINT16, but the UEFI specification clearly 
states that an orderedlist will work on a buffer with one byte per container.  
(See 29.2.5.4.8 where it says, "The set questions are stored as a Buffer with 
one byte for each Container."

[[[Eric]]] Truly spec has this description but vfrcompile and browser not do 
this check, also current code may already has samples which already violate 
this rule, so I need more discussion to provide a good proposal for this case.

2)      The option values are all integers. But the storage type of an ordered 
list is a BUFFER. To me this implies (I haven't looked this up) that the value 
an option is being used as the option for a single container. That makes sense, 
but it is not the behavior described in the UEFI specification. Also, there 
seems to be no way to create a value for a question of type buffer.

[[[Eric]]] no catch what's your mean is.

3)      Likewise, there seems to be no way to provide a default for an ordered 
list.

[[[Eric]]] yes, ordered list opcode just base on the current option order to 
set the default value. For your above example, the default value is 2,1,3,4.

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

Reply via email to