From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web09.67702.1656898566628748500 for ; Sun, 03 Jul 2022 18:36:06 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ROuaFIcr; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: yuwei.chen@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656898566; x=1688434566; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=0rRWUEIlH+pZQMZB1GnhkbdfhMiO4ssuovbKiBdMeLk=; b=ROuaFIcr9nLgUZD1Kmp+tNMFwSYUTIoa5A1zpfSo6AJQHZsLI5N1u9eo jBr/53w/8uSYQpfKmpAJrVx0erTPsXGI3rBAOEo3E79gK6ClgV+d2m5TP HRdrFTWgFqCtYYh6qiv8MvXsDCgWFbPse1CFpX0Gm5DX2YvCqSOLlhk4u W4Q00owgtpj1K7PvlNOPkEdd7x5hgJrLm1wNkRvRk38MUwlLuhmreEDwt crVo6oltXyOfhigUNBjQbVea1QUsr1sAUTJDsnh88s7slBH6uvXZO9qup Pln9tLyMxQvDQnTV7EOIe+f3DQ1hdqiPyEybJ3yjRKWgqM2rrH8ikgUjB w==; X-IronPort-AV: E=McAfee;i="6400,9594,10397"; a="369333517" X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208";a="369333517" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2022 18:36:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208";a="566978408" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga006.jf.intel.com with ESMTP; 03 Jul 2022 18:36:06 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 3 Jul 2022 18:36:05 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Sun, 3 Jul 2022 18:36:05 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Sun, 3 Jul 2022 18:36:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IIY34Y0LiBVzI41sYzE/Y3Zc0x6VrmVD+N0FEj/gQYAPKcGAXZRM/ymd5u+dLLeNvQb8xi3R5mj4xSopS/L/0ExGL44gXe56u1f8+okoLWGdyAj/bLR4aMUQ3bCyzlfyfu6eeqqzZskv9PcSMyfqsFNS3myrkInbxPF1SVMbNeFtIxKSiWxWINW7h56C7kSNfEZxZBdnkfZOeALsqay/CALT4jtN2DPg3YWmOUfRuy+hsS0HxmSDvm4ITvgFm8wPnHyGpNoglYk2wMb/pi20BQ9eZWhEE//DAg2oLE1UVHGtK5uka0+c23J/t+jIJz/qyJDbjYOL72ZW/JrPXgdnKQ== 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=gnH6iu8QKT6SmasIxXmJf49vQ0q6hhOtBz9GWnyrjyQ=; b=M1q+xFtgE6GeI3q2+W6FFwr+nJhU5PwB6YX9jZOnkLDvH9N1hPFLuyaQNhWHQR5x6eSaC5vooWA9Wi1RhuWlSlrl2Vfnt5KZT3pmMKR8wmm972kg3CWWpIHyVCZuHhUleG7bEU4VuYlBMg5W1mg3yFnGLGOawA0FpRBY1+jfGJPs8unGNN67RKx2hDrFnNJA+9nqi53sHM682ELyyyUITEXVNCHAyFHgzUVoA/F3ikmy261lprR8u4y45lS2Q8ikmOJYw1InZmzdeqXUIrGrcGrgtp3Lr68M2W7kMQSoSdW1JzVAnEF4+I8ixaxOiAl/M7bxGqW6MmN90Q9s+dsaXQ== 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 MW5PR11MB5906.namprd11.prod.outlook.com (2603:10b6:303:1a0::21) by BYAPR11MB3461.namprd11.prod.outlook.com (2603:10b6:a03:7b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14; Mon, 4 Jul 2022 01:36:00 +0000 Received: from MW5PR11MB5906.namprd11.prod.outlook.com ([fe80::2d9a:578f:afd5:462d]) by MW5PR11MB5906.namprd11.prod.outlook.com ([fe80::2d9a:578f:afd5:462d%8]) with mapi id 15.20.5395.020; Mon, 4 Jul 2022 01:36:00 +0000 From: "Yuwei Chen" To: "devel@edk2.groups.io" , "Lin, Jason1" CC: "Feng, Bob C" , "Gao, Liming" , "Oram, Isaac W" , "Chaganty, Rangasai V" , "Chiang, Dakota" Subject: Re: [edk2-devel] [PATCH v3 1/3] [edk2-platforms] Silicon/Intel/FitGen: Support multiple Startup ACM Type 2 entries in FitGen tool Thread-Topic: [edk2-devel] [PATCH v3 1/3] [edk2-platforms] Silicon/Intel/FitGen: Support multiple Startup ACM Type 2 entries in FitGen tool Thread-Index: AQHYjVyykQRcvXZy0k6YLQ96XNowAK1tcg2Q Date: Mon, 4 Jul 2022 01:35:59 +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-reaction: no-action dlp-product: dlpe-windows 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: 96988e35-184f-4a22-f5cb-08da5d5d8cb0 x-ms-traffictypediagnostic: BYAPR11MB3461: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: Yv5BcjvYOF98ROaLtgME+Pwm6qLT6ZyXDJMi0Bc77HFtFB9M0aBap4kkVv1NMiawnz2Dos49p8cN2SlgntOlkL1YrnbbvjECpoBoJkfCZcOi2Ajdi1ORqmbE4PjqGim7VaduCJDUi31lxacMxoh1DLmsjx5n0BzZWoAWRPmxy/qkDg8orB+k7ZbqQySh0EJj9GnGEX1YTYwAMzGMaFzihV9Eb66iCG6Kljtwuhms6DiEk0mdfYGL1MtgeB7rsy6eMYon9pmf8gDfP/cO8LodGrxZwRfAaQkbwoza/6d4BUEJGmXUi4zeIpvsMwXMgpa/7Z7kXwCHrFJnAkfzu+R7h/jxBwLs/92WFjhrKlGmGrZzJMqyzlizcMkaI3mkENUYKAdFOj609DLMTRMYOQgSbz7XXPiUs0hnViosEiSJ2t9xEHE+IKyOs/LQUPAfiyEK0e/DAP8cSwx68sUbbzMZL6DkKuwcwI6BiR90HTbpyaJZ2KgoQl0K/Je8gfU3potk5POBxiv4HApPSRuvvdxjEopDjk6xPdPfSXdjA/4yr88B3HG00MmK9vteui9LWNZArCtPcie19/kKUu86Ek1uT0KJZ7gPruc+mazpcrkz/pXrzU2Hr6+sf0PP6MxHSa6aVFnAkkaGdoNcSVHENVYE+3Okq3qf8Ch7gN/sRj2C9WmH+bPeBTDgy7sLuK87rxRuDC0x+RTHLq79LV7Szw/jOOng+u7/FzJMTftKqCfXz5h/w1AIZZqCSEorlqM5rdyZkwME8iSnUs97vcx4h/YNBB9TfchMpJhnZ008ZDYWdi+V0LnYYzPw5WeIxlORachOMaBdpqOaWbVEP7tEWtTBER3vDMw9tDAQeNJlyh+yS2uf1cs2kYTwJw1DR7iQKGiIbnk0rsM6HNvuQrOJlT664Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW5PR11MB5906.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(396003)(39860400002)(376002)(136003)(346002)(366004)(33656002)(30864003)(316002)(186003)(26005)(53546011)(54906003)(52536014)(66476007)(55016003)(6636002)(66556008)(110136005)(76116006)(66946007)(5660300002)(64756008)(8676002)(66446008)(4326008)(8936002)(966005)(71200400001)(86362001)(82960400001)(122000001)(83380400001)(2906002)(478600001)(7696005)(6506007)(9686003)(41300700001)(38070700005)(107886003)(38100700002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MhQVnV0BKYvuBV1iuzWxBn2I42Az5WZA47GfudF77HPd8KoseWi/K/K0GU2j?= =?us-ascii?Q?4LvD4Ysf6YPZ91N2XhMGnNHx84EGOxCUEvqrQq8MhBPgNsAjgwYKgvJ0oLT0?= =?us-ascii?Q?1xOiSJ37s40FoQrLKJKpTohBMNne6QpjdoqHXaoEYMrKSauOWQ0Ccn5vH5a/?= =?us-ascii?Q?vDu9fNTgWn2BvU1xGIswF3PA1HmafjJ6jpxhKYSk4mAlXen3agPcKFt5KpBC?= =?us-ascii?Q?TordID0hCoYkL5TiTT6/NHl/Zjctr6YfVYnuLalOWlfSIKsWXPBN9QUnKnN5?= =?us-ascii?Q?FkDpD023rAEMWiGxmSQsByTNbbj0EeoXj85IJ0ZxMGHSS8WdyiTEIFJOxl0k?= =?us-ascii?Q?R8AJ7oU/VbnddOcFzRWnBDAjw7BzXaF/GCOd3oLkRLM6ZhpzHAtf7jqkYaMw?= =?us-ascii?Q?uFXAds9KLZJW4sYI+h1fDkqfGgP14hO7DvNLY4Wo0FouRWclRcmLsudwMiMu?= =?us-ascii?Q?IlDXDZja0jUnG+3GZ2fytWDs+8cZo8MpXgqPOngS5vXxPMmcpWG2Zl5KkJgs?= =?us-ascii?Q?K6ZJvHw/6sBkqBMZJxlw8fkPVwvf5e9ugC93+TP44/NSgJfT3sTZi2yHdlNB?= =?us-ascii?Q?lUP8rezKX1W28MR1Gz7Ol/x2pTYLNXaOI3pq2chVjV6LdbGLwY97vFHa62Zr?= =?us-ascii?Q?QSqLyNfSZ5tOM5pZAjLk7bQM1XzZQAxIr4jbCVs4dKGonDwS5BgD2yggbrst?= =?us-ascii?Q?JXAwyC0qUw5vupS7DaU+Rs3xusYK5fg9rkwj7z84GwiWyP/xwrNF1sXpPTb2?= =?us-ascii?Q?rRNwpvOsteE3kpMiUsR58V2xX7UOd1dzViwrn1e7XSyN1/ArI+SP/FnZWlvz?= =?us-ascii?Q?v2Iur3Vz6iBOgBBOtTFaJbP6m6GKEs3ib4Ux+z8PTixWkVwrqzdddU7M9W0b?= =?us-ascii?Q?Ixp/uZhejnqRELsnx+pK3nNo25xOoorF7dVFwKzhzZpISVM01uLciO67UHji?= =?us-ascii?Q?eOIjU7EqhILmZOlK63MbwqieLwJNu6ISHbzDzsGJOod4PbepQdPyQ0ZcbkNC?= =?us-ascii?Q?gyCMjMglORmxW5y5xNhMEPj7xILuIsQdskqfH1QQbSrY1cw1YHEA5GxH9NCJ?= =?us-ascii?Q?p4EE0/Cpmm6jFmBEQHMI1bSEOBNy5YBzAs+OUk8Tie9aP8z9j1jedccz02Xb?= =?us-ascii?Q?0mNwBiNHSg+EYyY7mnorEp59CKw8k3tSW17psT/SLW3tML/RjG1U9zRh+u7j?= =?us-ascii?Q?zE9gkhvt+0iI0Xuw0a16DpQXHaZ1aJfqUoeJyzvD9cKLUNm/nPlBOhw7LZev?= =?us-ascii?Q?8/CjHTECqEUANdGK9TJSbegXv9dmSlsBvkFkYXJXc5Y3jR59Se6iO1iVZY5k?= =?us-ascii?Q?djTI5QEKvJ3gt7cG7unPWeTn2pp/A/iIo116LIJtqRMaTllB+EEWjeDyHyzV?= =?us-ascii?Q?r0wkSzZWVkketpsctGOIjq6RC4sZtBihRQX2gwqgO9p+ja/ROV6Z5GBIRGn8?= =?us-ascii?Q?acsEGjTRl9h7frNY+29HTQjBtdGOLqSmNYCi4s4a0ZRHOGpwALIyxXMuCI9k?= =?us-ascii?Q?4nA6JPAI6f+3i8hh3GHALxck+6hH7EaAuLLOxUrHCP2Fin767eb+Q52MsTZ/?= =?us-ascii?Q?JrcB/FeVbbPFL5OS32SyhwErwNo1UPtHQ/XnFAhk?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5906.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96988e35-184f-4a22-f5cb-08da5d5d8cb0 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jul 2022 01:35:59.9939 (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: mfhrwvjD/JsWIInHuA92vK4Z/OvouWlzm1bG1eQc+Fq80DB7TIrmZH/FfiOtAb4+FxklgiFPjy0RUovKS3e19w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3461 Return-Path: yuwei.chen@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yuwei Chen > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Lin, > Jason1 > 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: [edk2-devel] [PATCH v3 1/3] [edk2-platforms] Silicon/Intel/FitGe= n: > Support multiple Startup ACM Type 2 entries in FitGen tool >=20 > From: Jason1 Lin >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3958 >=20 > Within current FitGen tool there had limitation only allow one S-ACM to > generate the Type 2 entry. > This code change is used to support multiple type 2 entries up to 0x20. >=20 > 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/Intel/Tools/FitGen/FitGen.h | 4 +- > 2 files changed, 50 insertions(+), 43 deletions(-) >=20 > diff --git a/Silicon/Intel/Tools/FitGen/FitGen.c > b/Silicon/Intel/Tools/FitGen/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 = table. - > Copyright (c) 2010-2021, Intel Corporation. All rights > reserved.
+Copyright (c) 2010-2022, Intel Corporation. All rights > reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/@@ -204,6 > +204,7 @@ typedef struct { > #define MAX_BIOS_MODULE_ENTRY 0x20 #define > MAX_MICROCODE_ENTRY 0x20+#define MAX_STARTUP_ACM_ENTRY 0x20 > #define MAX_OPTIONAL_ENTRY 0x20 #define MAX_PORT_ENTRY 0x20 > @@ -255,11 +256,12 @@ typedef struct { > UINT32 FitEntryNumber; UINT32 > BiosModuleNumber; UINT32 MicrocodeNumber;+ UINT32 > StartupAcmNumber; UINT32 OptionalModuleNumber; UI= NT32 > PortModuleNumber; UINT32 GlobalVersion; UINT32 > FitHeaderVersion;- FIT_TABLE_CONTEXT_ENTRY StartupAcm;+ > FIT_TABLE_CONTEXT_ENTRY StartupAcm[MAX_STARTUP_ACM_ENTRY]; > UINT32 StartupAcmVersion; FIT_TABLE_CONTEXT_ENTRY > DiagnstAcm; UINT32 DiagnstAcmVersion;@@ -1149,14 +1= 151,15 > @@ Returns: > Error (NULL, 0, 0, "-I Parameter incorrect, Header Type unsupp= orted!", > 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.StartupAcm.Type =3D > FIT_TABLE_TYPE_STARTUP_ACM;- > gFitTableContext.StartupAcm.Address =3D > (UINT32)BiosInfoStruct[BiosInfoIndex].Address;- > gFitTableContext.StartupAcm.Size =3D > (UINT32)BiosInfoStruct[BiosInfoIndex].Size;- > gFitTableContext.StartupAcmVersion =3D > BiosInfoStruct[BiosInfoIndex].Version;+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Type = =3D > FIT_TABLE_TYPE_STARTUP_ACM;+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Address > =3D (UINT32)BiosInfoStruct[BiosInfoIndex].Address;+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Size = =3D > (UINT32)BiosInfoStruct[BiosInfoIndex].Size;+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Version > =3D BiosInfoStruct[BiosInfoIndex].Version;+ > gFitTableContext.StartupAcmNumber ++; > gFitTableContext.FitEntryNumber ++; 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) && (strcmp (argv[Index], "-= s") !=3D 0)) ) {- > if (BiosInfoExist && (gFitTableContext.StartupAcm.Type =3D=3D > FIT_TABLE_TYPE_STARTUP_ACM)) {- break;+ if > (gFitTableContext.StartupAcmNumber =3D=3D 0) {+ printf ("-S not fo= und. > WARNING!\n"); } // Error (NULL, 0, 0, "-S Parameter incorrect,= expect - > S!", NULL); // return 0;- printf ("-S not found. WARNING!\n"); > break; } if (IsGuidData (argv[Index + 1], &Guid)) {@@ -1381,14 +1= 383,13 > @@ Returns: > FileSize =3D xtoi (argv[Index + 2]); Index +=3D 3; }- = if > (gFitTableContext.StartupAcm.Type !=3D 0) {- Error (NULL, 0, 0, "-S = Parameter > incorrect, Duplicated StartupAcm!", NULL);+ if > (gFitTableContext.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;- gFitTableContext.StartupAcm.Size =3D Fil= eSize;- > gFitTableContext.FitEntryNumber ++;+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Type =3D > FIT_TABLE_TYPE_STARTUP_ACM;+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Address > =3D (UINT32) (UINTN) FileBuffer;+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Size =3D > FileSize; // // 1.1 StartupAcm version@@ -1407,7 +1408,10 @@ Ret= urns: > gFitTableContext.StartupAcmVersion =3D xtoi (argv[Index + 1]); = Index +=3D > 2; }- } while (FALSE);++ gFitTableContext.StartupAcmNumber ++;+ > gFitTableContext.FitEntryNumber ++;+ } // // 1.5. DiagnosticsAcm@@ = - > 1890,7 +1894,9 @@ Returns: > // // Final: Check StartupAcm in BiosModule. //- CheckOverlap > (gFitTableContext.StartupAcm.Address, gFitTableContext.StartupAcm.Size);+ > for (Index =3D 0; Index < (INTN)gFitTableContext.StartupAcmNumber; Index+= +) > {+ CheckOverlap (gFitTableContext.StartupAcm[Index].Address, > gFitTableContext.StartupAcm[Index].Size);+ } FitEntryNumber =3D > gFitTableContext.FitEntryNumber; for (Index =3D 0; Index < > (INTN)gFitTableContext.OptionalModuleNumber; 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.FitEntryNumber); printf ("FitHeader version: 0x%04x\n"= , > gFitTableContext.FitHeaderVersion);- if > (gFitTableContext.StartupAcm.Address !=3D 0) {- printf ("StartupAcm - > (0x%08x, 0x%08x, 0x%04x)\n", gFitTableContext.StartupAcm.Address, > gFitTableContext.StartupAcm.Size, gFitTableContext.StartupAcmVersion);+ > for (Index =3D 0; Index < gFitTableContext.StartupAcmNumber; Index++) {+ > printf ("StartupAcm[%d] - (0x%08x, 0x%08x, 0x%04x)\n", Index, > gFitTableContext.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, > gFitTableContext.DiagnstAcmVersion);@@ -2809,8 +2815,8 @@ Returns: > // // 4. StartupAcm //- if (gFitTableContext.StartupAcm.Address != =3D 0) {- > FitEntry[FitIndex].Address =3D gFitTableContext.StartupAcm.Ad= dress;+ > for (Index =3D 0; Index < gFitTableContext.StartupAcmNumber; Index++) {+ > FitEntry[FitIndex].Address =3D > gFitTableContext.StartupAcm[Index].Address; *(UINT32 > *)&FitEntry[FitIndex].Size[0] =3D 0; //gFitTableContext.StartupAcm.Size /= 16; > FitEntry[FitIndex].Version =3D > (UINT16)gFitTableContext.StartupAcmVersion; FitEntry[FitIndex].Type > =3D FIT_TABLE_TYPE_STARTUP_ACM;@@ -3110,7 +3116,7 @@ GetFitEntryInfo > ( > Routine Description: - Fill the FIT table information to Fvrecovery+ = Get 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)FitEntry[FitIndex].Address;- gFitTableContext.StartupAcmVers= ion > =3D FitEntry[FitIndex].Version;+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Address > =3D (UINT32)FitEntry[FitIndex].Address;+ > gFitTableContext.StartupAcmVersion = =3D > FitEntry[FitIndex].Version; break; case FIT_TABLE_TYPE_BIOS_MOD= ULE: > gFitTableContext.BiosModule[gFitTableContext.BiosModuleNumber].Address > =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 @@ Returns: > // // Get ACM buffer //- if (gFitTableContext.StartupAcm.= Address !=3D > 0) {- AcmBuffer =3D > FLASH_TO_MEMORY(gFitTableContext.StartupAcm.Address, FdFileBuffer, > FdFileSize);- if ((AcmBuffer < FdFileBuffer) || (AcmBuffer + > gFitTableContext.StartupAcm.Size > FdFileBuffer + FdFileSize)) {- = printf > ("ACM out of range - can not validate it\n");- AcmBuffer =3D NULL;= - }+ > for (Index =3D 0; Index < (INTN)gFitTableContext.StartupAcmNumber; Index = ++) > {+ if (gFitTableContext.StartupAcm[Index].Address !=3D 0) {+ = AcmBuffer =3D > FLASH_TO_MEMORY(gFitTableContext.StartupAcm[Index].Address, > FdFileBuffer, FdFileSize);+ if ((AcmBuffer < FdFileBuffer) || (Acm= Buffer + > 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, gFitTableContext.StartupAcm.Size)) {- DumpAcm > ((ACM_FORMAT *)AcmBuffer);- } else {- Status =3D STATUS_E= RROR;- > goto exitFunc;+ if (AcmBuffer !=3D NULL) {+ if (CheckAcm > ((ACM_FORMAT *)AcmBuffer, gFitTableContext.StartupAcm[Index].Size)) {+ > DumpAcm ((ACM_FORMAT *)AcmBuffer);+ } else {+ Status = =3D > STATUS_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, I= ntel > Corporation. All rights reserved.
+Copyright (c) 2010-2022, Intel > Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clau= se- > Patent **/@@ -31,7 +31,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > // Utility version information // #define UTILITY_MAJOR_VERSION 0-#defin= e > UTILITY_MINOR_VERSION 64+#define UTILITY_MINOR_VERSION 65 #define > UTILITY_DATE __DATE__ //-- > 2.37.0.windows.1 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#90988): https://edk2.groups.io/g/devel/message/90988 > Mute This Topic: https://groups.io/mt/92111640/4546272 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [yuwei.chen@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20