From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (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 DB4E821FB7D28 for ; Tue, 3 Apr 2018 04:42:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E856D4057284; Tue, 3 Apr 2018 11:42:16 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-185.rdu2.redhat.com [10.10.120.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6760A2024CA1; Tue, 3 Apr 2018 11:42:15 +0000 (UTC) To: Star Zeng , edk2-devel@lists.01.org Cc: Jiewen Yao , Eric Dong References: <1522720327-68812-1-git-send-email-star.zeng@intel.com> <1522720327-68812-3-git-send-email-star.zeng@intel.com> From: Laszlo Ersek Message-ID: <1716b2c8-0c30-4a3b-1b99-7ace4c9927ad@redhat.com> Date: Tue, 3 Apr 2018 13:42:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1522720327-68812-3-git-send-email-star.zeng@intel.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 03 Apr 2018 11:42:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 03 Apr 2018 11:42:16 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: [PATCH 2/2] UefiCpuPkg PiSmmCpuDxeSmm: Refine some comments about SmmMemoryAttribute X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2018 11:42:18 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 04/03/18 03:52, Star Zeng wrote: > 1. Fix some "support" to "supported". > 2. Fix some "set" to "clear" in ClearMemoryAttributes interface. > 3. Remove redundant comments for GetMemoryAttributes interface. > > Cc: Jian J Wang > Cc: Jiewen Yao > Cc: Eric Dong > Cc: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 15 ++++++--------- > UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 21 +++++++++------------ > 2 files changed, 15 insertions(+), 21 deletions(-) > > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h > index a2babb987732..af6437ee822b 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h > @@ -1079,7 +1079,7 @@ TransferApToSafeState ( > @retval EFI_UNSUPPORTED The processor does not support one or more > bytes of the memory resource range specified > by BaseAddress and Length. > - The bit mask of attributes is not support for > + The bit mask of attributes is not supported for > the memory resource range specified by > BaseAddress and Length. > > @@ -1101,17 +1101,17 @@ EdkiiSmmSetMemoryAttributes ( > @param BaseAddress The physical address that is the start address of > a memory region. > @param Length The size in bytes of the memory region. > - @param Attributes The bit mask of attributes to set for the memory > + @param Attributes The bit mask of attributes to clear for the memory > region. > > - @retval EFI_SUCCESS The attributes were set for the memory region. > + @retval EFI_SUCCESS The attributes were clear for the memory region. Please write "were cleared" here. > @retval EFI_INVALID_PARAMETER Length is zero. > Attributes specified an illegal combination of > - attributes that cannot be set together. > + attributes that cannot be clear together. Same here, "be cleared". > @retval EFI_UNSUPPORTED The processor does not support one or more > bytes of the memory resource range specified > by BaseAddress and Length. > - The bit mask of attributes is not support for > + The bit mask of attributes is not supported for > the memory resource range specified by > BaseAddress and Length. > > @@ -1126,7 +1126,7 @@ EdkiiSmmClearMemoryAttributes ( > ); > > /** > - This function retrieve the attributes of the memory region specified by > + This function retrieves the attributes of the memory region specified by > BaseAddress and Length. If different attributes are got from different part > of the memory region, EFI_NO_MAPPING will be returned. > > @@ -1144,9 +1144,6 @@ EdkiiSmmClearMemoryAttributes ( > @retval EFI_UNSUPPORTED The processor does not support one or more > bytes of the memory resource range specified > by BaseAddress and Length. > - The bit mask of attributes is not support for > - the memory resource range specified by > - BaseAddress and Length. > > **/ > EFI_STATUS > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c > index 2a4a29899862..17515fbe079c 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c > @@ -604,7 +604,7 @@ SmmClearMemoryAttributesEx ( > the memory resource range. > @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory > resource range specified by BaseAddress and Length. > - The bit mask of attributes is not support for the memory resource > + The bit mask of attributes is not supported for the memory resource > range specified by BaseAddress and Length. > > **/ > @@ -632,12 +632,12 @@ SmmSetMemoryAttributes ( > BaseAddress and Length cannot be modified. > @retval EFI_INVALID_PARAMETER Length is zero. > Attributes specified an illegal combination of attributes that > - cannot be set together. > + cannot be clear together. Please write "be cleared". > @retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of > the memory resource range. > @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory > resource range specified by BaseAddress and Length. > - The bit mask of attributes is not support for the memory resource > + The bit mask of attributes is not supported for the memory resource > range specified by BaseAddress and Length. > > **/ > @@ -1185,7 +1185,7 @@ IsSmmCommBufferForbiddenAddress ( > @retval EFI_UNSUPPORTED The processor does not support one or more > bytes of the memory resource range specified > by BaseAddress and Length. > - The bit mask of attributes is not support for > + The bit mask of attributes is not supported for > the memory resource range specified by > BaseAddress and Length. > > @@ -1210,17 +1210,17 @@ EdkiiSmmSetMemoryAttributes ( > @param BaseAddress The physical address that is the start address of > a memory region. > @param Length The size in bytes of the memory region. > - @param Attributes The bit mask of attributes to set for the memory > + @param Attributes The bit mask of attributes to clear for the memory > region. > > - @retval EFI_SUCCESS The attributes were set for the memory region. > + @retval EFI_SUCCESS The attributes were clear for the memory region. "were cleared" > @retval EFI_INVALID_PARAMETER Length is zero. > Attributes specified an illegal combination of > - attributes that cannot be set together. > + attributes that cannot be clear together. "cleared" > @retval EFI_UNSUPPORTED The processor does not support one or more > bytes of the memory resource range specified > by BaseAddress and Length. > - The bit mask of attributes is not support for > + The bit mask of attributes is not supported for > the memory resource range specified by > BaseAddress and Length. > > @@ -1238,7 +1238,7 @@ EdkiiSmmClearMemoryAttributes ( > } > > /** > - This function retrieve the attributes of the memory region specified by > + This function retrieves the attributes of the memory region specified by > BaseAddress and Length. If different attributes are got from different part > of the memory region, EFI_NO_MAPPING will be returned. > > @@ -1256,9 +1256,6 @@ EdkiiSmmClearMemoryAttributes ( > @retval EFI_UNSUPPORTED The processor does not support one or more > bytes of the memory resource range specified > by BaseAddress and Length. > - The bit mask of attributes is not support for > - the memory resource range specified by > - BaseAddress and Length. > > **/ > EFI_STATUS > With those changes: Reviewed-by: Laszlo Ersek Thanks! Laszlo