public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/2] Refine some comments about SmmMemoryAttribute
@ 2018-04-03  1:52 Star Zeng
  2018-04-03  1:52 ` [PATCH 1/2] MdeModulePkg SmmMemoryAttribute.h: Refine some comments Star Zeng
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Star Zeng @ 2018-04-03  1:52 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Jian J Wang, Jiewen Yao, Eric Dong, Laszlo Ersek

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>

Star Zeng (2):
  MdeModulePkg SmmMemoryAttribute.h: Refine some comments
  UefiCpuPkg PiSmmCpuDxeSmm: Refine some comments about
    SmmMemoryAttribute

 MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h | 15 ++++++---------
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h         | 15 ++++++---------
 UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 21 +++++++++------------
 3 files changed, 21 insertions(+), 30 deletions(-)

-- 
2.7.0.windows.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] MdeModulePkg SmmMemoryAttribute.h: Refine some comments
  2018-04-03  1:52 [PATCH 0/2] Refine some comments about SmmMemoryAttribute Star Zeng
@ 2018-04-03  1:52 ` Star Zeng
  2018-04-03 11:36   ` Laszlo Ersek
  2018-04-03  1:52 ` [PATCH 2/2] UefiCpuPkg PiSmmCpuDxeSmm: Refine some comments about SmmMemoryAttribute Star Zeng
  2018-04-03  1:54 ` [PATCH 0/2] " Wang, Jian J
  2 siblings, 1 reply; 7+ messages in thread
From: Star Zeng @ 2018-04-03  1:52 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Jian J Wang, Jiewen Yao

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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] UefiCpuPkg PiSmmCpuDxeSmm: Refine some comments about SmmMemoryAttribute
  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  1:52 ` Star Zeng
  2018-04-03 11:42   ` Laszlo Ersek
  2018-04-03  1:54 ` [PATCH 0/2] " Wang, Jian J
  2 siblings, 1 reply; 7+ messages in thread
From: Star Zeng @ 2018-04-03  1:52 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Jian J Wang, Jiewen Yao, Eric Dong, Laszlo Ersek

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.
   @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.
   @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.
   @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.
   @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.
   @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
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] Refine some comments about SmmMemoryAttribute
  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  1:52 ` [PATCH 2/2] UefiCpuPkg PiSmmCpuDxeSmm: Refine some comments about SmmMemoryAttribute Star Zeng
@ 2018-04-03  1:54 ` Wang, Jian J
  2 siblings, 0 replies; 7+ messages in thread
From: Wang, Jian J @ 2018-04-03  1:54 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org; +Cc: Yao, Jiewen, Dong, Eric, Laszlo Ersek


For this series:
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>

> -----Original Message-----
> From: Zeng, Star
> Sent: Tuesday, April 03, 2018 9:52 AM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Yao, Jiewen <jiewen.yao@intel.com>; Dong, Eric <eric.dong@intel.com>; Laszlo
> Ersek <lersek@redhat.com>
> Subject: [PATCH 0/2] Refine some comments about SmmMemoryAttribute
> 
> 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>
> 
> Star Zeng (2):
>   MdeModulePkg SmmMemoryAttribute.h: Refine some comments
>   UefiCpuPkg PiSmmCpuDxeSmm: Refine some comments about
>     SmmMemoryAttribute
> 
>  MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h | 15 ++++++---------
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h         | 15 ++++++---------
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 21
> +++++++++------------
>  3 files changed, 21 insertions(+), 30 deletions(-)
> 
> --
> 2.7.0.windows.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] MdeModulePkg SmmMemoryAttribute.h: Refine some comments
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Laszlo Ersek @ 2018-04-03 11:36 UTC (permalink / raw)
  To: Star Zeng, edk2-devel; +Cc: Jiewen Yao

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
> 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] UefiCpuPkg PiSmmCpuDxeSmm: Refine some comments about SmmMemoryAttribute
  2018-04-03  1:52 ` [PATCH 2/2] UefiCpuPkg PiSmmCpuDxeSmm: Refine some comments about SmmMemoryAttribute Star Zeng
@ 2018-04-03 11:42   ` Laszlo Ersek
  0 siblings, 0 replies; 7+ messages in thread
From: Laszlo Ersek @ 2018-04-03 11:42 UTC (permalink / raw)
  To: Star Zeng, edk2-devel; +Cc: Jiewen Yao, Eric Dong

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] MdeModulePkg SmmMemoryAttribute.h: Refine some comments
  2018-04-03 11:36   ` Laszlo Ersek
@ 2018-04-04  0:42     ` Zeng, Star
  0 siblings, 0 replies; 7+ messages in thread
From: Zeng, Star @ 2018-04-04  0:42 UTC (permalink / raw)
  To: Laszlo Ersek, edk2-devel@lists.01.org; +Cc: Yao, Jiewen, Zeng, Star

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
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-04-04  0:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2018-04-03  1:54 ` [PATCH 0/2] " Wang, Jian J

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox