From fd1820b7ea09e53e404d6f56bb8bc4b51a5dd83e Mon Sep 17 00:00:00 2001 From: Darbin Reyes Date: Tue, 7 Mar 2023 15:04:03 -0800 Subject: 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 Reviewed-by: Jacob Narey Reviewed-by: Michael D Kinney Reviewed-by: Eric Dong --- UefiCpuPkg/MicrocodeMeasurementDxe/MicrocodeMeasurementDxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'UefiCpuPkg') 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); -- cgit v1.2.3