Aaron, efivarstore definition support two format, format one like below. It's the recommend format which follow UEFI 2.3 and later spec.
efivarstore MY_EFI_VARSTORE_DATA, attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, // EFI variable attribures name = MyEfiVar, guid = DRIVER_SAMPLE_FORMSET_GUID; The other format is like below, it is used to compatible with code before UEFI 2.3, and not recommend user to use it now. In order to let later questions reference this varstore, the varstore type field(red mark one) must be a valid string identifier. efivarstore VarEqUserName, attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS, name = STRING_TOKEN(VAR_EQ_USER_NAME), varsize = 1, guid = SYSTEM_CONFIGURATION_GUID; Current vfrcompiler has this assumption but not add code to check it. So your code caused vfrcompiler crushed. Now I add code to check the varstore type filed for the old style. If user not use string identifier, vfrcompiler will report an error. Please review this new patch. Thanks, Eric From: Aaron Pop [mailto:aar...@ami.com] Sent: Wednesday, December 31, 2014 4:05 AM To: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] [Patch] VfrCompile Crash on efivarstore statement Hi Eric, I don't have a case that can reference the efivarstore provided in the example. I was creating varstore statements based upon the allowable syntax in the vfrcompiler source code when I came across the crash. Best Regards, Aaron From: Dong, Eric [mailto:eric.d...@intel.com] Sent: Monday, December 29, 2014 9:33 PM To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net> Subject: Re: [edk2] [Patch] VfrCompile Crash on efivarstore statement Aaron, After I checked in your patch, it break our current code, so I will rollback this patch first and discussed with you. Later I will provide a final solution for this issue. Our code use efivarstore like below. With your patch, when pass the checkbox opcode, it will report below error info. efivarstore VarEqUserName, attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS, name = STRING_TOKEN(VAR_EQ_USER_NAME), varsize = 1, guid = SYSTEM_CONFIGURATION_GUID; suppressif TRUE; checkbox varid = VarEqUserName, prompt = STRING_TOKEN(STR_NULL_VAREQUSERNAME_STRING), help = STRING_TOKEN(STR_NULL_STRING), endcheckbox; endif; VfrCompile... Security.vfr(73): ERROR 12288: VarEqUserName NMAKE : fatal error U1077: 'E:\BPTrunk\BaseTools\Bin\Win32\VfrCompile.EXE' : return code '0x2' : undefined Stop. Thanks, Eric From: Dong, Eric [mailto:eric.d...@intel.com] Sent: Tuesday, December 30, 2014 9:34 AM To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net> Subject: Re: [edk2] [Patch] VfrCompile Crash on efivarstore statement Aaron, For your below example efivarstore, how do your questions reference this storage? Thanks, Eric From: Dong, Eric [mailto:eric.d...@intel.com] Sent: Monday, December 22, 2014 10:23 AM To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net> Subject: Re: [edk2] [Patch] VfrCompile Crash on efivarstore statement Aaron, Thanks to provide this patch. Code has checked in r16544. Thanks, Eric From: Aaron Pop [mailto:aar...@ami.com] Sent: Saturday, December 20, 2014 12:41 AM To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net> Subject: [edk2] [Patch] VfrCompile Crash on efivarstore statement The following VFR statement was causing the VfrCompile to crash: efivarstore UINT8, attribute = 0, name = STRING_TOKEN(STR_TEST3), varsize = 1, guid = { 0xf648132a, 0x4193, 0x4c13, { 0x85, 0x71, 0x33, 0xf0, 0x6d, 0x53, 0x74, 0xa9 } }; In the vfrStatementVarStoreEfi, this is valid syntax, but the else statement after the UUID declaration was causing the system to crash because it was attempting to use the "TN->getText()". Based on the code above, it seems like they needed to use StoreName. Attached is the patch that corrects the crash. Regards, Aaron The information contained in this message may be confidential and proprietary to American Megatrends, Inc. This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. The information contained in this message may be confidential and proprietary to American Megatrends, Inc. This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
VfrSyntax.g.patch
Description: VfrSyntax.g.patch
------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel