Commit formats had issues so reverted 9 commits from IntelFsp2Pkg and IntelFsp2WrapperPkg. Will re-submit them with correct formats. Cc: Jiewen Yao <Jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -58,11 +58,17 @@
|
|||||||
FspSecPlatformLib
|
FspSecPlatformLib
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
|
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## UNDEFINED
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdGlobalDataPointerAddress ## CONSUMES
|
||||||
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase ## CONSUMES
|
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase ## CONSUMES
|
||||||
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamSize ## CONSUMES
|
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamSize ## CONSUMES
|
||||||
gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize ## CONSUMES
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize ## CONSUMES
|
||||||
gIntelFsp2PkgTokenSpaceGuid.PcdFspHeapSizePercentage ## CONSUMES
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspHeapSizePercentage ## CONSUMES
|
||||||
|
|
||||||
|
[FixedPcd]
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPatchEntry ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPerfEntry ## CONSUMES
|
||||||
|
|
||||||
[Ppis]
|
[Ppis]
|
||||||
gEfiTemporaryRamSupportPpiGuid ## PRODUCES
|
gEfiTemporaryRamSupportPpiGuid ## PRODUCES
|
||||||
|
|
||||||
|
@@ -52,6 +52,17 @@
|
|||||||
FspCommonLib
|
FspCommonLib
|
||||||
FspSecPlatformLib
|
FspSecPlatformLib
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## UNDEFINED
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdGlobalDataPointerAddress ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamSize ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize ## CONSUMES
|
||||||
|
|
||||||
|
[FixedPcd]
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPatchEntry ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPerfEntry ## CONSUMES
|
||||||
|
|
||||||
[Ppis]
|
[Ppis]
|
||||||
gEfiTemporaryRamSupportPpiGuid ## PRODUCES
|
gEfiTemporaryRamSupportPpiGuid ## PRODUCES
|
||||||
|
|
||||||
|
@@ -53,9 +53,14 @@
|
|||||||
FspSecPlatformLib
|
FspSecPlatformLib
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
|
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## UNDEFINED
|
||||||
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase ## CONSUMES
|
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase ## CONSUMES
|
||||||
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamSize ## CONSUMES
|
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamSize ## CONSUMES
|
||||||
gIntelFsp2PkgTokenSpaceGuid.PcdFspReservedBufferSize ## CONSUMES
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspReservedBufferSize ## CONSUMES
|
||||||
|
|
||||||
|
[FixedPcd]
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPatchEntry ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPerfEntry ## CONSUMES
|
||||||
|
|
||||||
[Ppis]
|
[Ppis]
|
||||||
gEfiTemporaryRamSupportPpiGuid ## PRODUCES
|
gEfiTemporaryRamSupportPpiGuid ## PRODUCES
|
||||||
|
@@ -33,3 +33,8 @@
|
|||||||
[Pcd]
|
[Pcd]
|
||||||
gIntelFsp2PkgTokenSpaceGuid.PcdGlobalDataPointerAddress ## CONSUMES
|
gIntelFsp2PkgTokenSpaceGuid.PcdGlobalDataPointerAddress ## CONSUMES
|
||||||
|
|
||||||
|
[FixedPcd]
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPatchEntry ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPerfEntry ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamSize ## CONSUMES
|
||||||
|
@@ -35,6 +35,12 @@
|
|||||||
PerformanceLib
|
PerformanceLib
|
||||||
ReportStatusCodeLib
|
ReportStatusCodeLib
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdGlobalDataPointerAddress ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamSize ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize ## CONSUMES
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gFspPerformanceDataGuid ## CONSUMES ## GUID
|
gFspPerformanceDataGuid ## CONSUMES ## GUID
|
||||||
gFspEventEndOfFirmwareGuid ## PRODUCES ## GUID
|
gFspEventEndOfFirmwareGuid ## PRODUCES ## GUID
|
||||||
@@ -43,3 +49,6 @@
|
|||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiPciEnumerationCompleteProtocolGuid ## CONSUMES
|
gEfiPciEnumerationCompleteProtocolGuid ## CONSUMES
|
||||||
|
|
||||||
|
[FixedPcd]
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPatchEntry ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPerfEntry ## CONSUMES
|
||||||
|
@@ -34,5 +34,9 @@
|
|||||||
BaseLib
|
BaseLib
|
||||||
IoLib
|
IoLib
|
||||||
|
|
||||||
|
[FixedPcd]
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPatchEntry ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPerfEntry ## CONSUMES
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
## @ GenCfgOpt.py
|
## @ GenCfgOpt.py
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials are licensed and made available under
|
# This program and the accompanying materials are licensed and made available under
|
||||||
# the terms and conditions of the BSD License that accompanies this distribution.
|
# the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
# The full text of the license may be found at
|
# The full text of the license may be found at
|
||||||
@@ -418,8 +418,6 @@ EndList
|
|||||||
return ""
|
return ""
|
||||||
|
|
||||||
def ParseDscFile (self, DscFile, FvDir):
|
def ParseDscFile (self, DscFile, FvDir):
|
||||||
Hardcode = False
|
|
||||||
AutoAlign = False
|
|
||||||
self._CfgItemList = []
|
self._CfgItemList = []
|
||||||
self._CfgPageDict = {}
|
self._CfgPageDict = {}
|
||||||
self._CfgBlkDict = {}
|
self._CfgBlkDict = {}
|
||||||
@@ -440,8 +438,6 @@ EndList
|
|||||||
DscLines = DscFd.readlines()
|
DscLines = DscFd.readlines()
|
||||||
DscFd.close()
|
DscFd.close()
|
||||||
|
|
||||||
MaxAlign = 32 #Default align to 32, but if there are 64 bit unit, align to 64
|
|
||||||
SizeAlign = 0 #record the struct max align
|
|
||||||
while len(DscLines):
|
while len(DscLines):
|
||||||
DscLine = DscLines.pop(0).strip()
|
DscLine = DscLines.pop(0).strip()
|
||||||
Handle = False
|
Handle = False
|
||||||
@@ -453,7 +449,7 @@ EndList
|
|||||||
IsUpdSect = False
|
IsUpdSect = False
|
||||||
if Match.group(1).lower() == "Defines".lower():
|
if Match.group(1).lower() == "Defines".lower():
|
||||||
IsDefSect = True
|
IsDefSect = True
|
||||||
if (Match.group(1).lower() == "PcdsFeatureFlag".lower() or Match.group(1).lower() == "PcdsFixedAtBuild".lower()):
|
if Match.group(1).lower() == "PcdsFeatureFlag".lower():
|
||||||
IsPcdSect = True
|
IsPcdSect = True
|
||||||
elif Match.group(1).lower() == "PcdsDynamicVpd.Upd".lower():
|
elif Match.group(1).lower() == "PcdsDynamicVpd.Upd".lower():
|
||||||
ConfigDict = {}
|
ConfigDict = {}
|
||||||
@@ -468,7 +464,6 @@ EndList
|
|||||||
ConfigDict['comment'] = ''
|
ConfigDict['comment'] = ''
|
||||||
ConfigDict['subreg'] = []
|
ConfigDict['subreg'] = []
|
||||||
IsUpdSect = True
|
IsUpdSect = True
|
||||||
Offset = 0
|
|
||||||
else:
|
else:
|
||||||
if IsDefSect or IsPcdSect or IsUpdSect or IsVpdSect:
|
if IsDefSect or IsPcdSect or IsUpdSect or IsVpdSect:
|
||||||
if re.match("^!else($|\s+#.+)", DscLine):
|
if re.match("^!else($|\s+#.+)", DscLine):
|
||||||
@@ -496,7 +491,7 @@ EndList
|
|||||||
IfStack.append(Result)
|
IfStack.append(Result)
|
||||||
ElifStack.append(0)
|
ElifStack.append(0)
|
||||||
else:
|
else:
|
||||||
Match = re.match("!(if|elseif)\s+(.+)", DscLine.split("#")[0])
|
Match = re.match("!(if|elseif)\s+(.+)", DscLine)
|
||||||
if Match:
|
if Match:
|
||||||
Result = self.EvaluateExpress(Match.group(2))
|
Result = self.EvaluateExpress(Match.group(2))
|
||||||
if Match.group(1) == "if":
|
if Match.group(1) == "if":
|
||||||
@@ -535,7 +530,6 @@ EndList
|
|||||||
NewDscLines = IncludeDsc.readlines()
|
NewDscLines = IncludeDsc.readlines()
|
||||||
IncludeDsc.close()
|
IncludeDsc.close()
|
||||||
DscLines = NewDscLines + DscLines
|
DscLines = NewDscLines + DscLines
|
||||||
Offset = 0
|
|
||||||
else:
|
else:
|
||||||
if DscLine.startswith('!'):
|
if DscLine.startswith('!'):
|
||||||
print("ERROR: Unrecoginized directive for line '%s'" % DscLine)
|
print("ERROR: Unrecoginized directive for line '%s'" % DscLine)
|
||||||
@@ -626,22 +620,13 @@ EndList
|
|||||||
|
|
||||||
# Check VPD/UPD
|
# Check VPD/UPD
|
||||||
if IsUpdSect:
|
if IsUpdSect:
|
||||||
Match = re.match("^([_a-zA-Z0-9]+).([_a-zA-Z0-9]+)\s*\|\s*(0x[0-9A-F]+|\*)\s*\|\s*(\d+|0x[0-9a-fA-F]+)\s*\|\s*(.+)",DscLine)
|
Match = re.match("^([_a-zA-Z0-9]+).([_a-zA-Z0-9]+)\s*\|\s*(0x[0-9A-F]+)\s*\|\s*(\d+|0x[0-9a-fA-F]+)\s*\|\s*(.+)",DscLine)
|
||||||
else:
|
else:
|
||||||
Match = re.match("^([_a-zA-Z0-9]+).([_a-zA-Z0-9]+)\s*\|\s*(0x[0-9A-F]+)(?:\s*\|\s*(.+))?", DscLine)
|
Match = re.match("^([_a-zA-Z0-9]+).([_a-zA-Z0-9]+)\s*\|\s*(0x[0-9A-F]+)(?:\s*\|\s*(.+))?", DscLine)
|
||||||
if Match:
|
if Match:
|
||||||
ConfigDict['space'] = Match.group(1)
|
ConfigDict['space'] = Match.group(1)
|
||||||
ConfigDict['cname'] = Match.group(2)
|
ConfigDict['cname'] = Match.group(2)
|
||||||
if Match.group(3) != '*':
|
ConfigDict['offset'] = int (Match.group(3), 16)
|
||||||
Hardcode = True
|
|
||||||
Offset = int (Match.group(3), 16)
|
|
||||||
else:
|
|
||||||
AutoAlign = True
|
|
||||||
|
|
||||||
if Hardcode and AutoAlign:
|
|
||||||
print("Hardcode and auto-align mixed mode is not supported by GenCfgOpt")
|
|
||||||
raise SystemExit
|
|
||||||
ConfigDict['offset'] = Offset
|
|
||||||
if ConfigDict['order'] == -1:
|
if ConfigDict['order'] == -1:
|
||||||
ConfigDict['order'] = ConfigDict['offset'] << 8
|
ConfigDict['order'] = ConfigDict['offset'] << 8
|
||||||
else:
|
else:
|
||||||
@@ -653,7 +638,6 @@ EndList
|
|||||||
Length = int (Match.group(4), 16)
|
Length = int (Match.group(4), 16)
|
||||||
else :
|
else :
|
||||||
Length = int (Match.group(4))
|
Length = int (Match.group(4))
|
||||||
Offset += Length
|
|
||||||
else:
|
else:
|
||||||
Value = Match.group(4)
|
Value = Match.group(4)
|
||||||
if Value is None:
|
if Value is None:
|
||||||
@@ -681,52 +665,6 @@ EndList
|
|||||||
ConfigDict['help'] = ''
|
ConfigDict['help'] = ''
|
||||||
ConfigDict['type'] = ''
|
ConfigDict['type'] = ''
|
||||||
ConfigDict['option'] = ''
|
ConfigDict['option'] = ''
|
||||||
if IsUpdSect and AutoAlign:
|
|
||||||
ItemLength = int(ConfigDict['length'])
|
|
||||||
ItemOffset = int(ConfigDict['offset'])
|
|
||||||
ItemStruct = ConfigDict['struct']
|
|
||||||
Unit = 1
|
|
||||||
if ItemLength in [1, 2, 4, 8] and not ConfigDict['value'].startswith('{'):
|
|
||||||
Unit = ItemLength
|
|
||||||
# If there are 64 bit unit, align to 64
|
|
||||||
if Unit == 8:
|
|
||||||
MaxAlign = 64
|
|
||||||
SizeAlign = 8
|
|
||||||
if ItemStruct != '':
|
|
||||||
UnitDict = {'UINT8':1, 'UINT16':2, 'UINT32':4, 'UINT64':8}
|
|
||||||
if ItemStruct in ['UINT8', 'UINT16', 'UINT32', 'UINT64']:
|
|
||||||
Unit = UnitDict[ItemStruct]
|
|
||||||
# If there are 64 bit unit, align to 64
|
|
||||||
if Unit == 8:
|
|
||||||
MaxAlign = 64
|
|
||||||
SizeAlign = max(SizeAlign, Unit)
|
|
||||||
if (ConfigDict['embed'].find(':START') != -1):
|
|
||||||
Base = ItemOffset
|
|
||||||
SubOffset = ItemOffset - Base
|
|
||||||
SubRemainder = SubOffset % Unit
|
|
||||||
if SubRemainder:
|
|
||||||
Diff = Unit - SubRemainder
|
|
||||||
Offset = Offset + Diff
|
|
||||||
ItemOffset = ItemOffset + Diff
|
|
||||||
|
|
||||||
if (ConfigDict['embed'].find(':END') != -1):
|
|
||||||
Remainder = Offset % (MaxAlign/8) # MaxAlign is either 32 or 64
|
|
||||||
if Remainder:
|
|
||||||
Diff = (MaxAlign/8) - Remainder
|
|
||||||
Offset = Offset + Diff
|
|
||||||
ItemOffset = ItemOffset + Diff
|
|
||||||
MaxAlign = 32 # Reset to default 32 align when struct end
|
|
||||||
if (ConfigDict['cname'] == 'UpdTerminator'):
|
|
||||||
# ItemLength is the size of UpdTerminator
|
|
||||||
# Itemlength might be 16, 32, or 64
|
|
||||||
# Struct align to 64 if UpdTerminator
|
|
||||||
# or struct size is 64 bit, else align to 32
|
|
||||||
Remainder = Offset % max(ItemLength/8, 4, SizeAlign)
|
|
||||||
Offset = Offset + ItemLength
|
|
||||||
if Remainder:
|
|
||||||
Diff = max(ItemLength/8, 4, SizeAlign) - Remainder
|
|
||||||
ItemOffset = ItemOffset + Diff
|
|
||||||
ConfigDict['offset'] = ItemOffset
|
|
||||||
|
|
||||||
self._CfgItemList.append(ConfigDict.copy())
|
self._CfgItemList.append(ConfigDict.copy())
|
||||||
ConfigDict['name'] = ''
|
ConfigDict['name'] = ''
|
||||||
@@ -1038,13 +976,6 @@ EndList
|
|||||||
NewTextBody.extend(OldTextBody)
|
NewTextBody.extend(OldTextBody)
|
||||||
return NewTextBody
|
return NewTextBody
|
||||||
|
|
||||||
def WriteLinesWithoutTailingSpace (self, HeaderFd, Line):
|
|
||||||
TxtBody2 = Line.splitlines(True)
|
|
||||||
for Line2 in TxtBody2:
|
|
||||||
Line2 = Line2.rstrip()
|
|
||||||
Line2 += '\n'
|
|
||||||
HeaderFd.write (Line2)
|
|
||||||
return 0
|
|
||||||
def CreateHeaderFile (self, InputHeaderFile):
|
def CreateHeaderFile (self, InputHeaderFile):
|
||||||
FvDir = self._FvDir
|
FvDir = self._FvDir
|
||||||
|
|
||||||
@@ -1244,7 +1175,7 @@ EndList
|
|||||||
Index += 1
|
Index += 1
|
||||||
for Item in range(len(StructStart)):
|
for Item in range(len(StructStart)):
|
||||||
if Index >= StructStartWithComment[Item] and Index <= StructEnd[Item]:
|
if Index >= StructStartWithComment[Item] and Index <= StructEnd[Item]:
|
||||||
self.WriteLinesWithoutTailingSpace(HeaderFd, Line)
|
HeaderFd.write (Line)
|
||||||
HeaderFd.write("#pragma pack()\n\n")
|
HeaderFd.write("#pragma pack()\n\n")
|
||||||
HeaderFd.write("#endif\n")
|
HeaderFd.write("#endif\n")
|
||||||
HeaderFd.close()
|
HeaderFd.close()
|
||||||
@@ -1289,7 +1220,7 @@ EndList
|
|||||||
Index += 1
|
Index += 1
|
||||||
for Item in range(len(StructStart)):
|
for Item in range(len(StructStart)):
|
||||||
if Index >= StructStartWithComment[Item] and Index <= StructEnd[Item]:
|
if Index >= StructStartWithComment[Item] and Index <= StructEnd[Item]:
|
||||||
self.WriteLinesWithoutTailingSpace(HeaderFd, Line)
|
HeaderFd.write (Line)
|
||||||
HeaderFd.write("#pragma pack()\n\n")
|
HeaderFd.write("#pragma pack()\n\n")
|
||||||
HeaderFd.write("#endif\n")
|
HeaderFd.write("#endif\n")
|
||||||
HeaderFd.close()
|
HeaderFd.close()
|
||||||
|
@@ -61,6 +61,7 @@
|
|||||||
gFspHobGuid ## CONSUMES ## HOB
|
gFspHobGuid ## CONSUMES ## HOB
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
|
gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress ## CONSUMES
|
||||||
gIntelFsp2WrapperTokenSpaceGuid.PcdSkipFspApi ## CONSUMES
|
gIntelFsp2WrapperTokenSpaceGuid.PcdSkipFspApi ## CONSUMES
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
|
@@ -55,3 +55,6 @@
|
|||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase ## CONSUMES
|
||||||
|
gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamSize ## CONSUMES
|
||||||
|
Reference in New Issue
Block a user