mirror of https://github.com/acidanthera/audk.git
check the usage of %d,%x,%ld,%lx and so on in debug print statement.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7080 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d20c09b282
commit
7df7393feb
|
@ -87,7 +87,7 @@ EhcDumpQtd (
|
|||
DEBUG ((EFI_D_INFO, Msg));
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Queue TD @ 0x%x, data length %d\n", Qtd, Qtd->DataLen));
|
||||
DEBUG ((EFI_D_INFO, "Queue TD @ 0x%p, data length %d\n", Qtd, (UINT32)Qtd->DataLen));
|
||||
|
||||
QtdHw = &Qtd->QtdHw;
|
||||
|
||||
|
@ -114,7 +114,7 @@ EhcDumpQtd (
|
|||
DEBUG ((EFI_D_INFO, "Data Toggle : %d\n", QtdHw->DataToggle));
|
||||
|
||||
for (Index = 0; Index < 5; Index++) {
|
||||
DEBUG ((EFI_D_INFO, "Page[%d] : 0x%x\n", Index, QtdHw->Page[Index]));
|
||||
DEBUG ((EFI_D_INFO, "Page[%d] : 0x%x\n", (UINT32)Index, QtdHw->Page[Index]));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,8 +145,8 @@ EhcDumpQh (
|
|||
DEBUG ((EFI_D_INFO, Msg));
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Queue head @ 0x%p, interval %d, next qh %x\n",
|
||||
Qh, Qh->Interval, Qh->NextQh));
|
||||
DEBUG ((EFI_D_INFO, "Queue head @ 0x%p, interval %ld, next qh %p\n",
|
||||
Qh, (UINT64)Qh->Interval, Qh->NextQh));
|
||||
|
||||
QhHw = &Qh->QhHw;
|
||||
|
||||
|
|
|
@ -659,7 +659,7 @@ EhcExecTransfer (
|
|||
}
|
||||
|
||||
if (!Finished) {
|
||||
DEBUG ((EFI_D_ERROR, "EhcExecTransfer: transfer not finished in %dms\n", TimeOut));
|
||||
DEBUG ((EFI_D_ERROR, "EhcExecTransfer: transfer not finished in %dms\n", (UINT32)TimeOut));
|
||||
EhcDumpQh (Urb->Qh, NULL, FALSE);
|
||||
|
||||
Status = EFI_TIMEOUT;
|
||||
|
|
|
@ -318,7 +318,7 @@ Uhci2GetCapability (
|
|||
|
||||
Uhc->RootPorts = *PortNumber;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Uhci2GetCapability: %d ports\n", Uhc->RootPorts));
|
||||
DEBUG ((EFI_D_INFO, "Uhci2GetCapability: %d ports\n", (UINT32)Uhc->RootPorts));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@ UhciDumpQh (
|
|||
IN UHCI_QH_SW *QhSw
|
||||
)
|
||||
{
|
||||
DEBUG ((EFI_D_INFO, "&QhSw @ 0x%x\n", QhSw));
|
||||
DEBUG ((EFI_D_INFO, "QhSw.NextQh - 0x%x\n", QhSw->NextQh));
|
||||
DEBUG ((EFI_D_INFO, "QhSw.TDs - 0x%x\n", QhSw->TDs));
|
||||
DEBUG ((EFI_D_INFO, "&QhSw @ 0x%p\n", QhSw));
|
||||
DEBUG ((EFI_D_INFO, "QhSw.NextQh - 0x%p\n", QhSw->NextQh));
|
||||
DEBUG ((EFI_D_INFO, "QhSw.TDs - 0x%p\n", QhSw->TDs));
|
||||
DEBUG ((EFI_D_INFO, "QhSw.QhHw:\n"));
|
||||
DEBUG ((EFI_D_INFO, " Horizon Link - %x\n", QhSw->QhHw.HorizonLink));
|
||||
DEBUG ((EFI_D_INFO, " Vertical Link - %x\n\n", QhSw->QhHw.VerticalLink));
|
||||
|
@ -51,10 +51,10 @@ UhciDumpTds (
|
|||
CurTdSw = TdSw;
|
||||
|
||||
while (CurTdSw != NULL) {
|
||||
DEBUG ((EFI_D_INFO, "TdSw @ 0x%x\n", CurTdSw));
|
||||
DEBUG ((EFI_D_INFO, "TdSw.NextTd - 0x%x\n", CurTdSw->NextTd));
|
||||
DEBUG ((EFI_D_INFO, "TdSw @ 0x%p\n", CurTdSw));
|
||||
DEBUG ((EFI_D_INFO, "TdSw.NextTd - 0x%p\n", CurTdSw->NextTd));
|
||||
DEBUG ((EFI_D_INFO, "TdSw.DataLen - %d\n", CurTdSw->DataLen));
|
||||
DEBUG ((EFI_D_INFO, "TdSw.Data - 0x%x\n", CurTdSw->Data));
|
||||
DEBUG ((EFI_D_INFO, "TdSw.Data - 0x%p\n", CurTdSw->Data));
|
||||
DEBUG ((EFI_D_INFO, "TdHw:\n"));
|
||||
DEBUG ((EFI_D_INFO, " NextLink - 0x%x\n", CurTdSw->TdHw.NextLink));
|
||||
DEBUG ((EFI_D_INFO, " ActualLen - %d\n", CurTdSw->TdHw.ActualLen));
|
||||
|
|
|
@ -577,7 +577,7 @@ UhciExecuteTransfer (
|
|||
}
|
||||
|
||||
if (!Finished) {
|
||||
DEBUG ((EFI_D_ERROR, "UhciExecuteTransfer: execution not finished for %dms\n", TimeOut));
|
||||
DEBUG ((EFI_D_ERROR, "UhciExecuteTransfer: execution not finished for %dms\n", (UINT32)TimeOut));
|
||||
UhciDumpQh (Qh);
|
||||
UhciDumpTds (Td);
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ UsbParseInterfaceDesc (
|
|||
NumEp = Setting->Desc.NumEndpoints;
|
||||
|
||||
DEBUG (( EFI_D_INFO, "UsbParseInterfaceDesc: interface %d(setting %d) has %d endpoints\n",
|
||||
Setting->Desc.InterfaceNumber, Setting->Desc.AlternateSetting, NumEp));
|
||||
Setting->Desc.InterfaceNumber, Setting->Desc.AlternateSetting, (UINT32)NumEp));
|
||||
|
||||
if (NumEp == 0) {
|
||||
goto ON_EXIT;
|
||||
|
@ -270,7 +270,7 @@ UsbParseInterfaceDesc (
|
|||
Ep = UsbCreateDesc (DescBuf + Offset, Len - Offset, USB_DESC_TYPE_ENDPOINT, &Used);
|
||||
|
||||
if (Ep == NULL) {
|
||||
DEBUG (( EFI_D_ERROR, "UsbParseInterfaceDesc: failed to create endpoint(index %d)\n", Index));
|
||||
DEBUG (( EFI_D_ERROR, "UsbParseInterfaceDesc: failed to create endpoint(index %d)\n", (UINT32)Index));
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
|
@ -330,7 +330,7 @@ UsbParseConfigDesc (
|
|||
}
|
||||
|
||||
DEBUG (( EFI_D_INFO, "UsbParseConfigDesc: config %d has %d interfaces\n",
|
||||
Config->Desc.ConfigurationValue, NumIf));
|
||||
Config->Desc.ConfigurationValue, (UINT32)NumIf));
|
||||
|
||||
for (Index = 0; Index < NumIf; Index++) {
|
||||
Interface = AllocateZeroPool (sizeof (USB_INTERFACE_DESC));
|
||||
|
@ -721,7 +721,7 @@ UsbGetOneConfig (
|
|||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG (( EFI_D_ERROR, "UsbGetOneConfig: failed to get descript length(%d) %r\n",
|
||||
Status, Desc.TotalLength));
|
||||
Desc.TotalLength, Status));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -280,14 +280,14 @@ UsbConnectDriver (
|
|||
//
|
||||
if (UsbBusIsWantedUsbIO (UsbIf->Device->Bus, UsbIf)) {
|
||||
OldTpl = UsbGetCurrentTpl ();
|
||||
DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL before connect is %d\n", OldTpl));
|
||||
DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL before connect is %d\n", (UINT32)OldTpl));
|
||||
|
||||
gBS->RestoreTPL (TPL_CALLBACK);
|
||||
|
||||
Status = gBS->ConnectController (UsbIf->Handle, NULL, NULL, TRUE);
|
||||
UsbIf->IsManaged = (BOOLEAN)!EFI_ERROR (Status);
|
||||
|
||||
DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL after connect is %d\n", UsbGetCurrentTpl()));
|
||||
DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL after connect is %d\n", (UINT32)UsbGetCurrentTpl()));
|
||||
ASSERT (UsbGetCurrentTpl () == TPL_CALLBACK);
|
||||
|
||||
gBS->RaiseTPL (OldTpl);
|
||||
|
@ -472,14 +472,14 @@ UsbDisconnectDriver (
|
|||
// or disconnect at CALLBACK.
|
||||
//
|
||||
OldTpl = UsbGetCurrentTpl ();
|
||||
DEBUG ((EFI_D_INFO, "UsbDisconnectDriver: old TPL is %d\n", OldTpl));
|
||||
DEBUG ((EFI_D_INFO, "UsbDisconnectDriver: old TPL is %d\n", (UINT32)OldTpl));
|
||||
|
||||
gBS->RestoreTPL (TPL_CALLBACK);
|
||||
|
||||
gBS->DisconnectController (UsbIf->Handle, NULL, NULL);
|
||||
UsbIf->IsManaged = FALSE;
|
||||
|
||||
DEBUG (( EFI_D_INFO, "UsbDisconnectDriver: TPL after disconnect is %d\n", UsbGetCurrentTpl()));
|
||||
DEBUG (( EFI_D_INFO, "UsbDisconnectDriver: TPL after disconnect is %d\n", (UINT32)UsbGetCurrentTpl()));
|
||||
ASSERT (UsbGetCurrentTpl () == TPL_CALLBACK);
|
||||
|
||||
gBS->RaiseTPL (OldTpl);
|
||||
|
|
|
@ -1330,10 +1330,10 @@ UsbBusRecursivelyConnectWantedUsbIo (
|
|||
//
|
||||
// Recursively connect the wanted Usb Io handle
|
||||
//
|
||||
DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL before connect is %d\n", UsbGetCurrentTpl ()));
|
||||
DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL before connect is %d\n", (UINT32)UsbGetCurrentTpl ()));
|
||||
Status = gBS->ConnectController (UsbIf->Handle, NULL, NULL, TRUE);
|
||||
UsbIf->IsManaged = (BOOLEAN)!EFI_ERROR (Status);
|
||||
DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL after connect is %d\n", UsbGetCurrentTpl()));
|
||||
DEBUG ((EFI_D_INFO, "UsbConnectDriver: TPL after connect is %d\n", (UINT32)UsbGetCurrentTpl()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -690,7 +690,7 @@ ON_ERROR:
|
|||
(Media->LastBlock != OldMedia.LastBlock)) {
|
||||
|
||||
OldTpl = UsbGetCurrentTpl ();
|
||||
DEBUG ((EFI_D_ERROR, "UsbBootDetectMedia: TPL before reinstall BlockIoProtocol is %d\n", OldTpl));
|
||||
DEBUG ((EFI_D_ERROR, "UsbBootDetectMedia: TPL before reinstall BlockIoProtocol is %d\n", (UINT32)OldTpl));
|
||||
|
||||
gBS->RestoreTPL (TPL_CALLBACK);
|
||||
|
||||
|
@ -701,7 +701,7 @@ ON_ERROR:
|
|||
&UsbMass->BlockIo
|
||||
);
|
||||
|
||||
DEBUG ((EFI_D_ERROR, "UsbBootDetectMedia: TPL after reinstall is %d\n", UsbGetCurrentTpl()));
|
||||
DEBUG ((EFI_D_ERROR, "UsbBootDetectMedia: TPL after reinstall is %d\n", (UINT32)UsbGetCurrentTpl()));
|
||||
ASSERT (UsbGetCurrentTpl () == TPL_CALLBACK);
|
||||
|
||||
gBS->RaiseTPL (OldTpl);
|
||||
|
|
|
@ -961,7 +961,7 @@ USBMassDriverBindingStop (
|
|||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
AllChildrenStopped = FALSE;
|
||||
DEBUG ((EFI_D_ERROR, "Fail to stop No.%d multi-lun child handle when opening blockio\n", Index));
|
||||
DEBUG ((EFI_D_ERROR, "Fail to stop No.%d multi-lun child handle when opening blockio\n", (UINT32)Index));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -988,7 +988,7 @@ USBMassDriverBindingStop (
|
|||
// Fail to uninstall blockio and devicepath protocol, so re-open usbio by child.
|
||||
//
|
||||
AllChildrenStopped = FALSE;
|
||||
DEBUG ((EFI_D_ERROR, "Fail to stop No.%d multi-lun child handle when uninstalling blockio and devicepath\n", Index));
|
||||
DEBUG ((EFI_D_ERROR, "Fail to stop No.%d multi-lun child handle when uninstalling blockio and devicepath\n", (UINT32)Index));
|
||||
|
||||
gBS->OpenProtocol (
|
||||
Controller,
|
||||
|
@ -1013,7 +1013,7 @@ USBMassDriverBindingStop (
|
|||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Success to stop all %d multi-lun children handles\n", NumberOfChildren));
|
||||
DEBUG ((EFI_D_INFO, "Success to stop all %d multi-lun children handles\n", (UINT32)NumberOfChildren));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -1202,7 +1202,7 @@ CoreStartImage (
|
|||
DEBUG_CODE_BEGIN ();
|
||||
if (Image->ExitDataSize != 0 || Image->ExitData != NULL) {
|
||||
|
||||
DEBUG ((DEBUG_LOAD, "StartImage: ExitDataSize %d, ExitData %p", Image->ExitDataSize, Image->ExitData));
|
||||
DEBUG ((DEBUG_LOAD, "StartImage: ExitDataSize %d, ExitData %p", (UINT32)Image->ExitDataSize, Image->ExitData));
|
||||
if (Image->ExitData != NULL) {
|
||||
DEBUG ((DEBUG_LOAD, " (%hs)", Image->ExitData));
|
||||
}
|
||||
|
|
|
@ -1363,7 +1363,7 @@ CoreAllocatePoolPages (
|
|||
// Convert it to boot services data
|
||||
//
|
||||
if (Start == 0) {
|
||||
DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "AllocatePoolPages: failed to allocate %d pages\n", NumberOfPages));
|
||||
DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "AllocatePoolPages: failed to allocate %d pages\n", (UINT32)NumberOfPages));
|
||||
} else {
|
||||
CoreConvertPages (Start, NumberOfPages, PoolType);
|
||||
}
|
||||
|
|
|
@ -447,7 +447,7 @@ PeiDispatcher (
|
|||
&& (*StackPointer == INIT_CAR_VALUE);
|
||||
StackPointer ++);
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Total Cache as RAM: %d bytes.\n", SecCoreData->TemporaryRamSize));
|
||||
DEBUG ((EFI_D_INFO, "Total Cache as RAM: %d bytes.\n", (UINT32)SecCoreData->TemporaryRamSize));
|
||||
DEBUG ((EFI_D_INFO, " CAR stack ever used: %d bytes.\n",
|
||||
(SecCoreData->StackSize - ((UINTN) StackPointer - (UINTN)SecCoreData->StackBase))
|
||||
));
|
||||
|
@ -497,7 +497,7 @@ PeiDispatcher (
|
|||
StackOffset = (UINTN) NewPermenentMemoryBase - (UINTN) SecCoreData->StackBase;
|
||||
HeapOffset = (INTN) ((UINTN) Private->PhysicalMemoryBegin + Private->StackSize - \
|
||||
(UINTN) SecCoreData->PeiTemporaryRamBase);
|
||||
DEBUG ((EFI_D_INFO, "Heap Offset = 0x%X Stack Offset = 0x%X\n", HeapOffset, StackOffset));
|
||||
DEBUG ((EFI_D_INFO, "Heap Offset = 0x%lX Stack Offset = 0x%lX\n", (INT64)HeapOffset, (INT64)StackOffset));
|
||||
|
||||
//
|
||||
// Caculate new HandOffTable and PrivateData address in permenet memory's stack
|
||||
|
@ -577,8 +577,8 @@ PeiDispatcher (
|
|||
HeapOffset
|
||||
);
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Stack Hob: BaseAddress=0x%X Length=0x%X\n",
|
||||
(UINTN)PrivateInMem->StackBase,
|
||||
DEBUG ((EFI_D_INFO, "Stack Hob: BaseAddress=0x%lX Length=0x%lX\n",
|
||||
PrivateInMem->StackBase,
|
||||
PrivateInMem->StackSize));
|
||||
BuildStackHob (PrivateInMem->StackBase, PrivateInMem->StackSize);
|
||||
|
||||
|
|
|
@ -357,7 +357,7 @@ FirmwareVolmeInfoPpiNotifyCallback (
|
|||
//
|
||||
PrivateData->AllFv[PrivateData->AllFvCount++] = (EFI_PEI_FV_HANDLE)Fv->FvInfo;
|
||||
|
||||
DEBUG ((EFI_D_INFO, "The %dth FvImage start address is 0x%11p and size is 0x%08x\n", PrivateData->AllFvCount, (VOID *) Fv->FvInfo, Fv->FvInfoSize));
|
||||
DEBUG ((EFI_D_INFO, "The %dth FvImage start address is 0x%11p and size is 0x%08x\n", (UINT32)PrivateData->AllFvCount, (VOID *) Fv->FvInfo, Fv->FvInfoSize));
|
||||
//
|
||||
// Preprocess all FV type files in this new FileSystem2 Fv image
|
||||
//
|
||||
|
|
|
@ -107,10 +107,10 @@ CommonHandler (
|
|||
DEBUG ((EFI_D_INFO, "ERROR: Re-entered debugger!\n"
|
||||
" ExceptionType == %X\n"
|
||||
" Context == %X\n"
|
||||
" Context.SystemContextIpf->CrIip == %X\n"
|
||||
" Context.SystemContextIpf->CrIpsr == %X\n"
|
||||
" Context.SystemContextIpf->CrIip == %LX\n"
|
||||
" Context.SystemContextIpf->CrIpsr == %LX\n"
|
||||
" mInHandler == %X\n",
|
||||
ExceptionType,
|
||||
(INT32)ExceptionType,
|
||||
Context,
|
||||
Context.SystemContextIpf->CrIip,
|
||||
Context.SystemContextIpf->CrIpsr,
|
||||
|
|
|
@ -202,7 +202,7 @@ PartitionInstallGptChildHandles (
|
|||
LastBlock = BlockIo->Media->LastBlock;
|
||||
|
||||
DEBUG ((EFI_D_INFO, " BlockSize : %d \n", BlockSize));
|
||||
DEBUG ((EFI_D_INFO, " LastBlock : %x \n", LastBlock));
|
||||
DEBUG ((EFI_D_INFO, " LastBlock : %lx \n", LastBlock));
|
||||
|
||||
GptValidStatus = EFI_NOT_FOUND;
|
||||
|
||||
|
|
Loading…
Reference in New Issue