From 82b95709185c15f68c9c254f652ffe46ebbba239 Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Thu, 7 Dec 2017 10:48:04 +0800 Subject: [PATCH] UefiCpuPkg/MtrrLib: Correct debug message When printing the ascii format of memory attribute in debug message, %s was used, but %a should be used. The patch additionally changes %x to %r for EFI_STATUS. The whole patch doesn't impact functionality of the MtrrLib. Just debug message fix. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Reviewed-by: Eric Dong Cc: Ming Shao --- UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c index 9c66f93ac2..619b500c1d 100644 --- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c +++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c @@ -2489,7 +2489,7 @@ MtrrSetMemoryAttributeInMtrrSettings ( Range.Type = Attribute; ScratchSize = sizeof (Scratch); Status = MtrrSetMemoryAttributesInMtrrSettings (MtrrSetting, Scratch, &ScratchSize, &Range, 1); - DEBUG ((DEBUG_CACHE, "MtrrSetMemoryAttribute(MtrrSettings = %p) %s: [%016lx, %016lx) - %x\n", + DEBUG ((DEBUG_CACHE, "MtrrSetMemoryAttribute(MtrrSettings = %p) %a: [%016lx, %016lx) - %r\n", MtrrSetting, mMtrrMemoryCacheTypeShortName[Attribute], BaseAddress, BaseAddress + Length, Status)); -- 2.39.2