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.web11.35413.1600665783178392252 for ; Sun, 20 Sep 2020 22:23:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=TCk62oAG; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: aaron.li@intel.com) IronPort-SDR: jk9D/k+WYGj2Wjx1YwErlYf3VRO5gRns1YyEqK6mHUUTT98h835OTlEyNnNKUM2kqR+DaK+1YA hRsb5b+7zo3Q== X-IronPort-AV: E=McAfee;i="6000,8403,9750"; a="140323798" X-IronPort-AV: E=Sophos;i="5.77,285,1596524400"; d="scan'208";a="140323798" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2020 22:23:01 -0700 IronPort-SDR: c3hdbHRhNDC8OQZbSLTKFeZvQJcj8SNk9qb2ajBhPzuyPNdHmi71C/jZbR7/LiTCDf0C82Zyma PtlGTQhbYSNQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,285,1596524400"; d="scan'208";a="308858268" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga006.jf.intel.com with ESMTP; 20 Sep 2020 22:23:01 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) 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.1713.5; Sun, 20 Sep 2020 22:23:00 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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 via Frontend Transport; Sun, 20 Sep 2020 22:23:00 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) 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.1713.5; Sun, 20 Sep 2020 22:22:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V7RCr/EGqu9DsaIX0aMd2EQclvhp+xTsd77J3EW0XAUYcUOuFzOGv9gI3yEopJv1+LZFdcsTdeU77YcA2Sg61S0X6/i1FMfDJl98gvsE/hWfaoF8iMHegdEU6Yl+f7yKqBO/6khRYtN9LRRREoGnKUbj4pyp7OfyG17Yfn8B9ET5c5mKQdJopUrjxVF2ITXm12cvGwM6Mgj+2NIuIn3QRoRgLqHcirLXKphppfZvBgnTWB5nmIbAKrNwu/UhQKooTsYOscJeZJOULIeDvISCssfrSg98zpaxxzf573GX7uNNZaiODYkBIxLeN7b2edELevgJsK1E0YxuYzxThTkJeA== 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=qryKTC7F3ojAdJCOdrW6P3LpOi5wZo9zycmjUEs0O84=; b=bIEO48Xjy+jIdawPuw5UH5gb/b/2Ue+boroLT6FiWI7gQmKNA7f2J+fgt53EW9KImKM+oP48vdo5dQxVSUmEg5tkb89v3Zn0gnhbWGmxWlOe6vZbksYw2B0cJMKXl82xQH6dLT0FQc1a9yH26vpTFKKReAxpn9QiuYGRGb2YBilhqfkS03Z9RAT453LdtW1DoWsyxeDybGfTnsF4GCxfrsGiJjYC7TJg0OumcsThXphdV4Voruql5zswt98uJpIfUQ1fitFzwIIE7K51g8WAaoGsXjlgJYyK9PKI+V+FwOWchwJ+J/JB6rCFVoCa6ornomc/iYRXaA1jdfxbIflIXg== 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=qryKTC7F3ojAdJCOdrW6P3LpOi5wZo9zycmjUEs0O84=; b=TCk62oAG1o7wXMYPF2NzoDfIojXXywTqChz82BVg/wOotjzTze0o9YZNW05P34ddxM6ILhHsfN0mS92zYH5dZEuirktD0zOYedyrLRwrl12WihzOGqPKmImv6y+MExIQBZESB3Ov4cEj+KN7omUBTHnAcTM2GoOA0y18ijnkWaA= Received: from BYAPR11MB3623.namprd11.prod.outlook.com (2603:10b6:a03:b5::18) by BY5PR11MB4228.namprd11.prod.outlook.com (2603:10b6:a03:1bd::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14; Mon, 21 Sep 2020 05:22:35 +0000 Received: from BYAPR11MB3623.namprd11.prod.outlook.com ([fe80::958c:2df9:71d3:4acd]) by BYAPR11MB3623.namprd11.prod.outlook.com ([fe80::958c:2df9:71d3:4acd%3]) with mapi id 15.20.3391.011; Mon, 21 Sep 2020 05:22:35 +0000 From: "Aaron Li" To: "Feng, Bob C" , Liming Gao CC: "devel@edk2.groups.io" , "Li, Aaron" , "Fu, Siyuan" Subject: Re: [edk2-devel] [PATCH v1 1/1] Tools/FitGen: Fix microcode alignment support Thread-Topic: [edk2-devel] [PATCH v1 1/1] Tools/FitGen: Fix microcode alignment support Thread-Index: AQHWjLexvJFgXTzKjkSjd2D4f6J5RalyepLg Date: Mon, 21 Sep 2020 05:22:35 +0000 Message-ID: References: <16357CADB63C78D6.18797@groups.io> In-Reply-To: <16357CADB63C78D6.18797@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.198] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9a813eed-cc32-488a-2068-08d85dee5938 x-ms-traffictypediagnostic: BY5PR11MB4228: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pVBiE/eSfRs0WoKa48tZuCYQ8LaPMdAnUm4NMIfVSyqi4Ci9QuhkKY976c2CGEbbmTEWVqllLgyneulpDX7S8ea6CzC1/wVP44FiJMoeAZWUBztRuT3aX/Zhfb3gM8Ho9OIKNM2+XdFMjTqiXX3VcfOJK7NO582hmaoxxIcTALYHdj3gEgAs3rIBx1QmY9qvmmHqpd30mBZzjzxcPHOm4qRSOieTeC7UaEfykJMiE/3vJ90VZm8dazMP8lkXNbke/TVvnJcA86Wo/yi/HnlzGKanlcHddGlMFbEPxcbpCk+L4RyHkHc3U8z1LDRWe+0cYlHnjAzsSYHOZy5mUxgFNm0qWBpxGGKGyf5UJ4R0xGPLmJE60vCAK8DAvMtKMJRS4C2XtNJBoqIwhqid93nfakR7wECVx4tVQ4ndHwPbY+zVRLCIFDqen6Bc7SEWP5pFNLk8wLWElmGMlS2xgyApJA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3623.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(39860400002)(376002)(136003)(396003)(366004)(76116006)(52536014)(53546011)(33656002)(8936002)(8676002)(5660300002)(6506007)(66946007)(86362001)(64756008)(66556008)(66476007)(4326008)(66446008)(26005)(316002)(966005)(2906002)(55016002)(54906003)(71200400001)(110136005)(478600001)(9686003)(7696005)(186003)(83380400001)(107886003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: QBYRIQJCGN/J84G+R9DoXbzeaFizc/VazXTMIS1m1C3rJt/+PcSM9CZbsYrcYGk6ix2cINTU/uFRArXFpoVYkUsKPxuW+67lIm3qy4vAlzOeNjeI2QoFl6sT15Kwwp0vlbjQx0HcERZ9LCume73nD/gjXBv5WQAUcKF3Mn1riSMs2W+5ksZpIuYQp3KPlQhvvIaUVzGYN1HimFCk4XghvrXocaK3q0Hzls/lrVRT3UoOjKszqMQ2VARi1ucfzPcVsOAiNAJsvx+Vwhbl5/ZYyQwbvcTBPx2fI8F3Qudb3ZujdKNRwtDaux2aUyXFWWn9Rwdx4x0kRECd+VXyfEXKNK1HhdsldFpvlqdwss7iIxahHffa3QQ8I6HsvW4JtTLv996oT46hJWa39tmHvfBT8opWHDEJLghxLycpM8IXgVxfZ5uzisywhGZyOPzcabVKRQsHr+SyouV7k5jLL5jD+7KlUwpGy7L0AxyHaxIjxGPD86JYc6dS0QEPltbtBjFcmFfJ1XrHS7k2b7aP1iMAd62JCGasG2CHl/bwI8q7pCSs1Rs4Dmfoz8tOWC4KZs2NzA6bl1WV4rMa3bH2k2nIM6CVbo4TZsOL7QQCMhI79J2T9k1POc/Y3p0kOsldUkTUgESqxWnoXl3IebITOQszmg== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3623.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a813eed-cc32-488a-2068-08d85dee5938 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2020 05:22:35.1926 (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: 42x1liz/jI3U1ikinEl9J4fAmVrinhX40h6tkJdysOcrZjq6sY1w312BfBq/46xX/FALxWB9iH2YryawMi9yVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4228 Return-Path: aaron.li@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Bob & Liming, Could you help review this patch? Thanks. Best, Aaron > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Aaron Li > Sent: Thursday, September 17, 2020 1:58 PM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Liming Gao > > Subject: [edk2-devel] [PATCH v1 1/1] Tools/FitGen: Fix microcode alignmen= t > support >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2971 >=20 > This patch is to fix a issue that "-A" option would only support > 2^n Byte alignment of microcode. >=20 > Signed-off-by: Aaron Li > Cc: Bob Feng > Cc: Liming Gao > --- > Silicon/Intel/Tools/FitGen/FitGen.c | 2 +- > Silicon/Intel/Tools/FitGen/FitGen.h | 4 +++- > 2 files changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/Silicon/Intel/Tools/FitGen/FitGen.c > b/Silicon/Intel/Tools/FitGen/FitGen.c > index c4006e69c822..4caaf70ee018 100644 > --- a/Silicon/Intel/Tools/FitGen/FitGen.c > +++ b/Silicon/Intel/Tools/FitGen/FitGen.c > @@ -1176,7 +1176,7 @@ Returns: > // MCU might be put at 2KB alignment, if so, we need to = adjust the > size as 2KB alignment. >=20 > // >=20 > if (gFitTableContext.MicrocodeIsAligned) { >=20 > - MicrocodeSize =3D (*(UINT32 *)(MicrocodeBuffer + 32) + > (gFitTableContext.MicrocodeAlignValue - 1)) & > ~(gFitTableContext.MicrocodeAlignValue - 1); >=20 > + MicrocodeSize =3D ROUNDUP (*(UINT32 *)(MicrocodeBuffer= + 32), > gFitTableContext.MicrocodeAlignValue); >=20 > } else { >=20 > MicrocodeSize =3D (*(UINT32 *)(MicrocodeBuffer + 32)); >=20 > } >=20 > diff --git a/Silicon/Intel/Tools/FitGen/FitGen.h > b/Silicon/Intel/Tools/FitGen/FitGen.h > index abad2d8799c8..435fc26209da 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 >=20 > // >=20 > #define UTILITY_MAJOR_VERSION 0 >=20 > -#define UTILITY_MINOR_VERSION 62 >=20 > +#define UTILITY_MINOR_VERSION 63 >=20 > #define UTILITY_DATE __DATE__ >=20 >=20 >=20 > // >=20 > @@ -45,4 +45,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > (ActualSize) + (((Alignment) - ((ActualSize) & ((Alignment) - 1))) & > ((Alignment) - 1)) >=20 > ; >=20 >=20 >=20 > +#define ROUNDUP(Size, Alignment) (((Size) + (Alignment) - 1) / (Alignmen= t) > * (Alignment)) >=20 > + >=20 > #endif >=20 > -- > 2.23.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 (#65353): https://edk2.groups.io/g/devel/message/65353 > Mute This Topic: https://groups.io/mt/76904091/4128994 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [aaron.li@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20