[edk2] [PATCH 1/2] MdeModulePkg SmmMemoryAttribute.h: Refine some comments

Star Zeng posted 2 patches 7 years, 10 months ago
[edk2] [PATCH 1/2] MdeModulePkg SmmMemoryAttribute.h: Refine some comments
Posted by Star Zeng 7 years, 10 months ago
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>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h b/MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h
index 0700eb51d6e1..012fa2aaec6e 100644
--- a/MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h
+++ b/MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h
@@ -2,7 +2,7 @@
   SMM Memory Attribute Protocol provides retrieval and update service
   for memory attributes in EFI SMM environment.
 
-  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
   which accompanies this distribution.  The full text of the license may be found at
@@ -42,7 +42,7 @@ typedef struct _EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL EDKII_SMM_MEMORY_ATTRIBUTE_P
   @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.
 
@@ -64,17 +64,17 @@ EFI_STATUS
   @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.
   @retval EFI_INVALID_PARAMETER Length is zero.
                                 Attributes specified an illegal combination of
                                 attributes that cannot be set together.
   @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.
 
@@ -89,7 +89,7 @@ EFI_STATUS
   );
 
 /**
-  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.
 
@@ -107,9 +107,6 @@ EFI_STATUS
   @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.
 
 **/
 typedef
-- 
2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 1/2] MdeModulePkg SmmMemoryAttribute.h: Refine some comments
Posted by Laszlo Ersek 7 years, 10 months ago
Hi Star,

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>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
>  MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h b/MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h
> index 0700eb51d6e1..012fa2aaec6e 100644
> --- a/MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h
> +++ b/MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h
> @@ -2,7 +2,7 @@
>    SMM Memory Attribute Protocol provides retrieval and update service
>    for memory attributes in EFI SMM environment.
>  
> -  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
>    This program and the accompanying materials
>    are licensed and made available under the terms and conditions of the BSD License
>    which accompanies this distribution.  The full text of the license may be found at
> @@ -42,7 +42,7 @@ typedef struct _EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL EDKII_SMM_MEMORY_ATTRIBUTE_P
>    @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.
>  
> @@ -64,17 +64,17 @@ EFI_STATUS
>    @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.

(This is for EDKII_SMM_CLEAR_MEMORY_ATTRIBUTES.)

Please write "were cleared" here, not just "were clear".

With that change:

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks!
Laszlo


>    @retval EFI_INVALID_PARAMETER Length is zero.
>                                  Attributes specified an illegal combination of
>                                  attributes that cannot be set together.
>    @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.
>  
> @@ -89,7 +89,7 @@ EFI_STATUS
>    );
>  
>  /**
> -  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.
>  
> @@ -107,9 +107,6 @@ EFI_STATUS
>    @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.
>  
>  **/
>  typedef
> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 1/2] MdeModulePkg SmmMemoryAttribute.h: Refine some comments
Posted by Zeng, Star 7 years, 10 months ago
Agree (also for patch 2/2).
Thanks for the feedback.
I will update them before pushing


Star
-----Original Message-----
From: Laszlo Ersek [mailto:lersek@redhat.com] 
Sent: Tuesday, April 3, 2018 7:37 PM
To: Zeng, Star <star.zeng@intel.com>; edk2-devel@lists.01.org
Cc: Yao, Jiewen <jiewen.yao@intel.com>
Subject: Re: [edk2] [PATCH 1/2] MdeModulePkg SmmMemoryAttribute.h: Refine some comments

Hi Star,

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>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
>  MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h | 15 
> ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h 
> b/MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h
> index 0700eb51d6e1..012fa2aaec6e 100644
> --- a/MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h
> +++ b/MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h
> @@ -2,7 +2,7 @@
>    SMM Memory Attribute Protocol provides retrieval and update service
>    for memory attributes in EFI SMM environment.
>  
> -  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2017 - 2018, Intel Corporation. All rights 
> + reserved.<BR>
>    This program and the accompanying materials
>    are licensed and made available under the terms and conditions of the BSD License
>    which accompanies this distribution.  The full text of the license 
> may be found at @@ -42,7 +42,7 @@ typedef struct _EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL EDKII_SMM_MEMORY_ATTRIBUTE_P
>    @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.
>  
> @@ -64,17 +64,17 @@ EFI_STATUS
>    @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.

(This is for EDKII_SMM_CLEAR_MEMORY_ATTRIBUTES.)

Please write "were cleared" here, not just "were clear".

With that change:

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks!
Laszlo


>    @retval EFI_INVALID_PARAMETER Length is zero.
>                                  Attributes specified an illegal combination of
>                                  attributes that cannot be set together.
>    @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.
>  
> @@ -89,7 +89,7 @@ EFI_STATUS
>    );
>  
>  /**
> -  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.
>  
> @@ -107,9 +107,6 @@ EFI_STATUS
>    @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.
>  
>  **/
>  typedef
> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel