mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
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> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
29c5075787
commit
f71503c37c
@ -273,10 +273,13 @@ DxePcdSetSku (
|
|||||||
UINTN Index;
|
UINTN Index;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
DEBUG ((DEBUG_INFO, "PcdDxe - SkuId 0x%lx is to be set.\n", (SKU_ID) SkuId));
|
||||||
|
|
||||||
if (SkuId == mPcdDatabase.DxeDb->SystemSkuId) {
|
if (SkuId == mPcdDatabase.DxeDb->SystemSkuId) {
|
||||||
//
|
//
|
||||||
// The input SKU Id is equal to current SKU Id, return directly.
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,6 +298,7 @@ DxePcdSetSku (
|
|||||||
SkuIdTable = (SKU_ID *) ((UINT8 *) mPcdDatabase.DxeDb + mPcdDatabase.DxeDb->SkuIdTableOffset);
|
SkuIdTable = (SKU_ID *) ((UINT8 *) mPcdDatabase.DxeDb + mPcdDatabase.DxeDb->SkuIdTableOffset);
|
||||||
for (Index = 0; Index < SkuIdTable[0]; Index++) {
|
for (Index = 0; Index < SkuIdTable[0]; Index++) {
|
||||||
if (SkuId == SkuIdTable[Index + 1]) {
|
if (SkuId == SkuIdTable[Index + 1]) {
|
||||||
|
DEBUG ((DEBUG_INFO, "PcdDxe - SkuId is found in SkuId table.\n"));
|
||||||
Status = UpdatePcdDatabase (SkuId, TRUE);
|
Status = UpdatePcdDatabase (SkuId, TRUE);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
mPcdDatabase.DxeDb->SystemSkuId = (SKU_ID) SkuId;
|
mPcdDatabase.DxeDb->SystemSkuId = (SKU_ID) SkuId;
|
||||||
@ -307,7 +311,7 @@ DxePcdSetSku (
|
|||||||
//
|
//
|
||||||
// Invalid input SkuId, the default SKU Id will be still used for the system.
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -475,12 +475,15 @@ PeiPcdSetSku (
|
|||||||
PCD_DATABASE_SKU_DELTA *SkuDelta;
|
PCD_DATABASE_SKU_DELTA *SkuDelta;
|
||||||
PCD_DATA_DELTA *SkuDeltaData;
|
PCD_DATA_DELTA *SkuDeltaData;
|
||||||
|
|
||||||
|
DEBUG ((DEBUG_INFO, "PcdPei - SkuId 0x%lx is to be set.\n", (SKU_ID) SkuId));
|
||||||
|
|
||||||
PeiPcdDb = GetPcdDatabase();
|
PeiPcdDb = GetPcdDatabase();
|
||||||
|
|
||||||
if (SkuId == PeiPcdDb->SystemSkuId) {
|
if (SkuId == PeiPcdDb->SystemSkuId) {
|
||||||
//
|
//
|
||||||
// The input SKU Id is equal to current SKU Id, return directly.
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -499,6 +502,7 @@ PeiPcdSetSku (
|
|||||||
SkuIdTable = (SKU_ID *) ((UINT8 *) PeiPcdDb + PeiPcdDb->SkuIdTableOffset);
|
SkuIdTable = (SKU_ID *) ((UINT8 *) PeiPcdDb + PeiPcdDb->SkuIdTableOffset);
|
||||||
for (Index = 0; Index < SkuIdTable[0]; Index++) {
|
for (Index = 0; Index < SkuIdTable[0]; Index++) {
|
||||||
if (SkuId == SkuIdTable[Index + 1]) {
|
if (SkuId == SkuIdTable[Index + 1]) {
|
||||||
|
DEBUG ((DEBUG_INFO, "PcdPei - SkuId is found in SkuId table.\n"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -570,7 +574,7 @@ PeiPcdSetSku (
|
|||||||
//
|
//
|
||||||
// Invalid input SkuId, the default SKU Id will be still used for the system.
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user