From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.26570.1658964475554978410 for ; Wed, 27 Jul 2022 16:27:55 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ngx0KJnH; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: chasel.chiu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658964475; x=1690500475; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ptzGzmRmvSSd+hrjRk+TPe7kaBPI1xVuKDinUK1Utrc=; b=ngx0KJnHNiiuSsLVlb7gymw7Pvl/0Q4nzo/jTJL3Yzn12j3QM4kCG76x 0Q4Jza9eAr6yJFBI9Qvly9g9Q5Jq3q1HtdfFJ2/s1BVW9grrwz7g4RsnS /R4eQ5AHrxV3q79PxIjUl1/fJs+4AekAM6pXxXYKvayB9rKzW9EPrqt4Z kAin0wZivtg7ySxKSdQ/xe3Jwuql2k9x8+ySDAyVhmPh1xhSEBd98lLBZ pPrGvK++Vt+lca528DuXqiFGnWZ/s8HxTVBxBY2CJ8pTvZgZUbJQ8qtar pyAslmAblwZO6CXFw9yd4HHetQTd5olYKrb1+eWj6oDNJzBhSuPmd8LNS w==; X-IronPort-AV: E=McAfee;i="6400,9594,10421"; a="288385030" X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="288385030" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 16:27:54 -0700 X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="628582463" Received: from cchiu4-mobl.gar.corp.intel.com ([10.209.89.36]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 16:27:53 -0700 From: "Chiu, Chasel" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Star Zeng Subject: [PATCH] IntelFsp2Pkg: FSPI_UPD is not mandatory. Date: Wed, 27 Jul 2022 16:27:41 -0700 Message-Id: <20220727232741.509-1-chasel.chiu@intel.com> X-Mailer: git-send-email 2.35.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3993 FSPI_UPD is required only When platforms implemented FSP_I component. Updated the scripts to allow FSPI_UPD not present scenario. Also fixed FSP_GLOBAL_DATA structure alignment issue and unnecessary non-backward compatibility change in previous FSP_I patch. Cc: Nate DeSimone Cc: Star Zeng Signed-off-by: Chasel Chiu --- IntelFsp2Pkg/Include/FspGlobalData.h | 5 +++-- IntelFsp2Pkg/Tools/GenCfgOpt.py | 14 ++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/IntelFsp2Pkg/Include/FspGlobalData.h b/IntelFsp2Pkg/Include/Fs= pGlobalData.h index cf94f7b6a5..d1b3dfbfc4 100644 --- a/IntelFsp2Pkg/Include/FspGlobalData.h +++ b/IntelFsp2Pkg/Include/FspGlobalData.h @@ -76,15 +76,15 @@ typedef struct { VOID *TempRamInitUpdPtr;=0D VOID *MemoryInitUpdPtr;=0D VOID *SiliconInitUpdPtr;=0D - VOID *SmmInitUpdPtr;=0D ///=0D - /// IA32: Offset 0x68; X64: Offset 0x98=0D + /// IA32: Offset 0x64; X64: Offset 0x90=0D /// To store function parameters pointer=0D /// so it can be retrieved after stack switched.=0D ///=0D VOID *FunctionParameterPtr;=0D FSP_INFO_HEADER *FspInfoHeader;=0D VOID *UpdDataPtr;=0D + VOID *SmmInitUpdPtr;=0D UINTN Reserved5;=0D ///=0D /// End of UINTN and pointer section=0D @@ -94,6 +94,7 @@ typedef struct { UINT16 PerfLen;=0D UINT16 Reserved7;=0D UINT32 PerfIdx;=0D + UINT32 Reserved8;=0D UINT64 PerfData[32];=0D } FSP_GLOBAL_DATA;=0D =0D diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt= .py index 128b896592..71c48f10e0 100644 --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py @@ -959,8 +959,13 @@ EndList UpdTxtFile =3D ''=0D FvDir =3D self._FvDir=0D if GuidList[Index] not in self._MacroDict:=0D - self.Error =3D "%s definition is missing in DSC file" % (G= uidList[Index])=0D - return 1=0D + NoFSPI =3D False=0D + if GuidList[Index] =3D=3D 'FSP_I_UPD_TOOL_GUID':=0D + NoFSPI =3D True=0D + continue=0D + else:=0D + self.Error =3D "%s definition is missing in DSC file" = % (GuidList[Index])=0D + return 1=0D =0D if UpdTxtFile =3D=3D '':=0D UpdTxtFile =3D os.path.join(FvDir, self._MacroDict[GuidLis= t[Index]] + '.txt')=0D @@ -1296,7 +1301,8 @@ EndList elif '_S' in SignatureStr[6:6+2]:=0D TxtBody.append("#define FSPS_UPD_SIGNATURE = %s /* '%s' */\n\n" % (Item['value'], SignatureStr))=0D elif '_I' in SignatureStr[6:6+2]:=0D - TxtBody.append("#define FSPI_UPD_SIGNATURE = %s /* '%s' */\n\n" % (Item['value'], SignatureStr))=0D + if NoFSPI =3D=3D True:=0D + TxtBody.append("#define FSPI_UPD_SIGNATURE = %s /* '%s' */\n\n" % (Item['value'], SignatureStr))=0D TxtBody.append("\n")=0D =0D for Region in ['UPD']:=0D @@ -1702,7 +1708,7 @@ EndList =0D =0D def Usage():=0D - print ("GenCfgOpt Version 0.58")=0D + print ("GenCfgOpt Version 0.59")=0D print ("Usage:")=0D print (" GenCfgOpt UPDTXT PlatformDscFile BuildFvDir = [-D Macros]")=0D print (" GenCfgOpt HEADER PlatformDscFile BuildFvDir InputHFile = [-D Macros]")=0D --=20 2.35.0.windows.1