[if !mso]> [if !mso]>

RE: [EDK DEV] VFR Expression

Subject: RE: [EDK DEV] VFR Expression

From: Richard Du <xiong.du@intel.com>

To: dev@edk.tianocore.org

Date: 2009-04-16 17:02:01

Hi Dongbo,

 

With some investigation, I found it is caused by a bug in VfrCompiler. Would you please help to submit a tracker in EDK?

 

The root cause is, in case 1, the VfrCompiler doesn’t set scope bit of ideqvarlist op-code which violate the UEFI specification (in EFI_IFR_SUPPRESS_IF Description: “If the expression consists of more than a single opcode, then the first opcode in the expression must have the Scope bit set and the expression must end with EFI_IFR_END.”).

 

Here is some IFR debug information for your reference (which is scratched from build output file Edk\Sample\Platform\Nt32\uefi\IA32\Sample\Universal\UserInterface\UefiSetupBrowser\Dxe\DriverSample\Vfr.lst):

For case 2:

            inconsistentif prompt = STRING_TOKEN(0x0038),

>000003E6: 11 84 38 00

              ideqval MyIfrNVData.HowOldAreYouInYearsManual == 99

>000003EA: 12 86 0A 00 63 00                          >>>>>>> Correct, Scope bit is set

              OR

>000003F6: 16 02

              ideqid  MyIfrNVData.HowOldAreYouInYearsManual == MyEfiVar

>000003F0: 13 06 0A 00 0B 00

              OR

>00000406: 16 02

>00000408: 29 02

              ideqvallist MyIfrNVData.HowOldAreYouInYearsManual == 1 3 5 7

>000003F8: 14 0E 0A 00 04 00 01 00 03 00 05 00 07 00

            endif

>0000040A: 29 02

 

For case 1:

            inconsistentif prompt = STRING_TOKEN(0x0038),

>000003E6: 11 84 38 00

              ideqvallist MyIfrNVData.HowOldAreYouInYearsManual == 1 3 5 7

>000003EA: 14 0E 0A 00 04 00 01 00 03 00 05 00 07 00 >>>>>>> Incorrect, Scope bit is not set

              OR

>000003FE: 16 02

              ideqval MyIfrNVData.HowOldAreYouInYearsManual == 99

>000003F8: 12 06 0A 00 63 00

              OR

>00000406: 16 02

>00000408: 29 02

              ideqid  MyIfrNVData.HowOldAreYouInYearsManual == MyEfiVar

>00000400: 13 06 0A 00 0B 00

            endif

>0000040A: 29 02

 

Thanks,

Richard


From: Dongbo [mailto:DongboZhang@viatech.com.cn]
Sent: Wednesday, April 15, 2009 16:23
To: dev@edk.tianocore.org
Subject: [EDK DEV] VFR Expression

 

Hi

 

I have a question about vfr expression.

 

In a vfr file:

 

Case 1:

suppressif ideqvallist ConfigData.aaa == 1 2

             OR

           ideqval ConfigData.bbb == 1;

......

endif;

 

Case 2:

suppressif ideqval ConfigData.bbb == 1

             OR

           ideqvallist ConfigData.aaa == 1 2;

  ......

endif;

 

All the case will pass when compile.

But when running, case 1 will cause unintelligible error, case 2 works correctly.

 

Why?

 

I didnt find the explanation in <VFR Programming language> Revision 1.1.

 

Best Regards

Dongbo