From nobody Mon Dec 23 13:25:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1516255325483418.1052455570871; Wed, 17 Jan 2018 22:02:05 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9820D2220D1F2; Wed, 17 Jan 2018 21:56:42 -0800 (PST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 60C7D2034A8D9 for ; Wed, 17 Jan 2018 21:56:41 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2018 22:02:02 -0800 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.19]) by orsmga003.jf.intel.com with ESMTP; 17 Jan 2018 22:02:00 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,376,1511856000"; d="scan'208";a="20332538" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Thu, 18 Jan 2018 14:01:59 +0800 Message-Id: <20180118060159.350512-1-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.15.1.windows.2 Subject: [edk2] [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: , Cc: Ming Shao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Ming Shao Reviewed-by Shao Ming --- UefiCpuPkg/Include/Library/MtrrLib.h | 10 +++++++--- UefiCpuPkg/Library/MtrrLib/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 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 --=20 2.15.1.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel