From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.153712.1672133031683839778 for ; Tue, 27 Dec 2022 01:23:52 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=WiwHY/6z; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: dakota.chiang@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672133031; x=1703669031; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=JLqSwYv/A4W+Mzgxplnrp5dJROiHNqmiKkaLDsZh1KI=; b=WiwHY/6zVLOcPJOUEl9IC7KrEF0h+RLyAIVG8LI9IW/d5misQlMvHmvm c2MBV5/xaEQnk+Gw+Yz/oljzTpGie1E1Sl9P5GrGvuyGyLSZH5hG2toMW 2zNpU7P/Xw+lMJKvYhAJjzp4exMZp/lADsdwJOtySpJpoi39ZaGJeetGY ktL30LYI6Ol98Xkg4qnV00HRwifWfmS0Y0BRuW3MrjXXPw5XUbAv/NDqA AoZ7ivhkl+fjijhLVW0/mBA6GOkIjb8Iev7sTWV5jc6BL65f9hBRGlqrT 2Aa/BjxUOqgpnig1HYG+tmeLDZBQpxHnayQPv4SQnfKqrLHq/n42Emxaf g==; X-IronPort-AV: E=McAfee;i="6500,9779,10572"; a="304175627" X-IronPort-AV: E=Sophos;i="5.96,278,1665471600"; d="scan'208";a="304175627" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 01:23:46 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10572"; a="827076875" X-IronPort-AV: E=Sophos;i="5.96,278,1665471600"; d="scan'208";a="827076875" Received: from dakotach-mobl1.gar.corp.intel.com ([10.225.40.118]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 01:23:44 -0800 From: dakota.chiang@intel.com To: devel@edk2.groups.io Cc: Dakota Chiang , Bob Feng , Liming Gao , Jason1 Lin , Rahul R Kumar Subject: [PATCH] S-ACM entry ver 0x200 does not contain requested FMS&mask Date: Tue, 27 Dec 2022 17:23:29 +0800 Message-Id: <6999c9cfb4e13e2883ec19e7671b171ad64abb6f.1672132941.git.dakota.chiang@intel.com> X-Mailer: git-send-email 2.38.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Dakota Chiang REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4198 After commit 1e1e35bb3b2fceea75ad97968da4b31f059dcb4c, FIT Type 2 ACM entry is not generated as expected with given -I arguments. FMS/FMS value is overridden by GetAcmFms(). This patch detects whether FMS/FMS Mask is already assigned with -I argument. If it's not zero, skip invoking GetAcmFms(). Signed-off-by: Dakota Chiang Cc: Bob Feng Cc: Liming Gao Cc: Jason1 Lin Cc: Rahul R Kumar --- Silicon/Intel/Tools/FitGen/FitGen.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Silicon/Intel/Tools/FitGen/FitGen.c b/Silicon/Intel/Tools/FitG= en/FitGen.c index 4ba07945a6..16c8b9b026 100644 --- a/Silicon/Intel/Tools/FitGen/FitGen.c +++ b/Silicon/Intel/Tools/FitGen/FitGen.c @@ -3745,9 +3745,14 @@ FitGen ( DumpAcm((ACM_FORMAT *)AcmBuffer);=0D =0D if (gFitTableContext.StartupAcm[Index].Version >=3D 0x200) {=0D - GetAcmFms((ACM_FORMAT *)AcmBuffer, &gFitTableContext.Startup= Acm[Index].FMS, &gFitTableContext.StartupAcm[Index].FMSMask);=0D - printf("ACM FMS:%08x\n", gFitTableContext.StartupAcm[Index].= FMS);=0D - printf("ACM FMS Mask:%08x\n", gFitTableContext.StartupAcm[In= dex].FMSMask);=0D + if ((gFitTableContext.StartupAcm[Index].FMS =3D=3D 0) && (gF= itTableContext.StartupAcm[Index].FMSMask =3D=3D 0)) {=0D + //=0D + // FMS and FMSMask is not assigned via -I argument. Get it= from ACM=0D + //=0D + GetAcmFms((ACM_FORMAT *)AcmBuffer, &gFitTableContext.Start= upAcm[Index].FMS, &gFitTableContext.StartupAcm[Index].FMSMask);=0D + printf("ACM FMS:%08x\n", gFitTableContext.StartupAcm[Index= ].FMS);=0D + printf("ACM FMS Mask:%08x\n", gFitTableContext.StartupAcm[= Index].FMSMask);=0D + }=0D }=0D }=0D else {=0D --=20 2.38.1.windows.1