Eric -

Please try the example. When I tried it, it cannot compile.

The EFI_IFR_CATENATE operator expects two strings expressions, right? How to 
specify two strings in an expression? As far as I can tell, STRING_TOKEN is not 
a valid expression term. Only stringref() is a valid expression term that 
returns a string. Is it your intention that STRING_TOKEN can generate a 
EFI_IFR_STRING_REF1 opcode?

Here is EFI_IFR_CATENATE (29.3.8.3.8)

typedef struct _EFI_IFR_CATENATE {
  EFI_IFR_OP_HEADER Header;
} EFI_IFR_CATENATE;

Here is EFI_IFR_STRING_REF1 (29.3.8.3.71):

typedef struct _EFI_IFR_STRING_REF1 {
  EFI_IFR_OP_HEADER Header;
  EFI_STRING_ID StringId;
} EFI_IFR_STRING_REF1;

So I would expect to see

0x4e 0x04 0xyy 0xyy 0x4e 0x04 0xzz 0xzz 0x5e 0x02

Where yyyy and zzzz are the string ids in question.

Am I missing something?

Thanks,

Tim


From: Dong, Eric [mailto:[email protected]]
Sent: Monday, September 01, 2014 6:07 PM
To: [email protected]
Subject: Re: [edk2] VFR Specification "catenate" example issue

Below is UEFI definition for EFI_IFR_TYPE_VALUE, for string type, it use 
EFI_STRING_ID to specify it, so for catenate, it uses STRING_TOKEN.
typedef union {
  UINT8           u8;
  UINT16          u16;
  UINT32          u32;
  UINT64          u64;
  BOOLEAN         b;
  EFI_HII_TIME    time;
  EFI_HII_DATE    date;
  EFI_STRING_ID   string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
  EFI_HII_REF     ref;    ///< EFI_IFR_TYPE_REF
  // UINT8 buffer[];      ///< EFI_IFR_TYPE_BUFFER
} EFI_IFR_TYPE_VALUE;

Thanks,
Eric
From: Tim Lewis [mailto:[email protected]]
Sent: Wednesday, August 27, 2014 8:57 AM
To: [email protected]<mailto:[email protected]>
Subject: [edk2] VFR Specification "catenate" example issue


The example for catenate (in 2.12.11.1) appears to be incorrect. I believe that 
the parameters for catenate should be stringref(STRING_TOKEN), not just 
STRING_TOKEN. Or at least the grammar doesn't seem to support a STRING_TOKEN in 
vfrExpressionConstant and the current VfrCompiler.exe complains.





string varid = MyData.String,

  prompt = STRING_TOKEN(STR_PROMPT),

  help = STRING_TOKEN(STR_HELP),

  minsize = 6,

  maxsize = 40,

  inconsistentif prompt = STRING_TOKEN(STR_CHECK),

    pushthis != catenate (STRING_TOKEN(STR_STRING_RIGHT),

                          STRING_TOKEN(STR_STRING_LEFT)),

  endif
endstring;
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to