EFI IFR MID

From PhoenixWiki

Jump to: navigation, search

Extract a portion of a buffer or string.

Prototype

#define EFI_IFR_MID_OP 0x4b
typedef struct _EFI_IFR_MID {
  EFI_IFR_OP_HEADER Header;
} EFI_IFR_MID;

Members

Member Description
Header Standard opcode header, where OpCode is EFI_IFR_MID_OP.

Description

Pop three expressions from the expression stack. The first expression popped is the third expression and the second expression popped is the second expression and the last expression popped is the first expression.

If the first expression cannot be evaluated as a string or a buffer, push Undefined. If the second or third expression cannot be evaluated as unsigned integers, push Undefined.

If the first expression is a string, then the second expression is the 0-based index of the first character in the string to extract and the third expression is the length of the string to extract. If the third expression is zero or the second expression is greater than or equal the string’s length, then push an Empty string. Push the extracted string on the expression stack. If the third expression would cause extraction to extend beyond the end of the string, then only the characters up to and include the last character of the string are in the pushed result.

If the first expression is a buffer, then the second expression is the 0-based index of the first byte in the buffer to extract and the third expression is the length of the buffer to extract. If the third expression is zero or the second expression is greater than the buffer’s length, then push an empty buffer. Push the extracted buffer on the expression stack. If the third expression would cause extraction to extend beyond the end of the buffer, then only the bytes up to and include the last byte of the buffer are in the pushed result.


Copyright (C) 2008 Phoenix Technologies Ltd. All Rights Reserved. Portions copyright (C) 2008 UEFI Forum, Inc. Used with permission

Personal tools