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.web11.67101.1656898669931710044 for ; Sun, 03 Jul 2022 18:37:50 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=bpYCMHlF; 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=1656898669; x=1688434669; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=wj730MvhnlkWpEmQmiLhhl/sy4is4U6k/Gp2CkYdmxA=; b=bpYCMHlFxWNiEv3a5avnBKpTRNQTM5hyct2f4RpgUhcEcAScHKqmn7C+ tMMKvqJ5QkWJQLEaFyb8GP+sSUpHfJrM6MUbAwXXp8CK0tcqF6kzHh6Cv AzlyFC1ao4V3OP1iM4DRRD1oYO5b9FKuLTZ2cyv+xLZPhT4OeCCo4C26p OZl/pIwE3k8HuPXA1Zv2lrM9ZR9DuoguicqjjbMDhRZfrZT2ENx2A3VGu 118eVHMkOzJvuU42PXSvSceMFU6S0O8XhOy2KHQfj/b2tmjmRpWIb3lCC +JRqWkoDwT6nJZCZjYyJcK3teOEzMdoZ5euXQusjZFTXtdL1+0Bl6FOMQ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10397"; a="369333839" X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208";a="369333839" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2022 18:37:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208";a="719233496" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga004.jf.intel.com with ESMTP; 03 Jul 2022 18:37:49 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx605.amr.corp.intel.com (10.18.126.85) 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:37:48 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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:37:48 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx605.amr.corp.intel.com (10.18.126.85) 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:37:48 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177) 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:37:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LNXA1/4qrfLFhdzeeyYHV+xYzG+7freKxStQdVMRIZ3Pckcv+Sh5PQ5uKoOzBKpgsQeyllw4N+qx7kDI5zknWGCTM0Wct18xV8s8KWo6+2KQKiompUVHDFjoxMVo2Ro0fb4XNcWnxMi9rgdH+NyehSjB/x0hBl+lZVEAjDrsh/ocUoOk5NIkDebmPiXnXrWLtsdyQgaCRTrvP7LjiPcus9Asv8JKTaACEHmIybxO0Md7ooZA+Zm7STa3gc8NRGoPlzYCE0h2U7BYgnD1H6sngYQN0rPP9H7uBbJR62tu30TEt/A5eawtqujY+tYbDMUTaPXV8HYhcfzqLUOqB2nw9Q== 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=2UHHzRqaBy5QPezRkPVmDqc9FVGgBkoK9EcL4nErtJk=; b=Ik6Wu9Kq4FZlmcbOK1HlxhYh5pVxtNnaZbzILZe2BjsFyvFI5tZTQJxftKJWvFGnUCkS0wyTg1k+ukHsfXGNJzlYb5Hwf9rLVHpXA8qukDMI5EpiCEMHwziiwQechqzbfpUdLQ5kYmwQ1sdfpq2h+5O1QydIYB5gx7oDUozBbiExYARtsTRrspmnapmlRNpWMQO9SYCf+4XTgLQQNTBkeM8IQkMCRliI8mZl2son7flM3o71u1i4IGeGRFbt+qQT3RpDfCNDziyWx4IjApz2QThqImgSal7tvSwxuJUt8izyFATBxYo5sx538ytoudE7l1K76c7mZXpxnNc3qf3f5g== 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:37:44 +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:37:44 +0000 From: "Yuwei Chen" To: "Lin, Jason1" , "devel@edk2.groups.io" CC: "Feng, Bob C" , "Gao, Liming" , "Oram, Isaac W" , "Chaganty, Rangasai V" , "Chiang, Dakota" Subject: Re: [PATCH v3 3/3] [edk2-platforms] Silicon/Intel/FitGen: Support Startup ACM entries (Type 2) 0x200 Version Thread-Topic: [PATCH v3 3/3] [edk2-platforms] Silicon/Intel/FitGen: Support Startup ACM entries (Type 2) 0x200 Version Thread-Index: AQHYjVyzvD8e9iEpm0uv/D5wnwgbYa1tcopQ Date: Mon, 4 Jul 2022 01:37:44 +0000 Message-ID: References: <20220701151005.189-1-jason1.lin@intel.com> <20220701151005.189-3-jason1.lin@intel.com> In-Reply-To: <20220701151005.189-3-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: 83b2e7cc-b39d-4ccd-94dd-08da5d5dcaec 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: KZa+48lbJnDIlnXLQYRdWg2oRMMWus+wfvAoHgDurJmuqQTjHakrG3QT9ut0Qhm+UTwTycITrUt0vodcPk+k83Mb1G+2+eADeXHy35AEb/HPpNGInT/SmlAWiAlEYi51Y+PZeFeKoKylYJFszpSKI+cNresDSXtORxhK7SEGU7GCQP4AbFo79pu7FL9jS5/z2tWZQTaPnWtR/fke+SyRQhhmRgVMZvZpZ2jXUGThNC7lwjXtw9dcjs/jjRBzk7Nhqam3JF9SVgczeKC5OhnawxlQ1eUE+6EDqb1UDMFK/esUe8Q+c0Hqb5Ea+QktsLrQKg/3hVlo705tSa54cOjBnM4XM/TU6yw2iZewRnMB+TG/T1YFBOwDwDbIXuFAuN8uW43sSRjYTiQ6TAQF1FzkvixffFrUnTJ3sePxoZ/c/dVfII8qqCEHdg6j9cL3jOFVCT+s0hhrCqZsQ87FVk7+ZDiDKmwARWfNV/r9Q/iF2AJGY0uG0DC3ovC+GakEemSq+xW9Vr8oOn+Ij6bg9iYZAY1y/pBtZORDviPMaiQ6MkM/a905fXN0dVhKPnBc2O44NNS1Vn0DtaBdCowtQqVMA0W9O1/rIssUqhKoKt62fyTELeMRPhDnlnmL6HdWrs7T3ktrj1GV6c8oSQLsSEPjVDUAWKcOmPO5alSJIux096U8qJXDZr1Jeq5VkgK379tUILUT8iK+g8tNYGfcXgYH1pNoLBuEbWapKLs5kQ7foFW7RhCvWCIN8F8wpOlzHary3kjphwygYeMttrO2yHJW2QiamkU3jBSG76XGCrBN/J4VguwMSuE94pFBAUIoYkhv3dg1qBFMRnBmEPtpWMm0hA0kOjRqZkP8yTh2EWy+2hw= 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)(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?BywCzKrBqhPJnYabb0dZfGiQuBvS/l0Iomc12vK08WTHz9wLGAMr7Vbq5suz?= =?us-ascii?Q?yKEn98lW8NjHMqoR1h4lpetCAU9FAgP1eLzCJgg7Y8XUsmjRX1I1itJFjIVF?= =?us-ascii?Q?B9hT51h2dToDqWlXcvZT+l1fYo8CPm/IwvTkY6y4LXwMWHl5zN0NQ0JxHNyb?= =?us-ascii?Q?45nXVm7janAizETfsR1adu9VVgEXXhn9f8PXNqcR0nNVbCCHcKQsfQtrydMu?= =?us-ascii?Q?7KURlUMgyNM1fTRvGc5I13Ap/GBJlpCJta9J9dtl6mJ/sA6J/I0f/iHiqQUD?= =?us-ascii?Q?THI96K8YOYaHL4OMpllAV2H182Ag29/Ue9mrkjMI9donZ8YYvd7Ycn9BOyMB?= =?us-ascii?Q?AQr5UovSU0x+M2XRduRM5KFiHkQV17KhbyblQC5UCchv8n+paoKog6GL1P6Z?= =?us-ascii?Q?ColdhXSvlKYI9jY4+KHFkkt9hmWGIjol9ihyaJoaya6AVysrjV9I4swhwedL?= =?us-ascii?Q?Fgky1yDTU52wOfUERAJbFNODottsAzBayvy87UDykgSJ5APo+1AJTYSITQb1?= =?us-ascii?Q?FJOrVPz8OvlYlzxhWnHO7LZBzSrZJl5GOZld00WrieqsduR+1g8b2hsQh0uq?= =?us-ascii?Q?jahQYyfa11+OPSLS/tmxjO2Xy+uxQAb+Cn91ppIEicjDJUfvKaq/GiteHVN9?= =?us-ascii?Q?180Q5PtTb7tvL4iYh+UemsPgHDru8TVUCW26B4M6b98q92STza8t5xCkEGQ+?= =?us-ascii?Q?8lb0/KuZiGLyXBsJTR80OG86Qci2sZIwj8nNTqinc1vDuGlSOx3+YWoKmEJ4?= =?us-ascii?Q?NIBs9a8ncZWoNTA0MZVLsh6UM4Z8QVtJzWY5Js3WIKU44mSOMRfThetOVQ2b?= =?us-ascii?Q?R1vqOGZDyz5HVESMx6eXQ0dWXBz5LjlG2kLt1kwhAs2gr7THgEyJ7yxyMsvf?= =?us-ascii?Q?41JpxLPpg/OVn5y7YNf7ikM2pG8YZbf4Vq3f9Xc8QLnLQX0r4J+WS996hq8Z?= =?us-ascii?Q?OqpJ5Fb5w3xAbp5ui8T2Pxmvd9MKOVTFG6ARMqCJsQeT3npckD+QpkNb00M9?= =?us-ascii?Q?fgMvvWiHzQiuAFP0QECqHLNpxfbiR9whPF5OdoK2TZN3SjmgNKw/yp4E+xHQ?= =?us-ascii?Q?bRw7W3itchPiHCCRWAwlebFsNpbYeVUIOsDw711XzjFIITgggN7lvIpnmdnV?= =?us-ascii?Q?1ftLf2KlZrTZ4HbIuYXpOxCUC+DAxyIlfXyRMFYGZHaJGY8iWffo2zuMI3en?= =?us-ascii?Q?rziErt115Y+U7f4aaa9VurwSnV0f6S4Ho5EGYtY9GAHFA6uCVB7nupYBJVoZ?= =?us-ascii?Q?KoVhPJGZ34HT4YJPqUX/0rrMPUllg+TvsxkaSIK0RFv74QuB/1fkPQOHt/VI?= =?us-ascii?Q?4RJ4eHYEbEv7C2cLGeK4aqSmC8frKLJgE06M8Z3bYP/qHvGf9uMu281j4/f3?= =?us-ascii?Q?tzfU5zBo915cMlwKkPKmz2KU0jKf0gnXYMmigpW1dpddc+0oPIsF3lK2lcW7?= =?us-ascii?Q?zo7p+7Fgd3t5ozYcxNy1J9sly6VZMufSDtkuodymj/ZRcmJY/7Nj8IQ9b0Q4?= =?us-ascii?Q?8YQenocgL49Jw4wTKpA9erVpjaMFuHFEBFg2RZeCLP8k+BO4EPmIA+xC1Oj9?= =?us-ascii?Q?MyrDzF2zd+A2aqVgzmSV9ex/4LwuvFcdffXFAk0M?= 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: 83b2e7cc-b39d-4ccd-94dd-08da5d5dcaec X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jul 2022 01:37:44.4034 (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: csLO61RYnd+aS5CUNduW2ybkjnewEmCbh7d2CSCQrM6EUxb4VgkVQxEZVMCvQeO6r6ID2V24JMH4+D05iW6dkw== 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: 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: [PATCH v3 3/3] [edk2-platforms] Silicon/Intel/FitGen: Support > Startup ACM entries (Type 2) 0x200 Version >=20 > From: Jason1 Lin >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3959 >=20 > As per FIT BIOS Specification 1.2 Rules, the size bytes (3 bytes) / reser= ved > byte (1 byte) / CheckSum byte (1 byte) in type 2 are must-be-zero (MBZ). > These bytes could be override for the other usages. > This change is used to support the Type 02 (ACM) Ver. 0x200. >=20 > Command: > [-S |] [-I > ] [-V ] >=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 | 183 ++++++++++++++++++-- > Silicon/Intel/Tools/FitGen/FitGen.h | 2 +- > 2 files changed, 165 insertions(+), 20 deletions(-) >=20 > diff --git a/Silicon/Intel/Tools/FitGen/FitGen.c > b/Silicon/Intel/Tools/FitGen/FitGen.c > index 01b4f82518..577ce48b10 100644 > --- a/Silicon/Intel/Tools/FitGen/FitGen.c > +++ b/Silicon/Intel/Tools/FitGen/FitGen.c > @@ -55,6 +55,7 @@ typedef struct { > #define ACM_MODULE_FLAG_PREPRODUCTION 0x4000 #define > ACM_MODULE_FLAG_DEBUG_SIGN 0x8000 +#define > NIBBLES_TO_BYTE(A, B) (UINT8)(((A & (0x0F)) << 4) | (B & 0x0F)) typedef > struct { UINT16 ModuleType;@@ -149,6 +150,20 @@ typedef struct { > ACM_PROCESSOR_ID ProcessorID[1]; } PROCESSOR_ID_LIST; +typedef > union {+ struct {+ UINT32 Stepping : 4;+ UINT32 Model = : 4;+ > UINT32 Family : 4;+ UINT32 Type : 2;+ UINT32 Res= erved1 : 2;+ > UINT32 ExtendedModel : 4;+ UINT32 ExtendedFamily: 8;+ UINT32 > Reserved2 : 4;+ } Bits;+ UINT32 Uint32;+} PROCESSOR_ID;+ #pragma p= ack > () @@ -210,6 +225,7 @@ typedef struct { > #define DEFAULT_FIT_TABLE_POINTER_OFFSET 0x40 #define > DEFAULT_FIT_ENTRY_VERSION 0x0100+#define > STARTUP_ACM_FIT_ENTRY_200_VERSION 0x0200 #define > TOP_FLASH_ADDRESS (gFitTableContext.TopFlashAddressRemapValue) @@ > -247,6 +263,8 @@ typedef struct { > UINT8 *Buffer; // Used by OptionalModule only UINT32 Size; UINT= 32 > Version; // Used by OptionalModule and PortModule only+ UINT32 FMS; > // Used by Entry Type 02 (ACM) Ver. 0x200 only+ UINT32 FMSMask; // Used > by Entry Type 02 (ACM) Ver. 0x200 only } FIT_TABLE_CONTEXT_ENTRY; > typedef struct {@@ -262,7 +280,7 @@ typedef struct { > UINT32 GlobalVersion; UINT32 = FitHeaderVersion; > FIT_TABLE_CONTEXT_ENTRY StartupAcm[MAX_STARTUP_ACM_ENTRY];- > UINT32 StartupAcmVersion;+ UINT32 > StartupAcmVersion[MAX_STARTUP_ACM_ENTRY]; > FIT_TABLE_CONTEXT_ENTRY DiagnstAcm; UINT32 > DiagnstAcmVersion; FIT_TABLE_CONTEXT_ENTRY > BiosModule[MAX_BIOS_MODULE_ENTRY];@@ -341,7 +359,7 @@ Returns: > "\t[-L ]\n" "\= t[-LF > ]\n" "\t[-I ]\n"- "\t= [-S > |] [-V > ]\n"+ "\t[-S StartupAcmSize>|] [-I StartupAcmFMSMask>] [-V ]\n" "\t[-U > |]\n" "\t[-B > ] [-B ...] [-V ]\n" > "\t[-M ] [-M ...]|[-U MicrocodeBase>| MicrocodeRegionSize>|] [-V ]\n"@@ - > 356,8 +374,11 @@ Returns: > printf ("\tFitTablePointerOffset - FIT table pointer offset. 0x%x as = default. > 0x18 for current soon to be obsoleted CPUs. User can set both.\n", > DEFAULT_FIT_TABLE_POINTER_OFFSET); printf ("\tBiosInfoGuid - = Guid > of BiosInfo Module. If this module exists, StartupAcm/Bios/Microcode can = be > optional.\n"); printf ("\tStartupAcmAddress - Address of > StartupAcm.\n");- printf ("\tStartupAcmSize - Size of StartupAcm= .\n");+ > printf ("\tStartupAcmSize - The maximum size value that could pla= ce the > StartupAcm in.\n"); printf ("\tStartupAcmGuid - Guid of Startup= Acm > Module, if StartupAcm is in a BiosModule, it will be excluded form that.\= n");+ > printf ("\tStartupAcmFMS - Value of PROCESSOR ID > (Family/Model/Stepping value called \"FMS\") - see detail on FIT spec > (1.3).\n");+ printf ("\tStartupAcmFMSMask - Value use for uCode (if= it > recognizes 0x200 Type2 entry) to do bitmask logic operation with CPU > processor ID.\n");+ printf ("\t If the result ma= tch to > StartupAcmFMS, corresponding ACM will be loaded - see detail on FIT spec > (1.3).\n"); printf ("\tDiagnstAcmAddress - Address of DiagnstAcm.\= n"); > printf ("\tDiagnstAcmGuid - Guid of DiagnstAcm Module, if Diagnst= Acm > is in a BiosModule, it will be excluded from that.\n"); printf > ("\tBiosModuleAddress - Address of BiosModule. User should ensure > there is no overlap.\n");@@ -1155,6 +1176,9 @@ Returns: > Error (NULL, 0, 0, "-I Parameter incorrect, too many Startup= Acm!", > NULL); return 0; }+ //+ // NOTE: = BIOS INFO structure > only support the default FIT entry format.+ // > 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;@@ -1392,7 +1416,37 @@ > Returns: > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Size = =3D > FileSize; //- // 1.1 StartupAcm version+ // 1.1 Support 0x200 > StartupAcm Information+ // With the -I parameter should assign the= type > 2 entry with 0x200 version format+ //+ if ((Index + 1 >=3D argc) ||= + > ((strcmp (argv[Index], "-I") !=3D 0) &&+ (strcmp (argv[Index], "-= i") !=3D 0)) ) {+ > //+ // Bypass+ //+ > gFitTableContext.StartupAcmVersion[gFitTableContext.StartupAcmNumber] > =3D gFitTableContext.GlobalVersion;+ } else {+ if (Index + 2 >=3D= argc) {+ > //+ // Should get two input value, but not sufficient+ //+ = Error > (NULL, 0, 0, "-I Parameter incorrect, Require two inputs value!", NULL);+ > return 0;+ } else {+ //+ // With the -I parameter shou= ld assign the > type 2 entry version as 0x200 format+ //+ > gFitTableContext.StartupAcmVersion[gFitTableContext.StartupAcmNumber] > =3D STARTUP_ACM_FIT_ENTRY_200_VERSION;+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].FMS =3D > (UINT32)xtoi (argv[Index + 1]);+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].FMSMas > k =3D (UINT32)xtoi (argv[Index + 2]);++ Index +=3D 3;+ }+ = }++ //+ // 1.2 > StartupAcm version // if ((Index + 1 >=3D argc) || ((strc= mp (argv[Index], > "-V") !=3D 0) &&@@ -1400,18 +1454,17 @@ Returns: > // // Bypass //- gFitTableContext.StartupAcmVersi= on =3D > gFitTableContext.GlobalVersion; } else { // // Get offset= from > parameter //- gFitTableContext.StartupAcmVersion =3D xtoi (arg= v[Index + > 1]);+ > gFitTableContext.StartupAcmVersion[gFitTableContext.StartupAcmNumber] > =3D xtoi (argv[Index + 1]); Index +=3D 2; } > gFitTableContext.StartupAcmNumber ++; gFitTableContext.FitEntryNumber > ++;- }+ }; // // 1.5. DiagnosticsAcm@@ -2185,7 +2238,7 @@ Returns: > printf ("Total FIT Entry number: 0x%x\n", > gFitTableContext.FitEntryNumber); printf ("FitHeader version: 0x%04x\n"= , > gFitTableContext.FitHeaderVersion); 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);+ printf ("StartupAcm[%d] - (0x%08= x, > 0x%08x, 0x%04x)\n", Index, gFitTableContext.StartupAcm[Index].Address, > gFitTableContext.StartupAcm[Index].Size, > gFitTableContext.StartupAcmVersion[Index]); } if > (gFitTableContext.DiagnstAcm.Address !=3D 0) { printf ("DiagnosticAcm= - > (0x%08x, 0x%08x, 0x%04x)\n", gFitTableContext.DiagnstAcm.Address, > gFitTableContext.DiagnstAcm.Size, > gFitTableContext.DiagnstAcmVersion);@@ -2774,6 +2827,8 @@ Returns: > UINTN SubIndex; FIT_TABLE_CONTEXT_ENTRY > TempContextEntry; FIRMWARE_INTERFACE_TABLE_ENTRY > TempTableEntry;+ PROCESSOR_ID FMS;+ PROCESSOR_ID > FMSMask; // // 1. FitPointer@@ -2825,16 +2880,30 @@ Returns: > // 4. StartupAcm // for (Index =3D 0; Index < > gFitTableContext.StartupAcmNumber; Index++) {- FitEntrySizeValue = =3D > 0; // gFitTableContext.StartupAcm.Size / 16- FitEntry[FitIndex].Addres= s =3D > gFitTableContext.StartupAcm[Index].Address;- FitEntry[FitIndex].Size[0= ] =3D > (UINT8)FitEntrySizeValue;- FitEntry[FitIndex].Size[1] =3D > (UINT8)(FitEntrySizeValue >> 8);- FitEntry[FitIndex].Size[2] =3D > (UINT8)(FitEntrySizeValue >> 16);- FitEntry[FitIndex].Rsvd =3D 0;- > FitEntry[FitIndex].Version =3D (UINT16)gFitTableContext.StartupAcmVersio= n;- > FitEntry[FitIndex].Type =3D FIT_TABLE_TYPE_STARTUP_ACM;- > FitEntry[FitIndex].C_V =3D 0;- FitEntry[FitIndex].Checksum =3D 0;= + if > (gFitTableContext.StartupAcmVersion[Index] =3D=3D > STARTUP_ACM_FIT_ENTRY_200_VERSION) {+ FMS.Uint32 =3D > gFitTableContext.StartupAcm[Index].FMS;+ FMSMask.Uint32 =3D > gFitTableContext.StartupAcm[Index].FMSMask;+ > FitEntry[FitIndex].Address =3D gFitTableContext.StartupAcm[Index].Addres= s;+ > FitEntry[FitIndex].Size[0] =3D NIBBLES_TO_BYTE (FMS.Bits.Family, > FMS.Bits.Model);+ FitEntry[FitIndex].Size[1] =3D NIBBLES_TO_BYTE > (FMS.Bits.ExtendedModel, FMS.Bits.Type);+ FitEntry[FitIndex].Size[2]= =3D > NIBBLES_TO_BYTE (FMSMask.Bits.Family, FMSMask.Bits.Model);+ > FitEntry[FitIndex].Rsvd =3D NIBBLES_TO_BYTE (FMSMask.Bits.ExtendedMod= el, > FMSMask.Bits.Type);+ FitEntry[FitIndex].Version =3D > (UINT16)gFitTableContext.StartupAcmVersion[Index];+ > FitEntry[FitIndex].Type =3D FIT_TABLE_TYPE_STARTUP_ACM;+ > FitEntry[FitIndex].C_V =3D 0;+ FitEntry[FitIndex].Checksum =3D > NIBBLES_TO_BYTE (FMSMask.Bits.ExtendedFamily, > FMS.Bits.ExtendedFamily);+ } else {+ FitEntrySizeValue = =3D 0; // > gFitTableContext.StartupAcm.Size / 16+ FitEntry[FitIndex].Address = =3D > gFitTableContext.StartupAcm[Index].Address;+ FitEntry[FitIndex].Size= [0] =3D > (UINT8)FitEntrySizeValue;+ FitEntry[FitIndex].Size[1] =3D > (UINT8)(FitEntrySizeValue >> 8);+ FitEntry[FitIndex].Size[2] =3D > (UINT8)(FitEntrySizeValue >> 16);+ FitEntry[FitIndex].Rsvd =3D 0= ;+ > FitEntry[FitIndex].Version =3D > (UINT16)gFitTableContext.StartupAcmVersion[Index];+ > FitEntry[FitIndex].Type =3D FIT_TABLE_TYPE_STARTUP_ACM;+ > FitEntry[FitIndex].C_V =3D 0;+ FitEntry[FitIndex].Checksum =3D = 0;+ } > FitIndex++; } @@ -3135,6 +3204,69 @@ Returns: > return FvRecoveryFileSize; } +void+GetFMSFromFitEntry (+ IN > FIRMWARE_INTERFACE_TABLE_ENTRY FitEntry,+ IN OUT PROCESSOR_ID > *FMS,+ IN OUT PROCESSOR_ID *FMSMask+ )+/*++++Routi= ne > Description:++ Get FMS information from FIT Entry.++ Note: Since FIT en= try > not record all the processor ID information.+ The value would not = the > same as the real value.++ +----------+-----------------------+----------= -------------+---- > -------------------+-----------------------++ | Byte | 15 = | 14 | > 13:12 | 11 |+ +----------+-------------------= ----+----------------------- > +-----------------------+-----------------------++ |Bit Fields| [7:4] = | [3:0] | [7:7] > | [6:0] | [7:4] | [3:0] | [7:4] | [3:0] |+ +--------= --+----------------------- > +-----------------------+-----------------------+-----------------------+= + | Ver. 100 | > Checksum | C_V | Type | Version | = Reserved |+ +--- > -------+-----------------------+-----------------------+-----------------= ------+------------------ > -----++ | Ver. 200 | FMSMask | FMS | C_V | Type | = Version > | FMSMask | FMSMask |+ | | ExtFamily | ExtFamily | = | | > | ExtModel | Type |+ +----------+-----------------------+---------= --------------+----- > ------------------+-----------------------+++ +----------+--------------= ---------+-------------- > ---------+-----------------------+-----------------------++ | Byte |= 10 | > 9 | 8 | 7:0 |+ +--------= --+-----------------------+---------- > -------------+-----------------------+-----------------------++ |Bit Fie= lds| [7:4] | [3:0] > | [7:4] | [3:0] | [7:4] | [3:0] | [7:4] | [3:0] |= + +----------+------------ > -----------+-----------------------+-----------------------+-------------= ----------++ | Ver. > 100 | Size[2] | Size[1] | Size[0] = | Address |+ +- > ---------+-----------------------+-----------------------+---------------= --------+---------------- > -------++ | Ver. 200 | FMSMask | FMSMask | FMS | FMS | = FMS | > FMS | Address |+ | | Family | Model | = ExtModel | Type > | Family | Model | |+ +----------+---------= --------------+------------- > ----------+-----------------------+-----------------------++++Arguments:+= + FitEntry - > FIT entry information.+ FMS - Processor ID information.+ FMSMask = - > Processor ID mask information.++Returns:+ None++--*/+{++ FMS- > >Bits.Family =3D (FitEntry.Size[0] & 0xF0) >> 4;+ FMS->Bits.Mod= el =3D > (FitEntry.Size[0] & 0x0F);+ FMS->Bits.ExtendedModel =3D (FitEntry.Size= [1] & > 0xF0) >> 4;+ FMS->Bits.Type =3D (FitEntry.Size[1] & 0x0F);+ = FMS- > >Bits.ExtendedFamily =3D (FitEntry.Checksum & 0x0F);++ FMSMask- > >Bits.Family =3D (FitEntry.Size[2] & 0xF0) >> 4;+ FMSMask->Bits= .Model > =3D (FitEntry.Size[2] & 0x0F);+ FMSMask->Bits.ExtendedModel =3D > (FitEntry.Rsvd & 0xF0) >> 4;+ FMSMask->Bits.Type =3D (FitE= ntry.Rsvd > & 0x0F);+ FMSMask->Bits.ExtendedFamily =3D (FitEntry.Checksum & 0xF0) >> > 4;+}+ UINT32 GetFitEntryInfo ( IN UINT8 *FvBuffer,@@ -3161,6 +3293,= 11 > @@ Returns: > UINT32 FitEntrySizeValue; UINT32 = FitIndex; > UINT32 FitTableOffset;+ PROCESSOR_ID = FMS;+ > PROCESSOR_ID FMSMask;++ FMS.Uint32 =3D 0;+ FMSMa= sk.Uint32 > =3D 0; // // 1. FitPointer@@ -3202,7 +3339,15 @@ Returns: > break; case FIT_TABLE_TYPE_STARTUP_ACM: > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Address > =3D (UINT32)FitEntry[FitIndex].Address;- > gFitTableContext.StartupAcmVersion = =3D > FitEntry[FitIndex].Version;+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Size = =3D > FitEntrySizeValue;+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].Type = =3D > FitEntry[FitIndex].Type;+ > gFitTableContext.StartupAcmVersion[gFitTableContext.StartupAcmNumber] > =3D FitEntry[FitIndex].Version;+ if > (gFitTableContext.StartupAcmVersion[gFitTableContext.StartupAcmNumber] > =3D=3D STARTUP_ACM_FIT_ENTRY_200_VERSION) {+ GetFMSFromFitEntry > (FitEntry[FitIndex], &FMS, &FMSMask);+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].FMS = =3D > FMS.Uint32;+ > gFitTableContext.StartupAcm[gFitTableContext.StartupAcmNumber].FMSMas > k =3D FMSMask.Uint32;+ }+ gFitTableContext.StartupAcmNumber++; > break; case FIT_TABLE_TYPE_BIOS_MODULE: > gFitTableContext.BiosModule[gFitTableContext.BiosModuleNumber].Address > =3D (UINT32)FitEntry[FitIndex].Address;diff --git > a/Silicon/Intel/Tools/FitGen/FitGen.h b/Silicon/Intel/Tools/FitGen/FitGen= .h > index b7de0a6b2d..80a1423ceb 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-#defin= e > UTILITY_MINOR_VERSION 65+#define UTILITY_MINOR_VERSION 66 #define > UTILITY_DATE __DATE__ //-- > 2.37.0.windows.1