Files
nix-config/packages/edk2/patches/platforms/0023-Nov-29-update.patch
2026-01-07 21:28:20 -06:00

9473 lines
378 KiB
Diff

From 62140f89b91dce32ace2b795c64f4e2aeddeade2 Mon Sep 17 00:00:00 2001
From: mattp <svidasultaresurge@gmail.com>
Date: Tue, 8 Jul 2025 16:09:25 -0400
Subject: [PATCH 23/29] Nov 29 update
---
Drivers/OpTee/OpteeRpmbPkg/FixupPcd.c | 6 +-
Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c | 22 +-
.../S3FeaturePkg/S3Dxe/S3Dxe.c | 4 +-
.../96Boards/96BoardsI2cDxe/96BoardsI2cDxe.c | 6 +-
.../96Boards/LsConnectorDxe/LsConnectorDxe.c | 12 +-
Platform/96Boards/Secure96Dxe/Secure96Dxe.c | 6 +-
.../FspWrapperNotifyDxe/FspWrapperNotifyDxe.c | 2 +-
.../FspWrapperPlatformLibSample.c | 2 +-
.../FvbServices/FwBlockService.c | 2 +-
.../ARM/Drivers/NorFlashDxe/NorFlashDxe.c | 4 +-
.../ARM/Drivers/NorFlashDxe/NorFlashFvb.c | 22 +-
.../NorFlashDxe/NorFlashStandaloneMm.c | 4 +-
.../Drivers/PlatformDxe/PlatformDxeFvp.c | 4 +-
.../Drivers/PlatformDxe/VirtioDevices.c | 12 +-
.../N1Sdp/Drivers/PlatformDxe/PlatformDxe.c | 4 +-
.../SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 2 +-
.../Drivers/PlatformDxe/VirtioDevices.c | 12 +-
.../Drivers/AcpiPlatformDxe/AcpiApei.c | 12 +-
.../Drivers/AcpiPlatformDxe/AcpiPcct.c | 4 +-
.../Drivers/AcpiPlatformDxe/AcpiPlatformDxe.c | 2 +-
.../Drivers/PciPlatformDxe/PciPlatformDxe.c | 2 +-
.../SmbiosMemInfoDxe/SmbiosMemInfoDxe.c | 6 +-
.../PCF85063RealTimeClockLib/PCF85063.c | 6 +-
.../OemNicConfig2PHi1610/OemNicConfig2P.c | 20 +-
.../DS3231RealTimeClockLib.c | 2 +-
.../D03/Library/FdtUpdateLib/FdtUpdateLib.c | 10 +-
.../HisiOemMiscLib2P/BoardFeature2PHi1610.c | 2 +-
.../HisiOemMiscLibD05/BoardFeatureD05.c | 2 +-
.../OemNicConfig2PHi1620/OemNicConfig2P.c | 2 +-
.../HisiOemMiscLibD06/BoardFeatureD06.c | 4 +-
.../D06/Library/OemNicLib/OemNicLib.c | 16 +-
.../PciHostBridgeLib/PciHostBridgeLib.c | 4 +-
.../BoardBdsHookDxe/BoardBdsHookDxe.c | 2 +-
.../PeiBoardPolicyUpdate.c | 8 +-
.../SmmAspireVn7Dash572GAcpiEnableLib.c | 8 +-
.../Library/BoardEcLib/EcCommands.c | 16 +-
.../BoardInitLib/PeiBoardInitPreMemLib.c | 2 +-
.../Acpi/AcpiTables/AcpiPlatform.c | 4 +-
.../DxePlatformBootManagerLib/BdsPlatform.c | 6 +-
.../Bus/Pci/PciBusDxe/PciCommand.c | 2 +-
.../DxePlatformBootManagerLib/BdsPlatform.c | 6 +-
.../Library/BoardBdsHookLib/BoardBdsHookLib.c | 24 +-
.../PciHostBridgeLib/PciHostBridgeLib.c | 6 +-
.../SimicsOpenBoardPkg/SecCore/SecMain.c | 2 +-
.../SimicsOpenBoardPkg/SimicsDxe/Platform.c | 14 +-
.../SimicsPei/FeatureControl.c | 6 +-
.../SimicsOpenBoardPkg/SimicsPei/MemDetect.c | 10 +-
.../SimicsOpenBoardPkg/SimicsPei/Platform.c | 2 +-
.../SimicsVideoDxe/Initialize.c | 4 +-
.../SimicsVideoDxe/VbeShim.c | 12 +-
.../Uba/TypeAowanda/Pei/AcpiTablePcds.c | 2 +-
.../Aowanda/Uba/TypeAowanda/Pei/PcdData.c | 2 +-
.../TypeBoardPortTemplate/Pei/AcpiTablePcds.c | 2 +-
.../Features/Acpi/AcpiPlatform/AcpiPlatform.c | 8 +-
.../Pci/Dxe/PciPlatform/PciPlatformHooks.c | 2 +-
.../Uba/TypeJunctionCity/Pei/AcpiTablePcds.c | 2 +-
.../AcpiPlatformLibHmat.c | 4 +-
.../Common/Pei/IioPortBifurcationVer1.c | 2 +-
.../TypeWilsonCityRP/Pei/AcpiTablePcds.c | 2 +-
.../TypeWilsonCitySMT/Pei/AcpiTablePcds.c | 2 +-
.../Library/NorFlashQemuLib/NorFlashQemuLib.c | 4 +-
.../PlatformBootManagerLib/PlatformBm.c | 16 +-
.../PlatformBootManagerLib/QemuKernel.c | 2 +-
.../Library/QemuFwCfgLib/QemuFwCfgPeiLib.c | 2 +-
.../BaseResetSystemAcpiGed.c | 2 +-
.../DxeResetSystemAcpiGed.c | 20 +-
.../LoongArchQemuPkg/PlatformPei/Platform.c | 4 +-
.../NonDiscoverableInitLib.c | 2 +-
.../NonDiscoverableInitLib.c | 2 +-
.../NonDiscoverableInitLib.c | 2 +-
.../ArmPlatformLib/ArmPlatformLibMem.c | 2 +-
.../Drivers/PlatformDxe/PlatformDxe.c | 2 +-
.../ArmPlatformLib/ArmPlatformLibMem.c | 2 +-
.../Edk2OpensbiPlatformWrapperLib.c | 48 +-
.../PlatformPkg/Universal/FdtPeim/FdtPeim.c | 6 +-
.../Universal/Pei/PlatformPei/MemDetect.c | 2 +-
.../PlatformPkg/Universal/Sec/SecMain.c | 42 +-
.../ArasanMmcHostDxe/ArasanMmcHostDxe.c | 22 +-
.../RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 2 +-
.../RaspberryPi/Drivers/ConfigDxe/XhciQuirk.c | 4 +-
.../Drivers/DisplayDxe/Screenshot.c | 10 +-
Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c | 44 +-
.../RaspberryPi/Drivers/MmcDxe/MmcBlockIo.c | 12 +-
.../RaspberryPi/Drivers/MmcDxe/MmcDebug.c | 4 +-
.../Drivers/MmcDxe/MmcIdentification.c | 34 +-
.../Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c | 619 +++++++++---------
.../RaspberryPi/Drivers/SdHostDxe/SdHostDxe.c | 4 +-
.../PlatformBootManagerLib/PlatformBm.c | 26 +-
.../PlatformLib/AArch64/RaspberryPiHelper.S | 2 +-
Platform/RaspberryPi/RPi5/RPi5.dsc | 9 -
.../Library/PeiCoreInfoHobLib/CoreInfoHob.c | 4 +-
.../PlatformSecPpiLib/PlatformSecPpiLib.c | 6 +-
.../SmbiosPlatformDxe/SmbiosPlatformDxe.c | 6 +-
.../NonDiscoverableInitLib.c | 2 +-
.../NonDiscoverableInitLib.c | 2 +-
.../StyxSataPlatformDxe/InitController.c | 4 +-
.../Styx/Drivers/StyxSpiFvDxe/StyxSpiFvDxe.c | 2 +-
.../Library/MemoryInitPei/MemoryInitPeiLib.c | 2 +-
.../StyxDtbLoaderLib/StyxDtbLoaderLib.c | 10 +-
.../StyxPlatformFlashAccessLib.c | 16 +-
.../Drivers/AcpiConfigDxe/AcpiConfigDxe.c | 4 +-
.../Drivers/CpuConfigDxe/CpuConfigDxe.c | 4 +-
.../Drivers/FlashFvbDxe/FlashFvbDxe.c | 8 +-
.../Drivers/FlashPei/FlashPei.c | 4 +-
.../Drivers/PlatformInfoDxe/PlatformInfoDxe.c | 2 +-
.../Drivers/RasConfigDxe/RasConfigDxe.c | 18 +-
.../AmpereAltraPkg/Drivers/RngDxe/RngDxe.c | 2 +-
.../Library/Ac01PcieLib/PcieCore.c | 2 +-
.../Library/AmpereCpuLib/AmpereCpuLib.c | 2 +-
.../AmpereCpuLib/RuntimeAmpereCpuLib.c | 2 +-
.../Library/DwI2cLib/DwI2cLib.c | 32 +-
.../Library/FlashLib/FlashLibCommon.c | 12 +-
.../PciHostBridgeLib/PciHostBridgeLib.c | 4 +-
.../AmpereAltraPkg/Library/TrngLib/TrngLib.c | 2 +-
.../Library/PlatformUiLib/PlatformManager.c | 2 +-
Silicon/Atmel/AtSha204a/AtSha204aDriver.c | 8 +-
.../Drivers/InterruptDxe/InterruptDxe.c | 4 +-
.../Drivers/Net/BcmGenetDxe/DriverBinding.c | 12 +-
.../Drivers/Net/BcmGenetDxe/GenericPhy.c | 8 +-
.../Drivers/Net/BcmGenetDxe/GenetUtil.c | 8 +-
.../Drivers/Net/BcmGenetDxe/SimpleNetwork.c | 28 +-
.../Drivers/AcpiPlatformDxe/UpdateDsdt.c | 14 +-
.../Drivers/FlashFvbDxe/FlashFvbDxe.c | 14 +-
.../Drivers/NorFlashDxe/NorFlashDxe.c | 36 +-
.../Drivers/NorFlashDxe/NorFlashHw.c | 20 +-
.../Drivers/SasPlatform/SasPlatform.c | 2 +-
.../Smbios/AddSmbiosType9/AddSmbiosType9.c | 6 +-
.../Smbios/MemorySubClassDxe/MemorySubClass.c | 6 +-
.../ProcessorSubClassDxe/ProcessorSubClass.c | 2 +-
.../Type00/MiscBiosVendorFunction.c | 6 +-
.../Type01/MiscSystemManufacturerFunction.c | 2 +-
.../MiscBaseBoardManufacturerFunction.c | 2 +-
.../Type03/MiscChassisManufacturerFunction.c | 2 +-
.../MiscSystemSlotDesignationFunction.c | 4 +-
...MiscNumberOfInstallableLanguagesFunction.c | 2 +-
.../Type32/MiscBootInformationFunction.c | 2 +-
.../MiscIpmiDeviceInformationFunction.c | 2 +-
.../Drivers/UpdateFdtDxe/UpdateFdtDxe.c | 2 +-
.../Hi1610/Drivers/IoInitDxe/IoInitDxe.c | 2 +-
.../Hi161xPciPlatformLib.c | 20 +-
Silicon/Hisilicon/Hi1620/Drivers/Apei/Apei.c | 4 +-
.../Hi1620/Drivers/Apei/ErrorSource/Ghes.c | 4 +-
.../Hisilicon/Hi1620/Drivers/Apei/Hest/Hest.c | 6 +-
.../Hi1620/Drivers/Apei/OemApeiHi1620.c | 4 +-
.../Hi1620/Hi1620OemConfigUiLib/OemConfig.c | 2 +-
Silicon/Hisilicon/Hi1620/Pptt/Pptt.c | 2 +-
.../ArmPlatformLibMem.c | 2 +-
.../Library/CpldIoLib/CpldIoLibRuntime.c | 4 +-
.../Hisilicon/Library/I2CLib/I2CLibRuntime.c | 6 +-
.../M41T83RealTimeClockLib.c | 24 +-
.../PlatformBootManagerLib/PlatformBm.c | 16 +-
.../Library/RtcHelperLib/RtcHelperLib.c | 4 +-
.../Flash/SpiFvbService/SpiFvbServiceMm.c | 6 +-
.../ShadowMicrocode/ShadowMicrocodePei.c | 4 +-
.../PeiCpuPolicyLibPreMem/PeiCpuPolicyLib.c | 2 +-
.../MemoryInit/Pei/memory_options.h | 6 +-
.../SmmControl/RuntimeDxe/SmmControl2Dxe.c | 18 +-
.../PeiDxeSmmPchDmiLib/PchDmiLib.c | 4 +-
.../BaseSpiCommonLib/SpiCommon.c | 8 +-
.../PchCycleDecodingLib.c | 4 +-
.../PlatformFlashAccessLib.c | 22 +-
.../PciHostBridgeLib.c | 6 +-
.../PciHostBridgeLibConstructor.c | 12 +-
.../Armada7k8kSoCDescLib.c | 24 +-
.../Drivers/BoardDesc/MvBoardDescDxe.c | 56 +-
.../Drivers/Gpio/MvGpioDxe/MvGpioDxe.c | 8 +-
.../Drivers/Gpio/MvPca95xxDxe/MvPca95xxDxe.c | 46 +-
.../Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.c | 2 +-
.../Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c | 12 +-
Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c | 2 +-
.../SdMmc/XenonDxe/XenonSdMmcOverride.c | 4 +-
.../Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c | 44 +-
.../Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.c | 8 +-
.../Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.c | 6 +-
Silicon/Marvell/Library/ComPhyLib/ComPhyLib.c | 4 +-
Silicon/Marvell/Library/MvGpioLib/MvGpioLib.c | 6 +-
.../Maxim/Library/Ds1307RtcLib/Ds1307RtcLib.c | 8 +-
Silicon/NXP/LS1043A/Library/SocLib/SerDes.c | 2 +-
Silicon/NXP/LS1046A/Library/SocLib/SerDes.c | 2 +-
Silicon/NXP/LX2160A/Library/SocLib/SerDes.c | 6 +-
.../Pcf8563RealTimeClockLib.c | 8 +-
.../Library/SerDesHelperLib/SerDesHelperLib.c | 2 +-
.../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 10 +-
.../SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.c | 4 +-
.../Library/SbsaQemuLib/SbsaQemuMem.c | 8 +-
.../CpuExceptionHandlerLib.c | 2 +-
.../ProcessorPkg/Universal/FdtDxe/FdtDxe.c | 6 +-
.../Universal/SmbiosDxe/RiscVSmbiosDxe.c | 6 +-
.../Library/PeiCoreInfoHobLib/CoreInfoHob.c | 2 +-
.../SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c | 6 +-
.../SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c | 10 +-
.../SynQuacer/Drivers/Fip006Dxe/NorFlashSmm.c | 4 +-
.../Drivers/Net/NetsecDxe/NetsecDxe.c | 4 +-
.../SynQuacer/Drivers/PlatformDxe/Pci.c | 6 +-
.../Drivers/PlatformDxe/PlatformDxe.c | 12 +-
.../Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c | 26 +-
.../SynQuacerDtbLoaderLib.c | 6 +-
.../SynQuacerMemoryInitPeiLib.c | 6 +-
.../SynQuacerPlatformFlashAccessLib.c | 24 +-
.../SynQuacerPlatformPeiLib.c | 8 +-
.../Drivers/DwEmacSnpDxe/DriverBinding.c | 14 +-
.../Drivers/DwEmacSnpDxe/DwEmacSnpDxe.c | 18 +-
.../Drivers/DwEmacSnpDxe/EmacDxeUtil.c | 14 +-
.../Drivers/DwEmacSnpDxe/PhyDxeUtil.c | 10 +-
.../InterruptDxe/HardwareInterrupt.c | 6 +-
205 files changed, 1146 insertions(+), 1188 deletions(-)
diff --git a/Drivers/OpTee/OpteeRpmbPkg/FixupPcd.c b/Drivers/OpTee/OpteeRpmbPkg/FixupPcd.c
index 56402fd1..7b8980d5 100644
--- a/Drivers/OpTee/OpteeRpmbPkg/FixupPcd.c
+++ b/Drivers/OpTee/OpteeRpmbPkg/FixupPcd.c
@@ -71,11 +71,11 @@ FixPcdMemory (
);
DEBUG ((DEBUG_INFO, "%a: Fixup PcdFlashNvStorageVariableBase64: 0x%lx\n",
- __FUNCTION__, PcdGet64 (PcdFlashNvStorageVariableBase64)));
+ __func__, PcdGet64 (PcdFlashNvStorageVariableBase64)));
DEBUG ((DEBUG_INFO, "%a: Fixup PcdFlashNvStorageFtwWorkingBase64: 0x%lx\n",
- __FUNCTION__, PcdGet64 (PcdFlashNvStorageFtwWorkingBase64)));
+ __func__, PcdGet64 (PcdFlashNvStorageFtwWorkingBase64)));
DEBUG ((DEBUG_INFO, "%a: Fixup PcdFlashNvStorageFtwSpareBase64: 0x%lx\n",
- __FUNCTION__, PcdGet64 (PcdFlashNvStorageFtwSpareBase64)));
+ __func__, PcdGet64 (PcdFlashNvStorageFtwSpareBase64)));
return Status;
}
diff --git a/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c b/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c
index 83c27503..19252698 100644
--- a/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c
+++ b/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c
@@ -575,14 +575,14 @@ ValidateFvHeader (
|| (FwVolHeader->Signature != EFI_FVH_SIGNATURE)
|| (FwVolHeader->FvLength != FvLength)) {
DEBUG ((DEBUG_INFO, "%a: No Firmware Volume header present\n",
- __FUNCTION__));
+ __func__));
return EFI_NOT_FOUND;
}
// Check the Firmware Volume Guid
if (!CompareGuid (&FwVolHeader->FileSystemGuid, &gEfiSystemNvDataFvGuid)) {
DEBUG ((DEBUG_INFO, "%a: Firmware Volume Guid non-compatible\n",
- __FUNCTION__));
+ __func__));
return EFI_VOLUME_CORRUPTED;
}
@@ -590,7 +590,7 @@ ValidateFvHeader (
Checksum = CalculateSum16 ((UINT16*)FwVolHeader, FwVolHeader->HeaderLength);
if (Checksum != 0) {
DEBUG ((DEBUG_INFO, "%a: FV checksum is invalid (Checksum:0x%X)\n",
- __FUNCTION__, Checksum));
+ __func__, Checksum));
return EFI_VOLUME_CORRUPTED;
}
@@ -600,7 +600,7 @@ ValidateFvHeader (
// Check the Variable Store Guid
if (!CompareGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid) &&
!CompareGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid)) {
- DEBUG ((DEBUG_INFO, "%a: Variable Store Guid non-compatible\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Variable Store Guid non-compatible\n", __func__));
return EFI_VOLUME_CORRUPTED;
}
@@ -608,7 +608,7 @@ ValidateFvHeader (
FwVolHeader->HeaderLength;
if (VariableStoreHeader->Size != VariableStoreLength) {
DEBUG ((DEBUG_INFO, "%a: Variable Store Length does not match\n",
- __FUNCTION__));
+ __func__));
return EFI_VOLUME_CORRUPTED;
}
@@ -754,7 +754,7 @@ FvbInitialize (
Status = ValidateFvHeader (FwVolHeader);
if (EFI_ERROR (Status)) {
// There is no valid header, so time to install one.
- DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __func__));
// Reset memory
SetMem64 (
@@ -762,7 +762,7 @@ FvbInitialize (
Instance->NBlocks * Instance->BlockSize,
~0UL
);
- DEBUG ((DEBUG_INFO, "%a: Erasing Flash.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Erasing Flash.\n", __func__));
Status = ReadWriteRpmb (
SP_SVC_RPMB_WRITE,
Instance->MemBaseAddress,
@@ -776,13 +776,13 @@ FvbInitialize (
}
// Install all appropriate headers
DEBUG ((DEBUG_INFO, "%a: Installing a correct one for this volume.\n",
- __FUNCTION__));
+ __func__));
Status = InitializeFvAndVariableStoreHeaders (Instance);
if (EFI_ERROR (Status)) {
return Status;
}
} else {
- DEBUG ((DEBUG_INFO, "%a: Found valid FVB Header.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Found valid FVB Header.\n", __func__));
}
Instance->Initialized = TRUE;
@@ -861,9 +861,9 @@ OpTeeRpmbFvbInit (
);
ASSERT_EFI_ERROR (Status);
- DEBUG ((DEBUG_INFO, "%a: Register OP-TEE RPMB Fvb\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Register OP-TEE RPMB Fvb\n", __func__));
DEBUG ((DEBUG_INFO, "%a: Using NV store FV in-memory copy at 0x%lx\n",
- __FUNCTION__, PatchPcdGet64 (PcdFlashNvStorageVariableBase64)));
+ __func__, PatchPcdGet64 (PcdFlashNvStorageVariableBase64)));
return Status;
}
diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/S3Dxe/S3Dxe.c b/Features/Intel/PowerManagement/S3FeaturePkg/S3Dxe/S3Dxe.c
index 47b2cc27..102d5c39 100644
--- a/Features/Intel/PowerManagement/S3FeaturePkg/S3Dxe/S3Dxe.c
+++ b/Features/Intel/PowerManagement/S3FeaturePkg/S3Dxe/S3Dxe.c
@@ -129,7 +129,7 @@ S3DxeEntryPoint (
ACPI_S3_MEMORY S3MemoryInfo;
EFI_STATUS Status;
- DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a() Start\n", __func__));
S3PeiMemSize = (UINTN) GetPeiMemSize ();
S3PeiMemBase = (UINTN) AllocateAcpiNvsMemoryBelow4G (S3PeiMemSize);
@@ -150,6 +150,6 @@ S3DxeEntryPoint (
);
ASSERT_EFI_ERROR (Status);
- DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a() End\n", __func__));
return EFI_SUCCESS;
}
diff --git a/Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.c b/Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.c
index a751769c..362dacb1 100644
--- a/Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.c
+++ b/Platform/96Boards/96BoardsI2cDxe/96BoardsI2cDxe.c
@@ -109,7 +109,7 @@ EnableI2cBusConfiguration (
&gEfiI2cMasterProtocolGuid, (VOID **)&I2cMaster);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: gBS->HandleProtocol() failed - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return Status;
}
@@ -117,7 +117,7 @@ EnableI2cBusConfiguration (
Status = I2cMaster->SetBusFrequency (I2cMaster, &BusClockHertz);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: I2cMaster->SetBusFrequency() failed - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return Status;
}
@@ -162,7 +162,7 @@ RegisterI2cBus (
Status = gBS->LocateHandle (ByProtocol, Guid, NULL, &BufferSize,
&I2cBus->I2cMasterHandle);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a: gBS->LocateHandle() failed - %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_INFO, "%a: gBS->LocateHandle() failed - %r\n", __func__,
Status));
return;
}
diff --git a/Platform/96Boards/LsConnectorDxe/LsConnectorDxe.c b/Platform/96Boards/LsConnectorDxe/LsConnectorDxe.c
index a55f56f4..ed98a6dd 100644
--- a/Platform/96Boards/LsConnectorDxe/LsConnectorDxe.c
+++ b/Platform/96Boards/LsConnectorDxe/LsConnectorDxe.c
@@ -105,7 +105,7 @@ PublishOsDescription (
Status = gBS->LocateProtocol (&g96BoardsMezzanineProtocolGuid, NULL,
(VOID **)&Mezzanine);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a: no mezzanine driver active\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: no mezzanine driver active\n", __func__));
return;
}
@@ -115,7 +115,7 @@ PublishOsDescription (
Status = Mezzanine->InstallSsdtTable (Mezzanine, AcpiProtocol);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to install SSDT table - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
return;
}
@@ -133,7 +133,7 @@ PublishOsDescription (
Status = Mezzanine->ApplyDeviceTreeOverlay (Mezzanine, Dtb);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_WARN, "%a: failed to apply DT overlay - %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_WARN, "%a: failed to apply DT overlay - %r\n", __func__,
Status));
}
}
@@ -169,7 +169,7 @@ EntryPoint (
Status = gRT->GetVariable (NINETY_SIX_BOARDS_CONFIG_VARIABLE_NAME,
&g96BoardsFormsetGuid, NULL, &BufferSize, &ConfigData);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a: no config data found\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: no config data found\n", __func__));
ConfigData.MezzanineType = MEZZANINE_NONE;
}
@@ -177,7 +177,7 @@ EntryPoint (
ConfigData.MezzanineType >= MEZZANINE_MAX) {
DEBUG ((DEBUG_WARN,
"%a: invalid value for %s, defaulting to MEZZANINE_NONE\n",
- __FUNCTION__, NINETY_SIX_BOARDS_CONFIG_VARIABLE_NAME));
+ __func__, NINETY_SIX_BOARDS_CONFIG_VARIABLE_NAME));
ConfigData.MezzanineType = MEZZANINE_NONE;
Status = EFI_INVALID_PARAMETER; // trigger setvar below
}
@@ -194,7 +194,7 @@ EntryPoint (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: gRT->SetVariable () failed - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return Status;
}
}
diff --git a/Platform/96Boards/Secure96Dxe/Secure96Dxe.c b/Platform/96Boards/Secure96Dxe/Secure96Dxe.c
index a9794845..b45497ca 100644
--- a/Platform/96Boards/Secure96Dxe/Secure96Dxe.c
+++ b/Platform/96Boards/Secure96Dxe/Secure96Dxe.c
@@ -68,7 +68,7 @@ SetOverlayFragmentTarget (
AsciiStrLen (Target) + 1);
if (Err) {
DEBUG ((DEBUG_ERROR, "%a: fdt_setprop() failed - %a\n",
- __FUNCTION__, fdt_strerror (Err)));
+ __func__, fdt_strerror (Err)));
}
}
@@ -103,7 +103,7 @@ FixupOverlay (
if (Err) {
DEBUG ((DEBUG_ERROR,
"%a: fdt_setprop_u32(.., .., \"phandle\", 0x%x) failed - %a\n",
- __FUNCTION__, GpioPhandle, fdt_strerror (Err)));
+ __func__, GpioPhandle, fdt_strerror (Err)));
}
}
@@ -171,7 +171,7 @@ ApplyDeviceTreeOverlay (
Err = fdt_overlay_apply (Dtb, Overlay);
if (Err) {
DEBUG ((DEBUG_ERROR, "%a: fdt_overlay_apply() failed - %a\n",
- __FUNCTION__, fdt_strerror (Err)));
+ __func__, fdt_strerror (Err)));
return EFI_NOT_FOUND;
}
diff --git a/Platform/AMD/VanGoghBoard/Override/edk2/Fsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c b/Platform/AMD/VanGoghBoard/Override/edk2/Fsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
index 0c997b40..0df64cdb 100644
--- a/Platform/AMD/VanGoghBoard/Override/edk2/Fsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
+++ b/Platform/AMD/VanGoghBoard/Override/edk2/Fsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
@@ -386,7 +386,7 @@ OnReadyToBoot (
FspsUpd = ((FSPS_UPD *)(UINTN)(*(UINT32 *)GET_GUID_HOB_DATA (FspsUpdHob)));
Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID **)&AcpiTableProtocol);
if (!EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a:FSP-S UPD Ptr:%x\n", __FUNCTION__, FspsUpd));
+ DEBUG ((DEBUG_INFO, "%a:FSP-S UPD Ptr:%x\n", __func__, FspsUpd));
UINTN TableKey = 0;
if (ExportedInterfaceHob->AcpiTpm2Table != 0) {
DEBUG ((DEBUG_INFO, "TPM2 Table: %x\n", ExportedInterfaceHob->AcpiTpm2Table));
diff --git a/Platform/AMD/VanGoghBoard/Override/edk2/Fsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/FspWrapperPlatformLibSample.c b/Platform/AMD/VanGoghBoard/Override/edk2/Fsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/FspWrapperPlatformLibSample.c
index 2a616482..68437ac8 100644
--- a/Platform/AMD/VanGoghBoard/Override/edk2/Fsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/FspWrapperPlatformLibSample.c
+++ b/Platform/AMD/VanGoghBoard/Override/edk2/Fsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/FspWrapperPlatformLibSample.c
@@ -112,7 +112,7 @@ UpdateFspmUpdDataForFabric (
IN OUT VOID *FspUpdRgnPtr
)
{
- DEBUG ((DEBUG_INFO, "%a Enter\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a Enter\n", __func__));
FSPM_UPD *Upd = (FSPM_UPD *)FspUpdRgnPtr;
EFI_PEI_READ_ONLY_VARIABLE2_PPI *ReadVariable2 = NULL;
EFI_STATUS Status = PeiServicesLocatePpi (&gEfiPeiReadOnlyVariable2PpiGuid, 0, NULL, (VOID **)&ReadVariable2);
diff --git a/Platform/AMD/VanGoghBoard/VanGoghCommonPkg/FvbServices/FwBlockService.c b/Platform/AMD/VanGoghBoard/VanGoghCommonPkg/FvbServices/FwBlockService.c
index f514ad77..5159b201 100644
--- a/Platform/AMD/VanGoghBoard/VanGoghCommonPkg/FvbServices/FwBlockService.c
+++ b/Platform/AMD/VanGoghBoard/VanGoghCommonPkg/FvbServices/FwBlockService.c
@@ -345,7 +345,7 @@ FvbReadBlock (
UINTN LbaLength;
EFI_STATUS Status;
- DEBUG ((DEBUG_INFO, "Smm %a() enter\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "Smm %a() enter\n", __func__));
//
// Check for invalid conditions
diff --git a/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.c b/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.c
index f7b92de2..09f7a567 100644
--- a/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.c
+++ b/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.c
@@ -455,11 +455,11 @@ NorFlashFvbInitialize (
// Install the Default FVB header if required
if (EFI_ERROR (Status)) {
// There is no valid header, so time to install one.
- DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __func__));
DEBUG ((
DEBUG_INFO,
"%a: Installing a correct one for this volume.\n",
- __FUNCTION__
+ __func__
));
// Erase all the NorFlash that is reserved for variable storage
diff --git a/Platform/ARM/Drivers/NorFlashDxe/NorFlashFvb.c b/Platform/ARM/Drivers/NorFlashDxe/NorFlashFvb.c
index 07675813..b057100c 100644
--- a/Platform/ARM/Drivers/NorFlashDxe/NorFlashFvb.c
+++ b/Platform/ARM/Drivers/NorFlashDxe/NorFlashFvb.c
@@ -74,7 +74,7 @@ InitializeFvAndVariableStoreHeaders (
DEBUG ((
DEBUG_ERROR,
"%a: NvStorageFtwWorkingBase is not contiguous with NvStorageVariableBase region\n",
- __FUNCTION__
+ __func__
));
return EFI_INVALID_PARAMETER;
}
@@ -83,7 +83,7 @@ InitializeFvAndVariableStoreHeaders (
DEBUG ((
DEBUG_ERROR,
"%a: NvStorageFtwSpareBase is not contiguous with NvStorageFtwWorkingBase region\n",
- __FUNCTION__
+ __func__
));
return EFI_INVALID_PARAMETER;
}
@@ -93,7 +93,7 @@ InitializeFvAndVariableStoreHeaders (
DEBUG ((
DEBUG_ERROR,
"%a: NvStorageVariableSize is 0x%x, should be atleast one block size\n",
- __FUNCTION__,
+ __func__,
NvStorageVariableSize
));
return EFI_INVALID_PARAMETER;
@@ -103,7 +103,7 @@ InitializeFvAndVariableStoreHeaders (
DEBUG ((
DEBUG_ERROR,
"%a: NvStorageFtwWorkingSize is 0x%x, should be atleast one block size\n",
- __FUNCTION__,
+ __func__,
NvStorageFtwWorkingSize
));
return EFI_INVALID_PARAMETER;
@@ -113,7 +113,7 @@ InitializeFvAndVariableStoreHeaders (
DEBUG ((
DEBUG_ERROR,
"%a: NvStorageFtwSpareSize is 0x%x, should be atleast one block size\n",
- __FUNCTION__,
+ __func__,
NvStorageFtwSpareSize
));
return EFI_INVALID_PARAMETER;
@@ -124,7 +124,7 @@ InitializeFvAndVariableStoreHeaders (
(NvStorageFtwWorkingBase % Instance->Media.BlockSize != 0) ||
(NvStorageFtwSpareBase % Instance->Media.BlockSize != 0))
{
- DEBUG ((DEBUG_ERROR, "%a: NvStorage Base addresses must be aligned to block size boundaries", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: NvStorage Base addresses must be aligned to block size boundaries", __func__));
return EFI_INVALID_PARAMETER;
}
@@ -209,7 +209,7 @@ ValidateFvHeader (
DEBUG ((
DEBUG_INFO,
"%a: No Firmware Volume header present\n",
- __FUNCTION__
+ __func__
));
return EFI_NOT_FOUND;
}
@@ -219,7 +219,7 @@ ValidateFvHeader (
DEBUG ((
DEBUG_INFO,
"%a: Firmware Volume Guid non-compatible\n",
- __FUNCTION__
+ __func__
));
return EFI_NOT_FOUND;
}
@@ -230,7 +230,7 @@ ValidateFvHeader (
DEBUG ((
DEBUG_INFO,
"%a: FV checksum is invalid (Checksum:0x%X)\n",
- __FUNCTION__,
+ __func__,
Checksum
));
return EFI_NOT_FOUND;
@@ -245,7 +245,7 @@ ValidateFvHeader (
DEBUG ((
DEBUG_INFO,
"%a: Variable Store Guid non-compatible\n",
- __FUNCTION__
+ __func__
));
return EFI_NOT_FOUND;
}
@@ -255,7 +255,7 @@ ValidateFvHeader (
DEBUG ((
DEBUG_INFO,
"%a: Variable Store Length does not match\n",
- __FUNCTION__
+ __func__
));
return EFI_NOT_FOUND;
}
diff --git a/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c b/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c
index b72ad97b..3ab06794 100644
--- a/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c
+++ b/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c
@@ -357,11 +357,11 @@ NorFlashFvbInitialize (
// Install the Default FVB header if required
if (EFI_ERROR (Status)) {
// There is no valid header, so time to install one.
- DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __func__));
DEBUG ((
DEBUG_INFO,
"%a: Installing a correct one for this volume.\n",
- __FUNCTION__
+ __func__
));
// Erase all the NorFlash that is reserved for variable storage
diff --git a/Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeFvp.c b/Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeFvp.c
index 93c5ec67..67a21c13 100644
--- a/Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeFvp.c
+++ b/Platform/ARM/Morello/Drivers/PlatformDxe/PlatformDxeFvp.c
@@ -45,7 +45,7 @@ ArmMorelloEntryPoint (
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Couldn't find the RAM Disk protocol %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return Status;
}
@@ -58,7 +58,7 @@ ArmMorelloEntryPoint (
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to register RAM Disk - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
}
diff --git a/Platform/ARM/Morello/Drivers/PlatformDxe/VirtioDevices.c b/Platform/ARM/Morello/Drivers/PlatformDxe/VirtioDevices.c
index 365e5fdd..37e43730 100644
--- a/Platform/ARM/Morello/Drivers/PlatformDxe/VirtioDevices.c
+++ b/Platform/ARM/Morello/Drivers/PlatformDxe/VirtioDevices.c
@@ -91,7 +91,7 @@ InitVirtioDevices (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to install EFI_DEVICE_PATH protocol "
"for Virtio Block device (Status = %r)\n",
- __FUNCTION__, Status));
+ __func__, Status));
} else {
// Declare the Virtio BlockIo device
Status = VirtioMmioInstallDevice (
@@ -100,7 +100,7 @@ InitVirtioDevices (
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Unable to find Virtio Block MMIO device "
- "(Status = %r)\n", __FUNCTION__, Status));
+ "(Status = %r)\n", __func__, Status));
gBS->UninstallProtocolInterface (
mVirtIoBlkController,
&gEfiDevicePathProtocolGuid,
@@ -108,7 +108,7 @@ InitVirtioDevices (
);
} else {
DEBUG ((DEBUG_INIT, "%a: Installed Virtio Block device\n",
- __FUNCTION__));
+ __func__));
}
}
}
@@ -125,7 +125,7 @@ InitVirtioDevices (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to install EFI_DEVICE_PATH protocol "
"for Virtio Net (Status = %r)\n",
- __FUNCTION__, Status));
+ __func__, Status));
} else {
// Declare the Virtio Net device
Status = VirtioMmioInstallDevice (
@@ -134,14 +134,14 @@ InitVirtioDevices (
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Unable to find Virtio Block MMIO device "
- "(Status == %r)\n", __FUNCTION__, Status));
+ "(Status == %r)\n", __func__, Status));
gBS->UninstallProtocolInterface (
mVirtIoNetController,
&gEfiDevicePathProtocolGuid,
&mVirtioNetDevicePath
);
} else {
- DEBUG ((DEBUG_INIT, "%a: Installed Virtio Net\n", __FUNCTION__));
+ DEBUG ((DEBUG_INIT, "%a: Installed Virtio Net\n", __func__));
}
}
}
diff --git a/Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.c b/Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.c
index a4c2af18..2c1d5bf5 100644
--- a/Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Platform/ARM/N1Sdp/Drivers/PlatformDxe/PlatformDxe.c
@@ -44,7 +44,7 @@ ArmN1SdpEntryPoint (
DEBUG ((
DEBUG_ERROR,
"%a: Couldn't find the RAM Disk protocol - %r\n",
- __FUNCTION__,
+ __func__,
Status
));
return Status;
@@ -60,7 +60,7 @@ ArmN1SdpEntryPoint (
if (EFI_ERROR (Status)) {
DEBUG ((
DEBUG_ERROR, "%a: Failed to register RAM Disk - %r\n",
- __FUNCTION__,
+ __func__,
Status
));
}
diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
index 9ee0e78a..090139d4 100644
--- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
@@ -91,7 +91,7 @@ ArmSgiPkgEntryPoint (
Status = LocateAndInstallAcpiFromFv (&gArmSgiAcpiTablesGuid);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to install ACPI tables\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to install ACPI tables\n", __func__));
return Status;
}
diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c
index 5cf8f6a7..7e222569 100644
--- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/VirtioDevices.c
@@ -89,14 +89,14 @@ InitVirtioDevices (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to install EFI_DEVICE_PATH protocol "
"for Virtio Block device (Status = %r)\n",
- __FUNCTION__, Status));
+ __func__, Status));
} else {
// Declare the Virtio BlockIo device
Status = VirtioMmioInstallDevice (FixedPcdGet32 (PcdVirtioBlkBaseAddress),
mVirtIoBlkController);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Unable to find Virtio Block MMIO device "
- "(Status == %r)\n", __FUNCTION__, Status));
+ "(Status == %r)\n", __func__, Status));
gBS->UninstallProtocolInterface (
mVirtIoBlkController,
&gEfiDevicePathProtocolGuid,
@@ -104,7 +104,7 @@ InitVirtioDevices (
);
} else {
DEBUG ((DEBUG_INIT, "%a: Installed Virtio Block device\n",
- __FUNCTION__));
+ __func__));
}
}
}
@@ -118,7 +118,7 @@ InitVirtioDevices (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to install EFI_DEVICE_PATH protocol "
"for Virtio Network device (Status = %r)\n",
- __FUNCTION__, Status));
+ __func__, Status));
} else {
// Declare the Virtio Net device
Status = VirtioMmioInstallDevice (FixedPcdGet32 (PcdVirtioNetBaseAddress),
@@ -126,7 +126,7 @@ InitVirtioDevices (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Unable to find Virtio Network MMIO device "
"(Status == %r)\n",
- __FUNCTION__, Status));
+ __func__, Status));
gBS->UninstallProtocolInterface (
mVirtIoNetController,
&gEfiDevicePathProtocolGuid,
@@ -134,7 +134,7 @@ InitVirtioDevices (
);
} else {
DEBUG ((DEBUG_INIT, "%a: Installed Virtio Network device\n",
- __FUNCTION__));
+ __func__));
}
}
}
diff --git a/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.c b/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.c
index aec96e6a..3763d248 100644
--- a/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.c
+++ b/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiApei.c
@@ -34,13 +34,13 @@ AcpiApeiUninstallTable (
*/
Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID **)&AcpiTableProtocol);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d: Unable to locate ACPI table protocol\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d: Unable to locate ACPI table protocol\n", __func__, __LINE__));
return;
}
Status = gBS->LocateProtocol (&gEfiAcpiSdtProtocolGuid, NULL, (VOID **)&AcpiTableSdtProtocol);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d: Unable to locate ACPI table support protocol\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d: Unable to locate ACPI table support protocol\n", __func__, __LINE__));
return;
}
@@ -56,7 +56,7 @@ AcpiApeiUninstallTable (
&TableKey
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d Unable to get ACPI table\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d Unable to get ACPI table\n", __func__, __LINE__));
return;
}
@@ -65,7 +65,7 @@ AcpiApeiUninstallTable (
*/
Status = AcpiTableProtocol->UninstallAcpiTable (AcpiTableProtocol, TableKey);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d: Unable to uninstall table\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d: Unable to uninstall table\n", __func__, __LINE__));
}
}
@@ -102,7 +102,7 @@ AdjustBERTRegionLen (
&TableKey
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d Unable to get ACPI BERT table\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d Unable to get ACPI BERT table\n", __func__, __LINE__));
return;
}
@@ -401,7 +401,7 @@ AcpiApeiHestUpdateTable1P (
&TableKey
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d Unable to get ACPI HEST table\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d Unable to get ACPI HEST table\n", __func__, __LINE__));
return;
}
diff --git a/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiPcct.c b/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiPcct.c
index 6f4b252a..dc2e4a64 100644
--- a/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiPcct.c
+++ b/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiPcct.c
@@ -242,7 +242,7 @@ PcctAdvertiseSharedMemoryAddress (
Status = MailboxMsgSetPccSharedMem (Socket, Doorbell, TRUE, (UINT64)PccSharedMemoryRegion);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to send mailbox message!\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to send mailbox message!\n", __func__));
ASSERT_EFI_ERROR (Status);
return Status;
}
@@ -253,7 +253,7 @@ PcctAdvertiseSharedMemoryAddress (
Timeout = PCC_COMMAND_POLL_COUNT;
while (PccSharedMemoryRegion->Status.CommandComplete != 1) {
if (--Timeout <= 0) {
- DEBUG ((DEBUG_ERROR, "%a - Timeout occurred when polling the PCC Status Complete\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a - Timeout occurred when polling the PCC Status Complete\n", __func__));
return EFI_TIMEOUT;
}
MicroSecondDelay (PCC_COMMAND_POLL_INTERVAL_US);
diff --git a/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.c b/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.c
index 28c422df..fcd2e671 100644
--- a/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.c
+++ b/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.c
@@ -57,7 +57,7 @@ AcpiNotificationEvent (
Rsdp->RsdtAddress = 0;
}
- DEBUG ((DEBUG_INFO, "[%a:%d]-\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_INFO, "[%a:%d]-\n", __func__, __LINE__));
}
VOID
diff --git a/Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.c b/Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.c
index 865dfb89..22254266 100644
--- a/Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.c
+++ b/Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.c
@@ -120,7 +120,7 @@ PhaseNotify (
(VOID **)&RootBridgeDevPath
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a %d: Failed to locate RootBridge DevicePath\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a %d: Failed to locate RootBridge DevicePath\n", __func__, __LINE__));
break;
}
diff --git a/Platform/Ampere/JadePkg/Drivers/SmbiosMemInfoDxe/SmbiosMemInfoDxe.c b/Platform/Ampere/JadePkg/Drivers/SmbiosMemInfoDxe/SmbiosMemInfoDxe.c
index 673a819e..d2738b95 100644
--- a/Platform/Ampere/JadePkg/Drivers/SmbiosMemInfoDxe/SmbiosMemInfoDxe.c
+++ b/Platform/Ampere/JadePkg/Drivers/SmbiosMemInfoDxe/SmbiosMemInfoDxe.c
@@ -538,7 +538,7 @@ InstallMemStructures (
(EFI_SMBIOS_TABLE_HEADER *)Table
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: adding SMBIOS type 16 socket %d failed\n", __FUNCTION__, Index));
+ DEBUG ((DEBUG_ERROR, "%a: adding SMBIOS type 16 socket %d failed\n", __func__, Index));
FreePool (Table);
// stop adding rather than continuing
return Status;
@@ -611,7 +611,7 @@ InstallMemStructures (
DEBUG ((
DEBUG_ERROR,
"%a: adding SMBIOS type 17 Socket %d Slot %d failed\n",
- __FUNCTION__,
+ __func__,
Index,
SlotIndex
));
@@ -656,7 +656,7 @@ InstallMemStructures (
DEBUG ((
DEBUG_ERROR,
"%a: adding SMBIOS type 19 Socket %d MemRegion %d failed\n",
- __FUNCTION__,
+ __func__,
Index,
MemRegionIndex
));
diff --git a/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063.c b/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063.c
index bc886b53..f5106b21 100644
--- a/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063.c
+++ b/Platform/Ampere/JadePkg/Library/PCF85063RealTimeClockLib/PCF85063.c
@@ -82,7 +82,7 @@ RtcI2cWaitAccess (
}
if (Timeout <= 0) {
- DEBUG ((DEBUG_ERROR, "%a: Timeout while waiting access RTC\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Timeout while waiting access RTC\n", __func__));
return EFI_TIMEOUT;
}
@@ -293,7 +293,7 @@ PlatformInitialize (
DEBUG ((
DEBUG_ERROR,
"%a:%d I2cSetupRuntime() failed - %r \n",
- __FUNCTION__,
+ __func__,
__LINE__,
Status
));
@@ -306,7 +306,7 @@ PlatformInitialize (
DEBUG ((
DEBUG_ERROR,
"%a:%d GpioSetupRuntime() failed - %r \n",
- __FUNCTION__,
+ __func__,
__LINE__,
Status
));
diff --git a/Platform/Hisilicon/D03/Drivers/OemNicConfig2PHi1610/OemNicConfig2P.c b/Platform/Hisilicon/D03/Drivers/OemNicConfig2PHi1610/OemNicConfig2P.c
index 814378b3..147d32d1 100644
--- a/Platform/Hisilicon/D03/Drivers/OemNicConfig2PHi1610/OemNicConfig2P.c
+++ b/Platform/Hisilicon/D03/Drivers/OemNicConfig2PHi1610/OemNicConfig2P.c
@@ -111,7 +111,7 @@ EFI_STATUS OemGetMacE2prom(IN UINT32 Port, OUT UINT8 *pucAddr)
Status = I2CInit(0, EEPROM_I2C_PORT, Normal);
if (EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Call I2CInit failed! p1=0x%x.\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Call I2CInit failed! p1=0x%x.\n", __func__, __LINE__, Status));
return Status;
}
@@ -142,7 +142,7 @@ EFI_STATUS OemGetMacE2prom(IN UINT32 Port, OUT UINT8 *pucAddr)
}
if (EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Call I2cRead failed! p1=0x%x.\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Call I2cRead failed! p1=0x%x.\n", __func__, __LINE__, Status));
return Status;
}
@@ -177,7 +177,7 @@ EFI_STATUS OemSetMacE2prom(IN UINT32 Port, IN UINT8 *pucAddr)
Status = I2CInit(0, EEPROM_I2C_PORT, Normal);
if (EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Call I2CInit failed! p1=0x%x.\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Call I2CInit failed! p1=0x%x.\n", __func__, __LINE__, Status));
return Status;
}
@@ -208,7 +208,7 @@ EFI_STATUS OemSetMacE2prom(IN UINT32 Port, IN UINT8 *pucAddr)
}
if (EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Call I2cWrite failed! p1=0x%x.\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Call I2cWrite failed! p1=0x%x.\n", __func__, __LINE__, Status));
return Status;
}
return EFI_SUCCESS;
@@ -224,14 +224,14 @@ EFIAPI OemGetMac2P (
if (NULL == Mac)
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Mac buffer is null!\n", __FUNCTION__, __LINE__));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Mac buffer is null!\n", __func__, __LINE__));
return EFI_INVALID_PARAMETER;
}
Status = OemGetMacE2prom(Port, Mac->Addr);
if ((EFI_ERROR(Status)))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Get mac failed!\n", __FUNCTION__, __LINE__));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Get mac failed!\n", __func__, __LINE__));
Mac->Addr[0] = 0x00;
Mac->Addr[1] = 0x18;
@@ -255,14 +255,14 @@ EFIAPI OemSetMac2P (
if (NULL == Mac)
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Mac buffer is null!\n", __FUNCTION__, __LINE__));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Mac buffer is null!\n", __func__, __LINE__));
return EFI_INVALID_PARAMETER;
}
Status = OemSetMacE2prom(Port, Mac->Addr);
if ((EFI_ERROR(Status)))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Set mac failed!\n", __FUNCTION__, __LINE__));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Set mac failed!\n", __func__, __LINE__));
return Status;
}
@@ -334,7 +334,7 @@ OemNicConfigEntry (
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Install Protocol failed %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Install Protocol failed %r\n", __func__, __LINE__, Status));
return Status;
}
@@ -347,7 +347,7 @@ OemNicConfigEntry (
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Install Protocol failed %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Install Protocol failed %r\n", __func__, __LINE__, Status));
return Status;
}
diff --git a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c
index be143c47..5bf69e90 100644
--- a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c
+++ b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c
@@ -444,7 +444,7 @@ LibRtcInitialize (
Status = LibSetTime(&EfiTime);
if (EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Status : %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Status : %r\n", __func__, __LINE__, Status));
}
}
diff --git a/Platform/Hisilicon/D03/Library/FdtUpdateLib/FdtUpdateLib.c b/Platform/Hisilicon/D03/Library/FdtUpdateLib/FdtUpdateLib.c
index a242e4bd..2cb8342f 100755
--- a/Platform/Hisilicon/D03/Library/FdtUpdateLib/FdtUpdateLib.c
+++ b/Platform/Hisilicon/D03/Library/FdtUpdateLib/FdtUpdateLib.c
@@ -98,14 +98,14 @@ GetMacAddress (UINT32 Port)
Status = gBS->LocateProtocol(&gHisiBoardNicProtocolGuid, NULL, (VOID **)&OemNic);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] LocateProtocol failed %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] LocateProtocol failed %r\n", __func__, __LINE__, Status));
return Status;
}
Status = OemNic->GetMac(&Mac, Port);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] GetMac failed %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] GetMac failed %r\n", __func__, __LINE__, Status));
return Status;
}
@@ -192,7 +192,7 @@ UpdateRefClk (IN VOID* Fdt)
ArmArchTimerReadReg (CntFrq, &ArchTimerFreq);
if (!ArchTimerFreq) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Get timer frequency failed!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Get timer frequency failed!\n", __func__, __LINE__));
return EFI_INVALID_PARAMETER;
}
@@ -210,7 +210,7 @@ UpdateRefClk (IN VOID* Fdt)
m_prop = fdt_get_property_w(Fdt, node, Property, &m_oldlen);
if(!m_prop) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Can't find property %a\n", __FUNCTION__, __LINE__, Property));
+ DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Can't find property %a\n", __func__, __LINE__, Property));
return EFI_INVALID_PARAMETER;
}
@@ -250,7 +250,7 @@ GetMemoryNode(VOID* Fdt)
if(node < 0)
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] fdt add subnode error\n", __FUNCTION__, __LINE__));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] fdt add subnode error\n", __func__, __LINE__));
return node;
}
diff --git a/Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/BoardFeature2PHi1610.c b/Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/BoardFeature2PHi1610.c
index 5c4f7325..b7ee8777 100644
--- a/Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/BoardFeature2PHi1610.c
+++ b/Platform/Hisilicon/D03/Library/HisiOemMiscLib2P/BoardFeature2PHi1610.c
@@ -71,7 +71,7 @@ SERDES_PARAM gSerdesParam1 = {
EFI_STATUS OemGetSerdesParam (SERDES_PARAM *ParamA, SERDES_PARAM *ParamB, UINT32 SocketId)
{
if (ParamA == NULL) {
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Param == NULL!\n", __FUNCTION__, __LINE__));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Param == NULL!\n", __func__, __LINE__));
return EFI_INVALID_PARAMETER;
}
diff --git a/Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/BoardFeatureD05.c b/Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/BoardFeatureD05.c
index 2cda0fd7..0746ff32 100644
--- a/Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/BoardFeatureD05.c
+++ b/Platform/Hisilicon/D05/Library/HisiOemMiscLibD05/BoardFeatureD05.c
@@ -87,7 +87,7 @@ OemGetSerdesParam (
)
{
if (ParamA == NULL || ParamB == NULL) {
- DEBUG((DEBUG_ERROR, "[%a]:[%dL] Param == NULL!\n", __FUNCTION__, __LINE__));
+ DEBUG((DEBUG_ERROR, "[%a]:[%dL] Param == NULL!\n", __func__, __LINE__));
return EFI_INVALID_PARAMETER;
}
diff --git a/Platform/Hisilicon/D06/Drivers/OemNicConfig2PHi1620/OemNicConfig2P.c b/Platform/Hisilicon/D06/Drivers/OemNicConfig2PHi1620/OemNicConfig2P.c
index c5c32901..4a26d811 100644
--- a/Platform/Hisilicon/D06/Drivers/OemNicConfig2PHi1620/OemNicConfig2P.c
+++ b/Platform/Hisilicon/D06/Drivers/OemNicConfig2PHi1620/OemNicConfig2P.c
@@ -56,7 +56,7 @@ OemNicConfigEntry (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Install Protocol failed %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
return Status;
}
diff --git a/Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/BoardFeatureD06.c b/Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/BoardFeatureD06.c
index 01f5e091..b8a4003c 100644
--- a/Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/BoardFeatureD06.c
+++ b/Platform/Hisilicon/D06/Library/HisiOemMiscLibD06/BoardFeatureD06.c
@@ -89,10 +89,10 @@ OemGetSerdesParam (
)
{
if (NULL == ParamA) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Param == NULL!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Param == NULL!\n", __func__, __LINE__));
return EFI_INVALID_PARAMETER;
} if (NULL == ParamB) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Param == NULL!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Param == NULL!\n", __func__, __LINE__));
return EFI_INVALID_PARAMETER;
}
diff --git a/Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.c b/Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.c
index 42a5a080..11e539f7 100644
--- a/Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.c
+++ b/Platform/Hisilicon/D06/Library/OemNicLib/OemNicLib.c
@@ -129,7 +129,7 @@ OemGetMacE2prom(
if (EFI_ERROR (Status))
{
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Call I2CInit failed! p1=0x%x.\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
return Status;
}
@@ -160,7 +160,7 @@ OemGetMacE2prom(
}
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Call I2cRead failed! p1=0x%x.\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
return Status;
}
@@ -209,7 +209,7 @@ OemSetMacE2prom (
Status = I2CInit (0, EEPROM_I2C_PORT, Normal);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Call I2CInit failed! p1=0x%x.\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
return Status;
}
@@ -245,7 +245,7 @@ OemSetMacE2prom (
}
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Call I2cWrite failed! p1=0x%x.\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
return Status;
}
return EFI_SUCCESS;
@@ -262,7 +262,7 @@ OemGetMac (
if (Mac == NULL) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Mac buffer is null!\n",
- __FUNCTION__, __LINE__));
+ __func__, __LINE__));
return EFI_INVALID_PARAMETER;
}
@@ -270,7 +270,7 @@ OemGetMac (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"[%a]:[%dL] Cannot get MAC from EEPROM, Status: %r; using default MAC.\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
Mac->Addr[0] = 0xFF;
Mac->Addr[1] = 0xFF;
@@ -295,13 +295,13 @@ OemSetMac (
if (Mac == NULL) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Mac buffer is null!\n",
- __FUNCTION__, __LINE__));
+ __func__, __LINE__));
return EFI_INVALID_PARAMETER;
}
Status = OemSetMacE2prom (Port, Mac->Addr);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Set mac failed!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Set mac failed!\n", __func__, __LINE__));
return Status;
}
diff --git a/Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.c b/Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.c
index 7a2d7b26..bdbc7cec 100644
--- a/Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.c
+++ b/Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.c
@@ -123,7 +123,7 @@ ConstructRootBridge (
DevicePath = AllocateCopyPool(sizeof mEfiPciRootBridgeDevicePath, &mEfiPciRootBridgeDevicePath);
if (DevicePath == NULL) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] AllocatePool failed!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "[%a]:[%dL] AllocatePool failed!\n", __func__, __LINE__));
return EFI_OUT_OF_RESOURCES;
}
@@ -182,7 +182,7 @@ PciHostBridgeGetRootBridges (
Bridges = AllocatePool (RootBridgeCount * sizeof *Bridges);
if (Bridges == NULL) {
- DEBUG ((DEBUG_ERROR, "[%a:%d] - AllocatePool failed!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "[%a:%d] - AllocatePool failed!\n", __func__, __LINE__));
return NULL;
}
diff --git a/Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.c b/Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.c
index 88eb7d70..c1f329b9 100644
--- a/Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.c
+++ b/Platform/Intel/BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.c
@@ -41,7 +41,7 @@ BdsHookDxeEntryPoint (
EFI_STATUS Status;
VOID *Registration;
- DEBUG ((DEBUG_INFO, "%a starts\n", __FUNCTION__ ));
+ DEBUG ((DEBUG_INFO, "%a starts\n", __func__ ));
//
// Create event to set proper video resolution and text mode for internal shell.
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiBoardPolicyUpdate.c b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiBoardPolicyUpdate.c
index 81cd8b94..9fa68638 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiBoardPolicyUpdate.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiBoardPolicyUpdate.c
@@ -49,7 +49,7 @@ PeiFspBoardPolicyUpdatePreMem (
IN OUT FSPM_UPD *FspmUpd
)
{
- DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a() Start\n", __func__));
// BUGBUG: Preserve FSP defaults - PeiSiliconPolicyInitLibFsp ultimately overrides to 0.
// Drop when https://edk2.groups.io/g/devel/message/79391 is merged
@@ -71,7 +71,7 @@ PeiFspBoardPolicyUpdatePreMem (
/* PCIe config */
FspmUpd->FspmConfig.PcieRpEnableMask = 0x341; // Ports 1, 7, 9 and 10
- DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a() End\n", __func__));
return EFI_SUCCESS;
}
@@ -92,7 +92,7 @@ PeiFspBoardPolicyUpdate (
{
INTN Index;
- DEBUG ((DEBUG_INFO, "%a() Start\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a() Start\n", __func__));
// FIXME/NB: This is insecure and not production-ready!
// TODO: Configure SPI lockdown by variable on FrontPage?
@@ -281,6 +281,6 @@ PeiFspBoardPolicyUpdate (
/* GbE config */
FspsUpd->FspsConfig.PchLanEnable = 0;
- DEBUG ((DEBUG_INFO, "%a() End\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a() End\n", __func__));
return EFI_SUCCESS;
}
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAcpiLib/SmmAspireVn7Dash572GAcpiEnableLib.c b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAcpiLib/SmmAspireVn7Dash572GAcpiEnableLib.c
index 69e9c928..3e96ce49 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAcpiLib/SmmAspireVn7Dash572GAcpiEnableLib.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardAcpiLib/SmmAspireVn7Dash572GAcpiEnableLib.c
@@ -24,13 +24,13 @@ AspireVn7Dash572GBoardEnableAcpi (
* Further reversing will be performed */
Status = SendEcCommand (0xE9); /* Vendor implements using ACPI "CMDB" register" */
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(): SendEcCommand(0xE9) failed!\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a(): SendEcCommand(0xE9) failed!\n", __func__));
return EFI_DEVICE_ERROR;
}
Status = SendEcData (0x81);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(): SendEcData(0x81) failed!\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a(): SendEcData(0x81) failed!\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -52,13 +52,13 @@ AspireVn7Dash572GBoardDisableAcpi (
* Further reversing will be performed */
Status = SendEcCommand (0xE9); /* Vendor implements using ACPI "CMDB" register" */
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(): SendEcCommand(0xE9) failed!\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a(): SendEcCommand(0xE9) failed!\n", __func__));
return EFI_DEVICE_ERROR;
}
Status = SendEcData (0x80);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(): SendEcData(0x80) failed!\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a(): SendEcData(0x80) failed!\n", __func__));
return EFI_DEVICE_ERROR;
}
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardEcLib/EcCommands.c b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardEcLib/EcCommands.c
index 6e752b4e..673449e6 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardEcLib/EcCommands.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardEcLib/EcCommands.c
@@ -61,19 +61,19 @@ EcCmd90Read (
Status = SendEcCommand (0x90);
if (EFI_ERROR (Status)) {
- DEBUG((DEBUG_ERROR, "%a(): SendEcCommand(0x90) failed!\n", __FUNCTION__));
+ DEBUG((DEBUG_ERROR, "%a(): SendEcCommand(0x90) failed!\n", __func__));
return Status;
}
Status = SendEcData (Address);
if (EFI_ERROR (Status)) {
- DEBUG((DEBUG_ERROR, "%a(): SendEcData(Address) failed!\n", __FUNCTION__));
+ DEBUG((DEBUG_ERROR, "%a(): SendEcData(Address) failed!\n", __func__));
return Status;
}
Status = ReceiveEcData (Data);
if (EFI_ERROR (Status)) {
- DEBUG((DEBUG_ERROR, "%a(): ReceiveEcData(Data) failed!\n", __FUNCTION__));
+ DEBUG((DEBUG_ERROR, "%a(): ReceiveEcData(Data) failed!\n", __func__));
return Status;
}
return EFI_SUCCESS;
@@ -99,19 +99,19 @@ EcCmd91Write (
Status = SendEcCommand (0x91);
if (EFI_ERROR (Status)) {
- DEBUG((DEBUG_ERROR, "%a(): SendEcCommand(0x91) failed!\n", __FUNCTION__));
+ DEBUG((DEBUG_ERROR, "%a(): SendEcCommand(0x91) failed!\n", __func__));
return Status;
}
Status = SendEcData (Address);
if (EFI_ERROR (Status)) {
- DEBUG((DEBUG_ERROR, "%a(): SendEcData(Address) failed!\n", __FUNCTION__));
+ DEBUG((DEBUG_ERROR, "%a(): SendEcData(Address) failed!\n", __func__));
return Status;
}
Status = SendEcData (Data);
if (EFI_ERROR (Status)) {
- DEBUG((DEBUG_ERROR, "%a(): SendEcData(Data) failed!\n", __FUNCTION__));
+ DEBUG((DEBUG_ERROR, "%a(): SendEcData(Data) failed!\n", __func__));
return Status;
}
return EFI_SUCCESS;
@@ -140,13 +140,13 @@ EcCmd94Query (
Status = SendEcCommand (0x94);
if (EFI_ERROR (Status)) {
- DEBUG((DEBUG_ERROR, "%a(): SendEcCommand(0x94) failed!\n", __FUNCTION__));
+ DEBUG((DEBUG_ERROR, "%a(): SendEcCommand(0x94) failed!\n", __func__));
return Status;
}
Status = ReceiveEcData (Data);
if (EFI_ERROR (Status)) {
- DEBUG((DEBUG_ERROR, "%a(): ReceiveEcData(Data) failed!\n", __FUNCTION__));
+ DEBUG((DEBUG_ERROR, "%a(): ReceiveEcData(Data) failed!\n", __func__));
return Status;
}
return EFI_SUCCESS;
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardInitLib/PeiBoardInitPreMemLib.c b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardInitLib/PeiBoardInitPreMemLib.c
index 5f89d87e..d6ffb175 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardInitLib/PeiBoardInitPreMemLib.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Library/BoardInitLib/PeiBoardInitPreMemLib.c
@@ -40,7 +40,7 @@ BoardDetect (
VOID
)
{
- DEBUG ((DEBUG_INFO, "%a(): Deferred until LPC programming is complete\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a(): Deferred until LPC programming is complete\n", __func__));
return EFI_SUCCESS;
}
diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index 2a833ec9..e7897cc2 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -1375,7 +1375,7 @@ IsAcpiTableChange (
Xsdt = NULL;
FacsPtr = NULL;
- DEBUG ((DEBUG_INFO, "%a() - Start\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a() - Start\n", __func__));
Status = EfiGetSystemConfigurationTable (&gEfiAcpiTableGuid, (VOID **)&Rsdp);
if (EFI_ERROR (Status) || (Rsdp == NULL)) {
@@ -1430,7 +1430,7 @@ IsAcpiTableChange (
DEBUG ((DEBUG_INFO, "HardwareSignature = %x and Status = %r\n", FacsPtr->HardwareSignature, Status));
FreePool (TableCrcRecord);
- DEBUG ((DEBUG_INFO, "%a() - End\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a() - End\n", __func__));
}
VOID
diff --git a/Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/BdsPlatform.c b/Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/BdsPlatform.c
index 31a9ef4a..a340c148 100644
--- a/Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/BdsPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/BdsPlatform.c
@@ -106,7 +106,7 @@ BdsSignalEventBeforeConsoleAfterTrustedConsole (
EFI_STATUS Status;
EFI_EVENT BdsConsoleEvent;
- DEBUG ((DEBUG_INFO, "%a \n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a \n", __func__));
Status = CreateBdsEvent (
TPL_CALLBACK,
@@ -137,7 +137,7 @@ BdsSignalEventBeforeConsoleBeforeEndOfDxe (
EFI_STATUS Status;
EFI_EVENT BdsConsoleEvent;
- DEBUG ((DEBUG_INFO, "%a \n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a \n", __func__));
Status = CreateBdsEvent (
TPL_CALLBACK,
@@ -167,7 +167,7 @@ BdsSignalEventAfterConsoleReadyBeforeBootOption (
EFI_STATUS Status;
EFI_EVENT BdsConsoleEvent;
- DEBUG ((DEBUG_INFO, "%a \n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a \n", __func__));
Status = CreateBdsEvent (
TPL_CALLBACK,
diff --git a/Platform/Intel/PurleyOpenBoardPkg/Override/MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c b/Platform/Intel/PurleyOpenBoardPkg/Override/MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c
index 6283d602..60882daf 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/Override/MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c
+++ b/Platform/Intel/PurleyOpenBoardPkg/Override/MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c
@@ -240,7 +240,7 @@ LocatePciExpressCapabilityRegBlock (
DEBUG ((
DEBUG_WARN,
"%a: [%02x|%02x|%02x] failed to access config space at offset 0x%x\n",
- __FUNCTION__,
+ __func__,
PciIoDevice->BusNumber,
PciIoDevice->DeviceNumber,
PciIoDevice->FunctionNumber,
diff --git a/Platform/Intel/PurleyOpenBoardPkg/Override/Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/BdsPlatform.c b/Platform/Intel/PurleyOpenBoardPkg/Override/Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/BdsPlatform.c
index b03d5bbb..ecdb6851 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/Override/Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/BdsPlatform.c
+++ b/Platform/Intel/PurleyOpenBoardPkg/Override/Platform/Intel/MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/BdsPlatform.c
@@ -112,7 +112,7 @@ BdsSignalEventBeforeConsoleAfterTrustedConsole (
EFI_STATUS Status;
EFI_EVENT BdsConsoleEvent;
- DEBUG ((DEBUG_INFO, "%a \n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a \n", __func__));
Status = CreateBdsEvent (
TPL_CALLBACK,
@@ -143,7 +143,7 @@ BdsSignalEventBeforeConsoleBeforeEndOfDxe (
EFI_STATUS Status;
EFI_EVENT BdsConsoleEvent;
- DEBUG ((DEBUG_INFO, "%a \n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a \n", __func__));
Status = CreateBdsEvent (
TPL_CALLBACK,
@@ -173,7 +173,7 @@ BdsSignalEventAfterConsoleReadyBeforeBootOption (
EFI_STATUS Status;
EFI_EVENT BdsConsoleEvent;
- DEBUG ((DEBUG_INFO, "%a \n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a \n", __func__));
Status = CreateBdsEvent (
TPL_CALLBACK,
diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHookLib.c b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHookLib.c
index 238513f6..0c45ea9f 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHookLib.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBdsHookLib/BoardBdsHookLib.c
@@ -275,7 +275,7 @@ RemoveStaleFvFileOptions (
DEBUG ((
EFI_ERROR (Status) ? EFI_D_WARN : DEBUG_VERBOSE,
"%a: removing stale Boot#%04x %s: %r\n",
- __FUNCTION__,
+ __func__,
(UINT32)BootOptions[Index].OptionNumber,
DevicePathString == NULL ? L"<unavailable>" : DevicePathString,
Status
@@ -948,7 +948,7 @@ SetPciIntLine (
// DEBUG((
// DEBUG_ERROR,
// "%a: PCI host bridge (00:00.0) should have no interrupts!\n",
-// __FUNCTION__
+// __func__
// ));
// ASSERT (FALSE);
}
@@ -997,7 +997,7 @@ SetPciIntLine (
Status = PciIo->GetLocation (PciIo, &Segment, &Bus, &Device, &Function);
ASSERT_EFI_ERROR (Status);
- DEBUG ((DEBUG_VERBOSE, "%a: [%02x:%02x.%x] %s -> 0x%02x\n", __FUNCTION__,
+ DEBUG ((DEBUG_VERBOSE, "%a: [%02x:%02x.%x] %s -> 0x%02x\n", __func__,
(UINT32)Bus, (UINT32)Device, (UINT32)Function, DevPathString,
IrqLine));
@@ -1081,7 +1081,7 @@ PciAcpiInitialization (
break;
default:
DEBUG ((DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n",
- __FUNCTION__, mHostBridgeDevId));
+ __func__, mHostBridgeDevId));
ASSERT (FALSE);
return;
}
@@ -1113,7 +1113,7 @@ PlatformBdsConnectSequence (
{
UINTN Index;
- DEBUG ((DEBUG_INFO, "%a called\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a called\n", __func__));
Index = 0;
@@ -1283,7 +1283,7 @@ BdsReadyToBootCallback (
IN VOID *Context
)
{
- DEBUG ((DEBUG_INFO, "%a called\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a called\n", __func__));
}
@@ -1313,7 +1313,7 @@ BdsSmmReadyToLockCallback (
return;
}
- DEBUG ((DEBUG_INFO, "%a called\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a called\n", __func__));
//
// Dispatch the deferred 3rd party images.
@@ -1377,7 +1377,7 @@ BdsPciEnumCompleteCallback (
PlatformConsole[MaxCount - 1].DevicePath = NULL;
}
- DEBUG ((DEBUG_INFO, "%a called\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a called\n", __func__));
PlatformInitializeConsole (PlatformConsole);
}
@@ -1401,7 +1401,7 @@ BdsBeforeConsoleAfterTrustedConsoleCallback (
UINTN Index;
EFI_STATUS Status;
- DEBUG ((DEBUG_INFO, "%a called\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a called\n", __func__));
NvBootOptions = EfiBootManagerGetLoadOptions (&NvBootOptionCount, LoadOptionTypeBoot);
for (Index = 0; Index < NvBootOptionCount; Index++) {
@@ -1410,7 +1410,7 @@ BdsBeforeConsoleAfterTrustedConsoleCallback (
DEBUG ((
DEBUG_ERROR,
"%a: removing Boot#%04x %r\n",
- __FUNCTION__,
+ __func__,
(UINT32) NvBootOptions[Index].OptionNumber,
Status
));
@@ -1441,7 +1441,7 @@ BdsBeforeConsoleBeforeEndOfDxeGuidCallback (
IN EFI_EVENT Event,
IN VOID *Context
){
- DEBUG ((DEBUG_INFO, "%a called\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a called\n", __func__));
}
/**
@@ -1459,7 +1459,7 @@ BdsAfterConsoleReadyBeforeBootOptionCallback (
{
EFI_BOOT_MODE BootMode;
- DEBUG ((DEBUG_INFO, "%a called\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a called\n", __func__));
//
// Get current Boot Mode
diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/Platform/Intel/SimicsOpenBoardPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
index 3b71c8ae..673f90a1 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
@@ -151,7 +151,7 @@ InitRootBridge (
DevicePath = AllocateCopyPool (sizeof mRootBridgeDevicePathTemplate,
&mRootBridgeDevicePathTemplate);
if (DevicePath == NULL) {
- DEBUG ((EFI_D_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES));
+ DEBUG ((EFI_D_ERROR, "%a: %r\n", __func__, EFI_OUT_OF_RESOURCES));
return EFI_OUT_OF_RESOURCES;
}
DevicePath->AcpiDevicePath.UID = RootBusNumber;
@@ -159,7 +159,7 @@ InitRootBridge (
DEBUG ((EFI_D_INFO,
"%a: populated root bus %d, with room for %d subordinate bus(es)\n",
- __FUNCTION__, RootBusNumber, MaxSubBusNumber - RootBusNumber));
+ __func__, RootBusNumber, MaxSubBusNumber - RootBusNumber));
return EFI_SUCCESS;
}
@@ -243,7 +243,7 @@ PciHostBridgeGetRootBridges (
//
Bridges = AllocatePool ((1 + (UINTN)ExtraRootBridges) * sizeof *Bridges);
if (Bridges == NULL) {
- DEBUG ((EFI_D_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES));
+ DEBUG ((EFI_D_ERROR, "%a: %r\n", __func__, EFI_OUT_OF_RESOURCES));
return NULL;
}
Initialized = 0;
diff --git a/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c b/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c
index 09d43c6b..2e4bc648 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c
@@ -370,7 +370,7 @@ DecompressMemFvs (
DEBUG ((EFI_D_VERBOSE, "PcdSimicsDecompressionScratchEnd: 0x%x\n", PcdGet32 (PcdSimicsDecompressionScratchEnd)));
DEBUG ((EFI_D_VERBOSE, "%a: OutputBuffer@%p+0x%x ScratchBuffer@%p+0x%x "
- "PcdSimicsDecompressionScratchEnd=0x%x\n", __FUNCTION__, OutputBuffer,
+ "PcdSimicsDecompressionScratchEnd=0x%x\n", __func__, OutputBuffer,
OutputBufferSize, ScratchBuffer, ScratchBufferSize,
PcdGet32 (PcdSimicsDecompressionScratchEnd)));
ASSERT ((UINTN)ScratchBuffer + ScratchBufferSize ==
diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsDxe/Platform.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsDxe/Platform.c
index c856ff44..ddfed72d 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/SimicsDxe/Platform.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsDxe/Platform.c
@@ -228,7 +228,7 @@ ExtractConfig (
MAIN_FORM_STATE MainFormState;
EFI_STATUS Status;
- DEBUG ((EFI_D_VERBOSE, "%a: Request=\"%s\"\n", __FUNCTION__, Request));
+ DEBUG ((EFI_D_VERBOSE, "%a: Request=\"%s\"\n", __func__, Request));
Status = PlatformConfigToFormState (&MainFormState);
if (EFI_ERROR (Status)) {
@@ -244,9 +244,9 @@ ExtractConfig (
Results, Progress);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "%a: BlockToConfig(): %r, Progress=\"%s\"\n",
- __FUNCTION__, Status, (Status == EFI_DEVICE_ERROR) ? NULL : *Progress));
+ __func__, Status, (Status == EFI_DEVICE_ERROR) ? NULL : *Progress));
} else {
- DEBUG ((EFI_D_VERBOSE, "%a: Results=\"%s\"\n", __FUNCTION__, *Results));
+ DEBUG ((EFI_D_VERBOSE, "%a: Results=\"%s\"\n", __func__, *Results));
}
return Status;
}
@@ -321,7 +321,7 @@ RouteConfig (
UINTN BlockSize;
EFI_STATUS Status;
- DEBUG ((EFI_D_VERBOSE, "%a: Configuration=\"%s\"\n", __FUNCTION__,
+ DEBUG ((EFI_D_VERBOSE, "%a: Configuration=\"%s\"\n", __func__,
Configuration));
//
@@ -344,7 +344,7 @@ RouteConfig (
(VOID *) &MainFormState, &BlockSize, Progress);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "%a: ConfigToBlock(): %r, Progress=\"%s\"\n",
- __FUNCTION__, Status,
+ __func__, Status,
(Status == EFI_BUFFER_TOO_SMALL) ? NULL : *Progress));
return Status;
}
@@ -373,7 +373,7 @@ Callback (
)
{
DEBUG ((EFI_D_VERBOSE, "%a: Action=0x%Lx QuestionId=%d Type=%d\n",
- __FUNCTION__, (UINT64) Action, QuestionId, Type));
+ __func__, (UINT64) Action, QuestionId, Type));
if (Action != EFI_BROWSER_ACTION_CHANGED) {
return EFI_UNSUPPORTED;
@@ -661,7 +661,7 @@ ExecutePlatformConfig (
Status = PlatformConfigLoad (&PlatformConfig, &OptionalElements);
if (EFI_ERROR (Status)) {
DEBUG (((Status == EFI_NOT_FOUND) ? EFI_D_VERBOSE : EFI_D_ERROR,
- "%a: failed to load platform config: %r\n", __FUNCTION__, Status));
+ "%a: failed to load platform config: %r\n", __func__, Status));
return Status;
}
diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/FeatureControl.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/FeatureControl.c
index 9d2fc65a..0790bc53 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/FeatureControl.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/FeatureControl.c
@@ -63,7 +63,7 @@ OnMpServicesAvailable (
EFI_PEI_MP_SERVICES_PPI *MpServices;
EFI_STATUS Status;
- DEBUG ((EFI_D_VERBOSE, "%a: %a\n", gEfiCallerBaseName, __FUNCTION__));
+ DEBUG ((EFI_D_VERBOSE, "%a: %a\n", gEfiCallerBaseName, __func__));
//
// Write the MSR on all the APs in parallel.
//
@@ -77,7 +77,7 @@ OnMpServicesAvailable (
NULL // ProcedureArgument
);
if (EFI_ERROR (Status) && Status != EFI_NOT_STARTED) {
- DEBUG ((EFI_D_ERROR, "%a: StartupAllAps(): %r\n", __FUNCTION__, Status));
+ DEBUG ((EFI_D_ERROR, "%a: StartupAllAps(): %r\n", __func__, Status));
return Status;
}
@@ -110,6 +110,6 @@ InstallFeatureControlCallback (
Status = PeiServicesNotifyPpi (&mMpServicesNotify);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "%a: failed to set up MP Services callback: %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
}
diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c
index b1df1c2e..bef2221e 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c
@@ -49,7 +49,7 @@ X58TsegMbytesInitialization(
DEBUG_ERROR,
"%a: no TSEG (SMRAM) on host bridge DID=0x%04x; "
"only DID=0x%04x (X58) is supported\n",
- __FUNCTION__,
+ __func__,
mHostBridgeDevId,
INTEL_ICH10_DEVICE_ID
));
@@ -155,7 +155,7 @@ GetFirstNonAddress (
if (Pci64Size == 0) {
if (mBootMode != BOOT_ON_S3_RESUME) {
DEBUG ((EFI_D_INFO, "%a: disabling 64-bit PCI host aperture\n",
- __FUNCTION__));
+ __func__));
PcdSet64S (PcdPciMmio64Size, 0);
}
@@ -191,7 +191,7 @@ GetFirstNonAddress (
PcdSet64S (PcdPciMmio64Base, Pci64Base);
PcdSet64S (PcdPciMmio64Size, Pci64Size);
DEBUG ((EFI_D_INFO, "%a: Pci64Base=0x%Lx Pci64Size=0x%Lx\n",
- __FUNCTION__, Pci64Base, Pci64Size));
+ __func__, Pci64Base, Pci64Size));
}
//
@@ -351,7 +351,7 @@ PublishPeiMemory (
} else {
PeiMemoryCap = GetPeiMemoryCap ();
DEBUG ((EFI_D_INFO, "%a: mPhysMemAddressWidth=%d PeiMemoryCap=%u KB\n",
- __FUNCTION__, mPhysMemAddressWidth, PeiMemoryCap >> 10));
+ __func__, mPhysMemAddressWidth, PeiMemoryCap >> 10));
//
// Determine the range of memory to use during PEI
@@ -397,7 +397,7 @@ QemuInitializeRam (
EFI_SMRAM_HOB_DESCRIPTOR_BLOCK *SmramHobDescriptorBlock;
VOID *GuidHob;
- DEBUG ((EFI_D_INFO, "%a called\n", __FUNCTION__));
+ DEBUG ((EFI_D_INFO, "%a called\n", __func__));
//
// Determine total memory size available
diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c
index 6963f39a..39ce2b46 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c
@@ -363,7 +363,7 @@ MiscInitialization (
break;
default:
DEBUG ((EFI_D_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n",
- __FUNCTION__, mHostBridgeDevId));
+ __func__, mHostBridgeDevId));
ASSERT (FALSE);
return;
}
diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsVideoDxe/Initialize.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsVideoDxe/Initialize.c
index c8a76636..8c4b2144 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/SimicsVideoDxe/Initialize.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsVideoDxe/Initialize.c
@@ -289,14 +289,14 @@ QemuVideoBochsModeSetup (
Private->PciIo->Mem.Read (Private->PciIo, EfiPciIoWidthUint32,
PCI_BAR_IDX2, 40, 1, &AvailableFbSize))) {
DEBUG ((EFI_D_ERROR, "%a: can't read size of drawable buffer from QXL "
- "ROM\n", __FUNCTION__));
+ "ROM\n", __func__));
return EFI_NOT_FOUND;
}
} else {
AvailableFbSize = BochsRead (Private, VBE_DISPI_INDEX_VIDEO_MEMORY_64K);
AvailableFbSize *= SIZE_64KB;
}
- DEBUG ((EFI_D_INFO, "%a: AvailableFbSize=0x%x\n", __FUNCTION__,
+ DEBUG ((EFI_D_INFO, "%a: AvailableFbSize=0x%x\n", __func__,
AvailableFbSize));
//
diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsVideoDxe/VbeShim.c b/Platform/Intel/SimicsOpenBoardPkg/SimicsVideoDxe/VbeShim.c
index ba13e3d8..bb16cca0 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/SimicsVideoDxe/VbeShim.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsVideoDxe/VbeShim.c
@@ -71,12 +71,12 @@ InstallVbeShim (
DEBUG ((
DEBUG_WARN,
"%a: page 0 protected, not installing VBE shim\n",
- __FUNCTION__
+ __func__
));
DEBUG ((
DEBUG_WARN,
"%a: page 0 protection prevents Windows 7 from booting anyway\n",
- __FUNCTION__
+ __func__
));
return;
}
@@ -113,7 +113,7 @@ InstallVbeShim (
Handler = (Int0x10->Segment << 4) + Int0x10->Offset;
if (Handler >= SegmentC && Handler < SegmentF) {
DEBUG ((EFI_D_INFO, "%a: Video BIOS handler found at %04x:%04x\n",
- __FUNCTION__, Int0x10->Segment, Int0x10->Offset));
+ __func__, Int0x10->Segment, Int0x10->Offset));
return;
}
@@ -124,7 +124,7 @@ InstallVbeShim (
DEBUG ((
DEBUG_INFO,
"%a: failed to allocate page at zero: %r\n",
- __FUNCTION__,
+ __func__,
Segment0AllocationStatus
));
} else {
@@ -144,7 +144,7 @@ InstallVbeShim (
DEBUG((
DEBUG_ERROR,
"%a: unknown host bridge device ID: 0x%04x\n",
- __FUNCTION__,
+ __func__,
HostBridgeDevId
));
ASSERT (FALSE);
@@ -298,5 +298,5 @@ InstallVbeShim (
Int0x10->Segment = (UINT16) ((UINT32)SegmentC >> 4);
Int0x10->Offset = (UINT16) ((UINTN) (VbeModeInfo + 1) - SegmentC);
- DEBUG ((EFI_D_INFO, "%a: VBE shim installed\n", __FUNCTION__));
+ DEBUG ((EFI_D_INFO, "%a: VBE shim installed\n", __func__));
}
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Uba/TypeAowanda/Pei/AcpiTablePcds.c b/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Uba/TypeAowanda/Pei/AcpiTablePcds.c
index 1810990b..be1977dc 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Uba/TypeAowanda/Pei/AcpiTablePcds.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Uba/TypeAowanda/Pei/AcpiTablePcds.c
@@ -41,7 +41,7 @@ TypeAowandaPlatformUpdateAcpiTablePcds (
// #
Size = AsciiStrSize (AcpiName10nm);
Status = PcdSetPtrS (PcdOemSkuAcpiName, &Size, AcpiName10nm);
- DEBUG ((DEBUG_INFO, "%a TypeAowanda ICX\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a TypeAowanda ICX\n", __func__));
ASSERT_EFI_ERROR (Status);
Size = AsciiStrSize (OemTableIdXhci);
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Uba/TypeAowanda/Pei/PcdData.c b/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Uba/TypeAowanda/Pei/PcdData.c
index 07fdb966..7775f7b6 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Uba/TypeAowanda/Pei/PcdData.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/Uba/TypeAowanda/Pei/PcdData.c
@@ -57,7 +57,7 @@ GpioGetRiserId (
RevId = 0;
DynamicSiLibraryPpi = NULL;
- DEBUG((EFI_D_INFO, "%a Entry...\n", __FUNCTION__));
+ DEBUG((EFI_D_INFO, "%a Entry...\n", __func__));
Status = PeiServicesLocatePpi (&gDynamicSiLibraryPpiGuid, 0, NULL, (VOID **) &DynamicSiLibraryPpi);
if (EFI_ERROR (Status)) {
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/Uba/TypeBoardPortTemplate/Pei/AcpiTablePcds.c b/Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/Uba/TypeBoardPortTemplate/Pei/AcpiTablePcds.c
index 1fdb9c21..cc745701 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/Uba/TypeBoardPortTemplate/Pei/AcpiTablePcds.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/BoardPortTemplate/Uba/TypeBoardPortTemplate/Pei/AcpiTablePcds.c
@@ -40,7 +40,7 @@ TypeBoardPortTemplatePlatformUpdateAcpiTablePcds (
//#
Size = AsciiStrSize (AcpiName10nm);
Status = PcdSetPtrS (PcdOemSkuAcpiName , &Size, AcpiName10nm);
- DEBUG ((DEBUG_INFO, "%a TypeBoardPortTemplate ICX\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a TypeBoardPortTemplate ICX\n", __func__));
ASSERT_EFI_ERROR (Status);
Size = AsciiStrSize (OemTableIdXhci);
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.c b/Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.c
index a884c974..b3bcc680 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiPlatform/AcpiPlatform.c
@@ -57,7 +57,7 @@ AcpiOnPciEnumCmplCallback (
}
gBS->CloseEvent (Event);
- DEBUG ((DEBUG_INFO, "[ACPI] %a\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "[ACPI] %a\n", __func__));
AcpiVtdTablesInstall ();
}
@@ -69,7 +69,7 @@ AcpiOnEndOfDxeCallback (
IN VOID *Context
)
{
- DEBUG ((DEBUG_INFO, "[ACPI] %a\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "[ACPI] %a\n", __func__));
//
// Installing ACPI Tables: NFIT, PCAT
//
@@ -92,7 +92,7 @@ AcpiOnExitBootServicesCallback (
gBS->CloseEvent (Event);
- DEBUG ((DEBUG_INFO, "[ACPI] %a\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "[ACPI] %a\n", __func__));
//
// Enable SCI
//
@@ -212,7 +212,7 @@ AcpiOnReadyToBootCallback (
return;
}
mFirstNotify = TRUE;
- DEBUG ((DEBUG_INFO, "[ACPI] %a\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "[ACPI] %a\n", __func__));
Status = GetEntireConfig (&SetupData);
ASSERT_EFI_ERROR (Status);
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Features/Pci/Dxe/PciPlatform/PciPlatformHooks.c b/Platform/Intel/WhitleyOpenBoardPkg/Features/Pci/Dxe/PciPlatform/PciPlatformHooks.c
index 42751a10..ee1ce08c 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Features/Pci/Dxe/PciPlatform/PciPlatformHooks.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Features/Pci/Dxe/PciPlatform/PciPlatformHooks.c
@@ -720,7 +720,7 @@ PlatformPrepController (
&DummyData
);
PCIDEBUG ("%a: For B(0x%x)-D(0x%x)-F(0x%x),Pci.Write() returns with %r\n",
- __FUNCTION__, SecBus, Device, Func, Status);
+ __func__, SecBus, Device, Func, Status);
if (EFI_ERROR (Status)) {
//
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/Uba/TypeJunctionCity/Pei/AcpiTablePcds.c b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/Uba/TypeJunctionCity/Pei/AcpiTablePcds.c
index 8a6fc174..3cf10cf5 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/Uba/TypeJunctionCity/Pei/AcpiTablePcds.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/Uba/TypeJunctionCity/Pei/AcpiTablePcds.c
@@ -41,7 +41,7 @@ TypeJunctionCityPlatformUpdateAcpiTablePcds (
//#
Size = AsciiStrSize (AcpiName10nm);
Status = PcdSetPtrS (PcdOemSkuAcpiName , &Size, AcpiName10nm);
- DEBUG ((DEBUG_INFO, "%a TypeJunctionCity ICX\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a TypeJunctionCity ICX\n", __func__));
ASSERT_EFI_ERROR (Status);
Size = AsciiStrSize (OemTableIdXhci);
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLibHmat.c b/Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLibHmat.c
index f0fe01a6..eb4c9d26 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLibHmat.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Library/AcpiPlatformTableLib/AcpiPlatformLibHmat.c
@@ -721,7 +721,7 @@ GetProcessorDomains (
NodeId = (NodeId * HmatData->VirtualNumOfCluster) + (Index % HmatData->VirtualNumOfCluster);
DEBUG ((DEBUG_INFO, "%a: SocketId: 0x%x SncNumOfCluster: 0x%x ImcInterBitmap:0x%x and NodeId:0x%x\n",
- __FUNCTION__, mSystemMemoryMap->Element[Index].SocketId, HmatData->SncNumOfCluster, mSystemMemoryMap->Element[Index].ImcInterBitmap, NodeId));
+ __func__, mSystemMemoryMap->Element[Index].SocketId, HmatData->SncNumOfCluster, mSystemMemoryMap->Element[Index].ImcInterBitmap, NodeId));
} else {
NodeId = SocketLogicalId;
}
@@ -917,7 +917,7 @@ PatchHmatMsars (
}
ProcessorNodeId = (ProcessorNodeId * HmatData->VirtualNumOfCluster) + (Index % HmatData->VirtualNumOfCluster);
DEBUG ((DEBUG_INFO, "%a: SocketId: 0x%x SncNumOfCluster: 0x%x ImcInterBitmap:0x%x and NodeId:0x%x \n",
- __FUNCTION__, mSystemMemoryMap->Element[Index].SocketId, HmatData->SncNumOfCluster, mSystemMemoryMap->Element[Index].ImcInterBitmap, ProcessorNodeId));
+ __func__, mSystemMemoryMap->Element[Index].SocketId, HmatData->SncNumOfCluster, mSystemMemoryMap->Element[Index].ImcInterBitmap, ProcessorNodeId));
} else {
ProcessorNodeId = SocketLogicalId;
}
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/Common/Pei/IioPortBifurcationVer1.c b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/Common/Pei/IioPortBifurcationVer1.c
index 153cc505..1367125a 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/Common/Pei/IioPortBifurcationVer1.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/Common/Pei/IioPortBifurcationVer1.c
@@ -373,7 +373,7 @@ CalculatePEXPHideFromIouBif_SKX (
if (IioIndex >= MaxIIO || Iou >= NELEMENTS (IioGlobalData->SetupData.ConfigIOU[IioIndex])) {
- DEBUG ((DEBUG_ERROR, "[IIO] ERROR: %a: IIO instance %d or IOU %d out of range", __FUNCTION__, IioIndex, Iou));
+ DEBUG ((DEBUG_ERROR, "[IIO] ERROR: %a: IIO instance %d or IOU %d out of range", __func__, IioIndex, Iou));
ASSERT (FALSE);
return;
}
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCityRP/Pei/AcpiTablePcds.c b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCityRP/Pei/AcpiTablePcds.c
index 44b1e767..aa8f6f03 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCityRP/Pei/AcpiTablePcds.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCityRP/Pei/AcpiTablePcds.c
@@ -40,7 +40,7 @@ TypeWilsonCityRPPlatformUpdateAcpiTablePcds (
//#
Size = AsciiStrSize (AcpiName10nm);
Status = PcdSetPtrS (PcdOemSkuAcpiName , &Size, AcpiName10nm);
- DEBUG ((DEBUG_INFO, "%a TypeWilsonCityRP ICX\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a TypeWilsonCityRP ICX\n", __func__));
ASSERT_EFI_ERROR (Status);
Size = AsciiStrSize (OemTableIdXhci);
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCitySMT/Pei/AcpiTablePcds.c b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCitySMT/Pei/AcpiTablePcds.c
index 0055323e..e8b65702 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCitySMT/Pei/AcpiTablePcds.c
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Uba/UbaMain/TypeWilsonCitySMT/Pei/AcpiTablePcds.c
@@ -38,7 +38,7 @@ TypeWilsonCitySMTPlatformUpdateAcpiTablePcds (
//#
Size = AsciiStrSize (AcpiName10nm);
Status = PcdSetPtrS (PcdOemSkuAcpiName , &Size, AcpiName10nm);
- DEBUG ((DEBUG_INFO, "%a TypeWilsonCitySMT ICX\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a TypeWilsonCitySMT ICX\n", __func__));
ASSERT_EFI_ERROR (Status);
Size = AsciiStrSize (OemTableIdXhci);
diff --git a/Platform/Loongson/LoongArchQemuPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c b/Platform/Loongson/LoongArchQemuPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c
index 1781c1c3..413bae78 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c
+++ b/Platform/Loongson/LoongArchQemuPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c
@@ -66,7 +66,7 @@ VirtNorFlashPlatformGetDevices (
DEBUG ((
DEBUG_ERROR,
"%a: GetNodeProperty () failed (Status == %r)\n",
- __FUNCTION__,
+ __func__,
Status
));
return Status;
@@ -78,7 +78,7 @@ VirtNorFlashPlatformGetDevices (
DEBUG ((
DEBUG_ERROR,
"%a: reg node size(%d) is too small \n",
- __FUNCTION__,
+ __func__,
PropSize
));
return EFI_NOT_FOUND;
diff --git a/Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/PlatformBm.c b/Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/PlatformBm.c
index eb7f4241..2ed70d86 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/PlatformBm.c
+++ b/Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/PlatformBm.c
@@ -121,7 +121,7 @@ FilterAndProcess (
//
// This is not an error, just an informative condition.
//
- DEBUG ((DEBUG_VERBOSE, "%a: %g: %r\n", __FUNCTION__, ProtocolGuid,
+ DEBUG ((DEBUG_VERBOSE, "%a: %g: %r\n", __func__, ProtocolGuid,
Status));
return;
}
@@ -188,7 +188,7 @@ IsPciDisplay (
Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint32, 0 /* Offset */,
sizeof Pci / sizeof (UINT32), &Pci);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __FUNCTION__, ReportText, Status));
+ DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __func__, ReportText, Status));
return FALSE;
}
@@ -220,7 +220,7 @@ Connect (
FALSE // Recursive
);
DEBUG ((EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: %s: %r\n",
- __FUNCTION__, ReportText, Status));
+ __func__, ReportText, Status));
}
/**
@@ -245,25 +245,25 @@ AddOutput (
DevicePath = DevicePathFromHandle (Handle);
if (DevicePath == NULL) {
DEBUG ((DEBUG_ERROR, "%a: %s: handle %p: device path not found\n",
- __FUNCTION__, ReportText, Handle));
+ __func__, ReportText, Handle));
return;
}
Status = EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: %s: adding to ConOut: %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_ERROR, "%a: %s: adding to ConOut: %r\n", __func__,
ReportText, Status));
return;
}
Status = EfiBootManagerUpdateConsoleVariable (ErrOut, DevicePath, NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: %s: adding to ErrOut: %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_ERROR, "%a: %s: adding to ErrOut: %r\n", __func__,
ReportText, Status));
return;
}
- DEBUG ((DEBUG_VERBOSE, "%a: %s: added to ConOut and ErrOut\n", __FUNCTION__,
+ DEBUG ((DEBUG_VERBOSE, "%a: %s: added to ConOut and ErrOut\n", __func__,
ReportText));
}
/**
@@ -452,7 +452,7 @@ RemoveStaleFvFileOptions (
DEBUG ((
EFI_ERROR (Status) ? EFI_D_WARN : DEBUG_VERBOSE,
"%a: removing stale Boot#%04x %s: %r\n",
- __FUNCTION__,
+ __func__,
(UINT32)BootOptions[Index].OptionNumber,
DevicePathString == NULL ? L"<unavailable>" : DevicePathString,
Status
diff --git a/Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/QemuKernel.c b/Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/QemuKernel.c
index 386003a8..bf55bb93 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/QemuKernel.c
+++ b/Platform/Loongson/LoongArchQemuPkg/Library/PlatformBootManagerLib/QemuKernel.c
@@ -70,7 +70,7 @@ TryRunningQemuKernel (
DEBUG ((
DEBUG_ERROR,
"%a: QemuStartKernelImage(): %r\n",
- __FUNCTION__,
+ __func__,
Status
));
}
diff --git a/Platform/Loongson/LoongArchQemuPkg/Library/QemuFwCfgLib/QemuFwCfgPeiLib.c b/Platform/Loongson/LoongArchQemuPkg/Library/QemuFwCfgLib/QemuFwCfgPeiLib.c
index 5593856b..f9909713 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Library/QemuFwCfgLib/QemuFwCfgPeiLib.c
+++ b/Platform/Loongson/LoongArchQemuPkg/Library/QemuFwCfgLib/QemuFwCfgPeiLib.c
@@ -454,7 +454,7 @@ QemuFwCfgInitialize (
break;
} else {
DEBUG ((DEBUG_ERROR, "%a: Failed to parse FDT QemuCfg node\n",
- __FUNCTION__));
+ __func__));
break;
}
}
diff --git a/Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGed.c b/Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGed.c
index 0df629ff..4e86ec1d 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGed.c
+++ b/Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGed.c
@@ -136,7 +136,7 @@ ResetSystemLibConstructor (
Status = GetPowerManagerByParseAcpiInfo ();
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a:%d\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_INFO, "%a:%d\n", __func__, __LINE__));
}
ASSERT (mPowerManager.SleepControlRegAddr);
diff --git a/Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/DxeResetSystemAcpiGed.c b/Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/DxeResetSystemAcpiGed.c
index ef48946a..aa85c8ad 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/DxeResetSystemAcpiGed.c
+++ b/Platform/Loongson/LoongArchQemuPkg/Library/ResetSystemAcpiLib/DxeResetSystemAcpiGed.c
@@ -45,7 +45,7 @@ SetMemoryAttributesRunTime (
Status = gDS->GetMemorySpaceDescriptor (Address, &Descriptor);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a: GetMemorySpaceDescriptor failed\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: GetMemorySpaceDescriptor failed\n", __func__));
return Status;
}
@@ -57,7 +57,7 @@ SetMemoryAttributesRunTime (
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a: AddMemorySpace failed\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: AddMemorySpace failed\n", __func__));
return Status;
}
@@ -67,7 +67,7 @@ SetMemoryAttributesRunTime (
EFI_MEMORY_RUNTIME
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a:%d SetMemorySpaceAttributes failed\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_INFO, "%a:%d SetMemorySpaceAttributes failed\n", __func__, __LINE__));
return Status;
}
} else if (!(Descriptor.Attributes & EFI_MEMORY_RUNTIME)) {
@@ -78,7 +78,7 @@ SetMemoryAttributesRunTime (
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a:%d SetMemorySpaceAttributes failed\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_INFO, "%a:%d SetMemorySpaceAttributes failed\n", __func__, __LINE__));
return Status;
}
}
@@ -192,27 +192,27 @@ AcpiNotificationEvent (
return ;
}
- DEBUG ((DEBUG_INFO, "%a: sleepControl %llx\n", __FUNCTION__, mPowerManager.SleepControlRegAddr));
+ DEBUG ((DEBUG_INFO, "%a: sleepControl %llx\n", __func__, mPowerManager.SleepControlRegAddr));
ASSERT (mPowerManager.SleepControlRegAddr);
Status = SetMemoryAttributesRunTime (mPowerManager.SleepControlRegAddr);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a:%d\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_INFO, "%a:%d\n", __func__, __LINE__));
return ;
}
- DEBUG ((DEBUG_INFO, "%a: sleepStatus %llx\n", __FUNCTION__, mPowerManager.SleepStatusRegAddr));
+ DEBUG ((DEBUG_INFO, "%a: sleepStatus %llx\n", __func__, mPowerManager.SleepStatusRegAddr));
ASSERT (mPowerManager.SleepStatusRegAddr);
Status = SetMemoryAttributesRunTime (mPowerManager.SleepStatusRegAddr);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a:%d\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_INFO, "%a:%d\n", __func__, __LINE__));
return ;
}
- DEBUG ((DEBUG_INFO, "%a: ResetReg %llx\n", __FUNCTION__, mPowerManager.ResetRegAddr));
+ DEBUG ((DEBUG_INFO, "%a: ResetReg %llx\n", __func__, mPowerManager.ResetRegAddr));
ASSERT (mPowerManager.ResetRegAddr);
Status = SetMemoryAttributesRunTime (mPowerManager.ResetRegAddr);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a:%d\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_INFO, "%a:%d\n", __func__, __LINE__));
}
return ;
}
diff --git a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c
index 84bb8e8a..16096e06 100644
--- a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c
+++ b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c
@@ -289,7 +289,7 @@ GetRtcAddress (
break;
} else {
DEBUG ((DEBUG_ERROR, "%a: Failed to parse FDT rtc node\n",
- __FUNCTION__));
+ __func__));
break;
}
}
@@ -383,7 +383,7 @@ SystemMemorySizeInitialization (
QemuFwCfgSelectItem (QemuFwCfgItemRamSize);
RamSize= QemuFwCfgRead64 ();
- DEBUG ((DEBUG_INFO, "%a: QEMU reports %dM system memory\n", __FUNCTION__,
+ DEBUG ((DEBUG_INFO, "%a: QEMU reports %dM system memory\n", __func__,
RamSize/1024/1024));
//
diff --git a/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c b/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
index 4d790103..aa91cd0e 100644
--- a/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
+++ b/Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
@@ -38,7 +38,7 @@ ConfigurePins (
Status = MvGpioGetProtocol (DriverType, &GpioProtocol);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __func__));
return Status;
}
diff --git a/Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c b/Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
index cde73dda..e6151d39 100644
--- a/Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
+++ b/Platform/Marvell/Armada80x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.c
@@ -76,7 +76,7 @@ XhciInit (
Status = MvGpioGetProtocol (MV_GPIO_DRIVER_TYPE_PCA95XX, &GpioProtocol);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __func__));
return Status;
}
diff --git a/Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c b/Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c
index 965d8efe..7e01c3cd 100644
--- a/Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c
+++ b/Platform/Marvell/Cn913xDb/NonDiscoverableInitLib/NonDiscoverableInitLib.c
@@ -38,7 +38,7 @@ ConfigurePins (
Status = MvGpioGetProtocol (DriverType, &GpioProtocol);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __func__));
return Status;
}
diff --git a/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c b/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c
index f712d593..060f65f4 100644
--- a/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c
+++ b/Platform/NXP/LS1046aFrwyPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c
@@ -40,7 +40,7 @@ ArmPlatformGetVirtualMemoryMap (
MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS);
if (VirtualMemoryTable == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __func__));
return;
}
diff --git a/Platform/NXP/LX2160aRdbPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platform/NXP/LX2160aRdbPkg/Drivers/PlatformDxe/PlatformDxe.c
index 0c013dd0..c5973030 100644
--- a/Platform/NXP/LX2160aRdbPkg/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Platform/NXP/LX2160aRdbPkg/Drivers/PlatformDxe/PlatformDxe.c
@@ -62,7 +62,7 @@ SetPciControllerPcdOptions (
PcdSetBoolS (PcdPciHideRootPort, TRUE);
break;
default:
- DEBUG ((DEBUG_ERROR, "%a: Invalid SoC Version 0x%x \n", __FUNCTION__,
+ DEBUG ((DEBUG_ERROR, "%a: Invalid SoC Version 0x%x \n", __func__,
SVR_MAJOR(Svr)));
return EFI_INVALID_PARAMETER;
}
diff --git a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c
index 98a6b2fc..050b4b88 100644
--- a/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c
+++ b/Platform/NXP/LX2160aRdbPkg/Library/ArmPlatformLib/ArmPlatformLibMem.c
@@ -41,7 +41,7 @@ ArmPlatformGetVirtualMemoryMap (
MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS);
if (VirtualMemoryTable == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __func__));
return;
}
diff --git a/Platform/RISC-V/PlatformPkg/Library/Edk2OpensbiPlatformWrapperLib/Edk2OpensbiPlatformWrapperLib.c b/Platform/RISC-V/PlatformPkg/Library/Edk2OpensbiPlatformWrapperLib/Edk2OpensbiPlatformWrapperLib.c
index c4f9dd02..68cb3386 100644
--- a/Platform/RISC-V/PlatformPkg/Library/Edk2OpensbiPlatformWrapperLib/Edk2OpensbiPlatformWrapperLib.c
+++ b/Platform/RISC-V/PlatformPkg/Library/Edk2OpensbiPlatformWrapperLib/Edk2OpensbiPlatformWrapperLib.c
@@ -43,7 +43,7 @@ SecSetEdk2FwMemoryRegions (
fw_memregs.flags = SBI_DOMAIN_MEMREGION_EXECUTABLE | SBI_DOMAIN_MEMREGION_READABLE;
Ret = sbi_domain_root_add_memregion ((CONST struct sbi_domain_memregion *)&fw_memregs);
if (Ret != 0) {
- DEBUG ((DEBUG_ERROR, "%a: Add firmware regions of FW Domain fail\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Add firmware regions of FW Domain fail\n", __func__));
}
//
@@ -54,7 +54,7 @@ SecSetEdk2FwMemoryRegions (
fw_memregs.flags = SBI_DOMAIN_MEMREGION_READABLE | SBI_DOMAIN_MEMREGION_WRITEABLE;
Ret = sbi_domain_root_add_memregion ((CONST struct sbi_domain_memregion *)&fw_memregs);
if (Ret != 0) {
- DEBUG ((DEBUG_ERROR, "%a: Add firmware regions of variable FW Domain fail\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Add firmware regions of variable FW Domain fail\n", __func__));
}
return Ret;
@@ -76,7 +76,7 @@ SecPostOpenSbiPlatformEarlyInit (
if (!ColdBoot) {
HartId = current_hartid ();
- DEBUG ((DEBUG_INFO, "%a: Non boot hart %d.\n", __FUNCTION__, HartId));
+ DEBUG ((DEBUG_INFO, "%a: Non boot hart %d.\n", __func__, HartId));
return 0;
}
@@ -91,7 +91,7 @@ SecPostOpenSbiPlatformEarlyInit (
// Boot HART is already in the process of OpenSBI initialization.
// We can let other HART to keep booting.
//
- DEBUG ((DEBUG_INFO, "%a: Set boot hart done.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Set boot hart done.\n", __func__));
atomic_write (&BootHartDone, (UINT64)TRUE);
return 0;
}
@@ -117,11 +117,11 @@ SecPostOpenSbiPlatformFinalInit (
if (!ColdBoot) {
HartId = current_hartid ();
- DEBUG ((DEBUG_INFO, "%a: Non boot hart %d.\n", __FUNCTION__, HartId));
+ DEBUG ((DEBUG_INFO, "%a: Non boot hart %d.\n", __func__, HartId));
return 0;
}
- DEBUG ((DEBUG_INFO, "%a: Entry, preparing to jump to PEI Core\n\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry, preparing to jump to PEI Core\n\n", __func__));
SbiScratch = sbi_scratch_thishart_ptr ();
SbiPlatform = (struct sbi_platform *)sbi_platform_ptr (SbiScratch);
@@ -130,7 +130,7 @@ SecPostOpenSbiPlatformFinalInit (
//
// Print out scratch address of each hart
//
- DEBUG ((DEBUG_INFO, "%a: OpenSBI scratch address for each hart:\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: OpenSBI scratch address for each hart:\n", __func__));
for (HartId = 0; HartId < SBI_HARTMASK_MAX_BITS; HartId++) {
if (sbi_platform_hart_invalid (SbiPlatform, HartId)) {
continue;
@@ -159,14 +159,14 @@ SecPostOpenSbiPlatformFinalInit (
DEBUG ((
DEBUG_INFO,
"%a: OpenSBI Hart %d Firmware Context Hart-specific at address: 0x%x\n",
- __FUNCTION__,
+ __func__,
HartId,
FirmwareContext->HartSpecific[HartId]
));
}
}
- DEBUG ((DEBUG_INFO, "%a: Will jump to PEI Core in OpenSBI with \n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Will jump to PEI Core in OpenSBI with \n", __func__));
DEBUG ((DEBUG_INFO, " sbi_scratch = %x\n", SbiScratch));
DEBUG ((DEBUG_INFO, " sbi_platform = %x\n", SbiPlatform));
DEBUG ((DEBUG_INFO, " FirmwareContext = %x\n", FirmwareContext));
@@ -189,7 +189,7 @@ Edk2OpensbiPlatformEarlyInit (
{
INT32 ReturnCode;
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.early_init) {
ReturnCode = platform_ops.early_init (ColdBoot);
@@ -219,7 +219,7 @@ Edk2OpensbiPlatformFinalInit (
{
INT32 ReturnCode;
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.final_init) {
ReturnCode = platform_ops.final_init (ColdBoot);
@@ -244,7 +244,7 @@ Edk2OpensbiPlatformEarlyExit (
VOID
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.early_exit) {
return platform_ops.early_exit ();
@@ -260,7 +260,7 @@ Edk2OpensbiPlatformFinalExit (
VOID
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.early_exit) {
return platform_ops.early_exit ();
@@ -316,7 +316,7 @@ Edk2OpensbiPlatformDomainsInit (
VOID
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.domains_init) {
return platform_ops.domains_init ();
@@ -336,7 +336,7 @@ Edk2OpensbiPlatformSerialInit (
VOID
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.console_init) {
return platform_ops.console_init ();
@@ -357,7 +357,7 @@ Edk2OpensbiPlatformIrqchipInit (
IN BOOLEAN ColdBoot
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.irqchip_init) {
return platform_ops.irqchip_init (ColdBoot);
@@ -375,7 +375,7 @@ Edk2OpensbiPlatformIrqchipExit (
VOID
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.irqchip_exit) {
return platform_ops.irqchip_exit ();
@@ -394,7 +394,7 @@ Edk2OpensbiPlatformIpiInit (
IN BOOLEAN ColdBoot
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.ipi_init) {
return platform_ops.ipi_init (ColdBoot);
@@ -412,7 +412,7 @@ Edk2OpensbiPlatformIpiExit (
VOID
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.ipi_exit) {
return platform_ops.ipi_exit ();
@@ -430,7 +430,7 @@ Edk2OpensbiPlatformTlbrFlushLimit (
VOID
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.get_tlbr_flush_limit) {
return platform_ops.get_tlbr_flush_limit ();
@@ -451,7 +451,7 @@ Edk2OpensbiPlatformTimerInit (
IN BOOLEAN ColdBoot
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.timer_init) {
return platform_ops.timer_init (ColdBoot);
@@ -469,7 +469,7 @@ Edk2OpensbiPlatformTimerExit (
VOID
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.timer_exit) {
return platform_ops.timer_exit ();
@@ -488,7 +488,7 @@ Edk2OpensbiPlatformVendorExtCheck (
IN long ExtId
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.vendor_ext_check) {
return platform_ops.vendor_ext_check (ExtId);
@@ -518,7 +518,7 @@ Edk2OpensbiPlatformVendorExtProvider (
IN struct sbi_trap_info *OutTrap
)
{
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (platform_ops.vendor_ext_provider) {
return platform_ops.vendor_ext_provider (
diff --git a/Platform/RISC-V/PlatformPkg/Universal/FdtPeim/FdtPeim.c b/Platform/RISC-V/PlatformPkg/Universal/FdtPeim/FdtPeim.c
index c56dc4e5..b64812b3 100644
--- a/Platform/RISC-V/PlatformPkg/Universal/FdtPeim/FdtPeim.c
+++ b/Platform/RISC-V/PlatformPkg/Universal/FdtPeim/FdtPeim.c
@@ -44,17 +44,17 @@ PeimPassFdt (
GetFirmwareContextPointer (&FirmwareContext);
if (FirmwareContext == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: OpenSBI Firmware Context is NULL\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: OpenSBI Firmware Context is NULL\n", __func__));
return EFI_UNSUPPORTED;
}
FdtPointer = (VOID *)FirmwareContext->FlattenedDeviceTree;
if (FdtPointer == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Invalid FDT pointer\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Invalid FDT pointer\n", __func__));
return EFI_UNSUPPORTED;
}
- DEBUG ((DEBUG_ERROR, "%a: Build FDT HOB - FDT at address: 0x%x \n", __FUNCTION__, FdtPointer));
+ DEBUG ((DEBUG_ERROR, "%a: Build FDT HOB - FDT at address: 0x%x \n", __func__, FdtPointer));
Base = FdtPointer;
ASSERT (Base != NULL);
ASSERT (fdt_check_header (Base) == 0);
diff --git a/Platform/RISC-V/PlatformPkg/Universal/Pei/PlatformPei/MemDetect.c b/Platform/RISC-V/PlatformPkg/Universal/Pei/PlatformPei/MemDetect.c
index 3e579bfb..2bff1e65 100644
--- a/Platform/RISC-V/PlatformPkg/Universal/Pei/PlatformPei/MemDetect.c
+++ b/Platform/RISC-V/PlatformPkg/Universal/Pei/PlatformPei/MemDetect.c
@@ -52,7 +52,7 @@ PublishPeiMemory (
MemoryBase = 0x80000000UL + 0x1000000UL;
MemorySize = 0x40000000UL - 0x1000000UL; // 1GB - 16MB
- DEBUG ((DEBUG_INFO, "%a: MemoryBase:0x%x MemorySize:%x\n", __FUNCTION__, MemoryBase, MemorySize));
+ DEBUG ((DEBUG_INFO, "%a: MemoryBase:0x%x MemorySize:%x\n", __func__, MemoryBase, MemorySize));
//
// Publish this memory to the PEI Core
diff --git a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c b/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c
index c488f03a..9688115b 100644
--- a/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c
+++ b/Platform/RISC-V/PlatformPkg/Universal/Sec/SecMain.c
@@ -167,10 +167,10 @@ FindFfsFileAndSection (
UINT32 Size;
EFI_PHYSICAL_ADDRESS EndOfFile;
- DEBUG ((DEBUG_INFO, "%a: DBT FV at 0x%x\n", __FUNCTION__, Fv));
+ DEBUG ((DEBUG_INFO, "%a: DBT FV at 0x%x\n", __func__, Fv));
if (Fv->Signature != EFI_FVH_SIGNATURE) {
- DEBUG ((DEBUG_ERROR, "%a: FV at %p does not have FV header signature\n", __FUNCTION__, Fv));
+ DEBUG ((DEBUG_ERROR, "%a: FV at %p does not have FV header signature\n", __func__, Fv));
return EFI_VOLUME_CORRUPTED;
}
@@ -183,20 +183,20 @@ FindFfsFileAndSection (
for (EndOfFile = CurrentAddress + Fv->HeaderLength; ; ) {
CurrentAddress = (EndOfFile + 7) & ~(7ULL);
if (CurrentAddress > EndOfFirmwareVolume) {
- DEBUG ((DEBUG_ERROR, "%a: FV corrupted\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: FV corrupted\n", __func__));
return EFI_VOLUME_CORRUPTED;
}
File = (EFI_FFS_FILE_HEADER *)(UINTN)CurrentAddress;
Size = *(UINT32 *)File->Size & 0xffffff;
if (Size < (sizeof (*File) + sizeof (EFI_COMMON_SECTION_HEADER))) {
- DEBUG ((DEBUG_ERROR, "%a: FV corrupted\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: FV corrupted\n", __func__));
return EFI_VOLUME_CORRUPTED;
}
EndOfFile = CurrentAddress + Size;
if (EndOfFile > EndOfFirmwareVolume) {
- DEBUG ((DEBUG_ERROR, "%a: FV corrupted\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: FV corrupted\n", __func__));
return EFI_VOLUME_CORRUPTED;
}
@@ -204,7 +204,7 @@ FindFfsFileAndSection (
// Look for the request file type
//
if (File->Type != FileType) {
- DEBUG ((DEBUG_INFO, "%a: (File->Type != FileType), find next FFS\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: (File->Type != FileType), find next FFS\n", __func__));
continue;
}
@@ -215,16 +215,16 @@ FindFfsFileAndSection (
FoundSection
);
if (!EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a: Get firmware file section\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Get firmware file section\n", __func__));
return Status;
}
if (Status == EFI_VOLUME_CORRUPTED) {
- DEBUG ((DEBUG_ERROR, "%a: FV corrupted\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: FV corrupted\n", __func__));
return Status;
}
- DEBUG ((DEBUG_INFO, "%a: Find next FFS\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Find next FFS\n", __func__));
}
}
@@ -262,12 +262,12 @@ FindPeiCoreImageBaseInFv (
&Section
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Unable to find PEI Core image\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Unable to find PEI Core image\n", __func__));
return Status;
}
}
- DEBUG ((DEBUG_INFO, "%a: PeiCoreImageBase found\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: PeiCoreImageBase found\n", __func__));
*PeiCoreImageBase = (EFI_PHYSICAL_ADDRESS)(UINTN)(Section + 1);
return EFI_SUCCESS;
}
@@ -287,7 +287,7 @@ FindPeiCoreImageBase (
{
*PeiCoreImageBase = 0;
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
FindPeiCoreImageBaseInFv (*BootFv, PeiCoreImageBase);
}
@@ -311,7 +311,7 @@ FindAndReportEntryPoints (
EFI_STATUS Status;
EFI_PHYSICAL_ADDRESS PeiCoreImageBase;
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
FindPeiCoreImageBase (BootFirmwareVolumePtr, &PeiCoreImageBase);
//
@@ -322,7 +322,7 @@ FindAndReportEntryPoints (
*PeiCoreEntryPoint = 0;
}
- DEBUG ((DEBUG_INFO, "%a: PeCoffLoaderGetEntryPoint success: %x\n", __FUNCTION__, *PeiCoreEntryPoint));
+ DEBUG ((DEBUG_INFO, "%a: PeCoffLoaderGetEntryPoint success: %x\n", __func__, *PeiCoreEntryPoint));
return;
}
@@ -364,7 +364,7 @@ SbiEcallFirmwareHandler (
break;
default:
Ret = SBI_ENOTSUPP;
- DEBUG ((DEBUG_ERROR, "%a: Called SBI firmware ecall with invalid function ID\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Called SBI firmware ecall with invalid function ID\n", __func__));
ASSERT (FALSE);
}
@@ -452,7 +452,7 @@ PeiCore (
DEBUG_ERROR,
"%a: OpenSBI platform table version 0x%x is newer than OpenSBI version 0x%x.\n"
"There maybe be some backward compatable issues.\n",
- __FUNCTION__,
+ __func__,
ThisSbiPlatform->opensbi_version,
OPENSBI_VERSION
));
@@ -462,7 +462,7 @@ PeiCore (
DEBUG ((
DEBUG_INFO,
"%a: OpenSBI platform table at address: 0x%x\nFirmware Context is located at 0x%x\n",
- __FUNCTION__,
+ __func__,
ThisSbiPlatform,
&FirmwareContext
));
@@ -481,7 +481,7 @@ PeiCore (
//
// Set supervisor translation mode to Bare mode
//
- DEBUG ((DEBUG_INFO, "%a: Set Supervisor address mode to Bare-mode.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Set Supervisor address mode to Bare-mode.\n", __func__));
RiscVSetSupervisorAddressTranslationRegister ((UINT64)RISCV_SATP_MODE_OFF << RISCV_SATP_MODE_BIT_POSITION);
//
@@ -489,7 +489,7 @@ PeiCore (
//
Scratch->next_addr = (UINTN)(PeiCoreEntryPoint);
Scratch->next_mode = PRV_S;
- DEBUG ((DEBUG_INFO, "%a: Initializing OpenSBI library for booting hart %d\n", __FUNCTION__, BootHartId));
+ DEBUG ((DEBUG_INFO, "%a: Initializing OpenSBI library for booting hart %d\n", __func__, BootHartId));
sbi_init (Scratch);
}
@@ -716,13 +716,13 @@ SecCoreStartUpWithStack (
NonBootHartMessageLockValue = atomic_xchg (&NonBootHartMessageLock, TRUE);
}
- DEBUG ((DEBUG_INFO, "%a: Non boot hart %d initialization.\n", __FUNCTION__, HartId));
+ DEBUG ((DEBUG_INFO, "%a: Non boot hart %d initialization.\n", __func__, HartId));
if (Scratch->next_arg1 == (unsigned long)NULL) {
DEBUG ((DEBUG_ERROR, "Platform Device Tree is not found\n"));
ASSERT (FALSE);
}
- DEBUG ((DEBUG_INFO, "%a: Non boot hart %d DTB is at 0x%x.\n", __FUNCTION__, HartId, Scratch->next_arg1));
+ DEBUG ((DEBUG_INFO, "%a: Non boot hart %d DTB is at 0x%x.\n", __func__, HartId, Scratch->next_arg1));
NonBootHartMessageLockValue = atomic_xchg (&NonBootHartMessageLock, FALSE);
//
// Non boot hart wiil be halted waiting for SBI_HART_STARTING.
diff --git a/Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c b/Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c
index 6d1c5e1d..1a4fe258 100644
--- a/Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c
+++ b/Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c
@@ -375,7 +375,7 @@ MMCSendCommand (
if (PollRegisterWithMask (MMCHS_PRES_STATE,
CmdSendOKMask, 0) == EFI_TIMEOUT) {
DEBUG ((DEBUG_ERROR, "%a(%u): not ready for MMC_CMD%u PresState 0x%x MmcStatus 0x%x\n",
- __FUNCTION__, __LINE__, MMC_CMD_NUM (MmcCmd),
+ __func__, __LINE__, MMC_CMD_NUM (MmcCmd),
MmioRead32 (MMCHS_PRES_STATE), MmioRead32 (MMCHS_INT_STAT)));
Status = EFI_TIMEOUT;
goto Exit;
@@ -418,7 +418,7 @@ MMCSendCommand (
//
if (MmcCmd != CMD_IO_SEND_OP_COND) {
DEBUG ((DEBUG_ERROR, "%a(%u): MMC_CMD%u ERRI MmcStatus 0x%x\n",
- __FUNCTION__, __LINE__, MMC_CMD_NUM (MmcCmd), MmcStatus));
+ __func__, __LINE__, MMC_CMD_NUM (MmcCmd), MmcStatus));
}
SoftReset (SRC);
@@ -441,7 +441,7 @@ MMCSendCommand (
if (RetryCount == MAX_RETRY_COUNT) {
DEBUG ((DEBUG_ERROR, "%a(%u): MMC_CMD%u completion TIMEOUT PresState 0x%x MmcStatus 0x%x\n",
- __FUNCTION__, __LINE__, MMC_CMD_NUM (MmcCmd),
+ __func__, __LINE__, MMC_CMD_NUM (MmcCmd),
MmioRead32 (MMCHS_PRES_STATE), MmcStatus));
Status = EFI_TIMEOUT;
goto Exit;
@@ -691,15 +691,15 @@ MMCReadBlockData (
UINTN Count;
DEBUG ((DEBUG_VERBOSE, "%a(%u): LBA: 0x%x, Length: 0x%x, Buffer: 0x%x)\n",
- __FUNCTION__, __LINE__, Lba, Length, Buffer));
+ __func__, __LINE__, Lba, Length, Buffer));
if (Buffer == NULL) {
- DEBUG ((DEBUG_ERROR, "%a(%u): NULL Buffer\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a(%u): NULL Buffer\n", __func__, __LINE__));
return EFI_INVALID_PARAMETER;
}
if (Length % sizeof (UINT32) != 0) {
- DEBUG ((DEBUG_ERROR, "%a(%u): bad Length %u\n", __FUNCTION__, __LINE__, Length));
+ DEBUG ((DEBUG_ERROR, "%a(%u): bad Length %u\n", __func__, __LINE__, Length));
return EFI_INVALID_PARAMETER;
}
@@ -730,7 +730,7 @@ MMCReadBlockData (
if (RetryCount == MAX_RETRY_COUNT) {
DEBUG ((DEBUG_ERROR, "%a(%u): %lu/%lu MMCHS_INT_STAT: %08x\n",
- __FUNCTION__, __LINE__, Length - RemLength, Length, MmcStatus));
+ __func__, __LINE__, Length - RemLength, Length, MmcStatus));
return EFI_TIMEOUT;
}
@@ -755,15 +755,15 @@ MMCWriteBlockData (
UINTN Count;
DEBUG ((DEBUG_VERBOSE, "%a(%u): LBA: 0x%x, Length: 0x%x, Buffer: 0x%x)\n",
- __FUNCTION__, __LINE__, Lba, Length, Buffer));
+ __func__, __LINE__, Lba, Length, Buffer));
if (Buffer == NULL) {
- DEBUG ((DEBUG_ERROR, "%a(%u): NULL Buffer\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a(%u): NULL Buffer\n", __func__, __LINE__));
return EFI_INVALID_PARAMETER;
}
if (Length % sizeof (UINT32) != 0) {
- DEBUG ((DEBUG_ERROR, "%a(%u): bad Length %u\n", __FUNCTION__, __LINE__, Length));
+ DEBUG ((DEBUG_ERROR, "%a(%u): bad Length %u\n", __func__, __LINE__, Length));
return EFI_INVALID_PARAMETER;
}
@@ -794,7 +794,7 @@ MMCWriteBlockData (
if (RetryCount == MAX_RETRY_COUNT) {
DEBUG ((DEBUG_ERROR, "%a(%u): %lu/%lu MMCHS_INT_STAT: %08x\n",
- __FUNCTION__, __LINE__, Length - RemLength, Length, MmcStatus));
+ __func__, __LINE__, Length - RemLength, Length, MmcStatus));
return EFI_TIMEOUT;
}
diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
index 2a688fab..6980cc31 100644
--- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
+++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
@@ -430,7 +430,7 @@ SetupVariables (
//
Status = mFwProtocol->GetMacAddress (mMacAddress.Addr);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_WARN, "%a: failed to retrieve MAC address\n", __FUNCTION__));
+ DEBUG ((DEBUG_WARN, "%a: failed to retrieve MAC address\n", __func__));
}
}
diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/XhciQuirk.c b/Platform/RaspberryPi/Drivers/ConfigDxe/XhciQuirk.c
index 94c6f80c..e637930e 100644
--- a/Platform/RaspberryPi/Drivers/ConfigDxe/XhciQuirk.c
+++ b/Platform/RaspberryPi/Drivers/ConfigDxe/XhciQuirk.c
@@ -70,7 +70,7 @@ PciIoNotificationEvent (
&DeviceNumber, &FunctionNumber);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to get SBDF for xHCI controller: %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return;
}
@@ -81,7 +81,7 @@ PciIoNotificationEvent (
Status = FwProtocol->NotifyXhciReset(BusNumber, DeviceNumber, FunctionNumber);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: couldn't signal xHCI firmware load: %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
}
diff --git a/Platform/RaspberryPi/Drivers/DisplayDxe/Screenshot.c b/Platform/RaspberryPi/Drivers/DisplayDxe/Screenshot.c
index 5f31c64b..68e96da0 100644
--- a/Platform/RaspberryPi/Drivers/DisplayDxe/Screenshot.c
+++ b/Platform/RaspberryPi/Drivers/DisplayDxe/Screenshot.c
@@ -122,7 +122,7 @@ FindWritableFs (
Status = SimpleFs->OpenVolume (SimpleFs, &Fs);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a OpenVolume[%u] returned %r\n", __FUNCTION__, Index, Status));
+ DEBUG ((DEBUG_ERROR, "%a OpenVolume[%u] returned %r\n", __func__, Index, Status));
continue;
}
@@ -130,7 +130,7 @@ FindWritableFs (
EFI_FILE_MODE_CREATE | EFI_FILE_MODE_READ |
EFI_FILE_MODE_WRITE, 0);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a Open[%u] returned %r\n", __FUNCTION__, Index, Status));
+ DEBUG ((DEBUG_ERROR, "%a Open[%u] returned %r\n", __func__, Index, Status));
continue;
}
@@ -285,7 +285,7 @@ ProcessScreenshotHandler (
&Handle
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: couldn't register key notification: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: couldn't register key notification: %r\n", __func__, Status));
return Status;
}
@@ -355,7 +355,7 @@ RegisterScreenshotHandlers (
OnTextInExInstall, NULL,
&TextInExInstallEvent);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: couldn't create protocol install event: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: couldn't create protocol install event: %r\n", __func__, Status));
return;
}
@@ -363,7 +363,7 @@ RegisterScreenshotHandlers (
TextInExInstallEvent,
&TextInExInstallRegistration);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: couldn't register protocol install notify: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: couldn't register protocol install notify: %r\n", __func__, Status));
return;
}
}
diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
index 5ad3c708..d0a448df 100644
--- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
+++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
@@ -47,14 +47,14 @@ FixEthernetAliases (
//
Aliases = fdt_path_offset (mFdtImage, "/aliases");
if (Aliases < 0) {
- DEBUG ((DEBUG_ERROR, "%a: failed to locate '/aliases'\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to locate '/aliases'\n", __func__));
return EFI_NOT_FOUND;
}
Ethernet = fdt_getprop (mFdtImage, Aliases, "ethernet", NULL);
Ethernet0 = fdt_getprop (mFdtImage, Aliases, "ethernet0", NULL);
Alias = Ethernet ? Ethernet : Ethernet0;
if (!Alias) {
- DEBUG ((DEBUG_ERROR, "%a: failed to locate 'ethernet[0]' alias\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to locate 'ethernet[0]' alias\n", __func__));
return EFI_NOT_FOUND;
}
@@ -64,7 +64,7 @@ FixEthernetAliases (
CopySize = AsciiStrSize (Alias);
Copy = AllocateCopyPool (CopySize, Alias);
if (!Copy) {
- DEBUG ((DEBUG_ERROR, "%a: failed to copy '%a'\n", __FUNCTION__, Alias));
+ DEBUG ((DEBUG_ERROR, "%a: failed to copy '%a'\n", __func__, Alias));
return EFI_OUT_OF_RESOURCES;
}
@@ -77,18 +77,18 @@ FixEthernetAliases (
if (Retval != 0) {
Status = EFI_NOT_FOUND;
DEBUG ((DEBUG_ERROR, "%a: failed to create 'ethernet' alias (%d)\n",
- __FUNCTION__, Retval));
+ __func__, Retval));
}
- DEBUG ((DEBUG_INFO, "%a: created 'ethernet' alias '%a'\n", __FUNCTION__, Copy));
+ DEBUG ((DEBUG_INFO, "%a: created 'ethernet' alias '%a'\n", __func__, Copy));
}
if (!Ethernet0) {
Retval = fdt_setprop (mFdtImage, Aliases, "ethernet0", Copy, CopySize);
if (Retval != 0) {
Status = EFI_NOT_FOUND;
DEBUG ((DEBUG_ERROR, "%a: failed to create 'ethernet0' alias (%d)\n",
- __FUNCTION__, Retval));
+ __func__, Retval));
}
- DEBUG ((DEBUG_INFO, "%a: created 'ethernet0' alias '%a'\n", __FUNCTION__, Copy));
+ DEBUG ((DEBUG_INFO, "%a: created 'ethernet0' alias '%a'\n", __func__, Copy));
}
FreePool (Copy);
@@ -111,7 +111,7 @@ UpdateMacAddress (
//
Node = fdt_path_offset (mFdtImage, "ethernet");
if (Node < 0) {
- DEBUG ((DEBUG_ERROR, "%a: failed to locate 'ethernet' alias\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to locate 'ethernet' alias\n", __func__));
return EFI_NOT_FOUND;
}
@@ -120,7 +120,7 @@ UpdateMacAddress (
//
Status = mFwProtocol->GetMacAddress (MacAddress);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to retrieve MAC address\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to retrieve MAC address\n", __func__));
return Status;
}
@@ -128,12 +128,12 @@ UpdateMacAddress (
sizeof MacAddress);
if (Retval != 0) {
DEBUG ((DEBUG_ERROR, "%a: failed to create 'mac-address' property (%d)\n",
- __FUNCTION__, Retval));
+ __func__, Retval));
return EFI_NOT_FOUND;
}
DEBUG ((DEBUG_INFO, "%a: setting MAC address to %02x:%02x:%02x:%02x:%02x:%02x\n",
- __FUNCTION__, MacAddress[0], MacAddress[1], MacAddress[2], MacAddress[3],
+ __func__, MacAddress[0], MacAddress[1], MacAddress[2], MacAddress[3],
MacAddress[4], MacAddress[5]));
return EFI_SUCCESS;
}
@@ -159,38 +159,38 @@ AddUsbCompatibleProperty (
// Locate the node that the 'usb' alias refers to
Node = fdt_path_offset (mFdtImage, "usb");
if (Node < 0) {
- DEBUG ((DEBUG_ERROR, "%a: failed to locate 'usb' alias\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to locate 'usb' alias\n", __func__));
return EFI_NOT_FOUND;
}
// Get the property list. This is a list of NUL terminated strings.
List = fdt_getprop (mFdtImage, Node, "compatible", &ListSize);
if (List == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: failed to locate properties\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to locate properties\n", __func__));
return EFI_NOT_FOUND;
}
// Check if the compatible value we plan to add is already present
if (fdt_stringlist_contains (List, ListSize, NewProp)) {
DEBUG ((DEBUG_INFO, "%a: property '%a' is already set.\n",
- __FUNCTION__, NewProp));
+ __func__, NewProp));
return EFI_SUCCESS;
}
// Make sure the compatible device is what we expect
if (!fdt_stringlist_contains (List, ListSize, Prop)) {
DEBUG ((DEBUG_ERROR, "%a: property '%a' is missing!\n",
- __FUNCTION__, Prop));
+ __func__, Prop));
return EFI_NOT_FOUND;
}
// Add the new NUL terminated entry to our list
DEBUG ((DEBUG_INFO, "%a: adding '%a' to the properties\n",
- __FUNCTION__, NewProp));
+ __func__, NewProp));
NewList = AllocatePool (ListSize + sizeof (NewProp));
if (NewList == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: failed to allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;;
}
CopyMem (NewList, List, ListSize);
@@ -201,7 +201,7 @@ AddUsbCompatibleProperty (
FreePool (NewList);
if (Retval != 0) {
DEBUG ((DEBUG_ERROR, "%a: failed to update properties (%d)\n",
- __FUNCTION__, Retval));
+ __func__, Retval));
return EFI_NOT_FOUND;
}
@@ -351,7 +351,7 @@ SyncPcie (
Node = fdt_path_offset (mFdtImage, "pcie0");
if (Node < 0) {
- DEBUG ((DEBUG_ERROR, "%a: failed to locate 'pcie0' alias\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to locate 'pcie0' alias\n", __func__));
return EFI_NOT_FOUND;
}
@@ -364,7 +364,7 @@ SyncPcie (
DmaRanges[5] = cpu_to_fdt32 (0x00000000);
DmaRanges[6] = cpu_to_fdt32 (0xc0000000);
- DEBUG ((DEBUG_INFO, "%a: Updating PCIe dma-ranges\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Updating PCIe dma-ranges\n", __func__));
/*
* Match dma-ranges with the EDK2+ACPI setup we are using. This works
@@ -375,7 +375,7 @@ SyncPcie (
DmaRanges, sizeof DmaRanges);
if (Retval != 0) {
DEBUG ((DEBUG_ERROR, "%a: failed to locate PCIe 'dma-ranges' property (%d)\n",
- __FUNCTION__, Retval));
+ __func__, Retval));
return EFI_NOT_FOUND;
}
@@ -421,7 +421,7 @@ SyncPcie (
Node = fdt_path_offset (mFdtImage, "/scb/pcie@7d500000/pci");
if (Node < 0) {
// This can happen on CM4/etc which doesn't have an onboard XHCI
- DEBUG ((DEBUG_INFO, "%a: failed to locate /scb/pcie@7d500000/pci\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: failed to locate /scb/pcie@7d500000/pci\n", __func__));
} else {
Retval = fdt_del_node (mFdtImage, Node);
if (Retval != 0) {
diff --git a/Platform/RaspberryPi/Drivers/MmcDxe/MmcBlockIo.c b/Platform/RaspberryPi/Drivers/MmcDxe/MmcBlockIo.c
index 8a2f7f42..b508ce80 100644
--- a/Platform/RaspberryPi/Drivers/MmcDxe/MmcBlockIo.c
+++ b/Platform/RaspberryPi/Drivers/MmcDxe/MmcBlockIo.c
@@ -54,14 +54,14 @@ ValidateWrittenBlockCount (
Status = MmcHost->SendCommand (MmcHost, MMC_CMD55,
MmcHostInstance->CardInfo.RCA << 16);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __func__, __LINE__, Status));
return Status;
}
Status = MmcHost->SendCommand (MmcHost, MMC_ACMD22, 0);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
return Status;
}
@@ -75,7 +75,7 @@ ValidateWrittenBlockCount (
Status = MmcHost->ReadBlockData (MmcHost, 0, sizeof (Data),
(VOID*)Data);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __func__, __LINE__, Status));
return Status;
}
@@ -88,7 +88,7 @@ ValidateWrittenBlockCount (
((UINT32)Data[3] << 0);
if (BlocksWritten != Count) {
DEBUG ((DEBUG_ERROR, "%a(%u): expected %u != gotten %u\n",
- __FUNCTION__, __LINE__, Count, BlocksWritten));
+ __func__, __LINE__, Count, BlocksWritten));
if (BlocksWritten == 0) {
return EFI_DEVICE_ERROR;
}
@@ -118,7 +118,7 @@ WaitUntilTran (
Status = MmcHost->SendCommand (MmcHost, MMC_CMD13,
MmcHostInstance->CardInfo.RCA << 16);
if (EFI_ERROR (Status) && Status != EFI_TIMEOUT) {
- DEBUG ((DEBUG_ERROR, "%a(%u) CMD13 failed: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "%a(%u) CMD13 failed: %r\n", __func__, __LINE__, Status));
break;
}
@@ -134,7 +134,7 @@ WaitUntilTran (
}
if (0 == Timeout) {
- DEBUG ((DEBUG_ERROR, "%a(%u) card is busy\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a(%u) card is busy\n", __func__, __LINE__));
return EFI_NOT_READY;
}
diff --git a/Platform/RaspberryPi/Drivers/MmcDxe/MmcDebug.c b/Platform/RaspberryPi/Drivers/MmcDxe/MmcDebug.c
index 22209fca..5f9e1adf 100644
--- a/Platform/RaspberryPi/Drivers/MmcDxe/MmcDebug.c
+++ b/Platform/RaspberryPi/Drivers/MmcDxe/MmcDebug.c
@@ -9,9 +9,9 @@
#include "Mmc.h"
#if !defined(MDEPKG_NDEBUG)
-CONST CHAR8* mStrUnit[] = { "100kbit/s", "1Mbit/s", "10Mbit/s", "100MBit/s",
+STATIC CONST CHAR8* mStrUnit[] = { "100kbit/s", "1Mbit/s", "10Mbit/s", "100MBit/s",
"Unknown", "Unknown", "Unknown", "Unknown" };
-CONST CHAR8* mStrValue[] = { "1.0", "1.2", "1.3", "1.5", "2.0", "2.5",
+STATIC CONST CHAR8* mStrValue[] = { "1.0", "1.2", "1.3", "1.5", "2.0", "2.5",
"3.0", "3.5", "4.0", "4.5", "5.0", "5.5",
"6.0", "7.0", "8.0" };
#endif
diff --git a/Platform/RaspberryPi/Drivers/MmcDxe/MmcIdentification.c b/Platform/RaspberryPi/Drivers/MmcDxe/MmcIdentification.c
index c24e991b..82eabbed 100644
--- a/Platform/RaspberryPi/Drivers/MmcDxe/MmcIdentification.c
+++ b/Platform/RaspberryPi/Drivers/MmcDxe/MmcIdentification.c
@@ -356,7 +356,7 @@ SdSelect (
Status = MmcHost->SendCommand (MmcHost, MMC_CMD7,
MmcHostInstance->CardInfo.RCA << 16);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: error: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: error: %r\n", __func__, Status));
}
return Status;
@@ -376,7 +376,7 @@ SdDeselect (
Status = MmcHost->SendCommand (MmcHost, MMC_CMD7, 0);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: error: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: error: %r\n", __func__, Status));
}
return Status;
@@ -396,13 +396,13 @@ SdGetCsd (
Status = MmcHost->SendCommand (MmcHost, MMC_CMD9,
MmcHostInstance->CardInfo.RCA << 16);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __func__, __LINE__, Status));
return Status;
}
Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_CSD, Response);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(%u): error %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_ERROR, "%a(%u): error %r\n", __func__,
__LINE__, Status));
return Status;
}
@@ -437,20 +437,20 @@ SdSet4Bit (
CmdArg = MmcHostInstance->CardInfo.RCA << 16;
Status = MmcHost->SendCommand (MmcHost, MMC_CMD55, CmdArg);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __func__, __LINE__, Status));
return Status;
}
/* Width: 4 */
Status = MmcHost->SendCommand (MmcHost, MMC_CMD6, 2);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(%u): error %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "%a(%u): error %r\n", __func__, __LINE__, Status));
return Status;
}
Status = MmcHost->SetIos (MmcHost, 0, BUSWIDTH_4, EMMCBACKWARD);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __func__, __LINE__, Status));
return Status;
}
@@ -488,7 +488,7 @@ SdSetSpeed (
*/
Status = MmcHost->SetIos (MmcHost, Speed, 0, EMMCBACKWARD);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: error setting speed %u: %r\n", __FUNCTION__, Speed, Status));
+ DEBUG ((DEBUG_ERROR, "%a: error setting speed %u: %r\n", __func__, Speed, Status));
return Status;
}
@@ -506,14 +506,14 @@ SdSetSpeed (
Status = MmcHost->SendCommand (MmcHost, MMC_CMD6, CmdArg);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
return Status;
} else {
Status = MmcHost->ReadBlockData (MmcHost, 0, SWITCH_CMD_DATA_LENGTH,
Buffer);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
return Status;
}
}
@@ -527,13 +527,13 @@ SdSetSpeed (
CmdArg = SdSwitchCmdArgument (1, 0xf, 0xf, 0xf, TRUE);
Status = MmcHost->SendCommand (MmcHost, MMC_CMD6, CmdArg);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __func__, __LINE__, Status));
return Status;
} else {
Status = MmcHost->ReadBlockData (MmcHost, 0,
SWITCH_CMD_DATA_LENGTH, Buffer);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "%a(%u): error: %r\n", __func__, __LINE__, Status));
return Status;
}
@@ -561,7 +561,7 @@ SdSetSpeed (
Status = MmcHost->SetIos (MmcHost, Speed, 0, EMMCBACKWARD);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: error setting speed %u: %r\n", __FUNCTION__, Speed, Status));
+ DEBUG ((DEBUG_ERROR, "%a: error setting speed %u: %r\n", __func__, Speed, Status));
return Status;
}
@@ -585,13 +585,13 @@ SdExecuteScr (
MmcHostInstance->CardInfo.RCA << 16);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status = %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return Status;
}
Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_R1, Response);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status = %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return Status;
}
if ((Response[0] & MMC_STATUS_APP_CMD) == 0) {
@@ -602,7 +602,7 @@ SdExecuteScr (
Status = MmcHost->SendCommand (MmcHost, MMC_ACMD51, 0);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a (MMC_ACMD51): Error and Status = %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return Status;
}
@@ -610,7 +610,7 @@ SdExecuteScr (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a (MMC_ACMD51): ReadBlockData Error and Status = %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return Status;
}
diff --git a/Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c b/Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c
index 64db6506..97720071 100644
--- a/Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c
+++ b/Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.c
@@ -35,6 +35,244 @@
//
#define NUM_PAGES 1
+#pragma pack(1)
+typedef struct {
+ UINT32 BufferSize;
+ UINT32 Response;
+} RPI_FW_BUFFER_HEAD;
+
+typedef struct {
+ UINT32 TagId;
+ UINT32 TagSize;
+ UINT32 TagValueSize;
+} RPI_FW_TAG_HEAD;
+
+typedef struct {
+ UINT32 DeviceId;
+ UINT32 PowerState;
+} RPI_FW_POWER_STATE_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_POWER_STATE_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_SET_POWER_STATE_CMD;
+
+typedef struct {
+ UINT32 Base;
+ UINT32 Size;
+} RPI_FW_ARM_MEMORY_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_ARM_MEMORY_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_GET_ARM_MEMORY_CMD;
+
+typedef struct {
+ UINT8 MacAddress[6];
+ UINT32 Padding;
+} RPI_FW_MAC_ADDR_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_MAC_ADDR_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_GET_MAC_ADDR_CMD;
+
+typedef struct {
+ UINT64 Serial;
+} RPI_FW_SERIAL_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_SERIAL_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_GET_SERIAL_CMD;
+
+typedef struct {
+ UINT32 Model;
+} RPI_FW_MODEL_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_MODEL_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_GET_MODEL_CMD;
+
+typedef struct {
+ UINT32 Revision;
+} RPI_FW_MODEL_REVISION_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_MODEL_REVISION_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_GET_REVISION_CMD;
+
+typedef struct {
+ UINT32 Width;
+ UINT32 Height;
+} RPI_FW_FB_SIZE_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_FB_SIZE_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_GET_FB_SIZE_CMD;
+
+typedef struct {
+ UINT32 Depth;
+} RPI_FW_FB_DEPTH_TAG;
+
+typedef struct {
+ UINT32 Pitch;
+} RPI_FW_FB_PITCH_TAG;
+
+typedef struct {
+ UINT32 AlignmentBase;
+ UINT32 Size;
+} RPI_FW_FB_ALLOC_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD FreeFbTag;
+ UINT32 EndTag;
+} RPI_FW_FREE_FB_CMD;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD PhysSizeTag;
+ RPI_FW_FB_SIZE_TAG PhysSize;
+ RPI_FW_TAG_HEAD VirtSizeTag;
+ RPI_FW_FB_SIZE_TAG VirtSize;
+ RPI_FW_TAG_HEAD DepthTag;
+ RPI_FW_FB_DEPTH_TAG Depth;
+ RPI_FW_TAG_HEAD AllocFbTag;
+ RPI_FW_FB_ALLOC_TAG AllocFb;
+ RPI_FW_TAG_HEAD PitchTag;
+ RPI_FW_FB_PITCH_TAG Pitch;
+ UINT32 EndTag;
+} RPI_FW_INIT_FB_CMD;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ UINT8 CommandLine[0];
+} RPI_FW_GET_COMMAND_LINE_CMD;
+
+typedef struct {
+ UINT32 ClockId;
+ UINT32 ClockRate;
+ UINT32 SkipTurbo;
+} RPI_FW_SET_CLOCK_RATE_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_SET_CLOCK_RATE_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_SET_CLOCK_RATE_CMD;
+
+typedef struct {
+ UINT32 ClockId;
+ UINT32 ClockRate;
+} RPI_FW_CLOCK_RATE_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_CLOCK_RATE_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_GET_CLOCK_RATE_CMD;
+
+typedef struct {
+ UINT32 ClockId;
+ UINT32 ClockState;
+} RPI_FW_GET_CLOCK_STATE_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_GET_CLOCK_STATE_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_SET_CLOCK_STATE_CMD;
+
+typedef struct {
+ UINT32 Pin;
+ UINT32 State;
+} RPI_FW_SET_GPIO_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_SET_GPIO_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_SET_GPIO_CMD;
+
+typedef struct {
+ UINT32 DeviceAddress;
+} RPI_FW_NOTIFY_XHCI_RESET_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_NOTIFY_XHCI_RESET_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_NOTIFY_XHCI_RESET_CMD;
+
+typedef struct {
+ UINT32 Gpio;
+ UINT32 Direction;
+ UINT32 Polarity;
+ UINT32 TermEn;
+ UINT32 TermPullUp;
+} RPI_FW_GPIO_GET_CFG_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_GPIO_GET_CFG_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_NOTIFY_GPIO_GET_CFG_CMD;
+
+typedef struct {
+ UINT32 Gpio;
+ UINT32 Direction;
+ UINT32 Polarity;
+ UINT32 TermEn;
+ UINT32 TermPullUp;
+ UINT32 State;
+} RPI_FW_GPIO_SET_CFG_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_GPIO_SET_CFG_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_NOTIFY_GPIO_SET_CFG_CMD;
+
+typedef struct {
+ UINT32 Register;
+ UINT32 Value;
+} RPI_FW_RTC_TAG;
+
+typedef struct {
+ RPI_FW_BUFFER_HEAD BufferHead;
+ RPI_FW_TAG_HEAD TagHead;
+ RPI_FW_RTC_TAG TagBody;
+ UINT32 EndTag;
+} RPI_FW_RTC_CMD;
+
+#pragma pack()
+
STATIC UINTN mMboxBaseAddress;
STATIC VOID *mDmaBuffer;
@@ -110,7 +348,7 @@ MailboxTransaction (
//
if (!DrainMailbox ()) {
DEBUG ((DEBUG_ERROR, "%a: timeout waiting for mailbox to drain\n",
- __FUNCTION__));
+ __func__));
return EFI_TIMEOUT;
}
@@ -119,7 +357,7 @@ MailboxTransaction (
//
if (!MailboxWaitForStatusCleared (1U << BCM2836_MBOX_STATUS_FULL)) {
DEBUG ((DEBUG_ERROR, "%a: timeout waiting for outbox to become empty\n",
- __FUNCTION__));
+ __func__));
return EFI_TIMEOUT;
}
@@ -146,7 +384,7 @@ MailboxTransaction (
//
if (!MailboxWaitForStatusCleared (1U << BCM2836_MBOX_STATUS_EMPTY)) {
DEBUG ((DEBUG_ERROR, "%a: timeout waiting for inbox to become full\n",
- __FUNCTION__));
+ __func__));
return EFI_TIMEOUT;
}
@@ -164,31 +402,6 @@ MailboxTransaction (
return EFI_SUCCESS;
}
-#pragma pack(1)
-typedef struct {
- UINT32 BufferSize;
- UINT32 Response;
-} RPI_FW_BUFFER_HEAD;
-
-typedef struct {
- UINT32 TagId;
- UINT32 TagSize;
- UINT32 TagValueSize;
-} RPI_FW_TAG_HEAD;
-
-typedef struct {
- UINT32 DeviceId;
- UINT32 PowerState;
-} RPI_FW_POWER_STATE_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_POWER_STATE_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_SET_POWER_STATE_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
EFIAPI
@@ -203,7 +416,7 @@ RpiFirmwareSetPowerState (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -227,14 +440,14 @@ RpiFirmwareSetPowerState (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
Status = EFI_DEVICE_ERROR;
}
if (!EFI_ERROR (Status) &&
PowerState ^ (Cmd->TagBody.PowerState & RPI_MBOX_POWER_STATE_ENABLE)) {
DEBUG ((DEBUG_ERROR, "%a: failed to %sable power for device %d\n",
- __FUNCTION__, PowerState ? "en" : "dis", DeviceId));
+ __func__, PowerState ? "en" : "dis", DeviceId));
Status = EFI_DEVICE_ERROR;
}
ReleaseSpinLock (&mMailboxLock);
@@ -242,20 +455,6 @@ RpiFirmwareSetPowerState (
return Status;
}
-#pragma pack()
-typedef struct {
- UINT32 Base;
- UINT32 Size;
-} RPI_FW_ARM_MEMORY_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_ARM_MEMORY_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_GET_ARM_MEMORY_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
EFIAPI
@@ -269,7 +468,7 @@ RpiFirmwareGetArmMemory (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -290,7 +489,7 @@ RpiFirmwareGetArmMemory (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -302,20 +501,6 @@ RpiFirmwareGetArmMemory (
return EFI_SUCCESS;
}
-#pragma pack()
-typedef struct {
- UINT8 MacAddress[6];
- UINT32 Padding;
-} RPI_FW_MAC_ADDR_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_MAC_ADDR_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_GET_MAC_ADDR_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
EFIAPI
@@ -328,7 +513,7 @@ RpiFirmwareGetMacAddress (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -348,7 +533,7 @@ RpiFirmwareGetMacAddress (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -359,19 +544,6 @@ RpiFirmwareGetMacAddress (
return EFI_SUCCESS;
}
-#pragma pack()
-typedef struct {
- UINT64 Serial;
-} RPI_FW_SERIAL_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_SERIAL_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_GET_SERIAL_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
EFIAPI
@@ -384,7 +556,7 @@ RpiFirmwareGetSerial (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -404,7 +576,7 @@ RpiFirmwareGetSerial (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -422,19 +594,6 @@ RpiFirmwareGetSerial (
return Status;
}
-#pragma pack()
-typedef struct {
- UINT32 Model;
-} RPI_FW_MODEL_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_MODEL_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_GET_MODEL_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
EFIAPI
@@ -447,7 +606,7 @@ RpiFirmwareGetModel (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -467,7 +626,7 @@ RpiFirmwareGetModel (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -478,19 +637,6 @@ RpiFirmwareGetModel (
return EFI_SUCCESS;
}
-#pragma pack()
-typedef struct {
- UINT32 Revision;
-} RPI_FW_MODEL_REVISION_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_MODEL_REVISION_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_GET_REVISION_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
EFIAPI
@@ -503,7 +649,7 @@ RpiFirmwareGetModelRevision (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -523,7 +669,7 @@ RpiFirmwareGetModelRevision (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -546,7 +692,7 @@ RpiFirmwareGetFirmwareRevision (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -566,7 +712,7 @@ RpiFirmwareGetFirmwareRevision (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -577,54 +723,6 @@ RpiFirmwareGetFirmwareRevision (
return EFI_SUCCESS;
}
-#pragma pack()
-typedef struct {
- UINT32 Width;
- UINT32 Height;
-} RPI_FW_FB_SIZE_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_FB_SIZE_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_GET_FB_SIZE_CMD;
-
-typedef struct {
- UINT32 Depth;
-} RPI_FW_FB_DEPTH_TAG;
-
-typedef struct {
- UINT32 Pitch;
-} RPI_FW_FB_PITCH_TAG;
-
-typedef struct {
- UINT32 AlignmentBase;
- UINT32 Size;
-} RPI_FW_FB_ALLOC_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD FreeFbTag;
- UINT32 EndTag;
-} RPI_FW_FREE_FB_CMD;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD PhysSizeTag;
- RPI_FW_FB_SIZE_TAG PhysSize;
- RPI_FW_TAG_HEAD VirtSizeTag;
- RPI_FW_FB_SIZE_TAG VirtSize;
- RPI_FW_TAG_HEAD DepthTag;
- RPI_FW_FB_DEPTH_TAG Depth;
- RPI_FW_TAG_HEAD AllocFbTag;
- RPI_FW_FB_ALLOC_TAG AllocFb;
- RPI_FW_TAG_HEAD PitchTag;
- RPI_FW_FB_PITCH_TAG Pitch;
- UINT32 EndTag;
-} RPI_FW_INIT_FB_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
EFIAPI
@@ -638,7 +736,7 @@ RpiFirmwareGetFbSize (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -658,7 +756,7 @@ RpiFirmwareGetFbSize (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -680,7 +778,7 @@ RpiFirmwareFreeFb (VOID)
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -701,7 +799,7 @@ RpiFirmwareFreeFb (VOID)
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -731,7 +829,7 @@ RpiFirmwareAllocFb (
ASSERT (FbBase != NULL);
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -765,7 +863,7 @@ RpiFirmwareAllocFb (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -778,14 +876,6 @@ RpiFirmwareAllocFb (
return EFI_SUCCESS;
}
-#pragma pack()
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- UINT8 CommandLine[0];
-} RPI_FW_GET_COMMAND_LINE_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
EFIAPI
@@ -800,18 +890,18 @@ RpiFirmwareGetCommmandLine (
if ((BufferSize % sizeof (UINT32)) != 0) {
DEBUG ((DEBUG_ERROR, "%a: BufferSize must be a multiple of 4\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
if (sizeof (*Cmd) + BufferSize > EFI_PAGES_TO_SIZE (NUM_PAGES)) {
DEBUG ((DEBUG_ERROR, "%a: BufferSize exceeds size of DMA buffer\n",
- __FUNCTION__));
+ __func__));
return EFI_OUT_OF_RESOURCES;
}
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -830,7 +920,7 @@ RpiFirmwareGetCommmandLine (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -838,7 +928,7 @@ RpiFirmwareGetCommmandLine (
Cmd->TagHead.TagValueSize &= ~RPI_MBOX_VALUE_SIZE_RESPONSE_MASK;
if (Cmd->TagHead.TagValueSize >= BufferSize &&
Cmd->CommandLine[Cmd->TagHead.TagValueSize - 1] != '\0') {
- DEBUG ((DEBUG_ERROR, "%a: insufficient buffer size\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: insufficient buffer size\n", __func__));
ReleaseSpinLock (&mMailboxLock);
return EFI_OUT_OF_RESOURCES;
}
@@ -857,21 +947,6 @@ RpiFirmwareGetCommmandLine (
return EFI_SUCCESS;
}
-#pragma pack()
-typedef struct {
- UINT32 ClockId;
- UINT32 ClockRate;
- UINT32 SkipTurbo;
-} RPI_FW_SET_CLOCK_RATE_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_SET_CLOCK_RATE_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_SET_CLOCK_RATE_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
EFIAPI
@@ -886,7 +961,7 @@ RpiFirmwareSetClockRate (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -903,14 +978,14 @@ RpiFirmwareSetClockRate (
Cmd->TagBody.SkipTurbo = SkipTurbo ? 1 : 0;
Cmd->EndTag = 0;
- DEBUG ((DEBUG_INFO, "%a: Request clock rate %X = %d\n", __FUNCTION__, ClockId, ClockRate));
+ DEBUG ((DEBUG_INFO, "%a: Request clock rate %X = %d\n", __func__, ClockId, ClockRate));
Status = MailboxTransaction (Cmd->BufferHead.BufferSize, RPI_MBOX_VC_CHANNEL, &Result);
if (EFI_ERROR (Status) ||
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -920,20 +995,6 @@ RpiFirmwareSetClockRate (
return EFI_SUCCESS;
}
-#pragma pack()
-typedef struct {
- UINT32 ClockId;
- UINT32 ClockRate;
-} RPI_FW_CLOCK_RATE_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_CLOCK_RATE_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_GET_CLOCK_RATE_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
RpiFirmwareGetClockRate (
@@ -947,7 +1008,7 @@ RpiFirmwareGetClockRate (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -968,7 +1029,7 @@ RpiFirmwareGetClockRate (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -976,7 +1037,7 @@ RpiFirmwareGetClockRate (
*ClockRate = Cmd->TagBody.ClockRate;
ReleaseSpinLock (&mMailboxLock);
- DEBUG ((DEBUG_INFO, "%a: Get Clock Rate return: ClockRate=%d ClockId=%X\n", __FUNCTION__, *ClockRate, ClockId));
+ DEBUG ((DEBUG_INFO, "%a: Get Clock Rate return: ClockRate=%d ClockId=%X\n", __func__, *ClockRate, ClockId));
return EFI_SUCCESS;
}
@@ -1025,20 +1086,6 @@ RpiFirmwareGetMinClockRate (
return RpiFirmwareGetClockRate (ClockId, RPI_MBOX_GET_MIN_CLOCK_RATE, ClockRate);
}
-#pragma pack()
-typedef struct {
- UINT32 ClockId;
- UINT32 ClockState;
-} RPI_FW_GET_CLOCK_STATE_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_GET_CLOCK_STATE_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_SET_CLOCK_STATE_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
RpiFirmwareSetClockState (
@@ -1051,7 +1098,7 @@ RpiFirmwareSetClockState (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -1073,7 +1120,7 @@ RpiFirmwareSetClockState (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
ReleaseSpinLock (&mMailboxLock);
return EFI_DEVICE_ERROR;
}
@@ -1083,20 +1130,6 @@ RpiFirmwareSetClockState (
return EFI_SUCCESS;
}
-#pragma pack()
-typedef struct {
- UINT32 Pin;
- UINT32 State;
-} RPI_FW_SET_GPIO_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_SET_GPIO_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_SET_GPIO_CMD;
-#pragma pack()
-
STATIC
VOID
EFIAPI
@@ -1110,7 +1143,7 @@ RpiFirmwareSetGpio (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return;
}
@@ -1135,7 +1168,7 @@ RpiFirmwareSetGpio (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
}
ReleaseSpinLock (&mMailboxLock);
}
@@ -1150,19 +1183,6 @@ RpiFirmwareSetLed (
RpiFirmwareSetGpio (RPI_EXP_GPIO_LED, On);
}
-#pragma pack()
-typedef struct {
- UINT32 DeviceAddress;
-} RPI_FW_NOTIFY_XHCI_RESET_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_NOTIFY_XHCI_RESET_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_NOTIFY_XHCI_RESET_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
EFIAPI
@@ -1177,7 +1197,7 @@ RpiFirmwareNotifyXhciReset (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -1198,7 +1218,7 @@ RpiFirmwareNotifyXhciReset (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
}
ReleaseSpinLock (&mMailboxLock);
@@ -1206,24 +1226,6 @@ RpiFirmwareNotifyXhciReset (
return Status;
}
-#pragma pack()
-typedef struct {
- UINT32 Gpio;
- UINT32 Direction;
- UINT32 Polarity;
- UINT32 TermEn;
- UINT32 TermPullUp;
-} RPI_FW_GPIO_GET_CFG_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_GPIO_GET_CFG_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_NOTIFY_GPIO_GET_CFG_CMD;
-#pragma pack()
-
-
STATIC
EFI_STATUS
EFIAPI
@@ -1237,7 +1239,7 @@ RpiFirmwareNotifyGpioGetCfg (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -1261,7 +1263,7 @@ RpiFirmwareNotifyGpioGetCfg (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
}
ReleaseSpinLock (&mMailboxLock);
@@ -1269,26 +1271,6 @@ RpiFirmwareNotifyGpioGetCfg (
return Status;
}
-
-#pragma pack()
-typedef struct {
- UINT32 Gpio;
- UINT32 Direction;
- UINT32 Polarity;
- UINT32 TermEn;
- UINT32 TermPullUp;
- UINT32 State;
-} RPI_FW_GPIO_SET_CFG_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_GPIO_SET_CFG_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_NOTIFY_GPIO_SET_CFG_CMD;
-#pragma pack()
-
-
STATIC
EFI_STATUS
EFIAPI
@@ -1304,13 +1286,13 @@ RpiFirmwareNotifyGpioSetCfg (
Status = RpiFirmwareNotifyGpioGetCfg (Gpio, &Result);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to get GPIO polarity\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to get GPIO polarity\n", __func__));
Result = 0; //default polarity
}
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -1338,7 +1320,7 @@ RpiFirmwareNotifyGpioSetCfg (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
}
ReleaseSpinLock (&mMailboxLock);
@@ -1349,21 +1331,6 @@ RpiFirmwareNotifyGpioSetCfg (
return Status;
}
-
-#pragma pack()
-typedef struct {
- UINT32 Register;
- UINT32 Value;
-} RPI_FW_RTC_TAG;
-
-typedef struct {
- RPI_FW_BUFFER_HEAD BufferHead;
- RPI_FW_TAG_HEAD TagHead;
- RPI_FW_RTC_TAG TagBody;
- UINT32 EndTag;
-} RPI_FW_RTC_CMD;
-#pragma pack()
-
STATIC
EFI_STATUS
EFIAPI
@@ -1377,7 +1344,7 @@ RpiFirmwareGetRtc (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -1399,7 +1366,7 @@ RpiFirmwareGetRtc (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
Status = EFI_DEVICE_ERROR;
} else {
*Value = Cmd->TagBody.Value;
@@ -1423,7 +1390,7 @@ RpiFirmwareSetRtc (
UINT32 Result;
if (!AcquireSpinLockOrFail (&mMailboxLock)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to acquire spinlock\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -1445,7 +1412,7 @@ RpiFirmwareSetRtc (
Cmd->BufferHead.Response != RPI_MBOX_RESP_SUCCESS) {
DEBUG ((DEBUG_ERROR,
"%a: mailbox transaction error: Status == %r, Response == 0x%x\n",
- __FUNCTION__, Status, Cmd->BufferHead.Response));
+ __func__, Status, Cmd->BufferHead.Response));
Status = EFI_DEVICE_ERROR;
}
@@ -1525,7 +1492,7 @@ RpiFirmwareDxeInitialize (
Status = DmaAllocateBuffer (EfiRuntimeServicesData, NUM_PAGES, &mDmaBuffer);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to allocate DMA buffer (Status == %r)\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to allocate DMA buffer (Status == %r)\n", __func__));
return Status;
}
@@ -1533,7 +1500,7 @@ RpiFirmwareDxeInitialize (
Status = DmaMap (MapOperationBusMasterCommonBuffer, mDmaBuffer, &mDmaBufferSize,
&mDmaBufferBusAddress, &mDmaBufferMapping);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to map DMA buffer (Status == %r)\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed to map DMA buffer (Status == %r)\n", __func__));
goto FreeBuffer;
}
@@ -1549,7 +1516,7 @@ RpiFirmwareDxeInitialize (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: failed to install RPI firmware protocol (Status == %r)\n",
- __FUNCTION__, Status));
+ __func__, Status));
goto UnmapBuffer;
}
@@ -1562,7 +1529,7 @@ RpiFirmwareDxeInitialize (
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: AddMemorySpace failed. Status=%r\n",
- __FUNCTION__, Status));
+ __func__, Status));
goto UnmapBuffer;
}
@@ -1572,7 +1539,7 @@ RpiFirmwareDxeInitialize (
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: SetMemorySpaceAttributes failed. Status=%r\n",
- __FUNCTION__, Status));
+ __func__, Status));
goto UnmapBuffer;
}
diff --git a/Platform/RaspberryPi/Drivers/SdHostDxe/SdHostDxe.c b/Platform/RaspberryPi/Drivers/SdHostDxe/SdHostDxe.c
index 0fd1ac6e..336c18c7 100644
--- a/Platform/RaspberryPi/Drivers/SdHostDxe/SdHostDxe.c
+++ b/Platform/RaspberryPi/Drivers/SdHostDxe/SdHostDxe.c
@@ -388,7 +388,7 @@ SdSendCommand (
if (MmioRead32 (SDHOST_CMD) & SDHOST_CMD_NEW_FLAG) {
DEBUG ((DEBUG_MMCHOST_SD_ERROR,
"%a(%u): CMD%d is still being executed after %d trial(s)\n",
- __FUNCTION__, __LINE__, MMC_GET_INDX (MmcCmd), RetryCount));
+ __func__, __LINE__, MMC_GET_INDX (MmcCmd), RetryCount));
}
// Write command and set it to start execution
@@ -445,7 +445,7 @@ SdSendCommand (
Status = EFI_SUCCESS;
} else {
DEBUG ((DEBUG_MMCHOST_SD_ERROR, "%a(%u): CMD%d execution failed after %d trial(s)\n",
- __FUNCTION__, __LINE__, MMC_GET_INDX (MmcCmd), RetryCount));
+ __func__, __LINE__, MMC_GET_INDX (MmcCmd), RetryCount));
SdHostDumpStatus ();
}
diff --git a/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c b/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c
index daa4e6ae..323a2364 100644
--- a/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c
+++ b/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c
@@ -246,7 +246,7 @@ FilterAndProcess (
//
// This is not an error, just an informative condition.
//
- DEBUG ((DEBUG_VERBOSE, "%a: %g: %r\n", __FUNCTION__, ProtocolGuid,
+ DEBUG ((DEBUG_VERBOSE, "%a: %g: %r\n", __func__, ProtocolGuid,
Status));
return;
}
@@ -297,25 +297,25 @@ AddOutput (
DevicePath = DevicePathFromHandle (Handle);
if (DevicePath == NULL) {
DEBUG ((DEBUG_ERROR, "%a: %s: handle %p: device path not found\n",
- __FUNCTION__, ReportText, Handle));
+ __func__, ReportText, Handle));
return;
}
Status = EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: %s: adding to ConOut: %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_ERROR, "%a: %s: adding to ConOut: %r\n", __func__,
ReportText, Status));
return;
}
Status = EfiBootManagerUpdateConsoleVariable (ErrOut, DevicePath, NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: %s: adding to ErrOut: %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_ERROR, "%a: %s: adding to ErrOut: %r\n", __func__,
ReportText, Status));
return;
}
- DEBUG ((DEBUG_VERBOSE, "%a: %s: added to ConOut and ErrOut\n", __FUNCTION__,
+ DEBUG ((DEBUG_VERBOSE, "%a: %s: added to ConOut and ErrOut\n", __func__,
ReportText));
}
@@ -339,8 +339,8 @@ Connect (
NULL, // RemainingDevicePath -- produce all children
FALSE // Recursive
);
- DEBUG ((EFI_ERROR (Status) ? EFI_D_ERROR : EFI_D_VERBOSE, "%a: %s: %r\n",
- __FUNCTION__, ReportText, Status));
+ DEBUG ((EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: %s: %r\n",
+ __func__, ReportText, Status));
}
STATIC
@@ -457,9 +457,9 @@ RemoveStaleBootOptions (
DevicePathString = ConvertDevicePathToText(BootOptions[Index].FilePath, FALSE, FALSE);
DEBUG ((
- EFI_ERROR (Status) ? EFI_D_WARN : EFI_D_INFO,
+ EFI_ERROR (Status) ? DEBUG_WARN : DEBUG_INFO,
"%a: removing stale Boot#%04x %s: %r\n",
- __FUNCTION__,
+ __func__,
(UINT32)BootOptions[Index].OptionNumber,
DevicePathString == NULL ? L"<unavailable>" : DevicePathString,
Status
@@ -735,7 +735,7 @@ BootDiscoveryPolicyHandler (
DEBUG ((
DEBUG_INFO,
"%a - Unexpected DiscoveryPolicy (0x%x). Run Minimal Discovery Policy\n",
- __FUNCTION__,
+ __func__,
DiscoveryPolicy
));
return EFI_SUCCESS;
@@ -747,13 +747,13 @@ BootDiscoveryPolicyHandler (
(VOID **)&BMPolicy
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a - Failed to locate gEfiBootManagerPolicyProtocolGuid - %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a - Failed to locate gEfiBootManagerPolicyProtocolGuid - %r\n", __func__, Status));
return Status;
}
Status = BMPolicy->ConnectDeviceClass (BMPolicy, Class);
if (EFI_ERROR (Status)){
- DEBUG ((DEBUG_ERROR, "%a - ConnectDeviceClass returns - %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a - ConnectDeviceClass returns - %r\n", __func__, Status));
return Status;
}
@@ -927,7 +927,7 @@ PlatformBootManagerUnableToBoot (
//
if (NewBootOptionCount != OldBootOptionCount) {
DEBUG ((DEBUG_WARN, "%a: rebooting after refreshing all boot options\n",
- __FUNCTION__));
+ __func__));
gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);
}
diff --git a/Platform/RaspberryPi/RPi5/Library/PlatformLib/AArch64/RaspberryPiHelper.S b/Platform/RaspberryPi/RPi5/Library/PlatformLib/AArch64/RaspberryPiHelper.S
index 21457c89..c6741b46 100644
--- a/Platform/RaspberryPi/RPi5/Library/PlatformLib/AArch64/RaspberryPiHelper.S
+++ b/Platform/RaspberryPi/RPi5/Library/PlatformLib/AArch64/RaspberryPiHelper.S
@@ -10,7 +10,7 @@
*
**/
-#include <AsmMacroIoLibV8.h>
+#include <AsmMacroLib.h>
#include <Library/ArmLib.h>
#include <IndustryStandard/Bcm2836Mbox.h>
#include <IndustryStandard/RpiMbox.h>
diff --git a/Platform/RaspberryPi/RPi5/RPi5.dsc b/Platform/RaspberryPi/RPi5/RPi5.dsc
index 0f3b669c..8ab4f15a 100644
--- a/Platform/RaspberryPi/RPi5/RPi5.dsc
+++ b/Platform/RaspberryPi/RPi5/RPi5.dsc
@@ -120,15 +120,6 @@
# use the accelerated BaseMemoryLibOptDxe by default, overrides for SEC/PEI below
BaseMemoryLib|MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
- #
- # It is not possible to prevent the ARM compiler from inserting calls to intrinsic functions.
- # This library provides the instrinsic functions such a compiler may generate calls to.
- #
- NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-
- # Add support for GCC stack protector
- NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
-
# ARM Architectural Libraries
CacheMaintenanceLib|ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.inf
DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLib.inf
diff --git a/Platform/SiFive/U5SeriesPkg/Library/PeiCoreInfoHobLib/CoreInfoHob.c b/Platform/SiFive/U5SeriesPkg/Library/PeiCoreInfoHobLib/CoreInfoHob.c
index 5e66a983..d0c0eee7 100644
--- a/Platform/SiFive/U5SeriesPkg/Library/PeiCoreInfoHobLib/CoreInfoHob.c
+++ b/Platform/SiFive/U5SeriesPkg/Library/PeiCoreInfoHobLib/CoreInfoHob.c
@@ -106,7 +106,7 @@ CreateU5MCProcessorSmbiosDataHob (
RISC_V_PROCESSOR_TYPE7_HOB_DATA *L2CacheDataHobPtr;
RISC_V_PROCESSOR_SMBIOS_HOB_DATA *SmbiosDataHobPtr;
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));
if (SmbiosHobPtr == NULL) {
return EFI_INVALID_PARAMETER;
@@ -154,7 +154,7 @@ CreateU5MCProcessorSmbiosDataHob (
ASSERT (FALSE);
}
*SmbiosHobPtr = SmbiosDataHobPtr;
- DEBUG ((DEBUG_INFO, "%a: Exit\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Exit\n", __func__));
return EFI_SUCCESS;
}
diff --git a/Platform/SiFive/U5SeriesPkg/Library/PlatformSecPpiLib/PlatformSecPpiLib.c b/Platform/SiFive/U5SeriesPkg/Library/PlatformSecPpiLib/PlatformSecPpiLib.c
index ef84e8c1..fdd971c2 100644
--- a/Platform/SiFive/U5SeriesPkg/Library/PlatformSecPpiLib/PlatformSecPpiLib.c
+++ b/Platform/SiFive/U5SeriesPkg/Library/PlatformSecPpiLib/PlatformSecPpiLib.c
@@ -87,7 +87,7 @@ TemporaryRamMigration (
DEBUG ((DEBUG_INFO,
"%a: Temp Mem Base:0x%Lx, Permanent Mem Base:0x%Lx, CopySize:0x%Lx\n",
- __FUNCTION__,
+ __func__,
TemporaryMemoryBase,
PermanentMemoryBase,
(UINT64)CopySize
@@ -113,7 +113,7 @@ TemporaryRamMigration (
// Relocate PEI Service **
//
FirmwareContext->PeiServiceTable += (unsigned long)((UINTN)NewStack - (UINTN)OldStack);
- DEBUG ((DEBUG_INFO, "%a: OpenSBI Firmware Context is relocated to 0x%x\n", __FUNCTION__, FirmwareContext));
+ DEBUG ((DEBUG_INFO, "%a: OpenSBI Firmware Context is relocated to 0x%x\n", __func__, FirmwareContext));
DEBUG ((DEBUG_INFO, "OpenSBI Firmware Context at 0x%x\n", FirmwareContext));
DEBUG ((DEBUG_INFO, " PEI Service at 0x%x\n\n", FirmwareContext->PeiServiceTable));
@@ -129,7 +129,7 @@ EFI_STATUS EFIAPI TemporaryRamDone (
VOID
)
{
- DEBUG ((DEBUG_INFO, "%a: 2nd time PEI core, temporary ram done.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: 2nd time PEI core, temporary ram done.\n", __func__));
return EFI_SUCCESS;
}
/** Return platform SEC PPI before PEI Core
diff --git a/Platform/Socionext/DeveloperBox/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/Platform/Socionext/DeveloperBox/SmbiosPlatformDxe/SmbiosPlatformDxe.c
index f071aa01..9442c9e2 100644
--- a/Platform/Socionext/DeveloperBox/SmbiosPlatformDxe/SmbiosPlatformDxe.c
+++ b/Platform/Socionext/DeveloperBox/SmbiosPlatformDxe/SmbiosPlatformDxe.c
@@ -902,7 +902,7 @@ InstallAllStructures (
Status = mSmbios->Add (mSmbios, NULL, &SmbiosHandle, FixedTables[Idx]);
if (EFI_ERROR(Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to add SMBIOS type %u table - %r\n",
- __FUNCTION__, FixedTables[Idx]->Type, Status));
+ __func__, FixedTables[Idx]->Type, Status));
break;
}
}
@@ -914,7 +914,7 @@ InstallAllStructures (
Status = InstallMemoryDeviceStructure();
if (EFI_ERROR(Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to add SMBIOS type 17 table - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
for (Hob.Raw = GetHobList ();
@@ -926,7 +926,7 @@ InstallAllStructures (
Hob.ResourceDescriptor->ResourceLength);
if (EFI_ERROR(Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to add SMBIOS type 19 table - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
break;
}
}
diff --git a/Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.c b/Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.c
index f4e72463..755bb08c 100644
--- a/Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.c
+++ b/Platform/SolidRun/Armada80x0McBin/NonDiscoverableInitLib/NonDiscoverableInitLib.c
@@ -40,7 +40,7 @@ XhciInit (
Status = MvGpioGetProtocol (MV_GPIO_DRIVER_TYPE_SOC_CONTROLLER, &GpioProtocol);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __func__));
return Status;
}
diff --git a/Platform/SolidRun/Cn913xCEx7Eval/NonDiscoverableInitLib/NonDiscoverableInitLib.c b/Platform/SolidRun/Cn913xCEx7Eval/NonDiscoverableInitLib/NonDiscoverableInitLib.c
index 18312ac4..f12fac01 100644
--- a/Platform/SolidRun/Cn913xCEx7Eval/NonDiscoverableInitLib/NonDiscoverableInitLib.c
+++ b/Platform/SolidRun/Cn913xCEx7Eval/NonDiscoverableInitLib/NonDiscoverableInitLib.c
@@ -39,7 +39,7 @@ ConfigurePins (
Status = MvGpioGetProtocol (DriverType, &GpioProtocol);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __func__));
return Status;
}
diff --git a/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c b/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c
index fb329cbd..1063e992 100644
--- a/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c
+++ b/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c
@@ -161,7 +161,7 @@ StyxSataPlatformDxeEntryPoint (
FixedPcdGet8(PcdSata0PortCount), 0);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to initialize primary SATA controller!\n",
- __FUNCTION__));
+ __func__));
return Status;
}
@@ -186,7 +186,7 @@ StyxSataPlatformDxeEntryPoint (
FixedPcdGet8(PcdSata0PortCount));
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to initialize secondary SATA controller!\n",
- __FUNCTION__));
+ __func__));
} else {
for (PortNum = 0; PortNum < FixedPcdGet8(PcdSata1PortCount); PortNum++) {
SetPrdSingleSata1 (PortNum);
diff --git a/Silicon/AMD/Styx/Drivers/StyxSpiFvDxe/StyxSpiFvDxe.c b/Silicon/AMD/Styx/Drivers/StyxSpiFvDxe/StyxSpiFvDxe.c
index e34842e5..4295f4b4 100644
--- a/Silicon/AMD/Styx/Drivers/StyxSpiFvDxe/StyxSpiFvDxe.c
+++ b/Silicon/AMD/Styx/Drivers/StyxSpiFvDxe/StyxSpiFvDxe.c
@@ -474,7 +474,7 @@ StyxSpiFvDxeInitialize (
DEBUG ((EFI_D_INFO,
"%a: Using NV store FV in-memory copy at 0x%lx, LBA offset == 0x%lx\n",
- __FUNCTION__, mNvStorageBase, mNvStorageLbaOffset));
+ __func__, mNvStorageBase, mNvStorageLbaOffset));
Status = gBS->LocateProtocol (&gAmdIscpDxeProtocolGuid, NULL,
(VOID **)&mIscpDxeProtocol);
diff --git a/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c b/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c
index c047d744..37d63adc 100644
--- a/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c
+++ b/Silicon/AMD/Styx/Library/MemoryInitPei/MemoryInitPeiLib.c
@@ -76,7 +76,7 @@ MoveNvStoreImage (
CopyMem (NewBase, OldBase, Size);
DEBUG ((EFI_D_INFO, "%a: Relocating NV store FV from %p to %p\n",
- __FUNCTION__, OldBase, NewBase));
+ __func__, OldBase, NewBase));
Status = PcdSet64S (PcdFlashNvStorageVariableBase64, (UINT64)NewBase);
ASSERT_EFI_ERROR (Status);
diff --git a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c
index 178fb569..d6440957 100644
--- a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c
+++ b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c
@@ -149,7 +149,7 @@ SetDeviceStatus (
if (Rc) {
DEBUG ((DEBUG_ERROR,
"%a: Could not set 'status' property for '%a' node\n",
- __FUNCTION__, Device));
+ __func__, Device));
}
}
}
@@ -178,7 +178,7 @@ SetMacAddress (
if (Rc) {
DEBUG ((DEBUG_ERROR,
"%a: Could not set 'mac-address' property for '%a' node\n",
- __FUNCTION__, Device));
+ __func__, Device));
}
}
}
@@ -199,14 +199,14 @@ DisableSmmu (
Node = fdt_path_offset (Fdt, DeviceNodeName);
if (Node <= 0) {
DEBUG ((DEBUG_WARN, "%a: Failed to find path %s: %a\n",
- __FUNCTION__, DeviceNodeName, fdt_strerror (Node)));
+ __func__, DeviceNodeName, fdt_strerror (Node)));
return;
}
Error = fdt_delprop (Fdt, Node, IommuPropName);
if (Error != 0) {
DEBUG ((DEBUG_WARN, "%a: Failed to delete property %a: %a\n",
- __FUNCTION__, IommuPropName, fdt_strerror (Error)));
+ __func__, IommuPropName, fdt_strerror (Error)));
return;
}
@@ -218,7 +218,7 @@ DisableSmmu (
Error = fdt_del_node (Fdt, Node);
if (Error != 0) {
DEBUG ((DEBUG_WARN, "%a: Failed to delete node %a: %a\n",
- __FUNCTION__, SmmuNodeName, fdt_strerror (Error)));
+ __func__, SmmuNodeName, fdt_strerror (Error)));
}
}
diff --git a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
index 7eeee082..ac795fe5 100644
--- a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
+++ b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c
@@ -69,7 +69,7 @@ PerformFlashWriteWithProgress (
if (FlashAddressType != FlashAddressTypeRelativeAddress) {
DEBUG ((DEBUG_ERROR, "%a: only FlashAddressTypeRelativeAddress supported\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
@@ -77,7 +77,7 @@ PerformFlashWriteWithProgress (
if (FirmwareType != PlatformFirmwareTypeSystemFirmware) {
DEBUG ((DEBUG_ERROR,
"%a: only PlatformFirmwareTypeSystemFirmware supported\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
@@ -85,14 +85,14 @@ PerformFlashWriteWithProgress (
if ((FlashAddress % mBlockSize) != 0 || (Length % mBlockSize) != 0) {
DEBUG ((DEBUG_ERROR,
"%a:region [0x%lx, 0x%lx) is not a multiple of the blocksize 0x%lx\n",
- __FUNCTION__, FlashAddress, Length, mBlockSize));
+ __func__, FlashAddress, Length, mBlockSize));
return EFI_INVALID_PARAMETER;
}
if ((FlashAddress + Length) > mFlashMaxSize) {
DEBUG ((DEBUG_ERROR,
"%a: updated region [0x%lx, 0x%lx) outside of FV region [0x0, 0x%lx)\n",
- __FUNCTION__, FlashAddress, FlashAddress + Length, mFlashMaxSize));
+ __func__, FlashAddress, FlashAddress + Length, mFlashMaxSize));
return EFI_INVALID_PARAMETER;
}
@@ -105,20 +105,20 @@ PerformFlashWriteWithProgress (
// Erase the block
//
DEBUG ((DEBUG_INFO, "%a: erasing 0x%llx bytes at address 0x%llx\n",
- __FUNCTION__, mBlockSize, FlashAddress));
+ __func__, mBlockSize, FlashAddress));
Status = IscpDxeProtocol->AmdExecuteEraseFvBlockDxe (IscpDxeProtocol,
FlashAddress, mBlockSize);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: AmdExecuteEraseFvBlockDxe () failed - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
//
// Write the new data
//
DEBUG ((DEBUG_INFO, "%a: writing 0x%llx bytes at at address 0x%llx\\n",
- __FUNCTION__, mBlockSize, FlashAddress));
+ __func__, mBlockSize, FlashAddress));
Status = IscpDxeProtocol->AmdExecuteUpdateFvBlockDxe (IscpDxeProtocol,
FlashAddress, Buffer, mBlockSize);
@@ -126,7 +126,7 @@ PerformFlashWriteWithProgress (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: write of block address 0x%lx failed - %r\n",
- __FUNCTION__, FlashAddress, Status));
+ __func__, FlashAddress, Status));
}
FlashAddress += mBlockSize;
diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigDxe.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigDxe.c
index 6ba39ad4..5a26d9fd 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigDxe.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/AcpiConfigDxe/AcpiConfigDxe.c
@@ -368,7 +368,7 @@ AcpiNVDataUpdate (
&PrivateData->Configuration
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a %d gRT->SetVariable() failed \n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a %d gRT->SetVariable() failed \n", __func__, __LINE__));
return Status;
}
@@ -405,7 +405,7 @@ UpdateTurboModeConfig (
}
}
} else {
- DEBUG ((DEBUG_INFO, "%a: Turbo mode is unsupported! \n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Turbo mode is unsupported! \n", __func__));
}
return EFI_SUCCESS;
diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/CpuConfigDxe/CpuConfigDxe.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/CpuConfigDxe/CpuConfigDxe.c
index c5ba48ed..4064421a 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Drivers/CpuConfigDxe/CpuConfigDxe.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/CpuConfigDxe/CpuConfigDxe.c
@@ -82,7 +82,7 @@ CpuNvParamGet (
&Value
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a %d Fail to get NVParam, %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "%a %d Fail to get NVParam, %r\n", __func__, __LINE__, Status));
Configuration->CpuSubNumaMode = SUBNUMA_MODE_MONOLITHIC;
} else {
Configuration->CpuSubNumaMode = Value;
@@ -117,7 +117,7 @@ CpuNvParamSet (
Configuration->CpuSubNumaMode
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a %d Fail to set NVParam, %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "%a %d Fail to set NVParam, %r\n", __func__, __LINE__, Status));
ASSERT_EFI_ERROR (Status);
return Status;
}
diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.c
index 00969470..a2bcd8f9 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.c
@@ -480,7 +480,7 @@ FlashFvbDxeInitialize (
DEBUG ((
DEBUG_INFO,
"%a: Using NV store FV in-memory copy at 0x%lx with size 0x%x\n",
- __FUNCTION__,
+ __func__,
mNvStorageBase,
mNvStorageSize
));
@@ -488,14 +488,14 @@ FlashFvbDxeInitialize (
// Get NV Flash information
Status = FlashGetNvRamInfo (&mNvFlashBase, &mNvFlashSize);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to get Flash info\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to get Flash info\n", __func__));
return EFI_DEVICE_ERROR;
}
if (mNvFlashSize >= (mNvStorageSize * 2)) {
- DEBUG ((DEBUG_INFO, "%a: NV store on Flash is valid\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: NV store on Flash is valid\n", __func__));
} else {
- DEBUG ((DEBUG_ERROR, "%a: NV store on Flash is invalid\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: NV store on Flash is invalid\n", __func__));
return EFI_DEVICE_ERROR;
}
diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashPei/FlashPei.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashPei/FlashPei.c
index 3da7df39..87a1239b 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashPei/FlashPei.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashPei/FlashPei.c
@@ -50,14 +50,14 @@ FlashPeiEntryPoint (
DEBUG ((
DEBUG_INFO,
"%a: Using NV store FV in-memory copy at 0x%lx with size 0x%x\n",
- __FUNCTION__,
+ __func__,
NvRamAddress,
NvRamSize
));
Status = FlashGetNvRamInfo (&FWNvRamStartOffset, &FWNvRamSize);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to get Flash NVRAM info %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to get Flash NVRAM info %r\n", __func__, Status));
return Status;
}
diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/PlatformInfoDxe/PlatformInfoDxe.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/PlatformInfoDxe/PlatformInfoDxe.c
index 82d2cf13..9b868820 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Drivers/PlatformInfoDxe/PlatformInfoDxe.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/PlatformInfoDxe/PlatformInfoDxe.c
@@ -380,7 +380,7 @@ PlatformInfoEntryPoint (
DEBUG ((
DEBUG_ERROR,
"%a %d Fail to update the platform info screen \n",
- __FUNCTION__,
+ __func__,
__LINE__
));
return Status;
diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/RasConfigDxe/RasConfigDxe.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/RasConfigDxe/RasConfigDxe.c
index 2da012fa..e5e62512 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Drivers/RasConfigDxe/RasConfigDxe.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/RasConfigDxe/RasConfigDxe.c
@@ -113,7 +113,7 @@ RasConfigNvParamGet (
Value
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __func__, __LINE__));
ASSERT_EFI_ERROR (Status);
Value = 0;
}
@@ -134,7 +134,7 @@ RasConfigNvParamGet (
Value
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __func__, __LINE__));
ASSERT_EFI_ERROR (Status);
Value = 0;
}
@@ -155,7 +155,7 @@ RasConfigNvParamGet (
Value
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __func__, __LINE__));
ASSERT_EFI_ERROR (Status);
Value = 0;
}
@@ -176,7 +176,7 @@ RasConfigNvParamGet (
Value
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __func__, __LINE__));
ASSERT_EFI_ERROR (Status);
Value = 0;
}
@@ -197,7 +197,7 @@ RasConfigNvParamGet (
Value
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __func__, __LINE__));
ASSERT_EFI_ERROR (Status);
Value = 0;
}
@@ -218,7 +218,7 @@ RasConfigNvParamGet (
Value
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __func__, __LINE__));
ASSERT_EFI_ERROR (Status);
Value = 0;
}
@@ -239,7 +239,7 @@ RasConfigNvParamGet (
Value
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __func__, __LINE__));
ASSERT_EFI_ERROR (Status);
Value = 0;
}
@@ -260,7 +260,7 @@ RasConfigNvParamGet (
Value
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "%a:%d NVParamSet() failed!\n", __func__, __LINE__));
ASSERT_EFI_ERROR (Status);
Value = 0;
}
@@ -809,7 +809,7 @@ RasConfigEntryPoint (
DEBUG ((
DEBUG_ERROR,
"%a %d Fail to update Memory Configuration screen \n",
- __FUNCTION__,
+ __func__,
__LINE__
));
RasConfigUnload ();
diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/RngDxe/RngDxe.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/RngDxe/RngDxe.c
index bb8140cf..9f2ec5b7 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Drivers/RngDxe/RngDxe.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/RngDxe/RngDxe.c
@@ -111,7 +111,7 @@ RngGetRNG (
DEBUG ((
DEBUG_ERROR,
"%a:%d Failed to generate a random number. \n",
- __FUNCTION__,
+ __func__,
__LINE__
));
return Status;
diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
index dea2e640..c911ff7e 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
@@ -1031,7 +1031,7 @@ AutoLaneBifurcationRetry:
Status = PciePhyInit (RootComplex->SerdesBase);
if (RETURN_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to initialize the PCIe PHY\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to initialize the PCIe PHY\n", __func__));
return RETURN_DEVICE_ERROR;
}
}
diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/AmpereCpuLib/AmpereCpuLib.c b/Silicon/Ampere/AmpereAltraPkg/Library/AmpereCpuLib/AmpereCpuLib.c
index ecb03b1e..f6d9c5e2 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Library/AmpereCpuLib/AmpereCpuLib.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Library/AmpereCpuLib/AmpereCpuLib.c
@@ -33,7 +33,7 @@ GetPlatformHob (
(CONST VOID *)FixedPcdGet64 (PcdSystemMemoryBase)
);
if (mPlatformInfoHob == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to get gPlatformInfoHobGuid!\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to get gPlatformInfoHobGuid!\n", __func__));
return NULL;
}
}
diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/AmpereCpuLib/RuntimeAmpereCpuLib.c b/Silicon/Ampere/AmpereAltraPkg/Library/AmpereCpuLib/RuntimeAmpereCpuLib.c
index 5e835442..b2eca9e5 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Library/AmpereCpuLib/RuntimeAmpereCpuLib.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Library/AmpereCpuLib/RuntimeAmpereCpuLib.c
@@ -85,7 +85,7 @@ RuntimeAmpereCpuLibConstructor (
(CONST VOID *)FixedPcdGet64 (PcdSystemMemoryBase)
);
if (Hob == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to get gPlatformInfoHobGuid!\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to get gPlatformInfoHobGuid!\n", __func__));
return EFI_DEVICE_ERROR;
}
diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/DwI2cLib/DwI2cLib.c b/Silicon/Ampere/AmpereAltraPkg/Library/DwI2cLib/DwI2cLib.c
index 669ba2ea..5244ef44 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Library/DwI2cLib/DwI2cLib.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Library/DwI2cLib/DwI2cLib.c
@@ -178,7 +178,7 @@ I2cHWInit (
mI2cBusList[Bus].Enabled = 0;
DEBUG ((DEBUG_VERBOSE, "%a: Bus %d, Rx_Buffer %d, Tx_Buffer %d\n",
- __FUNCTION__,
+ __func__,
Bus,
mI2cBusList[Bus].RxFifo,
mI2cBusList[Bus].TxFifo
@@ -211,7 +211,7 @@ I2cEnable (
} while (I2cStatusCnt-- != 0);
if (I2cStatusCnt == 0) {
- DEBUG ((DEBUG_ERROR, "%a: Enable/disable timeout\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Enable/disable timeout\n", __func__));
}
if ((Enable == 0) || (I2cStatusCnt == 0)) {
@@ -260,7 +260,7 @@ I2cCheckErrors (
if ((ErrorStatus & DW_IC_INTR_RX_UNDER) != 0) {
DEBUG ((DEBUG_ERROR, "%a: RX_UNDER error on i2c bus %d error status %08x\n",
- __FUNCTION__,
+ __func__,
Bus,
ErrorStatus
));
@@ -269,7 +269,7 @@ I2cCheckErrors (
if ((ErrorStatus & DW_IC_INTR_RX_OVER) != 0) {
DEBUG ((DEBUG_ERROR, "%a: RX_OVER error on i2c bus %d error status %08x\n",
- __FUNCTION__,
+ __func__,
Bus,
ErrorStatus
));
@@ -278,7 +278,7 @@ I2cCheckErrors (
if ((ErrorStatus & DW_IC_INTR_TX_ABRT) != 0) {
DEBUG ((DEBUG_VERBOSE, "%a: TX_ABORT at source %08x\n",
- __FUNCTION__,
+ __func__,
MmioRead32 (Base + DW_IC_TX_ABRT_SOURCE)
));
MmioRead32 (Base + DW_IC_CLR_TX_ABRT);
@@ -303,7 +303,7 @@ I2cWaitBusNotBusy (
while ((MmioRead32 (Base + DW_IC_STATUS) & DW_IC_STATUS_MST_ACTIVITY) != 0) {
if (PollCount == 0) {
- DEBUG ((DEBUG_VERBOSE, "%a: Timeout while waiting for bus ready\n", __FUNCTION__));
+ DEBUG ((DEBUG_VERBOSE, "%a: Timeout while waiting for bus ready\n", __func__));
return FALSE;
}
PollCount--;
@@ -334,7 +334,7 @@ I2cWaitTxData (
while (MmioRead32 (Base + DW_IC_TXFLR) == mI2cBusList[Bus].TxFifo) {
if (PollCount++ >= DW_MAX_TRANSFER_POLL_COUNT) {
- DEBUG ((DEBUG_ERROR, "%a: Timeout waiting for TX buffer available\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Timeout waiting for TX buffer available\n", __func__));
return EFI_TIMEOUT;
}
MicroSecondDelay (mI2cBusList[Bus].PollingTime);
@@ -359,7 +359,7 @@ I2cWaitRxData (
while ((MmioRead32 (Base + DW_IC_STATUS) & DW_IC_STATUS_RFNE) == 0) {
if (PollCount++ >= DW_MAX_TRANSFER_POLL_COUNT) {
- DEBUG ((DEBUG_ERROR, "%a: Timeout waiting for RX buffer available\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Timeout waiting for RX buffer available\n", __func__));
return EFI_TIMEOUT;
}
@@ -393,7 +393,7 @@ I2cSclInit (
I2cSpeedKhz = I2cSpeed / 1000;
DEBUG ((DEBUG_VERBOSE, "%a: Bus %d I2cClkFreq %d I2cSpeed %d\n",
- __FUNCTION__,
+ __func__,
Bus,
I2cClkFreq,
I2cSpeed
@@ -469,7 +469,7 @@ I2cFinish (
} while (PollCount++ < DW_MAX_TRANSFER_POLL_COUNT);
if (PollCount >= DW_MAX_TRANSFER_POLL_COUNT) {
- DEBUG ((DEBUG_ERROR, "%a: Timeout waiting for TX FIFO empty\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Timeout waiting for TX FIFO empty\n", __func__));
return EFI_TIMEOUT;
}
@@ -483,7 +483,7 @@ I2cFinish (
MicroSecondDelay (mI2cBusList[Bus].PollingTime);
} while (PollCount++ < DW_MAX_TRANSFER_POLL_COUNT);
- DEBUG ((DEBUG_ERROR, "%a: Timeout waiting for transaction finished\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Timeout waiting for transaction finished\n", __func__));
return EFI_TIMEOUT;
}
@@ -502,7 +502,7 @@ InternalI2cWrite (
Base = mI2cBusList[Bus].Base;
DEBUG ((DEBUG_VERBOSE, "%a: Write Bus %d Buf %p Length %d\n",
- __FUNCTION__,
+ __func__,
Bus,
Buf,
*Length
@@ -566,7 +566,7 @@ InternalI2cRead (
ReadCount = 0;
DEBUG ((DEBUG_VERBOSE, "%a: Read Bus %d Buf %p Length:%d\n",
- __FUNCTION__,
+ __func__,
Bus,
Buf,
*Length
@@ -620,7 +620,7 @@ InternalI2cRead (
if (I2cCheckErrors (Bus) != 0) {
DEBUG ((DEBUG_VERBOSE,
"%a: Sending reading command remaining length %d CRC error\n",
- __FUNCTION__,
+ __func__,
*Length
));
Status = EFI_CRC_ERROR;
@@ -633,7 +633,7 @@ InternalI2cRead (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_VERBOSE,
"%a: Reading remaining length %d failed to wait data\n",
- __FUNCTION__,
+ __func__,
*Length
));
@@ -650,7 +650,7 @@ InternalI2cRead (
if (I2cCheckErrors (Bus) != 0) {
DEBUG ((DEBUG_VERBOSE, "%a: Reading remaining length %d CRC error\n",
- __FUNCTION__,
+ __func__,
*Length
));
Status = EFI_CRC_ERROR;
diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashLibCommon.c b/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashLibCommon.c
index 83695c85..921dfa73 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashLibCommon.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashLibCommon.c
@@ -87,7 +87,7 @@ FlashGetFailSafeInfo (
DEBUG ((
DEBUG_INFO,
"%a: FailSafe Base 0x%llx, Size 0x%lx\n",
- __FUNCTION__,
+ __func__,
*FailSafeBase,
*FailSafeSize
));
@@ -139,7 +139,7 @@ FlashGetNvRamInfo (
DEBUG ((
DEBUG_INFO,
"%a: NVRAM Base 0x%llx, Size 0x%lx\n",
- __FUNCTION__,
+ __func__,
*NvRamBase,
*NvRamSize
));
@@ -191,7 +191,7 @@ FlashGetNvRam2Info (
DEBUG ((
DEBUG_INFO,
"%a: NVRAM2 Base 0x%llx, Size 0x%lx\n",
- __FUNCTION__,
+ __func__,
*NvRam2Base,
*NvRam2Size
));
@@ -240,7 +240,7 @@ FlashEraseCommand (
}
if (MmSpiNorRes.Status != MM_SPINOR_RES_SUCCESS) {
- DEBUG ((DEBUG_ERROR, "%a: Device error %llx\n", __FUNCTION__, MmSpiNorRes.Status));
+ DEBUG ((DEBUG_ERROR, "%a: Device error %llx\n", __func__, MmSpiNorRes.Status));
return EFI_DEVICE_ERROR;
}
@@ -296,7 +296,7 @@ FlashWriteCommand (
}
if (MmSpiNorRes.Status != MM_SPINOR_RES_SUCCESS) {
- DEBUG ((DEBUG_ERROR, "%a: Device error 0x%llx\n", __FUNCTION__, MmSpiNorRes.Status));
+ DEBUG ((DEBUG_ERROR, "%a: Device error 0x%llx\n", __func__, MmSpiNorRes.Status));
return EFI_DEVICE_ERROR;
}
@@ -356,7 +356,7 @@ FlashReadCommand (
}
if (MmSpiNorRes.Status != MM_SPINOR_RES_SUCCESS) {
- DEBUG ((DEBUG_ERROR, "%a: Device error %llx\n", __FUNCTION__, MmSpiNorRes.Status));
+ DEBUG ((DEBUG_ERROR, "%a: Device error %llx\n", __func__, MmSpiNorRes.Status));
return EFI_DEVICE_ERROR;
}
diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/Silicon/Ampere/AmpereAltraPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
index cf0f0ee3..d1acc1dc 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
@@ -128,7 +128,7 @@ PciHostBridgeGetRootBridges (
RootBridges = AllocatePool (AC01_PCIE_MAX_ROOT_COMPLEX * sizeof (PCI_ROOT_BRIDGE));
if (RootBridges == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to allocate RootBridges\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to allocate RootBridges\n", __func__));
return NULL;
}
@@ -161,7 +161,7 @@ PciHostBridgeGetRootBridges (
(VOID *)&mEfiPciRootBridgeDevicePath
);
if (DevicePath == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to allocate device path\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to allocate device path\n", __func__));
return NULL;
}
diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/TrngLib/TrngLib.c b/Silicon/Ampere/AmpereAltraPkg/Library/TrngLib/TrngLib.c
index 55250ddc..ee2a102b 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Library/TrngLib/TrngLib.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Library/TrngLib/TrngLib.c
@@ -52,7 +52,7 @@ GenerateRandomNumbers (
if (RandSize != 0) {
Status = MailboxMsgGetRandomNumber64 ((UINT8 *)&Value);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to get random number!\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to get random number!\n", __func__));
return EFI_DEVICE_ERROR;
}
CopyMem (Buffer + Count * sizeof (UINT64), &Value, RandSize);
diff --git a/Silicon/Ampere/AmpereSiliconPkg/Library/PlatformUiLib/PlatformManager.c b/Silicon/Ampere/AmpereSiliconPkg/Library/PlatformUiLib/PlatformManager.c
index 1872aa80..11f1e83d 100644
--- a/Silicon/Ampere/AmpereSiliconPkg/Library/PlatformUiLib/PlatformManager.c
+++ b/Silicon/Ampere/AmpereSiliconPkg/Library/PlatformUiLib/PlatformManager.c
@@ -289,7 +289,7 @@ PlatformManagerUiLibConstructor (
//
CreatePlatformManagerForm (PLATFORM_MANAGER_FORM_ID);
} else {
- DEBUG ((DEBUG_ERROR, "%a: Failed to add Hii package\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to add Hii package\n", __func__));
return EFI_INVALID_PARAMETER;
}
diff --git a/Silicon/Atmel/AtSha204a/AtSha204aDriver.c b/Silicon/Atmel/AtSha204a/AtSha204aDriver.c
index 4a9a2aa3..c7df1301 100644
--- a/Silicon/Atmel/AtSha204a/AtSha204aDriver.c
+++ b/Silicon/Atmel/AtSha204a/AtSha204aDriver.c
@@ -151,7 +151,7 @@ AtSha240aGetRNG (
Status = AtSha204a->I2cIo->QueueRequest (AtSha204a->I2cIo, 1, NULL,
(VOID *)&Request, NULL);
DEBUG ((DEBUG_INFO, "%a: wake AtSha204a: I2cIo->QueueRequest() - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
gBS->Stall (2500); // wait 2.5 ms for wake to complete
@@ -164,7 +164,7 @@ AtSha240aGetRNG (
continue;
}
DEBUG ((DEBUG_ERROR, "%a: I2C request transfer failed, Status == %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return EFI_DEVICE_ERROR;
}
@@ -177,7 +177,7 @@ AtSha240aGetRNG (
continue;
}
DEBUG ((DEBUG_ERROR, "%a: I2C response transfer failed, Status == %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return EFI_DEVICE_ERROR;
}
@@ -188,7 +188,7 @@ AtSha240aGetRNG (
if (++Retries <= MAX_RETRIES) {
continue;
}
- DEBUG ((DEBUG_WARN, "%a: incomplete packet received\n", __FUNCTION__));
+ DEBUG ((DEBUG_WARN, "%a: incomplete packet received\n", __func__));
return EFI_DEVICE_ERROR;
}
diff --git a/Silicon/Broadcom/Bcm283x/Drivers/InterruptDxe/InterruptDxe.c b/Silicon/Broadcom/Bcm283x/Drivers/InterruptDxe/InterruptDxe.c
index a1fe1303..427be411 100644
--- a/Silicon/Broadcom/Bcm283x/Drivers/InterruptDxe/InterruptDxe.c
+++ b/Silicon/Broadcom/Bcm283x/Drivers/InterruptDxe/InterruptDxe.c
@@ -290,7 +290,7 @@ CpuArchEventProtocolNotify (
Status = Cpu->RegisterInterruptHandler (Cpu, ARM_ARCH_EXCEPTION_IRQ, NULL);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Cpu->RegisterInterruptHandler() - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
ASSERT (FALSE);
return;
}
@@ -301,7 +301,7 @@ CpuArchEventProtocolNotify (
Status = Cpu->RegisterInterruptHandler (Cpu, ARM_ARCH_EXCEPTION_IRQ, IrqInterruptHandler);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Cpu->RegisterInterruptHandler() - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
ASSERT (FALSE);
return;
}
diff --git a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/DriverBinding.c b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/DriverBinding.c
index 435ef493..321d546d 100644
--- a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/DriverBinding.c
+++ b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/DriverBinding.c
@@ -129,7 +129,7 @@ GenetDriverBindingStart (
Genet = AllocateZeroPool (sizeof (GENET_PRIVATE_DATA));
if (Genet == NULL) {
DEBUG ((DEBUG_ERROR,
- "%a: Couldn't allocate private data\n", __FUNCTION__));
+ "%a: Couldn't allocate private data\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -141,14 +141,14 @@ GenetDriverBindingStart (
EFI_OPEN_PROTOCOL_BY_DRIVER);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
- "%a: Couldn't open protocol: %r\n", __FUNCTION__, Status));
+ "%a: Couldn't open protocol: %r\n", __func__, Status));
goto FreeDevice;
}
Status = GenetDmaAlloc (Genet);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
- "%a: Couldn't allocate DMA buffers: %r\n", __FUNCTION__, Status));
+ "%a: Couldn't allocate DMA buffers: %r\n", __func__, Status));
goto FreeDevice;
}
@@ -210,7 +210,7 @@ GenetDriverBindingStart (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
- "%a: Couldn't install protocol interfaces: %r\n", __FUNCTION__, Status));
+ "%a: Couldn't install protocol interfaces: %r\n", __func__, Status));
gBS->CloseProtocol (ControllerHandle,
&gBcmGenetPlatformDeviceProtocolGuid,
This->DriverBindingHandle,
@@ -224,7 +224,7 @@ GenetDriverBindingStart (
FreeEvent:
gBS->CloseEvent (Genet->ExitBootServicesEvent);
FreeDevice:
- DEBUG ((DEBUG_WARN, "%a: Returning %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_WARN, "%a: Returning %r\n", __func__, Status));
FreePool (Genet);
return Status;
}
@@ -457,7 +457,7 @@ GenetUnload (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to disconnect all controllers - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return Status;
}
diff --git a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c
index 54f899ff..3f556bd3 100644
--- a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c
+++ b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c
@@ -115,7 +115,7 @@ GenericPhyDetect (
Phy->PhyAddr = PhyAddr;
DEBUG ((DEBUG_INFO,
"%a: PHY detected at address 0x%02X (PHYIDR1=0x%04X, PHYIDR2=0x%04X)\n",
- __FUNCTION__, PhyAddr, Id1, Id2));
+ __func__, PhyAddr, Id1, Id2));
return EFI_SUCCESS;
}
}
@@ -354,7 +354,7 @@ GenericPhyGetConfig (
}
DEBUG ((DEBUG_INFO, "%a: Link speed %d Mbps, %a-duplex\n",
- __FUNCTION__, *Speed, *Duplex == PHY_DUPLEX_FULL ? "full" : "half"));
+ __func__, *Speed, *Duplex == PHY_DUPLEX_FULL ? "full" : "half"));
return EFI_SUCCESS;
}
@@ -387,7 +387,7 @@ GenericPhyUpdateConfig (
if (Phy->LinkUp != LinkUp) {
if (LinkUp) {
- DEBUG ((DEBUG_VERBOSE, "%a: Link is up\n", __FUNCTION__));
+ DEBUG ((DEBUG_VERBOSE, "%a: Link is up\n", __func__));
Status = GenericPhyGetConfig (Phy, &Speed, &Duplex);
if (EFI_ERROR (Status)) {
@@ -396,7 +396,7 @@ GenericPhyUpdateConfig (
GenericPhyConfigure (Phy, Speed, Duplex);
} else {
- DEBUG ((DEBUG_VERBOSE, "%a: Link is down\n", __FUNCTION__));
+ DEBUG ((DEBUG_VERBOSE, "%a: Link is down\n", __func__));
}
}
diff --git a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenetUtil.c b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenetUtil.c
index 20f20fd2..a2f8c112 100644
--- a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenetUtil.c
+++ b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenetUtil.c
@@ -108,7 +108,7 @@ GenetPhyRead (
if (Retry == 0) {
DEBUG ((DEBUG_ERROR,
- "%a: Timeout reading PhyAddr %d, Reg %d\n", __FUNCTION__, PhyAddr, Reg));
+ "%a: Timeout reading PhyAddr %d, Reg %d\n", __func__, PhyAddr, Reg));
return EFI_DEVICE_ERROR;
}
@@ -157,7 +157,7 @@ GenetPhyWrite (
if (Retry == 0) {
DEBUG ((DEBUG_ERROR,
- "%a: Timeout writing PhyAddr %d, Reg %d\n", __FUNCTION__, PhyAddr, Reg));
+ "%a: Timeout writing PhyAddr %d, Reg %d\n", __func__, PhyAddr, Reg));
return EFI_DEVICE_ERROR;
}
@@ -618,7 +618,7 @@ GenetDmaAlloc (
&Genet->RxBuffer);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
- "%a: Failed to allocate RX buffer: %r\n", __FUNCTION__, Status));
+ "%a: Failed to allocate RX buffer: %r\n", __func__, Status));
}
return Status;
}
@@ -653,7 +653,7 @@ GenetDmaMapRxDescriptor (
&Genet->RxBufferMap[DescIndex].Mapping);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to map RX buffer: %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return Status;
}
diff --git a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c
index 84adf5e5..c65c003c 100644
--- a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c
+++ b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c
@@ -578,7 +578,7 @@ GenetSimpleNetworkTransmit (
if (This == NULL || Buffer == NULL) {
DEBUG ((DEBUG_ERROR, "%a: Invalid parameter (missing handle or buffer)\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
@@ -603,13 +603,13 @@ GenetSimpleNetworkTransmit (
// grub send failure messages.
//
Retries = 1000;
- DEBUG ((DEBUG_INFO, "%a: Waiting 10s for link\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Waiting 10s for link\n", __func__));
do {
gBS->Stall (10000);
Status = GenericPhyUpdateConfig (&Genet->Phy);
} while (EFI_ERROR (Status) && Retries-- > 0);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: no link\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: no link\n", __func__));
return EFI_NOT_READY;
} else {
Genet->SnpMode.MediaPresent = TRUE;
@@ -620,32 +620,32 @@ GenetSimpleNetworkTransmit (
if (HeaderSize != Genet->SnpMode.MediaHeaderSize) {
DEBUG ((DEBUG_ERROR,
"%a: Invalid parameter (header size mismatch; HeaderSize 0x%X, SnpMode.MediaHeaderSize 0x%X))\n",
- __FUNCTION__, HeaderSize, Genet->SnpMode.MediaHeaderSize));
+ __func__, HeaderSize, Genet->SnpMode.MediaHeaderSize));
return EFI_INVALID_PARAMETER;
}
if (DestAddr == NULL || Protocol == NULL) {
DEBUG ((DEBUG_ERROR,
"%a: Invalid parameter (dest addr or protocol missing)\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
}
if (BufferSize < Genet->SnpMode.MediaHeaderSize) {
- DEBUG ((DEBUG_ERROR, "%a: Buffer too small\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Buffer too small\n", __func__));
return EFI_BUFFER_TOO_SMALL;
}
Status = EfiAcquireLockOrFail (&Genet->Lock);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Couldn't get lock: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: Couldn't get lock: %r\n", __func__, Status));
return EFI_ACCESS_DENIED;
}
if (Genet->TxQueued == GENET_DMA_DESC_COUNT - 1) {
EfiReleaseLock (&Genet->Lock);
- DEBUG ((DEBUG_ERROR, "%a: Queue full\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Queue full\n", __func__));
return EFI_NOT_READY;
}
@@ -667,7 +667,7 @@ GenetSimpleNetworkTransmit (
&DmaDeviceAddress,
&Genet->TxBufferMap[Desc]);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: DmaMap failed: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: DmaMap failed: %r\n", __func__, Status));
EfiReleaseLock (&Genet->Lock);
return Status;
}
@@ -736,7 +736,7 @@ GenetSimpleNetworkReceive (
if (This == NULL || Buffer == NULL) {
DEBUG ((DEBUG_ERROR, "%a: Invalid parameter (missing handle or buffer)\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
@@ -750,7 +750,7 @@ GenetSimpleNetworkReceive (
Status = EfiAcquireLockOrFail (&Genet->Lock);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Couldn't get lock: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: Couldn't get lock: %r\n", __func__, Status));
return EFI_ACCESS_DENIED;
}
@@ -774,7 +774,7 @@ GenetSimpleNetworkReceive (
if (*BufferSize < FrameLength) {
DEBUG ((DEBUG_ERROR,
"%a: Buffer size (0x%X) is too small for frame (0x%X)\n",
- __FUNCTION__, *BufferSize, FrameLength));
+ __func__, *BufferSize, FrameLength));
Status = EFI_BUFFER_TOO_SMALL;
goto out;
}
@@ -798,14 +798,14 @@ GenetSimpleNetworkReceive (
Status = EFI_SUCCESS;
} else {
DEBUG ((DEBUG_ERROR, "%a: Short packet (FrameLength 0x%X)",
- __FUNCTION__, FrameLength));
+ __func__, FrameLength));
Status = EFI_NOT_READY;
}
out:
Status = GenetDmaMapRxDescriptor (Genet, DescIndex);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to remap RX descriptor!\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to remap RX descriptor!\n", __func__));
}
GenetRxComplete (Genet);
diff --git a/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/UpdateDsdt.c b/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/UpdateDsdt.c
index 1f2680c0..3d152d77 100644
--- a/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/UpdateDsdt.c
+++ b/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/UpdateDsdt.c
@@ -76,14 +76,14 @@ GetEnvMac(
Status = gBS->LocateProtocol(&gHisiBoardNicProtocolGuid, NULL, (VOID **)&OemNic);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] LocateProtocol failed %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] LocateProtocol failed %r\n", __func__, __LINE__, Status));
return Status;
}
Status = OemNic->GetMac(&Mac, MacNextID);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] GetMac failed %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] GetMac failed %r\n", __func__, __LINE__, Status));
return Status;
}
@@ -341,7 +341,7 @@ GetDeviceInfo (
// Get NameString
Status = AcpiTableProtocol->GetOption (ChildHandle, 1, &DataType, &Buffer, &DataSize);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "[%a:%d] Get NameString failed: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((EFI_D_ERROR, "[%a:%d] Get NameString failed: %r\n", __func__, __LINE__, Status));
return Status;
}
@@ -361,7 +361,7 @@ GetDeviceInfo (
*FoundDev = DsdtDeviceSas;
} else {
DEBUG ((DEBUG_ERROR, "[%a:%d] The NameString %a is not ETHn or SASn\n",
- __FUNCTION__, __LINE__, Data));
+ __func__, __LINE__, Data));
return EFI_INVALID_PARAMETER;
}
@@ -433,7 +433,7 @@ EFI_STATUS ProcessDSDTDevice (
Status = AcpiTableProtocol->GetOption(ValueHandle, 1, &DataType, &Buffer, &DataSize);
Data = Buffer;
- DBG("[%a:%d] - _HID = %a\n", __FUNCTION__, __LINE__, Data);
+ DBG("[%a:%d] - _HID = %a\n", __func__, __LINE__, Data);
if (EFI_ERROR(Status) ||
DataType != EFI_ACPI_DATA_TYPE_STRING) {
@@ -572,10 +572,10 @@ static EFI_STATUS ProcessDSDT(
EFI_ACPI_HANDLE ChildHandle;
//
// Parse table for device type
- DBG ("[%a:%d] - TableHandle=%p\n", __FUNCTION__, __LINE__, TableHandle);
+ DBG ("[%a:%d] - TableHandle=%p\n", __func__, __LINE__, TableHandle);
for (ChildHandle = NULL; ; ) {
Status = AcpiTableProtocol->GetChild(TableHandle, &ChildHandle);
- DBG ("[%a:%d] - Child=%p, %r\n", __FUNCTION__, __LINE__, ChildHandle, Status);
+ DBG ("[%a:%d] - Child=%p, %r\n", __func__, __LINE__, ChildHandle, Status);
if (EFI_ERROR(Status))
break;
if (ChildHandle == NULL)
diff --git a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
index 5164672a..ac73bf64 100644
--- a/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
+++ b/Silicon/Hisilicon/Drivers/FlashFvbDxe/FlashFvbDxe.c
@@ -513,7 +513,7 @@ FvbRead (
if (!Instance->Initialized && Instance->Initialize)
{
if (EfiAtRuntime ()) {
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL] Initialize at runtime is not supported!\n", __FUNCTION__, __LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL] Initialize at runtime is not supported!\n", __func__, __LINE__));
return EFI_UNSUPPORTED;
}
@@ -531,7 +531,7 @@ FvbRead (
(*NumBytes > BlockSize) ||
((Offset + *NumBytes) > BlockSize))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL] ERROR - EFI_BAD_BUFFER_SIZE: (Offset=0x%x + NumBytes=0x%x) > BlockSize=0x%x\n", __FUNCTION__, __LINE__, Offset, *NumBytes, BlockSize ));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL] ERROR - EFI_BAD_BUFFER_SIZE: (Offset=0x%x + NumBytes=0x%x) > BlockSize=0x%x\n", __func__, __LINE__, Offset, *NumBytes, BlockSize ));
return EFI_BAD_BUFFER_SIZE;
}
@@ -640,7 +640,7 @@ FvbWrite (
if (!Instance->Initialized && Instance->Initialize)
{
if (EfiAtRuntime ()) {
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL] Initialize at runtime is not supported!\n", __FUNCTION__, __LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL] Initialize at runtime is not supported!\n", __func__, __LINE__));
return EFI_UNSUPPORTED;
}
@@ -1080,7 +1080,7 @@ FlashWriteBlocks (
NumBlocks = ((UINT32)BufferSizeInBytes) / Instance->Media.BlockSize ;
if ((Lba + NumBlocks) > (Instance->Media.LastBlock + 1))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL]ERROR - Write will exceed last block.\n", __FUNCTION__, __LINE__ ));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL]ERROR - Write will exceed last block.\n", __func__, __LINE__ ));
return EFI_INVALID_PARAMETER;
}
@@ -1185,7 +1185,7 @@ FlashFvbInitialize (
Status = FlashPlatformGetDevices (&FlashDevices, &FlashDeviceCount);
if (EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Fail to get Flash devices\n", __FUNCTION__, __LINE__));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Fail to get Flash devices\n", __func__, __LINE__));
return Status;
}
@@ -1194,7 +1194,7 @@ FlashFvbInitialize (
Status = gBS->LocateProtocol (&gHisiSpiFlashProtocolGuid, NULL, (VOID*) &mFlash);
if (EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Status=%r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Status=%r\n", __func__, __LINE__, Status));
return Status;
}
@@ -1217,7 +1217,7 @@ FlashFvbInitialize (
);
if (EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Fail to create instance for Flash[%d]\n", __FUNCTION__, __LINE__, Index));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Fail to create instance for Flash[%d]\n", __func__, __LINE__, Index));
}
}
//
diff --git a/Silicon/Hisilicon/Drivers/NorFlashDxe/NorFlashDxe.c b/Silicon/Hisilicon/Drivers/NorFlashDxe/NorFlashDxe.c
index 54d76ebf..303980dd 100644
--- a/Silicon/Hisilicon/Drivers/NorFlashDxe/NorFlashDxe.c
+++ b/Silicon/Hisilicon/Drivers/NorFlashDxe/NorFlashDxe.c
@@ -64,17 +64,17 @@ EFIAPI Read(
if (Offset + ulLen > (gFlashInfo[gIndex.InfIndex].SingleChipSize * gFlashInfo[gIndex.InfIndex].ParallelNum))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Exceed the flash scope!\n", __FUNCTION__,__LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Exceed the flash scope!\n", __func__,__LINE__));
return EFI_INVALID_PARAMETER;
}
if (0 == ulLen)
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Length is Zero!\n", __FUNCTION__,__LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Length is Zero!\n", __func__,__LINE__));
return EFI_INVALID_PARAMETER;
}
if (NULL == Buffer)
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Buffer is NULL!\n", __FUNCTION__,__LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Buffer is NULL!\n", __func__,__LINE__));
return EFI_BAD_BUFFER_SIZE;
}
@@ -151,7 +151,7 @@ static EFI_STATUS WriteAfterErase_Fill(
}
if ((Offset % FlashUnitLength + Length) > FlashUnitLength)
{
- DEBUG ((EFI_D_INFO, "[%a]:[%dL]:Exceed the Flash Size!\n", __FUNCTION__,__LINE__));
+ DEBUG ((EFI_D_INFO, "[%a]:[%dL]:Exceed the Flash Size!\n", __func__,__LINE__));
return EFI_UNSUPPORTED;
}
@@ -159,7 +159,7 @@ static EFI_STATUS WriteAfterErase_Fill(
Status = gBS->AllocatePool(EfiBootServicesData, FlashUnitLength, (VOID *)&NewDataUnit);
if (EFI_ERROR(Status))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Allocate Pool failed, %r!\n", __FUNCTION__,__LINE__, Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Allocate Pool failed, %r!\n", __func__,__LINE__, Status));
return Status;
}
@@ -177,7 +177,7 @@ static EFI_STATUS WriteAfterErase_Fill(
Status = BufferWrite(NewOffset, (void *)NewDataUnit, FlashUnitLength);
if (EFI_ERROR(Status))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:BufferWrite %r!\n", __FUNCTION__,__LINE__, Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:BufferWrite %r!\n", __func__,__LINE__, Status));
return Status;
}
@@ -205,7 +205,7 @@ static EFI_STATUS WriteAfterErase_Final(
if (0 != (Offset % FlashUnitLength))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]: Offset must be a multiple of 0x%x!\n", __FUNCTION__,__LINE__,FlashUnitLength));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]: Offset must be a multiple of 0x%x!\n", __func__,__LINE__,FlashUnitLength));
return EFI_UNSUPPORTED;
}
@@ -216,7 +216,7 @@ static EFI_STATUS WriteAfterErase_Final(
Status = BufferWrite(Offset, (void *)Buffer, FlashUnitLength);
if (EFI_ERROR(Status))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:BufferWrite Failed: %r!\n", __FUNCTION__,__LINE__, Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:BufferWrite Failed: %r!\n", __func__,__LINE__, Status));
return EFI_DEVICE_ERROR;
}
Offset += FlashUnitLength;
@@ -230,7 +230,7 @@ static EFI_STATUS WriteAfterErase_Final(
Status = WriteAfterErase_Fill(Offset, Buffer, Length);
if (EFI_ERROR(Status))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:WriteAfterErase_Fill failed,%r!\n", __FUNCTION__,__LINE__, Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:WriteAfterErase_Fill failed,%r!\n", __func__,__LINE__, Status));
return Status;
}
}
@@ -270,7 +270,7 @@ WriteAfterErase(
Status = WriteAfterErase_Fill(Offset, Buffer, TempLength);
if (EFI_ERROR(Status))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]: %r!\n", __FUNCTION__,__LINE__, Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]: %r!\n", __func__,__LINE__, Status));
return Status;
}
@@ -291,7 +291,7 @@ WriteAfterErase(
Status = WriteAfterErase_Final(Offset, Buffer, Length);
if (EFI_ERROR(Status))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]: %r!\n", __FUNCTION__,__LINE__, Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]: %r!\n", __func__,__LINE__, Status));
return Status;
}
@@ -365,7 +365,7 @@ FlashSectorErase(
Status = WriteAfterErase(TempBase, TempOffset, Buffer, TempLength);
if (EFI_ERROR(Status))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]: %r!\n", __FUNCTION__,__LINE__,Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]: %r!\n", __func__,__LINE__,Status));
goto DO;
}
@@ -394,7 +394,7 @@ EFIAPI Erase(
if (Offset + Length > (gFlashInfo[gIndex.InfIndex].SingleChipSize * gFlashInfo[gIndex.InfIndex].ParallelNum))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Exceed the Flash Size!\n", __FUNCTION__,__LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Exceed the Flash Size!\n", __func__,__LINE__));
return EFI_ABORTED;
}
if (0 == Length)
@@ -427,7 +427,7 @@ EFIAPI Erase(
Status = FlashSectorErase(TempBase, Offset, TempLength);
if (EFI_ERROR(Status))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]: FlashErase One Sector Error, Status = %r!\n", __FUNCTION__,__LINE__,Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]: FlashErase One Sector Error, Status = %r!\n", __func__,__LINE__,Status));
return Status;
}
@@ -462,7 +462,7 @@ EFIAPI Write(
if((Offset + ulLength) > (gFlashInfo[gIndex.InfIndex].SingleChipSize * gFlashInfo[gIndex.InfIndex].ParallelNum))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Exceed the Flash Size!\n", __FUNCTION__,__LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Exceed the Flash Size!\n", __func__,__LINE__));
return EFI_INVALID_PARAMETER;
}
if (0 == ulLength)
@@ -498,7 +498,7 @@ EFIAPI Write(
Status = FlashSectorErase(TempBase, Offset, TempLength);
if (EFI_ERROR(Status))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:FlashErase One Sector Error, Status = %r!\n", __FUNCTION__,__LINE__,Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:FlashErase One Sector Error, Status = %r!\n", __func__,__LINE__,Status));
return Status;
}
@@ -506,7 +506,7 @@ EFIAPI Write(
Status = WriteAfterErase(TempBase, Offset, Buffer, TempLength);
if (EFI_ERROR(Status))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:WriteAfterErase Status = %r!\n", __FUNCTION__,__LINE__,Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:WriteAfterErase Status = %r!\n", __func__,__LINE__,Status));
return Status;
}
}
@@ -581,7 +581,7 @@ EFIAPI InitializeFlash (
&gUniNorFlash);
if(EFI_SUCCESS != Status)
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Install Protocol Interface %r!\n", __FUNCTION__,__LINE__,Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Install Protocol Interface %r!\n", __func__,__LINE__,Status));
}
return Status;
diff --git a/Silicon/Hisilicon/Drivers/NorFlashDxe/NorFlashHw.c b/Silicon/Hisilicon/Drivers/NorFlashDxe/NorFlashHw.c
index 599c9a14..de1e16a0 100644
--- a/Silicon/Hisilicon/Drivers/NorFlashDxe/NorFlashHw.c
+++ b/Silicon/Hisilicon/Drivers/NorFlashDxe/NorFlashHw.c
@@ -39,7 +39,7 @@ UINT32 PortReadData (
return MmioRead16 (FlashAddr);
default:
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:illegal PortWidth!\n", __FUNCTION__,__LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:illegal PortWidth!\n", __func__,__LINE__));
return 0xffffffff;
}
}
@@ -61,7 +61,7 @@ PortWriteData (
MmioWrite16 (FlashAddr, InputData);
break;
default:
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:illegal PortWidth!\n", __FUNCTION__,__LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:illegal PortWidth!\n", __func__,__LINE__));
return EFI_DEVICE_ERROR;
}
return EFI_SUCCESS;
@@ -107,7 +107,7 @@ EFI_STATUS GetCommandIndex(
if(Flag)
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Can not Get Reset Command!\n", __FUNCTION__,__LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Can not Get Reset Command!\n", __func__,__LINE__));
return EFI_DEVICE_ERROR;
}
@@ -124,7 +124,7 @@ EFI_STATUS GetCommandIndex(
if(Flag)
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Can not Get ID Command!\n", __FUNCTION__,__LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Can not Get ID Command!\n", __func__,__LINE__));
return EFI_DEVICE_ERROR;
}
@@ -141,7 +141,7 @@ EFI_STATUS GetCommandIndex(
if(Flag)
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Can not Get Write Command!\n", __FUNCTION__,__LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Can not Get Write Command!\n", __func__,__LINE__));
return EFI_DEVICE_ERROR;
}
@@ -158,7 +158,7 @@ EFI_STATUS GetCommandIndex(
if(Flag)
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Can not Get Erase Command!\n", __FUNCTION__,__LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Can not Get Erase Command!\n", __func__,__LINE__));
return EFI_DEVICE_ERROR;
}
@@ -214,7 +214,7 @@ EFI_STATUS FlashInit(UINT32 Base)
Status = GetCommandIndex(i);
if (EFI_ERROR(Status))
{
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Get Command Index %r!\n", __FUNCTION__,__LINE__, Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL]:Get Command Index %r!\n", __func__,__LINE__, Status));
return Status;
}
@@ -310,7 +310,7 @@ EFI_STATUS BufferWriteCommand(UINTN Base, UINTN Offset, void *pData)
if(gFlashBusy)
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL]:Flash is busy!\n", __FUNCTION__,__LINE__));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL]:Flash is busy!\n", __func__,__LINE__));
return EFI_NOT_READY;
}
gFlashBusy = TRUE;
@@ -392,7 +392,7 @@ EFI_STATUS SectorEraseCommand(UINTN Base, UINTN Offset)
if(gFlashBusy)
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL]:Flash is busy!\n", __FUNCTION__,__LINE__));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL]:Flash is busy!\n", __func__,__LINE__));
return EFI_NOT_READY;
}
@@ -434,7 +434,7 @@ EFI_STATUS CompleteCheck(UINT32 Base, UINT32 Offset, void *pData, UINT32 Length)
if(gFlashBusy)
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL]:Flash is busy!\n", __FUNCTION__,__LINE__));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL]:Flash is busy!\n", __func__,__LINE__));
return EFI_NOT_READY;
}
gFlashBusy = TRUE;
diff --git a/Silicon/Hisilicon/Drivers/SasPlatform/SasPlatform.c b/Silicon/Hisilicon/Drivers/SasPlatform/SasPlatform.c
index 85c35790..2220dc5e 100644
--- a/Silicon/Hisilicon/Drivers/SasPlatform/SasPlatform.c
+++ b/Silicon/Hisilicon/Drivers/SasPlatform/SasPlatform.c
@@ -87,7 +87,7 @@ SasPlatformInitialize (
FreePool (PrivateData);
DEBUG ((DEBUG_ERROR,
"[%a]:[%dL] InstallProtocolInterface fail. %r\n",
- __FUNCTION__,
+ __func__,
__LINE__,
Status));
continue;
diff --git a/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c b/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c
index 5927f66d..24cdf84e 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c
+++ b/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c
@@ -52,7 +52,7 @@ UpdateSmbiosType9Info (
(VOID **)&PciIo
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Status : %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Status : %r\n", __func__, __LINE__, Status));
continue;
}
(VOID)PciIo->GetLocation (PciIo, &SegmentNumber, &BusNumber, &DeviceNumber, &FunctionNumber);
@@ -94,7 +94,7 @@ EmptySmbiosType9 (
Status = Smbios->Remove (Smbios, SmbiosHandle);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Remove System Slot Failed. Status : %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
break;
}
}
@@ -204,7 +204,7 @@ AddSmbiosType9Entry (
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] LocateProtocol Failed. Status : %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
return Status;
}
diff --git a/Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.c b/Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.c
index 9c66eed3..05543048 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.c
+++ b/Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.c
@@ -330,7 +330,7 @@ SmbiosAddType16Table (
Status = mSmbios->Add (mSmbios, NULL, MemArraySmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *)Type16Record);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type16 Table Log Failed! %r \n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type16 Table Log Failed! %r \n", __func__, __LINE__, Status));
}
FreePool(Type16Record);
@@ -381,7 +381,7 @@ SmbiosAddType19Table (
Status = mSmbios->Add (mSmbios, NULL, &MemArrayMappedAddrSmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *)Type19Record);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type19 Table Log Failed! %r \n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type19 Table Log Failed! %r \n", __func__, __LINE__, Status));
}
FreePool(Type19Record);
@@ -642,7 +642,7 @@ SmbiosAddType17Table (
Status = mSmbios->Add (mSmbios, NULL, &MemDevSmbiosHandle, (EFI_SMBIOS_TABLE_HEADER*) Type17Record);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type17 Table Log Failed! %r \n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type17 Table Log Failed! %r \n", __func__, __LINE__, Status));
}
FreePool (Type17Record);
diff --git a/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c b/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
index 275b4f0e..7c2ed226 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
+++ b/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
@@ -628,7 +628,7 @@ AddSmbiosProcessorTypeTable (
Status = mSmbios->Add (mSmbios, NULL, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *)Type4Record);
if (EFI_ERROR (Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type04 Table Log Failed! %r \n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type04 Table Log Failed! %r \n", __func__, __LINE__, Status));
}
FreePool (Type4Record);
diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
index 9bdc13c9..54ea2d98 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
+++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
@@ -66,7 +66,7 @@ GetBiosReleaseDate (
Hob = GetFirstGuidHob (&gVersionInfoHobGuid);
if (Hob == NULL) {
- DEBUG ((EFI_D_ERROR, "[%a:%d] Version info HOB not found!\n", __FUNCTION__, __LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a:%d] Version info HOB not found!\n", __func__, __LINE__));
return NULL;
}
@@ -91,7 +91,7 @@ GetBiosVersion (
Hob = GetFirstGuidHob (&gVersionInfoHobGuid);
if (Hob == NULL) {
- DEBUG ((EFI_D_ERROR, "[%a:%d] Version info HOB not found!\n", __FUNCTION__, __LINE__));
+ DEBUG ((EFI_D_ERROR, "[%a:%d] Version info HOB not found!\n", __func__, __LINE__));
return NULL;
}
Version = GET_GUID_HOB_DATA (Hob);
@@ -225,7 +225,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor)
Status = LogSmbiosData( (UINT8*)SmbiosRecord, &SmbiosHandle);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type00 Table Log Failed! %r \n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type00 Table Log Failed! %r \n", __func__, __LINE__, Status));
}
FreePool(SmbiosRecord);
diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c
index 32bdcf1b..ace5b19c 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c
+++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c
@@ -154,7 +154,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemManufacturer)
Status = LogSmbiosData( (UINT8*)SmbiosRecord, &SmbiosHandle);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type01 Table Log Failed! %r \n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type01 Table Log Failed! %r \n", __func__, __LINE__, Status));
}
FreePool(SmbiosRecord);
diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
index 278f97dd..dfcaaf31 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
+++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
@@ -158,7 +158,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer)
Status = LogSmbiosData( (UINT8*)SmbiosRecord, &SmbiosHandle);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type02 Table Log Failed! %r \n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type02 Table Log Failed! %r \n", __func__, __LINE__, Status));
}
FreePool(SmbiosRecord);
diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c
index 27ad983a..fc214124 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c
+++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c
@@ -163,7 +163,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscChassisManufacturer)
Status = LogSmbiosData( (UINT8*)SmbiosRecord, &SmbiosHandle);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type03 Table Log Failed! %r \n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type03 Table Log Failed! %r \n", __func__, __LINE__, Status));
}
FreePool(SmbiosRecord);
diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSystemSlotDesignationFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSystemSlotDesignationFunction.c
index 3ca0c18a..124df409 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSystemSlotDesignationFunction.c
+++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSystemSlotDesignationFunction.c
@@ -73,7 +73,7 @@ UpdateSlotUsage(
Status = OemGetSerdesParam (&SerdesParamA, &SerdesParamB, 0);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] OemGetSerdesParam failed %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] OemGetSerdesParam failed %r\n", __func__, __LINE__, Status));
return;
}
@@ -181,7 +181,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemSlotDesignation)
Status = LogSmbiosData( (UINT8*)SmbiosRecord, &SmbiosHandle);
if(EFI_ERROR(Status))
{
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type09 Table Log Failed! %r \n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type09 Table Log Failed! %r \n", __func__, __LINE__, Status));
}
FreePool(SmbiosRecord);
diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesFunction.c
index 2acbdea7..0856e24f 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesFunction.c
+++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesFunction.c
@@ -149,7 +149,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscNumberOfInstallableLanguages)
//
Status = LogSmbiosData((UINT8*)SmbiosRecord, &SmbiosHandle);
if(EFI_ERROR(Status)) {
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type13 Table Log Failed! %r \n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type13 Table Log Failed! %r \n", __func__, __LINE__, Status));
}
FreePool(SmbiosRecord);
diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c
index 22de8b57..4bc2a620 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c
+++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c
@@ -60,7 +60,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBootInformation)
//
Status = LogSmbiosData( (UINT8*)SmbiosRecord, &SmbiosHandle);
if(EFI_ERROR(Status)) {
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type32 Table Log Failed! %r \n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type32 Table Log Failed! %r \n", __func__, __LINE__, Status));
}
FreePool(SmbiosRecord);
diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type38/MiscIpmiDeviceInformationFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type38/MiscIpmiDeviceInformationFunction.c
index 6e8efc02..fa2f224f 100644
--- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type38/MiscIpmiDeviceInformationFunction.c
+++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type38/MiscIpmiDeviceInformationFunction.c
@@ -73,7 +73,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscIpmiDeviceInformation)
//
Status = LogSmbiosData((UINT8*)SmbiosRecord, &SmbiosHandle);
if(EFI_ERROR(Status)) {
- DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type38 Table Log Failed! %r \n", __FUNCTION__, __LINE__, Status));
+ DEBUG((EFI_D_ERROR, "[%a]:[%dL] Smbios Type38 Table Log Failed! %r \n", __func__, __LINE__, Status));
}
FreePool(SmbiosRecord);
diff --git a/Silicon/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.c b/Silicon/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.c
index 4473a325..47d08b08 100644
--- a/Silicon/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.c
+++ b/Silicon/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.c
@@ -117,7 +117,7 @@ EFIAPI UpdateFdt (
Status = EFIFdtUpdate(NewFdtBlobBase);
if (EFI_ERROR (Status))
{
- DEBUG((EFI_D_ERROR, "%a(%d):EFIFdtUpdate Fail!\n", __FUNCTION__,__LINE__));
+ DEBUG((EFI_D_ERROR, "%a(%d):EFIFdtUpdate Fail!\n", __func__,__LINE__));
goto EXIT;
}
diff --git a/Silicon/Hisilicon/Hi1610/Drivers/IoInitDxe/IoInitDxe.c b/Silicon/Hisilicon/Hi1610/Drivers/IoInitDxe/IoInitDxe.c
index f9940869..517764d6 100644
--- a/Silicon/Hisilicon/Hi1610/Drivers/IoInitDxe/IoInitDxe.c
+++ b/Silicon/Hisilicon/Hi1610/Drivers/IoInitDxe/IoInitDxe.c
@@ -48,7 +48,7 @@ IoInitDxeEntry (
if (EFI_ERROR(Status))
{
- DEBUG ((EFI_D_ERROR, "[%a:%d] - CreateEvent failed: %r\n", __FUNCTION__,
+ DEBUG ((EFI_D_ERROR, "[%a:%d] - CreateEvent failed: %r\n", __func__,
__LINE__, Status));
}
diff --git a/Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.c b/Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.c
index 350f9611..ca305b1c 100644
--- a/Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.c
+++ b/Silicon/Hisilicon/Hi1610/Library/Hi161xPciPlatformLib/Hi161xPciPlatformLib.c
@@ -55,7 +55,7 @@ GetAppetureByRootBridgeIo (
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a:%d] RootBridgeIo->Configuration failed %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
return NULL;
};
@@ -67,7 +67,7 @@ GetAppetureByRootBridgeIo (
}
if (Configuration->Desc != ACPI_ADDRESS_SPACE_DESCRIPTOR) {
- DEBUG ((DEBUG_ERROR, "[%a:%d] Can't find bus descriptor\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "[%a:%d] Can't find bus descriptor\n", __func__, __LINE__));
return NULL;
}
@@ -81,7 +81,7 @@ GetAppetureByRootBridgeIo (
}
}
- DEBUG ((DEBUG_ERROR, "[%a:%d] Can't find PCI appeture\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "[%a:%d] Can't find PCI appeture\n", __func__, __LINE__));
return NULL;
}
@@ -109,7 +109,7 @@ SetAtuConfig0RW (
{
UINTN i;
for (i=0; i<0x20; i+=4) {
- DEBUG ((DEBUG_ERROR, "[%a:%d] - Base=%p value=%x\n", __FUNCTION__, __LINE__, RbPciBase + 0x900 + i, MmioRead32(RbPciBase + 0x900 + i)));
+ DEBUG ((DEBUG_ERROR, "[%a:%d] - Base=%p value=%x\n", __func__, __LINE__, RbPciBase + 0x900 + i, MmioRead32(RbPciBase + 0x900 + i)));
}
}
}
@@ -138,7 +138,7 @@ SetAtuConfig1RW (
{
UINTN i;
for (i=0; i<0x20; i+=4) {
- DEBUG ((DEBUG_ERROR, "[%a:%d] - Base=%p value=%x\n", __FUNCTION__, __LINE__, RbPciBase + 0x900 + i, MmioRead32(RbPciBase + 0x900 + i)));
+ DEBUG ((DEBUG_ERROR, "[%a:%d] - Base=%p value=%x\n", __func__, __LINE__, RbPciBase + 0x900 + i, MmioRead32(RbPciBase + 0x900 + i)));
}
}
}
@@ -162,7 +162,7 @@ SetAtuIoRW (UINT64 RbPciBase,UINT64 IoBase,UINT64 CpuIoRegionLimit, UINT64 CpuIo
{
UINTN i;
for (i=0; i<0x20; i+=4) {
- DEBUG ((DEBUG_ERROR, "[%a:%d] - Base=%p value=%x\n", __FUNCTION__, __LINE__, RbPciBase + 0x900 + i, MmioRead32(RbPciBase + 0x900 + i)));
+ DEBUG ((DEBUG_ERROR, "[%a:%d] - Base=%p value=%x\n", __func__, __LINE__, RbPciBase + 0x900 + i, MmioRead32(RbPciBase + 0x900 + i)));
}
}
}
@@ -186,7 +186,7 @@ SetAtuMemRW(UINT64 RbPciBase,UINT64 MemBase,UINT64 CpuMemRegionLimit, UINT64 Cpu
{
UINTN i;
for (i=0; i<0x20; i+=4) {
- DEBUG ((DEBUG_ERROR, "[%a:%d] - Base=%p value=%x\n", __FUNCTION__, __LINE__, RbPciBase + 0x900 + i, MmioRead32(RbPciBase + 0x900 + i)));
+ DEBUG ((DEBUG_ERROR, "[%a:%d] - Base=%p value=%x\n", __func__, __LINE__, RbPciBase + 0x900 + i, MmioRead32(RbPciBase + 0x900 + i)));
}
}
}
@@ -296,7 +296,7 @@ EnlargeAtuConfig0 (
(VOID **)&ResAlloc
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "[%a:%d] - HandleProtocol failed %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_ERROR, "[%a:%d] - HandleProtocol failed %r\n", __func__,
__LINE__, Status));
return;
}
@@ -315,7 +315,7 @@ EnlargeAtuConfig0 (
(VOID **)&RootBridgeIo
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "[%a:%d] - HandleProtocol failed %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_ERROR, "[%a:%d] - HandleProtocol failed %r\n", __func__, __LINE__, Status));
// This should never happen so that it is a fatal error and we don't try
// to continue
break;
@@ -323,7 +323,7 @@ EnlargeAtuConfig0 (
Appeture = GetAppetureByRootBridgeIo (RootBridgeIo);
if (Appeture == NULL) {
- DEBUG ((DEBUG_ERROR, "[%a:%d] Get appeture failed\n", __FUNCTION__,
+ DEBUG ((DEBUG_ERROR, "[%a:%d] Get appeture failed\n", __func__,
__LINE__));
continue;
}
diff --git a/Silicon/Hisilicon/Hi1620/Drivers/Apei/Apei.c b/Silicon/Hisilicon/Hi1620/Drivers/Apei/Apei.c
index 33444660..69ba0c43 100644
--- a/Silicon/Hisilicon/Hi1620/Drivers/Apei/Apei.c
+++ b/Silicon/Hisilicon/Hi1620/Drivers/Apei/Apei.c
@@ -48,7 +48,7 @@ ApeiEntryPoint (
if (EFI_ERROR (Status)) {
SetupData.EnRasSupport = 1;
DEBUG ((DEBUG_ERROR, "[%a]GetVariable %r.Get default variable value\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
if (!SetupData.EnRasSupport) {
return EFI_ABORTED;
@@ -89,7 +89,7 @@ ApeiEntryPoint (
Status |= OemInitErstTable ();
Status |= OemInitEinjTable ();
// smc call
- DEBUG ((DEBUG_INFO, "[%a]:[%dL]: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_INFO, "[%a]:[%dL]: %r\n", __func__, __LINE__, Status));
if (Status == EFI_SUCCESS) {
SmcRegs.Arg0 = PRIVATE_ARM_SMC_ID_APEI;
SmcRegs.Arg1 = (UINTN)mApeiTrustedfirmwareData;
diff --git a/Silicon/Hisilicon/Hi1620/Drivers/Apei/ErrorSource/Ghes.c b/Silicon/Hisilicon/Hi1620/Drivers/Apei/ErrorSource/Ghes.c
index 5a2d6f03..1b079c2a 100644
--- a/Silicon/Hisilicon/Hi1620/Drivers/Apei/ErrorSource/Ghes.c
+++ b/Silicon/Hisilicon/Hi1620/Drivers/Apei/ErrorSource/Ghes.c
@@ -63,7 +63,7 @@ ErrorBlockAddErrorData (
)
{
if (ErrorBlock == NULL || GenericErrorData == NULL) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL]Invalid Param \n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "[%a]:[%dL]Invalid Param \n", __func__, __LINE__));
return FALSE;
}
EFI_ACPI_6_1_GENERIC_ERROR_DATA_ENTRY_STRUCTURE* Entry;
@@ -75,7 +75,7 @@ ErrorBlockAddErrorData (
SizeOfGenericErrorData;
if (sizeof (EFI_ACPI_6_1_GENERIC_ERROR_STATUS_STRUCTURE) + ExpectedNewDataLength >
MaxBlockLength) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL]Out of BlockSize \n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "[%a]:[%dL]Out of BlockSize \n", __func__, __LINE__));
return FALSE;
}
// guid
diff --git a/Silicon/Hisilicon/Hi1620/Drivers/Apei/Hest/Hest.c b/Silicon/Hisilicon/Hi1620/Drivers/Apei/Hest/Hest.c
index 923d8bf0..08213ace 100644
--- a/Silicon/Hisilicon/Hi1620/Drivers/Apei/Hest/Hest.c
+++ b/Silicon/Hisilicon/Hi1620/Drivers/Apei/Hest/Hest.c
@@ -31,7 +31,7 @@ EFI_STATUS HestAddErrorSourceDescriptor (
}
HestHeader = Context->HestHeader;
if (HestHeader->Header.Length + SizeOfDescriptor > Context->OccupiedMemorySize) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL]: Hest Size Too small\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "[%a]:[%dL]: Hest Size Too small\n", __func__, __LINE__));
return EFI_BUFFER_TOO_SMALL;
}
Descriptor = (UINT8*)HestHeader + HestHeader->Header.Length;
@@ -58,7 +58,7 @@ HestSetAcpiTable (
UINTN TableKey;
UINT32 Index;
if (Context == NULL) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL]: ERROR\n", __FUNCTION__, __LINE__));
+ DEBUG ((DEBUG_ERROR, "[%a]:[%dL]: ERROR\n", __func__, __LINE__));
return;
}
@@ -83,7 +83,7 @@ HestSetAcpiTable (
mApeiTrustedfirmwareData->HestTableAddress = (EFI_PHYSICAL_ADDRESS)Table;
DEBUG ((DEBUG_INFO, "Acpi HestSetAcpiTable Table = 0x%x.\n", (EFI_PHYSICAL_ADDRESS)Table));
}
- DEBUG ((DEBUG_INFO, "[%a]:[%dL]:OUT %llx, IN %llx \n", __FUNCTION__, __LINE__,
+ DEBUG ((DEBUG_INFO, "[%a]:[%dL]:OUT %llx, IN %llx \n", __func__, __LINE__,
AcpiTableHandle, Context->HestHeader));
return;
}
diff --git a/Silicon/Hisilicon/Hi1620/Drivers/Apei/OemApeiHi1620.c b/Silicon/Hisilicon/Hi1620/Drivers/Apei/OemApeiHi1620.c
index 8bdacbae..1316794f 100644
--- a/Silicon/Hisilicon/Hi1620/Drivers/Apei/OemApeiHi1620.c
+++ b/Silicon/Hisilicon/Hi1620/Drivers/Apei/OemApeiHi1620.c
@@ -228,7 +228,7 @@ OemInitBertTable (
}
ErrorBlockInitial (Context.Block, EFI_ACPI_6_2_ERROR_SEVERITY_NONE);
BertSetAcpiTable (&Context);
- DEBUG ((DEBUG_INFO, "[%a]:[%dL]: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_INFO, "[%a]:[%dL]: %r\n", __func__, __LINE__, Status));
return EFI_SUCCESS;
}
/************************************************
@@ -261,7 +261,7 @@ OemInitEinjTable (
(VOID)EinjConfigErrorInjectCapability (&Context, 0xFFF);// TBD
(VOID)OemEinjConfigExecuteOperationEntry (&Context);
EinjSetAcpiTable (&Context);
- DEBUG ((DEBUG_INFO, "[%a]:[%dL]: %d\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((DEBUG_INFO, "[%a]:[%dL]: %d\n", __func__, __LINE__, Status));
return EFI_SUCCESS;
}
/************************************************
diff --git a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c
index e9bdcf2f..4efebc17 100644
--- a/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c
+++ b/Silicon/Hisilicon/Hi1620/Hi1620OemConfigUiLib/OemConfig.c
@@ -205,7 +205,7 @@ OemConfigUiLibConstructor (
NULL
);
if (mOemConfigPrivate.HiiHandle == NULL) {
- DEBUG ((DEBUG_ERROR, "%a Fail to Add Oem Hii Package.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a Fail to Add Oem Hii Package.\n", __func__));
return EFI_INVALID_PARAMETER;
}
//
diff --git a/Silicon/Hisilicon/Hi1620/Pptt/Pptt.c b/Silicon/Hisilicon/Hi1620/Pptt/Pptt.c
index a3d40839..6cf844f7 100644
--- a/Silicon/Hisilicon/Hi1620/Pptt/Pptt.c
+++ b/Silicon/Hisilicon/Hi1620/Pptt/Pptt.c
@@ -366,7 +366,7 @@ GetApic (
// Avoid dead loop due to corrupted MADT
if (Ptr->Length == 0) {
DEBUG ((DEBUG_ERROR, "[%a:%d] - Invalid MADT sub structure at 0x%x\n",
- __FUNCTION__, __LINE__, (UINTN) Ptr - (UINTN) ApicTable));
+ __func__, __LINE__, (UINTN) Ptr - (UINTN) ApicTable));
break;
}
diff --git a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLibMem.c b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLibMem.c
index 9c11784a..202d09c4 100644
--- a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLibMem.c
+++ b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLibMem.c
@@ -81,7 +81,7 @@ ArmPlatformGetVirtualMemoryMap (
VirtualMemoryTable[Index].Attributes = (ARM_MEMORY_REGION_ATTRIBUTES)0;
ASSERT((Index + 1) <= MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS);
- DEBUG((EFI_D_INFO, "[%a]:[%dL] discriptor count=%d\n", __FUNCTION__, __LINE__, Index+1));
+ DEBUG((EFI_D_INFO, "[%a]:[%dL] discriptor count=%d\n", __func__, __LINE__, Index+1));
*VirtualMemoryMap = VirtualMemoryTable;
}
diff --git a/Silicon/Hisilicon/Library/CpldIoLib/CpldIoLibRuntime.c b/Silicon/Hisilicon/Library/CpldIoLib/CpldIoLibRuntime.c
index 5f20debd..0c6e4d10 100644
--- a/Silicon/Hisilicon/Library/CpldIoLib/CpldIoLibRuntime.c
+++ b/Silicon/Hisilicon/Library/CpldIoLib/CpldIoLibRuntime.c
@@ -45,13 +45,13 @@ CpldRuntimeLibConstructor (
mCpldRegAddr = PcdGet64(PcdCpldBaseAddress);
Status = gDS->GetMemorySpaceDescriptor(mCpldRegAddr,&desp);
if(EFI_ERROR(Status)){
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL] GetMemorySpaceDescriptor failed: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL] GetMemorySpaceDescriptor failed: %r\n", __func__, __LINE__, Status));
return Status;
}
desp.Attributes |= EFI_MEMORY_RUNTIME;
Status = gDS->SetMemorySpaceAttributes(mCpldRegAddr,0x10000, desp.Attributes);
if(EFI_ERROR(Status)){
- DEBUG ((EFI_D_ERROR, "[%a]:[%dL] SetMemorySpaceAttributes failed: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((EFI_D_ERROR, "[%a]:[%dL] SetMemorySpaceAttributes failed: %r\n", __func__, __LINE__, Status));
return Status;
}
//
diff --git a/Silicon/Hisilicon/Library/I2CLib/I2CLibRuntime.c b/Silicon/Hisilicon/Library/I2CLib/I2CLibRuntime.c
index 237fe5e0..eb10e013 100644
--- a/Silicon/Hisilicon/Library/I2CLib/I2CLibRuntime.c
+++ b/Silicon/Hisilicon/Library/I2CLib/I2CLibRuntime.c
@@ -69,12 +69,12 @@ I2cLibRuntimeSetup (UINT32 Socket, UINT8 Port)
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME
);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_WARN, "[%a:%d] AddMemorySpace failed: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((EFI_D_WARN, "[%a:%d] AddMemorySpace failed: %r\n", __func__, __LINE__, Status));
}
Status = gDS->SetMemorySpaceAttributes (Base, SIZE_64KB, EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "[%a:%d] SetMemorySpaceAttributes failed: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((EFI_D_ERROR, "[%a:%d] SetMemorySpaceAttributes failed: %r\n", __func__, __LINE__, Status));
return Status;
}
@@ -92,7 +92,7 @@ I2cLibRuntimeSetup (UINT32 Socket, UINT8 Port)
&mI2cLibVirtualAddrChangeEvent
);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "[%a:%d] Create event failed: %r\n", __FUNCTION__, __LINE__, Status));
+ DEBUG ((EFI_D_ERROR, "[%a:%d] Create event failed: %r\n", __func__, __LINE__, Status));
return Status;
}
}
diff --git a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c
index 3a2cd451..1971c33e 100644
--- a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c
+++ b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c
@@ -108,25 +108,25 @@ InitializeM41T83 (
Status = RtcRead (M41T83_REGADDR_SECONDS, 1, &Second.Uint8);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Status : %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
}
Second.Bits.ST= 1;
Status = RtcWrite (M41T83_REGADDR_SECONDS, 1, &Second.Uint8);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Status : %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
goto Exit;
}
Status = RtcRead (M41T83_REGADDR_SECONDS, 1, &Second.Uint8);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Status : %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
}
Second.Bits.ST= 0;
Status = RtcWrite (M41T83_REGADDR_SECONDS, 1, &Second.Uint8);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Status : %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
goto Exit;
}
@@ -134,13 +134,13 @@ InitializeM41T83 (
Status = RtcRead (M41T83_REGADDR_ALARM1HOUR, 1, &Alarm1Hour.Uint8);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Status : %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
}
Alarm1Hour.Bits.HT = 0;
Status = RtcWrite (M41T83_REGADDR_ALARM1HOUR, 1, &Alarm1Hour.Uint8);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Status : %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
goto Exit;
}
@@ -181,7 +181,7 @@ LibSetTime (
if (!IsTimeValid (Time)) {
if (!EfiAtRuntime ()) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Status : %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
DEBUG ((DEBUG_ERROR, "Now RTC Time is : %04d-%02d-%02d %02d:%02d:%02d\n",
Time->Year, Time->Month, Time->Day, Time->Hour, Time->Minute, Time->Second
));
@@ -252,7 +252,7 @@ Exit:
if (!EfiAtRuntime ()) {
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Status : %r\n",
- __FUNCTION__, LineNum, Status));
+ __func__, LineNum, Status));
}
EfiReleaseLock (&mRtcLock);
}
@@ -342,10 +342,10 @@ Exit:
if (!EfiAtRuntime ()) {
if (EFI_ERROR (Status)) {
if (IsTimeInvalid == TRUE) {
- DEBUG((DEBUG_ERROR, "%a(%d) Time invalid.\r\n",__FUNCTION__, LineNum));
+ DEBUG((DEBUG_ERROR, "%a(%d) Time invalid.\r\n",__func__, LineNum));
} else {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Status : %r\n",
- __FUNCTION__, LineNum, Status));
+ __func__, LineNum, Status));
}
}
EfiReleaseLock (&mRtcLock);
@@ -429,7 +429,7 @@ LibRtcInitialize (
Status = InitializeM41T83 ();
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Status : %r\nRTC M41T83 Init Failed !!!\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
/*
* Returning ERROR on failure of RTC initilization will cause the system to hang up.
* So we add some debug message to indecate the RTC initilization failed,
@@ -450,7 +450,7 @@ LibRtcInitialize (
Status = LibSetTime (&EfiTime);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] RTC settime Status : %r\n",
- __FUNCTION__, __LINE__, Status));
+ __func__, __LINE__, Status));
}
}
diff --git a/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c b/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c
index f2e8bbdf..acca2582 100644
--- a/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c
+++ b/Silicon/Hisilicon/Library/PlatformBootManagerLib/PlatformBm.c
@@ -193,7 +193,7 @@ FilterAndProcess (
//
// This is not an error, just an informative condition.
//
- DEBUG ((DEBUG_VERBOSE, "%a: %g: %r\n", __FUNCTION__, ProtocolGuid,
+ DEBUG ((DEBUG_VERBOSE, "%a: %g: %r\n", __func__, ProtocolGuid,
Status));
return;
}
@@ -254,7 +254,7 @@ IsPciDisplay (
Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint32, 0 /* Offset */,
sizeof Pci / sizeof (UINT32), &Pci);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __FUNCTION__, ReportText, Status));
+ DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __func__, ReportText, Status));
return FALSE;
}
@@ -283,7 +283,7 @@ Connect (
FALSE // Recursive
);
DEBUG ((EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: %s: %r\n",
- __FUNCTION__, ReportText, Status));
+ __func__, ReportText, Status));
}
@@ -305,25 +305,25 @@ AddOutput (
DevicePath = DevicePathFromHandle (Handle);
if (DevicePath == NULL) {
DEBUG ((DEBUG_ERROR, "%a: %s: handle %p: device path not found\n",
- __FUNCTION__, ReportText, Handle));
+ __func__, ReportText, Handle));
return;
}
Status = EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: %s: adding to ConOut: %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_ERROR, "%a: %s: adding to ConOut: %r\n", __func__,
ReportText, Status));
return;
}
Status = EfiBootManagerUpdateConsoleVariable (ErrOut, DevicePath, NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: %s: adding to ErrOut: %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_ERROR, "%a: %s: adding to ErrOut: %r\n", __func__,
ReportText, Status));
return;
}
- DEBUG ((DEBUG_VERBOSE, "%a: %s: added to ConOut and ErrOut\n", __FUNCTION__,
+ DEBUG ((DEBUG_VERBOSE, "%a: %s: added to ConOut and ErrOut\n", __func__,
ReportText));
}
@@ -657,7 +657,7 @@ PlatformBootManagerAfterConsole (
if (SetupData.BmcWdtEnable) {
Status = IpmiCmdStopWatchdogTimer (EfiBiosPost);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a:%r\n", __func__, Status));
}
}
}
diff --git a/Silicon/Hisilicon/Library/RtcHelperLib/RtcHelperLib.c b/Silicon/Hisilicon/Library/RtcHelperLib/RtcHelperLib.c
index 811885f5..bfcbfb2b 100644
--- a/Silicon/Hisilicon/Library/RtcHelperLib/RtcHelperLib.c
+++ b/Silicon/Hisilicon/Library/RtcHelperLib/RtcHelperLib.c
@@ -34,7 +34,7 @@ SwitchRtcI2cChannelAndLock (
if (Count == 99) {
if (!EfiAtRuntime ()) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Clear cpu_i2c_rtc_state 100 times fail!\n",
- __FUNCTION__, __LINE__));
+ __func__, __LINE__));
}
return EFI_DEVICE_ERROR;
}
@@ -55,7 +55,7 @@ SwitchRtcI2cChannelAndLock (
if (Count == 99) {
if (!EfiAtRuntime ()) {
DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Clear cpu_i2c_rtc_state fail !!! \n",
- __FUNCTION__, __LINE__));
+ __func__, __LINE__));
}
return EFI_DEVICE_ERROR;
}
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceMm.c b/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceMm.c
index 5d759148..cdc4d13c 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceMm.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceMm.c
@@ -121,7 +121,7 @@ FvbInitialize (
Status = GetVariableFlashNvStorageInfo (&BaseAddress, &NvStorageFvSize);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
- DEBUG ((DEBUG_ERROR, "[%a] - An error ocurred getting variable info - %r.\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "[%a] - An error ocurred getting variable info - %r.\n", __func__, Status));
return;
}
@@ -129,7 +129,7 @@ FvbInitialize (
Status = SafeUint64ToUint32 (BaseAddress, &mPlatformFvBaseAddress[0].FvBase);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
- DEBUG ((DEBUG_ERROR, "[%a] - 64-bit variable storage base address not supported.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "[%a] - 64-bit variable storage base address not supported.\n", __func__));
return;
}
NvStorageBaseAddress = mPlatformFvBaseAddress[0].FvBase;
@@ -137,7 +137,7 @@ FvbInitialize (
Status = SafeUint64ToUint32 (NvStorageFvSize, &mPlatformFvBaseAddress[0].FvSize);
if (EFI_ERROR (Status)) {
ASSERT_EFI_ERROR (Status);
- DEBUG ((DEBUG_ERROR, "[%a] - 64-bit variable storage size not supported.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "[%a] - 64-bit variable storage size not supported.\n", __func__));
return;
}
NvStorageFvSize = mPlatformFvBaseAddress[0].FvSize;
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c
index 7f4a3f8f..6001fe0f 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c
@@ -160,7 +160,7 @@ ShadowMicrocodePatchWorker (
DEBUG ((
DEBUG_INFO,
"%a: Required microcode patches have been loaded at 0x%lx, with size 0x%lx.\n",
- __FUNCTION__, *Buffer, *BufferSize
+ __func__, *Buffer, *BufferSize
));
return;
@@ -354,7 +354,7 @@ ShadowMicrocode (
DEBUG ((
DEBUG_INFO,
"%a: 0x%x microcode patches will be loaded into memory, with size 0x%x.\n",
- __FUNCTION__, PatchCount, TotalLoadSize
+ __func__, PatchCount, TotalLoadSize
));
ShadowMicrocodePatchWorker (PatchInfoBuffer, PatchCount, TotalLoadSize, BufferSize, Buffer);
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Cpu/Library/PeiCpuPolicyLibPreMem/PeiCpuPolicyLib.c b/Silicon/Intel/KabylakeSiliconPkg/Cpu/Library/PeiCpuPolicyLibPreMem/PeiCpuPolicyLib.c
index 9a334d8e..f710a610 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Cpu/Library/PeiCpuPolicyLibPreMem/PeiCpuPolicyLib.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Cpu/Library/PeiCpuPolicyLibPreMem/PeiCpuPolicyLib.c
@@ -62,7 +62,7 @@ LoadCpuConfigLibPreMemConfigDefault (
DEBUG ((
DEBUG_ERROR,
"Error: [%a]:[%dL] MCHBAR configured to >4GB\n",
- __FUNCTION__,
+ __func__,
__LINE__
));
}
diff --git a/Silicon/Intel/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/memory_options.h b/Silicon/Intel/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/memory_options.h
index b96d0690..6bcc9d29 100644
--- a/Silicon/Intel/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/memory_options.h
+++ b/Silicon/Intel/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/memory_options.h
@@ -68,9 +68,9 @@ uint8_t mgetch(void);
#define D_TRN 0x0020
#define D_TIME 0x0040
-#define ENTERFN() DPF(D_FCALL, "<%s>\n", __FUNCTION__)
-#define LEAVEFN() DPF(D_FCALL, "</%s>\n", __FUNCTION__)
-#define REPORTFN() DPF(D_FCALL, "<%s/>\n", __FUNCTION__)
+#define ENTERFN() DPF(D_FCALL, "<%s>\n", __func__)
+#define LEAVEFN() DPF(D_FCALL, "</%s>\n", __func__)
+#define REPORTFN() DPF(D_FCALL, "<%s/>\n", __func__)
extern uint32_t DpfPrintMask;
diff --git a/Silicon/Intel/SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c b/Silicon/Intel/SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c
index cc2d00b7..0db663d0 100644
--- a/Silicon/Intel/SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c
+++ b/Silicon/Intel/SimicsIch10Pkg/SmmControl/RuntimeDxe/SmmControl2Dxe.c
@@ -245,7 +245,7 @@ SmmControl2DxeEntryPoint (
SmiEnableVal = IoRead32 (mSmiEnable);
if ((SmiEnableVal & ICH10_SMI_EN_APMC_EN) != 0) {
DEBUG ((EFI_D_ERROR, "%a: this X58 implementation lacks SMI\n",
- __FUNCTION__));
+ __func__));
}
//
@@ -268,7 +268,7 @@ SmmControl2DxeEntryPoint (
IoWrite32 (mSmiEnable, SmiEnableVal & ~(UINT32)ICH10_SMI_EN_GBL_SMI_EN);
if (IoRead32 (mSmiEnable) != SmiEnableVal) {
DEBUG ((EFI_D_ERROR, "%a: failed to lock down GBL_SMI_EN\n",
- __FUNCTION__));
+ __func__));
goto FatalError;
}
@@ -283,14 +283,14 @@ SmmControl2DxeEntryPoint (
OnS3SaveStateInstalled, NULL /* Context */,
&mS3SaveStateInstalled);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "%a: CreateEvent: %r\n", __FUNCTION__, Status));
+ DEBUG ((EFI_D_ERROR, "%a: CreateEvent: %r\n", __func__, Status));
goto FatalError;
}
Status = gBS->RegisterProtocolNotify (&gEfiS3SaveStateProtocolGuid,
mS3SaveStateInstalled, &Registration);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "%a: RegisterProtocolNotify: %r\n", __FUNCTION__,
+ DEBUG ((EFI_D_ERROR, "%a: RegisterProtocolNotify: %r\n", __func__,
Status));
goto ReleaseEvent;
}
@@ -300,7 +300,7 @@ SmmControl2DxeEntryPoint (
//
Status = gBS->SignalEvent (mS3SaveStateInstalled);
if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "%a: SignalEvent: %r\n", __FUNCTION__, Status));
+ DEBUG ((EFI_D_ERROR, "%a: SignalEvent: %r\n", __func__, Status));
goto ReleaseEvent;
}
@@ -313,7 +313,7 @@ SmmControl2DxeEntryPoint (
NULL);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "%a: InstallMultipleProtocolInterfaces: %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
goto ReleaseEvent;
}
@@ -378,7 +378,7 @@ OnS3SaveStateInstalled (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "%a: EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE: %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
ASSERT (FALSE);
CpuDeadLoop ();
}
@@ -395,13 +395,13 @@ OnS3SaveStateInstalled (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR,
- "%a: EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE: %r\n", __FUNCTION__,
+ "%a: EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE: %r\n", __func__,
Status));
ASSERT (FALSE);
CpuDeadLoop ();
}
- DEBUG ((EFI_D_VERBOSE, "%a: boot script fragment saved\n", __FUNCTION__));
+ DEBUG ((EFI_D_VERBOSE, "%a: boot script fragment saved\n", __func__));
gBS->CloseEvent (Event);
mS3SaveStateInstalled = NULL;
}
diff --git a/Silicon/Intel/TigerlakeSiliconPkg/IpBlock/PchDmi/LibraryPrivate/PeiDxeSmmPchDmiLib/PchDmiLib.c b/Silicon/Intel/TigerlakeSiliconPkg/IpBlock/PchDmi/LibraryPrivate/PeiDxeSmmPchDmiLib/PchDmiLib.c
index 972e5145..04b29871 100644
--- a/Silicon/Intel/TigerlakeSiliconPkg/IpBlock/PchDmi/LibraryPrivate/PeiDxeSmmPchDmiLib/PchDmiLib.c
+++ b/Silicon/Intel/TigerlakeSiliconPkg/IpBlock/PchDmi/LibraryPrivate/PeiDxeSmmPchDmiLib/PchDmiLib.c
@@ -100,7 +100,7 @@ PchDmiSetLpcMemRange (
)
{
if (IsPchDmiLocked ()) {
- DEBUG ((DEBUG_ERROR, "%a Error. DMI is locked.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a Error. DMI is locked.\n", __func__));
ASSERT (FALSE);
return EFI_UNSUPPORTED;
}
@@ -130,7 +130,7 @@ PchDmiSetEspiCs1MemRange (
)
{
if (IsPchDmiLocked ()) {
- DEBUG ((DEBUG_ERROR, "%a Error. DMI is locked.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a Error. DMI is locked.\n", __func__));
ASSERT (FALSE);
return EFI_UNSUPPORTED;
}
diff --git a/Silicon/Intel/TigerlakeSiliconPkg/IpBlock/Spi/LibraryPrivate/BaseSpiCommonLib/SpiCommon.c b/Silicon/Intel/TigerlakeSiliconPkg/IpBlock/Spi/LibraryPrivate/BaseSpiCommonLib/SpiCommon.c
index 490af6be..d0554cb2 100644
--- a/Silicon/Intel/TigerlakeSiliconPkg/IpBlock/Spi/LibraryPrivate/BaseSpiCommonLib/SpiCommon.c
+++ b/Silicon/Intel/TigerlakeSiliconPkg/IpBlock/Spi/LibraryPrivate/BaseSpiCommonLib/SpiCommon.c
@@ -890,7 +890,7 @@ SpiProtocolFlashReadSfdp (
UINT32 FlashAddress;
if (SpiIsSafModeActive ()) {
- DEBUG ((DEBUG_ERROR, "Unallowed call to %a while SAF Mode is active.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "Unallowed call to %a while SAF Mode is active.\n", __func__));
return EFI_UNSUPPORTED;
}
@@ -949,7 +949,7 @@ SpiProtocolFlashReadJedecId (
UINT32 Address;
if (SpiIsSafModeActive ()) {
- DEBUG ((DEBUG_ERROR, "Unallowed call to %a while SAF Mode is active.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "Unallowed call to %a while SAF Mode is active.\n", __func__));
return EFI_UNSUPPORTED;
}
@@ -1003,7 +1003,7 @@ SpiProtocolFlashWriteStatus (
EFI_STATUS Status;
if (SpiIsSafModeActive ()) {
- DEBUG ((DEBUG_ERROR, "Unallowed call to %a while SAF Mode is active.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "Unallowed call to %a while SAF Mode is active.\n", __func__));
return EFI_UNSUPPORTED;
}
@@ -1044,7 +1044,7 @@ SpiProtocolFlashReadStatus (
EFI_STATUS Status;
if (SpiIsSafModeActive ()) {
- DEBUG ((DEBUG_ERROR, "Unallowed call to %a while SAF Mode is active.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "Unallowed call to %a while SAF Mode is active.\n", __func__));
return EFI_UNSUPPORTED;
}
diff --git a/Silicon/Intel/TigerlakeSiliconPkg/Pch/Library/PeiDxeSmmPchCycleDecodingLib/PchCycleDecodingLib.c b/Silicon/Intel/TigerlakeSiliconPkg/Pch/Library/PeiDxeSmmPchCycleDecodingLib/PchCycleDecodingLib.c
index 0927cd1c..d802df55 100644
--- a/Silicon/Intel/TigerlakeSiliconPkg/Pch/Library/PeiDxeSmmPchCycleDecodingLib/PchCycleDecodingLib.c
+++ b/Silicon/Intel/TigerlakeSiliconPkg/Pch/Library/PeiDxeSmmPchCycleDecodingLib/PchCycleDecodingLib.c
@@ -147,7 +147,7 @@ LpcEspiMemRangeSetHelper (
UINT32 MemRangeAddr;
if (((Address & (~B_LPC_CFG_LGMR_MA)) != 0) || (SlaveId >= SlaveId_Max)) {
- DEBUG ((DEBUG_ERROR, "%a Error. Invalid Address: %x or invalid SlaveId\n", __FUNCTION__, Address));
+ DEBUG ((DEBUG_ERROR, "%a Error. Invalid Address: %x or invalid SlaveId\n", __func__, Address));
ASSERT (FALSE);
return EFI_INVALID_PARAMETER;
}
@@ -266,7 +266,7 @@ LpcEspiMemRangeGetHelper (
UINT32 GenMemReg;
if ((Address == NULL) || (SlaveId >= SlaveId_Max)) {
- DEBUG ((DEBUG_ERROR, "%a Error. Invalid pointer or SlaveId.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a Error. Invalid pointer or SlaveId.\n", __func__));
ASSERT (FALSE);
return EFI_INVALID_PARAMETER;
}
diff --git a/Silicon/Marvell/Armada7k8k/Feature/Capsule/PlatformFlashAccessLib/PlatformFlashAccessLib.c b/Silicon/Marvell/Armada7k8k/Feature/Capsule/PlatformFlashAccessLib/PlatformFlashAccessLib.c
index 0529d7d9..e1fb8836 100644
--- a/Silicon/Marvell/Armada7k8k/Feature/Capsule/PlatformFlashAccessLib/PlatformFlashAccessLib.c
+++ b/Silicon/Marvell/Armada7k8k/Feature/Capsule/PlatformFlashAccessLib/PlatformFlashAccessLib.c
@@ -63,7 +63,7 @@ SpiFlashProbe (
Status = SpiFlashProtocol->Init (SpiFlashProtocol, SpiFlash);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot initialize flash device\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot initialize flash device\n", __func__));
return Status;
}
@@ -87,7 +87,7 @@ CheckImageHeader (
if (Header->Magic != MAIN_HDR_MAGIC) {
DEBUG ((DEBUG_ERROR,
"%a: Bad Image magic 0x%08x != 0x%08x\n",
- __FUNCTION__,
+ __func__,
Header->Magic,
MAIN_HDR_MAGIC));
return EFI_VOLUME_CORRUPTED;
@@ -100,7 +100,7 @@ CheckImageHeader (
if (Checksum != ChecksumBackup) {
DEBUG ((DEBUG_ERROR,
"%a: Bad Image checksum. 0x%x != 0x%x\n",
- __FUNCTION__,
+ __func__,
Checksum,
ChecksumBackup));
return EFI_VOLUME_CORRUPTED;
@@ -164,7 +164,7 @@ PerformFlashWriteWithProgress (
if (FlashAddressType != FlashAddressTypeAbsoluteAddress) {
DEBUG ((DEBUG_ERROR,
"%a: only FlashAddressTypeAbsoluteAddress supported\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
@@ -172,7 +172,7 @@ PerformFlashWriteWithProgress (
if (FirmwareType != PlatformFirmwareTypeSystemFirmware) {
DEBUG ((DEBUG_ERROR,
"%a: only PlatformFirmwareTypeSystemFirmware supported\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
@@ -184,7 +184,7 @@ PerformFlashWriteWithProgress (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Cannot locate SpiFlash protocol\n",
- __FUNCTION__));
+ __func__));
return Status;
}
@@ -194,7 +194,7 @@ PerformFlashWriteWithProgress (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Cannot locate SpiMaster protocol\n",
- __FUNCTION__));
+ __func__));
return Status;
}
@@ -226,7 +226,7 @@ PerformFlashWriteWithProgress (
PcdGet32 (PcdSpiFlashCs),
PcdGet32 (PcdSpiFlashMode));
if (SpiFlash == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate SPI device!\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate SPI device!\n", __func__));
Status = EFI_DEVICE_ERROR;
goto HeaderError;
}
@@ -235,7 +235,7 @@ PerformFlashWriteWithProgress (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Error while performing SPI flash probe\n",
- __FUNCTION__));
+ __func__));
goto FlashProbeError;
}
@@ -257,13 +257,13 @@ PerformFlashWriteWithProgress (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Error while performing flash update\n",
- __FUNCTION__));
+ __func__));
goto FlashProbeError;
}
DEBUG ((DEBUG_ERROR,
"%a: Update %d bytes at offset 0x%x succeeded!\n",
- __FUNCTION__,
+ __func__,
Length,
FlashAddress));
diff --git a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.c b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.c
index ad52062d..201a020a 100644
--- a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.c
+++ b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.c
@@ -91,7 +91,7 @@ PciHostBridgeGetRootBridges (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Cannot locate BoardDesc protocol\n",
- __FUNCTION__));
+ __func__));
return NULL;
}
@@ -104,7 +104,7 @@ PciHostBridgeGetRootBridges (
} else if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Cannot get Pcie board desc from BoardDesc protocol\n",
- __FUNCTION__));
+ __func__));
return NULL;
}
@@ -112,7 +112,7 @@ PciHostBridgeGetRootBridges (
PciRootBridges = AllocateZeroPool (BoardPcieDescription->PcieControllerCount *
sizeof (PCI_ROOT_BRIDGE));
if (PciRootBridges == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Fail to allocate resources\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Fail to allocate resources\n", __func__));
return NULL;
}
diff --git a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.c b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.c
index 87e57aea..74295a96 100644
--- a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.c
+++ b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.c
@@ -91,12 +91,12 @@ WaitForLink (
UINT32 Timeout;
if (!(MmioRead32 (PcieDbiAddress + PCIE_PM_STATUS) & PCIE_PM_LTSSM_STAT_MASK)) {
- DEBUG ((DEBUG_INIT, "%a: no PCIE device detected\n", __FUNCTION__));
+ DEBUG ((DEBUG_INIT, "%a: no PCIE device detected\n", __func__));
return;
}
/* Wait for the link to establish itself. */
- DEBUG ((DEBUG_INIT, "%a: waiting for PCIE link\n", __FUNCTION__));
+ DEBUG ((DEBUG_INIT, "%a: waiting for PCIE link\n", __func__));
Mask = PCIE_GLOBAL_STATUS_RDLH_LINK_UP | PCIE_GLOBAL_STATUS_PHY_LINK_UP;
Timeout = PCIE_LINK_UP_TIMEOUT_US / 10;
@@ -134,7 +134,7 @@ ResetPcieSlot (
/* Get GPIO protocol. */
Status = MvGpioGetProtocol (PcieResetGpio->ControllerType, &GpioProtocol);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Unable to find GPIO protocol\n", __func__));
return Status;
}
@@ -197,7 +197,7 @@ Armada7k8kPciHostBridgeLibConstructor (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Cannot locate BoardDesc protocol\n",
- __FUNCTION__));
+ __func__));
return EFI_DEVICE_ERROR;
}
@@ -210,7 +210,7 @@ Armada7k8kPciHostBridgeLibConstructor (
} else if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Cannot get Pcie board desc from BoardDesc protocol\n",
- __FUNCTION__));
+ __func__));
return EFI_DEVICE_ERROR;
}
@@ -226,7 +226,7 @@ Armada7k8kPciHostBridgeLibConstructor (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Cannot reset Pcie Slot\n",
- __FUNCTION__));
+ __func__));
return EFI_DEVICE_ERROR;
}
}
diff --git a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
index 91070c8b..1ab176a0 100644
--- a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
+++ b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
@@ -47,7 +47,7 @@ ArmadaSoCAp8xxBaseGet (
)
{
if (ApIndex != ARMADA7K8K_AP806_INDEX) {
- DEBUG ((DEBUG_ERROR, "%a: Only one AP806 in A7K/A8K SoC\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Only one AP806 in A7K/A8K SoC\n", __func__));
return EFI_INVALID_PARAMETER;
}
@@ -70,7 +70,7 @@ ArmadaSoCDescComPhyGet (
Desc = AllocateZeroPool (CpCount * sizeof (MV_SOC_COMPHY_DESC));
if (Desc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -115,7 +115,7 @@ ArmadaSoCGpioGet (
*Count = CpCount * MV_SOC_GPIO_PER_CP_COUNT + MV_SOC_AP806_COUNT;
GpioInstance = AllocateZeroPool (*Count * sizeof (GPIO_CONTROLLER));
if (GpioInstance == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -154,7 +154,7 @@ ArmadaSoCDescI2cGet (
*DescCount = CpCount * MV_SOC_I2C_PER_CP_COUNT + MV_SOC_I2C_PER_AP_COUNT;
Desc = AllocateZeroPool (*DescCount * sizeof (MV_SOC_I2C_DESC));
if (Desc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -205,7 +205,7 @@ ArmadaSoCDescIcuGet (
*IcuDesc = AllocateCopyPool (sizeof (mA7k8kIcuDescTemplate),
&mA7k8kIcuDescTemplate);
if (*IcuDesc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -226,7 +226,7 @@ ArmadaSoCDescMdioGet (
Desc = AllocateZeroPool (CpCount * sizeof (MV_SOC_MDIO_DESC));
if (Desc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -255,7 +255,7 @@ ArmadaSoCDescAhciGet (
Desc = AllocateZeroPool (CpCount * sizeof (MV_SOC_AHCI_DESC));
if (Desc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -300,7 +300,7 @@ ArmadaSoCPcieGet (
*Count = CpCount * MV_SOC_PCIE_PER_CP_COUNT;
BaseAddress = AllocateZeroPool (*Count * sizeof (EFI_PHYSICAL_ADDRESS));
if (BaseAddress == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -330,7 +330,7 @@ ArmadaSoCDescPp2Get (
Desc = AllocateZeroPool (CpCount * sizeof (MV_SOC_PP2_DESC));
if (Desc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -360,7 +360,7 @@ ArmadaSoCDescSdMmcGet (
*Count = CpCount * MV_SOC_SDMMC_PER_CP_COUNT + MV_SOC_AP806_COUNT;
SdMmc = AllocateZeroPool (*Count * sizeof (MV_SOC_SDMMC_DESC));
if (SdMmc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -398,7 +398,7 @@ ArmadaSoCDescUtmiGet (
*DescCount = CpCount * MV_SOC_UTMI_PER_CP_COUNT;
Desc = AllocateZeroPool (*DescCount * sizeof (MV_SOC_UTMI_DESC));
if (Desc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -435,7 +435,7 @@ ArmadaSoCDescXhciGet (
*DescCount = CpCount * MV_SOC_XHCI_PER_CP_COUNT;
Desc = AllocateZeroPool (*DescCount * sizeof (MV_SOC_XHCI_DESC));
if (Desc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
diff --git a/Silicon/Marvell/Drivers/BoardDesc/MvBoardDescDxe.c b/Silicon/Marvell/Drivers/BoardDesc/MvBoardDescDxe.c
index cad4d3a4..05951cfe 100644
--- a/Silicon/Marvell/Drivers/BoardDesc/MvBoardDescDxe.c
+++ b/Silicon/Marvell/Drivers/BoardDesc/MvBoardDescDxe.c
@@ -45,21 +45,21 @@ MvBoardDescComPhyGet (
/* Check if PCD with ComPhy is correctly defined */
if (ComPhyDeviceTableSize > ComPhyCount) {
- DEBUG ((DEBUG_ERROR, "%a: Wrong PcdComPhyDevices format\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Wrong PcdComPhyDevices format\n", __func__));
return EFI_INVALID_PARAMETER;
}
/* Allocate and fill board description */
BoardDesc = AllocateZeroPool (ComPhyDeviceTableSize * sizeof (MV_BOARD_COMPHY_DESC));
if (BoardDesc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
ComPhyIndex = 0;
for (Index = 0; Index < ComPhyDeviceTableSize; Index++) {
if (!ComPhyDeviceEnabled[Index]) {
- DEBUG ((DEBUG_ERROR, "%a: Skip ComPhy controller %d\n", __FUNCTION__, Index));
+ DEBUG ((DEBUG_ERROR, "%a: Skip ComPhy controller %d\n", __func__, Index));
continue;
}
@@ -107,7 +107,7 @@ MvBoardGpioDescriptionGet (
/* Allocate and fill board description. */
mGpioDescription = AllocateZeroPool (sizeof (MV_BOARD_GPIO_DESCRIPTION));
if (mGpioDescription == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -157,21 +157,21 @@ MvBoardDescI2cGet (
if (I2cDeviceEnabledSize > I2cCount) {
DEBUG ((DEBUG_ERROR,
"%a: Wrong PcdI2cControllersEnabled format\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
/* Allocate and fill board description */
BoardDesc = AllocateZeroPool (I2cDeviceEnabledSize * sizeof (MV_BOARD_I2C_DESC));
if (BoardDesc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
I2cIndex = 0;
for (Index = 0; Index < I2cDeviceEnabledSize; Index++) {
if (!I2cDeviceEnabled[Index]) {
- DEBUG ((DEBUG_INFO, "%a: Skip I2c controller %d\n", __FUNCTION__, Index));
+ DEBUG ((DEBUG_INFO, "%a: Skip I2c controller %d\n", __func__, Index));
continue;
}
@@ -207,7 +207,7 @@ MvBoardDescMdioGet (
/* Allocate and fill board description */
BoardDesc = AllocateZeroPool (MdioCount * sizeof (MV_BOARD_MDIO_DESC));
if (BoardDesc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -255,21 +255,21 @@ MvBoardDescAhciGet (
/* Check if PCD with AHCI controllers is correctly defined */
if (AhciDeviceTableSize > AhciCount) {
- DEBUG ((DEBUG_ERROR, "%a: Wrong PcdPciEAhci format\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Wrong PcdPciEAhci format\n", __func__));
return EFI_INVALID_PARAMETER;
}
/* Allocate and fill board description */
BoardDesc = AllocateZeroPool (AhciDeviceTableSize * sizeof (MV_BOARD_AHCI_DESC));
if (BoardDesc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
AhciIndex = 0;
for (Index = 0; Index < AhciDeviceTableSize; Index++) {
if (!AhciDeviceEnabled[Index]) {
- DEBUG ((DEBUG_INFO, "%a: Skip Ahci controller %d\n", __FUNCTION__, Index));
+ DEBUG ((DEBUG_INFO, "%a: Skip Ahci controller %d\n", __func__, Index));
continue;
}
@@ -307,7 +307,7 @@ MvBoardDescSdMmcGet (
/* Get per-board configuration of the controllers */
Status = ArmadaBoardDescSdMmcGet (&SdMmcDevCount, &BoardDesc);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: ArmadaBoardDescSdMmcGet filed\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: ArmadaBoardDescSdMmcGet filed\n", __func__));
return Status;
}
@@ -327,21 +327,21 @@ MvBoardDescSdMmcGet (
/* Check if PCD with SDMMC controllers is correctly defined */
if ((SdMmcDeviceTableSize > SdMmcCount) ||
(SdMmcDeviceTableSize < SdMmcDevCount)) {
- DEBUG ((DEBUG_ERROR, "%a: Wrong PcdPciESdhci format\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Wrong PcdPciESdhci format\n", __func__));
return EFI_INVALID_PARAMETER;
}
SdMmcIndex = 0;
for (Index = 0; Index < SdMmcDeviceTableSize; Index++) {
if (!SdMmcDeviceEnabled[Index]) {
- DEBUG ((DEBUG_INFO, "%a: Skip SdMmc controller %d\n", __FUNCTION__, Index));
+ DEBUG ((DEBUG_INFO, "%a: Skip SdMmc controller %d\n", __func__, Index));
continue;
}
if (SdMmcIndex >= SdMmcDevCount) {
DEBUG ((DEBUG_ERROR,
"%a: More enabled devices than returned by ArmadaBoardDescSdMmcGet\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
BoardDesc[SdMmcIndex].SoC = &SoCDesc[Index];
@@ -389,21 +389,21 @@ MvBoardDescXhciGet (
/* Check if PCD with XHCI controllers is correctly defined */
if (XhciDeviceTableSize > XhciCount) {
- DEBUG ((DEBUG_ERROR, "%a: Wrong PcdPciEXhci format\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Wrong PcdPciEXhci format\n", __func__));
return EFI_INVALID_PARAMETER;
}
/* Allocate and fill board description */
BoardDesc = AllocateZeroPool (XhciDeviceTableSize * sizeof (MV_BOARD_XHCI_DESC));
if (BoardDesc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
XhciIndex = 0;
for (Index = 0; Index < XhciDeviceTableSize; Index++) {
if (!XhciDeviceEnabled[Index]) {
- DEBUG ((DEBUG_INFO, "%a: Skip Xhci controller %d\n", __FUNCTION__, Index));
+ DEBUG ((DEBUG_INFO, "%a: Skip Xhci controller %d\n", __func__, Index));
continue;
}
@@ -465,7 +465,7 @@ MvBoardPcieDescriptionGet (
/* Sanity check of the board description. */
if (BoardPcieControllerCount > SoCPcieControllerCount) {
- DEBUG ((DEBUG_ERROR, "%a: Too many controllers described\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Too many controllers described\n", __func__));
return EFI_INVALID_PARAMETER;
}
@@ -480,7 +480,7 @@ MvBoardPcieDescriptionGet (
if (SoCIndex == SoCPcieControllerCount) {
DEBUG ((DEBUG_ERROR,
"%a: Controller #%d base address invalid: 0x%x\n",
- __FUNCTION__,
+ __func__,
BoardIndex,
PcieControllers[BoardIndex].PcieDbiAddress));
return EFI_INVALID_PARAMETER;
@@ -490,7 +490,7 @@ MvBoardPcieDescriptionGet (
/* Allocate and fill board description. */
mPcieDescription = AllocateZeroPool (sizeof (MV_BOARD_PCIE_DESCRIPTION));
if (mPcieDescription == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -536,14 +536,14 @@ MvBoardDescPp2Get (
/* Check if PCD with PP2 NICs is correctly defined */
if (Pp2DeviceTableSize > Pp2Count) {
- DEBUG ((DEBUG_ERROR, "%a: Wrong PcdPp2Controllers format\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Wrong PcdPp2Controllers format\n", __func__));
return EFI_INVALID_PARAMETER;
}
/* Allocate and fill board description */
BoardDesc = AllocateZeroPool (Pp2DeviceTableSize * sizeof (MV_BOARD_PP2_DESC));
if (BoardDesc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -597,7 +597,7 @@ MvBoardDescUtmiGet (
/* Make sure XHCI controllers table is present */
XhciDeviceEnabled = PcdGetPtr (PcdPciEXhci);
if (XhciDeviceEnabled == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Missing PcdPciEXhci\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Missing PcdPciEXhci\n", __func__));
return EFI_INVALID_PARAMETER;
}
@@ -608,7 +608,7 @@ MvBoardDescUtmiGet (
(UtmiDeviceTableSize > PcdGetSize (PcdPciEXhci))) {
DEBUG ((DEBUG_ERROR,
"%a: Wrong PcdUtmiControllersEnabled format\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
@@ -616,14 +616,14 @@ MvBoardDescUtmiGet (
UtmiPortType = PcdGetPtr (PcdUtmiPortType);
if ((UtmiPortType == NULL) ||
(PcdGetSize (PcdUtmiPortType) != UtmiDeviceTableSize)) {
- DEBUG ((DEBUG_ERROR, "%a: Wrong PcdUtmiPortType format\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Wrong PcdUtmiPortType format\n", __func__));
return EFI_INVALID_PARAMETER;
}
/* Allocate and fill board description */
BoardDesc = AllocateZeroPool (UtmiDeviceTableSize * sizeof (MV_BOARD_UTMI_DESC));
if (BoardDesc == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -638,7 +638,7 @@ MvBoardDescUtmiGet (
DEBUG ((DEBUG_ERROR,
"%a: Disabled Xhci controller %d\n",
Index,
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
diff --git a/Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.c b/Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.c
index 4cf44075..9e394a63 100644
--- a/Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.c
+++ b/Silicon/Marvell/Drivers/Gpio/MvGpioDxe/MvGpioDxe.c
@@ -63,7 +63,7 @@ MvGpioValidate (
if (ControllerIndex >= mGpioInstance->GpioDeviceCount) {
DEBUG ((DEBUG_ERROR,
"%a: Invalid GPIO ControllerIndex: %d\n",
- __FUNCTION__,
+ __func__,
ControllerIndex));
return EFI_INVALID_PARAMETER;
}
@@ -71,7 +71,7 @@ MvGpioValidate (
if (GpioPin >= mGpioInstance->SoCGpio[ControllerIndex].InternalGpioCount) {
DEBUG ((DEBUG_ERROR,
"%a: GPIO pin #%d not available in Controller#%d\n",
- __FUNCTION__,
+ __func__,
GpioPin,
ControllerIndex));
return EFI_INVALID_PARAMETER;
@@ -306,7 +306,7 @@ MvGpioEntryPoint (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Cannot locate BoardDesc protocol\n",
- __FUNCTION__));
+ __func__));
goto ErrLocateBoardDesc;
}
@@ -315,7 +315,7 @@ MvGpioEntryPoint (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Cannot get GPIO board desc from BoardDesc protocol\n",
- __FUNCTION__));
+ __func__));
goto ErrLocateBoardDesc;
}
diff --git a/Silicon/Marvell/Drivers/Gpio/MvPca95xxDxe/MvPca95xxDxe.c b/Silicon/Marvell/Drivers/Gpio/MvPca95xxDxe/MvPca95xxDxe.c
index 1bf3bcdc..3d6b8978 100644
--- a/Silicon/Marvell/Drivers/Gpio/MvPca95xxDxe/MvPca95xxDxe.c
+++ b/Silicon/Marvell/Drivers/Gpio/MvPca95xxDxe/MvPca95xxDxe.c
@@ -83,7 +83,7 @@ MvPca95xxValidate (
if (ControllerIndex >= mPca95xxInstance->GpioExpanderCount) {
DEBUG ((DEBUG_ERROR,
"%a: Invalid GPIO ControllerIndex: %d\n",
- __FUNCTION__,
+ __func__,
ControllerIndex));
return EFI_INVALID_PARAMETER;
}
@@ -93,7 +93,7 @@ MvPca95xxValidate (
if (GpioPin >= mPca95xxPinCount[ControllerId]) {
DEBUG ((DEBUG_ERROR,
"%a: GPIO pin #%d not available in Controller#%d\n",
- __FUNCTION__,
+ __func__,
GpioPin,
ControllerIndex));
return EFI_INVALID_PARAMETER;
@@ -125,7 +125,7 @@ MvPca95xxGetI2c (
&HandleCount,
&HandleBuffer);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Unable to locate handles\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Unable to locate handles\n", __func__));
return Status;
}
@@ -138,7 +138,7 @@ MvPca95xxGetI2c (
NULL,
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Unable to open protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Unable to open protocol\n", __func__));
gBS->FreePool (HandleBuffer);
return Status;
}
@@ -187,7 +187,7 @@ MvPca95xxI2cTransfer (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: transmission error: 0x%d\n",
- __FUNCTION__,
+ __func__,
Status));
}
@@ -233,7 +233,7 @@ MvPca95xxSetOutputValue (
Status = MvPca95xxGetI2c (ControllerIndex, &I2cIo);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to get I2C protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to get I2C protocol\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -241,7 +241,7 @@ MvPca95xxSetOutputValue (
Status = MvPca95xxReadRegs (I2cIo, PCA95XX_OUTPUT_REG + Bank, &RegVal);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to read device register\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to read device register\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -253,7 +253,7 @@ MvPca95xxSetOutputValue (
Status = MvPca95xxWriteRegs (I2cIo, PCA95XX_OUTPUT_REG + Bank, RegVal);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to write device register\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to write device register\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -275,7 +275,7 @@ MvPca95xxSetDirection (
Status = MvPca95xxGetI2c (ControllerIndex, &I2cIo);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to get I2C protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to get I2C protocol\n", __func__));
return Status;
}
@@ -283,7 +283,7 @@ MvPca95xxSetDirection (
Status = MvPca95xxReadRegs (I2cIo, PCA95XX_DIRECTION_REG + Bank, &RegVal);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to read device register\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to read device register\n", __func__));
return Status;
}
@@ -295,7 +295,7 @@ MvPca95xxSetDirection (
Status = MvPca95xxWriteRegs (I2cIo, PCA95XX_DIRECTION_REG + Bank, RegVal);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to write device register\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to write device register\n", __func__));
return Status;
}
@@ -319,7 +319,7 @@ MvPca95xxReadMode (
Status = MvPca95xxGetI2c (ControllerIndex, &I2cIo);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to get I2C protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to get I2C protocol\n", __func__));
return Status;
}
@@ -327,7 +327,7 @@ MvPca95xxReadMode (
Status = MvPca95xxReadRegs (I2cIo, PCA95XX_DIRECTION_REG + Bank, &RegVal);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to read device register\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to read device register\n", __func__));
return Status;
}
@@ -336,7 +336,7 @@ MvPca95xxReadMode (
} else {
Status = MvPca95xxReadRegs (I2cIo, PCA95XX_INPUT_REG + Bank, &RegVal);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to read device register\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to read device register\n", __func__));
return Status;
}
@@ -389,7 +389,7 @@ MvPca95xxGetMode (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: fail to get pin %d of controller#%d mode\n",
- __FUNCTION__,
+ __func__,
GpioPin,
ControllerIndex));
}
@@ -436,7 +436,7 @@ MvPca95xxGet (
Status = MvPca95xxGetI2c (ControllerIndex, &I2cIo);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to get I2C protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to get I2C protocol\n", __func__));
return Status;
}
@@ -444,7 +444,7 @@ MvPca95xxGet (
Status = MvPca95xxReadRegs (I2cIo, PCA95XX_INPUT_REG + Bank, &RegVal);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to read device register\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to read device register\n", __func__));
return Status;
}
@@ -497,7 +497,7 @@ MvPca95xxSet (
case GPIO_MODE_OUTPUT_1:
Status = MvPca95xxSetOutputValue (ControllerIndex, GpioPin, Mode);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to set ouput value\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to set ouput value\n", __func__));
return Status;
}
@@ -505,7 +505,7 @@ MvPca95xxSet (
case GPIO_MODE_INPUT:
Status = MvPca95xxSetDirection (ControllerIndex, GpioPin, Mode);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: fail to set direction\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: fail to set direction\n", __func__));
return Status;
}
break;
@@ -576,7 +576,7 @@ MvPca95xxEntryPoint (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Cannot locate BoardDesc protocol\n",
- __FUNCTION__));
+ __func__));
return Status;
}
@@ -585,7 +585,7 @@ MvPca95xxEntryPoint (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Cannot get GPIO board desc from BoardDesc protocol\n",
- __FUNCTION__));
+ __func__));
return Status;
} else if (GpioDescription->GpioExpanders == NULL) {
/* Silently exit, if the board does not support the controllers */
@@ -597,7 +597,7 @@ MvPca95xxEntryPoint (
if (Pca95xxDevicePath == NULL) {
DEBUG ((DEBUG_ERROR,
"%a: Fail to allocate Pca95xxDevicePath\n",
- __FUNCTION__));
+ __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -605,7 +605,7 @@ MvPca95xxEntryPoint (
if (mPca95xxInstance == NULL) {
DEBUG ((DEBUG_ERROR,
"%a: Fail to allocate mPca95xxInstance\n",
- __FUNCTION__));
+ __func__));
Status = EFI_OUT_OF_RESOURCES;
goto ErrPca95xxInstanceAlloc;
}
diff --git a/Silicon/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.c b/Silicon/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.c
index a8ff722a..ad472c61 100755
--- a/Silicon/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.c
+++ b/Silicon/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.c
@@ -174,7 +174,7 @@ OnEndOfDxe (
Status = gBS->ConnectController (DeviceHandle, NULL, NULL, TRUE);
DEBUG ((DEBUG_INFO,
"%a: ConnectController () returned %r\n",
- __FUNCTION__,
+ __func__,
Status));
DevicePath->Instance++;
diff --git a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
index 6e4a7158..7800b54f 100644
--- a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
+++ b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
@@ -245,12 +245,12 @@ MvPhyConfigureAutonegotiation (
DEBUG ((DEBUG_INFO,
"%a: Waiting for PHY auto negotiation...",
- __FUNCTION__));
+ __func__));
/* Wait for autonegotiation to complete and read media status */
for (Index = 0; !(Data & BMSR_ANEGCOMPLETE); Index++) {
if (Index > PHY_AUTONEGOTIATE_TIMEOUT) {
- DEBUG ((DEBUG_ERROR, "%a: Timeout\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Timeout\n", __func__));
PhyDevice->LinkUp = FALSE;
return EFI_TIMEOUT;
}
@@ -259,16 +259,16 @@ MvPhyConfigureAutonegotiation (
}
PhyDevice->LinkUp = TRUE;
- DEBUG ((DEBUG_INFO, "%a: link up\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: link up\n", __func__));
} else {
Mdio->Read (Mdio, PhyDevice->Addr, PhyDevice->MdioIndex, MII_BMSR, &Data);
if (Data & BMSR_LSTATUS) {
PhyDevice->LinkUp = TRUE;
- DEBUG ((DEBUG_INFO, "%a: link up\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: link up\n", __func__));
} else {
PhyDevice->LinkUp = FALSE;
- DEBUG ((DEBUG_INFO, "%a: link down\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: link down\n", __func__));
}
}
@@ -420,7 +420,7 @@ MvPhyInit (
if (PhyId >= MV_PHY_DEVICE_ID_MAX) {
DEBUG ((DEBUG_ERROR,
"%a, Incorrect PHY ID (0x%x) for PHY#%d\n",
- __FUNCTION__,
+ __func__,
PhyId,
PhyIndex));
return EFI_INVALID_PARAMETER;
diff --git a/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c b/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c
index 5e463ac9..53e12942 100644
--- a/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c
+++ b/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c
@@ -1438,7 +1438,7 @@ Pp2AipGetInformation (
AdapterInfo->MediaState = EFI_NOT_READY;
return EFI_SUCCESS;
} else if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a Failed to get media status\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a Failed to get media status\n", __func__));
return EFI_DEVICE_ERROR;
}
diff --git a/Silicon/Marvell/Drivers/SdMmc/XenonDxe/XenonSdMmcOverride.c b/Silicon/Marvell/Drivers/SdMmc/XenonDxe/XenonSdMmcOverride.c
index afd650b3..42465058 100644
--- a/Silicon/Marvell/Drivers/SdMmc/XenonDxe/XenonSdMmcOverride.c
+++ b/Silicon/Marvell/Drivers/SdMmc/XenonDxe/XenonSdMmcOverride.c
@@ -378,7 +378,7 @@ InitializeXenonDxe (
mSdMmcOverride = AllocateZeroPool (sizeof (EDKII_SD_MMC_OVERRIDE));
if (mSdMmcOverride == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -393,7 +393,7 @@ InitializeXenonDxe (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Filed to install SdMmcOverride protocol\n",
- __FUNCTION__));
+ __func__));
return Status;
}
diff --git a/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c
index a5d4ec33..6f1224a3 100644
--- a/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c
+++ b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c
@@ -236,7 +236,7 @@ MvFvbValidateFvHeader (
(FwVolHeader->FvLength != FlashInstance->FvbSize)) {
DEBUG ((DEBUG_ERROR,
"%a: No Firmware Volume header present\n",
- __FUNCTION__));
+ __func__));
return EFI_NOT_FOUND;
}
@@ -244,7 +244,7 @@ MvFvbValidateFvHeader (
if (!CompareGuid (&FwVolHeader->FileSystemGuid, &gEfiSystemNvDataFvGuid)) {
DEBUG ((DEBUG_ERROR,
"%a: Firmware Volume Guid non-compatible\n",
- __FUNCTION__));
+ __func__));
return EFI_NOT_FOUND;
}
@@ -253,7 +253,7 @@ MvFvbValidateFvHeader (
if (Checksum != 0) {
DEBUG ((DEBUG_ERROR,
"%a: FV checksum is invalid (Checksum:0x%x)\n",
- __FUNCTION__,
+ __func__,
Checksum));
return EFI_NOT_FOUND;
}
@@ -266,7 +266,7 @@ MvFvbValidateFvHeader (
&gEfiAuthenticatedVariableGuid)) {
DEBUG ((DEBUG_ERROR,
"%a: Variable Store Guid non-compatible\n",
- __FUNCTION__));
+ __func__));
return EFI_NOT_FOUND;
}
@@ -275,7 +275,7 @@ MvFvbValidateFvHeader (
if (VariableStoreHeader->Size != VariableStoreLength) {
DEBUG ((DEBUG_ERROR,
"%a: Variable Store Length does not match\n",
- __FUNCTION__));
+ __func__));
return EFI_NOT_FOUND;
}
@@ -519,7 +519,7 @@ MvFvbGetBlockSize (
if (Lba > FlashInstance->Media.LastBlock) {
DEBUG ((DEBUG_ERROR,
"%a: Error: Requested LBA %ld is beyond the last available LBA (%ld).\n",
- __FUNCTION__,
+ __func__,
Lba,
FlashInstance->Media.LastBlock));
return EFI_INVALID_PARAMETER;
@@ -606,7 +606,7 @@ MvFvbRead (
(Offset + *NumBytes) > BlockSize) {
DEBUG ((DEBUG_ERROR,
"%a: Wrong buffer size: (Offset=0x%x + NumBytes=0x%x) > BlockSize=0x%x\n",
- __FUNCTION__,
+ __func__,
Offset,
*NumBytes,
BlockSize));
@@ -713,7 +713,7 @@ MvFvbWrite (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Failed to write to Spi device\n",
- __FUNCTION__));
+ __func__));
return Status;
}
@@ -799,7 +799,7 @@ MvFvbEraseBlocks (
if ((FlashFvbAttributes & EFI_FVB2_WRITE_STATUS) == 0) {
DEBUG ((DEBUG_ERROR,
"%a: Device is in WriteDisabled state.\n",
- __FUNCTION__));
+ __func__));
return EFI_ACCESS_DENIED;
}
@@ -828,7 +828,7 @@ MvFvbEraseBlocks (
DEBUG ((DEBUG_ERROR,
"%a: Error: Requested LBA are beyond the last available LBA (%ld).\n",
- __FUNCTION__,
+ __func__,
FlashInstance->Media.LastBlock));
VA_END (Args);
@@ -933,7 +933,7 @@ MvFvbFlashProbe (
Status = SpiFlashProtocol->Init (SpiFlashProtocol, &FlashInstance->SpiDevice);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot initialize flash device\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot initialize flash device\n", __func__));
return EFI_DEVICE_ERROR;
}
@@ -967,10 +967,10 @@ MvFvbPrepareFvHeader (
// Install the default FVB header if required
if (EFI_ERROR (Status)) {
// There is no valid header, so time to install one.
- DEBUG ((DEBUG_ERROR, "%a: The FVB Header is not valid.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: The FVB Header is not valid.\n", __func__));
DEBUG ((DEBUG_ERROR,
"%a: Installing a correct one for this volume.\n",
- __FUNCTION__));
+ __func__));
// Erase entire region that is reserved for variable storage
Status = FlashInstance->SpiFlashProtocol->Erase (&FlashInstance->SpiDevice,
@@ -1006,7 +1006,7 @@ MvFvbConfigureFlashInstance (
NULL,
(VOID **)&FlashInstance->SpiFlashProtocol);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot locate SpiFlash protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot locate SpiFlash protocol\n", __func__));
return Status;
}
@@ -1014,7 +1014,7 @@ MvFvbConfigureFlashInstance (
NULL,
(VOID **)&FlashInstance->SpiMasterProtocol);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot locate SpiMaster protocol\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot locate SpiMaster protocol\n", __func__));
return Status;
}
@@ -1028,7 +1028,7 @@ MvFvbConfigureFlashInstance (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Error while performing SPI flash probe\n",
- __FUNCTION__));
+ __func__));
return Status;
}
@@ -1132,7 +1132,7 @@ MvFvbEntryPoint (
mFvbDevice = AllocateRuntimeCopyPool (sizeof (mMvFvbFlashInstanceTemplate),
&mMvFvbFlashInstanceTemplate);
if (mFvbDevice == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -1141,7 +1141,7 @@ MvFvbEntryPoint (
//
Status = MvFvbConfigureFlashInstance (mFvbDevice);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Fail to configure Fvb SPI device\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Fail to configure Fvb SPI device\n", __func__));
goto ErrorConfigureFlash;
}
@@ -1156,7 +1156,7 @@ MvFvbEntryPoint (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Failed to install gEdkiiNvVarStoreFormattedGuid\n",
- __FUNCTION__));
+ __func__));
goto ErrorInstallNvVarStoreFormatted;
}
@@ -1172,7 +1172,7 @@ MvFvbEntryPoint (
RuntimeMmioRegionSize,
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to add memory space\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to add memory space\n", __func__));
goto ErrorAddSpace;
}
@@ -1181,7 +1181,7 @@ MvFvbEntryPoint (
RuntimeMmioRegionSize,
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to set memory attributes\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to set memory attributes\n", __func__));
goto ErrorSetMemAttr;
}
}
@@ -1196,7 +1196,7 @@ MvFvbEntryPoint (
&gEfiEventVirtualAddressChangeGuid,
&mFvbVirtualAddrChangeEvent);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to register VA change event\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to register VA change event\n", __func__));
goto ErrorSetMemAttr;
}
diff --git a/Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.c b/Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.c
index f99f3d57..38d6d256 100755
--- a/Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.c
+++ b/Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.c
@@ -396,7 +396,7 @@ MvSpiFlashUpdateWithProgress (
TmpBuf = (UINT8 *)AllocateZeroPool (SectorSize);
if (TmpBuf == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
return EFI_OUT_OF_RESOURCES;
}
@@ -418,7 +418,7 @@ MvSpiFlashUpdateWithProgress (
TmpBuf,
SectorSize);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Error while updating\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Error while updating\n", __func__));
return Status;
}
}
@@ -459,7 +459,7 @@ MvSpiFlashReadId (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Unrecognized JEDEC Id bytes: 0x%02x%02x%02x\n",
- __FUNCTION__,
+ __func__,
Id[0],
Id[1],
Id[2]));
@@ -617,7 +617,7 @@ MvSpiFlashEntryPoint (
&gEfiEventVirtualAddressChangeGuid,
&mMvSpiFlashVirtualAddrChangeEvent);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to register VA change event\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to register VA change event\n", __func__));
goto ErrorCreateEvent;
}
diff --git a/Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.c b/Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.c
index 49d212e4..448d9902 100755
--- a/Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.c
+++ b/Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.c
@@ -220,7 +220,7 @@ MvSpiTransfer (
}
if (Iterator >= SPI_TIMEOUT) {
- DEBUG ((DEBUG_ERROR, "%a: Timeout\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Timeout\n", __func__));
return EFI_TIMEOUT;
}
}
@@ -337,7 +337,7 @@ MvSpiConfigRuntime (
SIZE_4KB,
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to add memory space\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to add memory space\n", __func__));
return Status;
}
@@ -345,7 +345,7 @@ MvSpiConfigRuntime (
SIZE_4KB,
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to set memory attributes\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to set memory attributes\n", __func__));
gDS->RemoveMemorySpace (AlignedAddress, SIZE_4KB);
return Status;
}
diff --git a/Silicon/Marvell/Library/ComPhyLib/ComPhyLib.c b/Silicon/Marvell/Library/ComPhyLib/ComPhyLib.c
index d7fdb43d..cec0e654 100644
--- a/Silicon/Marvell/Library/ComPhyLib/ComPhyLib.c
+++ b/Silicon/Marvell/Library/ComPhyLib/ComPhyLib.c
@@ -187,7 +187,7 @@ MvComPhyInit (
ChipConfig = AllocateZeroPool (ComPhyBoardDesc->ComPhyDevCount *
sizeof (CHIP_COMPHY_CONFIG));
if (ChipConfig == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
BoardDescProtocol->BoardDescFree (ComPhyBoardDesc);
return EFI_OUT_OF_RESOURCES;
}
@@ -195,7 +195,7 @@ MvComPhyInit (
LaneData = AllocateZeroPool (ComPhyBoardDesc->ComPhyDevCount *
sizeof (PCD_LANE_MAP));
if (ChipConfig == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __func__));
BoardDescProtocol->BoardDescFree (ComPhyBoardDesc);
FreePool (ChipConfig);
return EFI_OUT_OF_RESOURCES;
diff --git a/Silicon/Marvell/Library/MvGpioLib/MvGpioLib.c b/Silicon/Marvell/Library/MvGpioLib/MvGpioLib.c
index 95eabf80..8e4c2f4b 100644
--- a/Silicon/Marvell/Library/MvGpioLib/MvGpioLib.c
+++ b/Silicon/Marvell/Library/MvGpioLib/MvGpioLib.c
@@ -79,7 +79,7 @@ MvGpioGetProtocol (
&HandleCount,
&HandleBuffer);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Unable to locate handles\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Unable to locate handles\n", __func__));
return Status;
}
@@ -93,7 +93,7 @@ MvGpioGetProtocol (
NULL,
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Unable to find DevicePath\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Unable to find DevicePath\n", __func__));
continue;
}
@@ -111,7 +111,7 @@ MvGpioGetProtocol (
} else if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Unable to open GPIO protocol\n",
- __FUNCTION__));
+ __func__));
}
gBS->FreePool (HandleBuffer);
diff --git a/Silicon/Maxim/Library/Ds1307RtcLib/Ds1307RtcLib.c b/Silicon/Maxim/Library/Ds1307RtcLib/Ds1307RtcLib.c
index 444e0112..29f1b66a 100644
--- a/Silicon/Maxim/Library/Ds1307RtcLib/Ds1307RtcLib.c
+++ b/Silicon/Maxim/Library/Ds1307RtcLib/Ds1307RtcLib.c
@@ -289,7 +289,7 @@ I2cDriverRegistrationEvent (
if (EFI_ERROR (Status)) {
if (Status != EFI_NOT_FOUND) {
DEBUG ((DEBUG_WARN, "%a: gBS->LocateHandle () returned %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
break;
}
@@ -298,7 +298,7 @@ I2cDriverRegistrationEvent (
continue;
}
- DEBUG ((DEBUG_INFO, "%a: found I2C master!\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: found I2C master!\n", __func__));
gBS->CloseEvent (Event);
@@ -310,7 +310,7 @@ I2cDriverRegistrationEvent (
Status = I2cMaster->Reset (I2cMaster);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: I2CMaster->Reset () failed - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
break;
}
@@ -318,7 +318,7 @@ I2cDriverRegistrationEvent (
Status = I2cMaster->SetBusFrequency (I2cMaster, &BusFrequency);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: I2CMaster->SetBusFrequency () failed - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
break;
}
diff --git a/Silicon/NXP/LS1043A/Library/SocLib/SerDes.c b/Silicon/NXP/LS1043A/Library/SocLib/SerDes.c
index 640e1ee4..8768b1ef 100644
--- a/Silicon/NXP/LS1043A/Library/SocLib/SerDes.c
+++ b/Silicon/NXP/LS1043A/Library/SocLib/SerDes.c
@@ -113,7 +113,7 @@ GetSerDesProtocolMap (
);
if (Status != EFI_SUCCESS) {
- DEBUG ((DEBUG_ERROR, "%a: failed for SerDes1 \n",__FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed for SerDes1 \n",__func__));
*SerDesProtocolMap = 0;
}
}
diff --git a/Silicon/NXP/LS1046A/Library/SocLib/SerDes.c b/Silicon/NXP/LS1046A/Library/SocLib/SerDes.c
index a50e0b61..b2138601 100644
--- a/Silicon/NXP/LS1046A/Library/SocLib/SerDes.c
+++ b/Silicon/NXP/LS1046A/Library/SocLib/SerDes.c
@@ -113,7 +113,7 @@ GetSerDesProtocolMap (
);
if (Status != EFI_SUCCESS) {
- DEBUG ((DEBUG_ERROR, "%a: failed for SerDes1 \n",__FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed for SerDes1 \n",__func__));
*SerDesProtocolMap = 0;
}
}
diff --git a/Silicon/NXP/LX2160A/Library/SocLib/SerDes.c b/Silicon/NXP/LX2160A/Library/SocLib/SerDes.c
index d02393b5..f5135835 100644
--- a/Silicon/NXP/LX2160A/Library/SocLib/SerDes.c
+++ b/Silicon/NXP/LX2160A/Library/SocLib/SerDes.c
@@ -175,7 +175,7 @@ GetSerDesProtocolMap (
);
if (Status != EFI_SUCCESS) {
- DEBUG ((DEBUG_ERROR, "%a: failed for SerDes1 \n",__FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed for SerDes1 \n",__func__));
*SerDesProtocolMap = 0;
}
@@ -190,7 +190,7 @@ GetSerDesProtocolMap (
);
if (Status != EFI_SUCCESS) {
- DEBUG ((DEBUG_ERROR, "%a: failed for SerDes2 \n",__FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed for SerDes2 \n",__func__));
*SerDesProtocolMap = 0;
}
@@ -205,7 +205,7 @@ GetSerDesProtocolMap (
);
if (Status != EFI_SUCCESS) {
- DEBUG ((DEBUG_ERROR, "%a: failed for SerDes3 \n",__FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: failed for SerDes3 \n",__func__));
*SerDesProtocolMap = 0;
}
}
diff --git a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
index ac68c039..e329cfec 100644
--- a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
+++ b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
@@ -293,7 +293,7 @@ I2cMasterRegistrationEvent (
if (EFI_ERROR (Status)) {
if (Status != EFI_NOT_FOUND) {
DEBUG ((DEBUG_WARN, "%a: gBS->LocateHandle () returned %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
break;
}
@@ -302,7 +302,7 @@ I2cMasterRegistrationEvent (
continue;
}
- DEBUG ((DEBUG_INFO, "%a: found I2C master!\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: found I2C master!\n", __func__));
gBS->CloseEvent (Event);
@@ -314,7 +314,7 @@ I2cMasterRegistrationEvent (
Status = I2cMaster->Reset (I2cMaster);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: I2CMaster->Reset () failed - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
break;
}
@@ -322,7 +322,7 @@ I2cMasterRegistrationEvent (
Status = I2cMaster->SetBusFrequency (I2cMaster, &BusFrequency);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: I2CMaster->SetBusFrequency () failed - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
break;
}
diff --git a/Silicon/NXP/Library/SerDesHelperLib/SerDesHelperLib.c b/Silicon/NXP/Library/SerDesHelperLib/SerDesHelperLib.c
index 1e815854..c351e54d 100644
--- a/Silicon/NXP/Library/SerDesHelperLib/SerDesHelperLib.c
+++ b/Silicon/NXP/Library/SerDesHelperLib/SerDesHelperLib.c
@@ -147,7 +147,7 @@ GetSerDesMap (
Status = IsSerDesProtocolValid (SerDes, SerDesProtocol, SerDesNumLanes, Config);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: SERDES%d[PRTCL] = 0x%x is not valid, Status = %r \n",
- __FUNCTION__, SerDes + 1, SerDesProtocol, Status));
+ __func__, SerDes + 1, SerDesProtocol, Status));
return Status;
}
diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c
index 4ebbe7c9..b8caaecc 100644
--- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c
+++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c
@@ -34,7 +34,7 @@ InitializeSbsaQemuPlatformDxe (
UINTN SmcResult;
RETURN_STATUS Result;
- DEBUG ((DEBUG_INFO, "%a: InitializeSbsaQemuPlatformDxe called\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: InitializeSbsaQemuPlatformDxe called\n", __func__));
Base = (VOID*)(UINTN)PcdGet64 (PcdPlatformAhciBase);
ASSERT (Base != NULL);
@@ -42,7 +42,7 @@ InitializeSbsaQemuPlatformDxe (
ASSERT (Size != 0);
DEBUG ((DEBUG_INFO, "%a: Got platform AHCI %llx %u\n",
- __FUNCTION__, Base, Size));
+ __func__, Base, Size));
Status = RegisterNonDiscoverableMmioDevice (
NonDiscoverableDeviceTypeAhci,
@@ -54,7 +54,7 @@ InitializeSbsaQemuPlatformDxe (
if (EFI_ERROR(Status)) {
DEBUG ((DEBUG_ERROR, "%a: NonDiscoverable: Cannot install AHCI device @%p (Staus == %r)\n",
- __FUNCTION__, Base, Status));
+ __func__, Base, Status));
return Status;
}
@@ -104,7 +104,7 @@ InitializeSbsaQemuPlatformDxe (
ASSERT (Size != 0);
DEBUG ((DEBUG_INFO, "%a: Got platform XHCI %llx %u\n",
- __FUNCTION__, Base, Size));
+ __func__, Base, Size));
Status = RegisterNonDiscoverableMmioDevice (
NonDiscoverableDeviceTypeXhci,
@@ -118,7 +118,7 @@ InitializeSbsaQemuPlatformDxe (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: NonDiscoverable: Cannot install XHCI device @%p (Status == %r)\n",
- __FUNCTION__, Base, Status));
+ __func__, Base, Status));
return Status;
}
}
diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.c
index 9ef5168b..3403b351 100644
--- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.c
+++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.c
@@ -292,7 +292,7 @@ MemDevInfoUpdateSmbiosType17 (
// PhyMemArrayInfoUpdateSmbiosType16 must be called before MemDevInfoUpdateSmbiosType17
//
if (mPhyMemArrayInfoType16Handle == SMBIOS_HANDLE_PI_RESERVED) {
- DEBUG ((DEBUG_ERROR, "%a: mPhyMemArrayInfoType16Handle is not initialized\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: mPhyMemArrayInfoType16Handle is not initialized\n", __func__));
return;
}
@@ -346,7 +346,7 @@ MemArrMapInfoUpdateSmbiosType19 (
// PhyMemArrayInfoUpdateSmbiosType16 must be called before MemDevInfoUpdateSmbiosType17
//
if (mPhyMemArrayInfoType16Handle == SMBIOS_HANDLE_PI_RESERVED) {
- DEBUG ((DEBUG_ERROR, "%a: mPhyMemArrayInfoType16Handle is not initialized\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: mPhyMemArrayInfoType16Handle is not initialized\n", __func__));
return;
}
diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuMem.c b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuMem.c
index 8c2eb0b6..be58de27 100644
--- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuMem.c
+++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuMem.c
@@ -60,7 +60,7 @@ SbsaQemuLibConstructor (
CurSize = fdt64_to_cpu (ReadUnaligned64 (RegProp + 1));
DEBUG ((DEBUG_INFO, "%a: System RAM @ 0x%lx - 0x%lx\n",
- __FUNCTION__, CurBase, CurBase + CurSize - 1));
+ __func__, CurBase, CurBase + CurSize - 1));
if (NewBase > CurBase || NewBase == 0) {
NewBase = CurBase;
@@ -68,7 +68,7 @@ SbsaQemuLibConstructor (
}
} else {
DEBUG ((DEBUG_ERROR, "%a: Failed to parse FDT memory node\n",
- __FUNCTION__));
+ __func__));
}
}
}
@@ -107,7 +107,7 @@ ArmPlatformGetVirtualMemoryMap (
MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS);
if (VirtualMemoryTable == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __func__));
return;
}
@@ -121,7 +121,7 @@ ArmPlatformGetVirtualMemoryMap (
"\tPhysicalBase: 0x%lX\n"
"\tVirtualBase: 0x%lX\n"
"\tLength: 0x%lX\n",
- __FUNCTION__,
+ __func__,
VirtualMemoryTable[0].PhysicalBase,
VirtualMemoryTable[0].VirtualBase,
VirtualMemoryTable[0].Length));
diff --git a/Silicon/RISC-V/ProcessorPkg/Library/RiscVExceptionLib/CpuExceptionHandlerLib.c b/Silicon/RISC-V/ProcessorPkg/Library/RiscVExceptionLib/CpuExceptionHandlerLib.c
index c3ced4a4..bca462e7 100644
--- a/Silicon/RISC-V/ProcessorPkg/Library/RiscVExceptionLib/CpuExceptionHandlerLib.c
+++ b/Silicon/RISC-V/ProcessorPkg/Library/RiscVExceptionLib/CpuExceptionHandlerLib.c
@@ -74,7 +74,7 @@ RegisterCpuInterruptHandler (
IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
)
{
- DEBUG ((DEBUG_INFO, "%a: Type:%x Handler: %x\n", __FUNCTION__, InterruptType, InterruptHandler));
+ DEBUG ((DEBUG_INFO, "%a: Type:%x Handler: %x\n", __func__, InterruptType, InterruptHandler));
mInterruptHandlers[InterruptType] = InterruptHandler;
return EFI_SUCCESS;
}
diff --git a/Silicon/RISC-V/ProcessorPkg/Universal/FdtDxe/FdtDxe.c b/Silicon/RISC-V/ProcessorPkg/Universal/FdtDxe/FdtDxe.c
index 1e762492..0ab70519 100644
--- a/Silicon/RISC-V/ProcessorPkg/Universal/FdtDxe/FdtDxe.c
+++ b/Silicon/RISC-V/ProcessorPkg/Universal/FdtDxe/FdtDxe.c
@@ -49,7 +49,7 @@ FixDtb (
DEBUG ((
DEBUG_ERROR,
"Device Tree can't be expanded to accommodate new node\n",
- __FUNCTION__
+ __func__
));
return EFI_OUT_OF_RESOURCES;
}
@@ -83,7 +83,7 @@ InstallFdtFromHob (
DEBUG ((
DEBUG_ERROR,
"Failed to find RISC-V DTB Hob\n",
- __FUNCTION__
+ __func__
));
return EFI_NOT_FOUND;
}
@@ -101,7 +101,7 @@ InstallFdtFromHob (
DEBUG ((
DEBUG_ERROR,
"%a: failed to install FDT configuration table\n",
- __FUNCTION__
+ __func__
));
}
diff --git a/Silicon/RISC-V/ProcessorPkg/Universal/SmbiosDxe/RiscVSmbiosDxe.c b/Silicon/RISC-V/ProcessorPkg/Universal/SmbiosDxe/RiscVSmbiosDxe.c
index 1375bb0a..60c92b4f 100644
--- a/Silicon/RISC-V/ProcessorPkg/Universal/SmbiosDxe/RiscVSmbiosDxe.c
+++ b/Silicon/RISC-V/ProcessorPkg/Universal/SmbiosDxe/RiscVSmbiosDxe.c
@@ -46,7 +46,7 @@ BuildSmbiosType7 (
Type7DataHob->EndingZero = 0;
Status = mSmbios->Add (mSmbios, NULL, &Handle, &Type7DataHob->SmbiosType7Cache.Hdr);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Fail to add SMBIOS Type 7\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Fail to add SMBIOS Type 7\n", __func__));
return Status;
}
@@ -306,7 +306,7 @@ RiscVSmbiosBuilderEntry (
RISC_V_PROCESSOR_TYPE4_HOB_DATA *Type4HobData;
SMBIOS_HANDLE Processor;
- DEBUG ((DEBUG_INFO, "%a: entry\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: entry\n", __func__));
Status = gBS->LocateProtocol (
&gEfiSmbiosProtocolGuid,
@@ -345,6 +345,6 @@ RiscVSmbiosBuilderEntry (
GuidHob = GetNextGuidHob ((EFI_GUID *)PcdGetPtr (PcdProcessorSmbiosType4GuidHobGuid), GET_NEXT_HOB (GuidHob));
} while (GuidHob != NULL);
- DEBUG ((DEBUG_INFO, "%a: exit\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: exit\n", __func__));
return Status;
}
diff --git a/Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c b/Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c
index aed00b2b..33555c26 100644
--- a/Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c
+++ b/Silicon/SiFive/U54/Library/PeiCoreInfoHobLib/CoreInfoHob.c
@@ -57,7 +57,7 @@ CreateU54E51CoreProcessorSpecificDataHob (
EFI_RISCV_OPENSBI_FIRMWARE_CONTEXT *FirmwareContext;
EFI_RISCV_FIRMWARE_CONTEXT_HART_SPECIFIC *FirmwareContextHartSpecific;
- DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));
if (GuidHobData == NULL) {
return EFI_INVALID_PARAMETER;
diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c
index aa380cd9..9579a673 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c
@@ -85,9 +85,9 @@ NorFlashFvbInitialize (
// Install the Default FVB header if required
if (EFI_ERROR(Status)) {
// There is no valid header, so time to install one.
- DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __func__));
DEBUG ((DEBUG_INFO, "%a: Installing a correct one for this volume.\n",
- __FUNCTION__));
+ __func__));
// Erase all the NorFlash that is reserved for variable storage
FvbNumLba = (PcdGet32(PcdFlashNvStorageVariableSize) +
@@ -119,7 +119,7 @@ NorFlashFvbInitialize (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: Failed to install gEdkiiNvVarStoreFormattedGuid\n",
- __FUNCTION__));
+ __func__));
return Status;
}
diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
index 48774e95..4420ba27 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
@@ -145,14 +145,14 @@ ValidateFvHeader (
)
{
DEBUG ((DEBUG_INFO, "%a: No Firmware Volume header present\n",
- __FUNCTION__));
+ __func__));
return EFI_NOT_FOUND;
}
// Check the Firmware Volume Guid
if (!CompareGuid (&FwVolHeader->FileSystemGuid, &gEfiSystemNvDataFvGuid)) {
DEBUG ((DEBUG_INFO, "%a: Firmware Volume Guid non-compatible\n",
- __FUNCTION__));
+ __func__));
return EFI_NOT_FOUND;
}
@@ -160,7 +160,7 @@ ValidateFvHeader (
Checksum = CalculateSum16((UINT16*)FwVolHeader, FwVolHeader->HeaderLength);
if (Checksum != 0) {
DEBUG ((DEBUG_INFO, "%a: FV checksum is invalid (Checksum:0x%X)\n",
- __FUNCTION__, Checksum));
+ __func__, Checksum));
return EFI_NOT_FOUND;
}
@@ -172,7 +172,7 @@ ValidateFvHeader (
!CompareGuid (&VariableStoreHeader->Signature,
&gEfiAuthenticatedVariableGuid)) {
DEBUG ((DEBUG_INFO, "%a: Variable Store Guid non-compatible\n",
- __FUNCTION__));
+ __func__));
return EFI_NOT_FOUND;
}
@@ -180,7 +180,7 @@ ValidateFvHeader (
FwVolHeader->HeaderLength;
if (VariableStoreHeader->Size != VariableStoreLength) {
DEBUG ((DEBUG_INFO, "%a: Variable Store Length does not match\n",
- __FUNCTION__));
+ __func__));
return EFI_NOT_FOUND;
}
diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashSmm.c b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashSmm.c
index 718b19b3..88940cc7 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashSmm.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashSmm.c
@@ -69,9 +69,9 @@ NorFlashFvbInitialize (
Status = ValidateFvHeader (Instance);
if (EFI_ERROR (Status)) {
// There is no valid header, so time to install one.
- DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __func__));
DEBUG ((DEBUG_INFO, "%a: Installing a correct one for this volume.\n",
- __FUNCTION__));
+ __func__));
// Erase all the NorFlash that is reserved for variable storage
FvbNumLba = (PcdGet32(PcdFlashNvStorageVariableSize) +
diff --git a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.c b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.c
index 25cc1ac2..996b04bc 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.c
@@ -1069,7 +1069,7 @@ NetsecInit (
Status = Probe (DriverBindingHandle, LanDriver);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
- "NETSEC:%a(): Probe failed with status %d\n", __FUNCTION__, Status));
+ "NETSEC:%a(): Probe failed with status %d\n", __func__, Status));
goto CloseDeviceProtocol;
}
@@ -1149,7 +1149,7 @@ NetsecInit (
// Say what the status of loading the protocol structure is
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: InstallMultipleProtocolInterfaces failed - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
ogma_terminate (LanDriver->Handle);
goto CloseDeviceProtocol;
}
diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Pci.c b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Pci.c
index 53b8d290..6b4fe83b 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Pci.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Pci.c
@@ -90,7 +90,7 @@ RetrainAsm1184eDownstreamPort (
DEBUG ((DEBUG_INFO,
"%a: retraining ASM118x downstream PCIe port at %04x:%02x:%02x to Gen2\n",
- __FUNCTION__, SegmentNumber, BusNumber, DeviceNumber));
+ __func__, SegmentNumber, BusNumber, DeviceNumber));
Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint16,
ASM118x_PCIE_LINK_CONTROL_OFFSET, 1, &LinkControl);
@@ -113,7 +113,7 @@ EnableAsm1061SpreadSpectrum (
UINT8 SscVal;
DEBUG ((DEBUG_INFO, "%a: enabling spread spectrum mode 0 for ASM1061\n",
- __FUNCTION__));
+ __func__));
// SSC mode 0~-4000 ppm, 1:1 modulation
@@ -161,7 +161,7 @@ OnPciIoProtocolNotify (
ARRAY_SIZE (PciVidPid), &PciVidPid);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to read PCI vendor/product ID - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
continue;
}
diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
index 2030ef79..1dc1ed54 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c
@@ -288,12 +288,12 @@ EnableSettingsForm (
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
sizeof (Settings), &Settings);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_WARN, "%a: EfiSetVariable failed - %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_WARN, "%a: EfiSetVariable failed - %r\n", __func__,
Status));
return Status;
}
} else if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_WARN, "%a: EfiGetVariable failed - %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_WARN, "%a: EfiGetVariable failed - %r\n", __func__,
Status));
return Status;
}
@@ -324,7 +324,7 @@ InstallAcpiTables (
&TableKey);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to install SSDT table for eMMC - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
}
@@ -333,7 +333,7 @@ InstallAcpiTables (
&TableKey);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to install SSDT table for OP-TEE - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
}
}
@@ -405,7 +405,7 @@ PlatformDxeEntryPoint (
}
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
- "%a: failed to install FDT configuration table - %r\n", __FUNCTION__,
+ "%a: failed to install FDT configuration table - %r\n", __func__,
Status));
}
} else {
@@ -418,7 +418,7 @@ PlatformDxeEntryPoint (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: failed to install gEdkiiPlatformHasAcpiGuid as a protocol\n",
- __FUNCTION__));
+ __func__));
}
}
diff --git a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
index 8aa97990..5d182632 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c
@@ -161,27 +161,27 @@ SynQuacerI2cMasterStart (
MmioWrite8 (I2c->MmioBase + F_I2C_REG_DAR, SlaveAddress << 1);
}
- DEBUG ((DEBUG_INFO, "%a: slave:0x%02x\n", __FUNCTION__,
+ DEBUG ((DEBUG_INFO, "%a: slave:0x%02x\n", __func__,
SlaveAddress));
Bsr = MmioRead8 (I2c->MmioBase + F_I2C_REG_BSR);
Bcr = MmioRead8 (I2c->MmioBase + F_I2C_REG_BCR);
if ((Bsr & F_I2C_BSR_BB) && !(Bcr & F_I2C_BCR_MSS)) {
- DEBUG ((DEBUG_INFO, "%a: bus is busy\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: bus is busy\n", __func__));
return EFI_ALREADY_STARTED;
}
if (Bsr & F_I2C_BSR_BB) { // Bus is busy
- DEBUG ((DEBUG_INFO, "%a: Continuous Start\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Continuous Start\n", __func__));
MmioWrite8 (I2c->MmioBase + F_I2C_REG_BCR, Bcr | F_I2C_BCR_SCC);
} else {
if (Bcr & F_I2C_BCR_MSS) {
DEBUG ((DEBUG_WARN,
- "%a: is not in master mode\n", __FUNCTION__));
+ "%a: is not in master mode\n", __func__));
return EFI_DEVICE_ERROR;
}
- DEBUG ((DEBUG_INFO, "%a: Start Condition\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Start Condition\n", __func__));
MmioWrite8 (I2c->MmioBase + F_I2C_REG_BCR,
Bcr | F_I2C_BCR_MSS | F_I2C_BCR_INTE | F_I2C_BCR_BEIE);
}
@@ -323,12 +323,12 @@ SynQuacerI2cStartRequest (
Status = WaitForInterrupt (I2c);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: Timeout waiting for interrupt - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
break;
}
if (MmioRead8 (I2c->MmioBase + F_I2C_REG_BSR) & F_I2C_BSR_LRB) {
- DEBUG ((DEBUG_WARN, "%a: No ack received\n", __FUNCTION__));
+ DEBUG ((DEBUG_WARN, "%a: No ack received\n", __func__));
Status = EFI_DEVICE_ERROR;
break;
}
@@ -339,13 +339,13 @@ SynQuacerI2cStartRequest (
Bcr = MmioRead8 (I2c->MmioBase + F_I2C_REG_BCR);
if (Bcr & F_I2C_BCR_BER) {
- DEBUG ((DEBUG_WARN, "%a: Bus error detected\n", __FUNCTION__));
+ DEBUG ((DEBUG_WARN, "%a: Bus error detected\n", __func__));
Status = EFI_DEVICE_ERROR;
break;
}
if ((Bsr & F_I2C_BSR_AL) || !(Bcr & F_I2C_BCR_MSS)) {
- DEBUG ((DEBUG_WARN, "%a: Arbitration lost\n", __FUNCTION__));
+ DEBUG ((DEBUG_WARN, "%a: Arbitration lost\n", __func__));
Status = EFI_DEVICE_ERROR;
break;
}
@@ -362,7 +362,7 @@ SynQuacerI2cStartRequest (
Status = WaitForInterrupt (I2c);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN,
- "%a: Timeout waiting for interrupt - %r\n", __FUNCTION__, Status));
+ "%a: Timeout waiting for interrupt - %r\n", __func__, Status));
break;
}
@@ -377,12 +377,12 @@ SynQuacerI2cStartRequest (
Status = WaitForInterrupt (I2c);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN,
- "%a: Timeout waiting for interrupt - %r\n", __FUNCTION__, Status));
+ "%a: Timeout waiting for interrupt - %r\n", __func__, Status));
break;
}
if (MmioRead8 (I2c->MmioBase + F_I2C_REG_BSR) & F_I2C_BSR_LRB) {
- DEBUG ((DEBUG_WARN, "%a: No ack received\n", __FUNCTION__));
+ DEBUG ((DEBUG_WARN, "%a: No ack received\n", __func__));
Status = EFI_DEVICE_ERROR;
break;
}
@@ -480,7 +480,7 @@ SynQuacerI2cInit (
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to add memory space - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
Status = gDS->SetMemorySpaceAttributes (
diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerDtbLoaderLib/SynQuacerDtbLoaderLib.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerDtbLoaderLib/SynQuacerDtbLoaderLib.c
index 94fbb7a4..193922bd 100644
--- a/Silicon/Socionext/SynQuacer/Library/SynQuacerDtbLoaderLib/SynQuacerDtbLoaderLib.c
+++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerDtbLoaderLib/SynQuacerDtbLoaderLib.c
@@ -29,13 +29,13 @@ EnableDtNode (
Node = fdt_path_offset (Dtb, NodePath);
if (Node < 0) {
DEBUG ((DEBUG_ERROR, "%a: failed to locate DT path '%a': %a\n",
- __FUNCTION__, NodePath, fdt_strerror (Node)));
+ __func__, NodePath, fdt_strerror (Node)));
return;
}
Rc = fdt_setprop_string (Dtb, Node, "status", "okay");
if (Rc < 0) {
DEBUG ((DEBUG_ERROR, "%a: failed to set status to 'disabled' on '%a': %a\n",
- __FUNCTION__, NodePath, fdt_strerror (Rc)));
+ __func__, NodePath, fdt_strerror (Rc)));
}
}
@@ -81,7 +81,7 @@ DtPlatformLoadDtb (
Rc = fdt_open_into (OrigDtb, CopyDtb, CopyDtbSize);
if (Rc < 0) {
- DEBUG ((DEBUG_ERROR, "%a: fdt_open_into () failed: %a\n", __FUNCTION__,
+ DEBUG ((DEBUG_ERROR, "%a: fdt_open_into () failed: %a\n", __func__,
fdt_strerror (Rc)));
return EFI_NOT_FOUND;
}
diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c
index 2db88ec5..c7db7fd1 100644
--- a/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c
+++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c
@@ -210,11 +210,11 @@ CheckCapsule (
CapsuleBufferLength);
if (!EFI_ERROR (Status)) {
DEBUG ((DEBUG_INFO, "%a: Coalesced capsule @ %p (0x%lx)\n",
- __FUNCTION__, *CapsuleBuffer, *CapsuleBufferLength));
+ __func__, *CapsuleBuffer, *CapsuleBufferLength));
return TRUE;
} else {
DEBUG ((DEBUG_WARN, "%a: failed to coalesce() capsule (Status == %r)\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
}
return FALSE;
@@ -273,7 +273,7 @@ MemoryPeim (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: Capsule->CreateState failed (Status == %r)\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
}
diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
index bded74dc..18cebb1d 100644
--- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
+++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c
@@ -97,7 +97,7 @@ GetFvbByAddress (
if (EFI_ERROR (Status) || !(Attributes & EFI_FVB2_WRITE_STATUS)) {
DEBUG ((DEBUG_INFO,
"%a: ignoring read-only FVB protocol implementation\n",
- __FUNCTION__));
+ __func__));
Status = EFI_NOT_FOUND;
continue;
}
@@ -105,14 +105,14 @@ GetFvbByAddress (
Status = Fvb->GetBlockSize (Fvb, 0, BlockSize, &NumberOfBlocks);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_INFO, "%a: failed to get FVB blocksize - %r, ignoring\n",
- __FUNCTION__, Status));
+ __func__, Status));
continue;
}
if ((Length % *BlockSize) != 0) {
DEBUG ((DEBUG_INFO,
"%a: Length 0x%lx is not a multiple of the blocksize 0x%lx, ignoring\n",
- __FUNCTION__, Length, *BlockSize));
+ __func__, Length, *BlockSize));
Status = EFI_INVALID_PARAMETER;
continue;
}
@@ -224,7 +224,7 @@ PerformFlashWriteWithProgress (
if (FlashAddressType != FlashAddressTypeAbsoluteAddress) {
DEBUG ((DEBUG_ERROR, "%a: only FlashAddressTypeAbsoluteAddress supported\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
@@ -232,7 +232,7 @@ PerformFlashWriteWithProgress (
if (FirmwareType != PlatformFirmwareTypeSystemFirmware) {
DEBUG ((DEBUG_ERROR,
"%a: only PlatformFirmwareTypeSystemFirmware supported\n",
- __FUNCTION__));
+ __func__));
return EFI_INVALID_PARAMETER;
}
@@ -246,7 +246,7 @@ PerformFlashWriteWithProgress (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: failed to locate FVB handle for address 0x%llx - %r\n",
- __FUNCTION__, FlashAddress, Status));
+ __func__, FlashAddress, Status));
return Status;
}
@@ -257,13 +257,13 @@ PerformFlashWriteWithProgress (
FlashAddress, Length, EFI_MEMORY_UC);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: gDS->AddMemorySpace () failed - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
}
Status = gDS->SetMemorySpaceAttributes (FlashAddress, Length, EFI_MEMORY_UC);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: gDS->SetMemorySpaceAttributes () failed - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return Status;
}
@@ -281,13 +281,13 @@ PerformFlashWriteWithProgress (
// Erase the region
//
DEBUG ((DEBUG_INFO, "%a: erasing 0x%llx bytes at address %llx (LBA 0x%lx)\n",
- __FUNCTION__, Length, FlashAddress, Lba));
+ __func__, Length, FlashAddress, Lba));
Status = Fvb->EraseBlocks (Fvb, Lba, Length / BlockSize,
EFI_LBA_LIST_TERMINATOR);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Fvb->EraseBlocks () failed - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
return Status;
}
@@ -296,7 +296,7 @@ PerformFlashWriteWithProgress (
// Write the new data
//
DEBUG ((DEBUG_INFO, "%a: writing 0x%llx bytes at LBA 0x%lx\n",
- __FUNCTION__, BlockSize, Lba));
+ __func__, BlockSize, Lba));
NumBytes = BlockSize;
if (BufferHasData (Buffer, NumBytes)) {
@@ -304,7 +304,7 @@ PerformFlashWriteWithProgress (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR,
"%a: write of LBA 0x%lx failed - %r (NumBytes == 0x%lx)\n",
- __FUNCTION__, Lba, Status, NumBytes));
+ __func__, Lba, Status, NumBytes));
}
}
diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformPeiLib/SynQuacerPlatformPeiLib.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformPeiLib/SynQuacerPlatformPeiLib.c
index e8412dd8..d460c2d9 100644
--- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformPeiLib/SynQuacerPlatformPeiLib.c
+++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformPeiLib/SynQuacerPlatformPeiLib.c
@@ -114,14 +114,14 @@ ReadGpioInput (
Status = Gpio->Set (Gpio, Pin, GPIO_MODE_INPUT);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to set GPIO %d as input - %r\n",
- __FUNCTION__, Pin, Status));
+ __func__, Pin, Status));
return Status;
}
Status = Gpio->Get (Gpio, Pin, Value);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: failed to get GPIO %d state - %r\n",
- __FUNCTION__, Pin, Status));
+ __func__, Pin, Status));
}
return Status;
}
@@ -144,7 +144,7 @@ PlatformPeim (
Status = ReadGpioInput (Gpio, FixedPcdGet8 (PcdClearSettingsGpioPin), &Value);
if (!EFI_ERROR (Status) && Value == CLEAR_SETTINGS_GPIO_ASSERTED) {
- DEBUG ((DEBUG_INFO, "%a: clearing NVRAM\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: clearing NVRAM\n", __func__));
PeiServicesSetBootMode (BOOT_WITH_DEFAULT_SETTINGS);
}
@@ -152,7 +152,7 @@ PlatformPeim (
&Value);
if (!EFI_ERROR (Status) && Value == PCIE_GPIO_CARD_PRESENT) {
DEBUG ((DEBUG_INFO,
- "%a: card detected in PCIe RC #0, enabling\n", __FUNCTION__));
+ "%a: card detected in PCIe RC #0, enabling\n", __func__));
Status = PcdSet8S (PcdPcieEnableMask, PcdGet8 (PcdPcieEnableMask) | BIT0);
ASSERT_EFI_ERROR (Status);
}
diff --git a/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/DriverBinding.c b/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/DriverBinding.c
index f1a9771f..2c39e6b5 100755
--- a/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/DriverBinding.c
+++ b/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/DriverBinding.c
@@ -145,14 +145,14 @@ DriverStart (
Status = DmaAllocateBuffer (EfiBootServicesData,
EFI_SIZE_TO_PAGES (sizeof (DESIGNWARE_HW_DESCRIPTOR)), (VOID *)&Snp->MacDriver.TxdescRing[Index]);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a () for TxdescRing: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a () for TxdescRing: %r\n", __func__, Status));
return Status;
}
Status = DmaMap (MapOperationBusMasterCommonBuffer, Snp->MacDriver.TxdescRing[Index],
&DescriptorSize, &Snp->MacDriver.TxdescRingMap[Index].AddrMap, &Snp->MacDriver.TxdescRingMap[Index].Mapping);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a () for TxdescRing: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a () for TxdescRing: %r\n", __func__, Status));
return Status;
}
@@ -160,14 +160,14 @@ DriverStart (
Status = DmaAllocateBuffer (EfiBootServicesData,
EFI_SIZE_TO_PAGES (sizeof (DESIGNWARE_HW_DESCRIPTOR)), (VOID *)&Snp->MacDriver.RxdescRing[Index]);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a () for RxdescRing: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a () for RxdescRing: %r\n", __func__, Status));
return Status;
}
Status = DmaMap (MapOperationBusMasterCommonBuffer, Snp->MacDriver.RxdescRing[Index],
&DescriptorSize, &Snp->MacDriver.RxdescRingMap[Index].AddrMap, &Snp->MacDriver.RxdescRingMap[Index].Mapping);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a () for RxdescRing: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a () for RxdescRing: %r\n", __func__, Status));
return Status;
}
@@ -176,7 +176,7 @@ DriverStart (
Status = DmaMap (MapOperationBusMasterWrite, (VOID *) RxBufferAddr,
&BufferSize, &RxBufferAddrMap, &Snp->MacDriver.RxBufNum[Index].Mapping);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a () for Rxbuffer: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a () for Rxbuffer: %r\n", __func__, Status));
return Status;
}
Snp->MacDriver.RxBufNum[Index].AddrMap= RxBufferAddrMap;
@@ -319,7 +319,7 @@ DriverStop (
(VOID **)&SnpProtocol
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a (): HandleProtocol: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a (): HandleProtocol: %r\n", __func__, Status));
return Status;
}
@@ -331,7 +331,7 @@ DriverStop (
&Snp->Snp,
NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a (): UninstallMultipleProtocolInterfaces: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a (): UninstallMultipleProtocolInterfaces: %r\n", __func__, Status));
return Status;
}
diff --git a/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/DwEmacSnpDxe.c b/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/DwEmacSnpDxe.c
index 4cb3371d..7249813e 100755
--- a/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/DwEmacSnpDxe.c
+++ b/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/DwEmacSnpDxe.c
@@ -45,7 +45,7 @@ SnpStart (
{
SIMPLE_NETWORK_DRIVER *Snp;
- DEBUG ((DEBUG_INFO,"SNP:DXE: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO,"SNP:DXE: %a ()\r\n", __func__));
// Check Snp instance
if (This == NULL) {
@@ -94,7 +94,7 @@ SnpStop (
{
SIMPLE_NETWORK_DRIVER *Snp;
- DEBUG ((DEBUG_INFO, "SNP:DXE: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:DXE: %a ()\r\n", __func__));
// Check Snp Instance
if (This == NULL) {
@@ -168,7 +168,7 @@ SnpInitialize (
EFI_STATUS Status;
SIMPLE_NETWORK_DRIVER *Snp;
- DEBUG ((DEBUG_INFO, "SNP:DXE: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:DXE: %a ()\r\n", __func__));
// Check Snp Instance
if (This == NULL) {
@@ -252,7 +252,7 @@ SnpReset (
Snp = INSTANCE_FROM_SNP_THIS (This);
- DEBUG ((DEBUG_INFO, "SNP:DXE: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:DXE: %a ()\r\n", __func__));
// Check Snp Instance
if (This == NULL) {
@@ -304,7 +304,7 @@ SnpShutdown (
{
SIMPLE_NETWORK_DRIVER *Snp;
- DEBUG ((DEBUG_INFO, "SNP:DXE: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:DXE: %a ()\r\n", __func__));
// Check Snp Instance
if (This == NULL) {
@@ -571,7 +571,7 @@ SnpStatistics (
Snp = INSTANCE_FROM_SNP_THIS (This);
- DEBUG ((DEBUG_INFO, "SNP:DXE: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:DXE: %a ()\r\n", __func__));
// Check Snp instance
if (This == NULL) {
@@ -648,7 +648,7 @@ SnpMcastIptoMac (
)
{
- DEBUG ((DEBUG_INFO, "SNP:DXE: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:DXE: %a ()\r\n", __func__));
// Check Snp instance
if (This == NULL) {
@@ -997,7 +997,7 @@ SnpTransmit (
Status = DmaMap (MapOperationBusMasterRead, (VOID *)(UINTN)TxDescriptor->Addr,
&BufferSizeBuf, &TxBufferAddrMap, &Snp->MappingTxbuf);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a () for Txbuffer: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a () for Txbuffer: %r\n", __func__, Status));
return Status;
}
TxDescriptorMap->Addr = TxBufferAddrMap;
@@ -1242,7 +1242,7 @@ SnpReceive (
Status = DmaMap (MapOperationBusMasterWrite, (VOID *)RxBufferAddr,
&BufferSizeBuf, &RxBufferAddrMap, &Snp->MacDriver.RxBufNum[DescNum].Mapping);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a () for Rxbuffer: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a () for Rxbuffer: %r\n", __func__, Status));
return Status;
}
Snp->MacDriver.RxBufNum[DescNum].AddrMap = RxBufferAddrMap;
diff --git a/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c b/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c
index 26d3ff61..dd02589b 100755
--- a/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c
+++ b/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/EmacDxeUtil.c
@@ -28,7 +28,7 @@ EmacSetMacAddress (
IN UINTN MacBaseAddress
)
{
- DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __func__));
// Note: This MAC_ADDR0 registers programming sequence cannot be swap:
// Must program HIGH Offset first before LOW Offset
@@ -62,7 +62,7 @@ EmacReadMacAddress (
UINT32 MacAddrHighValue;
UINT32 MacAddrLowValue;
- DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __func__));
// Read the Mac Addr high register
MacAddrHighValue = (MmioRead32 (MacBaseAddress + DW_EMAC_GMACGRP_MAC_ADDRESS0_HIGH_OFST) & 0xFFFF);
@@ -90,7 +90,7 @@ EmacDxeInitialization (
IN UINTN MacBaseAddress
)
{
- DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __func__));
// Init EMAC DMA
EmacDmaInit (EmacDriver, MacBaseAddress);
@@ -110,7 +110,7 @@ EmacDmaInit (
UINT32 DmaOpmode;
UINT32 InterruptEnable;
- DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __func__));
// This section provides the instructions for initializing the DMA registers in the proper sequence. This
// initialization sequence can be done after the EMAC interface initialization has been completed. Perform
@@ -298,7 +298,7 @@ EmacStartTransmission (
IN UINTN MacBaseAddress
)
{
- DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __func__));
MmioOr32 (MacBaseAddress +
DW_EMAC_GMACGRP_MAC_CONFIGURATION_OFST,
DW_EMAC_GMACGRP_MAC_CONFIGURATION_RE_SET_MSK |
@@ -449,7 +449,7 @@ EmacStopTxRx (
IN UINTN MacBaseAddress
)
{
- DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __func__));
// Stop DMA TX
MmioAnd32 (MacBaseAddress +
@@ -620,7 +620,7 @@ EmacGetStatistic (
{
EFI_NETWORK_STATISTICS *Stats;
- DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:MAC: %a ()\r\n", __func__));
// Allocate Resources
Stats = AllocateZeroPool (sizeof (EFI_NETWORK_STATISTICS));
diff --git a/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/PhyDxeUtil.c b/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/PhyDxeUtil.c
index 84cf0a4b..9f661d17 100755
--- a/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/PhyDxeUtil.c
+++ b/Silicon/Synopsys/DesignWare/Drivers/DwEmacSnpDxe/PhyDxeUtil.c
@@ -31,7 +31,7 @@ PhyDxeInitialization (
{
EFI_STATUS Status;
- DEBUG ((DEBUG_INFO, "SNP:PHY: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:PHY: %a ()\r\n", __func__));
// initialize the phyaddr
PhyDriver->PhyAddr = 0;
@@ -60,7 +60,7 @@ PhyDetectDevice (
UINT32 PhyAddr;
EFI_STATUS Status;
- DEBUG ((DEBUG_INFO, "SNP:PHY: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:PHY: %a ()\r\n", __func__));
for (PhyAddr = 0; PhyAddr < 32; PhyAddr++) {
Status = PhyReadId (PhyAddr, MacBaseAddress);
@@ -87,7 +87,7 @@ PhyConfig (
{
EFI_STATUS Status;
- DEBUG ((DEBUG_INFO, "SNP:PHY: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:PHY: %a ()\r\n", __func__));
Status = PhySoftReset (PhyDriver, MacBaseAddress);
if (EFI_ERROR (Status)) {
@@ -123,7 +123,7 @@ PhySoftReset (
UINT32 Data32;
EFI_STATUS Status;
- DEBUG ((DEBUG_INFO, "SNP:PHY: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:PHY: %a ()\r\n", __func__));
// PHY Basic Control Register reset
PhyWrite (PhyDriver->PhyAddr, PHY_BASIC_CTRL, PHYCTRL_RESET, MacBaseAddress);
@@ -289,7 +289,7 @@ PhyAutoNego (
UINT32 PhyStatus;
UINT32 Features;
- DEBUG ((DEBUG_INFO, "SNP:PHY: %a ()\r\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "SNP:PHY: %a ()\r\n", __func__));
// Read PHY Status
Status = PhyRead (PhyDriver->PhyAddr, PHY_BASIC_STATUS, &PhyStatus, MacBaseAddress);
diff --git a/Silicon/TexasInstruments/Omap35xxPkg/InterruptDxe/HardwareInterrupt.c b/Silicon/TexasInstruments/Omap35xxPkg/InterruptDxe/HardwareInterrupt.c
index d15e68ed..82075f0c 100644
--- a/Silicon/TexasInstruments/Omap35xxPkg/InterruptDxe/HardwareInterrupt.c
+++ b/Silicon/TexasInstruments/Omap35xxPkg/InterruptDxe/HardwareInterrupt.c
@@ -308,7 +308,7 @@ CpuArchEventProtocolNotify (
//
Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID **)&Cpu);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: gBS->LocateProtocol() - %r\n", __FUNCTION__,
+ DEBUG ((DEBUG_ERROR, "%a: gBS->LocateProtocol() - %r\n", __func__,
Status));
ASSERT (FALSE);
return;
@@ -320,7 +320,7 @@ CpuArchEventProtocolNotify (
Status = Cpu->RegisterInterruptHandler (Cpu, EXCEPT_ARM_IRQ, NULL);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Cpu->RegisterInterruptHandler() - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
ASSERT (FALSE);
return;
}
@@ -332,7 +332,7 @@ CpuArchEventProtocolNotify (
IrqInterruptHandler);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Cpu->RegisterInterruptHandler() - %r\n",
- __FUNCTION__, Status));
+ __func__, Status));
ASSERT (FALSE);
return;
}
--
2.51.2