+/**\r
+ Implementaion of the UnicodeValueToString service in EFI_PRINT2_PROTOCOL.\r
+\r
+ If the macro DISABLE_NEW_DEPRECATED_INTERFACES is defined, then ASSERT().\r
+\r
+ @param Buffer The pointer to the output buffer for the produced\r
+ Null-terminated Unicode string.\r
+ @param Flags The bitmask of flags that specify left justification, zero\r
+ pad, and commas.\r
+ @param Value The 64-bit signed value to convert to a string.\r
+ @param Width The maximum number of Unicode characters to place in Buffer,\r
+ not including the Null-terminator.\r
+\r
+ @return If the macro DISABLE_NEW_DEPRECATED_INTERFACES is defined, return 0.\r
+ Otherwise, return the number of Unicode characters in Buffer not\r
+ including the Null-terminator.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+PrintDxeUnicodeValueToString (\r
+ IN OUT CHAR16 *Buffer,\r
+ IN UINTN Flags,\r
+ IN INT64 Value,\r
+ IN UINTN Width\r
+ )\r
+{\r
+#ifdef DISABLE_NEW_DEPRECATED_INTERFACES\r
+ //\r
+ // If the macro DISABLE_NEW_DEPRECATED_INTERFACES is defined, then the\r
+ // PrintLib API UnicodeValueToString is already deprecated.\r
+ // In this case, ASSERT will be triggered and zero will be returned for the\r
+ // implementation of the UnicodeValueToString service in EFI_PRINT2_PROTOCOL\r
+ // to indicate that the service is no longer supported.\r
+ //\r
+ DEBUG ((DEBUG_ERROR, "PrintDxe: The UnicodeValueToString service in EFI_PRINT2_PROTOCOL is no longer supported for security reason.\n"));\r
+ DEBUG ((DEBUG_ERROR, "PrintDxe: Please consider using the UnicodeValueToStringS service in EFI_PRINT2S_PROTOCOL.\n"));\r
+ ASSERT (FALSE);\r
+ return 0;\r
+#else\r
+ return UnicodeValueToString (Buffer, Flags, Value, Width);\r
+#endif\r
+}\r
+\r
+/**\r
+ Implementaion of the AsciiValueToString service in EFI_PRINT2_PROTOCOL.\r
+\r
+ If the macro DISABLE_NEW_DEPRECATED_INTERFACES is defined, then ASSERT().\r
+\r
+ @param Buffer A pointer to the output buffer for the produced\r
+ Null-terminated ASCII string.\r
+ @param Flags The bitmask of flags that specify left justification, zero\r
+ pad, and commas.\r
+ @param Value The 64-bit signed value to convert to a string.\r
+ @param Width The maximum number of ASCII characters to place in Buffer,\r
+ not including the Null-terminator.\r
+\r
+ @return If the macro DISABLE_NEW_DEPRECATED_INTERFACES is defined, return 0.\r
+ Otherwise, return the number of ASCII characters in Buffer not\r
+ including the Null-terminator.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+PrintDxeAsciiValueToString (\r
+ OUT CHAR8 *Buffer,\r
+ IN UINTN Flags,\r
+ IN INT64 Value,\r
+ IN UINTN Width\r
+ )\r
+{\r
+#ifdef DISABLE_NEW_DEPRECATED_INTERFACES\r
+ //\r
+ // If the macro DISABLE_NEW_DEPRECATED_INTERFACES is defined, then the\r
+ // PrintLib API AsciiValueToString is already deprecated.\r
+ // In this case, ASSERT will be triggered and zero will be returned for the\r
+ // implementation of the AsciiValueToString service in EFI_PRINT2_PROTOCOL\r
+ // to indicate that the service is no longer supported.\r
+ //\r
+ DEBUG ((DEBUG_ERROR, "PrintDxe: The AsciiValueToString service in EFI_PRINT2_PROTOCOL is no longer supported for security reason.\n"));\r
+ DEBUG ((DEBUG_ERROR, "PrintDxe: Please consider using the AsciiValueToStringS service in EFI_PRINT2S_PROTOCOL.\n"));\r
+ ASSERT (FALSE);\r
+ return 0;\r
+#else\r
+ return AsciiValueToString (Buffer, Flags, Value, Width);\r
+#endif\r
+}\r
+\r