summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Library/PlatformInitLib/MemDetect.c
diff options
context:
space:
mode:
authorRebecca Cran <rebecca@bsdio.com>2023-04-06 13:49:41 -0600
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-10 14:19:57 +0000
commit8ba392687b6f7fcb6e333756edd090003c57402e (patch)
tree040194cbfaa73f764e86e050e9bc00b58e4fc60b /OvmfPkg/Library/PlatformInitLib/MemDetect.c
parent089013a69724687f4051fc88367c9eb74def4284 (diff)
downloadedk2-8ba392687b6f7fcb6e333756edd090003c57402e.tar.gz
edk2-8ba392687b6f7fcb6e333756edd090003c57402e.tar.bz2
edk2-8ba392687b6f7fcb6e333756edd090003c57402e.zip
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>
Diffstat (limited to 'OvmfPkg/Library/PlatformInitLib/MemDetect.c')
-rw-r--r--OvmfPkg/Library/PlatformInitLib/MemDetect.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
index aced8535e6..acf90b4e93 100644
--- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
+++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
@@ -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