From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web08.83844.1657026421161399152 for ; Tue, 05 Jul 2022 06:07:01 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=HzTWAE6g; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: bob.c.feng@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657026421; x=1688562421; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=RnqakpYjFgpva6yzImoIBAfT/guyAnTpBDOCHUAWlWc=; b=HzTWAE6gUYRHBN4407Wo3O1+QfN7GF1XERxyn1VkbTGZAmlHpDHOLsea 0qY6rxg3IoXfflva49S9qQRQMY7aDSco20RW9lsvd2V/mNqk+wauwV2Tp gMjvvGoe0h6KGNyGMtVC9JsNlo/KZGyBVg44RXStPKVoKjWIam3cT/Agj ut2V0rKMvDbe+M1R/Of1+pdWzp5UKmvYn7Lx4R2yK7XiCN4QJm9L84Hxf qeyYr+b6xC7RZc1zy1uEaSJMRvAyVraXG5zQF9u81ZF96uVFs506XjhfS IoJs/EW3rmA9Bse3r83vvz52ALjNx90Q5K9WAGPxGSre3qvt7sq5uPJBB A==; X-IronPort-AV: E=McAfee;i="6400,9594,10398"; a="263770447" X-IronPort-AV: E=Sophos;i="5.92,245,1650956400"; d="scan'208";a="263770447" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2022 06:07:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,245,1650956400"; d="scan'208";a="542948751" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga003.jf.intel.com with ESMTP; 05 Jul 2022 06:07:00 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 5 Jul 2022 06:07:00 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Tue, 5 Jul 2022 06:07:00 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Tue, 5 Jul 2022 06:06:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m6mXwUpHq6gX/qh5ZgNCdZ7bq+rGLoIJiGd9gW3m+pRnUNoIytaR3Im57HH86l1ufnUlSGckBR+fd/qmxWDN0FZUDPyhI4BCJqQYisdVkm69vcJWTrlosUf4uZeqYFW4AOyPAir3X2RnPmT+2LcaypptNIV4TW7EZG2As9oykMkuRDs2eORYPtu/tExVf/4fZnkQ8arBw1rzm0YJPkImIt9sZQjwt4SoNvkS4f2EQZwIOSh/tHsa8BkxIETjyyv03Jvbyn4cGKZiA1GR98DAd/DSMPBnP+8Ke+S0eIl1JY686YrEUSxLfcjePDGRxiCG82ljl0V8Kg5eAGkyHX3MTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ewJGisyC7oZx1BrVSvzEi6GsfdxLgG38fezsMHJuiH0=; b=Te9RNKN2QXvSEENIVDG2YFsSwroEXgLteKPw5D6zZAteFj9MczYtovc/Jo5bpQkr3AI82O0ALABKs2/NQCN6WDr0pVaqWDeF/psyn5XlX+B5q5ZqrY9fBgff08CLRA/kVnDjeUdUHIziwKreYcn5THidDzd2czvx1kDLD+MTIblBwj9Nu+3OuLjO54yxy7i3g6AlQ0Pchd9ifmbieOl4ORqKR49tymOAml9cgH2ynHg00JtP4AG3W2DwVho3YTyCwPxiL0IMrUC9U9bA34UfRf/UkKnztkDjKKXVCYxyAHem4UokQ+s6DUp+TfDRhL0K7KfkTkoNwPQbhJgbn2Xzgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH7PR11MB5863.namprd11.prod.outlook.com (2603:10b6:510:135::11) by DM6PR11MB4218.namprd11.prod.outlook.com (2603:10b6:5:201::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.17; Tue, 5 Jul 2022 13:06:12 +0000 Received: from PH7PR11MB5863.namprd11.prod.outlook.com ([fe80::943:4b5a:b96b:30f8]) by PH7PR11MB5863.namprd11.prod.outlook.com ([fe80::943:4b5a:b96b:30f8%5]) with mapi id 15.20.5395.020; Tue, 5 Jul 2022 13:06:12 +0000 From: "Bob Feng" To: "Lin, Jason1" , "devel@edk2.groups.io" CC: "Gao, Liming" , "Chen, Christine" , "Oram, Isaac W" , "Chaganty, Rangasai V" , "Chiang, Dakota" Subject: Re: [PATCH v3 1/3] [edk2-platforms] Silicon/Intel/FitGen: Support multiple Startup ACM Type 2 entries in FitGen tool Thread-Topic: [PATCH v3 1/3] [edk2-platforms] Silicon/Intel/FitGen: Support multiple Startup ACM Type 2 entries in FitGen tool Thread-Index: AQHYjVy0S3yrN3C/XUyVBsdSgFChw61vxRQg Date: Tue, 5 Jul 2022 13:06:11 +0000 Message-ID: References: <20220701151005.189-1-jason1.lin@intel.com> In-Reply-To: <20220701151005.189-1-jason1.lin@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 31f9ffb0-3427-4f8c-ada6-08da5e872297 x-ms-traffictypediagnostic: DM6PR11MB4218:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xDvVU4QF2XrmaWtnOcUrHhvWxPKnIlx4apznNYpNB3FagW/kWLzuSv0cRDfpOaQXfJNxUnhTlKX4EmfTTYnTuVvQBlT+gV3XWQwZyRKH2izRB8ppExKil4X9bvbjKjgw/2fH7TJrbfgAr4FVzbtvrnRtdW/Ez6b8d51F4/TE0djEjx/V9b9xv8kWeE3jj3McbTy/ArlFDg3bbDqVrbSbix7ifpT9rls8KB87ag6nZSWqrNPBrQRu8bpT1z2Uh0BEXU1jFuarVmU5Pf9jLh1p+ZDaUUPhRQ0jfm86BInl45O3wqHZk74H1oSMdEAYXCgbKUr6UY3pXKlX1VjJYfPXVq1YTYwqwJMwxkaHBT5WQdRiF54OlIwrm4QM0kRWDvnNCt96DCHBth42O5v9Cj1FIEj7Cp2dAoy4rRCvpY2Y07WFQ3UEzHZ8tzRlYOkOn272OhOSfhryx9hhmwr+BicNfY1aI5pvqQUFONhgTga8nGd5GwbZZ0+bWzLUt0zCLccHN7JujAqyHbIFXXCq3t2AgeOw3FZ/Ov+lQ+heVELBW3oGeCvkN86gPxkryUAd0hOlt0yCE9mx52RDrg0Zd4sNbkfphIa4Zm/i6/ldRYgBwvHUu9AJa4Onn8WyQvZ6xisosMPEf1qwca7SXetJ8A4rmny/IHpuDL+UTSSDhHjF5Tm0R6dLGzqVvCYO36hCMK65CUL226j6slZVkA9BSmny/LOiN6pzgwY+g+GmAe9fzL21kNpXxhWX+Jp/3UPpE9BHPg4TgTDJesC/QuZsuCtT9VH8FWEEw03vjPII8CH0840sqExGB63CDQHwf9q8Zx8xC/1bKAznd3EQxP9fzEwA5sK/mvnZqIThFZjoq4urNno= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR11MB5863.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(396003)(136003)(39860400002)(346002)(366004)(376002)(9686003)(55016003)(316002)(110136005)(966005)(26005)(38070700005)(8936002)(52536014)(53546011)(5660300002)(86362001)(41300700001)(122000001)(478600001)(54906003)(8676002)(83380400001)(2906002)(66946007)(64756008)(76116006)(186003)(82960400001)(7696005)(38100700002)(107886003)(66556008)(66476007)(33656002)(4326008)(66446008)(6506007)(71200400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?t/kp19aN65JlNCGiHVY9IgcnMWpfaRhRR4l7LxjWu+Ky4evcuVV3f1XCyg47?= =?us-ascii?Q?UjWCHaHFWK4kA0ZWJGgLtQ9H4yhBxW2uQEv1QeaIX11dXNM7jAleLKD0rfus?= =?us-ascii?Q?c01mN0IoYdM2y7IDZtAPuQTb/Oj94KG86LzwJ6Vcz3V7pydCU27olL/tSo5Q?= =?us-ascii?Q?H7jvg8Fh2A2e+hSovGAZKIOYZJfWS65PCJR9ux1x2IwK4j3AV3CxzOd1VVP3?= =?us-ascii?Q?q49c4lp7ryMFs541Fm5QTEjab1/nmd9awTtZf2lrSwQ9q4lOsLJxbFbxIiwf?= =?us-ascii?Q?YLcARV9+HKwnykUkXWH5eY528k+TJCowgXXr24WUby/tQBNyWPV//tFkqstU?= =?us-ascii?Q?3mWQFeWI0tdNuxu4Lfdfmc74218QbO6u48VtyZiHSvHAOtLiq48Jet49XTl3?= =?us-ascii?Q?mkpws/zFnW+vfZllKsXhvOpzqhLTJecsJk5oWPeDBqxVwjMObMj5fcmn0juY?= =?us-ascii?Q?/70/ZvW02b96zDYrAj8LFqXMHfJomD/3CtAeGUxcY+ITybWz9vijmCFhsNGZ?= =?us-ascii?Q?eqs6FTle8jynNreQppR7IyBm2eNQ9z8xsNsGODVPBIxD7tC5XHxEWcX2Lju/?= =?us-ascii?Q?9qIqI3jbJGuVwNuY1+g9ee6u6NugWh9jslHfgHNlHroe76m5RZmaIk14OuWm?= =?us-ascii?Q?RXrbwjSgyXtu+3EzEkCdJTItb9+74ydZ4HanasZZBQehRDYfRa53vLPSwMgC?= =?us-ascii?Q?zoUj7DXWc2a/IuXqxv+PN0sI6Yi/EOiguObaFUEEpEWw7Jteer1pQPHuWEqq?= =?us-ascii?Q?n/9FqSJaRCXoRRu+atNw0OFYZxlmDZq55NV2pVeuj4Qu2zczr/cb6/4uPK03?= =?us-ascii?Q?TGBCtYwSpIz4CqN6kySNb4sXmmMWDRa+0GLQYe7o6jd22hOddHb5m7M6dC3U?= =?us-ascii?Q?hkBhUxTIDkGWZLjBYfEjNapzrSLex2M4lvS+1DYuE/YYQg7KBTlZPVhDC0X7?= =?us-ascii?Q?Ydp1C1xVEWS+FEhOzcIaCB9eYLmAnKC+gO2Gx4GMO8ZE7Z64v/VPIUC/b54h?= =?us-ascii?Q?rt2lnuTOfRVvK9BqOtAK1jF6q84ZJIl8ykiwIloHU692XeNfwOFCFLk17aW5?= =?us-ascii?Q?ZbqhxrHg7cmFYuhZJirMVX/cDUltqhFE9occi9B4vKq3PL5DRw2VLaLzrsI6?= =?us-ascii?Q?Oy5n2VRWas2Au8+8GbikYIFbXgQHLJ+2QePo0YanmM4pZhPQzTDCMKaaVNGM?= =?us-ascii?Q?pRRKJ4iy+w0va9IpAW0ZFRCqkyl4AlN8W+Kt2rVwXuyqHb4quE5qpYYjCoVN?= =?us-ascii?Q?F4XrFUxe46lqDK75vNsqmBjTB8RMoKq/L3BAG6wKQWkheA/7xbWcd0dQEGeN?= =?us-ascii?Q?Qs8xvP/4GBNJTnrPo3Be16iFnjNaRW7yfop15fkquUk/nsRjAPYGqYeciwhb?= =?us-ascii?Q?enRskx38+fQ3dzeGyWuuN67sk7FpRxFEsfhQYSA3hiQo2TRt9mBcwENAo9gZ?= =?us-ascii?Q?uM2CFtyniVql4h3LnMAKIDJQEurS0Lg/eapPImN2UTxclAc6aDSJeejT3q3R?= =?us-ascii?Q?mrX1/p9DWfmvPhiN8QhMy7e1ASi1F42u0FU9Hpozrcz+L9gIPnCOYbGn1Ez6?= =?us-ascii?Q?06x0fb3XDAf2Ro9cEf/O0i4QVJ0h32oocKTRbCPt?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB5863.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31f9ffb0-3427-4f8c-ada6-08da5e872297 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2022 13:06:11.9996 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: aixPsPwE0Hs+rqW6VXwIqQlzSv8YVQoBcR1rTwOLhJlmq6YyNuiOWMMxZZcLW0X9iV1mNgIS4gxHzEPXl/4UAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4218 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This patch series was pushed. Thanks, Bob -----Original Message----- From: Lin, Jason1 =20 Sent: Friday, July 1, 2022 11:10 PM To: devel@edk2.groups.io Cc: Lin, Jason1 ; Feng, Bob C ;= Gao, Liming ; Chen, Christine ; Oram, Isaac W ; Chaganty, Rangasai V ; Chiang, Dakota Subject: [PATCH v3 1/3] [edk2-platforms] Silicon/Intel/FitGen: Support mult= iple Startup ACM Type 2 entries in FitGen tool From: Jason1 Lin REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3958 Within current FitGen tool there had limitation only allow one S-ACM to gen= erate the Type 2 entry. This code change is used to support multiple type 2 entries up to 0x20. Signed-off-by: Jason1 Lin Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Cc: Isaac W Oram Cc: Rangasai V Chaganty Cc: Dakota Chiang --- Silicon/Intel/Tools/FitGen/FitGen.c | 89 +++++++++++--------- Silicon/Int= el/Tools/FitGen/FitGen.h | 4 +- 2 files changed, 50 insertions(+), 43 deletions(-) diff --git a/Silicon/Intel/Tools/FitGen/FitGen.c b/Silicon/Intel/Tools/FitG= en/FitGen.c index 4de72ea422..eac8fa8715 100644 --- a/Silicon/Intel/Tools/FitGen/FitGen.c +++ b/Silicon/Intel/Tools/FitGen/FitGen.c @@ -2,7 +2,7 @@ This utility is part of build process for IA32/X64 FD. It generates FIT ta= ble. -Copyright (c) 2010-2021, Intel Corporation. All rights reserved.
+= Copyright (c) 2010-2022, Intel Corporation. All rights reserved.
SPDX-L= icense-Identifier: BSD-2-Clause-Patent **/@@ -204,6 +204,7 @@ typedef stru= ct { #define MAX_BIOS_MODULE_ENTRY 0x20 #define MAX_MICROCODE_ENTRY 0x20+#= define MAX_STARTUP_ACM_ENTRY 0x20 #define MAX_OPTIONAL_ENTRY 0x20 #def= ine MAX_PORT_ENTRY 0x20 @@ -255,11 +256,12 @@ typedef struct { UINT32 FitEntryNumber; UINT32 = BiosModuleNumber; UINT32 MicrocodeNumber;+ UINT32 = StartupAcmNumber; UINT32 OptionalMo= duleNumber; UINT32 PortModuleNumber; UINT32 = GlobalVersion; UINT32 FitHeaderVersion;-= FIT_TABLE_CONTEXT_ENTRY StartupAcm;+ FIT_TABLE_CONTEXT_ENTRY Start= upAcm[MAX_STARTUP_ACM_ENTRY]; UINT32 StartupAcmVersio= n; FIT_TABLE_CONTEXT_ENTRY DiagnstAcm; UINT32 Di= agnstAcmVersion;@@ -1149,14 +1151,15 @@ Returns: Error (NULL, 0, 0, "-I Parameter incorrect, Header Type unsuppor= ted!", NULL); return 0; case FIT_TABLE_TYPE_STARTUP_ACM:-= if (gFitTableContext.StartupAcm.Type !=3D 0) {- Error = (NULL, 0, 0, "-I Parameter incorrect, Duplicated StartupAcm!", NULL);+ = if (gFitTableContext.StartupAcmNumber >=3D MAX_STARTUP_ACM_ENTRY) {+ = Error (NULL, 0, 0, "-I Parameter incorrect, too many StartupAcm!"= , NULL); return 0; }- gFitTableContext.Start= upAcm.Type =3D FIT_TABLE_TYPE_STARTUP_ACM;- gFitTableContext.St= artupAcm.Address =3D (UINT32)BiosInfoStruct[BiosInfoIndex].Address;- = gFitTableContext.StartupAcm.Size =3D (UINT32)BiosInfoStruct[BiosInfoI= ndex].Size;- gFitTableContext.StartupAcmVersion =3D BiosInfoStruc= t[BiosInfoIndex].Version;+ gFitTableContext.StartupAcm[gFitTableCo= ntext.StartupAcmNumber].Type =3D FIT_TABLE_TYPE_STARTUP_ACM;+ g= FitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Address =3D (= UINT32)BiosInfoStruct[BiosInfoIndex].Address;+ gFitTableContext.St= artupAcm[gFitTableContext.StartupAcmNumber].Size =3D (UINT32)BiosInfoStr= uct[BiosInfoIndex].Size;+ gFitTableContext.StartupAcm[gFitTableCon= text.StartupAcmNumber].Version =3D BiosInfoStruct[BiosInfoIndex].Version;+ = gFitTableContext.StartupAcmNumber ++; gFitTableContext.F= itEntryNumber ++; break; case FIT_TABLE_TYPE_DIAGNST_ACM:= @@ -1351,16 +1354,15 @@ Returns: // // 1. StartupAcm //- do {+ while (TRUE) { if ((Index + 1 >= =3D argc) || ((strcmp (argv[Index], "-S") !=3D 0) && (strc= mp (argv[Index], "-s") !=3D 0)) ) {- if (BiosInfoExist && (gFitTableCo= ntext.StartupAcm.Type =3D=3D FIT_TABLE_TYPE_STARTUP_ACM)) {- break;+= if (gFitTableContext.StartupAcmNumber =3D=3D 0) {+ printf ("-S= not found. WARNING!\n"); } // Error (NULL, 0, 0, "-S Parameter = incorrect, expect -S!", NULL); // return 0;- printf ("-S not foun= d. WARNING!\n"); break; } if (IsGuidData (argv[Index + 1], &G= uid)) {@@ -1381,14 +1383,13 @@ Returns: FileSize =3D xtoi (argv[Index + 2]); Index +=3D 3; }- i= f (gFitTableContext.StartupAcm.Type !=3D 0) {- Error (NULL, 0, 0, "-S = Parameter incorrect, Duplicated StartupAcm!", NULL);+ if (gFitTableConte= xt.StartupAcmNumber >=3D MAX_STARTUP_ACM_ENTRY) {+ Error (NULL, 0, 0, = "-S Parameter incorrect, too many StartupAcm!", NULL); return 0; = }- gFitTableContext.StartupAcm.Type =3D FIT_TABLE_TYPE_STARTUP_ACM;- = gFitTableContext.StartupAcm.Address =3D (UINT32) (UINTN) FileBuffer;- gF= itTableContext.StartupAcm.Size =3D FileSize;- gFitTableContext.FitEntryN= umber ++;+ gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber= ].Type =3D FIT_TABLE_TYPE_STARTUP_ACM;+ gFitTableContext.StartupAcm[gFit= TableContext.StartupAcmNumber].Address =3D (UINT32) (UINTN) FileBuffer;+ = gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Size =3D Fi= leSize; // // 1.1 StartupAcm version@@ -1407,7 +1408,10 @@ Returns= : gFitTableContext.StartupAcmVersion =3D xtoi (argv[Index + 1]); = Index +=3D 2; }- } while (FALSE);++ gFitTableContext.StartupAcmNum= ber ++;+ gFitTableContext.FitEntryNumber ++;+ } // // 1.5. Diagnos= ticsAcm@@ -1890,7 +1894,9 @@ Returns: // // Final: Check StartupAcm in BiosModule. //- CheckOverlap (gFit= TableContext.StartupAcm.Address, gFitTableContext.StartupAcm.Size);+ for (= Index =3D 0; Index < (INTN)gFitTableContext.StartupAcmNumber; Index++) {+ = CheckOverlap (gFitTableContext.StartupAcm[Index].Address, gFitTableContex= t.StartupAcm[Index].Size);+ } FitEntryNumber =3D gFitTableContext.FitEnt= ryNumber; for (Index =3D 0; Index < (INTN)gFitTableContext.OptionalModule= Number; Index++) { if ((gFitTableContext.OptionalModule[Index].Type =3D= =3D FIT_TABLE_TYPE_BIOS_POLICY) ||@@ -2178,8 +2184,8 @@ Returns: } printf ("Total FIT Entry number: 0x%x\n", gFitTableContext.FitEntryN= umber); printf ("FitHeader version: 0x%04x\n", gFitTableContext.FitHeader= Version);- if (gFitTableContext.StartupAcm.Address !=3D 0) {- printf ("= StartupAcm - (0x%08x, 0x%08x, 0x%04x)\n", gFitTableContext.StartupAcm.Addre= ss, gFitTableContext.StartupAcm.Size, gFitTableContext.StartupAcmVersion);+= for (Index =3D 0; Index < gFitTableContext.StartupAcmNumber; Index++) {+ = printf ("StartupAcm[%d] - (0x%08x, 0x%08x, 0x%04x)\n", Index, gFitTableC= ontext.StartupAcm[Index].Address, gFitTableContext.StartupAcm[Index].Size, = gFitTableContext.StartupAcmVersion); } if (gFitTableContext.DiagnstAcm.= Address !=3D 0) { printf ("DiagnosticAcm - (0x%08x, 0x%08x, 0x%04x)\n",= gFitTableContext.DiagnstAcm.Address, gFitTableContext.DiagnstAcm.Size, gFi= tTableContext.DiagnstAcmVersion);@@ -2809,8 +2815,8 @@ Returns: // // 4. StartupAcm //- if (gFitTableContext.StartupAcm.Address != =3D 0) {- FitEntry[FitIndex].Address =3D gFitTableContext.St= artupAcm.Address;+ for (Index =3D 0; Index < gFitTableContext.StartupAcmNu= mber; Index++) {+ FitEntry[FitIndex].Address =3D gFitTableCo= ntext.StartupAcm[Index].Address; *(UINT32 *)&FitEntry[FitIndex].Size[0]= =3D 0; //gFitTableContext.StartupAcm.Size / 16; FitEntry[FitIndex].Ver= sion =3D (UINT16)gFitTableContext.StartupAcmVersion; FitEnt= ry[FitIndex].Type =3D FIT_TABLE_TYPE_STARTUP_ACM;@@ -3110,7 = +3116,7 @@ GetFitEntryInfo ( Routine Description: - Fill the FIT table information to Fvrecovery+ Ge= t the FIT table information from Fvrecovery Arguments: @@ -3164,8 +3170,8 = @@ Returns: gFitTableContext.MicrocodeNumber ++; break; case FIT_TABLE= _TYPE_STARTUP_ACM:- gFitTableContext.StartupAcm.Address =3D (UINT32)Fi= tEntry[FitIndex].Address;- gFitTableContext.StartupAcmVersion =3D Fit= Entry[FitIndex].Version;+ gFitTableContext.StartupAcm[gFitTableContext= .StartupAcmNumber].Address =3D (UINT32)FitEntry[FitIndex].Address;+ gF= itTableContext.StartupAcmVersion =3D Fi= tEntry[FitIndex].Version; break; case FIT_TABLE_TYPE_BIOS_MODULE:= gFitTableContext.BiosModule[gFitTableContext.BiosModuleNumber].Addre= ss =3D (UINT32)FitEntry[FitIndex].Address;@@ -3232,6 +3238,7 @@ Returns: UINT32 FdFileSize; UINT8 *= AcmBuffer;+ INTN Index; UINT32 = FixedFitLocation; FileBufferRaw =3D NULL;@@ -3323,22 +3330,23 @@ Retu= rns: // // Get ACM buffer //- if (gFitTableContext.StartupAcm.Ad= dress !=3D 0) {- AcmBuffer =3D FLASH_TO_MEMORY(gFitTableContext.Startu= pAcm.Address, FdFileBuffer, FdFileSize);- if ((AcmBuffer < FdFileBuffe= r) || (AcmBuffer + gFitTableContext.StartupAcm.Size > FdFileBuffer + FdFile= Size)) {- printf ("ACM out of range - can not validate it\n");- = AcmBuffer =3D NULL;- }+ for (Index =3D 0; Index < (INTN)gFitTabl= eContext.StartupAcmNumber; Index ++) {+ if (gFitTableContext.StartupAc= m[Index].Address !=3D 0) {+ AcmBuffer =3D FLASH_TO_MEMORY(gFitTableC= ontext.StartupAcm[Index].Address, FdFileBuffer, FdFileSize);+ if ((A= cmBuffer < FdFileBuffer) || (AcmBuffer + gFitTableContext.StartupAcm[Index]= .Size > FdFileBuffer + FdFileSize)) {+ printf ("ACM out of range -= can not validate it\n");+ AcmBuffer =3D NULL;+ } - if= (AcmBuffer !=3D NULL) {- if (CheckAcm ((ACM_FORMAT *)AcmBuffer, gFi= tTableContext.StartupAcm.Size)) {- DumpAcm ((ACM_FORMAT *)AcmBuffe= r);- } else {- Status =3D STATUS_ERROR;- goto exit= Func;+ if (AcmBuffer !=3D NULL) {+ if (CheckAcm ((ACM_FORMA= T *)AcmBuffer, gFitTableContext.StartupAcm[Index].Size)) {+ Dump= Acm ((ACM_FORMAT *)AcmBuffer);+ } else {+ Status =3D ST= ATUS_ERROR;+ goto exitFunc;+ } } }- }= //@@ -3576,4 +3584,3 @@ Returns: return u; }-diff --git a/Silicon/Intel/Tools/FitGen/FitGen.h b/Silicon/= Intel/Tools/FitGen/FitGen.h index 5add6a8870..b7de0a6b2d 100644 --- a/Silicon/Intel/Tools/FitGen/FitGen.h +++ b/Silicon/Intel/Tools/FitGen/FitGen.h @@ -1,7 +1,7 @@ /**@file Definitions for the FitGen utility. -Copyright (c) 2010-2020, Int= el Corporation. All rights reserved.
+Copyright (c) 2010-2022, Intel Cor= poration. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Pa= tent **/@@ -31,7 +31,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // Utility version information // #define UTILITY_MAJOR_VERSION 0-#define = UTILITY_MINOR_VERSION 64+#define UTILITY_MINOR_VERSION 65 #define UTILITY_D= ATE __DATE__ //--=20 2.37.0.windows.1