@@ -95,6 +95,17 @@ GRACEFULLY._
95
95
<HexDigit > ::= (a-fA-F0-9)
96
96
<HexPrefix > ::= {"0x"} {"0X"}
97
97
<GuidValue > ::= {<RformatGuid >} {<CformatGuid >}
98
+ <UINT8 > ::= <HexPrefix > (\x0 - \xFF)
99
+ <UINT16 > ::= <HexPrefix > (\x0 - \xFFFF)
100
+ <UINT32 > ::= <HexPrefix > (\x0 - \xFFFFFFFF)
101
+ <UINT64 > ::= <HexPrefix > (\x0 - \xFFFFFFFFFFFFFFFF)
102
+ <ShortNum > ::= (0-255)
103
+ <IntNum > ::= (0-65535)
104
+ <LongNum > ::= (0-4294967295)
105
+ <LongLongNum > ::= (0-18446744073709551615)
106
+ <GuidStr > ::= "GUID(" <GuidVal > ")"
107
+ <GuidVal > ::= {<DblQuote > <RformatGuid > <DblQuote >}
108
+ {<CformatGuid >} {<CName >}
98
109
Rhex2 ::= [ <HexDigit >] <HexDigit >
99
110
Rhex4 ::= [ <HexDigit >] [ <HexDigit >] Rhex2
100
111
Rhex8 ::= [ <HexDigit >] [ <HexDigit >] [ <HexDigit >] [ <HexDigit >] Rhex4
@@ -113,15 +124,38 @@ Rghex12 ::= <HexDigit> <HexDigit> <HexDigit> <HexDigit> Rghex8
113
124
<Part3 > ::= <Byte > <CSP > <Byte > <CSP > <Byte > <CSP > <Part4 >
114
125
<Part4 > ::= <Byte > <CSP > <Byte > <CSP > <Byte > <CSP > <Part5 >
115
126
<Part5 > ::= <Byte > [ <TSP >] * "}" [ <TSP >] * "}"
116
- <Array > ::= {<EmptyArray >} {<Array >}
127
+ <Array > ::= {<EmptyArray >} {<NonEmptyArray >}
117
128
<EmptyArray > ::= "{" <TSP >* "}"
118
- <ByteArray > ::= "{" <TSP >* <Byte > [ <CSP > <Byte >] * "}"
129
+ <NonEmptyArray > ::= "{" <TSP >* [ <Lable >] <ArrayVal >
130
+ [ <CSP > [ <Lable >] <ArrayVal >] * "}"
131
+ <ArrayVal > ::= {<Num8Array >} {<GuidStr >} {<DevicePath >}
132
+ <DevicePath > ::= "DEVICE_PATH(" <DevicePathStr > ")"
133
+ <DevicePathStr > ::= A double quoted string that follow the device path
134
+ as string format defined in UEFI Specification 2.6
135
+ Section 9.6
136
+ <Lable > ::= "LABEL(" <CName > ")"
137
+ <Offset > ::= "OFFSET_OF(" <CName > ")"
119
138
<StringLiteral > ::= {<QuotedString >} {"L" <QuotedString >}
139
+ {<SglQuotedString >} {"L" <SglQuotedString >}
120
140
<DblQuote > ::= 0x22
141
+ <SglQuote > ::= 0x27
121
142
<QuotedString > ::= <DblQuote > [ <CCHAR >] * <DblQuote >
143
+ <SglQuotedString > ::= <SglQuote > [ <CCHAR >] * <SglQuote >
122
144
<CCHAR > ::= {<SingleChars >} {<EscapeCharSeq >}
123
- <SingleChars > ::= {0x20} {0x21} {(0x23 - 0x5B)} {(0x5D - 0x7E)}
124
- <EscapeCharSeq > ::= "\" {"n"} {"r"} {"t"} {"f"} {"b"} {"0"} {"\" } {<DblQuote >}
145
+ <SingleChars > ::= {0x21} {(0x23 - 0x26)} {(0x28 - 0x5B)}
146
+ {(0x5D - 0x7E)} {<EscapeSequence >}
147
+ <EscapeCharSeq > ::= "\" {"n"} {"r"} {"t"} {"f"} {"b"} {"0"} {"\" }
148
+ {<DblQuote >} {<SglQuote >}
149
+ <NonNumType > ::= {<TrueFalse >} {<StringLiteral >} {<Offset >} {<UintMac >}
150
+ <Num8Array > ::= {<NonNumType >} {<ShortNum >} {<UINT8 >}
151
+ <Num16Array > ::= {<NonNumType >} {<IntNum >} {<UINT16 >}
152
+ <Num32Array > ::= {<NonNumType >} {<LongNum >} {<UINT32 >}
153
+ <Num64Array > ::= {<NonNumType >} {<LongLongNum >} {<UINT64 >}
154
+ <UintMac > ::= {<Uint8Mac >} {<Uint16Mac >} {<Uint32Mac >} {<Uint64Mac >}
155
+ <Uint8Mac > ::= "UINT8(" <Num8Array > ")"
156
+ <Uint16Mac > ::= "UINT16(" <Num16Array > ")"
157
+ <Uint32Mac > ::= "UINT32(" <Num32Array > ")"
158
+ <Uint64Mac > ::= "UINT64(" <Num64Array > ")"
125
159
<PostFixExpression > ::= {<PrimaryExpression >} {<PcdName >}
126
160
<PcdName > ::= <CName > "." <CName >
127
161
<UnaryExpression > ::= {<PostFixExpression >} {<UnaryOp > <UnaryExpression >}
@@ -189,9 +223,15 @@ This is the value of the MACRO assigned in a DEFINE statement.
189
223
190
224
** Expressions**
191
225
192
- If the "|" character is used in an expression, the expression must be
226
+ If the "|" or "||" character is used in an expression, the expression must be
193
227
encapsulated by parenthesis.
194
228
229
+ ** OFFSET_OF()**
230
+
231
+ LABEL () macro in byte arrays to tag the byte offset of a location in a byte
232
+ array. OFFSET_OF() macro in byte arrays that returns the byte offset of a
233
+ LABEL () declared in a byte array.
234
+
195
235
## 3.2 Conditional Directive Expressions
196
236
197
237
Conditional directive statements are defined in the EDK II Platform Description
0 commit comments