From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 514E2209574EA for ; Mon, 26 Feb 2018 23:53:36 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2018 23:59:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,400,1515484800"; d="scan'208";a="23487460" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 26 Feb 2018 23:59:42 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 26 Feb 2018 23:59:42 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 26 Feb 2018 23:59:41 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.116]) with mapi id 14.03.0319.002; Tue, 27 Feb 2018 15:59:40 +0800 From: "Zeng, Star" To: "Gao, Liming" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [Patch] MdeModulePkg PCD: Add more debug message to show SkuId update Thread-Index: AQHTr40uVBycUXMpdU2voUyoGTHOY6O34rIA Date: Tue, 27 Feb 2018 07:59:38 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BA44BC8@shsmsx102.ccr.corp.intel.com> References: <1519709885-6772-1-git-send-email-liming.gao@intel.com> In-Reply-To: <1519709885-6772-1-git-send-email-liming.gao@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] MdeModulePkg PCD: Add more debug message to show SkuId update X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2018 07:53:36 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng Thanks, Star -----Original Message----- From: Gao, Liming=20 Sent: Tuesday, February 27, 2018 1:38 PM To: edk2-devel@lists.01.org Cc: Zeng, Star Subject: [Patch] MdeModulePkg PCD: Add more debug message to show SkuId upd= ate Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Star Zeng --- MdeModulePkg/Universal/PCD/Dxe/Pcd.c | 6 +++++- MdeModulePkg/Universal/PC= D/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; =20 + DEBUG ((DEBUG_INFO, "PcdDxe - SkuId 0x%lx is to be set.\n", (SKU_ID)=20 + SkuId)); + if (SkuId =3D=3D 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=20 + Sku.\n")); return; } =20 @@ -308,6 +311,7 @@ DxePcdSetSku ( SkuIdTable =3D (SKU_ID *) ((UINT8 *) mPcdDatabase.DxeDb + mPcdDatabase.D= xeDb->SkuIdTableOffset); for (Index =3D 0; Index < SkuIdTable[0]; Index++) { if (SkuId =3D=3D SkuIdTable[Index + 1]) { + DEBUG ((DEBUG_INFO, "PcdDxe - SkuId is found in SkuId=20 + table.\n")); Status =3D UpdatePcdDatabase (SkuId, TRUE); if (!EFI_ERROR (Status)) { mPcdDatabase.DxeDb->SystemSkuId =3D (SKU_ID) SkuId; @@ -320,7 +324= ,7 @@ DxePcdSetSku ( // // Invalid input SkuId, the default SKU Id will be still used for the sy= stem. // - DEBUG ((DEBUG_INFO, "PcdDxe - Invalid input SkuId, the default SKU Id wi= ll be still used.\n")); + DEBUG ((DEBUG_ERROR, "PcdDxe - Invalid input SkuId, the default SKU=20 + Id will be still used.\n")); return; } =20 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; =20 + DEBUG ((DEBUG_INFO, "PcdPei - SkuId 0x%lx is to be set.\n", (SKU_ID)=20 + SkuId)); + PeiPcdDb =3D GetPcdDatabase(); =20 if (SkuId =3D=3D PeiPcdDb->SystemSkuId) { // // The input SKU Id is equal to current SKU Id, return directly. // + DEBUG ((DEBUG_INFO, "PcdPei - SkuId is same to current system=20 + Sku.\n")); return; } =20 @@ -499,6 +502,7 @@ PeiPcdSetSku ( SkuIdTable =3D (SKU_ID *) ((UINT8 *) PeiPcdDb + PeiPcdDb->SkuIdTableOffs= et); for (Index =3D 0; Index < SkuIdTable[0]; Index++) { if (SkuId =3D=3D SkuIdTable[Index + 1]) { + DEBUG ((DEBUG_INFO, "PcdPei - SkuId is found in SkuId=20 + table.\n")); break; } } @@ -570,7 +574,7 @@ PeiPcdSetSku ( // // Invalid input SkuId, the default SKU Id will be still used for the sy= stem. // - DEBUG ((EFI_D_INFO, "PcdPei - Invalid input SkuId, the default SKU Id wi= ll be still used.\n")); + DEBUG ((DEBUG_ERROR, "PcdPei - Invalid input SkuId, the default SKU=20 + Id will be still used.\n")); =20 return; } -- 2.8.0.windows.1