From: Laszlo Ersek <lersek@redhat.com>
To: Star Zeng <star.zeng@intel.com>, edk2-devel@lists.01.org
Cc: Jiewen Yao <jiewen.yao@intel.com>, Eric Dong <eric.dong@intel.com>
Subject: Re: [PATCH 2/2] UefiCpuPkg PiSmmCpuDxeSmm: Refine some comments about SmmMemoryAttribute
Date: Tue, 3 Apr 2018 13:42:14 +0200 [thread overview]
Message-ID: <1716b2c8-0c30-4a3b-1b99-7ace4c9927ad@redhat.com> (raw)
In-Reply-To: <1522720327-68812-3-git-send-email-star.zeng@intel.com>
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 <jian.j.wang@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
> 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 <lersek@redhat.com>
Thanks!
Laszlo
next prev parent reply other threads:[~2018-04-03 11:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 1:52 [PATCH 0/2] Refine some comments about SmmMemoryAttribute Star Zeng
2018-04-03 1:52 ` [PATCH 1/2] MdeModulePkg SmmMemoryAttribute.h: Refine some comments Star Zeng
2018-04-03 11:36 ` Laszlo Ersek
2018-04-04 0:42 ` Zeng, Star
2018-04-03 1:52 ` [PATCH 2/2] UefiCpuPkg PiSmmCpuDxeSmm: Refine some comments about SmmMemoryAttribute Star Zeng
2018-04-03 11:42 ` Laszlo Ersek [this message]
2018-04-03 1:54 ` [PATCH 0/2] " Wang, Jian J
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1716b2c8-0c30-4a3b-1b99-7ace4c9927ad@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox