summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrSyntax.g5
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileParser.py6
2 files changed, 8 insertions, 3 deletions
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index 942e0ed..0f17b9d 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -2,6 +2,7 @@
Vfr Syntax
Copyright (c) 2004 - 2025, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2025, Loongson Technology Corporation Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
--*/
@@ -1618,7 +1619,7 @@ vfrConstantValueField[UINT8 Type, EFI_IFR_TYPE_VALUE &Value, BOOLEAN &ListType]
$Value.b = _STOU8(N1->getText(), N1->getLine());
break;
case EFI_IFR_TYPE_STRING :
- $Value.string = _STOU16(N1->getText(), N1->getLine());
+ _PCATCH (VFR_RETURN_INVALID_PARAMETER, N1->getLine(), "string type can't be numeric constant.");
break;
case EFI_IFR_TYPE_TIME :
case EFI_IFR_TYPE_DATE :
@@ -3127,7 +3128,7 @@ vfrStatementString :
UINT8 StringMaxSize;
>>
L:String << SObj.SetLineNo(L->getLine()); gIsStringOp = TRUE;>>
- vfrQuestionHeader[SObj] ","
+ vfrQuestionHeader[SObj] "," << _GET_CURRQEST_VARTINFO().mVarType = EFI_IFR_TYPE_STRING;>>
{ F:FLAGS "=" vfrStringFlagsField[SObj, F->getLine()] "," }
{
Key "=" KN:Number "," << AssignQuestionKey (SObj, KN); >>
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index ed1ccb1..5d2a444 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -1407,7 +1407,11 @@ class DscParser(MetaFileParser):
if self._ContentIndex >= len(self._Content):
break
Record = self._Content[self._ContentIndex]
- if LineStart == Record[10] and LineEnd == Record[12]:
+ #
+ # Avoid merging includes with different owners to make sure an
+ # include is correctly processed per arch.
+ #
+ if Owner == Record[8] and LineStart == Record[10] and LineEnd == Record[12]:
if [Record[5], Record[6], Record[7]] not in self._Scope:
self._Scope.append([Record[5], Record[6], Record[7]])
self._ContentIndex += 1