OvmfPkg: Update code to be more C11 compliant by using __func__
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout OvmfPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
This commit is contained in:
committed by
mergify[bot]
parent
089013a697
commit
8ba392687b
@@ -91,7 +91,7 @@ PlatformQemuUc32BaseInitialization (
|
||||
DEBUG_VERBOSE,
|
||||
"%a: rounded UC32 base from 0x%x up to 0x%x, for "
|
||||
"an UC32 size of 0x%x\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
PlatformInfoHob->LowMemory,
|
||||
PlatformInfoHob->Uc32Base,
|
||||
PlatformInfoHob->Uc32Size
|
||||
@@ -123,7 +123,7 @@ PlatformGetFirstNonAddressCB (
|
||||
|
||||
Candidate = E820Entry->BaseAddr + E820Entry->Length;
|
||||
if (PlatformInfoHob->FirstNonAddress < Candidate) {
|
||||
DEBUG ((DEBUG_INFO, "%a: FirstNonAddress=0x%Lx\n", __FUNCTION__, Candidate));
|
||||
DEBUG ((DEBUG_INFO, "%a: FirstNonAddress=0x%Lx\n", __func__, Candidate));
|
||||
PlatformInfoHob->FirstNonAddress = Candidate;
|
||||
}
|
||||
}
|
||||
@@ -151,7 +151,7 @@ PlatformGetLowMemoryCB (
|
||||
}
|
||||
|
||||
if (PlatformInfoHob->LowMemory < Candidate) {
|
||||
DEBUG ((DEBUG_INFO, "%a: LowMemory=0x%Lx\n", __FUNCTION__, Candidate));
|
||||
DEBUG ((DEBUG_INFO, "%a: LowMemory=0x%Lx\n", __func__, Candidate));
|
||||
PlatformInfoHob->LowMemory = (UINT32)Candidate;
|
||||
}
|
||||
}
|
||||
@@ -180,7 +180,7 @@ PlatformAddHobCB (
|
||||
Base = ALIGN_VALUE (Base, (UINT64)EFI_PAGE_SIZE);
|
||||
End = End & ~(UINT64)EFI_PAGE_MASK;
|
||||
if (Base < End) {
|
||||
DEBUG ((DEBUG_INFO, "%a: HighMemory [0x%Lx, 0x%Lx)\n", __FUNCTION__, Base, End));
|
||||
DEBUG ((DEBUG_INFO, "%a: HighMemory [0x%Lx, 0x%Lx)\n", __func__, Base, End));
|
||||
PlatformAddMemoryRangeHob (Base, End);
|
||||
}
|
||||
}
|
||||
@@ -188,13 +188,13 @@ PlatformAddHobCB (
|
||||
break;
|
||||
case EfiAcpiAddressRangeReserved:
|
||||
BuildResourceDescriptorHob (EFI_RESOURCE_MEMORY_RESERVED, 0, Base, End - Base);
|
||||
DEBUG ((DEBUG_INFO, "%a: Reserved [0x%Lx, 0x%Lx)\n", __FUNCTION__, Base, End));
|
||||
DEBUG ((DEBUG_INFO, "%a: Reserved [0x%Lx, 0x%Lx)\n", __func__, Base, End));
|
||||
break;
|
||||
default:
|
||||
DEBUG ((
|
||||
DEBUG_WARN,
|
||||
"%a: Type %u [0x%Lx, 0x%Lx) (NOT HANDLED)\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
E820Entry->Type,
|
||||
Base,
|
||||
End
|
||||
@@ -241,7 +241,7 @@ PlatformReservationConflictCB (
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"%a: move mmio: 0x%Lx => %Lx\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
PlatformInfoHob->PcdPciMmio64Base,
|
||||
NewBase
|
||||
));
|
||||
@@ -495,7 +495,7 @@ PlatformGetFirstNonAddress (
|
||||
DEBUG ((
|
||||
DEBUG_WARN,
|
||||
"%a: ignoring malformed 64-bit PCI host aperture size from fw_cfg\n",
|
||||
__FUNCTION__
|
||||
__func__
|
||||
));
|
||||
break;
|
||||
}
|
||||
@@ -505,7 +505,7 @@ PlatformGetFirstNonAddress (
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"%a: disabling 64-bit PCI host aperture\n",
|
||||
__FUNCTION__
|
||||
__func__
|
||||
));
|
||||
}
|
||||
|
||||
@@ -534,7 +534,7 @@ PlatformGetFirstNonAddress (
|
||||
DEBUG ((
|
||||
DEBUG_VERBOSE,
|
||||
"%a: HotPlugMemoryEnd=0x%Lx\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
HotPlugMemoryEnd
|
||||
));
|
||||
|
||||
@@ -638,7 +638,7 @@ PlatformAddressWidthFromCpuid (
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"%a: Signature: '%a', PhysBits: %d, QemuQuirk: %a, Valid: %a\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
Signature,
|
||||
PhysBits,
|
||||
QemuQuirk ? "On" : "Off",
|
||||
@@ -783,7 +783,7 @@ PlatformScanHostProvided64BitPciMmioEnd (
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"%a: ignoring malformed hardware information from fw_cfg\n",
|
||||
__FUNCTION__
|
||||
__func__
|
||||
));
|
||||
*PciMmioAddressEnd = 0;
|
||||
return Status;
|
||||
@@ -806,7 +806,7 @@ PlatformScanHostProvided64BitPciMmioEnd (
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"%a: Pci64End=0x%Lx\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
*PciMmioAddressEnd
|
||||
));
|
||||
|
||||
@@ -942,7 +942,7 @@ PlatformQemuInitializeRam (
|
||||
MTRR_SETTINGS MtrrSettings;
|
||||
EFI_STATUS Status;
|
||||
|
||||
DEBUG ((DEBUG_INFO, "%a called\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_INFO, "%a called\n", __func__));
|
||||
|
||||
//
|
||||
// Determine total memory size available
|
||||
|
@@ -358,7 +358,7 @@ PlatformMiscInitialization (
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"%a: Unknown Host Bridge Device ID: 0x%04x\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
PlatformInfoHob->HostBridgeDevId
|
||||
));
|
||||
ASSERT (FALSE);
|
||||
@@ -366,7 +366,7 @@ PlatformMiscInitialization (
|
||||
}
|
||||
|
||||
if (PlatformInfoHob->HostBridgeDevId == CLOUDHV_DEVICE_ID) {
|
||||
DEBUG ((DEBUG_INFO, "%a: Cloud Hypervisor is done.\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_INFO, "%a: Cloud Hypervisor is done.\n", __func__));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -489,12 +489,12 @@ PlatformCpuCountBugCheck (
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"%a: Present=%u Possible=%u\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
*Present,
|
||||
*Possible
|
||||
));
|
||||
for (Idx = 0; Idx < ARRAY_SIZE (Message); ++Idx) {
|
||||
DEBUG ((DEBUG_ERROR, "%a: %a\n", __FUNCTION__, Message[Idx]));
|
||||
DEBUG ((DEBUG_ERROR, "%a: %a\n", __func__, Message[Idx]));
|
||||
}
|
||||
|
||||
ParseStatus = QemuFwCfgParseBool (
|
||||
@@ -505,7 +505,7 @@ PlatformCpuCountBugCheck (
|
||||
DEBUG ((
|
||||
DEBUG_WARN,
|
||||
"%a: \"%a\" active. You've been warned.\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
CPUHP_BUGCHECK_OVERRIDE_FWCFG_FILE
|
||||
));
|
||||
//
|
||||
@@ -531,7 +531,7 @@ PlatformCpuCountBugCheck (
|
||||
DEBUG ((
|
||||
DEBUG_WARN,
|
||||
"%a: QEMU v2.7 reset bug: BootCpuCount=%d Present=%u\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
*BootCpuCount,
|
||||
*Present
|
||||
));
|
||||
@@ -573,7 +573,7 @@ PlatformMaxCpuCountInitialization (
|
||||
// until PcdCpuApInitTimeOutInMicroSeconds elapses (whichever is reached
|
||||
// first).
|
||||
//
|
||||
DEBUG ((DEBUG_WARN, "%a: boot CPU count unavailable\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_WARN, "%a: boot CPU count unavailable\n", __func__));
|
||||
MaxCpuCount = PlatformInfoHob->DefaultMaxCpuNumber;
|
||||
} else {
|
||||
//
|
||||
@@ -626,7 +626,7 @@ PlatformMaxCpuCountInitialization (
|
||||
// steps. Both cases confirm modern mode.
|
||||
//
|
||||
CmdData2 = IoRead32 (CpuHpBase + QEMU_CPUHP_R_CMD_DATA2);
|
||||
DEBUG ((DEBUG_VERBOSE, "%a: CmdData2=0x%x\n", __FUNCTION__, CmdData2));
|
||||
DEBUG ((DEBUG_VERBOSE, "%a: CmdData2=0x%x\n", __func__, CmdData2));
|
||||
if (CmdData2 != 0) {
|
||||
//
|
||||
// QEMU doesn't support the modern CPU hotplug interface. Assume that the
|
||||
@@ -635,7 +635,7 @@ PlatformMaxCpuCountInitialization (
|
||||
DEBUG ((
|
||||
DEBUG_WARN,
|
||||
"%a: modern CPU hotplug interface unavailable\n",
|
||||
__FUNCTION__
|
||||
__func__
|
||||
));
|
||||
MaxCpuCount = BootCpuCount;
|
||||
} else {
|
||||
@@ -693,7 +693,7 @@ PlatformMaxCpuCountInitialization (
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"%a: BootCpuCount=%d MaxCpuCount=%u\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
BootCpuCount,
|
||||
MaxCpuCount
|
||||
));
|
||||
|
Reference in New Issue
Block a user