Hi Tim,

Add my comments below.

From: Tim Lewis [mailto:tim.le...@insyde.com]
Sent: Thursday, January 17, 2013 12:06 AM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] strings on HII expression stack

Eric -

With fairly complicated string testing functions, I can easily get it to run 
out of string ids. Also, I would point out that the existing expression stack 
has a memory leak. Currently, it only deletes the type buffer, but not the 
strings which have been added to the HII database.
[[Eric]] for string type, the string buffer will be deleted when this string is 
popped and processed, so no memory leak exists.

Also, on another topic, consider the case where Mid() is used on an HII REF or 
HII TIME or HII DATE. This is legal, per the spec (because these types are 
treated as buffer), but not allowed with the current expression evaluator.
[[Eric]] this is truly a bug in current code, I will fix this bug.

From: Dong, Eric 
[mailto:eric.d...@intel.com]<mailto:[mailto:eric.d...@intel.com]>
Sent: Tuesday, January 15, 2013 10:27 PM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] strings on HII expression stack

Hi Bill & Tim,

After check the UEFI spec, I found the spec not detail descripted how the stack 
saves the data. Section 28.2.5.7.4 just said the data in EFI_IFR_TYPE_STRING 
type is null-terminated string instead of string id. How to push 
EFI_IFR_TYPE_STRING type data to stack is just an implementation choice and the 
reason why we push string id is just like Tim said.

When evaluate the EFI_IFR_TYPE_STRING data, we first get string data from the 
string id, this is follow spec.

For the issue of run out of string ids, it's truly a potential issue, but I 
think it's rare to occur, so we not plan to fix it now.

Thanks,
Eric
From: Dong, Eric [mailto:eric.d...@intel.com]
Sent: Wednesday, January 16, 2013 10:25 AM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] strings on HII expression stack

Hi Bill & Tim,

I will follow up this issue, thanks for your feedback.

Thanks,
Eric
From: Tim Lewis 
[mailto:tim.le...@insyde.com]<mailto:[mailto:tim.le...@insyde.com]>
Sent: Tuesday, January 08, 2013 8:50 AM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] strings on HII expression stack

Bill -

The expression evaluator must use the actual string values, as you expect. 
Section 28.2.5.7.4 says that a string value in an expression is a 
"Null-terminated string" not a string ID.

Furthermore, some operations, like Mid() and Token() actually create new string 
values. Which string id should hold them? It appears that the current EDK2 
browser attempts to create new strings each time. While this might seem like a 
clever way to get around the difference and re-use EFI_HII_VALUE (where strings 
are a string-id), it actually leads to HII database errors if you play around 
in the browser for too long because after the expression is evaluated too many 
times, you will eventually run out of string ids (yes, 64k is a large number, 
but ...)

Tim

From: bill_mun...@dell.com<mailto:bill_mun...@dell.com> 
[mailto:bill_mun...@dell.com]<mailto:[mailto:bill_mun...@dell.com]>
Sent: Monday, January 07, 2013 4:36 PM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: [edk2] strings on HII expression stack

HII has a number of opcodes which can push/pop string values on the HII 
expression stack (like the opcodes in the list below). The language in the UEFI 
spec made me think that form processors push/pop the actual strings (not HII 
string IDs). However, after looking at the EDK2 browser code I get the idea 
that these opcodes push/pop string IDs instead of strings. Does the EDK2 
browser need to be updated to match the spec in this regard?

EFI_IFR_STRING_REF
EFI_IFR_QUESTION_REF
EFI_IFR_THIS
EFI_IFR_MATCH
EFI_IFR_SPAN
EFI_IFR_TOKEN
Etc.

Thanks for your feedback -
Bill
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to