summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2015-07-28 18:33:23 +0000
committerlersek <lersek@Edk2>2015-07-28 18:33:23 +0000
commit6394c35a7db3d7a7cc68f491179a45fe430a335a (patch)
tree537f8795716d685c64e7ea96c7455a022e6bf09d /OvmfPkg
parent00899456b809b7a0809e92d3e020435eece0effd (diff)
downloadedk2-6394c35a7db3d7a7cc68f491179a45fe430a335a.tar.gz
edk2-6394c35a7db3d7a7cc68f491179a45fe430a335a.tar.bz2
edk2-6394c35a7db3d7a7cc68f491179a45fe430a335a.zip
OvmfPkg: fix conversion specifiers in DEBUG format strings
Cc: Scott Duplichan <scott@notabs.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Reported-by: Scott Duplichan <scott@notabs.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Build-tested-by: Scott Duplichan <scott@notabs.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18095 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c15
-rw-r--r--OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.c8
-rw-r--r--OvmfPkg/Library/LoadLinuxLib/Linux.c3
-rw-r--r--OvmfPkg/Library/LockBoxLib/LockBoxLib.c2
-rw-r--r--OvmfPkg/Library/NvVarsFileLib/FsAccess.c8
-rw-r--r--OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.c6
-rw-r--r--OvmfPkg/Library/XenHypercallLib/XenHypercall.c4
-rw-r--r--OvmfPkg/PlatformPei/Platform.c2
-rw-r--r--OvmfPkg/QemuVideoDxe/Gop.c3
-rw-r--r--OvmfPkg/Sec/SecMain.c8
-rw-r--r--OvmfPkg/XenBusDxe/GrantTable.c11
-rw-r--r--OvmfPkg/XenPvBlkDxe/BlockFront.c10
-rw-r--r--OvmfPkg/XenPvBlkDxe/BlockIo.c8
13 files changed, 52 insertions, 36 deletions
diff --git a/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c b/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c
index 2e1040b612..f20560f8fe 100644
--- a/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c
+++ b/OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c
@@ -361,7 +361,8 @@ S3CreateIdentityMappingPageTables (
} else {
TotalPageTableSize = (UINTN)(1 + NumberOfPml4EntriesNeeded);
}
- DEBUG ((EFI_D_ERROR, "TotalPageTableSize - %x pages\n", TotalPageTableSize));
+ DEBUG ((EFI_D_ERROR, "TotalPageTableSize - %Lx pages\n",
+ (UINT64)TotalPageTableSize));
//
// By architecture only one PageMapLevel4 exists - so lets allocate storage for it.
@@ -450,10 +451,14 @@ S3Ready (
AcpiS3Context->S3DebugBufferAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateMemoryBelow4G (EfiReservedMemoryType, EFI_PAGE_SIZE);
SetMem ((VOID *)(UINTN)AcpiS3Context->S3DebugBufferAddress, EFI_PAGE_SIZE, 0xff);
- DEBUG((EFI_D_INFO, "AcpiS3Context: AcpiFacsTable is 0x%8x\n", AcpiS3Context->AcpiFacsTable));
- DEBUG((EFI_D_INFO, "AcpiS3Context: IdtrProfile is 0x%8x\n", AcpiS3Context->IdtrProfile));
- DEBUG((EFI_D_INFO, "AcpiS3Context: S3NvsPageTableAddress is 0x%8x\n", AcpiS3Context->S3NvsPageTableAddress));
- DEBUG((EFI_D_INFO, "AcpiS3Context: S3DebugBufferAddress is 0x%8x\n", AcpiS3Context->S3DebugBufferAddress));
+ DEBUG ((EFI_D_INFO, "AcpiS3Context: AcpiFacsTable is 0x%8Lx\n",
+ AcpiS3Context->AcpiFacsTable));
+ DEBUG ((EFI_D_INFO, "AcpiS3Context: IdtrProfile is 0x%8Lx\n",
+ AcpiS3Context->IdtrProfile));
+ DEBUG ((EFI_D_INFO, "AcpiS3Context: S3NvsPageTableAddress is 0x%8Lx\n",
+ AcpiS3Context->S3NvsPageTableAddress));
+ DEBUG ((EFI_D_INFO, "AcpiS3Context: S3DebugBufferAddress is 0x%8Lx\n",
+ AcpiS3Context->S3DebugBufferAddress));
Status = SaveLockBox (
&gEfiAcpiVariableGuid,
diff --git a/OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.c b/OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.c
index af9e85ed4e..939792f2ad 100644
--- a/OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.c
+++ b/OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.c
@@ -187,7 +187,8 @@ BlockIoReadBlocks (
OUT VOID *Buffer
)
{
- DEBUG ((EFI_D_INFO, "BlockIo (MMIO) ReadBlocks: lba=0x%lx, size=0x%x\n", Lba, BufferSize));
+ DEBUG ((EFI_D_INFO, "BlockIo (MMIO) ReadBlocks: lba=0x%Lx, size=0x%Lx\n",
+ Lba, (UINT64)BufferSize));
return ReadOrWriteBlocks (
This,
TRUE,
@@ -234,7 +235,8 @@ BlockIoWriteBlocks (
IN VOID *Buffer
)
{
- DEBUG ((EFI_D_INFO, "BlockIo (MMIO) WriteBlocks: lba=0x%lx, size=0x%x\n", Lba, BufferSize));
+ DEBUG ((EFI_D_INFO, "BlockIo (MMIO) WriteBlocks: lba=0x%Lx, size=0x%Lx\n",
+ Lba, (UINT64)BufferSize));
return ReadOrWriteBlocks (
This,
FALSE,
@@ -309,7 +311,7 @@ BlockIoInit (
DEBUG ((EFI_D_ERROR, "BlockIoInit: OpenBlockMmioProtocol By Driver (%r)\n", Status));
goto ON_ERROR;
}
- DEBUG ((EFI_D_INFO, "BlockMmio: 0x%x\n", BlockMmio));
+ DEBUG ((EFI_D_INFO, "BlockMmio: %p\n", BlockMmio));
DEBUG ((EFI_D_INFO, "BlockMmio->Media->LastBlock: 0x%lx\n", BlockMmio->Media->LastBlock));
Private->Signature = BLOCK_MMIO_TO_BLOCK_IO_SIGNATURE;
diff --git a/OvmfPkg/Library/LoadLinuxLib/Linux.c b/OvmfPkg/Library/LoadLinuxLib/Linux.c
index 353990b980..9c996adfbb 100644
--- a/OvmfPkg/Library/LoadLinuxLib/Linux.c
+++ b/OvmfPkg/Library/LoadLinuxLib/Linux.c
@@ -143,7 +143,8 @@ LoadLinuxInitializeKernelSetup (
//
ZeroMem (KernelSetup, 0x1f1);
ZeroMem (((UINT8 *)KernelSetup) + SetupEnd, 4096 - SetupEnd);
- DEBUG ((EFI_D_INFO, "Cleared kernel setup 0-0x1f1, 0x%x-0x1000\n", SetupEnd));
+ DEBUG ((EFI_D_INFO, "Cleared kernel setup 0-0x1f1, 0x%Lx-0x1000\n",
+ (UINT64)SetupEnd));
return EFI_SUCCESS;
}
diff --git a/OvmfPkg/Library/LockBoxLib/LockBoxLib.c b/OvmfPkg/Library/LockBoxLib/LockBoxLib.c
index af3bb7f46d..89050ac87c 100644
--- a/OvmfPkg/Library/LockBoxLib/LockBoxLib.c
+++ b/OvmfPkg/Library/LockBoxLib/LockBoxLib.c
@@ -369,7 +369,7 @@ RestoreAllLockBoxInPlace (
Buffer = (VOID *)(UINTN) Header->OrigAddress;
CopyMem (Buffer, (VOID*)(UINTN)Header->CopyAddress, Header->Size);
DEBUG ((DEBUG_VERBOSE, "%a: Guid=%g Buffer=%p\n", __FUNCTION__,
- Header->Guid, Buffer));
+ &Header->Guid, Buffer));
}
}
return RETURN_SUCCESS;
diff --git a/OvmfPkg/Library/NvVarsFileLib/FsAccess.c b/OvmfPkg/Library/NvVarsFileLib/FsAccess.c
index 66b5566c75..5df8de4985 100644
--- a/OvmfPkg/Library/NvVarsFileLib/FsAccess.c
+++ b/OvmfPkg/Library/NvVarsFileLib/FsAccess.c
@@ -255,8 +255,8 @@ ReadNvVarsFile (
DEBUG ((
EFI_D_INFO,
- "FsAccess.c: Read %d bytes from NV Variables file\n",
- FileSize
+ "FsAccess.c: Read %Lu bytes from NV Variables file\n",
+ (UINT64)FileSize
));
Status = SerializeVariablesNewInstanceFromBuffer (
@@ -369,8 +369,8 @@ LoadNvVarsFromFs (
DEBUG ((
EFI_D_INFO,
- "FsAccess.c: Read NV Variables file (size=%d)\n",
- Size
+ "FsAccess.c: Read NV Variables file (size=%Lu)\n",
+ (UINT64)Size
));
return Status;
diff --git a/OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.c b/OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.c
index 19569b2ae0..6822c5c725 100644
--- a/OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.c
+++ b/OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.c
@@ -218,9 +218,9 @@ IterateVariablesInBuffer (
if (TotalSizeUsed != MaxSize) {
DEBUG ((
EFI_D_ERROR,
- "Deserialize variables error: TotalSizeUsed(%d) != MaxSize(%d)\n",
- TotalSizeUsed,
- MaxSize
+ "Deserialize variables error: TotalSizeUsed(%Lu) != MaxSize(%Lu)\n",
+ (UINT64)TotalSizeUsed,
+ (UINT64)MaxSize
));
return EFI_INVALID_PARAMETER;
}
diff --git a/OvmfPkg/Library/XenHypercallLib/XenHypercall.c b/OvmfPkg/Library/XenHypercallLib/XenHypercall.c
index ecc757cf70..82cdbd9bdb 100644
--- a/OvmfPkg/Library/XenHypercallLib/XenHypercall.c
+++ b/OvmfPkg/Library/XenHypercallLib/XenHypercall.c
@@ -35,8 +35,8 @@ XenHypercallHvmGetParam (
HVMOP_get_param, (INTN) &Parameter);
if (Error != 0) {
DEBUG ((EFI_D_ERROR,
- "XenHypercall: Error %d trying to get HVM parameter %d\n",
- Error, Index));
+ "XenHypercall: Error %Ld trying to get HVM parameter %d\n",
+ (INT64)Error, Index));
return 0;
}
return Parameter.value;
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index fc98fc35e0..87c51d7a9c 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -365,7 +365,7 @@ DebugDumpCmos (
VOID
)
{
- UINTN Loop;
+ UINT32 Loop;
DEBUG ((EFI_D_INFO, "CMOS:\n"));
diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c
index 2ff4bcfeba..18d0779896 100644
--- a/OvmfPkg/QemuVideoDxe/Gop.c
+++ b/OvmfPkg/QemuVideoDxe/Gop.c
@@ -70,7 +70,8 @@ QemuVideoCompleteModeData (
Mode->FrameBufferBase = FrameBufDesc->AddrRangeMin;
Mode->FrameBufferSize = Info->HorizontalResolution * Info->VerticalResolution;
Mode->FrameBufferSize = Mode->FrameBufferSize * ((ModeData->ColorDepth + 7) / 8);
- DEBUG ((EFI_D_INFO, "FrameBufferBase: 0x%x, FrameBufferSize: 0x%x\n", Mode->FrameBufferBase, Mode->FrameBufferSize));
+ DEBUG ((EFI_D_INFO, "FrameBufferBase: 0x%Lx, FrameBufferSize: 0x%Lx\n",
+ Mode->FrameBufferBase, (UINT64)Mode->FrameBufferSize));
FreePool (FrameBufDesc);
return EFI_SUCCESS;
diff --git a/OvmfPkg/Sec/SecMain.c b/OvmfPkg/Sec/SecMain.c
index 670ad8d763..b7df549f31 100644
--- a/OvmfPkg/Sec/SecMain.c
+++ b/OvmfPkg/Sec/SecMain.c
@@ -836,10 +836,10 @@ TemporaryRamMigration (
BASE_LIBRARY_JUMP_BUFFER JumpBuffer;
DEBUG ((EFI_D_INFO,
- "TemporaryRamMigration(0x%x, 0x%x, 0x%x)\n",
- (UINTN) TemporaryMemoryBase,
- (UINTN) PermanentMemoryBase,
- CopySize
+ "TemporaryRamMigration(0x%Lx, 0x%Lx, 0x%Lx)\n",
+ TemporaryMemoryBase,
+ PermanentMemoryBase,
+ (UINT64)CopySize
));
OldHeap = (VOID*)(UINTN)TemporaryMemoryBase;
diff --git a/OvmfPkg/XenBusDxe/GrantTable.c b/OvmfPkg/XenBusDxe/GrantTable.c
index 6e47483f13..90dec26ab0 100644
--- a/OvmfPkg/XenBusDxe/GrantTable.c
+++ b/OvmfPkg/XenBusDxe/GrantTable.c
@@ -162,7 +162,9 @@ XenGrantTableInit (
Parameters.gpfn = (xen_pfn_t) ((UINTN) GrantTable >> EFI_PAGE_SHIFT) + Index;
ReturnCode = XenHypercallMemoryOp (XENMEM_add_to_physmap, &Parameters);
if (ReturnCode != 0) {
- DEBUG ((EFI_D_ERROR, "Xen GrantTable, add_to_physmap hypercall error: %d\n", ReturnCode));
+ DEBUG ((EFI_D_ERROR,
+ "Xen GrantTable, add_to_physmap hypercall error: %Ld\n",
+ (INT64)ReturnCode));
}
}
}
@@ -182,10 +184,13 @@ XenGrantTableDeinit (
for (Index = NR_GRANT_FRAMES - 1; Index >= 0; Index--) {
Parameters.domid = DOMID_SELF;
Parameters.gpfn = (xen_pfn_t) ((UINTN) GrantTable >> EFI_PAGE_SHIFT) + Index;
- DEBUG ((EFI_D_INFO, "Xen GrantTable, removing %X\n", Parameters.gpfn));
+ DEBUG ((EFI_D_INFO, "Xen GrantTable, removing %Lx\n",
+ (UINT64)Parameters.gpfn));
ReturnCode = XenHypercallMemoryOp (XENMEM_remove_from_physmap, &Parameters);
if (ReturnCode != 0) {
- DEBUG ((EFI_D_ERROR, "Xen GrantTable, remove_from_physmap hypercall error: %d\n", ReturnCode));
+ DEBUG ((EFI_D_ERROR,
+ "Xen GrantTable, remove_from_physmap hypercall error: %Ld\n",
+ (INT64)ReturnCode));
}
}
GrantTable = NULL;
diff --git a/OvmfPkg/XenPvBlkDxe/BlockFront.c b/OvmfPkg/XenPvBlkDxe/BlockFront.c
index afaa95983b..256ac55f25 100644
--- a/OvmfPkg/XenPvBlkDxe/BlockFront.c
+++ b/OvmfPkg/XenPvBlkDxe/BlockFront.c
@@ -278,7 +278,7 @@ Again:
//
// This is not supported by the driver.
//
- DEBUG ((EFI_D_ERROR, "XenPvBlk: Unsupported sector-size value %d, "
+ DEBUG ((EFI_D_ERROR, "XenPvBlk: Unsupported sector-size value %Lu, "
"it must be a multiple of 512\n", Value));
goto Error2;
}
@@ -384,7 +384,7 @@ XenPvBlockFrontShutdown (
break;
}
DEBUG ((EFI_D_INFO,
- "XenPvBlk: waiting backend state %d, current: %d\n",
+ "XenPvBlk: waiting backend state %d, current: %Lu\n",
XenbusStateInitWait, Value));
XenBusIo->WaitForWatch (XenBusIo, Dev->StateWatchToken);
}
@@ -596,11 +596,11 @@ XenPvBlockAsyncIoPoll (
if (Status != BLKIF_RSP_OKAY) {
DEBUG ((EFI_D_ERROR,
"XenPvBlk: "
- "%a error %d on %a at sector %p, num bytes %p\n",
+ "%a error %d on %a at sector %Lx, num bytes %Lx\n",
Response->operation == BLKIF_OP_READ ? "read" : "write",
Status, IoData->Dev->NodeName,
- IoData->Sector,
- IoData->Size));
+ (UINT64)IoData->Sector,
+ (UINT64)IoData->Size));
}
for (Index = 0; Index < IoData->NumRef; Index++) {
diff --git a/OvmfPkg/XenPvBlkDxe/BlockIo.c b/OvmfPkg/XenPvBlkDxe/BlockIo.c
index 7fc7a05b4c..ae6aa62ac0 100644
--- a/OvmfPkg/XenPvBlkDxe/BlockIo.c
+++ b/OvmfPkg/XenPvBlkDxe/BlockIo.c
@@ -95,14 +95,16 @@ XenPvBlkDxeBlockIoReadWriteBlocks (
}
if (BufferSize % Media->BlockSize != 0) {
- DEBUG ((EFI_D_ERROR, "XenPvBlkDxe: Bad buffer size: 0x%X\n", BufferSize));
+ DEBUG ((EFI_D_ERROR, "XenPvBlkDxe: Bad buffer size: 0x%Lx\n",
+ (UINT64)BufferSize));
return EFI_BAD_BUFFER_SIZE;
}
if (Lba > Media->LastBlock ||
(BufferSize / Media->BlockSize) - 1 > Media->LastBlock - Lba) {
- DEBUG ((EFI_D_ERROR, "XenPvBlkDxe: %a with invalid LBA: 0x%LX, size: 0x%x\n",
- IsWrite ? "Write" : "Read", Lba, BufferSize));
+ DEBUG ((EFI_D_ERROR,
+ "XenPvBlkDxe: %a with invalid LBA: 0x%Lx, size: 0x%Lx\n",
+ IsWrite ? "Write" : "Read", Lba, (UINT64)BufferSize));
return EFI_INVALID_PARAMETER;
}