DEBUG_ERROR,\r
"%a: Driver only support a maximum of 0x%x PRDT entries, "\r
"current number of data byte 0x%x is too large, maximum allowed is 0x%x.\n",\r
- __FUNCTION__,\r
+ __func__,\r
AHCI_MAX_PRDT_NUMBER,\r
DataCount,\r
AHCI_MAX_PRDT_NUMBER * AHCI_MAX_DATA_PER_PRDT\r
&MapData\r
);\r
if (EFI_ERROR (Status) || (MapLength != DataCount)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __func__));\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
Offset = FisBaseAddr + AHCI_PIO_FIS_OFFSET;\r
Status = AhciCheckMemSet (Offset, AHCI_FIS_TYPE_MASK, AHCI_FIS_PIO_SETUP);\r
if (!EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_INFO, "%a: PioFisReceived.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: PioFisReceived.\n", __func__));\r
PioFisReceived = TRUE;\r
}\r
\r
Offset = FisBaseAddr + AHCI_D2H_FIS_OFFSET;\r
Status = AhciCheckMemSet (Offset, AHCI_FIS_TYPE_MASK, AHCI_FIS_REGISTER_D2H);\r
if (!EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_INFO, "%a: D2hFisReceived.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: D2hFisReceived.\n", __func__));\r
D2hFisReceived = TRUE;\r
}\r
\r
Timeout\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: AhciWaitMemSet (%r)\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: AhciWaitMemSet (%r)\n", __func__, Status));\r
goto Exit;\r
}\r
\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Not a hard disk device on Port 0x%x PortMultiplierPort 0x%x\n",\r
- __FUNCTION__,\r
+ __func__,\r
DeviceData->Port,\r
DeviceData->PortMultiplier\r
));\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: Identify Device: Port 0x%x PortMultiplierPort 0x%x\n",\r
- __FUNCTION__,\r
+ __func__,\r
DeviceData->Port,\r
DeviceData->PortMultiplier\r
));\r
}\r
\r
if (Capacity == 0) {\r
- DEBUG ((DEBUG_ERROR, "%a: Invalid Capacity (0) for ATA device.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Invalid Capacity (0) for ATA device.\n", __func__));\r
return EFI_UNSUPPORTED;\r
}\r
\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: PhyLogicSectorSupport = 0x%x\n",\r
- __FUNCTION__,\r
+ __func__,\r
PhyLogicSectorSupport\r
));\r
if ((PhyLogicSectorSupport & (BIT14 | BIT15)) == BIT14) {\r
//\r
MaxSectorCount = mMaxTransferBlockNumber[DeviceData->Lba48Bit];\r
if ((Media->BlockSize == 0) || (Media->BlockSize > MAX_UINT32 / MaxSectorCount)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Invalid BlockSize (0x%x).\n", __FUNCTION__, Media->BlockSize));\r
+ DEBUG ((DEBUG_ERROR, "%a: Invalid BlockSize (0x%x).\n", __func__, Media->BlockSize));\r
return EFI_UNSUPPORTED;\r
}\r
\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: BlockSize = 0x%x, LastBlock = 0x%lx\n",\r
- __FUNCTION__,\r
+ __func__,\r
Media->BlockSize,\r
Media->LastBlock\r
));\r
\r
if ((IdentifyData->trusted_computing_support & BIT0) != 0) {\r
- DEBUG ((DEBUG_INFO, "%a: Found Trust Computing feature support.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Found Trust Computing feature support.\n", __func__));\r
DeviceData->TrustComputing = TRUE;\r
}\r
\r
\r
Status = AhciReset (AhciBar, AHCI_PEI_RESET_TIMEOUT);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: AHCI HBA reset failed with %r.\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: AHCI HBA reset failed with %r.\n", __func__, Status));\r
return EFI_DEVICE_ERROR;\r
}\r
\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Transfer-related data allocation failed with %r.\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
return EFI_OUT_OF_RESOURCES;\r
//\r
Offset = AHCI_PORT_START + Port * AHCI_PORT_REG_WIDTH + AHCI_PORT_CMD;\r
AhciAndReg (AhciBar, Offset, (UINT32) ~(AHCI_PORT_CMD_SUD));\r
- DEBUG ((DEBUG_ERROR, "%a: No device detected at Port %d.\n", __FUNCTION__, Port));\r
+ DEBUG ((DEBUG_ERROR, "%a: No device detected at Port %d.\n", __func__, Port));\r
continue;\r
}\r
\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Port %d device presence detected but phy not ready (TFD=0x%x).\n",\r
- __FUNCTION__,\r
+ __func__,\r
Port,\r
Data\r
));\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Error occurred when waiting for the first D2H register FIS - %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
continue;\r
if ((Data & AHCI_ATAPI_SIG_MASK) == AHCI_ATA_DEVICE_SIG) {\r
Status = AhciIdentify (Private, Port, 0, PortIndex - 1, &IdentifyData);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: AhciIdentify() failed with %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: AhciIdentify() failed with %r\n", __func__, Status));\r
continue;\r
}\r
\r
- DEBUG ((DEBUG_INFO, "%a: ATA hard disk found on Port %d.\n", __FUNCTION__, Port));\r
+ DEBUG ((DEBUG_INFO, "%a: ATA hard disk found on Port %d.\n", __func__, Port));\r
} else {\r
continue;\r
}\r
//\r
Status = PeiServicesGetBootMode (&BootMode);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __func__));\r
return Status;\r
}\r
\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: The device path is invalid.\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
return Status;\r
}\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Fail to allocate private data.\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
return EFI_OUT_OF_RESOURCES;\r
}\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: Security Security Command PPI will be produced.\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
Private->StorageSecurityPpi.Revision = EDKII_STORAGE_SECURITY_PPI_REVISION;\r
Private->StorageSecurityPpi.GetNumberofDevices = AhciStorageSecurityGetDeviceNo;\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Fail to allocate get the device path for Controller %d.\n",\r
- __FUNCTION__,\r
+ __func__,\r
Controller\r
));\r
return Status;\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Controller initialization fail for Controller %d with Status - %r.\n",\r
- __FUNCTION__,\r
+ __func__,\r
Controller,\r
Status\r
));\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: Controller %d has been successfully initialized.\n",\r
- __FUNCTION__,\r
+ __func__,\r
Controller\r
));\r
}\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: Failed to init controller, with Status - %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
}\r
IN CONST EFI_PEI_SERVICES **PeiServices\r
)\r
{\r
- DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__));\r
\r
PeiServicesNotifyPpi (&mAtaAhciHostControllerNotify);\r
\r
DEBUG ((\r
DEBUG_BLKIO,\r
"%a: Blocking AccessAtaDevice, TransferBlockNumber = %x; StartLba = %x\n",\r
- __FUNCTION__,\r
+ __func__,\r
TransferBlockNumber,\r
StartLba\r
));\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: failed to enable 64-bit DMA on 64-bit capable controller @ %p (%r)\n",\r
- __FUNCTION__,\r
+ __func__,\r
Controller,\r
Status\r
));\r
Data = AllocatePool (DataLen);\r
\r
if (Data == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __func__));\r
return NULL;\r
}\r
\r
);\r
\r
if (Urb == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __func__));\r
gBS->FreePool (Data);\r
return NULL;\r
}\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: resource count exceeds number of emulated BARs\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
ASSERT (FALSE);\r
break;\r
DEBUG_BLKIO,\r
"%a: Lba = 0x%08Lx, Original = 0x%08Lx, "\r
"Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Lba,\r
(UINT64)OrginalBlocks,\r
(UINT64)Blocks,\r
DEBUG_BLKIO,\r
"%a: Lba = 0x%08Lx, Original = 0x%08Lx, "\r
"Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Lba,\r
(UINT64)OrginalBlocks,\r
(UINT64)Blocks,\r
DEBUG_BLKIO,\r
"%a: Lba = 0x%08Lx, Original = 0x%08Lx, "\r
"Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Lba,\r
(UINT64)OrginalBlocks,\r
(UINT64)Blocks,\r
DEBUG_BLKIO,\r
"%a: Lba = 0x%08Lx, Original = 0x%08Lx, "\r
"Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Lba,\r
(UINT64)OrginalBlocks,\r
(UINT64)Blocks,\r
NamespaceData\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyNamespace fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyNamespace fail, Status - %r\n", __func__, Status));\r
goto Exit;\r
}\r
\r
// Validate Namespace\r
//\r
if (NamespaceData->Ncap == 0) {\r
- DEBUG ((DEBUG_INFO, "%a: Namespace ID %d is an inactive one.\n", __FUNCTION__, NamespaceId));\r
+ DEBUG ((DEBUG_INFO, "%a: Namespace ID %d is an inactive one.\n", __func__, NamespaceId));\r
Status = EFI_DEVICE_ERROR;\r
goto Exit;\r
}\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: Namespace ID %d - BlockSize = 0x%x, LastBlock = 0x%lx\n",\r
- __FUNCTION__,\r
+ __func__,\r
NamespaceId,\r
NamespaceInfo->Media.BlockSize,\r
NamespaceInfo->Media.LastBlock\r
PEI_NVME_CONTROLLER_PRIVATE_DATA *Private;\r
EFI_PHYSICAL_ADDRESS DeviceAddress;\r
\r
- DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__));\r
\r
//\r
// Get the current boot mode.\r
//\r
Status = PeiServicesGetBootMode (&BootMode);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __func__));\r
return Status;\r
}\r
\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: The device path is invalid.\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
return Status;\r
}\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: skipped during S3.\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
return EFI_SUCCESS;\r
}\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Fail to allocate private data.\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
return EFI_OUT_OF_RESOURCES;\r
}\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Fail to allocate DMA buffers.\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
return Status;\r
}\r
\r
ASSERT (DeviceAddress == ((EFI_PHYSICAL_ADDRESS)(UINTN)Private->Buffer));\r
- DEBUG ((DEBUG_INFO, "%a: DMA buffer base at 0x%x\n", __FUNCTION__, Private->Buffer));\r
+ DEBUG ((DEBUG_INFO, "%a: DMA buffer base at 0x%x\n", __func__, Private->Buffer));\r
\r
//\r
// Initialize controller private data\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Controller initialization fail with Status - %r.\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
NvmeFreeDmaResource (Private);\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Namespaces discovery fail with Status - %r.\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
NvmeFreeDmaResource (Private);\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: Security Security Command PPI will be produced.\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
Private->StorageSecurityPpi.Revision = EDKII_STORAGE_SECURITY_PPI_REVISION;\r
Private->StorageSecurityPpi.GetNumberofDevices = NvmeStorageSecurityGetDeviceNo;\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: Failed to init controller, with Status - %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
}\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Fail to allocate get the device path for Controller %d.\n",\r
- __FUNCTION__,\r
+ __func__,\r
Controller\r
));\r
return Status;\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Controller initialization fail for Controller %d with Status - %r.\n",\r
- __FUNCTION__,\r
+ __func__,\r
Controller,\r
Status\r
));\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: Controller %d has been successfully initialized.\n",\r
- __FUNCTION__,\r
+ __func__,\r
Controller\r
));\r
}\r
IN CONST EFI_PEI_SERVICES **PeiServices\r
)\r
{\r
- DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__));\r
\r
PeiServicesNotifyPpi (&mNvmeHostControllerNotify);\r
\r
MaxTransferBlocks = MaxTransferBlocks >> 1;\r
\r
if ((Retries > NVME_READ_MAX_RETRY) || (MaxTransferBlocks < 1)) {\r
- DEBUG ((DEBUG_ERROR, "%a: ReadSectors fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: ReadSectors fail, Status - %r\n", __func__, Status));\r
break;\r
}\r
\r
DEBUG ((\r
DEBUG_BLKIO,\r
"%a: ReadSectors fail, retry with smaller transfer block number - 0x%x\n",\r
- __FUNCTION__,\r
+ __func__,\r
MaxTransferBlocks\r
));\r
continue;\r
DEBUG_BLKIO,\r
"%a: Lba = 0x%08Lx, Original = 0x%08Lx, "\r
"Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Lba,\r
(UINT64)OrginalBlocks,\r
(UINT64)Blocks,\r
PageSizeList[4] = NVME_PRP_SIZE; /* PRPs */\r
\r
if (BaseMemIndex > MAX_BASEMEM_COUNT) {\r
- DEBUG ((DEBUG_ERROR, "%a: The input BaseMem index is invalid.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: The input BaseMem index is invalid.\n", __func__));\r
ASSERT (FALSE);\r
return 0;\r
}\r
//\r
Status = NVME_GET_CSTS (Private, &Csts);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CSTS fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CSTS fail, Status - %r\n", __func__, Status));\r
return Status;\r
}\r
\r
//\r
Status = NVME_GET_CC (Private, &Cc);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CC fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CC fail, Status - %r\n", __func__, Status));\r
goto ErrorExit;\r
}\r
\r
//\r
Status = NVME_SET_CC (Private, &Cc);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __func__, Status));\r
goto ErrorExit;\r
}\r
}\r
\r
Status = NvmeWaitController (Private, FALSE);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __func__, Status));\r
goto ErrorExit;\r
}\r
\r
return EFI_SUCCESS;\r
\r
ErrorExit:\r
- DEBUG ((DEBUG_ERROR, "%a fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a fail, Status - %r\n", __func__, Status));\r
return Status;\r
}\r
\r
Cc.Iocqes = 4;\r
Status = NVME_SET_CC (Private, &Cc);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __func__, Status));\r
goto ErrorExit;\r
}\r
\r
Status = NvmeWaitController (Private, TRUE);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __func__, Status));\r
goto ErrorExit;\r
}\r
\r
return EFI_SUCCESS;\r
\r
ErrorExit:\r
- DEBUG ((DEBUG_ERROR, "%a fail, Status: %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a fail, Status: %r\n", __func__, Status));\r
return Status;\r
}\r
\r
//\r
NVME_GET_CAP (Private, &Private->Cap);\r
if ((Private->Cap.Css & BIT0) == 0) {\r
- DEBUG ((DEBUG_ERROR, "%a: The NVME controller doesn't support NVMe command set.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: The NVME controller doesn't support NVMe command set.\n", __func__));\r
return EFI_UNSUPPORTED;\r
}\r
\r
// Currently, the driver only supports 4k page size\r
//\r
if ((Private->Cap.Mpsmin + 12) > EFI_PAGE_SHIFT) {\r
- DEBUG ((DEBUG_ERROR, "%a: The driver doesn't support page size other than 4K.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: The driver doesn't support page size other than 4K.\n", __func__));\r
ASSERT (FALSE);\r
return EFI_UNSUPPORTED;\r
}\r
//\r
Status = NvmeDisableController (Private);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: NvmeDisableController fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: NvmeDisableController fail, Status - %r\n", __func__, Status));\r
return Status;\r
}\r
\r
//\r
Status = NvmeEnableController (Private);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: NvmeEnableController fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: NvmeEnableController fail, Status - %r\n", __func__, Status));\r
return Status;\r
}\r
\r
\r
Status = NvmeIdentifyController (Private, Private->ControllerData);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyController fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyController fail, Status - %r\n", __func__, Status));\r
return Status;\r
}\r
\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Number of Namespaces field in Identify Controller data not supported by the driver.\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
return EFI_UNSUPPORTED;\r
}\r
//\r
Status = NvmeCreateIoCompletionQueue (Private);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Create IO completion queue fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: Create IO completion queue fail, Status - %r\n", __func__, Status));\r
return Status;\r
}\r
\r
Status = NvmeCreateIoSubmissionQueue (Private);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Create IO submission queue fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: Create IO submission queue fail, Status - %r\n", __func__, Status));\r
}\r
\r
return Status;\r
DEBUG_ERROR,\r
"%a: The implementation only supports PrpList number up to 4."\r
" But %d are needed here.\n",\r
- __FUNCTION__,\r
+ __func__,\r
PrpListNo\r
));\r
return 0;\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a, Invalid parameter: Packet(%lx)\n",\r
- __FUNCTION__,\r
+ __func__,\r
(UINTN)Packet\r
));\r
return EFI_INVALID_PARAMETER;\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a, Invalid parameter: NvmeCmd (%lx)/NvmeCompletion(%lx)\n",\r
- __FUNCTION__,\r
+ __func__,\r
(UINTN)Packet->NvmeCmd,\r
(UINTN)Packet->NvmeCompletion\r
));\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a, Invalid parameter: QueueId(%lx)\n",\r
- __FUNCTION__,\r
+ __func__,\r
(UINTN)Packet->QueueType\r
));\r
return EFI_INVALID_PARAMETER;\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Nsid mismatch (%x, %x)\n",\r
- __FUNCTION__,\r
+ __func__,\r
Packet->NvmeCmd->Nsid,\r
NamespaceId\r
));\r
//\r
ASSERT (Sq->Psdt == 0);\r
if (Sq->Psdt != 0) {\r
- DEBUG ((DEBUG_ERROR, "%a: Does not support SGL mechanism.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Does not support SGL mechanism.\n", __func__));\r
return EFI_UNSUPPORTED;\r
}\r
\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Does not support external IO queues creation request.\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
return EFI_UNSUPPORTED;\r
}\r
);\r
if (EFI_ERROR (Status) || (MapLength != Packet->TransferLength)) {\r
Status = EFI_OUT_OF_RESOURCES;\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __func__));\r
goto Exit;\r
}\r
\r
);\r
if (EFI_ERROR (Status) || (MapLength != Packet->MetadataLength)) {\r
Status = EFI_OUT_OF_RESOURCES;\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to map meta data buffer.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to map meta data buffer.\n", __func__));\r
goto Exit;\r
}\r
\r
);\r
if (Sq->Prp[1] == 0) {\r
Status = EFI_OUT_OF_RESOURCES;\r
- DEBUG ((DEBUG_ERROR, "%a: Create PRP list fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: Create PRP list fail, Status - %r\n", __func__, Status));\r
goto Exit;\r
}\r
} else if ((Offset + Bytes) > EFI_PAGE_SIZE) {\r
Data32 = ReadUnaligned32 ((UINT32 *)&Private->SqTdbl[QueueId]);\r
Status = NVME_SET_SQTDBL (Private, QueueId, &Data32);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: NVME_SET_SQTDBL fail, Status - %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: NVME_SET_SQTDBL fail, Status - %r\n", __func__, Status));\r
goto Exit;\r
}\r
\r
//\r
// Timeout occurs for an NVMe command, reset the controller to abort the outstanding command\r
//\r
- DEBUG ((DEBUG_ERROR, "%a: Timeout occurs for the PassThru command.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Timeout occurs for the PassThru command.\n", __func__));\r
Status = NvmeControllerInit (Private);\r
if (EFI_ERROR (Status)) {\r
Status = EFI_DEVICE_ERROR;\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: [%02x|%02x|%02x] failed to access config space at offset 0x%x\n",\r
- __FUNCTION__,\r
+ __func__,\r
PciIoDevice->BusNumber,\r
PciIoDevice->DeviceNumber,\r
PciIoDevice->FunctionNumber,\r
EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE,\r
"%a: %a: add [%Lx, %Lx): %r\n",\r
gEfiCallerBaseName,\r
- __FUNCTION__,\r
+ __func__,\r
IntersectionBase,\r
IntersectionEnd,\r
Status\r
"%a: %a: desc [%Lx, %Lx) type %u conflicts with "\r
"aperture [%Lx, %Lx)\n",\r
gEfiCallerBaseName,\r
- __FUNCTION__,\r
+ __func__,\r
Descriptor->BaseAddress,\r
Descriptor->BaseAddress + Descriptor->Length,\r
(UINT32)Descriptor->GcdIoType,\r
DEBUG_ERROR,\r
"%a: %a: GetIoSpaceMap(): %r\n",\r
gEfiCallerBaseName,\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
return Status;\r
EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE,\r
"%a: %a: add [%Lx, %Lx): %r\n",\r
gEfiCallerBaseName,\r
- __FUNCTION__,\r
+ __func__,\r
IntersectionBase,\r
IntersectionEnd,\r
Status\r
"%a: %a: desc [%Lx, %Lx) type %u cap %Lx conflicts "\r
"with aperture [%Lx, %Lx) cap %Lx\n",\r
gEfiCallerBaseName,\r
- __FUNCTION__,\r
+ __func__,\r
Descriptor->BaseAddress,\r
Descriptor->BaseAddress + Descriptor->Length,\r
(UINT32)Descriptor->GcdMemoryType,\r
DEBUG_ERROR,\r
"%a: %a: GetMemorySpaceMap(): %r\n",\r
gEfiCallerBaseName,\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
return Status;\r
DEBUG ((\r
DEBUG_ERROR,\r
"[%a:%d] Translation %lx is not aligned to %lx!\n",\r
- __FUNCTION__,\r
+ __func__,\r
DEBUG_LINE_NUMBER,\r
Translation,\r
Alignment\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: found SD/MMC override protocol\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
}\r
}\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: Failed to override capability - %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
continue;\r
(VOID *)&Private->Slot[Slot].OperatingParameters\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_WARN, "%a: Failed to get operating parameters, using defaults\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_WARN, "%a: Failed to get operating parameters, using defaults\n", __func__));\r
}\r
}\r
}\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: SD/MMC pre reset notifier callback failed - %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
return Status;\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: SD/MMC post reset notifier callback failed - %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
}\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: SD/MMC switch clock freq post notifier callback failed - %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
return Status;\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: SD/MMC pre init notifier callback failed - %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
return Status;\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: SD/MMC post init notifier callback failed - %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
}\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: SD/MMC uhs signaling notifier callback failed - %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
return Status;\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: failed to enable 64-bit DMA on 64-bit capable controller @ %p (%r)\n",\r
- __FUNCTION__,\r
+ __func__,\r
Controller,\r
Status\r
));\r
\r
Data = AllocateZeroPool (DataLen);\r
if (Data == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __func__));\r
return NULL;\r
}\r
\r
Context\r
);\r
if (Urb == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __func__));\r
FreePool (Data);\r
return NULL;\r
}\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: invalid PageLength (%u) in Supported VPD Pages page\n",\r
- __FUNCTION__,\r
+ __func__,\r
(UINT32)PageLength\r
));\r
PageLength = 0;\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: Supported VPD Pages page doesn't start with code 0x%02x\n",\r
- __FUNCTION__,\r
+ __func__,\r
EFI_SCSI_PAGE_CODE_SUPPORTED_VPD\r
));\r
PageLength = 0;\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: non-ascending code in Supported VPD Pages page @ %u\n",\r
- __FUNCTION__,\r
+ __func__,\r
Index\r
));\r
Index = 0;\r
DEBUG ((\r
DEBUG_INFO,\r
"%a() FV at 0x%x, FvAlignment required is 0x%x\n",\r
- __FUNCTION__,\r
+ __func__,\r
FvHeader,\r
FvAlignment\r
));\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: MemoryBaseAddress=0x%Lx MemoryLength=0x%Lx\n",\r
- __FUNCTION__,\r
+ __func__,\r
MemoryBaseAddress,\r
MemoryLength\r
));\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: StackBase = 0x%016lx StackSize = 0x%016lx\n",\r
- __FUNCTION__,\r
+ __func__,\r
MemoryHob->AllocDescriptor.MemoryBaseAddress,\r
MemoryHob->AllocDescriptor.MemoryLength\r
));\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: applying strict permissions to active memory regions\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
\r
MergeMemoryMapForProtectionPolicy (MemoryMap, &MemoryMapSize, DescriptorSize);\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: applying strict permissions to inactive memory regions\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
\r
CoreAcquireGcdMemoryLock ();\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: recursion aborted due to nesting depth\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
//\r
// Map "aborted" to "not found".\r
DEBUG ((\r
DEBUG_INFO,\r
"%a() Stack Base: 0x%lx, Stack Size: 0x%x\n",\r
- __FUNCTION__,\r
+ __func__,\r
BaseOfStack,\r
STACK_SIZE\r
));\r
DEBUG ((\r
DEBUG_INFO,\r
"%a() Stack Base: 0x%lx, Stack Size: 0x%x\n",\r
- __FUNCTION__,\r
+ __func__,\r
BaseOfStack,\r
STACK_SIZE\r
));\r
//\r
BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE));\r
if (BaseOfStack == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a: Can't allocate memory for stack.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Can't allocate memory for stack.", __func__));\r
ASSERT (FALSE);\r
}\r
\r
//\r
Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to signal End of PEI event.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to signal End of PEI event.", __func__));\r
ASSERT (FALSE);\r
}\r
\r
DEBUG ((\r
DEBUG_INFO,\r
"%a(): Found 0x%x PEI FFS files in the %dth FV\n",\r
- __FUNCTION__,\r
+ __func__,\r
PeimCount,\r
Private->CurrentPeimFvCount\r
));\r
DEBUG ((\r
DEBUG_INFO,\r
"%a() FV at 0x%x, FvAlignment required is 0x%x\n",\r
- __FUNCTION__,\r
+ __func__,\r
FvHeader,\r
FvAlignment\r
));\r
// Locate the VariablePolicy protocol\r
Status = gBS->LocateProtocol (&gEdkiiVariablePolicyProtocolGuid, NULL, (VOID **)&VariablePolicy);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "DxeCapsuleReportLib %a - Could not locate VariablePolicy protocol! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "DxeCapsuleReportLib %a - Could not locate VariablePolicy protocol! %r\n", __func__, Status));\r
ASSERT_EFI_ERROR (Status);\r
}\r
\r
return RETURN_SUCCESS;\r
}\r
\r
- DEBUG ((DEBUG_INFO, "%a() in %a module\n", __FUNCTION__, gEfiCallerBaseName));\r
+ DEBUG ((DEBUG_INFO, "%a() in %a module\n", __func__, gEfiCallerBaseName));\r
\r
if (mEventDxeSmmReadyToLock != NULL) {\r
//\r
//\r
if ((ResetDataStringSize < DataSize) && ((DataSize - ResetDataStringSize) >= sizeof (GUID))) {\r
ResetSubtypeGuid = (GUID *)((UINT8 *)ResetData + ResetDataStringSize);\r
- DEBUG ((DEBUG_VERBOSE, "%a - Detected reset subtype %g...\n", __FUNCTION__, ResetSubtypeGuid));\r
+ DEBUG ((DEBUG_VERBOSE, "%a - Detected reset subtype %g...\n", __func__, ResetSubtypeGuid));\r
return ResetSubtypeGuid;\r
}\r
\r
"%a:%a: failed to allocate reserved pages: "\r
"BufferSize=%Lu LoadFile=\"%s\" FilePath=\"%s\"\n",\r
gEfiCallerBaseName,\r
- __FUNCTION__,\r
+ __func__,\r
(UINT64)BufferSize,\r
LoadFileText,\r
FileText\r
DEBUG ((\r
DEBUG_ERROR,\r
"[%a:%d] Repair failed after %d retries.\n",\r
- __FUNCTION__,\r
+ __func__,\r
DEBUG_LINE_NUMBER,\r
ReconnectRepairCount\r
));\r
//\r
// If either of the pointers are NULL, we can't proceed.\r
if ((CommBuffer == NULL) || (CommBufferSize == NULL)) {\r
- DEBUG ((DEBUG_INFO, "%a - Invalid comm buffer pointers!\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a - Invalid comm buffer pointers!\n", __func__));\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
if ((InternalCommBufferSize > VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE) ||\r
!VarCheckPolicyIsBufferOutsideValid ((UINTN)CommBuffer, (UINT64)InternalCommBufferSize))\r
{\r
- DEBUG ((DEBUG_ERROR, "%a - Invalid CommBuffer supplied! 0x%016lX[0x%016lX]\n", __FUNCTION__, CommBuffer, InternalCommBufferSize));\r
+ DEBUG ((DEBUG_ERROR, "%a - Invalid CommBuffer supplied! 0x%016lX[0x%016lX]\n", __func__, CommBuffer, InternalCommBufferSize));\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
// If the size does not meet a minimum threshold, we cannot proceed.\r
ExpectedSize = sizeof (VAR_CHECK_POLICY_COMM_HEADER);\r
if (InternalCommBufferSize < ExpectedSize) {\r
- DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION__, InternalCommBufferSize, ExpectedSize));\r
+ DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, InternalCommBufferSize, ExpectedSize));\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
if ((InternalPolicyCommmHeader->Signature != VAR_CHECK_POLICY_COMM_SIG) ||\r
(InternalPolicyCommmHeader->Revision != VAR_CHECK_POLICY_COMM_REVISION))\r
{\r
- DEBUG ((DEBUG_INFO, "%a - Signature or revision are incorrect!\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a - Signature or revision are incorrect!\n", __func__));\r
// We have verified the buffer is not null and have enough size to hold Result field.\r
PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;\r
return EFI_SUCCESS;\r
// This add should be safe because these are fixed sizes so far.\r
ExpectedSize += sizeof (VAR_CHECK_POLICY_COMM_IS_ENABLED_PARAMS);\r
if (InternalCommBufferSize < ExpectedSize) {\r
- DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION__, InternalCommBufferSize, ExpectedSize));\r
+ DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, InternalCommBufferSize, ExpectedSize));\r
PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;\r
break;\r
}\r
// This add should be safe because these are fixed sizes so far.\r
ExpectedSize += sizeof (VARIABLE_POLICY_ENTRY);\r
if (InternalCommBufferSize < ExpectedSize) {\r
- DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION__, InternalCommBufferSize, ExpectedSize));\r
+ DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, InternalCommBufferSize, ExpectedSize));\r
PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;\r
break;\r
}\r
EFI_ERROR (SafeUintnAdd (sizeof (VAR_CHECK_POLICY_COMM_HEADER), PolicyEntry->Size, &ExpectedSize)) ||\r
(InternalCommBufferSize < ExpectedSize))\r
{\r
- DEBUG ((DEBUG_INFO, "%a - Bad policy entry contents!\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a - Bad policy entry contents!\n", __func__));\r
PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;\r
break;\r
}\r
// This add should be safe because these are fixed sizes so far.\r
ExpectedSize += sizeof (VAR_CHECK_POLICY_COMM_DUMP_PARAMS) + VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE;\r
if (InternalCommBufferSize < ExpectedSize) {\r
- DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION__, InternalCommBufferSize, ExpectedSize));\r
+ DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, InternalCommBufferSize, ExpectedSize));\r
PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;\r
break;\r
}\r
\r
default:\r
// Mark unknown requested command as EFI_UNSUPPORTED.\r
- DEBUG ((DEBUG_INFO, "%a - Invalid command requested! %d\n", __FUNCTION__, PolicyCommmHeader->Command));\r
+ DEBUG ((DEBUG_INFO, "%a - Invalid command requested! %d\n", __func__, PolicyCommmHeader->Command));\r
PolicyCommmHeader->Result = EFI_UNSUPPORTED;\r
break;\r
}\r
DEBUG ((\r
DEBUG_VERBOSE,\r
"%a - Command %d returning %r.\n",\r
- __FUNCTION__,\r
+ __func__,\r
PolicyCommmHeader->Command,\r
PolicyCommmHeader->Result\r
));\r
}\r
// Otherwise, there's not much we can do.\r
else {\r
- DEBUG ((DEBUG_ERROR, "%a - Cannot Initialize VariablePolicyLib! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Cannot Initialize VariablePolicyLib! %r\n", __func__, Status));\r
ASSERT_EFI_ERROR (Status);\r
}\r
\r
DEBUG ((\r
DEBUG_VERBOSE,\r
"%a - Bad Size. 0x%X <> 0x%X-0x%X\n",\r
- __FUNCTION__,\r
+ __func__,\r
DataSize,\r
ActivePolicy->MinSize,\r
ActivePolicy->MaxSize\r
DEBUG ((\r
DEBUG_VERBOSE,\r
"%a - Bad Attributes. 0x%X <> 0x%X:0x%X\n",\r
- __FUNCTION__,\r
+ __func__,\r
Attributes,\r
ActivePolicy->AttributesMustHave,\r
ActivePolicy->AttributesCantHave\r
}\r
\r
Exit:\r
- DEBUG ((DEBUG_VERBOSE, "%a - Variable (%g:%s) returning %r.\n", __FUNCTION__, VendorGuid, VariableName, ReturnStatus));\r
+ DEBUG ((DEBUG_VERBOSE, "%a - Variable (%g:%s) returning %r.\n", __func__, VendorGuid, VariableName, ReturnStatus));\r
return ReturnStatus;\r
}\r
\r
DEBUG ((\r
DEBUG_INFO,\r
"%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n",\r
- __FUNCTION__,\r
+ __func__,\r
Context->StackBufferBase,\r
Context->StackBufferLength\r
));\r
CapsuleDataPtr64 = 0;\r
\r
if ((ListLength == NULL) || (HeadList == NULL)) {\r
- DEBUG ((DEBUG_ERROR, "%a Invalid parameters. Inputs can't be NULL\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a Invalid parameters. Inputs can't be NULL\n", __func__));\r
ASSERT (ListLength != NULL);\r
ASSERT (HeadList != NULL);\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
if (ValidIndex == 0) {\r
- DEBUG ((DEBUG_ERROR, "%a didn't find any SG lists in variables\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a didn't find any SG lists in variables\n", __func__));\r
return EFI_NOT_FOUND;\r
}\r
\r
//\r
Status = GetScatterGatherHeadEntries (&ListLength, &VariableArrayAddress);\r
if (EFI_ERROR (Status) || (VariableArrayAddress == NULL)) {\r
- DEBUG ((DEBUG_ERROR, "%a failed to get Scatter Gather List Head Entries. Status = %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a failed to get Scatter Gather List Head Entries. Status = %r\n", __func__, Status));\r
goto Done;\r
}\r
\r
DEBUG ((\r
DEBUG_INFO,\r
"%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n",\r
- __FUNCTION__,\r
+ __func__,\r
EntrypointContext->StackBufferBase,\r
EntrypointContext->StackBufferLength\r
));\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Media block size 0x%x unable to hold an AVDP.\n",\r
- __FUNCTION__,\r
+ __func__,\r
BlockSize\r
));\r
return EFI_UNSUPPORTED;\r
// Check if read block is a valid AVDP descriptor\r
//\r
if (DescriptorTag->TagIdentifier == UdfAnchorVolumeDescriptorPointer) {\r
- DEBUG ((DEBUG_INFO, "%a: found AVDP at block %d\n", __FUNCTION__, 256));\r
+ DEBUG ((DEBUG_INFO, "%a: found AVDP at block %d\n", __func__, 256));\r
AvdpsCount++;\r
}\r
\r
DEBUG ((\r
DEBUG_INFO,\r
"%a: found AVDP at block %Ld\n",\r
- __FUNCTION__,\r
+ __func__,\r
EndLBA - 256\r
));\r
return EFI_SUCCESS;\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: found AVDP at block %Ld\n",\r
- __FUNCTION__,\r
+ __func__,\r
LastAvdpBlockNum\r
));\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: correcting last block from %Ld to %Ld\n",\r
- __FUNCTION__,\r
+ __func__,\r
EndLBA,\r
LastAvdpBlockNum\r
));\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: GetFileSize() fails with status - %r.\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
goto Error_Get_File_Size;\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Fail to get the Partition Descriptor from the given Long Allocation Descriptor.\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
return EFI_UNSUPPORTED;\r
}\r
return EFI_ABORTED;\r
}\r
\r
- DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a(): success\n", __func__));\r
return EFI_SUCCESS;\r
}\r
\r
\r
FtwDevice->FtwLastWriteHeader->Complete = FTW_VALID_STATE;\r
\r
- DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a(): success\n", __func__));\r
return EFI_SUCCESS;\r
}\r
\r
Status = EFI_SUCCESS;\r
}\r
\r
- DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a(): success\n", __func__));\r
\r
return Status;\r
}\r
DEBUG ((\r
DEBUG_INFO,\r
"Ftw: Restart working block update in %a() - %r\n",\r
- __FUNCTION__,\r
+ __func__,\r
Status\r
));\r
FtwAbort (&FtwDevice->FtwInstance);\r
}\r
}\r
\r
- DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token number: %d\n", __FUNCTION__, Guid, ExTokenNumber));\r
+ DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token number: %d\n", __func__, Guid, ExTokenNumber));\r
ASSERT (FALSE);\r
\r
return 0;\r
DEBUG ((\r
DEBUG_INFO,\r
"%a() re-allocate SMBIOS 32-bit table\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
if (EntryPointStructure->TableAddress != 0) {\r
//\r
DEBUG ((\r
DEBUG_INFO,\r
"%a() re-allocate SMBIOS 64-bit table\n",\r
- __FUNCTION__\r
+ __func__\r
));\r
if (Smbios30EntryPointStructure->TableAddress != 0) {\r
//\r
// First, we obviously need to locate the VariablePolicy protocol.\r
Status = gBS->LocateProtocol (&gEdkiiVariablePolicyProtocolGuid, NULL, (VOID **)&VariablePolicy);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Could not locate VariablePolicy protocol! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Could not locate VariablePolicy protocol! %r\n", __func__, Status));\r
return;\r
}\r
\r
VARIABLE_POLICY_TYPE_LOCK_NOW\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status));\r
}\r
\r
Status = RegisterBasicVariablePolicy (\r
VARIABLE_POLICY_TYPE_LOCK_NOW\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status));\r
}\r
\r
return;\r
DEBUG ((\r
DEBUG_WARN,\r
"%a: deleting unexpected / unsupported variable %g:%s\n",\r
- __FUNCTION__,\r
+ __func__,\r
&gEfiMemoryOverwriteControlDataGuid,\r
MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME\r
));\r
}\r
\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status));\r
ASSERT_EFI_ERROR (Status);\r
}\r
\r
}\r
\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status));\r
ASSERT_EFI_ERROR (Status);\r
}\r
\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Failed to set variable '%s' with Guid %g\n",\r
- __FUNCTION__,\r
+ __func__,\r
VariableName,\r
VendorGuid\r
));\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Failed to set variable '%s' with Guid %g\n",\r
- __FUNCTION__,\r
+ __func__,\r
VariableName,\r
VendorGuid\r
));\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a: Failed to set variable '%s' with Guid %g\n",\r
- __FUNCTION__,\r
+ __func__,\r
VariableName,\r
VendorGuid\r
));\r
EFI_STATUS Status;\r
VARIABLE_POLICY_ENTRY *NewPolicy;\r
\r
- DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! %a() will go away soon!\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! %a() will go away soon!\n", __func__));\r
DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!\n"));\r
DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", VendorGuid, VariableName));\r
\r
}\r
\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTION__, VariableName, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__, VariableName, Status));\r
}\r
\r
if (NewPolicy != NULL) {\r
PolicyHeader->Command = VAR_CHECK_POLICY_COMMAND_DISABLE;\r
\r
Status = InternalMmCommunicate (CommHeader, &BufferSize);\r
- DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));\r
\r
ReleaseLockOnlyAtBootTime (&mMmCommunicationLock);\r
\r
PolicyHeader->Command = VAR_CHECK_POLICY_COMMAND_IS_ENABLED;\r
\r
Status = InternalMmCommunicate (CommHeader, &BufferSize);\r
- DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));\r
\r
if (!EFI_ERROR (Status)) {\r
Status = PolicyHeader->Result;\r
DEBUG ((\r
DEBUG_ERROR,\r
"%a - Policy too large for buffer! %r, %d > %d \n",\r
- __FUNCTION__,\r
+ __func__,\r
Status,\r
RequiredSize,\r
mMmCommunicationBufferSize\r
CopyMem (PolicyBuffer, NewPolicy, NewPolicy->Size);\r
\r
Status = InternalMmCommunicate (CommHeader, &BufferSize);\r
- DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));\r
\r
ReleaseLockOnlyAtBootTime (&mMmCommunicationLock);\r
\r
CommandParams->PageRequested = PageRequested;\r
\r
Status = InternalMmCommunicate (CommHeader, &BufferSize);\r
- DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));\r
\r
if (!EFI_ERROR (Status)) {\r
Status = PolicyHeader->Result;\r
PolicyHeader->Command = VAR_CHECK_POLICY_COMMAND_LOCK;\r
\r
Status = InternalMmCommunicate (CommHeader, &BufferSize);\r
- DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));\r
\r
ReleaseLockOnlyAtBootTime (&mMmCommunicationLock);\r
\r
// Locate the shared comm buffer to use for sending MM commands.\r
Status = InitMmCommonCommBuffer (&mMmCommunicationBufferSize, &mMmCommunicationBuffer);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Failed to locate a viable MM comm buffer! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Failed to locate a viable MM comm buffer! %r\n", __func__, Status));\r
ASSERT_EFI_ERROR (Status);\r
return Status;\r
}\r
// Locate the MmCommunication protocol.\r
Status = gBS->LocateProtocol (&gEfiMmCommunication2ProtocolGuid, NULL, (VOID **)&mMmCommunication);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Failed to locate MmCommunication protocol! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Failed to locate MmCommunication protocol! %r\n", __func__, Status));\r
ASSERT_EFI_ERROR (Status);\r
return Status;\r
}\r
NULL\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Failed to install protocol! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Failed to install protocol! %r\n", __func__, Status));\r
goto Exit;\r
} else {\r
ProtocolInstalled = TRUE;\r
&VirtualAddressChangeEvent\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a - Failed to create VirtualAddressChange event! %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a - Failed to create VirtualAddressChange event! %r\n", __func__, Status));\r
goto Exit;\r
} else {\r
VirtualAddressChangeRegistered = TRUE;\r