mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/CapsuleApp: Enhance CapsuleApp for Fmp Capsule Dependency
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2421 1. Enhance "CapsuleApp -P" to output the depex expression op-codes in the EFI_FIRMWARE_IMAGE_DESCRIPTOR. 2. Enhance Last Attempt Status String with a new string to describe the error LAST_ATTEMPT_STATUS_ERROR_UNSATISFIED_DEPENDENCIES. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
48997fe4d3
commit
d9c919744b
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Dump Capsule image information.
|
Dump Capsule image information.
|
||||||
|
|
||||||
Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -338,6 +338,7 @@ CHAR8 *mLastAttemptStatusString[] = {
|
||||||
"Error: Auth Error",
|
"Error: Auth Error",
|
||||||
"Error: Power Event AC",
|
"Error: Power Event AC",
|
||||||
"Error: Power Event Battery",
|
"Error: Power Event Battery",
|
||||||
|
"Error: Unsatisfied Dependencies",
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1007,6 +1008,7 @@ DumpFmpImageInfo (
|
||||||
{
|
{
|
||||||
EFI_FIRMWARE_IMAGE_DESCRIPTOR *CurrentImageInfo;
|
EFI_FIRMWARE_IMAGE_DESCRIPTOR *CurrentImageInfo;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
UINTN Index2;
|
||||||
|
|
||||||
Print(L" DescriptorVersion - 0x%x\n", DescriptorVersion);
|
Print(L" DescriptorVersion - 0x%x\n", DescriptorVersion);
|
||||||
Print(L" DescriptorCount - 0x%x\n", DescriptorCount);
|
Print(L" DescriptorCount - 0x%x\n", DescriptorCount);
|
||||||
|
@ -1043,6 +1045,18 @@ DumpFmpImageInfo (
|
||||||
Print(L" LastAttemptVersion - 0x%x\n", CurrentImageInfo->LastAttemptVersion);
|
Print(L" LastAttemptVersion - 0x%x\n", CurrentImageInfo->LastAttemptVersion);
|
||||||
Print(L" LastAttemptStatus - 0x%x (%a)\n", CurrentImageInfo->LastAttemptStatus, LastAttemptStatusToString(CurrentImageInfo->LastAttemptStatus));
|
Print(L" LastAttemptStatus - 0x%x (%a)\n", CurrentImageInfo->LastAttemptStatus, LastAttemptStatusToString(CurrentImageInfo->LastAttemptStatus));
|
||||||
Print(L" HardwareInstance - 0x%lx\n", CurrentImageInfo->HardwareInstance);
|
Print(L" HardwareInstance - 0x%lx\n", CurrentImageInfo->HardwareInstance);
|
||||||
|
if (DescriptorVersion > 3) {
|
||||||
|
Print(L" Dependencies - ");
|
||||||
|
if (CurrentImageInfo->Dependencies == NULL) {
|
||||||
|
Print(L"NULL\n");
|
||||||
|
} else {
|
||||||
|
Index2 = 0;
|
||||||
|
do {
|
||||||
|
Print(L"%02x ", CurrentImageInfo->Dependencies->Dependencies[Index2]);
|
||||||
|
} while (CurrentImageInfo->Dependencies->Dependencies[Index2 ++] != EFI_FMP_DEP_END);
|
||||||
|
Print(L"\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue