From nobody Sat Apr 20 07:16:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+91907+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+91907+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1658964477; cv=none; d=zohomail.com; s=zohoarc; b=TEq2zjvbYLbyB+9ivqBxee/WhXC+G7w2AcyJmu0JOW9GIfQisB88uqfwuOhKrevz+hMmmWKzCpAg2Y4bA07LbcDIHGXLlFShGlE0Y6IJhVvFJrnm91f4p1JbiLcYYPxoS5O/iL7qkJjXISDsq+yeDhsKgJrF75Uk6CL+QEWCIO8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658964477; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=/sG3S7LlPkzA7ChaLy/IejrFbI46BhIrEYtD7ILdXRY=; b=NcXTUiNUuNrlVHTuiHK05bT7mxHd31W8K3HIAfonVtLyB0uX+6lSyhSH3JZQmEx8SSI8uXrT8nCVD8aVcYkPdcvR/mdq8ZYWY8yJ/xNI8gjPO4kR5wrVC9dMbqweM5wOUTehcecB3kueo9WxsdF/ToUq9bpBqoOl7j9Il+ut6ec= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+91907+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1658964477359222.65956841334548; Wed, 27 Jul 2022 16:27:57 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 4lhHYY1788612x0C3bUNKKU5; Wed, 27 Jul 2022 16:27:57 -0700 X-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 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" X-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" X-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: [edk2-devel] [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> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,chasel.chiu@intel.com X-Gm-Message-State: msOZTcRDwpbpSzRMfqbOqZpox1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1658964477; bh=icB1O1oHCD21GeMCUQNT0xI7DcpCsDBnkdDPXQsG6to=; h=Cc:Date:From:Reply-To:Subject:To; b=BS01HgHPqpers11+SlyqF2RRU2m3CNyuNk9LpEISTT4CKCHrH/Ag8lBYd11hM6jDiuo bVUJUXP3WQsEMwCJGHawtzUDdz824EMDyEek/Z2oyEoEPr+w4XCp48es1R8Rj7LUuIbUu MSQSTeim1eIfygjP908x+zTbVUh9+R1QcqA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1658964478142100001 Content-Type: text/plain; charset="utf-8" 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; VOID *MemoryInitUpdPtr; VOID *SiliconInitUpdPtr; - VOID *SmmInitUpdPtr; /// - /// IA32: Offset 0x68; X64: Offset 0x98 + /// IA32: Offset 0x64; X64: Offset 0x90 /// To store function parameters pointer /// so it can be retrieved after stack switched. /// VOID *FunctionParameterPtr; FSP_INFO_HEADER *FspInfoHeader; VOID *UpdDataPtr; + VOID *SmmInitUpdPtr; UINTN Reserved5; /// /// End of UINTN and pointer section @@ -94,6 +94,7 @@ typedef struct { UINT16 PerfLen; UINT16 Reserved7; UINT32 PerfIdx; + UINT32 Reserved8; UINT64 PerfData[32]; } FSP_GLOBAL_DATA; =20 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 '' FvDir =3D self._FvDir if GuidList[Index] not in self._MacroDict: - self.Error =3D "%s definition is missing in DSC file" % (G= uidList[Index]) - return 1 + NoFSPI =3D False + if GuidList[Index] =3D=3D 'FSP_I_UPD_TOOL_GUID': + NoFSPI =3D True + continue + else: + self.Error =3D "%s definition is missing in DSC file" = % (GuidList[Index]) + return 1 =20 if UpdTxtFile =3D=3D '': UpdTxtFile =3D os.path.join(FvDir, self._MacroDict[GuidLis= t[Index]] + '.txt') @@ -1296,7 +1301,8 @@ EndList elif '_S' in SignatureStr[6:6+2]: TxtBody.append("#define FSPS_UPD_SIGNATURE = %s /* '%s' */\n\n" % (Item['value'], SignatureStr)) elif '_I' in SignatureStr[6:6+2]: - TxtBody.append("#define FSPI_UPD_SIGNATURE = %s /* '%s' */\n\n" % (Item['value'], SignatureStr)) + if NoFSPI =3D=3D True: + TxtBody.append("#define FSPI_UPD_SIGNATURE = %s /* '%s' */\n\n" % (Item['value'], SignatureStr)) TxtBody.append("\n") =20 for Region in ['UPD']: @@ -1702,7 +1708,7 @@ EndList =20 =20 def Usage(): - print ("GenCfgOpt Version 0.58") + print ("GenCfgOpt Version 0.59") print ("Usage:") print (" GenCfgOpt UPDTXT PlatformDscFile BuildFvDir = [-D Macros]") print (" GenCfgOpt HEADER PlatformDscFile BuildFvDir InputHFile = [-D Macros]") --=20 2.35.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#91907): https://edk2.groups.io/g/devel/message/91907 Mute This Topic: https://groups.io/mt/92660833/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-