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.web12.11723.1594692933205267095 for ; Mon, 13 Jul 2020 19:15:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=eOcLUZH4; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: eric.dong@intel.com) IronPort-SDR: Fgn1o8yq0JcjcAdFy+ELMwxMEzgBUUBVeyC7/HhIGPLl2zKDp6LriTzlAyAMq2d85ay9VgfYFY BeoyNNifJ9Vw== X-IronPort-AV: E=McAfee;i="6000,8403,9681"; a="147911655" X-IronPort-AV: E=Sophos;i="5.75,349,1589266800"; d="scan'208";a="147911655" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2020 19:15:32 -0700 IronPort-SDR: R+lhPbmsK4y+it9vEPOPDaboXnP0H1tkCW0hiwiRoE7Jw0cU6+NvDurggyNhTqOHWeKngfGLaR TReYz8Nh0QLA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,349,1589266800"; d="scan'208";a="390349670" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga001.fm.intel.com with ESMTP; 13 Jul 2020 19:15:32 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) 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; Mon, 13 Jul 2020 19:15:32 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 13 Jul 2020 19:15:32 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 13 Jul 2020 19:15:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lKWRlARGsZuejUhgDtuJv57pq5Ck62nqLXR1bv1pYHmFahC6H6K00/au/OpGd3ZLaPkGV1O/UuVlXUIuWIs1IFg8SHt6dUfObin6RUMpXD94erh5uLIflVV73py4jdL1hqVbSYW5ZGzmPIozQ+cTlcUHeXwcxE7Hnr+u8C7ZdYqIn+h4ROopLmYETFVgqTXhPAY/8WAkow4B4XpM5g5WAw8joMmyAxIeevqZWir6/Zr8J3pth8ML/Mq/8voeGLT66QBMzfG/JNwStlJE+EtscmYDH9eFf9ymCcukqW6XVUxC8gkKnGL2dxmgUI58uPhgSdBdzkaRf66H23qFvYys1A== 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=AKXwJj7DK53Q3Z2/QvcwE/9QdpnnII292jN4fJ9TGcA=; b=RTsEEG85RWY8uadRvjR6Ezrxi9TA2kVy7Qxo5GcIkuKAxhOCaUyeUBvpPKWc1xOeFZp2jPp1bsB7CVM+8d89lbBDMn/QyDj8M3x60oEMJC+ysnh+Vi9hBuF40qPmE/iOtlIaTHKhTtw8Peipmf9ftlkPmVjVHD3DkjwKnhwvgkrLnI5nygDrzOdGXP0GaNa0yz/T90hCo96sGqDLl/6meVR99qKdEFhDTa2/WN5zaQsegotVFMVLrn4wBAZq2MxUkg5LFgXD6HPS96DC4gwj85emCC6rkywEOmmglNQ8gp3sJveMNTfeoINsQwfwNGJxoRVgfIkH+7H9Wja4AuI6Ug== 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=AKXwJj7DK53Q3Z2/QvcwE/9QdpnnII292jN4fJ9TGcA=; b=eOcLUZH48WwIYymXycBNg1VW5XiIRIy2myuv+/3GPJgWyuAJGnlIenv4X6E+xs72LFEWxU/4255cgqQwgF129llp1o87d/58DJDhvRrgSGZMetaDTjBYB5jM3epjA7rtzlrJIVkWyl//n+dU0Btmb+oSQq6vhBx8BkQDY8PgaAo= Received: from DM6PR11MB3274.namprd11.prod.outlook.com (2603:10b6:5:b::26) by DM6PR11MB4011.namprd11.prod.outlook.com (2603:10b6:5:19d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.22; Tue, 14 Jul 2020 02:15:30 +0000 Received: from DM6PR11MB3274.namprd11.prod.outlook.com ([fe80::cc01:6f05:1402:e7d7]) by DM6PR11MB3274.namprd11.prod.outlook.com ([fe80::cc01:6f05:1402:e7d7%6]) with mapi id 15.20.3174.025; Tue, 14 Jul 2020 02:15:30 +0000 From: "Dong, Eric" To: "devel@edk2.groups.io" , "Ni, Ray" CC: Laszlo Ersek , "Kumar, Rahul1" Subject: Re: [edk2-devel] [PATCH v2 2/3] UefiCpuPkg/MtrrLib: Remove unnecessary API MtrrSetVariableMtrr() Thread-Topic: [edk2-devel] [PATCH v2 2/3] UefiCpuPkg/MtrrLib: Remove unnecessary API MtrrSetVariableMtrr() Thread-Index: AQHWWO2OwJNL1unuqECacqbfnbutd6kGV2eQ Date: Tue, 14 Jul 2020 02:15:29 +0000 Message-ID: References: <20200713081236.1284-1-ray.ni@intel.com> <20200713081236.1284-3-ray.ni@intel.com> In-Reply-To: <20200713081236.1284-3-ray.ni@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.102.204.38] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b46cfb7a-d570-40af-af58-08d8279bc7f8 x-ms-traffictypediagnostic: DM6PR11MB4011: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4303; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: libxZd0z6VTGi0QQrxlGin/SiICmPHgAMchHbTnprD0Ralqy+ca7SAsB2Q3zx9JDiAMD3DEODzPdIV4xrl0WDo+N9Ey1mNnP68ART23UJdD+5xB1lKsNE+y9YqES1LS11PueqFq0F02brzcHE0lCblKveIiJ5qfHLHR0wcA2CbmZnzLfBDksC1vDqd9ILoPQftG3ww13/0W7xud88FVFotSjIKxHEXJ4UYVPSDQC2eqHWDSI8ht2+Vg4Rh04Enkof0jOxgNXbVtjywzqV6MojkLBr4fgV8z0lnVwXI749dPkmdYnOYxPFr9/Zum9Ou3w4h8cWVA6Z402FWvgoQyMydfRG8aP0Nc9lR098WE0U6tgHTKRY2kyE/hV8PsDeWKTOrE9zoDP6xhaIsPmHxVTnw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB3274.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(39860400002)(396003)(366004)(376002)(346002)(2906002)(86362001)(478600001)(4326008)(7696005)(8936002)(186003)(8676002)(316002)(110136005)(5660300002)(54906003)(966005)(26005)(83380400001)(6506007)(71200400001)(53546011)(9686003)(55016002)(33656002)(6636002)(76116006)(66476007)(66946007)(107886003)(66556008)(52536014)(66446008)(64756008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: E0JjWWitBym+16lZmOdG4JpwwkgIFtsAwMqtPfnpTAZfX9tH8t8OWQEqCHisOECsV8jW7tmGwzfIhJ1tT7qz8mGv55OrkI13prcW/rqiuH+ZDAPVMblmlBjzQkl0rMdmKrP5qGNbJu4lOt5odY//fFx0/8lik9X54nHA0zwExtKHlNl4vkWq4BnLYhB1zZu8Ws4Rbc+GSe/JAbPgGv0QV6tAyR38AjtsvA7QRTgUp7wLTi2UYsTBIJ4z9HUMr4QEYUTPSeOO8TqcA8BR3ToJk/H5lgsGfiwiyjEbLfjX1vbLC6j3YiK7Fn7AuKPxlZda/On7Iyh/SJp0waPwct20yxR+40Dozkp1g1jUiD4WrgyyATgxctmdozfEJhPdFvXdeUi0lHZl8zk4alvBF6xsxtIGbYoDT7ZrgCpnkzzQ9D1tUAyIEMMPUjUcF9BZYOYfT0Q5gwwXbeSm0dhpHmIBycFbO2mribG4YoviAYFxDU6x6Bd48E7KFOdnKDtZOBMS MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3274.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b46cfb7a-d570-40af-af58-08d8279bc7f8 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jul 2020 02:15:30.0043 (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: 4rmEAABKEQqt8+j2l/h04GsJ/72otXh1TwOyBvTWz0MZLVXxb0TwcL6tImYX6HrPgQ41cJqQ6qwQAjcf392PeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4011 Return-Path: eric.dong@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Monday, July 13, 2020 4:13 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Laszlo Ersek ; > Kumar, Rahul1 > Subject: [edk2-devel] [PATCH v2 2/3] UefiCpuPkg/MtrrLib: Remove > unnecessary API MtrrSetVariableMtrr() >=20 > MtrrSetVariableMtrr() sets all the variable MTRR settings. > But in fact MtrrSetAllMtrrs() is always used by callers to set all > MTRR settings including the fixed and variable ones. >=20 > The patch removes the necessary API MtrrSetVariableMtrr() to simplify > the MtrrLib API. >=20 > There is no code in edk2 and edk2-platforms repo that calls > MtrrGetVariableMtrr(). >=20 > Signed-off-by: Ray Ni > Cc: Eric Dong > Cc: Laszlo Ersek > Cc: Rahul Kumar > --- > UefiCpuPkg/Include/Library/MtrrLib.h | 15 -------------- > UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 29 ---------------------------- > 2 files changed, 44 deletions(-) >=20 > diff --git a/UefiCpuPkg/Include/Library/MtrrLib.h > b/UefiCpuPkg/Include/Library/MtrrLib.h > index cfe3c0ab59..0bc69e235c 100644 > --- a/UefiCpuPkg/Include/Library/MtrrLib.h > +++ b/UefiCpuPkg/Include/Library/MtrrLib.h > @@ -185,21 +185,6 @@ MtrrGetMemoryAttribute ( > ); >=20 >=20 >=20 >=20 >=20 > -/** >=20 > - This function sets variable MTRRs >=20 > - >=20 > - @param[in] VariableSettings A buffer to hold variable MTRRs content= . >=20 > - >=20 > - @return The pointer of VariableSettings >=20 > - >=20 > -**/ >=20 > -MTRR_VARIABLE_SETTINGS* >=20 > -EFIAPI >=20 > -MtrrSetVariableMtrr ( >=20 > - IN MTRR_VARIABLE_SETTINGS *VariableSettings >=20 > - ); >=20 > - >=20 > - >=20 > /** >=20 > This function gets the content in fixed MTRRs >=20 >=20 >=20 > diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c > b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c > index f4a10edc87..8b54f2c03b 100644 > --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c > +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c > @@ -2558,35 +2558,6 @@ MtrrSetVariableMtrrWorker ( > } >=20 > } >=20 >=20 >=20 > - >=20 > -/** >=20 > - This function sets variable MTRRs >=20 > - >=20 > - @param[in] VariableSettings A buffer to hold variable MTRRs content= . >=20 > - >=20 > - @return The pointer of VariableSettings >=20 > - >=20 > -**/ >=20 > -MTRR_VARIABLE_SETTINGS* >=20 > -EFIAPI >=20 > -MtrrSetVariableMtrr ( >=20 > - IN MTRR_VARIABLE_SETTINGS *VariableSettings >=20 > - ) >=20 > -{ >=20 > - MTRR_CONTEXT MtrrContext; >=20 > - >=20 > - if (!IsMtrrSupported ()) { >=20 > - return VariableSettings; >=20 > - } >=20 > - >=20 > - MtrrLibPreMtrrChange (&MtrrContext); >=20 > - MtrrSetVariableMtrrWorker (VariableSettings); >=20 > - MtrrLibPostMtrrChange (&MtrrContext); >=20 > - MtrrDebugPrintAllMtrrs (); >=20 > - >=20 > - return VariableSettings; >=20 > -} >=20 > - >=20 > /** >=20 > Worker function setting fixed MTRRs >=20 >=20 >=20 > -- > 2.27.0.windows.1 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. >=20 > View/Reply Online (#62405): https://edk2.groups.io/g/devel/message/62405 > Mute This Topic: https://groups.io/mt/75472803/1768733 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [eric.dong@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D