public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] MdeModulePkg PCD: Add more debug message to show SkuId update
@ 2018-02-27  5:38 Liming Gao
  2018-02-27  7:59 ` Zeng, Star
  0 siblings, 1 reply; 2+ messages in thread
From: Liming Gao @ 2018-02-27  5:38 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
---
 MdeModulePkg/Universal/PCD/Dxe/Pcd.c | 6 +++++-
 MdeModulePkg/Universal/PCD/Pei/Pcd.c | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
index 26485f1..1b19e38 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
+++ b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
@@ -286,10 +286,13 @@ DxePcdSetSku (
   UINTN      Index;
   EFI_STATUS Status;
 
+  DEBUG ((DEBUG_INFO, "PcdDxe - SkuId 0x%lx is to be set.\n", (SKU_ID) SkuId));
+
   if (SkuId == mPcdDatabase.DxeDb->SystemSkuId) {
     //
     // The input SKU Id is equal to current SKU Id, return directly.
     //
+    DEBUG ((DEBUG_INFO, "PcdDxe - SkuId is same to current system Sku.\n"));
     return;
   }
 
@@ -308,6 +311,7 @@ DxePcdSetSku (
   SkuIdTable = (SKU_ID *) ((UINT8 *) mPcdDatabase.DxeDb + mPcdDatabase.DxeDb->SkuIdTableOffset);
   for (Index = 0; Index < SkuIdTable[0]; Index++) {
     if (SkuId == SkuIdTable[Index + 1]) {
+      DEBUG ((DEBUG_INFO, "PcdDxe - SkuId is found in SkuId table.\n"));
       Status = UpdatePcdDatabase (SkuId, TRUE);
       if (!EFI_ERROR (Status)) {
         mPcdDatabase.DxeDb->SystemSkuId = (SKU_ID) SkuId;
@@ -320,7 +324,7 @@ DxePcdSetSku (
   //
   // Invalid input SkuId, the default SKU Id will be still used for the system.
   //
-  DEBUG ((DEBUG_INFO, "PcdDxe - Invalid input SkuId, the default SKU Id will be still used.\n"));
+  DEBUG ((DEBUG_ERROR, "PcdDxe - Invalid input SkuId, the default SKU Id will be still used.\n"));
   return;
 }
 
diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.c b/MdeModulePkg/Universal/PCD/Pei/Pcd.c
index f821395..8d9328b 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Pcd.c
+++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.c
@@ -475,12 +475,15 @@ PeiPcdSetSku (
   PCD_DATABASE_SKU_DELTA *SkuDelta;
   PCD_DATA_DELTA         *SkuDeltaData;
 
+  DEBUG ((DEBUG_INFO, "PcdPei - SkuId 0x%lx is to be set.\n", (SKU_ID) SkuId));
+
   PeiPcdDb = GetPcdDatabase();
 
   if (SkuId == PeiPcdDb->SystemSkuId) {
     //
     // The input SKU Id is equal to current SKU Id, return directly.
     //
+    DEBUG ((DEBUG_INFO, "PcdPei - SkuId is same to current system Sku.\n"));
     return;
   }
 
@@ -499,6 +502,7 @@ PeiPcdSetSku (
   SkuIdTable = (SKU_ID *) ((UINT8 *) PeiPcdDb + PeiPcdDb->SkuIdTableOffset);
   for (Index = 0; Index < SkuIdTable[0]; Index++) {
     if (SkuId == SkuIdTable[Index + 1]) {
+      DEBUG ((DEBUG_INFO, "PcdPei - SkuId is found in SkuId table.\n"));
       break;
     }
   }
@@ -570,7 +574,7 @@ PeiPcdSetSku (
   //
   // Invalid input SkuId, the default SKU Id will be still used for the system.
   //
-  DEBUG ((EFI_D_INFO, "PcdPei - Invalid input SkuId, the default SKU Id will be still used.\n"));
+  DEBUG ((DEBUG_ERROR, "PcdPei - Invalid input SkuId, the default SKU Id will be still used.\n"));
 
   return;
 }
-- 
2.8.0.windows.1



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

* Re: [Patch] MdeModulePkg PCD: Add more debug message to show SkuId update
  2018-02-27  5:38 [Patch] MdeModulePkg PCD: Add more debug message to show SkuId update Liming Gao
@ 2018-02-27  7:59 ` Zeng, Star
  0 siblings, 0 replies; 2+ messages in thread
From: Zeng, Star @ 2018-02-27  7:59 UTC (permalink / raw)
  To: Gao, Liming, edk2-devel@lists.01.org; +Cc: Zeng, Star

Reviewed-by: Star Zeng <star.zeng@intel.com>

Thanks,
Star
-----Original Message-----
From: Gao, Liming 
Sent: Tuesday, February 27, 2018 1:38 PM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>
Subject: [Patch] MdeModulePkg PCD: Add more debug message to show SkuId update

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
---
 MdeModulePkg/Universal/PCD/Dxe/Pcd.c | 6 +++++-  MdeModulePkg/Universal/PCD/Pei/Pcd.c | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
index 26485f1..1b19e38 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
+++ b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c
@@ -286,10 +286,13 @@ DxePcdSetSku (
   UINTN      Index;
   EFI_STATUS Status;
 
+  DEBUG ((DEBUG_INFO, "PcdDxe - SkuId 0x%lx is to be set.\n", (SKU_ID) 
+ SkuId));
+
   if (SkuId == mPcdDatabase.DxeDb->SystemSkuId) {
     //
     // The input SKU Id is equal to current SKU Id, return directly.
     //
+    DEBUG ((DEBUG_INFO, "PcdDxe - SkuId is same to current system 
+ Sku.\n"));
     return;
   }
 
@@ -308,6 +311,7 @@ DxePcdSetSku (
   SkuIdTable = (SKU_ID *) ((UINT8 *) mPcdDatabase.DxeDb + mPcdDatabase.DxeDb->SkuIdTableOffset);
   for (Index = 0; Index < SkuIdTable[0]; Index++) {
     if (SkuId == SkuIdTable[Index + 1]) {
+      DEBUG ((DEBUG_INFO, "PcdDxe - SkuId is found in SkuId 
+ table.\n"));
       Status = UpdatePcdDatabase (SkuId, TRUE);
       if (!EFI_ERROR (Status)) {
         mPcdDatabase.DxeDb->SystemSkuId = (SKU_ID) SkuId; @@ -320,7 +324,7 @@ DxePcdSetSku (
   //
   // Invalid input SkuId, the default SKU Id will be still used for the system.
   //
-  DEBUG ((DEBUG_INFO, "PcdDxe - Invalid input SkuId, the default SKU Id will be still used.\n"));
+  DEBUG ((DEBUG_ERROR, "PcdDxe - Invalid input SkuId, the default SKU 
+ Id will be still used.\n"));
   return;
 }
 
diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.c b/MdeModulePkg/Universal/PCD/Pei/Pcd.c
index f821395..8d9328b 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Pcd.c
+++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.c
@@ -475,12 +475,15 @@ PeiPcdSetSku (
   PCD_DATABASE_SKU_DELTA *SkuDelta;
   PCD_DATA_DELTA         *SkuDeltaData;
 
+  DEBUG ((DEBUG_INFO, "PcdPei - SkuId 0x%lx is to be set.\n", (SKU_ID) 
+ SkuId));
+
   PeiPcdDb = GetPcdDatabase();
 
   if (SkuId == PeiPcdDb->SystemSkuId) {
     //
     // The input SKU Id is equal to current SKU Id, return directly.
     //
+    DEBUG ((DEBUG_INFO, "PcdPei - SkuId is same to current system 
+ Sku.\n"));
     return;
   }
 
@@ -499,6 +502,7 @@ PeiPcdSetSku (
   SkuIdTable = (SKU_ID *) ((UINT8 *) PeiPcdDb + PeiPcdDb->SkuIdTableOffset);
   for (Index = 0; Index < SkuIdTable[0]; Index++) {
     if (SkuId == SkuIdTable[Index + 1]) {
+      DEBUG ((DEBUG_INFO, "PcdPei - SkuId is found in SkuId 
+ table.\n"));
       break;
     }
   }
@@ -570,7 +574,7 @@ PeiPcdSetSku (
   //
   // Invalid input SkuId, the default SKU Id will be still used for the system.
   //
-  DEBUG ((EFI_D_INFO, "PcdPei - Invalid input SkuId, the default SKU Id will be still used.\n"));
+  DEBUG ((DEBUG_ERROR, "PcdPei - Invalid input SkuId, the default SKU 
+ Id will be still used.\n"));
 
   return;
 }
--
2.8.0.windows.1



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

end of thread, other threads:[~2018-02-27  7:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-27  5:38 [Patch] MdeModulePkg PCD: Add more debug message to show SkuId update Liming Gao
2018-02-27  7:59 ` Zeng, Star

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