Hi:
This is a bug in VfrCompile. It doesn't support to specify VarId for
NameValue storage. We will fix it.
If one of question is related to NameValue storage, HiiCreateOneOfOpCode()
can be used like below. It will use VarOffset field as VarName for NameValue
storage.
HiiCreateOneOfOpCode (
StartOpCodeHandle, // Handle to the buffer of opcodes
KEY_Q1, // Question ID
StorageId, // Storage ID
STRING_TOKEN (STR_VALUE1), // VarName or Offset in storage
STRING_TOKEN (STR_XXX_PROMPT), // String ID for prompt
STRING_TOKEN (STR_XXX_HELP), // String ID for help
EFI_IFR_FLAG_CALLBACK, // Flags in Question header
EFI_IFR_TYPE_NUM_SIZE_8, // Flags for oneof opcode
OptionsOpCodeHandle, // ONE_OF_OPTION opcode handle
NULL // Default opcode handle, OPTIONAL
);
Thanks
Liming
-----Original Message-----
From: Simon (Xiang) Lian-SSI [mailto:[email protected]]
Sent: Sunday, September 29, 2013 4:07 AM
To: [email protected]
Subject: Re: [edk2] How to specify name/value storage in HiiCreateOneOfOpCode?
Hi Neeraj,
Thanks for your comment, but my one-of-list is entire generated dynamically and
could not be predefined.
Hi Galla,
This is strange. I'm using UDK2010 also and just have tried it again, the
VfrCompile always reports an ERROR 12288: varid : unexpected token
Here is my code in VFR, mind if you give it a try in your build?
namevaluevarstore NameValueVar1,
varid = VAR_NEW_ID, <------ VfrCompiler breaks here: ERROR 12288: varid
: unexpected token
name = STRING_TOKEN(STR_VALUE1),
name = STRING_TOKEN(STR_VALUE2),
guid = ABC_FORMSET_GUID;
If you are sure it can pass, I wonder if I'm using an outdated VfrCompiler,
mine is version 2.00 Build 2524 (7/15/2011). What is yours?
Thanks,
Simon
________________________________
From: Neeraj Ladkani [[email protected]]
Sent: Saturday, September 28, 2013 11:56 AM
To: [email protected]
Subject: Re: [edk2] How to specify name/value storage in HiiCreateOneOfOpCode?
Simon,
if your data values are predefined, you can create them in formset and hide
them using supressif upon a condition.
On Sat, Sep 28, 2013 at 3:33 PM, Galla Rao
<[email protected]<mailto:[email protected]>> wrote:
I used it in EDKI & UDK2010 it worked for me
On Fri, Sep 27, 2013 at 9:34 PM, Simon (Xiang) Lian-SSI
<[email protected]<mailto:[email protected]>> wrote:
But the problem is that the namevaluevarstore syntax does not support varid.
Please refer VFR Programming Language Spec Ver 1.7.
Thanks,
Simon
From: Galla Rao [mailto:[email protected]<mailto:[email protected]>]
Sent: Friday, September 27, 2013 5:06 AM
To: [email protected]<mailto:[email protected]>
Subject: Re: [edk2] How to specify name/value storage in HiiCreateOneOfOpCode?
3rd paramter is VarStore ID it should be CONFIGURATION_VARSTORE_ID not
STRING_TOKEN
IN EFI_VARSTORE_ID VarStoreId,
you need to define it in yout VFR file. you can check sample code in UDK2010
varstore ISCSI_CONFIG_IFR_NVDATA,
varid = CONFIGURATION_VARSTORE_ID,
name = ISCSI_CONFIG_IFR_NVDATA,
guid = ISCSI_CONFIG_GUID;
On Fri, Sep 27, 2013 at 6:07 AM, Simon (Xiang) Lian-SSI
<[email protected]<mailto:[email protected]>> wrote:
Suppose a name/value storage has been defined in VFR file like below:
//
// Define a name/value storage (EFI_IFR_VARSTORE_NAME_VALUE)
//
namevaluevarstore NameValueVar1,
name = STRING_TOKEN(STR_VALUE1),
name = STRING_TOKEN(STR_VALUE2),
guid = ABC_FORMSET_GUID;
Now to create a one-of drop down menu list dynamically, I need to invoke
HiiCreateOneOfOpCode in the callback function of HiiConfigAccess. However how
should I set the Storage ID to the name/value storage NameValueVar1 in the
function? Following is what it looks like (note namevaluevarstore does not
support varid descriptor in VFR):
HiiCreateOneOfOpCode (
StartOpCodeHandle, // Handle to the buffer of opcodes
KEY_Q1, // Question ID
STRING_TOKEN (STR_VALUE1), // <===== incorrect Storage ID?
0, // Offset in storage
STRING_TOKEN (STR_XXX_PROMPT), // String ID for prompt
STRING_TOKEN (STR_XXX_HELP), // String ID for help
EFI_IFR_FLAG_CALLBACK, // Flags in Question header
EFI_IFR_TYPE_NUM_SIZE_8, // Flags for oneof opcode
OptionsOpCodeHandle, // ONE_OF_OPTION opcode handle
NULL // Default opcode handle, OPTIONAL
);
Tried all different ways without success. Any comments/hints would be greatly
appreciated.
Thanks,
Simon
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel