summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarbin Reyes <darbin.reyes@intel.com>2023-03-07 15:04:03 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-03-10 07:13:14 +0000
commitfd1820b7ea09e53e404d6f56bb8bc4b51a5dd83e (patch)
tree1a0c32bb4e259183640ec2cb9f8d81a2515c865d
parent4ca4041b0dbb310109d9cb047ed428a0082df395 (diff)
downloadedk2-fd1820b7ea09e53e404d6f56bb8bc4b51a5dd83e.tar.gz
edk2-fd1820b7ea09e53e404d6f56bb8bc4b51a5dd83e.tar.bz2
edk2-fd1820b7ea09e53e404d6f56bb8bc4b51a5dd83e.zip
UefiCpuPkg/MicrocodeMeasurementDxe: Fix exception
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4360 An incorrect format specifier is being used in a DEBUG print, specifically, a variable of type EFI_STATUS was being printed with the %a format specifier (pointer to an ASCII string), thus the value of the Status variable was being treated as the address of a string, leading to a CPU exception, when encountered this bug manifests itself as a hang near "Ready to Boot Event", with the last DEBUG print being "INFO: Got MicrocodePatchHob with microcode patches starting address" followed by a CPU Exception dump. Signed-off-by: Darbin Reyes <darbin.reyes@intel.com> Reviewed-by: Jacob Narey <jacob.narey@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
-rw-r--r--UefiCpuPkg/MicrocodeMeasurementDxe/MicrocodeMeasurementDxe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/UefiCpuPkg/MicrocodeMeasurementDxe/MicrocodeMeasurementDxe.c b/UefiCpuPkg/MicrocodeMeasurementDxe/MicrocodeMeasurementDxe.c
index 762ca159ff..5fd3b3365c 100644
--- a/UefiCpuPkg/MicrocodeMeasurementDxe/MicrocodeMeasurementDxe.c
+++ b/UefiCpuPkg/MicrocodeMeasurementDxe/MicrocodeMeasurementDxe.c
@@ -238,7 +238,7 @@ MeasureMicrocodePatches (
TotalMicrocodeSize)
);
} else {
- DEBUG ((DEBUG_ERROR, "ERROR: TpmMeasureAndLogData failed with status %a!\n", Status));
+ DEBUG ((DEBUG_ERROR, "ERROR: TpmMeasureAndLogData failed with status %r!\n", Status));
}
FreePool (Offsets);