MdeModulePkg: Update code to be more C11 compliant by using __func__

__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among
others support, while __func__ was standardized in C99.

Since it's more standard, replace __FUNCTION__ with __func__ throughout
MdeModulePkg.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Rebecca Cran
2023-04-06 13:50:06 -06:00
committed by mergify[bot]
parent 8ba392687b
commit 7b82da70ed
47 changed files with 181 additions and 181 deletions

View File

@ -759,7 +759,7 @@ AhciPioTransfer (
DEBUG_ERROR, DEBUG_ERROR,
"%a: Driver only support a maximum of 0x%x PRDT entries, " "%a: Driver only support a maximum of 0x%x PRDT entries, "
"current number of data byte 0x%x is too large, maximum allowed is 0x%x.\n", "current number of data byte 0x%x is too large, maximum allowed is 0x%x.\n",
__FUNCTION__, __func__,
AHCI_MAX_PRDT_NUMBER, AHCI_MAX_PRDT_NUMBER,
DataCount, DataCount,
AHCI_MAX_PRDT_NUMBER * AHCI_MAX_DATA_PER_PRDT AHCI_MAX_PRDT_NUMBER * AHCI_MAX_DATA_PER_PRDT
@ -778,7 +778,7 @@ AhciPioTransfer (
&MapData &MapData
); );
if (EFI_ERROR (Status) || (MapLength != DataCount)) { if (EFI_ERROR (Status) || (MapLength != DataCount)) {
DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __func__));
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
@ -860,7 +860,7 @@ AhciPioTransfer (
Offset = FisBaseAddr + AHCI_PIO_FIS_OFFSET; Offset = FisBaseAddr + AHCI_PIO_FIS_OFFSET;
Status = AhciCheckMemSet (Offset, AHCI_FIS_TYPE_MASK, AHCI_FIS_PIO_SETUP); Status = AhciCheckMemSet (Offset, AHCI_FIS_TYPE_MASK, AHCI_FIS_PIO_SETUP);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
DEBUG ((DEBUG_INFO, "%a: PioFisReceived.\n", __FUNCTION__)); DEBUG ((DEBUG_INFO, "%a: PioFisReceived.\n", __func__));
PioFisReceived = TRUE; PioFisReceived = TRUE;
} }
@ -874,7 +874,7 @@ AhciPioTransfer (
Offset = FisBaseAddr + AHCI_D2H_FIS_OFFSET; Offset = FisBaseAddr + AHCI_D2H_FIS_OFFSET;
Status = AhciCheckMemSet (Offset, AHCI_FIS_TYPE_MASK, AHCI_FIS_REGISTER_D2H); Status = AhciCheckMemSet (Offset, AHCI_FIS_TYPE_MASK, AHCI_FIS_REGISTER_D2H);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
DEBUG ((DEBUG_INFO, "%a: D2hFisReceived.\n", __FUNCTION__)); DEBUG ((DEBUG_INFO, "%a: D2hFisReceived.\n", __func__));
D2hFisReceived = TRUE; D2hFisReceived = TRUE;
} }
@ -918,7 +918,7 @@ AhciPioTransfer (
Timeout Timeout
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: AhciWaitMemSet (%r)\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: AhciWaitMemSet (%r)\n", __func__, Status));
goto Exit; goto Exit;
} }
@ -1479,7 +1479,7 @@ IdentifyAtaDevice (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Not a hard disk device on Port 0x%x PortMultiplierPort 0x%x\n", "%a: Not a hard disk device on Port 0x%x PortMultiplierPort 0x%x\n",
__FUNCTION__, __func__,
DeviceData->Port, DeviceData->Port,
DeviceData->PortMultiplier DeviceData->PortMultiplier
)); ));
@ -1489,7 +1489,7 @@ IdentifyAtaDevice (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Identify Device: Port 0x%x PortMultiplierPort 0x%x\n", "%a: Identify Device: Port 0x%x PortMultiplierPort 0x%x\n",
__FUNCTION__, __func__,
DeviceData->Port, DeviceData->Port,
DeviceData->PortMultiplier DeviceData->PortMultiplier
)); ));
@ -1518,7 +1518,7 @@ IdentifyAtaDevice (
} }
if (Capacity == 0) { if (Capacity == 0) {
DEBUG ((DEBUG_ERROR, "%a: Invalid Capacity (0) for ATA device.\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: Invalid Capacity (0) for ATA device.\n", __func__));
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
@ -1532,7 +1532,7 @@ IdentifyAtaDevice (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: PhyLogicSectorSupport = 0x%x\n", "%a: PhyLogicSectorSupport = 0x%x\n",
__FUNCTION__, __func__,
PhyLogicSectorSupport PhyLogicSectorSupport
)); ));
if ((PhyLogicSectorSupport & (BIT14 | BIT15)) == BIT14) { if ((PhyLogicSectorSupport & (BIT14 | BIT15)) == BIT14) {
@ -1550,20 +1550,20 @@ IdentifyAtaDevice (
// //
MaxSectorCount = mMaxTransferBlockNumber[DeviceData->Lba48Bit]; MaxSectorCount = mMaxTransferBlockNumber[DeviceData->Lba48Bit];
if ((Media->BlockSize == 0) || (Media->BlockSize > MAX_UINT32 / MaxSectorCount)) { if ((Media->BlockSize == 0) || (Media->BlockSize > MAX_UINT32 / MaxSectorCount)) {
DEBUG ((DEBUG_ERROR, "%a: Invalid BlockSize (0x%x).\n", __FUNCTION__, Media->BlockSize)); DEBUG ((DEBUG_ERROR, "%a: Invalid BlockSize (0x%x).\n", __func__, Media->BlockSize));
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: BlockSize = 0x%x, LastBlock = 0x%lx\n", "%a: BlockSize = 0x%x, LastBlock = 0x%lx\n",
__FUNCTION__, __func__,
Media->BlockSize, Media->BlockSize,
Media->LastBlock Media->LastBlock
)); ));
if ((IdentifyData->trusted_computing_support & BIT0) != 0) { if ((IdentifyData->trusted_computing_support & BIT0) != 0) {
DEBUG ((DEBUG_INFO, "%a: Found Trust Computing feature support.\n", __FUNCTION__)); DEBUG ((DEBUG_INFO, "%a: Found Trust Computing feature support.\n", __func__));
DeviceData->TrustComputing = TRUE; DeviceData->TrustComputing = TRUE;
} }
@ -1686,7 +1686,7 @@ AhciModeInitialization (
Status = AhciReset (AhciBar, AHCI_PEI_RESET_TIMEOUT); Status = AhciReset (AhciBar, AHCI_PEI_RESET_TIMEOUT);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: AHCI HBA reset failed with %r.\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: AHCI HBA reset failed with %r.\n", __func__, Status));
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
@ -1708,7 +1708,7 @@ AhciModeInitialization (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Transfer-related data allocation failed with %r.\n", "%a: Transfer-related data allocation failed with %r.\n",
__FUNCTION__, __func__,
Status Status
)); ));
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
@ -1814,7 +1814,7 @@ AhciModeInitialization (
// //
Offset = AHCI_PORT_START + Port * AHCI_PORT_REG_WIDTH + AHCI_PORT_CMD; Offset = AHCI_PORT_START + Port * AHCI_PORT_REG_WIDTH + AHCI_PORT_CMD;
AhciAndReg (AhciBar, Offset, (UINT32) ~(AHCI_PORT_CMD_SUD)); AhciAndReg (AhciBar, Offset, (UINT32) ~(AHCI_PORT_CMD_SUD));
DEBUG ((DEBUG_ERROR, "%a: No device detected at Port %d.\n", __FUNCTION__, Port)); DEBUG ((DEBUG_ERROR, "%a: No device detected at Port %d.\n", __func__, Port));
continue; continue;
} }
@ -1844,7 +1844,7 @@ AhciModeInitialization (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Port %d device presence detected but phy not ready (TFD=0x%x).\n", "%a: Port %d device presence detected but phy not ready (TFD=0x%x).\n",
__FUNCTION__, __func__,
Port, Port,
Data Data
)); ));
@ -1866,7 +1866,7 @@ AhciModeInitialization (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Error occurred when waiting for the first D2H register FIS - %r\n", "%a: Error occurred when waiting for the first D2H register FIS - %r\n",
__FUNCTION__, __func__,
Status Status
)); ));
continue; continue;
@ -1876,11 +1876,11 @@ AhciModeInitialization (
if ((Data & AHCI_ATAPI_SIG_MASK) == AHCI_ATA_DEVICE_SIG) { if ((Data & AHCI_ATAPI_SIG_MASK) == AHCI_ATA_DEVICE_SIG) {
Status = AhciIdentify (Private, Port, 0, PortIndex - 1, &IdentifyData); Status = AhciIdentify (Private, Port, 0, PortIndex - 1, &IdentifyData);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: AhciIdentify() failed with %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: AhciIdentify() failed with %r\n", __func__, Status));
continue; continue;
} }
DEBUG ((DEBUG_INFO, "%a: ATA hard disk found on Port %d.\n", __FUNCTION__, Port)); DEBUG ((DEBUG_INFO, "%a: ATA hard disk found on Port %d.\n", __func__, Port));
} else { } else {
continue; continue;
} }

View File

@ -156,7 +156,7 @@ AtaAhciInitPrivateData (
// //
Status = PeiServicesGetBootMode (&BootMode); Status = PeiServicesGetBootMode (&BootMode);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __func__));
return Status; return Status;
} }
@ -168,7 +168,7 @@ AtaAhciInitPrivateData (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: The device path is invalid.\n", "%a: The device path is invalid.\n",
__FUNCTION__ __func__
)); ));
return Status; return Status;
} }
@ -196,7 +196,7 @@ AtaAhciInitPrivateData (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Fail to allocate private data.\n", "%a: Fail to allocate private data.\n",
__FUNCTION__ __func__
)); ));
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
@ -260,7 +260,7 @@ AtaAhciInitPrivateData (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Security Security Command PPI will be produced.\n", "%a: Security Security Command PPI will be produced.\n",
__FUNCTION__ __func__
)); ));
Private->StorageSecurityPpi.Revision = EDKII_STORAGE_SECURITY_PPI_REVISION; Private->StorageSecurityPpi.Revision = EDKII_STORAGE_SECURITY_PPI_REVISION;
Private->StorageSecurityPpi.GetNumberofDevices = AhciStorageSecurityGetDeviceNo; Private->StorageSecurityPpi.GetNumberofDevices = AhciStorageSecurityGetDeviceNo;
@ -329,7 +329,7 @@ AtaAhciInitPrivateDataFromHostControllerPpi (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Fail to allocate get the device path for Controller %d.\n", "%a: Fail to allocate get the device path for Controller %d.\n",
__FUNCTION__, __func__,
Controller Controller
)); ));
return Status; return Status;
@ -340,7 +340,7 @@ AtaAhciInitPrivateDataFromHostControllerPpi (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Controller initialization fail for Controller %d with Status - %r.\n", "%a: Controller initialization fail for Controller %d with Status - %r.\n",
__FUNCTION__, __func__,
Controller, Controller,
Status Status
)); ));
@ -348,7 +348,7 @@ AtaAhciInitPrivateDataFromHostControllerPpi (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Controller %d has been successfully initialized.\n", "%a: Controller %d has been successfully initialized.\n",
__FUNCTION__, __func__,
Controller Controller
)); ));
} }
@ -471,7 +471,7 @@ AtaAhciInitPrivateDataFromPciDevice (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Failed to init controller, with Status - %r\n", "%a: Failed to init controller, with Status - %r\n",
__FUNCTION__, __func__,
Status Status
)); ));
} }
@ -522,7 +522,7 @@ AtaAhciPeimEntry (
IN CONST EFI_PEI_SERVICES **PeiServices IN CONST EFI_PEI_SERVICES **PeiServices
) )
{ {
DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__)); DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__));
PeiServicesNotifyPpi (&mAtaAhciHostControllerNotify); PeiServicesNotifyPpi (&mAtaAhciHostControllerNotify);

View File

@ -101,7 +101,7 @@ AccessAtaDevice (
DEBUG (( DEBUG ((
DEBUG_BLKIO, DEBUG_BLKIO,
"%a: Blocking AccessAtaDevice, TransferBlockNumber = %x; StartLba = %x\n", "%a: Blocking AccessAtaDevice, TransferBlockNumber = %x; StartLba = %x\n",
__FUNCTION__, __func__,
TransferBlockNumber, TransferBlockNumber,
StartLba StartLba
)); ));

View File

@ -1863,7 +1863,7 @@ EhcDriverBindingStart (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: failed to enable 64-bit DMA on 64-bit capable controller @ %p (%r)\n", "%a: failed to enable 64-bit DMA on 64-bit capable controller @ %p (%r)\n",
__FUNCTION__, __func__,
Controller, Controller,
Status Status
)); ));

View File

@ -836,7 +836,7 @@ EhciInsertAsyncIntTransfer (
Data = AllocatePool (DataLen); Data = AllocatePool (DataLen);
if (Data == NULL) { if (Data == NULL) {
DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __func__));
return NULL; return NULL;
} }
@ -858,7 +858,7 @@ EhciInsertAsyncIntTransfer (
); );
if (Urb == NULL) { if (Urb == NULL) {
DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __func__));
gBS->FreePool (Data); gBS->FreePool (Data);
return NULL; return NULL;
} }

View File

@ -1843,7 +1843,7 @@ InitializePciIoProtocol (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: resource count exceeds number of emulated BARs\n", "%a: resource count exceeds number of emulated BARs\n",
__FUNCTION__ __func__
)); ));
ASSERT (FALSE); ASSERT (FALSE);
break; break;

View File

@ -216,7 +216,7 @@ NvmeRead (
DEBUG_BLKIO, DEBUG_BLKIO,
"%a: Lba = 0x%08Lx, Original = 0x%08Lx, " "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
"Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",
__FUNCTION__, __func__,
Lba, Lba,
(UINT64)OrginalBlocks, (UINT64)OrginalBlocks,
(UINT64)Blocks, (UINT64)Blocks,
@ -302,7 +302,7 @@ NvmeWrite (
DEBUG_BLKIO, DEBUG_BLKIO,
"%a: Lba = 0x%08Lx, Original = 0x%08Lx, " "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
"Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",
__FUNCTION__, __func__,
Lba, Lba,
(UINT64)OrginalBlocks, (UINT64)OrginalBlocks,
(UINT64)Blocks, (UINT64)Blocks,
@ -817,7 +817,7 @@ NvmeAsyncRead (
DEBUG_BLKIO, DEBUG_BLKIO,
"%a: Lba = 0x%08Lx, Original = 0x%08Lx, " "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
"Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",
__FUNCTION__, __func__,
Lba, Lba,
(UINT64)OrginalBlocks, (UINT64)OrginalBlocks,
(UINT64)Blocks, (UINT64)Blocks,
@ -945,7 +945,7 @@ NvmeAsyncWrite (
DEBUG_BLKIO, DEBUG_BLKIO,
"%a: Lba = 0x%08Lx, Original = 0x%08Lx, " "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
"Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",
__FUNCTION__, __func__,
Lba, Lba,
(UINT64)OrginalBlocks, (UINT64)OrginalBlocks,
(UINT64)Blocks, (UINT64)Blocks,

View File

@ -91,7 +91,7 @@ EnumerateNvmeDevNamespace (
NamespaceData NamespaceData
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyNamespace fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyNamespace fail, Status - %r\n", __func__, Status));
goto Exit; goto Exit;
} }
@ -99,7 +99,7 @@ EnumerateNvmeDevNamespace (
// Validate Namespace // Validate Namespace
// //
if (NamespaceData->Ncap == 0) { if (NamespaceData->Ncap == 0) {
DEBUG ((DEBUG_INFO, "%a: Namespace ID %d is an inactive one.\n", __FUNCTION__, NamespaceId)); DEBUG ((DEBUG_INFO, "%a: Namespace ID %d is an inactive one.\n", __func__, NamespaceId));
Status = EFI_DEVICE_ERROR; Status = EFI_DEVICE_ERROR;
goto Exit; goto Exit;
} }
@ -142,7 +142,7 @@ EnumerateNvmeDevNamespace (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Namespace ID %d - BlockSize = 0x%x, LastBlock = 0x%lx\n", "%a: Namespace ID %d - BlockSize = 0x%x, LastBlock = 0x%lx\n",
__FUNCTION__, __func__,
NamespaceId, NamespaceId,
NamespaceInfo->Media.BlockSize, NamespaceInfo->Media.BlockSize,
NamespaceInfo->Media.LastBlock NamespaceInfo->Media.LastBlock
@ -246,14 +246,14 @@ NvmeInitPrivateData (
PEI_NVME_CONTROLLER_PRIVATE_DATA *Private; PEI_NVME_CONTROLLER_PRIVATE_DATA *Private;
EFI_PHYSICAL_ADDRESS DeviceAddress; EFI_PHYSICAL_ADDRESS DeviceAddress;
DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__)); DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__));
// //
// Get the current boot mode. // Get the current boot mode.
// //
Status = PeiServicesGetBootMode (&BootMode); Status = PeiServicesGetBootMode (&BootMode);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __func__));
return Status; return Status;
} }
@ -265,7 +265,7 @@ NvmeInitPrivateData (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: The device path is invalid.\n", "%a: The device path is invalid.\n",
__FUNCTION__ __func__
)); ));
return Status; return Status;
} }
@ -282,7 +282,7 @@ NvmeInitPrivateData (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: skipped during S3.\n", "%a: skipped during S3.\n",
__FUNCTION__ __func__
)); ));
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -295,7 +295,7 @@ NvmeInitPrivateData (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Fail to allocate private data.\n", "%a: Fail to allocate private data.\n",
__FUNCTION__ __func__
)); ));
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} }
@ -313,13 +313,13 @@ NvmeInitPrivateData (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Fail to allocate DMA buffers.\n", "%a: Fail to allocate DMA buffers.\n",
__FUNCTION__ __func__
)); ));
return Status; return Status;
} }
ASSERT (DeviceAddress == ((EFI_PHYSICAL_ADDRESS)(UINTN)Private->Buffer)); ASSERT (DeviceAddress == ((EFI_PHYSICAL_ADDRESS)(UINTN)Private->Buffer));
DEBUG ((DEBUG_INFO, "%a: DMA buffer base at 0x%x\n", __FUNCTION__, Private->Buffer)); DEBUG ((DEBUG_INFO, "%a: DMA buffer base at 0x%x\n", __func__, Private->Buffer));
// //
// Initialize controller private data // Initialize controller private data
@ -337,7 +337,7 @@ NvmeInitPrivateData (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Controller initialization fail with Status - %r.\n", "%a: Controller initialization fail with Status - %r.\n",
__FUNCTION__, __func__,
Status Status
)); ));
NvmeFreeDmaResource (Private); NvmeFreeDmaResource (Private);
@ -355,7 +355,7 @@ NvmeInitPrivateData (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Namespaces discovery fail with Status - %r.\n", "%a: Namespaces discovery fail with Status - %r.\n",
__FUNCTION__, __func__,
Status Status
)); ));
NvmeFreeDmaResource (Private); NvmeFreeDmaResource (Private);
@ -414,7 +414,7 @@ NvmeInitPrivateData (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Security Security Command PPI will be produced.\n", "%a: Security Security Command PPI will be produced.\n",
__FUNCTION__ __func__
)); ));
Private->StorageSecurityPpi.Revision = EDKII_STORAGE_SECURITY_PPI_REVISION; Private->StorageSecurityPpi.Revision = EDKII_STORAGE_SECURITY_PPI_REVISION;
Private->StorageSecurityPpi.GetNumberofDevices = NvmeStorageSecurityGetDeviceNo; Private->StorageSecurityPpi.GetNumberofDevices = NvmeStorageSecurityGetDeviceNo;
@ -557,7 +557,7 @@ NvmeInitControllerDataFromPciDevice (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Failed to init controller, with Status - %r\n", "%a: Failed to init controller, with Status - %r\n",
__FUNCTION__, __func__,
Status Status
)); ));
} }
@ -635,7 +635,7 @@ NvmeInitControllerFromHostControllerPpi (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Fail to allocate get the device path for Controller %d.\n", "%a: Fail to allocate get the device path for Controller %d.\n",
__FUNCTION__, __func__,
Controller Controller
)); ));
return Status; return Status;
@ -646,7 +646,7 @@ NvmeInitControllerFromHostControllerPpi (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Controller initialization fail for Controller %d with Status - %r.\n", "%a: Controller initialization fail for Controller %d with Status - %r.\n",
__FUNCTION__, __func__,
Controller, Controller,
Status Status
)); ));
@ -654,7 +654,7 @@ NvmeInitControllerFromHostControllerPpi (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Controller %d has been successfully initialized.\n", "%a: Controller %d has been successfully initialized.\n",
__FUNCTION__, __func__,
Controller Controller
)); ));
} }
@ -712,7 +712,7 @@ NvmExpressPeimEntry (
IN CONST EFI_PEI_SERVICES **PeiServices IN CONST EFI_PEI_SERVICES **PeiServices
) )
{ {
DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__)); DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__));
PeiServicesNotifyPpi (&mNvmeHostControllerNotify); PeiServicesNotifyPpi (&mNvmeHostControllerNotify);

View File

@ -125,14 +125,14 @@ NvmeRead (
MaxTransferBlocks = MaxTransferBlocks >> 1; MaxTransferBlocks = MaxTransferBlocks >> 1;
if ((Retries > NVME_READ_MAX_RETRY) || (MaxTransferBlocks < 1)) { if ((Retries > NVME_READ_MAX_RETRY) || (MaxTransferBlocks < 1)) {
DEBUG ((DEBUG_ERROR, "%a: ReadSectors fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: ReadSectors fail, Status - %r\n", __func__, Status));
break; break;
} }
DEBUG (( DEBUG ((
DEBUG_BLKIO, DEBUG_BLKIO,
"%a: ReadSectors fail, retry with smaller transfer block number - 0x%x\n", "%a: ReadSectors fail, retry with smaller transfer block number - 0x%x\n",
__FUNCTION__, __func__,
MaxTransferBlocks MaxTransferBlocks
)); ));
continue; continue;
@ -151,7 +151,7 @@ NvmeRead (
DEBUG_BLKIO, DEBUG_BLKIO,
"%a: Lba = 0x%08Lx, Original = 0x%08Lx, " "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
"Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",
__FUNCTION__, __func__,
Lba, Lba,
(UINT64)OrginalBlocks, (UINT64)OrginalBlocks,
(UINT64)Blocks, (UINT64)Blocks,

View File

@ -138,7 +138,7 @@ NvmeBaseMemPageOffset (
PageSizeList[4] = NVME_PRP_SIZE; /* PRPs */ PageSizeList[4] = NVME_PRP_SIZE; /* PRPs */
if (BaseMemIndex > MAX_BASEMEM_COUNT) { if (BaseMemIndex > MAX_BASEMEM_COUNT) {
DEBUG ((DEBUG_ERROR, "%a: The input BaseMem index is invalid.\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: The input BaseMem index is invalid.\n", __func__));
ASSERT (FALSE); ASSERT (FALSE);
return 0; return 0;
} }
@ -191,7 +191,7 @@ NvmeWaitController (
// //
Status = NVME_GET_CSTS (Private, &Csts); Status = NVME_GET_CSTS (Private, &Csts);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CSTS fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CSTS fail, Status - %r\n", __func__, Status));
return Status; return Status;
} }
@ -232,7 +232,7 @@ NvmeDisableController (
// //
Status = NVME_GET_CC (Private, &Cc); Status = NVME_GET_CC (Private, &Cc);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CC fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CC fail, Status - %r\n", __func__, Status));
goto ErrorExit; goto ErrorExit;
} }
@ -243,21 +243,21 @@ NvmeDisableController (
// //
Status = NVME_SET_CC (Private, &Cc); Status = NVME_SET_CC (Private, &Cc);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __func__, Status));
goto ErrorExit; goto ErrorExit;
} }
} }
Status = NvmeWaitController (Private, FALSE); Status = NvmeWaitController (Private, FALSE);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __func__, Status));
goto ErrorExit; goto ErrorExit;
} }
return EFI_SUCCESS; return EFI_SUCCESS;
ErrorExit: ErrorExit:
DEBUG ((DEBUG_ERROR, "%a fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a fail, Status - %r\n", __func__, Status));
return Status; return Status;
} }
@ -289,20 +289,20 @@ NvmeEnableController (
Cc.Iocqes = 4; Cc.Iocqes = 4;
Status = NVME_SET_CC (Private, &Cc); Status = NVME_SET_CC (Private, &Cc);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __func__, Status));
goto ErrorExit; goto ErrorExit;
} }
Status = NvmeWaitController (Private, TRUE); Status = NvmeWaitController (Private, TRUE);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __func__, Status));
goto ErrorExit; goto ErrorExit;
} }
return EFI_SUCCESS; return EFI_SUCCESS;
ErrorExit: ErrorExit:
DEBUG ((DEBUG_ERROR, "%a fail, Status: %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a fail, Status: %r\n", __func__, Status));
return Status; return Status;
} }
@ -572,7 +572,7 @@ NvmeControllerInit (
// //
NVME_GET_CAP (Private, &Private->Cap); NVME_GET_CAP (Private, &Private->Cap);
if ((Private->Cap.Css & BIT0) == 0) { if ((Private->Cap.Css & BIT0) == 0) {
DEBUG ((DEBUG_ERROR, "%a: The NVME controller doesn't support NVMe command set.\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: The NVME controller doesn't support NVMe command set.\n", __func__));
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
@ -580,7 +580,7 @@ NvmeControllerInit (
// Currently, the driver only supports 4k page size // Currently, the driver only supports 4k page size
// //
if ((Private->Cap.Mpsmin + 12) > EFI_PAGE_SHIFT) { if ((Private->Cap.Mpsmin + 12) > EFI_PAGE_SHIFT) {
DEBUG ((DEBUG_ERROR, "%a: The driver doesn't support page size other than 4K.\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: The driver doesn't support page size other than 4K.\n", __func__));
ASSERT (FALSE); ASSERT (FALSE);
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
@ -599,7 +599,7 @@ NvmeControllerInit (
// //
Status = NvmeDisableController (Private); Status = NvmeDisableController (Private);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: NvmeDisableController fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: NvmeDisableController fail, Status - %r\n", __func__, Status));
return Status; return Status;
} }
@ -647,7 +647,7 @@ NvmeControllerInit (
// //
Status = NvmeEnableController (Private); Status = NvmeEnableController (Private);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: NvmeEnableController fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: NvmeEnableController fail, Status - %r\n", __func__, Status));
return Status; return Status;
} }
@ -663,7 +663,7 @@ NvmeControllerInit (
Status = NvmeIdentifyController (Private, Private->ControllerData); Status = NvmeIdentifyController (Private, Private->ControllerData);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyController fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyController fail, Status - %r\n", __func__, Status));
return Status; return Status;
} }
@ -676,7 +676,7 @@ NvmeControllerInit (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Number of Namespaces field in Identify Controller data not supported by the driver.\n", "%a: Number of Namespaces field in Identify Controller data not supported by the driver.\n",
__FUNCTION__ __func__
)); ));
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
@ -686,13 +686,13 @@ NvmeControllerInit (
// //
Status = NvmeCreateIoCompletionQueue (Private); Status = NvmeCreateIoCompletionQueue (Private);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Create IO completion queue fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: Create IO completion queue fail, Status - %r\n", __func__, Status));
return Status; return Status;
} }
Status = NvmeCreateIoSubmissionQueue (Private); Status = NvmeCreateIoSubmissionQueue (Private);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Create IO submission queue fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: Create IO submission queue fail, Status - %r\n", __func__, Status));
} }
return Status; return Status;

View File

@ -57,7 +57,7 @@ NvmeCreatePrpList (
DEBUG_ERROR, DEBUG_ERROR,
"%a: The implementation only supports PrpList number up to 4." "%a: The implementation only supports PrpList number up to 4."
" But %d are needed here.\n", " But %d are needed here.\n",
__FUNCTION__, __func__,
PrpListNo PrpListNo
)); ));
return 0; return 0;
@ -365,7 +365,7 @@ NvmePassThruExecute (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a, Invalid parameter: Packet(%lx)\n", "%a, Invalid parameter: Packet(%lx)\n",
__FUNCTION__, __func__,
(UINTN)Packet (UINTN)Packet
)); ));
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
@ -375,7 +375,7 @@ NvmePassThruExecute (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a, Invalid parameter: NvmeCmd (%lx)/NvmeCompletion(%lx)\n", "%a, Invalid parameter: NvmeCmd (%lx)/NvmeCompletion(%lx)\n",
__FUNCTION__, __func__,
(UINTN)Packet->NvmeCmd, (UINTN)Packet->NvmeCmd,
(UINTN)Packet->NvmeCompletion (UINTN)Packet->NvmeCompletion
)); ));
@ -386,7 +386,7 @@ NvmePassThruExecute (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a, Invalid parameter: QueueId(%lx)\n", "%a, Invalid parameter: QueueId(%lx)\n",
__FUNCTION__, __func__,
(UINTN)Packet->QueueType (UINTN)Packet->QueueType
)); ));
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
@ -407,7 +407,7 @@ NvmePassThruExecute (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Nsid mismatch (%x, %x)\n", "%a: Nsid mismatch (%x, %x)\n",
__FUNCTION__, __func__,
Packet->NvmeCmd->Nsid, Packet->NvmeCmd->Nsid,
NamespaceId NamespaceId
)); ));
@ -425,7 +425,7 @@ NvmePassThruExecute (
// //
ASSERT (Sq->Psdt == 0); ASSERT (Sq->Psdt == 0);
if (Sq->Psdt != 0) { if (Sq->Psdt != 0) {
DEBUG ((DEBUG_ERROR, "%a: Does not support SGL mechanism.\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: Does not support SGL mechanism.\n", __func__));
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
@ -458,7 +458,7 @@ NvmePassThruExecute (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Does not support external IO queues creation request.\n", "%a: Does not support external IO queues creation request.\n",
__FUNCTION__ __func__
)); ));
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
@ -480,7 +480,7 @@ NvmePassThruExecute (
); );
if (EFI_ERROR (Status) || (MapLength != Packet->TransferLength)) { if (EFI_ERROR (Status) || (MapLength != Packet->TransferLength)) {
Status = EFI_OUT_OF_RESOURCES; Status = EFI_OUT_OF_RESOURCES;
DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __func__));
goto Exit; goto Exit;
} }
@ -498,7 +498,7 @@ NvmePassThruExecute (
); );
if (EFI_ERROR (Status) || (MapLength != Packet->MetadataLength)) { if (EFI_ERROR (Status) || (MapLength != Packet->MetadataLength)) {
Status = EFI_OUT_OF_RESOURCES; Status = EFI_OUT_OF_RESOURCES;
DEBUG ((DEBUG_ERROR, "%a: Fail to map meta data buffer.\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: Fail to map meta data buffer.\n", __func__));
goto Exit; goto Exit;
} }
@ -526,7 +526,7 @@ NvmePassThruExecute (
); );
if (Sq->Prp[1] == 0) { if (Sq->Prp[1] == 0) {
Status = EFI_OUT_OF_RESOURCES; Status = EFI_OUT_OF_RESOURCES;
DEBUG ((DEBUG_ERROR, "%a: Create PRP list fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: Create PRP list fail, Status - %r\n", __func__, Status));
goto Exit; goto Exit;
} }
} else if ((Offset + Bytes) > EFI_PAGE_SIZE) { } else if ((Offset + Bytes) > EFI_PAGE_SIZE) {
@ -568,7 +568,7 @@ NvmePassThruExecute (
Data32 = ReadUnaligned32 ((UINT32 *)&Private->SqTdbl[QueueId]); Data32 = ReadUnaligned32 ((UINT32 *)&Private->SqTdbl[QueueId]);
Status = NVME_SET_SQTDBL (Private, QueueId, &Data32); Status = NVME_SET_SQTDBL (Private, QueueId, &Data32);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: NVME_SET_SQTDBL fail, Status - %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a: NVME_SET_SQTDBL fail, Status - %r\n", __func__, Status));
goto Exit; goto Exit;
} }
@ -591,7 +591,7 @@ NvmePassThruExecute (
// //
// Timeout occurs for an NVMe command, reset the controller to abort the outstanding command // Timeout occurs for an NVMe command, reset the controller to abort the outstanding command
// //
DEBUG ((DEBUG_ERROR, "%a: Timeout occurs for the PassThru command.\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: Timeout occurs for the PassThru command.\n", __func__));
Status = NvmeControllerInit (Private); Status = NvmeControllerInit (Private);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
Status = EFI_DEVICE_ERROR; Status = EFI_DEVICE_ERROR;

View File

@ -237,7 +237,7 @@ LocatePciExpressCapabilityRegBlock (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: [%02x|%02x|%02x] failed to access config space at offset 0x%x\n", "%a: [%02x|%02x|%02x] failed to access config space at offset 0x%x\n",
__FUNCTION__, __func__,
PciIoDevice->BusNumber, PciIoDevice->BusNumber,
PciIoDevice->DeviceNumber, PciIoDevice->DeviceNumber,
PciIoDevice->FunctionNumber, PciIoDevice->FunctionNumber,

View File

@ -128,7 +128,7 @@ IntersectIoDescriptor (
EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE,
"%a: %a: add [%Lx, %Lx): %r\n", "%a: %a: add [%Lx, %Lx): %r\n",
gEfiCallerBaseName, gEfiCallerBaseName,
__FUNCTION__, __func__,
IntersectionBase, IntersectionBase,
IntersectionEnd, IntersectionEnd,
Status Status
@ -141,7 +141,7 @@ IntersectIoDescriptor (
"%a: %a: desc [%Lx, %Lx) type %u conflicts with " "%a: %a: desc [%Lx, %Lx) type %u conflicts with "
"aperture [%Lx, %Lx)\n", "aperture [%Lx, %Lx)\n",
gEfiCallerBaseName, gEfiCallerBaseName,
__FUNCTION__, __func__,
Descriptor->BaseAddress, Descriptor->BaseAddress,
Descriptor->BaseAddress + Descriptor->Length, Descriptor->BaseAddress + Descriptor->Length,
(UINT32)Descriptor->GcdIoType, (UINT32)Descriptor->GcdIoType,
@ -178,7 +178,7 @@ AddIoSpace (
DEBUG_ERROR, DEBUG_ERROR,
"%a: %a: GetIoSpaceMap(): %r\n", "%a: %a: GetIoSpaceMap(): %r\n",
gEfiCallerBaseName, gEfiCallerBaseName,
__FUNCTION__, __func__,
Status Status
)); ));
return Status; return Status;
@ -299,7 +299,7 @@ IntersectMemoryDescriptor (
EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE,
"%a: %a: add [%Lx, %Lx): %r\n", "%a: %a: add [%Lx, %Lx): %r\n",
gEfiCallerBaseName, gEfiCallerBaseName,
__FUNCTION__, __func__,
IntersectionBase, IntersectionBase,
IntersectionEnd, IntersectionEnd,
Status Status
@ -312,7 +312,7 @@ IntersectMemoryDescriptor (
"%a: %a: desc [%Lx, %Lx) type %u cap %Lx conflicts " "%a: %a: desc [%Lx, %Lx) type %u cap %Lx conflicts "
"with aperture [%Lx, %Lx) cap %Lx\n", "with aperture [%Lx, %Lx) cap %Lx\n",
gEfiCallerBaseName, gEfiCallerBaseName,
__FUNCTION__, __func__,
Descriptor->BaseAddress, Descriptor->BaseAddress,
Descriptor->BaseAddress + Descriptor->Length, Descriptor->BaseAddress + Descriptor->Length,
(UINT32)Descriptor->GcdMemoryType, (UINT32)Descriptor->GcdMemoryType,
@ -353,7 +353,7 @@ AddMemoryMappedIoSpace (
DEBUG_ERROR, DEBUG_ERROR,
"%a: %a: GetMemorySpaceMap(): %r\n", "%a: %a: GetMemorySpaceMap(): %r\n",
gEfiCallerBaseName, gEfiCallerBaseName,
__FUNCTION__, __func__,
Status Status
)); ));
return Status; return Status;
@ -955,7 +955,7 @@ NotifyPhase (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"[%a:%d] Translation %lx is not aligned to %lx!\n", "[%a:%d] Translation %lx is not aligned to %lx!\n",
__FUNCTION__, __func__,
DEBUG_LINE_NUMBER, DEBUG_LINE_NUMBER,
Translation, Translation,
Alignment Alignment

View File

@ -641,7 +641,7 @@ SdMmcPciHcDriverBindingStart (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: found SD/MMC override protocol\n", "%a: found SD/MMC override protocol\n",
__FUNCTION__ __func__
)); ));
} }
} }
@ -676,7 +676,7 @@ SdMmcPciHcDriverBindingStart (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: Failed to override capability - %r\n", "%a: Failed to override capability - %r\n",
__FUNCTION__, __func__,
Status Status
)); ));
continue; continue;
@ -691,7 +691,7 @@ SdMmcPciHcDriverBindingStart (
(VOID *)&Private->Slot[Slot].OperatingParameters (VOID *)&Private->Slot[Slot].OperatingParameters
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "%a: Failed to get operating parameters, using defaults\n", __FUNCTION__)); DEBUG ((DEBUG_WARN, "%a: Failed to get operating parameters, using defaults\n", __func__));
} }
} }
} }

View File

@ -498,7 +498,7 @@ SdMmcHcReset (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: SD/MMC pre reset notifier callback failed - %r\n", "%a: SD/MMC pre reset notifier callback failed - %r\n",
__FUNCTION__, __func__,
Status Status
)); ));
return Status; return Status;
@ -556,7 +556,7 @@ SdMmcHcReset (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: SD/MMC post reset notifier callback failed - %r\n", "%a: SD/MMC post reset notifier callback failed - %r\n",
__FUNCTION__, __func__,
Status Status
)); ));
} }
@ -942,7 +942,7 @@ SdMmcHcClockSupply (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: SD/MMC switch clock freq post notifier callback failed - %r\n", "%a: SD/MMC switch clock freq post notifier callback failed - %r\n",
__FUNCTION__, __func__,
Status Status
)); ));
return Status; return Status;
@ -1234,7 +1234,7 @@ SdMmcHcInitHost (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: SD/MMC pre init notifier callback failed - %r\n", "%a: SD/MMC pre init notifier callback failed - %r\n",
__FUNCTION__, __func__,
Status Status
)); ));
return Status; return Status;
@ -1286,7 +1286,7 @@ SdMmcHcInitHost (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: SD/MMC post init notifier callback failed - %r\n", "%a: SD/MMC post init notifier callback failed - %r\n",
__FUNCTION__, __func__,
Status Status
)); ));
} }
@ -1375,7 +1375,7 @@ SdMmcHcUhsSignaling (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: SD/MMC uhs signaling notifier callback failed - %r\n", "%a: SD/MMC uhs signaling notifier callback failed - %r\n",
__FUNCTION__, __func__,
Status Status
)); ));
return Status; return Status;

View File

@ -2059,7 +2059,7 @@ XhcDriverBindingStart (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: failed to enable 64-bit DMA on 64-bit capable controller @ %p (%r)\n", "%a: failed to enable 64-bit DMA on 64-bit capable controller @ %p (%r)\n",
__FUNCTION__, __func__,
Controller, Controller,
Status Status
)); ));

View File

@ -1495,7 +1495,7 @@ XhciInsertAsyncIntTransfer (
Data = AllocateZeroPool (DataLen); Data = AllocateZeroPool (DataLen);
if (Data == NULL) { if (Data == NULL) {
DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __func__));
return NULL; return NULL;
} }
@ -1513,7 +1513,7 @@ XhciInsertAsyncIntTransfer (
Context Context
); );
if (Urb == NULL) { if (Urb == NULL) {
DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __func__));
FreePool (Data); FreePool (Data);
return NULL; return NULL;
} }

View File

@ -2593,7 +2593,7 @@ ScsiDiskInquiryDevice (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: invalid PageLength (%u) in Supported VPD Pages page\n", "%a: invalid PageLength (%u) in Supported VPD Pages page\n",
__FUNCTION__, __func__,
(UINT32)PageLength (UINT32)PageLength
)); ));
PageLength = 0; PageLength = 0;
@ -2606,7 +2606,7 @@ ScsiDiskInquiryDevice (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: Supported VPD Pages page doesn't start with code 0x%02x\n", "%a: Supported VPD Pages page doesn't start with code 0x%02x\n",
__FUNCTION__, __func__,
EFI_SCSI_PAGE_CODE_SUPPORTED_VPD EFI_SCSI_PAGE_CODE_SUPPORTED_VPD
)); ));
PageLength = 0; PageLength = 0;
@ -2626,7 +2626,7 @@ ScsiDiskInquiryDevice (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: non-ascending code in Supported VPD Pages page @ %u\n", "%a: non-ascending code in Supported VPD Pages page @ %u\n",
__FUNCTION__, __func__,
Index Index
)); ));
Index = 0; Index = 0;

View File

@ -1095,7 +1095,7 @@ CoreProcessFvImageFile (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a() FV at 0x%x, FvAlignment required is 0x%x\n", "%a() FV at 0x%x, FvAlignment required is 0x%x\n",
__FUNCTION__, __func__,
FvHeader, FvHeader,
FvAlignment FvAlignment
)); ));

View File

@ -315,7 +315,7 @@ DxeMain (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: MemoryBaseAddress=0x%Lx MemoryLength=0x%Lx\n", "%a: MemoryBaseAddress=0x%Lx MemoryLength=0x%Lx\n",
__FUNCTION__, __func__,
MemoryBaseAddress, MemoryBaseAddress,
MemoryLength MemoryLength
)); ));

View File

@ -838,7 +838,7 @@ InitializeDxeNxMemoryProtectionPolicy (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: StackBase = 0x%016lx StackSize = 0x%016lx\n", "%a: StackBase = 0x%016lx StackSize = 0x%016lx\n",
__FUNCTION__, __func__,
MemoryHob->AllocDescriptor.MemoryBaseAddress, MemoryHob->AllocDescriptor.MemoryBaseAddress,
MemoryHob->AllocDescriptor.MemoryLength MemoryHob->AllocDescriptor.MemoryLength
)); ));
@ -864,7 +864,7 @@ InitializeDxeNxMemoryProtectionPolicy (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: applying strict permissions to active memory regions\n", "%a: applying strict permissions to active memory regions\n",
__FUNCTION__ __func__
)); ));
MergeMemoryMapForProtectionPolicy (MemoryMap, &MemoryMapSize, DescriptorSize); MergeMemoryMapForProtectionPolicy (MemoryMap, &MemoryMapSize, DescriptorSize);
@ -926,7 +926,7 @@ InitializeDxeNxMemoryProtectionPolicy (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: applying strict permissions to inactive memory regions\n", "%a: applying strict permissions to inactive memory regions\n",
__FUNCTION__ __func__
)); ));
CoreAcquireGcdMemoryLock (); CoreAcquireGcdMemoryLock ();

View File

@ -1304,7 +1304,7 @@ GetSection (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: recursion aborted due to nesting depth\n", "%a: recursion aborted due to nesting depth\n",
__FUNCTION__ __func__
)); ));
// //
// Map "aborted" to "not found". // Map "aborted" to "not found".

View File

@ -369,7 +369,7 @@ HandOffToDxeCore (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a() Stack Base: 0x%lx, Stack Size: 0x%x\n", "%a() Stack Base: 0x%lx, Stack Size: 0x%x\n",
__FUNCTION__, __func__,
BaseOfStack, BaseOfStack,
STACK_SIZE STACK_SIZE
)); ));
@ -457,7 +457,7 @@ HandOffToDxeCore (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a() Stack Base: 0x%lx, Stack Size: 0x%x\n", "%a() Stack Base: 0x%lx, Stack Size: 0x%x\n",
__FUNCTION__, __func__,
BaseOfStack, BaseOfStack,
STACK_SIZE STACK_SIZE
)); ));

View File

@ -36,7 +36,7 @@ HandOffToDxeCore (
// //
BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE)); BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE));
if (BaseOfStack == NULL) { if (BaseOfStack == NULL) {
DEBUG ((DEBUG_ERROR, "%a: Can't allocate memory for stack.", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: Can't allocate memory for stack.", __func__));
ASSERT (FALSE); ASSERT (FALSE);
} }
@ -52,7 +52,7 @@ HandOffToDxeCore (
// //
Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi); Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Fail to signal End of PEI event.", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a: Fail to signal End of PEI event.", __func__));
ASSERT (FALSE); ASSERT (FALSE);
} }

View File

@ -101,7 +101,7 @@ DiscoverPeimsAndOrderWithApriori (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a(): Found 0x%x PEI FFS files in the %dth FV\n", "%a(): Found 0x%x PEI FFS files in the %dth FV\n",
__FUNCTION__, __func__,
PeimCount, PeimCount,
Private->CurrentPeimFvCount Private->CurrentPeimFvCount
)); ));

View File

@ -1494,7 +1494,7 @@ ProcessFvFile (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a() FV at 0x%x, FvAlignment required is 0x%x\n", "%a() FV at 0x%x, FvAlignment required is 0x%x\n",
__FUNCTION__, __func__,
FvHeader, FvHeader,
FvAlignment FvAlignment
)); ));

View File

@ -502,7 +502,7 @@ InitCapsuleVariable (
// Locate the VariablePolicy protocol // Locate the VariablePolicy protocol
Status = gBS->LocateProtocol (&gEdkiiVariablePolicyProtocolGuid, NULL, (VOID **)&VariablePolicy); Status = gBS->LocateProtocol (&gEdkiiVariablePolicyProtocolGuid, NULL, (VOID **)&VariablePolicy);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "DxeCapsuleReportLib %a - Could not locate VariablePolicy protocol! %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "DxeCapsuleReportLib %a - Could not locate VariablePolicy protocol! %r\n", __func__, Status));
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
} }

View File

@ -579,7 +579,7 @@ S3BootScriptLibDeinitialize (
return RETURN_SUCCESS; return RETURN_SUCCESS;
} }
DEBUG ((DEBUG_INFO, "%a() in %a module\n", __FUNCTION__, gEfiCallerBaseName)); DEBUG ((DEBUG_INFO, "%a() in %a module\n", __func__, gEfiCallerBaseName));
if (mEventDxeSmmReadyToLock != NULL) { if (mEventDxeSmmReadyToLock != NULL) {
// //

View File

@ -132,7 +132,7 @@ GetResetPlatformSpecificGuid (
// //
if ((ResetDataStringSize < DataSize) && ((DataSize - ResetDataStringSize) >= sizeof (GUID))) { if ((ResetDataStringSize < DataSize) && ((DataSize - ResetDataStringSize) >= sizeof (GUID))) {
ResetSubtypeGuid = (GUID *)((UINT8 *)ResetData + ResetDataStringSize); ResetSubtypeGuid = (GUID *)((UINT8 *)ResetData + ResetDataStringSize);
DEBUG ((DEBUG_VERBOSE, "%a - Detected reset subtype %g...\n", __FUNCTION__, ResetSubtypeGuid)); DEBUG ((DEBUG_VERBOSE, "%a - Detected reset subtype %g...\n", __func__, ResetSubtypeGuid));
return ResetSubtypeGuid; return ResetSubtypeGuid;
} }

View File

@ -1448,7 +1448,7 @@ BmExpandLoadFile (
"%a:%a: failed to allocate reserved pages: " "%a:%a: failed to allocate reserved pages: "
"BufferSize=%Lu LoadFile=\"%s\" FilePath=\"%s\"\n", "BufferSize=%Lu LoadFile=\"%s\" FilePath=\"%s\"\n",
gEfiCallerBaseName, gEfiCallerBaseName,
__FUNCTION__, __func__,
(UINT64)BufferSize, (UINT64)BufferSize,
LoadFileText, LoadFileText,
FileText FileText

View File

@ -581,7 +581,7 @@ BmRepairAllControllers (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"[%a:%d] Repair failed after %d retries.\n", "[%a:%d] Repair failed after %d retries.\n",
__FUNCTION__, __func__,
DEBUG_LINE_NUMBER, DEBUG_LINE_NUMBER,
ReconnectRepairCount ReconnectRepairCount
)); ));

View File

@ -95,7 +95,7 @@ VarCheckPolicyLibMmiHandler (
// //
// If either of the pointers are NULL, we can't proceed. // If either of the pointers are NULL, we can't proceed.
if ((CommBuffer == NULL) || (CommBufferSize == NULL)) { if ((CommBuffer == NULL) || (CommBufferSize == NULL)) {
DEBUG ((DEBUG_INFO, "%a - Invalid comm buffer pointers!\n", __FUNCTION__)); DEBUG ((DEBUG_INFO, "%a - Invalid comm buffer pointers!\n", __func__));
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -105,14 +105,14 @@ VarCheckPolicyLibMmiHandler (
if ((InternalCommBufferSize > VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE) || if ((InternalCommBufferSize > VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE) ||
!VarCheckPolicyIsBufferOutsideValid ((UINTN)CommBuffer, (UINT64)InternalCommBufferSize)) !VarCheckPolicyIsBufferOutsideValid ((UINTN)CommBuffer, (UINT64)InternalCommBufferSize))
{ {
DEBUG ((DEBUG_ERROR, "%a - Invalid CommBuffer supplied! 0x%016lX[0x%016lX]\n", __FUNCTION__, CommBuffer, InternalCommBufferSize)); DEBUG ((DEBUG_ERROR, "%a - Invalid CommBuffer supplied! 0x%016lX[0x%016lX]\n", __func__, CommBuffer, InternalCommBufferSize));
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
// If the size does not meet a minimum threshold, we cannot proceed. // If the size does not meet a minimum threshold, we cannot proceed.
ExpectedSize = sizeof (VAR_CHECK_POLICY_COMM_HEADER); ExpectedSize = sizeof (VAR_CHECK_POLICY_COMM_HEADER);
if (InternalCommBufferSize < ExpectedSize) { if (InternalCommBufferSize < ExpectedSize) {
DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION__, InternalCommBufferSize, ExpectedSize)); DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, InternalCommBufferSize, ExpectedSize));
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -128,7 +128,7 @@ VarCheckPolicyLibMmiHandler (
if ((InternalPolicyCommmHeader->Signature != VAR_CHECK_POLICY_COMM_SIG) || if ((InternalPolicyCommmHeader->Signature != VAR_CHECK_POLICY_COMM_SIG) ||
(InternalPolicyCommmHeader->Revision != VAR_CHECK_POLICY_COMM_REVISION)) (InternalPolicyCommmHeader->Revision != VAR_CHECK_POLICY_COMM_REVISION))
{ {
DEBUG ((DEBUG_INFO, "%a - Signature or revision are incorrect!\n", __FUNCTION__)); DEBUG ((DEBUG_INFO, "%a - Signature or revision are incorrect!\n", __func__));
// We have verified the buffer is not null and have enough size to hold Result field. // We have verified the buffer is not null and have enough size to hold Result field.
PolicyCommmHeader->Result = EFI_INVALID_PARAMETER; PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;
return EFI_SUCCESS; return EFI_SUCCESS;
@ -157,7 +157,7 @@ VarCheckPolicyLibMmiHandler (
// This add should be safe because these are fixed sizes so far. // This add should be safe because these are fixed sizes so far.
ExpectedSize += sizeof (VAR_CHECK_POLICY_COMM_IS_ENABLED_PARAMS); ExpectedSize += sizeof (VAR_CHECK_POLICY_COMM_IS_ENABLED_PARAMS);
if (InternalCommBufferSize < ExpectedSize) { if (InternalCommBufferSize < ExpectedSize) {
DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION__, InternalCommBufferSize, ExpectedSize)); DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, InternalCommBufferSize, ExpectedSize));
PolicyCommmHeader->Result = EFI_INVALID_PARAMETER; PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;
break; break;
} }
@ -173,7 +173,7 @@ VarCheckPolicyLibMmiHandler (
// This add should be safe because these are fixed sizes so far. // This add should be safe because these are fixed sizes so far.
ExpectedSize += sizeof (VARIABLE_POLICY_ENTRY); ExpectedSize += sizeof (VARIABLE_POLICY_ENTRY);
if (InternalCommBufferSize < ExpectedSize) { if (InternalCommBufferSize < ExpectedSize) {
DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION__, InternalCommBufferSize, ExpectedSize)); DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, InternalCommBufferSize, ExpectedSize));
PolicyCommmHeader->Result = EFI_INVALID_PARAMETER; PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;
break; break;
} }
@ -186,7 +186,7 @@ VarCheckPolicyLibMmiHandler (
EFI_ERROR (SafeUintnAdd (sizeof (VAR_CHECK_POLICY_COMM_HEADER), PolicyEntry->Size, &ExpectedSize)) || EFI_ERROR (SafeUintnAdd (sizeof (VAR_CHECK_POLICY_COMM_HEADER), PolicyEntry->Size, &ExpectedSize)) ||
(InternalCommBufferSize < ExpectedSize)) (InternalCommBufferSize < ExpectedSize))
{ {
DEBUG ((DEBUG_INFO, "%a - Bad policy entry contents!\n", __FUNCTION__)); DEBUG ((DEBUG_INFO, "%a - Bad policy entry contents!\n", __func__));
PolicyCommmHeader->Result = EFI_INVALID_PARAMETER; PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;
break; break;
} }
@ -199,7 +199,7 @@ VarCheckPolicyLibMmiHandler (
// This add should be safe because these are fixed sizes so far. // This add should be safe because these are fixed sizes so far.
ExpectedSize += sizeof (VAR_CHECK_POLICY_COMM_DUMP_PARAMS) + VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE; ExpectedSize += sizeof (VAR_CHECK_POLICY_COMM_DUMP_PARAMS) + VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE;
if (InternalCommBufferSize < ExpectedSize) { if (InternalCommBufferSize < ExpectedSize) {
DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION__, InternalCommBufferSize, ExpectedSize)); DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, InternalCommBufferSize, ExpectedSize));
PolicyCommmHeader->Result = EFI_INVALID_PARAMETER; PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;
break; break;
} }
@ -298,7 +298,7 @@ VarCheckPolicyLibMmiHandler (
default: default:
// Mark unknown requested command as EFI_UNSUPPORTED. // Mark unknown requested command as EFI_UNSUPPORTED.
DEBUG ((DEBUG_INFO, "%a - Invalid command requested! %d\n", __FUNCTION__, PolicyCommmHeader->Command)); DEBUG ((DEBUG_INFO, "%a - Invalid command requested! %d\n", __func__, PolicyCommmHeader->Command));
PolicyCommmHeader->Result = EFI_UNSUPPORTED; PolicyCommmHeader->Result = EFI_UNSUPPORTED;
break; break;
} }
@ -306,7 +306,7 @@ VarCheckPolicyLibMmiHandler (
DEBUG (( DEBUG ((
DEBUG_VERBOSE, DEBUG_VERBOSE,
"%a - Command %d returning %r.\n", "%a - Command %d returning %r.\n",
__FUNCTION__, __func__,
PolicyCommmHeader->Command, PolicyCommmHeader->Command,
PolicyCommmHeader->Result PolicyCommmHeader->Result
)); ));
@ -349,7 +349,7 @@ VarCheckPolicyLibCommonConstructor (
} }
// Otherwise, there's not much we can do. // Otherwise, there's not much we can do.
else { else {
DEBUG ((DEBUG_ERROR, "%a - Cannot Initialize VariablePolicyLib! %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a - Cannot Initialize VariablePolicyLib! %r\n", __func__, Status));
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
} }

View File

@ -521,7 +521,7 @@ ValidateSetVariable (
DEBUG (( DEBUG ((
DEBUG_VERBOSE, DEBUG_VERBOSE,
"%a - Bad Size. 0x%X <> 0x%X-0x%X\n", "%a - Bad Size. 0x%X <> 0x%X-0x%X\n",
__FUNCTION__, __func__,
DataSize, DataSize,
ActivePolicy->MinSize, ActivePolicy->MinSize,
ActivePolicy->MaxSize ActivePolicy->MaxSize
@ -537,7 +537,7 @@ ValidateSetVariable (
DEBUG (( DEBUG ((
DEBUG_VERBOSE, DEBUG_VERBOSE,
"%a - Bad Attributes. 0x%X <> 0x%X:0x%X\n", "%a - Bad Attributes. 0x%X <> 0x%X:0x%X\n",
__FUNCTION__, __func__,
Attributes, Attributes,
ActivePolicy->AttributesMustHave, ActivePolicy->AttributesMustHave,
ActivePolicy->AttributesCantHave ActivePolicy->AttributesCantHave
@ -598,7 +598,7 @@ ValidateSetVariable (
} }
Exit: Exit:
DEBUG ((DEBUG_VERBOSE, "%a - Variable (%g:%s) returning %r.\n", __FUNCTION__, VendorGuid, VariableName, ReturnStatus)); DEBUG ((DEBUG_VERBOSE, "%a - Variable (%g:%s) returning %r.\n", __func__, VendorGuid, VariableName, ReturnStatus));
return ReturnStatus; return ReturnStatus;
} }

View File

@ -344,7 +344,7 @@ Thunk32To64 (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n", "%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n",
__FUNCTION__, __func__,
Context->StackBufferBase, Context->StackBufferBase,
Context->StackBufferLength Context->StackBufferLength
)); ));
@ -917,7 +917,7 @@ GetScatterGatherHeadEntries (
CapsuleDataPtr64 = 0; CapsuleDataPtr64 = 0;
if ((ListLength == NULL) || (HeadList == NULL)) { if ((ListLength == NULL) || (HeadList == NULL)) {
DEBUG ((DEBUG_ERROR, "%a Invalid parameters. Inputs can't be NULL\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a Invalid parameters. Inputs can't be NULL\n", __func__));
ASSERT (ListLength != NULL); ASSERT (ListLength != NULL);
ASSERT (HeadList != NULL); ASSERT (HeadList != NULL);
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
@ -1022,7 +1022,7 @@ GetScatterGatherHeadEntries (
} }
if (ValidIndex == 0) { if (ValidIndex == 0) {
DEBUG ((DEBUG_ERROR, "%a didn't find any SG lists in variables\n", __FUNCTION__)); DEBUG ((DEBUG_ERROR, "%a didn't find any SG lists in variables\n", __func__));
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
@ -1101,7 +1101,7 @@ CapsuleCoalesce (
// //
Status = GetScatterGatherHeadEntries (&ListLength, &VariableArrayAddress); Status = GetScatterGatherHeadEntries (&ListLength, &VariableArrayAddress);
if (EFI_ERROR (Status) || (VariableArrayAddress == NULL)) { if (EFI_ERROR (Status) || (VariableArrayAddress == NULL)) {
DEBUG ((DEBUG_ERROR, "%a failed to get Scatter Gather List Head Entries. Status = %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a failed to get Scatter Gather List Head Entries. Status = %r\n", __func__, Status));
goto Done; goto Done;
} }

View File

@ -277,7 +277,7 @@ _ModuleEntryPoint (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n", "%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n",
__FUNCTION__, __func__,
EntrypointContext->StackBufferBase, EntrypointContext->StackBufferBase,
EntrypointContext->StackBufferLength EntrypointContext->StackBufferLength
)); ));

View File

@ -114,7 +114,7 @@ FindAnchorVolumeDescriptorPointer (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Media block size 0x%x unable to hold an AVDP.\n", "%a: Media block size 0x%x unable to hold an AVDP.\n",
__FUNCTION__, __func__,
BlockSize BlockSize
)); ));
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
@ -140,7 +140,7 @@ FindAnchorVolumeDescriptorPointer (
// Check if read block is a valid AVDP descriptor // Check if read block is a valid AVDP descriptor
// //
if (DescriptorTag->TagIdentifier == UdfAnchorVolumeDescriptorPointer) { if (DescriptorTag->TagIdentifier == UdfAnchorVolumeDescriptorPointer) {
DEBUG ((DEBUG_INFO, "%a: found AVDP at block %d\n", __FUNCTION__, 256)); DEBUG ((DEBUG_INFO, "%a: found AVDP at block %d\n", __func__, 256));
AvdpsCount++; AvdpsCount++;
} }
@ -167,7 +167,7 @@ FindAnchorVolumeDescriptorPointer (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: found AVDP at block %Ld\n", "%a: found AVDP at block %Ld\n",
__FUNCTION__, __func__,
EndLBA - 256 EndLBA - 256
)); ));
return EFI_SUCCESS; return EFI_SUCCESS;
@ -251,13 +251,13 @@ FindAnchorVolumeDescriptorPointer (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: found AVDP at block %Ld\n", "%a: found AVDP at block %Ld\n",
__FUNCTION__, __func__,
LastAvdpBlockNum LastAvdpBlockNum
)); ));
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: correcting last block from %Ld to %Ld\n", "%a: correcting last block from %Ld to %Ld\n",
__FUNCTION__, __func__,
EndLBA, EndLBA,
LastAvdpBlockNum LastAvdpBlockNum
)); ));

View File

@ -262,7 +262,7 @@ UdfOpen (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: GetFileSize() fails with status - %r.\n", "%a: GetFileSize() fails with status - %r.\n",
__FUNCTION__, __func__,
Status Status
)); ));
goto Error_Get_File_Size; goto Error_Get_File_Size;

View File

@ -298,7 +298,7 @@ GetLongAdLsn (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Fail to get the Partition Descriptor from the given Long Allocation Descriptor.\n", "%a: Fail to get the Partition Descriptor from the given Long Allocation Descriptor.\n",
__FUNCTION__ __func__
)); ));
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }

View File

@ -731,7 +731,7 @@ FtwRestart (
return EFI_ABORTED; return EFI_ABORTED;
} }
DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__)); DEBUG ((DEBUG_INFO, "%a(): success\n", __func__));
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -787,7 +787,7 @@ FtwAbort (
FtwDevice->FtwLastWriteHeader->Complete = FTW_VALID_STATE; FtwDevice->FtwLastWriteHeader->Complete = FTW_VALID_STATE;
DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__)); DEBUG ((DEBUG_INFO, "%a(): success\n", __func__));
return EFI_SUCCESS; return EFI_SUCCESS;
} }
@ -901,7 +901,7 @@ FtwGetLastWrite (
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
} }
DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__)); DEBUG ((DEBUG_INFO, "%a(): success\n", __func__));
return Status; return Status;
} }

View File

@ -1320,7 +1320,7 @@ InitFtwProtocol (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"Ftw: Restart working block update in %a() - %r\n", "Ftw: Restart working block update in %a() - %r\n",
__FUNCTION__, __func__,
Status Status
)); ));
FtwAbort (&FtwDevice->FtwInstance); FtwAbort (&FtwDevice->FtwInstance);

View File

@ -1632,7 +1632,7 @@ GetExPcdTokenNumber (
} }
} }
DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token number: %d\n", __FUNCTION__, Guid, ExTokenNumber)); DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token number: %d\n", __func__, Guid, ExTokenNumber));
ASSERT (FALSE); ASSERT (FALSE);
return 0; return 0;

View File

@ -1157,7 +1157,7 @@ SmbiosCreateTable (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a() re-allocate SMBIOS 32-bit table\n", "%a() re-allocate SMBIOS 32-bit table\n",
__FUNCTION__ __func__
)); ));
if (EntryPointStructure->TableAddress != 0) { if (EntryPointStructure->TableAddress != 0) {
// //
@ -1329,7 +1329,7 @@ SmbiosCreate64BitTable (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a() re-allocate SMBIOS 64-bit table\n", "%a() re-allocate SMBIOS 64-bit table\n",
__FUNCTION__ __func__
)); ));
if (Smbios30EntryPointStructure->TableAddress != 0) { if (Smbios30EntryPointStructure->TableAddress != 0) {
// //

View File

@ -116,7 +116,7 @@ MorLockInitAtEndOfDxe (
// First, we obviously need to locate the VariablePolicy protocol. // First, we obviously need to locate the VariablePolicy protocol.
Status = gBS->LocateProtocol (&gEdkiiVariablePolicyProtocolGuid, NULL, (VOID **)&VariablePolicy); Status = gBS->LocateProtocol (&gEdkiiVariablePolicyProtocolGuid, NULL, (VOID **)&VariablePolicy);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a - Could not locate VariablePolicy protocol! %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a - Could not locate VariablePolicy protocol! %r\n", __func__, Status));
return; return;
} }
@ -132,7 +132,7 @@ MorLockInitAtEndOfDxe (
VARIABLE_POLICY_TYPE_LOCK_NOW VARIABLE_POLICY_TYPE_LOCK_NOW
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status)); DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status));
} }
Status = RegisterBasicVariablePolicy ( Status = RegisterBasicVariablePolicy (
@ -146,7 +146,7 @@ MorLockInitAtEndOfDxe (
VARIABLE_POLICY_TYPE_LOCK_NOW VARIABLE_POLICY_TYPE_LOCK_NOW
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status)); DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status));
} }
return; return;

View File

@ -485,7 +485,7 @@ MorLockInitAtEndOfDxe (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: deleting unexpected / unsupported variable %g:%s\n", "%a: deleting unexpected / unsupported variable %g:%s\n",
__FUNCTION__, __func__,
&gEfiMemoryOverwriteControlDataGuid, &gEfiMemoryOverwriteControlDataGuid,
MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME
)); ));
@ -521,7 +521,7 @@ MorLockInitAtEndOfDxe (
} }
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status)); DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status));
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
} }
@ -559,7 +559,7 @@ MorLockInitAtEndOfDxe (
} }
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status)); DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status));
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
} }

View File

@ -2770,7 +2770,7 @@ VariableServiceSetVariable (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Failed to set variable '%s' with Guid %g\n", "%a: Failed to set variable '%s' with Guid %g\n",
__FUNCTION__, __func__,
VariableName, VariableName,
VendorGuid VendorGuid
)); ));
@ -2792,7 +2792,7 @@ VariableServiceSetVariable (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Failed to set variable '%s' with Guid %g\n", "%a: Failed to set variable '%s' with Guid %g\n",
__FUNCTION__, __func__,
VariableName, VariableName,
VendorGuid VendorGuid
)); ));
@ -2814,7 +2814,7 @@ VariableServiceSetVariable (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: Failed to set variable '%s' with Guid %g\n", "%a: Failed to set variable '%s' with Guid %g\n",
__FUNCTION__, __func__,
VariableName, VariableName,
VendorGuid VendorGuid
)); ));

View File

@ -48,7 +48,7 @@ VariableLockRequestToLock (
EFI_STATUS Status; EFI_STATUS Status;
VARIABLE_POLICY_ENTRY *NewPolicy; VARIABLE_POLICY_ENTRY *NewPolicy;
DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! %a() will go away soon!\n", __FUNCTION__)); DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! %a() will go away soon!\n", __func__));
DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!\n")); DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!\n"));
DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", VendorGuid, VariableName)); DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", VendorGuid, VariableName));
@ -85,7 +85,7 @@ VariableLockRequestToLock (
} }
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTION__, VariableName, Status)); DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__, VariableName, Status));
} }
if (NewPolicy != NULL) { if (NewPolicy != NULL) {

View File

@ -95,7 +95,7 @@ ProtocolDisableVariablePolicy (
PolicyHeader->Command = VAR_CHECK_POLICY_COMMAND_DISABLE; PolicyHeader->Command = VAR_CHECK_POLICY_COMMAND_DISABLE;
Status = InternalMmCommunicate (CommHeader, &BufferSize); Status = InternalMmCommunicate (CommHeader, &BufferSize);
DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status)); DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));
ReleaseLockOnlyAtBootTime (&mMmCommunicationLock); ReleaseLockOnlyAtBootTime (&mMmCommunicationLock);
@ -144,7 +144,7 @@ ProtocolIsVariablePolicyEnabled (
PolicyHeader->Command = VAR_CHECK_POLICY_COMMAND_IS_ENABLED; PolicyHeader->Command = VAR_CHECK_POLICY_COMMAND_IS_ENABLED;
Status = InternalMmCommunicate (CommHeader, &BufferSize); Status = InternalMmCommunicate (CommHeader, &BufferSize);
DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status)); DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
Status = PolicyHeader->Result; Status = PolicyHeader->Result;
@ -197,7 +197,7 @@ ProtocolRegisterVariablePolicy (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a - Policy too large for buffer! %r, %d > %d \n", "%a - Policy too large for buffer! %r, %d > %d \n",
__FUNCTION__, __func__,
Status, Status,
RequiredSize, RequiredSize,
mMmCommunicationBufferSize mMmCommunicationBufferSize
@ -222,7 +222,7 @@ ProtocolRegisterVariablePolicy (
CopyMem (PolicyBuffer, NewPolicy, NewPolicy->Size); CopyMem (PolicyBuffer, NewPolicy, NewPolicy->Size);
Status = InternalMmCommunicate (CommHeader, &BufferSize); Status = InternalMmCommunicate (CommHeader, &BufferSize);
DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status)); DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));
ReleaseLockOnlyAtBootTime (&mMmCommunicationLock); ReleaseLockOnlyAtBootTime (&mMmCommunicationLock);
@ -278,7 +278,7 @@ DumpVariablePolicyHelper (
CommandParams->PageRequested = PageRequested; CommandParams->PageRequested = PageRequested;
Status = InternalMmCommunicate (CommHeader, &BufferSize); Status = InternalMmCommunicate (CommHeader, &BufferSize);
DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status)); DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
Status = PolicyHeader->Result; Status = PolicyHeader->Result;
@ -403,7 +403,7 @@ ProtocolLockVariablePolicy (
PolicyHeader->Command = VAR_CHECK_POLICY_COMMAND_LOCK; PolicyHeader->Command = VAR_CHECK_POLICY_COMMAND_LOCK;
Status = InternalMmCommunicate (CommHeader, &BufferSize); Status = InternalMmCommunicate (CommHeader, &BufferSize);
DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status)); DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));
ReleaseLockOnlyAtBootTime (&mMmCommunicationLock); ReleaseLockOnlyAtBootTime (&mMmCommunicationLock);
@ -500,7 +500,7 @@ VariablePolicySmmDxeMain (
// Locate the shared comm buffer to use for sending MM commands. // Locate the shared comm buffer to use for sending MM commands.
Status = InitMmCommonCommBuffer (&mMmCommunicationBufferSize, &mMmCommunicationBuffer); Status = InitMmCommonCommBuffer (&mMmCommunicationBufferSize, &mMmCommunicationBuffer);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a - Failed to locate a viable MM comm buffer! %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a - Failed to locate a viable MM comm buffer! %r\n", __func__, Status));
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
return Status; return Status;
} }
@ -508,7 +508,7 @@ VariablePolicySmmDxeMain (
// Locate the MmCommunication protocol. // Locate the MmCommunication protocol.
Status = gBS->LocateProtocol (&gEfiMmCommunication2ProtocolGuid, NULL, (VOID **)&mMmCommunication); Status = gBS->LocateProtocol (&gEfiMmCommunication2ProtocolGuid, NULL, (VOID **)&mMmCommunication);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a - Failed to locate MmCommunication protocol! %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a - Failed to locate MmCommunication protocol! %r\n", __func__, Status));
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
return Status; return Status;
} }
@ -529,7 +529,7 @@ VariablePolicySmmDxeMain (
NULL NULL
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a - Failed to install protocol! %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a - Failed to install protocol! %r\n", __func__, Status));
goto Exit; goto Exit;
} else { } else {
ProtocolInstalled = TRUE; ProtocolInstalled = TRUE;
@ -551,7 +551,7 @@ VariablePolicySmmDxeMain (
&VirtualAddressChangeEvent &VirtualAddressChangeEvent
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a - Failed to create VirtualAddressChange event! %r\n", __FUNCTION__, Status)); DEBUG ((DEBUG_ERROR, "%a - Failed to create VirtualAddressChange event! %r\n", __func__, Status));
goto Exit; goto Exit;
} else { } else {
VirtualAddressChangeRegistered = TRUE; VirtualAddressChangeRegistered = TRUE;