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]
Sent: Monday, January 07, 2013 4:36 PM
To: 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 SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to