public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Enhance debug messages.
@ 2017-08-15  5:31 Eric Dong
  2017-08-15  5:31 ` [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer pointer error usage Eric Dong
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Eric Dong @ 2017-08-15  5:31 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Shao, Ming

Current debug message when enable/disable CPU feature not
correct. This patch enhances it to make it more accurate.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Shao, Ming <ming.shao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
 UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
index 54c9827..474aea3 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
@@ -528,9 +528,9 @@ AnalysisProcessorFeatures (
           //
           SupportedMaskCleanBit (CpuFeaturesData->SettingPcds, CpuFeatureInOrder->FeatureMask);
           if (CpuFeatureInOrder->FeatureName != NULL) {
-            DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature Name = %a.\n", CpuFeatureInOrder->FeatureName));
+            DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature: Name = %a.\n", CpuFeatureInOrder->FeatureName));
           } else {
-            DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature Mask = "));
+            DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature: Mask = "));
             DumpCpuFeatureMask (CpuFeatureInOrder->FeatureMask);
           }
         }
@@ -538,9 +538,9 @@ AnalysisProcessorFeatures (
         Status = CpuFeatureInOrder->InitializeFunc (ProcessorNumber, CpuInfo, CpuFeatureInOrder->ConfigData, FALSE);
         if (EFI_ERROR (Status)) {
           if (CpuFeatureInOrder->FeatureName != NULL) {
-            DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature Name = %a.\n", CpuFeatureInOrder->FeatureName));
+            DEBUG ((DEBUG_WARN, "Warning :: Failed to disable Feature: Name = %a.\n", CpuFeatureInOrder->FeatureName));
           } else {
-            DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature Mask = "));
+            DEBUG ((DEBUG_WARN, "Warning :: Failed to disable Feature: Mask = "));
             DumpCpuFeatureMask (CpuFeatureInOrder->FeatureMask);
           }
         }
-- 
2.7.0.windows.1



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

* [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer pointer error usage.
  2017-08-15  5:31 [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Enhance debug messages Eric Dong
@ 2017-08-15  5:31 ` Eric Dong
  2017-08-15  5:44   ` Ni, Ruiyu
  2017-08-15  5:31 ` [Patch] UefiCpuPkg BaseUefiCpuLib: remove error reference code Eric Dong
  2017-08-16  8:12 ` [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Enhance debug messages Ni, Ruiyu
  2 siblings, 1 reply; 9+ messages in thread
From: Eric Dong @ 2017-08-15  5:31 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Shao, Ming

Current code allocate buffer for the pointer which later get value
from PCD database. but current code error use "=" for this case.
Use CopyMem instead to fix it.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Shao, Ming <ming.shao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
 UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
index 474aea3..77834ae 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
@@ -66,7 +66,7 @@ GetSupportPcds (
   BitMaskSize = PcdGetSize (PcdCpuFeaturesSupport);
   SupportBitMask = AllocateZeroPool (BitMaskSize);
   ASSERT (SupportBitMask != NULL);
-  SupportBitMask = (UINT8 *) PcdGetPtr (PcdCpuFeaturesSupport);
+  CopyMem (SupportBitMask, (UINT8 *) PcdGetPtr (PcdCpuFeaturesSupport), BitMaskSize);
 
   return SupportBitMask;
 }
@@ -87,7 +87,7 @@ GetConfigurationPcds (
   BitMaskSize = PcdGetSize (PcdCpuFeaturesUserConfiguration);
   SupportBitMask = AllocateZeroPool (BitMaskSize);
   ASSERT (SupportBitMask != NULL);
-  SupportBitMask = (UINT8 *) PcdGetPtr (PcdCpuFeaturesUserConfiguration);
+  CopyMem (SupportBitMask, (UINT8 *) PcdGetPtr (PcdCpuFeaturesUserConfiguration), BitMaskSize);
 
   return SupportBitMask;
 }
-- 
2.7.0.windows.1



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

* [Patch] UefiCpuPkg BaseUefiCpuLib: remove error reference code.
  2017-08-15  5:31 [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Enhance debug messages Eric Dong
  2017-08-15  5:31 ` [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer pointer error usage Eric Dong
@ 2017-08-15  5:31 ` Eric Dong
  2017-08-16  8:13   ` Ni, Ruiyu
  2017-08-16  8:12 ` [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Enhance debug messages Ni, Ruiyu
  2 siblings, 1 reply; 9+ messages in thread
From: Eric Dong @ 2017-08-15  5:31 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Ming Shao

UefiCpuLib inf file reference itself in [LibraryClasses]
section, this is not necessary. This patch remove it.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Ming Shao <ming.shao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
 UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf b/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
index b397ce0..ce5d3aa 100644
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
+++ b/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
@@ -3,7 +3,7 @@
 #
 #  The library routines are UEFI specification compliant.
 #
-#  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2009 - 2017, 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,3 @@
 [Packages]
   MdePkg/MdePkg.dec
   UefiCpuPkg/UefiCpuPkg.dec
-
-[LibraryClasses]
-  UefiCpuLib
-
-- 
2.7.0.windows.1



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

* Re: [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer pointer error usage.
  2017-08-15  5:31 ` [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer pointer error usage Eric Dong
@ 2017-08-15  5:44   ` Ni, Ruiyu
  0 siblings, 0 replies; 9+ messages in thread
From: Ni, Ruiyu @ 2017-08-15  5:44 UTC (permalink / raw)
  To: Dong, Eric, edk2-devel@lists.01.org; +Cc: Shao, Ming, Shao@ml01.01.org

How about to use AllocateCopyPool()?

Thanks/Ray

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Eric Dong
> Sent: Tuesday, August 15, 2017 1:32 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Shao, Ming <ming.shao@intel.com>;
> Shao@ml01.01.org
> Subject: [edk2] [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer
> pointer error usage.
> 
> Current code allocate buffer for the pointer which later get value from PCD
> database. but current code error use "=" for this case.
> Use CopyMem instead to fix it.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Shao, Ming <ming.shao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> ---
>  UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git
> a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> index 474aea3..77834ae 100644
> --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> @@ -66,7 +66,7 @@ GetSupportPcds (
>    BitMaskSize = PcdGetSize (PcdCpuFeaturesSupport);
>    SupportBitMask = AllocateZeroPool (BitMaskSize);
>    ASSERT (SupportBitMask != NULL);
> -  SupportBitMask = (UINT8 *) PcdGetPtr (PcdCpuFeaturesSupport);
> +  CopyMem (SupportBitMask, (UINT8 *) PcdGetPtr
> (PcdCpuFeaturesSupport),
> + BitMaskSize);
> 
>    return SupportBitMask;
>  }
> @@ -87,7 +87,7 @@ GetConfigurationPcds (
>    BitMaskSize = PcdGetSize (PcdCpuFeaturesUserConfiguration);
>    SupportBitMask = AllocateZeroPool (BitMaskSize);
>    ASSERT (SupportBitMask != NULL);
> -  SupportBitMask = (UINT8 *) PcdGetPtr
> (PcdCpuFeaturesUserConfiguration);
> +  CopyMem (SupportBitMask, (UINT8 *) PcdGetPtr
> + (PcdCpuFeaturesUserConfiguration), BitMaskSize);
> 
>    return SupportBitMask;
>  }
> --
> 2.7.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

* [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer pointer error usage.
@ 2017-08-16  1:03 Eric Dong
  2017-08-16  2:40 ` Kinney, Michael D
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Dong @ 2017-08-16  1:03 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Shao Ming, Kinney Michael D

Current code allocate buffer for the pointer which later get value
from PCD database. but current code error use "=" for this case.
Use AllocateCopyPool instead to fix it.

V2 enhanced to directly use AllocateCopyPool to get the PCD value.
V3 enhanced to avoid using local temp variable.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Shao Ming <ming.shao@intel.com>
Cc: Kinney Michael D <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
 .../RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 55 +++++-----------------
 1 file changed, 11 insertions(+), 44 deletions(-)

diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
index 474aea3..a7e1852 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
@@ -51,48 +51,6 @@ SetSettingPcd (
 }
 
 /**
-  Worker function to get PcdCpuFeaturesSupport.
-
-  @return  The pointer to CPU feature bits mask buffer.
-**/
-UINT8 *
-GetSupportPcds (
-  VOID
-  )
-{
-  UINTN                  BitMaskSize;
-  UINT8                  *SupportBitMask;
-
-  BitMaskSize = PcdGetSize (PcdCpuFeaturesSupport);
-  SupportBitMask = AllocateZeroPool (BitMaskSize);
-  ASSERT (SupportBitMask != NULL);
-  SupportBitMask = (UINT8 *) PcdGetPtr (PcdCpuFeaturesSupport);
-
-  return SupportBitMask;
-}
-
-/**
-  Worker function to get PcdCpuFeaturesUserConfiguration.
-
-  @return  The pointer to CPU feature bits mask buffer.
-**/
-UINT8 *
-GetConfigurationPcds (
-  VOID
-  )
-{
-  UINTN                  BitMaskSize;
-  UINT8                  *SupportBitMask;
-
-  BitMaskSize = PcdGetSize (PcdCpuFeaturesUserConfiguration);
-  SupportBitMask = AllocateZeroPool (BitMaskSize);
-  ASSERT (SupportBitMask != NULL);
-  SupportBitMask = (UINT8 *) PcdGetPtr (PcdCpuFeaturesUserConfiguration);
-
-  return SupportBitMask;
-}
-
-/**
   Collects CPU type and feature information.
 
   @param[in, out]  CpuInfo  The pointer to CPU feature information
@@ -180,8 +138,17 @@ CpuInitDataInitialize (
   //
   // Get support and configuration PCDs
   //
-  CpuFeaturesData->SupportPcds       = GetSupportPcds ();
-  CpuFeaturesData->ConfigurationPcds = GetConfigurationPcds ();
+  CpuFeaturesData->SupportPcds = AllocateCopyPool (
+          PcdGetSize (PcdCpuFeaturesSupport),
+          PcdGetPtr (PcdCpuFeaturesSupport)
+          );
+  ASSERT (CpuFeaturesData->SupportPcds != NULL);
+
+  CpuFeaturesData->ConfigurationPcds = AllocateCopyPool (
+          PcdGetSize (PcdCpuFeaturesUserConfiguration),
+          PcdGetPtr (PcdCpuFeaturesUserConfiguration)
+          );
+  ASSERT (CpuFeaturesData->ConfigurationPcds != NULL);
 }
 
 /**
-- 
2.7.0.windows.1



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

* Re: [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer pointer error usage.
  2017-08-16  1:03 [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer pointer error usage Eric Dong
@ 2017-08-16  2:40 ` Kinney, Michael D
  0 siblings, 0 replies; 9+ messages in thread
From: Kinney, Michael D @ 2017-08-16  2:40 UTC (permalink / raw)
  To: Dong, Eric, edk2-devel@lists.01.org, Kinney, Michael D
  Cc: Ni, Ruiyu, Shao, Ming

Hi Eric,

I think we should keep the Getxxx() functions to make
the code easier to read and we have matched Get/Set
functions to access these PCDs.

Mike

> -----Original Message-----
> From: Dong, Eric
> Sent: Tuesday, August 15, 2017 6:04 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Shao, Ming
> <ming.shao@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Subject: [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer
> pointer error usage.
> 
> Current code allocate buffer for the pointer which later get
> value
> from PCD database. but current code error use "=" for this case.
> Use AllocateCopyPool instead to fix it.
> 
> V2 enhanced to directly use AllocateCopyPool to get the PCD
> value.
> V3 enhanced to avoid using local temp variable.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Shao Ming <ming.shao@intel.com>
> Cc: Kinney Michael D <michael.d.kinney@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> ---
>  .../RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 55 +++++--
> ---------------
>  1 file changed, 11 insertions(+), 44 deletions(-)
> 
> diff --git
> a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitializ
> e.c
> b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitializ
> e.c
> index 474aea3..a7e1852 100644
> ---
> a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitializ
> e.c
> +++
> b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitializ
> e.c
> @@ -51,48 +51,6 @@ SetSettingPcd (
>  }
> 
>  /**
> -  Worker function to get PcdCpuFeaturesSupport.
> -
> -  @return  The pointer to CPU feature bits mask buffer.
> -**/
> -UINT8 *
> -GetSupportPcds (
> -  VOID
> -  )
> -{
> -  UINTN                  BitMaskSize;
> -  UINT8                  *SupportBitMask;
> -
> -  BitMaskSize = PcdGetSize (PcdCpuFeaturesSupport);
> -  SupportBitMask = AllocateZeroPool (BitMaskSize);
> -  ASSERT (SupportBitMask != NULL);
> -  SupportBitMask = (UINT8 *) PcdGetPtr (PcdCpuFeaturesSupport);
> -
> -  return SupportBitMask;
> -}
> -
> -/**
> -  Worker function to get PcdCpuFeaturesUserConfiguration.
> -
> -  @return  The pointer to CPU feature bits mask buffer.
> -**/
> -UINT8 *
> -GetConfigurationPcds (
> -  VOID
> -  )
> -{
> -  UINTN                  BitMaskSize;
> -  UINT8                  *SupportBitMask;
> -
> -  BitMaskSize = PcdGetSize (PcdCpuFeaturesUserConfiguration);
> -  SupportBitMask = AllocateZeroPool (BitMaskSize);
> -  ASSERT (SupportBitMask != NULL);
> -  SupportBitMask = (UINT8 *) PcdGetPtr
> (PcdCpuFeaturesUserConfiguration);
> -
> -  return SupportBitMask;
> -}
> -
> -/**
>    Collects CPU type and feature information.
> 
>    @param[in, out]  CpuInfo  The pointer to CPU feature
> information
> @@ -180,8 +138,17 @@ CpuInitDataInitialize (
>    //
>    // Get support and configuration PCDs
>    //
> -  CpuFeaturesData->SupportPcds       = GetSupportPcds ();
> -  CpuFeaturesData->ConfigurationPcds = GetConfigurationPcds ();
> +  CpuFeaturesData->SupportPcds = AllocateCopyPool (
> +          PcdGetSize (PcdCpuFeaturesSupport),
> +          PcdGetPtr (PcdCpuFeaturesSupport)
> +          );
> +  ASSERT (CpuFeaturesData->SupportPcds != NULL);
> +
> +  CpuFeaturesData->ConfigurationPcds = AllocateCopyPool (
> +          PcdGetSize (PcdCpuFeaturesUserConfiguration),
> +          PcdGetPtr (PcdCpuFeaturesUserConfiguration)
> +          );
> +  ASSERT (CpuFeaturesData->ConfigurationPcds != NULL);
>  }
> 
>  /**
> --
> 2.7.0.windows.1



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

* Re: [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Enhance debug messages.
  2017-08-15  5:31 [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Enhance debug messages Eric Dong
  2017-08-15  5:31 ` [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer pointer error usage Eric Dong
  2017-08-15  5:31 ` [Patch] UefiCpuPkg BaseUefiCpuLib: remove error reference code Eric Dong
@ 2017-08-16  8:12 ` Ni, Ruiyu
  2 siblings, 0 replies; 9+ messages in thread
From: Ni, Ruiyu @ 2017-08-16  8:12 UTC (permalink / raw)
  To: Dong, Eric, edk2-devel@lists.01.org; +Cc: Shao, Ming, Shao@ml01.01.org

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

Thanks/Ray

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Eric Dong
> Sent: Tuesday, August 15, 2017 1:32 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Shao, Ming <ming.shao@intel.com>;
> Shao@ml01.01.org
> Subject: [edk2] [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Enhance debug
> messages.
> 
> Current debug message when enable/disable CPU feature not correct. This
> patch enhances it to make it more accurate.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Shao, Ming <ming.shao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> ---
>  UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 8
> ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git
> a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> index 54c9827..474aea3 100644
> --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> @@ -528,9 +528,9 @@ AnalysisProcessorFeatures (
>            //
>            SupportedMaskCleanBit (CpuFeaturesData->SettingPcds,
> CpuFeatureInOrder->FeatureMask);
>            if (CpuFeatureInOrder->FeatureName != NULL) {
> -            DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature Name
> = %a.\n", CpuFeatureInOrder->FeatureName));
> +            DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature:
> + Name = %a.\n", CpuFeatureInOrder->FeatureName));
>            } else {
> -            DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature Mask =
> "));
> +            DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature:
> + Mask = "));
>              DumpCpuFeatureMask (CpuFeatureInOrder->FeatureMask);
>            }
>          }
> @@ -538,9 +538,9 @@ AnalysisProcessorFeatures (
>          Status = CpuFeatureInOrder->InitializeFunc (ProcessorNumber, CpuInfo,
> CpuFeatureInOrder->ConfigData, FALSE);
>          if (EFI_ERROR (Status)) {
>            if (CpuFeatureInOrder->FeatureName != NULL) {
> -            DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature Name
> = %a.\n", CpuFeatureInOrder->FeatureName));
> +            DEBUG ((DEBUG_WARN, "Warning :: Failed to disable Feature:
> + Name = %a.\n", CpuFeatureInOrder->FeatureName));
>            } else {
> -            DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature Mask =
> "));
> +            DEBUG ((DEBUG_WARN, "Warning :: Failed to disable Feature:
> + Mask = "));
>              DumpCpuFeatureMask (CpuFeatureInOrder->FeatureMask);
>            }
>          }
> --
> 2.7.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

* Re: [Patch] UefiCpuPkg BaseUefiCpuLib: remove error reference code.
  2017-08-15  5:31 ` [Patch] UefiCpuPkg BaseUefiCpuLib: remove error reference code Eric Dong
@ 2017-08-16  8:13   ` Ni, Ruiyu
  2017-08-16  8:14     ` Dong, Eric
  0 siblings, 1 reply; 9+ messages in thread
From: Ni, Ruiyu @ 2017-08-16  8:13 UTC (permalink / raw)
  To: Dong, Eric, edk2-devel@lists.01.org; +Cc: Shao, Ming

How about changing title to "UefiCpuPkg/BaseUefiCpuLib.inf: Remove unnecessary library class"?

Thanks/Ray

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Eric Dong
> Sent: Tuesday, August 15, 2017 1:32 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Shao, Ming <ming.shao@intel.com>
> Subject: [edk2] [Patch] UefiCpuPkg BaseUefiCpuLib: remove error reference
> code.
> 
> UefiCpuLib inf file reference itself in [LibraryClasses]
> section, this is not necessary. This patch remove it.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Ming Shao <ming.shao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> ---
>  UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> b/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> index b397ce0..ce5d3aa 100644
> --- a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> +++ b/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> @@ -3,7 +3,7 @@
>  #
>  #  The library routines are UEFI specification compliant.
>  #
> -#  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
> +#  Copyright (c) 2009 - 2017, 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,3 @@
>  [Packages]
>    MdePkg/MdePkg.dec
>    UefiCpuPkg/UefiCpuPkg.dec
> -
> -[LibraryClasses]
> -  UefiCpuLib
> -
> --
> 2.7.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

* Re: [Patch] UefiCpuPkg BaseUefiCpuLib: remove error reference code.
  2017-08-16  8:13   ` Ni, Ruiyu
@ 2017-08-16  8:14     ` Dong, Eric
  0 siblings, 0 replies; 9+ messages in thread
From: Dong, Eric @ 2017-08-16  8:14 UTC (permalink / raw)
  To: Ni, Ruiyu, edk2-devel@lists.01.org; +Cc: Shao, Ming

Ok, I will update it when I push it.

-----Original Message-----
From: Ni, Ruiyu 
Sent: Wednesday, August 16, 2017 4:13 PM
To: Dong, Eric <eric.dong@intel.com>; edk2-devel@lists.01.org
Cc: Shao, Ming <ming.shao@intel.com>
Subject: RE: [edk2] [Patch] UefiCpuPkg BaseUefiCpuLib: remove error reference code.

How about changing title to "UefiCpuPkg/BaseUefiCpuLib.inf: Remove unnecessary library class"?

Thanks/Ray

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of 
> Eric Dong
> Sent: Tuesday, August 15, 2017 1:32 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Shao, Ming <ming.shao@intel.com>
> Subject: [edk2] [Patch] UefiCpuPkg BaseUefiCpuLib: remove error 
> reference code.
> 
> UefiCpuLib inf file reference itself in [LibraryClasses] section, this 
> is not necessary. This patch remove it.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Ming Shao <ming.shao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> ---
>  UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> b/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> index b397ce0..ce5d3aa 100644
> --- a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> +++ b/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> @@ -3,7 +3,7 @@
>  #
>  #  The library routines are UEFI specification compliant.
>  #
> -#  Copyright (c) 2009 - 2014, Intel Corporation. All rights 
> reserved.<BR>
> +#  Copyright (c) 2009 - 2017, 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,3 @@  [Packages]
>    MdePkg/MdePkg.dec
>    UefiCpuPkg/UefiCpuPkg.dec
> -
> -[LibraryClasses]
> -  UefiCpuLib
> -
> --
> 2.7.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

end of thread, other threads:[~2017-08-16  8:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15  5:31 [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Enhance debug messages Eric Dong
2017-08-15  5:31 ` [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer pointer error usage Eric Dong
2017-08-15  5:44   ` Ni, Ruiyu
2017-08-15  5:31 ` [Patch] UefiCpuPkg BaseUefiCpuLib: remove error reference code Eric Dong
2017-08-16  8:13   ` Ni, Ruiyu
2017-08-16  8:14     ` Dong, Eric
2017-08-16  8:12 ` [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Enhance debug messages Ni, Ruiyu
  -- strict thread matches above, loose matches on Subject: below --
2017-08-16  1:03 [Patch] UefiCpuPkg RegisterCpuFeaturesLib: Fix buffer pointer error usage Eric Dong
2017-08-16  2:40 ` Kinney, Michael D

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