From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=ming.shao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 38BFC22344342 for ; Fri, 19 Jan 2018 01:02:18 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jan 2018 01:07:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,381,1511856000"; d="scan'208";a="23682756" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 19 Jan 2018 01:07:41 -0800 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 19 Jan 2018 01:07:41 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 19 Jan 2018 01:07:40 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.189]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Fri, 19 Jan 2018 17:07:37 +0800 From: "Shao, Ming" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] UefiCpuPkg/MtrrLib: Update the comments for RETURN_BUFFER_TOO_SMALL Thread-Index: AQHTkCHmI3KL6yyB9kaivNfriyzYY6N66VhA Date: Fri, 19 Jan 2018 09:07:37 +0000 Message-ID: <0D32B2537B667F42AD320D616D521AF738A3FCA5@shsmsx102.ccr.corp.intel.com> References: <20180118060159.350512-1-ruiyu.ni@intel.com> In-Reply-To: <20180118060159.350512-1-ruiyu.ni@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2JmNTYyZmItYjhmZS00ZTJmLWIyZjktN2E4OGM4YzFjNjFkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJzZ1lEV1wvY2cwXC9YQ2xFMnozYVpmTkJ6anN6bENsaUJXSlg0TzNqNUlJaWRkbnlRcGJiYmluZHdnMTJpbjBEMXkifQ== x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 19 Jan 2018 03:11:40 -0800 Subject: Re: [PATCH] UefiCpuPkg/MtrrLib: Update the comments for RETURN_BUFFER_TOO_SMALL X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2018 09:02:19 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by Shao Ming -----Original Message----- From: Ni, Ruiyu=20 Sent: Thursday, January 18, 2018 2:02 PM To: edk2-devel@lists.01.org Cc: Shao, Ming Subject: [PATCH] UefiCpuPkg/MtrrLib: Update the comments for RETURN_BUFFER_= TOO_SMALL Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Ming Shao --- UefiCpuPkg/Include/Library/MtrrLib.h | 10 +++++++--- UefiCpuPkg/Library/M= trrLib/MtrrLib.c | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/UefiCpuPkg/Include/Library/MtrrLib.h b/UefiCpuPkg/Include/Libr= ary/MtrrLib.h index 0bf7d8ed10..d56f1057e1 100644 --- a/UefiCpuPkg/Include/Library/MtrrLib.h +++ b/UefiCpuPkg/Include/Library/MtrrLib.h @@ -1,7 +1,7 @@ /** @file MTRR setting library =20 - Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2008 - 2018, Intel Corporation. All rights=20 + reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -157,7 +157,9 @@ GetFirmwareVariableMtrrCount ( @retval RETURN_OUT_OF_RESOURCES There are not enough system resources = to modify the attributes of the memory resource range. - @retval RETURN_BUFFER_TOO_SMALL The scratch buffer is too small for MT= RR calculation. + @retval RETURN_BUFFER_TOO_SMALL The fixed internal scratch buffer is t= oo small for MTRR calculation. + Caller should use MtrrSetMemoryAttribu= tesInMtrrSettings() to specify + external scratch buffer. **/ RETURN_STATUS EFIAPI @@ -352,7 +354,9 @@ MtrrGetDefaultMemoryType ( BaseAddress and Length cannot be modif= ied. @retval RETURN_OUT_OF_RESOURCES There are not enough system resources = to modify the attributes of the memory resource range. - @retval RETURN_BUFFER_TOO_SMALL The scratch buffer is too small for MT= RR calculation. + @retval RETURN_BUFFER_TOO_SMALL The fixed internal scratch buffer is t= oo small for MTRR calculation. + Caller should use MtrrSetMemoryAttribu= tesInMtrrSettings() to specify + external scratch buffer. **/ RETURN_STATUS EFIAPI diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/Mtrr= Lib/MtrrLib.c index 30b0df030b..2496d08ad4 100644 --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c @@ -2513,7 +2513,9 @@ Exit: BaseAddress and Length cannot be modif= ied. @retval RETURN_OUT_OF_RESOURCES There are not enough system resources = to modify the attributes of the memory resource range. - @retval RETURN_BUFFER_TOO_SMALL The scratch buffer is too small for MT= RR calculation. + @retval RETURN_BUFFER_TOO_SMALL The fixed internal scratch buffer is t= oo small for MTRR calculation. + Caller should use MtrrSetMemoryAttribu= tesInMtrrSettings() to specify + external scratch buffer. **/ RETURN_STATUS EFIAPI @@ -2559,7 +2561,9 @@ MtrrSetMemoryAttributeInMtrrSettings ( @retval RETURN_OUT_OF_RESOURCES There are not enough system resources = to modify the attributes of the memory resource range. - @retval RETURN_BUFFER_TOO_SMALL The scratch buffer is too small for MT= RR calculation. + @retval RETURN_BUFFER_TOO_SMALL The fixed internal scratch buffer is t= oo small for MTRR calculation. + Caller should use MtrrSetMemoryAttribu= tesInMtrrSettings() to specify + external scratch buffer. **/ RETURN_STATUS EFIAPI -- 2.15.1.windows.2