diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2023-03-27 16:02:07 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-04-01 03:15:51 +0000 |
commit | 54051768cdf69e2b46dc4fe1a85455d631aa2634 (patch) | |
tree | cfcb3ace840ea3ff6f44c07f17063e5182c09e3b /UefiCpuPkg | |
parent | 71210053fafcca7ccfd180258263e737dbe09555 (diff) | |
download | edk2-54051768cdf69e2b46dc4fe1a85455d631aa2634.tar.gz edk2-54051768cdf69e2b46dc4fe1a85455d631aa2634.tar.bz2 edk2-54051768cdf69e2b46dc4fe1a85455d631aa2634.zip |
UefiCpuPkg/PiSmmCpuDxeSmm: fix format string
BufferPages is UINTN, so we need "%Lu" when printing it to avoid
it being truncated. Also cast to UINT64 to make sure it works
for 32bit builds too.
Fixes: 4f441d024bee ("UefiCpuPkg/PiSmmCpuDxeSmm: fix error handling")
Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c index cf69161caa..c0e368ea94 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c @@ -880,7 +880,7 @@ PiCpuSmmEntry ( BufferPages = EFI_SIZE_TO_PAGES (SIZE_32KB + TileSize * (mMaxNumberOfCpus - 1));
Buffer = AllocateAlignedCodePages (BufferPages, SIZE_4KB);
if (Buffer == NULL) {
- DEBUG ((DEBUG_ERROR, "Failed to allocate %d pages.\n", BufferPages));
+ DEBUG ((DEBUG_ERROR, "Failed to allocate %Lu pages.\n", (UINT64)BufferPages));
CpuDeadLoop ();
return EFI_OUT_OF_RESOURCES;
}
|