]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
SecurityPkg: Change use of EFI_D_* to DEBUG_*
[mirror_edk2.git] / SecurityPkg / Library / Tpm2DeviceLibDTpm / Tpm2Ptp.c
index f1f80916834f10a2061014075be517100abd44d7..edde7f8e1546246d932ff8196d181f271adee198 100644 (file)
@@ -154,22 +154,22 @@ PtpCrbTpmCommand (
   DEBUG_CODE (\r
     UINTN  DebugSize;\r
 \r
-    DEBUG ((EFI_D_VERBOSE, "PtpCrbTpmCommand Send - "));\r
+    DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand Send - "));\r
     if (SizeIn > 0x100) {\r
       DebugSize = 0x40;\r
     } else {\r
       DebugSize = SizeIn;\r
     }\r
     for (Index = 0; Index < DebugSize; Index++) {\r
-      DEBUG ((EFI_D_VERBOSE, "%02x ", BufferIn[Index]));\r
+      DEBUG ((DEBUG_VERBOSE, "%02x ", BufferIn[Index]));\r
     }\r
     if (DebugSize != SizeIn) {\r
-      DEBUG ((EFI_D_VERBOSE, "...... "));\r
+      DEBUG ((DEBUG_VERBOSE, "...... "));\r
       for (Index = SizeIn - 0x20; Index < SizeIn; Index++) {\r
-        DEBUG ((EFI_D_VERBOSE, "%02x ", BufferIn[Index]));\r
+        DEBUG ((DEBUG_VERBOSE, "%02x ", BufferIn[Index]));\r
       }\r
     }\r
-    DEBUG ((EFI_D_VERBOSE, "\n"));\r
+    DEBUG ((DEBUG_VERBOSE, "\n"));\r
   );\r
   TpmOutSize         = 0;\r
 \r
@@ -286,11 +286,11 @@ PtpCrbTpmCommand (
     BufferOut[Index] = MmioRead8 ((UINTN)&CrbReg->CrbDataBuffer[Index]);\r
   }\r
   DEBUG_CODE (\r
-    DEBUG ((EFI_D_VERBOSE, "PtpCrbTpmCommand ReceiveHeader - "));\r
+    DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand ReceiveHeader - "));\r
     for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {\r
-      DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index]));\r
+      DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));\r
     }\r
-    DEBUG ((EFI_D_VERBOSE, "\n"));\r
+    DEBUG ((DEBUG_VERBOSE, "\n"));\r
   );\r
   //\r
   // Check the response data header (tag, parasize and returncode)\r
@@ -298,7 +298,7 @@ PtpCrbTpmCommand (
   CopyMem (&Data16, BufferOut, sizeof (UINT16));\r
   // TPM2 should not use this RSP_COMMAND\r
   if (SwapBytes16 (Data16) == TPM_ST_RSP_COMMAND) {\r
-    DEBUG ((EFI_D_ERROR, "TPM2: TPM_ST_RSP error - %x\n", TPM_ST_RSP_COMMAND));\r
+    DEBUG ((DEBUG_ERROR, "TPM2: TPM_ST_RSP error - %x\n", TPM_ST_RSP_COMMAND));\r
     Status = EFI_UNSUPPORTED;\r
     goto GoIdle_Exit;\r
   }\r
@@ -321,11 +321,11 @@ PtpCrbTpmCommand (
   }\r
 \r
   DEBUG_CODE (\r
-    DEBUG ((EFI_D_VERBOSE, "PtpCrbTpmCommand Receive - "));\r
+    DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand Receive - "));\r
     for (Index = 0; Index < TpmOutSize; Index++) {\r
-      DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index]));\r
+      DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));\r
     }\r
-    DEBUG ((EFI_D_VERBOSE, "\n"));\r
+    DEBUG ((DEBUG_VERBOSE, "\n"));\r
   );\r
 \r
 GoReady_Exit:\r
@@ -494,36 +494,36 @@ DumpPtpInfo (
   //\r
   // Dump InterfaceId Register for PTP\r
   //\r
-  DEBUG ((EFI_D_INFO, "InterfaceId - 0x%08x\n", InterfaceId.Uint32));\r
-  DEBUG ((EFI_D_INFO, "  InterfaceType    - 0x%02x\n", InterfaceId.Bits.InterfaceType));\r
+  DEBUG ((DEBUG_INFO, "InterfaceId - 0x%08x\n", InterfaceId.Uint32));\r
+  DEBUG ((DEBUG_INFO, "  InterfaceType    - 0x%02x\n", InterfaceId.Bits.InterfaceType));\r
   if (InterfaceId.Bits.InterfaceType != PTP_INTERFACE_IDENTIFIER_INTERFACE_TYPE_TIS) {\r
-    DEBUG ((EFI_D_INFO, "  InterfaceVersion - 0x%02x\n", InterfaceId.Bits.InterfaceVersion));\r
-    DEBUG ((EFI_D_INFO, "  CapFIFO          - 0x%x\n", InterfaceId.Bits.CapFIFO));\r
-    DEBUG ((EFI_D_INFO, "  CapCRB           - 0x%x\n", InterfaceId.Bits.CapCRB));\r
+    DEBUG ((DEBUG_INFO, "  InterfaceVersion - 0x%02x\n", InterfaceId.Bits.InterfaceVersion));\r
+    DEBUG ((DEBUG_INFO, "  CapFIFO          - 0x%x\n", InterfaceId.Bits.CapFIFO));\r
+    DEBUG ((DEBUG_INFO, "  CapCRB           - 0x%x\n", InterfaceId.Bits.CapCRB));\r
   }\r
 \r
   //\r
   // Dump Capability Register for TIS and FIFO\r
   //\r
-  DEBUG ((EFI_D_INFO, "InterfaceCapability - 0x%08x\n", InterfaceCapability.Uint32));\r
+  DEBUG ((DEBUG_INFO, "InterfaceCapability - 0x%08x\n", InterfaceCapability.Uint32));\r
   if ((InterfaceId.Bits.InterfaceType == PTP_INTERFACE_IDENTIFIER_INTERFACE_TYPE_TIS) ||\r
       (InterfaceId.Bits.InterfaceType == PTP_INTERFACE_IDENTIFIER_INTERFACE_TYPE_FIFO)) {\r
-    DEBUG ((EFI_D_INFO, "  InterfaceVersion - 0x%x\n", InterfaceCapability.Bits.InterfaceVersion));\r
+    DEBUG ((DEBUG_INFO, "  InterfaceVersion - 0x%x\n", InterfaceCapability.Bits.InterfaceVersion));\r
   }\r
 \r
   //\r
   // Dump StatusEx Register for PTP FIFO\r
   //\r
-  DEBUG ((EFI_D_INFO, "StatusEx - 0x%02x\n", StatusEx));\r
+  DEBUG ((DEBUG_INFO, "StatusEx - 0x%02x\n", StatusEx));\r
   if (InterfaceCapability.Bits.InterfaceVersion == INTERFACE_CAPABILITY_INTERFACE_VERSION_PTP) {\r
-    DEBUG ((EFI_D_INFO, "  TpmFamily - 0x%x\n", (StatusEx & PTP_FIFO_STS_EX_TPM_FAMILY) >> PTP_FIFO_STS_EX_TPM_FAMILY_OFFSET));\r
+    DEBUG ((DEBUG_INFO, "  TpmFamily - 0x%x\n", (StatusEx & PTP_FIFO_STS_EX_TPM_FAMILY) >> PTP_FIFO_STS_EX_TPM_FAMILY_OFFSET));\r
   }\r
 \r
   Vid = 0xFFFF;\r
   Did = 0xFFFF;\r
   Rid = 0xFF;\r
   PtpInterface = GetCachedPtpInterface ();\r
-  DEBUG ((EFI_D_INFO, "PtpInterface - %x\n", PtpInterface));\r
+  DEBUG ((DEBUG_INFO, "PtpInterface - %x\n", PtpInterface));\r
   switch (PtpInterface) {\r
   case Tpm2PtpInterfaceCrb:\r
     Vid = MmioRead16 ((UINTN)&((PTP_CRB_REGISTERS *)Register)->Vid);\r
@@ -539,9 +539,9 @@ DumpPtpInfo (
   default:\r
     break;\r
   }\r
-  DEBUG ((EFI_D_INFO, "VID - 0x%04x\n", Vid));\r
-  DEBUG ((EFI_D_INFO, "DID - 0x%04x\n", Did));\r
-  DEBUG ((EFI_D_INFO, "RID - 0x%02x\n", Rid));\r
+  DEBUG ((DEBUG_INFO, "VID - 0x%04x\n", Vid));\r
+  DEBUG ((DEBUG_INFO, "DID - 0x%04x\n", Did));\r
+  DEBUG ((DEBUG_INFO, "RID - 0x%02x\n", Rid));\r
 }\r
 \r
 /**\r