mirror of https://github.com/acidanthera/audk.git
CorebootModulePkg: DEBUG print format corrections
Fix DEBUG print formats so that pointers and 64-bit integer values display correctly for both 32-bit and 64-bit builds. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Scott Duplichan <scott@notabs.org> Reviewed-by: Prince Agyeman <prince.agyeman@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17153 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
08248f4543
commit
42e548a846
|
@ -49,7 +49,7 @@ CbReserveResourceInGcd (
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((
|
DEBUG ((
|
||||||
EFI_D_ERROR,
|
EFI_D_ERROR,
|
||||||
"Failed to add memory space :0x%x 0x%x\n",
|
"Failed to add memory space :0x%lx 0x%lx\n",
|
||||||
BaseAddress,
|
BaseAddress,
|
||||||
Length
|
Length
|
||||||
));
|
));
|
||||||
|
@ -109,7 +109,7 @@ OnReadyToBoot (
|
||||||
//
|
//
|
||||||
IoOr16 (mPmCtrlReg, BIT0);
|
IoOr16 (mPmCtrlReg, BIT0);
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "Enable SCI bit at 0x%x before boot\n", mPmCtrlReg));
|
DEBUG ((EFI_D_ERROR, "Enable SCI bit at 0x%lx before boot\n", (UINT64)mPmCtrlReg));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -158,7 +158,7 @@ CbDxeEntryPoint (
|
||||||
// Install Acpi Table
|
// Install Acpi Table
|
||||||
//
|
//
|
||||||
if (pSystemTableInfo->AcpiTableBase != 0 && pSystemTableInfo->AcpiTableSize != 0) {
|
if (pSystemTableInfo->AcpiTableBase != 0 && pSystemTableInfo->AcpiTableSize != 0) {
|
||||||
DEBUG ((EFI_D_ERROR, "Install Acpi Table at 0x%x, length 0x%x\n", (UINTN)pSystemTableInfo->AcpiTableBase, pSystemTableInfo->AcpiTableSize));
|
DEBUG ((EFI_D_ERROR, "Install Acpi Table at 0x%lx, length 0x%x\n", pSystemTableInfo->AcpiTableBase, pSystemTableInfo->AcpiTableSize));
|
||||||
Status = gBS->InstallConfigurationTable (&gEfiAcpiTableGuid, (VOID *)(UINTN)pSystemTableInfo->AcpiTableBase);
|
Status = gBS->InstallConfigurationTable (&gEfiAcpiTableGuid, (VOID *)(UINTN)pSystemTableInfo->AcpiTableBase);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ CbDxeEntryPoint (
|
||||||
// Install Smbios Table
|
// Install Smbios Table
|
||||||
//
|
//
|
||||||
if (pSystemTableInfo->SmbiosTableBase != 0 && pSystemTableInfo->SmbiosTableSize != 0) {
|
if (pSystemTableInfo->SmbiosTableBase != 0 && pSystemTableInfo->SmbiosTableSize != 0) {
|
||||||
DEBUG ((EFI_D_ERROR, "Install Smbios Table at 0x%x, length 0x%x\n", (UINTN)pSystemTableInfo->SmbiosTableBase, pSystemTableInfo->SmbiosTableSize));
|
DEBUG ((EFI_D_ERROR, "Install Smbios Table at 0x%lx, length 0x%x\n", pSystemTableInfo->SmbiosTableBase, pSystemTableInfo->SmbiosTableSize));
|
||||||
Status = gBS->InstallConfigurationTable (&gEfiSmbiosTableGuid, (VOID *)(UINTN)pSystemTableInfo->SmbiosTableBase);
|
Status = gBS->InstallConfigurationTable (&gEfiSmbiosTableGuid, (VOID *)(UINTN)pSystemTableInfo->SmbiosTableBase);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ CbDxeEntryPoint (
|
||||||
pAcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);
|
pAcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);
|
||||||
|
|
||||||
mPmCtrlReg = (UINTN)pAcpiBoardInfo->PmCtrlRegBase;
|
mPmCtrlReg = (UINTN)pAcpiBoardInfo->PmCtrlRegBase;
|
||||||
DEBUG ((EFI_D_ERROR, "PmCtrlReg at 0x%x\n", mPmCtrlReg));
|
DEBUG ((EFI_D_ERROR, "PmCtrlReg at 0x%lx\n", (UINT64)mPmCtrlReg));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Register callback on the ready to boot event
|
// Register callback on the ready to boot event
|
||||||
|
|
|
@ -121,7 +121,7 @@ CbPeiReportRemainedFvs (
|
||||||
if (IsFvHeaderValid ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)) {
|
if (IsFvHeaderValid ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)) {
|
||||||
if (TempPtr != (UINT8* )(UINTN) PcdGet32 (PcdPayloadFdMemBase)) {
|
if (TempPtr != (UINT8* )(UINTN) PcdGet32 (PcdPayloadFdMemBase)) {
|
||||||
// Skip the PEI FV
|
// Skip the PEI FV
|
||||||
DEBUG((EFI_D_ERROR, "Found one valid fv : 0x%x.\n", TempPtr, ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)->FvLength));
|
DEBUG((EFI_D_ERROR, "Found one valid fv : 0x%lx.\n", TempPtr, ((EFI_FIRMWARE_VOLUME_HEADER* )TempPtr)->FvLength));
|
||||||
|
|
||||||
PeiServicesInstallFvInfoPpi (
|
PeiServicesInstallFvInfoPpi (
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -176,8 +176,8 @@ CbPeiEntryPoint (
|
||||||
if (EFI_ERROR(Status))
|
if (EFI_ERROR(Status))
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
DEBUG((EFI_D_ERROR, "LowMemorySize: 0x%x.\n", LowMemorySize));
|
DEBUG((EFI_D_ERROR, "LowMemorySize: 0x%lx.\n", LowMemorySize));
|
||||||
DEBUG((EFI_D_ERROR, "HighMemorySize: 0x%x.\n", HighMemorySize));
|
DEBUG((EFI_D_ERROR, "HighMemorySize: 0x%lx.\n", HighMemorySize));
|
||||||
|
|
||||||
ASSERT (LowMemorySize > 0);
|
ASSERT (LowMemorySize > 0);
|
||||||
|
|
||||||
|
@ -248,8 +248,8 @@ CbPeiEntryPoint (
|
||||||
//
|
//
|
||||||
PeiMemBase = (LowMemorySize - PeiMemSize) & (~(BASE_64KB - 1));
|
PeiMemBase = (LowMemorySize - PeiMemSize) & (~(BASE_64KB - 1));
|
||||||
|
|
||||||
DEBUG((EFI_D_ERROR, "PeiMemBase: 0x%x.\n", PeiMemBase));
|
DEBUG((EFI_D_ERROR, "PeiMemBase: 0x%lx.\n", PeiMemBase));
|
||||||
DEBUG((EFI_D_ERROR, "PeiMemSize: 0x%x.\n", PeiMemSize));
|
DEBUG((EFI_D_ERROR, "PeiMemSize: 0x%lx.\n", PeiMemSize));
|
||||||
|
|
||||||
Status = PeiServicesInstallPeiMemory (
|
Status = PeiServicesInstallPeiMemory (
|
||||||
PeiMemBase,
|
PeiMemBase,
|
||||||
|
@ -319,7 +319,7 @@ CbPeiEntryPoint (
|
||||||
pCbHeader = NULL;
|
pCbHeader = NULL;
|
||||||
if ((CbParseGetCbHeader (1, &pCbHeader) == RETURN_SUCCESS)
|
if ((CbParseGetCbHeader (1, &pCbHeader) == RETURN_SUCCESS)
|
||||||
&& ((UINTN)pCbHeader > BASE_4KB)) {
|
&& ((UINTN)pCbHeader > BASE_4KB)) {
|
||||||
DEBUG((EFI_D_ERROR, "Actual Coreboot header: 0x%x.\n", (UINTN)pCbHeader));
|
DEBUG((EFI_D_ERROR, "Actual Coreboot header: %p.\n", pCbHeader));
|
||||||
PcdSet32 (PcdCbHeaderPointer, (UINT32)(UINTN)pCbHeader);
|
PcdSet32 (PcdCbHeaderPointer, (UINT32)(UINTN)pCbHeader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,8 +345,8 @@ CbPeiEntryPoint (
|
||||||
pSystemTableInfo->AcpiTableSize = AcpiTableSize;
|
pSystemTableInfo->AcpiTableSize = AcpiTableSize;
|
||||||
pSystemTableInfo->SmbiosTableBase = (UINT64) (UINTN)pSmbiosTable;
|
pSystemTableInfo->SmbiosTableBase = (UINT64) (UINTN)pSmbiosTable;
|
||||||
pSystemTableInfo->SmbiosTableSize = SmbiosTableSize;
|
pSystemTableInfo->SmbiosTableSize = SmbiosTableSize;
|
||||||
DEBUG ((EFI_D_ERROR, "Detected Acpi Table at 0x%x, length 0x%x\n", (UINTN)pSystemTableInfo->AcpiTableBase, pSystemTableInfo->AcpiTableSize));
|
DEBUG ((EFI_D_ERROR, "Detected Acpi Table at 0x%lx, length 0x%x\n", pSystemTableInfo->AcpiTableBase, pSystemTableInfo->AcpiTableSize));
|
||||||
DEBUG ((EFI_D_ERROR, "Detected Smbios Table at 0x%x, length 0x%x\n", (UINTN)pSystemTableInfo->SmbiosTableBase, pSystemTableInfo->SmbiosTableSize));
|
DEBUG ((EFI_D_ERROR, "Detected Smbios Table at 0x%lx, length 0x%x\n", pSystemTableInfo->SmbiosTableBase, pSystemTableInfo->SmbiosTableSize));
|
||||||
DEBUG ((EFI_D_ERROR, "Create system table info guid hob\n"));
|
DEBUG ((EFI_D_ERROR, "Create system table info guid hob\n"));
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -143,7 +143,7 @@ FindCbMemTable (
|
||||||
if (pMemTableSize)
|
if (pMemTableSize)
|
||||||
*pMemTableSize = root->entries[Idx].size;
|
*pMemTableSize = root->entries[Idx].size;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "Find CbMemTable Id 0x%x, base 0x%x, size 0x%x\n", TableId, *pMemTable, *pMemTableSize));
|
DEBUG ((EFI_D_ERROR, "Find CbMemTable Id 0x%x, base %p, size 0x%x\n", TableId, *pMemTable, *pMemTableSize));
|
||||||
return RETURN_SUCCESS;
|
return RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ CbParseMemoryInfo (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "Low memory 0x%x, High Memory 0x%x\n", *pLowMemorySize, *pHighMemorySize));
|
DEBUG ((EFI_D_ERROR, "Low memory 0x%lx, High Memory 0x%lx\n", *pLowMemorySize, *pHighMemorySize));
|
||||||
|
|
||||||
return RETURN_SUCCESS;
|
return RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -351,8 +351,8 @@ CbParseFadtInfo (
|
||||||
if (!Rsdp)
|
if (!Rsdp)
|
||||||
return RETURN_NOT_FOUND;
|
return RETURN_NOT_FOUND;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "Find Rsdp at 0x%x\n", Rsdp));
|
DEBUG ((EFI_D_ERROR, "Find Rsdp at %p\n", Rsdp));
|
||||||
DEBUG ((EFI_D_ERROR, "Find Rsdt 0x%x, Xsdt 0x%x\n", Rsdp->RsdtAddress, Rsdp->XsdtAddress));
|
DEBUG ((EFI_D_ERROR, "Find Rsdt 0x%x, Xsdt 0x%lx\n", Rsdp->RsdtAddress, Rsdp->XsdtAddress));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Search Rsdt First
|
// Search Rsdt First
|
||||||
|
@ -374,7 +374,7 @@ CbParseFadtInfo (
|
||||||
|
|
||||||
if (pResetReg)
|
if (pResetReg)
|
||||||
*pResetReg = (UINTN)Fadt->ResetReg.Address;
|
*pResetReg = (UINTN)Fadt->ResetReg.Address;
|
||||||
DEBUG ((EFI_D_ERROR, "Reset Reg 0x%x\n", Fadt->ResetReg.Address));
|
DEBUG ((EFI_D_ERROR, "Reset Reg 0x%lx\n", Fadt->ResetReg.Address));
|
||||||
|
|
||||||
if (pResetValue)
|
if (pResetValue)
|
||||||
*pResetValue = Fadt->ResetValue;
|
*pResetValue = Fadt->ResetValue;
|
||||||
|
@ -405,7 +405,7 @@ CbParseFadtInfo (
|
||||||
|
|
||||||
if (pResetReg)
|
if (pResetReg)
|
||||||
*pResetReg = (UINTN)Fadt->ResetReg.Address;
|
*pResetReg = (UINTN)Fadt->ResetReg.Address;
|
||||||
DEBUG ((EFI_D_ERROR, "Reset Reg 0x%x\n", Fadt->ResetReg.Address));
|
DEBUG ((EFI_D_ERROR, "Reset Reg 0x%lx\n", Fadt->ResetReg.Address));
|
||||||
|
|
||||||
if (pResetValue)
|
if (pResetValue)
|
||||||
*pResetValue = Fadt->ResetValue;
|
*pResetValue = Fadt->ResetValue;
|
||||||
|
@ -522,7 +522,7 @@ CbParseFbInfo (
|
||||||
return RETURN_NOT_FOUND;
|
return RETURN_NOT_FOUND;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "Found coreboot video frame buffer information\n"));
|
DEBUG ((EFI_D_ERROR, "Found coreboot video frame buffer information\n"));
|
||||||
DEBUG ((EFI_D_ERROR, "physical_address: 0x%x\n", CbFbRec->physical_address));
|
DEBUG ((EFI_D_ERROR, "physical_address: 0x%lx\n", CbFbRec->physical_address));
|
||||||
DEBUG ((EFI_D_ERROR, "x_resolution: 0x%x\n", CbFbRec->x_resolution));
|
DEBUG ((EFI_D_ERROR, "x_resolution: 0x%x\n", CbFbRec->x_resolution));
|
||||||
DEBUG ((EFI_D_ERROR, "y_resolution: 0x%x\n", CbFbRec->y_resolution));
|
DEBUG ((EFI_D_ERROR, "y_resolution: 0x%x\n", CbFbRec->y_resolution));
|
||||||
DEBUG ((EFI_D_ERROR, "bits_per_pixel: 0x%x\n", CbFbRec->bits_per_pixel));
|
DEBUG ((EFI_D_ERROR, "bits_per_pixel: 0x%x\n", CbFbRec->bits_per_pixel));
|
||||||
|
|
Loading…
Reference in New Issue