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.11744.1594692943558252616 for ; Mon, 13 Jul 2020 19:15:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=ZlmrqxMx; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: eric.dong@intel.com) IronPort-SDR: iKAV4E6M1drmmjCmJJMzhyNM6YZCkZ8eNeF8GkC+LrIy0+cH+cgl3Lbed8q92z+V6aV2LNVTKl rycq8g1/ocCg== X-IronPort-AV: E=McAfee;i="6000,8403,9681"; a="233633816" X-IronPort-AV: E=Sophos;i="5.75,349,1589266800"; d="scan'208";a="233633816" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2020 19:15:43 -0700 IronPort-SDR: ebxYMIulSBkqvfiO3Ry2LT0updw6utF/VDkdFJGcjYgSltr9OCUbz5OUTHXhdZWuDMWDf46oS+ mXqx60ARqCZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,349,1589266800"; d="scan'208";a="390349691" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga001.fm.intel.com with ESMTP; 13 Jul 2020 19:15:43 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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:42 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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:42 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 13 Jul 2020 19:15:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X1D/x6PSCS/ioHvnQSis0UywjrXIVwMlQfQGkCq1n3ymN4jfUwbd1RKmkES+MYhkQFBkbkRPflRsJfQRP9rsvMSSB9krIyhfRH9bI7H3rnm1Fe/w4npDb90AlRXGy0yioQk35CKAhc8pc1BMkus6ifJqxcBfAOiPNEUAioeNAyB8Iu1RpG8ln1yB2La5rNLQkTV2lGMzJ0UE35Sowzz9Nw84gWHuPak/2v2Eeh8YaBcDA/UkiSksrjfKuVKnD3wdrkH8QngT5+T9ETAOmWO9ibsTOx8NwAsPpf3LNMyC/XSpl4CXKVd07i1LxBwxOZnm5/EDZSYBFcvWDcdYGgT/AQ== 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=pFAfnPHtKG11wKFc1sQjsj2I7KGZtPkpX4bfYI3/RBA=; b=RwwKHF0t4xyxR33bEPL4oG7v+C/XraUk785kmCezMhgbkuZRx8ujyu0qepnkmKMgrzsQXRaP8cy3uCjSE1HUmUjk3t+TJJqQx7n74385RGFPaV3QncfRr3iL6M90gYTyGyjA8iTfCzbu9rB4HSxOEhr/L1aj5EAxK6NOy3k2g4GPGxvZr5x4DLdMlJB79aAClqhxKjHS9vlzjQPxDsEap4NE+hcFWzHbCwlVWrEaHHiyeBRjqu+yw59ka0kzRZT9V3A+ZyK94lkVUDA2xLEtmyzJogHdUNw4LXEdkJfxti2OnOT+Lem7J4v/W0SHAfistzsM4UFaq2TxDs9YxbuegQ== 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=pFAfnPHtKG11wKFc1sQjsj2I7KGZtPkpX4bfYI3/RBA=; b=ZlmrqxMxgBApUGOHAY1P7GVK70ziJmepvwxdR3ijY5B7WE6222ENwwR4l4hIUANihmk5ukob+lzufE8RbZqd6k/5pDMqB9tmdaWJeqnN+f1Zl2QACKlyie//QsWE3EWfVmdPSTlts4ZfD3fvnz3kwQLlZryrCknjbmnp2gmgcpQ= 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:39 +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:39 +0000 From: "Dong, Eric" To: "devel@edk2.groups.io" , "Ni, Ray" CC: Laszlo Ersek , "Kumar, Rahul1" Subject: Re: [edk2-devel] [PATCH v2 1/3] UefiCpuPkg/MtrrLib: Remove unnecessary API MtrrGetVariableMtrr() Thread-Topic: [edk2-devel] [PATCH v2 1/3] UefiCpuPkg/MtrrLib: Remove unnecessary API MtrrGetVariableMtrr() Thread-Index: AQHWWO2MsOJEgW2oz0yN9H3SucNbs6kGV3Eg Date: Tue, 14 Jul 2020 02:15:39 +0000 Message-ID: References: <20200713081236.1284-1-ray.ni@intel.com> <20200713081236.1284-2-ray.ni@intel.com> In-Reply-To: <20200713081236.1284-2-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: 19263da4-7d73-42e5-f9b1-08d8279bcdcf 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:6790; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FsOkzg1z+Z8SffikFois+w756Hl+GOpKrZT/tRjR+NrMkIu9ZKnPI88v2soPTkSTgSay+s13NMoq++FzNrCxFETjvDUUhyLWCz5pdmAiyVi8ChPFUMEsjrU7vT7DZ6K3TQdZx/ZDq04Jqi81I/ptsd8aGrrY2y0Rd7E1x6v/jh98Acq+XQYgfjNPyxCGNgXaSJzd5avvZP/eUD6yyQ6afRHcjThkr7nhaBicwt3Oe33Y9GdLx1daI7p47eK4Whnac4q3qvSwt1+MDc/1FZnVLRtYE2fNwL8O8QNjEVyxB5vz+ujT6k2YB34VYPK4iqnZVnVHNrJCYSpDmGPbP6LicdFu5QxR2VpdIQtRMc7tVihYnuhSaSedmKCyO4/BHbmwuyOeSHWZQBpFn/sqMFXfKQ== 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: hYOlOnhMceKF/Dof3qz6Kyr7vnp6SomON6dmOKxMdDPLra83poH0tTkIA66plUNccLYicwoRjSRDflZkb28Qf71M370T6ErRbhgDJedIBubVdLE3dEhEVspWxbtfmiBasbik6f00mBMlFTkJ/Hc301PJ47ANFLlvjTRKWcl75eaIedO+Q/okMcm40aIoC31+3xLmAbr8Lb6mbgEOCA3YUZOXYb0VJi2atB8my8vsaG3BALg9AD5P5zpyhFQboNWiqmToBmwtHGxpy67ZCbCiBW1JuAJQNqB9jWeOsCCFypXz/N5Pyk+sxeWUZX2OPserh9jFSPEfzKaroUIl9jX0ijVyx3HqLB5eBYx9cBqPPS9vi64ZmB6FkU5l1u4tE/x9bDJZ0qqDsr8/yIf1rEy6sBvEfq8U5b/mcI/2b5wGTF+TYQbEWm3kQmHBR+JaNNWNh0ugqEO9zu1HvVkGJe8S2odoNQBEXeLD6m5gu7dW50vYdJLfnNI+a0poYy5+dClE 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: 19263da4-7d73-42e5-f9b1-08d8279bcdcf X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jul 2020 02:15:39.7979 (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: dZOz0KXWAcFy1UxuCIJfNTosKiRvWcUFu2TBgFJVYcc6KRT3pD5J09P+DX3bwJnpg+8gCkYUy135e8yUZFkldg== 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 1/3] UefiCpuPkg/MtrrLib: Remove > unnecessary API MtrrGetVariableMtrr() >=20 > MtrrGetVariableMtrr() returns all the variable MTRR settings. > But in fact MtrrGetAllMtrrs() and > MtrrGetMemoryAttributeInVariableMtrr() are used by callers to get the > MTRR settings. The former one returns both the fixed and variable > MTRR settings. >=20 > The patch removes the necessary API MtrrGetVariableMtrr() 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 | 17 +---------------- > UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 27 +-------------------------- > 2 files changed, 2 insertions(+), 42 deletions(-) >=20 > diff --git a/UefiCpuPkg/Include/Library/MtrrLib.h > b/UefiCpuPkg/Include/Library/MtrrLib.h > index 95ffbc8bf1..cfe3c0ab59 100644 > --- a/UefiCpuPkg/Include/Library/MtrrLib.h > +++ b/UefiCpuPkg/Include/Library/MtrrLib.h > @@ -1,7 +1,7 @@ > /** @file >=20 > MTRR setting library >=20 >=20 >=20 > - Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
>=20 > + Copyright (c) 2008 - 2020, Intel Corporation. All rights reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 >=20 >=20 > **/ >=20 > @@ -185,21 +185,6 @@ MtrrGetMemoryAttribute ( > ); >=20 >=20 >=20 >=20 >=20 > -/** >=20 > - This function will get the raw value in variable MTRRs >=20 > - >=20 > - @param[out] VariableSettings A buffer to hold variable MTRRs conten= t. >=20 > - >=20 > - @return The buffer point to MTRR_VARIABLE_SETTINGS in which holds the > content of the variable MTRR >=20 > - >=20 > -**/ >=20 > -MTRR_VARIABLE_SETTINGS* >=20 > -EFIAPI >=20 > -MtrrGetVariableMtrr ( >=20 > - OUT MTRR_VARIABLE_SETTINGS *VariableSettings >=20 > - ); >=20 > - >=20 > - >=20 > /** >=20 > This function sets variable MTRRs >=20 >=20 >=20 > diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c > b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c > index dfa848022b..f4a10edc87 100644 > --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c > +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c > @@ -5,7 +5,7 @@ > Most of services in this library instance are suggested to be invoke= d by BSP > only, >=20 > except for MtrrSetAllMtrrs() which is used to sync BSP's MTRR settin= g to > APs. >=20 >=20 >=20 > - Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.
>=20 > + Copyright (c) 2008 - 2020, Intel Corporation. All rights reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 >=20 >=20 > **/ >=20 > @@ -456,31 +456,6 @@ MtrrGetVariableMtrrWorker ( > return VariableSettings; >=20 > } >=20 >=20 >=20 > -/** >=20 > - This function will get the raw value in variable MTRRs >=20 > - >=20 > - @param[out] VariableSettings A buffer to hold variable MTRRs conten= t. >=20 > - >=20 > - @return The VariableSettings input pointer >=20 > - >=20 > -**/ >=20 > -MTRR_VARIABLE_SETTINGS* >=20 > -EFIAPI >=20 > -MtrrGetVariableMtrr ( >=20 > - OUT MTRR_VARIABLE_SETTINGS *VariableSettings >=20 > - ) >=20 > -{ >=20 > - if (!IsMtrrSupported ()) { >=20 > - return VariableSettings; >=20 > - } >=20 > - >=20 > - return MtrrGetVariableMtrrWorker ( >=20 > - NULL, >=20 > - GetVariableMtrrCountWorker (), >=20 > - VariableSettings >=20 > - ); >=20 > -} >=20 > - >=20 > /** >=20 > Programs fixed MTRRs registers. >=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 (#62404): https://edk2.groups.io/g/devel/message/62404 > Mute This Topic: https://groups.io/mt/75472802/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