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.web11.7833.1608614679248829299 for ; Mon, 21 Dec 2020 21:24:39 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=lFwdIi9y; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: bob.c.feng@intel.com) IronPort-SDR: 4UyMYugjMXPQ+ShyRT1w3y7dPcrMjeIDSaOwcmD5PoriO5DXhmI785fVO2OJf96Pfaz1Lybqof WymCqjZmB17Q== X-IronPort-AV: E=McAfee;i="6000,8403,9842"; a="175048246" X-IronPort-AV: E=Sophos;i="5.78,438,1599548400"; d="scan'208";a="175048246" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2020 21:24:37 -0800 IronPort-SDR: 6F1G0tBNY52YkvKcPIWueP5fXiZ4d8fdEbnDEFfbgMogyi/LIiICrUks0SEEG9UaaoDItkTQhq tGKRPBQnULig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,438,1599548400"; d="scan'208";a="492057621" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga004.jf.intel.com with ESMTP; 21 Dec 2020 21:24:37 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 21 Dec 2020 21:24:36 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 21 Dec 2020 21:24:36 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 21 Dec 2020 21:24:36 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=STa4FJyTfoph86LkrEkSHM4TcWBa9nBBQxWcKZiUpjnW8uyoGKRDhI+d35dikZyEE6q6qSmQ5NqDmT/+jn2Ns5JsKtLUMqE0CZqjsIvIU+eu//NWckGZq/0MXzmx7C6dXZvFhXSATYTPWU5ItCML0C2eZXC1t+SQ1ybt4htP8NLHTRVGwsodlltTBTVlIL0kIIvH9VXBKW+4/03Ednq3MVQq3bSz+nkCDieLKVIRUXi4o+E0bH1MW60l8nR28NwdGz6TJ+VruM8JtYtxGXgxyE1/RH8eyblJxPhHfqoYbOmWZrNiGoeGmLsLlOicKtOrG+rWZvbkKULLI5uyZE86XQ== 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-SenderADCheck; bh=T8liIj/jXDOaSXn7Ua7qi30/+tkKC+2c+g4z/SwKruo=; b=R3rmGwKueWVetDVyUcoUzks2j7kM0c0q294YwLY6GLn+qU2MX6kdAOH8uLGicIwph6I+2Et18tnk4YAVSYtZYsggdaIYtlR2dJAyrxEXeqvEwmAC3qpYv13LAIW8uSSHWnyBkix2j7lmx2xUuEw+lwPwiGT67qwJgcpVR0FyNNFo+0H8kjyedV21SCtsjeecFQdHd6IK+hr6z/h0g/WnwaXPL1GacqLD1y6aEU3QVAN3W3XgaOcmFn90Mj5zhdom59P1GR+FWud6Sc2emVQzOvY3+S3fnmaj0JXRnVNVFlwDBHJovyz0agjAA6txeBnDbnS+RlR1NoAn8GJzQSpBDg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T8liIj/jXDOaSXn7Ua7qi30/+tkKC+2c+g4z/SwKruo=; b=lFwdIi9y6mrxetEBuFSlTj0odiSQJX7JV5McyGA9qLWBwTfyxcWck+f3Kmkzin+sBLsdnvM8SLqd3a+PRdbIVjgVnaWlkyZjQ+4aO0rJahLfINQfZbIblUhq6691psVAOyC008l7jK3O2xBk0Kl2/K937w3iSPvDIFBwGlCmqt4= Received: from DM6PR11MB4073.namprd11.prod.outlook.com (2603:10b6:5:19f::22) by DM6PR11MB3420.namprd11.prod.outlook.com (2603:10b6:5:69::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.20; Tue, 22 Dec 2020 05:24:35 +0000 Received: from DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::c9f:47ea:6321:5ccb]) by DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::c9f:47ea:6321:5ccb%3]) with mapi id 15.20.3676.033; Tue, 22 Dec 2020 05:24:35 +0000 From: "Bob Feng" To: "devel@edk2.groups.io" , "Li, Aaron" CC: Liming Gao Subject: Re: [edk2-devel] [PATCH v3 1/1] Silicon/FitGen: Enhance Slot mode support force mode for multiple FV. Thread-Topic: [edk2-devel] [PATCH v3 1/1] Silicon/FitGen: Enhance Slot mode support force mode for multiple FV. Thread-Index: AQHW2A2B6blDuiukOkmQTCoqenuVB6oClUkg Date: Tue, 22 Dec 2020 05:24:35 +0000 Message-ID: References: <20201222025202.948-1-aaron.li@intel.com> In-Reply-To: <20201222025202.948-1-aaron.li@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2f07f6c2-1626-42a2-7f86-08d8a639dec5 x-ms-traffictypediagnostic: DM6PR11MB3420: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TapI+bY1ZSEn/+4v4YXzIOu9UGsTvUWc+QZhmSa3tBDyrZY62zggfcr4/sTHtwAvxvxtTg8htV+S/9WTtO9PTI+6bGehZn0DN4Zx5qH05iSHgNDdHEGRqZy+GZSvK2jG5guAetmHPMNIoUoF4iAviHHw20JMaXnHqxTUeqjZxg0wwoV5PMmOsUZKktu1WcRQZRLVX8PjKahvMxbdpEbWpSCheLJiJ/h8479i/JnNqvqWvZVPvnpSYt/G4WXvWwGiPQ5j27F03qs/kpBiFhSUV6pYwgMNNJhXK2h931kKsQ/FliyRABp+T+T9Og0pAtzqfHmciA/bhLD2OeA9TCmetmfrw1PhjEGY52o0ix0SyvpjUd3xc6dhIwcT90FUjZvoDyJCUOEqKMBaBwuEOF1HDg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4073.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(346002)(366004)(376002)(136003)(39860400002)(9686003)(2906002)(186003)(64756008)(7696005)(26005)(52536014)(66556008)(8936002)(66446008)(478600001)(5660300002)(6636002)(55016002)(83380400001)(966005)(76116006)(8676002)(66476007)(53546011)(110136005)(316002)(86362001)(4326008)(66946007)(6506007)(71200400001)(33656002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?9UjFbb6r5ZrTYKMPOW0PeISW4TsOV+bHi1a2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ascii?Q?KCj2hbdZOUXa9xOTsyoSdhX9S6+e1xJBcl0PQrWKSZIpxIl8R20UFbf8AlAP?= =?us-ascii?Q?NVtze3GBcihX7Z1Id4BbIx7pkYc0HjlwK6zrqgFXLwQ=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4073.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f07f6c2-1626-42a2-7f86-08d8a639dec5 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Dec 2020 05:24:35.2767 (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: gTpELfSytQP6NLAJ6KeEyLClmuo7M9La6t38ZPAVWWhrYALQxX/fpzIMUBNh28T2Zv1UVPUXP9PrFXwQWnCY2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3420 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 Reviewed-by: Bob Feng =20 -----Original Message----- From: devel@edk2.groups.io On Behalf Of Aaron Li Sent: Tuesday, December 22, 2020 10:52 AM To: devel@edk2.groups.io Cc: Feng, Bob C ; Liming Gao Subject: [edk2-devel] [PATCH v3 1/1] Silicon/FitGen: Enhance Slot mode supp= ort force mode for multiple FV. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3122 Adding "-LF"/"-lf" option to support slot mode without FFS GUID check. It will support the scenario that multiple Microcode FV with different FFS = GUID enable slot mode. The size of slot should be 16 byte-aligned, and larger than every microcode= . Signed-off-by: Aaron Li Cc: Bob Feng Cc: Liming Gao --- Silicon/Intel/Tools/FitGen/FitGen.c | 39 +++++++++++++------- Silicon/Int= el/Tools/FitGen/FitGen.h | 2 +- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/Silicon/Intel/Tools/FitGen/FitGen.c b/Silicon/Intel/Tools/FitG= en/FitGen.c index e9541c1e95cb..36e6e3c90518 100644 --- a/Silicon/Intel/Tools/FitGen/FitGen.c +++ b/Silicon/Intel/Tools/FitGen/FitGen.c @@ -333,9 +333,10 @@ Returns: "\t[-F ] [-F ] [-V= ]\n" "\t[-NA]\n" "\t[-A ]\n"- "\t[-REMAP \n"+ "\t[-REMA= P \n" "\t[-CLEAR]\n" "\t[-L ]\n"+ "\t[-LF ]\n" = "\t[-I ]\n" "\t[-S |] [-V ]\n" "\t[-U= |]\n"@@ -366,6 +367,7 @@ Returns: printf ("\tMicrocodeGuid - Guid of Microcode Module.\n"); pri= ntf ("\tMicrocodeSlotSize - Occupied region size of each Microcode bin= ary.\n"); printf ("\tMicrocodeFfsGuid - Guid of FFS which is used t= o save Microcode binary");+ printf ("\t-LF - Microcode = Slot mode without FFS check, treat all Microcode FV as slot mode. In this c= ase the Microcode FV should only contain one FFS.\n"); printf ("\t-NA = - No 0x800 aligned Microcode requirement. No -NA means Micr= ocode is aligned with option MicrocodeAlignment value.\n"); printf ("\tMi= crocodeAlignment - HEX value of Microcode alignment. Ignored if \"-NA\"= is specified. Default value is 0x800. The Microcode update data must start= at a 16-byte aligned linear address.\n"); printf ("\tRecordType = - FIT entry record type. User should ensure it is ordered.\n");@@ -882,= 11 +884,13 @@ Returns: UINTN FitEntryNumber; BOOLEAN = BiosInfoExist; BOOLEAN SlotMode;+ BOOLEAN = SlotModeForce; BIOS_INFO_HEADER *BiosInfo; BIOS_= INFO_STRUCT *BiosInfoStruct; UINTN BiosI= nfoIndex; - SlotMode =3D FALSE;+ SlotMode =3D FALSE;+ SlotModeForce= =3D FALSE; // // Init index@@ -1031,7 +1035,9 @@ Returns: // if ((Index + 1 >=3D argc) || ((strcmp (argv[Index], "-L") != =3D 0) &&- (strcmp (argv[Index], "-l") !=3D 0)) ) {+ (strcmp (a= rgv[Index], "-l") !=3D 0) &&+ (strcmp (argv[Index], "-LF") !=3D 0) &&= + (strcmp (argv[Index], "-lf") !=3D 0))) { // // Bypass /= /@@ -1039,18 +1045,21 @@ Returns: } else { SlotSize =3D xtoi (argv[Index + 1]); - if (SlotSize =3D= =3D 0) {- printf ("Invalid slotsize =3D %d\n", SlotSize);+ if (Slot= Size =3D=3D 0 || SlotSize & 0xF) {+ printf ("Invalid slotsize =3D 0x%x= , slot size should not be zero, or start at a non-16-byte aligned linear ad= dress!\n", SlotSize); return 0; }-- SlotMode =3D IsGuidData(ar= gv[Index + 2], &MicrocodeFfsGuid);- if (!SlotMode) {- printf ("Need= a ffs GUID for search uCode ffs\n");- return 0;+ if (strcmp (argv[= Index], "-LF") =3D=3D 0 || strcmp (argv[Index], "-lf") =3D=3D 0) {+ Sl= otModeForce =3D TRUE;+ Index +=3D 2;+ } else {+ SlotMode =3D I= sGuidData(argv[Index + 2], &MicrocodeFfsGuid);+ if (!SlotMode) {+ = printf ("Need a ffs GUID for search uCode ffs\n");+ return 0;+ = }+ Index +=3D 3; }-- Index +=3D 3; } //@@ -1219,6 +1228= ,10 @@ Returns: gFitTableContext.FitEntryNumber++; if (SlotSi= ze !=3D 0) {+ if (SlotSize < MicrocodeSize) {+ = printf ("Parameter incorrect, Slot size: %x is too small for Microcode = size: %x!\n", SlotSize, MicrocodeSize);+ return 0;+ = } MicrocodeBuffer +=3D SlotSize; } e= lse { MicrocodeBuffer +=3D MicrocodeSize;@@ -1228,7 +1241,7= @@ Returns: /// /// Check the remaining buffer ///= - if (((UINT32)(MicrocodeBuffer - MicrocodeFileBuffer) < Microco= deFileSize) && SlotMode !=3D 0) {+ if (((UINT32)(MicrocodeBuffer= - MicrocodeFileBuffer) < MicrocodeFileSize) && (SlotMode || SlotModeForce)= ) { for (Walker =3D MicrocodeBuffer; Walker < MicrocodeFileBu= ffer + MicrocodeFileSize; Walker++) { if (*Walker !=3D 0xFF= ) { printf ("Error: detect non-spare space after uCode ar= ray, please check uCode array!\n");diff --git a/Silicon/Intel/Tools/FitGen/= FitGen.h b/Silicon/Intel/Tools/FitGen/FitGen.h index 435fc26209da..5add6a8870e9 100644 --- a/Silicon/Intel/Tools/FitGen/FitGen.h +++ b/Silicon/Intel/Tools/FitGen/FitGen.h @@ -31,7 +31,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // Utility version information // #define UTILITY_MAJOR_VERSION 0-#define = UTILITY_MINOR_VERSION 63+#define UTILITY_MINOR_VERSION 64 #define UTILITY_D= ATE __DATE__ //--=20 2.29.2.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#69368): https://edk2.groups.io/g/devel/message/69368 Mute This Topic: https://groups.io/mt/79141784/1768742 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [bob.c.feng@intel.com] -= =3D-=3D-=3D-=3D-=3D-=3D