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: 4f441d024b
("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>
This commit is contained in:
committed by
mergify[bot]
parent
71210053fa
commit
54051768cd
@@ -880,7 +880,7 @@ PiCpuSmmEntry (
|
|||||||
BufferPages = EFI_SIZE_TO_PAGES (SIZE_32KB + TileSize * (mMaxNumberOfCpus - 1));
|
BufferPages = EFI_SIZE_TO_PAGES (SIZE_32KB + TileSize * (mMaxNumberOfCpus - 1));
|
||||||
Buffer = AllocateAlignedCodePages (BufferPages, SIZE_4KB);
|
Buffer = AllocateAlignedCodePages (BufferPages, SIZE_4KB);
|
||||||
if (Buffer == NULL) {
|
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 ();
|
CpuDeadLoop ();
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user